@bdelab/roar-sre 1.1.11 → 1.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- ;!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fb55cb8f-a8ed-40d7-acc8-f76dbd8c1d7a",e._sentryDebugIdIdentifier="sentry-dbid-fb55cb8f-a8ed-40d7-acc8-f76dbd8c1d7a")}catch(e){}}();import e from"path";import t from"stream";("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"8bfcb18835642d05eada4e472877c43485138935"};var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a={exports:{}};
1
+ ;!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="92f21f36-25f1-47c3-bb4b-9459745f27ce",e._sentryDebugIdIdentifier="sentry-dbid-92f21f36-25f1-47c3-bb4b-9459745f27ce")}catch(e){}}();import e from"path";import t from"stream";("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"3b255fe7985217daf1147c9a3e686952f243d87d"};var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a={exports:{}};
2
2
  /*! store2 - v2.14.2 - 2022-07-18
3
3
  * Copyright (c) 2022 Nathan Bubna; Licensed (MIT OR GPL-3.0) */!function(e){!function(t,n){var i={version:"2.14.2",areas:{},apis:{},nsdelim:".",inherit:function(e,t){for(var n in e)t.hasOwnProperty(n)||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n));return t},stringify:function(e,t){return void 0===e||"function"==typeof e?e+"":JSON.stringify(e,t||i.replace)},parse:function(e,t){try{return JSON.parse(e,t||i.revive)}catch(t){return e}},fn:function(e,t){for(var n in i.storeAPI[e]=t,i.apis)i.apis[n][e]=t},get:function(e,t){return e.getItem(t)},set:function(e,t,n){e.setItem(t,n)},remove:function(e,t){e.removeItem(t)},key:function(e,t){return e.key(t)},length:function(e){return e.length},clear:function(e){e.clear()},Store:function(e,t,n){var a=i.inherit(i.storeAPI,(function(e,t,n){return 0===arguments.length?a.getAll():"function"==typeof t?a.transact(e,t,n):void 0!==t?a.set(e,t,n):"string"==typeof e||"number"==typeof e?a.get(e):"function"==typeof e?a.each(e):e?a.setAll(e,t):a.clear()}));a._id=e;try{var s="__store2_test";t.setItem(s,"ok"),a._area=t,t.removeItem(s)}catch(e){a._area=i.storage("fake")}return a._ns=n||"",i.areas[e]||(i.areas[e]=a._area),i.apis[a._ns+a._id]||(i.apis[a._ns+a._id]=a),a},storeAPI:{area:function(e,t){var n=this[e];return n&&n.area||(n=i.Store(e,t,this._ns),this[e]||(this[e]=n)),n},namespace:function(e,t,n){if(n=n||this._delim||i.nsdelim,!e)return this._ns?this._ns.substring(0,this._ns.length-n.length):"";var a=e,s=this[a];if(!(s&&s.namespace||((s=i.Store(this._id,this._area,this._ns+a+n))._delim=n,this[a]||(this[a]=s),t)))for(var r in i.areas)s.area(r,i.areas[r]);return s},isFake:function(e){return e?(this._real=this._area,this._area=i.storage("fake")):!1===e&&(this._area=this._real||this._area),"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(e){return this._area.has?this._area.has(this._in(e)):!!(this._in(e)in this._area)},size:function(){return this.keys().length},each:function(e,t){for(var n=0,a=i.length(this._area);n<a;n++){var s=this._out(i.key(this._area,n));if(void 0!==s&&!1===e.call(this,s,this.get(s),t))break;a>i.length(this._area)&&(a--,n--)}return t||this},keys:function(e){return this.each((function(e,t,n){n.push(e)}),e||[])},get:function(e,t){var n,a=i.get(this._area,this._in(e));return"function"==typeof t&&(n=t,t=null),null!==a?i.parse(a,n):null!=t?t:a},getAll:function(e){return this.each((function(e,t,n){n[e]=t}),e||{})},transact:function(e,t,n){var i=this.get(e,n),a=t(i);return this.set(e,void 0===a?i:a),this},set:function(e,t,n){var a,s=this.get(e);return null!=s&&!1===n?t:("function"==typeof n&&(a=n,n=void 0),i.set(this._area,this._in(e),i.stringify(t,a),n)||s)},setAll:function(e,t){var n,i;for(var a in e)i=e[a],this.set(a,i,t)!==i&&(n=!0);return n},add:function(e,t,n){var a=this.get(e);if(a instanceof Array)t=a.concat(t);else if(null!==a){var s=typeof a;if(s===typeof t&&"object"===s){for(var r in t)a[r]=t[r];t=a}else t=a+t}return i.set(this._area,this._in(e),i.stringify(t,n)),t},remove:function(e,t){var n=this.get(e,t);return i.remove(this._area,this._in(e)),n},clear:function(){return this._ns?this.each((function(e){i.remove(this._area,this._in(e))}),1):i.clear(this._area),this},clearAll:function(){var e=this._area;for(var t in i.areas)i.areas.hasOwnProperty(t)&&(this._area=i.areas[t],this.clear());return this._area=e,this},_in:function(e){return"string"!=typeof e&&(e=i.stringify(e)),this._ns?this._ns+e:e},_out:function(e){return this._ns?e&&0===e.indexOf(this._ns)?e.substring(this._ns.length):void 0:e}},storage:function(e){return i.inherit(i.storageAPI,{items:{},name:e})},storageAPI:{length:0,has:function(e){return this.items.hasOwnProperty(e)},key:function(e){var t=0;for(var n in this.items)if(this.has(n)&&e===t++)return n},setItem:function(e,t){this.has(e)||this.length++,this.items[e]=t},removeItem:function(e){this.has(e)&&(delete this.items[e],this.length--)},getItem:function(e){return this.has(e)?this.items[e]:null},clear:function(){for(var e in this.items)this.removeItem(e)}}},a=i.Store("local",function(){try{return localStorage}catch(e){}}());a.local=a,a._=i,a.area("session",function(){try{return sessionStorage}catch(e){}}()),a.area("page",i.storage("page")),"function"==typeof n&&void 0!==n.amd?n("store2",[],(function(){return a})):e.exports?e.exports=a:(t.store&&(i.conflict=t.store),t.store=a)}(n,n&&n.define)}(a);var s=i(a.exports);function r(e,t,n,i){return new(n||(n=Promise))((function(a,s){function r(e){try{c(i.next(e))}catch(e){s(e)}}function o(e){try{c(i.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}c((i=i.apply(e,t||[])).next())}))}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var o=(e,{include:t,exclude:n}={})=>{const i=e=>{const i=t=>"string"==typeof t?e===t:t.test(e);return t?t.some(i):!n||!n.some(i)};for(const[t,n]of(e=>{const t=new Set;do{for(const n of Reflect.ownKeys(e))t.add([e,n])}while((e=Reflect.getPrototypeOf(e))&&e!==Object.prototype);return t})(e.constructor.prototype)){if("constructor"===n||!i(n))continue;const a=Reflect.getOwnPropertyDescriptor(t,n);a&&"function"==typeof a.value&&(e[n]=e[n].bind(e))}return e};class c extends Error{constructor(e="The global `jsPsych` variable is no longer available in jsPsych v7."){super(`${e} Please follow the migration guide at https://www.jspsych.org/7.0/support/migration-v7/ to update your experiment.`),this.name="MigrationError"}}function l(e){return[...new Set(e)]}function u(e){if(!e)return e;let t;if(Array.isArray(e)){t=[];for(const n of e)t.push(u(n));return t}if("object"==typeof e&&null!==e){t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=u(e[n]));return t}return e}window.jsPsych={get init(){throw new c("`jsPsych.init()` was replaced by `initJsPsych()` in jsPsych v7.")},get data(){throw new c},get randomization(){throw new c},get turk(){throw new c},get pluginAPI(){throw new c},get ALL_KEYS(){throw new c('jsPsych.ALL_KEYS was replaced by the "ALL_KEYS" string in jsPsych v7.')},get NO_KEYS(){throw new c('jsPsych.NO_KEYS was replaced by the "NO_KEYS" string in jsPsych v7.')}};var d,p=Object.freeze({__proto__:null,unique:l,deepCopy:u});class h{constructor(e=[]){this.values=e}sum(){let e=0;for(const t of this.values)e+=t;return e}mean(){return this.sum()/this.count()}median(){if(0===this.values.length)return;const e=this.values.slice(0).sort((function(e,t){return e-t})),t=Math.floor(e.length/2);return e.length%2==0?(e[t]+e[t-1])/2:e[t]}min(){return Math.min.apply(null,this.values)}max(){return Math.max.apply(null,this.values)}count(){return this.values.length}variance(){const e=this.mean();let t=0;for(const n of this.values)t+=Math.pow(n-e,2);return t/(this.values.length-1)}sd(){const e=this.variance();return Math.sqrt(e)}frequencies(){const e={};for(const t of this.values)void 0===e[t]?e[t]=1:e[t]++;return e}all(e){for(const t of this.values)if(!e(t))return!1;return!0}subset(e){const t=[];for(const n of this.values)e(n)&&t.push(n);return new h(t)}}class m{constructor(e=[]){this.trials=e}push(e){return this.trials.push(e),this}join(e){return this.trials=this.trials.concat(e.values()),this}top(){return this.trials.length<=1?this:new m([this.trials[this.trials.length-1]])}first(e=1){if(e<1)throw"You must query with a positive nonzero integer. Please use a\n different value for n.";return 0===this.trials.length?new m:(e>this.trials.length&&(e=this.trials.length),new m(this.trials.slice(0,e)))}last(e=1){if(e<1)throw"You must query with a positive nonzero integer. Please use a\n different value for n.";return 0===this.trials.length?new m:(e>this.trials.length&&(e=this.trials.length),new m(this.trials.slice(this.trials.length-e,this.trials.length)))}values(){return this.trials}count(){return this.trials.length}readOnly(){return new m(u(this.trials))}addToAll(e){for(const t of this.trials)Object.assign(t,e);return this}addToLast(e){return 0!=this.trials.length&&Object.assign(this.trials[this.trials.length-1],e),this}filter(e){let t;t=Array.isArray(e)?u(e):u([e]);const n=[];for(const e of this.trials){let i=!1;for(const n of t){let t=!0;for(const i of Object.keys(n))void 0!==e[i]&&e[i]===n[i]||(t=!1);if(t){i=!0;break}}i&&n.push(e)}return new m(n)}filterCustom(e){return new m(this.trials.filter(e))}filterColumns(e){return new m(this.trials.map((t=>Object.fromEntries(e.filter((e=>e in t)).map((e=>[e,t[e]]))))))}select(e){const t=[];for(const n of this.trials)void 0!==n[e]&&t.push(n[e]);return new h(t)}ignore(e){Array.isArray(e)||(e=[e]);const t=u(this.trials);for(const n of t)for(const t of e)delete n[t];return new m(t)}uniqueNames(){const e=[];for(const t of this.trials)for(const n of Object.keys(t))e.includes(n)||e.push(n);return e}csv(){return function(e){const t="object"!=typeof e?JSON.parse(e):e;let n="",i="";const a=[];for(const e of t)for(const t in e){let e=t+"";e='"'+e.replace(/"/g,'""')+'",',a.includes(t)||(a.push(t),n+=e)}n=n.slice(0,-1),i+=n+"\r\n";for(const e of t){n="";for(const t of a){let i=void 0===e[t]?"":e[t];"object"==typeof i&&(i=JSON.stringify(i)),n+='"'+(i+"").replace(/"/g,'""')+'",'}n=n.slice(0,-1),i+=n+"\r\n"}return i}(this.trials)}json(e=!1){return e?JSON.stringify(this.trials,null,"\t"):JSON.stringify(this.trials)}localSave(e,t){let n;if("json"===(e=e.toLowerCase()))n=this.json();else{if("csv"!==e)throw new Error('Invalid format specified for localSave. Must be "json" or "csv".');n=this.csv()}!function(e,t){const n=new Blob([e],{type:"text/plain"});let i="";i=void 0!==window.webkitURL?window.webkitURL.createObjectURL(n):window.URL.createObjectURL(n);const a=document.createElement("a");a.id="jspsych-download-as-text-link",a.style.display="none",a.download=t,a.href=i,a.click()}(n,t)}}class f{constructor(e){this.jsPsych=e,this.dataProperties={},this.reset()}reset(){this.allData=new m,this.interactionData=new m}get(){return this.allData}getInteractionData(){return this.interactionData}write(e){const t=this.jsPsych.getProgress(),n=this.jsPsych.getCurrentTrial(),i={trial_type:n.type.info.name,trial_index:t.current_trial_global,time_elapsed:this.jsPsych.getTotalTime(),internal_node_id:this.jsPsych.getCurrentTimelineNodeID()};this.allData.push(Object.assign(Object.assign(Object.assign(Object.assign({},e),n.data),i),this.dataProperties))}addProperties(e){this.allData.addToAll(e),this.dataProperties=Object.assign({},this.dataProperties,e)}addDataToLastTrial(e){this.allData.addToLast(e)}getDataByTimelineNode(e){return this.allData.filterCustom((t=>t.internal_node_id.slice(0,e.length)===e))}getLastTrialData(){return this.allData.top()}getLastTimelineData(){const e=this.getLastTrialData().select("internal_node_id").values[0];if(void 0===e)return new m;{const t=e.substr(0,e.lastIndexOf("-"));return this.getDataByTimelineNode(t)}}displayData(e="json"){"json"!=(e=e.toLowerCase())&&"csv"!=e&&(console.log("Invalid format declared for displayData function. Using json as default."),e="json");const t="json"===e?this.allData.json(!0):this.allData.csv();this.jsPsych.getDisplayElement().innerHTML='<pre id="jspsych-data-display"></pre>',document.getElementById("jspsych-data-display").textContent=t}urlVariables(){return void 0===this.query_string&&(this.query_string=function(){const e=window.location.search.substr(1).split("&"),t={};for(let n=0;n<e.length;++n){const i=e[n].split("=",2);1==i.length?t[i[0]]="":t[i[0]]=decodeURIComponent(i[1].replace(/\+/g," "))}return t}()),this.query_string}getURLVariable(e){return this.urlVariables()[e]}createInteractionListeners(){window.addEventListener("blur",(()=>{const e={event:"blur",trial:this.jsPsych.getProgress().current_trial_global,time:this.jsPsych.getTotalTime()};this.interactionData.push(e),this.jsPsych.getInitSettings().on_interaction_data_update(e)})),window.addEventListener("focus",(()=>{const e={event:"focus",trial:this.jsPsych.getProgress().current_trial_global,time:this.jsPsych.getTotalTime()};this.interactionData.push(e),this.jsPsych.getInitSettings().on_interaction_data_update(e)}));const e=()=>{const e={event:document.isFullScreen||document.webkitIsFullScreen||document.mozIsFullScreen||document.fullscreenElement?"fullscreenenter":"fullscreenexit",trial:this.jsPsych.getProgress().current_trial_global,time:this.jsPsych.getTotalTime()};this.interactionData.push(e),this.jsPsych.getInitSettings().on_interaction_data_update(e)};document.addEventListener("fullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("webkitfullscreenchange",e)}_customInsert(e){this.allData=new m(e)}_fullreset(){this.reset(),this.dataProperties={}}}class g{constructor(){this.hardwareConnected=!1,document.addEventListener("jspsych-activate",(e=>{this.hardwareConnected=!0}))}hardware(e){const t=new CustomEvent("jspsych",{detail:e});document.dispatchEvent(t)}}class y{constructor(e,t=!1,n=0){this.getRootElement=e,this.areResponsesCaseSensitive=t,this.minimumValidRt=n,this.listeners=new Set,this.heldKeys=new Set,this.areRootListenersRegistered=!1,o(this),this.registerRootListeners()}registerRootListeners(){if(!this.areRootListenersRegistered){const e=this.getRootElement();e&&(e.addEventListener("keydown",this.rootKeydownListener),e.addEventListener("keyup",this.rootKeyupListener),this.areRootListenersRegistered=!0)}}rootKeydownListener(e){for(const t of Array.from(this.listeners))t(e);this.heldKeys.add(this.toLowerCaseIfInsensitive(e.key))}toLowerCaseIfInsensitive(e){return this.areResponsesCaseSensitive?e:e.toLowerCase()}rootKeyupListener(e){this.heldKeys.delete(this.toLowerCaseIfInsensitive(e.key))}isResponseValid(e,t,n){return!(!t&&this.heldKeys.has(n))&&("ALL_KEYS"===e||"NO_KEYS"!==e&&e.includes(n))}getKeyboardResponse({callback_function:e,valid_responses:t="ALL_KEYS",rt_method:n="performance",persist:i,audio_context:a,audio_context_start_time:s,allow_held_key:r=!1,minimum_valid_rt:o=this.minimumValidRt}){"performance"!==n&&"audio"!==n&&(console.log('Invalid RT method specified in getKeyboardResponse. Defaulting to "performance" method.'),n="performance");const c="performance"===n?performance.now():1e3*s;this.registerRootListeners(),this.areResponsesCaseSensitive||"string"==typeof t||(t=t.map((e=>e.toLowerCase())));const l=s=>{const u=Math.round(("performance"==n?performance.now():1e3*a.currentTime)-c);if(u<o)return;const d=this.toLowerCaseIfInsensitive(s.key);this.isResponseValid(t,r,d)&&(s.preventDefault(),i||this.cancelKeyboardResponse(l),e({key:d,rt:u}))};return this.listeners.add(l),l}cancelKeyboardResponse(e){this.listeners.delete(e)}cancelAllKeyboardResponses(){this.listeners.clear()}compareKeys(e,t){if(!("string"!=typeof e&&null!==e||"string"!=typeof t&&null!==t))return"string"==typeof e&&"string"==typeof t?this.areResponsesCaseSensitive?e===t:e.toLowerCase()===t.toLowerCase():null===e&&null===t;console.error("Error in jsPsych.pluginAPI.compareKeys: arguments must be key strings or null.")}}!function(e){e[e.BOOL=0]="BOOL",e[e.STRING=1]="STRING",e[e.INT=2]="INT",e[e.FLOAT=3]="FLOAT",e[e.FUNCTION=4]="FUNCTION",e[e.KEY=5]="KEY",e[e.KEYS=6]="KEYS",e[e.SELECT=7]="SELECT",e[e.HTML_STRING=8]="HTML_STRING",e[e.IMAGE=9]="IMAGE",e[e.AUDIO=10]="AUDIO",e[e.VIDEO=11]="VIDEO",e[e.OBJECT=12]="OBJECT",e[e.COMPLEX=13]="COMPLEX",e[e.TIMELINE=14]="TIMELINE"}(d||(d={}));const _={data:{type:d.OBJECT,pretty_name:"Data",default:{}},on_start:{type:d.FUNCTION,pretty_name:"On start",default:function(){}},on_finish:{type:d.FUNCTION,pretty_name:"On finish",default:function(){}},on_load:{type:d.FUNCTION,pretty_name:"On load",default:function(){}},post_trial_gap:{type:d.INT,pretty_name:"Post trial gap",default:null},css_classes:{type:d.STRING,pretty_name:"Custom CSS classes",default:null},simulation_options:{type:d.COMPLEX,default:null}},v=[d.AUDIO,d.IMAGE,d.VIDEO];class b{constructor(e,t){this.useWebaudio=e,this.webaudioContext=t,this.video_buffers={},this.context=null,this.audio_buffers=[],this.preload_requests=[],this.img_cache={},this.preloadMap=new Map,this.microphone_recorder=null,this.camera_stream=null,this.camera_recorder=null}getVideoBuffer(e){return e.startsWith("blob:")&&(this.video_buffers[e]=e),this.video_buffers[e]}initAudio(){this.context=this.useWebaudio?this.webaudioContext:null}audioContext(){return null!==this.context&&"running"!==this.context.state&&this.context.resume(),this.context}getAudioBuffer(e){return new Promise(((t,n)=>{void 0===this.audio_buffers[e]||"tmp"==this.audio_buffers[e]?this.preloadAudio([e],(()=>{t(this.audio_buffers[e])}),(()=>{}),(e=>{n(e.error)})):t(this.audio_buffers[e])}))}preloadAudio(e,t=(()=>{}),n=(e=>{}),i=(e=>{})){e=l(e.flat());let a=0;if(0==e.length)return void t();const s=(s,r=1)=>{const o=new XMLHttpRequest;o.open("GET",s,!0),o.responseType="arraybuffer",o.onload=()=>{this.context.decodeAudioData(o.response,(i=>{this.audio_buffers[s]=i,a++,n(s),a==e.length&&t()}),(e=>{i({source:s,error:e})}))},o.onerror=e=>{let t=e;404==o.status&&(t="404"),i({source:s,error:t})},o.onloadend=e=>{404==o.status&&i({source:s,error:"404"})},o.send(),this.preload_requests.push(o)},r=(s,r=1)=>{const o=new Audio,c=()=>{this.audio_buffers[s]=o,a++,n(s),a==e.length&&t(),o.removeEventListener("canplaythrough",c)};o.addEventListener("canplaythrough",c),o.addEventListener("error",(function e(t){i({source:o.src,error:t}),o.removeEventListener("error",e)})),o.addEventListener("abort",(function e(t){i({source:o.src,error:t}),o.removeEventListener("abort",e)})),o.src=s,this.preload_requests.push(o)};for(const i of e)void 0!==this.audio_buffers[i]?(a++,n(i),a==e.length&&t()):(this.audio_buffers[i]="tmp",null!==this.audioContext()?s(i):r(i))}preloadImages(e,t=(()=>{}),n=(e=>{}),i=(e=>{})){e=l(e.flat());var a=0;if(0!==e.length)for(let s=0;s<e.length;s++){const r=new Image,o=e[s];r.onload=()=>{a++,n(o),a===e.length&&t()},r.onerror=e=>{i({source:o,error:e})},r.src=o,this.img_cache[o]=r,this.preload_requests.push(r)}else t()}preloadVideo(e,t=(()=>{}),n=(e=>{}),i=(e=>{})){e=l(e.flat());let a=0;if(0!==e.length)for(const s of e){const r=this.video_buffers,o=new XMLHttpRequest;o.open("GET",s,!0),o.responseType="blob",o.onload=()=>{if(200===o.status||0===o.status){const i=o.response;r[s]=URL.createObjectURL(i),a++,n(s),a===e.length&&t()}},o.onerror=e=>{let t=e;404==o.status&&(t="404"),i({source:s,error:t})},o.onloadend=e=>{404==o.status&&i({source:s,error:"404"})},o.send(),this.preload_requests.push(o)}else t()}getAutoPreloadList(e){const t=Object.fromEntries(v.map((e=>[e,new Set]))),n=(e,i)=>{var a,s,r,o;if(void 0!==e.timeline)for(const t of e.timeline)n(t,null!==(a=e.type)&&void 0!==a?a:i);else if(null===(r=null!==(s=e.type)&&void 0!==s?s:i)||void 0===r?void 0:r.info){const{name:n,parameters:a}=(null!==(o=e.type)&&void 0!==o?o:i).info;this.preloadMap.has(n)||this.preloadMap.set(n,Object.fromEntries(Object.entries(a).filter((([e,{type:t,preload:n}])=>v.includes(t)&&(null==n||n))).map((([e,{type:t}])=>[e,t]))));for(const[i,a]of Object.entries(this.preloadMap.get(n))){const n=e[i],s=t[a];if("string"==typeof n)s.add(n);else if(Array.isArray(n))for(const e of n.flat())"string"==typeof e&&s.add(e)}}};return n({timeline:e}),{images:[...t[d.IMAGE]],audio:[...t[d.AUDIO]],video:[...t[d.VIDEO]]}}cancelPreloads(){for(const e of this.preload_requests)e.onload=()=>{},e.onerror=()=>{},e.oncanplaythrough=()=>{},e.onabort=()=>{};this.preload_requests=[]}initializeMicrophoneRecorder(e){const t=new MediaRecorder(e);this.microphone_recorder=t}getMicrophoneRecorder(){return this.microphone_recorder}initializeCameraRecorder(e,t){this.camera_stream=e;const n=new MediaRecorder(e,t);this.camera_recorder=n}getCameraStream(){return this.camera_stream}getCameraRecorder(){return this.camera_recorder}}class w{dispatchEvent(e){document.body.dispatchEvent(e)}keyDown(e){this.dispatchEvent(new KeyboardEvent("keydown",{key:e}))}keyUp(e){this.dispatchEvent(new KeyboardEvent("keyup",{key:e}))}pressKey(e,t=0){t>0?setTimeout((()=>{this.keyDown(e),this.keyUp(e)}),t):(this.keyDown(e),this.keyUp(e))}clickTarget(e,t=0){t>0?setTimeout((()=>{e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0}))}),t):(e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0})),e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0})),e.dispatchEvent(new MouseEvent("click",{bubbles:!0})))}fillTextInput(e,t,n=0){n>0?setTimeout((()=>{e.value=t}),n):e.value=t}getValidKey(e){const t=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"," "];let n;if("NO_KEYS"==e)n=null;else if("ALL_KEYS"==e)n=t[Math.floor(Math.random()*t.length)];else{const t=e.flat();n=t[Math.floor(Math.random()*t.length)]}return n}mergeSimulationData(e,t){return Object.assign(Object.assign({},e),null==t?void 0:t.data)}ensureSimulationDataConsistency(e,t){if(t.rt&&(t.rt=Math.round(t.rt)),e.trial_duration&&t.rt&&t.rt>e.trial_duration&&(t.rt=null,t.response&&(t.response=null),t.correct&&(t.correct=!1)),e.choices&&"NO_KEYS"==e.choices&&(t.rt&&(t.rt=null),t.response&&(t.response=null)),e.allow_response_before_complete&&e.sequence_reps&&e.frame_time){const n=e.sequence_reps*e.frame_time*e.stimuli.length;t.rt<n&&(t.rt=null,t.response=null)}}}class x{constructor(){this.timeout_handlers=[]}setTimeout(e,t){const n=window.setTimeout(e,t);return this.timeout_handlers.push(n),n}clearAllTimeouts(){for(const e of this.timeout_handlers)clearTimeout(e);this.timeout_handlers=[]}}var E=["ability","able","aboard","about","above","accept","accident","according","account","accurate","acres","across","act","action","active","activity","actual","actually","add","addition","additional","adjective","adult","adventure","advice","affect","afraid","after","afternoon","again","against","age","ago","agree","ahead","aid","air","airplane","alike","alive","all","allow","almost","alone","along","aloud","alphabet","already","also","although","am","among","amount","ancient","angle","angry","animal","announced","another","answer","ants","any","anybody","anyone","anything","anyway","anywhere","apart","apartment","appearance","apple","applied","appropriate","are","area","arm","army","around","arrange","arrangement","arrive","arrow","art","article","as","aside","ask","asleep","at","ate","atmosphere","atom","atomic","attached","attack","attempt","attention","audience","author","automobile","available","average","avoid","aware","away","baby","back","bad","badly","bag","balance","ball","balloon","band","bank","bar","bare","bark","barn","base","baseball","basic","basis","basket","bat","battle","be","bean","bear","beat","beautiful","beauty","became","because","become","becoming","bee","been","before","began","beginning","begun","behavior","behind","being","believed","bell","belong","below","belt","bend","beneath","bent","beside","best","bet","better","between","beyond","bicycle","bigger","biggest","bill","birds","birth","birthday","bit","bite","black","blank","blanket","blew","blind","block","blood","blow","blue","board","boat","body","bone","book","border","born","both","bottle","bottom","bound","bow","bowl","box","boy","brain","branch","brass","brave","bread","break","breakfast","breath","breathe","breathing","breeze","brick","bridge","brief","bright","bring","broad","broke","broken","brother","brought","brown","brush","buffalo","build","building","built","buried","burn","burst","bus","bush","business","busy","but","butter","buy","by","cabin","cage","cake","call","calm","came","camera","camp","can","canal","cannot","cap","capital","captain","captured","car","carbon","card","care","careful","carefully","carried","carry","case","cast","castle","cat","catch","cattle","caught","cause","cave","cell","cent","center","central","century","certain","certainly","chain","chair","chamber","chance","change","changing","chapter","character","characteristic","charge","chart","check","cheese","chemical","chest","chicken","chief","child","children","choice","choose","chose","chosen","church","circle","circus","citizen","city","class","classroom","claws","clay","clean","clear","clearly","climate","climb","clock","close","closely","closer","cloth","clothes","clothing","cloud","club","coach","coal","coast","coat","coffee","cold","collect","college","colony","color","column","combination","combine","come","comfortable","coming","command","common","community","company","compare","compass","complete","completely","complex","composed","composition","compound","concerned","condition","congress","connected","consider","consist","consonant","constantly","construction","contain","continent","continued","contrast","control","conversation","cook","cookies","cool","copper","copy","corn","corner","correct","correctly","cost","cotton","could","count","country","couple","courage","course","court","cover","cow","cowboy","crack","cream","create","creature","crew","crop","cross","crowd","cry","cup","curious","current","curve","customs","cut","cutting","daily","damage","dance","danger","dangerous","dark","darkness","date","daughter","dawn","day","dead","deal","dear","death","decide","declared","deep","deeply","deer","definition","degree","depend","depth","describe","desert","design","desk","detail","determine","develop","development","diagram","diameter","did","die","differ","difference","different","difficult","difficulty","dig","dinner","direct","direction","directly","dirt","dirty","disappear","discover","discovery","discuss","discussion","disease","dish","distance","distant","divide","division","do","doctor","does","dog","doing","doll","dollar","done","donkey","door","dot","double","doubt","down","dozen","draw","drawn","dream","dress","drew","dried","drink","drive","driven","driver","driving","drop","dropped","drove","dry","duck","due","dug","dull","during","dust","duty","each","eager","ear","earlier","early","earn","earth","easier","easily","east","easy","eat","eaten","edge","education","effect","effort","egg","eight","either","electric","electricity","element","elephant","eleven","else","empty","end","enemy","energy","engine","engineer","enjoy","enough","enter","entire","entirely","environment","equal","equally","equator","equipment","escape","especially","essential","establish","even","evening","event","eventually","ever","every","everybody","everyone","everything","everywhere","evidence","exact","exactly","examine","example","excellent","except","exchange","excited","excitement","exciting","exclaimed","exercise","exist","expect","experience","experiment","explain","explanation","explore","express","expression","extra","eye","face","facing","fact","factor","factory","failed","fair","fairly","fall","fallen","familiar","family","famous","far","farm","farmer","farther","fast","fastened","faster","fat","father","favorite","fear","feathers","feature","fed","feed","feel","feet","fell","fellow","felt","fence","few","fewer","field","fierce","fifteen","fifth","fifty","fight","fighting","figure","fill","film","final","finally","find","fine","finest","finger","finish","fire","fireplace","firm","first","fish","five","fix","flag","flame","flat","flew","flies","flight","floating","floor","flow","flower","fly","fog","folks","follow","food","foot","football","for","force","foreign","forest","forget","forgot","forgotten","form","former","fort","forth","forty","forward","fought","found","four","fourth","fox","frame","free","freedom","frequently","fresh","friend","friendly","frighten","frog","from","front","frozen","fruit","fuel","full","fully","fun","function","funny","fur","furniture","further","future","gain","game","garage","garden","gas","gasoline","gate","gather","gave","general","generally","gentle","gently","get","getting","giant","gift","girl","give","given","giving","glad","glass","globe","go","goes","gold","golden","gone","good","goose","got","government","grabbed","grade","gradually","grain","grandfather","grandmother","graph","grass","gravity","gray","great","greater","greatest","greatly","green","grew","ground","group","grow","grown","growth","guard","guess","guide","gulf","gun","habit","had","hair","half","halfway","hall","hand","handle","handsome","hang","happen","happened","happily","happy","harbor","hard","harder","hardly","has","hat","have","having","hay","he","headed","heading","health","heard","hearing","heart","heat","heavy","height","held","hello","help","helpful","her","herd","here","herself","hidden","hide","high","higher","highest","highway","hill","him","himself","his","history","hit","hold","hole","hollow","home","honor","hope","horn","horse","hospital","hot","hour","house","how","however","huge","human","hundred","hung","hungry","hunt","hunter","hurried","hurry","hurt","husband","ice","idea","identity","if","ill","image","imagine","immediately","importance","important","impossible","improve","in","inch","include","including","income","increase","indeed","independent","indicate","individual","industrial","industry","influence","information","inside","instance","instant","instead","instrument","interest","interior","into","introduced","invented","involved","iron","is","island","it","its","itself","jack","jar","jet","job","join","joined","journey","joy","judge","jump","jungle","just","keep","kept","key","kids","kill","kind","kitchen","knew","knife","know","knowledge","known","label","labor","lack","lady","laid","lake","lamp","land","language","large","larger","largest","last","late","later","laugh","law","lay","layers","lead","leader","leaf","learn","least","leather","leave","leaving","led","left","leg","length","lesson","let","letter","level","library","lie","life","lift","light","like","likely","limited","line","lion","lips","liquid","list","listen","little","live","living","load","local","locate","location","log","lonely","long","longer","look","loose","lose","loss","lost","lot","loud","love","lovely","low","lower","luck","lucky","lunch","lungs","lying","machine","machinery","mad","made","magic","magnet","mail","main","mainly","major","make","making","man","managed","manner","manufacturing","many","map","mark","market","married","mass","massage","master","material","mathematics","matter","may","maybe","me","meal","mean","means","meant","measure","meat","medicine","meet","melted","member","memory","men","mental","merely","met","metal","method","mice","middle","might","mighty","mile","military","milk","mill","mind","mine","minerals","minute","mirror","missing","mission","mistake","mix","mixture","model","modern","molecular","moment","money","monkey","month","mood","moon","more","morning","most","mostly","mother","motion","motor","mountain","mouse","mouth","move","movement","movie","moving","mud","muscle","music","musical","must","my","myself","mysterious","nails","name","nation","national","native","natural","naturally","nature","near","nearby","nearer","nearest","nearly","necessary","neck","needed","needle","needs","negative","neighbor","neighborhood","nervous","nest","never","new","news","newspaper","next","nice","night","nine","no","nobody","nodded","noise","none","noon","nor","north","nose","not","note","noted","nothing","notice","noun","now","number","numeral","nuts","object","observe","obtain","occasionally","occur","ocean","of","off","offer","office","officer","official","oil","old","older","oldest","on","once","one","only","onto","open","operation","opinion","opportunity","opposite","or","orange","orbit","order","ordinary","organization","organized","origin","original","other","ought","our","ourselves","out","outer","outline","outside","over","own","owner","oxygen","pack","package","page","paid","pain","paint","pair","palace","pale","pan","paper","paragraph","parallel","parent","park","part","particles","particular","particularly","partly","parts","party","pass","passage","past","path","pattern","pay","peace","pen","pencil","people","per","percent","perfect","perfectly","perhaps","period","person","personal","pet","phrase","physical","piano","pick","picture","pictured","pie","piece","pig","pile","pilot","pine","pink","pipe","pitch","place","plain","plan","plane","planet","planned","planning","plant","plastic","plate","plates","play","pleasant","please","pleasure","plenty","plural","plus","pocket","poem","poet","poetry","point","pole","police","policeman","political","pond","pony","pool","poor","popular","population","porch","port","position","positive","possible","possibly","post","pot","potatoes","pound","pour","powder","power","powerful","practical","practice","prepare","present","president","press","pressure","pretty","prevent","previous","price","pride","primitive","principal","principle","printed","private","prize","probably","problem","process","produce","product","production","program","progress","promised","proper","properly","property","protection","proud","prove","provide","public","pull","pupil","pure","purple","purpose","push","put","putting","quarter","queen","question","quick","quickly","quiet","quietly","quite","rabbit","race","radio","railroad","rain","raise","ran","ranch","range","rapidly","rate","rather","raw","rays","reach","read","reader","ready","real","realize","rear","reason","recall","receive","recent","recently","recognize","record","red","refer","refused","region","regular","related","relationship","religious","remain","remarkable","remember","remove","repeat","replace","replied","report","represent","require","research","respect","rest","result","return","review","rhyme","rhythm","rice","rich","ride","riding","right","ring","rise","rising","river","road","roar","rock","rocket","rocky","rod","roll","roof","room","root","rope","rose","rough","round","route","row","rubbed","rubber","rule","ruler","run","running","rush","sad","saddle","safe","safety","said","sail","sale","salmon","salt","same","sand","sang","sat","satellites","satisfied","save","saved","saw","say","scale","scared","scene","school","science","scientific","scientist","score","screen","sea","search","season","seat","second","secret","section","see","seed","seeing","seems","seen","seldom","select","selection","sell","send","sense","sent","sentence","separate","series","serious","serve","service","sets","setting","settle","settlers","seven","several","shade","shadow","shake","shaking","shall","shallow","shape","share","sharp","she","sheep","sheet","shelf","shells","shelter","shine","shinning","ship","shirt","shoe","shoot","shop","shore","short","shorter","shot","should","shoulder","shout","show","shown","shut","sick","sides","sight","sign","signal","silence","silent","silk","silly","silver","similar","simple","simplest","simply","since","sing","single","sink","sister","sit","sitting","situation","six","size","skill","skin","sky","slabs","slave","sleep","slept","slide","slight","slightly","slip","slipped","slope","slow","slowly","small","smaller","smallest","smell","smile","smoke","smooth","snake","snow","so","soap","social","society","soft","softly","soil","solar","sold","soldier","solid","solution","solve","some","somebody","somehow","someone","something","sometime","somewhere","son","song","soon","sort","sound","source","south","southern","space","speak","special","species","specific","speech","speed","spell","spend","spent","spider","spin","spirit","spite","split","spoken","sport","spread","spring","square","stage","stairs","stand","standard","star","stared","start","state","statement","station","stay","steady","steam","steel","steep","stems","step","stepped","stick","stiff","still","stock","stomach","stone","stood","stop","stopped","store","storm","story","stove","straight","strange","stranger","straw","stream","street","strength","stretch","strike","string","strip","strong","stronger","struck","structure","struggle","stuck","student","studied","studying","subject","substance","success","successful","such","sudden","suddenly","sugar","suggest","suit","sum","summer","sun","sunlight","supper","supply","support","suppose","sure","surface","surprise","surrounded","swam","sweet","swept","swim","swimming","swing","swung","syllable","symbol","system","table","tail","take","taken","tales","talk","tall","tank","tape","task","taste","taught","tax","tea","teach","teacher","team","tears","teeth","telephone","television","tell","temperature","ten","tent","term","terrible","test","than","thank","that","thee","them","themselves","then","theory","there","therefore","these","they","thick","thin","thing","think","third","thirty","this","those","thou","though","thought","thousand","thread","three","threw","throat","through","throughout","throw","thrown","thumb","thus","thy","tide","tie","tight","tightly","till","time","tin","tiny","tip","tired","title","to","tobacco","today","together","told","tomorrow","tone","tongue","tonight","too","took","tool","top","topic","torn","total","touch","toward","tower","town","toy","trace","track","trade","traffic","trail","train","transportation","trap","travel","treated","tree","triangle","tribe","trick","tried","trip","troops","tropical","trouble","truck","trunk","truth","try","tube","tune","turn","twelve","twenty","twice","two","type","typical","uncle","under","underline","understanding","unhappy","union","unit","universe","unknown","unless","until","unusual","up","upon","upper","upward","us","use","useful","using","usual","usually","valley","valuable","value","vapor","variety","various","vast","vegetable","verb","vertical","very","vessels","victory","view","village","visit","visitor","voice","volume","vote","vowel","voyage","wagon","wait","walk","wall","want","war","warm","warn","was","wash","waste","watch","water","wave","way","we","weak","wealth","wear","weather","week","weigh","weight","welcome","well","went","were","west","western","wet","whale","what","whatever","wheat","wheel","when","whenever","where","wherever","whether","which","while","whispered","whistle","white","who","whole","whom","whose","why","wide","widely","wife","wild","will","willing","win","wind","window","wing","winter","wire","wise","wish","with","within","without","wolf","women","won","wonder","wonderful","wood","wooden","wool","word","wore","work","worker","world","worried","worry","worse","worth","would","wrapped","write","writer","writing","written","wrong","wrote","yard","year","yellow","yes","yesterday","yet","you","young","younger","your","yourself","youth","zero","zebra","zipper","zoo","zulu"];function S(e){function t(){return e&&e.maxLength>1?function(){var t,i=!1;for(;!i;)(t=n()).length<=e.maxLength&&(i=!0);return t}():n()}function n(){return E[i(E.length)]}function i(e){return Math.floor(Math.random()*e)}if(void 0===e)return t();"number"==typeof e&&(e={exactly:e}),e.exactly&&(e.min=e.exactly,e.max=e.exactly),"number"!=typeof e.wordsPerString&&(e.wordsPerString=1),"function"!=typeof e.formatter&&(e.formatter=e=>e),"string"!=typeof e.separator&&(e.separator=" ");for(var a=e.min+i(e.max+1-e.min),s=[],r="",o=0,c=0;c<a*e.wordsPerString;c++)o===e.wordsPerString-1?r+=e.formatter(t(),o):r+=e.formatter(t(),o)+e.separator,o++,(c+1)%e.wordsPerString==0&&(s.push(r),r="",o=0);return"string"==typeof e.join&&(s=s.join(e.join)),s}var k=S;S.wordList=E;var T={exports:{}};!function(e,t,n){function i(e){var t=this,n=function(){var e=4022871197,t=function(t){t=String(t);for(var n=0;n<t.length;n++){var i=.02519603282416938*(e+=t.charCodeAt(n));i-=e=i>>>0,e=(i*=e)>>>0,e+=4294967296*(i-=e)}return 2.3283064365386963e-10*(e>>>0)};return t}();t.next=function(){var e=2091639*t.s0+2.3283064365386963e-10*t.c;return t.s0=t.s1,t.s1=t.s2,t.s2=e-(t.c=0|e)},t.c=1,t.s0=n(" "),t.s1=n(" "),t.s2=n(" "),t.s0-=n(e),t.s0<0&&(t.s0+=1),t.s1-=n(e),t.s1<0&&(t.s1+=1),t.s2-=n(e),t.s2<0&&(t.s2+=1),n=null}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function s(e,t){var n=new i(e),s=t&&t.state,r=n.next;return r.int32=function(){return 4294967296*n.next()|0},r.double=function(){return r()+11102230246251565e-32*(2097152*r()|0)},r.quick=r,s&&("object"==typeof s&&a(s,n),r.state=function(){return a(n,{})}),r}t&&t.exports?t.exports=s:n&&n.amd?n((function(){return s})):this.alea=s}(0,T,!1);var R=T.exports;function I(e,t,n=!1){const i=Array.isArray(e),a=Array.isArray(t);if(i)if(a){if(e.length!=t.length)if(console.warn("Unclear parameters given to randomization.repeat. Items and repetitions are unequal lengths. Behavior may not be as expected."),t.length<e.length){let n=[];for(let i=0;i<e.length;i++)n.push(t);t=n}else t=t.slice(0,e.length)}else{let n=[];for(let i=0;i<e.length;i++)n.push(t);t=n}else a?(t=[t[0]],console.log("Unclear parameters given to randomization.repeat. Multiple set sizes specified, but only one item exists to sample. Proceeding using the first set size.")):(e=[e],t=[t]);let s=[];for(let n=0;n<e.length;n++)for(let i=0;i<t[n];i++)null==e[n]||"object"!=typeof e[n]?s.push(e[n]):s.push(Object.assign({},e[n]));let r=A(s);return n&&(r=function(e){const t={};for(const n of e)for(const e of Object.keys(n))void 0===t[e]&&(t[e]=[]),t[e].push(n[e]);return t}(r)),r}function A(e){Array.isArray(e)||console.error("Argument to shuffle() must be an array.");const t=e.slice(0);let n,i,a=t.length;for(;a;)i=Math.floor(Math.random()*a--),n=t[a],t[a]=t[i],t[i]=n;return t}function C(e,t=!1){const n=e.length;if(1==n)return console.warn("shuffleAlternateGroups() was called with only one group. Defaulting to simple shuffle."),A(e[0]);let i=[];for(let e=0;e<n;e++)i.push(e);t&&(i=A(i));const a=[];let s=null;for(let t=0;t<n;t++)s=null===s?e[t].length:Math.min(s,e[t].length),a.push(A(e[t]));const r=[];for(let e=0;e<s;e++)for(let t=0;t<i.length;t++)r.push(a[i[t]][e]);return r}function O(e,t){return Array.isArray(e)||console.error("First argument to sampleWithoutReplacement() must be an array"),t>e.length&&console.error("Cannot take a sample larger than the size of the set of items to sample."),A(e).slice(0,t)}function L(e,t,n){Array.isArray(e)||console.error("First argument to sampleWithReplacement() must be an array");const i=[];if(void 0!==n){n.length!==e.length&&console.error("The length of the weights array must equal the length of the array to be sampled from.");let t=0;for(const e of n)t+=e;for(const e of n)i.push(e/t)}else for(let t=0;t<e.length;t++)i.push(1/e.length);const a=[i[0]];for(let e=1;e<i.length;e++)a.push(i[e]+a[e-1]);const s=[];for(let n=0;n<t;n++){const t=Math.random();let n=0;for(;t>a[n];)n++;s.push(e[n])}return s}function j(e,t){return function(){var e=0,t=0;for(;0===e;)e=Math.random();for(;0===t;)t=Math.random();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*t)}()*t+e}function U(e){return-Math.log(Math.random())/e}var P=Object.freeze({__proto__:null,setSeed:function(e=Math.random().toString()){return Math.random=R(e),e},repeat:I,shuffle:A,shuffleNoRepeats:function(e,t){Array.isArray(e)||console.error("First argument to shuffleNoRepeats() must be an array."),void 0!==t&&"function"!=typeof t&&console.error("Second argument to shuffleNoRepeats() must be a function."),void 0===t&&(t=function(e,t){return e===t});const n=A(e);for(let e=0;e<n.length-1;e++)if(t(n[e],n[e+1])){let i=Math.floor(Math.random()*(n.length-2))+1;for(;t(n[e+1],n[i])||t(n[e+1],n[i+1])||t(n[e+1],n[i-1])||t(n[e],n[i]);)i=Math.floor(Math.random()*(n.length-2))+1;const a=n[i];n[i]=n[e+1],n[e+1]=a}return n},shuffleAlternateGroups:C,sampleWithoutReplacement:O,sampleWithReplacement:L,factorial:function(e,t=1,n=!1){let i=[{}];for(const[t,n]of Object.entries(e)){const e=[];for(const a of n)for(const n of i)e.push(Object.assign(Object.assign({},n),{[t]:a}));i=e}return I(i,t,n)},randomID:function(e=32){let t="";const n="0123456789abcdefghjklmnopqrstuvwxyz";for(let i=0;i<e;i++)t+=n[Math.floor(35*Math.random())];return t},randomInt:function(e,t){if(t<e)throw new Error("Upper boundary must be less than or equal to lower boundary");return e+Math.floor(Math.random()*(t-e+1))},sampleBernoulli:function(e){return Math.random()<=e?1:0},sampleNormal:j,sampleExponential:U,sampleExGaussian:function(e,t,n,i=!1){let a=j(e,t)+U(n);if(i)for(;a<=0;)a=j(e,t)+U(n);return a},randomWords:function(e){return k(e)}});function F(){const e={previewMode:!1,outsideTurk:!1,hitId:"INVALID_URL_PARAMETER",assignmentId:"INVALID_URL_PARAMETER",workerId:"INVALID_URL_PARAMETER",turkSubmitTo:"INVALID_URL_PARAMETER"},t=function(e,t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");const n=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);return null==n?"":n[1]},n=t(window.location.href,"assignmentId")?window.location.href:document.referrer;return["assignmentId","hitId","workerId","turkSubmitTo"].map((function(i){e[i]=unescape(t(n,i))})),e.previewMode="ASSIGNMENT_ID_NOT_AVAILABLE"==e.assignmentId,e.outsideTurk=!e.previewMode&&""===e.hitId&&""==e.assignmentId&&""==e.workerId,e}var D=Object.freeze({__proto__:null,turkInfo:F,submitToTurk:function(e){const t=F(),n=t.assignmentId,i=t.turkSubmitTo;if(!n||!i)return;const a=document.createElement("form");a.method="POST",a.action=i+"/mturk/externalSubmit?assignmentId="+n;for(const t in e)if(e.hasOwnProperty(t)){const n=document.createElement("input");n.type="hidden",n.name=t,n.id=t,n.value=e[t],a.appendChild(n)}document.body.appendChild(a),a.submit()}});class N{constructor(e,t,n,i){if(this.jsPsych=e,this.progress={current_location:-1,current_variable_set:0,current_repetition:0,current_iteration:0,done:!1},this.parent_node=n,this.relative_id=void 0===n?0:i,void 0!==t.timeline){this.timeline_parameters={timeline:[],loop_function:t.loop_function,conditional_function:t.conditional_function,sample:t.sample,randomize_order:void 0!==t.randomize_order&&t.randomize_order,repetitions:void 0===t.repetitions?1:t.repetitions,timeline_variables:void 0===t.timeline_variables?[{}]:t.timeline_variables,on_timeline_finish:t.on_timeline_finish,on_timeline_start:t.on_timeline_start},this.setTimelineVariablesOrder();var a=Object.assign({},t);delete a.timeline,delete a.conditional_function,delete a.loop_function,delete a.randomize_order,delete a.repetitions,delete a.timeline_variables,delete a.sample,delete a.on_timeline_start,delete a.on_timeline_finish,this.node_trial_data=a;for(var s=0;s<t.timeline.length;s++){var r=Object.assign({},a,t.timeline[s]);if("object"==typeof a.data&&"object"==typeof t.timeline[s].data){var o=Object.assign({},a.data,t.timeline[s].data);r.data=o}this.timeline_parameters.timeline.push(new N(this.jsPsych,r,this,s))}}else void 0===t.type&&console.error('Trial level node is missing the "type" parameter. The parameters for the node are: '+JSON.stringify(t)),this.trial_parameters=Object.assign({},t)}trial(){return void 0===this.timeline_parameters?u(this.trial_parameters):this.progress.current_location>=this.timeline_parameters.timeline.length?null:this.timeline_parameters.timeline[this.progress.current_location].trial()}markCurrentTrialComplete(){void 0===this.timeline_parameters?this.progress.done=!0:this.timeline_parameters.timeline[this.progress.current_location].markCurrentTrialComplete()}nextRepetiton(){this.setTimelineVariablesOrder(),this.progress.current_location=-1,this.progress.current_variable_set=0,this.progress.current_repetition++;for(var e=0;e<this.timeline_parameters.timeline.length;e++)this.timeline_parameters.timeline[e].reset()}setTimelineVariablesOrder(){const e=this.timeline_parameters;if(void 0!==e&&void 0!==e.timeline_variables){for(var t=[],n=0;n<e.timeline_variables.length;n++)t.push(n);void 0!==e.sample&&("custom"==e.sample.type?t=e.sample.fn(t):"with-replacement"==e.sample.type?t=L(t,e.sample.size,e.sample.weights):"without-replacement"==e.sample.type?t=O(t,e.sample.size):"fixed-repetitions"==e.sample.type?t=I(t,e.sample.size,!1):"alternate-groups"==e.sample.type?t=C(e.sample.groups,e.sample.randomize_group_order):console.error('Invalid type in timeline sample parameters. Valid options for type are "custom", "with-replacement", "without-replacement", "fixed-repetitions", and "alternate-groups"')),e.randomize_order&&(t=A(t)),this.progress.order=t}}nextSet(){this.progress.current_location=-1,this.progress.current_variable_set++;for(var e=0;e<this.timeline_parameters.timeline.length;e++)this.timeline_parameters.timeline[e].reset()}advance(){const e=this.progress,t=this.timeline_parameters,n=this.jsPsych.internal;if(e.done)return!0;if(-1==e.current_location){if(void 0!==t){if(void 0!==t.conditional_function&&0==e.current_repetition&&0==e.current_variable_set){n.call_immediate=!0;var i=t.conditional_function();if(n.call_immediate=!1,0==i)return e.done=!0,!0}void 0!==t.on_timeline_start&&0==e.current_variable_set&&t.on_timeline_start()}return e.current_location=0,this.advance()}if(void 0!==t){for(var a=!1;e.current_location<t.timeline.length&&0==a;){if(!t.timeline[e.current_location].advance())return a=!0,!1;e.current_location++}return e.current_variable_set<e.order.length-1?(this.nextSet(),this.advance()):e.current_repetition<t.repetitions-1?(this.nextRepetiton(),void 0!==t.on_timeline_finish&&t.on_timeline_finish(),this.advance()):(void 0!==t.on_timeline_finish&&t.on_timeline_finish(),void 0!==t.loop_function?(n.call_immediate=!0,t.loop_function(this.generatedData())?(this.reset(),n.call_immediate=!1,this.parent_node.advance()):(e.done=!0,n.call_immediate=!1,!0)):(e.done=!0,!0))}}isComplete(){return this.progress.done}getTimelineVariableValue(e){if(void 0!==this.timeline_parameters)return this.timeline_parameters.timeline_variables[this.progress.order[this.progress.current_variable_set]][e]}findTimelineVariable(e){var t=this.getTimelineVariableValue(e);return void 0===t?void 0!==this.parent_node?this.parent_node.findTimelineVariable(e):void 0:t}timelineVariable(e){if(void 0===this.timeline_parameters){const t=this.findTimelineVariable(e);return void 0===t&&console.warn("Timeline variable "+e+" not found."),t}{var t=Math.max(0,this.progress.current_location);t==this.timeline_parameters.timeline.length&&(t-=1);const n=this.timeline_parameters.timeline[t].timelineVariable(e);return void 0===n&&console.warn("Timeline variable "+e+" not found."),n}}allTimelineVariables(){for(var e=this.allTimelineVariablesNames(),t={},n=0;n<e.length;n++)t[e[n]]=this.timelineVariable(e[n]);return t}allTimelineVariablesNames(e=[]){if(void 0!==this.timeline_parameters){e=e.concat(Object.keys(this.timeline_parameters.timeline_variables[this.progress.order[this.progress.current_variable_set]]));var t=Math.max(0,this.progress.current_location);return t==this.timeline_parameters.timeline.length&&(t-=1),this.timeline_parameters.timeline[t].allTimelineVariablesNames(e)}if(void 0===this.timeline_parameters)return e}length(){var e=0;if(void 0===this.timeline_parameters)return 1;for(var t=0;t<this.timeline_parameters.timeline.length;t++)e+=this.timeline_parameters.timeline[t].length();return e}percentComplete(){for(var e=this.length(),t=0,n=0;n<this.timeline_parameters.timeline.length;n++)this.timeline_parameters.timeline[n].isComplete()&&(t+=this.timeline_parameters.timeline[n].length());return t/e*100}reset(){if(this.progress.current_location=-1,this.progress.current_repetition=0,this.progress.current_variable_set=0,this.progress.current_iteration++,this.progress.done=!1,this.setTimelineVariablesOrder(),void 0!==this.timeline_parameters)for(var e=0;e<this.timeline_parameters.timeline.length;e++)this.timeline_parameters.timeline[e].reset()}end(){this.progress.done=!0}endActiveNode(){void 0===this.timeline_parameters?(this.end(),this.parent_node.end()):this.timeline_parameters.timeline[this.progress.current_location].endActiveNode()}ID(){var e="";return void 0===this.parent_node?"0."+this.progress.current_iteration:(e+=this.parent_node.ID()+"-",e+=this.relative_id+"."+this.progress.current_iteration)}activeID(){return void 0===this.timeline_parameters?this.ID():this.timeline_parameters.timeline[this.progress.current_location].activeID()}generatedData(){return this.jsPsych.data.getDataByTimelineNode(this.ID())}trialsOfType(e){if(void 0===this.timeline_parameters)return this.trial_parameters.type==e?this.trial_parameters:[];for(var t=[],n=0;n<this.timeline_parameters.timeline.length;n++){var i=this.timeline_parameters.timeline[n].trialsOfType(e);t=t.concat(i)}return t}insert(e){void 0===this.timeline_parameters?console.error("Cannot add new trials to a trial-level node."):this.timeline_parameters.timeline.push(new N(this.jsPsych,Object.assign(Object.assign({},this.node_trial_data),e),this,this.timeline_parameters.timeline.length))}}function M(e){return new Promise((t=>setTimeout(t,e)))}class z{constructor(e){this.extensions={},this.turk=D,this.randomization=P,this.utils=p,this.opts={},this.global_trial_index=0,this.current_trial={},this.current_trial_finished=!1,this.paused=!1,this.waiting=!1,this.file_protocol=!1,this.simulation_mode=null,this.webaudio_context=null,this.internal={call_immediate:!1},this.progress_bar_amount=0,e=Object.assign({display_element:void 0,on_finish:()=>{},on_trial_start:()=>{},on_trial_finish:()=>{},on_data_update:()=>{},on_interaction_data_update:()=>{},on_close:()=>{},use_webaudio:!0,exclusions:{},show_progress_bar:!1,message_progress_bar:"Completion Progress",auto_update_progress_bar:!0,default_iti:0,minimum_valid_rt:0,experiment_width:null,override_safe_mode:!1,case_sensitive_responses:!1,extensions:[]},e),this.opts=e,o(this),this.webaudio_context="undefined"!=typeof window&&void 0!==window.AudioContext?new AudioContext:null,"file:"!=window.location.protocol||!1!==e.override_safe_mode&&void 0!==e.override_safe_mode||(e.use_webaudio=!1,this.file_protocol=!0,console.warn("jsPsych detected that it is running via the file:// protocol and not on a web server. To prevent issues with cross-origin requests, Web Audio and video preloading have been disabled. If you would like to override this setting, you can set 'override_safe_mode' to 'true' in initJsPsych. For more information, see: https://www.jspsych.org/overview/running-experiments")),this.data=new f(this),this.pluginAPI=function(e){const t=e.getInitSettings();return Object.assign({},...[new y(e.getDisplayContainerElement,t.case_sensitive_responses,t.minimum_valid_rt),new x,new b(t.use_webaudio,e.webaudio_context),new g,new w].map((e=>o(e))))}(this);for(const t of e.extensions)this.extensions[t.type.info.name]=new t.type(this);this.pluginAPI.initAudio()}version(){return"7.3.1"}run(e){return r(this,void 0,void 0,(function*(){void 0===e&&console.error("No timeline declared in jsPsych.run. Cannot start experiment."),0===e.length&&console.error("No trials have been added to the timeline (the timeline is an empty array). Cannot start experiment."),this.timelineDescription=e,this.timeline=new N(this,{timeline:e}),yield this.prepareDom(),yield this.checkExclusions(this.opts.exclusions),yield this.loadExtensions(this.opts.extensions),document.documentElement.setAttribute("jspsych","present"),this.startExperiment(),yield this.finished}))}simulate(e,t="data-only",n={}){return r(this,void 0,void 0,(function*(){this.simulation_mode=t,this.simulation_options=n,yield this.run(e)}))}getProgress(){return{total_trials:void 0===this.timeline?void 0:this.timeline.length(),current_trial_global:this.global_trial_index,percent_complete:void 0===this.timeline?0:this.timeline.percentComplete()}}getStartTime(){return this.exp_start_time}getTotalTime(){return void 0===this.exp_start_time?0:(new Date).getTime()-this.exp_start_time.getTime()}getDisplayElement(){return this.DOM_target}getDisplayContainerElement(){return this.DOM_container}finishTrial(e={}){var t;if(this.current_trial_finished)return;this.current_trial_finished=!0,void 0!==this.current_trial.css_classes&&Array.isArray(this.current_trial.css_classes)&&this.DOM_target.classList.remove(...this.current_trial.css_classes),this.data.write(e);const n=this.data.getLastTrialData().values()[0],i=this.current_trial;if("object"==typeof i.save_trial_parameters)for(const e of Object.keys(i.save_trial_parameters)){const t=i.save_trial_parameters[e];!0===t&&(void 0===i[e]?console.warn(`Invalid parameter specified in save_trial_parameters. Trial has no property called "${e}".`):"function"==typeof i[e]?n[e]=i[e].toString():n[e]=i[e]),!1===t&&"internal_node_id"!==e&&"trial_index"!==e&&delete n[e]}const a=(null!==(t=i.extensions)&&void 0!==t?t:[]).map((e=>this.extensions[e.type.info.name].on_finish(e.params))),s=()=>{this.internal.call_immediate=!0,"function"==typeof i.on_finish&&i.on_finish(n),this.opts.on_trial_finish(n),this.opts.on_data_update(n),this.internal.call_immediate=!1,"data-only"===this.simulation_mode?this.nextTrial():null===typeof i.post_trial_gap||void 0===i.post_trial_gap?this.opts.default_iti>0?setTimeout(this.nextTrial,this.opts.default_iti):this.nextTrial():i.post_trial_gap>0?setTimeout(this.nextTrial,i.post_trial_gap):this.nextTrial()};if(a.some((e=>"function"==typeof e.then)))Promise.all(a.map((e=>Promise.resolve(e).then((e=>{Object.assign(n,e)}))))).then(s);else{for(const e of a)Object.assign(n,e);s()}}endExperiment(e="",t={}){this.timeline.end_message=e,this.timeline.end(),this.pluginAPI.cancelAllKeyboardResponses(),this.pluginAPI.clearAllTimeouts(),this.finishTrial(t)}endCurrentTimeline(){this.timeline.endActiveNode()}getCurrentTrial(){return this.current_trial}getInitSettings(){return this.opts}getCurrentTimelineNodeID(){return this.timeline.activeID()}timelineVariable(e,t=!1){return this.internal.call_immediate||!0===t?this.timeline.timelineVariable(e):{timelineVariablePlaceholder:!0,timelineVariableFunction:()=>this.timeline.timelineVariable(e)}}getAllTimelineVariables(){return this.timeline.allTimelineVariables()}addNodeToEndOfTimeline(e,t){this.timeline.insert(e)}pauseExperiment(){this.paused=!0}resumeExperiment(){this.paused=!1,this.waiting&&(this.waiting=!1,this.nextTrial())}loadFail(e){e=e||"<p>The experiment failed to load.</p>",this.DOM_target.innerHTML=e}getSafeModeStatus(){return this.file_protocol}getTimeline(){return this.timelineDescription}prepareDom(){return r(this,void 0,void 0,(function*(){"complete"!==document.readyState&&(yield new Promise((e=>{window.addEventListener("load",e)})));const e=this.opts;if(void 0===e.display_element){null===document.querySelector("body")&&document.documentElement.appendChild(document.createElement("body")),document.querySelector("html").style.height="100%",document.querySelector("body").style.margin="0px",document.querySelector("body").style.height="100%",document.querySelector("body").style.width="100%",e.display_element=document.querySelector("body")}else{const t=e.display_element instanceof Element?e.display_element:document.querySelector("#"+e.display_element);null===t?console.error("The display_element specified in initJsPsych() does not exist in the DOM."):e.display_element=t}e.display_element.innerHTML='<div class="jspsych-content-wrapper"><div id="jspsych-content"></div></div>',this.DOM_container=e.display_element,this.DOM_target=document.querySelector("#jspsych-content"),null!==e.experiment_width&&(this.DOM_target.style.width=e.experiment_width+"px"),e.display_element.tabIndex=0,-1===e.display_element.className.indexOf("jspsych-display-element")&&(e.display_element.className+=" jspsych-display-element"),this.DOM_target.className+="jspsych-content",this.data.createInteractionListeners(),window.addEventListener("beforeunload",e.on_close)}))}loadExtensions(e){return r(this,void 0,void 0,(function*(){try{yield Promise.all(e.map((e=>this.extensions[e.type.info.name].initialize(e.params||{}))))}catch(e){throw console.error(e),new Error(e)}}))}startExperiment(){this.finished=new Promise((e=>{this.resolveFinishedPromise=e})),!0===this.opts.show_progress_bar&&this.drawProgressBar(this.opts.message_progress_bar),this.exp_start_time=new Date,this.timeline.advance(),this.doTrial(this.timeline.trial())}finishExperiment(){const e=this.opts.on_finish(this.data.get()),t=()=>{void 0!==this.timeline.end_message&&(this.DOM_target.innerHTML=this.timeline.end_message),this.resolveFinishedPromise()};e?Promise.resolve(e).then(t):t()}nextTrial(){if(this.paused)return void(this.waiting=!0);this.global_trial_index++,this.timeline.markCurrentTrialComplete();const e=this.timeline.advance();!0===this.opts.show_progress_bar&&!0===this.opts.auto_update_progress_bar&&this.updateProgressBar(),e?this.finishExperiment():this.doTrial(this.timeline.trial())}doTrial(e){if(this.current_trial=e,this.current_trial_finished=!1,this.evaluateTimelineVariables(e),"string"==typeof e.type)throw new c("A string was provided as the trial's `type` parameter. Since jsPsych v7, the `type` parameter needs to be a plugin object.");if(e.type=Object.assign(Object.assign({},o(new e.type(this))),{info:e.type.info}),this.evaluateFunctionParameters(e),this.setDefaultValues(e),this.internal.call_immediate=!0,this.opts.on_trial_start(e),"function"==typeof e.on_start&&e.on_start(e),Array.isArray(e.extensions))for(const t of e.extensions)this.extensions[t.type.info.name].on_start(t.params);this.DOM_container.focus(),this.DOM_target.scrollTop=0,void 0!==e.css_classes&&(Array.isArray(e.css_classes)||"string"!=typeof e.css_classes||(e.css_classes=[e.css_classes]),Array.isArray(e.css_classes)&&this.DOM_target.classList.add(...e.css_classes));const t=()=>{if("function"==typeof e.on_load&&e.on_load(),Array.isArray(e.extensions))for(const t of e.extensions)this.extensions[t.type.info.name].on_load(t.params)};let n;if(this.simulation_mode||(n=e.type.trial(this.DOM_target,e,t)),this.simulation_mode)if(e.type.simulate){let i;e.simulation_options||(i=this.simulation_options.default),e.simulation_options&&("string"==typeof e.simulation_options?this.simulation_options[e.simulation_options]?i=this.simulation_options[e.simulation_options]:this.simulation_options.default?(console.log(`No matching simulation options found for "${e.simulation_options}". Using "default" options.`),i=this.simulation_options.default):(console.log(`No matching simulation options found for "${e.simulation_options}" and no "default" options provided. Using the default values provided by the plugin.`),i={}):i=e.simulation_options),i=this.utils.deepCopy(i),i=this.replaceFunctionsWithValues(i,null),n=!1===(null==i?void 0:i.simulate)?e.type.trial(this.DOM_target,e,t):e.type.simulate(e,(null==i?void 0:i.mode)||this.simulation_mode,i,t)}else n=e.type.trial(this.DOM_target,e,t);n&&"function"==typeof n.then||this.simulation_mode||t(),this.internal.call_immediate=!1}evaluateTimelineVariables(e){for(const t of Object.keys(e))"object"==typeof e[t]&&null!==e[t]&&void 0!==e[t].timelineVariablePlaceholder&&(e[t]=e[t].timelineVariableFunction()),"object"==typeof e[t]&&null!==e[t]&&"timeline"!==t&&"timeline_variables"!==t&&this.evaluateTimelineVariables(e[t])}evaluateFunctionParameters(e){this.internal.call_immediate=!0;for(const t of Object.keys(e))"type"!==t&&(void 0!==_[t]&&_[t].type!==d.FUNCTION&&(e[t]=this.replaceFunctionsWithValues(e[t],null)),void 0!==e.type.info.parameters[t]&&e.type.info.parameters[t].type!==d.FUNCTION&&(e[t]=this.replaceFunctionsWithValues(e[t],e.type.info.parameters[t])));this.internal.call_immediate=!1}replaceFunctionsWithValues(e,t){if(null===e)return e;if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=this.replaceFunctionsWithValues(e[n],t);else if("object"==typeof e)if(null!==t&&t.nested)for(const n of Object.keys(e))"object"==typeof t.nested[n]&&t.nested[n].type!==d.FUNCTION&&(e[n]=this.replaceFunctionsWithValues(e[n],t.nested[n]));else for(const t of Object.keys(e))"type"!==t&&"timeline"!==t&&"timeline_variables"!==t&&(e[t]=this.replaceFunctionsWithValues(e[t],null));else if("function"==typeof e)return e();return e}setDefaultValues(e){for(const t in e.type.info.parameters)e.type.info.parameters[t].type===d.COMPLEX?!0===e.type.info.parameters[t].array&&e[t].forEach((function(n,i){for(const n in e.type.info.parameters[t].nested)void 0!==e[t][i][n]&&null!==e[t][i][n]||(void 0===e.type.info.parameters[t].nested[n].default?console.error("You must specify a value for the "+n+" parameter (nested in the "+t+" parameter) in the "+e.type+" plugin."):e[t][i][n]=e.type.info.parameters[t].nested[n].default)})):void 0!==e[t]&&null!==e[t]||(void 0===e.type.info.parameters[t].default?console.error("You must specify a value for the "+t+" parameter in the "+e.type.info.name+" plugin."):e[t]=e.type.info.parameters[t].default)}checkExclusions(e){return r(this,void 0,void 0,(function*(){if((e.min_width||e.min_height||e.audio)&&console.warn("The exclusions option in `initJsPsych()` is deprecated and will be removed in a future version. We recommend using the browser-check plugin instead. See https://www.jspsych.org/latest/plugins/browser-check/."),e.min_width||e.min_height){const t=e.min_width||0,n=e.min_height||0;if(window.innerWidth<t||window.innerHeight<n){for(this.getDisplayElement().innerHTML="<p>Your browser window is too small to complete this experiment. Please maximize the size of your browser window. If your browser window is already maximized, you will not be able to complete this experiment.</p><p>The minimum width is "+t+"px. Your current width is "+window.innerWidth+"px.</p><p>The minimum height is "+n+"px. Your current height is "+window.innerHeight+"px.</p>";window.innerWidth<t||window.innerHeight<n;)yield M(100);this.getDisplayElement().innerHTML=""}}if(void 0!==e.audio&&e.audio&&!window.hasOwnProperty("AudioContext")&&!window.hasOwnProperty("webkitAudioContext"))throw this.getDisplayElement().innerHTML="<p>Your browser does not support the WebAudio API, which means that you will not be able to complete the experiment.</p><p>Browsers that support the WebAudio API include Chrome, Firefox, Safari, and Edge.</p>",new Error}))}drawProgressBar(e){document.querySelector(".jspsych-display-element").insertAdjacentHTML("afterbegin",'<div id="jspsych-progressbar-container"><span>'+e+'</span><div id="jspsych-progressbar-outer"><div id="jspsych-progressbar-inner"></div></div></div>')}updateProgressBar(){this.setProgressBar(this.getProgress().percent_complete/100)}setProgressBar(e){e=Math.max(Math.min(1,e),0),document.querySelector("#jspsych-progressbar-inner").style.width=100*e+"%",this.progress_bar_amount=e}getProgressBarCompleted(){return this.progress_bar_amount}}"undefined"!=typeof window&&window.hasOwnProperty("webkitAudioContext")&&!window.hasOwnProperty("AudioContext")&&(window.AudioContext=webkitAudioContext);const B={name:"survey-text",parameters:{questions:{type:d.COMPLEX,array:!0,pretty_name:"Questions",default:void 0,nested:{prompt:{type:d.HTML_STRING,pretty_name:"Prompt",default:void 0},placeholder:{type:d.STRING,pretty_name:"Placeholder",default:""},rows:{type:d.INT,pretty_name:"Rows",default:1},columns:{type:d.INT,pretty_name:"Columns",default:40},required:{type:d.BOOL,pretty_name:"Required",default:!1},name:{type:d.STRING,pretty_name:"Question Name",default:""}}},randomize_question_order:{type:d.BOOL,pretty_name:"Randomize Question Order",default:!1},preamble:{type:d.HTML_STRING,pretty_name:"Preamble",default:null},button_label:{type:d.STRING,pretty_name:"Button label",default:"Continue"},autocomplete:{type:d.BOOL,pretty_name:"Allow autocomplete",default:!1}}};class ${constructor(e){this.jsPsych=e}trial(e,t){for(var n=0;n<t.questions.length;n++)void 0===t.questions[n].rows&&(t.questions[n].rows=1);for(n=0;n<t.questions.length;n++)void 0===t.questions[n].columns&&(t.questions[n].columns=40);for(n=0;n<t.questions.length;n++)void 0===t.questions[n].value&&(t.questions[n].value="");var i="";null!==t.preamble&&(i+='<div id="jspsych-survey-text-preamble" class="jspsych-survey-text-preamble">'+t.preamble+"</div>"),t.autocomplete?i+='<form id="jspsych-survey-text-form">':i+='<form id="jspsych-survey-text-form" autocomplete="off">';var a=[];for(n=0;n<t.questions.length;n++)a.push(n);t.randomize_question_order&&(a=this.jsPsych.randomization.shuffle(a));for(n=0;n<t.questions.length;n++){var s=t.questions[a[n]],r=a[n];i+='<div id="jspsych-survey-text-'+r+'" class="jspsych-survey-text-question" style="margin: 2em 0em;">',i+='<p class="jspsych-survey-text">'+s.prompt+"</p>";var o=0==n?"autofocus":"",c=s.required?"required":"";1==s.rows?i+='<input type="text" id="input-'+r+'" name="#jspsych-survey-text-response-'+r+'" data-name="'+s.name+'" size="'+s.columns+'" '+o+" "+c+' placeholder="'+s.placeholder+'"></input>':i+='<textarea id="input-'+r+'" name="#jspsych-survey-text-response-'+r+'" data-name="'+s.name+'" cols="'+s.columns+'" rows="'+s.rows+'" '+o+" "+c+' placeholder="'+s.placeholder+'"></textarea>',i+="</div>"}i+='<input type="submit" id="jspsych-survey-text-next" class="jspsych-btn jspsych-survey-text" value="'+t.button_label+'"></input>',i+="</form>",e.innerHTML=i,e.querySelector("#input-"+a[0]).focus(),e.querySelector("#jspsych-survey-text-form").addEventListener("submit",(n=>{n.preventDefault();for(var i=performance.now(),a=Math.round(i-l),s={},r=0;r<t.questions.length;r++){var o="Q"+r,c=document.querySelector("#jspsych-survey-text-"+r).querySelector("textarea, input"),u=c.value,d=c.attributes["data-name"].value;""==d&&(d=o);var p={};p[d]=u,Object.assign(s,p)}var h={rt:a,response:s};e.innerHTML="",this.jsPsych.finishTrial(h)}));var l=performance.now()}simulate(e,t,n,i){"data-only"==t&&(i(),this.simulate_data_only(e,n)),"visual"==t&&this.simulate_visual(e,n,i)}create_simulation_data(e,t){const n={};let i=1e3;for(const t of e.questions){const a=t.name?t.name:`Q${e.questions.indexOf(t)}`,s=1==t.rows?this.jsPsych.randomization.sampleExponential(.25):this.jsPsych.randomization.randomInt(1,10)*t.rows;n[a]=this.jsPsych.randomization.randomWords({exactly:s,join:" "}),i+=this.jsPsych.randomization.sampleExGaussian(2e3,400,.004,!0)}const a={response:n,rt:i},s=this.jsPsych.pluginAPI.mergeSimulationData(a,t);return this.jsPsych.pluginAPI.ensureSimulationDataConsistency(e,s),s}simulate_data_only(e,t){const n=this.create_simulation_data(e,t);this.jsPsych.finishTrial(n)}simulate_visual(e,t,n){const i=this.create_simulation_data(e,t),a=this.jsPsych.getDisplayElement();this.trial(a,e),n();const s=Object.entries(i.response).map((e=>e[1]));for(let e=0;e<s.length;e++)this.jsPsych.pluginAPI.fillTextInput(a.querySelector(`#input-${e}`),s[e],(i.rt-1e3)/s.length*(e+1));this.jsPsych.pluginAPI.clickTarget(a.querySelector("#jspsych-survey-text-next"),i.rt)}}$.info=B;const q={name:"survey-multi-select",parameters:{questions:{type:d.COMPLEX,array:!0,pretty_name:"Questions",nested:{prompt:{type:d.HTML_STRING,pretty_name:"Prompt",default:void 0},options:{type:d.STRING,pretty_name:"Options",array:!0,default:void 0},horizontal:{type:d.BOOL,pretty_name:"Horizontal",default:!1},required:{type:d.BOOL,pretty_name:"Required",default:!1},name:{type:d.STRING,pretty_name:"Question Name",default:""}}},randomize_question_order:{type:d.BOOL,pretty_name:"Randomize Question Order",default:!1},preamble:{type:d.HTML_STRING,pretty_name:"Preamble",default:null},button_label:{type:d.STRING,pretty_name:"Button label",default:"Continue"},required_message:{type:d.STRING,pretty_name:"Required message",default:"You must choose at least one response for this question"},autocomplete:{type:d.BOOL,pretty_name:"Allow autocomplete",default:!1}}};class Y{constructor(e){this.jsPsych=e}trial(e,t){var n="jspsych-survey-multi-select",i="#"+n;const a=(...e)=>e.join("-");e.innerHTML="<style id=\"jspsych-survey-multi-select-css\">.jspsych-survey-multi-select-question { margin-top: 2em; margin-bottom: 2em; text-align: left; }.jspsych-survey-multi-select-text span.required {color: darkred;}.jspsych-survey-multi-select-horizontal .jspsych-survey-multi-select-text { text-align: center;}.jspsych-survey-multi-select-option { line-height: 2; }.jspsych-survey-multi-select-horizontal .jspsych-survey-multi-select-option { display: inline-block; margin-left: 1em; margin-right: 1em; vertical-align: top;}label.jspsych-survey-multi-select-text input[type='checkbox'] {margin-right: 1em;}</style>";var s=a(n,"form");e.innerHTML+='<form id="'+s+'"></form>';var r=e.querySelector("#"+s);t.autocomplete||r.setAttribute("autocomplete","off");var o=a(n,"preamble");null!==t.preamble&&(r.innerHTML+='<div id="'+o+'" class="'+o+'">'+t.preamble+"</div>");for(var c=[],l=0;l<t.questions.length;l++)c.push(l);t.randomize_question_order&&(c=this.jsPsych.randomization.shuffle(c));for(l=0;l<t.questions.length;l++){var u=t.questions[c[l]],d=c[l],p=[a(n,"question")];u.horizontal&&p.push(a(n,"horizontal")),r.innerHTML+='<div id="'+a(n,d)+'" data-name="'+u.name+'" class="'+p.join(" ")+'"></div>';var h=a(i,d);e.querySelector(h).innerHTML+='<p id="survey-question" class="'+n+'-text survey-multi-select">'+u.prompt+"</p>";for(var m=0;m<u.options.length;m++){var f=a(n,"option",d,m);e.querySelector(h).innerHTML+='<div id="'+f+'" class="'+a(n,"option")+'"></div>';var g=document.getElementById(f),y=a(n,"response",d),_=a(n,"response",d,m),v=document.createElement("label");v.setAttribute("class",n+"-text"),v.innerHTML=u.options[m],v.setAttribute("for",_);var b=document.createElement("input");b.setAttribute("type","checkbox"),b.setAttribute("name",y),b.setAttribute("id",_),b.setAttribute("value",u.options[m]),g.appendChild(v),v.insertBefore(b,v.firstChild)}}r.innerHTML+='<div class="fail-message"></div>',r.innerHTML+='<button id="'+n+'-next" class="'+n+' jspsych-btn">'+t.button_label+"</button>",e.querySelector("#jspsych-survey-multi-select-next").addEventListener("click",(()=>{for(var n=0;n<t.questions.length;n++)t.questions[n].required&&(null==e.querySelector("#jspsych-survey-multi-select-"+n+" input:checked")?e.querySelector("#jspsych-survey-multi-select-"+n+" input").setCustomValidity(t.required_message):e.querySelector("#jspsych-survey-multi-select-"+n+" input").setCustomValidity(""));r.reportValidity()})),r.addEventListener("submit",(n=>{n.preventDefault();for(var i=performance.now(),a=Math.round(i-w),s={},r=0;r<t.questions.length;r++){for(var o=e.querySelector("#jspsych-survey-multi-select-"+r),l=[],u=o.querySelectorAll("input[type=checkbox]:checked"),d=0;d<u.length;d++){var p=u[d];l.push(p.value)}var h={},m="Q"+r;""!==o.attributes["data-name"].value&&(m=o.attributes["data-name"].value),h[m]=l,Object.assign(s,h),l.length}var f={rt:a,response:s,question_order:c};e.innerHTML="",this.jsPsych.finishTrial(f)}));var w=performance.now()}simulate(e,t,n,i){"data-only"==t&&(i(),this.simulate_data_only(e,n)),"visual"==t&&this.simulate_visual(e,n,i)}create_simulation_data(e,t){const n={};let i=1e3;for(const t of e.questions){let a;a=t.required?this.jsPsych.randomization.randomInt(1,t.options.length):this.jsPsych.randomization.randomInt(0,t.options.length);const s=t.name?t.name:`Q${e.questions.indexOf(t)}`,r=this.jsPsych.randomization.sampleWithoutReplacement(t.options,a);n[s]=r,i+=this.jsPsych.randomization.sampleExGaussian(1500,400,.005,!0)}const a={response:n,rt:i,question_order:e.randomize_question_order?this.jsPsych.randomization.shuffle([...Array(e.questions.length).keys()]):[...Array(e.questions.length).keys()]},s=this.jsPsych.pluginAPI.mergeSimulationData(a,t);return this.jsPsych.pluginAPI.ensureSimulationDataConsistency(e,s),s}simulate_data_only(e,t){const n=this.create_simulation_data(e,t);this.jsPsych.finishTrial(n)}simulate_visual(e,t,n){const i=this.create_simulation_data(e,t),a=this.jsPsych.getDisplayElement();this.trial(a,e),n();const s=Object.entries(i.response);for(let t=0;t<s.length;t++)for(const n of s[t][1])this.jsPsych.pluginAPI.clickTarget(a.querySelector(`#jspsych-survey-multi-select-response-${t}-${e.questions[t].options.indexOf(n)}`),(i.rt-1e3)/s.length*(t+1));this.jsPsych.pluginAPI.clickTarget(a.querySelector("#jspsych-survey-multi-select-next"),i.rt)}}Y.info=q;const V={name:"survey-html-form",parameters:{html:{type:d.HTML_STRING,pretty_name:"HTML",default:null},preamble:{type:d.HTML_STRING,pretty_name:"Preamble",default:null},button_label:{type:d.STRING,pretty_name:"Button label",default:"Continue"},autofocus:{type:d.STRING,pretty_name:"Element ID to focus",default:""},dataAsArray:{type:d.BOOL,pretty_name:"Data As Array",default:!1},autocomplete:{type:d.BOOL,pretty_name:"Allow autocomplete",default:!1}}};class G{constructor(e){this.jsPsych=e}trial(e,t){var n="";if(null!==t.preamble&&(n+='<div id="jspsych-survey-html-form-preamble" class="jspsych-survey-html-form-preamble">'+t.preamble+"</div>"),t.autocomplete?n+='<form id="jspsych-survey-html-form">':n+='<form id="jspsych-survey-html-form" autocomplete="off">',n+=t.html,n+='<input type="submit" id="jspsych-survey-html-form-next" class="jspsych-btn jspsych-survey-html-form" value="'+t.button_label+'"></input>',n+="</form>",e.innerHTML=n,""!==t.autofocus){var i=e.querySelectorAll("#"+t.autofocus);0===i.length?console.warn("No element found with id: "+t.autofocus):i.length>1?console.warn('The id "'+t.autofocus+'" is not unique so autofocus will not work.'):i[0].focus()}e.querySelector("#jspsych-survey-html-form").addEventListener("submit",(n=>{n.preventDefault();var i=performance.now(),s=Math.round(i-a),r=
4
4
  /**
@@ -22,5 +22,5 @@ function(e){for(var t=[],n=0;n<e.elements.length;n++){var i=e.elements[n];if(i.n
22
22
  * Released under MIT license <https://lodash.com/license>
23
23
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
24
24
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
25
- */!function(e,t){(function(){var i,a="Expected a function",s="__lodash_hash_undefined__",r="__lodash_placeholder__",o=16,c=32,l=64,u=128,d=256,p=1/0,h=9007199254740991,m=NaN,f=4294967295,g=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",c],["partialRight",l],["rearg",d]],y="[object Arguments]",_="[object Array]",v="[object Boolean]",b="[object Date]",w="[object Error]",x="[object Function]",E="[object GeneratorFunction]",S="[object Map]",k="[object Number]",T="[object Object]",R="[object Promise]",I="[object RegExp]",A="[object Set]",C="[object String]",O="[object Symbol]",L="[object WeakMap]",j="[object ArrayBuffer]",U="[object DataView]",P="[object Float32Array]",F="[object Float64Array]",D="[object Int8Array]",N="[object Int16Array]",M="[object Int32Array]",z="[object Uint8Array]",B="[object Uint8ClampedArray]",$="[object Uint16Array]",q="[object Uint32Array]",Y=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,K=RegExp(H.source),Z=RegExp(W.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(ie.source),se=/^\s+/,re=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,_e=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Ee="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Te="a-z\\xdf-\\xf6\\xf8-\\xff",Re="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="['’]",Oe="["+Ee+"]",Le="["+Ae+"]",je="["+Se+"]",Ue="\\d+",Pe="["+ke+"]",Fe="["+Te+"]",De="[^"+Ee+Ae+Ue+ke+Te+Re+"]",Ne="\\ud83c[\\udffb-\\udfff]",Me="[^"+Ee+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="["+Re+"]",qe="\\u200d",Ye="(?:"+Fe+"|"+De+")",Ve="(?:"+$e+"|"+De+")",Ge="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+je+"|"+Ne+")"+"?",Ke="["+Ie+"]?",Ze=Ke+We+("(?:"+qe+"(?:"+[Me,ze,Be].join("|")+")"+Ke+We+")*"),Je="(?:"+[Pe,ze,Be].join("|")+")"+Ze,Xe="(?:"+[Me+je+"?",je,ze,Be,Oe].join("|")+")",Qe=RegExp(Ce,"g"),et=RegExp(je,"g"),tt=RegExp(Ne+"(?="+Ne+")|"+Xe+Ze,"g"),nt=RegExp([$e+"?"+Fe+"+"+Ge+"(?="+[Le,$e,"$"].join("|")+")",Ve+"+"+He+"(?="+[Le,$e+Ye,"$"].join("|")+")",$e+"?"+Ye+"+"+Ge,$e+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ue,Je].join("|"),"g"),it=RegExp("["+qe+Ee+Se+Ie+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,ot={};ot[P]=ot[F]=ot[D]=ot[N]=ot[M]=ot[z]=ot[B]=ot[$]=ot[q]=!0,ot[y]=ot[_]=ot[j]=ot[v]=ot[U]=ot[b]=ot[w]=ot[x]=ot[S]=ot[k]=ot[T]=ot[I]=ot[A]=ot[C]=ot[L]=!1;var ct={};ct[y]=ct[_]=ct[j]=ct[U]=ct[v]=ct[b]=ct[P]=ct[F]=ct[D]=ct[N]=ct[M]=ct[S]=ct[k]=ct[T]=ct[I]=ct[A]=ct[C]=ct[O]=ct[z]=ct[B]=ct[$]=ct[q]=!0,ct[w]=ct[x]=ct[L]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,dt=parseInt,pt="object"==typeof n&&n&&n.Object===Object&&n,ht="object"==typeof self&&self&&self.Object===Object&&self,mt=pt||ht||Function("return this")(),ft=t&&!t.nodeType&&t,gt=ft&&e&&!e.nodeType&&e,yt=gt&&gt.exports===ft,_t=yt&&pt.process,vt=function(){try{var e=gt&&gt.require&&gt.require("util").types;return e||_t&&_t.binding&&_t.binding("util")}catch(e){}}(),bt=vt&&vt.isArrayBuffer,wt=vt&&vt.isDate,xt=vt&&vt.isMap,Et=vt&&vt.isRegExp,St=vt&&vt.isSet,kt=vt&&vt.isTypedArray;function Tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Rt(e,t,n,i){for(var a=-1,s=null==e?0:e.length;++a<s;){var r=e[a];t(i,r,n(r),e)}return i}function It(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Ct(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function Ot(e,t){for(var n=-1,i=null==e?0:e.length,a=0,s=[];++n<i;){var r=e[n];t(r,n,e)&&(s[a++]=r)}return s}function Lt(e,t){return!!(null==e?0:e.length)&&$t(e,t,0)>-1}function jt(e,t,n){for(var i=-1,a=null==e?0:e.length;++i<a;)if(n(t,e[i]))return!0;return!1}function Ut(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}function Pt(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e}function Ft(e,t,n,i){var a=-1,s=null==e?0:e.length;for(i&&s&&(n=e[++a]);++a<s;)n=t(n,e[a],a,e);return n}function Dt(e,t,n,i){var a=null==e?0:e.length;for(i&&a&&(n=e[--a]);a--;)n=t(n,e[a],a,e);return n}function Nt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var Mt=Gt("length");function zt(e,t,n){var i;return n(e,(function(e,n,a){if(t(e,n,a))return i=n,!1})),i}function Bt(e,t,n,i){for(var a=e.length,s=n+(i?1:-1);i?s--:++s<a;)if(t(e[s],s,e))return s;return-1}function $t(e,t,n){return t==t?function(e,t,n){var i=n-1,a=e.length;for(;++i<a;)if(e[i]===t)return i;return-1}(e,t,n):Bt(e,Yt,n)}function qt(e,t,n,i){for(var a=n-1,s=e.length;++a<s;)if(i(e[a],t))return a;return-1}function Yt(e){return e!=e}function Vt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:m}function Gt(e){return function(t){return null==t?i:t[e]}}function Ht(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,n,i,a){return a(e,(function(e,a,s){n=i?(i=!1,e):t(n,e,a,s)})),n}function Kt(e,t){for(var n,a=-1,s=e.length;++a<s;){var r=t(e[a]);r!==i&&(n=n===i?r:n+r)}return n}function Zt(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Jt(e){return e?e.slice(0,fn(e)+1).replace(se,""):e}function Xt(e){return function(t){return e(t)}}function Qt(e,t){return Ut(t,(function(t){return e[t]}))}function en(e,t){return e.has(t)}function tn(e,t){for(var n=-1,i=e.length;++n<i&&$t(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length;n--&&$t(t,e[n],0)>-1;);return n}var an=Ht({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),sn=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rn(e){return"\\"+lt[e]}function on(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function un(e,t){for(var n=-1,i=e.length,a=0,s=[];++n<i;){var o=e[n];o!==t&&o!==r||(e[n]=r,s[a++]=n)}return s}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function hn(e){return on(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):Mt(e)}function mn(e){return on(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var gn=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yn=function e(t){var n=(t=null==t?mt:yn.defaults(mt.Object(),t,yn.pick(mt,st))).Array,re=t.Date,Ee=t.Error,Se=t.Function,ke=t.Math,Te=t.Object,Re=t.RegExp,Ie=t.String,Ae=t.TypeError,Ce=n.prototype,Oe=Se.prototype,Le=Te.prototype,je=t["__core-js_shared__"],Ue=Oe.toString,Pe=Le.hasOwnProperty,Fe=0,De=function(){var e=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ne=Le.toString,Me=Ue.call(Te),ze=mt._,Be=Re("^"+Ue.call(Pe).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=yt?t.Buffer:i,qe=t.Symbol,Ye=t.Uint8Array,Ve=$e?$e.allocUnsafe:i,Ge=ln(Te.getPrototypeOf,Te),He=Te.create,We=Le.propertyIsEnumerable,Ke=Ce.splice,Ze=qe?qe.isConcatSpreadable:i,Je=qe?qe.iterator:i,Xe=qe?qe.toStringTag:i,tt=function(){try{var e=ds(Te,"defineProperty");return e({},"",{}),e}catch(e){}}(),it=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,lt=re&&re.now!==mt.Date.now&&re.now,pt=t.setTimeout!==mt.setTimeout&&t.setTimeout,ht=ke.ceil,ft=ke.floor,gt=Te.getOwnPropertySymbols,_t=$e?$e.isBuffer:i,vt=t.isFinite,Mt=Ce.join,Ht=ln(Te.keys,Te),_n=ke.max,vn=ke.min,bn=re.now,wn=t.parseInt,xn=ke.random,En=Ce.reverse,Sn=ds(t,"DataView"),kn=ds(t,"Map"),Tn=ds(t,"Promise"),Rn=ds(t,"Set"),In=ds(t,"WeakMap"),An=ds(Te,"create"),Cn=In&&new In,On={},Ln=Ds(Sn),jn=Ds(kn),Un=Ds(Tn),Pn=Ds(Rn),Fn=Ds(In),Dn=qe?qe.prototype:i,Nn=Dn?Dn.valueOf:i,Mn=Dn?Dn.toString:i;function zn(e){if(eo(e)&&!qr(e)&&!(e instanceof Yn)){if(e instanceof qn)return e;if(Pe.call(e,"__wrapped__"))return Ns(e)}return new qn(e)}var Bn=function(){function e(){}return function(t){if(!Qr(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function $n(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Yn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Zn(e,t){var n=qr(e),i=!n&&$r(e),a=!n&&!i&&Hr(e),s=!n&&!i&&!a&&co(e),r=n||i||a||s,o=r?Zt(e.length,Ie):[],c=o.length;for(var l in e)!t&&!Pe.call(e,l)||r&&("length"==l||a&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_s(l,c))||o.push(l);return o}function Jn(e){var t=e.length;return t?e[Wi(0,t-1)]:i}function Xn(e,t){return Us(Aa(e),oi(t,0,e.length))}function Qn(e){return Us(Aa(e))}function ei(e,t,n){(n!==i&&!Mr(e[t],n)||n===i&&!(t in e))&&si(e,t,n)}function ti(e,t,n){var a=e[t];Pe.call(e,t)&&Mr(a,n)&&(n!==i||t in e)||si(e,t,n)}function ni(e,t){for(var n=e.length;n--;)if(Mr(e[n][0],t))return n;return-1}function ii(e,t,n,i){return pi(e,(function(e,a,s){t(i,e,n(e),s)})),i}function ai(e,t){return e&&Ca(t,Oo(t),e)}function si(e,t,n){"__proto__"==t&&tt?tt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ri(e,t){for(var a=-1,s=t.length,r=n(s),o=null==e;++a<s;)r[a]=o?i:To(e,t[a]);return r}function oi(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ci(e,t,n,a,s,r){var o,c=1&t,l=2&t,u=4&t;if(n&&(o=s?n(e,a,s,r):n(e)),o!==i)return o;if(!Qr(e))return e;var d=qr(e);if(d){if(o=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return Aa(e,o)}else{var p=ms(e),h=p==x||p==E;if(Hr(e))return Ea(e,c);if(p==T||p==y||h&&!s){if(o=l||h?{}:gs(e),!c)return l?function(e,t){return Ca(e,hs(e),t)}(e,function(e,t){return e&&Ca(t,Lo(t),e)}(o,e)):function(e,t){return Ca(e,ps(e),t)}(e,ai(o,e))}else{if(!ct[p])return s?e:{};o=function(e,t,n){var i=e.constructor;switch(t){case j:return Sa(e);case v:case b:return new i(+e);case U:return function(e,t){var n=t?Sa(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case F:case D:case N:case M:case z:case B:case $:case q:return ka(e,n);case S:return new i;case k:case C:return new i(e);case I:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new i;case O:return a=e,Nn?Te(Nn.call(a)):{}}var a}(e,p,c)}}r||(r=new Kn);var m=r.get(e);if(m)return m;r.set(e,o),so(e)?e.forEach((function(i){o.add(ci(i,t,n,i,e,r))})):to(e)&&e.forEach((function(i,a){o.set(a,ci(i,t,n,a,e,r))}));var f=d?i:(u?l?as:is:l?Lo:Oo)(e);return It(f||e,(function(i,a){f&&(i=e[a=i]),ti(o,a,ci(i,t,n,a,e,r))})),o}function li(e,t,n){var a=n.length;if(null==e)return!a;for(e=Te(e);a--;){var s=n[a],r=t[s],o=e[s];if(o===i&&!(s in e)||!r(o))return!1}return!0}function ui(e,t,n){if("function"!=typeof e)throw new Ae(a);return Cs((function(){e.apply(i,n)}),t)}function di(e,t,n,i){var a=-1,s=Lt,r=!0,o=e.length,c=[],l=t.length;if(!o)return c;n&&(t=Ut(t,Xt(n))),i?(s=jt,r=!1):t.length>=200&&(s=en,r=!1,t=new Wn(t));e:for(;++a<o;){var u=e[a],d=null==n?u:n(u);if(u=i||0!==u?u:0,r&&d==d){for(var p=l;p--;)if(t[p]===d)continue e;c.push(u)}else s(t,d,i)||c.push(u)}return c}zn.templateSettings={escape:J,evaluate:X,interpolate:Q,variable:"",imports:{_:zn}},zn.prototype=$n.prototype,zn.prototype.constructor=zn,qn.prototype=Bn($n.prototype),qn.prototype.constructor=qn,Yn.prototype=Bn($n.prototype),Yn.prototype.constructor=Yn,Vn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(e){var t=this.__data__;if(An){var n=t[e];return n===s?i:n}return Pe.call(t,e)?t[e]:i},Vn.prototype.has=function(e){var t=this.__data__;return An?t[e]!==i:Pe.call(t,e)},Vn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&t===i?s:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=ni(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ke.call(t,n,1),--this.size,!0)},Gn.prototype.get=function(e){var t=this.__data__,n=ni(t,e);return n<0?i:t[n][1]},Gn.prototype.has=function(e){return ni(this.__data__,e)>-1},Gn.prototype.set=function(e,t){var n=this.__data__,i=ni(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(kn||Gn),string:new Vn}},Hn.prototype.delete=function(e){var t=ls(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return ls(this,e).get(e)},Hn.prototype.has=function(e){return ls(this,e).has(e)},Hn.prototype.set=function(e,t){var n=ls(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Wn.prototype.add=Wn.prototype.push=function(e){return this.__data__.set(e,s),this},Wn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var i=n.__data__;if(!kn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(i)}return n.set(e,t),this.size=n.size,this};var pi=ja(bi),hi=ja(wi,!0);function mi(e,t){var n=!0;return pi(e,(function(e,i,a){return n=!!t(e,i,a)})),n}function fi(e,t,n){for(var a=-1,s=e.length;++a<s;){var r=e[a],o=t(r);if(null!=o&&(c===i?o==o&&!oo(o):n(o,c)))var c=o,l=r}return l}function gi(e,t){var n=[];return pi(e,(function(e,i,a){t(e,i,a)&&n.push(e)})),n}function yi(e,t,n,i,a){var s=-1,r=e.length;for(n||(n=ys),a||(a=[]);++s<r;){var o=e[s];t>0&&n(o)?t>1?yi(o,t-1,n,i,a):Pt(a,o):i||(a[a.length]=o)}return a}var _i=Ua(),vi=Ua(!0);function bi(e,t){return e&&_i(e,t,Oo)}function wi(e,t){return e&&vi(e,t,Oo)}function xi(e,t){return Ot(t,(function(t){return Zr(e[t])}))}function Ei(e,t){for(var n=0,a=(t=va(t,e)).length;null!=e&&n<a;)e=e[Fs(t[n++])];return n&&n==a?e:i}function Si(e,t,n){var i=t(e);return qr(e)?i:Pt(i,n(e))}function ki(e){return null==e?e===i?"[object Undefined]":"[object Null]":Xe&&Xe in Te(e)?function(e){var t=Pe.call(e,Xe),n=e[Xe];try{e[Xe]=i;var a=!0}catch(e){}var s=Ne.call(e);a&&(t?e[Xe]=n:delete e[Xe]);return s}(e):function(e){return Ne.call(e)}(e)}function Ti(e,t){return e>t}function Ri(e,t){return null!=e&&Pe.call(e,t)}function Ii(e,t){return null!=e&&t in Te(e)}function Ai(e,t,a){for(var s=a?jt:Lt,r=e[0].length,o=e.length,c=o,l=n(o),u=1/0,d=[];c--;){var p=e[c];c&&t&&(p=Ut(p,Xt(t))),u=vn(p.length,u),l[c]=!a&&(t||r>=120&&p.length>=120)?new Wn(c&&p):i}p=e[0];var h=-1,m=l[0];e:for(;++h<r&&d.length<u;){var f=p[h],g=t?t(f):f;if(f=a||0!==f?f:0,!(m?en(m,g):s(d,g,a))){for(c=o;--c;){var y=l[c];if(!(y?en(y,g):s(e[c],g,a)))continue e}m&&m.push(g),d.push(f)}}return d}function Ci(e,t,n){var a=null==(e=Rs(e,t=va(t,e)))?e:e[Fs(Ks(t))];return null==a?i:Tt(a,e,n)}function Oi(e){return eo(e)&&ki(e)==y}function Li(e,t,n,a,s){return e===t||(null==e||null==t||!eo(e)&&!eo(t)?e!=e&&t!=t:function(e,t,n,a,s,r){var o=qr(e),c=qr(t),l=o?_:ms(e),u=c?_:ms(t),d=(l=l==y?T:l)==T,p=(u=u==y?T:u)==T,h=l==u;if(h&&Hr(e)){if(!Hr(t))return!1;o=!0,d=!1}if(h&&!d)return r||(r=new Kn),o||co(e)?ts(e,t,n,a,s,r):function(e,t,n,i,a,s,r){switch(n){case U:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case j:return!(e.byteLength!=t.byteLength||!s(new Ye(e),new Ye(t)));case v:case b:case k:return Mr(+e,+t);case w:return e.name==t.name&&e.message==t.message;case I:case C:return e==t+"";case S:var o=cn;case A:var c=1&i;if(o||(o=dn),e.size!=t.size&&!c)return!1;var l=r.get(e);if(l)return l==t;i|=2,r.set(e,t);var u=ts(o(e),o(t),i,a,s,r);return r.delete(e),u;case O:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,l,n,a,s,r);if(!(1&n)){var m=d&&Pe.call(e,"__wrapped__"),f=p&&Pe.call(t,"__wrapped__");if(m||f){var g=m?e.value():e,x=f?t.value():t;return r||(r=new Kn),s(g,x,n,a,r)}}if(!h)return!1;return r||(r=new Kn),function(e,t,n,a,s,r){var o=1&n,c=is(e),l=c.length,u=is(t),d=u.length;if(l!=d&&!o)return!1;var p=l;for(;p--;){var h=c[p];if(!(o?h in t:Pe.call(t,h)))return!1}var m=r.get(e),f=r.get(t);if(m&&f)return m==t&&f==e;var g=!0;r.set(e,t),r.set(t,e);var y=o;for(;++p<l;){var _=e[h=c[p]],v=t[h];if(a)var b=o?a(v,_,h,t,e,r):a(_,v,h,e,t,r);if(!(b===i?_===v||s(_,v,n,a,r):b)){g=!1;break}y||(y="constructor"==h)}if(g&&!y){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return r.delete(e),r.delete(t),g}(e,t,n,a,s,r)}(e,t,n,a,Li,s))}function ji(e,t,n,a){var s=n.length,r=s,o=!a;if(null==e)return!r;for(e=Te(e);s--;){var c=n[s];if(o&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<r;){var l=(c=n[s])[0],u=e[l],d=c[1];if(o&&c[2]){if(u===i&&!(l in e))return!1}else{var p=new Kn;if(a)var h=a(u,d,l,e,t,p);if(!(h===i?Li(d,u,3,a,p):h))return!1}}return!0}function Ui(e){return!(!Qr(e)||(t=e,De&&De in t))&&(Zr(e)?Be:ye).test(Ds(e));var t}function Pi(e){return"function"==typeof e?e:null==e?ic:"object"==typeof e?qr(e)?Bi(e[0],e[1]):zi(e):pc(e)}function Fi(e){if(!Es(e))return Ht(e);var t=[];for(var n in Te(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Di(e){if(!Qr(e))return function(e){var t=[];if(null!=e)for(var n in Te(e))t.push(n);return t}(e);var t=Es(e),n=[];for(var i in e)("constructor"!=i||!t&&Pe.call(e,i))&&n.push(i);return n}function Ni(e,t){return e<t}function Mi(e,t){var i=-1,a=Vr(e)?n(e.length):[];return pi(e,(function(e,n,s){a[++i]=t(e,n,s)})),a}function zi(e){var t=us(e);return 1==t.length&&t[0][2]?ks(t[0][0],t[0][1]):function(n){return n===e||ji(n,e,t)}}function Bi(e,t){return bs(e)&&Ss(t)?ks(Fs(e),t):function(n){var a=To(n,e);return a===i&&a===t?Ro(n,e):Li(t,a,3)}}function $i(e,t,n,a,s){e!==t&&_i(t,(function(r,o){if(s||(s=new Kn),Qr(r))!function(e,t,n,a,s,r,o){var c=Is(e,n),l=Is(t,n),u=o.get(l);if(u)return void ei(e,n,u);var d=r?r(c,l,n+"",e,t,o):i,p=d===i;if(p){var h=qr(l),m=!h&&Hr(l),f=!h&&!m&&co(l);d=l,h||m||f?qr(c)?d=c:Gr(c)?d=Aa(c):m?(p=!1,d=Ea(l,!0)):f?(p=!1,d=ka(l,!0)):d=[]:io(l)||$r(l)?(d=c,$r(c)?d=yo(c):Qr(c)&&!Zr(c)||(d=gs(l))):p=!1}p&&(o.set(l,d),s(d,l,a,r,o),o.delete(l));ei(e,n,d)}(e,t,o,n,$i,a,s);else{var c=a?a(Is(e,o),r,o+"",e,t,s):i;c===i&&(c=r),ei(e,o,c)}}),Lo)}function qi(e,t){var n=e.length;if(n)return _s(t+=t<0?n:0,n)?e[t]:i}function Yi(e,t,n){t=t.length?Ut(t,(function(e){return qr(e)?function(t){return Ei(t,1===e.length?e[0]:e)}:e})):[ic];var i=-1;t=Ut(t,Xt(cs()));var a=Mi(e,(function(e,n,a){var s=Ut(t,(function(t){return t(e)}));return{criteria:s,index:++i,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(a,(function(e,t){return function(e,t,n){var i=-1,a=e.criteria,s=t.criteria,r=a.length,o=n.length;for(;++i<r;){var c=Ta(a[i],s[i]);if(c)return i>=o?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}))}function Vi(e,t,n){for(var i=-1,a=t.length,s={};++i<a;){var r=t[i],o=Ei(e,r);n(o,r)&&Qi(s,va(r,e),o)}return s}function Gi(e,t,n,i){var a=i?qt:$t,s=-1,r=t.length,o=e;for(e===t&&(t=Aa(t)),n&&(o=Ut(e,Xt(n)));++s<r;)for(var c=0,l=t[s],u=n?n(l):l;(c=a(o,u,c,i))>-1;)o!==e&&Ke.call(o,c,1),Ke.call(e,c,1);return e}function Hi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var a=t[n];if(n==i||a!==s){var s=a;_s(a)?Ke.call(e,a,1):da(e,a)}}return e}function Wi(e,t){return e+ft(xn()*(t-e+1))}function Ki(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=ft(t/2))&&(e+=e)}while(t);return n}function Zi(e,t){return Os(Ts(e,t,ic),e+"")}function Ji(e){return Jn(zo(e))}function Xi(e,t){var n=zo(e);return Us(n,oi(t,0,n.length))}function Qi(e,t,n,a){if(!Qr(e))return e;for(var s=-1,r=(t=va(t,e)).length,o=r-1,c=e;null!=c&&++s<r;){var l=Fs(t[s]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=o){var d=c[l];(u=a?a(d,l,c):i)===i&&(u=Qr(d)?d:_s(t[s+1])?[]:{})}ti(c,l,u),c=c[l]}return e}var ea=Cn?function(e,t){return Cn.set(e,t),e}:ic,ta=tt?function(e,t){return tt(e,"toString",{configurable:!0,enumerable:!1,value:ec(t),writable:!0})}:ic;function na(e){return Us(zo(e))}function ia(e,t,i){var a=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(i=i>s?s:i)<0&&(i+=s),s=t>i?0:i-t>>>0,t>>>=0;for(var r=n(s);++a<s;)r[a]=e[a+t];return r}function aa(e,t){var n;return pi(e,(function(e,i,a){return!(n=t(e,i,a))})),!!n}function sa(e,t,n){var i=0,a=null==e?i:e.length;if("number"==typeof t&&t==t&&a<=2147483647){for(;i<a;){var s=i+a>>>1,r=e[s];null!==r&&!oo(r)&&(n?r<=t:r<t)?i=s+1:a=s}return a}return ra(e,t,ic,n)}function ra(e,t,n,a){var s=0,r=null==e?0:e.length;if(0===r)return 0;for(var o=(t=n(t))!=t,c=null===t,l=oo(t),u=t===i;s<r;){var d=ft((s+r)/2),p=n(e[d]),h=p!==i,m=null===p,f=p==p,g=oo(p);if(o)var y=a||f;else y=u?f&&(a||h):c?f&&h&&(a||!m):l?f&&h&&!m&&(a||!g):!m&&!g&&(a?p<=t:p<t);y?s=d+1:r=d}return vn(r,4294967294)}function oa(e,t){for(var n=-1,i=e.length,a=0,s=[];++n<i;){var r=e[n],o=t?t(r):r;if(!n||!Mr(o,c)){var c=o;s[a++]=0===r?0:r}}return s}function ca(e){return"number"==typeof e?e:oo(e)?m:+e}function la(e){if("string"==typeof e)return e;if(qr(e))return Ut(e,la)+"";if(oo(e))return Mn?Mn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ua(e,t,n){var i=-1,a=Lt,s=e.length,r=!0,o=[],c=o;if(n)r=!1,a=jt;else if(s>=200){var l=t?null:Ka(e);if(l)return dn(l);r=!1,a=en,c=new Wn}else c=t?[]:o;e:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=n||0!==u?u:0,r&&d==d){for(var p=c.length;p--;)if(c[p]===d)continue e;t&&c.push(d),o.push(u)}else a(c,d,n)||(c!==o&&c.push(d),o.push(u))}return o}function da(e,t){return null==(e=Rs(e,t=va(t,e)))||delete e[Fs(Ks(t))]}function pa(e,t,n,i){return Qi(e,t,n(Ei(e,t)),i)}function ha(e,t,n,i){for(var a=e.length,s=i?a:-1;(i?s--:++s<a)&&t(e[s],s,e););return n?ia(e,i?0:s,i?s+1:a):ia(e,i?s+1:0,i?a:s)}function ma(e,t){var n=e;return n instanceof Yn&&(n=n.value()),Ft(t,(function(e,t){return t.func.apply(t.thisArg,Pt([e],t.args))}),n)}function fa(e,t,i){var a=e.length;if(a<2)return a?ua(e[0]):[];for(var s=-1,r=n(a);++s<a;)for(var o=e[s],c=-1;++c<a;)c!=s&&(r[s]=di(r[s]||o,e[c],t,i));return ua(yi(r,1),t,i)}function ga(e,t,n){for(var a=-1,s=e.length,r=t.length,o={};++a<s;){var c=a<r?t[a]:i;n(o,e[a],c)}return o}function ya(e){return Gr(e)?e:[]}function _a(e){return"function"==typeof e?e:ic}function va(e,t){return qr(e)?e:bs(e,t)?[e]:Ps(_o(e))}var ba=Zi;function wa(e,t,n){var a=e.length;return n=n===i?a:n,!t&&n>=a?e:ia(e,t,n)}var xa=it||function(e){return mt.clearTimeout(e)};function Ea(e,t){if(t)return e.slice();var n=e.length,i=Ve?Ve(n):new e.constructor(n);return e.copy(i),i}function Sa(e){var t=new e.constructor(e.byteLength);return new Ye(t).set(new Ye(e)),t}function ka(e,t){var n=t?Sa(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ta(e,t){if(e!==t){var n=e!==i,a=null===e,s=e==e,r=oo(e),o=t!==i,c=null===t,l=t==t,u=oo(t);if(!c&&!u&&!r&&e>t||r&&o&&l&&!c&&!u||a&&o&&l||!n&&l||!s)return 1;if(!a&&!r&&!u&&e<t||u&&n&&s&&!a&&!r||c&&n&&s||!o&&s||!l)return-1}return 0}function Ra(e,t,i,a){for(var s=-1,r=e.length,o=i.length,c=-1,l=t.length,u=_n(r-o,0),d=n(l+u),p=!a;++c<l;)d[c]=t[c];for(;++s<o;)(p||s<r)&&(d[i[s]]=e[s]);for(;u--;)d[c++]=e[s++];return d}function Ia(e,t,i,a){for(var s=-1,r=e.length,o=-1,c=i.length,l=-1,u=t.length,d=_n(r-c,0),p=n(d+u),h=!a;++s<d;)p[s]=e[s];for(var m=s;++l<u;)p[m+l]=t[l];for(;++o<c;)(h||s<r)&&(p[m+i[o]]=e[s++]);return p}function Aa(e,t){var i=-1,a=e.length;for(t||(t=n(a));++i<a;)t[i]=e[i];return t}function Ca(e,t,n,a){var s=!n;n||(n={});for(var r=-1,o=t.length;++r<o;){var c=t[r],l=a?a(n[c],e[c],c,n,e):i;l===i&&(l=e[c]),s?si(n,c,l):ti(n,c,l)}return n}function Oa(e,t){return function(n,i){var a=qr(n)?Rt:ii,s=t?t():{};return a(n,e,cs(i,2),s)}}function La(e){return Zi((function(t,n){var a=-1,s=n.length,r=s>1?n[s-1]:i,o=s>2?n[2]:i;for(r=e.length>3&&"function"==typeof r?(s--,r):i,o&&vs(n[0],n[1],o)&&(r=s<3?i:r,s=1),t=Te(t);++a<s;){var c=n[a];c&&e(t,c,a,r)}return t}))}function ja(e,t){return function(n,i){if(null==n)return n;if(!Vr(n))return e(n,i);for(var a=n.length,s=t?a:-1,r=Te(n);(t?s--:++s<a)&&!1!==i(r[s],s,r););return n}}function Ua(e){return function(t,n,i){for(var a=-1,s=Te(t),r=i(t),o=r.length;o--;){var c=r[e?o:++a];if(!1===n(s[c],c,s))break}return t}}function Pa(e){return function(t){var n=on(t=_o(t))?mn(t):i,a=n?n[0]:t.charAt(0),s=n?wa(n,1).join(""):t.slice(1);return a[e]()+s}}function Fa(e){return function(t){return Ft(Jo(qo(t).replace(Qe,"")),e,"")}}function Da(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),i=e.apply(n,t);return Qr(i)?i:n}}function Na(e){return function(t,n,a){var s=Te(t);if(!Vr(t)){var r=cs(n,3);t=Oo(t),n=function(e){return r(s[e],e,s)}}var o=e(t,n,a);return o>-1?s[r?t[o]:o]:i}}function Ma(e){return ns((function(t){var n=t.length,s=n,r=qn.prototype.thru;for(e&&t.reverse();s--;){var o=t[s];if("function"!=typeof o)throw new Ae(a);if(r&&!c&&"wrapper"==rs(o))var c=new qn([],!0)}for(s=c?s:n;++s<n;){var l=rs(o=t[s]),u="wrapper"==l?ss(o):i;c=u&&ws(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[rs(u[0])].apply(c,u[3]):1==o.length&&ws(o)?c[l]():c.thru(o)}return function(){var e=arguments,i=e[0];if(c&&1==e.length&&qr(i))return c.plant(i).value();for(var a=0,s=n?t[a].apply(this,e):i;++a<n;)s=t[a].call(this,s);return s}}))}function za(e,t,a,s,r,o,c,l,d,p){var h=t&u,m=1&t,f=2&t,g=24&t,y=512&t,_=f?i:Da(e);return function u(){for(var v=arguments.length,b=n(v),w=v;w--;)b[w]=arguments[w];if(g)var x=os(u),E=function(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}(b,x);if(s&&(b=Ra(b,s,r,g)),o&&(b=Ia(b,o,c,g)),v-=E,g&&v<p){var S=un(b,x);return Ha(e,t,za,u.placeholder,a,b,S,l,d,p-v)}var k=m?a:this,T=f?k[e]:e;return v=b.length,l?b=function(e,t){var n=e.length,a=vn(t.length,n),s=Aa(e);for(;a--;){var r=t[a];e[a]=_s(r,n)?s[r]:i}return e}(b,l):y&&v>1&&b.reverse(),h&&d<v&&(b.length=d),this&&this!==mt&&this instanceof u&&(T=_||Da(T)),T.apply(k,b)}}function Ba(e,t){return function(n,i){return function(e,t,n,i){return bi(e,(function(e,a,s){t(i,n(e),a,s)})),i}(n,e,t(i),{})}}function $a(e,t){return function(n,a){var s;if(n===i&&a===i)return t;if(n!==i&&(s=n),a!==i){if(s===i)return a;"string"==typeof n||"string"==typeof a?(n=la(n),a=la(a)):(n=ca(n),a=ca(a)),s=e(n,a)}return s}}function qa(e){return ns((function(t){return t=Ut(t,Xt(cs())),Zi((function(n){var i=this;return e(t,(function(e){return Tt(e,i,n)}))}))}))}function Ya(e,t){var n=(t=t===i?" ":la(t)).length;if(n<2)return n?Ki(t,e):t;var a=Ki(t,ht(e/hn(t)));return on(t)?wa(mn(a),0,e).join(""):a.slice(0,e)}function Va(e){return function(t,a,s){return s&&"number"!=typeof s&&vs(t,a,s)&&(a=s=i),t=ho(t),a===i?(a=t,t=0):a=ho(a),function(e,t,i,a){for(var s=-1,r=_n(ht((t-e)/(i||1)),0),o=n(r);r--;)o[a?r:++s]=e,e+=i;return o}(t,a,s=s===i?t<a?1:-1:ho(s),e)}}function Ga(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=go(t),n=go(n)),e(t,n)}}function Ha(e,t,n,a,s,r,o,u,d,p){var h=8&t;t|=h?c:l,4&(t&=~(h?l:c))||(t&=-4);var m=[e,t,s,h?r:i,h?o:i,h?i:r,h?i:o,u,d,p],f=n.apply(i,m);return ws(e)&&As(f,m),f.placeholder=a,Ls(f,e,t)}function Wa(e){var t=ke[e];return function(e,n){if(e=go(e),(n=null==n?0:vn(mo(n),292))&&vt(e)){var i=(_o(e)+"e").split("e");return+((i=(_o(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Ka=Rn&&1/dn(new Rn([,-0]))[1]==p?function(e){return new Rn(e)}:cc;function Za(e){return function(t){var n=ms(t);return n==S?cn(t):n==A?pn(t):function(e,t){return Ut(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ja(e,t,s,p,h,m,f,g){var y=2&t;if(!y&&"function"!=typeof e)throw new Ae(a);var _=p?p.length:0;if(_||(t&=-97,p=h=i),f=f===i?f:_n(mo(f),0),g=g===i?g:mo(g),_-=h?h.length:0,t&l){var v=p,b=h;p=h=i}var w=y?i:ss(e),x=[e,t,s,p,h,v,b,m,f,g];if(w&&function(e,t){var n=e[1],i=t[1],a=n|i,s=a<131,o=i==u&&8==n||i==u&&n==d&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!s&&!o)return e;1&i&&(e[2]=t[2],a|=1&n?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?Ra(l,c,t[4]):c,e[4]=l?un(e[3],r):t[4]}(c=t[5])&&(l=e[5],e[5]=l?Ia(l,c,t[6]):c,e[6]=l?un(e[5],r):t[6]);(c=t[7])&&(e[7]=c);i&u&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=a}(x,w),e=x[0],t=x[1],s=x[2],p=x[3],h=x[4],!(g=x[9]=x[9]===i?y?0:e.length:_n(x[9]-_,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==o?function(e,t,a){var s=Da(e);return function r(){for(var o=arguments.length,c=n(o),l=o,u=os(r);l--;)c[l]=arguments[l];var d=o<3&&c[0]!==u&&c[o-1]!==u?[]:un(c,u);return(o-=d.length)<a?Ha(e,t,za,r.placeholder,i,c,d,i,i,a-o):Tt(this&&this!==mt&&this instanceof r?s:e,this,c)}}(e,t,g):t!=c&&33!=t||h.length?za.apply(i,x):function(e,t,i,a){var s=1&t,r=Da(e);return function t(){for(var o=-1,c=arguments.length,l=-1,u=a.length,d=n(u+c),p=this&&this!==mt&&this instanceof t?r:e;++l<u;)d[l]=a[l];for(;c--;)d[l++]=arguments[++o];return Tt(p,s?i:this,d)}}(e,t,s,p);else var E=function(e,t,n){var i=1&t,a=Da(e);return function t(){return(this&&this!==mt&&this instanceof t?a:e).apply(i?n:this,arguments)}}(e,t,s);return Ls((w?ea:As)(E,x),e,t)}function Xa(e,t,n,a){return e===i||Mr(e,Le[n])&&!Pe.call(a,n)?t:e}function Qa(e,t,n,a,s,r){return Qr(e)&&Qr(t)&&(r.set(t,e),$i(e,t,i,Qa,r),r.delete(t)),e}function es(e){return io(e)?i:e}function ts(e,t,n,a,s,r){var o=1&n,c=e.length,l=t.length;if(c!=l&&!(o&&l>c))return!1;var u=r.get(e),d=r.get(t);if(u&&d)return u==t&&d==e;var p=-1,h=!0,m=2&n?new Wn:i;for(r.set(e,t),r.set(t,e);++p<c;){var f=e[p],g=t[p];if(a)var y=o?a(g,f,p,t,e,r):a(f,g,p,e,t,r);if(y!==i){if(y)continue;h=!1;break}if(m){if(!Nt(t,(function(e,t){if(!en(m,t)&&(f===e||s(f,e,n,a,r)))return m.push(t)}))){h=!1;break}}else if(f!==g&&!s(f,g,n,a,r)){h=!1;break}}return r.delete(e),r.delete(t),h}function ns(e){return Os(Ts(e,i,Ys),e+"")}function is(e){return Si(e,Oo,ps)}function as(e){return Si(e,Lo,hs)}var ss=Cn?function(e){return Cn.get(e)}:cc;function rs(e){for(var t=e.name+"",n=On[t],i=Pe.call(On,t)?n.length:0;i--;){var a=n[i],s=a.func;if(null==s||s==e)return a.name}return t}function os(e){return(Pe.call(zn,"placeholder")?zn:e).placeholder}function cs(){var e=zn.iteratee||ac;return e=e===ac?Pi:e,arguments.length?e(arguments[0],arguments[1]):e}function ls(e,t){var n,i,a=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function us(e){for(var t=Oo(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,Ss(a)]}return t}function ds(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Ui(n)?n:i}var ps=gt?function(e){return null==e?[]:(e=Te(e),Ot(gt(e),(function(t){return We.call(e,t)})))}:fc,hs=gt?function(e){for(var t=[];e;)Pt(t,ps(e)),e=Ge(e);return t}:fc,ms=ki;function fs(e,t,n){for(var i=-1,a=(t=va(t,e)).length,s=!1;++i<a;){var r=Fs(t[i]);if(!(s=null!=e&&n(e,r)))break;e=e[r]}return s||++i!=a?s:!!(a=null==e?0:e.length)&&Xr(a)&&_s(r,a)&&(qr(e)||$r(e))}function gs(e){return"function"!=typeof e.constructor||Es(e)?{}:Bn(Ge(e))}function ys(e){return qr(e)||$r(e)||!!(Ze&&e&&e[Ze])}function _s(e,t){var n=typeof e;return!!(t=null==t?h:t)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function vs(e,t,n){if(!Qr(n))return!1;var i=typeof t;return!!("number"==i?Vr(n)&&_s(t,n.length):"string"==i&&t in n)&&Mr(n[t],e)}function bs(e,t){if(qr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!oo(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Te(t))}function ws(e){var t=rs(e),n=zn[t];if("function"!=typeof n||!(t in Yn.prototype))return!1;if(e===n)return!0;var i=ss(n);return!!i&&e===i[0]}(Sn&&ms(new Sn(new ArrayBuffer(1)))!=U||kn&&ms(new kn)!=S||Tn&&ms(Tn.resolve())!=R||Rn&&ms(new Rn)!=A||In&&ms(new In)!=L)&&(ms=function(e){var t=ki(e),n=t==T?e.constructor:i,a=n?Ds(n):"";if(a)switch(a){case Ln:return U;case jn:return S;case Un:return R;case Pn:return A;case Fn:return L}return t});var xs=je?Zr:gc;function Es(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Le)}function Ss(e){return e==e&&!Qr(e)}function ks(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Te(n)))}}function Ts(e,t,a){return t=_n(t===i?e.length-1:t,0),function(){for(var i=arguments,s=-1,r=_n(i.length-t,0),o=n(r);++s<r;)o[s]=i[t+s];s=-1;for(var c=n(t+1);++s<t;)c[s]=i[s];return c[t]=a(o),Tt(e,this,c)}}function Rs(e,t){return t.length<2?e:Ei(e,ia(t,0,-1))}function Is(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var As=js(ea),Cs=pt||function(e,t){return mt.setTimeout(e,t)},Os=js(ta);function Ls(e,t,n){var i=t+"";return Os(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return It(g,(function(n){var i="_."+n[0];t&n[1]&&!Lt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(i),n)))}function js(e){var t=0,n=0;return function(){var a=bn(),s=16-(a-n);if(n=a,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Us(e,t){var n=-1,a=e.length,s=a-1;for(t=t===i?a:t;++n<t;){var r=Wi(n,s),o=e[r];e[r]=e[n],e[n]=o}return e.length=t,e}var Ps=function(e){var t=jr(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,n,i,a){t.push(i?a.replace(pe,"$1"):n||e)})),t}));function Fs(e){if("string"==typeof e||oo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ds(e){if(null!=e){try{return Ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ns(e){if(e instanceof Yn)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=Aa(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ms=Zi((function(e,t){return Gr(e)?di(e,yi(t,1,Gr,!0)):[]})),zs=Zi((function(e,t){var n=Ks(t);return Gr(n)&&(n=i),Gr(e)?di(e,yi(t,1,Gr,!0),cs(n,2)):[]})),Bs=Zi((function(e,t){var n=Ks(t);return Gr(n)&&(n=i),Gr(e)?di(e,yi(t,1,Gr,!0),i,n):[]}));function $s(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var a=null==n?0:mo(n);return a<0&&(a=_n(i+a,0)),Bt(e,cs(t,3),a)}function qs(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var s=a-1;return n!==i&&(s=mo(n),s=n<0?_n(a+s,0):vn(s,a-1)),Bt(e,cs(t,3),s,!0)}function Ys(e){return(null==e?0:e.length)?yi(e,1):[]}function Vs(e){return e&&e.length?e[0]:i}var Gs=Zi((function(e){var t=Ut(e,ya);return t.length&&t[0]===e[0]?Ai(t):[]})),Hs=Zi((function(e){var t=Ks(e),n=Ut(e,ya);return t===Ks(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Ai(n,cs(t,2)):[]})),Ws=Zi((function(e){var t=Ks(e),n=Ut(e,ya);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Ai(n,i,t):[]}));function Ks(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zs=Zi(Js);function Js(e,t){return e&&e.length&&t&&t.length?Gi(e,t):e}var Xs=ns((function(e,t){var n=null==e?0:e.length,i=ri(e,t);return Hi(e,Ut(t,(function(e){return _s(e,n)?+e:e})).sort(Ta)),i}));function Qs(e){return null==e?e:En.call(e)}var er=Zi((function(e){return ua(yi(e,1,Gr,!0))})),tr=Zi((function(e){var t=Ks(e);return Gr(t)&&(t=i),ua(yi(e,1,Gr,!0),cs(t,2))})),nr=Zi((function(e){var t=Ks(e);return t="function"==typeof t?t:i,ua(yi(e,1,Gr,!0),i,t)}));function ir(e){if(!e||!e.length)return[];var t=0;return e=Ot(e,(function(e){if(Gr(e))return t=_n(e.length,t),!0})),Zt(t,(function(t){return Ut(e,Gt(t))}))}function ar(e,t){if(!e||!e.length)return[];var n=ir(e);return null==t?n:Ut(n,(function(e){return Tt(t,i,e)}))}var sr=Zi((function(e,t){return Gr(e)?di(e,t):[]})),rr=Zi((function(e){return fa(Ot(e,Gr))})),or=Zi((function(e){var t=Ks(e);return Gr(t)&&(t=i),fa(Ot(e,Gr),cs(t,2))})),cr=Zi((function(e){var t=Ks(e);return t="function"==typeof t?t:i,fa(Ot(e,Gr),i,t)})),lr=Zi(ir);var ur=Zi((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ar(e,n)}));function dr(e){var t=zn(e);return t.__chain__=!0,t}function pr(e,t){return t(e)}var hr=ns((function(e){var t=e.length,n=t?e[0]:0,a=this.__wrapped__,s=function(t){return ri(t,e)};return!(t>1||this.__actions__.length)&&a instanceof Yn&&_s(n)?((a=a.slice(n,+n+(t?1:0))).__actions__.push({func:pr,args:[s],thisArg:i}),new qn(a,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(s)}));var mr=Oa((function(e,t,n){Pe.call(e,n)?++e[n]:si(e,n,1)}));var fr=Na($s),gr=Na(qs);function yr(e,t){return(qr(e)?It:pi)(e,cs(t,3))}function _r(e,t){return(qr(e)?At:hi)(e,cs(t,3))}var vr=Oa((function(e,t,n){Pe.call(e,n)?e[n].push(t):si(e,n,[t])}));var br=Zi((function(e,t,i){var a=-1,s="function"==typeof t,r=Vr(e)?n(e.length):[];return pi(e,(function(e){r[++a]=s?Tt(t,e,i):Ci(e,t,i)})),r})),wr=Oa((function(e,t,n){si(e,n,t)}));function xr(e,t){return(qr(e)?Ut:Mi)(e,cs(t,3))}var Er=Oa((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Sr=Zi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vs(e,t[0],t[1])?t=[]:n>2&&vs(t[0],t[1],t[2])&&(t=[t[0]]),Yi(e,yi(t,1),[])})),kr=lt||function(){return mt.Date.now()};function Tr(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Ja(e,u,i,i,i,i,t)}function Rr(e,t){var n;if("function"!=typeof t)throw new Ae(a);return e=mo(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ir=Zi((function(e,t,n){var i=1;if(n.length){var a=un(n,os(Ir));i|=c}return Ja(e,i,t,n,a)})),Ar=Zi((function(e,t,n){var i=3;if(n.length){var a=un(n,os(Ar));i|=c}return Ja(t,i,e,n,a)}));function Cr(e,t,n){var s,r,o,c,l,u,d=0,p=!1,h=!1,m=!0;if("function"!=typeof e)throw new Ae(a);function f(t){var n=s,a=r;return s=r=i,d=t,c=e.apply(a,n)}function g(e){var n=e-u;return u===i||n>=t||n<0||h&&e-d>=o}function y(){var e=kr();if(g(e))return _(e);l=Cs(y,function(e){var n=t-(e-u);return h?vn(n,o-(e-d)):n}(e))}function _(e){return l=i,m&&s?f(e):(s=r=i,c)}function v(){var e=kr(),n=g(e);if(s=arguments,r=this,u=e,n){if(l===i)return function(e){return d=e,l=Cs(y,t),p?f(e):c}(u);if(h)return xa(l),l=Cs(y,t),f(u)}return l===i&&(l=Cs(y,t)),c}return t=go(t)||0,Qr(n)&&(p=!!n.leading,o=(h="maxWait"in n)?_n(go(n.maxWait)||0,t):o,m="trailing"in n?!!n.trailing:m),v.cancel=function(){l!==i&&xa(l),d=0,s=u=r=l=i},v.flush=function(){return l===i?c:_(kr())},v}var Or=Zi((function(e,t){return ui(e,1,t)})),Lr=Zi((function(e,t,n){return ui(e,go(t)||0,n)}));function jr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(a);var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],s=n.cache;if(s.has(a))return s.get(a);var r=e.apply(this,i);return n.cache=s.set(a,r)||s,r};return n.cache=new(jr.Cache||Hn),n}function Ur(e){if("function"!=typeof e)throw new Ae(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}jr.Cache=Hn;var Pr=ba((function(e,t){var n=(t=1==t.length&&qr(t[0])?Ut(t[0],Xt(cs())):Ut(yi(t,1),Xt(cs()))).length;return Zi((function(i){for(var a=-1,s=vn(i.length,n);++a<s;)i[a]=t[a].call(this,i[a]);return Tt(e,this,i)}))})),Fr=Zi((function(e,t){var n=un(t,os(Fr));return Ja(e,c,i,t,n)})),Dr=Zi((function(e,t){var n=un(t,os(Dr));return Ja(e,l,i,t,n)})),Nr=ns((function(e,t){return Ja(e,d,i,i,i,t)}));function Mr(e,t){return e===t||e!=e&&t!=t}var zr=Ga(Ti),Br=Ga((function(e,t){return e>=t})),$r=Oi(function(){return arguments}())?Oi:function(e){return eo(e)&&Pe.call(e,"callee")&&!We.call(e,"callee")},qr=n.isArray,Yr=bt?Xt(bt):function(e){return eo(e)&&ki(e)==j};function Vr(e){return null!=e&&Xr(e.length)&&!Zr(e)}function Gr(e){return eo(e)&&Vr(e)}var Hr=_t||gc,Wr=wt?Xt(wt):function(e){return eo(e)&&ki(e)==b};function Kr(e){if(!eo(e))return!1;var t=ki(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!io(e)}function Zr(e){if(!Qr(e))return!1;var t=ki(e);return t==x||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Jr(e){return"number"==typeof e&&e==mo(e)}function Xr(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function Qr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eo(e){return null!=e&&"object"==typeof e}var to=xt?Xt(xt):function(e){return eo(e)&&ms(e)==S};function no(e){return"number"==typeof e||eo(e)&&ki(e)==k}function io(e){if(!eo(e)||ki(e)!=T)return!1;var t=Ge(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ue.call(n)==Me}var ao=Et?Xt(Et):function(e){return eo(e)&&ki(e)==I};var so=St?Xt(St):function(e){return eo(e)&&ms(e)==A};function ro(e){return"string"==typeof e||!qr(e)&&eo(e)&&ki(e)==C}function oo(e){return"symbol"==typeof e||eo(e)&&ki(e)==O}var co=kt?Xt(kt):function(e){return eo(e)&&Xr(e.length)&&!!ot[ki(e)]};var lo=Ga(Ni),uo=Ga((function(e,t){return e<=t}));function po(e){if(!e)return[];if(Vr(e))return ro(e)?mn(e):Aa(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=ms(e);return(t==S?cn:t==A?dn:zo)(e)}function ho(e){return e?(e=go(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function mo(e){var t=ho(e),n=t%1;return t==t?n?t-n:t:0}function fo(e){return e?oi(mo(e),0,f):0}function go(e){if("number"==typeof e)return e;if(oo(e))return m;if(Qr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=ge.test(e);return n||_e.test(e)?dt(e.slice(2),n?2:8):fe.test(e)?m:+e}function yo(e){return Ca(e,Lo(e))}function _o(e){return null==e?"":la(e)}var vo=La((function(e,t){if(Es(t)||Vr(t))Ca(t,Oo(t),e);else for(var n in t)Pe.call(t,n)&&ti(e,n,t[n])})),bo=La((function(e,t){Ca(t,Lo(t),e)})),wo=La((function(e,t,n,i){Ca(t,Lo(t),e,i)})),xo=La((function(e,t,n,i){Ca(t,Oo(t),e,i)})),Eo=ns(ri);var So=Zi((function(e,t){e=Te(e);var n=-1,a=t.length,s=a>2?t[2]:i;for(s&&vs(t[0],t[1],s)&&(a=1);++n<a;)for(var r=t[n],o=Lo(r),c=-1,l=o.length;++c<l;){var u=o[c],d=e[u];(d===i||Mr(d,Le[u])&&!Pe.call(e,u))&&(e[u]=r[u])}return e})),ko=Zi((function(e){return e.push(i,Qa),Tt(Uo,i,e)}));function To(e,t,n){var a=null==e?i:Ei(e,t);return a===i?n:a}function Ro(e,t){return null!=e&&fs(e,t,Ii)}var Io=Ba((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),e[t]=n}),ec(ic)),Ao=Ba((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),cs),Co=Zi(Ci);function Oo(e){return Vr(e)?Zn(e):Fi(e)}function Lo(e){return Vr(e)?Zn(e,!0):Di(e)}var jo=La((function(e,t,n){$i(e,t,n)})),Uo=La((function(e,t,n,i){$i(e,t,n,i)})),Po=ns((function(e,t){var n={};if(null==e)return n;var i=!1;t=Ut(t,(function(t){return t=va(t,e),i||(i=t.length>1),t})),Ca(e,as(e),n),i&&(n=ci(n,7,es));for(var a=t.length;a--;)da(n,t[a]);return n}));var Fo=ns((function(e,t){return null==e?{}:function(e,t){return Vi(e,t,(function(t,n){return Ro(e,n)}))}(e,t)}));function Do(e,t){if(null==e)return{};var n=Ut(as(e),(function(e){return[e]}));return t=cs(t),Vi(e,n,(function(e,n){return t(e,n[0])}))}var No=Za(Oo),Mo=Za(Lo);function zo(e){return null==e?[]:Qt(e,Oo(e))}var Bo=Fa((function(e,t,n){return t=t.toLowerCase(),e+(n?$o(t):t)}));function $o(e){return Zo(_o(e).toLowerCase())}function qo(e){return(e=_o(e))&&e.replace(be,an).replace(et,"")}var Yo=Fa((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Vo=Fa((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Go=Pa("toLowerCase");var Ho=Fa((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Wo=Fa((function(e,t,n){return e+(n?" ":"")+Zo(t)}));var Ko=Fa((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Zo=Pa("toUpperCase");function Jo(e,t,n){return e=_o(e),(t=n?i:t)===i?function(e){return at.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xo=Zi((function(e,t){try{return Tt(e,i,t)}catch(e){return Kr(e)?e:new Ee(e)}})),Qo=ns((function(e,t){return It(t,(function(t){t=Fs(t),si(e,t,Ir(e[t],e))})),e}));function ec(e){return function(){return e}}var tc=Ma(),nc=Ma(!0);function ic(e){return e}function ac(e){return Pi("function"==typeof e?e:ci(e,1))}var sc=Zi((function(e,t){return function(n){return Ci(n,e,t)}})),rc=Zi((function(e,t){return function(n){return Ci(e,n,t)}}));function oc(e,t,n){var i=Oo(t),a=xi(t,i);null!=n||Qr(t)&&(a.length||!i.length)||(n=t,t=e,e=this,a=xi(t,Oo(t)));var s=!(Qr(n)&&"chain"in n&&!n.chain),r=Zr(e);return It(a,(function(n){var i=t[n];e[n]=i,r&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__);return(n.__actions__=Aa(this.__actions__)).push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Pt([this.value()],arguments))})})),e}function cc(){}var lc=qa(Ut),uc=qa(Ct),dc=qa(Nt);function pc(e){return bs(e)?Gt(Fs(e)):function(e){return function(t){return Ei(t,e)}}(e)}var hc=Va(),mc=Va(!0);function fc(){return[]}function gc(){return!1}var yc=$a((function(e,t){return e+t}),0),_c=Wa("ceil"),vc=$a((function(e,t){return e/t}),1),bc=Wa("floor");var wc,xc=$a((function(e,t){return e*t}),1),Ec=Wa("round"),Sc=$a((function(e,t){return e-t}),0);return zn.after=function(e,t){if("function"!=typeof t)throw new Ae(a);return e=mo(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=Tr,zn.assign=vo,zn.assignIn=bo,zn.assignInWith=wo,zn.assignWith=xo,zn.at=Eo,zn.before=Rr,zn.bind=Ir,zn.bindAll=Qo,zn.bindKey=Ar,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qr(e)?e:[e]},zn.chain=dr,zn.chunk=function(e,t,a){t=(a?vs(e,t,a):t===i)?1:_n(mo(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var r=0,o=0,c=n(ht(s/t));r<s;)c[o++]=ia(e,r,r+=t);return c},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,a=[];++t<n;){var s=e[t];s&&(a[i++]=s)}return a},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),i=arguments[0],a=e;a--;)t[a-1]=arguments[a];return Pt(qr(i)?Aa(i):[i],yi(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=cs();return e=t?Ut(e,(function(e){if("function"!=typeof e[1])throw new Ae(a);return[n(e[0]),e[1]]})):[],Zi((function(n){for(var i=-1;++i<t;){var a=e[i];if(Tt(a[0],this,n))return Tt(a[1],this,n)}}))},zn.conforms=function(e){return function(e){var t=Oo(e);return function(n){return li(n,e,t)}}(ci(e,1))},zn.constant=ec,zn.countBy=mr,zn.create=function(e,t){var n=Bn(e);return null==t?n:ai(n,t)},zn.curry=function e(t,n,a){var s=Ja(t,8,i,i,i,i,i,n=a?i:n);return s.placeholder=e.placeholder,s},zn.curryRight=function e(t,n,a){var s=Ja(t,o,i,i,i,i,i,n=a?i:n);return s.placeholder=e.placeholder,s},zn.debounce=Cr,zn.defaults=So,zn.defaultsDeep=ko,zn.defer=Or,zn.delay=Lr,zn.difference=Ms,zn.differenceBy=zs,zn.differenceWith=Bs,zn.drop=function(e,t,n){var a=null==e?0:e.length;return a?ia(e,(t=n||t===i?1:mo(t))<0?0:t,a):[]},zn.dropRight=function(e,t,n){var a=null==e?0:e.length;return a?ia(e,0,(t=a-(t=n||t===i?1:mo(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?ha(e,cs(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?ha(e,cs(t,3),!0):[]},zn.fill=function(e,t,n,a){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&vs(e,t,n)&&(n=0,a=s),function(e,t,n,a){var s=e.length;for((n=mo(n))<0&&(n=-n>s?0:s+n),(a=a===i||a>s?s:mo(a))<0&&(a+=s),a=n>a?0:fo(a);n<a;)e[n++]=t;return e}(e,t,n,a)):[]},zn.filter=function(e,t){return(qr(e)?Ot:gi)(e,cs(t,3))},zn.flatMap=function(e,t){return yi(xr(e,t),1)},zn.flatMapDeep=function(e,t){return yi(xr(e,t),p)},zn.flatMapDepth=function(e,t,n){return n=n===i?1:mo(n),yi(xr(e,t),n)},zn.flatten=Ys,zn.flattenDeep=function(e){return(null==e?0:e.length)?yi(e,p):[]},zn.flattenDepth=function(e,t){return(null==e?0:e.length)?yi(e,t=t===i?1:mo(t)):[]},zn.flip=function(e){return Ja(e,512)},zn.flow=tc,zn.flowRight=nc,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var a=e[t];i[a[0]]=a[1]}return i},zn.functions=function(e){return null==e?[]:xi(e,Oo(e))},zn.functionsIn=function(e){return null==e?[]:xi(e,Lo(e))},zn.groupBy=vr,zn.initial=function(e){return(null==e?0:e.length)?ia(e,0,-1):[]},zn.intersection=Gs,zn.intersectionBy=Hs,zn.intersectionWith=Ws,zn.invert=Io,zn.invertBy=Ao,zn.invokeMap=br,zn.iteratee=ac,zn.keyBy=wr,zn.keys=Oo,zn.keysIn=Lo,zn.map=xr,zn.mapKeys=function(e,t){var n={};return t=cs(t,3),bi(e,(function(e,i,a){si(n,t(e,i,a),e)})),n},zn.mapValues=function(e,t){var n={};return t=cs(t,3),bi(e,(function(e,i,a){si(n,i,t(e,i,a))})),n},zn.matches=function(e){return zi(ci(e,1))},zn.matchesProperty=function(e,t){return Bi(e,ci(t,1))},zn.memoize=jr,zn.merge=jo,zn.mergeWith=Uo,zn.method=sc,zn.methodOf=rc,zn.mixin=oc,zn.negate=Ur,zn.nthArg=function(e){return e=mo(e),Zi((function(t){return qi(t,e)}))},zn.omit=Po,zn.omitBy=function(e,t){return Do(e,Ur(cs(t)))},zn.once=function(e){return Rr(2,e)},zn.orderBy=function(e,t,n,a){return null==e?[]:(qr(t)||(t=null==t?[]:[t]),qr(n=a?i:n)||(n=null==n?[]:[n]),Yi(e,t,n))},zn.over=lc,zn.overArgs=Pr,zn.overEvery=uc,zn.overSome=dc,zn.partial=Fr,zn.partialRight=Dr,zn.partition=Er,zn.pick=Fo,zn.pickBy=Do,zn.property=pc,zn.propertyOf=function(e){return function(t){return null==e?i:Ei(e,t)}},zn.pull=Zs,zn.pullAll=Js,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gi(e,t,cs(n,2)):e},zn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gi(e,t,i,n):e},zn.pullAt=Xs,zn.range=hc,zn.rangeRight=mc,zn.rearg=Nr,zn.reject=function(e,t){return(qr(e)?Ot:gi)(e,Ur(cs(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,a=[],s=e.length;for(t=cs(t,3);++i<s;){var r=e[i];t(r,i,e)&&(n.push(r),a.push(i))}return Hi(e,a),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Ae(a);return Zi(e,t=t===i?t:mo(t))},zn.reverse=Qs,zn.sampleSize=function(e,t,n){return t=(n?vs(e,t,n):t===i)?1:mo(t),(qr(e)?Xn:Xi)(e,t)},zn.set=function(e,t,n){return null==e?e:Qi(e,t,n)},zn.setWith=function(e,t,n,a){return a="function"==typeof a?a:i,null==e?e:Qi(e,t,n,a)},zn.shuffle=function(e){return(qr(e)?Qn:na)(e)},zn.slice=function(e,t,n){var a=null==e?0:e.length;return a?(n&&"number"!=typeof n&&vs(e,t,n)?(t=0,n=a):(t=null==t?0:mo(t),n=n===i?a:mo(n)),ia(e,t,n)):[]},zn.sortBy=Sr,zn.sortedUniq=function(e){return e&&e.length?oa(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?oa(e,cs(t,2)):[]},zn.split=function(e,t,n){return n&&"number"!=typeof n&&vs(e,t,n)&&(t=n=i),(n=n===i?f:n>>>0)?(e=_o(e))&&("string"==typeof t||null!=t&&!ao(t))&&!(t=la(t))&&on(e)?wa(mn(e),0,n):e.split(t,n):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Ae(a);return t=null==t?0:_n(mo(t),0),Zi((function(n){var i=n[t],a=wa(n,0,t);return i&&Pt(a,i),Tt(e,this,a)}))},zn.tail=function(e){var t=null==e?0:e.length;return t?ia(e,1,t):[]},zn.take=function(e,t,n){return e&&e.length?ia(e,0,(t=n||t===i?1:mo(t))<0?0:t):[]},zn.takeRight=function(e,t,n){var a=null==e?0:e.length;return a?ia(e,(t=a-(t=n||t===i?1:mo(t)))<0?0:t,a):[]},zn.takeRightWhile=function(e,t){return e&&e.length?ha(e,cs(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?ha(e,cs(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var i=!0,s=!0;if("function"!=typeof e)throw new Ae(a);return Qr(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),Cr(e,t,{leading:i,maxWait:t,trailing:s})},zn.thru=pr,zn.toArray=po,zn.toPairs=No,zn.toPairsIn=Mo,zn.toPath=function(e){return qr(e)?Ut(e,Fs):oo(e)?[e]:Aa(Ps(_o(e)))},zn.toPlainObject=yo,zn.transform=function(e,t,n){var i=qr(e),a=i||Hr(e)||co(e);if(t=cs(t,4),null==n){var s=e&&e.constructor;n=a?i?new s:[]:Qr(e)&&Zr(s)?Bn(Ge(e)):{}}return(a?It:bi)(e,(function(e,i,a){return t(n,e,i,a)})),n},zn.unary=function(e){return Tr(e,1)},zn.union=er,zn.unionBy=tr,zn.unionWith=nr,zn.uniq=function(e){return e&&e.length?ua(e):[]},zn.uniqBy=function(e,t){return e&&e.length?ua(e,cs(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ua(e,i,t):[]},zn.unset=function(e,t){return null==e||da(e,t)},zn.unzip=ir,zn.unzipWith=ar,zn.update=function(e,t,n){return null==e?e:pa(e,t,_a(n))},zn.updateWith=function(e,t,n,a){return a="function"==typeof a?a:i,null==e?e:pa(e,t,_a(n),a)},zn.values=zo,zn.valuesIn=function(e){return null==e?[]:Qt(e,Lo(e))},zn.without=sr,zn.words=Jo,zn.wrap=function(e,t){return Fr(_a(t),e)},zn.xor=rr,zn.xorBy=or,zn.xorWith=cr,zn.zip=lr,zn.zipObject=function(e,t){return ga(e||[],t||[],ti)},zn.zipObjectDeep=function(e,t){return ga(e||[],t||[],Qi)},zn.zipWith=ur,zn.entries=No,zn.entriesIn=Mo,zn.extend=bo,zn.extendWith=wo,oc(zn,zn),zn.add=yc,zn.attempt=Xo,zn.camelCase=Bo,zn.capitalize=$o,zn.ceil=_c,zn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=go(n))==n?n:0),t!==i&&(t=(t=go(t))==t?t:0),oi(go(e),t,n)},zn.clone=function(e){return ci(e,4)},zn.cloneDeep=function(e){return ci(e,5)},zn.cloneDeepWith=function(e,t){return ci(e,5,t="function"==typeof t?t:i)},zn.cloneWith=function(e,t){return ci(e,4,t="function"==typeof t?t:i)},zn.conformsTo=function(e,t){return null==t||li(e,t,Oo(t))},zn.deburr=qo,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=vc,zn.endsWith=function(e,t,n){e=_o(e),t=la(t);var a=e.length,s=n=n===i?a:oi(mo(n),0,a);return(n-=t.length)>=0&&e.slice(n,s)==t},zn.eq=Mr,zn.escape=function(e){return(e=_o(e))&&Z.test(e)?e.replace(W,sn):e},zn.escapeRegExp=function(e){return(e=_o(e))&&ae.test(e)?e.replace(ie,"\\$&"):e},zn.every=function(e,t,n){var a=qr(e)?Ct:mi;return n&&vs(e,t,n)&&(t=i),a(e,cs(t,3))},zn.find=fr,zn.findIndex=$s,zn.findKey=function(e,t){return zt(e,cs(t,3),bi)},zn.findLast=gr,zn.findLastIndex=qs,zn.findLastKey=function(e,t){return zt(e,cs(t,3),wi)},zn.floor=bc,zn.forEach=yr,zn.forEachRight=_r,zn.forIn=function(e,t){return null==e?e:_i(e,cs(t,3),Lo)},zn.forInRight=function(e,t){return null==e?e:vi(e,cs(t,3),Lo)},zn.forOwn=function(e,t){return e&&bi(e,cs(t,3))},zn.forOwnRight=function(e,t){return e&&wi(e,cs(t,3))},zn.get=To,zn.gt=zr,zn.gte=Br,zn.has=function(e,t){return null!=e&&fs(e,t,Ri)},zn.hasIn=Ro,zn.head=Vs,zn.identity=ic,zn.includes=function(e,t,n,i){e=Vr(e)?e:zo(e),n=n&&!i?mo(n):0;var a=e.length;return n<0&&(n=_n(a+n,0)),ro(e)?n<=a&&e.indexOf(t,n)>-1:!!a&&$t(e,t,n)>-1},zn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var a=null==n?0:mo(n);return a<0&&(a=_n(i+a,0)),$t(e,t,a)},zn.inRange=function(e,t,n){return t=ho(t),n===i?(n=t,t=0):n=ho(n),function(e,t,n){return e>=vn(t,n)&&e<_n(t,n)}(e=go(e),t,n)},zn.invoke=Co,zn.isArguments=$r,zn.isArray=qr,zn.isArrayBuffer=Yr,zn.isArrayLike=Vr,zn.isArrayLikeObject=Gr,zn.isBoolean=function(e){return!0===e||!1===e||eo(e)&&ki(e)==v},zn.isBuffer=Hr,zn.isDate=Wr,zn.isElement=function(e){return eo(e)&&1===e.nodeType&&!io(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Vr(e)&&(qr(e)||"string"==typeof e||"function"==typeof e.splice||Hr(e)||co(e)||$r(e)))return!e.length;var t=ms(e);if(t==S||t==A)return!e.size;if(Es(e))return!Fi(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Li(e,t)},zn.isEqualWith=function(e,t,n){var a=(n="function"==typeof n?n:i)?n(e,t):i;return a===i?Li(e,t,i,n):!!a},zn.isError=Kr,zn.isFinite=function(e){return"number"==typeof e&&vt(e)},zn.isFunction=Zr,zn.isInteger=Jr,zn.isLength=Xr,zn.isMap=to,zn.isMatch=function(e,t){return e===t||ji(e,t,us(t))},zn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,ji(e,t,us(t),n)},zn.isNaN=function(e){return no(e)&&e!=+e},zn.isNative=function(e){if(xs(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ui(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=no,zn.isObject=Qr,zn.isObjectLike=eo,zn.isPlainObject=io,zn.isRegExp=ao,zn.isSafeInteger=function(e){return Jr(e)&&e>=-9007199254740991&&e<=h},zn.isSet=so,zn.isString=ro,zn.isSymbol=oo,zn.isTypedArray=co,zn.isUndefined=function(e){return e===i},zn.isWeakMap=function(e){return eo(e)&&ms(e)==L},zn.isWeakSet=function(e){return eo(e)&&"[object WeakSet]"==ki(e)},zn.join=function(e,t){return null==e?"":Mt.call(e,t)},zn.kebabCase=Yo,zn.last=Ks,zn.lastIndexOf=function(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var s=a;return n!==i&&(s=(s=mo(n))<0?_n(a+s,0):vn(s,a-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,s):Bt(e,Yt,s,!0)},zn.lowerCase=Vo,zn.lowerFirst=Go,zn.lt=lo,zn.lte=uo,zn.max=function(e){return e&&e.length?fi(e,ic,Ti):i},zn.maxBy=function(e,t){return e&&e.length?fi(e,cs(t,2),Ti):i},zn.mean=function(e){return Vt(e,ic)},zn.meanBy=function(e,t){return Vt(e,cs(t,2))},zn.min=function(e){return e&&e.length?fi(e,ic,Ni):i},zn.minBy=function(e,t){return e&&e.length?fi(e,cs(t,2),Ni):i},zn.stubArray=fc,zn.stubFalse=gc,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=xc,zn.nth=function(e,t){return e&&e.length?qi(e,mo(t)):i},zn.noConflict=function(){return mt._===this&&(mt._=ze),this},zn.noop=cc,zn.now=kr,zn.pad=function(e,t,n){e=_o(e);var i=(t=mo(t))?hn(e):0;if(!t||i>=t)return e;var a=(t-i)/2;return Ya(ft(a),n)+e+Ya(ht(a),n)},zn.padEnd=function(e,t,n){e=_o(e);var i=(t=mo(t))?hn(e):0;return t&&i<t?e+Ya(t-i,n):e},zn.padStart=function(e,t,n){e=_o(e);var i=(t=mo(t))?hn(e):0;return t&&i<t?Ya(t-i,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(_o(e).replace(se,""),t||0)},zn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&vs(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ho(e),t===i?(t=e,e=0):t=ho(t)),e>t){var a=e;e=t,t=a}if(n||e%1||t%1){var s=xn();return vn(e+s*(t-e+ut("1e-"+((s+"").length-1))),t)}return Wi(e,t)},zn.reduce=function(e,t,n){var i=qr(e)?Ft:Wt,a=arguments.length<3;return i(e,cs(t,4),n,a,pi)},zn.reduceRight=function(e,t,n){var i=qr(e)?Dt:Wt,a=arguments.length<3;return i(e,cs(t,4),n,a,hi)},zn.repeat=function(e,t,n){return t=(n?vs(e,t,n):t===i)?1:mo(t),Ki(_o(e),t)},zn.replace=function(){var e=arguments,t=_o(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,n){var a=-1,s=(t=va(t,e)).length;for(s||(s=1,e=i);++a<s;){var r=null==e?i:e[Fs(t[a])];r===i&&(a=s,r=n),e=Zr(r)?r.call(e):r}return e},zn.round=Ec,zn.runInContext=e,zn.sample=function(e){return(qr(e)?Jn:Ji)(e)},zn.size=function(e){if(null==e)return 0;if(Vr(e))return ro(e)?hn(e):e.length;var t=ms(e);return t==S||t==A?e.size:Fi(e).length},zn.snakeCase=Ho,zn.some=function(e,t,n){var a=qr(e)?Nt:aa;return n&&vs(e,t,n)&&(t=i),a(e,cs(t,3))},zn.sortedIndex=function(e,t){return sa(e,t)},zn.sortedIndexBy=function(e,t,n){return ra(e,t,cs(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=sa(e,t);if(i<n&&Mr(e[i],t))return i}return-1},zn.sortedLastIndex=function(e,t){return sa(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return ra(e,t,cs(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=sa(e,t,!0)-1;if(Mr(e[n],t))return n}return-1},zn.startCase=Wo,zn.startsWith=function(e,t,n){return e=_o(e),n=null==n?0:oi(mo(n),0,e.length),t=la(t),e.slice(n,n+t.length)==t},zn.subtract=Sc,zn.sum=function(e){return e&&e.length?Kt(e,ic):0},zn.sumBy=function(e,t){return e&&e.length?Kt(e,cs(t,2)):0},zn.template=function(e,t,n){var a=zn.templateSettings;n&&vs(e,t,n)&&(t=i),e=_o(e),t=wo({},t,a,Xa);var s,r,o=wo({},t.imports,a.imports,Xa),c=Oo(o),l=Qt(o,c),u=0,d=t.interpolate||we,p="__p += '",h=Re((t.escape||we).source+"|"+d.source+"|"+(d===Q?he:we).source+"|"+(t.evaluate||we).source+"|$","g"),m="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(h,(function(t,n,i,a,o,c){return i||(i=a),p+=e.slice(u,c).replace(xe,rn),n&&(s=!0,p+="' +\n__e("+n+") +\n'"),o&&(r=!0,p+="';\n"+o+";\n__p += '"),i&&(p+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),p+="';\n";var f=Pe.call(t,"variable")&&t.variable;if(f){if(de.test(f))throw new Ee("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(r?p.replace(Y,""):p).replace(V,"$1").replace(G,"$1;"),p="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(r?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xo((function(){return Se(c,m+"return "+p).apply(i,l)}));if(g.source=p,Kr(g))throw g;return g},zn.times=function(e,t){if((e=mo(e))<1||e>h)return[];var n=f,i=vn(e,f);t=cs(t),e-=f;for(var a=Zt(i,t);++n<e;)t(n);return a},zn.toFinite=ho,zn.toInteger=mo,zn.toLength=fo,zn.toLower=function(e){return _o(e).toLowerCase()},zn.toNumber=go,zn.toSafeInteger=function(e){return e?oi(mo(e),-9007199254740991,h):0===e?e:0},zn.toString=_o,zn.toUpper=function(e){return _o(e).toUpperCase()},zn.trim=function(e,t,n){if((e=_o(e))&&(n||t===i))return Jt(e);if(!e||!(t=la(t)))return e;var a=mn(e),s=mn(t);return wa(a,tn(a,s),nn(a,s)+1).join("")},zn.trimEnd=function(e,t,n){if((e=_o(e))&&(n||t===i))return e.slice(0,fn(e)+1);if(!e||!(t=la(t)))return e;var a=mn(e);return wa(a,0,nn(a,mn(t))+1).join("")},zn.trimStart=function(e,t,n){if((e=_o(e))&&(n||t===i))return e.replace(se,"");if(!e||!(t=la(t)))return e;var a=mn(e);return wa(a,tn(a,mn(t))).join("")},zn.truncate=function(e,t){var n=30,a="...";if(Qr(t)){var s="separator"in t?t.separator:s;n="length"in t?mo(t.length):n,a="omission"in t?la(t.omission):a}var r=(e=_o(e)).length;if(on(e)){var o=mn(e);r=o.length}if(n>=r)return e;var c=n-hn(a);if(c<1)return a;var l=o?wa(o,0,c).join(""):e.slice(0,c);if(s===i)return l+a;if(o&&(c+=l.length-c),ao(s)){if(e.slice(c).search(s)){var u,d=l;for(s.global||(s=Re(s.source,_o(me.exec(s))+"g")),s.lastIndex=0;u=s.exec(d);)var p=u.index;l=l.slice(0,p===i?c:p)}}else if(e.indexOf(la(s),c)!=c){var h=l.lastIndexOf(s);h>-1&&(l=l.slice(0,h))}return l+a},zn.unescape=function(e){return(e=_o(e))&&K.test(e)?e.replace(H,gn):e},zn.uniqueId=function(e){var t=++Fe;return _o(e)+t},zn.upperCase=Ko,zn.upperFirst=Zo,zn.each=yr,zn.eachRight=_r,zn.first=Vs,oc(zn,(wc={},bi(zn,(function(e,t){Pe.call(zn.prototype,t)||(wc[t]=e)})),wc),{chain:!1}),zn.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){zn[e].placeholder=zn})),It(["drop","take"],(function(e,t){Yn.prototype[e]=function(n){n=n===i?1:_n(mo(n),0);var a=this.__filtered__&&!t?new Yn(this):this.clone();return a.__filtered__?a.__takeCount__=vn(n,a.__takeCount__):a.__views__.push({size:vn(n,f),type:e+(a.__dir__<0?"Right":"")}),a},Yn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Yn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:cs(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),It(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Yn.prototype[e]=function(){return this[n](1).value()[0]}})),It(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Yn.prototype[e]=function(){return this.__filtered__?new Yn(this):this[n](1)}})),Yn.prototype.compact=function(){return this.filter(ic)},Yn.prototype.find=function(e){return this.filter(e).head()},Yn.prototype.findLast=function(e){return this.reverse().find(e)},Yn.prototype.invokeMap=Zi((function(e,t){return"function"==typeof e?new Yn(this):this.map((function(n){return Ci(n,e,t)}))})),Yn.prototype.reject=function(e){return this.filter(Ur(cs(e)))},Yn.prototype.slice=function(e,t){e=mo(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Yn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=mo(t))<0?n.dropRight(-t):n.take(t-e)),n)},Yn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Yn.prototype.toArray=function(){return this.take(f)},bi(Yn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),s=zn[a?"take"+("last"==t?"Right":""):t],r=a||/^find/.test(t);s&&(zn.prototype[t]=function(){var t=this.__wrapped__,o=a?[1]:arguments,c=t instanceof Yn,l=o[0],u=c||qr(t),d=function(e){var t=s.apply(zn,Pt([e],o));return a&&p?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var p=this.__chain__,h=!!this.__actions__.length,m=r&&!p,f=c&&!h;if(!r&&u){t=f?t:new Yn(this);var g=e.apply(t,o);return g.__actions__.push({func:pr,args:[d],thisArg:i}),new qn(g,p)}return m&&f?e.apply(this,o):(g=this.thru(d),m?a?g.value()[0]:g.value():g)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var a=this.value();return t.apply(qr(a)?a:[],e)}return this[n]((function(n){return t.apply(qr(n)?n:[],e)}))}})),bi(Yn.prototype,(function(e,t){var n=zn[t];if(n){var i=n.name+"";Pe.call(On,i)||(On[i]=[]),On[i].push({name:t,func:n})}})),On[za(i,2).name]=[{name:"wrapper",func:i}],Yn.prototype.clone=function(){var e=new Yn(this.__wrapped__);return e.__actions__=Aa(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Aa(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Aa(this.__views__),e},Yn.prototype.reverse=function(){if(this.__filtered__){var e=new Yn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Yn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qr(e),i=t<0,a=n?e.length:0,s=function(e,t,n){var i=-1,a=n.length;for(;++i<a;){var s=n[i],r=s.size;switch(s.type){case"drop":e+=r;break;case"dropRight":t-=r;break;case"take":t=vn(t,e+r);break;case"takeRight":e=_n(e,t-r)}}return{start:e,end:t}}(0,a,this.__views__),r=s.start,o=s.end,c=o-r,l=i?o:r-1,u=this.__iteratees__,d=u.length,p=0,h=vn(c,this.__takeCount__);if(!n||!i&&a==c&&h==c)return ma(e,this.__actions__);var m=[];e:for(;c--&&p<h;){for(var f=-1,g=e[l+=t];++f<d;){var y=u[f],_=y.iteratee,v=y.type,b=_(g);if(2==v)g=b;else if(!b){if(1==v)continue e;break e}}m[p++]=g}return m},zn.prototype.at=hr,zn.prototype.chain=function(){return dr(this)},zn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===i&&(this.__values__=po(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var a=Ns(n);a.__index__=0,a.__values__=i,t?s.__wrapped__=a:t=a;var s=a;n=n.__wrapped__}return s.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Yn){var t=e;return this.__actions__.length&&(t=new Yn(this)),(t=t.reverse()).__actions__.push({func:pr,args:[Qs],thisArg:i}),new qn(t,this.__chain__)}return this.thru(Qs)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return ma(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Je&&(zn.prototype[Je]=function(){return this}),zn}();gt?((gt.exports=yn)._=yn,ft._=yn):mt._=yn}).call(n)}(_d,_d.exports);var vd=_d.exports;const bd={type:W,stimulus:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?Mt.audio[vd.camelCase("introductionNs")]:Mt.audio[vd.camelCase("introduction")],prompt:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?`\n <div class = "jspsych-content-modified">\n <div class="container">\n <img src="${Mt.images.academyBackground}" alt= "background" style="width:100%;"> \n </div>\n <div class="text-block">\n <h3> ${Ue.t("introduction.intro.text1")} </h3>\n <p> ${Ue.t("introduction.intro.text2")} </p> \n <p> ${Ue.t("introduction.intro.text3")} </p>\n </div>\n ${Dt?"":`<div class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})} </div>`}\n </div>\n `:`\n <div class = "jspsych-content-modified">\n <div class="container">\n <img src="${Mt.images.academyBackground}" alt= "background" style="width:100%;"> \n </div>\n <div class="text-block">\n <h3> ${Ue.t("introduction.intro.text4")} </h3>\n <p> ${Ue.t("introduction.intro.text5")} </p> \n <p> ${Ue.t("introduction.intro.text6")} </p> \n <p> ${Ue.t("introduction.intro.text3")} </p>\n </div>\n ${Dt?"":`<div class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})} </div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>Dt?`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.continue")}`})} </button>`:"",on_start:()=>document.body.style.cursor="none"},wd={timeline:[{type:W,stimulus:()=>Mt.audio.postPracticeInstruction,prompt:()=>`\n <div class="jspsych-content-modified" id="sre-background">\n <h3>${Ue.t("practice.postPracticeIntro.text1")}</h3>\n <p>${Ue.t("practice.postPracticeIntro.text2")}</p>\n <p>${Ue.t("practice.postPracticeIntro.text3")}</p>\n <p>${Ue.t("practice.postPracticeIntro.text4")}</p>\n <p>${Ue.t("practice.postPracticeIntro.text5")}</p>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})}</div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>Dt?`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.continue")}`})} </button>`:""},{type:W,stimulus:()=>Mt.audio.postPracticeReminder,prompt:()=>`\n <div class="jspsych-content-modified" id="sre-background">\n <h2>Remember!</h2>\n <div class="row">\n <div class="column_2_lower" style="background-color:#FFFFFF;">\n <p style = "text-align:center;"> ${Ue.t(Dt?"practice.postPracticeReminder.text1Mobile":"practice.postPracticeReminder.text1")} </p>\n <img width="70%" src="${Mt.images.falseKey}" alt="arrow keys">\n </div>\n <div class="column_2_lower" style="background-color:#FFFFFF;">\n <p style = "text-align:center;"> ${Ue.t(Dt?"practice.postPracticeReminder.text2Mobile":"practice.postPracticeReminder.text2")} </p>\n <img width="70%" src="${Mt.images.trueKey}" alt="arrow keys">\n </div>\n </div>\n <p><b> ${Ue.t("practice.postPracticeReminder.text3")} </b></p>\n <p><b> ${Ue.t("practice.postPracticeReminder.text4")} </b></p>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.begin")}`})} </div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>Dt?`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.begin")}`})} </button>`:"",on_finish:e=>{s.session.set("indexTracking",0)}}]},xd={name:"html-multi-response",parameters:{stimulus:{type:d.HTML_STRING,pretty_name:"Stimulus",default:void 0},button_choices:{type:d.STRING,pretty_name:"Button Choices",default:[],array:!0},keyboard_choices:{type:d.KEYS,pretty_name:"Keyboard Choices",default:"NO_KEYS"},button_html:{type:d.HTML_STRING,pretty_name:"Button HTML",default:'<button class="jspsych-btn">%choice%</button>',array:!0},prompt:{type:d.HTML_STRING,pretty_name:"Prompt",default:null},stimulus_duration:{type:d.INT,pretty_name:"Stimulus duration",default:null},trial_duration:{type:d.INT,pretty_name:"Trial duration",default:null},margin_vertical:{type:d.STRING,pretty_name:"Margin vertical",default:"0px"},margin_horizontal:{type:d.STRING,pretty_name:"Margin horizontal",default:"8px"},response_ends_trial:{type:d.BOOL,pretty_name:"Response ends trial",default:!0}}};class Ed{constructor(e){this.jsPsych=e}trial(e,t){var n='<div id="jspsych-html-multi-response-stimulus">'+t.stimulus+"</div>",i=[];if(Array.isArray(t.button_html))t.button_html.length==t.button_choices.length?i=t.button_html:console.error("Error in html-multi-response plugin. The length of the button_html array does not equal the length of the button_choices array");else for(var a=0;a<t.button_choices.length;a++)i.push(t.button_html);n+='<div id="jspsych-html-multi-response-btngroup">';for(a=0;a<t.button_choices.length;a++){var s=i[a].replace(/%choice%/g,t.button_choices[a]);n+='<div class="jspsych-html-multi-response-button" style="display: inline-block; margin:'+t.margin_vertical+" "+t.margin_horizontal+'" id="jspsych-html-multi-response-button-'+a+'" data-choice="'+a+'">'+s+"</div>"}n+="</div>",null!==t.prompt&&(n+=t.prompt),e.innerHTML=n;if("NO_KEYS"!=t.keyboard_choices)var r=this.jsPsych.pluginAPI.getKeyboardResponse({callback_function:function(n){e.querySelector("#jspsych-html-multi-response-stimulus").className+=" responded",null==c.key&&(c=Object.assign({source:"keyboard",button:null},n)),t.response_ends_trial&&l()},valid_responses:t.keyboard_choices,rt_method:"performance",persist:!1,allow_held_key:!1});var o=performance.now();for(a=0;a<t.button_choices.length;a++)e.querySelector("#jspsych-html-multi-response-button-"+a).addEventListener("click",(e=>{u(e.currentTarget.getAttribute("data-choice"))}));var c={rt:null,button:null,key:null,source:null};const l=()=>{this.jsPsych.pluginAPI.clearAllTimeouts(),void 0!==r&&this.jsPsych.pluginAPI.cancelKeyboardResponse(r);var n={rt:c.rt,stimulus:t.stimulus,button_response:c.button,keyboard_response:c.key,response_source:c.source};e.innerHTML="",this.jsPsych.finishTrial(n)};function u(n){var i=performance.now(),a=Math.round(i-o);c.button=parseInt(n),c.rt=a,c.source="button",e.querySelector("#jspsych-html-multi-response-stimulus").className+=" responded";for(var s=document.querySelectorAll(".jspsych-html-multi-response-button button"),r=0;r<s.length;r++)s[r].setAttribute("disabled","disabled");t.response_ends_trial&&l()}null!==t.stimulus_duration&&this.jsPsych.pluginAPI.setTimeout((()=>{e.querySelector("#jspsych-html-multi-response-stimulus").style.visibility="hidden"}),t.stimulus_duration),null!==t.trial_duration&&this.jsPsych.pluginAPI.setTimeout(l,t.trial_duration)}simulate(e,t,n,i){"data-only"==t&&(i(),this.simulate_data_only(e,n)),"visual"==t&&this.simulate_visual(e,n,i)}create_simulation_data(e,t){const n={stimulus:e.stimulus,rt:this.jsPsych.randomization.sampleExGaussian(500,50,1/150,!0),keyboard_response:this.jsPsych.pluginAPI.getValidKey(e.keyboard_choices),button_response:null,response_source:"keyboard"},i={stimulus:e.stimulus,rt:this.jsPsych.randomization.sampleExGaussian(500,50,1/150,!0),button_response:this.jsPsych.randomization.randomInt(0,e.button_choices.length-1),keyboard_response:null,response_source:"button"},a=Math.random()<.5?n:i,s=this.jsPsych.pluginAPI.mergeSimulationData(a,t);return this.jsPsych.pluginAPI.ensureSimulationDataConsistency(e,s),s}simulate_data_only(e,t){const n=this.create_simulation_data(e,t);this.jsPsych.finishTrial(n)}simulate_visual(e,t,n){const i=this.create_simulation_data(e,t),a=this.jsPsych.getDisplayElement();this.trial(a,e),n(),null!==i.rt&&(null!==i.button_response?this.jsPsych.pluginAPI.clickTarget(a.querySelector(`div[data-choice="${i.button_response}"] button`),i.rt):this.jsPsych.pluginAPI.pressKey(i.keyboard_response,i.rt))}}Ed.info=xd,d.HTML_STRING,d.KEYS,d.HTML_STRING,d.INT,d.INT,d.BOOL;const Sd={type:W,stimulus:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?Mt.audio[vd.camelCase("halfwayNs")]:s.session.get("config").story?Mt.audio[vd.camelCase(`${s.session("character")}Halfway`)]:void 0,prompt:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?`\n <div class="jspsych-content-modified">\n <div class="container">\n <img src="${Mt.images.classroomBackground}" alt= "background" style="width:100%;"> \n </div>\n <div class="text-block">\n <h3> ${Ue.t("gameBreak.halfwayScreen.text1")} </h3>\n <p> ${Ue.t("gameBreak.halfwayScreen.text2")} </p>\n </div>\n ${Dt?"":`<div class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})} </div>`}\n </div>\n `:`\n <div class="jspsych-content-modified" id="sre-background">\n <div class="row">\n <div class="column_1">\n <img class="characterleft" src="${Mt.images[vd.camelCase(`${s.session("character")}Talking`)]}" alt="animation of student talking">\n </div>\n <div class= "column_3 halfway-text-block">\n <div class="middle">\n <p> ${Ue.t("gameBreak.halfwayScreen.text3")}</p>\n <p> ${Ue.t("gameBreak.halfwayScreen.text4")}</p>\n </div>\n </div>\n </div>\n ${Dt?"":`<div class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})} </div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.continue")}`})} </button>`,on_finish:e=>{s.session.set("indexTracking",0)}},kd={timeline:[{type:W,stimulus:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?Mt.audio[vd.camelCase("endNs")]:s.session.get("config").story?Mt.audio[vd.camelCase(`${s.session("character")}End`)]:void 0,prompt:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?`\n <div class="jspsych-content-modified">\n <div class="container">\n <img src="${Mt.images.academyBackground}" alt= "background" style="width:100%;"> \n </div>\n <div class="text-block">\n <h3> ${Ue.t("gameBreak.endScreen.text1")} </h3>\n <p> ${Ue.t("gameBreak.endScreen.text2")} </p> \n </div>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.save")}`})}</div>`}\n </div>\n `:`\n <div class="jspsych-content-modified">\n <div class="class-container">\n <img src="${Mt.images.classroomBackground}" alt= "classroom" style="width:100%;"> \n </div>\n <div class="upper">\n <div class="select-text-block"> <span style="font-weight:bold; white-space:nowrap">\n <h3> ${Ue.t("gameBreak.endScreen.text3")} </h3>\n <p> ${s.session("character_name")} ${Ue.t("gameBreak.endScreen.text4")} </p> \n </div>\n </div>\n <div class="student" id="end-student">\n <img src="${Mt.images[vd.camelCase(`${s.session("character")}Happy`)]}" alt= "character is happy"> \n </div>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.save")}`})}</div>`}\n </div>\n `,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.save")}`})} </button>`,data:{save_trial:!1}},{timeline:[{type:Ed,stimulus:()=>`<div class="jspsych-content-modified">\n <div class="container">\n <img src="${Mt.images.academyBackground}" alt= "background" style="width:100%;"> </div>\n <div class="demo-text-block">\n <h3>${Ue.t("gameBreak.debrief.text1")}</h3>\n <p>${Ue.t("gameBreak.debrief.text2")}</p>\n </div>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.close")}`})}</div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.close")}`})} </button>`}],conditional_function:()=>"demo"===s.session.get("config").userMode},{type:Z,fullscreen_mode:!1,delay_after:0}]},Td={1:{character:"dog",characterName:"Amy",characterActivity:"go to track practice"},2:{character:"cat",characterName:"Carson",characterActivity:"go to debate club"},3:{character:"bird",characterName:"Jaiden",characterActivity:"hang out with my friends"},4:{character:"deer",characterName:"Dylan",characterActivity:"volunteer at the soup kitchen"}},Rd=[1,2,3,4],Id=["dog","cat","bird","deer"],Ad={timeline:[{type:W,stimulus:()=>Mt.audio.studentSelect,prompt:()=>Dt?`\n <div>\n <img id="mobile-classroom-bg" src=${Mt.images.classroomBackground} alt="background"/>\n <h3>${Ue.t("characterSelect.studentSelect.paragraph1")}</h3>\n <p> ${Ue.t(Dt?"characterSelect.studentSelect.paragraph2Mobile":"characterSelect.studentSelect.paragraph2")} </p>\n </div>`:` \n <div class="jspsych-content-modified">\n <div class="class-container">\n <img id="classroom-bg" src=${Mt.images.classroomBackground} alt="background"> \n </div> \n <div class="upper">\n <div class="select-text-block"> <span style="font-weight:bold; white-space:nowrap">\n <h3>${Ue.t("characterSelect.studentSelect.paragraph1")}</h3>\n <p> ${Ue.t(Dt?"characterSelect.studentSelect.paragraph2Mobile":"characterSelect.studentSelect.paragraph2")} </p> \n </div>\n </div>\n ${Dt?"":`<div class="number">${Rd.map((e=>`<div class="number-block"><n>${e}</n></div>`)).join("")}</div>`}\n <div class="student ${Dt?"mobile-student-select-characters":""}">\n ${Id.map((e=>`<img src=${Mt.images[e]} alt=${e}>`)).join("")}\n </div>\n <div class="button">\n ${Ue.t("navigation.studentSelect")} \n </div>\n </div>\n `,keyboard_choices:()=>Dt?"NO_KEYS":["1","2","3","4"],button_choices:()=>Dt?["1","2","3","4"]:[],button_html:()=>'<button class="grade-btn">%choice%</button>',prompt_above_buttons:()=>Dt,data:{save_trial:!1},on_load:()=>{if(Dt){document.getElementById("jspsych-audio-multi-response-btngroup").classList.add("mobile-audio-btn-container");const e=document.getElementById("jspsych-content");if(e){const t=document.createElement("div"),n=document.createTextNode(Ue.t("characterSelect.studentSelect.paragraph3MobileBefore")),i=document.createTextNode(Ue.t("characterSelect.studentSelect.paragraph3MobileAfter")),a=document.createElement("span");a.classList.add("yellow"),a.textContent=Ue.t("characterSelect.studentSelect.paragraph3MobileSpan"),t.appendChild(n),t.appendChild(a),t.appendChild(i),t.classList.add("button");const s=document.createElement("div"),r=Id.map((e=>{const t=document.createElement("img");return t.setAttribute("src",Mt.images[e]),t.setAttribute("alt",e),t.classList.add("mobile-character-select"),t}));for(const e of r)s.appendChild(e);e.appendChild(s),e.appendChild(t)}}},on_finish:e=>{s.session.set("character",Td[Dt?e.button_response+1:e.keyboard_response].character),s.session.set("character_name",Td[Dt?e.button_response+1:e.keyboard_response].characterName),s.session.set("character_activity",Td[Dt?e.button_response+1:e.keyboard_response].characterActivity)}},{type:W,stimulus:()=>Mt.audio[vd.camelCase(`${s.session("character")}Intro`)],prompt:()=>`\n <div class="jspsych-content-modified" id="sre-background">\n <div class="row">\n <div class="column_1">\n <img class="characterleft" src="${Mt.images[vd.camelCase(`${s.session("character")}Talking`)]}" alt="animation of student talking">\n </div>\n <div class= "column_3 student-text-block">\n <div class="middle">\n <p> ${Ue.t("characterSelect.studentIntro.paragraph1")} ${s.session("character_name")}. </p>\n <p> ${Ue.t("characterSelect.studentIntro.paragraph2")} ${s.session("character_activity")}. </p>\n <p> ${Ue.t("characterSelect.studentIntro.paragraph3")} </p>\n </div>\n </div>\n </div>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})}</div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.continue")}`})} </button>`}],conditional_function:()=>!(!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6)},Cd=(e,t)=>({timeline:[{type:Ed,stimulus:()=>{if(0===s.session("indexTracking")){const t=setTimeout((()=>s.session.set("timeOut",!0)),18e4);s.session.set("timerId",t),"tosrec"!==e?s.session.set("currentCorpus",pd[e]):s.session.set("currentCorpus",pd[s.session("tosrecCorpusId")])}return Dt?`\n <p id="mobile-stimulus">${s.session("currentCorpus")[s.session("indexTracking")].sentence}</p>\n `:`\n <div class=stimulus_div>\n <p class='stimulus'>${s.session("currentCorpus")[s.session("indexTracking")].sentence}</p>\n </div>`},prompt:()=>{if(!Dt)return`\n <div> \n <img class="lower" src="${Mt.images.roarSreKeyboard}" alt="arrow keys"> \n </div>`},keyboard_choices:()=>Dt?"NO_KEYS":["ArrowLeft","ArrowRight"],button_choices:()=>Dt?[Ue.t("terms.false")[0].toUpperCase(),Ue.t("terms.true")[0].toUpperCase()]:[],button_html:()=>Dt?[`<button id="mobile-stimulus-btn-left" class="mobile-stimulus-btn"><img src=${Mt.images.leftArrowBlankShort} alt=${Ue.t("terms.false")}/><span>${Ue.t("terms.false")[0].toLocaleUpperCase()}</span></button>`,`<button id="mobile-stimulus-btn-right" class="mobile-stimulus-btn"><img src=${Mt.images.rightArrowBlankShort} alt=${Ue.t("terms.true")}/><span>${Ue.t("terms.true")[0].toLocaleUpperCase()}</span></button>`]:[],on_load:()=>{if(Dt){document.body.style.display="flex",document.body.style.justifyContent="center",document.body.style.alignContent="center";document.querySelector(".jspsych-content-wrapper").classList.add("mobile-stimulus-wrap");document.getElementById("jspsych-content").classList.add("mobile-stimulus-jspsych-content")}},data:{assessment_stage:"test_response"},on_finish:n=>{n.keyboard_response?"arrowleft"===n.keyboard_response?s.session.set("keyResponse","left"):s.session.set("keyResponse","right"):0===n.button_response?s.session.set("buttonResponse","left"):s.session.set("buttonResponse","right"),n.keyboard_response?n.correct=jc.pluginAPI.compareKeys(s.session("keyResponse"),s.session("currentCorpus")[s.session("indexTracking")].direction):n.correct=0===n.button_response&&"left"===s.session("currentCorpus")[s.session("indexTracking")].direction||1===n.button_response&&"right"===s.session("currentCorpus")[s.session("indexTracking")].direction,n.correct?s.session.set("dataCorrect",1):s.session.set("dataCorrect",0),jc.data.addDataToLastTrial({save_trial:!s.session("timeOut"),pid:s.session.get("config").pid,subtask:e,blockId:t,corpusId:"tosrec"!==e?e:s.session("tosrecCorpusId"),trialNumBlock:s.session("indexTracking")+1,itemId:s.session("currentCorpus")[s.session("indexTracking")].itemId,item:s.session("currentCorpus")[s.session("indexTracking")].sentence,truefalse:s.session("currentCorpus")[s.session("indexTracking")].answer,correct:s.session("dataCorrect"),story:s.session.get("config").story})}},{type:W,stimulus:()=>Mt.audio.neutralSoundSub,prompt:()=>Dt?'<p id="mobile-placeholder-stimulus">Invisible Place holder text</p>':`\n <div>\n <img class="lower" src="${Mt.images.roarSreKeyboard}" alt="arrow keys">\n </div>`,keyboard_choices:"NO_KEYS",button_choices:()=>Dt?[Ue.t("terms.false")[0].toUpperCase(),Ue.t("terms.true")[0].toUpperCase()]:[],button_html:()=>Dt?[`<button id="mobile-stimulus-btn-left" class="mobile-stimulus-btn"><img src=${Mt.images.leftArrowBlankShort} alt=${Ue.t("terms.false")}/><span>${Ue.t("terms.false")[0].toLocaleUpperCase()}</span></button>`,`<button id="mobile-stimulus-btn-right" class="mobile-stimulus-btn"><img src=${Mt.images.rightArrowBlankShort} alt=${Ue.t("terms.true")}/><span>${Ue.t("terms.true")[0].toLocaleUpperCase()}</span></button>`]:[],prompt_above_buttons:!0,on_load:()=>{if(Dt){document.body.style.display="flex",document.body.style.justifyContent="center",document.body.style.alignContent="center";document.querySelector(".jspsych-content-wrapper").classList.add("mobile-stimulus-wrap");document.getElementById("jspsych-content").classList.add("mobile-stimulus-jspsych-content")}},trial_duration:200,response_allowed_while_playing:!1,trial_ends_after_audio:!0}],loop_function:function(e){return s.session("indexTracking")===s.session("currentCorpus").length-1||s.session("timeOut")?(s.session.set("indexTracking",0),s.session.set("timeOut",!1),clearTimeout(s.session.get("timerId")),!1):(s.session.transact("indexTracking",(e=>e+1)),!0)}}),Od={type:W,stimulus:()=>Mt.audio.practiceInstruction,prompt:()=>`\n <div class="jspsych-content-modified" id="sre-background">\n <h2>${Ue.t("practice.intro.text1")}</h2>\n <p>${Ue.t("practice.intro.text2")}</p>\n <div class="row">\n <div class="instruction-boxes">\n <p> \n ${Ue.t(Dt?"practice.intro.text3Mobile":"practice.intro.text3")} \n </p>\n <img src="${Mt.images.practiceLeft}" alt="arrow keys">\n </div>\n <div class="instruction-boxes">\n <p> \n ${Ue.t(Dt?"practice.intro.text4Mobile":"practice.intro.text4")} \n </p>\n <img src="${Mt.images.practiceRight}" alt="arrow keys">\n </div>\n </div>\n <p> <b>${Ue.t("practice.intro.text5")}</b> </p> \n <div class="button">${Ue.t("practice.intro.text6")}</div>\n </div>\n `,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>`<button class="button">${Ue.t("practice.intro.text6Mobile")}</button>`,on_finish:e=>{s.session.set("indexTracking",-1)}},Ld={type:Ed,stimulus:()=>(s.session.transact("indexTracking",(e=>e+1)),Dt?`\n <p id="mobile-stimulus">${s.session("practiceCorpus")[s.session("indexTracking")].sentence}</p>\n `:`\n <div class = stimulus_div>\n <p class = 'stimulus'>${s.session("practiceCorpus")[s.session("indexTracking")].sentence}</p>\n </div>`),prompt:()=>{if(!Dt)return`\n <div> \n <img class="lower" src="${Mt.images.roarSreKeyboard}" alt="arrow keys"> \n </div>`},keyboard_choices:()=>Dt?"NO_KEYS":["ArrowLeft","ArrowRight"],button_choices:()=>Dt?[Ue.t("terms.false")[0].toUpperCase(),Ue.t("terms.true")[0].toUpperCase()]:[],button_html:()=>Dt?[`<button id="mobile-stimulus-btn-left" class="mobile-stimulus-btn"><img src=${Mt.images.leftArrowBlankShort} alt=${Ue.t("terms.false")}/><span>${Ue.t("terms.false")[0].toLocaleUpperCase()}</span></button>`,`<button id="mobile-stimulus-btn-right" class="mobile-stimulus-btn"><img src=${Mt.images.rightArrowBlankShort} alt=${Ue.t("terms.true")}/><span>${Ue.t("terms.true")[0].toLocaleUpperCase()}</span></button>`]:[],on_load:()=>{if(Dt){document.body.style.display="flex",document.body.style.justifyContent="center",document.body.style.alignContent="center";document.querySelector(".jspsych-content-wrapper").classList.add("mobile-stimulus-wrap");document.getElementById("jspsych-content").classList.add("mobile-stimulus-jspsych-content")}},data:{assessment_stage:"practice_response",corpusId:"practice",save_trial:!0},on_finish:e=>{e.keyboard_response?(e.correct=jc.pluginAPI.compareKeys(e.keyboard_response,s.session("practiceCorpus")[s.session("indexTracking")].correct_response),s.session.set("arrowResponse",e.keyboard_response)):e.correct="arrowleft"===s.session("practiceCorpus")[s.session("indexTracking")].correct_response&&0===e.button_response||"arrowright"===s.session("practiceCorpus")[s.session("indexTracking")].correct_response&&1===e.button_response,e.correct?(s.session.set("dataCorrect",1),s.session.set("feedbackResponse","Correct!")):(s.session.set("dataCorrect",0),s.session.set("feedbackResponse","That's not quite right."));const t="arrowleft"===e.keyboard_response||0===e.button_response;s.session.set("responseLR",t?"left":"right"),s.session.set("answerRP",t?"false":"true"),s.session.set("responseColor",t?"orange":"blue");const n="arrowleft"===s.session("practiceCorpus")[s.session("indexTracking")].correct_response;s.session.set("correctLR",n?"left":"right"),s.session.set("correctRP",n?"false":"true"),s.session.set("answerColor",n?"orange":"blue"),jc.data.addDataToLastTrial({pid:s.session.get("config").pid,subtask:"practice",corpusId:"practice",correct:s.session("dataCorrect"),trialNumBlock:s.session("indexTracking"),item:s.session("practiceCorpus")[s.session("indexTracking")].sentence,truefalse:s.session("practiceCorpus")[s.session("indexTracking")].answer,story:s.session.get("config").story})}};"false"===s.session("correctRP")?Mt.images.falseFlashKeySplit:Mt.images.falseStaticKeySplit,"false"===s.session("correctRP")?Mt.images.trueStaticKeySplit:Mt.images.trueFlashKeySplit;const jd={type:W,response_allowed_while_playing:()=>s.session.get("config").skipInstructions,stimulus:()=>1===s.session("dataCorrect")?Mt.audio[`feedback${s.session("indexTracking")}Correct`]:Mt.audio[`feedback${s.session("indexTracking")}Incorrect`],prompt:()=>`\n <div class=${Dt?"":"stimulus_div"}>\n <p id=${Dt?"mobile-stimulus-text":""} class="feedback">\n <span class=${s.session("responseColor")}>${s.session("feedbackResponse")} ${Ue.t(Dt?"practice.feedback.text1Mobile":"practice.feedback.text1",{arrow:"left"===s.session("responseLR")?Ue.t("terms.left"):Ue.t("terms.right"),type:"true"==s.session("answerRP")?Ue.t("terms.true"):Ue.t("terms.false")})}</span>\n <br></br> \n "${s.session("practiceCorpus")[s.session("indexTracking")].sentence}"\n <span class=${s.session("answerColor")}> ${Ue.t(Dt?"practice.feedback.text2Mobile":"practice.feedback.text2",{arrow:"left"===s.session("correctLR")?Ue.t("terms.left"):Ue.t("terms.right"),type:"true"==s.session("correctRP")?Ue.t("terms.true"):Ue.t("terms.false")})}</span>\n </p>\n </div>\n ${Dt?"":`<img class="lower" src= "${"false"===s.session("correctRP")?Mt.images.falseFlashKey:Mt.images.trueFlashKey}" alt="arrow keys">`}`,keyboard_choices:()=>Dt?"NO_KEYS":"false"===s.session("correctRP")?["ArrowLeft"]:["ArrowRight"],button_choices:()=>Dt?["ArrowLeft","ArrowRight"]:[],button_html:()=>Dt?[`<button class="mobile-practice-feedback ${"false"===s.session("correctRP")?"":"mobile-disable-button"}">\n <img src=${"false"===s.session("correctRP")?Mt.images.falseFlashKeySplit:Mt.images.falseStaticKeySplit} alt="feedback arrow"/>\n </button>`,`<button class="mobile-practice-feedback ${"false"===s.session("correctRP")?"mobile-disable-button":""}" >\n <img src=${"false"===s.session("correctRP")?Mt.images.trueStaticKeySplit:Mt.images.trueFlashKeySplit} alt="feedback arrow"/>\n </button>`]:"",prompt_above_buttons:()=>Dt,on_load:()=>{document.querySelectorAll(".jspsych-audio-multi-response-button").forEach(((e,t)=>{const n="false"===s.session("correctRP");0!==t||n?1===t&&n&&e.classList.add("mobile-disable-button"):e.classList.add("mobile-disable-button")}))}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}('/* CSS Document */\n.jspsych-display-element {\n font-family: "Source Sans Pro", Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";\n width: 60%;\n height: 100%;\n margin: auto;\n text-align: center;\n touch-action: manipulation;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Old versions of Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently\nsupported by Chrome, Edge, Opera and Firefox */\n /*.jspsych-content {\n \tdisplay: flex;\n \tflex-direction: column;\n \tjustify-content: center;\n \talign-items: center;\n \tposition: fixed;\n \tleft: 0;\n \ttop: 0;\n \twidth: 100%;\n \theight: 100%;\n }\n */\n /* jsPsych progress bar */\n /* Control appearance of jsPsych.data.displayData() */\n /* borrowing Bootstrap style for btn elements, but combining styles a bit */\n}\n.jspsych-display-element .grade-btn {\n padding: 1vh 2vh;\n margin: 1vh;\n margin-top: 4vh;\n font-size: 4vh;\n font-weight: bold;\n cursor: pointer;\n text-align: center;\n vertical-align: middle;\n border: 1vh solid transparent;\n border-radius: 1vh;\n color: rgb(255, 202, 97);\n background-color: rgb(76, 101, 139);\n border-color: rgb(65, 91, 127);\n}\n.jspsych-display-element .mobile-grade-select {\n margin-top: 8rem;\n}\n.jspsych-display-element .mobile-student-select-characters {\n margin-top: 40vh;\n}\n.jspsych-display-element #mobile-classroom-bg {\n position: fixed; /* or absolute, depending on your needs */\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1; /* This ensures the image stays behind other content */\n object-fit: cover;\n}\n.jspsych-display-element .mobile-character-select {\n width: 20%;\n}\n.jspsych-display-element .mobile-audio-btn-container {\n display: flex;\n justify-content: center;\n gap: 10%;\n}\n.jspsych-display-element .mobile-stimulus-wrap {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content {\n height: 40%;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content #mobile-stimulus {\n font-size: 4rem;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content #mobile-placeholder-stimulus {\n color: white;\n font-size: 4rem;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content .mobile-stimulus-btn {\n position: relative;\n border: none;\n background: none;\n cursor: pointer;\n padding: 0;\n display: inline-block;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content .mobile-stimulus-btn img {\n display: block;\n width: 100%;\n height: auto;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content .mobile-stimulus-btn span {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: white;\n font-size: 7rem;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content #mobile-stimulus-btn-left {\n margin-right: 4rem;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content #mobile-stimulus-btn-right {\n margin-left: 4rem;\n}\n.jspsych-display-element .mobile-practice-feedback {\n background: none;\n margin-top: 4rem;\n}\n.jspsych-display-element .mobile-disable-button {\n pointer-events: none;\n}\n.jspsych-display-element #mobile-stimulus-text {\n font-size: 1.75rem;\n}\n.jspsych-display-element #sre-background {\n background-color: rgb(250, 246, 236);\n -webkit-background-size: cover;\n -moz-background-size: cover;\n -o-background-size: cover;\n background-size: cover;\n max-height: 100%;\n max-width: 100%;\n padding: 0px;\n margin: 0px;\n}\n.jspsych-display-element #end-classroom {\n position: absolute;\n height: 80%;\n left: 0vh;\n bottom: 45vh;\n}\n.jspsych-display-element #end-student {\n position: relative;\n left: 0vh;\n top: 10vh;\n height: 65%;\n}\n.jspsych-display-element .instruction-background {\n display: block;\n background-color: rgb(250, 246, 236);\n padding-top: 0vh;\n min-height: 100%;\n min-width: 100%;\n}\n.jspsych-display-element h1 {\n margin-top: 10%;\n margin-right: 10%;\n margin-left: 10%;\n text-align: center;\n padding-inline: 10px;\n font-weight: semi-bold;\n font-size: 6vh;\n color: rgb(76, 101, 139);\n}\n.jspsych-display-element h2 {\n text-align: center;\n font-style: normal;\n font-weight: regular;\n font-size: 5vh;\n color: rgb(76, 101, 139);\n}\n.jspsych-display-element h3 {\n text-align: center;\n font-style: normal;\n font-weight: regular;\n font-size: 4vh;\n color: rgb(76, 101, 139);\n z-index: 1;\n}\n.jspsych-display-element p:not(.feedback, .stimulus) {\n text-align: center;\n vertical-align: middle;\n font-style: normal;\n font-weight: normal;\n font-size: 3vh;\n color: rgb(0, 0, 0);\n z-index: 1;\n}\n.jspsych-display-element n {\n text-align: center;\n vertical-align: middle;\n font-style: normal;\n font-weight: bold;\n font-size: 3vh;\n color: rgb(255, 202, 97);\n z-index: 1;\n}\n.jspsych-display-element .consent_form_title {\n margin-right: 10%;\n margin-left: 10%;\n font-size: 3vh;\n}\n.jspsych-display-element .consent_form_text {\n margin: 10%;\n text-align: left;\n font-size: 2vh;\n}\n.jspsych-display-element .survey_form_text {\n text-align: center;\n font-size: 3vh;\n}\n.jspsych-display-element .consent_form_agree {\n margin: 5%;\n text-align: left;\n font-size: 2vh;\n}\n.jspsych-display-element .debrief_text {\n margin: 20%;\n text-align: left;\n font-size: 2vh;\n}\n.jspsych-display-element .jspsych-survey-multi-select-option {\n font-size: 2vh;\n text-align: center;\n}\n.jspsych-display-element .stimulus {\n text-align: center;\n vertical-align: middle;\n font-style: normal;\n font-weight: normal;\n font-size: 4vh;\n line-height: 4vh;\n color: rgb(0, 0, 0);\n}\n.jspsych-display-element .full_screen {\n text-align: center;\n font-style: normal;\n font-weight: normal;\n font-size: 32px;\n line-height: 32px;\n padding-top: 300px;\n color: rgb(0, 0, 0);\n}\n.jspsych-display-element .feedback {\n text-align: center;\n font-style: normal;\n font-weight: bold;\n font-size: 3vh;\n line-height: 3vh;\n color: rgb(0, 0, 0);\n}\n.jspsych-display-element .jspsych-content-modified {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n}\n.jspsych-display-element .jspsych-content-modified .class-container {\n width: 100%;\n position: absolute;\n margin: auto;\n display: block;\n}\n.jspsych-display-element .jspsych-content-modified .class-container #classroom-bg {\n position: fixed; /* or absolute, depending on your needs */\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1; /* This ensures the image stays behind other content */\n object-fit: cover;\n}\n.jspsych-display-element .text-block {\n position: relative;\n bottom: 15px;\n top: 15px;\n background-color: rgb(246, 241, 230);\n padding-left: 25px;\n padding-right: 25px;\n padding-top: 15px;\n padding-bottom: 15px;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .demo-text-block {\n position: relative;\n bottom: 25px;\n top: 15px;\n background-color: rgb(246, 241, 230);\n padding-left: 85px;\n padding-right: 85px;\n padding-top: 60px;\n padding-bottom: 60px;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .grade-text-block {\n position: relative;\n bottom: 0px;\n top: 0px;\n left: 0px;\n right: 0px;\n background-color: rgb(246, 241, 230);\n padding-left: 0px;\n padding-right: 0px;\n padding-top: 50px;\n padding-bottom: 90px;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .select-text-block {\n position: relative;\n bottom: 15px;\n top: 30px;\n background-color: rgb(246, 241, 230);\n padding-left: 20px;\n padding-right: 20px;\n padding-top: 10px;\n padding-bottom: 10px;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .number-block {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 5vh;\n width: 6vh;\n padding-left: 3vh;\n padding-right: 3vh;\n text-align: center;\n vertical-align: middle;\n background-color: rgb(76, 101, 139);\n border: 6px solid rgb(65, 91, 127);\n border-radius: 10px;\n align-self: center;\n}\n.jspsych-display-element .container {\n width: 100%;\n position: fixed;\n display: block;\n}\n.jspsych-display-element .transparent {\n background: rgba(255, 255, 255, 0);\n border-color: rgba(255, 255, 255, 0);\n}\n.jspsych-display-element .center {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.jspsych-display-element .star-center {\n margin: 0;\n position: absolute;\n top: 45%;\n left: 51%;\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.jspsych-display-element .vertical-center {\n margin: 0;\n position: absolute;\n top: 50%;\n -ms-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n.jspsych-display-element .jspsych-video-button-response-stimulus {\n margin: 0;\n position: absolute;\n top: 45%;\n height: 90%;\n -ms-transform: translateY(-45%);\n transform: translateY(-45%);\n}\n.jspsych-display-element .stimulus_div {\n display: flex;\n justify-content: center;\n align-items: center;\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n}\n.jspsych-display-element .text_div {\n display: flex;\n justify-content: center;\n align-items: center;\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 60%;\n}\n.jspsych-display-element .center {\n vertical-align: middle;\n text-align: center;\n}\n.jspsych-display-element .upper {\n position: fixed;\n top: 0%;\n left: 50%;\n transform: translate(-50%, -50%);\n height: 2vh;\n}\n.jspsych-display-element .lower {\n position: fixed;\n bottom: 20%;\n left: 50%;\n transform: translate(-50%, -50%);\n height: 7vh;\n}\n.jspsych-display-element .orange {\n color: rgb(219, 97, 69);\n}\n.jspsych-display-element .blue {\n color: rgb(66, 152, 181);\n}\n.jspsych-display-element .yellow {\n color: rgb(255, 202, 97);\n}\n.jspsych-display-element .row {\n display: flex;\n}\n.jspsych-display-element .row .instruction-boxes {\n margin-top: 2%;\n margin-bottom: 2%;\n padding: 3vh 2vh 3vh 2vh;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n margin-right: 5%;\n margin-left: 5%;\n background-color: #FFFFFF;\n}\n.jspsych-display-element .row .instruction-boxes p {\n text-align: center;\n}\n.jspsych-display-element .row .instruction-boxes img {\n width: 60%;\n}\n.jspsych-display-element .row .column_1 {\n padding: 0 0 10vh 0;\n}\n.jspsych-display-element .row .column_1 .characterleft {\n text-align: center;\n vertical-align: middle;\n position: relative;\n top: 10%;\n height: 70vh;\n}\n.jspsych-display-element .row .column_3 {\n margin-top: 10rem;\n height: 36vh;\n padding-right: 1vw;\n padding-left: 1vw;\n}\n.jspsych-display-element .row .halfway-text-block {\n background-color: rgb(255, 255, 255);\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .row .middle {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-content: center;\n}\n.jspsych-display-element .row .student-text-block {\n position: relative;\n margin-top: 10vh;\n margin-left: 5vh;\n margin-right: 5vh;\n height: 50vh;\n background-color: rgb(255, 255, 255);\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .column_2_lower {\n padding: 0 2vh 3vh 2vh;\n flex: 50%;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n margin-right: 5%;\n margin-left: 5%;\n}\n.jspsych-display-element .button {\n left: 0;\n right: 0;\n background-color: rgb(76, 101, 139);\n text-align: center;\n vertical-align: middle;\n padding: 2vh;\n font-style: normal;\n font-weight: bold;\n font-size: 3vh;\n color: white;\n position: fixed;\n display: block;\n bottom: 0;\n border: none;\n z-index: 1;\n}\n.jspsych-display-element .story-scene {\n width: 100%;\n position: fixed;\n display: block;\n bottom: 5vh;\n}\n.jspsych-display-element .scene {\n position: fixed;\n bottom: 5vh;\n width: 100%;\n display: block;\n}\n.jspsych-display-element .student {\n position: relative;\n display: inline-flex;\n flex-direction: row;\n height: 50%;\n width: 50%;\n bottom: 10vh;\n right: 0vh;\n justify-content: center;\n gap: 50px;\n}\n.jspsych-display-element .number {\n position: relative;\n display: inline-flex;\n flex-direction: row;\n height: 50%;\n width: 50%;\n bottom: -10vh;\n left: 1vh;\n justify-content: center;\n gap: 200px;\n}\n.jspsych-display-element .imageleft {\n text-align: center;\n position: relative;\n top: 50%;\n height: 30vh;\n}\n.jspsych-display-element #jspsych-progressbar-container {\n color: #555;\n border-bottom: 1px solid #dedede;\n background-color: #f9f9f9;\n margin-bottom: 1em;\n text-align: center;\n padding: 8px 0px;\n width: 100%;\n line-height: 1em;\n}\n.jspsych-display-element #jspsych-progressbar-container span {\n font-size: 14px;\n padding-right: 14px;\n}\n.jspsych-display-element #jspsych-progressbar-outer {\n background-color: #eee;\n width: 50%;\n margin: auto;\n height: 14px;\n display: inline-block;\n vertical-align: middle;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.jspsych-display-element #jspsych-progressbar-inner {\n background-color: #aaa;\n width: 0%;\n height: 100%;\n}\n.jspsych-display-element #jspsych-data-display {\n text-align: left;\n}\n.jspsych-display-element .jspsych-btn {\n display: inline-block;\n padding: 1vh 2vh;\n margin: 1vh;\n font-size: 4vh;\n font-weight: bold;\n cursor: pointer;\n line-height: 1.4;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-image: none;\n border: 1vh solid transparent;\n border-radius: 1vh;\n color: rgb(255, 202, 97);\n background-color: rgb(76, 101, 139);\n border-color: rgb(65, 91, 127);\n}\n.jspsych-display-element .mep-stimulus {\n display: inline-block;\n width: 1.65vw;\n height: 1.65vw;\n margin: 0.13vw;\n padding: 0px 0px 0.825vw 0px;\n background: white;\n border-style: solid;\n border-width: 0px 0px 8px 0px;\n border-color: rgba(255, 255, 255, 0);\n}\n.jspsych-display-element .bottom-border-blue {\n border-bottom-color: blue !important;\n}\n.jspsych-display-element #jspsych-html-button-response-stimulus {\n margin-bottom: 25vw;\n}\n.jspsych-display-element #fixation-prompt {\n margin-bottom: 0.825%;\n}\n.jspsych-display-element .jspsych-html-button-response-button {\n display: inline-block;\n width: 4vw;\n height: 4vw;\n margin: 0.75vw;\n}\n.jspsych-display-element #jspsych-fullscreen-btn {\n position: sticky;\n bottom: 20%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: rgb(255, 255, 255);\n background-color: rgb(76, 101, 139);\n border-color: darkgrey;\n display: inline-block;\n padding: 1vh 2vh;\n margin: 16vh 1vh 1vh 1vh;\n font-size: 4vh;\n font-weight: bold;\n cursor: pointer;\n line-height: 1.4;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-image: none;\n border: 1vh solid transparent;\n border-radius: 1vh;\n}\n.jspsych-display-element .jspsych-survey-html-form {\n position: fixed;\n bottom: 20%;\n left: 50%;\n transform: translate(-50%, -50%);\n}');const Ud=Object.prototype.toString;function Pd(e){switch(Ud.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Vd(e,Error)}}function Fd(e,t){return Ud.call(e)===`[object ${t}]`}function Dd(e){return Fd(e,"ErrorEvent")}function Nd(e){return Fd(e,"DOMError")}function Md(e){return Fd(e,"String")}function zd(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function Bd(e){return Fd(e,"Object")}function $d(e){return"undefined"!=typeof Event&&Vd(e,Event)}function qd(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Yd(e){return"number"==typeof e&&e!=e}function Vd(e,t){try{return e instanceof t}catch(e){return!1}}function Gd(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}function Hd(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function Wd(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const i=e[t];try{Gd(i)?n.push("[VueViewModel]"):n.push(String(i))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function Kd(e,t,n=!1){return!!Md(e)&&(Fd(t,"RegExp")?t.test(e):!!Md(t)&&(n?e===t:e.includes(t)))}function Zd(e,t=[],n=!1){return t.some((t=>Kd(e,t,n)))}function Jd(e,t,n=250,i,a,s,r){if(!(s.exception&&s.exception.values&&r&&Vd(r.originalException,Error)))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;var c,l;o&&(s.exception.values=(c=Xd(e,t,a,r.originalException,i,s.exception.values,o,0),l=n,c.map((e=>(e.value&&(e.value=Hd(e.value,l)),e)))))}function Xd(e,t,n,i,a,s,r,o){if(s.length>=n+1)return s;let c=[...s];if(Vd(i[a],Error)){Qd(r,o);const s=e(t,i[a]),l=c.length;ep(s,a,l,o),c=Xd(e,t,n,i[a],a,[s,...c],s,l)}return Array.isArray(i.errors)&&i.errors.forEach(((i,s)=>{if(Vd(i,Error)){Qd(r,o);const l=e(t,i),u=c.length;ep(l,`errors[${s}]`,u,o),c=Xd(e,t,n,i,a,[l,...c],l,u)}})),c}function Qd(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function ep(e,t,n,i){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:i}}function tp(e){return e&&e.Math==Math?e:void 0}const np="object"==typeof globalThis&&tp(globalThis)||"object"==typeof window&&tp(window)||"object"==typeof self&&tp(self)||"object"==typeof global&&tp(global)||function(){return this}()||{};function ip(){return np}function ap(e,t,n){const i=n||np,a=i.__SENTRY__=i.__SENTRY__||{};return a[e]||(a[e]=t())}const sp=ip(),rp=80;function op(e,t={}){try{let n=e;const i=5,a=[];let s=0,r=0;const o=" > ",c=o.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||rp;for(;n&&s++<i&&(l=cp(n,u),!("html"===l||s>1&&r+a.length*c+l.length>=d));)a.push(l),r+=l.length,n=n.parentNode;return a.reverse().join(o)}catch(e){return"<unknown>"}}function cp(e,t){const n=e,i=[];let a,s,r,o,c;if(!n||!n.tagName)return"";i.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(l&&l.length)l.forEach((e=>{i.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&i.push(`#${n.id}`),a=n.className,a&&Md(a))for(s=a.split(/\s+/),c=0;c<s.length;c++)i.push(`.${s[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)r=u[c],o=n.getAttribute(r),o&&i.push(`[${r}="${o}"]`);return i.join("")}const lp=["debug","info","warn","error","log","assert","trace"],up={};function dp(e){if(!("console"in np))return e();const t=np.console,n={},i=Object.keys(up);i.forEach((e=>{const i=up[e];n[e]=t[e],t[e]=i}));try{return e()}finally{i.forEach((e=>{t[e]=n[e]}))}}const pp=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?lp.forEach((n=>{t[n]=(...t)=>{e&&dp((()=>{np.console[n](`Sentry Logger [${n}]:`,...t)}))}})):lp.forEach((e=>{t[e]=()=>{}})),t}(),hp=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function mp(e,t=!1){const{host:n,path:i,pass:a,port:s,projectId:r,protocol:o,publicKey:c}=e;return`${o}://${c}${t&&a?`:${a}`:""}@${n}${s?`:${s}`:""}/${i?`${i}/`:i}${r}`}function fp(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function gp(e){const t="string"==typeof e?function(e){const t=hp.exec(e);if(!t)return void console.error(`Invalid Sentry Dsn: ${e}`);const[n,i,a="",s,r="",o]=t.slice(1);let c="",l=o;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return fp({host:s,pass:a,path:c,projectId:l,port:r,protocol:n,publicKey:i})}(e):fp(e);if(t&&function(e){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return!0;const{port:t,projectId:n,protocol:i}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(pp.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(i)?t&&isNaN(parseInt(t,10))&&(pp.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(pp.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),1):(pp.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}class yp extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}function _p(e,t,n){if(!(t in e))return;const i=e[t],a=n(i);"function"==typeof a&&bp(a,i),e[t]=a}function vp(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function bp(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,vp(e,"__sentry_original__",t)}catch(e){}}function wp(e){return e.__sentry_original__}function xp(e){if(Pd(e))return{message:e.message,name:e.name,stack:e.stack,...Sp(e)};if($d(e)){const t={type:e.type,target:Ep(e.target),currentTarget:Ep(e.currentTarget),...Sp(e)};return"undefined"!=typeof CustomEvent&&Vd(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Ep(e){try{return t=e,"undefined"!=typeof Element&&Vd(t,Element)?op(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}var t}function Sp(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function kp(e){return Tp(e,new Map)}function Tp(e,t){if(Bd(e)){const n=t.get(e);if(void 0!==n)return n;const i={};t.set(e,i);for(const n of Object.keys(e))void 0!==e[n]&&(i[n]=Tp(e[n],t));return i}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const i=[];return t.set(e,i),e.forEach((e=>{i.push(Tp(e,t))})),i}return e}const Rp=50,Ip=/\(error: (.*)\)/,Ap=/captureMessage|captureException/;function Cp(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0)=>{const i=[],a=e.split("\n");for(let e=n;e<a.length;e++){const n=a[e];if(n.length>1024)continue;const s=Ip.test(n)?n.replace(Ip,"$1"):n;if(!s.match(/\S*Error: /)){for(const e of t){const t=e(s);if(t){i.push(t);break}}if(i.length>=Rp)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop();t.reverse(),Ap.test(t[t.length-1].function||"")&&(t.pop(),Ap.test(t[t.length-1].function||"")&&t.pop());return t.slice(0,Rp).map((e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"})))}(i)}}const Op="<anonymous>";function Lp(e){try{return e&&"function"==typeof e&&e.name||Op}catch(e){return Op}}const jp=ip();function Up(){if(!("fetch"in jp))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function Pp(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const Fp=ip();const Dp=ip(),Np="__sentry_xhr_v2__",Mp={},zp={};function Bp(e){if(!zp[e])switch(zp[e]=!0,e){case"console":!function(){if(!("console"in np))return;lp.forEach((function(e){e in np.console&&_p(np.console,e,(function(t){return up[e]=t,function(...t){qp("console",{args:t,level:e});const n=up[e];n&&n.apply(np.console,t)}}))}))}();break;case"dom":!function(){if(!Dp.document)return;const e=qp.bind(null,"dom"),t=Zp(e,!0);Dp.document.addEventListener("click",t,!1),Dp.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=Dp[t]&&Dp[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(_p(n,"addEventListener",(function(t){return function(n,i,a){if("click"===n||"keypress"==n)try{const i=this,s=i.__sentry_instrumentation_handlers__=i.__sentry_instrumentation_handlers__||{},r=s[n]=s[n]||{refCount:0};if(!r.handler){const i=Zp(e);r.handler=i,t.call(this,n,i,a)}r.refCount++}catch(e){}return t.call(this,n,i,a)}})),_p(n,"removeEventListener",(function(e){return function(t,n,i){if("click"===t||"keypress"==t)try{const n=this,a=n.__sentry_instrumentation_handlers__||{},s=a[t];s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,i),s.handler=void 0,delete a[t]),0===Object.keys(a).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,i)}})))}))}();break;case"xhr":!function(){if(!Dp.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;_p(e,"open",(function(e){return function(...t){const n=t[1],i=this[Np]={method:Md(t[0])?t[0].toUpperCase():t[0],url:t[1],request_headers:{}};Md(n)&&"POST"===i.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const a=()=>{const e=this[Np];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}qp("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?_p(this,"onreadystatechange",(function(e){return function(...t){return a(),e.apply(this,t)}})):this.addEventListener("readystatechange",a),_p(this,"setRequestHeader",(function(e){return function(...t){const[n,i]=t,a=this[Np];return a&&(a.request_headers[n.toLowerCase()]=i),e.apply(this,t)}})),e.apply(this,t)}})),_p(e,"send",(function(e){return function(...t){const n=this[Np];return n&&void 0!==t[0]&&(n.body=t[0]),qp("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}();break;case"fetch":!function(){if(!function(){if(!Up())return!1;if(Pp(jp.fetch))return!0;let e=!1;const t=jp.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Pp(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}())return;_p(np,"fetch",(function(e){return function(...t){const{method:n,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Vp(t),method:Yp(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Vp(t),method:Yp(t,"method")?String(t.method).toUpperCase():"GET"}}(t),a={args:t,fetchData:{method:n,url:i},startTimestamp:Date.now()};return qp("fetch",{...a}),e.apply(np,t).then((e=>(qp("fetch",{...a,endTimestamp:Date.now(),response:e}),e)),(e=>{throw qp("fetch",{...a,endTimestamp:Date.now(),error:e}),e}))}}))}();break;case"history":!function(){if(!function(){const e=Fp.chrome,t=e&&e.app&&e.app.runtime,n="history"in Fp&&!!Fp.history.pushState&&!!Fp.history.replaceState;return!t&&n}())return;const e=Dp.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=Gp,t=String(n);Gp=t,qp("history",{from:e,to:t})}return e.apply(this,t)}}Dp.onpopstate=function(...t){const n=Dp.location.href,i=Gp;if(Gp=n,qp("history",{from:i,to:n}),e)try{return e.apply(this,t)}catch(e){}},_p(Dp.history,"pushState",t),_p(Dp.history,"replaceState",t)}();break;case"error":Jp=Dp.onerror,Dp.onerror=function(e,t,n,i,a){return qp("error",{column:i,error:a,line:n,msg:e,url:t}),!(!Jp||Jp.__SENTRY_LOADER__)&&Jp.apply(this,arguments)},Dp.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":Xp=Dp.onunhandledrejection,Dp.onunhandledrejection=function(e){return qp("unhandledrejection",e),!(Xp&&!Xp.__SENTRY_LOADER__)||Xp.apply(this,arguments)},Dp.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("unknown instrumentation type:",e))}}function $p(e,t){Mp[e]=Mp[e]||[],Mp[e].push(t),Bp(e)}function qp(e,t){if(e&&Mp[e])for(const n of Mp[e]||[])try{n(t)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Lp(n)}\nError:`,t)}}function Yp(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Vp(e){return"string"==typeof e?e:e?Yp(e,"url")?e.url:e.toString?e.toString():"":""}let Gp;const Hp=1e3;let Wp,Kp;function Zp(e,t=!1){return n=>{if(!n||Kp===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(e){}return!0}(n))return;const i="keypress"===n.type?"input":n.type;(void 0===Wp||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(e){}return!1}(Kp,n))&&(e({event:n,name:i,global:t}),Kp=n),clearTimeout(Wp),Wp=Dp.setTimeout((()=>{Wp=void 0}),Hp)}}let Jp=null;let Xp=null;function Qp(){const e=np,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>t.getRandomValues(new Uint8Array(1))[0])}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function eh(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function th(e){const{message:t,event_id:n}=e;if(t)return t;const i=eh(e);return i?i.type&&i.value?`${i.type}: ${i.value}`:i.type||i.value||n||"<unknown>":n||"<unknown>"}function nh(e,t,n){const i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function ih(e,t){const n=eh(e);if(!n)return;const i=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...i,...t},t&&"data"in t){const e={...i&&i.data,...t.data};n.mechanism.data=e}}function ah(e){if(e&&e.__sentry_captured__)return!0;try{vp(e,"__sentry_captured__",!0)}catch(e){}return!1}function sh(e){return Array.isArray(e)?e:[e]}function rh(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function oh(e,t=100,n=1/0){try{return lh("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function ch(e,t=3,n=102400){const i=oh(e,t);return a=i,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(a))>n?ch(e,t-1,n):i;var a}function lh(e,t,n=1/0,i=1/0,a=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[s,r]=a;if(null==t||["number","boolean","string"].includes(typeof t)&&!Yd(t))return t;const o=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(Gd(t))return"[VueViewModel]";if(Bd(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if("function"==typeof t)return`[Function: ${Lp(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const i=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return o.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return lh("",l.toJSON(),c-1,i,a)}catch(e){}const u=Array.isArray(t)?[]:{};let d=0;const p=xp(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=i){u[e]="[MaxProperties ~]";break}const t=p[e];u[e]=lh(e,t,c-1,i,a),d++}return r(t),u}var uh;function dh(e){return new hh((t=>{t(e)}))}function ph(e){return new hh(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(uh||(uh={}));class hh{constructor(e){hh.prototype.__init.call(this),hh.prototype.__init2.call(this),hh.prototype.__init3.call(this),hh.prototype.__init4.call(this),this._state=uh.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new hh(((n,i)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){i(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){i(e)}else i(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new hh(((t,n)=>{let i,a;return this.then((t=>{a=!1,i=t,e&&e()}),(t=>{a=!0,i=t,e&&e()})).then((()=>{a?n(i):t(i)}))}))}__init(){this._resolve=e=>{this._setResult(uh.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(uh.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===uh.PENDING&&(qd(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===uh.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===uh.RESOLVED&&e[1](this._value),this._state===uh.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function mh(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(i){if(!(void 0===e||t.length<e))return ph(new yp("Not adding Promise because buffer limit was reached."));const a=i();return-1===t.indexOf(a)&&t.push(a),a.then((()=>n(a))).then(null,(()=>n(a).then(null,(()=>{})))),a},drain:function(e){return new hh(((n,i)=>{let a=t.length;if(!a)return n(!0);const s=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{dh(e).then((()=>{--a||(clearTimeout(s),n(!0))}),i)}))}))}}}function fh(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",i=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:i,relative:t[5]+n+i}}const gh=["fatal","error","warning","log","info","debug"];const yh=ip(),_h={nowSeconds:()=>Date.now()/1e3};const vh=rh()?function(){try{return(e=module,t="perf_hooks",e.require(t)).performance}catch(e){return}var e,t}():function(){const{performance:e}=yh;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),bh=void 0===vh?_h:{nowSeconds:()=>(vh.timeOrigin+vh.now())/1e3},wh=_h.nowSeconds.bind(_h),xh=bh.nowSeconds.bind(bh),Eh=(()=>{const{performance:e}=yh;if(!e||!e.now)return;const t=36e5,n=e.now(),i=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+n-i):t,s=a<t,r=e.timing&&e.timing.navigationStart,o="number"==typeof r?Math.abs(r+n-i):t;return s||o<t?a<=o?e.timeOrigin:r:i})(),Sh="baggage",kh="sentry-",Th=/^sentry-/,Rh=8192;function Ih(e){if(!e)return;return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce(((e,[t,n],i)=>{const a=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,s=0===i?a:`${e},${a}`;return s.length>Rh?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):s}),"")}(Object.entries(e).reduce(((e,[t,n])=>(n&&(e[`${kh}${t}`]=n),e)),{}))}function Ah(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(e[t]=n,e)),{})}const Ch=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Oh(e,t){const n=function(e){if(!e)return;const t=e.match(Ch);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),i=function(e){if(!Md(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce(((e,t)=>({...e,...Ah(t)})),{});else{if(!e)return;t=Ah(e)}const n=Object.entries(t).reduce(((e,[t,n])=>(t.match(Th)&&(e[t.slice(kh.length)]=n),e)),{});return Object.keys(n).length>0?n:void 0}(t),{traceId:a,parentSpanId:s,parentSampled:r}=n||{},o={traceId:a||Qp(),spanId:Qp().substring(16),sampled:r};return s&&(o.parentSpanId=s),i&&(o.dsc=i),{traceparentData:n,dynamicSamplingContext:i,propagationContext:o}}function Lh(e=Qp(),t=Qp().substring(16),n){let i="";return void 0!==n&&(i=n?"-1":"-0"),`${e}-${t}${i}`}function jh(e,t=[]){return[e,t]}function Uh(e,t){const[n,i]=e;return[n,[...i,t]]}function Ph(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function Fh(e,t){return(t||new TextEncoder).encode(e)}function Dh(e,t){const[n,i]=e;let a=JSON.stringify(n);function s(e){"string"==typeof a?a="string"==typeof e?a+e:[Fh(a,t),e]:a.push("string"==typeof e?Fh(e,t):e)}for(const e of i){const[t,n]=e;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(oh(n))}s(e)}}return"string"==typeof a?a:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let i=0;for(const t of e)n.set(t,i),i+=t.length;return n}(a)}function Nh(e,t){const n="string"==typeof e.data?Fh(e.data,t):e.data;return[kp({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Mh={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function zh(e){return Mh[e]}function Bh(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function $h(e,t,n,i){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:mp(i)},...a&&{trace:kp({...a})}}}const qh=6e4;function Yh(e,{statusCode:t,headers:n},i=Date.now()){const a={...e},s=n&&n["x-sentry-rate-limits"],r=n&&n["retry-after"];if(s)for(const e of s.trim().split(",")){const[t,n]=e.split(":",2),s=parseInt(t,10),r=1e3*(isNaN(s)?60:s);if(n)for(const e of n.split(";"))a[e]=i+r;else a.all=i+r}else r?a.all=i+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const i=Date.parse(`${e}`);return isNaN(i)?qh:i-t}(r,i):429===t&&(a.all=i+6e4);return a}const Vh="production";function Gh(){return ap("globalEventProcessors",(()=>[]))}function Hh(e){Gh().push(e)}function Wh(e,t,n,i=0){return new hh(((a,s)=>{const r=e[i];if(null===t||"function"!=typeof r)a(t);else{const o=r({...t},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.id&&null===o&&pp.log(`Event processor "${r.id}" dropped event`),qd(o)?o.then((t=>Wh(e,t,n,i+1).then(a))).then(null,s):Wh(e,o,n,i+1).then(a).then(null,s)}}))}function Kh(e){const t=xh(),n={sid:Qp(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return kp({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Zh(n,e),n}function Zh(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||xh(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Qp()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class Jh{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Xh()}static clone(e){const t=new Jh;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata={...e._sdkProcessingMetadata},t._propagationContext={...e._propagationContext}),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Zh(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof Jh?t:this}return e instanceof Jh?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):Bd(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Xh(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const i={timestamp:wh(),...e},a=this._breadcrumbs;return a.push(i),this._breadcrumbs=a.length>n?a.slice(-n):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction;if(t){e.sdkProcessingMetadata={dynamicSamplingContext:t.getDynamicSamplingContext(),...e.sdkProcessingMetadata};const n=t.name;n&&(e.tags={transaction:n,...e.tags})}}this._applyFingerprint(e);const n=this._getBreadcrumbs(),i=[...e.breadcrumbs||[],...n];return e.breadcrumbs=i.length>0?i:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},Wh([...Gh(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?sh(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function Xh(){return{traceId:Qp(),spanId:Qp().substring(16)}}const Qh=4,em=100;class tm{constructor(e,t=new Jh,n=Qh){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=Jh.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:Qp(),i=new Error("Sentry syntheticException");return this._withClient(((a,s)=>{a.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},s)})),n}captureMessage(e,t,n){const i=this._lastEventId=n&&n.event_id?n.event_id:Qp(),a=new Error(e);return this._withClient(((s,r)=>{s.captureMessage(e,t,{originalException:e,syntheticException:a,...n,event_id:i},r)})),i}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Qp();return e.type||(this._lastEventId=n),this._withClient(((i,a)=>{i.captureEvent(e,{...t,event_id:n},a)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=em}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const r={timestamp:wh(),...e},o=a?dp((()=>a(r,t))):r;null!==o&&(i.emit&&i.emit("beforeAddBreadcrumb",o,t),n.addBreadcrumb(o,s))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=im(this);try{e(this)}finally{im(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&!n){this.getClient()?console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):console.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),Zh(e,n)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:i,environment:a=Vh}=n&&n.getOptions()||{},{userAgent:s}=np.navigator||{},r=Kh({release:i,environment:a,user:t.getUser(),...s&&{userAgent:s},...e}),o=t.getSession&&t.getSession();return o&&"ok"===o.status&&Zh(o,{status:"exited"}),this.endSession(),t.setSession(r),r}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=nm().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function nm(){return np.__SENTRY__=np.__SENTRY__||{extensions:{},hub:void 0},np}function im(e){const t=nm(),n=sm(t);return rm(t,e),n}function am(){const e=nm();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=nm()){t=e,t&&t.__SENTRY__&&t.__SENTRY__.hub&&!sm(e).isOlderThan(Qh)||rm(e,new tm);var t;return sm(e)}(e)}function sm(e){return ap("hub",(()=>new tm),e)}function rm(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}function om(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=am().getClient(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function cm(e){return(e||am()).getScope().getTransaction()}let lm=!1;function um(){const e=cm();if(e){const t="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}um.tag="sentry_tracingErrorCallback";class dm{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class pm{constructor(e={}){this.traceId=e.traceId||Qp(),this.spanId=e.spanId||Qp().substring(16),this.startTimestamp=e.startTimestamp||xh(),this.tags=e.tags||{},this.data=e.data||{},this.instrumenter=e.instrumenter||"sentry",this.origin=e.origin||"manual",e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.name&&(this.description=e.name),e.status&&(this.status=e.status),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}get name(){return this.description||""}set name(e){this.setName(e)}startChild(e){const t=new pm({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&t.transaction){const n=`[Tracing] Starting '${e&&e.op||"< unknown op >"}' span on transaction '${t.transaction.name||"< unknown name >"}' (${t.transaction.spanId}).`;t.transaction.metadata.spanMetadata[t.spanId]={logMessage:n},pp.log(n)}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);const t=function(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(e);return"unknown_error"!==t&&this.setStatus(t),this}setName(e){this.description=e}isSuccess(){return"ok"===this.status}finish(e){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:e}=this.transaction.metadata.spanMetadata[this.spanId];e&&pp.log(e.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof e?e:xh()}toTraceparent(){return Lh(this.traceId,this.spanId,this.sampled)}toContext(){return kp({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return kp({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return kp({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}}function hm(e,t,n){const i=t.getOptions(),{publicKey:a}=t.getDsn()||{},{segment:s}=n&&n.getUser()||{},r=kp({environment:i.environment||Vh,release:i.release,user_segment:s,public_key:a,trace_id:e});return t.emit&&t.emit("createDsc",r),r}class mm extends pm{constructor(e,t){super(e),delete this.description,this._measurements={},this._contexts={},this._hub=t||am(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,t="custom"){this._name=e,this.metadata.source=t}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new dm(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){if(void 0!==this.endTimestamp)return;this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);const t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this.sampled)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(t&&t.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((e=>e!==this&&e.endTimestamp)):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce(((e,t)=>e.endTimestamp&&t.endTimestamp?e.endTimestamp>t.endTimestamp?e:t:e)).endTimestamp);const i=this.metadata,a={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...i,dynamicSamplingContext:this.getDynamicSamplingContext()},...i.source&&{transaction_info:{source:i.source}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),a.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(a)}toContext(){return kp({...super.toContext(),name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const e=this._hub||am(),t=e.getClient();if(!t)return{};const n=e.getScope(),i=hm(this.traceId,t,n),a=this.metadata.sampleRate;void 0!==a&&(i.sample_rate=`${a}`);const s=this.metadata.source;return s&&"url"!==s&&(i.transaction=this.name),void 0!==this.sampled&&(i.sampled=String(this.sampled)),i}setHub(e){this._hub=e}}const fm={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},gm=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class ym extends dm{constructor(e,t,n,i){super(i),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=t=>{e.endTimestamp="number"==typeof t?t:xh(),this._popActivity(e.spanId)},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),super.add(e)}}class _m extends mm{constructor(e,t,n=fm.idleTimeout,i=fm.finalTimeout,a=fm.heartbeatInterval,s=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=a,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=gm[4],s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),t.configureScope((e=>e.setSpan(this)))),this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=gm[3],this.finish())}),this._finalTimeout)}finish(e=xh()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op);for(const t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter((t=>{if(t.spanId===this.spanId)return!0;t.endTimestamp||(t.endTimestamp=e,t.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));const n=t.startTimestamp<e,i=(this._finalTimeout+this._idleTimeout)/1e3,a=t.endTimestamp-this.startTimestamp<i;if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e=JSON.stringify(t,void 0,2);n?a||pp.log("[Tracing] discarding Span since it finished after Transaction final timeout",e):pp.log("[Tracing] discarding Span since it happened after Transaction was finished",e)}return n&&a})),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] No active IdleTransaction");if(this._onScope){const e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const t=e=>{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new ym(t,n,this.spanId,e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=gm[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=gm[1],this.finish(e))}),this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] popActivity ${e}`),delete this.activities[e],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const e=xh();this._idleTimeoutCanceledPermanently?(this._finishReason=gm[5],this.finish(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=gm[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function vm(){const e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function bm(e,t,n){if(!om(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let i;return"function"==typeof t.tracesSampler?(i=t.tracesSampler(n),e.setMetadata({sampleRate:Number(i)})):void 0!==n.parentSampled?i=n.parentSampled:void 0!==t.tracesSampleRate?(i=t.tracesSampleRate,e.setMetadata({sampleRate:Number(i)})):(i=1,e.setMetadata({sampleRate:i})),function(e){if(Yd(e)||"number"!=typeof e&&"boolean"!=typeof e)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1;if(e<0||e>1)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1;return!0}(i)?i?(e.sampled=Math.random()<i,e.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] starting ${e.op} transaction - ${e.name}`),e):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),e)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] Discarding transaction because "+("function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),e.sampled=!1,e):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function wm(e,t){const n=this.getClient(),i=n&&n.getOptions()||{},a=i.instrumenter||"sentry",s=e.instrumenter||"sentry";a!==s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${a}\` instrumenter.\nThe transaction will not be sampled. Please use the ${a} instrumentation to start transactions.`),e.sampled=!1);let r=new mm(e,this);return r=bm(r,i,{parentSampled:e.parentSampled,transactionContext:e,...t}),r.sampled&&r.initSpanRecorder(i._experiments&&i._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",r),r}function xm(e,t,n,i,a,s,r){const o=e.getClient(),c=o&&o.getOptions()||{};let l=new _m(t,e,n,i,r,a);return l=bm(l,c,{parentSampled:t.parentSampled,transactionContext:t,...s}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",l),l}function Em(){const e=nm();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=wm),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=vm),lm||(lm=!0,$p("error",um),$p("unhandledrejection",um)))}function Sm(e,t){return am().captureException(e,{captureContext:t})}const km="7";function Tm(e,t){return n={sentry_key:e.publicKey,sentry_version:km,...t&&{sentry_client:`${t.name}/${t.version}`}},Object.keys(n).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`)).join("&");var n}const Rm=[];function Im(e){const t=e.defaultIntegrations||[],n=e.integrations;let i;t.forEach((e=>{e.isDefaultInstance=!0})),i=Array.isArray(n)?[...t,...n]:"function"==typeof n?sh(n(t)):t;const a=function(e){const t={};return e.forEach((e=>{const{name:n}=e,i=t[n];i&&!i.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.keys(t).map((e=>t[e]))}(i),s=function(e,t){for(let n=0;n<e.length;n++)if(!0===t(e[n]))return n;return-1}(a,(e=>"Debug"===e.name));if(-1!==s){const[e]=a.splice(s,1);a.push(e)}return a}function Am(e,t,n){if(n[t.name]=t,-1===Rm.indexOf(t.name)&&(t.setupOnce(Hh,am),Rm.push(t.name)),e.on&&"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,i)=>n(t,i,e)))}if(e.addEventProcessor&&"function"==typeof t.processEvent){const n=t.processEvent.bind(t),i=Object.assign(((t,i)=>n(t,i,e)),{id:t.name});e.addEventProcessor(i)}("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`Integration installed: ${t.name}`)}function Cm(e,t,n,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:r=1e3}=e,o={...t,event_id:t.event_id||n.event_id||Qp(),timestamp:t.timestamp||wh()},c=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:i,dist:a,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:Vh);void 0===e.release&&void 0!==i&&(e.release=i);void 0===e.dist&&void 0!==a&&(e.dist=a);e.message&&(e.message=Hd(e.message,s));const r=e.exception&&e.exception.values&&e.exception.values[0];r&&r.value&&(r.value=Hd(r.value,s));const o=e.request;o&&o.url&&(o.url=Hd(o.url,s))}(o,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(o,c),void 0===t.type&&function(e,t){const n=np._sentryDebugIds;if(!n)return;let i;const a=Om.get(t);a?i=a:(i=new Map,Om.set(t,i));const s=Object.keys(n).reduce(((e,a)=>{let s;const r=i.get(a);r?s=r:(s=t(a),i.set(a,s));for(let t=s.length-1;t>=0;t--){const i=s[t];if(i.filename){e[i.filename]=n[a];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=s[e.filename])}))}))}catch(e){}}(o,e.stackParser);let l=i;n.captureContext&&(l=Jh.clone(l).update(n.captureContext));let u=dh(o);if(l){if(l.getAttachments){const e=[...n.attachments||[],...l.getAttachments()];e.length&&(n.attachments=e)}u=l.applyToEvent(o,n)}return u.then((e=>a&&a.getEventProcessors?Wh(a.getEventProcessors(),e,n):e)).then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach((e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})}))}(e),"number"==typeof s&&s>0?function(e,t,n){if(!e)return null;const i={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:oh(e.data,t,n)}})))},...e.user&&{user:oh(e.user,t,n)},...e.contexts&&{contexts:oh(e.contexts,t,n)},...e.extra&&{extra:oh(e.extra,t,n)}};e.contexts&&e.contexts.trace&&i.contexts&&(i.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(i.contexts.trace.data=oh(e.contexts.trace.data,t,n)));e.spans&&(i.spans=e.spans.map((e=>(e.data&&(e.data=oh(e.data,t,n)),e))));return i}(e,s,r):e)))}const Om=new WeakMap;const Lm="Not capturing exception because it's already been captured.";class jm{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=gp(e.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("No DSN provided, client will not do anything."),this._dsn){const t=function(e,t={}){const n="string"==typeof t?t:t.tunnel,i="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${Tm(e,i)}`}(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(ah(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(Lm));let i=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{i=e}))),i}captureMessage(e,t,n,i){let a=n&&n.event_id;const s=zd(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(s.then((e=>this._captureEvent(e,n,i))).then((e=>{a=e}))),a}captureEvent(e,t,n){if(t&&t.originalException&&ah(t.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(Lm));let i=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((e=>{i=e}))),i}captureSession(e){this._isEnabled()?"string"!=typeof e.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Zh(e,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e)))):dh(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&Am(e,t,n)})),n}(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){Am(this,e,this._integrations)}sendEvent(e,t={}){if(this.emit("beforeSendEvent",e,t),this._dsn){let n=function(e,t,n,i){const a=Bh(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const r=$h(e,a,i,t);return delete e.sdkProcessingMetadata,jh(r,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Uh(n,Nh(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(n);i&&i.then((t=>this.emit("afterSendEvent",e,t)),null)}}sendSession(e){if(this._dsn){const t=function(e,t,n,i){const a=Bh(n);return jh({sent_at:(new Date).toISOString(),...a&&{sdk:a},...!!i&&{dsn:mp(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n=`${e}:${t}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach((e=>e(...t)))}_updateSessionFromEvent(e,t){let n=!1,i=!1;const a=t.exception&&t.exception.values;if(a){i=!0;for(const e of a){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Zh(e,{...n&&{status:"crashed"},errors:e.errors||Number(i||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new hh((t=>{let n=0;const i=setInterval((()=>{0==this._numProcessing?(clearInterval(i),t(!0)):(n+=1,e&&n>=e&&(clearInterval(i),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit("preprocessEvent",e,t),Cm(i,e,t,n,this).then((e=>{if(null===e)return e;const{propagationContext:t}=e.sdkProcessingMetadata||{};if(!(e.contexts&&e.contexts.trace)&&t){const{traceId:i,spanId:a,parentSpanId:s,dsc:r}=t;e.contexts={trace:{trace_id:i,span_id:a,parent_span_id:s},...e.contexts};const o=r||hm(i,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:o,...e.sdkProcessingMetadata}}return e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const t=e;"log"===t.logLevel?pp.log(t.message):pp.warn(t)}}))}_processEvent(e,t,n){const i=this.getOptions(),{sampleRate:a}=i;if(!this._isEnabled())return ph(new yp("SDK not enabled, will not capture event.","log"));const s=Pm(e),r=Um(e),o=e.type||"error",c=`before send for type \`${o}\``;if(r&&"number"==typeof a&&Math.random()>a)return this.recordDroppedEvent("sample_rate","error",e),ph(new yp(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const l="replay_event"===o?"replay":o;return this._prepareEvent(e,t,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,e),new yp("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const a=function(e,t,n){const{beforeSend:i,beforeSendTransaction:a}=e;if(Um(t)&&i)return i(t,n);if(Pm(t)&&a)return a(t,n);return t}(i,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(qd(e))return e.then((e=>{if(!Bd(e)&&null!==e)throw new yp(n);return e}),(e=>{throw new yp(`${t} rejected with ${e}`)}));if(!Bd(e)&&null!==e)throw new yp(n);return e}(a,c)})).then((i=>{if(null===i)throw this.recordDroppedEvent("before_send",l,e),new yp(`${c} returned \`null\`, will not send event.`,"log");const a=n&&n.getSession();!s&&a&&this._updateSessionFromEvent(a,i);const r=i.transaction_info;if(s&&r&&i.transaction!==e.transaction){const e="custom";i.transaction_info={...r,source:e}}return this.sendEvent(i,t),i})).then(null,(e=>{if(e instanceof yp)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new yp(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",e),this._transport.send(e).then(null,(e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("Error while sending event:",e)}));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,i]=t.split(":");return{reason:n,category:i,quantity:e[t]}}))}}function Um(e){return void 0===e.type}function Pm(e){return"transaction"===e.type}const Fm=30;function Dm(e,t,n=mh(e.bufferSize||Fm)){let i={};function a(a){const s=[];if(Ph(a,((t,n)=>{const a=zh(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(i,a)){const i=Nm(t,n);e.recordDroppedEvent("ratelimit_backoff",a,i)}else s.push(t)})),0===s.length)return dh();const r=jh(a[0],s),o=t=>{Ph(r,((n,i)=>{const a=Nm(n,i);e.recordDroppedEvent(t,zh(i),a)}))};return n.add((()=>t({body:Dh(r,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=Yh(i,e),e)),(e=>{throw o("network_error"),e})))).then((e=>e),(e=>{if(e instanceof yp)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("Skipped sending event because buffer is full."),o("queue_overflow"),dh();throw e}))}return a.__sentry__baseTransport__=!0,{send:a,flush:e=>n.drain(e)}}function Nm(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}const Mm="7.70.0";let zm;class Bm{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=Bm.id}setupOnce(){zm=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=wp(this)||this;return zm.apply(t,e)}}catch(e){}}}Bm.__initStatic();const $m=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],qm=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class Ym{static __initStatic(){this.id="InboundFilters"}constructor(e={}){this.name=Ym.id,this._options=e}setupOnce(e,t){const n=e=>{const n=t();if(n){const t=n.getIntegration(Ym);if(t){const i=n.getClient(),a=i?i.getOptions():{},s=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:$m],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:qm],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(t._options,a);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${th(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(e){}n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`));"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||0!==t.length||pp.error(`Could not extract message for event ${th(e)}`);return t}(e).some((e=>Zd(e,t)))}(e,t.ignoreErrors))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${th(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Zd(n,t)}(e,t.ignoreTransactions))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${th(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=Vm(e);return!!n&&Zd(n,t)}(e,t.denyUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${th(e)}.\nUrl: ${Vm(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=Vm(e);return!n||Zd(n,t)}(e,t.allowUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${th(e)}.\nUrl: ${Vm(e)}`),!0;return!1}(e,s)?null:e}}return e};n.id=this.name,e(n)}}function Vm(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error(`Cannot extract url for event ${th(e)}`),null}}Ym.__initStatic();const Gm=np;let Hm=0;function Wm(){return Hm>0}function Km(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(wp(e))return e}catch(t){return e}const i=function(){const i=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const a=i.map((e=>Km(e,t)));return e.apply(this,a)}catch(e){throw Hm++,setTimeout((()=>{Hm--})),a=n=>{n.addEventProcessor((e=>(t.mechanism&&(nh(e,void 0,void 0),ih(e,t.mechanism)),e.extra={...e.extra,arguments:i},e))),Sm(e)},am().withScope(a),e}var a};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}catch(e){}bp(i,e),vp(e,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>e.name})}catch(e){}return i}function Zm(e,t){const n=Xm(e,t),i={type:t&&t.name,value:ef(t)};return n.length&&(i.stacktrace={frames:n}),void 0===i.type&&""===i.value&&(i.value="Unrecoverable error caught"),i}function Jm(e,t){return{exception:{values:[Zm(e,t)]}}}function Xm(e,t){const n=t.stacktrace||t.stack||"",i=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Qm.test(e.message))return 1}return 0}(t);try{return e(n,i)}catch(e){}return[]}const Qm=/Minified React error #\d+;/i;function ef(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function tf(e,t,n,i,a){let s;if(Dd(t)&&t.error){return Jm(e,t.error)}if(Nd(t)||Fd(t,"DOMException")){const a=t;if("stack"in t)s=Jm(e,t);else{const t=a.name||(Nd(a)?"DOMError":"DOMException"),r=a.message?`${t}: ${a.message}`:t;s=nf(e,r,n,i),nh(s,r)}return"code"in a&&(s.tags={...s.tags,"DOMException.code":`${a.code}`}),s}if(Pd(t))return Jm(e,t);if(Bd(t)||$d(t)){return s=function(e,t,n,i){const a=am().getClient(),s=a&&a.getOptions().normalizeDepth,r={exception:{values:[{type:$d(t)?t.constructor.name:i?"UnhandledRejection":"Error",value:af(t,{isUnhandledRejection:i})}]},extra:{__serialized__:ch(t,s)}};if(n){const t=Xm(e,n);t.length&&(r.exception.values[0].stacktrace={frames:t})}return r}(e,t,n,a),ih(s,{synthetic:!0}),s}return s=nf(e,t,n,i),nh(s,`${t}`,void 0),ih(s,{synthetic:!0}),s}function nf(e,t,n,i){const a={message:t};if(i&&n){const i=Xm(e,n);i.length&&(a.exception={values:[{value:t,stacktrace:{frames:i}}]})}return a}function af(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(xp(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Hd(n[0],t);for(let e=n.length;e>0;e--){const i=n.slice(0,e).join(", ");if(!(i.length>t))return e===n.length?i:Hd(i,t)}return""}(e),i=t?"promise rejection":"exception";if(Dd(e))return`Event \`ErrorEvent\` captured as ${i} with message \`${e.message}\``;if($d(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${i}`}return`Object captured as ${i} with keys: ${n}`}class sf extends jm{constructor(e){const t=Gm.SENTRY_SDK_SOURCE||"npm";e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${t}:@sentry/browser`,version:Mm}],version:Mm},super(e),e.sendClientReports&&Gm.document&&Gm.document.addEventListener("visibilitychange",(()=>{"hidden"===Gm.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,i){const a=tf(e,t,n&&n.syntheticException||void 0,i);return ih(a),a.level="error",n&&n.event_id&&(a.event_id=n.event_id),dh(a)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",i,a){const s=nf(e,t,i&&i.syntheticException||void 0,a);return s.level=n,i&&i.event_id&&(s.event_id=i.event_id),dh(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:i}){const a={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!i&&{dsn:mp(i)}},s=function(e){return[{type:"user_report"},e]}(e);return jh(a,[s])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("Sending outcomes:",e);const t=(n=e,jh((i=this._options.tunnel&&mp(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:a||wh(),discarded_events:n}]]));var n,i,a;this._sendEnvelope(t)}}let rf;function of(e,t=function(){if(rf)return rf;if(Pp(Gm.fetch))return rf=Gm.fetch.bind(Gm);const e=Gm.document;let t=Gm.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const i=n.contentWindow;i&&i.fetch&&(t=i.fetch),e.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return rf=t.bind(Gm)}()){let n=0,i=0;return Dm(e,(function(a){const s=a.body.length;n+=s,i++;const r={body:a.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&i<15,...e.fetchOptions};try{return t(e.url,r).then((e=>(n-=s,i--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return rf=void 0,n-=s,i--,ph(e)}}))}const cf=4;function lf(e){return Dm(e,(function(t){return new hh(((n,i)=>{const a=new XMLHttpRequest;a.onerror=i,a.onreadystatechange=()=>{a.readyState===cf&&n({statusCode:a.status,headers:{"x-sentry-rate-limits":a.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":a.getResponseHeader("Retry-After")}})},a.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&a.setRequestHeader(t,e.headers[t]);a.send(t.body)}))}))}const uf="?";function df(e,t,n,i){const a={filename:e,function:t,in_app:!0};return void 0!==n&&(a.lineno=n),void 0!==i&&(a.colno=i),a}const pf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hf=/\((\S*)(?::(\d+))(?::(\d+))\)/,mf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ff=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gf=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,yf=Cp(...[[30,e=>{const t=pf.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=hf.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=_f(t[1]||uf,t[2]);return df(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{const t=mf.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ff.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||uf;return[n,e]=_f(n,e),df(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,e=>{const t=gf.exec(e);return t?df(t[2],t[1]||uf,+t[3],t[4]?+t[4]:void 0):void 0}]]),_f=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),i=-1!==e.indexOf("safari-web-extension");return n||i?[-1!==e.indexOf("@")?e.split("@")[0]:uf,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};class vf{static __initStatic(){this.id="GlobalHandlers"}constructor(e){this.name=vf.id,this._options={onerror:!0,onunhandledrejection:!0,...e},this._installFunc={onerror:bf,onunhandledrejection:wf}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const n in e){const i=this._installFunc[n];i&&e[n]&&(t=n,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`Global Handler attached: ${t}`),i(),this._installFunc[n]=void 0)}var t}}function bf(){$p("error",(e=>{const[t,n,i]=Sf();if(!t.getIntegration(vf))return;const{msg:a,url:s,line:r,column:o,error:c}=e;if(Wm()||c&&c.__sentry_own_request__)return;const l=void 0===c&&Md(a)?function(e,t,n,i){const a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=Dd(e)?e.message:e,r="Error";const o=s.match(a);o&&(r=o[1],s=o[2]);const c={exception:{values:[{type:r,value:s}]}};return xf(c,t,n,i)}(a,s,r,o):xf(tf(n,c||a,void 0,i,!1),s,r,o);l.level="error",Ef(t,c,l,"onerror")}))}function wf(){$p("unhandledrejection",(e=>{const[t,n,i]=Sf();if(!t.getIntegration(vf))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch(e){}if(Wm()||a&&a.__sentry_own_request__)return!0;const s=zd(a)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(a)}`}]}}:tf(n,a,void 0,i,!0);s.level="error",Ef(t,a,s,"onunhandledrejection")}))}function xf(e,t,n,i){const a=e.exception=e.exception||{},s=a.values=a.values||[],r=s[0]=s[0]||{},o=r.stacktrace=r.stacktrace||{},c=o.frames=o.frames||[],l=isNaN(parseInt(i,10))?void 0:i,u=isNaN(parseInt(n,10))?void 0:n,d=Md(t)&&t.length>0?t:function(){try{return sp.document.location.href}catch(e){return""}}();return 0===c.length&&c.push({colno:l,filename:d,function:"?",in_app:!0,lineno:u}),e}function Ef(e,t,n,i){ih(n,{handled:!1,type:i}),e.captureEvent(n,{originalException:t})}function Sf(){const e=am(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}vf.__initStatic();const kf=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Tf{static __initStatic(){this.id="TryCatch"}constructor(e){this.name=Tf.id,this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&_p(Gm,"setTimeout",Rf),this._options.setInterval&&_p(Gm,"setInterval",Rf),this._options.requestAnimationFrame&&_p(Gm,"requestAnimationFrame",If),this._options.XMLHttpRequest&&"XMLHttpRequest"in Gm&&_p(XMLHttpRequest.prototype,"send",Af);const e=this._options.eventTarget;if(e){(Array.isArray(e)?e:kf).forEach(Cf)}}}function Rf(e){return function(...t){const n=t[0];return t[0]=Km(n,{mechanism:{data:{function:Lp(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function If(e){return function(t){return e.apply(this,[Km(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Lp(e)},handled:!1,type:"instrument"}})])}}function Af(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&_p(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Lp(t)},handled:!1,type:"instrument"}},i=wp(t);return i&&(n.mechanism.data.handler=Lp(i)),Km(t,n)}))})),e.apply(this,t)}}function Cf(e){const t=Gm,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(_p(n,"addEventListener",(function(t){return function(n,i,a){try{"function"==typeof i.handleEvent&&(i.handleEvent=Km(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Lp(i),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,Km(i,{mechanism:{data:{function:"addEventListener",handler:Lp(i),target:e},handled:!1,type:"instrument"}}),a])}})),_p(n,"removeEventListener",(function(e){return function(t,n,i){const a=n;try{const n=a&&a.__sentry_wrapped__;n&&e.call(this,t,n,i)}catch(e){}return e.call(this,t,a,i)}})))}Tf.__initStatic();const Of=1024;class Lf{static __initStatic(){this.id="Breadcrumbs"}constructor(e){this.name=Lf.id,this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){if(this.options.console&&$p("console",Uf),this.options.dom&&$p("dom",function(e){function t(t){let n,i="object"==typeof e?e.serializeAttribute:void 0,a="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;a&&a>Of&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=Of),"string"==typeof i&&(i=[i]);try{const e=t.event;n=function(e){return!!e&&!!e.target}(e)?op(e.target,{keyAttrs:i,maxStringLength:a}):op(e,{keyAttrs:i,maxStringLength:a})}catch(e){n="<unknown>"}0!==n.length&&am().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&$p("xhr",Pf),this.options.fetch&&$p("fetch",Ff),this.options.history&&$p("history",Df),this.options.sentry){const e=am().getClient();e&&e.on&&e.on("beforeSendEvent",jf)}}}function jf(e){am().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:th(e)},{event:e})}function Uf(e){const t={category:"console",data:{arguments:e.args,logger:"console"},level:(n=e.level,"warn"===n?"warning":gh.includes(n)?n:"log"),message:Wd(e.args," ")};var n;if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${Wd(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}am().addBreadcrumb(t,{input:e.args,level:e.level})}function Pf(e){const{startTimestamp:t,endTimestamp:n}=e,i=e.xhr[Np];if(!t||!n||!i)return;const{method:a,url:s,status_code:r,body:o}=i,c={method:a,url:s,status_code:r},l={xhr:e.xhr,input:o,startTimestamp:t,endTimestamp:n};am().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function Ff(e){const{startTimestamp:t,endTimestamp:n}=e;if(n&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){const i=e.fetchData,a={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};am().addBreadcrumb({category:"fetch",data:i,level:"error",type:"http"},a)}else{const i={...e.fetchData,status_code:e.response&&e.response.status},a={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};am().addBreadcrumb({category:"fetch",data:i,type:"http"},a)}}function Df(e){let t=e.from,n=e.to;const i=fh(Gm.location.href);let a=fh(t);const s=fh(n);a.path||(a=i),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),i.protocol===a.protocol&&i.host===a.host&&(t=a.relative),am().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}Lf.__initStatic();class Nf{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this.name=Nf.id,this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){}preprocessEvent(e,t,n){const i=n.getOptions();Jd(Zm,i.stackParser,i.maxValueLength,this._key,this._limit,e,t)}}Nf.__initStatic();class Mf{static __initStatic(){this.id="HttpContext"}constructor(){this.name=Mf.id}setupOnce(){Hh((e=>{if(am().getIntegration(Mf)){if(!Gm.navigator&&!Gm.location&&!Gm.document)return e;const t=e.request&&e.request.url||Gm.location&&Gm.location.href,{referrer:n}=Gm.document||{},{userAgent:i}=Gm.navigator||{},a={...e.request&&e.request.headers,...n&&{Referer:n},...i&&{"User-Agent":i}},s={...e.request,...t&&{url:t},headers:a};return{...e,request:s}}return e}))}}Mf.__initStatic();class zf{static __initStatic(){this.id="Dedupe"}constructor(){this.name=zf.id}setupOnce(e,t){const n=e=>{if(e.type)return e;const n=t().getIntegration(zf);if(n){try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,i=t.message;if(!n&&!i)return!1;if(n&&!i||!n&&i)return!1;if(n!==i)return!1;if(!$f(e,t))return!1;if(!Bf(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=qf(t),i=qf(e);if(!n||!i)return!1;if(n.type!==i.type||n.value!==i.value)return!1;if(!$f(e,t))return!1;if(!Bf(e,t))return!1;return!0}(e,t))return!0;return!1}(e,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function Bf(e,t){let n=Yf(e),i=Yf(t);if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;if(i.length!==n.length)return!1;for(let e=0;e<i.length;e++){const t=i[e],a=n[e];if(t.filename!==a.filename||t.lineno!==a.lineno||t.colno!==a.colno||t.function!==a.function)return!1}return!0}function $f(e,t){let n=e.fingerprint,i=t.fingerprint;if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;try{return!(n.join("")!==i.join(""))}catch(e){return!1}}function qf(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Yf(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){return}}zf.__initStatic();const Vf=[new Ym,new Bm,new Tf,new Lf,new vf,new Nf,new zf,new Mf];function Gf(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=Vf),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),Gm.SENTRY_RELEASE&&Gm.SENTRY_RELEASE.id&&(e.release=Gm.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:(n=e.stackParser||yf,Array.isArray(n)?Cp(...n):n),integrations:Im(e),transport:e.transport||(Up()?of:lf)};var n;!function(e,t){!0===t.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?pp.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=am();n.getScope().update(t.initialScope);const i=new e(t);n.bindClient(i)}(sf,t),e.autoSessionTracking&&function(){if(void 0===Gm.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));const e=am();if(!e.captureSession)return;Hf(e),$p("history",(({from:e,to:t})=>{void 0!==e&&e!==t&&Hf(am())}))}()}function Hf(e){e.startSession({ignoreDuration:!0}),e.captureSession()}const Wf=np,Kf="sentryReplaySession",Zf="replay_event",Jf="Unable to send Replay",Xf=15e4,Qf=5e3,eg=2e7,tg=36e5;var ng;function ig(e){const t=null==e?void 0:e.host;return Boolean(t&&t.shadowRoot&&t.shadowRoot===e)}function ag({maskInputOptions:e,tagName:t,type:n}){"option"===t.toLowerCase()&&(t="select");const i="string"==typeof n?n.toLowerCase():void 0;return e[t.toLowerCase()]||i&&e[i]||"password"===i||"input"===t&&!n&&e.text}function sg({input:e,maskInputSelector:t,unmaskInputSelector:n,maskInputOptions:i,tagName:a,type:s,value:r,maskInputFn:o}){let c=r||"";return n&&e.matches(n)||(e.hasAttribute("data-rr-is-password")&&(s="password"),(ag({maskInputOptions:i,tagName:a,type:s})||t&&e.matches(t))&&(c=o?o(c):"*".repeat(c.length))),c}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(ng||(ng={}));const rg="__rrweb_original__";function og(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}function cg(e,t,n){return"string"==typeof n&&n.toLowerCase(),"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}let lg=1;const ug=new RegExp("[^a-z0-9-_:]"),dg=-2;function pg(e){return e?e.replace(/[\S]/g,"*"):""}function hg(e){try{const t=e.rules||e.cssRules;return t?Array.from(t).map(mg).join(""):null}catch(e){return null}}function mg(e){let t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=hg(e.styleSheet)||t}catch(e){}return fg(t)}function fg(e){if(e.indexOf(":")>-1){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}return e}let gg,yg;const _g=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,vg=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,bg=/^(data:)([^,]*),(.*)/i;function wg(e,t){return(e||"").replace(_g,((e,n,i,a,s,r)=>{const o=i||s||r,c=n||a||"";if(!o)return e;if(!vg.test(o))return`url(${c}${o}${c})`;if(bg.test(o))return`url(${c}${o}${c})`;if("/"===o[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+o}${c})`;const l=t.split("/"),u=o.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`}))}const xg=/^[^ \t\n\r\u000c]+/,Eg=/^[, \t\n\r\u000c]+/;function Sg(e,t){if(!t||""===t.trim())return t;const n=e.createElement("a");return n.href=t,n.href}function kg(){const e=document.createElement("a");return e.href="",e.href}function Tg(e,t,n,i,a,s,r,o){if(!a)return a;const c=i.toLowerCase(),l=n.toLowerCase();return"src"===c||"href"===c||"xlink:href"===c&&"#"!==a[0]?Sg(e,a):"background"!==c||"table"!==l&&"td"!==l&&"th"!==l?"srcset"===c?function(e,t){if(""===t.trim())return t;let n=0;function i(e){let i,a=e.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}let a=[];for(;i(Eg),!(n>=t.length);){let s=i(xg);if(","===s.slice(-1))s=Sg(e,s.substring(0,s.length-1)),a.push(s);else{let i="";s=Sg(e,s);let r=!1;for(;;){let e=t.charAt(n);if(""===e){a.push((s+i).trim());break}if(r)")"===e&&(r=!1);else{if(","===e){n+=1,a.push((s+i).trim());break}"("===e&&(r=!0)}i+=e,n+=1}}}return a.join(", ")}(e,a):"style"===c?wg(a,kg()):"object"===l&&"data"===c?Sg(e,a):s&&function(e,t,n,i){if(i&&e.matches(i))return!1;return["placeholder","title","aria-label"].indexOf(t)>-1||"input"===n&&"value"===t&&e.hasAttribute("type")&&["submit","button"].indexOf(e.getAttribute("type").toLowerCase())>-1}(t,c,l,r)?o?o(a):pg(a):a:Sg(e,a)}function Rg(e,t,n,i,a){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return Rg(e.parentNode,t,n,i,a);if(i&&(e.matches(i)||e.closest(i)))return!1;if(a)return!0;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=0;n<e.classList.length;n++){const i=e.classList[n];if(t.test(i))return!0}return!(!n||!e.matches(n))||Rg(e.parentNode,t,n,i,a)}function Ig(e,t){var n;const{doc:i,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:u,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:m={},maskTextFn:f,maskInputFn:g,dataURLOptions:y={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:b}=t;let w;if(i.__sn){const e=i.__sn.id;w=1===e?void 0:e}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:ng.Document,childNodes:[],compatMode:e.compatMode,rootId:w}:{type:ng.Document,childNodes:[],rootId:w};case e.DOCUMENT_TYPE_NODE:return{type:ng.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:const t=function(e,t,n,i){if(i&&e.matches(i))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=0;n<e.classList.length;n++){const i=e.classList[n];if(t.test(i))return!0}return!!n&&e.matches(n)}(e,a,s,r),S=function(e){if(e instanceof HTMLFormElement)return"form";const t=e.tagName.toLowerCase().trim();return ug.test(t)?"div":t}(e);let k={};for(const{name:t,value:n}of Array.from(e.attributes))Og(S,t)||(k[t]=Tg(i,e,S,t,n,h,l,f));if("link"===S&&u){const t=Array.from(i.styleSheets).find((t=>t.href===e.href));let n=null;t&&(n=hg(t)),n&&(delete k.rel,delete k.href,k._cssText=wg(n,t.href))}if("style"===S&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=hg(e.sheet);t&&(k._cssText=wg(t,kg()))}if("input"===S||"textarea"===S||"select"===S||"option"===S){const t=e,n=og(t),i=cg(t,S.toUpperCase(),n),a=e.checked;"submit"!==n&&"button"!==n&&i&&(k.value=sg({input:t,type:n,tagName:S,value:i,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:m,maskInputFn:g})),a&&(k.checked=a)}if("option"===S&&(e.selected&&!m.select?k.selected=!0:delete k.selected),"canvas"===S&&v)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let i=0;i<e.height;i+=50){const a=t.getImageData,s=rg in a?a[rg]:a;if(new Uint32Array(s.call(t,n,i,Math.min(50,e.width-n),Math.min(50,e.height-i)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(k.rr_dataURL=e.toDataURL(y.type,y.quality));else if(!("__context"in e)){const t=e.toDataURL(y.type,y.quality),n=document.createElement("canvas");n.width=e.width,n.height=e.height;t!==n.toDataURL(y.type,y.quality)&&(k.rr_dataURL=t)}if("img"===S&&_){gg||(gg=i.createElement("canvas"),yg=gg.getContext("2d"));const t=e,n=t.crossOrigin;t.crossOrigin="anonymous";const a=()=>{try{gg.width=t.naturalWidth,gg.height=t.naturalHeight,yg.drawImage(t,0,0),k.rr_dataURL=gg.toDataURL(y.type,y.quality)}catch(e){console.warn(`Cannot inline img src=${t.currentSrc}! Error: ${e}`)}n?k.crossOrigin=n:delete k.crossOrigin};t.complete&&0!==t.naturalWidth?a():t.onload=a}if("audio"!==S&&"video"!==S||(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop),t){const{width:t,height:n}=e.getBoundingClientRect();k={class:k.class,rr_width:`${t}px`,rr_height:`${n}px`}}return"iframe"!==S||b(k.src)||(e.contentDocument||(k.rr_src=k.src),delete k.src),{type:ng.Element,tagName:S,attributes:k,childNodes:[],isSVG:(E=e,Boolean("svg"===E.tagName||E.ownerSVGElement)||void 0),needBlock:t,rootId:w};case e.TEXT_NODE:const T=e.parentNode&&e.parentNode.tagName;let R=e.textContent;const I="STYLE"===T||void 0,A="SCRIPT"===T||void 0;if(I&&R){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(R=(x=e.parentNode.sheet).cssRules?Array.from(x.cssRules).map((e=>e.cssText?fg(e.cssText):"")).join(""):"")}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}R=wg(R,kg())}if(A&&(R="SCRIPT_PLACEHOLDER"),"TEXTAREA"===T&&R)R="";else if("OPTION"===T&&R){R=sg({input:e.parentNode,type:null,tagName:T,value:R,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:m,maskInputFn:g})}else!I&&!A&&Rg(e,o,c,l,h)&&R&&(R=f?f(R):pg(R));return{type:ng.Text,textContent:R||"",isStyle:I,rootId:w};case e.CDATA_SECTION_NODE:return{type:ng.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:ng.Comment,textContent:e.textContent||"",rootId:w};default:return!1}var x,E}function Ag(e){return null==e?"":e.toLowerCase()}function Cg(e,t){const{doc:n,map:i,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u=!1,inlineStylesheet:d=!0,maskInputSelector:p,unmaskInputSelector:h,maskAllText:m,maskInputOptions:f={},maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:w=!1,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:S=5e3,keepIframeSrcFn:k=(()=>!1)}=t;let{preserveWhiteSpace:T=!0}=t;const R=Ig(e,{doc:n,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:m,maskInputOptions:f,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:b,recordCanvas:w,keepIframeSrcFn:k});if(!R)return console.warn(e,"not serialized"),null;let I;I="__sn"in e?e.__sn.id:!function(e,t){if(t.comment&&e.type===ng.Comment)return!0;if(e.type===ng.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&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Ag(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ag(e.attributes.name)||"icon"===Ag(e.attributes.rel)||"apple-touch-icon"===Ag(e.attributes.rel)||"shortcut icon"===Ag(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Ag(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ag(e.attributes.property).match(/^(og|twitter|fb):/)||Ag(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ag(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Ag(e.attributes.name)||"googlebot"===Ag(e.attributes.name)||"bingbot"===Ag(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Ag(e.attributes.name)||"generator"===Ag(e.attributes.name)||"framework"===Ag(e.attributes.name)||"publisher"===Ag(e.attributes.name)||"progid"===Ag(e.attributes.name)||Ag(e.attributes.property).match(/^article:/)||Ag(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Ag(e.attributes.name)||"yandex-verification"===Ag(e.attributes.name)||"csrf-token"===Ag(e.attributes.name)||"p:domain_verify"===Ag(e.attributes.name)||"verify-v1"===Ag(e.attributes.name)||"verification"===Ag(e.attributes.name)||"shopify-checkout-api-token"===Ag(e.attributes.name)))return!0}}return!1}(R,_)&&(T||R.type!==ng.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?lg++:dg;const A=Object.assign(R,{id:I});if(e.__sn=A,I===dg)return null;i[I]=e,x&&x(e);let C=!u;if(A.type===ng.Element&&(C=C&&!A.needBlock,delete A.needBlock,e.shadowRoot&&(A.isShadowHost=!0)),(A.type===ng.Document||A.type===ng.Element)&&C){_.headWhitespace&&R.type===ng.Element&&"head"===R.tagName&&(T=!1);const t={doc:n,map:i,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:m,maskInputOptions:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:w,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:k};for(const n of Array.from(e.childNodes)){const e=Cg(n,t);e&&A.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const e=Cg(n,t);e&&(e.isShadow=!0,A.childNodes.push(e))}}return e.parentNode&&ig(e.parentNode)&&(A.isShadow=!0),A.type===ng.Element&&"iframe"===A.tagName&&function(e,t,n){const i=e.contentWindow;if(!i)return;let a,s=!1;try{a=i.document.readyState}catch(e){return}if("complete"!==a){const i=setTimeout((()=>{s||(t(),s=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(i),s=!0,t()}))}const r="about:blank";i.location.href===r&&e.src!==r&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}(e,(()=>{const t=e.contentDocument;if(t&&E){const n=Cg(t,{doc:t,map:i,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:m,maskInputOptions:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:w,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:k});n&&E(e,n)}}),S),A}function Og(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}var Lg,jg,Ug,Pg,Fg,Dg;function Ng(e,t,n=document){const i={capture:!0,passive:!0};return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin"}(Lg||(Lg={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration"}(jg||(jg={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel"}(Ug||(Ug={})),function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(Pg||(Pg={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(Fg||(Fg={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(Dg||(Dg={}));const Mg="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.";let zg={map:{},getId:()=>(console.error(Mg),-1),getNode:()=>(console.error(Mg),null),removeNodeFromMap(){console.error(Mg)},has:()=>(console.error(Mg),!1),reset(){console.error(Mg)}};function Bg(e,t,n={}){let i=null,a=0;return function(s){let r=Date.now();a||!1!==n.leading||(a=r);let o=t-(r-a),c=this,l=arguments;o<=0||o>t?(i&&(clearTimeout(i),i=null),a=r,e.apply(c,l)):i||!1===n.trailing||(i=setTimeout((()=>{a=!1===n.leading?0:Date.now(),i=null,e.apply(c,l)}),o))}}function $g(e,t,n,i,a=window){const s=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,i?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),s&&s.set&&s.set.call(this,e)}}),()=>$g(e,t,s||{},!0)}function qg(e,t,n){try{if(!(t in e))return()=>{};const i=e[t],a=n(i);return"function"==typeof a&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=a,()=>{e[t]=i}}catch(e){return()=>{}}}function Yg(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Vg(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Gg(e,t,n,i){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){let a=!1;const s=i&&e.matches(i);return"string"==typeof t?a=void 0!==e.closest?!s&&null!==e.closest("."+t):!s&&e.classList.contains(t):!s&&e.classList.forEach((e=>{t.test(e)&&(a=!0)})),!a&&n&&(a=e.matches(n)),!s&&a||Gg(e.parentNode,t,n,i)}return e.nodeType,e.TEXT_NODE,Gg(e.parentNode,t,n,i)}function Hg(e){return"__sn"in e&&e.__sn.id===dg}function Wg(e,t){if(ig(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Wg(e.parentNode,t))}function Kg(e){return Boolean(e.changedTouches)}function Zg(e){return"__sn"in e&&(e.__sn.type===ng.Element&&"iframe"===e.__sn.tagName)}function Jg(e){return Boolean(null==e?void 0:e.shadowRoot)}function Xg(e){return"__ln"in e}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(zg=new Proxy(zg,{get:(e,t,n)=>("map"===t&&console.error(Mg),Reflect.get(e,t,n))}));class Qg{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Xg(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Xg(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const ey=(e,t)=>`${e}@${t}`;function ty(e){return"__sn"in e}class ny{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Qg,n=e=>{let t=e,n=dg;for(;n===dg;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{var a,s,r,o,c;const l=i.getRootNode?null===(a=i.getRootNode())||void 0===a?void 0:a.host:null;let u=l;for(;null===(r=null===(s=null==u?void 0:u.getRootNode)||void 0===s?void 0:s.call(u))||void 0===r?void 0:r.host;)u=(null===(c=null===(o=null==u?void 0:u.getRootNode)||void 0===o?void 0:o.call(u))||void 0===c?void 0:c.host)||null;const d=!(this.doc.contains(i)||u&&this.doc.contains(u));if(!i.parentNode||d)return;const p=ig(i.parentNode)?this.mirror.getId(l):this.mirror.getId(i.parentNode),h=n(i);if(-1===p||-1===h)return t.addNode(i);let m=Cg(i,{doc:this.doc,map:this.mirror.map,blockClass:this.blockClass,blockSelector:this.blockSelector,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskAllText:this.maskAllText,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Zg(e)&&this.iframeManager.addIframe(e),Jg(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,document)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)}});m&&e.push({parentId:p,nextId:h,node:m})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)ay(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(const e of this.addedSet)sy(this.droppedSet,e)||ay(this.removes,e,this.mirror)?sy(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let a=null;for(;t.length;){let e=null;if(a){const t=this.mirror.getId(a.value.parentNode),i=n(a.value);-1!==t&&-1!==i&&(e=a)}if(!e)for(let i=t.length-1;i>=0;i--){const a=t.get(i);if(a){const t=this.mirror.getId(a.value.parentNode),i=n(a.value);if(-1!==t&&-1!==i){e=a;break}}}if(!e){for(;t.head;)t.removeNode(t.head.value);break}a=e.previous,t.removeNode(e.value),i(e.value)}const s={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>({id:this.mirror.getId(e.node),attributes:e.attributes}))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=e=>{if(!Hg(e.target))switch(e.type){case"characterData":{const t=e.target.textContent;Gg(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||t===e.oldValue||this.texts.push({value:Rg(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=t.getAttribute(e.attributeName);if("value"===e.attributeName&&(n=sg({input:t,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:t.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),Gg(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||n===e.oldValue)return;let i=this.attributes.find((t=>t.node===e.target));if(i||(i={node:e.target,attributes:{}},this.attributes.push(i)),"type"===e.attributeName&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),"style"===e.attributeName){const n=this.doc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue),void 0!==i.attributes.style&&null!==i.attributes.style||(i.attributes.style={});try{const e=i.attributes.style;for(const i of Array.from(t.style)){const a=t.style.getPropertyValue(i),s=t.style.getPropertyPriority(i);a===n.style.getPropertyValue(i)&&s===n.style.getPropertyPriority(i)||(e[i]=""===s?a:[a,s])}for(const i of Array.from(n.style))""===t.style.getPropertyValue(i)&&(e[i]=!1)}catch(e){console.warn("[rrweb] Error when parsing update to style attribute:",e)}}else{const t=e.target;i.attributes[e.attributeName]=Tg(this.doc,t,t.tagName,e.attributeName,n,this.maskAllText,this.unmaskTextSelector,this.maskTextFn)}break}case"childList":e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),i=ig(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Gg(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||Hg(t)||(this.addedSet.has(t)?(iy(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Wg(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ey(n,i)]?iy(this.movedSet,t):this.removes.push({parentId:i,id:n,isShadow:!!ig(e.target)||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!t||!Gg(t,this.blockClass,this.blockSelector,this.unblockSelector)){if(ty(e)){if(Hg(e))return;this.movedSet.add(e);let n=null;t&&ty(t)&&(n=t.__sn.id),n&&(this.movedMap[ey(e.__sn.id,n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Gg(e,this.blockClass,this.blockSelector,this.unblockSelector)||e.childNodes.forEach((e=>this.genAdds(e)))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskTextClass","maskTextSelector","unmaskTextSelector","maskInputSelector","unmaskInputSelector","inlineStylesheet","maskAllText","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].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 iy(e,t){e.delete(t),t.childNodes.forEach((t=>iy(e,t)))}function ay(e,t,n){const{parentNode:i}=t;if(!i)return!1;const a=n.getId(i);return!!e.some((e=>e.id===a))||ay(e,i,n)}function sy(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||sy(e,n))}const ry=e=>(...t)=>{try{return e(...t)}catch(e){try{e.__rrweb__=!0}catch(e){}throw e}},oy=[];function cy(e){try{if("composedPath"in e){const 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 ly(e,t){var n,i;const a=new ny;oy.push(a),a.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const r=null===(i=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===i?void 0:i.call(n,"MutationObserver");r&&window[r]&&(s=window[r]);const o=new s(ry((t=>{e.onMutation&&!1===e.onMutation(t)||a.processMutations(t)})));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function uy({mouseInteractionCb:e,doc:t,mirror:n,blockClass:i,blockSelector:a,unblockSelector:s,sampling:r}){if(!1===r.mouseInteraction)return()=>{};const o=!0===r.mouseInteraction||void 0===r.mouseInteraction?{}:r.mouseInteraction,c=[];return Object.keys(Ug).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e])).forEach((r=>{const o=r.toLowerCase(),l=ry((t=>r=>{const o=cy(r);if(Gg(o,i,a,s))return;const c=Kg(r)?r.changedTouches[0]:r;if(!c)return;const l=n.getId(o),{clientX:u,clientY:d}=c;ry(e)({type:Ug[t],id:l,x:u,y:d})})(r));c.push(Ng(o,l,t))})),ry((()=>{c.forEach((e=>e()))}))}function dy({scrollCb:e,doc:t,mirror:n,blockClass:i,blockSelector:a,unblockSelector:s,sampling:r}){const o=Bg((r=>{const o=cy(r);if(!o||Gg(o,i,a,s))return;const c=n.getId(o);if(o===t){const n=t.scrollingElement||t.documentElement;ry(e)({id:c,x:n.scrollLeft,y:n.scrollTop})}else ry(e)({id:c,x:o.scrollLeft,y:o.scrollTop})}),r.scroll||100);return Ng("scroll",ry(o),t)}function py(e,t){const n=Object.assign({},e);return t||delete n.userTriggered,n}const hy=["INPUT","TEXTAREA","SELECT"],my=new WeakMap;function fy({inputCb:e,doc:t,mirror:n,blockClass:i,blockSelector:a,unblockSelector:s,ignoreClass:r,ignoreSelector:o,maskInputSelector:c,unmaskInputSelector:l,maskInputOptions:u,maskInputFn:d,sampling:p,userTriggeredOnInput:h}){function m(e){let n=cy(e);const p=n&&n.tagName,m=e.isTrusted;if("OPTION"===p&&(n=n.parentElement),!n||!p||hy.indexOf(p)<0||Gg(n,i,a,s))return;const g=n,y=og(g);if(g.classList.contains(r)||o&&g.matches(o))return;let _=cg(g,p,y),v=!1;"radio"!==y&&"checkbox"!==y||(v=n.checked),function({tagName:e,type:t,maskInputOptions:n,maskInputSelector:i}){return i||ag({maskInputOptions:n,tagName:e,type:t})}({maskInputOptions:u,maskInputSelector:c,tagName:p,type:y})&&(_=sg({input:g,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:y,value:_,maskInputFn:d})),f(n,ry(py)({text:_,isChecked:v,userTriggered:m},h));const b=n.name;"radio"===y&&b&&v&&t.querySelectorAll(`input[type="radio"][name="${b}"]`).forEach((e=>{if(e!==n){const t=sg({input:e,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:y,value:cg(e,p,y),maskInputFn:d});f(e,ry(py)({text:t,isChecked:!v,userTriggered:!1},h))}}))}function f(t,i){const a=my.get(t);if(!a||a.text!==i.text||a.isChecked!==i.isChecked){my.set(t,i);const a=n.getId(t);e(Object.assign(Object.assign({},i),{id:a}))}}const g=("last"===p.input?["change"]:["input","change"]).map((e=>Ng(e,ry(m),t))),y=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),_=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return y&&y.set&&g.push(..._.map((e=>$g(e[0],e[1],{set(){ry(m)({target:this})}})))),ry((()=>{g.forEach((e=>e()))}))}function gy(e){return function(e,t){if(_y("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||_y("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||_y("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||_y("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else{const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function yy(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){const{mutationCb:n,mousemoveCb:i,mouseInteractionCb:a,scrollCb:s,viewportResizeCb:r,inputCb:o,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),i(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),a(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),s(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),r(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),o(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),c(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),l(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)}}(e,t);const i=ly(e,e.doc),a=function({mousemoveCb:e,sampling:t,doc:n,mirror:i}){if(!1===t.mousemove)return()=>{};const a="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let r,o=[];const c=Bg((t=>{const n=Date.now()-r;ry(e)(o.map((e=>(e.timeOffset-=n,e))),t),o=[],r=null}),s),l=Bg((e=>{const t=cy(e),{clientX:n,clientY:a}=Kg(e)?e.changedTouches[0]:e;r||(r=Date.now()),o.push({x:n,y:a,id:i.getId(t),timeOffset:Date.now()-r}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?jg.Drag:e instanceof MouseEvent?jg.MouseMove:jg.TouchMove)}),a,{trailing:!1}),u=[Ng("mousemove",ry(l),n),Ng("touchmove",ry(l),n),Ng("drag",ry(l),n)];return ry((()=>{u.forEach((e=>e()))}))}(e),s=uy(e),r=dy(e),o=function({viewportResizeCb:e}){let t=-1,n=-1;const i=Bg((()=>{const i=Yg(),a=Vg();t===i&&n===a||(ry(e)({width:Number(a),height:Number(i)}),t=i,n=a)}),200);return Ng("resize",ry(i),window)}(e),c=fy(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:i,mirror:a,sampling:s}){const r=r=>Bg(ry((s=>{const o=cy(s);if(!o||Gg(o,t,n,i))return;const{currentTime:c,volume:l,muted:u}=o;e({type:r,id:a.getId(o),currentTime:c,volume:l,muted:u})})),s.media||500),o=[Ng("play",r(0)),Ng("pause",r(1)),Ng("seeked",r(2)),Ng("volumechange",r(3))];return ry((()=>{o.forEach((e=>e()))}))}(e),u=function({styleSheetRuleCb:e,mirror:t},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ry(((n,i,a)=>{const[s,r]=a,o=t.getId(i.ownerNode);return-1!==o&&e({id:o,adds:[{rule:s,index:r}]}),n.apply(i,a)}))});const a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:ry(((n,i,a)=>{const[s]=a,r=t.getId(i.ownerNode);return-1!==r&&e({id:r,removes:[{index:s}]}),n.apply(i,a)}))});const s={};vy("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(vy("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),vy("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),vy("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const r={};return Object.entries(s).forEach((([n,i])=>{r[n]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(r[n].insertRule,{apply:ry(((n,i,a)=>{const[s,r]=a,o=t.getId(i.parentStyleSheet.ownerNode);return-1!==o&&e({id:o,adds:[{rule:s,index:[...gy(i),r||0]}]}),n.apply(i,a)}))}),i.prototype.deleteRule=new Proxy(r[n].deleteRule,{apply:ry(((n,i,a)=>{const[s]=a,r=t.getId(i.parentStyleSheet.ownerNode);return-1!==r&&e({id:r,removes:[{index:[...gy(i),s]}]}),n.apply(i,a)}))})})),ry((()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=a,Object.entries(s).forEach((([e,t])=>{t.prototype.insertRule=r[e].insertRule,t.prototype.deleteRule=r[e].deleteRule}))}))}(e,{win:n}),d=function({styleDeclarationCb:e,mirror:t},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ry(((n,i,a)=>{var s,r;const[o,c,l]=a,u=t.getId(null===(r=null===(s=i.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===r?void 0:r.ownerNode);return-1!==u&&e({id:u,set:{property:o,value:c,priority:l},index:gy(i.parentRule)}),n.apply(i,a)}))});const a=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:ry(((n,i,a)=>{var s,r;const[o]=a,c=t.getId(null===(r=null===(s=i.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===r?void 0:r.ownerNode);return-1!==c&&e({id:c,remove:{property:o},index:gy(i.parentRule)}),n.apply(i,a)}))}),ry((()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=a}))}(e,{win:n}),p=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const i=[],a=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const i=new s(e,t,n);return a.set(i,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),i};const r=qg(t.fonts,"add",(function(t){return function(n){return setTimeout((()=>{const t=a.get(n);t&&(e(t),a.delete(n))}),0),t.apply(this,[n])}}));return i.push((()=>{n.FontFace=s})),i.push(r),ry((()=>{i.forEach((e=>e()))}))}(e):()=>{},h=[];for(const t of e.plugins)h.push(t.observer(t.callback,n,t.options));return ry((()=>{oy.forEach((e=>e.reset())),i.disconnect(),a(),s(),r(),o(),c(),l();try{u(),d()}catch(e){}p(),h.forEach((e=>e()))}))}function _y(e){return void 0!==window[e]}function vy(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class by{constructor(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}addIframe(e){this.iframes.set(e,!0)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)}}class wy{constructor(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const t=this;this.restorePatches.push(qg(HTMLElement.prototype,"attachShadow",(function(e){return function(){const n=e.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),n}})))}addShadowRoot(e,t){ly(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),dy(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}observeAttachShadow(e){if(e.contentWindow){const t=this;this.restorePatches.push(qg(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(){const i=n.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),i}})))}}reset(){this.restorePatches.forEach((e=>e()))}}for(var xy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ey="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Sy=0;Sy<64;Sy++)Ey[xy.charCodeAt(Sy)]=Sy;const ky=new Map;const Ty=(e,t,n)=>{if(!e||!Ay(e,t)&&"object"!=typeof e)return;const i=function(e,t){let n=ky.get(e);return n||(n=new Map,ky.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let a=i.indexOf(e);return-1===a&&(a=i.length,i.push(e)),a};function Ry(e,t,n){if(e instanceof Array)return e.map((e=>Ry(e,t,n)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){const t=e.constructor.name,n=function(e){var t,n=new Uint8Array(e),i=n.length,a="";for(t=0;t<i;t+=3)a+=xy[n[t]>>2],a+=xy[(3&n[t])<<4|n[t+1]>>4],a+=xy[(15&n[t+1])<<2|n[t+2]>>6],a+=xy[63&n[t+2]];return i%3==2?a=a.substring(0,a.length-1)+"=":i%3==1&&(a=a.substring(0,a.length-2)+"=="),a}(e);return{rr_type:t,base64:n}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ry(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ry(e.data,t,n),e.width,e.height]}}if(Ay(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Ty(e,t,n)}}return e}const Iy=(e,t,n)=>[...e].map((e=>Ry(e,t,n))),Ay=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function Cy(e,t,n,i,a,s,r,o){const c=[],l=Object.getOwnPropertyNames(e);for(const u of l)try{if("function"!=typeof e[u])continue;const l=qg(e,u,(function(c){return function(...l){const d=c.apply(this,l);if(Ty(d,o,e),!Gg(this.canvas,i,s,a)){r.getId(this.canvas);const i=Iy([...l],o,e),a={type:t,property:u,args:i};n(this.canvas,a)}return d}}));c.push(l)}catch(i){const a=$g(e,u,{set(e){n(this.canvas,{type:t,property:u,args:[e],setter:!0})}});c.push(a)}return c}class Oy{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=function(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)},this.mutationCb=e.mutationCb,this.mirror=e.mirror,!0===e.recordCanvas&&this.initCanvasMutationObserver(e.win,e.blockClass,e.blockSelector,e.unblockSelector)}initCanvasMutationObserver(e,t,n,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const a=function(e,t,n,i){const a=[];try{const s=qg(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(a,...s){return Gg(this,t,n,i)||"__context"in this||(this.__context=a),e.apply(this,[a,...s])}}));a.push(s)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{a.forEach((e=>e()))}}(e,t,i,n),s=function(e,t,n,i,a,s){const r=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;const o=qg(t.CanvasRenderingContext2D.prototype,s,(function(t){return function(...r){return Gg(this.canvas,n,a,i)||setTimeout((()=>{const t=[...r];if("drawImage"===s&&t[0]&&t[0]instanceof HTMLCanvasElement){const e=t[0],n=e.getContext("2d");let i=null==n?void 0:n.getImageData(0,0,e.width,e.height),a=null==i?void 0:i.data;t[0]=JSON.stringify(a)}e(this.canvas,{type:Pg["2D"],property:s,args:t})}),0),t.apply(this,r)}}));r.push(o)}catch(n){const i=$g(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:Pg["2D"],property:s,args:[t],setter:!0})}});r.push(i)}return()=>{r.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,i,n,this.mirror),r=function(e,t,n,i,a,s){const r=[];return r.push(...Cy(t.WebGLRenderingContext.prototype,Pg.WebGL,e,n,i,a,s,t)),void 0!==t.WebGL2RenderingContext&&r.push(...Cy(t.WebGL2RenderingContext.prototype,Pg.WebGL2,e,n,i,a,s,t)),()=>{r.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,i,n,this.mirror);this.resetObservers=()=>{a(),s(),r()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const i=n.map((e=>{const t=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n}(e,["type"]);return t})),{type:a}=n[0];this.mutationCb({id:t,type:a,commands:i}),this.pendingCanvasMutations.delete(e)}}function Ly(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let jy,Uy;const Py={map:{},getId:e=>e&&e.__sn?e.__sn.id:-1,getNode(e){return this.map[e]||null},removeNodeFromMap(e){const t=e.__sn&&e.__sn.id;delete this.map[t],e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))},has(e){return this.map.hasOwnProperty(e)},reset(){this.map={}}};function Fy(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:a="rr-block",blockSelector:s=null,unblockSelector:r=null,ignoreClass:o="rr-ignore",ignoreSelector:c=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,maskInputSelector:d=null,unmaskTextSelector:p=null,unmaskInputSelector:h=null,inlineStylesheet:m=!0,maskAllText:f=!1,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:_,maskInputFn:v,maskTextFn:b,hooks:w,packFn:x,sampling:E={},mousemoveWait:S,recordCanvas:k=!1,userTriggeredOnInput:T=!1,collectFonts:R=!1,inlineImages:I=!1,plugins:A,keepIframeSrcFn:C=(()=>!1),onMutation:O}=e;if(!t)throw new Error("emit function is required");void 0!==S&&void 0===E.mousemove&&(E.mousemove=S);const L=!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,radio:!0,checkbox:!0}:void 0!==y?y:{},j=!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===_,headMetaDescKeywords:"all"===_}:_||{};let U;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let P=0;jy=(e,a)=>{var s;if(!(null===(s=oy[0])||void 0===s?void 0:s.isFrozen())||e.type===Lg.FullSnapshot||e.type===Lg.IncrementalSnapshot&&e.data.source===jg.Mutation||oy.forEach((e=>e.unfreeze())),t((e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return x&&(e=x(e)),e})(e),a),e.type===Lg.FullSnapshot)U=e,P=0;else if(e.type===Lg.IncrementalSnapshot){if(e.data.source===jg.Mutation&&e.data.isAttachIframe)return;P++;const t=i&&P>=i,a=n&&e.timestamp-U.timestamp>n;(t||a)&&Uy(!0)}};const F=e=>{jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.Mutation},e)}))},D=e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.Scroll},e)})),N=e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.CanvasMutation},e)})),M=new by({mutationCb:F}),z=new Oy({recordCanvas:k,mutationCb:N,win:window,blockClass:a,blockSelector:s,unblockSelector:r,mirror:Py}),B=new wy({mutationCb:F,scrollCb:D,bypassOptions:{onMutation:O,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:m,maskAllText:f,maskInputOptions:L,maskTextFn:b,maskInputFn:v,recordCanvas:k,inlineImages:I,sampling:E,slimDOMOptions:j,iframeManager:M,canvasManager:z},mirror:Py});Uy=(e=!1)=>{var t,n,i,o;jy(Ly({type:Lg.Meta,data:{href:window.location.href,width:Vg(),height:Yg()}}),e),oy.forEach((e=>e.lock()));const[c,g]=function(e,t){const{blockClass:n="rr-block",blockSelector:i=null,unblockSelector:a=null,maskTextClass:s="rr-mask",maskTextSelector:r=null,unmaskTextSelector:o=null,inlineStylesheet:c=!0,inlineImages:l=!1,recordCanvas:u=!1,maskInputSelector:d=null,unmaskInputSelector:p=null,maskAllText:h=!1,maskAllInputs:m=!1,maskTextFn:f,maskInputFn:g,slimDOM:y=!1,dataURLOptions:_,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x,keepIframeSrcFn:E=(()=>!1)}=t||{},S={};return[Cg(e,{doc:e,map:S,blockClass:n,blockSelector:i,unblockSelector:a,maskTextClass:s,maskTextSelector:r,unmaskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===m?{}:m,maskTextFn:f,maskInputFn:g,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:_,inlineImages:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x,keepIframeSrcFn:E}),S]}(document,{blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:m,maskAllText:f,maskAllInputs:L,maskTextFn:b,slimDOM:j,recordCanvas:k,inlineImages:I,onSerialize:e=>{Zg(e)&&M.addIframe(e),Jg(e)&&B.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{M.attachIframe(e,t),B.observeAttachShadow(e)},keepIframeSrcFn:C});if(!c)return console.warn("Failed to snapshot the document");Py.map=g,jy(Ly({type:Lg.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(o=null===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.parentElement)||void 0===o?void 0:o.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),oy.forEach((e=>e.unlock()))};try{const e=[];e.push(Ng("DOMContentLoaded",(()=>{jy(Ly({type:Lg.DomContentLoaded,data:{}}))})));const t=e=>{var t;return ry(yy)({onMutation:O,mutationCb:F,mousemoveCb:(e,t)=>jy(Ly({type:Lg.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.MouseInteraction},e)})),scrollCb:D,viewportResizeCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.ViewportResize},e)})),inputCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.Input},e)})),mediaInteractionCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.MediaInteraction},e)})),styleSheetRuleCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.StyleSheetRule},e)})),styleDeclarationCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.StyleDeclaration},e)})),canvasMutationCb:N,fontCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.Font},e)})),blockClass:a,ignoreClass:o,ignoreSelector:c,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:L,inlineStylesheet:m,sampling:E,recordCanvas:k,inlineImages:I,userTriggeredOnInput:T,collectFonts:R,doc:e,maskAllText:f,maskInputFn:v,maskTextFn:b,blockSelector:s,unblockSelector:r,slimDOMOptions:j,mirror:Py,iframeManager:M,shadowDomManager:B,canvasManager:z,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=>jy(Ly({type:Lg.Plugin,data:{plugin:e.name,payload:t}}))}))))||[]},w)};M.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{Uy(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():e.push(Ng("load",(()=>{jy(Ly({type:Lg.Load,data:{}})),n()}),window)),()=>{e.forEach((e=>e()))}}catch(e){console.warn(e)}}function Dy(e){return e>9999999999?e:1e3*e}function Ny(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:Lg.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:oh(t,10,1e3)}}),"console"===t.category))))}Fy.addCustomEvent=(e,t)=>{if(!jy)throw new Error("please add custom event after start recording");jy(Ly({type:Lg.Custom,data:{tag:e,payload:t}}))},Fy.freezePage=()=>{oy.forEach((e=>e.freeze()))},Fy.takeFullSnapshot=e=>{if(!Uy)throw new Error("please take full snapshot after start recording");Uy(e)},Fy.mirror=Py;const My="button,a";function zy(e){const t=By(e);if(!(t&&t instanceof Element))return t;return t.closest(My)||t}function By(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let $y;function qy(e){return $y||($y=[],_p(Wf,"open",(function(e){return function(...t){if($y)try{$y.forEach((e=>e()))}catch(e){}return e.apply(Wf,t)}}))),$y.push(e),()=>{const t=$y?$y.indexOf(e):-1;t>-1&&$y.splice(t,1)}}class Yy{constructor(e,t,n=Ny){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=()=>{this._lastScroll=Gy()},t=qy((()=>{this._lastMutation=Gy()})),n=e=>{if(!e.target)return;const t=zy(e);t&&this._handleMultiClick(t)},i=new MutationObserver((()=>{this._lastMutation=Gy()}));i.observe(Wf.document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),Wf.addEventListener("scroll",e,{passive:!0}),Wf.addEventListener("click",n,{passive:!0}),this._teardown=()=>{Wf.removeEventListener("scroll",e),Wf.removeEventListener("click",n),t(),i.disconnect(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!Vy.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:(i=e.timestamp,i>9999999999?i/1e3:i),clickBreadcrumb:e,clickCount:0,node:t};var i;this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=Gy();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,i=e.mutationAfter&&e.mutationAfter<=this._threshold,a=!n&&!i,{clickCount:s,clickBreadcrumb:r}=e;if(a){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),i=n<1e3*this._timeout?"mutation":"timeout",a={type:"default",message:r.message,timestamp:r.timestamp,category:"ui.slowClickDetected",data:{...r.data,url:Wf.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:i,clickCount:s||1}};this._addBreadcrumbEvent(t,a)}else if(s>1){const e={type:"default",message:r.message,timestamp:r.timestamp,category:"ui.multiClick",data:{...r.data,url:Wf.location.href,route:t.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const Vy=["A","BUTTON","INPUT"];function Gy(){return Date.now()/1e3}function Hy(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Wy;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Wy||(Wy={}));const Ky=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled"]);function Zy(e){const t={};for(const n in e)if(Ky.has(n)){let i=n;"data-testid"!==n&&"data-test-id"!==n||(i="testId"),t[i]=e[n]}return t}const Jy=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,i=null;try{i=t?zy(e.event):By(e.event),n=op(i,{maxStringLength:200})||"<unknown>"}catch(e){n="<unknown>"}return{target:i,message:n}}(e);return Hy({category:`ui.${e.name}`,...Xy(t,n)})}(t);if(!n)return;const i="click"===t.name,a=i&&t.event;var s,r,o;!(i&&e.clickDetector&&a)||a.altKey||a.metaKey||a.ctrlKey||a.shiftKey||(s=e.clickDetector,r=n,o=zy(t.event),s.handleClick(r,o)),Ny(e,n)};function Xy(e,t){const n=e&&"__sn"in e&&e.__sn.type===Wy.Element?e.__sn:null;return{message:t,data:n?{nodeId:n.id,node:{id:n.id,tagName:n.tagName,textContent:e?Array.from(e.childNodes).map((e=>"__sn"in e&&e.__sn.type===Wy.Text&&e.__sn.textContent)).filter(Boolean).map((e=>e.trim())).join(""):"",attributes:Zy(n.attributes)}}:{}}}function Qy(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:i,altKey:a,key:s,target:r}=e;if(!r||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(r)||!s)return null;const o=t||i||a,c=1===s.length;if(!o&&c)return null;const l=op(r,{maxStringLength:200})||"<unknown>",u=Xy(r,l);return Hy({category:"ui.keyDown",message:l,data:{...u.data,metaKey:t,shiftKey:n,ctrlKey:i,altKey:a,key:s}})}(t);n&&Ny(e,n)}const e_=["name","type","startTime","transferSize","duration"];function t_(e){return function(t){return e_.every((n=>e[n]===t[n]))}}function n_(e){const t=new PerformanceObserver((t=>{const n=function(e,t){const[n,i,a]=e.reduce(((e,t)=>("navigation"===t.entryType?e[0].push(t):"largest-contentful-paint"===t.entryType?e[1].push(t):e[2].push(t),e)),[[],[],[]]),s=[],r=[];let o=i.length?i[i.length-1]:void 0;return t.forEach((e=>{if("largest-contentful-paint"!==e.entryType)if("navigation"!==e.entryType)s.push(e);else{const t=e;e.duration>0&&!n.find(t_(t))&&!r.find(t_(t))&&r.push(t)}else(!o||o.startTime<e.startTime)&&(o=e)})),[...o?[o]:[],...n,...a,...s,...r].sort(((e,t)=>e.startTime-t.startTime))}(e.performanceEvents,t.getEntries());e.performanceEvents=n}));return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach((e=>{try{t.observe({type:e,buffered:!0})}catch(e){}})),t}const i_='/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([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]),a=new Uint8Array([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]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},p=(t,e,a)=>{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},A=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&z(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!z(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},E=(t,i,n)=>{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f<t.sym_next);p(t,256,i)},R=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<s;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,n&&(t.static_len-=i[2*l+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},U=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{p(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(p(t,n,t.bl_tree),o--),p(t,16,t.bl_tree),g(t,o-3,2)):o<=10?(p(t,17,t.bl_tree),g(t,o-3,3)):(p(t,18,t.bl_tree),g(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let S=!1;const D=(t,e,a,i)=>{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s<i;s++)g(t,t.bl_tree[2*n[s]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),E(t,t.dyn_ltree,t.dyn_dtree)),y(t),i&&x(t)},O={_tr_init:t=>{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<<e[m];t++)l[w++]=m;for(l[w-1]=m,b=0,m=0;m<16;m++)for(d[m]=b,t=0;t<1<<a[m];t++)o[b++]=m;for(b>>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<<a[m]-7;t++)o[256+b++]=m;for(n=0;n<=15;n++)g[n]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,g[8]++;for(;t<=255;)s[2*t+1]=9,t++,g[9]++;for(;t<=279;)s[2*t+1]=7,t++,g[7]++;for(;t<=287;)s[2*t+1]=8,t++,g[8]++;for(v(s,287,g),t=0;t<30;t++)r[2*t+1]=5,r[2*t]=k(t,5);f=new _(s,e,257,286,15),c=new _(r,a,0,30,15),u=new _(new Array(0),i,0,19,7)})(),S=!0),t.l_desc=new w(t.dyn_ltree,f),t.d_desc=new w(t.dyn_dtree,c),t.bl_desc=new w(t.bl_tree,u),t.bi_buf=0,t.bi_valid=0,y(t)},_tr_stored_block:D,_tr_flush_block:T,_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const ct=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=258-(f-s),s=f-258,i>r){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,a>i+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a<s&&(0===a&&e!==X||e===P||a!==i+t.strm.avail_in))break;r=e===X&&a===i+t.strm.avail_in?1:0,H(t,0,0,r),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),r?4:e!==P&&e!==X&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a),t.match_length<=5&&(t.strategy===et||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=a,Zt(t)};var St={deflateInit:(t,e)=>Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=258-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Ft=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Ft=!1}const Lt=new Uint8Array(256);for(let t=0;t<256;t++)Lt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Lt[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Bt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=u[f&m];e:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}k=65535&g,p&=15,p&&(c<p&&(f+=z[a++]<<c,c+=8),k+=f&(1<<p)-1,f>>>=p,c-=p),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=w[f&b];a:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=16209;break t}if(v=65535&g,p&=15,c<p&&(f+=z[a++]<<c,c+=8,c<p&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<p)-1,v>o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}else if(d<p){if(y+=l+d-p,p-=d,p<k){k-=p;do{A[n++]=_[y++]}while(--p);if(y=0,d<k){p=d,k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}}else if(y+=d-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const te=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ae=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ie=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,a,i,n,s,r,o)=>{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m<i;m++)E[e[a+m]]++;for(p=l,g=15;g>=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<g&&0===E[b];b++);for(p<b&&(p=b),y=1,w=1;w<=15;w++)if(y<<=1,y-=E[w],y<0)return-1;if(y>0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m<i;m++)0!==e[a+m]&&(r[R[e[a+m]]++]=m);if(0===t?(A=D=r,u=20):1===t?(A=te,D=ee,u=257):(A=ae,D=ie,u=0),z=0,m=0,w=b,c=s,k=p,v=0,_=-1,x=1<<p,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1<u?(U=0,S=r[m]):r[m]>=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<<w-v,d=1<<k,b=d;do{d-=h,n[c+(z>>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<<k;k+v<g&&(y-=E[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Ue={inflateReset:ve,inflateReset2:ye,inflateResetKeep:ke,inflateInit:t=>xe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:16191,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==we){t.msg="unknown compression method",a.mode=me;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=me;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=me;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}t.adler=a.check=be(h),h=0,d=0,a.mode=16190;case 16190:if(0===a.havedict)return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de;t.adler=a.check=1,a.mode=16191;case 16191:if(e===re||e===oe)break t;case 16192:if(a.last){h>>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,k=b,v=g;z=a.lencode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<<a.distbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(0==(240&b)){for(p=m,k=b,v=g;z=a.distcode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,r-f):F(a.check,n,f,r-f)),f=l,4&a.wrap&&(a.flags?h:be(h))!==a.check){t.msg="incorrect data check",a.mode=me;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=me;break}h=0,d=0}a.mode=16208;case 16208:x=he;break t;case me:x=fe;break t;case 16210:return ce;default:return _e}return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<me&&(a.mode<16206||e!==se))&&Ze(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,t.next_out-f):F(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(16191===a.mode?128:0)+(16199===a.mode||16194===a.mode?256:0),(0===_&&0===f||e===se)&&x===le&&(x=ue),x},inflateEnd:t=>{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function a_(e,t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(pp.info(e),t&&r_(e))}function s_(e,t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(pp.info(e),t&&setTimeout((()=>{r_(e)}),0))}function r_(e){am().addBreadcrumb({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class o_ extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class c_{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>eg)throw new o_;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?Dy(e):null}}class l_{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){a_("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((i,a)=>{const s=({data:t})=>{const r=t;if(r.method===e&&r.id===n){if(this._worker.removeEventListener("message",s),!r.success)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay]",r.response),void a(new Error("Error in compression worker"));i(r.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class u_{constructor(e){this._worker=new l_(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=Dy(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>eg?Promise.reject(new o_):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear")}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class d_{constructor(e){this._fallback=new c_,this._compression=new u_(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void a_("[Replay] Failed to load the compression worker, falling back to simple buffer")}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t}=this._fallback,n=[];for(const t of e)n.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("[Replay] Failed to add events when switching buffers.",e)}}}function p_({useCompression:e}){if(e&&window.Worker)try{const e=function(){const e=new Blob([i_]);return URL.createObjectURL(e)}();a_("[Replay] Using compression worker");const t=new Worker(e);return new d_(t)}catch(e){a_("[Replay] Failed to create compression worker")}return a_("[Replay] Using simple buffer"),new c_}function h_(){try{return"sessionStorage"in Wf&&!!Wf.sessionStorage}catch(e){return!1}}function m_(e){!function(){if(!h_())return;try{Wf.sessionStorage.removeItem(Kf)}catch(e){}}(),e.session=void 0}function f_(e){return void 0!==e&&Math.random()<e}function g_(e){if(h_())try{Wf.sessionStorage.setItem(Kf,JSON.stringify(e))}catch(e){}}function y_(e){const t=Date.now();return{id:e.id||Qp(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function __({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:i}={}){const a=function(e,t){return f_(e)?"session":!!t&&"buffer"}(e,t),s=y_({sampled:a,previousSessionId:i});return n&&g_(s),s}function v_(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function b_(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:i=Date.now()}){return v_(e.started,t,i)||v_(e.lastActivity,n,i)}function w_(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!b_(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function x_({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:i},a){const s=a.stickySession&&function(e){if(!h_())return null;try{const t=Wf.sessionStorage.getItem(Kf);if(!t)return null;const n=JSON.parse(t);return s_("[Replay] Loading existing session",e),y_(n)}catch(e){return null}}(e);return s?w_(s,{sessionIdleExpire:t,maxReplayDuration:n})?(s_("[Replay] Session in sessionStorage is expired, creating new one..."),__(a,{previousSessionId:s.id})):s:(s_("[Replay] Creating new session",e),__(a,{previousSessionId:i}))}function E_(e,t,n){return!!k_(e,t)&&(S_(e,t,n),!0)}async function S_(e,t,n){if(!e.eventBuffer)return null;try{n&&"buffer"===e.recordingMode&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const i=function(e,t){try{if("function"==typeof t&&function(e){return e.type===Lg.Custom}(e))return t(e)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",e),null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!i)return;return await e.eventBuffer.addEvent(i)}catch(t){const n=t&&t instanceof o_?"addEventSizeExceeded":"addEvent";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error(t),await e.stop({reason:n});const i=am().getClient();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function k_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Dy(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(a_(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1))}function T_(e){return!e.type}function R_(e){return"transaction"===e.type}function I_(e){const t=function(){const e=am().getClient();if(!e)return!1;const t=e.getTransport();if(!t)return!1;return t.send.__sentry__baseTransport__||!1}();return(n,i)=>{if(!e.isEnabled()||!T_(n)&&!R_(n))return;const a=i&&i.statusCode;t&&(!a||a<200||a>=300)||(R_(n)?function(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,n):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);"buffer"===e.recordingMode&&t.tags&&t.tags.replayId&&setTimeout((()=>{e.sendBufferedReplayOrFlush()}))}(e,n))}}function A_(e,t=!1){const n=t?I_(e):void 0;return(t,i)=>{if(!e.isEnabled())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!T_(t)&&!R_(t))return t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&(!(!t.originalException||!t.originalException.__rrweb__)||e.exception.values.some((e=>!!(e.stacktrace&&e.stacktrace.frames&&e.stacktrace.frames.length)&&e.stacktrace.frames.some((e=>e.filename&&e.filename.includes("/rrweb/src/"))))))}(t,i)&&!e.getOptions()._experiments.captureExceptions)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Replay] Ignoring error from rrweb internals",t),null;const a=function(e,t){return"buffer"===e.recordingMode&&t.message!==Jf&&!(!t.exception||t.type)&&f_(e.getOptions().errorSampleRate)}(e,t);return(a||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&n(t,{statusCode:200}),t}}function C_(e,t){return t.map((({type:t,start:n,end:i,name:a,data:s})=>{const r=e.throttledAddEvent({type:Lg.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:a,startTimestamp:n,endTimestamp:i,data:s}}});return"string"==typeof r?Promise.resolve(null):r}))}function O_(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,i=Date.now()/1e3;return{type:"navigation.push",start:i,end:i,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(C_(e,[n]),!1))))}}function L_(e,t){return("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||!e.getOptions()._experiments.traceInternals)&&function(e){const t=am().getClient(),n=t&&t.getDsn();return!!n&&e.includes(n.host)}(t)}function j_(e,t){e.isEnabled()&&null!==t&&(L_(e,t.name)||e.addUpdate((()=>(C_(e,[t]),!0))))}function U_(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,xhr:i}=e,a=i[Np];if(!t||!n||!a)return null;const{method:s,url:r,status_code:o}=a;return void 0===r?null:{type:"resource.xhr",name:r,start:t/1e3,end:n/1e3,data:{method:s,statusCode:o}}}(t);j_(e,n)}}const P_=10,F_=11,D_=12,N_=13,M_=14,z_=15,B_=20,$_=21,q_=22,Y_=23,V_=["true","false","null"];function G_(e,t){if(!t.length)return e;let n=e;const i=t.length-1;n=function(e,t){switch(t){case P_:return`${e}"~~":"~~"`;case F_:return`${e}:"~~"`;case D_:return`${e}~~":"~~"`;case N_:return function(e){const t=e.lastIndexOf(":"),n=e.slice(t+1);if(V_.includes(n.trim()))return`${e},"~~":"~~"`;return`${e.slice(0,t+1)}"~~"`}(e);case M_:return`${e}~~"`;case z_:return`${e},"~~":"~~"`;case B_:return`${e}"~~"`;case $_:return function(e){const t=function(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(","===n||"["===n)return t}return-1}(e);if(t>-1){const n=e.slice(t+1);return V_.includes(n.trim())?`${e},"~~"`:`${e.slice(0,t+1)}"~~"`}return e}(e);case q_:return`${e}~~"`;case Y_:return`${e},"~~"`}return e}(n,t[i]);for(let e=i;e>=0;e--){switch(t[e]){case P_:n=`${n}}`;break;case B_:n=`${n}]`}}return n}function H_(e,t,n){const i=e[e.length-1],a=t[n];if(!/\s/.test(a))if('"'!==a||W_(t,n))switch(a){case"{":!function(e,t){if(!t)return void e.push(P_);if(t===N_)return void e.push(P_);t===$_&&e.push(P_);if(t===B_)e.push(P_)}(e,i);break;case"[":!function(e,t){if(!t)return e.push(B_),void e.push($_);if(t===N_)return e.push(B_),void e.push($_);t===$_&&(e.push(B_),e.push($_));if(t===B_)e.push(B_),e.push($_)}(e,i);break;case":":!function(e,t){t===F_&&(e.pop(),e.push(N_))}(e,i);break;case",":!function(e,t){if(t===N_)return void e.pop();if(t===z_)return e.pop(),void e.pop();if(t===$_)return;if(t===Y_)e.pop()}(e,i);break;case"}":!function(e,t){t===P_&&e.pop();t===N_&&(e.pop(),e.pop());t===z_&&(e.pop(),e.pop(),e.pop());e[e.length-1]===N_&&e.push(z_);e[e.length-1]===$_&&e.push(Y_)}(e,i);break;case"]":!function(e,t){t===B_&&e.pop();t===$_&&(e.pop(),e.pop());t===Y_&&(e.pop(),e.pop(),e.pop());e[e.length-1]===N_&&e.push(z_);e[e.length-1]===$_&&e.push(Y_)}(e,i)}else!function(e,t){if(t===M_)return e.pop(),void e.push(z_);if(t===q_)return e.pop(),void e.push(Y_);if(t===N_)return void e.push(M_);if(t===$_)return void e.push(q_);if(t===P_)return void e.push(D_);if(t===D_)e.pop(),e.push(F_)}(e,i)}function W_(e,t){return"\\"===e[t-1]&&!W_(e,t-1)}function K_(e){return G_(e,function(e){const t=[];for(let n=0;n<e.length;n++)H_(t,e,n);return t}(e))}function Z_(e,t){if(e)try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=iv(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function J_(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function X_(e){return"string"==typeof e?e:e instanceof URLSearchParams?e.toString():e instanceof FormData?iv(e):void 0}function Q_(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:i,url:a,method:s,statusCode:r,request:o,response:c}=t;return{type:e,start:n/1e3,end:i/1e3,name:a,data:kp({method:s,statusCode:r,request:o,response:c})}}function ev(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function tv(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const i={headers:e,size:t},{body:a,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e,warnings:[]};const t=e.length>Xf;if(function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e))try{const n=t?K_(e.slice(0,Xf)):e;return{body:JSON.parse(n),warnings:t?["JSON_TRUNCATED"]:[]}}catch(n){return{body:t?`${e.slice(0,Xf)}…`:e,warnings:t?["INVALID_JSON","TEXT_TRUNCATED"]:["INVALID_JSON"]}}return{body:t?`${e.slice(0,Xf)}…`:e,warnings:t?["TEXT_TRUNCATED"]:[]}}(n);return i.body=a,s.length>0&&(i._meta={warnings:s}),i}function nv(e,t){return Object.keys(e).reduce(((n,i)=>{const a=i.toLowerCase();return t.includes(a)&&e[i]&&(n[a]=e[i]),n}),{})}function iv(e){return new URLSearchParams(e).toString()}function av(e,t){const n=function(e,t=Wf.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Wf.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const i=n.href;if(!e.endsWith("/")&&i.endsWith("/"))return i.slice(0,-1);return i}(e);return Zd(n,t)}async function sv(e,t,n){try{const i=await async function(e,t,n){const{startTimestamp:i,endTimestamp:a}=t,{url:s,method:r,status_code:o=0,request_body_size:c,response_body_size:l}=e.data,u=av(s,n.networkDetailAllowUrls)&&!av(s,n.networkDetailDenyUrls),d=u?function({networkCaptureBodies:e,networkRequestHeaders:t},n,i){const a=function(e,t){if(1===e.length&&"string"!=typeof e[0])return cv(e[0],t);if(2===e.length)return cv(e[1],t);return{}}(n,t);if(!e)return tv(a,i,void 0);const s=X_(rv(n));return tv(a,i,s)}(n,t.input,c):ev(c),p=await async function(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:i},a,s){if(!e&&void 0!==s)return ev(s);const r=ov(a.headers,i);if(!t&&void 0!==s)return tv(r,s,void 0);try{const i=a.clone(),o=await async function(e){try{return await e.text()}catch(e){return}}(i),c=o&&o.length&&void 0===s?Z_(o,n):s;return e?tv(r,c,t?o:void 0):ev(c)}catch(e){return tv(r,s,void 0)}}(u,n,t.response,l);return{startTimestamp:i,endTimestamp:a,url:s,method:r,statusCode:o,request:d,response:p}}(e,t,n),a=Q_("resource.fetch",i);j_(n.replay,a)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] Failed to capture fetch breadcrumb",e)}}function rv(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function ov(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function cv(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?ov(n,t):Array.isArray(n)?{}:nv(n,t):{}}async function lv(e,t,n){try{const i=function(e,t,n){const{startTimestamp:i,endTimestamp:a,input:s,xhr:r}=t,{url:o,method:c,status_code:l=0,request_body_size:u,response_body_size:d}=e.data;if(!o)return null;if(!av(o,n.networkDetailAllowUrls)||av(o,n.networkDetailDenyUrls)){return{startTimestamp:i,endTimestamp:a,url:o,method:c,statusCode:l,request:ev(u),response:ev(d)}}const p=r[Np],h=p?nv(p.request_headers,n.networkRequestHeaders):{},m=nv(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce(((e,t)=>{const[n,i]=t.split(": ");return e[n.toLowerCase()]=i,e}),{})}(r),n.networkResponseHeaders),f=tv(h,u,n.networkCaptureBodies?X_(s):void 0),g=tv(m,d,n.networkCaptureBodies?t.xhr.responseText:void 0);return{startTimestamp:i,endTimestamp:a,url:o,method:c,statusCode:l,request:f,response:g}}(e,t,n),a=Q_("resource.xhr",i);j_(n.replay,a)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] Failed to capture fetch breadcrumb",e)}}function uv(e){const t=am().getClient();try{const n=new TextEncoder,{networkDetailAllowUrls:i,networkDetailDenyUrls:a,networkCaptureBodies:s,networkRequestHeaders:r,networkResponseHeaders:o}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:i,networkDetailDenyUrls:a,networkCaptureBodies:s,networkRequestHeaders:r,networkResponseHeaders:o};t&&t.on?t.on("beforeAddBreadcrumb",((e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return e&&e.xhr}(n)&&(!function(e,t,n){const{xhr:i,input:a}=t,s=Z_(a,n.textEncoder),r=i.getResponseHeader("content-length")?J_(i.getResponseHeader("content-length")):Z_(i.response,n.textEncoder);void 0!==s&&(e.data.request_body_size=s),void 0!==r&&(e.data.response_body_size=r)}(t,n,e),lv(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(!function(e,t,n){const{input:i,response:a}=t,s=Z_(rv(i),n.textEncoder),r=a?J_(a.headers.get("content-length")):void 0;void 0!==s&&(e.data.request_body_size=s),void 0!==r&&(e.data.response_body_size=r)}(t,n,e),sv(t,n,e))}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Error when enriching network breadcrumb")}}(c,e,t))):($p("fetch",function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,fetchData:i,response:a}=e;if(!n)return null;const{method:s,url:r}=i;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:r,data:{method:s,statusCode:a?a.status:void 0}}}(t);j_(e,n)}}(e)),$p("xhr",U_(e)))}catch(e){}}let dv=null;const pv=e=>t=>{if(!e.isEnabled())return;const n=function(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();if(dv===t||!t)return null;if(dv=t,!function(e){return!!e.category}(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))return null;if("console"===t.category)return function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return Hy(e);let n=!1;const i=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>Qf?(n=!0,`${e.slice(0,Qf)}…`):e;if("object"==typeof e)try{const t=oh(e,7),i=JSON.stringify(t);if(i.length>Qf){const e=K_(i.slice(0,Qf)),t=JSON.parse(e);return n=!0,t}return t}catch(e){}return e}));return Hy({...e,data:{...e.data,arguments:i,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t);return Hy(t)}(t);n&&Ny(e,n)};function hv(e){return!(!e||!e.on)}function mv(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:i}=e,a=Date.now()/1e3;return{type:"memory",name:"memory",start:a,end:a,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:i}}}}const fv={resource:function(e){const{entryType:t,initiatorType:n,name:i,responseEnd:a,startTime:s,decodedBodySize:r,encodedBodySize:o,responseStatus:c,transferSize:l}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:yv(s),end:yv(a),name:i,data:{size:l,statusCode:c,decodedBodySize:r,encodedBodySize:o}}},paint:function(e){const{duration:t,entryType:n,name:i,startTime:a}=e,s=yv(a);return{type:n,name:i,start:s,end:s+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:i,duration:a,domComplete:s,encodedBodySize:r,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:m,type:f}=e;if(0===a)return null;return{type:`${t}.${f}`,start:yv(h),end:yv(s),name:n,data:{size:m,decodedBodySize:i,encodedBodySize:r,duration:a,domInteractive:l,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}},"largest-contentful-paint":function(e){const{entryType:t,startTime:n,size:i}=e;let a=0;if(Wf.performance){const e=Wf.performance.getEntriesByType("navigation")[0];a=e&&e.activationStart||0}const s=Math.max(n-a,0),r=yv(a)+s/1e3;return{type:t,name:t,start:r,end:r,data:{value:s,size:i,nodeId:Fy.mirror.getId(e.element)}}}};function gv(e){return void 0===fv[e.entryType]?null:fv[e.entryType](e)}function yv(e){return((Eh||Wf.performance.timeOrigin)+e)/1e3}function _v(e){let t=!1;return(n,i)=>{if(!e.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("[Replay] Received replay event after session expired."));const a=i||!t;t=!0,e.addUpdate((()=>{if("buffer"===e.recordingMode&&a&&e.setInitialState(),!E_(e,n,a))return!0;if(!a)return!1;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;E_(e,function(e){const t=e.getOptions();return{type:Lg.Custom,timestamp:Date.now(),data:{tag:"options",payload:{sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,a),e.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){const t=e.eventBuffer.getEarliestTimestamp();t&&(a_(`[Replay] Updating session start time to earliest event in buffer to ${new Date(t)}`,e.getOptions()._experiments.traceInternals),e.session.started=t,e.getOptions().stickySession&&g_(e.session))}return"session"===e.recordingMode&&e.flush(),!0}))}}async function vv({recordingData:e,replayId:t,segmentId:n,eventContext:i,timestamp:a,session:s}){const r=function({recordingData:e,headers:t}){let n;const i=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${i}${e}`;else{const t=(new TextEncoder).encode(i);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:o,errorIds:c,traceIds:l,initialTimestamp:u}=i,d=am(),p=d.getClient(),h=d.getScope(),m=p&&p.getTransport(),f=p&&p.getDsn();if(!(p&&m&&f&&s.sampled))return;const g={type:Zf,replay_start_timestamp:u/1e3,timestamp:a/1e3,error_ids:c,trace_ids:l,urls:o,replay_id:t,segment_id:n,replay_type:s.sampled},y=await async function({client:e,scope:t,replayId:n,event:i}){const a={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit&&e.emit("preprocessEvent",i,a);const s=await Cm(e.getOptions(),i,a,t,e);if(!s)return null;s.platform=s.platform||"javascript";const r=e.getSdkMetadata&&e.getSdkMetadata(),{name:o,version:c}=r&&r.sdk||{};return s.sdk={...s.sdk,name:o||"sentry.javascript.unknown",version:c||"0.0.0"},s}({scope:h,client:p,replayId:t,event:g});if(!y)return p.recordDroppedEvent("event_processor","replay",g),void a_("An event processor returned `null`, will not send event.");delete y.sdkProcessingMetadata;const _=function(e,t,n,i){return jh($h(e,Bh(e),i,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(y,r,f,p.getOptions().tunnel);let v;try{v=await m.send(_)}catch(e){const t=new Error(Jf);try{t.cause=e}catch(e){}throw t}if(!v)return v;if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new bv(v.statusCode);return v}class bv extends Error{constructor(e){super(`Transport returned status code ${e}`)}}async function wv(e,t={count:0,interval:5e3}){const{recordingData:n,options:i}=e;var a,s;if(n.length)try{return await vv(e),!0}catch(n){if(n instanceof bv)throw n;if(a="Replays",s={_retryCount:t.count},am().setContext(a,s),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i._experiments&&i._experiments.captureExceptions&&Sm(n),t.count>=3){const e=new Error(`${Jf} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise(((n,i)=>{setTimeout((async()=>{try{await wv(e,t),n(!0)}catch(e){i(e)}}),t.interval)}))}}const xv="__THROTTLED";function Ev(e,t,n){const i=new Map;let a=!1;return(...s)=>{const r=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;i.forEach(((e,n)=>{n<t&&i.delete(n)}))})(r),[...i.values()].reduce(((e,t)=>e+t),0)>=t){const e=a;return a=!0,e?"__SKIPPED":xv}a=!1;const o=i.get(r)||0;return i.set(r,o+1),e(...s)}}class Sv{constructor({options:e,recordingOptions:t}){Sv.prototype.__init.call(this),Sv.prototype.__init2.call(this),Sv.prototype.__init3.call(this),Sv.prototype.__init4.call(this),Sv.prototype.__init5.call(this),Sv.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEvents=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let i,a,s;const r=n&&n.maxWait?Math.max(n.maxWait,t):0;function o(){return c(),i=e(),i}function c(){void 0!==a&&clearTimeout(a),void 0!==s&&clearTimeout(s),a=s=void 0}function l(){return a&&clearTimeout(a),a=setTimeout(o,t),r&&void 0===s&&(s=setTimeout(o,r)),i}return l.cancel=c,l.flush=function(){return void 0!==a||void 0!==s?o():i},l}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Ev(((e,t)=>function(e,t,n){return k_(e,t)?S_(e,t,n):Promise.resolve(null)}(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:i}=this.getOptions(),a=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:i?i.join(","):""}:void 0;a&&(this.clickDetector=new Yy(this,a))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options;t<=0&&n<=0||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",s_(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");s_("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);const e=x_({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");s_("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const e=x_({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{this._stopRecording=Fy({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:_v(this),onMutation:this._onMutationHandler})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{a_("[Replay] Stopping Replay"+(t?` triggered by ${t}`:""),this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,m_(this)}catch(e){this._handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),a_("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),a_("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();a_("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&v_(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Wf.location.pathname}${Wf.location.hash}${Wf.location.search}`,t=`${Wf.location.origin}${e}`;this.performanceEvents=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===xv){const e=Hy({category:"replay.throttled"});this.addUpdate((()=>!E_(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastTransaction||am().getScope().getTransaction();if(e&&["route","custom"].includes(e.metadata.source))return e.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=p_({useCompression:this._options.useCompression}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay]",e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&Sm(e)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=x_({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!w_(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Wf.document.addEventListener("visibilitychange",this._handleVisibilityChange),Wf.addEventListener("blur",this._handleWindowBlur),Wf.addEventListener("focus",this._handleWindowFocus),Wf.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(e){const t=am().getScope(),n=am().getClient();t.addScopeListener(pv(e)),$p("dom",Jy(e)),$p("history",O_(e)),uv(e),Hh(A_(e,!hv(n))),hv(n)&&(n.on("afterSendEvent",I_(e)),n.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&(t.replay_id=n)})),n.on("startTransaction",(t=>{e.lastTransaction=t})),n.on("finishTransaction",(t=>{e.lastTransaction=t})))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}"PerformanceObserver"in Wf&&(this._performanceObserver=n_(this))}_removeListeners(){try{Wf.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Wf.removeEventListener("blur",this._handleWindowBlur),Wf.removeEventListener("focus",this._handleWindowFocus),Wf.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=void 0)}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===Wf.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=Hy({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=Hy({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Qy(this,e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;b_(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):a_("[Replay] Document has become active, but session has expired")}_triggerFullSnapshot(e=!0){try{a_("[Replay] Taking full rrweb snapshot"),Fy.takeFullSnapshot(e)}catch(e){this._handleException(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:Lg.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){const e=[...this.performanceEvents];return this.performanceEvents=[],Promise.all(C_(this,function(e){return e.map(gv).filter(Boolean)}(e)))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(e){try{return Promise.all(C_(e,[mv(Wf.performance.memory)]))}catch(e){return[]}}(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const a=await this.eventBuffer.finish();await wv({replayId:e,recordingData:a,segmentId:i,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(e){this._handleException(e),this.stop({reason:"sendReplay"});const t=am().getClient();t&&t.recordDroppedEvent("send_error","replay")}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] No session found to flush."));const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const i=n<this._options.minReplayDuration,a=n>this._options.maxReplayDuration+5e3;if(i||a)return a_(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),void(i&&this._debouncedFlush());const s=this.eventBuffer;if(s&&0===this.session.segmentId&&!s.hasCheckout&&a_("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=void 0);try{await this._flushLock}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error(e)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&g_(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,i=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||i){const e=Hy({category:"replay.mutations",data:{count:t,limit:i}});this._createCustomBreadcrumb(e)}return!i||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function kv(e,t,n,i){const a=[...e,..."string"==typeof i?i.split(","):[],...t];return void 0!==n&&("string"==typeof n&&a.push(`.${n}`),console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")),a.join(",")}function Tv({mask:e,unmask:t,block:n,unblock:i,ignore:a,blockClass:s,blockSelector:r,maskTextClass:o,maskTextSelector:c,ignoreClass:l}){const u=kv(e,[".sentry-mask","[data-sentry-mask]"],o,c),d=kv(t,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:u,unmaskTextSelector:d,maskInputSelector:u,unmaskInputSelector:d,blockSelector:kv(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],s,r),unblockSelector:kv(i,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:kv(a,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return s instanceof RegExp&&(p.blockClass=s),o instanceof RegExp&&(p.maskTextClass=o),p}function Rv(){return"undefined"!=typeof window&&(!rh()||"undefined"!=typeof process&&"renderer"===process.type)}const Iv='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Av=["content-length","content-type","accept"];let Cv=!1;class Ov{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:i=36e5,stickySession:a=!0,useCompression:s=!0,_experiments:r={},sessionSampleRate:o,errorSampleRate:c,maskAllText:l=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:p=750,mutationLimit:h=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:y=[],networkCaptureBodies:_=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:w=[],unmask:x=[],block:E=[],unblock:S=[],ignore:k=[],maskFn:T,beforeAddRecordingEvent:R,blockClass:I,blockSelector:A,maskInputOptions:C,maskTextClass:O,maskTextSelector:L,ignoreClass:j}={}){if(this.name=Ov.id,this._recordingOptions={maskAllInputs:u,maskAllText:l,maskInputOptions:{...C||{},password:!0},maskTextFn:T,maskInputFn:T,...Tv({mask:w,unmask:x,block:E,unblock:S,ignore:k,blockClass:I,blockSelector:A,maskTextClass:O,maskTextSelector:L,ignoreClass:j}),slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(i,tg),stickySession:a,sessionSampleRate:o,errorSampleRate:c,useCompression:s,blockAllMedia:d,maskAllInputs:u,maskAllText:l,mutationBreadcrumbLimit:p,mutationLimit:h,slowClickTimeout:m,slowClickIgnoreSelectors:f,networkDetailAllowUrls:g,networkDetailDenyUrls:y,networkCaptureBodies:_,networkRequestHeaders:Lv(v),networkResponseHeaders:Lv(b),beforeAddRecordingEvent:R,_experiments:r},"number"==typeof o&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${o} })`),this._initialOptions.sessionSampleRate=o),"number"==typeof c&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${c} })`),this._initialOptions.errorSampleRate=c),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Iv}`:Iv),this._isInitialized&&Rv())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Cv}set _isInitialized(e){Cv=e}setupOnce(){Rv()&&(this._setup(),setTimeout((()=>this._initialize())))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&this._replay.initializeSampling()}_setup(){const e=function(e){const t=am().getClient(),n=t&&t.getOptions(),i={sessionSampleRate:0,errorSampleRate:0,...kp(e)};if(!n)return console.warn("SDK client is not available."),i;null==e.sessionSampleRate&&null==e.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.");"number"==typeof n.replaysSessionSampleRate&&(i.sessionSampleRate=n.replaysSessionSampleRate);"number"==typeof n.replaysOnErrorSampleRate&&(i.errorSampleRate=n.replaysOnErrorSampleRate);return i}(this._initialOptions);this._replay=new Sv({options:e,recordingOptions:this._recordingOptions})}}function Lv(e){return[...Av,...e.map((e=>e.toLowerCase()))]}Ov.__initStatic();const jv=np;const Uv=(e,t,n)=>{let i,a;return s=>{t.value>=0&&(s||n)&&(a=t.value-(i||0),(a||void 0===i)&&(i=t.value,t.delta=a,e(t)))}},Pv=()=>jv.__WEB_VITALS_POLYFILL__?jv.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const e=jv.performance.timing,t=jv.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(const t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n})()):jv.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Fv=()=>{const e=Pv();return e&&e.activationStart||0},Dv=(e,t)=>{const n=Pv();let i="navigate";return n&&(i=jv.document.prerendering||Fv()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},Nv=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver((e=>{t(e.getEntries())}));return i.observe(Object.assign({type:e,buffered:!0},n||{})),i}}catch(e){}},Mv=(e,t)=>{const n=i=>{"pagehide"!==i.type&&"hidden"!==jv.document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},zv=e=>{const t=Dv("CLS",0);let n,i=0,a=[];const s=e=>{e.forEach((e=>{if(!e.hadRecentInput){const s=a[0],r=a[a.length-1];i&&0!==a.length&&e.startTime-r.startTime<1e3&&e.startTime-s.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e]),i>t.value&&(t.value=i,t.entries=a,n&&n())}}))},r=Nv("layout-shift",s);if(r){n=Uv(e,t);const i=()=>{s(r.takeRecords()),n(!0)};return Mv(i),i}};let Bv=-1;const $v=()=>(Bv<0&&(Bv="hidden"!==jv.document.visibilityState||jv.document.prerendering?1/0:0,Mv((({timeStamp:e})=>{Bv=e}),!0)),{get firstHiddenTime(){return Bv}}),qv=e=>{const t=$v(),n=Dv("FID");let i;const a=e=>{e.startTime<t.firstHiddenTime&&(n.value=e.processingStart-e.startTime,n.entries.push(e),i(!0))},s=e=>{e.forEach(a)},r=Nv("first-input",s);i=Uv(e,n),r&&Mv((()=>{s(r.takeRecords()),r.disconnect()}),!0)},Yv={},Vv=e=>{const t=$v(),n=Dv("LCP");let i;const a=e=>{const a=e[e.length-1];if(a){const e=Math.max(a.startTime-Fv(),0);e<t.firstHiddenTime&&(n.value=e,n.entries=[a],i())}},s=Nv("largest-contentful-paint",a);if(s){i=Uv(e,n);const t=()=>{Yv[n.id]||(a(s.takeRecords()),s.disconnect(),Yv[n.id]=!0,i(!0))};return["keydown","click"].forEach((e=>{addEventListener(e,t,{once:!0,capture:!0})})),Mv(t,!0),t}};function Gv(e){return"number"==typeof e&&isFinite(e)}function Hv(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function Wv(e){return e/1e3}function Kv(){return jv&&jv.addEventListener&&jv.performance}let Zv,Jv,Xv=0,Qv={};function eb(){const e=Kv();if(e&&Eh){e.mark&&jv.performance.mark("sentry-tracing-init"),qv((e=>{const t=e.entries.pop();if(!t)return;const n=Wv(Eh),i=Wv(t.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding FID"),Qv.fid={value:e.value,unit:"millisecond"},Qv["mark.fid"]={value:n+i,unit:"second"}}));const t=zv((e=>{const t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding CLS"),Qv.cls={value:e.value,unit:""},Jv=t)})),n=Vv((e=>{const t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding LCP"),Qv.lcp={value:e.value,unit:"millisecond"},Zv=t)}));return()=>{t&&t(),n&&n()}}return()=>{}}function tb(e){const t=Kv();if(!t||!jv.performance.getEntries||!Eh)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] Adding & adjusting spans using Performance API");const n=Wv(Eh),i=t.getEntries();let a,s;if(i.slice(Xv).forEach((t=>{const i=Wv(t.startTime),r=Wv(t.duration);if(!("navigation"===e.op&&n+i<e.startTimestamp))switch(t.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((i=>{nb(e,t,i,n)})),nb(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),nb(e,t,"fetch",n,"cache","domainLookupStart"),nb(e,t,"domainLookup",n,"DNS"),function(e,t,n){Hv(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+Wv(t.requestStart),endTimestamp:n+Wv(t.responseEnd)}),Hv(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+Wv(t.responseStart),endTimestamp:n+Wv(t.responseEnd)})}(e,t,n)}(e,t,n),a=n+Wv(t.responseStart),s=n+Wv(t.requestStart);break;case"mark":case"paint":case"measure":{!function(e,t,n,i,a){const s=a+n,r=s+i;Hv(e,{description:t.name,endTimestamp:r,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:s})}(e,t,i,r,n);const a=$v(),s=t.startTime<a.firstHiddenTime;"first-paint"===t.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding FP"),Qv.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding FCP"),Qv.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":{const a=t.name.replace(jv.location.origin,"");!function(e,t,n,i,a,s){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const r={};"transferSize"in t&&(r["http.response_transfer_size"]=t.transferSize);"encodedBodySize"in t&&(r["http.response_content_length"]=t.encodedBodySize);"decodedBodySize"in t&&(r["http.decoded_response_content_length"]=t.decodedBodySize);"renderBlockingStatus"in t&&(r["resource.render_blocking_status"]=t.renderBlockingStatus);const o=s+i,c=o+a;Hv(e,{description:n,endTimestamp:c,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:o,data:r})}(e,t,a,i,r,n);break}}})),Xv=Math.max(i.length-1,0),function(e){const t=jv.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Gv(n.rtt)&&(Qv["connection.rtt"]={value:n.rtt,unit:"millisecond"}));Gv(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`);Gv(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===e.op){"number"==typeof a&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding TTFB"),Qv.ttfb={value:1e3*(a-e.startTimestamp),unit:"millisecond"},"number"==typeof s&&s<=a&&(Qv["ttfb.requestTime"]={value:1e3*(a-s),unit:"millisecond"})),["fcp","fp","lcp"].forEach((t=>{if(!Qv[t]||n>=e.startTimestamp)return;const i=Qv[t].value,a=n+Wv(i),s=Math.abs(1e3*(a-e.startTimestamp)),r=s-i;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Measurements] Normalized ${t} from ${i} to ${s} (${r})`),Qv[t].value=s}));const t=Qv["mark.fid"];t&&Qv.fid&&(Hv(e,{description:"first input delay",endTimestamp:t.value+Wv(Qv.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:t.value}),delete Qv["mark.fid"]),"fcp"in Qv||delete Qv.cls,Object.keys(Qv).forEach((t=>{e.setMeasurement(t,Qv[t].value,Qv[t].unit)})),function(e){Zv&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding LCP Data"),Zv.element&&e.setTag("lcp.element",op(Zv.element)),Zv.id&&e.setTag("lcp.id",Zv.id),Zv.url&&e.setTag("lcp.url",Zv.url.trim().slice(0,200)),e.setTag("lcp.size",Zv.size));Jv&&Jv.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding CLS Data"),Jv.sources.forEach(((t,n)=>e.setTag(`cls.source.${n+1}`,op(t.node)))))}(e)}Zv=void 0,Jv=void 0,Qv={}}function nb(e,t,n,i,a,s){const r=s?t[s]:t[`${n}End`],o=t[`${n}Start`];o&&r&&Hv(e,{op:"browser",origin:"auto.browser.browser.metrics",description:a||n,startTimestamp:i+Wv(o),endTimestamp:i+Wv(r)})}const ib=["localhost",/^\/(?!\/)/],ab={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:ib,tracePropagationTargets:ib};function sb(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:i,tracingOrigins:a,shouldCreateSpanForRequest:s,enableHTTPTimings:r}={traceFetch:ab.traceFetch,traceXHR:ab.traceXHR,...e},o="function"==typeof s?s:e=>!0,c=e=>function(e,t){return Zd(e,t||ib)}(e,i||a),l={};t&&$p("fetch",(e=>{const t=function(e,t,n,i){if(!om()||!e.fetchData)return;const a=t(e.fetchData.url);if(e.endTimestamp&&a){const t=e.fetchData.__span;if(!t)return;const n=i[t];if(n){if(e.response){n.setHttpStatus(e.response.status);const t=e.response&&e.response.headers&&e.response.headers.get("content-length"),i=parseInt(t);i>0&&n.setData("http.response_content_length",i)}else e.error&&n.setStatus("internal_error");n.finish(),delete i[t]}return}const s=am(),r=s.getScope(),o=s.getClient(),c=r.getSpan(),{method:l,url:u}=e.fetchData,d=a&&c?c.startChild({data:{url:u,type:"fetch","http.method":l},description:`${l} ${u}`,op:"http.client",origin:"auto.http.browser"}):void 0;d&&(e.fetchData.__span=d.spanId,i[d.spanId]=d);if(n(e.fetchData.url)&&o){const t=e.args[0];e.args[1]=e.args[1]||{};const n=e.args[1];n.headers=function(e,t,n,i,a){const s=a||n.getSpan(),r=s&&s.transaction,{traceId:o,sampled:c,dsc:l}=n.getPropagationContext(),u=s?s.toTraceparent():Lh(o,void 0,c),d=r?r.getDynamicSamplingContext():l||hm(o,t,n),p=Ih(d),h="undefined"!=typeof Request&&Vd(e,Request)?e.headers:i.headers;if(h){if("undefined"!=typeof Headers&&Vd(h,Headers)){const e=new Headers(h);return e.append("sentry-trace",u),p&&e.append(Sh,p),e}if(Array.isArray(h)){const e=[...h,["sentry-trace",u]];return p&&e.push([Sh,p]),e}{const e="baggage"in h?h.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),p&&t.push(p),{...h,"sentry-trace":u,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":u,baggage:p}}(t,o,r,n,d)}return d}(e,o,c,l);r&&t&&rb(t)})),n&&$p("xhr",(e=>{const t=function(e,t,n,i){const a=e.xhr,s=a&&a[Np];if(!om()||a&&a.__sentry_own_request__||!a||!s)return;const r=t(s.url);if(e.endTimestamp&&r){const e=a.__sentry_xhr_span_id__;if(!e)return;const t=i[e];return void(t&&(t.setHttpStatus(s.status_code),t.finish(),delete i[e]))}const o=am(),c=o.getScope(),l=c.getSpan(),u=r&&l?l.startChild({data:{...s.data,type:"xhr","http.method":s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;u&&(a.__sentry_xhr_span_id__=u.spanId,i[a.__sentry_xhr_span_id__]=u);if(a.setRequestHeader&&n(s.url))if(u){const e=u&&u.transaction,t=Ih(e&&e.getDynamicSamplingContext());cb(a,u.toTraceparent(),t)}else{const e=o.getClient(),{traceId:t,sampled:n,dsc:i}=c.getPropagationContext();cb(a,Lh(t,void 0,n),Ih(i||(e?hm(t,e,c):void 0)))}return u}(e,o,c,l);r&&t&&rb(t)}))}function rb(e){const t=e.data.url,n=new PerformanceObserver((i=>{i.getEntries().forEach((i=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}(i)&&i.name.endsWith(t)){const t=function(e){const{name:t,version:n}=function(e){let t="unknown",n="unknown",i="";for(const a of e){if("/"===a){[t,n]=e.split("/");break}if(!isNaN(Number(a))){t="h"===i?"http":i,n=e.split(i)[1];break}i+=a}i===e&&(t=i);return{name:t,version:n}}(e.nextHopProtocol),i=[];if(i.push(["network.protocol.version",n],["network.protocol.name",t]),!Eh)return i;return[...i,["http.request.redirect_start",ob(e.redirectStart)],["http.request.fetch_start",ob(e.fetchStart)],["http.request.domain_lookup_start",ob(e.domainLookupStart)],["http.request.domain_lookup_end",ob(e.domainLookupEnd)],["http.request.connect_start",ob(e.connectStart)],["http.request.secure_connection_start",ob(e.secureConnectionStart)],["http.request.connection_end",ob(e.connectEnd)],["http.request.request_start",ob(e.requestStart)],["http.request.response_start",ob(e.responseStart)],["http.request.response_end",ob(e.responseEnd)]]}(i);t.forEach((t=>e.setData(...t))),n.disconnect()}}))}));n.observe({entryTypes:["resource"]})}function ob(e=0){return((Eh||performance.timeOrigin)+e)/1e3}function cb(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(Sh,n)}catch(e){}}const lb={...fm,markBackgroundTransactions:!0,routingInstrumentation:function(e,t=!0,n=!0){if(!jv||!jv.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Could not initialize routing instrumentation due to invalid location"));let i,a=jv.location.href;t&&(i=e({name:jv.location.pathname,startTimestamp:Eh?Eh/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&$p("history",(({to:t,from:n})=>{void 0===n&&a&&-1!==a.indexOf(t)?a=void 0:n!==t&&(a=void 0,i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=e({name:jv.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...ab};class ub{constructor(e){this.name="BrowserTracing",this._hasSetTracePropagationTargets=!1,Em(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!(!e||!e.tracePropagationTargets&&!e.tracingOrigins)),this.options={...lb,...e},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=eb(),this.options.enableLongTask&&Nv("longtask",(e=>{for(const t of e){const e=cm();if(!e)return;const n=Wv(Eh+t.startTime),i=Wv(t.duration);e.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i})}})),this.options._experiments.enableInteractions&&Nv("event",(e=>{for(const t of e){const e=cm();if(!e)return;if("click"===t.name){const n=Wv(Eh+t.startTime),i=Wv(t.duration);e.startChild({description:op(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i})}}}),{durationThreshold:0})}setupOnce(e,t){this._getCurrentHub=t;const n=t().getClient(),i=n&&n.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:s,startTransactionOnPageLoad:r,markBackgroundTransactions:o,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:u,enableHTTPTimings:d,_experiments:p}=this.options,h=i&&i.tracePropagationTargets,m=h||this.options.tracePropagationTargets;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&h&&pp.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a((e=>{const n=this._createRouteTransaction(e);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,e,t),n}),r,s),o&&(jv&&jv.document?jv.document.addEventListener("visibilitychange",(()=>{const e=cm();if(jv.document.hidden&&e){const t="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${e.op}`),e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("[Tracing] Could not set up background tab detection due to lack of global document")),p.enableInteractions&&this._registerInteractionListener(),sb({traceFetch:c,traceXHR:l,tracePropagationTargets:m,shouldCreateSpanForRequest:u,enableHTTPTimings:d})}_createRouteTransaction(e){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`));const t=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:i,finalTimeout:a,heartbeatInterval:s}=this.options,r="pageload"===e.op,o=r?db("sentry-trace"):"",c=r?db("baggage"):"",{traceparentData:l,dynamicSamplingContext:u,propagationContext:d}=Oh(o,c),p={...e,...l,metadata:{...e.metadata,dynamicSamplingContext:l&&!u?{}:u},trimEnd:!0},h="function"==typeof n?n(p):p,m=void 0===h?{...p,sampled:!1}:h;m.metadata=m.name!==p.name?{...m.metadata,source:"custom"}:m.metadata,this._latestRouteName=m.name,this._latestRouteSource=m.metadata&&m.metadata.source,!1===m.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Will not send ${m.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Starting ${m.op} transaction on scope`);const{location:f}=jv,g=xm(t,m,i,a,!0,{location:f},s),y=t.getScope();return r&&l?y.setPropagationContext(d):y.setPropagationContext({traceId:g.traceId,spanId:g.spanId,parentSpanId:g.parentSpanId,sampled:g.sampled}),g.registerBeforeFinishCallback((e=>{this._collectWebVitals(),tb(e)})),g}_registerInteractionListener(){let e;const t=()=>{const{idleTimeout:t,finalTimeout:n,heartbeatInterval:i}=this.options,a="ui.action.click",s=cm();if(s&&s.op&&["navigation","pageload"].includes(s.op))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`));if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`));if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`));const r=this._getCurrentHub(),{location:o}=jv,c={name:this._latestRouteName,op:a,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=xm(r,c,t,n,!0,{location:o},i)};["click"].forEach((e=>{addEventListener(e,t,{once:!1,capture:!0})}))}}function db(e){const t=(n=`meta[name=${e}]`,sp.document&&sp.document.querySelector?sp.document.querySelector(n):null);var n;return t?t.getAttribute("content"):void 0}class pb{constructor(e,t,n,i){this.gameParams=t,this.userParams=n,this.firekit=e,this.displayElement=i,this.jsPsych=null}async init(){this.gameParams?.fromDashboard&&(Gf({dsn:"https://b618958936a197de9f9f9a86ae6cceff@o4505913837420544.ingest.sentry.io/4505915445870592",integrations:[new ub({tracePropagationTargets:["localhost",/^https:\/\/yourserver\.io\/api/]}),new Ov],tracesSampleRate:1,replaysSessionSampleRate:1,replaysOnErrorSampleRate:1,beforeSend:e=>e}),delete this.gameParams.fromDashboard),await this.firekit.startRun();const e=await(async(e,t,n,i)=>{const a=vc(vc({...t,...n},bc),Lc),{userMode:s,assessmentPid:r,labId:o,recruitment:c,userMetadata:l,urlParams:u,consent:d,storyOption:p,language:h,skipInstructions:m,grade:f,birthMonth:g,birthYear:y,age:_,ageMonths:v}=a,b=Ot(g,y,_,v),w={pid:r,labId:o,userMode:s||"default",recruitment:c||"pilot",storyOption:p,story:md(p,f),userMetadata:{...l,grade:f,...b},startTime:new Date,urlParams:u,firekit:e,language:h,skipInstructions:m??!0,consent:d??!0,displayElement:i||null,blockOrder:fd(s)},x=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,w[e]??t])));return await w.firekit.updateTaskParams(x),null!==w.pid&&await w.firekit.updateUser({assessmentPid:w.pid,...l}),w})(this.firekit,this.gameParams,this.userParams,this.displayElement);return s.session.set("config",e),function(e){gd(e);const t=yd(e),n=[zt,...t.timeline];return(()=>{const t={timeline:[Ld,jd],repetitions:4};n.push(bd),n.push(Ad),n.push(Od),n.push(t),n.push(wd),n.push(Cd(e.blockOrder[0],1)),n.push(Sd),n.push(Cd(e.blockOrder[1],2)),n.push(kd)})(),{jsPsych:jc,timeline:n}}(e)}async run(){const{jsPsych:e,timeline:t}=await this.init();this.jsPsych=e,this.jsPsych.run(t),await(e=>{const t=n=>{e()?n():setTimeout((e=>t(n)),400)};return new Promise(t)})((()=>!0===this.firekit.run.completed))}async abort(){this.firekit.abortRun(),document.querySelectorAll("audio").forEach((e=>e.pause())),this.jsPsych&&this.jsPsych.endExperiment()}}export{pb as default};
26
- //# sourceMappingURL=index.51c197c8.js.map
25
+ */!function(e,t){(function(){var i,a="Expected a function",s="__lodash_hash_undefined__",r="__lodash_placeholder__",o=16,c=32,l=64,u=128,d=256,p=1/0,h=9007199254740991,m=NaN,f=4294967295,g=[["ary",u],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",c],["partialRight",l],["rearg",d]],y="[object Arguments]",_="[object Array]",v="[object Boolean]",b="[object Date]",w="[object Error]",x="[object Function]",E="[object GeneratorFunction]",S="[object Map]",k="[object Number]",T="[object Object]",R="[object Promise]",I="[object RegExp]",A="[object Set]",C="[object String]",O="[object Symbol]",L="[object WeakMap]",j="[object ArrayBuffer]",U="[object DataView]",P="[object Float32Array]",F="[object Float64Array]",D="[object Int8Array]",N="[object Int16Array]",M="[object Int32Array]",z="[object Uint8Array]",B="[object Uint8ClampedArray]",$="[object Uint16Array]",q="[object Uint32Array]",Y=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,H=/&(?:amp|lt|gt|quot|#39);/g,W=/[&<>"']/g,K=RegExp(H.source),Z=RegExp(W.source),J=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,ae=RegExp(ie.source),se=/^\s+/,re=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,de=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,fe=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,_e=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,we=/($^)/,xe=/['\n\r\u2028\u2029\\]/g,Ee="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",ke="\\u2700-\\u27bf",Te="a-z\\xdf-\\xf6\\xf8-\\xff",Re="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="['’]",Oe="["+Ee+"]",Le="["+Ae+"]",je="["+Se+"]",Ue="\\d+",Pe="["+ke+"]",Fe="["+Te+"]",De="[^"+Ee+Ae+Ue+ke+Te+Re+"]",Ne="\\ud83c[\\udffb-\\udfff]",Me="[^"+Ee+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",$e="["+Re+"]",qe="\\u200d",Ye="(?:"+Fe+"|"+De+")",Ve="(?:"+$e+"|"+De+")",Ge="(?:['’](?:d|ll|m|re|s|t|ve))?",He="(?:['’](?:D|LL|M|RE|S|T|VE))?",We="(?:"+je+"|"+Ne+")"+"?",Ke="["+Ie+"]?",Ze=Ke+We+("(?:"+qe+"(?:"+[Me,ze,Be].join("|")+")"+Ke+We+")*"),Je="(?:"+[Pe,ze,Be].join("|")+")"+Ze,Xe="(?:"+[Me+je+"?",je,ze,Be,Oe].join("|")+")",Qe=RegExp(Ce,"g"),et=RegExp(je,"g"),tt=RegExp(Ne+"(?="+Ne+")|"+Xe+Ze,"g"),nt=RegExp([$e+"?"+Fe+"+"+Ge+"(?="+[Le,$e,"$"].join("|")+")",Ve+"+"+He+"(?="+[Le,$e+Ye,"$"].join("|")+")",$e+"?"+Ye+"+"+Ge,$e+"+"+He,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ue,Je].join("|"),"g"),it=RegExp("["+qe+Ee+Se+Ie+"]"),at=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,st=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rt=-1,ot={};ot[P]=ot[F]=ot[D]=ot[N]=ot[M]=ot[z]=ot[B]=ot[$]=ot[q]=!0,ot[y]=ot[_]=ot[j]=ot[v]=ot[U]=ot[b]=ot[w]=ot[x]=ot[S]=ot[k]=ot[T]=ot[I]=ot[A]=ot[C]=ot[L]=!1;var ct={};ct[y]=ct[_]=ct[j]=ct[U]=ct[v]=ct[b]=ct[P]=ct[F]=ct[D]=ct[N]=ct[M]=ct[S]=ct[k]=ct[T]=ct[I]=ct[A]=ct[C]=ct[O]=ct[z]=ct[B]=ct[$]=ct[q]=!0,ct[w]=ct[x]=ct[L]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ut=parseFloat,dt=parseInt,pt="object"==typeof n&&n&&n.Object===Object&&n,ht="object"==typeof self&&self&&self.Object===Object&&self,mt=pt||ht||Function("return this")(),ft=t&&!t.nodeType&&t,gt=ft&&e&&!e.nodeType&&e,yt=gt&&gt.exports===ft,_t=yt&&pt.process,vt=function(){try{var e=gt&&gt.require&&gt.require("util").types;return e||_t&&_t.binding&&_t.binding("util")}catch(e){}}(),bt=vt&&vt.isArrayBuffer,wt=vt&&vt.isDate,xt=vt&&vt.isMap,Et=vt&&vt.isRegExp,St=vt&&vt.isSet,kt=vt&&vt.isTypedArray;function Tt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Rt(e,t,n,i){for(var a=-1,s=null==e?0:e.length;++a<s;){var r=e[a];t(i,r,n(r),e)}return i}function It(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Ct(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(!t(e[n],n,e))return!1;return!0}function Ot(e,t){for(var n=-1,i=null==e?0:e.length,a=0,s=[];++n<i;){var r=e[n];t(r,n,e)&&(s[a++]=r)}return s}function Lt(e,t){return!!(null==e?0:e.length)&&$t(e,t,0)>-1}function jt(e,t,n){for(var i=-1,a=null==e?0:e.length;++i<a;)if(n(t,e[i]))return!0;return!1}function Ut(e,t){for(var n=-1,i=null==e?0:e.length,a=Array(i);++n<i;)a[n]=t(e[n],n,e);return a}function Pt(e,t){for(var n=-1,i=t.length,a=e.length;++n<i;)e[a+n]=t[n];return e}function Ft(e,t,n,i){var a=-1,s=null==e?0:e.length;for(i&&s&&(n=e[++a]);++a<s;)n=t(n,e[a],a,e);return n}function Dt(e,t,n,i){var a=null==e?0:e.length;for(i&&a&&(n=e[--a]);a--;)n=t(n,e[a],a,e);return n}function Nt(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}var Mt=Gt("length");function zt(e,t,n){var i;return n(e,(function(e,n,a){if(t(e,n,a))return i=n,!1})),i}function Bt(e,t,n,i){for(var a=e.length,s=n+(i?1:-1);i?s--:++s<a;)if(t(e[s],s,e))return s;return-1}function $t(e,t,n){return t==t?function(e,t,n){var i=n-1,a=e.length;for(;++i<a;)if(e[i]===t)return i;return-1}(e,t,n):Bt(e,Yt,n)}function qt(e,t,n,i){for(var a=n-1,s=e.length;++a<s;)if(i(e[a],t))return a;return-1}function Yt(e){return e!=e}function Vt(e,t){var n=null==e?0:e.length;return n?Kt(e,t)/n:m}function Gt(e){return function(t){return null==t?i:t[e]}}function Ht(e){return function(t){return null==e?i:e[t]}}function Wt(e,t,n,i,a){return a(e,(function(e,a,s){n=i?(i=!1,e):t(n,e,a,s)})),n}function Kt(e,t){for(var n,a=-1,s=e.length;++a<s;){var r=t(e[a]);r!==i&&(n=n===i?r:n+r)}return n}function Zt(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}function Jt(e){return e?e.slice(0,fn(e)+1).replace(se,""):e}function Xt(e){return function(t){return e(t)}}function Qt(e,t){return Ut(t,(function(t){return e[t]}))}function en(e,t){return e.has(t)}function tn(e,t){for(var n=-1,i=e.length;++n<i&&$t(t,e[n],0)>-1;);return n}function nn(e,t){for(var n=e.length;n--&&$t(t,e[n],0)>-1;);return n}var an=Ht({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),sn=Ht({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function rn(e){return"\\"+lt[e]}function on(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function un(e,t){for(var n=-1,i=e.length,a=0,s=[];++n<i;){var o=e[n];o!==t&&o!==r||(e[n]=r,s[a++]=n)}return s}function dn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function pn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function hn(e){return on(e)?function(e){var t=tt.lastIndex=0;for(;tt.test(e);)++t;return t}(e):Mt(e)}function mn(e){return on(e)?function(e){return e.match(tt)||[]}(e):function(e){return e.split("")}(e)}function fn(e){for(var t=e.length;t--&&re.test(e.charAt(t)););return t}var gn=Ht({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yn=function e(t){var n=(t=null==t?mt:yn.defaults(mt.Object(),t,yn.pick(mt,st))).Array,re=t.Date,Ee=t.Error,Se=t.Function,ke=t.Math,Te=t.Object,Re=t.RegExp,Ie=t.String,Ae=t.TypeError,Ce=n.prototype,Oe=Se.prototype,Le=Te.prototype,je=t["__core-js_shared__"],Ue=Oe.toString,Pe=Le.hasOwnProperty,Fe=0,De=function(){var e=/[^.]+$/.exec(je&&je.keys&&je.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ne=Le.toString,Me=Ue.call(Te),ze=mt._,Be=Re("^"+Ue.call(Pe).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$e=yt?t.Buffer:i,qe=t.Symbol,Ye=t.Uint8Array,Ve=$e?$e.allocUnsafe:i,Ge=ln(Te.getPrototypeOf,Te),He=Te.create,We=Le.propertyIsEnumerable,Ke=Ce.splice,Ze=qe?qe.isConcatSpreadable:i,Je=qe?qe.iterator:i,Xe=qe?qe.toStringTag:i,tt=function(){try{var e=ds(Te,"defineProperty");return e({},"",{}),e}catch(e){}}(),it=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,lt=re&&re.now!==mt.Date.now&&re.now,pt=t.setTimeout!==mt.setTimeout&&t.setTimeout,ht=ke.ceil,ft=ke.floor,gt=Te.getOwnPropertySymbols,_t=$e?$e.isBuffer:i,vt=t.isFinite,Mt=Ce.join,Ht=ln(Te.keys,Te),_n=ke.max,vn=ke.min,bn=re.now,wn=t.parseInt,xn=ke.random,En=Ce.reverse,Sn=ds(t,"DataView"),kn=ds(t,"Map"),Tn=ds(t,"Promise"),Rn=ds(t,"Set"),In=ds(t,"WeakMap"),An=ds(Te,"create"),Cn=In&&new In,On={},Ln=Ds(Sn),jn=Ds(kn),Un=Ds(Tn),Pn=Ds(Rn),Fn=Ds(In),Dn=qe?qe.prototype:i,Nn=Dn?Dn.valueOf:i,Mn=Dn?Dn.toString:i;function zn(e){if(eo(e)&&!qr(e)&&!(e instanceof Yn)){if(e instanceof qn)return e;if(Pe.call(e,"__wrapped__"))return Ns(e)}return new qn(e)}var Bn=function(){function e(){}return function(t){if(!Qr(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function $n(){}function qn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Yn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}function Kn(e){var t=this.__data__=new Gn(e);this.size=t.size}function Zn(e,t){var n=qr(e),i=!n&&$r(e),a=!n&&!i&&Hr(e),s=!n&&!i&&!a&&co(e),r=n||i||a||s,o=r?Zt(e.length,Ie):[],c=o.length;for(var l in e)!t&&!Pe.call(e,l)||r&&("length"==l||a&&("offset"==l||"parent"==l)||s&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_s(l,c))||o.push(l);return o}function Jn(e){var t=e.length;return t?e[Wi(0,t-1)]:i}function Xn(e,t){return Us(Aa(e),oi(t,0,e.length))}function Qn(e){return Us(Aa(e))}function ei(e,t,n){(n!==i&&!Mr(e[t],n)||n===i&&!(t in e))&&si(e,t,n)}function ti(e,t,n){var a=e[t];Pe.call(e,t)&&Mr(a,n)&&(n!==i||t in e)||si(e,t,n)}function ni(e,t){for(var n=e.length;n--;)if(Mr(e[n][0],t))return n;return-1}function ii(e,t,n,i){return pi(e,(function(e,a,s){t(i,e,n(e),s)})),i}function ai(e,t){return e&&Ca(t,Oo(t),e)}function si(e,t,n){"__proto__"==t&&tt?tt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ri(e,t){for(var a=-1,s=t.length,r=n(s),o=null==e;++a<s;)r[a]=o?i:To(e,t[a]);return r}function oi(e,t,n){return e==e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ci(e,t,n,a,s,r){var o,c=1&t,l=2&t,u=4&t;if(n&&(o=s?n(e,a,s,r):n(e)),o!==i)return o;if(!Qr(e))return e;var d=qr(e);if(d){if(o=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Pe.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!c)return Aa(e,o)}else{var p=ms(e),h=p==x||p==E;if(Hr(e))return Ea(e,c);if(p==T||p==y||h&&!s){if(o=l||h?{}:gs(e),!c)return l?function(e,t){return Ca(e,hs(e),t)}(e,function(e,t){return e&&Ca(t,Lo(t),e)}(o,e)):function(e,t){return Ca(e,ps(e),t)}(e,ai(o,e))}else{if(!ct[p])return s?e:{};o=function(e,t,n){var i=e.constructor;switch(t){case j:return Sa(e);case v:case b:return new i(+e);case U:return function(e,t){var n=t?Sa(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case P:case F:case D:case N:case M:case z:case B:case $:case q:return ka(e,n);case S:return new i;case k:case C:return new i(e);case I:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new i;case O:return a=e,Nn?Te(Nn.call(a)):{}}var a}(e,p,c)}}r||(r=new Kn);var m=r.get(e);if(m)return m;r.set(e,o),so(e)?e.forEach((function(i){o.add(ci(i,t,n,i,e,r))})):to(e)&&e.forEach((function(i,a){o.set(a,ci(i,t,n,a,e,r))}));var f=d?i:(u?l?as:is:l?Lo:Oo)(e);return It(f||e,(function(i,a){f&&(i=e[a=i]),ti(o,a,ci(i,t,n,a,e,r))})),o}function li(e,t,n){var a=n.length;if(null==e)return!a;for(e=Te(e);a--;){var s=n[a],r=t[s],o=e[s];if(o===i&&!(s in e)||!r(o))return!1}return!0}function ui(e,t,n){if("function"!=typeof e)throw new Ae(a);return Cs((function(){e.apply(i,n)}),t)}function di(e,t,n,i){var a=-1,s=Lt,r=!0,o=e.length,c=[],l=t.length;if(!o)return c;n&&(t=Ut(t,Xt(n))),i?(s=jt,r=!1):t.length>=200&&(s=en,r=!1,t=new Wn(t));e:for(;++a<o;){var u=e[a],d=null==n?u:n(u);if(u=i||0!==u?u:0,r&&d==d){for(var p=l;p--;)if(t[p]===d)continue e;c.push(u)}else s(t,d,i)||c.push(u)}return c}zn.templateSettings={escape:J,evaluate:X,interpolate:Q,variable:"",imports:{_:zn}},zn.prototype=$n.prototype,zn.prototype.constructor=zn,qn.prototype=Bn($n.prototype),qn.prototype.constructor=qn,Yn.prototype=Bn($n.prototype),Yn.prototype.constructor=Yn,Vn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Vn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vn.prototype.get=function(e){var t=this.__data__;if(An){var n=t[e];return n===s?i:n}return Pe.call(t,e)?t[e]:i},Vn.prototype.has=function(e){var t=this.__data__;return An?t[e]!==i:Pe.call(t,e)},Vn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&t===i?s:t,this},Gn.prototype.clear=function(){this.__data__=[],this.size=0},Gn.prototype.delete=function(e){var t=this.__data__,n=ni(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ke.call(t,n,1),--this.size,!0)},Gn.prototype.get=function(e){var t=this.__data__,n=ni(t,e);return n<0?i:t[n][1]},Gn.prototype.has=function(e){return ni(this.__data__,e)>-1},Gn.prototype.set=function(e,t){var n=this.__data__,i=ni(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this},Hn.prototype.clear=function(){this.size=0,this.__data__={hash:new Vn,map:new(kn||Gn),string:new Vn}},Hn.prototype.delete=function(e){var t=ls(this,e).delete(e);return this.size-=t?1:0,t},Hn.prototype.get=function(e){return ls(this,e).get(e)},Hn.prototype.has=function(e){return ls(this,e).has(e)},Hn.prototype.set=function(e,t){var n=ls(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this},Wn.prototype.add=Wn.prototype.push=function(e){return this.__data__.set(e,s),this},Wn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.clear=function(){this.__data__=new Gn,this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Kn.prototype.get=function(e){return this.__data__.get(e)},Kn.prototype.has=function(e){return this.__data__.has(e)},Kn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Gn){var i=n.__data__;if(!kn||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(i)}return n.set(e,t),this.size=n.size,this};var pi=ja(bi),hi=ja(wi,!0);function mi(e,t){var n=!0;return pi(e,(function(e,i,a){return n=!!t(e,i,a)})),n}function fi(e,t,n){for(var a=-1,s=e.length;++a<s;){var r=e[a],o=t(r);if(null!=o&&(c===i?o==o&&!oo(o):n(o,c)))var c=o,l=r}return l}function gi(e,t){var n=[];return pi(e,(function(e,i,a){t(e,i,a)&&n.push(e)})),n}function yi(e,t,n,i,a){var s=-1,r=e.length;for(n||(n=ys),a||(a=[]);++s<r;){var o=e[s];t>0&&n(o)?t>1?yi(o,t-1,n,i,a):Pt(a,o):i||(a[a.length]=o)}return a}var _i=Ua(),vi=Ua(!0);function bi(e,t){return e&&_i(e,t,Oo)}function wi(e,t){return e&&vi(e,t,Oo)}function xi(e,t){return Ot(t,(function(t){return Zr(e[t])}))}function Ei(e,t){for(var n=0,a=(t=va(t,e)).length;null!=e&&n<a;)e=e[Fs(t[n++])];return n&&n==a?e:i}function Si(e,t,n){var i=t(e);return qr(e)?i:Pt(i,n(e))}function ki(e){return null==e?e===i?"[object Undefined]":"[object Null]":Xe&&Xe in Te(e)?function(e){var t=Pe.call(e,Xe),n=e[Xe];try{e[Xe]=i;var a=!0}catch(e){}var s=Ne.call(e);a&&(t?e[Xe]=n:delete e[Xe]);return s}(e):function(e){return Ne.call(e)}(e)}function Ti(e,t){return e>t}function Ri(e,t){return null!=e&&Pe.call(e,t)}function Ii(e,t){return null!=e&&t in Te(e)}function Ai(e,t,a){for(var s=a?jt:Lt,r=e[0].length,o=e.length,c=o,l=n(o),u=1/0,d=[];c--;){var p=e[c];c&&t&&(p=Ut(p,Xt(t))),u=vn(p.length,u),l[c]=!a&&(t||r>=120&&p.length>=120)?new Wn(c&&p):i}p=e[0];var h=-1,m=l[0];e:for(;++h<r&&d.length<u;){var f=p[h],g=t?t(f):f;if(f=a||0!==f?f:0,!(m?en(m,g):s(d,g,a))){for(c=o;--c;){var y=l[c];if(!(y?en(y,g):s(e[c],g,a)))continue e}m&&m.push(g),d.push(f)}}return d}function Ci(e,t,n){var a=null==(e=Rs(e,t=va(t,e)))?e:e[Fs(Ks(t))];return null==a?i:Tt(a,e,n)}function Oi(e){return eo(e)&&ki(e)==y}function Li(e,t,n,a,s){return e===t||(null==e||null==t||!eo(e)&&!eo(t)?e!=e&&t!=t:function(e,t,n,a,s,r){var o=qr(e),c=qr(t),l=o?_:ms(e),u=c?_:ms(t),d=(l=l==y?T:l)==T,p=(u=u==y?T:u)==T,h=l==u;if(h&&Hr(e)){if(!Hr(t))return!1;o=!0,d=!1}if(h&&!d)return r||(r=new Kn),o||co(e)?ts(e,t,n,a,s,r):function(e,t,n,i,a,s,r){switch(n){case U:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case j:return!(e.byteLength!=t.byteLength||!s(new Ye(e),new Ye(t)));case v:case b:case k:return Mr(+e,+t);case w:return e.name==t.name&&e.message==t.message;case I:case C:return e==t+"";case S:var o=cn;case A:var c=1&i;if(o||(o=dn),e.size!=t.size&&!c)return!1;var l=r.get(e);if(l)return l==t;i|=2,r.set(e,t);var u=ts(o(e),o(t),i,a,s,r);return r.delete(e),u;case O:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,l,n,a,s,r);if(!(1&n)){var m=d&&Pe.call(e,"__wrapped__"),f=p&&Pe.call(t,"__wrapped__");if(m||f){var g=m?e.value():e,x=f?t.value():t;return r||(r=new Kn),s(g,x,n,a,r)}}if(!h)return!1;return r||(r=new Kn),function(e,t,n,a,s,r){var o=1&n,c=is(e),l=c.length,u=is(t),d=u.length;if(l!=d&&!o)return!1;var p=l;for(;p--;){var h=c[p];if(!(o?h in t:Pe.call(t,h)))return!1}var m=r.get(e),f=r.get(t);if(m&&f)return m==t&&f==e;var g=!0;r.set(e,t),r.set(t,e);var y=o;for(;++p<l;){var _=e[h=c[p]],v=t[h];if(a)var b=o?a(v,_,h,t,e,r):a(_,v,h,e,t,r);if(!(b===i?_===v||s(_,v,n,a,r):b)){g=!1;break}y||(y="constructor"==h)}if(g&&!y){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(g=!1)}return r.delete(e),r.delete(t),g}(e,t,n,a,s,r)}(e,t,n,a,Li,s))}function ji(e,t,n,a){var s=n.length,r=s,o=!a;if(null==e)return!r;for(e=Te(e);s--;){var c=n[s];if(o&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<r;){var l=(c=n[s])[0],u=e[l],d=c[1];if(o&&c[2]){if(u===i&&!(l in e))return!1}else{var p=new Kn;if(a)var h=a(u,d,l,e,t,p);if(!(h===i?Li(d,u,3,a,p):h))return!1}}return!0}function Ui(e){return!(!Qr(e)||(t=e,De&&De in t))&&(Zr(e)?Be:ye).test(Ds(e));var t}function Pi(e){return"function"==typeof e?e:null==e?ic:"object"==typeof e?qr(e)?Bi(e[0],e[1]):zi(e):pc(e)}function Fi(e){if(!Es(e))return Ht(e);var t=[];for(var n in Te(e))Pe.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Di(e){if(!Qr(e))return function(e){var t=[];if(null!=e)for(var n in Te(e))t.push(n);return t}(e);var t=Es(e),n=[];for(var i in e)("constructor"!=i||!t&&Pe.call(e,i))&&n.push(i);return n}function Ni(e,t){return e<t}function Mi(e,t){var i=-1,a=Vr(e)?n(e.length):[];return pi(e,(function(e,n,s){a[++i]=t(e,n,s)})),a}function zi(e){var t=us(e);return 1==t.length&&t[0][2]?ks(t[0][0],t[0][1]):function(n){return n===e||ji(n,e,t)}}function Bi(e,t){return bs(e)&&Ss(t)?ks(Fs(e),t):function(n){var a=To(n,e);return a===i&&a===t?Ro(n,e):Li(t,a,3)}}function $i(e,t,n,a,s){e!==t&&_i(t,(function(r,o){if(s||(s=new Kn),Qr(r))!function(e,t,n,a,s,r,o){var c=Is(e,n),l=Is(t,n),u=o.get(l);if(u)return void ei(e,n,u);var d=r?r(c,l,n+"",e,t,o):i,p=d===i;if(p){var h=qr(l),m=!h&&Hr(l),f=!h&&!m&&co(l);d=l,h||m||f?qr(c)?d=c:Gr(c)?d=Aa(c):m?(p=!1,d=Ea(l,!0)):f?(p=!1,d=ka(l,!0)):d=[]:io(l)||$r(l)?(d=c,$r(c)?d=yo(c):Qr(c)&&!Zr(c)||(d=gs(l))):p=!1}p&&(o.set(l,d),s(d,l,a,r,o),o.delete(l));ei(e,n,d)}(e,t,o,n,$i,a,s);else{var c=a?a(Is(e,o),r,o+"",e,t,s):i;c===i&&(c=r),ei(e,o,c)}}),Lo)}function qi(e,t){var n=e.length;if(n)return _s(t+=t<0?n:0,n)?e[t]:i}function Yi(e,t,n){t=t.length?Ut(t,(function(e){return qr(e)?function(t){return Ei(t,1===e.length?e[0]:e)}:e})):[ic];var i=-1;t=Ut(t,Xt(cs()));var a=Mi(e,(function(e,n,a){var s=Ut(t,(function(t){return t(e)}));return{criteria:s,index:++i,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(a,(function(e,t){return function(e,t,n){var i=-1,a=e.criteria,s=t.criteria,r=a.length,o=n.length;for(;++i<r;){var c=Ta(a[i],s[i]);if(c)return i>=o?c:c*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}))}function Vi(e,t,n){for(var i=-1,a=t.length,s={};++i<a;){var r=t[i],o=Ei(e,r);n(o,r)&&Qi(s,va(r,e),o)}return s}function Gi(e,t,n,i){var a=i?qt:$t,s=-1,r=t.length,o=e;for(e===t&&(t=Aa(t)),n&&(o=Ut(e,Xt(n)));++s<r;)for(var c=0,l=t[s],u=n?n(l):l;(c=a(o,u,c,i))>-1;)o!==e&&Ke.call(o,c,1),Ke.call(e,c,1);return e}function Hi(e,t){for(var n=e?t.length:0,i=n-1;n--;){var a=t[n];if(n==i||a!==s){var s=a;_s(a)?Ke.call(e,a,1):da(e,a)}}return e}function Wi(e,t){return e+ft(xn()*(t-e+1))}function Ki(e,t){var n="";if(!e||t<1||t>h)return n;do{t%2&&(n+=e),(t=ft(t/2))&&(e+=e)}while(t);return n}function Zi(e,t){return Os(Ts(e,t,ic),e+"")}function Ji(e){return Jn(zo(e))}function Xi(e,t){var n=zo(e);return Us(n,oi(t,0,n.length))}function Qi(e,t,n,a){if(!Qr(e))return e;for(var s=-1,r=(t=va(t,e)).length,o=r-1,c=e;null!=c&&++s<r;){var l=Fs(t[s]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;if(s!=o){var d=c[l];(u=a?a(d,l,c):i)===i&&(u=Qr(d)?d:_s(t[s+1])?[]:{})}ti(c,l,u),c=c[l]}return e}var ea=Cn?function(e,t){return Cn.set(e,t),e}:ic,ta=tt?function(e,t){return tt(e,"toString",{configurable:!0,enumerable:!1,value:ec(t),writable:!0})}:ic;function na(e){return Us(zo(e))}function ia(e,t,i){var a=-1,s=e.length;t<0&&(t=-t>s?0:s+t),(i=i>s?s:i)<0&&(i+=s),s=t>i?0:i-t>>>0,t>>>=0;for(var r=n(s);++a<s;)r[a]=e[a+t];return r}function aa(e,t){var n;return pi(e,(function(e,i,a){return!(n=t(e,i,a))})),!!n}function sa(e,t,n){var i=0,a=null==e?i:e.length;if("number"==typeof t&&t==t&&a<=2147483647){for(;i<a;){var s=i+a>>>1,r=e[s];null!==r&&!oo(r)&&(n?r<=t:r<t)?i=s+1:a=s}return a}return ra(e,t,ic,n)}function ra(e,t,n,a){var s=0,r=null==e?0:e.length;if(0===r)return 0;for(var o=(t=n(t))!=t,c=null===t,l=oo(t),u=t===i;s<r;){var d=ft((s+r)/2),p=n(e[d]),h=p!==i,m=null===p,f=p==p,g=oo(p);if(o)var y=a||f;else y=u?f&&(a||h):c?f&&h&&(a||!m):l?f&&h&&!m&&(a||!g):!m&&!g&&(a?p<=t:p<t);y?s=d+1:r=d}return vn(r,4294967294)}function oa(e,t){for(var n=-1,i=e.length,a=0,s=[];++n<i;){var r=e[n],o=t?t(r):r;if(!n||!Mr(o,c)){var c=o;s[a++]=0===r?0:r}}return s}function ca(e){return"number"==typeof e?e:oo(e)?m:+e}function la(e){if("string"==typeof e)return e;if(qr(e))return Ut(e,la)+"";if(oo(e))return Mn?Mn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ua(e,t,n){var i=-1,a=Lt,s=e.length,r=!0,o=[],c=o;if(n)r=!1,a=jt;else if(s>=200){var l=t?null:Ka(e);if(l)return dn(l);r=!1,a=en,c=new Wn}else c=t?[]:o;e:for(;++i<s;){var u=e[i],d=t?t(u):u;if(u=n||0!==u?u:0,r&&d==d){for(var p=c.length;p--;)if(c[p]===d)continue e;t&&c.push(d),o.push(u)}else a(c,d,n)||(c!==o&&c.push(d),o.push(u))}return o}function da(e,t){return null==(e=Rs(e,t=va(t,e)))||delete e[Fs(Ks(t))]}function pa(e,t,n,i){return Qi(e,t,n(Ei(e,t)),i)}function ha(e,t,n,i){for(var a=e.length,s=i?a:-1;(i?s--:++s<a)&&t(e[s],s,e););return n?ia(e,i?0:s,i?s+1:a):ia(e,i?s+1:0,i?a:s)}function ma(e,t){var n=e;return n instanceof Yn&&(n=n.value()),Ft(t,(function(e,t){return t.func.apply(t.thisArg,Pt([e],t.args))}),n)}function fa(e,t,i){var a=e.length;if(a<2)return a?ua(e[0]):[];for(var s=-1,r=n(a);++s<a;)for(var o=e[s],c=-1;++c<a;)c!=s&&(r[s]=di(r[s]||o,e[c],t,i));return ua(yi(r,1),t,i)}function ga(e,t,n){for(var a=-1,s=e.length,r=t.length,o={};++a<s;){var c=a<r?t[a]:i;n(o,e[a],c)}return o}function ya(e){return Gr(e)?e:[]}function _a(e){return"function"==typeof e?e:ic}function va(e,t){return qr(e)?e:bs(e,t)?[e]:Ps(_o(e))}var ba=Zi;function wa(e,t,n){var a=e.length;return n=n===i?a:n,!t&&n>=a?e:ia(e,t,n)}var xa=it||function(e){return mt.clearTimeout(e)};function Ea(e,t){if(t)return e.slice();var n=e.length,i=Ve?Ve(n):new e.constructor(n);return e.copy(i),i}function Sa(e){var t=new e.constructor(e.byteLength);return new Ye(t).set(new Ye(e)),t}function ka(e,t){var n=t?Sa(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ta(e,t){if(e!==t){var n=e!==i,a=null===e,s=e==e,r=oo(e),o=t!==i,c=null===t,l=t==t,u=oo(t);if(!c&&!u&&!r&&e>t||r&&o&&l&&!c&&!u||a&&o&&l||!n&&l||!s)return 1;if(!a&&!r&&!u&&e<t||u&&n&&s&&!a&&!r||c&&n&&s||!o&&s||!l)return-1}return 0}function Ra(e,t,i,a){for(var s=-1,r=e.length,o=i.length,c=-1,l=t.length,u=_n(r-o,0),d=n(l+u),p=!a;++c<l;)d[c]=t[c];for(;++s<o;)(p||s<r)&&(d[i[s]]=e[s]);for(;u--;)d[c++]=e[s++];return d}function Ia(e,t,i,a){for(var s=-1,r=e.length,o=-1,c=i.length,l=-1,u=t.length,d=_n(r-c,0),p=n(d+u),h=!a;++s<d;)p[s]=e[s];for(var m=s;++l<u;)p[m+l]=t[l];for(;++o<c;)(h||s<r)&&(p[m+i[o]]=e[s++]);return p}function Aa(e,t){var i=-1,a=e.length;for(t||(t=n(a));++i<a;)t[i]=e[i];return t}function Ca(e,t,n,a){var s=!n;n||(n={});for(var r=-1,o=t.length;++r<o;){var c=t[r],l=a?a(n[c],e[c],c,n,e):i;l===i&&(l=e[c]),s?si(n,c,l):ti(n,c,l)}return n}function Oa(e,t){return function(n,i){var a=qr(n)?Rt:ii,s=t?t():{};return a(n,e,cs(i,2),s)}}function La(e){return Zi((function(t,n){var a=-1,s=n.length,r=s>1?n[s-1]:i,o=s>2?n[2]:i;for(r=e.length>3&&"function"==typeof r?(s--,r):i,o&&vs(n[0],n[1],o)&&(r=s<3?i:r,s=1),t=Te(t);++a<s;){var c=n[a];c&&e(t,c,a,r)}return t}))}function ja(e,t){return function(n,i){if(null==n)return n;if(!Vr(n))return e(n,i);for(var a=n.length,s=t?a:-1,r=Te(n);(t?s--:++s<a)&&!1!==i(r[s],s,r););return n}}function Ua(e){return function(t,n,i){for(var a=-1,s=Te(t),r=i(t),o=r.length;o--;){var c=r[e?o:++a];if(!1===n(s[c],c,s))break}return t}}function Pa(e){return function(t){var n=on(t=_o(t))?mn(t):i,a=n?n[0]:t.charAt(0),s=n?wa(n,1).join(""):t.slice(1);return a[e]()+s}}function Fa(e){return function(t){return Ft(Jo(qo(t).replace(Qe,"")),e,"")}}function Da(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),i=e.apply(n,t);return Qr(i)?i:n}}function Na(e){return function(t,n,a){var s=Te(t);if(!Vr(t)){var r=cs(n,3);t=Oo(t),n=function(e){return r(s[e],e,s)}}var o=e(t,n,a);return o>-1?s[r?t[o]:o]:i}}function Ma(e){return ns((function(t){var n=t.length,s=n,r=qn.prototype.thru;for(e&&t.reverse();s--;){var o=t[s];if("function"!=typeof o)throw new Ae(a);if(r&&!c&&"wrapper"==rs(o))var c=new qn([],!0)}for(s=c?s:n;++s<n;){var l=rs(o=t[s]),u="wrapper"==l?ss(o):i;c=u&&ws(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[rs(u[0])].apply(c,u[3]):1==o.length&&ws(o)?c[l]():c.thru(o)}return function(){var e=arguments,i=e[0];if(c&&1==e.length&&qr(i))return c.plant(i).value();for(var a=0,s=n?t[a].apply(this,e):i;++a<n;)s=t[a].call(this,s);return s}}))}function za(e,t,a,s,r,o,c,l,d,p){var h=t&u,m=1&t,f=2&t,g=24&t,y=512&t,_=f?i:Da(e);return function u(){for(var v=arguments.length,b=n(v),w=v;w--;)b[w]=arguments[w];if(g)var x=os(u),E=function(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}(b,x);if(s&&(b=Ra(b,s,r,g)),o&&(b=Ia(b,o,c,g)),v-=E,g&&v<p){var S=un(b,x);return Ha(e,t,za,u.placeholder,a,b,S,l,d,p-v)}var k=m?a:this,T=f?k[e]:e;return v=b.length,l?b=function(e,t){var n=e.length,a=vn(t.length,n),s=Aa(e);for(;a--;){var r=t[a];e[a]=_s(r,n)?s[r]:i}return e}(b,l):y&&v>1&&b.reverse(),h&&d<v&&(b.length=d),this&&this!==mt&&this instanceof u&&(T=_||Da(T)),T.apply(k,b)}}function Ba(e,t){return function(n,i){return function(e,t,n,i){return bi(e,(function(e,a,s){t(i,n(e),a,s)})),i}(n,e,t(i),{})}}function $a(e,t){return function(n,a){var s;if(n===i&&a===i)return t;if(n!==i&&(s=n),a!==i){if(s===i)return a;"string"==typeof n||"string"==typeof a?(n=la(n),a=la(a)):(n=ca(n),a=ca(a)),s=e(n,a)}return s}}function qa(e){return ns((function(t){return t=Ut(t,Xt(cs())),Zi((function(n){var i=this;return e(t,(function(e){return Tt(e,i,n)}))}))}))}function Ya(e,t){var n=(t=t===i?" ":la(t)).length;if(n<2)return n?Ki(t,e):t;var a=Ki(t,ht(e/hn(t)));return on(t)?wa(mn(a),0,e).join(""):a.slice(0,e)}function Va(e){return function(t,a,s){return s&&"number"!=typeof s&&vs(t,a,s)&&(a=s=i),t=ho(t),a===i?(a=t,t=0):a=ho(a),function(e,t,i,a){for(var s=-1,r=_n(ht((t-e)/(i||1)),0),o=n(r);r--;)o[a?r:++s]=e,e+=i;return o}(t,a,s=s===i?t<a?1:-1:ho(s),e)}}function Ga(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=go(t),n=go(n)),e(t,n)}}function Ha(e,t,n,a,s,r,o,u,d,p){var h=8&t;t|=h?c:l,4&(t&=~(h?l:c))||(t&=-4);var m=[e,t,s,h?r:i,h?o:i,h?i:r,h?i:o,u,d,p],f=n.apply(i,m);return ws(e)&&As(f,m),f.placeholder=a,Ls(f,e,t)}function Wa(e){var t=ke[e];return function(e,n){if(e=go(e),(n=null==n?0:vn(mo(n),292))&&vt(e)){var i=(_o(e)+"e").split("e");return+((i=(_o(t(i[0]+"e"+(+i[1]+n)))+"e").split("e"))[0]+"e"+(+i[1]-n))}return t(e)}}var Ka=Rn&&1/dn(new Rn([,-0]))[1]==p?function(e){return new Rn(e)}:cc;function Za(e){return function(t){var n=ms(t);return n==S?cn(t):n==A?pn(t):function(e,t){return Ut(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ja(e,t,s,p,h,m,f,g){var y=2&t;if(!y&&"function"!=typeof e)throw new Ae(a);var _=p?p.length:0;if(_||(t&=-97,p=h=i),f=f===i?f:_n(mo(f),0),g=g===i?g:mo(g),_-=h?h.length:0,t&l){var v=p,b=h;p=h=i}var w=y?i:ss(e),x=[e,t,s,p,h,v,b,m,f,g];if(w&&function(e,t){var n=e[1],i=t[1],a=n|i,s=a<131,o=i==u&&8==n||i==u&&n==d&&e[7].length<=t[8]||384==i&&t[7].length<=t[8]&&8==n;if(!s&&!o)return e;1&i&&(e[2]=t[2],a|=1&n?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?Ra(l,c,t[4]):c,e[4]=l?un(e[3],r):t[4]}(c=t[5])&&(l=e[5],e[5]=l?Ia(l,c,t[6]):c,e[6]=l?un(e[5],r):t[6]);(c=t[7])&&(e[7]=c);i&u&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=a}(x,w),e=x[0],t=x[1],s=x[2],p=x[3],h=x[4],!(g=x[9]=x[9]===i?y?0:e.length:_n(x[9]-_,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==o?function(e,t,a){var s=Da(e);return function r(){for(var o=arguments.length,c=n(o),l=o,u=os(r);l--;)c[l]=arguments[l];var d=o<3&&c[0]!==u&&c[o-1]!==u?[]:un(c,u);return(o-=d.length)<a?Ha(e,t,za,r.placeholder,i,c,d,i,i,a-o):Tt(this&&this!==mt&&this instanceof r?s:e,this,c)}}(e,t,g):t!=c&&33!=t||h.length?za.apply(i,x):function(e,t,i,a){var s=1&t,r=Da(e);return function t(){for(var o=-1,c=arguments.length,l=-1,u=a.length,d=n(u+c),p=this&&this!==mt&&this instanceof t?r:e;++l<u;)d[l]=a[l];for(;c--;)d[l++]=arguments[++o];return Tt(p,s?i:this,d)}}(e,t,s,p);else var E=function(e,t,n){var i=1&t,a=Da(e);return function t(){return(this&&this!==mt&&this instanceof t?a:e).apply(i?n:this,arguments)}}(e,t,s);return Ls((w?ea:As)(E,x),e,t)}function Xa(e,t,n,a){return e===i||Mr(e,Le[n])&&!Pe.call(a,n)?t:e}function Qa(e,t,n,a,s,r){return Qr(e)&&Qr(t)&&(r.set(t,e),$i(e,t,i,Qa,r),r.delete(t)),e}function es(e){return io(e)?i:e}function ts(e,t,n,a,s,r){var o=1&n,c=e.length,l=t.length;if(c!=l&&!(o&&l>c))return!1;var u=r.get(e),d=r.get(t);if(u&&d)return u==t&&d==e;var p=-1,h=!0,m=2&n?new Wn:i;for(r.set(e,t),r.set(t,e);++p<c;){var f=e[p],g=t[p];if(a)var y=o?a(g,f,p,t,e,r):a(f,g,p,e,t,r);if(y!==i){if(y)continue;h=!1;break}if(m){if(!Nt(t,(function(e,t){if(!en(m,t)&&(f===e||s(f,e,n,a,r)))return m.push(t)}))){h=!1;break}}else if(f!==g&&!s(f,g,n,a,r)){h=!1;break}}return r.delete(e),r.delete(t),h}function ns(e){return Os(Ts(e,i,Ys),e+"")}function is(e){return Si(e,Oo,ps)}function as(e){return Si(e,Lo,hs)}var ss=Cn?function(e){return Cn.get(e)}:cc;function rs(e){for(var t=e.name+"",n=On[t],i=Pe.call(On,t)?n.length:0;i--;){var a=n[i],s=a.func;if(null==s||s==e)return a.name}return t}function os(e){return(Pe.call(zn,"placeholder")?zn:e).placeholder}function cs(){var e=zn.iteratee||ac;return e=e===ac?Pi:e,arguments.length?e(arguments[0],arguments[1]):e}function ls(e,t){var n,i,a=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function us(e){for(var t=Oo(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,Ss(a)]}return t}function ds(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Ui(n)?n:i}var ps=gt?function(e){return null==e?[]:(e=Te(e),Ot(gt(e),(function(t){return We.call(e,t)})))}:fc,hs=gt?function(e){for(var t=[];e;)Pt(t,ps(e)),e=Ge(e);return t}:fc,ms=ki;function fs(e,t,n){for(var i=-1,a=(t=va(t,e)).length,s=!1;++i<a;){var r=Fs(t[i]);if(!(s=null!=e&&n(e,r)))break;e=e[r]}return s||++i!=a?s:!!(a=null==e?0:e.length)&&Xr(a)&&_s(r,a)&&(qr(e)||$r(e))}function gs(e){return"function"!=typeof e.constructor||Es(e)?{}:Bn(Ge(e))}function ys(e){return qr(e)||$r(e)||!!(Ze&&e&&e[Ze])}function _s(e,t){var n=typeof e;return!!(t=null==t?h:t)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function vs(e,t,n){if(!Qr(n))return!1;var i=typeof t;return!!("number"==i?Vr(n)&&_s(t,n.length):"string"==i&&t in n)&&Mr(n[t],e)}function bs(e,t){if(qr(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!oo(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Te(t))}function ws(e){var t=rs(e),n=zn[t];if("function"!=typeof n||!(t in Yn.prototype))return!1;if(e===n)return!0;var i=ss(n);return!!i&&e===i[0]}(Sn&&ms(new Sn(new ArrayBuffer(1)))!=U||kn&&ms(new kn)!=S||Tn&&ms(Tn.resolve())!=R||Rn&&ms(new Rn)!=A||In&&ms(new In)!=L)&&(ms=function(e){var t=ki(e),n=t==T?e.constructor:i,a=n?Ds(n):"";if(a)switch(a){case Ln:return U;case jn:return S;case Un:return R;case Pn:return A;case Fn:return L}return t});var xs=je?Zr:gc;function Es(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Le)}function Ss(e){return e==e&&!Qr(e)}function ks(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Te(n)))}}function Ts(e,t,a){return t=_n(t===i?e.length-1:t,0),function(){for(var i=arguments,s=-1,r=_n(i.length-t,0),o=n(r);++s<r;)o[s]=i[t+s];s=-1;for(var c=n(t+1);++s<t;)c[s]=i[s];return c[t]=a(o),Tt(e,this,c)}}function Rs(e,t){return t.length<2?e:Ei(e,ia(t,0,-1))}function Is(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var As=js(ea),Cs=pt||function(e,t){return mt.setTimeout(e,t)},Os=js(ta);function Ls(e,t,n){var i=t+"";return Os(e,function(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(i,function(e,t){return It(g,(function(n){var i="_."+n[0];t&n[1]&&!Lt(e,i)&&e.push(i)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(i),n)))}function js(e){var t=0,n=0;return function(){var a=bn(),s=16-(a-n);if(n=a,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Us(e,t){var n=-1,a=e.length,s=a-1;for(t=t===i?a:t;++n<t;){var r=Wi(n,s),o=e[r];e[r]=e[n],e[n]=o}return e.length=t,e}var Ps=function(e){var t=jr(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,n,i,a){t.push(i?a.replace(pe,"$1"):n||e)})),t}));function Fs(e){if("string"==typeof e||oo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ds(e){if(null!=e){try{return Ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ns(e){if(e instanceof Yn)return e.clone();var t=new qn(e.__wrapped__,e.__chain__);return t.__actions__=Aa(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Ms=Zi((function(e,t){return Gr(e)?di(e,yi(t,1,Gr,!0)):[]})),zs=Zi((function(e,t){var n=Ks(t);return Gr(n)&&(n=i),Gr(e)?di(e,yi(t,1,Gr,!0),cs(n,2)):[]})),Bs=Zi((function(e,t){var n=Ks(t);return Gr(n)&&(n=i),Gr(e)?di(e,yi(t,1,Gr,!0),i,n):[]}));function $s(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var a=null==n?0:mo(n);return a<0&&(a=_n(i+a,0)),Bt(e,cs(t,3),a)}function qs(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var s=a-1;return n!==i&&(s=mo(n),s=n<0?_n(a+s,0):vn(s,a-1)),Bt(e,cs(t,3),s,!0)}function Ys(e){return(null==e?0:e.length)?yi(e,1):[]}function Vs(e){return e&&e.length?e[0]:i}var Gs=Zi((function(e){var t=Ut(e,ya);return t.length&&t[0]===e[0]?Ai(t):[]})),Hs=Zi((function(e){var t=Ks(e),n=Ut(e,ya);return t===Ks(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Ai(n,cs(t,2)):[]})),Ws=Zi((function(e){var t=Ks(e),n=Ut(e,ya);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?Ai(n,i,t):[]}));function Ks(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zs=Zi(Js);function Js(e,t){return e&&e.length&&t&&t.length?Gi(e,t):e}var Xs=ns((function(e,t){var n=null==e?0:e.length,i=ri(e,t);return Hi(e,Ut(t,(function(e){return _s(e,n)?+e:e})).sort(Ta)),i}));function Qs(e){return null==e?e:En.call(e)}var er=Zi((function(e){return ua(yi(e,1,Gr,!0))})),tr=Zi((function(e){var t=Ks(e);return Gr(t)&&(t=i),ua(yi(e,1,Gr,!0),cs(t,2))})),nr=Zi((function(e){var t=Ks(e);return t="function"==typeof t?t:i,ua(yi(e,1,Gr,!0),i,t)}));function ir(e){if(!e||!e.length)return[];var t=0;return e=Ot(e,(function(e){if(Gr(e))return t=_n(e.length,t),!0})),Zt(t,(function(t){return Ut(e,Gt(t))}))}function ar(e,t){if(!e||!e.length)return[];var n=ir(e);return null==t?n:Ut(n,(function(e){return Tt(t,i,e)}))}var sr=Zi((function(e,t){return Gr(e)?di(e,t):[]})),rr=Zi((function(e){return fa(Ot(e,Gr))})),or=Zi((function(e){var t=Ks(e);return Gr(t)&&(t=i),fa(Ot(e,Gr),cs(t,2))})),cr=Zi((function(e){var t=Ks(e);return t="function"==typeof t?t:i,fa(Ot(e,Gr),i,t)})),lr=Zi(ir);var ur=Zi((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,ar(e,n)}));function dr(e){var t=zn(e);return t.__chain__=!0,t}function pr(e,t){return t(e)}var hr=ns((function(e){var t=e.length,n=t?e[0]:0,a=this.__wrapped__,s=function(t){return ri(t,e)};return!(t>1||this.__actions__.length)&&a instanceof Yn&&_s(n)?((a=a.slice(n,+n+(t?1:0))).__actions__.push({func:pr,args:[s],thisArg:i}),new qn(a,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(s)}));var mr=Oa((function(e,t,n){Pe.call(e,n)?++e[n]:si(e,n,1)}));var fr=Na($s),gr=Na(qs);function yr(e,t){return(qr(e)?It:pi)(e,cs(t,3))}function _r(e,t){return(qr(e)?At:hi)(e,cs(t,3))}var vr=Oa((function(e,t,n){Pe.call(e,n)?e[n].push(t):si(e,n,[t])}));var br=Zi((function(e,t,i){var a=-1,s="function"==typeof t,r=Vr(e)?n(e.length):[];return pi(e,(function(e){r[++a]=s?Tt(t,e,i):Ci(e,t,i)})),r})),wr=Oa((function(e,t,n){si(e,n,t)}));function xr(e,t){return(qr(e)?Ut:Mi)(e,cs(t,3))}var Er=Oa((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Sr=Zi((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vs(e,t[0],t[1])?t=[]:n>2&&vs(t[0],t[1],t[2])&&(t=[t[0]]),Yi(e,yi(t,1),[])})),kr=lt||function(){return mt.Date.now()};function Tr(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Ja(e,u,i,i,i,i,t)}function Rr(e,t){var n;if("function"!=typeof t)throw new Ae(a);return e=mo(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ir=Zi((function(e,t,n){var i=1;if(n.length){var a=un(n,os(Ir));i|=c}return Ja(e,i,t,n,a)})),Ar=Zi((function(e,t,n){var i=3;if(n.length){var a=un(n,os(Ar));i|=c}return Ja(t,i,e,n,a)}));function Cr(e,t,n){var s,r,o,c,l,u,d=0,p=!1,h=!1,m=!0;if("function"!=typeof e)throw new Ae(a);function f(t){var n=s,a=r;return s=r=i,d=t,c=e.apply(a,n)}function g(e){var n=e-u;return u===i||n>=t||n<0||h&&e-d>=o}function y(){var e=kr();if(g(e))return _(e);l=Cs(y,function(e){var n=t-(e-u);return h?vn(n,o-(e-d)):n}(e))}function _(e){return l=i,m&&s?f(e):(s=r=i,c)}function v(){var e=kr(),n=g(e);if(s=arguments,r=this,u=e,n){if(l===i)return function(e){return d=e,l=Cs(y,t),p?f(e):c}(u);if(h)return xa(l),l=Cs(y,t),f(u)}return l===i&&(l=Cs(y,t)),c}return t=go(t)||0,Qr(n)&&(p=!!n.leading,o=(h="maxWait"in n)?_n(go(n.maxWait)||0,t):o,m="trailing"in n?!!n.trailing:m),v.cancel=function(){l!==i&&xa(l),d=0,s=u=r=l=i},v.flush=function(){return l===i?c:_(kr())},v}var Or=Zi((function(e,t){return ui(e,1,t)})),Lr=Zi((function(e,t,n){return ui(e,go(t)||0,n)}));function jr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ae(a);var n=function(){var i=arguments,a=t?t.apply(this,i):i[0],s=n.cache;if(s.has(a))return s.get(a);var r=e.apply(this,i);return n.cache=s.set(a,r)||s,r};return n.cache=new(jr.Cache||Hn),n}function Ur(e){if("function"!=typeof e)throw new Ae(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}jr.Cache=Hn;var Pr=ba((function(e,t){var n=(t=1==t.length&&qr(t[0])?Ut(t[0],Xt(cs())):Ut(yi(t,1),Xt(cs()))).length;return Zi((function(i){for(var a=-1,s=vn(i.length,n);++a<s;)i[a]=t[a].call(this,i[a]);return Tt(e,this,i)}))})),Fr=Zi((function(e,t){var n=un(t,os(Fr));return Ja(e,c,i,t,n)})),Dr=Zi((function(e,t){var n=un(t,os(Dr));return Ja(e,l,i,t,n)})),Nr=ns((function(e,t){return Ja(e,d,i,i,i,t)}));function Mr(e,t){return e===t||e!=e&&t!=t}var zr=Ga(Ti),Br=Ga((function(e,t){return e>=t})),$r=Oi(function(){return arguments}())?Oi:function(e){return eo(e)&&Pe.call(e,"callee")&&!We.call(e,"callee")},qr=n.isArray,Yr=bt?Xt(bt):function(e){return eo(e)&&ki(e)==j};function Vr(e){return null!=e&&Xr(e.length)&&!Zr(e)}function Gr(e){return eo(e)&&Vr(e)}var Hr=_t||gc,Wr=wt?Xt(wt):function(e){return eo(e)&&ki(e)==b};function Kr(e){if(!eo(e))return!1;var t=ki(e);return t==w||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!io(e)}function Zr(e){if(!Qr(e))return!1;var t=ki(e);return t==x||t==E||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Jr(e){return"number"==typeof e&&e==mo(e)}function Xr(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function Qr(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function eo(e){return null!=e&&"object"==typeof e}var to=xt?Xt(xt):function(e){return eo(e)&&ms(e)==S};function no(e){return"number"==typeof e||eo(e)&&ki(e)==k}function io(e){if(!eo(e)||ki(e)!=T)return!1;var t=Ge(e);if(null===t)return!0;var n=Pe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ue.call(n)==Me}var ao=Et?Xt(Et):function(e){return eo(e)&&ki(e)==I};var so=St?Xt(St):function(e){return eo(e)&&ms(e)==A};function ro(e){return"string"==typeof e||!qr(e)&&eo(e)&&ki(e)==C}function oo(e){return"symbol"==typeof e||eo(e)&&ki(e)==O}var co=kt?Xt(kt):function(e){return eo(e)&&Xr(e.length)&&!!ot[ki(e)]};var lo=Ga(Ni),uo=Ga((function(e,t){return e<=t}));function po(e){if(!e)return[];if(Vr(e))return ro(e)?mn(e):Aa(e);if(Je&&e[Je])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Je]());var t=ms(e);return(t==S?cn:t==A?dn:zo)(e)}function ho(e){return e?(e=go(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function mo(e){var t=ho(e),n=t%1;return t==t?n?t-n:t:0}function fo(e){return e?oi(mo(e),0,f):0}function go(e){if("number"==typeof e)return e;if(oo(e))return m;if(Qr(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Qr(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Jt(e);var n=ge.test(e);return n||_e.test(e)?dt(e.slice(2),n?2:8):fe.test(e)?m:+e}function yo(e){return Ca(e,Lo(e))}function _o(e){return null==e?"":la(e)}var vo=La((function(e,t){if(Es(t)||Vr(t))Ca(t,Oo(t),e);else for(var n in t)Pe.call(t,n)&&ti(e,n,t[n])})),bo=La((function(e,t){Ca(t,Lo(t),e)})),wo=La((function(e,t,n,i){Ca(t,Lo(t),e,i)})),xo=La((function(e,t,n,i){Ca(t,Oo(t),e,i)})),Eo=ns(ri);var So=Zi((function(e,t){e=Te(e);var n=-1,a=t.length,s=a>2?t[2]:i;for(s&&vs(t[0],t[1],s)&&(a=1);++n<a;)for(var r=t[n],o=Lo(r),c=-1,l=o.length;++c<l;){var u=o[c],d=e[u];(d===i||Mr(d,Le[u])&&!Pe.call(e,u))&&(e[u]=r[u])}return e})),ko=Zi((function(e){return e.push(i,Qa),Tt(Uo,i,e)}));function To(e,t,n){var a=null==e?i:Ei(e,t);return a===i?n:a}function Ro(e,t){return null!=e&&fs(e,t,Ii)}var Io=Ba((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),e[t]=n}),ec(ic)),Ao=Ba((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),Pe.call(e,t)?e[t].push(n):e[t]=[n]}),cs),Co=Zi(Ci);function Oo(e){return Vr(e)?Zn(e):Fi(e)}function Lo(e){return Vr(e)?Zn(e,!0):Di(e)}var jo=La((function(e,t,n){$i(e,t,n)})),Uo=La((function(e,t,n,i){$i(e,t,n,i)})),Po=ns((function(e,t){var n={};if(null==e)return n;var i=!1;t=Ut(t,(function(t){return t=va(t,e),i||(i=t.length>1),t})),Ca(e,as(e),n),i&&(n=ci(n,7,es));for(var a=t.length;a--;)da(n,t[a]);return n}));var Fo=ns((function(e,t){return null==e?{}:function(e,t){return Vi(e,t,(function(t,n){return Ro(e,n)}))}(e,t)}));function Do(e,t){if(null==e)return{};var n=Ut(as(e),(function(e){return[e]}));return t=cs(t),Vi(e,n,(function(e,n){return t(e,n[0])}))}var No=Za(Oo),Mo=Za(Lo);function zo(e){return null==e?[]:Qt(e,Oo(e))}var Bo=Fa((function(e,t,n){return t=t.toLowerCase(),e+(n?$o(t):t)}));function $o(e){return Zo(_o(e).toLowerCase())}function qo(e){return(e=_o(e))&&e.replace(be,an).replace(et,"")}var Yo=Fa((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Vo=Fa((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Go=Pa("toLowerCase");var Ho=Fa((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var Wo=Fa((function(e,t,n){return e+(n?" ":"")+Zo(t)}));var Ko=Fa((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Zo=Pa("toUpperCase");function Jo(e,t,n){return e=_o(e),(t=n?i:t)===i?function(e){return at.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xo=Zi((function(e,t){try{return Tt(e,i,t)}catch(e){return Kr(e)?e:new Ee(e)}})),Qo=ns((function(e,t){return It(t,(function(t){t=Fs(t),si(e,t,Ir(e[t],e))})),e}));function ec(e){return function(){return e}}var tc=Ma(),nc=Ma(!0);function ic(e){return e}function ac(e){return Pi("function"==typeof e?e:ci(e,1))}var sc=Zi((function(e,t){return function(n){return Ci(n,e,t)}})),rc=Zi((function(e,t){return function(n){return Ci(e,n,t)}}));function oc(e,t,n){var i=Oo(t),a=xi(t,i);null!=n||Qr(t)&&(a.length||!i.length)||(n=t,t=e,e=this,a=xi(t,Oo(t)));var s=!(Qr(n)&&"chain"in n&&!n.chain),r=Zr(e);return It(a,(function(n){var i=t[n];e[n]=i,r&&(e.prototype[n]=function(){var t=this.__chain__;if(s||t){var n=e(this.__wrapped__);return(n.__actions__=Aa(this.__actions__)).push({func:i,args:arguments,thisArg:e}),n.__chain__=t,n}return i.apply(e,Pt([this.value()],arguments))})})),e}function cc(){}var lc=qa(Ut),uc=qa(Ct),dc=qa(Nt);function pc(e){return bs(e)?Gt(Fs(e)):function(e){return function(t){return Ei(t,e)}}(e)}var hc=Va(),mc=Va(!0);function fc(){return[]}function gc(){return!1}var yc=$a((function(e,t){return e+t}),0),_c=Wa("ceil"),vc=$a((function(e,t){return e/t}),1),bc=Wa("floor");var wc,xc=$a((function(e,t){return e*t}),1),Ec=Wa("round"),Sc=$a((function(e,t){return e-t}),0);return zn.after=function(e,t){if("function"!=typeof t)throw new Ae(a);return e=mo(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=Tr,zn.assign=vo,zn.assignIn=bo,zn.assignInWith=wo,zn.assignWith=xo,zn.at=Eo,zn.before=Rr,zn.bind=Ir,zn.bindAll=Qo,zn.bindKey=Ar,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return qr(e)?e:[e]},zn.chain=dr,zn.chunk=function(e,t,a){t=(a?vs(e,t,a):t===i)?1:_n(mo(t),0);var s=null==e?0:e.length;if(!s||t<1)return[];for(var r=0,o=0,c=n(ht(s/t));r<s;)c[o++]=ia(e,r,r+=t);return c},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,i=0,a=[];++t<n;){var s=e[t];s&&(a[i++]=s)}return a},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),i=arguments[0],a=e;a--;)t[a-1]=arguments[a];return Pt(qr(i)?Aa(i):[i],yi(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=cs();return e=t?Ut(e,(function(e){if("function"!=typeof e[1])throw new Ae(a);return[n(e[0]),e[1]]})):[],Zi((function(n){for(var i=-1;++i<t;){var a=e[i];if(Tt(a[0],this,n))return Tt(a[1],this,n)}}))},zn.conforms=function(e){return function(e){var t=Oo(e);return function(n){return li(n,e,t)}}(ci(e,1))},zn.constant=ec,zn.countBy=mr,zn.create=function(e,t){var n=Bn(e);return null==t?n:ai(n,t)},zn.curry=function e(t,n,a){var s=Ja(t,8,i,i,i,i,i,n=a?i:n);return s.placeholder=e.placeholder,s},zn.curryRight=function e(t,n,a){var s=Ja(t,o,i,i,i,i,i,n=a?i:n);return s.placeholder=e.placeholder,s},zn.debounce=Cr,zn.defaults=So,zn.defaultsDeep=ko,zn.defer=Or,zn.delay=Lr,zn.difference=Ms,zn.differenceBy=zs,zn.differenceWith=Bs,zn.drop=function(e,t,n){var a=null==e?0:e.length;return a?ia(e,(t=n||t===i?1:mo(t))<0?0:t,a):[]},zn.dropRight=function(e,t,n){var a=null==e?0:e.length;return a?ia(e,0,(t=a-(t=n||t===i?1:mo(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?ha(e,cs(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?ha(e,cs(t,3),!0):[]},zn.fill=function(e,t,n,a){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&vs(e,t,n)&&(n=0,a=s),function(e,t,n,a){var s=e.length;for((n=mo(n))<0&&(n=-n>s?0:s+n),(a=a===i||a>s?s:mo(a))<0&&(a+=s),a=n>a?0:fo(a);n<a;)e[n++]=t;return e}(e,t,n,a)):[]},zn.filter=function(e,t){return(qr(e)?Ot:gi)(e,cs(t,3))},zn.flatMap=function(e,t){return yi(xr(e,t),1)},zn.flatMapDeep=function(e,t){return yi(xr(e,t),p)},zn.flatMapDepth=function(e,t,n){return n=n===i?1:mo(n),yi(xr(e,t),n)},zn.flatten=Ys,zn.flattenDeep=function(e){return(null==e?0:e.length)?yi(e,p):[]},zn.flattenDepth=function(e,t){return(null==e?0:e.length)?yi(e,t=t===i?1:mo(t)):[]},zn.flip=function(e){return Ja(e,512)},zn.flow=tc,zn.flowRight=nc,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,i={};++t<n;){var a=e[t];i[a[0]]=a[1]}return i},zn.functions=function(e){return null==e?[]:xi(e,Oo(e))},zn.functionsIn=function(e){return null==e?[]:xi(e,Lo(e))},zn.groupBy=vr,zn.initial=function(e){return(null==e?0:e.length)?ia(e,0,-1):[]},zn.intersection=Gs,zn.intersectionBy=Hs,zn.intersectionWith=Ws,zn.invert=Io,zn.invertBy=Ao,zn.invokeMap=br,zn.iteratee=ac,zn.keyBy=wr,zn.keys=Oo,zn.keysIn=Lo,zn.map=xr,zn.mapKeys=function(e,t){var n={};return t=cs(t,3),bi(e,(function(e,i,a){si(n,t(e,i,a),e)})),n},zn.mapValues=function(e,t){var n={};return t=cs(t,3),bi(e,(function(e,i,a){si(n,i,t(e,i,a))})),n},zn.matches=function(e){return zi(ci(e,1))},zn.matchesProperty=function(e,t){return Bi(e,ci(t,1))},zn.memoize=jr,zn.merge=jo,zn.mergeWith=Uo,zn.method=sc,zn.methodOf=rc,zn.mixin=oc,zn.negate=Ur,zn.nthArg=function(e){return e=mo(e),Zi((function(t){return qi(t,e)}))},zn.omit=Po,zn.omitBy=function(e,t){return Do(e,Ur(cs(t)))},zn.once=function(e){return Rr(2,e)},zn.orderBy=function(e,t,n,a){return null==e?[]:(qr(t)||(t=null==t?[]:[t]),qr(n=a?i:n)||(n=null==n?[]:[n]),Yi(e,t,n))},zn.over=lc,zn.overArgs=Pr,zn.overEvery=uc,zn.overSome=dc,zn.partial=Fr,zn.partialRight=Dr,zn.partition=Er,zn.pick=Fo,zn.pickBy=Do,zn.property=pc,zn.propertyOf=function(e){return function(t){return null==e?i:Ei(e,t)}},zn.pull=Zs,zn.pullAll=Js,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Gi(e,t,cs(n,2)):e},zn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gi(e,t,i,n):e},zn.pullAt=Xs,zn.range=hc,zn.rangeRight=mc,zn.rearg=Nr,zn.reject=function(e,t){return(qr(e)?Ot:gi)(e,Ur(cs(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var i=-1,a=[],s=e.length;for(t=cs(t,3);++i<s;){var r=e[i];t(r,i,e)&&(n.push(r),a.push(i))}return Hi(e,a),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Ae(a);return Zi(e,t=t===i?t:mo(t))},zn.reverse=Qs,zn.sampleSize=function(e,t,n){return t=(n?vs(e,t,n):t===i)?1:mo(t),(qr(e)?Xn:Xi)(e,t)},zn.set=function(e,t,n){return null==e?e:Qi(e,t,n)},zn.setWith=function(e,t,n,a){return a="function"==typeof a?a:i,null==e?e:Qi(e,t,n,a)},zn.shuffle=function(e){return(qr(e)?Qn:na)(e)},zn.slice=function(e,t,n){var a=null==e?0:e.length;return a?(n&&"number"!=typeof n&&vs(e,t,n)?(t=0,n=a):(t=null==t?0:mo(t),n=n===i?a:mo(n)),ia(e,t,n)):[]},zn.sortBy=Sr,zn.sortedUniq=function(e){return e&&e.length?oa(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?oa(e,cs(t,2)):[]},zn.split=function(e,t,n){return n&&"number"!=typeof n&&vs(e,t,n)&&(t=n=i),(n=n===i?f:n>>>0)?(e=_o(e))&&("string"==typeof t||null!=t&&!ao(t))&&!(t=la(t))&&on(e)?wa(mn(e),0,n):e.split(t,n):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Ae(a);return t=null==t?0:_n(mo(t),0),Zi((function(n){var i=n[t],a=wa(n,0,t);return i&&Pt(a,i),Tt(e,this,a)}))},zn.tail=function(e){var t=null==e?0:e.length;return t?ia(e,1,t):[]},zn.take=function(e,t,n){return e&&e.length?ia(e,0,(t=n||t===i?1:mo(t))<0?0:t):[]},zn.takeRight=function(e,t,n){var a=null==e?0:e.length;return a?ia(e,(t=a-(t=n||t===i?1:mo(t)))<0?0:t,a):[]},zn.takeRightWhile=function(e,t){return e&&e.length?ha(e,cs(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?ha(e,cs(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var i=!0,s=!0;if("function"!=typeof e)throw new Ae(a);return Qr(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),Cr(e,t,{leading:i,maxWait:t,trailing:s})},zn.thru=pr,zn.toArray=po,zn.toPairs=No,zn.toPairsIn=Mo,zn.toPath=function(e){return qr(e)?Ut(e,Fs):oo(e)?[e]:Aa(Ps(_o(e)))},zn.toPlainObject=yo,zn.transform=function(e,t,n){var i=qr(e),a=i||Hr(e)||co(e);if(t=cs(t,4),null==n){var s=e&&e.constructor;n=a?i?new s:[]:Qr(e)&&Zr(s)?Bn(Ge(e)):{}}return(a?It:bi)(e,(function(e,i,a){return t(n,e,i,a)})),n},zn.unary=function(e){return Tr(e,1)},zn.union=er,zn.unionBy=tr,zn.unionWith=nr,zn.uniq=function(e){return e&&e.length?ua(e):[]},zn.uniqBy=function(e,t){return e&&e.length?ua(e,cs(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ua(e,i,t):[]},zn.unset=function(e,t){return null==e||da(e,t)},zn.unzip=ir,zn.unzipWith=ar,zn.update=function(e,t,n){return null==e?e:pa(e,t,_a(n))},zn.updateWith=function(e,t,n,a){return a="function"==typeof a?a:i,null==e?e:pa(e,t,_a(n),a)},zn.values=zo,zn.valuesIn=function(e){return null==e?[]:Qt(e,Lo(e))},zn.without=sr,zn.words=Jo,zn.wrap=function(e,t){return Fr(_a(t),e)},zn.xor=rr,zn.xorBy=or,zn.xorWith=cr,zn.zip=lr,zn.zipObject=function(e,t){return ga(e||[],t||[],ti)},zn.zipObjectDeep=function(e,t){return ga(e||[],t||[],Qi)},zn.zipWith=ur,zn.entries=No,zn.entriesIn=Mo,zn.extend=bo,zn.extendWith=wo,oc(zn,zn),zn.add=yc,zn.attempt=Xo,zn.camelCase=Bo,zn.capitalize=$o,zn.ceil=_c,zn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=go(n))==n?n:0),t!==i&&(t=(t=go(t))==t?t:0),oi(go(e),t,n)},zn.clone=function(e){return ci(e,4)},zn.cloneDeep=function(e){return ci(e,5)},zn.cloneDeepWith=function(e,t){return ci(e,5,t="function"==typeof t?t:i)},zn.cloneWith=function(e,t){return ci(e,4,t="function"==typeof t?t:i)},zn.conformsTo=function(e,t){return null==t||li(e,t,Oo(t))},zn.deburr=qo,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=vc,zn.endsWith=function(e,t,n){e=_o(e),t=la(t);var a=e.length,s=n=n===i?a:oi(mo(n),0,a);return(n-=t.length)>=0&&e.slice(n,s)==t},zn.eq=Mr,zn.escape=function(e){return(e=_o(e))&&Z.test(e)?e.replace(W,sn):e},zn.escapeRegExp=function(e){return(e=_o(e))&&ae.test(e)?e.replace(ie,"\\$&"):e},zn.every=function(e,t,n){var a=qr(e)?Ct:mi;return n&&vs(e,t,n)&&(t=i),a(e,cs(t,3))},zn.find=fr,zn.findIndex=$s,zn.findKey=function(e,t){return zt(e,cs(t,3),bi)},zn.findLast=gr,zn.findLastIndex=qs,zn.findLastKey=function(e,t){return zt(e,cs(t,3),wi)},zn.floor=bc,zn.forEach=yr,zn.forEachRight=_r,zn.forIn=function(e,t){return null==e?e:_i(e,cs(t,3),Lo)},zn.forInRight=function(e,t){return null==e?e:vi(e,cs(t,3),Lo)},zn.forOwn=function(e,t){return e&&bi(e,cs(t,3))},zn.forOwnRight=function(e,t){return e&&wi(e,cs(t,3))},zn.get=To,zn.gt=zr,zn.gte=Br,zn.has=function(e,t){return null!=e&&fs(e,t,Ri)},zn.hasIn=Ro,zn.head=Vs,zn.identity=ic,zn.includes=function(e,t,n,i){e=Vr(e)?e:zo(e),n=n&&!i?mo(n):0;var a=e.length;return n<0&&(n=_n(a+n,0)),ro(e)?n<=a&&e.indexOf(t,n)>-1:!!a&&$t(e,t,n)>-1},zn.indexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var a=null==n?0:mo(n);return a<0&&(a=_n(i+a,0)),$t(e,t,a)},zn.inRange=function(e,t,n){return t=ho(t),n===i?(n=t,t=0):n=ho(n),function(e,t,n){return e>=vn(t,n)&&e<_n(t,n)}(e=go(e),t,n)},zn.invoke=Co,zn.isArguments=$r,zn.isArray=qr,zn.isArrayBuffer=Yr,zn.isArrayLike=Vr,zn.isArrayLikeObject=Gr,zn.isBoolean=function(e){return!0===e||!1===e||eo(e)&&ki(e)==v},zn.isBuffer=Hr,zn.isDate=Wr,zn.isElement=function(e){return eo(e)&&1===e.nodeType&&!io(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Vr(e)&&(qr(e)||"string"==typeof e||"function"==typeof e.splice||Hr(e)||co(e)||$r(e)))return!e.length;var t=ms(e);if(t==S||t==A)return!e.size;if(Es(e))return!Fi(e).length;for(var n in e)if(Pe.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Li(e,t)},zn.isEqualWith=function(e,t,n){var a=(n="function"==typeof n?n:i)?n(e,t):i;return a===i?Li(e,t,i,n):!!a},zn.isError=Kr,zn.isFinite=function(e){return"number"==typeof e&&vt(e)},zn.isFunction=Zr,zn.isInteger=Jr,zn.isLength=Xr,zn.isMap=to,zn.isMatch=function(e,t){return e===t||ji(e,t,us(t))},zn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,ji(e,t,us(t),n)},zn.isNaN=function(e){return no(e)&&e!=+e},zn.isNative=function(e){if(xs(e))throw new Ee("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Ui(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=no,zn.isObject=Qr,zn.isObjectLike=eo,zn.isPlainObject=io,zn.isRegExp=ao,zn.isSafeInteger=function(e){return Jr(e)&&e>=-9007199254740991&&e<=h},zn.isSet=so,zn.isString=ro,zn.isSymbol=oo,zn.isTypedArray=co,zn.isUndefined=function(e){return e===i},zn.isWeakMap=function(e){return eo(e)&&ms(e)==L},zn.isWeakSet=function(e){return eo(e)&&"[object WeakSet]"==ki(e)},zn.join=function(e,t){return null==e?"":Mt.call(e,t)},zn.kebabCase=Yo,zn.last=Ks,zn.lastIndexOf=function(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var s=a;return n!==i&&(s=(s=mo(n))<0?_n(a+s,0):vn(s,a-1)),t==t?function(e,t,n){for(var i=n+1;i--;)if(e[i]===t)return i;return i}(e,t,s):Bt(e,Yt,s,!0)},zn.lowerCase=Vo,zn.lowerFirst=Go,zn.lt=lo,zn.lte=uo,zn.max=function(e){return e&&e.length?fi(e,ic,Ti):i},zn.maxBy=function(e,t){return e&&e.length?fi(e,cs(t,2),Ti):i},zn.mean=function(e){return Vt(e,ic)},zn.meanBy=function(e,t){return Vt(e,cs(t,2))},zn.min=function(e){return e&&e.length?fi(e,ic,Ni):i},zn.minBy=function(e,t){return e&&e.length?fi(e,cs(t,2),Ni):i},zn.stubArray=fc,zn.stubFalse=gc,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=xc,zn.nth=function(e,t){return e&&e.length?qi(e,mo(t)):i},zn.noConflict=function(){return mt._===this&&(mt._=ze),this},zn.noop=cc,zn.now=kr,zn.pad=function(e,t,n){e=_o(e);var i=(t=mo(t))?hn(e):0;if(!t||i>=t)return e;var a=(t-i)/2;return Ya(ft(a),n)+e+Ya(ht(a),n)},zn.padEnd=function(e,t,n){e=_o(e);var i=(t=mo(t))?hn(e):0;return t&&i<t?e+Ya(t-i,n):e},zn.padStart=function(e,t,n){e=_o(e);var i=(t=mo(t))?hn(e):0;return t&&i<t?Ya(t-i,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(_o(e).replace(se,""),t||0)},zn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&vs(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ho(e),t===i?(t=e,e=0):t=ho(t)),e>t){var a=e;e=t,t=a}if(n||e%1||t%1){var s=xn();return vn(e+s*(t-e+ut("1e-"+((s+"").length-1))),t)}return Wi(e,t)},zn.reduce=function(e,t,n){var i=qr(e)?Ft:Wt,a=arguments.length<3;return i(e,cs(t,4),n,a,pi)},zn.reduceRight=function(e,t,n){var i=qr(e)?Dt:Wt,a=arguments.length<3;return i(e,cs(t,4),n,a,hi)},zn.repeat=function(e,t,n){return t=(n?vs(e,t,n):t===i)?1:mo(t),Ki(_o(e),t)},zn.replace=function(){var e=arguments,t=_o(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,n){var a=-1,s=(t=va(t,e)).length;for(s||(s=1,e=i);++a<s;){var r=null==e?i:e[Fs(t[a])];r===i&&(a=s,r=n),e=Zr(r)?r.call(e):r}return e},zn.round=Ec,zn.runInContext=e,zn.sample=function(e){return(qr(e)?Jn:Ji)(e)},zn.size=function(e){if(null==e)return 0;if(Vr(e))return ro(e)?hn(e):e.length;var t=ms(e);return t==S||t==A?e.size:Fi(e).length},zn.snakeCase=Ho,zn.some=function(e,t,n){var a=qr(e)?Nt:aa;return n&&vs(e,t,n)&&(t=i),a(e,cs(t,3))},zn.sortedIndex=function(e,t){return sa(e,t)},zn.sortedIndexBy=function(e,t,n){return ra(e,t,cs(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var i=sa(e,t);if(i<n&&Mr(e[i],t))return i}return-1},zn.sortedLastIndex=function(e,t){return sa(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return ra(e,t,cs(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=sa(e,t,!0)-1;if(Mr(e[n],t))return n}return-1},zn.startCase=Wo,zn.startsWith=function(e,t,n){return e=_o(e),n=null==n?0:oi(mo(n),0,e.length),t=la(t),e.slice(n,n+t.length)==t},zn.subtract=Sc,zn.sum=function(e){return e&&e.length?Kt(e,ic):0},zn.sumBy=function(e,t){return e&&e.length?Kt(e,cs(t,2)):0},zn.template=function(e,t,n){var a=zn.templateSettings;n&&vs(e,t,n)&&(t=i),e=_o(e),t=wo({},t,a,Xa);var s,r,o=wo({},t.imports,a.imports,Xa),c=Oo(o),l=Qt(o,c),u=0,d=t.interpolate||we,p="__p += '",h=Re((t.escape||we).source+"|"+d.source+"|"+(d===Q?he:we).source+"|"+(t.evaluate||we).source+"|$","g"),m="//# sourceURL="+(Pe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rt+"]")+"\n";e.replace(h,(function(t,n,i,a,o,c){return i||(i=a),p+=e.slice(u,c).replace(xe,rn),n&&(s=!0,p+="' +\n__e("+n+") +\n'"),o&&(r=!0,p+="';\n"+o+";\n__p += '"),i&&(p+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),p+="';\n";var f=Pe.call(t,"variable")&&t.variable;if(f){if(de.test(f))throw new Ee("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(r?p.replace(Y,""):p).replace(V,"$1").replace(G,"$1;"),p="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(r?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=Xo((function(){return Se(c,m+"return "+p).apply(i,l)}));if(g.source=p,Kr(g))throw g;return g},zn.times=function(e,t){if((e=mo(e))<1||e>h)return[];var n=f,i=vn(e,f);t=cs(t),e-=f;for(var a=Zt(i,t);++n<e;)t(n);return a},zn.toFinite=ho,zn.toInteger=mo,zn.toLength=fo,zn.toLower=function(e){return _o(e).toLowerCase()},zn.toNumber=go,zn.toSafeInteger=function(e){return e?oi(mo(e),-9007199254740991,h):0===e?e:0},zn.toString=_o,zn.toUpper=function(e){return _o(e).toUpperCase()},zn.trim=function(e,t,n){if((e=_o(e))&&(n||t===i))return Jt(e);if(!e||!(t=la(t)))return e;var a=mn(e),s=mn(t);return wa(a,tn(a,s),nn(a,s)+1).join("")},zn.trimEnd=function(e,t,n){if((e=_o(e))&&(n||t===i))return e.slice(0,fn(e)+1);if(!e||!(t=la(t)))return e;var a=mn(e);return wa(a,0,nn(a,mn(t))+1).join("")},zn.trimStart=function(e,t,n){if((e=_o(e))&&(n||t===i))return e.replace(se,"");if(!e||!(t=la(t)))return e;var a=mn(e);return wa(a,tn(a,mn(t))).join("")},zn.truncate=function(e,t){var n=30,a="...";if(Qr(t)){var s="separator"in t?t.separator:s;n="length"in t?mo(t.length):n,a="omission"in t?la(t.omission):a}var r=(e=_o(e)).length;if(on(e)){var o=mn(e);r=o.length}if(n>=r)return e;var c=n-hn(a);if(c<1)return a;var l=o?wa(o,0,c).join(""):e.slice(0,c);if(s===i)return l+a;if(o&&(c+=l.length-c),ao(s)){if(e.slice(c).search(s)){var u,d=l;for(s.global||(s=Re(s.source,_o(me.exec(s))+"g")),s.lastIndex=0;u=s.exec(d);)var p=u.index;l=l.slice(0,p===i?c:p)}}else if(e.indexOf(la(s),c)!=c){var h=l.lastIndexOf(s);h>-1&&(l=l.slice(0,h))}return l+a},zn.unescape=function(e){return(e=_o(e))&&K.test(e)?e.replace(H,gn):e},zn.uniqueId=function(e){var t=++Fe;return _o(e)+t},zn.upperCase=Ko,zn.upperFirst=Zo,zn.each=yr,zn.eachRight=_r,zn.first=Vs,oc(zn,(wc={},bi(zn,(function(e,t){Pe.call(zn.prototype,t)||(wc[t]=e)})),wc),{chain:!1}),zn.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){zn[e].placeholder=zn})),It(["drop","take"],(function(e,t){Yn.prototype[e]=function(n){n=n===i?1:_n(mo(n),0);var a=this.__filtered__&&!t?new Yn(this):this.clone();return a.__filtered__?a.__takeCount__=vn(n,a.__takeCount__):a.__views__.push({size:vn(n,f),type:e+(a.__dir__<0?"Right":"")}),a},Yn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var n=t+1,i=1==n||3==n;Yn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:cs(e,3),type:n}),t.__filtered__=t.__filtered__||i,t}})),It(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Yn.prototype[e]=function(){return this[n](1).value()[0]}})),It(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Yn.prototype[e]=function(){return this.__filtered__?new Yn(this):this[n](1)}})),Yn.prototype.compact=function(){return this.filter(ic)},Yn.prototype.find=function(e){return this.filter(e).head()},Yn.prototype.findLast=function(e){return this.reverse().find(e)},Yn.prototype.invokeMap=Zi((function(e,t){return"function"==typeof e?new Yn(this):this.map((function(n){return Ci(n,e,t)}))})),Yn.prototype.reject=function(e){return this.filter(Ur(cs(e)))},Yn.prototype.slice=function(e,t){e=mo(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Yn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=mo(t))<0?n.dropRight(-t):n.take(t-e)),n)},Yn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Yn.prototype.toArray=function(){return this.take(f)},bi(Yn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),a=/^(?:head|last)$/.test(t),s=zn[a?"take"+("last"==t?"Right":""):t],r=a||/^find/.test(t);s&&(zn.prototype[t]=function(){var t=this.__wrapped__,o=a?[1]:arguments,c=t instanceof Yn,l=o[0],u=c||qr(t),d=function(e){var t=s.apply(zn,Pt([e],o));return a&&p?t[0]:t};u&&n&&"function"==typeof l&&1!=l.length&&(c=u=!1);var p=this.__chain__,h=!!this.__actions__.length,m=r&&!p,f=c&&!h;if(!r&&u){t=f?t:new Yn(this);var g=e.apply(t,o);return g.__actions__.push({func:pr,args:[d],thisArg:i}),new qn(g,p)}return m&&f?e.apply(this,o):(g=this.thru(d),m?a?g.value()[0]:g.value():g)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(i&&!this.__chain__){var a=this.value();return t.apply(qr(a)?a:[],e)}return this[n]((function(n){return t.apply(qr(n)?n:[],e)}))}})),bi(Yn.prototype,(function(e,t){var n=zn[t];if(n){var i=n.name+"";Pe.call(On,i)||(On[i]=[]),On[i].push({name:t,func:n})}})),On[za(i,2).name]=[{name:"wrapper",func:i}],Yn.prototype.clone=function(){var e=new Yn(this.__wrapped__);return e.__actions__=Aa(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Aa(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Aa(this.__views__),e},Yn.prototype.reverse=function(){if(this.__filtered__){var e=new Yn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Yn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=qr(e),i=t<0,a=n?e.length:0,s=function(e,t,n){var i=-1,a=n.length;for(;++i<a;){var s=n[i],r=s.size;switch(s.type){case"drop":e+=r;break;case"dropRight":t-=r;break;case"take":t=vn(t,e+r);break;case"takeRight":e=_n(e,t-r)}}return{start:e,end:t}}(0,a,this.__views__),r=s.start,o=s.end,c=o-r,l=i?o:r-1,u=this.__iteratees__,d=u.length,p=0,h=vn(c,this.__takeCount__);if(!n||!i&&a==c&&h==c)return ma(e,this.__actions__);var m=[];e:for(;c--&&p<h;){for(var f=-1,g=e[l+=t];++f<d;){var y=u[f],_=y.iteratee,v=y.type,b=_(g);if(2==v)g=b;else if(!b){if(1==v)continue e;break e}}m[p++]=g}return m},zn.prototype.at=hr,zn.prototype.chain=function(){return dr(this)},zn.prototype.commit=function(){return new qn(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===i&&(this.__values__=po(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,n=this;n instanceof $n;){var a=Ns(n);a.__index__=0,a.__values__=i,t?s.__wrapped__=a:t=a;var s=a;n=n.__wrapped__}return s.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Yn){var t=e;return this.__actions__.length&&(t=new Yn(this)),(t=t.reverse()).__actions__.push({func:pr,args:[Qs],thisArg:i}),new qn(t,this.__chain__)}return this.thru(Qs)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return ma(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,Je&&(zn.prototype[Je]=function(){return this}),zn}();gt?((gt.exports=yn)._=yn,ft._=yn):mt._=yn}).call(n)}(_d,_d.exports);var vd=_d.exports;const bd={type:W,stimulus:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?Mt.audio[vd.camelCase("introductionNs")]:Mt.audio[vd.camelCase("introduction")],prompt:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?`\n <div class = "jspsych-content-modified">\n <div class="container">\n <img src="${Mt.images.academyBackground}" alt= "background" style="width:100%;"> \n </div>\n <div class="text-block">\n <h3> ${Ue.t("introduction.intro.text1")} </h3>\n <p> ${Ue.t("introduction.intro.text2")} </p> \n <p> ${Ue.t("introduction.intro.text3")} </p>\n </div>\n ${Dt?"":`<div class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})} </div>`}\n </div>\n `:`\n <div class = "jspsych-content-modified">\n <div class="container">\n <img src="${Mt.images.academyBackground}" alt= "background" style="width:100%;"> \n </div>\n <div class="text-block">\n <h3> ${Ue.t("introduction.intro.text4")} </h3>\n <p> ${Ue.t("introduction.intro.text5")} </p> \n <p> ${Ue.t("introduction.intro.text6")} </p> \n <p> ${Ue.t("introduction.intro.text3")} </p>\n </div>\n ${Dt?"":`<div class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})} </div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>Dt?`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.continue")}`})} </button>`:"",on_start:()=>document.body.style.cursor="none"},wd={timeline:[{type:W,stimulus:()=>Mt.audio.postPracticeInstruction,prompt:()=>`\n <div class="jspsych-content-modified" id="sre-background">\n <h3>${Ue.t("practice.postPracticeIntro.text1")}</h3>\n <p>${Ue.t("practice.postPracticeIntro.text2")}</p>\n <p>${Ue.t("practice.postPracticeIntro.text3")}</p>\n <p>${Ue.t("practice.postPracticeIntro.text4")}</p>\n <p>${Ue.t("practice.postPracticeIntro.text5")}</p>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})}</div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>Dt?`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.continue")}`})} </button>`:""},{type:W,stimulus:()=>Mt.audio.postPracticeReminder,prompt:()=>`\n <div class="jspsych-content-modified" id="sre-background">\n <h2>Remember!</h2>\n <div class="row">\n <div class="column_2_lower" style="background-color:#FFFFFF;">\n <p style = "text-align:center;"> ${Ue.t(Dt?"practice.postPracticeReminder.text1Mobile":"practice.postPracticeReminder.text1")} </p>\n <img width="70%" src="${Mt.images.falseKey}" alt="arrow keys">\n </div>\n <div class="column_2_lower" style="background-color:#FFFFFF;">\n <p style = "text-align:center;"> ${Ue.t(Dt?"practice.postPracticeReminder.text2Mobile":"practice.postPracticeReminder.text2")} </p>\n <img width="70%" src="${Mt.images.trueKey}" alt="arrow keys">\n </div>\n </div>\n <p><b> ${Ue.t("practice.postPracticeReminder.text3")} </b></p>\n <p><b> ${Ue.t("practice.postPracticeReminder.text4")} </b></p>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.begin")}`})} </div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>Dt?`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.begin")}`})} </button>`:"",on_finish:e=>{s.session.set("indexTracking",0)}}]},xd={name:"html-multi-response",parameters:{stimulus:{type:d.HTML_STRING,pretty_name:"Stimulus",default:void 0},button_choices:{type:d.STRING,pretty_name:"Button Choices",default:[],array:!0},keyboard_choices:{type:d.KEYS,pretty_name:"Keyboard Choices",default:"NO_KEYS"},button_html:{type:d.HTML_STRING,pretty_name:"Button HTML",default:'<button class="jspsych-btn">%choice%</button>',array:!0},prompt:{type:d.HTML_STRING,pretty_name:"Prompt",default:null},stimulus_duration:{type:d.INT,pretty_name:"Stimulus duration",default:null},trial_duration:{type:d.INT,pretty_name:"Trial duration",default:null},margin_vertical:{type:d.STRING,pretty_name:"Margin vertical",default:"0px"},margin_horizontal:{type:d.STRING,pretty_name:"Margin horizontal",default:"8px"},response_ends_trial:{type:d.BOOL,pretty_name:"Response ends trial",default:!0}}};class Ed{constructor(e){this.jsPsych=e}trial(e,t){var n='<div id="jspsych-html-multi-response-stimulus">'+t.stimulus+"</div>",i=[];if(Array.isArray(t.button_html))t.button_html.length==t.button_choices.length?i=t.button_html:console.error("Error in html-multi-response plugin. The length of the button_html array does not equal the length of the button_choices array");else for(var a=0;a<t.button_choices.length;a++)i.push(t.button_html);n+='<div id="jspsych-html-multi-response-btngroup">';for(a=0;a<t.button_choices.length;a++){var s=i[a].replace(/%choice%/g,t.button_choices[a]);n+='<div class="jspsych-html-multi-response-button" style="display: inline-block; margin:'+t.margin_vertical+" "+t.margin_horizontal+'" id="jspsych-html-multi-response-button-'+a+'" data-choice="'+a+'">'+s+"</div>"}n+="</div>",null!==t.prompt&&(n+=t.prompt),e.innerHTML=n;if("NO_KEYS"!=t.keyboard_choices)var r=this.jsPsych.pluginAPI.getKeyboardResponse({callback_function:function(n){e.querySelector("#jspsych-html-multi-response-stimulus").className+=" responded",null==c.key&&(c=Object.assign({source:"keyboard",button:null},n)),t.response_ends_trial&&l()},valid_responses:t.keyboard_choices,rt_method:"performance",persist:!1,allow_held_key:!1});var o=performance.now();for(a=0;a<t.button_choices.length;a++)e.querySelector("#jspsych-html-multi-response-button-"+a).addEventListener("click",(e=>{u(e.currentTarget.getAttribute("data-choice"))}));var c={rt:null,button:null,key:null,source:null};const l=()=>{this.jsPsych.pluginAPI.clearAllTimeouts(),void 0!==r&&this.jsPsych.pluginAPI.cancelKeyboardResponse(r);var n={rt:c.rt,stimulus:t.stimulus,button_response:c.button,keyboard_response:c.key,response_source:c.source};e.innerHTML="",this.jsPsych.finishTrial(n)};function u(n){var i=performance.now(),a=Math.round(i-o);c.button=parseInt(n),c.rt=a,c.source="button",e.querySelector("#jspsych-html-multi-response-stimulus").className+=" responded";for(var s=document.querySelectorAll(".jspsych-html-multi-response-button button"),r=0;r<s.length;r++)s[r].setAttribute("disabled","disabled");t.response_ends_trial&&l()}null!==t.stimulus_duration&&this.jsPsych.pluginAPI.setTimeout((()=>{e.querySelector("#jspsych-html-multi-response-stimulus").style.visibility="hidden"}),t.stimulus_duration),null!==t.trial_duration&&this.jsPsych.pluginAPI.setTimeout(l,t.trial_duration)}simulate(e,t,n,i){"data-only"==t&&(i(),this.simulate_data_only(e,n)),"visual"==t&&this.simulate_visual(e,n,i)}create_simulation_data(e,t){const n={stimulus:e.stimulus,rt:this.jsPsych.randomization.sampleExGaussian(500,50,1/150,!0),keyboard_response:this.jsPsych.pluginAPI.getValidKey(e.keyboard_choices),button_response:null,response_source:"keyboard"},i={stimulus:e.stimulus,rt:this.jsPsych.randomization.sampleExGaussian(500,50,1/150,!0),button_response:this.jsPsych.randomization.randomInt(0,e.button_choices.length-1),keyboard_response:null,response_source:"button"},a=Math.random()<.5?n:i,s=this.jsPsych.pluginAPI.mergeSimulationData(a,t);return this.jsPsych.pluginAPI.ensureSimulationDataConsistency(e,s),s}simulate_data_only(e,t){const n=this.create_simulation_data(e,t);this.jsPsych.finishTrial(n)}simulate_visual(e,t,n){const i=this.create_simulation_data(e,t),a=this.jsPsych.getDisplayElement();this.trial(a,e),n(),null!==i.rt&&(null!==i.button_response?this.jsPsych.pluginAPI.clickTarget(a.querySelector(`div[data-choice="${i.button_response}"] button`),i.rt):this.jsPsych.pluginAPI.pressKey(i.keyboard_response,i.rt))}}Ed.info=xd,d.HTML_STRING,d.KEYS,d.HTML_STRING,d.INT,d.INT,d.BOOL;const Sd={type:W,stimulus:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?Mt.audio[vd.camelCase("halfwayNs")]:s.session.get("config").story?Mt.audio[vd.camelCase(`${s.session("character")}Halfway`)]:void 0,prompt:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?`\n <div class="jspsych-content-modified">\n <div class="container">\n <img src="${Mt.images.classroomBackground}" alt= "background" style="width:100%;"> \n </div>\n <div class="text-block">\n <h3> ${Ue.t("gameBreak.halfwayScreen.text1")} </h3>\n <p> ${Ue.t("gameBreak.halfwayScreen.text2")} </p>\n </div>\n ${Dt?"":`<div class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})} </div>`}\n </div>\n `:`\n <div class="jspsych-content-modified" id="sre-background">\n <div class="row">\n <div class="column_1">\n <img class="characterleft" src="${Mt.images[vd.camelCase(`${s.session("character")}Talking`)]}" alt="animation of student talking">\n </div>\n <div class= "column_3 halfway-text-block">\n <div class="middle">\n <p> ${Ue.t("gameBreak.halfwayScreen.text3")}</p>\n <p> ${Ue.t("gameBreak.halfwayScreen.text4")}</p>\n </div>\n </div>\n </div>\n ${Dt?"":`<div class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})} </div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.continue")}`})} </button>`,on_finish:e=>{s.session.set("indexTracking",0)}},kd={timeline:[{type:W,stimulus:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?Mt.audio[vd.camelCase("endNs")]:s.session.get("config").story?Mt.audio[vd.camelCase(`${s.session("character")}End`)]:void 0,prompt:()=>!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6?`\n <div class="jspsych-content-modified">\n <div class="container">\n <img src="${Mt.images.academyBackground}" alt= "background" style="width:100%;"> \n </div>\n <div class="text-block">\n <h3> ${Ue.t("gameBreak.endScreen.text1")} </h3>\n <p> ${Ue.t("gameBreak.endScreen.text2")} </p> \n </div>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.save")}`})}</div>`}\n </div>\n `:`\n <div class="jspsych-content-modified">\n <div class="class-container">\n <img src="${Mt.images.classroomBackground}" alt= "classroom" style="width:100%;"> \n </div>\n <div class="upper">\n <div class="select-text-block"> <span style="font-weight:bold; white-space:nowrap">\n <h3> ${Ue.t("gameBreak.endScreen.text3")} </h3>\n <p> ${s.session("character_name")} ${Ue.t("gameBreak.endScreen.text4")} </p> \n </div>\n </div>\n <div class="student" id="end-student">\n <img src="${Mt.images[vd.camelCase(`${s.session("character")}Happy`)]}" alt= "character is happy"> \n </div>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.save")}`})}</div>`}\n </div>\n `,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.save")}`})} </button>`,data:{save_trial:!1}},{timeline:[{type:Ed,stimulus:()=>`<div class="jspsych-content-modified">\n <div class="container">\n <img src="${Mt.images.academyBackground}" alt= "background" style="width:100%;"> </div>\n <div class="demo-text-block">\n <h3>${Ue.t("gameBreak.debrief.text1")}</h3>\n <p>${Ue.t("gameBreak.debrief.text2")}</p>\n </div>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.close")}`})}</div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.close")}`})} </button>`}],conditional_function:()=>"demo"===s.session.get("config").userMode},{type:Z,fullscreen_mode:!1,delay_after:0}]},Td={1:{character:"dog",characterName:"Amy",characterActivity:"go to track practice"},2:{character:"cat",characterName:"Carson",characterActivity:"go to debate club"},3:{character:"bird",characterName:"Jaiden",characterActivity:"hang out with my friends"},4:{character:"deer",characterName:"Dylan",characterActivity:"volunteer at the soup kitchen"}},Rd=[1,2,3,4],Id=["dog","cat","bird","deer"],Ad={timeline:[{type:W,stimulus:()=>Mt.audio.studentSelect,prompt:()=>Dt?`\n <div>\n <img id="mobile-classroom-bg" src=${Mt.images.classroomBackground} alt="background"/>\n <h3>${Ue.t("characterSelect.studentSelect.paragraph1")}</h3>\n <p> ${Ue.t(Dt?"characterSelect.studentSelect.paragraph2Mobile":"characterSelect.studentSelect.paragraph2")} </p>\n </div>`:` \n <div class="jspsych-content-modified">\n <div class="class-container">\n <img id="classroom-bg" src=${Mt.images.classroomBackground} alt="background"> \n </div> \n <div class="upper">\n <div class="select-text-block"> <span style="font-weight:bold; white-space:nowrap">\n <h3>${Ue.t("characterSelect.studentSelect.paragraph1")}</h3>\n <p> ${Ue.t(Dt?"characterSelect.studentSelect.paragraph2Mobile":"characterSelect.studentSelect.paragraph2")} </p> \n </div>\n </div>\n ${Dt?"":`<div class="number">${Rd.map((e=>`<div class="number-block"><n>${e}</n></div>`)).join("")}</div>`}\n <div class="student ${Dt?"mobile-student-select-characters":""}">\n ${Id.map((e=>`<img src=${Mt.images[e]} alt=${e}>`)).join("")}\n </div>\n <div class="button">\n ${Ue.t("navigation.studentSelect")} \n </div>\n </div>\n `,keyboard_choices:()=>Dt?"NO_KEYS":["1","2","3","4"],button_choices:()=>Dt?["1","2","3","4"]:[],button_html:()=>'<button class="grade-btn">%choice%</button>',prompt_above_buttons:()=>Dt,data:{save_trial:!1},on_load:()=>{if(Dt){document.getElementById("jspsych-audio-multi-response-btngroup").classList.add("mobile-audio-btn-container");const e=document.getElementById("jspsych-content");if(e){const t=document.createElement("div"),n=document.createTextNode(Ue.t("characterSelect.studentSelect.paragraph3MobileBefore")),i=document.createTextNode(Ue.t("characterSelect.studentSelect.paragraph3MobileAfter")),a=document.createElement("span");a.classList.add("yellow"),a.textContent=Ue.t("characterSelect.studentSelect.paragraph3MobileSpan"),t.appendChild(n),t.appendChild(a),t.appendChild(i),t.classList.add("button");const s=document.createElement("div"),r=Id.map((e=>{const t=document.createElement("img");return t.setAttribute("src",Mt.images[e]),t.setAttribute("alt",e),t.classList.add("mobile-character-select"),t}));for(const e of r)s.appendChild(e);e.appendChild(s),e.appendChild(t)}}},on_finish:e=>{s.session.set("character",Td[Dt?e.button_response+1:e.keyboard_response].character),s.session.set("character_name",Td[Dt?e.button_response+1:e.keyboard_response].characterName),s.session.set("character_activity",Td[Dt?e.button_response+1:e.keyboard_response].characterActivity)}},{type:W,stimulus:()=>Mt.audio[vd.camelCase(`${s.session("character")}Intro`)],prompt:()=>`\n <div class="jspsych-content-modified" id="sre-background">\n <div class="row">\n <div class="column_1">\n <img class="characterleft" src="${Mt.images[vd.camelCase(`${s.session("character")}Talking`)]}" alt="animation of student talking">\n </div>\n <div class= "column_3 student-text-block">\n <div class="middle">\n <p> ${Ue.t("characterSelect.studentIntro.paragraph1")} ${s.session("character_name")}. </p>\n <p> ${Ue.t("characterSelect.studentIntro.paragraph2")} ${s.session("character_activity")}. </p>\n <p> ${Ue.t("characterSelect.studentIntro.paragraph3")} </p>\n </div>\n </div>\n </div>\n ${Dt?"":`<div class="button">${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.anyKey")}`,action:`${Ue.t("terms.continue")}`})}</div>`}\n </div>`,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>`<button class="button"> ${Ue.t("navigation.continueButtonText",{input:`${Ue.t("terms.here")}`,action:`${Ue.t("terms.continue")}`})} </button>`}],conditional_function:()=>!(!s.session.get("config").story||"default"===s.session.get("config").userMode&&s.session.get("config").userMetadata.grade>=6)},Cd=(e,t)=>({timeline:[{type:Ed,stimulus:()=>{if(0===s.session("indexTracking")){const t=setTimeout((()=>s.session.set("timeOut",!0)),18e4);s.session.set("timerId",t),"tosrec"!==e?s.session.set("currentCorpus",pd[e]):s.session.set("currentCorpus",pd[s.session("tosrecCorpusId")])}return`\n <div class=stimulus_div>\n <p class='stimulus'>${s.session("currentCorpus")[s.session("indexTracking")].sentence}</p>\n </div>`},prompt:()=>{if(!Dt)return`\n <div> \n <img class="lower" src="${Mt.images.roarSreKeyboard}" alt="arrow keys"> \n </div>`},keyboard_choices:()=>Dt?"NO_KEYS":["ArrowLeft","ArrowRight"],button_choices:()=>Dt?[Ue.t("terms.false")[0].toUpperCase(),Ue.t("terms.true")[0].toUpperCase()]:[],button_html:()=>Dt?[`<button class="mobile-stimulus-btn"><img src=${Mt.images.leftArrowBlankShort} alt=${Ue.t("terms.false")}/><span>${Ue.t("terms.false")[0].toLocaleUpperCase()}</span></button>`,`<button class="mobile-stimulus-btn"><img src=${Mt.images.rightArrowBlankShort} alt=${Ue.t("terms.true")}/><span>${Ue.t("terms.true")[0].toLocaleUpperCase()}</span></button>`]:[],on_load:()=>{if(Dt){document.body.style.display="flex",document.body.style.justifyContent="center",document.body.style.alignContent="center";document.querySelector(".jspsych-content-wrapper").classList.add("mobile-stimulus-wrap");document.getElementById("jspsych-content").classList.add("mobile-stimulus-jspsych-content")}},data:{assessment_stage:"test_response"},on_finish:n=>{n.keyboard_response?"arrowleft"===n.keyboard_response?s.session.set("keyResponse","left"):s.session.set("keyResponse","right"):0===n.button_response?s.session.set("buttonResponse","left"):s.session.set("buttonResponse","right"),n.keyboard_response?n.correct=jc.pluginAPI.compareKeys(s.session("keyResponse"),s.session("currentCorpus")[s.session("indexTracking")].direction):n.correct=0===n.button_response&&"left"===s.session("currentCorpus")[s.session("indexTracking")].direction||1===n.button_response&&"right"===s.session("currentCorpus")[s.session("indexTracking")].direction,n.correct?s.session.set("dataCorrect",1):s.session.set("dataCorrect",0),jc.data.addDataToLastTrial({save_trial:!s.session("timeOut"),pid:s.session.get("config").pid,subtask:e,blockId:t,corpusId:"tosrec"!==e?e:s.session("tosrecCorpusId"),trialNumBlock:s.session("indexTracking")+1,itemId:s.session("currentCorpus")[s.session("indexTracking")].itemId,item:s.session("currentCorpus")[s.session("indexTracking")].sentence,truefalse:s.session("currentCorpus")[s.session("indexTracking")].answer,correct:s.session("dataCorrect"),story:s.session.get("config").story})}},{type:W,stimulus:()=>Mt.audio.neutralSoundSub,prompt:()=>Dt?'<div class=stimulus_div>\n <p id="mobile-placeholder-stimulus">Invisible Place holder text</p>\n </div>':`\n <div>\n <img class="lower" src="${Mt.images.roarSreKeyboard}" alt="arrow keys">\n </div>`,keyboard_choices:"NO_KEYS",button_choices:()=>Dt?[Ue.t("terms.false")[0].toUpperCase(),Ue.t("terms.true")[0].toUpperCase()]:[],button_html:()=>Dt?[`<button class="mobile-stimulus-btn"><img src=${Mt.images.leftArrowBlankShort} alt=${Ue.t("terms.false")}/><span>${Ue.t("terms.false")[0].toLocaleUpperCase()}</span></button>`,`<button class="mobile-stimulus-btn"><img src=${Mt.images.rightArrowBlankShort} alt=${Ue.t("terms.true")}/><span>${Ue.t("terms.true")[0].toLocaleUpperCase()}</span></button>`]:[],prompt_above_buttons:!0,on_load:()=>{if(Dt){document.body.style.display="flex",document.body.style.justifyContent="center",document.body.style.alignContent="center";document.querySelector(".jspsych-content-wrapper").classList.add("mobile-stimulus-wrap");document.getElementById("jspsych-content").classList.add("mobile-stimulus-jspsych-content");const e=document.getElementById("jspsych-audio-multi-response-btngroup");e.style.display="flex",e.style.gap="9rem"}},trial_duration:200,response_allowed_while_playing:!1,trial_ends_after_audio:!0}],loop_function:function(e){return s.session("indexTracking")===s.session("currentCorpus").length-1||s.session("timeOut")?(s.session.set("indexTracking",0),s.session.set("timeOut",!1),clearTimeout(s.session.get("timerId")),!1):(s.session.transact("indexTracking",(e=>e+1)),!0)}}),Od={type:W,stimulus:()=>Mt.audio.practiceInstruction,prompt:()=>`\n <div class="jspsych-content-modified" id="sre-background">\n <h2>${Ue.t("practice.intro.text1")}</h2>\n <p>${Ue.t("practice.intro.text2")}</p>\n <div class="row">\n <div class="instruction-boxes">\n <p> \n ${Ue.t(Dt?"practice.intro.text3Mobile":"practice.intro.text3")} \n </p>\n <img src="${Mt.images.practiceLeft}" alt="arrow keys">\n </div>\n <div class="instruction-boxes">\n <p> \n ${Ue.t(Dt?"practice.intro.text4Mobile":"practice.intro.text4")} \n </p>\n <img src="${Mt.images.practiceRight}" alt="arrow keys">\n </div>\n </div>\n <p> <b>${Ue.t("practice.intro.text5")}</b> </p> \n <div class="button">${Ue.t("practice.intro.text6")}</div>\n </div>\n `,keyboard_choices:()=>Dt?"NO_KEYS":"ALL_KEYS",button_choices:()=>Dt?["HERE"]:[],button_html:()=>`<button class="button">${Ue.t("practice.intro.text6Mobile")}</button>`,on_finish:e=>{s.session.set("indexTracking",-1)}},Ld={type:Ed,stimulus:()=>(s.session.transact("indexTracking",(e=>e+1)),`\n <div class = stimulus_div>\n <p class = 'stimulus'>${s.session("practiceCorpus")[s.session("indexTracking")].sentence}</p>\n </div>`),prompt:()=>{if(!Dt)return`\n <div> \n <img class="lower" src="${Mt.images.roarSreKeyboard}" alt="arrow keys"> \n </div>`},keyboard_choices:()=>Dt?"NO_KEYS":["ArrowLeft","ArrowRight"],button_choices:()=>Dt?[Ue.t("terms.false")[0].toUpperCase(),Ue.t("terms.true")[0].toUpperCase()]:[],button_html:()=>Dt?[`<button class="mobile-stimulus-btn"><img src=${Mt.images.leftArrowBlankShort} alt=${Ue.t("terms.false")}/><span>${Ue.t("terms.false")[0].toLocaleUpperCase()}</span></button>`,`<button class="mobile-stimulus-btn"><img src=${Mt.images.rightArrowBlankShort} alt=${Ue.t("terms.true")}/><span>${Ue.t("terms.true")[0].toLocaleUpperCase()}</span></button>`]:[],on_load:()=>{if(Dt){document.body.style.display="flex",document.body.style.justifyContent="center",document.body.style.alignContent="center";document.querySelector(".jspsych-content-wrapper").classList.add("mobile-stimulus-wrap");document.getElementById("jspsych-content").classList.add("mobile-stimulus-jspsych-content")}},data:{assessment_stage:"practice_response",corpusId:"practice",save_trial:!0},on_finish:e=>{e.keyboard_response?(e.correct=jc.pluginAPI.compareKeys(e.keyboard_response,s.session("practiceCorpus")[s.session("indexTracking")].correct_response),s.session.set("arrowResponse",e.keyboard_response)):e.correct="arrowleft"===s.session("practiceCorpus")[s.session("indexTracking")].correct_response&&0===e.button_response||"arrowright"===s.session("practiceCorpus")[s.session("indexTracking")].correct_response&&1===e.button_response,e.correct?(s.session.set("dataCorrect",1),s.session.set("feedbackResponse","Correct!")):(s.session.set("dataCorrect",0),s.session.set("feedbackResponse","That's not quite right."));const t="arrowleft"===e.keyboard_response||0===e.button_response;s.session.set("responseLR",t?"left":"right"),s.session.set("answerRP",t?"false":"true"),s.session.set("responseColor",t?"orange":"blue");const n="arrowleft"===s.session("practiceCorpus")[s.session("indexTracking")].correct_response;s.session.set("correctLR",n?"left":"right"),s.session.set("correctRP",n?"false":"true"),s.session.set("answerColor",n?"orange":"blue"),jc.data.addDataToLastTrial({pid:s.session.get("config").pid,subtask:"practice",corpusId:"practice",correct:s.session("dataCorrect"),trialNumBlock:s.session("indexTracking"),item:s.session("practiceCorpus")[s.session("indexTracking")].sentence,truefalse:s.session("practiceCorpus")[s.session("indexTracking")].answer,story:s.session.get("config").story})}};"false"===s.session("correctRP")?Mt.images.falseFlashKeySplit:Mt.images.falseStaticKeySplit,"false"===s.session("correctRP")?Mt.images.trueStaticKeySplit:Mt.images.trueFlashKeySplit;const jd={type:W,response_allowed_while_playing:()=>s.session.get("config").skipInstructions,stimulus:()=>1===s.session("dataCorrect")?Mt.audio[`feedback${s.session("indexTracking")}Correct`]:Mt.audio[`feedback${s.session("indexTracking")}Incorrect`],prompt:()=>`\n <div class = "stimulus_div">\n <p id=${Dt?"mobile-stimulus-text":""} class="feedback">\n <span class=${s.session("responseColor")}>${s.session("feedbackResponse")} ${Ue.t(Dt?"practice.feedback.text1Mobile":"practice.feedback.text1",{arrow:"left"===s.session("responseLR")?Ue.t("terms.left"):Ue.t("terms.right"),type:"true"==s.session("answerRP")?Ue.t("terms.true"):Ue.t("terms.false")})}</span>\n <br></br> \n "${s.session("practiceCorpus")[s.session("indexTracking")].sentence}"\n <span class=${s.session("answerColor")}> ${Ue.t(Dt?"practice.feedback.text2Mobile":"practice.feedback.text2",{arrow:"left"===s.session("correctLR")?Ue.t("terms.left"):Ue.t("terms.right"),type:"true"==s.session("correctRP")?Ue.t("terms.true"):Ue.t("terms.false")})}</span>\n </p>\n </div>\n ${Dt?"":`<img class="lower" src= "${"false"===s.session("correctRP")?Mt.images.falseFlashKey:Mt.images.trueFlashKey}" alt="arrow keys">`}`,keyboard_choices:()=>Dt?"NO_KEYS":"false"===s.session("correctRP")?["ArrowLeft"]:["ArrowRight"],button_choices:()=>Dt?["ArrowLeft","ArrowRight"]:[],button_html:()=>Dt?[`<button class="mobile-practice-feedback ${"false"===s.session("correctRP")?"":"mobile-disable-button"}">\n <img src=${"false"===s.session("correctRP")?Mt.images.falseFlashKeySplit:Mt.images.falseStaticKeySplit} alt="feedback arrow"/>\n </button>`,`<button class="mobile-practice-feedback ${"false"===s.session("correctRP")?"mobile-disable-button":""}" >\n <img src=${"false"===s.session("correctRP")?Mt.images.trueStaticKeySplit:Mt.images.trueFlashKeySplit} alt="feedback arrow"/>\n </button>`]:"",prompt_above_buttons:()=>Dt,on_load:()=>{document.querySelectorAll(".jspsych-audio-multi-response-button").forEach(((e,t)=>{const n="false"===s.session("correctRP");0!==t||n?1===t&&n&&e.classList.add("mobile-disable-button"):e.classList.add("mobile-disable-button")}))}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}('/* CSS Document */\n.jspsych-display-element {\n font-family: "Source Sans Pro", Gotham, "Helvetica Neue", Helvetica, Arial, "sans-serif";\n width: 60%;\n height: 100%;\n margin: auto;\n text-align: center;\n touch-action: manipulation;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Old versions of Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently\nsupported by Chrome, Edge, Opera and Firefox */\n /*\n .jspsych-content {\n \tdisplay: flex;\n \tflex-direction: column;\n \tjustify-content: center;\n \talign-items: center;\n \tposition: fixed;\n \tleft: 0;\n \ttop: 0;\n \twidth: 100%;\n \theight: 100%;\n }\n\n */\n /* jsPsych progress bar */\n /* Control appearance of jsPsych.data.displayData() */\n /* borrowing Bootstrap style for btn elements, but combining styles a bit */\n}\n.jspsych-display-element .grade-btn {\n padding: 1vh 2vh;\n margin: 1vh;\n margin-top: 4vh;\n font-size: 4vh;\n font-weight: bold;\n cursor: pointer;\n text-align: center;\n vertical-align: middle;\n border: 1vh solid transparent;\n border-radius: 1vh;\n color: rgb(255, 202, 97);\n background-color: rgb(76, 101, 139);\n border-color: rgb(65, 91, 127);\n}\n.jspsych-display-element .mobile-grade-select {\n margin-top: 8rem;\n}\n.jspsych-display-element .mobile-student-select-characters {\n margin-top: 40vh;\n}\n.jspsych-display-element #mobile-classroom-bg {\n position: fixed; /* or absolute, depending on your needs */\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1; /* This ensures the image stays behind other content */\n object-fit: cover;\n}\n.jspsych-display-element .mobile-character-select {\n width: 20%;\n}\n.jspsych-display-element .mobile-audio-btn-container {\n display: flex;\n justify-content: center;\n gap: 10%;\n}\n.jspsych-display-element .mobile-stimulus-wrap {\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content {\n height: 40%;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content #mobile-stimulus {\n font-size: 4rem;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content #mobile-placeholder-stimulus {\n color: white;\n font-size: 4rem;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content .mobile-stimulus-btn {\n border: transparent;\n padding: 0;\n position: relative;\n border: none;\n background: transparent none;\n cursor: pointer;\n display: inline-block;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content .mobile-stimulus-btn img {\n display: block;\n width: 100%;\n height: 100%;\n}\n.jspsych-display-element .mobile-stimulus-wrap .mobile-stimulus-jspsych-content .mobile-stimulus-btn span {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n color: white;\n font-size: 7rem;\n}\n.jspsych-display-element .mobile-practice-feedback {\n background: none;\n margin-top: 4rem;\n}\n.jspsych-display-element .mobile-disable-button {\n pointer-events: none;\n}\n.jspsych-display-element #mobile-stimulus-text {\n font-size: 1.75rem;\n}\n.jspsych-display-element #sre-background {\n background-color: rgb(250, 246, 236);\n -webkit-background-size: cover;\n -moz-background-size: cover;\n -o-background-size: cover;\n background-size: cover;\n max-height: 100%;\n max-width: 100%;\n padding: 0px;\n margin: 0px;\n z-index: -1;\n}\n.jspsych-display-element #end-classroom {\n position: absolute;\n height: 80%;\n left: 0vh;\n bottom: 45vh;\n}\n.jspsych-display-element #end-student {\n position: relative;\n left: 0vh;\n top: 10vh;\n height: 65%;\n}\n.jspsych-display-element .instruction-background {\n display: block;\n background-color: rgb(250, 246, 236);\n padding-top: 0vh;\n min-height: 100%;\n min-width: 100%;\n}\n.jspsych-display-element h1 {\n margin-top: 10%;\n margin-right: 10%;\n margin-left: 10%;\n text-align: center;\n padding-inline: 10px;\n font-weight: semi-bold;\n font-size: 6vh;\n color: rgb(76, 101, 139);\n}\n.jspsych-display-element h2 {\n text-align: center;\n font-style: normal;\n font-weight: regular;\n font-size: 5vh;\n color: rgb(76, 101, 139);\n}\n.jspsych-display-element h3 {\n text-align: center;\n font-style: normal;\n font-weight: regular;\n font-size: 4vh;\n color: rgb(76, 101, 139);\n z-index: 1;\n}\n.jspsych-display-element p:not(.feedback, .stimulus) {\n text-align: center;\n vertical-align: middle;\n font-style: normal;\n font-weight: normal;\n font-size: 3vh;\n color: rgb(0, 0, 0);\n z-index: 1;\n}\n.jspsych-display-element n {\n text-align: center;\n vertical-align: middle;\n font-style: normal;\n font-weight: bold;\n font-size: 3vh;\n color: rgb(255, 202, 97);\n z-index: 1;\n}\n.jspsych-display-element .consent_form_title {\n margin-right: 10%;\n margin-left: 10%;\n font-size: 3vh;\n}\n.jspsych-display-element .consent_form_text {\n margin: 10%;\n text-align: left;\n font-size: 2vh;\n}\n.jspsych-display-element .survey_form_text {\n text-align: center;\n font-size: 3vh;\n}\n.jspsych-display-element .consent_form_agree {\n margin: 5%;\n text-align: left;\n font-size: 2vh;\n}\n.jspsych-display-element .debrief_text {\n margin: 20%;\n text-align: left;\n font-size: 2vh;\n}\n.jspsych-display-element .jspsych-survey-multi-select-option {\n font-size: 2vh;\n text-align: center;\n}\n.jspsych-display-element .stimulus {\n text-align: center;\n vertical-align: middle;\n font-style: normal;\n font-weight: normal;\n font-size: 4vh;\n line-height: 4vh;\n color: rgb(0, 0, 0);\n}\n.jspsych-display-element .full_screen {\n text-align: center;\n font-style: normal;\n font-weight: normal;\n font-size: 32px;\n line-height: 32px;\n padding-top: 300px;\n color: rgb(0, 0, 0);\n}\n.jspsych-display-element .feedback {\n text-align: center;\n font-style: normal;\n font-weight: bold;\n font-size: 3vh;\n line-height: 3vh;\n color: rgb(0, 0, 0);\n}\n.jspsych-display-element .jspsych-content-modified {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n}\n.jspsych-display-element .jspsych-content-modified .class-container {\n width: 100%;\n position: absolute;\n margin: auto;\n display: block;\n}\n.jspsych-display-element .jspsych-content-modified .class-container #classroom-bg {\n position: fixed; /* or absolute, depending on your needs */\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: -1; /* This ensures the image stays behind other content */\n object-fit: cover;\n}\n.jspsych-display-element .text-block {\n position: relative;\n bottom: 15px;\n top: 15px;\n background-color: rgb(246, 241, 230);\n padding-left: 25px;\n padding-right: 25px;\n padding-top: 15px;\n padding-bottom: 15px;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .demo-text-block {\n position: relative;\n bottom: 25px;\n top: 15px;\n background-color: rgb(246, 241, 230);\n padding-left: 85px;\n padding-right: 85px;\n padding-top: 60px;\n padding-bottom: 60px;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .grade-text-block {\n position: relative;\n bottom: 0px;\n top: 0px;\n left: 0px;\n right: 0px;\n background-color: rgb(246, 241, 230);\n padding-left: 0px;\n padding-right: 0px;\n padding-top: 50px;\n padding-bottom: 90px;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .select-text-block {\n position: relative;\n bottom: 15px;\n top: 30px;\n background-color: rgb(246, 241, 230);\n padding-left: 20px;\n padding-right: 20px;\n padding-top: 10px;\n padding-bottom: 10px;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .number-block {\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n height: 5vh;\n width: 6vh;\n padding-left: 3vh;\n padding-right: 3vh;\n text-align: center;\n vertical-align: middle;\n background-color: rgb(76, 101, 139);\n border: 6px solid rgb(65, 91, 127);\n border-radius: 10px;\n align-self: center;\n}\n.jspsych-display-element .container {\n width: 100%;\n position: fixed;\n display: block;\n}\n.jspsych-display-element .transparent {\n background: rgba(255, 255, 255, 0);\n border-color: rgba(255, 255, 255, 0);\n}\n.jspsych-display-element .center {\n margin: 0;\n position: absolute;\n top: 50%;\n left: 50%;\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.jspsych-display-element .star-center {\n margin: 0;\n position: absolute;\n top: 45%;\n left: 51%;\n -ms-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n}\n.jspsych-display-element .vertical-center {\n margin: 0;\n position: absolute;\n top: 50%;\n -ms-transform: translateY(-50%);\n transform: translateY(-50%);\n}\n.jspsych-display-element .jspsych-video-button-response-stimulus {\n margin: 0;\n position: absolute;\n top: 45%;\n height: 90%;\n -ms-transform: translateY(-45%);\n transform: translateY(-45%);\n}\n.jspsych-display-element .stimulus_div {\n display: flex;\n justify-content: center;\n align-items: center;\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n}\n.jspsych-display-element .text_div {\n display: flex;\n justify-content: center;\n align-items: center;\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 60%;\n}\n.jspsych-display-element .center {\n vertical-align: middle;\n text-align: center;\n}\n.jspsych-display-element .upper {\n position: fixed;\n top: 0%;\n left: 50%;\n transform: translate(-50%, -50%);\n height: 2vh;\n}\n.jspsych-display-element .lower {\n position: fixed;\n bottom: 20%;\n left: 50%;\n transform: translate(-50%, -50%);\n height: 7vh;\n}\n.jspsych-display-element .orange {\n color: rgb(219, 97, 69);\n}\n.jspsych-display-element .blue {\n color: rgb(66, 152, 181);\n}\n.jspsych-display-element .yellow {\n color: rgb(255, 202, 97);\n}\n.jspsych-display-element .row {\n display: flex;\n}\n.jspsych-display-element .row .instruction-boxes {\n margin-top: 2%;\n margin-bottom: 2%;\n padding: 3vh 2vh 3vh 2vh;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n margin-right: 5%;\n margin-left: 5%;\n background-color: #FFFFFF;\n}\n.jspsych-display-element .row .instruction-boxes p {\n text-align: center;\n}\n.jspsych-display-element .row .instruction-boxes img {\n width: 60%;\n}\n.jspsych-display-element .row .column_1 {\n padding: 0 0 10vh 0;\n}\n.jspsych-display-element .row .column_1 .characterleft {\n text-align: center;\n vertical-align: middle;\n position: relative;\n top: 10%;\n height: 70vh;\n}\n.jspsych-display-element .row .column_3 {\n margin-top: 10rem;\n height: 36vh;\n padding-right: 1vw;\n padding-left: 1vw;\n}\n.jspsych-display-element .row .halfway-text-block {\n background-color: rgb(255, 255, 255);\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .row .middle {\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-content: center;\n}\n.jspsych-display-element .row .student-text-block {\n position: relative;\n margin-top: 10vh;\n margin-left: 5vh;\n margin-right: 5vh;\n height: 50vh;\n background-color: rgb(255, 255, 255);\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n}\n.jspsych-display-element .column_2_lower {\n padding: 0 2vh 3vh 2vh;\n flex: 50%;\n border: 6px solid rgb(229, 218, 191);\n border-radius: 10px;\n margin-right: 5%;\n margin-left: 5%;\n}\n.jspsych-display-element .button {\n left: 0;\n right: 0;\n background-color: rgb(76, 101, 139);\n text-align: center;\n vertical-align: middle;\n padding: 2vh;\n font-style: normal;\n font-weight: bold;\n font-size: 3vh;\n color: white;\n position: fixed;\n display: block;\n bottom: 0;\n border: 0;\n z-index: 1;\n}\n.jspsych-display-element .story-scene {\n width: 100%;\n position: fixed;\n display: block;\n bottom: 5vh;\n}\n.jspsych-display-element .scene {\n position: fixed;\n bottom: 5vh;\n width: 100%;\n display: block;\n}\n.jspsych-display-element .student {\n position: relative;\n display: inline-flex;\n flex-direction: row;\n height: 50%;\n width: 50%;\n bottom: 10vh;\n right: 0vh;\n justify-content: center;\n gap: 50px;\n}\n.jspsych-display-element .number {\n position: relative;\n display: inline-flex;\n flex-direction: row;\n height: 50%;\n width: 50%;\n bottom: -10vh;\n left: 1vh;\n justify-content: center;\n gap: 200px;\n}\n.jspsych-display-element .imageleft {\n text-align: center;\n position: relative;\n top: 50%;\n height: 30vh;\n}\n.jspsych-display-element #jspsych-progressbar-container {\n color: #555;\n border-bottom: 1px solid #dedede;\n background-color: #f9f9f9;\n margin-bottom: 1em;\n text-align: center;\n padding: 8px 0px;\n width: 100%;\n line-height: 1em;\n}\n.jspsych-display-element #jspsych-progressbar-container span {\n font-size: 14px;\n padding-right: 14px;\n}\n.jspsych-display-element #jspsych-progressbar-outer {\n background-color: #eee;\n width: 50%;\n margin: auto;\n height: 14px;\n display: inline-block;\n vertical-align: middle;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.jspsych-display-element #jspsych-progressbar-inner {\n background-color: #aaa;\n width: 0%;\n height: 100%;\n}\n.jspsych-display-element #jspsych-data-display {\n text-align: left;\n}\n.jspsych-display-element .jspsych-btn {\n display: inline-block;\n padding: 1vh 2vh;\n margin: 1vh;\n font-size: 4vh;\n font-weight: bold;\n cursor: pointer;\n line-height: 1.4;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-image: none;\n border: 1vh solid transparent;\n border-radius: 1vh;\n color: rgb(255, 202, 97);\n background-color: rgb(76, 101, 139);\n border-color: rgb(65, 91, 127);\n}\n.jspsych-display-element .mep-stimulus {\n display: inline-block;\n width: 1.65vw;\n height: 1.65vw;\n margin: 0.13vw;\n padding: 0px 0px 0.825vw 0px;\n background: white;\n border-style: solid;\n border-width: 0px 0px 8px 0px;\n border-color: rgba(255, 255, 255, 0);\n}\n.jspsych-display-element .bottom-border-blue {\n border-bottom-color: blue !important;\n}\n.jspsych-display-element #jspsych-html-button-response-stimulus {\n margin-bottom: 25vw;\n}\n.jspsych-display-element #jspsych-html-multi-response-btngroup {\n position: relative;\n bottom: -70%;\n width: 100%;\n display: flex;\n gap: 9rem;\n}\n.jspsych-display-element #jspsych-audio-multi-response-btngroup {\n position: relative;\n bottom: -70%;\n width: 100%;\n}\n.jspsych-display-element #fixation-prompt {\n margin-bottom: 0.825%;\n}\n.jspsych-display-element .jspsych-html-button-response-button {\n display: inline-block;\n width: 4vw;\n height: 4vw;\n margin: 0.75vw;\n}\n.jspsych-display-element #jspsych-fullscreen-btn {\n position: fixed;\n bottom: 20%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.jspsych-display-element .jspsych-survey-html-form {\n position: fixed;\n bottom: 20%;\n left: 50%;\n transform: translate(-50%, -50%);\n}');const Ud=Object.prototype.toString;function Pd(e){switch(Ud.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return Vd(e,Error)}}function Fd(e,t){return Ud.call(e)===`[object ${t}]`}function Dd(e){return Fd(e,"ErrorEvent")}function Nd(e){return Fd(e,"DOMError")}function Md(e){return Fd(e,"String")}function zd(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function Bd(e){return Fd(e,"Object")}function $d(e){return"undefined"!=typeof Event&&Vd(e,Event)}function qd(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function Yd(e){return"number"==typeof e&&e!=e}function Vd(e,t){try{return e instanceof t}catch(e){return!1}}function Gd(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}function Hd(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function Wd(e,t){if(!Array.isArray(e))return"";const n=[];for(let t=0;t<e.length;t++){const i=e[t];try{Gd(i)?n.push("[VueViewModel]"):n.push(String(i))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function Kd(e,t,n=!1){return!!Md(e)&&(Fd(t,"RegExp")?t.test(e):!!Md(t)&&(n?e===t:e.includes(t)))}function Zd(e,t=[],n=!1){return t.some((t=>Kd(e,t,n)))}function Jd(e,t,n=250,i,a,s,r){if(!(s.exception&&s.exception.values&&r&&Vd(r.originalException,Error)))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;var c,l;o&&(s.exception.values=(c=Xd(e,t,a,r.originalException,i,s.exception.values,o,0),l=n,c.map((e=>(e.value&&(e.value=Hd(e.value,l)),e)))))}function Xd(e,t,n,i,a,s,r,o){if(s.length>=n+1)return s;let c=[...s];if(Vd(i[a],Error)){Qd(r,o);const s=e(t,i[a]),l=c.length;ep(s,a,l,o),c=Xd(e,t,n,i[a],a,[s,...c],s,l)}return Array.isArray(i.errors)&&i.errors.forEach(((i,s)=>{if(Vd(i,Error)){Qd(r,o);const l=e(t,i),u=c.length;ep(l,`errors[${s}]`,u,o),c=Xd(e,t,n,i,a,[l,...c],l,u)}})),c}function Qd(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function ep(e,t,n,i){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:i}}function tp(e){return e&&e.Math==Math?e:void 0}const np="object"==typeof globalThis&&tp(globalThis)||"object"==typeof window&&tp(window)||"object"==typeof self&&tp(self)||"object"==typeof global&&tp(global)||function(){return this}()||{};function ip(){return np}function ap(e,t,n){const i=n||np,a=i.__SENTRY__=i.__SENTRY__||{};return a[e]||(a[e]=t())}const sp=ip(),rp=80;function op(e,t={}){try{let n=e;const i=5,a=[];let s=0,r=0;const o=" > ",c=o.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||rp;for(;n&&s++<i&&(l=cp(n,u),!("html"===l||s>1&&r+a.length*c+l.length>=d));)a.push(l),r+=l.length,n=n.parentNode;return a.reverse().join(o)}catch(e){return"<unknown>"}}function cp(e,t){const n=e,i=[];let a,s,r,o,c;if(!n||!n.tagName)return"";i.push(n.tagName.toLowerCase());const l=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(l&&l.length)l.forEach((e=>{i.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&i.push(`#${n.id}`),a=n.className,a&&Md(a))for(s=a.split(/\s+/),c=0;c<s.length;c++)i.push(`.${s[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)r=u[c],o=n.getAttribute(r),o&&i.push(`[${r}="${o}"]`);return i.join("")}const lp=["debug","info","warn","error","log","assert","trace"],up={};function dp(e){if(!("console"in np))return e();const t=np.console,n={},i=Object.keys(up);i.forEach((e=>{const i=up[e];n[e]=t[e],t[e]=i}));try{return e()}finally{i.forEach((e=>{t[e]=n[e]}))}}const pp=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?lp.forEach((n=>{t[n]=(...t)=>{e&&dp((()=>{np.console[n](`Sentry Logger [${n}]:`,...t)}))}})):lp.forEach((e=>{t[e]=()=>{}})),t}(),hp=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function mp(e,t=!1){const{host:n,path:i,pass:a,port:s,projectId:r,protocol:o,publicKey:c}=e;return`${o}://${c}${t&&a?`:${a}`:""}@${n}${s?`:${s}`:""}/${i?`${i}/`:i}${r}`}function fp(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function gp(e){const t="string"==typeof e?function(e){const t=hp.exec(e);if(!t)return void console.error(`Invalid Sentry Dsn: ${e}`);const[n,i,a="",s,r="",o]=t.slice(1);let c="",l=o;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const e=l.match(/^\d+/);e&&(l=e[0])}return fp({host:s,pass:a,path:c,projectId:l,port:r,protocol:n,publicKey:i})}(e):fp(e);if(t&&function(e){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return!0;const{port:t,projectId:n,protocol:i}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(pp.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(i)?t&&isNaN(parseInt(t,10))&&(pp.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(pp.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),1):(pp.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}class yp extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}function _p(e,t,n){if(!(t in e))return;const i=e[t],a=n(i);"function"==typeof a&&bp(a,i),e[t]=a}function vp(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function bp(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,vp(e,"__sentry_original__",t)}catch(e){}}function wp(e){return e.__sentry_original__}function xp(e){if(Pd(e))return{message:e.message,name:e.name,stack:e.stack,...Sp(e)};if($d(e)){const t={type:e.type,target:Ep(e.target),currentTarget:Ep(e.currentTarget),...Sp(e)};return"undefined"!=typeof CustomEvent&&Vd(e,CustomEvent)&&(t.detail=e.detail),t}return e}function Ep(e){try{return t=e,"undefined"!=typeof Element&&Vd(t,Element)?op(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}var t}function Sp(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function kp(e){return Tp(e,new Map)}function Tp(e,t){if(Bd(e)){const n=t.get(e);if(void 0!==n)return n;const i={};t.set(e,i);for(const n of Object.keys(e))void 0!==e[n]&&(i[n]=Tp(e[n],t));return i}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const i=[];return t.set(e,i),e.forEach((e=>{i.push(Tp(e,t))})),i}return e}const Rp=50,Ip=/\(error: (.*)\)/,Ap=/captureMessage|captureException/;function Cp(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0)=>{const i=[],a=e.split("\n");for(let e=n;e<a.length;e++){const n=a[e];if(n.length>1024)continue;const s=Ip.test(n)?n.replace(Ip,"$1"):n;if(!s.match(/\S*Error: /)){for(const e of t){const t=e(s);if(t){i.push(t);break}}if(i.length>=Rp)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop();t.reverse(),Ap.test(t[t.length-1].function||"")&&(t.pop(),Ap.test(t[t.length-1].function||"")&&t.pop());return t.slice(0,Rp).map((e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"})))}(i)}}const Op="<anonymous>";function Lp(e){try{return e&&"function"==typeof e&&e.name||Op}catch(e){return Op}}const jp=ip();function Up(){if(!("fetch"in jp))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function Pp(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const Fp=ip();const Dp=ip(),Np="__sentry_xhr_v2__",Mp={},zp={};function Bp(e){if(!zp[e])switch(zp[e]=!0,e){case"console":!function(){if(!("console"in np))return;lp.forEach((function(e){e in np.console&&_p(np.console,e,(function(t){return up[e]=t,function(...t){qp("console",{args:t,level:e});const n=up[e];n&&n.apply(np.console,t)}}))}))}();break;case"dom":!function(){if(!Dp.document)return;const e=qp.bind(null,"dom"),t=Zp(e,!0);Dp.document.addEventListener("click",t,!1),Dp.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=Dp[t]&&Dp[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(_p(n,"addEventListener",(function(t){return function(n,i,a){if("click"===n||"keypress"==n)try{const i=this,s=i.__sentry_instrumentation_handlers__=i.__sentry_instrumentation_handlers__||{},r=s[n]=s[n]||{refCount:0};if(!r.handler){const i=Zp(e);r.handler=i,t.call(this,n,i,a)}r.refCount++}catch(e){}return t.call(this,n,i,a)}})),_p(n,"removeEventListener",(function(e){return function(t,n,i){if("click"===t||"keypress"==t)try{const n=this,a=n.__sentry_instrumentation_handlers__||{},s=a[t];s&&(s.refCount--,s.refCount<=0&&(e.call(this,t,s.handler,i),s.handler=void 0,delete a[t]),0===Object.keys(a).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,i)}})))}))}();break;case"xhr":!function(){if(!Dp.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;_p(e,"open",(function(e){return function(...t){const n=t[1],i=this[Np]={method:Md(t[0])?t[0].toUpperCase():t[0],url:t[1],request_headers:{}};Md(n)&&"POST"===i.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const a=()=>{const e=this[Np];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}qp("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?_p(this,"onreadystatechange",(function(e){return function(...t){return a(),e.apply(this,t)}})):this.addEventListener("readystatechange",a),_p(this,"setRequestHeader",(function(e){return function(...t){const[n,i]=t,a=this[Np];return a&&(a.request_headers[n.toLowerCase()]=i),e.apply(this,t)}})),e.apply(this,t)}})),_p(e,"send",(function(e){return function(...t){const n=this[Np];return n&&void 0!==t[0]&&(n.body=t[0]),qp("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}();break;case"fetch":!function(){if(!function(){if(!Up())return!1;if(Pp(jp.fetch))return!0;let e=!1;const t=jp.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Pp(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}())return;_p(np,"fetch",(function(e){return function(...t){const{method:n,url:i}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:Vp(t),method:Yp(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Vp(t),method:Yp(t,"method")?String(t.method).toUpperCase():"GET"}}(t),a={args:t,fetchData:{method:n,url:i},startTimestamp:Date.now()};return qp("fetch",{...a}),e.apply(np,t).then((e=>(qp("fetch",{...a,endTimestamp:Date.now(),response:e}),e)),(e=>{throw qp("fetch",{...a,endTimestamp:Date.now(),error:e}),e}))}}))}();break;case"history":!function(){if(!function(){const e=Fp.chrome,t=e&&e.app&&e.app.runtime,n="history"in Fp&&!!Fp.history.pushState&&!!Fp.history.replaceState;return!t&&n}())return;const e=Dp.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=Gp,t=String(n);Gp=t,qp("history",{from:e,to:t})}return e.apply(this,t)}}Dp.onpopstate=function(...t){const n=Dp.location.href,i=Gp;if(Gp=n,qp("history",{from:i,to:n}),e)try{return e.apply(this,t)}catch(e){}},_p(Dp.history,"pushState",t),_p(Dp.history,"replaceState",t)}();break;case"error":Jp=Dp.onerror,Dp.onerror=function(e,t,n,i,a){return qp("error",{column:i,error:a,line:n,msg:e,url:t}),!(!Jp||Jp.__SENTRY_LOADER__)&&Jp.apply(this,arguments)},Dp.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":Xp=Dp.onunhandledrejection,Dp.onunhandledrejection=function(e){return qp("unhandledrejection",e),!(Xp&&!Xp.__SENTRY_LOADER__)||Xp.apply(this,arguments)},Dp.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("unknown instrumentation type:",e))}}function $p(e,t){Mp[e]=Mp[e]||[],Mp[e].push(t),Bp(e)}function qp(e,t){if(e&&Mp[e])for(const n of Mp[e]||[])try{n(t)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Lp(n)}\nError:`,t)}}function Yp(e,t){return!!e&&"object"==typeof e&&!!e[t]}function Vp(e){return"string"==typeof e?e:e?Yp(e,"url")?e.url:e.toString?e.toString():"":""}let Gp;const Hp=1e3;let Wp,Kp;function Zp(e,t=!1){return n=>{if(!n||Kp===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(e){}return!0}(n))return;const i="keypress"===n.type?"input":n.type;(void 0===Wp||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(e){}return!1}(Kp,n))&&(e({event:n,name:i,global:t}),Kp=n),clearTimeout(Wp),Wp=Dp.setTimeout((()=>{Wp=void 0}),Hp)}}let Jp=null;let Xp=null;function Qp(){const e=np,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>t.getRandomValues(new Uint8Array(1))[0])}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function eh(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function th(e){const{message:t,event_id:n}=e;if(t)return t;const i=eh(e);return i?i.type&&i.value?`${i.type}: ${i.value}`:i.type||i.value||n||"<unknown>":n||"<unknown>"}function nh(e,t,n){const i=e.exception=e.exception||{},a=i.values=i.values||[],s=a[0]=a[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function ih(e,t){const n=eh(e);if(!n)return;const i=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...i,...t},t&&"data"in t){const e={...i&&i.data,...t.data};n.mechanism.data=e}}function ah(e){if(e&&e.__sentry_captured__)return!0;try{vp(e,"__sentry_captured__",!0)}catch(e){}return!1}function sh(e){return Array.isArray(e)?e:[e]}function rh(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function oh(e,t=100,n=1/0){try{return lh("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function ch(e,t=3,n=102400){const i=oh(e,t);return a=i,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(a))>n?ch(e,t-1,n):i;var a}function lh(e,t,n=1/0,i=1/0,a=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){const[s,r]=a;if(null==t||["number","boolean","string"].includes(typeof t)&&!Yd(t))return t;const o=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if("undefined"!=typeof global&&t===global)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(Gd(t))return"[VueViewModel]";if(Bd(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if("function"==typeof t)return`[Function: ${Lp(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const i=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(e){return`**non-serializable** (${e})`}var n}(e,t);if(!o.startsWith("[object "))return o;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return o.replace("object ","");if(s(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return lh("",l.toJSON(),c-1,i,a)}catch(e){}const u=Array.isArray(t)?[]:{};let d=0;const p=xp(t);for(const e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(d>=i){u[e]="[MaxProperties ~]";break}const t=p[e];u[e]=lh(e,t,c-1,i,a),d++}return r(t),u}var uh;function dh(e){return new hh((t=>{t(e)}))}function ph(e){return new hh(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(uh||(uh={}));class hh{constructor(e){hh.prototype.__init.call(this),hh.prototype.__init2.call(this),hh.prototype.__init3.call(this),hh.prototype.__init4.call(this),this._state=uh.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new hh(((n,i)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){i(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){i(e)}else i(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new hh(((t,n)=>{let i,a;return this.then((t=>{a=!1,i=t,e&&e()}),(t=>{a=!0,i=t,e&&e()})).then((()=>{a?n(i):t(i)}))}))}__init(){this._resolve=e=>{this._setResult(uh.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(uh.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===uh.PENDING&&(qd(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===uh.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===uh.RESOLVED&&e[1](this._value),this._state===uh.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function mh(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(i){if(!(void 0===e||t.length<e))return ph(new yp("Not adding Promise because buffer limit was reached."));const a=i();return-1===t.indexOf(a)&&t.push(a),a.then((()=>n(a))).then(null,(()=>n(a).then(null,(()=>{})))),a},drain:function(e){return new hh(((n,i)=>{let a=t.length;if(!a)return n(!0);const s=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{dh(e).then((()=>{--a||(clearTimeout(s),n(!0))}),i)}))}))}}}function fh(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",i=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:i,relative:t[5]+n+i}}const gh=["fatal","error","warning","log","info","debug"];const yh=ip(),_h={nowSeconds:()=>Date.now()/1e3};const vh=rh()?function(){try{return(e=module,t="perf_hooks",e.require(t)).performance}catch(e){return}var e,t}():function(){const{performance:e}=yh;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),bh=void 0===vh?_h:{nowSeconds:()=>(vh.timeOrigin+vh.now())/1e3},wh=_h.nowSeconds.bind(_h),xh=bh.nowSeconds.bind(bh),Eh=(()=>{const{performance:e}=yh;if(!e||!e.now)return;const t=36e5,n=e.now(),i=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+n-i):t,s=a<t,r=e.timing&&e.timing.navigationStart,o="number"==typeof r?Math.abs(r+n-i):t;return s||o<t?a<=o?e.timeOrigin:r:i})(),Sh="baggage",kh="sentry-",Th=/^sentry-/,Rh=8192;function Ih(e){if(!e)return;return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce(((e,[t,n],i)=>{const a=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,s=0===i?a:`${e},${a}`;return s.length>Rh?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):s}),"")}(Object.entries(e).reduce(((e,[t,n])=>(n&&(e[`${kh}${t}`]=n),e)),{}))}function Ah(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(e[t]=n,e)),{})}const Ch=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Oh(e,t){const n=function(e){if(!e)return;const t=e.match(Ch);if(!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}(e),i=function(e){if(!Md(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce(((e,t)=>({...e,...Ah(t)})),{});else{if(!e)return;t=Ah(e)}const n=Object.entries(t).reduce(((e,[t,n])=>(t.match(Th)&&(e[t.slice(kh.length)]=n),e)),{});return Object.keys(n).length>0?n:void 0}(t),{traceId:a,parentSpanId:s,parentSampled:r}=n||{},o={traceId:a||Qp(),spanId:Qp().substring(16),sampled:r};return s&&(o.parentSpanId=s),i&&(o.dsc=i),{traceparentData:n,dynamicSamplingContext:i,propagationContext:o}}function Lh(e=Qp(),t=Qp().substring(16),n){let i="";return void 0!==n&&(i=n?"-1":"-0"),`${e}-${t}${i}`}function jh(e,t=[]){return[e,t]}function Uh(e,t){const[n,i]=e;return[n,[...i,t]]}function Ph(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function Fh(e,t){return(t||new TextEncoder).encode(e)}function Dh(e,t){const[n,i]=e;let a=JSON.stringify(n);function s(e){"string"==typeof a?a="string"==typeof e?a+e:[Fh(a,t),e]:a.push("string"==typeof e?Fh(e,t):e)}for(const e of i){const[t,n]=e;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(oh(n))}s(e)}}return"string"==typeof a?a:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let i=0;for(const t of e)n.set(t,i),i+=t.length;return n}(a)}function Nh(e,t){const n="string"==typeof e.data?Fh(e.data,t):e.data;return[kp({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Mh={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function zh(e){return Mh[e]}function Bh(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function $h(e,t,n,i){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:mp(i)},...a&&{trace:kp({...a})}}}const qh=6e4;function Yh(e,{statusCode:t,headers:n},i=Date.now()){const a={...e},s=n&&n["x-sentry-rate-limits"],r=n&&n["retry-after"];if(s)for(const e of s.trim().split(",")){const[t,n]=e.split(":",2),s=parseInt(t,10),r=1e3*(isNaN(s)?60:s);if(n)for(const e of n.split(";"))a[e]=i+r;else a.all=i+r}else r?a.all=i+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const i=Date.parse(`${e}`);return isNaN(i)?qh:i-t}(r,i):429===t&&(a.all=i+6e4);return a}const Vh="production";function Gh(){return ap("globalEventProcessors",(()=>[]))}function Hh(e){Gh().push(e)}function Wh(e,t,n,i=0){return new hh(((a,s)=>{const r=e[i];if(null===t||"function"!=typeof r)a(t);else{const o=r({...t},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.id&&null===o&&pp.log(`Event processor "${r.id}" dropped event`),qd(o)?o.then((t=>Wh(e,t,n,i+1).then(a))).then(null,s):Wh(e,o,n,i+1).then(a).then(null,s)}}))}function Kh(e){const t=xh(),n={sid:Qp(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return kp({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&Zh(n,e),n}function Zh(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||xh(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Qp()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class Jh{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Xh()}static clone(e){const t=new Jh;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata={...e._sdkProcessingMetadata},t._propagationContext={...e._propagationContext}),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Zh(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof Jh?t:this}return e instanceof Jh?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession),e._propagationContext&&(this._propagationContext=e._propagationContext)):Bd(e)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Xh(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const i={timestamp:wh(),...e},a=this._breadcrumbs;return a.push(i),this._breadcrumbs=a.length>n?a.slice(-n):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction;if(t){e.sdkProcessingMetadata={dynamicSamplingContext:t.getDynamicSamplingContext(),...e.sdkProcessingMetadata};const n=t.name;n&&(e.tags={transaction:n,...e.tags})}}this._applyFingerprint(e);const n=this._getBreadcrumbs(),i=[...e.breadcrumbs||[],...n];return e.breadcrumbs=i.length>0?i:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},Wh([...Gh(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}_getBreadcrumbs(){return this._breadcrumbs}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?sh(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function Xh(){return{traceId:Qp(),spanId:Qp().substring(16)}}const Qh=4,em=100;class tm{constructor(e,t=new Jh,n=Qh){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=Jh.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:Qp(),i=new Error("Sentry syntheticException");return this._withClient(((a,s)=>{a.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},s)})),n}captureMessage(e,t,n){const i=this._lastEventId=n&&n.event_id?n.event_id:Qp(),a=new Error(e);return this._withClient(((s,r)=>{s.captureMessage(e,t,{originalException:e,syntheticException:a,...n,event_id:i},r)})),i}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Qp();return e.type||(this._lastEventId=n),this._withClient(((i,a)=>{i.captureEvent(e,{...t,event_id:n},a)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:i}=this.getStackTop();if(!i)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:s=em}=i.getOptions&&i.getOptions()||{};if(s<=0)return;const r={timestamp:wh(),...e},o=a?dp((()=>a(r,t))):r;null!==o&&(i.emit&&i.emit("beforeAddBreadcrumb",o,t),n.addBreadcrumb(o,s))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=im(this);try{e(this)}finally{im(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){const n=this._callExtensionMethod("startTransaction",e,t);if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&!n){this.getClient()?console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"):console.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")}return n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),Zh(e,n)}(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:i,environment:a=Vh}=n&&n.getOptions()||{},{userAgent:s}=np.navigator||{},r=Kh({release:i,environment:a,user:t.getUser(),...s&&{userAgent:s},...e}),o=t.getSession&&t.getSession();return o&&"ok"===o.status&&Zh(o,{status:"exited"}),this.endSession(),t.setSession(r),r}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=nm().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function nm(){return np.__SENTRY__=np.__SENTRY__||{extensions:{},hub:void 0},np}function im(e){const t=nm(),n=sm(t);return rm(t,e),n}function am(){const e=nm();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=nm()){t=e,t&&t.__SENTRY__&&t.__SENTRY__.hub&&!sm(e).isOlderThan(Qh)||rm(e,new tm);var t;return sm(e)}(e)}function sm(e){return ap("hub",(()=>new tm),e)}function rm(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}function om(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=am().getClient(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function cm(e){return(e||am()).getScope().getTransaction()}let lm=!1;function um(){const e=cm();if(e){const t="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}um.tag="sentry_tracingErrorCallback";class dm{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class pm{constructor(e={}){this.traceId=e.traceId||Qp(),this.spanId=e.spanId||Qp().substring(16),this.startTimestamp=e.startTimestamp||xh(),this.tags=e.tags||{},this.data=e.data||{},this.instrumenter=e.instrumenter||"sentry",this.origin=e.origin||"manual",e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.name&&(this.description=e.name),e.status&&(this.status=e.status),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}get name(){return this.description||""}set name(e){this.setName(e)}startChild(e){const t=new pm({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&t.transaction){const n=`[Tracing] Starting '${e&&e.op||"< unknown op >"}' span on transaction '${t.transaction.name||"< unknown name >"}' (${t.transaction.spanId}).`;t.transaction.metadata.spanMetadata[t.spanId]={logMessage:n},pp.log(n)}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e)),this.setData("http.response.status_code",e);const t=function(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(e);return"unknown_error"!==t&&this.setStatus(t),this}setName(e){this.description=e}isSuccess(){return"ok"===this.status}finish(e){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:e}=this.transaction.metadata.spanMetadata[this.spanId];e&&pp.log(e.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof e?e:xh()}toTraceparent(){return Lh(this.traceId,this.spanId,this.sampled)}toContext(){return kp({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return kp({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return kp({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId,origin:this.origin})}}function hm(e,t,n){const i=t.getOptions(),{publicKey:a}=t.getDsn()||{},{segment:s}=n&&n.getUser()||{},r=kp({environment:i.environment||Vh,release:i.release,user_segment:s,public_key:a,trace_id:e});return t.emit&&t.emit("createDsc",r),r}class mm extends pm{constructor(e,t){super(e),delete this.description,this._measurements={},this._contexts={},this._hub=t||am(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,t="custom"){this._name=e,this.metadata.source=t}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new dm(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){if(void 0!==this.endTimestamp)return;this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(e);const t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this.sampled)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(t&&t.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((e=>e!==this&&e.endTimestamp)):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce(((e,t)=>e.endTimestamp&&t.endTimestamp?e.endTimestamp>t.endTimestamp?e:t:e)).endTimestamp);const i=this.metadata,a={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...i,dynamicSamplingContext:this.getDynamicSamplingContext()},...i.source&&{transaction_info:{source:i.source}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),a.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(a)}toContext(){return kp({...super.toContext(),name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const e=this._hub||am(),t=e.getClient();if(!t)return{};const n=e.getScope(),i=hm(this.traceId,t,n),a=this.metadata.sampleRate;void 0!==a&&(i.sample_rate=`${a}`);const s=this.metadata.source;return s&&"url"!==s&&(i.transaction=this.name),void 0!==this.sampled&&(i.sampled=String(this.sampled)),i}setHub(e){this._hub=e}}const fm={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},gm=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class ym extends dm{constructor(e,t,n,i){super(i),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=t=>{e.endTimestamp="number"==typeof t?t:xh(),this._popActivity(e.spanId)},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),super.add(e)}}class _m extends mm{constructor(e,t,n=fm.idleTimeout,i=fm.finalTimeout,a=fm.heartbeatInterval,s=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=i,this._heartbeatInterval=a,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=gm[4],s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),t.configureScope((e=>e.setSpan(this)))),this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=gm[3],this.finish())}),this._finalTimeout)}finish(e=xh()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op);for(const t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter((t=>{if(t.spanId===this.spanId)return!0;t.endTimestamp||(t.endTimestamp=e,t.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));const n=t.startTimestamp<e,i=(this._finalTimeout+this._idleTimeout)/1e3,a=t.endTimestamp-this.startTimestamp<i;if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e=JSON.stringify(t,void 0,2);n?a||pp.log("[Tracing] discarding Span since it finished after Transaction final timeout",e):pp.log("[Tracing] discarding Span since it happened after Transaction was finished",e)}return n&&a})),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] No active IdleTransaction");if(this._onScope){const e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const t=e=>{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new ym(t,n,this.spanId,e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=gm[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=gm[1],this.finish(e))}),this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] popActivity ${e}`),delete this.activities[e],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const e=xh();this._idleTimeoutCanceledPermanently?(this._finishReason=gm[5],this.finish(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=gm[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function vm(){const e=this.getScope().getSpan();return e?{"sentry-trace":e.toTraceparent()}:{}}function bm(e,t,n){if(!om(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let i;return"function"==typeof t.tracesSampler?(i=t.tracesSampler(n),e.setMetadata({sampleRate:Number(i)})):void 0!==n.parentSampled?i=n.parentSampled:void 0!==t.tracesSampleRate?(i=t.tracesSampleRate,e.setMetadata({sampleRate:Number(i)})):(i=1,e.setMetadata({sampleRate:i})),function(e){if(Yd(e)||"number"!=typeof e&&"boolean"!=typeof e)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1;if(e<0||e>1)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1;return!0}(i)?i?(e.sampled=Math.random()<i,e.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] starting ${e.op} transaction - ${e.name}`),e):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),e)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] Discarding transaction because "+("function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),e.sampled=!1,e):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function wm(e,t){const n=this.getClient(),i=n&&n.getOptions()||{},a=i.instrumenter||"sentry",s=e.instrumenter||"sentry";a!==s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${a}\` instrumenter.\nThe transaction will not be sampled. Please use the ${a} instrumentation to start transactions.`),e.sampled=!1);let r=new mm(e,this);return r=bm(r,i,{parentSampled:e.parentSampled,transactionContext:e,...t}),r.sampled&&r.initSpanRecorder(i._experiments&&i._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",r),r}function xm(e,t,n,i,a,s,r){const o=e.getClient(),c=o&&o.getOptions()||{};let l=new _m(t,e,n,i,r,a);return l=bm(l,c,{parentSampled:t.parentSampled,transactionContext:t,...s}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",l),l}function Em(){const e=nm();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=wm),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=vm),lm||(lm=!0,$p("error",um),$p("unhandledrejection",um)))}function Sm(e,t){return am().captureException(e,{captureContext:t})}const km="7";function Tm(e,t){return n={sentry_key:e.publicKey,sentry_version:km,...t&&{sentry_client:`${t.name}/${t.version}`}},Object.keys(n).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`)).join("&");var n}const Rm=[];function Im(e){const t=e.defaultIntegrations||[],n=e.integrations;let i;t.forEach((e=>{e.isDefaultInstance=!0})),i=Array.isArray(n)?[...t,...n]:"function"==typeof n?sh(n(t)):t;const a=function(e){const t={};return e.forEach((e=>{const{name:n}=e,i=t[n];i&&!i.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.keys(t).map((e=>t[e]))}(i),s=function(e,t){for(let n=0;n<e.length;n++)if(!0===t(e[n]))return n;return-1}(a,(e=>"Debug"===e.name));if(-1!==s){const[e]=a.splice(s,1);a.push(e)}return a}function Am(e,t,n){if(n[t.name]=t,-1===Rm.indexOf(t.name)&&(t.setupOnce(Hh,am),Rm.push(t.name)),e.on&&"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,i)=>n(t,i,e)))}if(e.addEventProcessor&&"function"==typeof t.processEvent){const n=t.processEvent.bind(t),i=Object.assign(((t,i)=>n(t,i,e)),{id:t.name});e.addEventProcessor(i)}("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`Integration installed: ${t.name}`)}function Cm(e,t,n,i,a){const{normalizeDepth:s=3,normalizeMaxBreadth:r=1e3}=e,o={...t,event_id:t.event_id||n.event_id||Qp(),timestamp:t.timestamp||wh()},c=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:i,dist:a,maxValueLength:s=250}=t;"environment"in e||(e.environment="environment"in t?n:Vh);void 0===e.release&&void 0!==i&&(e.release=i);void 0===e.dist&&void 0!==a&&(e.dist=a);e.message&&(e.message=Hd(e.message,s));const r=e.exception&&e.exception.values&&e.exception.values[0];r&&r.value&&(r.value=Hd(r.value,s));const o=e.request;o&&o.url&&(o.url=Hd(o.url,s))}(o,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(o,c),void 0===t.type&&function(e,t){const n=np._sentryDebugIds;if(!n)return;let i;const a=Om.get(t);a?i=a:(i=new Map,Om.set(t,i));const s=Object.keys(n).reduce(((e,a)=>{let s;const r=i.get(a);r?s=r:(s=t(a),i.set(a,s));for(let t=s.length-1;t>=0;t--){const i=s[t];if(i.filename){e[i.filename]=n[a];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=s[e.filename])}))}))}catch(e){}}(o,e.stackParser);let l=i;n.captureContext&&(l=Jh.clone(l).update(n.captureContext));let u=dh(o);if(l){if(l.getAttachments){const e=[...n.attachments||[],...l.getAttachments()];e.length&&(n.attachments=e)}u=l.applyToEvent(o,n)}return u.then((e=>a&&a.getEventProcessors?Wh(a.getEventProcessors(),e,n):e)).then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach((e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})}))}(e),"number"==typeof s&&s>0?function(e,t,n){if(!e)return null;const i={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:oh(e.data,t,n)}})))},...e.user&&{user:oh(e.user,t,n)},...e.contexts&&{contexts:oh(e.contexts,t,n)},...e.extra&&{extra:oh(e.extra,t,n)}};e.contexts&&e.contexts.trace&&i.contexts&&(i.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(i.contexts.trace.data=oh(e.contexts.trace.data,t,n)));e.spans&&(i.spans=e.spans.map((e=>(e.data&&(e.data=oh(e.data,t,n)),e))));return i}(e,s,r):e)))}const Om=new WeakMap;const Lm="Not capturing exception because it's already been captured.";class jm{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=gp(e.dsn):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("No DSN provided, client will not do anything."),this._dsn){const t=function(e,t={}){const n="string"==typeof t?t:t.tunnel,i="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${function(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/`}(e)}?${Tm(e,i)}`}(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(ah(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(Lm));let i=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{i=e}))),i}captureMessage(e,t,n,i){let a=n&&n.event_id;const s=zd(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(s.then((e=>this._captureEvent(e,n,i))).then((e=>{a=e}))),a}captureEvent(e,t,n){if(t&&t.originalException&&ah(t.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(Lm));let i=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((e=>{i=e}))),i}captureSession(e){this._isEnabled()?"string"!=typeof e.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),Zh(e,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e)))):dh(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&Am(e,t,n)})),n}(this,this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){Am(this,e,this._integrations)}sendEvent(e,t={}){if(this.emit("beforeSendEvent",e,t),this._dsn){let n=function(e,t,n,i){const a=Bh(n),s=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const r=$h(e,a,i,t);return delete e.sdkProcessingMetadata,jh(r,[[{type:s},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Uh(n,Nh(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const i=this._sendEnvelope(n);i&&i.then((t=>this.emit("afterSendEvent",e,t)),null)}}sendSession(e){if(this._dsn){const t=function(e,t,n,i){const a=Bh(n);return jh({sent_at:(new Date).toISOString(),...a&&{sdk:a},...!!i&&{dsn:mp(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n=`${e}:${t}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach((e=>e(...t)))}_updateSessionFromEvent(e,t){let n=!1,i=!1;const a=t.exception&&t.exception.values;if(a){i=!0;for(const e of a){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const s="ok"===e.status;(s&&0===e.errors||s&&n)&&(Zh(e,{...n&&{status:"crashed"},errors:e.errors||Number(i||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new hh((t=>{let n=0;const i=setInterval((()=>{0==this._numProcessing?(clearInterval(i),t(!0)):(n+=1,e&&n>=e&&(clearInterval(i),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const i=this.getOptions(),a=Object.keys(this._integrations);return!t.integrations&&a.length>0&&(t.integrations=a),this.emit("preprocessEvent",e,t),Cm(i,e,t,n,this).then((e=>{if(null===e)return e;const{propagationContext:t}=e.sdkProcessingMetadata||{};if(!(e.contexts&&e.contexts.trace)&&t){const{traceId:i,spanId:a,parentSpanId:s,dsc:r}=t;e.contexts={trace:{trace_id:i,span_id:a,parent_span_id:s},...e.contexts};const o=r||hm(i,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:o,...e.sdkProcessingMetadata}}return e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const t=e;"log"===t.logLevel?pp.log(t.message):pp.warn(t)}}))}_processEvent(e,t,n){const i=this.getOptions(),{sampleRate:a}=i;if(!this._isEnabled())return ph(new yp("SDK not enabled, will not capture event.","log"));const s=Pm(e),r=Um(e),o=e.type||"error",c=`before send for type \`${o}\``;if(r&&"number"==typeof a&&Math.random()>a)return this.recordDroppedEvent("sample_rate","error",e),ph(new yp(`Discarding event because it's not included in the random sample (sampling rate = ${a})`,"log"));const l="replay_event"===o?"replay":o;return this._prepareEvent(e,t,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,e),new yp("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const a=function(e,t,n){const{beforeSend:i,beforeSendTransaction:a}=e;if(Um(t)&&i)return i(t,n);if(Pm(t)&&a)return a(t,n);return t}(i,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(qd(e))return e.then((e=>{if(!Bd(e)&&null!==e)throw new yp(n);return e}),(e=>{throw new yp(`${t} rejected with ${e}`)}));if(!Bd(e)&&null!==e)throw new yp(n);return e}(a,c)})).then((i=>{if(null===i)throw this.recordDroppedEvent("before_send",l,e),new yp(`${c} returned \`null\`, will not send event.`,"log");const a=n&&n.getSession();!s&&a&&this._updateSessionFromEvent(a,i);const r=i.transaction_info;if(s&&r&&i.transaction!==e.transaction){const e="custom";i.transaction_info={...r,source:e}}return this.sendEvent(i,t),i})).then(null,(e=>{if(e instanceof yp)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new yp(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",e),this._transport.send(e).then(null,(e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("Error while sending event:",e)}));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,i]=t.split(":");return{reason:n,category:i,quantity:e[t]}}))}}function Um(e){return void 0===e.type}function Pm(e){return"transaction"===e.type}const Fm=30;function Dm(e,t,n=mh(e.bufferSize||Fm)){let i={};function a(a){const s=[];if(Ph(a,((t,n)=>{const a=zh(n);if(function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(i,a)){const i=Nm(t,n);e.recordDroppedEvent("ratelimit_backoff",a,i)}else s.push(t)})),0===s.length)return dh();const r=jh(a[0],s),o=t=>{Ph(r,((n,i)=>{const a=Nm(n,i);e.recordDroppedEvent(t,zh(i),a)}))};return n.add((()=>t({body:Dh(r,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=Yh(i,e),e)),(e=>{throw o("network_error"),e})))).then((e=>e),(e=>{if(e instanceof yp)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("Skipped sending event because buffer is full."),o("queue_overflow"),dh();throw e}))}return a.__sentry__baseTransport__=!0,{send:a,flush:e=>n.drain(e)}}function Nm(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}const Mm="7.70.0";let zm;class Bm{static __initStatic(){this.id="FunctionToString"}constructor(){this.name=Bm.id}setupOnce(){zm=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=wp(this)||this;return zm.apply(t,e)}}catch(e){}}}Bm.__initStatic();const $m=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],qm=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class Ym{static __initStatic(){this.id="InboundFilters"}constructor(e={}){this.name=Ym.id,this._options=e}setupOnce(e,t){const n=e=>{const n=t();if(n){const t=n.getIntegration(Ym);if(t){const i=n.getClient(),a=i?i.getOptions():{},s=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:$m],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:qm],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(t._options,a);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${th(e)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(e){}n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`));"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||0!==t.length||pp.error(`Could not extract message for event ${th(e)}`);return t}(e).some((e=>Zd(e,t)))}(e,t.ignoreErrors))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${th(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Zd(n,t)}(e,t.ignoreTransactions))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${th(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=Vm(e);return!!n&&Zd(n,t)}(e,t.denyUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${th(e)}.\nUrl: ${Vm(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=Vm(e);return!n||Zd(n,t)}(e,t.allowUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${th(e)}.\nUrl: ${Vm(e)}`),!0;return!1}(e,s)?null:e}}return e};n.id=this.name,e(n)}}function Vm(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error(`Cannot extract url for event ${th(e)}`),null}}Ym.__initStatic();const Gm=np;let Hm=0;function Wm(){return Hm>0}function Km(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(wp(e))return e}catch(t){return e}const i=function(){const i=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const a=i.map((e=>Km(e,t)));return e.apply(this,a)}catch(e){throw Hm++,setTimeout((()=>{Hm--})),a=n=>{n.addEventProcessor((e=>(t.mechanism&&(nh(e,void 0,void 0),ih(e,t.mechanism)),e.extra={...e.extra,arguments:i},e))),Sm(e)},am().withScope(a),e}var a};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}catch(e){}bp(i,e),vp(e,"__sentry_wrapped__",i);try{Object.getOwnPropertyDescriptor(i,"name").configurable&&Object.defineProperty(i,"name",{get:()=>e.name})}catch(e){}return i}function Zm(e,t){const n=Xm(e,t),i={type:t&&t.name,value:ef(t)};return n.length&&(i.stacktrace={frames:n}),void 0===i.type&&""===i.value&&(i.value="Unrecoverable error caught"),i}function Jm(e,t){return{exception:{values:[Zm(e,t)]}}}function Xm(e,t){const n=t.stacktrace||t.stack||"",i=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Qm.test(e.message))return 1}return 0}(t);try{return e(n,i)}catch(e){}return[]}const Qm=/Minified React error #\d+;/i;function ef(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function tf(e,t,n,i,a){let s;if(Dd(t)&&t.error){return Jm(e,t.error)}if(Nd(t)||Fd(t,"DOMException")){const a=t;if("stack"in t)s=Jm(e,t);else{const t=a.name||(Nd(a)?"DOMError":"DOMException"),r=a.message?`${t}: ${a.message}`:t;s=nf(e,r,n,i),nh(s,r)}return"code"in a&&(s.tags={...s.tags,"DOMException.code":`${a.code}`}),s}if(Pd(t))return Jm(e,t);if(Bd(t)||$d(t)){return s=function(e,t,n,i){const a=am().getClient(),s=a&&a.getOptions().normalizeDepth,r={exception:{values:[{type:$d(t)?t.constructor.name:i?"UnhandledRejection":"Error",value:af(t,{isUnhandledRejection:i})}]},extra:{__serialized__:ch(t,s)}};if(n){const t=Xm(e,n);t.length&&(r.exception.values[0].stacktrace={frames:t})}return r}(e,t,n,a),ih(s,{synthetic:!0}),s}return s=nf(e,t,n,i),nh(s,`${t}`,void 0),ih(s,{synthetic:!0}),s}function nf(e,t,n,i){const a={message:t};if(i&&n){const i=Xm(e,n);i.length&&(a.exception={values:[{value:t,stacktrace:{frames:i}}]})}return a}function af(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(xp(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Hd(n[0],t);for(let e=n.length;e>0;e--){const i=n.slice(0,e).join(", ");if(!(i.length>t))return e===n.length?i:Hd(i,t)}return""}(e),i=t?"promise rejection":"exception";if(Dd(e))return`Event \`ErrorEvent\` captured as ${i} with message \`${e.message}\``;if($d(e)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e)}\` (type=${e.type}) captured as ${i}`}return`Object captured as ${i} with keys: ${n}`}class sf extends jm{constructor(e){const t=Gm.SENTRY_SDK_SOURCE||"npm";e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${t}:@sentry/browser`,version:Mm}],version:Mm},super(e),e.sendClientReports&&Gm.document&&Gm.document.addEventListener("visibilitychange",(()=>{"hidden"===Gm.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,i){const a=tf(e,t,n&&n.syntheticException||void 0,i);return ih(a),a.level="error",n&&n.event_id&&(a.event_id=n.event_id),dh(a)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",i,a){const s=nf(e,t,i&&i.syntheticException||void 0,a);return s.level=n,i&&i.event_id&&(s.event_id=i.event_id),dh(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:i}){const a={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!i&&{dsn:mp(i)}},s=function(e){return[{type:"user_report"},e]}(e);return jh(a,[s])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("Sending outcomes:",e);const t=(n=e,jh((i=this._options.tunnel&&mp(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:a||wh(),discarded_events:n}]]));var n,i,a;this._sendEnvelope(t)}}let rf;function of(e,t=function(){if(rf)return rf;if(Pp(Gm.fetch))return rf=Gm.fetch.bind(Gm);const e=Gm.document;let t=Gm.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const i=n.contentWindow;i&&i.fetch&&(t=i.fetch),e.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return rf=t.bind(Gm)}()){let n=0,i=0;return Dm(e,(function(a){const s=a.body.length;n+=s,i++;const r={body:a.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&i<15,...e.fetchOptions};try{return t(e.url,r).then((e=>(n-=s,i--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return rf=void 0,n-=s,i--,ph(e)}}))}const cf=4;function lf(e){return Dm(e,(function(t){return new hh(((n,i)=>{const a=new XMLHttpRequest;a.onerror=i,a.onreadystatechange=()=>{a.readyState===cf&&n({statusCode:a.status,headers:{"x-sentry-rate-limits":a.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":a.getResponseHeader("Retry-After")}})},a.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&a.setRequestHeader(t,e.headers[t]);a.send(t.body)}))}))}const uf="?";function df(e,t,n,i){const a={filename:e,function:t,in_app:!0};return void 0!==n&&(a.lineno=n),void 0!==i&&(a.colno=i),a}const pf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hf=/\((\S*)(?::(\d+))(?::(\d+))\)/,mf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ff=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gf=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,yf=Cp(...[[30,e=>{const t=pf.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=hf.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=_f(t[1]||uf,t[2]);return df(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{const t=mf.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ff.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||uf;return[n,e]=_f(n,e),df(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,e=>{const t=gf.exec(e);return t?df(t[2],t[1]||uf,+t[3],t[4]?+t[4]:void 0):void 0}]]),_f=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),i=-1!==e.indexOf("safari-web-extension");return n||i?[-1!==e.indexOf("@")?e.split("@")[0]:uf,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};class vf{static __initStatic(){this.id="GlobalHandlers"}constructor(e){this.name=vf.id,this._options={onerror:!0,onunhandledrejection:!0,...e},this._installFunc={onerror:bf,onunhandledrejection:wf}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const n in e){const i=this._installFunc[n];i&&e[n]&&(t=n,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`Global Handler attached: ${t}`),i(),this._installFunc[n]=void 0)}var t}}function bf(){$p("error",(e=>{const[t,n,i]=Sf();if(!t.getIntegration(vf))return;const{msg:a,url:s,line:r,column:o,error:c}=e;if(Wm()||c&&c.__sentry_own_request__)return;const l=void 0===c&&Md(a)?function(e,t,n,i){const a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=Dd(e)?e.message:e,r="Error";const o=s.match(a);o&&(r=o[1],s=o[2]);const c={exception:{values:[{type:r,value:s}]}};return xf(c,t,n,i)}(a,s,r,o):xf(tf(n,c||a,void 0,i,!1),s,r,o);l.level="error",Ef(t,c,l,"onerror")}))}function wf(){$p("unhandledrejection",(e=>{const[t,n,i]=Sf();if(!t.getIntegration(vf))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch(e){}if(Wm()||a&&a.__sentry_own_request__)return!0;const s=zd(a)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(a)}`}]}}:tf(n,a,void 0,i,!0);s.level="error",Ef(t,a,s,"onunhandledrejection")}))}function xf(e,t,n,i){const a=e.exception=e.exception||{},s=a.values=a.values||[],r=s[0]=s[0]||{},o=r.stacktrace=r.stacktrace||{},c=o.frames=o.frames||[],l=isNaN(parseInt(i,10))?void 0:i,u=isNaN(parseInt(n,10))?void 0:n,d=Md(t)&&t.length>0?t:function(){try{return sp.document.location.href}catch(e){return""}}();return 0===c.length&&c.push({colno:l,filename:d,function:"?",in_app:!0,lineno:u}),e}function Ef(e,t,n,i){ih(n,{handled:!1,type:i}),e.captureEvent(n,{originalException:t})}function Sf(){const e=am(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}vf.__initStatic();const kf=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Tf{static __initStatic(){this.id="TryCatch"}constructor(e){this.name=Tf.id,this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&_p(Gm,"setTimeout",Rf),this._options.setInterval&&_p(Gm,"setInterval",Rf),this._options.requestAnimationFrame&&_p(Gm,"requestAnimationFrame",If),this._options.XMLHttpRequest&&"XMLHttpRequest"in Gm&&_p(XMLHttpRequest.prototype,"send",Af);const e=this._options.eventTarget;if(e){(Array.isArray(e)?e:kf).forEach(Cf)}}}function Rf(e){return function(...t){const n=t[0];return t[0]=Km(n,{mechanism:{data:{function:Lp(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function If(e){return function(t){return e.apply(this,[Km(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Lp(e)},handled:!1,type:"instrument"}})])}}function Af(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&_p(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Lp(t)},handled:!1,type:"instrument"}},i=wp(t);return i&&(n.mechanism.data.handler=Lp(i)),Km(t,n)}))})),e.apply(this,t)}}function Cf(e){const t=Gm,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(_p(n,"addEventListener",(function(t){return function(n,i,a){try{"function"==typeof i.handleEvent&&(i.handleEvent=Km(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Lp(i),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,Km(i,{mechanism:{data:{function:"addEventListener",handler:Lp(i),target:e},handled:!1,type:"instrument"}}),a])}})),_p(n,"removeEventListener",(function(e){return function(t,n,i){const a=n;try{const n=a&&a.__sentry_wrapped__;n&&e.call(this,t,n,i)}catch(e){}return e.call(this,t,a,i)}})))}Tf.__initStatic();const Of=1024;class Lf{static __initStatic(){this.id="Breadcrumbs"}constructor(e){this.name=Lf.id,this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){if(this.options.console&&$p("console",Uf),this.options.dom&&$p("dom",function(e){function t(t){let n,i="object"==typeof e?e.serializeAttribute:void 0,a="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;a&&a>Of&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=Of),"string"==typeof i&&(i=[i]);try{const e=t.event;n=function(e){return!!e&&!!e.target}(e)?op(e.target,{keyAttrs:i,maxStringLength:a}):op(e,{keyAttrs:i,maxStringLength:a})}catch(e){n="<unknown>"}0!==n.length&&am().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&$p("xhr",Pf),this.options.fetch&&$p("fetch",Ff),this.options.history&&$p("history",Df),this.options.sentry){const e=am().getClient();e&&e.on&&e.on("beforeSendEvent",jf)}}}function jf(e){am().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:th(e)},{event:e})}function Uf(e){const t={category:"console",data:{arguments:e.args,logger:"console"},level:(n=e.level,"warn"===n?"warning":gh.includes(n)?n:"log"),message:Wd(e.args," ")};var n;if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${Wd(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}am().addBreadcrumb(t,{input:e.args,level:e.level})}function Pf(e){const{startTimestamp:t,endTimestamp:n}=e,i=e.xhr[Np];if(!t||!n||!i)return;const{method:a,url:s,status_code:r,body:o}=i,c={method:a,url:s,status_code:r},l={xhr:e.xhr,input:o,startTimestamp:t,endTimestamp:n};am().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function Ff(e){const{startTimestamp:t,endTimestamp:n}=e;if(n&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){const i=e.fetchData,a={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};am().addBreadcrumb({category:"fetch",data:i,level:"error",type:"http"},a)}else{const i={...e.fetchData,status_code:e.response&&e.response.status},a={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};am().addBreadcrumb({category:"fetch",data:i,type:"http"},a)}}function Df(e){let t=e.from,n=e.to;const i=fh(Gm.location.href);let a=fh(t);const s=fh(n);a.path||(a=i),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),i.protocol===a.protocol&&i.host===a.host&&(t=a.relative),am().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}Lf.__initStatic();class Nf{static __initStatic(){this.id="LinkedErrors"}constructor(e={}){this.name=Nf.id,this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){}preprocessEvent(e,t,n){const i=n.getOptions();Jd(Zm,i.stackParser,i.maxValueLength,this._key,this._limit,e,t)}}Nf.__initStatic();class Mf{static __initStatic(){this.id="HttpContext"}constructor(){this.name=Mf.id}setupOnce(){Hh((e=>{if(am().getIntegration(Mf)){if(!Gm.navigator&&!Gm.location&&!Gm.document)return e;const t=e.request&&e.request.url||Gm.location&&Gm.location.href,{referrer:n}=Gm.document||{},{userAgent:i}=Gm.navigator||{},a={...e.request&&e.request.headers,...n&&{Referer:n},...i&&{"User-Agent":i}},s={...e.request,...t&&{url:t},headers:a};return{...e,request:s}}return e}))}}Mf.__initStatic();class zf{static __initStatic(){this.id="Dedupe"}constructor(){this.name=zf.id}setupOnce(e,t){const n=e=>{if(e.type)return e;const n=t().getIntegration(zf);if(n){try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,i=t.message;if(!n&&!i)return!1;if(n&&!i||!n&&i)return!1;if(n!==i)return!1;if(!$f(e,t))return!1;if(!Bf(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=qf(t),i=qf(e);if(!n||!i)return!1;if(n.type!==i.type||n.value!==i.value)return!1;if(!$f(e,t))return!1;if(!Bf(e,t))return!1;return!0}(e,t))return!0;return!1}(e,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function Bf(e,t){let n=Yf(e),i=Yf(t);if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;if(i.length!==n.length)return!1;for(let e=0;e<i.length;e++){const t=i[e],a=n[e];if(t.filename!==a.filename||t.lineno!==a.lineno||t.colno!==a.colno||t.function!==a.function)return!1}return!0}function $f(e,t){let n=e.fingerprint,i=t.fingerprint;if(!n&&!i)return!0;if(n&&!i||!n&&i)return!1;try{return!(n.join("")!==i.join(""))}catch(e){return!1}}function qf(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Yf(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){return}}zf.__initStatic();const Vf=[new Ym,new Bm,new Tf,new Lf,new vf,new Nf,new zf,new Mf];function Gf(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=Vf),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),Gm.SENTRY_RELEASE&&Gm.SENTRY_RELEASE.id&&(e.release=Gm.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:(n=e.stackParser||yf,Array.isArray(n)?Cp(...n):n),integrations:Im(e),transport:e.transport||(Up()?of:lf)};var n;!function(e,t){!0===t.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?pp.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=am();n.getScope().update(t.initialScope);const i=new e(t);n.bindClient(i)}(sf,t),e.autoSessionTracking&&function(){if(void 0===Gm.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));const e=am();if(!e.captureSession)return;Hf(e),$p("history",(({from:e,to:t})=>{void 0!==e&&e!==t&&Hf(am())}))}()}function Hf(e){e.startSession({ignoreDuration:!0}),e.captureSession()}const Wf=np,Kf="sentryReplaySession",Zf="replay_event",Jf="Unable to send Replay",Xf=15e4,Qf=5e3,eg=2e7,tg=36e5;var ng;function ig(e){const t=null==e?void 0:e.host;return Boolean(t&&t.shadowRoot&&t.shadowRoot===e)}function ag({maskInputOptions:e,tagName:t,type:n}){"option"===t.toLowerCase()&&(t="select");const i="string"==typeof n?n.toLowerCase():void 0;return e[t.toLowerCase()]||i&&e[i]||"password"===i||"input"===t&&!n&&e.text}function sg({input:e,maskInputSelector:t,unmaskInputSelector:n,maskInputOptions:i,tagName:a,type:s,value:r,maskInputFn:o}){let c=r||"";return n&&e.matches(n)||(e.hasAttribute("data-rr-is-password")&&(s="password"),(ag({maskInputOptions:i,tagName:a,type:s})||t&&e.matches(t))&&(c=o?o(c):"*".repeat(c.length))),c}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(ng||(ng={}));const rg="__rrweb_original__";function og(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}function cg(e,t,n){return"string"==typeof n&&n.toLowerCase(),"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}let lg=1;const ug=new RegExp("[^a-z0-9-_:]"),dg=-2;function pg(e){return e?e.replace(/[\S]/g,"*"):""}function hg(e){try{const t=e.rules||e.cssRules;return t?Array.from(t).map(mg).join(""):null}catch(e){return null}}function mg(e){let t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=hg(e.styleSheet)||t}catch(e){}return fg(t)}function fg(e){if(e.indexOf(":")>-1){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}return e}let gg,yg;const _g=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,vg=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,bg=/^(data:)([^,]*),(.*)/i;function wg(e,t){return(e||"").replace(_g,((e,n,i,a,s,r)=>{const o=i||s||r,c=n||a||"";if(!o)return e;if(!vg.test(o))return`url(${c}${o}${c})`;if(bg.test(o))return`url(${c}${o}${c})`;if("/"===o[0])return`url(${c}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+o}${c})`;const l=t.split("/"),u=o.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`}))}const xg=/^[^ \t\n\r\u000c]+/,Eg=/^[, \t\n\r\u000c]+/;function Sg(e,t){if(!t||""===t.trim())return t;const n=e.createElement("a");return n.href=t,n.href}function kg(){const e=document.createElement("a");return e.href="",e.href}function Tg(e,t,n,i,a,s,r,o){if(!a)return a;const c=i.toLowerCase(),l=n.toLowerCase();return"src"===c||"href"===c||"xlink:href"===c&&"#"!==a[0]?Sg(e,a):"background"!==c||"table"!==l&&"td"!==l&&"th"!==l?"srcset"===c?function(e,t){if(""===t.trim())return t;let n=0;function i(e){let i,a=e.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}let a=[];for(;i(Eg),!(n>=t.length);){let s=i(xg);if(","===s.slice(-1))s=Sg(e,s.substring(0,s.length-1)),a.push(s);else{let i="";s=Sg(e,s);let r=!1;for(;;){let e=t.charAt(n);if(""===e){a.push((s+i).trim());break}if(r)")"===e&&(r=!1);else{if(","===e){n+=1,a.push((s+i).trim());break}"("===e&&(r=!0)}i+=e,n+=1}}}return a.join(", ")}(e,a):"style"===c?wg(a,kg()):"object"===l&&"data"===c?Sg(e,a):s&&function(e,t,n,i){if(i&&e.matches(i))return!1;return["placeholder","title","aria-label"].indexOf(t)>-1||"input"===n&&"value"===t&&e.hasAttribute("type")&&["submit","button"].indexOf(e.getAttribute("type").toLowerCase())>-1}(t,c,l,r)?o?o(a):pg(a):a:Sg(e,a)}function Rg(e,t,n,i,a){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return Rg(e.parentNode,t,n,i,a);if(i&&(e.matches(i)||e.closest(i)))return!1;if(a)return!0;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=0;n<e.classList.length;n++){const i=e.classList[n];if(t.test(i))return!0}return!(!n||!e.matches(n))||Rg(e.parentNode,t,n,i,a)}function Ig(e,t){var n;const{doc:i,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:u,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:m={},maskTextFn:f,maskInputFn:g,dataURLOptions:y={},inlineImages:_,recordCanvas:v,keepIframeSrcFn:b}=t;let w;if(i.__sn){const e=i.__sn.id;w=1===e?void 0:e}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:ng.Document,childNodes:[],compatMode:e.compatMode,rootId:w}:{type:ng.Document,childNodes:[],rootId:w};case e.DOCUMENT_TYPE_NODE:return{type:ng.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:const t=function(e,t,n,i){if(i&&e.matches(i))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=0;n<e.classList.length;n++){const i=e.classList[n];if(t.test(i))return!0}return!!n&&e.matches(n)}(e,a,s,r),S=function(e){if(e instanceof HTMLFormElement)return"form";const t=e.tagName.toLowerCase().trim();return ug.test(t)?"div":t}(e);let k={};for(const{name:t,value:n}of Array.from(e.attributes))Og(S,t)||(k[t]=Tg(i,e,S,t,n,h,l,f));if("link"===S&&u){const t=Array.from(i.styleSheets).find((t=>t.href===e.href));let n=null;t&&(n=hg(t)),n&&(delete k.rel,delete k.href,k._cssText=wg(n,t.href))}if("style"===S&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=hg(e.sheet);t&&(k._cssText=wg(t,kg()))}if("input"===S||"textarea"===S||"select"===S||"option"===S){const t=e,n=og(t),i=cg(t,S.toUpperCase(),n),a=e.checked;"submit"!==n&&"button"!==n&&i&&(k.value=sg({input:t,type:n,tagName:S,value:i,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:m,maskInputFn:g})),a&&(k.checked=a)}if("option"===S&&(e.selected&&!m.select?k.selected=!0:delete k.selected),"canvas"===S&&v)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let i=0;i<e.height;i+=50){const a=t.getImageData,s=rg in a?a[rg]:a;if(new Uint32Array(s.call(t,n,i,Math.min(50,e.width-n),Math.min(50,e.height-i)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(k.rr_dataURL=e.toDataURL(y.type,y.quality));else if(!("__context"in e)){const t=e.toDataURL(y.type,y.quality),n=document.createElement("canvas");n.width=e.width,n.height=e.height;t!==n.toDataURL(y.type,y.quality)&&(k.rr_dataURL=t)}if("img"===S&&_){gg||(gg=i.createElement("canvas"),yg=gg.getContext("2d"));const t=e,n=t.crossOrigin;t.crossOrigin="anonymous";const a=()=>{try{gg.width=t.naturalWidth,gg.height=t.naturalHeight,yg.drawImage(t,0,0),k.rr_dataURL=gg.toDataURL(y.type,y.quality)}catch(e){console.warn(`Cannot inline img src=${t.currentSrc}! Error: ${e}`)}n?k.crossOrigin=n:delete k.crossOrigin};t.complete&&0!==t.naturalWidth?a():t.onload=a}if("audio"!==S&&"video"!==S||(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop),t){const{width:t,height:n}=e.getBoundingClientRect();k={class:k.class,rr_width:`${t}px`,rr_height:`${n}px`}}return"iframe"!==S||b(k.src)||(e.contentDocument||(k.rr_src=k.src),delete k.src),{type:ng.Element,tagName:S,attributes:k,childNodes:[],isSVG:(E=e,Boolean("svg"===E.tagName||E.ownerSVGElement)||void 0),needBlock:t,rootId:w};case e.TEXT_NODE:const T=e.parentNode&&e.parentNode.tagName;let R=e.textContent;const I="STYLE"===T||void 0,A="SCRIPT"===T||void 0;if(I&&R){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(R=(x=e.parentNode.sheet).cssRules?Array.from(x.cssRules).map((e=>e.cssText?fg(e.cssText):"")).join(""):"")}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}R=wg(R,kg())}if(A&&(R="SCRIPT_PLACEHOLDER"),"TEXTAREA"===T&&R)R="";else if("OPTION"===T&&R){R=sg({input:e.parentNode,type:null,tagName:T,value:R,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:m,maskInputFn:g})}else!I&&!A&&Rg(e,o,c,l,h)&&R&&(R=f?f(R):pg(R));return{type:ng.Text,textContent:R||"",isStyle:I,rootId:w};case e.CDATA_SECTION_NODE:return{type:ng.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:ng.Comment,textContent:e.textContent||"",rootId:w};default:return!1}var x,E}function Ag(e){return null==e?"":e.toLowerCase()}function Cg(e,t){const{doc:n,map:i,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u=!1,inlineStylesheet:d=!0,maskInputSelector:p,unmaskInputSelector:h,maskAllText:m,maskInputOptions:f={},maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:w=!1,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:S=5e3,keepIframeSrcFn:k=(()=>!1)}=t;let{preserveWhiteSpace:T=!0}=t;const R=Ig(e,{doc:n,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:m,maskInputOptions:f,maskTextFn:g,maskInputFn:y,dataURLOptions:v,inlineImages:b,recordCanvas:w,keepIframeSrcFn:k});if(!R)return console.warn(e,"not serialized"),null;let I;I="__sn"in e?e.__sn.id:!function(e,t){if(t.comment&&e.type===ng.Comment)return!0;if(e.type===ng.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&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Ag(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ag(e.attributes.name)||"icon"===Ag(e.attributes.rel)||"apple-touch-icon"===Ag(e.attributes.rel)||"shortcut icon"===Ag(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Ag(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Ag(e.attributes.property).match(/^(og|twitter|fb):/)||Ag(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Ag(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Ag(e.attributes.name)||"googlebot"===Ag(e.attributes.name)||"bingbot"===Ag(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Ag(e.attributes.name)||"generator"===Ag(e.attributes.name)||"framework"===Ag(e.attributes.name)||"publisher"===Ag(e.attributes.name)||"progid"===Ag(e.attributes.name)||Ag(e.attributes.property).match(/^article:/)||Ag(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Ag(e.attributes.name)||"yandex-verification"===Ag(e.attributes.name)||"csrf-token"===Ag(e.attributes.name)||"p:domain_verify"===Ag(e.attributes.name)||"verify-v1"===Ag(e.attributes.name)||"verification"===Ag(e.attributes.name)||"shopify-checkout-api-token"===Ag(e.attributes.name)))return!0}}return!1}(R,_)&&(T||R.type!==ng.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?lg++:dg;const A=Object.assign(R,{id:I});if(e.__sn=A,I===dg)return null;i[I]=e,x&&x(e);let C=!u;if(A.type===ng.Element&&(C=C&&!A.needBlock,delete A.needBlock,e.shadowRoot&&(A.isShadowHost=!0)),(A.type===ng.Document||A.type===ng.Element)&&C){_.headWhitespace&&R.type===ng.Element&&"head"===R.tagName&&(T=!1);const t={doc:n,map:i,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:m,maskInputOptions:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:w,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:k};for(const n of Array.from(e.childNodes)){const e=Cg(n,t);e&&A.childNodes.push(e)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const e=Cg(n,t);e&&(e.isShadow=!0,A.childNodes.push(e))}}return e.parentNode&&ig(e.parentNode)&&(A.isShadow=!0),A.type===ng.Element&&"iframe"===A.tagName&&function(e,t,n){const i=e.contentWindow;if(!i)return;let a,s=!1;try{a=i.document.readyState}catch(e){return}if("complete"!==a){const i=setTimeout((()=>{s||(t(),s=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(i),s=!0,t()}))}const r="about:blank";i.location.href===r&&e.src!==r&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}(e,(()=>{const t=e.contentDocument;if(t&&E){const n=Cg(t,{doc:t,map:i,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:m,maskInputOptions:f,maskTextFn:g,maskInputFn:y,slimDOMOptions:_,dataURLOptions:v,inlineImages:b,recordCanvas:w,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:k});n&&E(e,n)}}),S),A}function Og(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}var Lg,jg,Ug,Pg,Fg,Dg;function Ng(e,t,n=document){const i={capture:!0,passive:!0};return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t,i)}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin"}(Lg||(Lg={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration"}(jg||(jg={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel"}(Ug||(Ug={})),function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(Pg||(Pg={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(Fg||(Fg={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(Dg||(Dg={}));const Mg="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.";let zg={map:{},getId:()=>(console.error(Mg),-1),getNode:()=>(console.error(Mg),null),removeNodeFromMap(){console.error(Mg)},has:()=>(console.error(Mg),!1),reset(){console.error(Mg)}};function Bg(e,t,n={}){let i=null,a=0;return function(s){let r=Date.now();a||!1!==n.leading||(a=r);let o=t-(r-a),c=this,l=arguments;o<=0||o>t?(i&&(clearTimeout(i),i=null),a=r,e.apply(c,l)):i||!1===n.trailing||(i=setTimeout((()=>{a=!1===n.leading?0:Date.now(),i=null,e.apply(c,l)}),o))}}function $g(e,t,n,i,a=window){const s=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,i?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),s&&s.set&&s.set.call(this,e)}}),()=>$g(e,t,s||{},!0)}function qg(e,t,n){try{if(!(t in e))return()=>{};const i=e[t],a=n(i);return"function"==typeof a&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=a,()=>{e[t]=i}}catch(e){return()=>{}}}function Yg(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Vg(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Gg(e,t,n,i){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){let a=!1;const s=i&&e.matches(i);return"string"==typeof t?a=void 0!==e.closest?!s&&null!==e.closest("."+t):!s&&e.classList.contains(t):!s&&e.classList.forEach((e=>{t.test(e)&&(a=!0)})),!a&&n&&(a=e.matches(n)),!s&&a||Gg(e.parentNode,t,n,i)}return e.nodeType,e.TEXT_NODE,Gg(e.parentNode,t,n,i)}function Hg(e){return"__sn"in e&&e.__sn.id===dg}function Wg(e,t){if(ig(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Wg(e.parentNode,t))}function Kg(e){return Boolean(e.changedTouches)}function Zg(e){return"__sn"in e&&(e.__sn.type===ng.Element&&"iframe"===e.__sn.tagName)}function Jg(e){return Boolean(null==e?void 0:e.shadowRoot)}function Xg(e){return"__ln"in e}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(zg=new Proxy(zg,{get:(e,t,n)=>("map"===t&&console.error(Mg),Reflect.get(e,t,n))}));class Qg{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Xg(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&Xg(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const ey=(e,t)=>`${e}@${t}`;function ty(e){return"__sn"in e}class ny{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Qg,n=e=>{let t=e,n=dg;for(;n===dg;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{var a,s,r,o,c;const l=i.getRootNode?null===(a=i.getRootNode())||void 0===a?void 0:a.host:null;let u=l;for(;null===(r=null===(s=null==u?void 0:u.getRootNode)||void 0===s?void 0:s.call(u))||void 0===r?void 0:r.host;)u=(null===(c=null===(o=null==u?void 0:u.getRootNode)||void 0===o?void 0:o.call(u))||void 0===c?void 0:c.host)||null;const d=!(this.doc.contains(i)||u&&this.doc.contains(u));if(!i.parentNode||d)return;const p=ig(i.parentNode)?this.mirror.getId(l):this.mirror.getId(i.parentNode),h=n(i);if(-1===p||-1===h)return t.addNode(i);let m=Cg(i,{doc:this.doc,map:this.mirror.map,blockClass:this.blockClass,blockSelector:this.blockSelector,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskAllText:this.maskAllText,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Zg(e)&&this.iframeManager.addIframe(e),Jg(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,document)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)}});m&&e.push({parentId:p,nextId:h,node:m})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)ay(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(const e of this.addedSet)sy(this.droppedSet,e)||ay(this.removes,e,this.mirror)?sy(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let a=null;for(;t.length;){let e=null;if(a){const t=this.mirror.getId(a.value.parentNode),i=n(a.value);-1!==t&&-1!==i&&(e=a)}if(!e)for(let i=t.length-1;i>=0;i--){const a=t.get(i);if(a){const t=this.mirror.getId(a.value.parentNode),i=n(a.value);if(-1!==t&&-1!==i){e=a;break}}}if(!e){for(;t.head;)t.removeNode(t.head.value);break}a=e.previous,t.removeNode(e.value),i(e.value)}const s={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>({id:this.mirror.getId(e.node),attributes:e.attributes}))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=e=>{if(!Hg(e.target))switch(e.type){case"characterData":{const t=e.target.textContent;Gg(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||t===e.oldValue||this.texts.push({value:Rg(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=t.getAttribute(e.attributeName);if("value"===e.attributeName&&(n=sg({input:t,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:t.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),Gg(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||n===e.oldValue)return;let i=this.attributes.find((t=>t.node===e.target));if(i||(i={node:e.target,attributes:{}},this.attributes.push(i)),"type"===e.attributeName&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),"style"===e.attributeName){const n=this.doc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue),void 0!==i.attributes.style&&null!==i.attributes.style||(i.attributes.style={});try{const e=i.attributes.style;for(const i of Array.from(t.style)){const a=t.style.getPropertyValue(i),s=t.style.getPropertyPriority(i);a===n.style.getPropertyValue(i)&&s===n.style.getPropertyPriority(i)||(e[i]=""===s?a:[a,s])}for(const i of Array.from(n.style))""===t.style.getPropertyValue(i)&&(e[i]=!1)}catch(e){console.warn("[rrweb] Error when parsing update to style attribute:",e)}}else{const t=e.target;i.attributes[e.attributeName]=Tg(this.doc,t,t.tagName,e.attributeName,n,this.maskAllText,this.unmaskTextSelector,this.maskTextFn)}break}case"childList":e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),i=ig(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Gg(e.target,this.blockClass,this.blockSelector,this.unblockSelector)||Hg(t)||(this.addedSet.has(t)?(iy(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Wg(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ey(n,i)]?iy(this.movedSet,t):this.removes.push({parentId:i,id:n,isShadow:!!ig(e.target)||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!t||!Gg(t,this.blockClass,this.blockSelector,this.unblockSelector)){if(ty(e)){if(Hg(e))return;this.movedSet.add(e);let n=null;t&&ty(t)&&(n=t.__sn.id),n&&(this.movedMap[ey(e.__sn.id,n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Gg(e,this.blockClass,this.blockSelector,this.unblockSelector)||e.childNodes.forEach((e=>this.genAdds(e)))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskTextClass","maskTextSelector","unmaskTextSelector","maskInputSelector","unmaskInputSelector","inlineStylesheet","maskAllText","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].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 iy(e,t){e.delete(t),t.childNodes.forEach((t=>iy(e,t)))}function ay(e,t,n){const{parentNode:i}=t;if(!i)return!1;const a=n.getId(i);return!!e.some((e=>e.id===a))||ay(e,i,n)}function sy(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||sy(e,n))}const ry=e=>(...t)=>{try{return e(...t)}catch(e){try{e.__rrweb__=!0}catch(e){}throw e}},oy=[];function cy(e){try{if("composedPath"in e){const 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 ly(e,t){var n,i;const a=new ny;oy.push(a),a.init(e);let s=window.MutationObserver||window.__rrMutationObserver;const r=null===(i=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===i?void 0:i.call(n,"MutationObserver");r&&window[r]&&(s=window[r]);const o=new s(ry((t=>{e.onMutation&&!1===e.onMutation(t)||a.processMutations(t)})));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function uy({mouseInteractionCb:e,doc:t,mirror:n,blockClass:i,blockSelector:a,unblockSelector:s,sampling:r}){if(!1===r.mouseInteraction)return()=>{};const o=!0===r.mouseInteraction||void 0===r.mouseInteraction?{}:r.mouseInteraction,c=[];return Object.keys(Ug).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e])).forEach((r=>{const o=r.toLowerCase(),l=ry((t=>r=>{const o=cy(r);if(Gg(o,i,a,s))return;const c=Kg(r)?r.changedTouches[0]:r;if(!c)return;const l=n.getId(o),{clientX:u,clientY:d}=c;ry(e)({type:Ug[t],id:l,x:u,y:d})})(r));c.push(Ng(o,l,t))})),ry((()=>{c.forEach((e=>e()))}))}function dy({scrollCb:e,doc:t,mirror:n,blockClass:i,blockSelector:a,unblockSelector:s,sampling:r}){const o=Bg((r=>{const o=cy(r);if(!o||Gg(o,i,a,s))return;const c=n.getId(o);if(o===t){const n=t.scrollingElement||t.documentElement;ry(e)({id:c,x:n.scrollLeft,y:n.scrollTop})}else ry(e)({id:c,x:o.scrollLeft,y:o.scrollTop})}),r.scroll||100);return Ng("scroll",ry(o),t)}function py(e,t){const n=Object.assign({},e);return t||delete n.userTriggered,n}const hy=["INPUT","TEXTAREA","SELECT"],my=new WeakMap;function fy({inputCb:e,doc:t,mirror:n,blockClass:i,blockSelector:a,unblockSelector:s,ignoreClass:r,ignoreSelector:o,maskInputSelector:c,unmaskInputSelector:l,maskInputOptions:u,maskInputFn:d,sampling:p,userTriggeredOnInput:h}){function m(e){let n=cy(e);const p=n&&n.tagName,m=e.isTrusted;if("OPTION"===p&&(n=n.parentElement),!n||!p||hy.indexOf(p)<0||Gg(n,i,a,s))return;const g=n,y=og(g);if(g.classList.contains(r)||o&&g.matches(o))return;let _=cg(g,p,y),v=!1;"radio"!==y&&"checkbox"!==y||(v=n.checked),function({tagName:e,type:t,maskInputOptions:n,maskInputSelector:i}){return i||ag({maskInputOptions:n,tagName:e,type:t})}({maskInputOptions:u,maskInputSelector:c,tagName:p,type:y})&&(_=sg({input:g,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:y,value:_,maskInputFn:d})),f(n,ry(py)({text:_,isChecked:v,userTriggered:m},h));const b=n.name;"radio"===y&&b&&v&&t.querySelectorAll(`input[type="radio"][name="${b}"]`).forEach((e=>{if(e!==n){const t=sg({input:e,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:y,value:cg(e,p,y),maskInputFn:d});f(e,ry(py)({text:t,isChecked:!v,userTriggered:!1},h))}}))}function f(t,i){const a=my.get(t);if(!a||a.text!==i.text||a.isChecked!==i.isChecked){my.set(t,i);const a=n.getId(t);e(Object.assign(Object.assign({},i),{id:a}))}}const g=("last"===p.input?["change"]:["input","change"]).map((e=>Ng(e,ry(m),t))),y=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),_=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return y&&y.set&&g.push(..._.map((e=>$g(e[0],e[1],{set(){ry(m)({target:this})}})))),ry((()=>{g.forEach((e=>e()))}))}function gy(e){return function(e,t){if(_y("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||_y("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||_y("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||_y("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else{const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function yy(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){const{mutationCb:n,mousemoveCb:i,mouseInteractionCb:a,scrollCb:s,viewportResizeCb:r,inputCb:o,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),i(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),a(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),s(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),r(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),o(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),c(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),l(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)}}(e,t);const i=ly(e,e.doc),a=function({mousemoveCb:e,sampling:t,doc:n,mirror:i}){if(!1===t.mousemove)return()=>{};const a="number"==typeof t.mousemove?t.mousemove:50,s="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let r,o=[];const c=Bg((t=>{const n=Date.now()-r;ry(e)(o.map((e=>(e.timeOffset-=n,e))),t),o=[],r=null}),s),l=Bg((e=>{const t=cy(e),{clientX:n,clientY:a}=Kg(e)?e.changedTouches[0]:e;r||(r=Date.now()),o.push({x:n,y:a,id:i.getId(t),timeOffset:Date.now()-r}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?jg.Drag:e instanceof MouseEvent?jg.MouseMove:jg.TouchMove)}),a,{trailing:!1}),u=[Ng("mousemove",ry(l),n),Ng("touchmove",ry(l),n),Ng("drag",ry(l),n)];return ry((()=>{u.forEach((e=>e()))}))}(e),s=uy(e),r=dy(e),o=function({viewportResizeCb:e}){let t=-1,n=-1;const i=Bg((()=>{const i=Yg(),a=Vg();t===i&&n===a||(ry(e)({width:Number(a),height:Number(i)}),t=i,n=a)}),200);return Ng("resize",ry(i),window)}(e),c=fy(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:i,mirror:a,sampling:s}){const r=r=>Bg(ry((s=>{const o=cy(s);if(!o||Gg(o,t,n,i))return;const{currentTime:c,volume:l,muted:u}=o;e({type:r,id:a.getId(o),currentTime:c,volume:l,muted:u})})),s.media||500),o=[Ng("play",r(0)),Ng("pause",r(1)),Ng("seeked",r(2)),Ng("volumechange",r(3))];return ry((()=>{o.forEach((e=>e()))}))}(e),u=function({styleSheetRuleCb:e,mirror:t},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:ry(((n,i,a)=>{const[s,r]=a,o=t.getId(i.ownerNode);return-1!==o&&e({id:o,adds:[{rule:s,index:r}]}),n.apply(i,a)}))});const a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:ry(((n,i,a)=>{const[s]=a,r=t.getId(i.ownerNode);return-1!==r&&e({id:r,removes:[{index:s}]}),n.apply(i,a)}))});const s={};vy("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(vy("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),vy("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),vy("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const r={};return Object.entries(s).forEach((([n,i])=>{r[n]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(r[n].insertRule,{apply:ry(((n,i,a)=>{const[s,r]=a,o=t.getId(i.parentStyleSheet.ownerNode);return-1!==o&&e({id:o,adds:[{rule:s,index:[...gy(i),r||0]}]}),n.apply(i,a)}))}),i.prototype.deleteRule=new Proxy(r[n].deleteRule,{apply:ry(((n,i,a)=>{const[s]=a,r=t.getId(i.parentStyleSheet.ownerNode);return-1!==r&&e({id:r,removes:[{index:[...gy(i),s]}]}),n.apply(i,a)}))})})),ry((()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=a,Object.entries(s).forEach((([e,t])=>{t.prototype.insertRule=r[e].insertRule,t.prototype.deleteRule=r[e].deleteRule}))}))}(e,{win:n}),d=function({styleDeclarationCb:e,mirror:t},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ry(((n,i,a)=>{var s,r;const[o,c,l]=a,u=t.getId(null===(r=null===(s=i.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===r?void 0:r.ownerNode);return-1!==u&&e({id:u,set:{property:o,value:c,priority:l},index:gy(i.parentRule)}),n.apply(i,a)}))});const a=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:ry(((n,i,a)=>{var s,r;const[o]=a,c=t.getId(null===(r=null===(s=i.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===r?void 0:r.ownerNode);return-1!==c&&e({id:c,remove:{property:o},index:gy(i.parentRule)}),n.apply(i,a)}))}),ry((()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=a}))}(e,{win:n}),p=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const i=[],a=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){const i=new s(e,t,n);return a.set(i,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),i};const r=qg(t.fonts,"add",(function(t){return function(n){return setTimeout((()=>{const t=a.get(n);t&&(e(t),a.delete(n))}),0),t.apply(this,[n])}}));return i.push((()=>{n.FontFace=s})),i.push(r),ry((()=>{i.forEach((e=>e()))}))}(e):()=>{},h=[];for(const t of e.plugins)h.push(t.observer(t.callback,n,t.options));return ry((()=>{oy.forEach((e=>e.reset())),i.disconnect(),a(),s(),r(),o(),c(),l();try{u(),d()}catch(e){}p(),h.forEach((e=>e()))}))}function _y(e){return void 0!==window[e]}function vy(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class by{constructor(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}addIframe(e){this.iframes.set(e,!0)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)}}class wy{constructor(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const t=this;this.restorePatches.push(qg(HTMLElement.prototype,"attachShadow",(function(e){return function(){const n=e.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),n}})))}addShadowRoot(e,t){ly(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),dy(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}observeAttachShadow(e){if(e.contentWindow){const t=this;this.restorePatches.push(qg(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(){const i=n.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),i}})))}}reset(){this.restorePatches.forEach((e=>e()))}}for(var xy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ey="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Sy=0;Sy<64;Sy++)Ey[xy.charCodeAt(Sy)]=Sy;const ky=new Map;const Ty=(e,t,n)=>{if(!e||!Ay(e,t)&&"object"!=typeof e)return;const i=function(e,t){let n=ky.get(e);return n||(n=new Map,ky.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let a=i.indexOf(e);return-1===a&&(a=i.length,i.push(e)),a};function Ry(e,t,n){if(e instanceof Array)return e.map((e=>Ry(e,t,n)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){const t=e.constructor.name,n=function(e){var t,n=new Uint8Array(e),i=n.length,a="";for(t=0;t<i;t+=3)a+=xy[n[t]>>2],a+=xy[(3&n[t])<<4|n[t+1]>>4],a+=xy[(15&n[t+1])<<2|n[t+2]>>6],a+=xy[63&n[t+2]];return i%3==2?a=a.substring(0,a.length-1)+"=":i%3==1&&(a=a.substring(0,a.length-2)+"=="),a}(e);return{rr_type:t,base64:n}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ry(e.buffer,t,n),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ry(e.data,t,n),e.width,e.height]}}if(Ay(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Ty(e,t,n)}}return e}const Iy=(e,t,n)=>[...e].map((e=>Ry(e,t,n))),Ay=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(n.find((n=>e instanceof t[n])))};function Cy(e,t,n,i,a,s,r,o){const c=[],l=Object.getOwnPropertyNames(e);for(const u of l)try{if("function"!=typeof e[u])continue;const l=qg(e,u,(function(c){return function(...l){const d=c.apply(this,l);if(Ty(d,o,e),!Gg(this.canvas,i,s,a)){r.getId(this.canvas);const i=Iy([...l],o,e),a={type:t,property:u,args:i};n(this.canvas,a)}return d}}));c.push(l)}catch(i){const a=$g(e,u,{set(e){n(this.canvas,{type:t,property:u,args:[e],setter:!0})}});c.push(a)}return c}class Oy{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=function(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)},this.mutationCb=e.mutationCb,this.mirror=e.mirror,!0===e.recordCanvas&&this.initCanvasMutationObserver(e.win,e.blockClass,e.blockSelector,e.unblockSelector)}initCanvasMutationObserver(e,t,n,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const a=function(e,t,n,i){const a=[];try{const s=qg(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(a,...s){return Gg(this,t,n,i)||"__context"in this||(this.__context=a),e.apply(this,[a,...s])}}));a.push(s)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{a.forEach((e=>e()))}}(e,t,i,n),s=function(e,t,n,i,a,s){const r=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;const o=qg(t.CanvasRenderingContext2D.prototype,s,(function(t){return function(...r){return Gg(this.canvas,n,a,i)||setTimeout((()=>{const t=[...r];if("drawImage"===s&&t[0]&&t[0]instanceof HTMLCanvasElement){const e=t[0],n=e.getContext("2d");let i=null==n?void 0:n.getImageData(0,0,e.width,e.height),a=null==i?void 0:i.data;t[0]=JSON.stringify(a)}e(this.canvas,{type:Pg["2D"],property:s,args:t})}),0),t.apply(this,r)}}));r.push(o)}catch(n){const i=$g(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:Pg["2D"],property:s,args:[t],setter:!0})}});r.push(i)}return()=>{r.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,i,n,this.mirror),r=function(e,t,n,i,a,s){const r=[];return r.push(...Cy(t.WebGLRenderingContext.prototype,Pg.WebGL,e,n,i,a,s,t)),void 0!==t.WebGL2RenderingContext&&r.push(...Cy(t.WebGL2RenderingContext.prototype,Pg.WebGL2,e,n,i,a,s,t)),()=>{r.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,i,n,this.mirror);this.resetObservers=()=>{a(),s(),r()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const i=n.map((e=>{const t=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n}(e,["type"]);return t})),{type:a}=n[0];this.mutationCb({id:t,type:a,commands:i}),this.pendingCanvasMutations.delete(e)}}function Ly(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let jy,Uy;const Py={map:{},getId:e=>e&&e.__sn?e.__sn.id:-1,getNode(e){return this.map[e]||null},removeNodeFromMap(e){const t=e.__sn&&e.__sn.id;delete this.map[t],e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))},has(e){return this.map.hasOwnProperty(e)},reset(){this.map={}}};function Fy(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:a="rr-block",blockSelector:s=null,unblockSelector:r=null,ignoreClass:o="rr-ignore",ignoreSelector:c=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,maskInputSelector:d=null,unmaskTextSelector:p=null,unmaskInputSelector:h=null,inlineStylesheet:m=!0,maskAllText:f=!1,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:_,maskInputFn:v,maskTextFn:b,hooks:w,packFn:x,sampling:E={},mousemoveWait:S,recordCanvas:k=!1,userTriggeredOnInput:T=!1,collectFonts:R=!1,inlineImages:I=!1,plugins:A,keepIframeSrcFn:C=(()=>!1),onMutation:O}=e;if(!t)throw new Error("emit function is required");void 0!==S&&void 0===E.mousemove&&(E.mousemove=S);const L=!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,radio:!0,checkbox:!0}:void 0!==y?y:{},j=!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===_,headMetaDescKeywords:"all"===_}:_||{};let U;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})}();let P=0;jy=(e,a)=>{var s;if(!(null===(s=oy[0])||void 0===s?void 0:s.isFrozen())||e.type===Lg.FullSnapshot||e.type===Lg.IncrementalSnapshot&&e.data.source===jg.Mutation||oy.forEach((e=>e.unfreeze())),t((e=>{for(const t of A||[])t.eventProcessor&&(e=t.eventProcessor(e));return x&&(e=x(e)),e})(e),a),e.type===Lg.FullSnapshot)U=e,P=0;else if(e.type===Lg.IncrementalSnapshot){if(e.data.source===jg.Mutation&&e.data.isAttachIframe)return;P++;const t=i&&P>=i,a=n&&e.timestamp-U.timestamp>n;(t||a)&&Uy(!0)}};const F=e=>{jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.Mutation},e)}))},D=e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.Scroll},e)})),N=e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.CanvasMutation},e)})),M=new by({mutationCb:F}),z=new Oy({recordCanvas:k,mutationCb:N,win:window,blockClass:a,blockSelector:s,unblockSelector:r,mirror:Py}),B=new wy({mutationCb:F,scrollCb:D,bypassOptions:{onMutation:O,blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:m,maskAllText:f,maskInputOptions:L,maskTextFn:b,maskInputFn:v,recordCanvas:k,inlineImages:I,sampling:E,slimDOMOptions:j,iframeManager:M,canvasManager:z},mirror:Py});Uy=(e=!1)=>{var t,n,i,o;jy(Ly({type:Lg.Meta,data:{href:window.location.href,width:Vg(),height:Yg()}}),e),oy.forEach((e=>e.lock()));const[c,g]=function(e,t){const{blockClass:n="rr-block",blockSelector:i=null,unblockSelector:a=null,maskTextClass:s="rr-mask",maskTextSelector:r=null,unmaskTextSelector:o=null,inlineStylesheet:c=!0,inlineImages:l=!1,recordCanvas:u=!1,maskInputSelector:d=null,unmaskInputSelector:p=null,maskAllText:h=!1,maskAllInputs:m=!1,maskTextFn:f,maskInputFn:g,slimDOM:y=!1,dataURLOptions:_,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x,keepIframeSrcFn:E=(()=>!1)}=t||{},S={};return[Cg(e,{doc:e,map:S,blockClass:n,blockSelector:i,unblockSelector:a,maskTextClass:s,maskTextSelector:r,unmaskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===m?{}:m,maskTextFn:f,maskInputFn:g,slimDOMOptions:!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===y,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===y?{}:y,dataURLOptions:_,inlineImages:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:x,keepIframeSrcFn:E}),S]}(document,{blockClass:a,blockSelector:s,unblockSelector:r,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:m,maskAllText:f,maskAllInputs:L,maskTextFn:b,slimDOM:j,recordCanvas:k,inlineImages:I,onSerialize:e=>{Zg(e)&&M.addIframe(e),Jg(e)&&B.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{M.attachIframe(e,t),B.observeAttachShadow(e)},keepIframeSrcFn:C});if(!c)return console.warn("Failed to snapshot the document");Py.map=g,jy(Ly({type:Lg.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(o=null===(i=null===document||void 0===document?void 0:document.body)||void 0===i?void 0:i.parentElement)||void 0===o?void 0:o.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),oy.forEach((e=>e.unlock()))};try{const e=[];e.push(Ng("DOMContentLoaded",(()=>{jy(Ly({type:Lg.DomContentLoaded,data:{}}))})));const t=e=>{var t;return ry(yy)({onMutation:O,mutationCb:F,mousemoveCb:(e,t)=>jy(Ly({type:Lg.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.MouseInteraction},e)})),scrollCb:D,viewportResizeCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.ViewportResize},e)})),inputCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.Input},e)})),mediaInteractionCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.MediaInteraction},e)})),styleSheetRuleCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.StyleSheetRule},e)})),styleDeclarationCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.StyleDeclaration},e)})),canvasMutationCb:N,fontCb:e=>jy(Ly({type:Lg.IncrementalSnapshot,data:Object.assign({source:jg.Font},e)})),blockClass:a,ignoreClass:o,ignoreSelector:c,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:L,inlineStylesheet:m,sampling:E,recordCanvas:k,inlineImages:I,userTriggeredOnInput:T,collectFonts:R,doc:e,maskAllText:f,maskInputFn:v,maskTextFn:b,blockSelector:s,unblockSelector:r,slimDOMOptions:j,mirror:Py,iframeManager:M,shadowDomManager:B,canvasManager:z,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=>jy(Ly({type:Lg.Plugin,data:{plugin:e.name,payload:t}}))}))))||[]},w)};M.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{Uy(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():e.push(Ng("load",(()=>{jy(Ly({type:Lg.Load,data:{}})),n()}),window)),()=>{e.forEach((e=>e()))}}catch(e){console.warn(e)}}function Dy(e){return e>9999999999?e:1e3*e}function Ny(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:Lg.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:oh(t,10,1e3)}}),"console"===t.category))))}Fy.addCustomEvent=(e,t)=>{if(!jy)throw new Error("please add custom event after start recording");jy(Ly({type:Lg.Custom,data:{tag:e,payload:t}}))},Fy.freezePage=()=>{oy.forEach((e=>e.freeze()))},Fy.takeFullSnapshot=e=>{if(!Uy)throw new Error("please take full snapshot after start recording");Uy(e)},Fy.mirror=Py;const My="button,a";function zy(e){const t=By(e);if(!(t&&t instanceof Element))return t;return t.closest(My)||t}function By(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let $y;function qy(e){return $y||($y=[],_p(Wf,"open",(function(e){return function(...t){if($y)try{$y.forEach((e=>e()))}catch(e){}return e.apply(Wf,t)}}))),$y.push(e),()=>{const t=$y?$y.indexOf(e):-1;t>-1&&$y.splice(t,1)}}class Yy{constructor(e,t,n=Ny){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=()=>{this._lastScroll=Gy()},t=qy((()=>{this._lastMutation=Gy()})),n=e=>{if(!e.target)return;const t=zy(e);t&&this._handleMultiClick(t)},i=new MutationObserver((()=>{this._lastMutation=Gy()}));i.observe(Wf.document.documentElement,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),Wf.addEventListener("scroll",e,{passive:!0}),Wf.addEventListener("click",n,{passive:!0}),this._teardown=()=>{Wf.removeEventListener("scroll",e),Wf.removeEventListener("click",n),t(),i.disconnect(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(function(e,t){if(!Vy.includes(e.tagName))return!0;if("INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||""))return!0;if("A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target")))return!0;if(t&&e.matches(t))return!0;return!1}(t,this._ignoreSelector)||!function(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}(e))return;const n={timestamp:(i=e.timestamp,i>9999999999?i/1e3:i),clickBreadcrumb:e,clickCount:0,node:t};var i;this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=Gy();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,i=e.mutationAfter&&e.mutationAfter<=this._threshold,a=!n&&!i,{clickCount:s,clickBreadcrumb:r}=e;if(a){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),i=n<1e3*this._timeout?"mutation":"timeout",a={type:"default",message:r.message,timestamp:r.timestamp,category:"ui.slowClickDetected",data:{...r.data,url:Wf.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:i,clickCount:s||1}};this._addBreadcrumbEvent(t,a)}else if(s>1){const e={type:"default",message:r.message,timestamp:r.timestamp,category:"ui.multiClick",data:{...r.data,url:Wf.location.href,route:t.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const Vy=["A","BUTTON","INPUT"];function Gy(){return Date.now()/1e3}function Hy(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Wy;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Wy||(Wy={}));const Ky=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled"]);function Zy(e){const t={};for(const n in e)if(Ky.has(n)){let i=n;"data-testid"!==n&&"data-test-id"!==n||(i="testId"),t[i]=e[n]}return t}const Jy=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,i=null;try{i=t?zy(e.event):By(e.event),n=op(i,{maxStringLength:200})||"<unknown>"}catch(e){n="<unknown>"}return{target:i,message:n}}(e);return Hy({category:`ui.${e.name}`,...Xy(t,n)})}(t);if(!n)return;const i="click"===t.name,a=i&&t.event;var s,r,o;!(i&&e.clickDetector&&a)||a.altKey||a.metaKey||a.ctrlKey||a.shiftKey||(s=e.clickDetector,r=n,o=zy(t.event),s.handleClick(r,o)),Ny(e,n)};function Xy(e,t){const n=e&&"__sn"in e&&e.__sn.type===Wy.Element?e.__sn:null;return{message:t,data:n?{nodeId:n.id,node:{id:n.id,tagName:n.tagName,textContent:e?Array.from(e.childNodes).map((e=>"__sn"in e&&e.__sn.type===Wy.Text&&e.__sn.textContent)).filter(Boolean).map((e=>e.trim())).join(""):"",attributes:Zy(n.attributes)}}:{}}}function Qy(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:i,altKey:a,key:s,target:r}=e;if(!r||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(r)||!s)return null;const o=t||i||a,c=1===s.length;if(!o&&c)return null;const l=op(r,{maxStringLength:200})||"<unknown>",u=Xy(r,l);return Hy({category:"ui.keyDown",message:l,data:{...u.data,metaKey:t,shiftKey:n,ctrlKey:i,altKey:a,key:s}})}(t);n&&Ny(e,n)}const e_=["name","type","startTime","transferSize","duration"];function t_(e){return function(t){return e_.every((n=>e[n]===t[n]))}}function n_(e){const t=new PerformanceObserver((t=>{const n=function(e,t){const[n,i,a]=e.reduce(((e,t)=>("navigation"===t.entryType?e[0].push(t):"largest-contentful-paint"===t.entryType?e[1].push(t):e[2].push(t),e)),[[],[],[]]),s=[],r=[];let o=i.length?i[i.length-1]:void 0;return t.forEach((e=>{if("largest-contentful-paint"!==e.entryType)if("navigation"!==e.entryType)s.push(e);else{const t=e;e.duration>0&&!n.find(t_(t))&&!r.find(t_(t))&&r.push(t)}else(!o||o.startTime<e.startTime)&&(o=e)})),[...o?[o]:[],...n,...a,...s,...r].sort(((e,t)=>e.startTime-t.startTime))}(e.performanceEvents,t.getEntries());e.performanceEvents=n}));return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach((e=>{try{t.observe({type:e,buffered:!0})}catch(e){}})),t}const i_='/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([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]),a=new Uint8Array([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]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},p=(t,e,a)=>{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},A=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&z(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!z(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},E=(t,i,n)=>{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f<t.sym_next);p(t,256,i)},R=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<s;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,n&&(t.static_len-=i[2*l+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},U=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{p(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(p(t,n,t.bl_tree),o--),p(t,16,t.bl_tree),g(t,o-3,2)):o<=10?(p(t,17,t.bl_tree),g(t,o-3,3)):(p(t,18,t.bl_tree),g(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let S=!1;const D=(t,e,a,i)=>{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s<i;s++)g(t,t.bl_tree[2*n[s]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),E(t,t.dyn_ltree,t.dyn_dtree)),y(t),i&&x(t)},O={_tr_init:t=>{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<<e[m];t++)l[w++]=m;for(l[w-1]=m,b=0,m=0;m<16;m++)for(d[m]=b,t=0;t<1<<a[m];t++)o[b++]=m;for(b>>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<<a[m]-7;t++)o[256+b++]=m;for(n=0;n<=15;n++)g[n]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,g[8]++;for(;t<=255;)s[2*t+1]=9,t++,g[9]++;for(;t<=279;)s[2*t+1]=7,t++,g[7]++;for(;t<=287;)s[2*t+1]=8,t++,g[8]++;for(v(s,287,g),t=0;t<30;t++)r[2*t+1]=5,r[2*t]=k(t,5);f=new _(s,e,257,286,15),c=new _(r,a,0,30,15),u=new _(new Array(0),i,0,19,7)})(),S=!0),t.l_desc=new w(t.dyn_ltree,f),t.d_desc=new w(t.dyn_dtree,c),t.bl_desc=new w(t.bl_tree,u),t.bi_buf=0,t.bi_valid=0,y(t)},_tr_stored_block:D,_tr_flush_block:T,_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const ct=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=258-(f-s),s=f-258,i>r){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,a>i+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a<s&&(0===a&&e!==X||e===P||a!==i+t.strm.avail_in))break;r=e===X&&a===i+t.strm.avail_in?1:0,H(t,0,0,r),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),r?4:e!==P&&e!==X&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a),t.match_length<=5&&(t.strategy===et||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=a,Zt(t)};var St={deflateInit:(t,e)=>Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=258-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Ft=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Ft=!1}const Lt=new Uint8Array(256);for(let t=0;t<256;t++)Lt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Lt[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Bt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=u[f&m];e:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}k=65535&g,p&=15,p&&(c<p&&(f+=z[a++]<<c,c+=8),k+=f&(1<<p)-1,f>>>=p,c-=p),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=w[f&b];a:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=16209;break t}if(v=65535&g,p&=15,c<p&&(f+=z[a++]<<c,c+=8,c<p&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<p)-1,v>o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}else if(d<p){if(y+=l+d-p,p-=d,p<k){k-=p;do{A[n++]=_[y++]}while(--p);if(y=0,d<k){p=d,k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}}else if(y+=d-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const te=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ae=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ie=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,a,i,n,s,r,o)=>{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m<i;m++)E[e[a+m]]++;for(p=l,g=15;g>=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<g&&0===E[b];b++);for(p<b&&(p=b),y=1,w=1;w<=15;w++)if(y<<=1,y-=E[w],y<0)return-1;if(y>0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m<i;m++)0!==e[a+m]&&(r[R[e[a+m]]++]=m);if(0===t?(A=D=r,u=20):1===t?(A=te,D=ee,u=257):(A=ae,D=ie,u=0),z=0,m=0,w=b,c=s,k=p,v=0,_=-1,x=1<<p,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1<u?(U=0,S=r[m]):r[m]>=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<<w-v,d=1<<k,b=d;do{d-=h,n[c+(z>>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<<k;k+v<g&&(y-=E[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Ue={inflateReset:ve,inflateReset2:ye,inflateResetKeep:ke,inflateInit:t=>xe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:16191,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==we){t.msg="unknown compression method",a.mode=me;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=me;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=me;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}t.adler=a.check=be(h),h=0,d=0,a.mode=16190;case 16190:if(0===a.havedict)return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de;t.adler=a.check=1,a.mode=16191;case 16191:if(e===re||e===oe)break t;case 16192:if(a.last){h>>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,k=b,v=g;z=a.lencode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<<a.distbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(0==(240&b)){for(p=m,k=b,v=g;z=a.distcode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,r-f):F(a.check,n,f,r-f)),f=l,4&a.wrap&&(a.flags?h:be(h))!==a.check){t.msg="incorrect data check",a.mode=me;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=me;break}h=0,d=0}a.mode=16208;case 16208:x=he;break t;case me:x=fe;break t;case 16210:return ce;default:return _e}return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<me&&(a.mode<16206||e!==se))&&Ze(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,t.next_out-f):F(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(16191===a.mode?128:0)+(16199===a.mode||16194===a.mode?256:0),(0===_&&0===f||e===se)&&x===le&&(x=ue),x},inflateEnd:t=>{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function a_(e,t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(pp.info(e),t&&r_(e))}function s_(e,t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(pp.info(e),t&&setTimeout((()=>{r_(e)}),0))}function r_(e){am().addBreadcrumb({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class o_ extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class c_{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>eg)throw new o_;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?Dy(e):null}}class l_{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){a_("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((i,a)=>{const s=({data:t})=>{const r=t;if(r.method===e&&r.id===n){if(this._worker.removeEventListener("message",s),!r.success)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay]",r.response),void a(new Error("Error in compression worker"));i(r.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class u_{constructor(e){this._worker=new l_(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=Dy(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>eg?Promise.reject(new o_):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear")}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class d_{constructor(e){this._fallback=new c_,this._compression=new u_(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void a_("[Replay] Failed to load the compression worker, falling back to simple buffer")}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t}=this._fallback,n=[];for(const t of e)n.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("[Replay] Failed to add events when switching buffers.",e)}}}function p_({useCompression:e}){if(e&&window.Worker)try{const e=function(){const e=new Blob([i_]);return URL.createObjectURL(e)}();a_("[Replay] Using compression worker");const t=new Worker(e);return new d_(t)}catch(e){a_("[Replay] Failed to create compression worker")}return a_("[Replay] Using simple buffer"),new c_}function h_(){try{return"sessionStorage"in Wf&&!!Wf.sessionStorage}catch(e){return!1}}function m_(e){!function(){if(!h_())return;try{Wf.sessionStorage.removeItem(Kf)}catch(e){}}(),e.session=void 0}function f_(e){return void 0!==e&&Math.random()<e}function g_(e){if(h_())try{Wf.sessionStorage.setItem(Kf,JSON.stringify(e))}catch(e){}}function y_(e){const t=Date.now();return{id:e.id||Qp(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function __({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:i}={}){const a=function(e,t){return f_(e)?"session":!!t&&"buffer"}(e,t),s=y_({sampled:a,previousSessionId:i});return n&&g_(s),s}function v_(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function b_(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:i=Date.now()}){return v_(e.started,t,i)||v_(e.lastActivity,n,i)}function w_(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!b_(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function x_({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:i},a){const s=a.stickySession&&function(e){if(!h_())return null;try{const t=Wf.sessionStorage.getItem(Kf);if(!t)return null;const n=JSON.parse(t);return s_("[Replay] Loading existing session",e),y_(n)}catch(e){return null}}(e);return s?w_(s,{sessionIdleExpire:t,maxReplayDuration:n})?(s_("[Replay] Session in sessionStorage is expired, creating new one..."),__(a,{previousSessionId:s.id})):s:(s_("[Replay] Creating new session",e),__(a,{previousSessionId:i}))}function E_(e,t,n){return!!k_(e,t)&&(S_(e,t,n),!0)}async function S_(e,t,n){if(!e.eventBuffer)return null;try{n&&"buffer"===e.recordingMode&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);const i=function(e,t){try{if("function"==typeof t&&function(e){return e.type===Lg.Custom}(e))return t(e)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...",e),null}return e}(t,e.getOptions().beforeAddRecordingEvent);if(!i)return;return await e.eventBuffer.addEvent(i)}catch(t){const n=t&&t instanceof o_?"addEventSizeExceeded":"addEvent";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error(t),await e.stop({reason:n});const i=am().getClient();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function k_(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=Dy(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(a_(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1))}function T_(e){return!e.type}function R_(e){return"transaction"===e.type}function I_(e){const t=function(){const e=am().getClient();if(!e)return!1;const t=e.getTransport();if(!t)return!1;return t.send.__sentry__baseTransport__||!1}();return(n,i)=>{if(!e.isEnabled()||!T_(n)&&!R_(n))return;const a=i&&i.statusCode;t&&(!a||a<200||a>=300)||(R_(n)?function(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,n):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);"buffer"===e.recordingMode&&t.tags&&t.tags.replayId&&setTimeout((()=>{e.sendBufferedReplayOrFlush()}))}(e,n))}}function A_(e,t=!1){const n=t?I_(e):void 0;return(t,i)=>{if(!e.isEnabled())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!T_(t)&&!R_(t))return t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&(!(!t.originalException||!t.originalException.__rrweb__)||e.exception.values.some((e=>!!(e.stacktrace&&e.stacktrace.frames&&e.stacktrace.frames.length)&&e.stacktrace.frames.some((e=>e.filename&&e.filename.includes("/rrweb/src/"))))))}(t,i)&&!e.getOptions()._experiments.captureExceptions)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Replay] Ignoring error from rrweb internals",t),null;const a=function(e,t){return"buffer"===e.recordingMode&&t.message!==Jf&&!(!t.exception||t.type)&&f_(e.getOptions().errorSampleRate)}(e,t);return(a||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&n(t,{statusCode:200}),t}}function C_(e,t){return t.map((({type:t,start:n,end:i,name:a,data:s})=>{const r=e.throttledAddEvent({type:Lg.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:a,startTimestamp:n,endTimestamp:i,data:s}}});return"string"==typeof r?Promise.resolve(null):r}))}function O_(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,i=Date.now()/1e3;return{type:"navigation.push",start:i,end:i,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(C_(e,[n]),!1))))}}function L_(e,t){return("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||!e.getOptions()._experiments.traceInternals)&&function(e){const t=am().getClient(),n=t&&t.getDsn();return!!n&&e.includes(n.host)}(t)}function j_(e,t){e.isEnabled()&&null!==t&&(L_(e,t.name)||e.addUpdate((()=>(C_(e,[t]),!0))))}function U_(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,xhr:i}=e,a=i[Np];if(!t||!n||!a)return null;const{method:s,url:r,status_code:o}=a;return void 0===r?null:{type:"resource.xhr",name:r,start:t/1e3,end:n/1e3,data:{method:s,statusCode:o}}}(t);j_(e,n)}}const P_=10,F_=11,D_=12,N_=13,M_=14,z_=15,B_=20,$_=21,q_=22,Y_=23,V_=["true","false","null"];function G_(e,t){if(!t.length)return e;let n=e;const i=t.length-1;n=function(e,t){switch(t){case P_:return`${e}"~~":"~~"`;case F_:return`${e}:"~~"`;case D_:return`${e}~~":"~~"`;case N_:return function(e){const t=e.lastIndexOf(":"),n=e.slice(t+1);if(V_.includes(n.trim()))return`${e},"~~":"~~"`;return`${e.slice(0,t+1)}"~~"`}(e);case M_:return`${e}~~"`;case z_:return`${e},"~~":"~~"`;case B_:return`${e}"~~"`;case $_:return function(e){const t=function(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(","===n||"["===n)return t}return-1}(e);if(t>-1){const n=e.slice(t+1);return V_.includes(n.trim())?`${e},"~~"`:`${e.slice(0,t+1)}"~~"`}return e}(e);case q_:return`${e}~~"`;case Y_:return`${e},"~~"`}return e}(n,t[i]);for(let e=i;e>=0;e--){switch(t[e]){case P_:n=`${n}}`;break;case B_:n=`${n}]`}}return n}function H_(e,t,n){const i=e[e.length-1],a=t[n];if(!/\s/.test(a))if('"'!==a||W_(t,n))switch(a){case"{":!function(e,t){if(!t)return void e.push(P_);if(t===N_)return void e.push(P_);t===$_&&e.push(P_);if(t===B_)e.push(P_)}(e,i);break;case"[":!function(e,t){if(!t)return e.push(B_),void e.push($_);if(t===N_)return e.push(B_),void e.push($_);t===$_&&(e.push(B_),e.push($_));if(t===B_)e.push(B_),e.push($_)}(e,i);break;case":":!function(e,t){t===F_&&(e.pop(),e.push(N_))}(e,i);break;case",":!function(e,t){if(t===N_)return void e.pop();if(t===z_)return e.pop(),void e.pop();if(t===$_)return;if(t===Y_)e.pop()}(e,i);break;case"}":!function(e,t){t===P_&&e.pop();t===N_&&(e.pop(),e.pop());t===z_&&(e.pop(),e.pop(),e.pop());e[e.length-1]===N_&&e.push(z_);e[e.length-1]===$_&&e.push(Y_)}(e,i);break;case"]":!function(e,t){t===B_&&e.pop();t===$_&&(e.pop(),e.pop());t===Y_&&(e.pop(),e.pop(),e.pop());e[e.length-1]===N_&&e.push(z_);e[e.length-1]===$_&&e.push(Y_)}(e,i)}else!function(e,t){if(t===M_)return e.pop(),void e.push(z_);if(t===q_)return e.pop(),void e.push(Y_);if(t===N_)return void e.push(M_);if(t===$_)return void e.push(q_);if(t===P_)return void e.push(D_);if(t===D_)e.pop(),e.push(F_)}(e,i)}function W_(e,t){return"\\"===e[t-1]&&!W_(e,t-1)}function K_(e){return G_(e,function(e){const t=[];for(let n=0;n<e.length;n++)H_(t,e,n);return t}(e))}function Z_(e,t){if(e)try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=iv(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function J_(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function X_(e){return"string"==typeof e?e:e instanceof URLSearchParams?e.toString():e instanceof FormData?iv(e):void 0}function Q_(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:i,url:a,method:s,statusCode:r,request:o,response:c}=t;return{type:e,start:n/1e3,end:i/1e3,name:a,data:kp({method:s,statusCode:r,request:o,response:c})}}function ev(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function tv(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const i={headers:e,size:t},{body:a,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e,warnings:[]};const t=e.length>Xf;if(function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e))try{const n=t?K_(e.slice(0,Xf)):e;return{body:JSON.parse(n),warnings:t?["JSON_TRUNCATED"]:[]}}catch(n){return{body:t?`${e.slice(0,Xf)}…`:e,warnings:t?["INVALID_JSON","TEXT_TRUNCATED"]:["INVALID_JSON"]}}return{body:t?`${e.slice(0,Xf)}…`:e,warnings:t?["TEXT_TRUNCATED"]:[]}}(n);return i.body=a,s.length>0&&(i._meta={warnings:s}),i}function nv(e,t){return Object.keys(e).reduce(((n,i)=>{const a=i.toLowerCase();return t.includes(a)&&e[i]&&(n[a]=e[i]),n}),{})}function iv(e){return new URLSearchParams(e).toString()}function av(e,t){const n=function(e,t=Wf.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Wf.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const i=n.href;if(!e.endsWith("/")&&i.endsWith("/"))return i.slice(0,-1);return i}(e);return Zd(n,t)}async function sv(e,t,n){try{const i=await async function(e,t,n){const{startTimestamp:i,endTimestamp:a}=t,{url:s,method:r,status_code:o=0,request_body_size:c,response_body_size:l}=e.data,u=av(s,n.networkDetailAllowUrls)&&!av(s,n.networkDetailDenyUrls),d=u?function({networkCaptureBodies:e,networkRequestHeaders:t},n,i){const a=function(e,t){if(1===e.length&&"string"!=typeof e[0])return cv(e[0],t);if(2===e.length)return cv(e[1],t);return{}}(n,t);if(!e)return tv(a,i,void 0);const s=X_(rv(n));return tv(a,i,s)}(n,t.input,c):ev(c),p=await async function(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:i},a,s){if(!e&&void 0!==s)return ev(s);const r=ov(a.headers,i);if(!t&&void 0!==s)return tv(r,s,void 0);try{const i=a.clone(),o=await async function(e){try{return await e.text()}catch(e){return}}(i),c=o&&o.length&&void 0===s?Z_(o,n):s;return e?tv(r,c,t?o:void 0):ev(c)}catch(e){return tv(r,s,void 0)}}(u,n,t.response,l);return{startTimestamp:i,endTimestamp:a,url:s,method:r,statusCode:o,request:d,response:p}}(e,t,n),a=Q_("resource.fetch",i);j_(n.replay,a)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] Failed to capture fetch breadcrumb",e)}}function rv(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function ov(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function cv(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?ov(n,t):Array.isArray(n)?{}:nv(n,t):{}}async function lv(e,t,n){try{const i=function(e,t,n){const{startTimestamp:i,endTimestamp:a,input:s,xhr:r}=t,{url:o,method:c,status_code:l=0,request_body_size:u,response_body_size:d}=e.data;if(!o)return null;if(!av(o,n.networkDetailAllowUrls)||av(o,n.networkDetailDenyUrls)){return{startTimestamp:i,endTimestamp:a,url:o,method:c,statusCode:l,request:ev(u),response:ev(d)}}const p=r[Np],h=p?nv(p.request_headers,n.networkRequestHeaders):{},m=nv(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce(((e,t)=>{const[n,i]=t.split(": ");return e[n.toLowerCase()]=i,e}),{})}(r),n.networkResponseHeaders),f=tv(h,u,n.networkCaptureBodies?X_(s):void 0),g=tv(m,d,n.networkCaptureBodies?t.xhr.responseText:void 0);return{startTimestamp:i,endTimestamp:a,url:o,method:c,statusCode:l,request:f,response:g}}(e,t,n),a=Q_("resource.xhr",i);j_(n.replay,a)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] Failed to capture fetch breadcrumb",e)}}function uv(e){const t=am().getClient();try{const n=new TextEncoder,{networkDetailAllowUrls:i,networkDetailDenyUrls:a,networkCaptureBodies:s,networkRequestHeaders:r,networkResponseHeaders:o}=e.getOptions(),c={replay:e,textEncoder:n,networkDetailAllowUrls:i,networkDetailDenyUrls:a,networkCaptureBodies:s,networkRequestHeaders:r,networkResponseHeaders:o};t&&t.on?t.on("beforeAddBreadcrumb",((e,t)=>function(e,t,n){if(!t.data)return;try{(function(e){return"xhr"===e.category})(t)&&function(e){return e&&e.xhr}(n)&&(!function(e,t,n){const{xhr:i,input:a}=t,s=Z_(a,n.textEncoder),r=i.getResponseHeader("content-length")?J_(i.getResponseHeader("content-length")):Z_(i.response,n.textEncoder);void 0!==s&&(e.data.request_body_size=s),void 0!==r&&(e.data.response_body_size=r)}(t,n,e),lv(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(!function(e,t,n){const{input:i,response:a}=t,s=Z_(rv(i),n.textEncoder),r=a?J_(a.headers.get("content-length")):void 0;void 0!==s&&(e.data.request_body_size=s),void 0!==r&&(e.data.response_body_size=r)}(t,n,e),sv(t,n,e))}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Error when enriching network breadcrumb")}}(c,e,t))):($p("fetch",function(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{startTimestamp:t,endTimestamp:n,fetchData:i,response:a}=e;if(!n)return null;const{method:s,url:r}=i;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:r,data:{method:s,statusCode:a?a.status:void 0}}}(t);j_(e,n)}}(e)),$p("xhr",U_(e)))}catch(e){}}let dv=null;const pv=e=>t=>{if(!e.isEnabled())return;const n=function(e){const t=e.getLastBreadcrumb&&e.getLastBreadcrumb();if(dv===t||!t)return null;if(dv=t,!function(e){return!!e.category}(t)||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))return null;if("console"===t.category)return function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return Hy(e);let n=!1;const i=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>Qf?(n=!0,`${e.slice(0,Qf)}…`):e;if("object"==typeof e)try{const t=oh(e,7),i=JSON.stringify(t);if(i.length>Qf){const e=K_(i.slice(0,Qf)),t=JSON.parse(e);return n=!0,t}return t}catch(e){}return e}));return Hy({...e,data:{...e.data,arguments:i,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t);return Hy(t)}(t);n&&Ny(e,n)};function hv(e){return!(!e||!e.on)}function mv(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:i}=e,a=Date.now()/1e3;return{type:"memory",name:"memory",start:a,end:a,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:i}}}}const fv={resource:function(e){const{entryType:t,initiatorType:n,name:i,responseEnd:a,startTime:s,decodedBodySize:r,encodedBodySize:o,responseStatus:c,transferSize:l}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:yv(s),end:yv(a),name:i,data:{size:l,statusCode:c,decodedBodySize:r,encodedBodySize:o}}},paint:function(e){const{duration:t,entryType:n,name:i,startTime:a}=e,s=yv(a);return{type:n,name:i,start:s,end:s+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:i,duration:a,domComplete:s,encodedBodySize:r,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:m,type:f}=e;if(0===a)return null;return{type:`${t}.${f}`,start:yv(h),end:yv(s),name:n,data:{size:m,decodedBodySize:i,encodedBodySize:r,duration:a,domInteractive:l,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}},"largest-contentful-paint":function(e){const{entryType:t,startTime:n,size:i}=e;let a=0;if(Wf.performance){const e=Wf.performance.getEntriesByType("navigation")[0];a=e&&e.activationStart||0}const s=Math.max(n-a,0),r=yv(a)+s/1e3;return{type:t,name:t,start:r,end:r,data:{value:s,size:i,nodeId:Fy.mirror.getId(e.element)}}}};function gv(e){return void 0===fv[e.entryType]?null:fv[e.entryType](e)}function yv(e){return((Eh||Wf.performance.timeOrigin)+e)/1e3}function _v(e){let t=!1;return(n,i)=>{if(!e.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("[Replay] Received replay event after session expired."));const a=i||!t;t=!0,e.addUpdate((()=>{if("buffer"===e.recordingMode&&a&&e.setInitialState(),!E_(e,n,a))return!0;if(!a)return!1;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;E_(e,function(e){const t=e.getOptions();return{type:Lg.Custom,timestamp:Date.now(),data:{tag:"options",payload:{sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}(e),!1)}(e,a),e.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){const t=e.eventBuffer.getEarliestTimestamp();t&&(a_(`[Replay] Updating session start time to earliest event in buffer to ${new Date(t)}`,e.getOptions()._experiments.traceInternals),e.session.started=t,e.getOptions().stickySession&&g_(e.session))}return"session"===e.recordingMode&&e.flush(),!0}))}}async function vv({recordingData:e,replayId:t,segmentId:n,eventContext:i,timestamp:a,session:s}){const r=function({recordingData:e,headers:t}){let n;const i=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${i}${e}`;else{const t=(new TextEncoder).encode(i);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:o,errorIds:c,traceIds:l,initialTimestamp:u}=i,d=am(),p=d.getClient(),h=d.getScope(),m=p&&p.getTransport(),f=p&&p.getDsn();if(!(p&&m&&f&&s.sampled))return;const g={type:Zf,replay_start_timestamp:u/1e3,timestamp:a/1e3,error_ids:c,trace_ids:l,urls:o,replay_id:t,segment_id:n,replay_type:s.sampled},y=await async function({client:e,scope:t,replayId:n,event:i}){const a={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit&&e.emit("preprocessEvent",i,a);const s=await Cm(e.getOptions(),i,a,t,e);if(!s)return null;s.platform=s.platform||"javascript";const r=e.getSdkMetadata&&e.getSdkMetadata(),{name:o,version:c}=r&&r.sdk||{};return s.sdk={...s.sdk,name:o||"sentry.javascript.unknown",version:c||"0.0.0"},s}({scope:h,client:p,replayId:t,event:g});if(!y)return p.recordDroppedEvent("event_processor","replay",g),void a_("An event processor returned `null`, will not send event.");delete y.sdkProcessingMetadata;const _=function(e,t,n,i){return jh($h(e,Bh(e),i,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(y,r,f,p.getOptions().tunnel);let v;try{v=await m.send(_)}catch(e){const t=new Error(Jf);try{t.cause=e}catch(e){}throw t}if(!v)return v;if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new bv(v.statusCode);return v}class bv extends Error{constructor(e){super(`Transport returned status code ${e}`)}}async function wv(e,t={count:0,interval:5e3}){const{recordingData:n,options:i}=e;var a,s;if(n.length)try{return await vv(e),!0}catch(n){if(n instanceof bv)throw n;if(a="Replays",s={_retryCount:t.count},am().setContext(a,s),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i._experiments&&i._experiments.captureExceptions&&Sm(n),t.count>=3){const e=new Error(`${Jf} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise(((n,i)=>{setTimeout((async()=>{try{await wv(e,t),n(!0)}catch(e){i(e)}}),t.interval)}))}}const xv="__THROTTLED";function Ev(e,t,n){const i=new Map;let a=!1;return(...s)=>{const r=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;i.forEach(((e,n)=>{n<t&&i.delete(n)}))})(r),[...i.values()].reduce(((e,t)=>e+t),0)>=t){const e=a;return a=!0,e?"__SKIPPED":xv}a=!1;const o=i.get(r)||0;return i.set(r,o+1),e(...s)}}class Sv{constructor({options:e,recordingOptions:t}){Sv.prototype.__init.call(this),Sv.prototype.__init2.call(this),Sv.prototype.__init3.call(this),Sv.prototype.__init4.call(this),Sv.prototype.__init5.call(this),Sv.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEvents=[],this.recordingMode="session",this.timeouts={sessionIdlePause:3e5,sessionIdleExpire:9e5},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=function(e,t,n){let i,a,s;const r=n&&n.maxWait?Math.max(n.maxWait,t):0;function o(){return c(),i=e(),i}function c(){void 0!==a&&clearTimeout(a),void 0!==s&&clearTimeout(s),a=s=void 0}function l(){return a&&clearTimeout(a),a=setTimeout(o,t),r&&void 0===s&&(s=setTimeout(o,r)),i}return l.cancel=c,l.flush=function(){return void 0!==a||void 0!==s?o():i},l}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Ev(((e,t)=>function(e,t,n){return k_(e,t)?S_(e,t,n):Promise.resolve(null)}(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:i}=this.getOptions(),a=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:i?i.join(","):""}:void 0;a&&(this.clickDetector=new Yy(this,a))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options;t<=0&&n<=0||(this._initializeSessionForSampling(e),this.session?!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",s_(`[Replay] Starting replay in ${this.recordingMode} mode`,this._options._experiments.traceInternals),this._initializeRecording()):this._handleException(new Error("Unable to initialize and create session")))}start(){if(this._isEnabled&&"session"===this.recordingMode)throw new Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw new Error("Replay buffering is in progress, call `flush()` to save the replay");s_("[Replay] Starting replay in session mode",this._options._experiments.traceInternals);const e=x_({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)throw new Error("Replay recording is already in progress");s_("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const e=x_({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{this._stopRecording=Fy({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:_v(this),onMutation:this._onMutationHandler})}catch(e){this._handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this._handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{a_("[Replay] Stopping Replay"+(t?` triggered by ${t}`:""),this._options._experiments.traceInternals),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,m_(this)}catch(e){this._handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),a_("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),a_("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();a_("[Replay] Converting buffer to session",this._options._experiments.traceInternals),await this.flushImmediate();const n=this.stopRecording();e&&n&&"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&v_(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Wf.location.pathname}${Wf.location.hash}${Wf.location.search}`,t=`${Wf.location.origin}${e}`;this.performanceEvents=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===xv){const e=Hy({category:"replay.throttled"});this.addUpdate((()=>!E_(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastTransaction||am().getScope().getTransaction();if(e&&["route","custom"].includes(e.metadata.source))return e.name}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=p_({useCompression:this._options.useCompression}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay]",e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&Sm(e)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=x_({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,traceInternals:this._options._experiments.traceInternals,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!w_(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Wf.document.addEventListener("visibilitychange",this._handleVisibilityChange),Wf.addEventListener("blur",this._handleWindowBlur),Wf.addEventListener("focus",this._handleWindowFocus),Wf.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(!function(e){const t=am().getScope(),n=am().getClient();t.addScopeListener(pv(e)),$p("dom",Jy(e)),$p("history",O_(e)),uv(e),Hh(A_(e,!hv(n))),hv(n)&&(n.on("afterSendEvent",I_(e)),n.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&(t.replay_id=n)})),n.on("startTransaction",(t=>{e.lastTransaction=t})),n.on("finishTransaction",(t=>{e.lastTransaction=t})))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}"PerformanceObserver"in Wf&&(this._performanceObserver=n_(this))}_removeListeners(){try{Wf.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Wf.removeEventListener("blur",this._handleWindowBlur),Wf.removeEventListener("focus",this._handleWindowFocus),Wf.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=void 0)}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===Wf.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=Hy({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=Hy({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Qy(this,e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;b_(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){if(!this.session)return;this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):a_("[Replay] Document has become active, but session has expired")}_triggerFullSnapshot(e=!0){try{a_("[Replay] Taking full rrweb snapshot"),Fy.takeFullSnapshot(e)}catch(e){this._handleException(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:Lg.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){const e=[...this.performanceEvents];return this.performanceEvents=[],Promise.all(C_(this,function(e){return e.map(gv).filter(Boolean)}(e)))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t)return;if(e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(e){try{return Promise.all(C_(e,[mv(Wf.performance.memory)]))}catch(e){return[]}}(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),i=this.session.segmentId++;this._maybeSaveSession();const a=await this.eventBuffer.finish();await wv({replayId:e,recordingData:a,segmentId:i,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(e){this._handleException(e),this.stop({reason:"sendReplay"});const t=am().getClient();t&&t.recordDroppedEvent("send_error","replay")}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error("[Replay] No session found to flush."));const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const i=n<this._options.minReplayDuration,a=n>this._options.maxReplayDuration+5e3;if(i||a)return a_(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${i?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),void(i&&this._debouncedFlush());const s=this.eventBuffer;if(s&&0===this.session.segmentId&&!s.hasCheckout&&a_("[Replay] Flushing initial segment without checkout.",this._options._experiments.traceInternals),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=void 0);try{await this._flushLock}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.error(e)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&g_(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,i=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||i){const e=Hy({category:"replay.mutations",data:{count:t,limit:i}});this._createCustomBreadcrumb(e)}return!i||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function kv(e,t,n,i){const a=[...e,..."string"==typeof i?i.split(","):[],...t];return void 0!==n&&("string"==typeof n&&a.push(`.${n}`),console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")),a.join(",")}function Tv({mask:e,unmask:t,block:n,unblock:i,ignore:a,blockClass:s,blockSelector:r,maskTextClass:o,maskTextSelector:c,ignoreClass:l}){const u=kv(e,[".sentry-mask","[data-sentry-mask]"],o,c),d=kv(t,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:u,unmaskTextSelector:d,maskInputSelector:u,unmaskInputSelector:d,blockSelector:kv(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],s,r),unblockSelector:kv(i,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:kv(a,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return s instanceof RegExp&&(p.blockClass=s),o instanceof RegExp&&(p.maskTextClass=o),p}function Rv(){return"undefined"!=typeof window&&(!rh()||"undefined"!=typeof process&&"renderer"===process.type)}const Iv='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Av=["content-length","content-type","accept"];let Cv=!1;class Ov{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:i=36e5,stickySession:a=!0,useCompression:s=!0,_experiments:r={},sessionSampleRate:o,errorSampleRate:c,maskAllText:l=!0,maskAllInputs:u=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:p=750,mutationLimit:h=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:f=[],networkDetailAllowUrls:g=[],networkDetailDenyUrls:y=[],networkCaptureBodies:_=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:w=[],unmask:x=[],block:E=[],unblock:S=[],ignore:k=[],maskFn:T,beforeAddRecordingEvent:R,blockClass:I,blockSelector:A,maskInputOptions:C,maskTextClass:O,maskTextSelector:L,ignoreClass:j}={}){if(this.name=Ov.id,this._recordingOptions={maskAllInputs:u,maskAllText:l,maskInputOptions:{...C||{},password:!0},maskTextFn:T,maskInputFn:T,...Tv({mask:w,unmask:x,block:E,unblock:S,ignore:k,blockClass:I,blockSelector:A,maskTextClass:O,maskTextSelector:L,ignoreClass:j}),slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(i,tg),stickySession:a,sessionSampleRate:o,errorSampleRate:c,useCompression:s,blockAllMedia:d,maskAllInputs:u,maskAllText:l,mutationBreadcrumbLimit:p,mutationLimit:h,slowClickTimeout:m,slowClickIgnoreSelectors:f,networkDetailAllowUrls:g,networkDetailDenyUrls:y,networkCaptureBodies:_,networkRequestHeaders:Lv(v),networkResponseHeaders:Lv(b),beforeAddRecordingEvent:R,_experiments:r},"number"==typeof o&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${o} })`),this._initialOptions.sessionSampleRate=o),"number"==typeof c&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${c} })`),this._initialOptions.errorSampleRate=c),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Iv}`:Iv),this._isInitialized&&Rv())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Cv}set _isInitialized(e){Cv=e}setupOnce(){Rv()&&(this._setup(),setTimeout((()=>this._initialize())))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay&&this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_initialize(){this._replay&&this._replay.initializeSampling()}_setup(){const e=function(e){const t=am().getClient(),n=t&&t.getOptions(),i={sessionSampleRate:0,errorSampleRate:0,...kp(e)};if(!n)return console.warn("SDK client is not available."),i;null==e.sessionSampleRate&&null==e.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.");"number"==typeof n.replaysSessionSampleRate&&(i.sessionSampleRate=n.replaysSessionSampleRate);"number"==typeof n.replaysOnErrorSampleRate&&(i.errorSampleRate=n.replaysOnErrorSampleRate);return i}(this._initialOptions);this._replay=new Sv({options:e,recordingOptions:this._recordingOptions})}}function Lv(e){return[...Av,...e.map((e=>e.toLowerCase()))]}Ov.__initStatic();const jv=np;const Uv=(e,t,n)=>{let i,a;return s=>{t.value>=0&&(s||n)&&(a=t.value-(i||0),(a||void 0===i)&&(i=t.value,t.delta=a,e(t)))}},Pv=()=>jv.__WEB_VITALS_POLYFILL__?jv.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const e=jv.performance.timing,t=jv.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(const t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n})()):jv.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Fv=()=>{const e=Pv();return e&&e.activationStart||0},Dv=(e,t)=>{const n=Pv();let i="navigate";return n&&(i=jv.document.prerendering||Fv()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},Nv=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const i=new PerformanceObserver((e=>{t(e.getEntries())}));return i.observe(Object.assign({type:e,buffered:!0},n||{})),i}}catch(e){}},Mv=(e,t)=>{const n=i=>{"pagehide"!==i.type&&"hidden"!==jv.document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},zv=e=>{const t=Dv("CLS",0);let n,i=0,a=[];const s=e=>{e.forEach((e=>{if(!e.hadRecentInput){const s=a[0],r=a[a.length-1];i&&0!==a.length&&e.startTime-r.startTime<1e3&&e.startTime-s.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e]),i>t.value&&(t.value=i,t.entries=a,n&&n())}}))},r=Nv("layout-shift",s);if(r){n=Uv(e,t);const i=()=>{s(r.takeRecords()),n(!0)};return Mv(i),i}};let Bv=-1;const $v=()=>(Bv<0&&(Bv="hidden"!==jv.document.visibilityState||jv.document.prerendering?1/0:0,Mv((({timeStamp:e})=>{Bv=e}),!0)),{get firstHiddenTime(){return Bv}}),qv=e=>{const t=$v(),n=Dv("FID");let i;const a=e=>{e.startTime<t.firstHiddenTime&&(n.value=e.processingStart-e.startTime,n.entries.push(e),i(!0))},s=e=>{e.forEach(a)},r=Nv("first-input",s);i=Uv(e,n),r&&Mv((()=>{s(r.takeRecords()),r.disconnect()}),!0)},Yv={},Vv=e=>{const t=$v(),n=Dv("LCP");let i;const a=e=>{const a=e[e.length-1];if(a){const e=Math.max(a.startTime-Fv(),0);e<t.firstHiddenTime&&(n.value=e,n.entries=[a],i())}},s=Nv("largest-contentful-paint",a);if(s){i=Uv(e,n);const t=()=>{Yv[n.id]||(a(s.takeRecords()),s.disconnect(),Yv[n.id]=!0,i(!0))};return["keydown","click"].forEach((e=>{addEventListener(e,t,{once:!0,capture:!0})})),Mv(t,!0),t}};function Gv(e){return"number"==typeof e&&isFinite(e)}function Hv(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function Wv(e){return e/1e3}function Kv(){return jv&&jv.addEventListener&&jv.performance}let Zv,Jv,Xv=0,Qv={};function eb(){const e=Kv();if(e&&Eh){e.mark&&jv.performance.mark("sentry-tracing-init"),qv((e=>{const t=e.entries.pop();if(!t)return;const n=Wv(Eh),i=Wv(t.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding FID"),Qv.fid={value:e.value,unit:"millisecond"},Qv["mark.fid"]={value:n+i,unit:"second"}}));const t=zv((e=>{const t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding CLS"),Qv.cls={value:e.value,unit:""},Jv=t)})),n=Vv((e=>{const t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding LCP"),Qv.lcp={value:e.value,unit:"millisecond"},Zv=t)}));return()=>{t&&t(),n&&n()}}return()=>{}}function tb(e){const t=Kv();if(!t||!jv.performance.getEntries||!Eh)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Tracing] Adding & adjusting spans using Performance API");const n=Wv(Eh),i=t.getEntries();let a,s;if(i.slice(Xv).forEach((t=>{const i=Wv(t.startTime),r=Wv(t.duration);if(!("navigation"===e.op&&n+i<e.startTimestamp))switch(t.entryType){case"navigation":!function(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach((i=>{nb(e,t,i,n)})),nb(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),nb(e,t,"fetch",n,"cache","domainLookupStart"),nb(e,t,"domainLookup",n,"DNS"),function(e,t,n){Hv(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+Wv(t.requestStart),endTimestamp:n+Wv(t.responseEnd)}),Hv(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+Wv(t.responseStart),endTimestamp:n+Wv(t.responseEnd)})}(e,t,n)}(e,t,n),a=n+Wv(t.responseStart),s=n+Wv(t.requestStart);break;case"mark":case"paint":case"measure":{!function(e,t,n,i,a){const s=a+n,r=s+i;Hv(e,{description:t.name,endTimestamp:r,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:s})}(e,t,i,r,n);const a=$v(),s=t.startTime<a.firstHiddenTime;"first-paint"===t.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding FP"),Qv.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding FCP"),Qv.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":{const a=t.name.replace(jv.location.origin,"");!function(e,t,n,i,a,s){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;const r={};"transferSize"in t&&(r["http.response_transfer_size"]=t.transferSize);"encodedBodySize"in t&&(r["http.response_content_length"]=t.encodedBodySize);"decodedBodySize"in t&&(r["http.decoded_response_content_length"]=t.decodedBodySize);"renderBlockingStatus"in t&&(r["resource.render_blocking_status"]=t.renderBlockingStatus);const o=s+i,c=o+a;Hv(e,{description:n,endTimestamp:c,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:o,data:r})}(e,t,a,i,r,n);break}}})),Xv=Math.max(i.length-1,0),function(e){const t=jv.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Gv(n.rtt)&&(Qv["connection.rtt"]={value:n.rtt,unit:"millisecond"}));Gv(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`);Gv(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===e.op){"number"==typeof a&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding TTFB"),Qv.ttfb={value:1e3*(a-e.startTimestamp),unit:"millisecond"},"number"==typeof s&&s<=a&&(Qv["ttfb.requestTime"]={value:1e3*(a-s),unit:"millisecond"})),["fcp","fp","lcp"].forEach((t=>{if(!Qv[t]||n>=e.startTimestamp)return;const i=Qv[t].value,a=n+Wv(i),s=Math.abs(1e3*(a-e.startTimestamp)),r=s-i;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Measurements] Normalized ${t} from ${i} to ${s} (${r})`),Qv[t].value=s}));const t=Qv["mark.fid"];t&&Qv.fid&&(Hv(e,{description:"first input delay",endTimestamp:t.value+Wv(Qv.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:t.value}),delete Qv["mark.fid"]),"fcp"in Qv||delete Qv.cls,Object.keys(Qv).forEach((t=>{e.setMeasurement(t,Qv[t].value,Qv[t].unit)})),function(e){Zv&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding LCP Data"),Zv.element&&e.setTag("lcp.element",op(Zv.element)),Zv.id&&e.setTag("lcp.id",Zv.id),Zv.url&&e.setTag("lcp.url",Zv.url.trim().slice(0,200)),e.setTag("lcp.size",Zv.size));Jv&&Jv.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log("[Measurements] Adding CLS Data"),Jv.sources.forEach(((t,n)=>e.setTag(`cls.source.${n+1}`,op(t.node)))))}(e)}Zv=void 0,Jv=void 0,Qv={}}function nb(e,t,n,i,a,s){const r=s?t[s]:t[`${n}End`],o=t[`${n}Start`];o&&r&&Hv(e,{op:"browser",origin:"auto.browser.browser.metrics",description:a||n,startTimestamp:i+Wv(o),endTimestamp:i+Wv(r)})}const ib=["localhost",/^\/(?!\/)/],ab={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:ib,tracePropagationTargets:ib};function sb(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:i,tracingOrigins:a,shouldCreateSpanForRequest:s,enableHTTPTimings:r}={traceFetch:ab.traceFetch,traceXHR:ab.traceXHR,...e},o="function"==typeof s?s:e=>!0,c=e=>function(e,t){return Zd(e,t||ib)}(e,i||a),l={};t&&$p("fetch",(e=>{const t=function(e,t,n,i){if(!om()||!e.fetchData)return;const a=t(e.fetchData.url);if(e.endTimestamp&&a){const t=e.fetchData.__span;if(!t)return;const n=i[t];if(n){if(e.response){n.setHttpStatus(e.response.status);const t=e.response&&e.response.headers&&e.response.headers.get("content-length"),i=parseInt(t);i>0&&n.setData("http.response_content_length",i)}else e.error&&n.setStatus("internal_error");n.finish(),delete i[t]}return}const s=am(),r=s.getScope(),o=s.getClient(),c=r.getSpan(),{method:l,url:u}=e.fetchData,d=a&&c?c.startChild({data:{url:u,type:"fetch","http.method":l},description:`${l} ${u}`,op:"http.client",origin:"auto.http.browser"}):void 0;d&&(e.fetchData.__span=d.spanId,i[d.spanId]=d);if(n(e.fetchData.url)&&o){const t=e.args[0];e.args[1]=e.args[1]||{};const n=e.args[1];n.headers=function(e,t,n,i,a){const s=a||n.getSpan(),r=s&&s.transaction,{traceId:o,sampled:c,dsc:l}=n.getPropagationContext(),u=s?s.toTraceparent():Lh(o,void 0,c),d=r?r.getDynamicSamplingContext():l||hm(o,t,n),p=Ih(d),h="undefined"!=typeof Request&&Vd(e,Request)?e.headers:i.headers;if(h){if("undefined"!=typeof Headers&&Vd(h,Headers)){const e=new Headers(h);return e.append("sentry-trace",u),p&&e.append(Sh,p),e}if(Array.isArray(h)){const e=[...h,["sentry-trace",u]];return p&&e.push([Sh,p]),e}{const e="baggage"in h?h.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),p&&t.push(p),{...h,"sentry-trace":u,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":u,baggage:p}}(t,o,r,n,d)}return d}(e,o,c,l);r&&t&&rb(t)})),n&&$p("xhr",(e=>{const t=function(e,t,n,i){const a=e.xhr,s=a&&a[Np];if(!om()||a&&a.__sentry_own_request__||!a||!s)return;const r=t(s.url);if(e.endTimestamp&&r){const e=a.__sentry_xhr_span_id__;if(!e)return;const t=i[e];return void(t&&(t.setHttpStatus(s.status_code),t.finish(),delete i[e]))}const o=am(),c=o.getScope(),l=c.getSpan(),u=r&&l?l.startChild({data:{...s.data,type:"xhr","http.method":s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client",origin:"auto.http.browser"}):void 0;u&&(a.__sentry_xhr_span_id__=u.spanId,i[a.__sentry_xhr_span_id__]=u);if(a.setRequestHeader&&n(s.url))if(u){const e=u&&u.transaction,t=Ih(e&&e.getDynamicSamplingContext());cb(a,u.toTraceparent(),t)}else{const e=o.getClient(),{traceId:t,sampled:n,dsc:i}=c.getPropagationContext();cb(a,Lh(t,void 0,n),Ih(i||(e?hm(t,e,c):void 0)))}return u}(e,o,c,l);r&&t&&rb(t)}))}function rb(e){const t=e.data.url,n=new PerformanceObserver((i=>{i.getEntries().forEach((i=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}(i)&&i.name.endsWith(t)){const t=function(e){const{name:t,version:n}=function(e){let t="unknown",n="unknown",i="";for(const a of e){if("/"===a){[t,n]=e.split("/");break}if(!isNaN(Number(a))){t="h"===i?"http":i,n=e.split(i)[1];break}i+=a}i===e&&(t=i);return{name:t,version:n}}(e.nextHopProtocol),i=[];if(i.push(["network.protocol.version",n],["network.protocol.name",t]),!Eh)return i;return[...i,["http.request.redirect_start",ob(e.redirectStart)],["http.request.fetch_start",ob(e.fetchStart)],["http.request.domain_lookup_start",ob(e.domainLookupStart)],["http.request.domain_lookup_end",ob(e.domainLookupEnd)],["http.request.connect_start",ob(e.connectStart)],["http.request.secure_connection_start",ob(e.secureConnectionStart)],["http.request.connection_end",ob(e.connectEnd)],["http.request.request_start",ob(e.requestStart)],["http.request.response_start",ob(e.responseStart)],["http.request.response_end",ob(e.responseEnd)]]}(i);t.forEach((t=>e.setData(...t))),n.disconnect()}}))}));n.observe({entryTypes:["resource"]})}function ob(e=0){return((Eh||performance.timeOrigin)+e)/1e3}function cb(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(Sh,n)}catch(e){}}const lb={...fm,markBackgroundTransactions:!0,routingInstrumentation:function(e,t=!0,n=!0){if(!jv||!jv.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("Could not initialize routing instrumentation due to invalid location"));let i,a=jv.location.href;t&&(i=e({name:jv.location.pathname,startTimestamp:Eh?Eh/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&$p("history",(({to:t,from:n})=>{void 0===n&&a&&-1!==a.indexOf(t)?a=void 0:n!==t&&(a=void 0,i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Finishing current transaction with op: ${i.op}`),i.finish()),i=e({name:jv.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))}))},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...ab};class ub{constructor(e){this.name="BrowserTracing",this._hasSetTracePropagationTargets=!1,Em(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this._hasSetTracePropagationTargets=!(!e||!e.tracePropagationTargets&&!e.tracingOrigins)),this.options={...lb,...e},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=eb(),this.options.enableLongTask&&Nv("longtask",(e=>{for(const t of e){const e=cm();if(!e)return;const n=Wv(Eh+t.startTime),i=Wv(t.duration);e.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i})}})),this.options._experiments.enableInteractions&&Nv("event",(e=>{for(const t of e){const e=cm();if(!e)return;if("click"===t.name){const n=Wv(Eh+t.startTime),i=Wv(t.duration);e.startChild({description:op(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+i})}}}),{durationThreshold:0})}setupOnce(e,t){this._getCurrentHub=t;const n=t().getClient(),i=n&&n.getOptions(),{routingInstrumentation:a,startTransactionOnLocationChange:s,startTransactionOnPageLoad:r,markBackgroundTransactions:o,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:u,enableHTTPTimings:d,_experiments:p}=this.options,h=i&&i.tracePropagationTargets,m=h||this.options.tracePropagationTargets;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._hasSetTracePropagationTargets&&h&&pp.warn("[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used."),a((e=>{const n=this._createRouteTransaction(e);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,e,t),n}),r,s),o&&(jv&&jv.document?jv.document.addEventListener("visibilitychange",(()=>{const e=cm();if(jv.document.hidden&&e){const t="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${e.op}`),e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn("[Tracing] Could not set up background tab detection due to lack of global document")),p.enableInteractions&&this._registerInteractionListener(),sb({traceFetch:c,traceXHR:l,tracePropagationTargets:m,shouldCreateSpanForRequest:u,enableHTTPTimings:d})}_createRouteTransaction(e){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`));const t=this._getCurrentHub(),{beforeNavigate:n,idleTimeout:i,finalTimeout:a,heartbeatInterval:s}=this.options,r="pageload"===e.op,o=r?db("sentry-trace"):"",c=r?db("baggage"):"",{traceparentData:l,dynamicSamplingContext:u,propagationContext:d}=Oh(o,c),p={...e,...l,metadata:{...e.metadata,dynamicSamplingContext:l&&!u?{}:u},trimEnd:!0},h="function"==typeof n?n(p):p,m=void 0===h?{...p,sampled:!1}:h;m.metadata=m.name!==p.name?{...m.metadata,source:"custom"}:m.metadata,this._latestRouteName=m.name,this._latestRouteSource=m.metadata&&m.metadata.source,!1===m.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Will not send ${m.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.log(`[Tracing] Starting ${m.op} transaction on scope`);const{location:f}=jv,g=xm(t,m,i,a,!0,{location:f},s),y=t.getScope();return r&&l?y.setPropagationContext(d):y.setPropagationContext({traceId:g.traceId,spanId:g.spanId,parentSpanId:g.parentSpanId,sampled:g.sampled}),g.registerBeforeFinishCallback((e=>{this._collectWebVitals(),tb(e)})),g}_registerInteractionListener(){let e;const t=()=>{const{idleTimeout:t,finalTimeout:n,heartbeatInterval:i}=this.options,a="ui.action.click",s=cm();if(s&&s.op&&["navigation","pageload"].includes(s.op))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Did not create ${a} transaction because a pageload or navigation transaction is in progress.`));if(e&&(e.setFinishReason("interactionInterrupted"),e.finish(),e=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Did not create ${a} transaction because _getCurrentHub is invalid.`));if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&pp.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`));const r=this._getCurrentHub(),{location:o}=jv,c={name:this._latestRouteName,op:a,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};e=xm(r,c,t,n,!0,{location:o},i)};["click"].forEach((e=>{addEventListener(e,t,{once:!1,capture:!0})}))}}function db(e){const t=(n=`meta[name=${e}]`,sp.document&&sp.document.querySelector?sp.document.querySelector(n):null);var n;return t?t.getAttribute("content"):void 0}class pb{constructor(e,t,n,i){this.gameParams=t,this.userParams=n,this.firekit=e,this.displayElement=i,this.jsPsych=null}async init(){this.gameParams?.fromDashboard&&(Gf({dsn:"https://b618958936a197de9f9f9a86ae6cceff@o4505913837420544.ingest.sentry.io/4505915445870592",integrations:[new ub({tracePropagationTargets:["localhost",/^https:\/\/yourserver\.io\/api/]}),new Ov],tracesSampleRate:1,replaysSessionSampleRate:1,replaysOnErrorSampleRate:1,beforeSend:e=>e}),delete this.gameParams.fromDashboard),await this.firekit.startRun();const e=await(async(e,t,n,i)=>{const a=vc(vc({...t,...n},bc),Lc),{userMode:s,assessmentPid:r,labId:o,recruitment:c,userMetadata:l,urlParams:u,consent:d,storyOption:p,language:h,skipInstructions:m,grade:f,birthMonth:g,birthYear:y,age:_,ageMonths:v}=a,b=Ot(g,y,_,v),w={pid:r,labId:o,userMode:s||"default",recruitment:c||"pilot",storyOption:p,story:md(p,f),userMetadata:{...l,grade:f,...b},startTime:new Date,urlParams:u,firekit:e,language:h,skipInstructions:m??!0,consent:d??!0,displayElement:i||null,blockOrder:fd(s)},x=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,w[e]??t])));return await w.firekit.updateTaskParams(x),null!==w.pid&&await w.firekit.updateUser({assessmentPid:w.pid,...l}),w})(this.firekit,this.gameParams,this.userParams,this.displayElement);return s.session.set("config",e),function(e){gd(e);const t=yd(e),n=[zt,...t.timeline];return(()=>{const t={timeline:[Ld,jd],repetitions:4};n.push(bd),n.push(Ad),n.push(Od),n.push(t),n.push(wd),n.push(Cd(e.blockOrder[0],1)),n.push(Sd),n.push(Cd(e.blockOrder[1],2)),n.push(kd)})(),{jsPsych:jc,timeline:n}}(e)}async run(){const{jsPsych:e,timeline:t}=await this.init();this.jsPsych=e,this.jsPsych.run(t),await(e=>{const t=n=>{e()?n():setTimeout((e=>t(n)),400)};return new Promise(t)})((()=>!0===this.firekit.run.completed))}async abort(){this.firekit.abortRun(),document.querySelectorAll("audio").forEach((e=>e.pause())),this.jsPsych&&this.jsPsych.endExperiment()}}export{pb as default};
26
+ //# sourceMappingURL=index.6044acc4.js.map