/*! For license information please see main.2c68adb334d5e44fd15c.js.LICENSE.txt */ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8a6fc87f-34f3-4898-a147-07216583a253",e._sentryDebugIdIdentifier="sentry-dbid-8a6fc87f-34f3-4898-a147-07216583a253")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"imgur@0470099"},(()=>{var e,t,n={wTVA:e=>{e.exports=function(e){if(Array.isArray(e))return e}},Ijbi:e=>{e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t{e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},yXPU:e=>{function t(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=e.apply(n,r);function s(e){t(a,o,i,s,u,"next",e)}function u(e){t(a,o,i,s,u,"throw",e)}s(void 0)}))}}},lwsE:e=>{e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},tmk3:e=>{e.exports=function(e,t){var n=t.get(e);if(!n)throw new TypeError("attempted to get private field on non-instance");return n.get?n.get.call(e):n.value}},"92Nh":e=>{e.exports=function(e,t,n){var r=t.get(e);if(!r)throw new TypeError("attempted to set private field on non-instance");if(r.set)r.set.call(e,n);else{if(!r.writable)throw new TypeError("attempted to set read only private field");r.value=n}return n}},W8MJ:e=>{function t(e,t){for(var n=0;n{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},pVnL:e=>{function t(){return e.exports=t=Object.assign||function(e){for(var t=1;t{function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t},"7W2i":(e,t,n)=>{var r=n("SksO");e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},EbDI:e=>{e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},m0LI:e=>{e.exports=function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}},wkBT:e=>{e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},Bnag:e=>{e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},QILm:(e,t,n)=>{var r=n("8OQS");e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},"8OQS":e=>{e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}},a1gu:(e,t,n)=>{var r=n("cDf5"),o=n("PJYZ");e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},SksO:e=>{function t(n,r){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,r)}e.exports=t},J4zp:(e,t,n)=>{var r=n("wTVA"),o=n("m0LI"),i=n("wkBT");e.exports=function(e,t){return r(e)||o(e,t)||i()}},"SA+Z":(e,t,n)=>{var r=n("wTVA"),o=n("EbDI"),i=n("wkBT");e.exports=function(e){return r(e)||o(e)||i()}},RIqP:(e,t,n)=>{var r=n("Ijbi"),o=n("EbDI"),i=n("Bnag");e.exports=function(e){return r(e)||o(e)||i()}},cDf5:e=>{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(r){return"function"==typeof Symbol&&"symbol"===t(Symbol.iterator)?e.exports=n=function(e){return t(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":t(e)},n(r)}e.exports=n},mLhc:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,i=Object.create(o.prototype),a=new A(r||[]);return i._invoke=function(e,t,n){var r=l;return function(o,i){if(r===p)throw new Error("Generator is already running");if(r===f){if("throw"===o)throw i;return L()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=c(e,t,n);if("normal"===u.type){if(r=n.done?f:d,u.arg===h)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=f,n.method="throw",n.arg=u.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l="suspendedStart",d="suspendedYield",p="executing",f="completed",h={};function m(){}function g(){}function v(){}var y={};y[i]=function(){return this};var b=Object.getPrototypeOf,_=b&&b(b(x([])));_&&_!==n&&r.call(_,i)&&(y=_);var w=v.prototype=m.prototype=Object.create(y);function C(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function S(e){function t(n,o,i,a){var s=c(e[n],e,o);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){t("next",e,i,a)}),(function(e){t("throw",e,i,a)})):Promise.resolve(l).then((function(e){u.value=e,i(u)}),(function(e){return t("throw",e,i,a)}))}a(s.arg)}var n;this._invoke=function(e,r){function o(){return new Promise((function(n,o){t(e,r,n,o)}))}return n=n?n.then(o,o):o()}}function E(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=c(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function x(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:x(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},o0o1:(e,t,n)=>{e.exports=n("mLhc")},H9WU:(e,t,n)=>{"use strict";n.d(t,{$s:()=>k,BH:()=>d,L:()=>a,LL:()=>v,ZR:()=>g,aH:()=>l,eu:()=>h,hl:()=>f,m9:()=>I,ru:()=>p,vZ:()=>b,zI:()=>m});const r=function(e){const t=[];let n=0;for(let r=0;r>6|192,t[n++]=63&o|128):55296==(64512&o)&&r+1>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=63&o|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=63&o|128)}return t},o={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t>2,l=(3&o)<<4|a>>4;let d=(15&a)<<2|u>>6,p=63&u;s||(p=64,i||(d=64)),r.push(n[c],n[l],n[d],n[p])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(r(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n191&&o<224){const i=e[n++];t[r++]=String.fromCharCode((31&o)<<6|63&i)}else if(o>239&&o<365){const i=((7&o)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(i>>10)),t[r++]=String.fromCharCode(56320+(1023&i))}else{const i=e[n++],a=e[n++];t[r++]=String.fromCharCode((15&o)<<12|(63&i)<<6|63&a)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t>4;if(r.push(c),64!==s){const e=a<<4&240|s>>2;if(r.push(e),64!==u){const e=s<<6&192|u;r.push(e)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class i extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const a=function(e){return function(e){const t=r(e);return o.encodeByteArray(t,!0)}(e).replace(/\./g,"")},s=function(e){try{return o.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};const u=()=>function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__,c=()=>{try{return u()||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&s(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},l=()=>{var e;return null===(e=c())||void 0===e?void 0:e.config};class d{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise(((e,t)=>{this.resolve=e,this.reject=t}))}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),"function"==typeof e&&(this.promise.catch((()=>{})),1===e.length?e(t):e(t,n))}}}function p(){const e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function f(){try{return"object"==typeof indexedDB}catch(e){return!1}}function h(){return new Promise(((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(r);o.onsuccess=()=>{o.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},o.onupgradeneeded=()=>{n=!1},o.onerror=()=>{var e;t((null===(e=o.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}}))}function m(){return!("undefined"==typeof navigator||!navigator.cookieEnabled)}class g extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,g.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,v.prototype.create)}}class v{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,o=this.errors[e],i=o?function(e,t){return e.replace(y,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(o,n):"Error",a=`${this.serviceName}: ${i} (${r}).`;return new g(r,a,n)}}const y=/\{\$([^}]+)}/g;function b(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const o of n){if(!r.includes(o))return!1;const n=e[o],i=t[o];if(_(n)&&_(i)){if(!b(n,i))return!1}else if(n!==i)return!1}for(const e of r)if(!n.includes(e))return!1;return!0}function _(e){return null!==e&&"object"==typeof e}const w=1e3,C=2,S=144e5,E=.5;function k(e,t=w,n=C){const r=t*Math.pow(n,e),o=Math.round(E*r*(Math.random()-.5)*2);return Math.min(S,r+o)}function I(e){return e&&e._delegate?e._delegate:e}},mOu4:(e,t,n)=>{"use strict";n.d(t,{$F:()=>dt,A_:()=>Ze,Aw:()=>ut,BD:()=>it,E1:()=>nt,I4:()=>Be,Kv:()=>Me,LB:()=>Ne,MP:()=>Ue,Tz:()=>ht,UZ:()=>mt,V$:()=>De,VR:()=>He,WD:()=>Ve,Wj:()=>Ge,Z7:()=>Re,ZN:()=>rt,ZP:()=>gt,_D:()=>Pe,_e:()=>Xe,aR:()=>Qe,bc:()=>ot,bx:()=>ct,cn:()=>Je,cw:()=>at,dC:()=>ze,hX:()=>qe,k5:()=>lt,mM:()=>ft,nl:()=>st,oV:()=>We,pD:()=>Ye,pJ:()=>Ke,qP:()=>Fe,tD:()=>Te,vF:()=>pt,vO:()=>je,xM:()=>et,xN:()=>$e,xY:()=>tt});var r,o=n("lSNA"),i=n.n(o),a=n("q1tI"),s=(n("17x9"),n("LIP8")),u=n("zlhT"),c=n("bKxj"),l=n("cm4R"),d=n("oQAB"),p=n("W2Km"),f=n("+bYW"),h=n("E26J"),m=n("RR26"),g=n("mTeM"),v=n("9rDl"),y=n("Ong1"),b=n("2EgE"),_=n("48gD"),w=n("Kq7B"),C=n("ZzMC"),S=n("KSiv"),E=n("UnHz"),k=n("q+rE"),I=n("tvbO"),A=n("hgjJ"),x=n("itUK"),L=n("Hcjj"),O=n("mS1k"),M=n("b+lL"),T=n("9QYi"),D=n("Mqsr"),P=n("bqfi"),R=n("W2qF"),N=n("9EHW"),F=n("JBHi"),j=n("YoLE"),U=n("j2tg"),Z=n("sNlm"),B=n("sQmG"),z=n("TdvE"),H=n("Db/G"),V=n("MV8M"),q=n("V8ye"),W=n("9ddI"),$=n("cV1V"),G=n("vmSy"),Y=n("BDwu"),K=n("Jirj"),J=n("WPZh"),X=n("VbIn"),Q=n("Nao7"),ee=n("PHJn"),te=n("2TtJ"),ne=n("hKSo"),re=n("ZGQl"),oe=n("f4uB"),ie=n("iLkd"),ae=n("bEQo"),se=n("ezFK"),ue=n("WocK"),ce=n("2RiA"),le=n("YXYn"),de=n("/rK7"),pe=n("B0fn"),fe=n("TwEr"),he=n("xLMs"),me=n("Yw8D"),ge=n("yp4g"),ve=n("8qYt"),ye=n("duvn"),be=n("/Dry"),_e=n("AVwm"),we=n("YpSv"),Ce=n("aFZY"),Se=n("SwLE"),Ee=n("7+j0"),ke=n("xFcc"),Ie=n("Rkq/"),Ae=n("e/Vt"),xe=n("GuHx"),Le=n("8cMy"),Oe=n("FlP4"),Me="new-post",Te="new-meme",De="open-arcade",Pe="settings",Re="sign-out",Ne="eye",Fe="points",je="ellipsis",Ue="chat-filled",Ze="waterfall",Be="uniform",ze="play",He="plus",Ve="pause",qe="arrow-up",We="close-toast",$e="check",Ge="close-black",Ye="close-outline",Ke="chat-bold",Je="upload-files",Xe="upload-add",Qe="upload-delete",et="upload-download",tt="upload-embed",nt="upload-rearrange",rt="upload-rearrange-active",ot="image-url-copied",it="icon-photo",at="iconChevronDown",st="iconNoComments",ut="iconFilter",ct="imgEmeraldHeroSmall",lt="imgEmeraldHeart",dt="iconNotificationPost",pt="iconNotificationFollow",ft="iconNotificationComment",ht="iconNotificationReply",mt=(r={},i()(r,Me,u),i()(r,Te,c),i()(r,De,l),i()(r,"notification-dot",d),i()(r,Pe,p),i()(r,Re,f),i()(r,Ne,h),i()(r,"imgur-white",v),i()(r,Fe,m),i()(r,"twitter",y),i()(r,"facebook",b),i()(r,Ue,_),i()(r,Ze,w.Z),i()(r,Be,C.Z),i()(r,ze,S),i()(r,Ve,E),i()(r,He,k),i()(r,"award",I),i()(r,"star",A),i()(r,"whale",x),i()(r,"arrow-half-circle",L),i()(r,"cat",O),i()(r,"tail",M),i()(r,qe,T),i()(r,"iconCopy",D),i()(r,"close",R),i()(r,We,s),i()(r,$e,q),i()(r,Ge,N),i()(r,Ye,F),i()(r,Ke,P),i()(r,Je,j),i()(r,Xe,U),i()(r,Qe,Z),i()(r,et,B),i()(r,tt,z),i()(r,nt,H),i()(r,rt,V),i()(r,"iconFacebookRound",Y),i()(r,"iconLinkedInRound",W),i()(r,"iconTwitterRound",$),i()(r,"iconRedditRound",G),i()(r,ot,K),i()(r,it,J),i()(r,at,X),i()(r,st,Q),i()(r,"iconNSFWWall",ee),i()(r,je,g),i()(r,ut,te),i()(r,"imgEmeraldHero",ne),i()(r,ct,re),i()(r,"imgEmeraldAdfree",oe),i()(r,"imgEmeraldAdfreeShadow",ie),i()(r,"imgEmeraldCoil",ae),i()(r,"imgEmeraldCoilLogo",se),i()(r,"imgEmeraldSupport",ue),i()(r,lt,ce),i()(r,"imgEmeraldAvatars",le),i()(r,"imgEmeraldTrophy",de),i()(r,"imgEmeraldAccolades",pe),i()(r,"imgEmeraldAllAccolades",fe),i()(r,"imgEmeraldExclusive",he),i()(r,"imgEmeraldConfetti",me),i()(r,"imgAvatarToaster",ge),i()(r,"imgAvatarAlien",ve),i()(r,"imgAvatarPeanutButter",ye),i()(r,"imgNoAds",_e),i()(r,"imgAvatars",we),i()(r,"imgAccolades",be),i()(r,"iconPopUpUpvote",Ce),i()(r,"iconPopUpDownvote",Se),i()(r,"iconPopUpFavorite",Ee),i()(r,"iconPopUpReply",ke),i()(r,dt,Ie),i()(r,pt,Ae),i()(r,ft,xe),i()(r,ht,Le),i()(r,"iconPopUpFollowing",Oe),r);function gt(e){var t=e.name,n=e.className,r=e.width,o=e.setRef,i=mt[t];return a.createElement("img",{className:"".concat(t).concat(n?" ".concat(n):""),src:i,width:r,ref:o})}gt.__docgenInfo={description:"",methods:[],displayName:"Image",props:{name:{type:{name:"string"},required:!0,description:""},className:{type:{name:"string"},required:!1,description:""},width:{type:{name:"number"},required:!1,description:""},setRef:{type:{name:"object"},required:!1,description:""}}}},ZzMC:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n("q1tI");const o=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"17",height:"17"},r.createElement("rect",{id:"backgroundrect",width:"100%",height:"100%",x:"0",y:"0",fill:"none",stroke:"none"}),r.createElement("g",null,r.createElement("g",null,r.createElement("g",null,r.createElement("polygon",{points:"6.17870715566179,0 1.1573245256338325,0 0.15306144952774048,0 0.15306144952774048,1.0042672515679527 0.15306144952774048,6.0256540079346905 0.15306144952774048,7.02991762439467 1.1573245256338325,7.02991762439467 6.17870715566179,7.02991762439467 7.18298727747689,7.02991762439467 7.18298727747689,6.0256540079346905 7.18298727747689,1.0042672515679527 7.18298727747689,0 "}))),r.createElement("g",null,r.createElement("g",null,r.createElement("polygon",{points:"6.278707504272461,10 1.25732421875,10 0.25306129455566406,10 0.25306129455566406,11.004266738891602 0.25306129455566406,16.025653839111328 0.25306129455566406,17.029918670654297 1.25732421875,17.029918670654297 6.278707504272461,17.029918670654297 7.282987594604492,17.029918670654297 7.282987594604492,16.025653839111328 7.282987594604492,11.004266738891602 7.282987594604492,10 "}))),r.createElement("g",null,r.createElement("g",null,r.createElement("polygon",{points:"15.978708267211914,9.900003053247929 10.957324981689453,9.900003053247929 9.953062057495117,9.900003053247929 9.953062057495117,10.90426979213953 9.953062057495117,15.925656892359257 9.953062057495117,16.929921723902225 10.957324981689453,16.929921723902225 15.978708267211914,16.929921723902225 16.982988357543945,16.929921723902225 16.982988357543945,15.925656892359257 16.982988357543945,10.90426979213953 16.982988357543945,9.900003053247929 "}))),r.createElement("g",null,r.createElement("g",null,r.createElement("polygon",{points:"15.878707885742188,-0.10000000149011612 10.857324600219727,-0.10000000149011612 9.85306167602539,-0.10000000149011612 9.85306167602539,0.9042667374014854 9.85306167602539,5.925653837621212 9.85306167602539,6.929918669164181 10.857324600219727,6.929918669164181 15.878707885742188,6.929918669164181 16.88298797607422,6.929918669164181 16.88298797607422,5.925653837621212 16.88298797607422,0.9042667374014854 16.88298797607422,-0.10000000149011612 "})))))},Kq7B:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n("q1tI");const o=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"17"},r.createElement("rect",{id:"backgroundrect",width:"100%",height:"100%",x:"0",y:"0",fill:"none",stroke:"none"}),r.createElement("g",null,r.createElement("g",null,r.createElement("g",{id:"svg_10"},r.createElement("polygon",{points:"6.178707122802734,0 1.1573245525360107,0 0.15306150913238525,0 0.15306150913238525,1.2756938815360286 0.15306150913238525,7.654227611753868 0.15306150913238525,8.929917633937634 1.1573245525360107,8.929917633937634 6.178707122802734,8.929917633937634 7.182987213134766,8.929917633937634 7.182987213134766,7.654227611753868 7.182987213134766,1.2756938815360286 7.182987213134766,0 "}))),r.createElement("g",null,r.createElement("g",{id:"svg_34"},r.createElement("polygon",{points:"6.278707504272461,12.099999867934457 1.25732421875,12.099999867934457 0.25306129455566406,12.099999867934457 0.25306129455566406,12.804268837391646 0.25306129455566406,16.325651648036 0.25306129455566406,17.029918670654297 1.25732421875,17.029918670654297 6.278707504272461,17.029918670654297 7.282987594604492,17.029918670654297 7.282987594604492,16.325651648036 7.282987594604492,12.804268837391646 7.282987594604492,12.099999867934457 "}))),r.createElement("g",null,r.createElement("g",{id:"svg_38"},r.createElement("polygon",{points:"15.978708267211914,8.100003717719119 10.957324981689453,8.100003717719119 9.953062057495117,8.100003717719119 9.953062057495117,9.361411389385012 9.953062057495117,15.66851682793822 9.953062057495117,16.929922103881836 10.957324981689453,16.929922103881836 15.978708267211914,16.929922103881836 16.982988357543945,16.929922103881836 16.982988357543945,15.66851682793822 16.982988357543945,9.361411389385012 16.982988357543945,8.100003717719119 "}))),r.createElement("g",null,r.createElement("g",null,r.createElement("polygon",{points:"15.878707885742188,-0.10000000149011612 10.857324600219727,-0.10000000149011612 9.85306167602539,-0.10000000149011612 9.85306167602539,0.6185544841542594 9.85306167602539,4.2113652655988005 9.85306167602539,4.929918346846392 10.857324600219727,4.929918346846392 15.878707885742188,4.929918346846392 16.88298797607422,4.929918346846392 16.88298797607422,4.2113652655988005 16.88298797607422,0.6185544841542594 16.88298797607422,-0.10000000149011612 "})))))},f6HO:(e,t,n)=>{"use strict";n.d(t,{Z:()=>y});var r=n("pVnL"),o=n.n(r),i=n("lSNA"),a=n.n(i),s=n("QILm"),u=n.n(s),c=n("q1tI"),l=(n("17x9"),n("/MKj")),d=n("TSYQ"),p=n.n(d),f=n("ucDD"),h=n("of7O"),m=n("MHWf"),g=n("1q3c");function v(e){var t=e.skipOnCloseWhenExport,n=e.className,r=e.children,i=e.onClick,s=e.onOpenCallback,l=e.onCloseCallback,d=e.onExportCallback,g=e.startUpload,v=u()(e,["skipOnCloseWhenExport","className","children","onClick","onOpenCallback","onCloseCallback","onExportCallback","startUpload"]);var y=p()("MakeMeme",a()({},n,n));return c.createElement("a",o()({className:y,href:f.q,onClick:function(e){e.preventDefault(),i();var n="".concat((0,m.Jz)()).concat((0,m.zp)()).concat((0,m.FK)());(0,m.lO)(null,"",f.q),h.Z.openPopup(s,(function(){l(),(0,m.lO)(null,"",n)}),(function(e,t){d(e,t),g({files:[e],isMeme:!0})}),{},t)}},v),r)}v.defaultProps={skipOnCloseWhenExport:!1,className:"",onClick:function(){},onOpenCallback:function(){},onCloseCallback:function(){},onExportCallback:function(){}},v.__docgenInfo={description:"",methods:[],displayName:"MakeMeme",props:{skipOnCloseWhenExport:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},className:{defaultValue:{value:"''",computed:!1},type:{name:"string"},required:!1,description:""},onClick:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},onOpenCallback:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},onCloseCallback:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},onExportCallback:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},children:{type:{name:"node"},required:!0,description:""},startUpload:{type:{name:"func"},required:!0,description:""}}};const y=(0,l.$j)(null,{startUpload:g.z1})(v)},"CG/J":(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n("q1tI"),o=(n("17x9"),n("puhG")),i=r.createElement("svg",{className:"Grid-ad-arrow",width:"10px",height:"10px",viewBox:"0 -2 7 8"},r.createElement("g",{id:"Ad-UX",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},r.createElement("g",{transform:"translate(-1067.000000, -405.000000)",fill:"#2C2F34"},r.createElement("g",{transform:"translate(1066.000000, 405.000000)"},r.createElement("g",{id:"Layer_1"},r.createElement("rect",{id:"Rectangle-path",transform:"translate(3.602175, 3.397824) rotate(225.000000) translate(-3.602175, -3.397824) ",x:"2.85931752",y:"0.426395641",width:"1.48571433",height:"5.9428573"}),r.createElement("polygon",{id:"Shape",points:"6.97142857 5.22857143 5.48571429 5.22857143 5.48571429 1.51428571 1.77142857 1.51428571 1.77142857 0.0285714286 6.97142857 0.0285714286"}))))));function a(e){var t=e.isThumbnailAd,n=e.isPromotedAd,a=e.imagesCount,s=e.metaLabel,u=e.isInteractiveAd,c=e.isFastGridAd;return r.createElement("div",{className:"Post-item-meta"},s&&!u&&r.createElement("div",{className:"Post-item-image-video"},s),u&&r.createElement("div",{className:"Post-item-interactive-ad"},r.createElement("span",{className:"Post-item-pulse"})," ",(0,o.Z)("interactiveText")),n&&r.createElement("div",{className:"Post-item-external-ad"},(0,o.Z)("promotedText")),(t||c)&&r.createElement("div",{className:"Post-item-external-ad"},"ad",i),!t&&!n&&!c&&a>1&&r.createElement("div",{className:"Post-item-image-count"},(0,o.Z)("imagesCountPrefix"),a.toLocaleString()))}a.__docgenInfo={description:"",methods:[],displayName:"Meta",props:{isThumbnailAd:{type:{name:"bool"},required:!1,description:""},isPromotedAd:{type:{name:"bool"},required:!1,description:""},isInteractiveAd:{type:{name:"bool"},required:!1,description:""},isFastGridAd:{type:{name:"bool"},required:!1,description:""},imagesCount:{type:{name:"number"},required:!1,description:""},metaLabel:{type:{name:"string"},required:!1,description:""}}};const s=a},"7frn":(e,t,n)=>{"use strict";n.d(t,{H:()=>c,i:()=>l});var r=n("J4zp"),o=n.n(r),i=n("q1tI"),a=n("s/Ur"),s=n("q2T8"),u=n("A+av"),c=function(e){var t=e.children,n=e.width,r=void 0===n?u.FN:n,c=(0,i.useState)(!s.yh),l=o()(c,2),d=l[0],p=l[1],f=function(e,t){return(0,a.useMediaQuery)({query:"(min-width: ".concat(e,"px)")},t?void 0:{width:s.bZ})}(r,d);return(0,i.useEffect)((function(){p(!0)}),[]),f?t:null},l=function(e){var t=e.children,n=e.width,r=void 0===n?u.cp:n,c=(0,i.useState)(!s.yh),l=o()(c,2),d=l[0],p=l[1],f=function(e,t){return(0,a.useMediaQuery)({query:"(max-width: ".concat(e,"px)")},t?void 0:{width:s.bZ})}(r,d);return(0,i.useEffect)((function(){p(!0)}),[]),f?t:null}},RmIA:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n("RIqP"),o=n.n(r),i=n("q1tI"),a=(n("17x9"),n("NSLs"));n("zcUC");function s(e){var t=e.startUpload,n=e.children;return i.createElement("div",{className:"UploadFiles"},i.createElement("input",{id:"file-input",className:"UploadFiles-fileInput",type:"file",name:"files",multiple:!0,accept:a.Hi,onChange:function(e){t({files:o()(e.target.files)})},tabIndex:"".concat(a.QS,"1")}),i.createElement("label",{htmlFor:"file-input",className:"UploadFiles-filePicker"},n))}s.__docgenInfo={description:"",methods:[],displayName:"UploadFiles",props:{startUpload:{type:{name:"func"},required:!0,description:""},children:{type:{name:"node"},required:!1,description:""}}}},D1bG:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n("q1tI"),o=(n("17x9"),n("/MKj")),i=n("TSYQ"),a=n.n(i),s=n("4ELA"),u=n("mOu4"),c=n("5bgp"),l=n("+qrI");function d(e){var t=e.closeDialog,n=e.name,o=e.head,i=e.children,l=e.className,d=e.onClose,p=e.isModal,f=void 0!==p&&p,h=e.isCloseButton,m=void 0===h||h;return r.createElement(s.U,{className:a()("CommonUploadDialog",l),name:n,isModal:f},r.createElement("div",{className:"CommonUploadDialog-head"},r.createElement("span",null,o),m&&r.createElement(c.zx,{className:"CommonUploadDialog-head--close",imageSrc:u.UZ[u.oV],onClick:d||t})),i)}d.__docgenInfo={description:"",methods:[],displayName:"CommonUploadDialog",props:{isModal:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},isCloseButton:{defaultValue:{value:"true",computed:!1},type:{name:"bool"},required:!1,description:""},closeDialog:{type:{name:"func"},required:!0,description:""},onClose:{type:{name:"func"},required:!1,description:""},children:{type:{name:"instanceOf",value:"Object"},required:!1,description:""},name:{type:{name:"string"},required:!0,description:""},head:{type:{name:"string"},required:!0,description:""},className:{type:{name:"string"},required:!0,description:""}}};const p=(0,o.$j)(null,(function(e){return{closeDialog:function(){return e((0,l.gk)())}}}))(d)},"5bgp":(e,t,n)=>{"use strict";n.d(t,{ZP:()=>c,m6:()=>d,zx:()=>l});var r=n("lSNA"),o=n.n(r),i=n("q1tI"),a=(n("17x9"),n("TSYQ")),s=n.n(a),u=n("c08G");n("4Ae5");function c(e){var t=e.className,n=e.label,r=e.title,a=e.href,u=e.target,c=e.imageSrc,l=e.image,d=e.onClick,p=s()(o()({ButtonLink:!0},t,t));return i.createElement("a",{className:p,title:r,href:a,target:u,onClick:d},c&&i.createElement("img",{src:c}),l,i.createElement("span",{className:"Button-label"},n))}function l(e){var t=e.className,n=e.label,r=e.imageSrc,a=e.onClick,u=e.tabIndex,c=e.disabled,l=s()(o()({Button:!0},t,t));return i.createElement("button",{type:"submit",className:l,title:n,onClick:a,tabIndex:u,disabled:c},r&&i.createElement("img",{src:r}),i.createElement("span",{className:"Button-label"},n))}function d(e){var t=e.className,n=e.spinColor,r=e.label,a=e.imageSrc,c=e.onClick,l=e.isLoading,d=e.isDisabled,p=e.size,f=s()(o()({Button:!0,"Button-spin":!0},t,t)),h={visibility:l?"hidden":"visible"},m={borderTop:"2px solid rgba(".concat(n,", 0.8)")};return i.createElement("button",{type:"submit",className:f,title:r,onClick:c,disabled:l||d},l&&i.createElement(u.AR,{style:m,className:"Button--spinner",size:p}),a&&i.createElement("img",{style:h,src:a}),i.createElement("span",{style:h,className:"Button-label"},r))}c.defaultProps={className:""},l.defaultProps={className:"",disabled:!1},d.defaultProps={spinColor:"255, 255, 255",size:20},c.__docgenInfo={description:"",methods:[],displayName:"ButtonLink",props:{className:{defaultValue:{value:"''",computed:!1},type:{name:"string"},required:!1,description:""},target:{type:{name:"string"},required:!1,description:""},href:{type:{name:"string"},required:!1,description:""},label:{type:{name:"string"},required:!1,description:""},title:{type:{name:"string"},required:!1,description:""},imageSrc:{type:{name:"string"},required:!1,description:""},onClick:{type:{name:"func"},required:!1,description:""},image:{type:{name:"object"},required:!1,description:""}}},l.__docgenInfo={description:"",methods:[],displayName:"Button",props:{className:{defaultValue:{value:"''",computed:!1},type:{name:"string"},required:!1,description:""},disabled:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},label:{type:{name:"string"},required:!1,description:""},imageSrc:{type:{name:"string"},required:!1,description:""},onClick:{type:{name:"func"},required:!1,description:""},tabIndex:{type:{name:"union",value:[{name:"string"},{name:"number"}]},required:!1,description:""}}},d.__docgenInfo={description:"",methods:[],displayName:"SpinnerButton",props:{spinColor:{defaultValue:{value:"'255, 255, 255'",computed:!1},type:{name:"string"},required:!1,description:""},size:{defaultValue:{value:"20",computed:!1},type:{name:"number"},required:!1,description:""},isLoading:{type:{name:"bool"},required:!1,description:""},isDisabled:{type:{name:"bool"},required:!1,description:""},className:{type:{name:"string"},required:!1,description:""},label:{type:{name:"string"},required:!1,description:""},imageSrc:{type:{name:"string"},required:!1,description:""},onClick:{type:{name:"func"},required:!1,description:""}}}},"4ELA":(e,t,n)=>{"use strict";n.d(t,{U:()=>a});var r=n("/MKj"),o=n("6xA/"),i=(n("08b7"),n("+qrI"));var a=(0,r.$j)((function(e,t){var n=e.ui,r=t.name;return{isOpen:r&&n.dialog.get("dialogName")===r}}),{onMount:i.z0,close:i.gk})(o.Z)},"08b7":(e,t,n)=>{"use strict";var r=n("/MKj"),o=n("+qrI"),i=n("TwSZ");(0,r.$j)(null,(function(e){return{onClose:function(){e((0,o.gk)())}}}))(i.Z)},Ktyt:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n("q1tI"),o=(n("17x9"),n("/MKj")),i=function(e,t){return function(n){return(0,o.$j)(function(e){return function(t){return{moduleState:t.modules.get(e),isReducerReady:!!t[e]}}}(e))((function(e){return e.moduleState===t&&e.isReducerReady?r.createElement(n,e):null}))}}},c08G:(e,t,n)=>{"use strict";n.d(t,{AR:()=>_,OR:()=>w,ZP:()=>E,Zh:()=>S,dC:()=>C});var r=n("pVnL"),o=n.n(r),i=n("lwsE"),a=n.n(i),s=n("W8MJ"),u=n.n(s),c=n("7W2i"),l=n.n(c),d=n("a1gu"),p=n.n(d),f=n("Nsbk"),h=n.n(f),m=n("q1tI"),g=(n("17x9"),n("/MKj")),v=n("puhG"),y=n("S2q1");n("PN/Z");function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}function _(e){var t=e.size,n=e.className,r=e.style,o="Spinner-spinner is".concat(t,"px ").concat(n);return m.createElement("div",{style:r,className:o})}function w(e){var t=e.model,n=e.applyStyle,r=e.status,o=e.size,i=e.messages;return m.createElement("div",{className:"Spinner",style:n},r.loading&&m.createElement(_,{size:o}),i&&r.loadFail&&m.createElement("p",{className:"Spinner-message"},(0,v.Z)("loadFail",t)),i&&!r.loading&&!r.loadFail&&m.createElement("p",{className:"Spinner-message"},(0,v.Z)("noDataAvailable",t)))}w.defaultProps={applyStyle:{},status:{},size:30,messages:!1};var C=function(e){return function(t){var n=function(n){l()(i,n);var r=b(i);function i(){return a()(this,i),r.apply(this,arguments)}return u()(i,[{key:"render",value:function(){var n=this.props.status;return n.loading||n.loadFail?m.createElement(w,o()({messages:!0,model:e},this.props)):m.createElement(t,this.props)}}]),i}(m.Component);return n.defaultProps={status:{}},(0,g.$j)(function(e){return function(t){return{status:t.ui.spinner.get(e)}}}(e))(n)}};function S(e){var t=e.children,n=e.isLoading,r=e.isScrollSpinner,o=m.createElement(_,{size:y.$initialSpinnerSize});return m.createElement(m.Fragment,null,n&&!r&&m.createElement("div",{className:"Spinner-initial"},o),m.createElement("div",{className:"Spinner-contentWrapper"},t),n&&r&&m.createElement("div",{className:"Spinner-scroll"},o))}w.__docgenInfo={description:"",methods:[],displayName:"SpinnerComponent",props:{applyStyle:{defaultValue:{value:"{}",computed:!1},type:{name:"object"},required:!1,description:""},status:{defaultValue:{value:"{}",computed:!1},type:{name:"shape",value:{loading:{name:"bool",required:!1},loadFail:{name:"bool",required:!1}}},required:!1,description:""},size:{defaultValue:{value:"30",computed:!1},type:{name:"number"},required:!1,description:""},messages:{defaultValue:{value:"false",computed:!1},type:{name:"bool"},required:!1,description:""},model:{type:{name:"string"},required:!0,description:""}}};const E=(0,g.$j)((function(e,t){return{status:e.ui.spinner.get(t.model)}}))(w);_.__docgenInfo={description:"",methods:[],displayName:"RawSpinner",props:{size:{type:{name:"number"},required:!1,description:""},className:{type:{name:"string"},required:!1,description:""},style:{type:{name:"object"},required:!1,description:""}}},S.__docgenInfo={description:"",methods:[],displayName:"SpinnerWrapper",props:{children:{type:{name:"object"},required:!0,description:""},isLoading:{type:{name:"bool"},required:!1,description:""},isScrollSpinner:{type:{name:"bool"},required:!1,description:""}}}},cKeR:(e,t,n)=>{"use strict";n.d(t,{JZ:()=>s,gA:()=>u,rs:()=>c});var r=n("lSNA"),o=n.n(r),i=n("q1tI");n("17x9");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(){return null}function u(){return null}function c(e){var t=e.value,n=e.children;return i.createElement(i.Fragment,null,i.Children.toArray(n).reduce((function(e,n){return i.isValidElement(e)||!i.isValidElement(n)?e:t===n.props.match||n.type===u?i.createElement(n.props.Component,function(e){for(var t=1;t{"use strict";n.d(t,{Z:()=>f});var r=n("q1tI"),o=(n("17x9"),n("TSYQ")),i=n.n(o),a=n("zN0V"),s=n("CI2m"),u=n("KE22"),c=n("HMNm"),l=n("mOu4"),d=n("jCHX");n("0bZe");function p(e){var t=e.get("action");if(!t)return"";var n=t.replace("imgur://","https://");return{pathname:new URL(n).pathname,search:"?nid=".concat(e.get("id")),state:{accoladeConfetti:e.get("type")===s.Fr,hash:e.getIn(["post_definition","post_hash"])}}}function f(e){var t=e.notification,n=e.onClick;if(!t)return null;var o=new Date(1e3*t.get("updated_at")),f=t.getIn(["image","url"]),h=i()({"NotificationCard-thumb":!0,isUnread:t.get("state")!==s.ik});return r.createElement(c.Z,{to:p(t),className:"NotificationCard",onClick:n},r.createElement("div",{className:h},r.createElement("img",{className:"NotificationCard-dot",src:f}),r.createElement("div",{className:"NotificationCard-icon"},r.createElement(l.ZP,{name:(0,u.FQ)(t.get("type"))}))),r.createElement(d.Z,{notification:t}),r.createElement(a.Z,{className:"When--notificationCard",date:o}))}f.defaultProps={onClick:function(){}},f.__docgenInfo={description:"",methods:[],displayName:"NotificationCard",props:{onClick:{defaultValue:{value:"() => {}",computed:!1},type:{name:"func"},required:!1,description:""},notification:{type:{name:"object"},required:!1,description:""}}}},jCHX:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n("q1tI");n("17x9"),n("KMx9");function o(e){var t=e.notification;if(!t)return null;var n,o=[],i=t.get("text"),a=t.get("id"),s=0,u="",c="",l=[];return t.getIn(["annotations","mention"]).forEach((function(e){l=e.get("indices"),u=i.substr(s,l.get(0)),c=i.substr(l.get(0),l.get(1)-l.get(0)),o.push(r.createElement("span",{key:"".concat(u,"-").concat(a)},u)),o.push(r.createElement("strong",{className:"NotificationCardText-annotation",key:"".concat(c,"-").concat(a)},c)),s=l.get(1)})),n=i.substr(s),o.push(r.createElement("span",{key:"".concat(n,"-").concat(a)},n)),r.createElement("div",{className:"NotificationCardText"},o)}o.__docgenInfo={description:"",methods:[],displayName:"NotificationCardText",props:{notification:{type:{name:"object"},required:!1,description:""}}}},ogfH:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n("pVnL"),o=n.n(r),i=n("J4zp"),a=n.n(i),s=n("q1tI"),u=n("s/Ur"),c=n("q2T8"),l=n("A+av"),d=function(e){return(0,u.useMediaQuery)({query:"(max-width: ".concat(l.cp,"px)")},e?void 0:{width:c.bZ})};function p(e){return function(t){var n=(0,s.useState)(!c.yh),r=a()(n,2),i=r[0],u=r[1],l=d(i);return(0,s.useEffect)((function(){u(!0)}),[]),s.createElement(e,o()({},t,{isMobile:l,isDesktop:!l}))}}},"/Y/P":(e,t,n)=>{"use strict";var r=n("lSNA"),o=n.n(r),i=n("q1tI"),a=n("EbEg"),s=n("/MKj"),u=n("jcVq"),c=n("I890"),l=n("Janf"),d=n("MHWf"),p=n("RnMR");function f(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const h=globalThis;function m(e,t,n){const r=n||h,o=r.__SENTRY__=r.__SENTRY__||{};return o[e]||(o[e]=t())}const g=1e3;function v(){return Date.now()/g}const y=function(){const{performance:e}=h;if(!e||!e.now)return v;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/g}();let b;const _=(()=>{const{performance:e}=h;if(!e||!e.now)return void(b="none");const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=o{const r=S[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}const k=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return w?C.forEach((n=>{t[n]=(...t)=>{e&&E((()=>{h.console[n](`Sentry Logger [${n}]:`,...t)}))}})):C.forEach((e=>{t[e]=()=>{}})),t}();function I(){return A(h),h}function A(e){return e.__SENTRY__||(e.__SENTRY__={extensions:{}}),e.__SENTRY__}const x=Object.prototype.toString;function L(e){switch(x.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return U(e,Error)}}function O(e,t){return x.call(e)===`[object ${t}]`}function M(e){return O(e,"ErrorEvent")}function T(e){return O(e,"DOMError")}function D(e){return O(e,"String")}function P(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function R(e){return null===e||P(e)||"object"!=typeof e&&"function"!=typeof e}function N(e){return O(e,"Object")}function F(e){return"undefined"!=typeof Event&&U(e,Event)}function j(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function U(e,t){try{return e instanceof t}catch(e){return!1}}function Z(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const B=h,z=80;function H(e,t={}){if(!e)return"";try{let n=e;const r=5,o=[];let i=0,a=0;const s=" > ",u=s.length;let c;const l=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||z;for(;n&&i++1&&a+o.length*u+c.length>=d));)o.push(c),a+=c.length,n=n.parentNode;return o.reverse().join(s)}catch(e){return""}}function V(e,t){const n=e,r=[];let o,i,a,s,u;if(!n||!n.tagName)return"";if(B.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const c=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(c&&c.length)c.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&D(o))for(i=o.split(/\s+/),u=0;uG(e,t,n)))}function K(e,t,n){if(!(t in e))return;const r=e[t],o=n(r);"function"==typeof o&&X(o,r),e[t]=o}function J(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){w&&k.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function X(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,J(e,"__sentry_original__",t)}catch(e){}}function Q(e){return e.__sentry_original__}function ee(e){if(L(e))return{message:e.message,name:e.name,stack:e.stack,...ne(e)};if(F(e)){const t={type:e.type,target:te(e.target),currentTarget:te(e.currentTarget),...ne(e)};return"undefined"!=typeof CustomEvent&&U(e,CustomEvent)&&(t.detail=e.detail),t}return e}function te(e){try{return t=e,"undefined"!=typeof Element&&U(t,Element)?H(e):Object.prototype.toString.call(e)}catch(e){return""}var t}function ne(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 re(e){return oe(e,new Map)}function oe(e,t){if(function(e){if(!N(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))void 0!==e[n]&&(r[n]=oe(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(oe(e,t))})),r}return e}function ie(){const e=h,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function ae(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function se(e){const{message:t,event_id:n}=e;if(t)return t;const r=ae(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function ue(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function ce(e,t){const n=ae(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function le(e){if(e&&e.__sentry_captured__)return!0;try{J(e,"__sentry_captured__",!0)}catch(e){}return!1}function de(e){return Array.isArray(e)?e:[e]}function pe(e){const t=y(),n={sid:ie(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return re({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,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&fe(n,e),n}function fe(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||y(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:ie()),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)}const he="_sentrySpan";function me(e,t){t?J(e,he,t):delete e[he]}function ge(e){return e[he]}class ve{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=be()}clone(){const e=new ve;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,me(e,ge(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&fe(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}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof ye?[t.getScopeData(),t.getRequestSession()]:N(t)?[e,e.requestSession]:[],{tags:o,extra:i,user:a,contexts:s,level:u,fingerprint:c=[],propagationContext:l}=n||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...s},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),c.length&&(this._fingerprint=c),l&&(this._propagationContext=l),r&&(this._requestSession=r),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._session=void 0,me(this,void 0),this._attachments=[],this._propagationContext=be(),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:v(),...e},o=this._breadcrumbs;return o.push(r),this._breadcrumbs=o.length>n?o.slice(-n):o,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}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ge(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:ie();if(!this._client)return k.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:ie();if(!this._client)return k.warn("No client configured on scope - will not capture message!"),r;const o=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:ie();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(k.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const ye=ve;function be(){return{traceId:ie(),spanId:ie().substring(16)}}class _e{constructor(e,t){let n,r;n=e||new ye,r=t||new ye,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return j(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}_popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}}function we(){const e=A(I());return e.hub||(e.hub=new _e(m("defaultCurrentScope",(()=>new ye)),m("defaultIsolationScope",(()=>new ye)))),e.hub}function Ce(e){return we().withScope(e)}function Se(e,t){const n=we();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function Ee(e){return we().withScope((()=>e(we().getIsolationScope())))}function ke(e){const t=A(e);return t.acs?t.acs:{withIsolationScope:Ee,withScope:Ce,withSetScope:Se,withSetIsolationScope:(e,t)=>Ee(t),getCurrentScope:()=>we().getScope(),getIsolationScope:()=>we().getIsolationScope()}}function Ie(){return ke(I()).getCurrentScope()}function Ae(){return ke(I()).getIsolationScope()}function xe(...e){const t=ke(I());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function Le(){return Ie().getClient()}const Oe=100;function Me(e,t){const n=Le(),r=Ae();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Oe}=n.getOptions();if(i<=0)return;const a={timestamp:v(),...e},s=o?E((()=>o(a,t))):a;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,i))}function Te(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(e,n)||function(e,t){if(!t)return!1;return De(e)===De(t)}(e,r)}function De(e){return"/"===e[e.length-1]?e.slice(0,-1):e}const Pe="production";const Re=50,Ne="?",Fe=/\(error: (.*)\)/,je=/captureMessage|captureException/;function Ue(...e){const t=e.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(e,n=0,r=0)=>{const o=[],i=e.split("\n");for(let e=n;e1024)continue;const a=Fe.test(n)?n.replace(Fe,"$1"):n;if(!a.match(/\S*Error: /)){for(const e of t){const t=e(a);if(t){o.push(t);break}}if(o.length>=Re+r)break}}return function(e){if(!e.length)return[];const t=Array.from(e);/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop();t.reverse(),je.test(t[t.length-1].function||"")&&(t.pop(),je.test(t[t.length-1].function||"")&&t.pop());return t.slice(0,Re).map((e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||Ne})))}(o.slice(r))}}const Ze="";function Be(e){try{return e&&"function"==typeof e&&e.name||Ze}catch(e){return Ze}}function ze(e,t=100,n=1/0){try{return Ve("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function He(e,t=3,n=102400){const r=ze(e,t);return o=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(o))>n?He(e,t-1,n):r;var o}function Ve(e,t,n=1/0,r=1/0,o=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=r){l[e]="[MaxProperties ~]";break}const t=p[e];l[e]=Ve(e,t,u-1,r,o),d++}return a(t),l}var qe;function We(e){return new Ge((t=>{t(e)}))}function $e(e){return new Ge(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(qe||(qe={}));class Ge{constructor(e){Ge.prototype.__init.call(this),Ge.prototype.__init2.call(this),Ge.prototype.__init3.call(this),Ge.prototype.__init4.call(this),this._state=qe.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new Ge(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new Ge(((t,n)=>{let r,o;return this.then((t=>{o=!1,r=t,e&&e()}),(t=>{o=!0,r=t,e&&e()})).then((()=>{o?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(qe.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(qe.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{this._state===qe.PENDING&&(j(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===qe.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===qe.RESOLVED&&e[1](this._value),this._state===qe.REJECTED&&e[2](this._value),e[0]=!0)}))}}}const Ye="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function Ke(e,t,n,r=0){return new Ge(((o,i)=>{const a=e[r];if(null===t||"function"!=typeof a)o(t);else{const s=a({...t},n);Ye&&a.id&&null===s&&k.log(`Event processor "${a.id}" dropped event`),j(s)?s.then((t=>Ke(e,t,n,r+1).then(o))).then(null,i):Ke(e,s,n,r+1).then(o).then(null,i)}}))}const Je="sentry.source",Xe="sentry.sample_rate",Qe="sentry.op",et="sentry.origin",tt="sentry.idle_span_finish_reason",nt="sentry.measurement_unit",rt="sentry.measurement_value",ot="sentry.exclusive_time",it="baggage",at="sentry-",st=/^sentry-/,ut=8192;function ct(e){const t=function(e){if(!e||!D(e)&&!Array.isArray(e))return;if(Array.isArray(e))return e.reduce(((e,t)=>{const n=dt(t);for(const t of Object.keys(n))e[t]=n[t];return e}),{});return dt(e)}(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(st)){e[t.slice(at.length)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function lt(e){if(!e)return;return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce(((e,[t,n],r)=>{const o=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,i=0===r?o:`${e},${o}`;return i.length>ut?(w&&k.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):i}),"")}(Object.entries(e).reduce(((e,[t,n])=>(n&&(e[`${at}${t}`]=n),e)),{}))}function dt(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(e[t]=n,e)),{})}const pt=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ft(e,t){const n=function(e){if(!e)return;const t=e.match(pt);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),r=ct(t),{traceId:o,parentSpanId:i,parentSampled:a}=n||{};return n?{traceId:o||ie(),parentSpanId:i||ie().substring(16),spanId:ie().substring(16),sampled:a,dsc:r||{}}:{traceId:o||ie(),spanId:ie().substring(16)}}function ht(e=ie(),t=ie().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}let mt;function gt(e){return mt?mt.get(e):void 0}function vt(e){const t=gt(e);if(!t)return;const n={};for(const[,[e,r]]of t)n[e]||(n[e]=[]),n[e].push(re(r));return n}const yt=0,bt=1,_t=2;function wt(e,t){e.setAttribute("http.response.status_code",t);const n=function(e){if(e<400&&e>=100)return{code:bt};if(e>=400&&e<500)switch(e){case 401:return{code:_t,message:"unauthenticated"};case 403:return{code:_t,message:"permission_denied"};case 404:return{code:_t,message:"not_found"};case 409:return{code:_t,message:"already_exists"};case 413:return{code:_t,message:"failed_precondition"};case 429:return{code:_t,message:"resource_exhausted"};case 499:return{code:_t,message:"cancelled"};default:return{code:_t,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:_t,message:"unimplemented"};case 503:return{code:_t,message:"unavailable"};case 504:return{code:_t,message:"deadline_exceeded"};default:return{code:_t,message:"internal_error"}}return{code:_t,message:"unknown_error"}}(t);"unknown_error"!==n.message&&e.setStatus(n)}const Ct=1;function St(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:a,origin:s}=xt(e);return re({parent_span_id:i,span_id:t,trace_id:n,data:r,op:o,status:a,origin:s})}function Et(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=xt(e);return re({parent_span_id:r,span_id:t,trace_id:n})}function kt(e){const{traceId:t,spanId:n}=e.spanContext();return ht(t,n,Lt(e))}function It(e){return"number"==typeof e?At(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?At(e.getTime()):y()}function At(e){return e>9999999999?e/1e3:e}function xt(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:r,startTime:o,name:i,endTime:a,parentSpanId:s,status:u}=e;return re({span_id:t,trace_id:n,data:r,description:i,parent_span_id:s,start_timestamp:It(o),timestamp:It(a)||void 0,status:Ot(u),op:r[Qe],origin:r[et],_metrics_summary:vt(e)})}return{span_id:t,trace_id:n}}catch(e){return{}}}function Lt(e){const{traceFlags:t}=e.spanContext();return t===Ct}function Ot(e){if(e&&e.code!==yt)return e.code===bt?"ok":e.message||"unknown_error"}const Mt="_sentryChildSpans",Tt="_sentryRootSpan";function Dt(e,t){const n=e[Tt]||e;J(t,Tt,n),e[Mt]&&e[Mt].size<1e3?e[Mt].add(t):J(e,Mt,new Set([t]))}function Pt(e){const t=new Set;return function e(n){if(!t.has(n)&&Lt(n)){t.add(n);const r=n[Mt]?Array.from(n[Mt]):[];for(const t of r)e(t)}}(e),Array.from(t)}function Rt(e){return e[Tt]||e}function Nt(){const e=ke(I());return e.getActiveSpan?e.getActiveSpan():ge(Ie())}const Ft="_frozenDsc";function jt(e,t){J(e,Ft,t)}function Ut(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o=re({environment:n.environment||Pe,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",o),o}function Zt(e){const t=Le();if(!t)return{};const n=Ut(xt(e).trace_id||"",t),r=Rt(e);if(!r)return n;const o=r[Ft];if(o)return o;const i=xt(r),a=i.data||{},s=a[Xe];null!=s&&(n.sample_rate=`${s}`);const u=a[Je];return u&&"url"!==u&&(n.transaction=i.description),n.sampled=String(Lt(r)),t.emit("createDsc",n),n}function Bt(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;!function(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,transactionName:s}=t,u=re(n);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const c=re(r);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});const l=re(o);l&&Object.keys(l).length&&(e.user={...l,...e.user});const d=re(i);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts});a&&(e.level=a);s&&"transaction"!==e.type&&(e.transaction=s)}(e,t),r&&function(e,t){e.contexts={trace:Et(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Zt(t),...e.sdkProcessingMetadata};const n=Rt(t),r=xt(n).description;r&&!e.transaction&&"transaction"===e.type&&(e.transaction=r)}(e,r),function(e,t){e.fingerprint=e.fingerprint?de(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(e,n),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,o),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(e,i)}function zt(e,t){const{extra:n,tags:r,user:o,contexts:i,level:a,sdkProcessingMetadata:s,breadcrumbs:u,fingerprint:c,eventProcessors:l,attachments:d,propagationContext:p,transactionName:f,span:h}=t;Ht(e,"extra",n),Ht(e,"tags",r),Ht(e,"user",o),Ht(e,"contexts",i),Ht(e,"sdkProcessingMetadata",s),a&&(e.level=a),f&&(e.transactionName=f),h&&(e.span=h),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function Ht(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function Vt(e,t,n,r,o,i){const{normalizeDepth:a=3,normalizeMaxBreadth:s=1e3}=e,u={...t,event_id:t.event_id||n.event_id||ie(),timestamp:t.timestamp||v()},c=n.integrations||e.integrations.map((e=>e.name));!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:Pe);void 0===e.release&&void 0!==r&&(e.release=r);void 0===e.dist&&void 0!==o&&(e.dist=o);e.message&&(e.message=W(e.message,i));const a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=W(a.value,i));const s=e.request;s&&s.url&&(s.url=W(s.url,i))}(u,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(u,c),void 0===t.type&&function(e,t){const n=h._sentryDebugIds;if(!n)return;let r;const o=qt.get(t);o?r=o:(r=new Map,qt.set(t,r));const i=Object.keys(n).reduce(((e,o)=>{let i;const a=r.get(o);a?i=a:(i=t(o),r.set(o,i));for(let t=i.length-1;t>=0;t--){const r=i[t];if(r.filename){e[r.filename]=n[o];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=i[e.filename])}))}))}catch(e){}}(u,e.stackParser);const l=function(e,t){if(!t)return e;const n=e?e.clone():new ye;return n.update(t),n}(r,n.captureContext);n.mechanism&&ce(u,n.mechanism);const d=o?o.getEventProcessors():[],p=m("globalScope",(()=>new ye)).getScopeData();if(i){zt(p,i.getScopeData())}if(l){zt(p,l.getScopeData())}const f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),Bt(u,p);return Ke([...d,...p.eventProcessors],u,n).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 a&&a>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:ze(e.data,t,n)}})))},...e.user&&{user:ze(e.user,t,n)},...e.contexts&&{contexts:ze(e.contexts,t,n)},...e.extra&&{extra:ze(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ze(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:ze(e.data,t,n)}}))));return r}(e,a,s):e)))}const qt=new WeakMap;function Wt(e){if(e)return function(e){return e instanceof ye||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>$t.includes(e)))}(e)?{captureContext:e}:e}const $t=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Gt(e,t){return Ie().captureException(e,Wt(t))}function Yt(e,t){return Ie().captureEvent(e,t)}function Kt(e){const t=Le(),n=Ae(),r=Ie(),{release:o,environment:i=Pe}=t&&t.getOptions()||{},{userAgent:a}=h.navigator||{},s=pe({release:o,environment:i,user:r.getUser()||n.getUser(),...a&&{userAgent:a},...e}),u=n.getSession();return u&&"ok"===u.status&&fe(u,{status:"exited"}),Jt(),n.setSession(s),r.setSession(s),s}function Jt(){const e=Ae(),t=Ie(),n=t.getSession()||e.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),fe(e,n)}(n),Xt(),e.setSession(),t.setSession()}function Xt(){const e=Ae(),t=Ie(),n=Le(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Qt(e=!1){e?Jt():Xt()}function en(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;Ye&&k.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)}.`)}const tn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function nn(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:u}=e;return`${s}://${u}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${a}`}function rn(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function on(e){const t="string"==typeof e?function(e){const t=tn.exec(e);if(!t)return void E((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[n,r,o="",i,a="",s]=t.slice(1);let u="",c=s;const l=c.split("/");if(l.length>1&&(u=l.slice(0,-1).join("/"),c=l.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return rn({host:i,pass:o,path:u,projectId:c,port:a,protocol:n,publicKey:r})}(e):rn(e);if(t&&function(e){if(!w)return!0;const{port:t,projectId:n,protocol:r}=e;return!(["protocol","publicKey","host","projectId"].find((t=>!e[t]&&(k.error(`Invalid Sentry Dsn: ${t} missing`),!0)))||(n.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(r)?t&&isNaN(parseInt(t,10))&&(k.error(`Invalid Sentry Dsn: Invalid port ${t}`),1):(k.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(k.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(t))return t}function an(e,t=[]){return[e,t]}function sn(e,t){const[n,r]=e;return[n,[...r,t]]}function un(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function cn(e){return h.__SENTRY__&&h.__SENTRY__.encodePolyfill?h.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}function ln(e){const[t,n]=e;let r=JSON.stringify(t);function o(e){"string"==typeof r?r="string"==typeof e?r+e:[cn(r),e]:r.push("string"==typeof e?cn(e):e)}for(const e of n){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(ze(n))}o(e)}}return"string"==typeof r?r:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(r)}function dn(e){return[{type:"span"},e]}function pn(e){const t="string"==typeof e.data?cn(e.data):e.data;return[re({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const fn={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",feedback:"feedback",span:"span",statsd:"metric_bucket"};function hn(e){return fn[e]}function mn(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function gn(e,t,n,r){const o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:nn(r)},...o&&{trace:re({...o})}}}const vn=6e4;function yn(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function bn(e,{statusCode:t,headers:n},r=Date.now()){const o={...e},i=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(i)for(const e of i.trim().split(",")){const[t,n,,,i]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&i&&!i.split(";").includes("custom")||(o[e]=r+s);else o.all=r+s}else a?o.all=r+function(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?vn:r-t}(a,r):429===t&&(o.all=r+6e4);return o}function _n(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function wn(){return"undefined"!=typeof window&&(!_n()||void 0!==h.process&&"renderer"===h.process.type)}const Cn="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Sn=(e,t,n,r)=>{let o,i;return a=>{t.value>=0&&(a||r)&&(i=t.value-(o||0),(i||void 0===o)&&(o=t.value,t.delta=i,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},En=h,kn=()=>En.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],In=()=>{const e=kn();return e&&e.activationStart||0},An=(e,t)=>{const n=kn();let r="navigate";n&&(En.document&&En.document.prerendering||In()>0?r="prerender":En.document&&En.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-")));return{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},xn=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},Ln=e=>{const t=t=>{("pagehide"===t.type||En.document&&"hidden"===En.document.visibilityState)&&e(t)};En.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},On=e=>{let t=!1;return n=>{t||(e(n),t=!0)}};let Mn=-1;const Tn=e=>{"hidden"===En.document.visibilityState&&Mn>-1&&(Mn="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("visibilitychange",Tn,!0),removeEventListener("prerenderingchange",Tn,!0))},Dn=()=>(En.document&&Mn<0&&(Mn="hidden"!==En.document.visibilityState||En.document.prerendering?1/0:0,addEventListener("visibilitychange",Tn,!0),addEventListener("prerenderingchange",Tn,!0)),{get firstHiddenTime(){return Mn}}),Pn=e=>{En.document&&En.document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},Rn=[1800,3e3],Nn=[.1,.25],Fn=(e,t={})=>{((e,t={})=>{Pn((()=>{const n=Dn(),r=An("FCP");let o;const i=xn("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime{const n=An("CLS",0);let r,o=0,i=[];const a=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=i[0],n=i[i.length-1];o&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e])}})),o>n.value&&(n.value=o,n.entries=i,r())},s=xn("layout-shift",a);s&&(r=Sn(e,n,Nn,t.reportAllChanges),Ln((()=>{a(s.takeRecords()),r(!0)})),setTimeout(r,0))})))},jn=[100,300],Un=(e,t={})=>{Pn((()=>{const n=Dn(),r=An("FID");let o;const i=e=>{e.startTime{e.forEach(i)},s=xn("first-input",a);o=Sn(e,r,jn,t.reportAllChanges),s&&Ln(On((()=>{a(s.takeRecords()),s.disconnect()})))}))};let Zn=0,Bn=1/0,zn=0;const Hn=e=>{e.forEach((e=>{e.interactionId&&(Bn=Math.min(Bn,e.interactionId),zn=Math.max(zn,e.interactionId),Zn=zn?(zn-Bn)/7+1:0)}))};let Vn;const qn=()=>{"interactionCount"in performance||Vn||(Vn=xn("event",Hn,{type:"event",buffered:!0,durationThreshold:0}))},Wn=[200,500],$n=()=>(Vn?Zn:performance.interactionCount||0)-0,Gn=[],Yn={},Kn=e=>{const t=Gn[Gn.length-1],n=Yn[e.interactionId];if(n||Gn.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};Yn[t.id]=t,Gn.push(t)}Gn.sort(((e,t)=>t.latency-e.latency)),Gn.splice(10).forEach((e=>{delete Yn[e.id]}))}},Jn=(e,t={})=>{Pn((()=>{qn();const n=An("INP");let r;const o=e=>{e.forEach((e=>{if(e.interactionId&&Kn(e),"first-input"===e.entryType){!Gn.some((t=>t.entries.some((t=>e.duration===t.duration&&e.startTime===t.startTime))))&&Kn(e)}}));const t=(()=>{const e=Math.min(Gn.length-1,Math.floor($n()/50));return Gn[e]})();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())},i=xn("event",o,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=Sn(e,n,Wn,t.reportAllChanges),i&&("PerformanceEventTiming"in En&&"interactionId"in PerformanceEventTiming.prototype&&i.observe({type:"first-input",buffered:!0}),Ln((()=>{o(i.takeRecords()),n.value<0&&$n()>0&&(n.value=0,n.entries=[]),r(!0)})))}))},Xn=[2500,4e3],Qn={},er=(e,t={})=>{Pn((()=>{const n=Dn(),r=An("LCP");let o;const i=e=>{const t=e[e.length-1];t&&t.startTime{Qn[r.id]||(i(a.takeRecords()),a.disconnect(),Qn[r.id]=!0,o(!0))}));["keydown","click"].forEach((e=>{En.document&&addEventListener(e,(()=>setTimeout(n,0)),!0)})),Ln(n)}}))},tr=[800,1800],nr=e=>{En.document&&En.document.prerendering?Pn((()=>nr(e))):En.document&&"complete"!==En.document.readyState?addEventListener("load",(()=>nr(e)),!0):setTimeout(e,0)},rr=(e,t={})=>{const n=An("TTFB"),r=Sn(e,n,tr,t.reportAllChanges);nr((()=>{const e=kn();if(e){const t=e.responseStart;if(t<=0||t>performance.now())return;n.value=Math.max(t-In(),0),n.entries=[e],r(!0)}}))},or={},ir={};let ar,sr,ur,cr,lr;function dr(e,t=!1){return br("lcp",e,gr,ur,t)}function pr(e,t){return _r(e,t),ir[e]||(!function(e){const t={};"event"===e&&(t.durationThreshold=0);xn(e,(t=>{fr(e,{entries:t})}),t)}(e),ir[e]=!0),wr(e,t)}function fr(e,t){const n=or[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){Cn&&k.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Be(r)}\nError:`,t)}}function hr(){return Fn((e=>{fr("cls",{metric:e}),ar=e}),{reportAllChanges:!0})}function mr(){return Un((e=>{fr("fid",{metric:e}),sr=e}))}function gr(){return er((e=>{fr("lcp",{metric:e}),ur=e}))}function vr(){return rr((e=>{fr("ttfb",{metric:e}),cr=e}))}function yr(){return Jn((e=>{fr("inp",{metric:e}),lr=e}))}function br(e,t,n,r,o=!1){let i;return _r(e,t),ir[e]||(i=n(),ir[e]=!0),r&&t({metric:r}),wr(e,t,o?i:void 0)}function _r(e,t){or[e]=or[e]||[],or[e].push(t)}function wr(e,t,n){return()=>{n&&n();const r=or[e];if(!r)return;const o=r.indexOf(t);-1!==o&&r.splice(o,1)}}const Cr={},Sr={};function Er(e,t){Cr[e]=Cr[e]||[],Cr[e].push(t)}function kr(e,t){Sr[e]||(t(),Sr[e]=!0)}function Ir(e,t){const n=e&&Cr[e];if(n)for(const r of n)try{r(t)}catch(t){w&&k.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Be(r)}\nError:`,t)}}const Ar="__sentry_xhr_v3__";function xr(e){Er("xhr",e),kr("xhr",Lr)}function Lr(){if(!En.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;K(e,"open",(function(e){return function(...t){const n=1e3*y(),r=D(t[0])?t[0].toUpperCase():void 0,o=function(e){if(D(e))return e;try{return e.toString()}catch(e){}return}(t[1]);if(!r||!o)return e.apply(this,t);this[Ar]={method:r,url:o,request_headers:{}},"POST"===r&&o.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const e=this[Ar];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}Ir("xhr",{endTimestamp:1e3*y(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?K(this,"onreadystatechange",(function(e){return function(...t){return i(),e.apply(this,t)}})):this.addEventListener("readystatechange",i),K(this,"setRequestHeader",(function(e){return function(...t){const[n,r]=t,o=this[Ar];return o&&D(n)&&D(r)&&(o.request_headers[n.toLowerCase()]=r),e.apply(this,t)}})),e.apply(this,t)}})),K(e,"send",(function(e){return function(...t){const n=this[Ar];if(!n)return e.apply(this,t);void 0!==t[0]&&(n.body=t[0]);return Ir("xhr",{startTimestamp:1e3*y(),xhr:this}),e.apply(this,t)}}))}const Or=1e3;let Mr,Tr,Dr;function Pr(e){Er("dom",e),kr("dom",Rr)}function Rr(){if(!En.document)return;const e=Ir.bind(null,"dom"),t=Nr(e,!0);En.document.addEventListener("click",t,!1),En.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=En[t]&&En[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(K(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=i[n]=i[n]||{refCount:0};if(!a.handler){const r=Nr(e);a.handler=r,t.call(this,n,r,o)}a.refCount++}catch(e){}return t.call(this,n,r,o)}})),K(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,o=n.__sentry_instrumentation_handlers__||{},i=o[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}function Nr(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(e){try{return e.target}catch(e){return null}}(n);if(function(e,t){return"keypress"===e&&(!t||!t.tagName||"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&!t.isContentEditable)}(n.type,r))return;J(n,"_sentryCaptured",!0),r&&!r._sentryId&&J(r,"_sentryId",ie());const o="keypress"===n.type?"input":n.type;if(!function(e){if(e.type!==Tr)return!1;try{if(!e.target||e.target._sentryId!==Dr)return!1}catch(e){}return!0}(n)){e({event:n,name:o,global:t}),Tr=n.type,Dr=r?r._sentryId:void 0}clearTimeout(Mr),Mr=En.setTimeout((()=>{Dr=void 0,Tr=void 0}),Or)}}const Fr=h;let jr;function Ur(e){const t="history";Er(t,e),kr(t,Zr)}function Zr(){if(!function(){const e=Fr.chrome,t=e&&e.app&&e.app.runtime,n="history"in Fr&&!!Fr.history.pushState&&!!Fr.history.replaceState;return!t&&n}())return;const e=En.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=jr,t=String(n);jr=t;Ir("history",{from:e,to:t})}return e.apply(this,t)}}En.onpopstate=function(...t){const n=En.location.href,r=jr;jr=n;if(Ir("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},K(En.history,"pushState",t),K(En.history,"replaceState",t)}const Br=h,zr="sentryReplaySession",Hr="replay_event",Vr="Unable to send Replay",qr=15e4,Wr=5e3,$r=2e7,Gr=36e5;function Yr(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}var Kr;function Jr(e){const t=Yr([e,"optionalAccess",e=>e.host]);return Boolean(Yr([t,"optionalAccess",e=>e.shadowRoot])===e)}function Xr(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Qr(e){try{const n=e.rules||e.cssRules;return n?((t=Array.from(n,eo).join("")).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t):null}catch(e){return null}var t}function eo(e){let t;if(function(e){return"styleSheet"in e}(e))try{t=Qr(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(e){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(e.cssText);return t||e.cssText}!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"}(Kr||(Kr={}));class to{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;const t=Yr([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]);return r=()=>-1,null!=(n=t)?n:r();var n,r}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function no({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),Boolean(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function ro({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function oo(e){return e.toLowerCase()}function io(e){return e.toUpperCase()}const ao="__rrweb_original__";function so(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?oo(t):null}function uo(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}let co=1;const lo=new RegExp("[^a-z0-9-_:]"),po=-2;function fo(){return co++}let ho,mo;const go=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,vo=/^(?:[a-z+]+:)?\/\//i,yo=/^www\..*/i,bo=/^(data:)([^,]*),(.*)/i;function _o(e,t){return(e||"").replace(go,((e,n,r,o,i,a)=>{const s=r||i||a,u=n||o||"";if(!s)return e;if(vo.test(s)||yo.test(s))return`url(${u}${s}${u})`;if(bo.test(s))return`url(${u}${s}${u})`;if("/"===s[0])return`url(${u}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+s}${u})`;const c=t.split("/"),l=s.split("/");c.pop();for(const e of l)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${u}${c.join("/")}${u})`}))}const wo=/^[^ \t\n\r\u000c]+/,Co=/^[, \t\n\r\u000c]+/;function So(e,t){if(!t||""===t.trim())return t;const n=e.createElement("a");return n.href=t,n.href}function Eo(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function ko(){const e=document.createElement("a");return e.href="",e.href}function Io(e,t,n,r,o,i){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?So(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}const o=[];for(;r(Co),!(n>=t.length);){let i=r(wo);if(","===i.slice(-1))i=So(e,i.substring(0,i.length-1)),o.push(i);else{let r="";i=So(e,i);let a=!1;for(;;){const e=t.charAt(n);if(""===e){o.push((i+r).trim());break}if(a)")"===e&&(a=!1);else{if(","===e){n+=1,o.push((i+r).trim());break}"("===e&&(a=!0)}r+=e,n+=1}}}return o.join(", ")}(e,r):"style"===n?_o(r,ko()):"object"===t&&"data"===n?So(e,r):"function"==typeof i?i(n,r,o):r:So(e,r):r}function Ao(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function xo(e,t,n=1/0,r=0){return e?e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:xo(e.parentNode,t,n,r+1):-1}function Lo(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}(r,e))return!0;return!(!t||!r.matches(t))}catch(e){return!1}}}function Oo(e,t,n,r,o,i){try{const a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===a)return!1;if("INPUT"===a.tagName){const e=a.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let s=-1,u=-1;if(i){if(u=xo(a,Lo(r,o)),u<0)return!0;s=xo(a,Lo(t,n),u>=0?u:1/0)}else{if(s=xo(a,Lo(t,n)),s<0)return!1;u=xo(a,Lo(r,o),s>=0?s:1/0)}return s>=0?!(u>=0)||s<=u:!(u>=0)&&!!i}catch(e){}return!!i}function Mo(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:s,maskAttributeFn:u,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:m,maskInputFn:g,dataURLOptions:v={},inlineImages:y,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:w=!1}=t,C=function(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Kr.Document,childNodes:[],compatMode:e.compatMode}:{type:Kr.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Kr.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return function(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:i,inlineStylesheet:a,maskInputOptions:s={},maskAttributeFn:u,maskInputFn:c,dataURLOptions:l={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:m,maskAllText:g,maskTextClass:v,unmaskTextClass:y,maskTextSelector:b,unmaskTextSelector:_}=t,w=function(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,r,o,i),C=function(e){if(e instanceof HTMLFormElement)return"form";const t=oo(e.tagName);return lo.test(t)?"div":t}(e);let S={};const E=e.attributes.length;for(let t=0;tt.href===e.href));let r=null;t&&(r=Qr(t)),r&&(delete S.rel,delete S.href,S._cssText=_o(r,t.href))}if("style"===C&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=Qr(e.sheet);t&&(S._cssText=_o(t,ko()))}if("input"===C||"textarea"===C||"select"===C||"option"===C){const t=e,n=so(t),r=uo(t,io(C),n),o=t.checked;if("submit"!==n&&"button"!==n&&r){const e=Oo(t,v,b,y,_,no({type:n,tagName:io(C),maskInputOptions:s}));S.value=ro({isMasked:e,element:t,value:r,maskInputFn:c})}o&&(S.checked=o)}"option"===C&&(e.selected&&!s.select?S.selected=!0:delete S.selected);if("canvas"===C&&p)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n0!==e)))return!1}return!0})(e)||(S.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),n=document.createElement("canvas");n.width=e.width,n.height=e.height;t!==n.toDataURL(l.type,l.quality)&&(S.rr_dataURL=t)}if("img"===C&&d){ho||(ho=n.createElement("canvas"),mo=ho.getContext("2d"));const t=e,r=t.crossOrigin;t.crossOrigin="anonymous";const o=()=>{t.removeEventListener("load",o);try{ho.width=t.naturalWidth,ho.height=t.naturalHeight,mo.drawImage(t,0,0),S.rr_dataURL=ho.toDataURL(l.type,l.quality)}catch(e){console.warn(`Cannot inline img src=${t.currentSrc}! Error: ${e}`)}r?S.crossOrigin=r:t.removeAttribute("crossorigin")};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}"audio"!==C&&"video"!==C||(S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime);h||(e.scrollLeft&&(S.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(S.rr_scrollTop=e.scrollTop));if(w){const{width:t,height:n}=e.getBoundingClientRect();S={class:S.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==C||f(S.src)||(e.contentDocument||(S.rr_src=S.src),delete S.src);let k;try{customElements.get(C)&&(k=!0)}catch(e){}return{type:Kr.Element,tagName:C,attributes:S,childNodes:[],isSVG:Eo(e)||void 0,needBlock:w,rootId:m,isCustom:k}}(e,{doc:n,blockClass:o,blockSelector:i,unblockSelector:a,inlineStylesheet:f,maskAttributeFn:u,maskInputOptions:h,maskInputFn:g,dataURLOptions:v,inlineImages:y,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:w,rootId:C,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p});case e.TEXT_NODE:return function(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:i,unmaskTextSelector:a,maskTextFn:s,maskInputOptions:u,maskInputFn:c,rootId:l}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const f="STYLE"===d||void 0,h="SCRIPT"===d||void 0,m="TEXTAREA"===d||void 0;if(f&&p){try{e.nextSibling||e.previousSibling||Yr([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(p=Qr(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}p=_o(p,ko())}h&&(p="SCRIPT_PLACEHOLDER");const g=Oo(e,r,i,o,a,n);f||h||m||!p||!g||(p=s?s(p,e.parentElement):p.replace(/[\S]/g,"*"));m&&p&&(u.textarea||g)&&(p=c?c(p,e.parentNode):p.replace(/[\S]/g,"*"));if("OPTION"===d&&p){p=ro({isMasked:Oo(e,r,i,o,a,no({type:null,tagName:d,maskInputOptions:u})),element:e,value:p,maskInputFn:c})}return{type:Kr.Text,textContent:p||"",isStyle:f,rootId:l}}(e,{maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:h,maskInputFn:g,rootId:C});case e.CDATA_SECTION_NODE:return{type:Kr.CDATA,textContent:"",rootId:C};case e.COMMENT_NODE:return{type:Kr.Comment,textContent:e.textContent||"",rootId:C};default:return!1}}function To(e){return null==e?"":e.toLowerCase()}function Do(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:s,maskTextClass:u,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b={},inlineImages:_=!1,recordCanvas:w=!1,onSerialize:C,onIframeLoad:S,iframeLoadTimeout:E=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:A=(()=>!1),newlyAddedElement:x=!1}=t;let{preserveWhiteSpace:L=!0}=t;const O=Mo(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:s,unblockSelector:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,dataURLOptions:b,inlineImages:_,recordCanvas:w,keepIframeSrcFn:A,newlyAddedElement:x});if(!O)return console.warn(e,"not serialized"),null;let M;M=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===Kr.Comment)return!0;if(e.type===Kr.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&&(To(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===To(e.attributes.name)||"icon"===To(e.attributes.rel)||"apple-touch-icon"===To(e.attributes.rel)||"shortcut icon"===To(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&To(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(To(e.attributes.property).match(/^(og|twitter|fb):/)||To(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===To(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===To(e.attributes.name)||"googlebot"===To(e.attributes.name)||"bingbot"===To(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===To(e.attributes.name)||"generator"===To(e.attributes.name)||"framework"===To(e.attributes.name)||"publisher"===To(e.attributes.name)||"progid"===To(e.attributes.name)||To(e.attributes.property).match(/^article:/)||To(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===To(e.attributes.name)||"yandex-verification"===To(e.attributes.name)||"csrf-token"===To(e.attributes.name)||"p:domain_verify"===To(e.attributes.name)||"verify-v1"===To(e.attributes.name)||"verification"===To(e.attributes.name)||"shopify-checkout-api-token"===To(e.attributes.name)))return!0}}return!1}(O,y)&&(L||O.type!==Kr.Text||O.isStyle||O.textContent.replace(/^\s+|\s+$/gm,"").length)?fo():po;const T=Object.assign(O,{id:M});if(r.add(e,T),M===po)return null;C&&C(e);let D=!p;if(T.type===Kr.Element){D=D&&!T.needBlock,delete T.needBlock;const t=e.shadowRoot;t&&Xr(t)&&(T.isShadowHost=!0)}if((T.type===Kr.Document||T.type===Kr.Element)&&D){y.headWhitespace&&T.type===Kr.Element&&"head"===T.tagName&&(L=!1);const t={doc:n,mirror:r,blockClass:o,blockSelector:i,maskAllText:s,unblockSelector:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:L,onSerialize:C,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:k,stylesheetLoadTimeout:I,keepIframeSrcFn:A};for(const n of Array.from(e.childNodes)){const e=Do(n,t);e&&T.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 r=Do(n,t);r&&(Xr(e.shadowRoot)&&(r.isShadow=!0),T.childNodes.push(r))}}return e.parentNode&&Jr(e.parentNode)&&Xr(e.parentNode)&&(T.isShadow=!0),T.type===Kr.Element&&"iframe"===T.tagName&&function(e,t,n){const r=e.contentWindow;if(!r)return;let o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"!==o){const r=setTimeout((()=>{i||(t(),i=!0)}),n);return void e.addEventListener("load",(()=>{clearTimeout(r),i=!0,t()}))}const a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,(()=>{const t=e.contentDocument;if(t&&S){const n=Do(t,{doc:t,mirror:r,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:s,maskTextClass:u,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:L,onSerialize:C,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:k,stylesheetLoadTimeout:I,keepIframeSrcFn:A});n&&S(e,n)}}),E),T.type===Kr.Element&&"link"===T.tagName&&"stylesheet"===T.attributes.rel&&function(e,t,n){let r,o=!1;try{r=e.sheet}catch(e){return}if(r)return;const i=setTimeout((()=>{o||(t(),o=!0)}),n);e.addEventListener("load",(()=>{clearTimeout(i),o=!0,t()}))}(e,(()=>{if(k){const t=Do(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:s,maskTextClass:u,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOMOptions:y,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:L,onSerialize:C,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:k,stylesheetLoadTimeout:I,keepIframeSrcFn:A});t&&k(e,t)}}),I),T}function Po(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}function Ro(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const No="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 Fo={map:{},getId:()=>(console.error(No),-1),getNode:()=>(console.error(No),null),removeNodeFromMap(){console.error(No)},has:()=>(console.error(No),!1),reset(){console.error(No)}};function jo(e,t,n={}){let r=null,o=0;return function(...i){const a=Date.now();o||!1!==n.leading||(o=a);const s=t-(a-o),u=this;s<=0||s>t?(r&&(!function(...e){oi("clearTimeout")(...e)}(r),r=null),o=a,e.apply(u,i)):r||!1===n.trailing||(r=ii((()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(u,i)}),s))}}function Uo(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){ii((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>Uo(e,t,i||{},!0)}function Zo(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Fo=new Proxy(Fo,{get:(e,t,n)=>("map"===t&&console.error(No),Reflect.get(e,t,n))}));let Bo=Date.now;function zo(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:Po([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||Po([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||Po([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:Po([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||Po([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||Po([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function Ho(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Vo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function qo(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}function Wo(e,t,n,r,o){if(!e)return!1;const i=qo(e);if(!i)return!1;const a=Lo(t,n);if(!o){const e=r&&i.matches(r);return a(i)&&!e}const s=xo(i,a);let u=-1;return!(s<0)&&(r&&(u=xo(i,Lo(null,r))),s>-1&&u<0||se.shadowRoot]))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Bo=()=>(new Date).getTime());class Qo{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return t=this.styleIDMap.get(e),n=()=>-1,null!=t?t:n();var t,n}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function ei(e){let t=null;return Po([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function ti(e){const t=e.ownerDocument;if(!t)return!1;const n=function(e){let t,n=e;for(;t=ei(n);)n=t;return n}(e);return t.contains(n)}function ni(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||ti(e))}const ri={};function oi(e){const t=ri[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const o=t.contentWindow;o&&o[e]&&(r=o[e]),n.head.removeChild(t)}catch(e){}return ri[e]=r.bind(window)}function ii(...e){return oi("setTimeout")(...e)}var ai=(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",e))(ai||{}),si=(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",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(si||{}),ui=(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",e))(ui||{}),ci=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ci||{});function li(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}function di(e){return"__ln"in e}class pi{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;ne.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&di(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&&di(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;null===t.next&&(this.tail=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.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const fi=(e,t)=>`${e}@${t}`;class hi{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new pi,r=e=>{let t=e,n=po;for(;n===po;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},o=o=>{if(!o.parentNode||!ni(o))return;const i=Jr(o.parentNode)?this.mirror.getId(ei(o)):this.mirror.getId(o.parentNode),a=r(o);if(-1===i||-1===a)return n.addNode(o);const s=Do(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Ko(e,this.mirror)&&this.iframeManager.addIframe(e),Jo(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Xo(o)&&this.shadowDomManager.addShadowRoot(o.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});s&&(e.push({parentId:i,nextId:a,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)gi(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)yi(this.droppedSet,e)||gi(this.removes,e,this.mirror)?yi(this.movedSet,e)?o(e):this.droppedSet.add(e):o(e);let i=null;for(;n.length;){let e=null;if(i){const t=this.mirror.getId(i.value.parentNode),n=r(i.value);-1!==t&&-1!==n&&(e=i)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}i=e.previous,n.removeNode(e.value),o(e.value)}const a={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(a.texts.length||a.attributes.length||a.removes.length||a.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=e=>{if(!$o(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;Wo(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:Oo(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,qo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=so(t),o=t.tagName;r=uo(t,o,n);const i=no({maskInputOptions:this.maskInputOptions,tagName:o,type:n});r=ro({isMasked:Oo(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,i),element:t,value:r,maskInputFn:this.maskInputFn})}if(Wo(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let o=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(t.contentDocument)return;n="rr_src"}if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!Ao(t.tagName,n)&&(o.attributes[n]=Io(this.doc,oo(t.tagName),oo(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||i!==n.style.getPropertyPriority(e)?o.styleDiff[e]=""===i?r:[r,i]:o._unchangedStyles[e]=[r,i]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o.styleDiff[e]=!1)}break}case"childList":if(Wo(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=Jr(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Wo(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||$o(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(mi(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||Go(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[fi(n,r)]?mi(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!Jr(e.target)||!Xr(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if($o(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[fi(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Wo(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),Xo(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function mi(e,t){e.delete(t),t.childNodes.forEach((t=>mi(e,t)))}function gi(e,t,n){return 0!==e.length&&vi(e,t,n)}function vi(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return!!e.some((e=>e.id===o))||vi(e,r,n)}function yi(e,t){return 0!==e.size&&bi(e,t)}function bi(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||bi(e,n))}let _i;function wi(e){_i=e}function Ci(){_i=void 0}const Si=e=>{if(!_i)return e;return(...t)=>{try{return e(...t)}catch(e){if(_i&&!0===_i(e))return()=>{};throw e}}};function Ei(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}const ki=[];function Ii(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 Ai(e,t){const n=new hi;ki.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=Ei([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);o&&window[o]&&(r=window[o]);const i=new r(Si((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return i.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),i}function xi({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[];let c=null;return Object.keys(ui).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e])).forEach((a=>{let s=oo(a);const l=(t=>a=>{const s=Ii(a);if(Wo(s,r,o,i,!0))return;let u=null,l=t;if("pointerType"in a){switch(a.pointerType){case"mouse":u=ci.Mouse;break;case"touch":u=ci.Touch;break;case"pen":u=ci.Pen}u===ci.Touch?ui[t]===ui.MouseDown?l="TouchStart":ui[t]===ui.MouseUp&&(l="TouchEnd"):ci.Pen}else Yo(a)&&(u=ci.Touch);null!==u?(c=u,(l.startsWith("Touch")&&u===ci.Touch||l.startsWith("Mouse")&&u===ci.Mouse)&&(u=null)):ui[t]===ui.Click&&(u=c,c=null);const d=Yo(a)?a.changedTouches[0]:a;if(!d)return;const p=n.getId(s),{clientX:f,clientY:h}=d;Si(e)({type:ui[l],id:p,x:f,y:h,...null!==u&&{pointerType:u}})})(a);if(window.PointerEvent)switch(ui[a]){case ui.MouseDown:case ui.MouseUp:s=s.replace("mouse","pointer");break;case ui.TouchStart:case ui.TouchEnd:return}u.push(Ro(s,l,t))})),Si((()=>{u.forEach((e=>e()))}))}function Li({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,sampling:a}){return Ro("scroll",Si(jo(Si((a=>{const s=Ii(a);if(!s||Wo(s,r,o,i,!0))return;const u=n.getId(s);if(s===t&&t.defaultView){const n=zo(t.defaultView);e({id:u,x:n.left,y:n.top})}else e({id:u,x:s.scrollLeft,y:s.scrollTop})})),a.scroll||100)),t)}const Oi=["INPUT","TEXTAREA","SELECT"],Mi=new WeakMap;function Ti({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,ignoreClass:a,ignoreSelector:s,maskInputOptions:u,maskInputFn:c,sampling:l,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:m}){function g(e){let n=Ii(e);const l=e.isTrusted,g=n&&io(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||Oi.indexOf(g)<0||Wo(n,r,o,i,!0))return;const y=n;if(y.classList.contains(a)||s&&y.matches(s))return;const b=so(n);let _=uo(y,g,b),w=!1;const C=no({maskInputOptions:u,tagName:g,type:b}),S=Oo(n,p,h,f,m,C);"radio"!==b&&"checkbox"!==b||(w=n.checked),_=ro({isMasked:S,element:n,value:_,maskInputFn:c}),v(n,d?{text:_,isChecked:w,userTriggered:l}:{text:_,isChecked:w});const E=n.name;"radio"===b&&E&&w&&t.querySelectorAll(`input[type="radio"][name="${E}"]`).forEach((e=>{if(e!==n){const t=ro({isMasked:S,element:e,value:uo(e,g,b),maskInputFn:c});v(e,d?{text:t,isChecked:!w,userTriggered:!1}:{text:t,isChecked:!w})}}))}function v(t,r){const o=Mi.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){Mi.set(t,r);const o=n.getId(t);Si(e)({...r,id:o})}}const y=("last"===l.input?["change"]:["input","change"]).map((e=>Ro(e,Si(g),t))),b=t.defaultView;if(!b)return()=>{y.forEach((e=>e()))};const _=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),w=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return _&&_.set&&y.push(...w.map((e=>Uo(e[0],e[1],{set(){Si(g)({target:this,isTrusted:!1})}},!1,b)))),Si((()=>{y.forEach((e=>e()))}))}function Di(e){return function(e,t){if(Fi("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Fi("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Fi("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Fi("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Pi(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Ri({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const o="#document"===n.nodeName?Ei([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):Ei([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),i=Ei([o,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(Ei([o,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&o&&i?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get(){return Ei([i,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=Ei([i,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch(e){}return n}}),Si((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:i.configurable,enumerable:i.enumerable,get:i.get,set:i.set})}))):()=>{}}function Ni(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};const r=Ai(e,e.doc),o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let a,s=[];const u=jo(Si((t=>{const n=Date.now()-a;e(s.map((e=>(e.timeOffset-=n,e))),t),s=[],a=null})),i),c=Si(jo(Si((e=>{const t=Ii(e),{clientX:n,clientY:o}=Yo(e)?e.changedTouches[0]:e;a||(a=Bo()),s.push({x:n,y:o,id:r.getId(t),timeOffset:Bo()-a}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?si.Drag:e instanceof MouseEvent?si.MouseMove:si.TouchMove)})),o,{trailing:!1})),l=[Ro("mousemove",c,n),Ro("touchmove",c,n),Ro("drag",c,n)];return Si((()=>{l.forEach((e=>e()))}))}(e),i=xi(e),a=Li(e),s=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Ro("resize",Si(jo(Si((()=>{const t=Ho(),o=Vo();n===t&&r===o||(e({width:Number(o),height:Number(t)}),n=t,r=o)})),200)),t)}(e,{win:n}),u=Ti(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:i,doc:a}){const s=Si((a=>jo(Si((i=>{const s=Ii(i);if(!s||Wo(s,t,n,r,!0))return;const{currentTime:u,volume:c,muted:l,playbackRate:d}=s;e({type:a,id:o.getId(s),currentTime:u,volume:c,muted:l,playbackRate:d})})),i.media||500))),u=[Ro("play",s(0),a),Ro("pause",s(1),a),Ro("seeked",s(2),a),Ro("volumechange",s(3),a),Ro("ratechange",s(4),a)];return Si((()=>{u.forEach((e=>e()))}))}(e),l=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:Si(((r,o,i)=>{const[a,s]=i,{id:u,styleId:c}=Pi(o,t,n.styleMirror);return(u&&-1!==u||c&&-1!==c)&&e({id:u,styleId:c,adds:[{rule:a,index:s}]}),r.apply(o,i)}))});const i=r.CSSStyleSheet.prototype.deleteRule;let a,s;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Si(((r,o,i)=>{const[a]=i,{id:s,styleId:u}=Pi(o,t,n.styleMirror);return(s&&-1!==s||u&&-1!==u)&&e({id:s,styleId:u,removes:[{index:a}]}),r.apply(o,i)}))}),r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:Si(((r,o,i)=>{const[a]=i,{id:s,styleId:u}=Pi(o,t,n.styleMirror);return(s&&-1!==s||u&&-1!==u)&&e({id:s,styleId:u,replace:a}),r.apply(o,i)}))})),r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:Si(((r,o,i)=>{const[a]=i,{id:s,styleId:u}=Pi(o,t,n.styleMirror);return(s&&-1!==s||u&&-1!==u)&&e({id:s,styleId:u,replaceSync:a}),r.apply(o,i)}))}));const u={};ji("CSSGroupingRule")?u.CSSGroupingRule=r.CSSGroupingRule:(ji("CSSMediaRule")&&(u.CSSMediaRule=r.CSSMediaRule),ji("CSSConditionRule")&&(u.CSSConditionRule=r.CSSConditionRule),ji("CSSSupportsRule")&&(u.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(u).forEach((([r,o])=>{c[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(c[r].insertRule,{apply:Si(((r,o,i)=>{const[a,s]=i,{id:u,styleId:c}=Pi(o.parentStyleSheet,t,n.styleMirror);return(u&&-1!==u||c&&-1!==c)&&e({id:u,styleId:c,adds:[{rule:a,index:[...Di(o),s||0]}]}),r.apply(o,i)}))}),o.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:Si(((r,o,i)=>{const[a]=i,{id:s,styleId:u}=Pi(o.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||u&&-1!==u)&&e({id:s,styleId:u,removes:[{index:[...Di(o),a]}]}),r.apply(o,i)}))})})),Si((()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,a&&(r.CSSStyleSheet.prototype.replace=a),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(u).forEach((([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule}))}))}(e,{win:n}),d=Ri(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:Si(((o,a,s)=>{const[u,c,l]=s;if(n.has(u))return i.apply(a,[u,c,l]);const{id:d,styleId:p}=Pi(Ei([a,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:u,value:c,priority:l},index:Di(a.parentRule)}),o.apply(a,s)}))});const a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:Si(((o,i,s)=>{const[u]=s;if(n.has(u))return a.apply(i,[u]);const{id:c,styleId:l}=Pi(Ei([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,remove:{property:u},index:Di(i.parentRule)}),o.apply(i,s)}))}),Si((()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}))}(e,{win:n}),f=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,n){const r=new i(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const a=Zo(t.fonts,"add",(function(t){return function(n){return ii(Si((()=>{const t=o.get(n);t&&(e(t),o.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=i})),r.push(a),Si((()=>{r.forEach((e=>e()))}))}(e):()=>{},h=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,selectionCb:a}=e;let s=!0;const u=Si((()=>{const e=t.getSelection();if(!e||s&&Ei([e,"optionalAccess",e=>e.isCollapsed]))return;s=e.isCollapsed||!1;const u=[],c=e.rangeCount||0;for(let t=0;t{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Si((()=>{ki.forEach((e=>e.reset())),r.disconnect(),o(),i(),a(),s(),u(),c(),l(),d(),p(),f(),h(),m(),g.forEach((e=>e()))}))}function Fi(e){return void 0!==window[e]}function ji(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ui{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let a=o.get(t);return a||(a=this.generateIdFn(),o.set(t,a),i.set(a,t)),a}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const o=r.get(t);return o||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function Zi(e){let t,n=e[0],r=1;for(;rn.call(t,...e))),t=void 0)}return n}class Bi{constructor(){this.crossOriginIframeMirror=new Ui(fo),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class zi{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ui(fo),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ui(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),Zi([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case ai.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:ai.IncrementalSnapshot,data:{source:si.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ai.Meta:case ai.Load:case ai.DomContentLoaded:return!1;case ai.Plugin:return t;case ai.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case ai.IncrementalSnapshot:switch(t.data.source){case si.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case si.Drag:case si.TouchMove:case si.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case si.ViewportResize:return!1;case si.MediaInteraction:case si.MouseInteraction:case si.Scroll:case si.CanvasMutation:case si.Input:return this.replaceIds(t.data,e,["id"]),t;case si.StyleSheetRule:case si.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case si.Font:return t;case si.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case si.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),Zi([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===Kr.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class Hi{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class Vi{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Xr(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const n=Ai({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(Li({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),ii((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Ri({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Zo(e.prototype,"attachShadow",(function(e){return function(r){const o=e.call(this,r);return this.shadowRoot&&ni(this)&&n.addShadowRoot(this.shadowRoot,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class qi{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class Wi{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Qo,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:eo(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class $i{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...e){oi("requestAnimationFrame")(...e)}((()=>{this.clear(),this.loop&&this.periodicallyClear()}))}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}let Gi,Yi;const Ki=new to;function Ji(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,unblockSelector:a=null,ignoreClass:s="rr-ignore",ignoreSelector:u=null,maskAllText:c=!1,maskTextClass:l="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:m=!0,maskAllInputs:g,maskInputOptions:v,slimDOMOptions:y,maskAttributeFn:b,maskInputFn:_,maskTextFn:w,maxCanvasSize:C=null,packFn:S,sampling:E={},dataURLOptions:k={},mousemoveWait:I,recordCanvas:A=!1,recordCrossOriginIframes:x=!1,recordAfter:L=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:M=!1,inlineImages:T=!1,plugins:D,keepIframeSrcFn:P=(()=>!1),ignoreCSSAttributes:R=new Set([]),errorHandler:N,onMutation:F,getCanvasManager:j}=e;wi(N);const U=!x||window.parent===window;let Z=!1;if(!U)try{window.parent.document&&(Z=!1)}catch(e){Z=!0}if(U&&!t)throw new Error("emit function is required");void 0!==I&&void 0===E.mousemove&&(E.mousemove=I),Ki.reset();const B=!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!==v?v:{},z=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let H;!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=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let V=0;const q=e=>{for(const t of D||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!Z&&(e=S(e)),e};Gi=(e,o)=>{const i=e;if(i.timestamp=Bo(),!f([ki,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])||i.type===ai.FullSnapshot||i.type===ai.IncrementalSnapshot&&i.data.source===si.Mutation||ki.forEach((e=>e.unfreeze())),U)f([t,"optionalCall",e=>e(q(i),o)]);else if(Z){const e={type:"rrweb",event:q(i),origin:window.location.origin,isCheckout:o};window.parent.postMessage(e,"*")}if(i.type===ai.FullSnapshot)H=i,V=0;else if(i.type===ai.IncrementalSnapshot){if(i.data.source===si.Mutation&&i.data.isAttachIframe)return;V++;const e=r&&V>=r,t=n&&H&&i.timestamp-H.timestamp>n;(e||t)&&ee(!0)}};const W=e=>{Gi({type:ai.IncrementalSnapshot,data:{source:si.Mutation,...e}})},$=e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.Scroll,...e}}),G=e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.CanvasMutation,...e}}),Y=new Wi({mutationCb:W,adoptedStyleSheetCb:e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.AdoptedStyleSheet,...e}})}),K="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new Bi:new zi({mirror:Ki,mutationCb:W,stylesheetManager:Y,recordCrossOriginIframes:x,wrappedEmit:Gi});for(const e of D||[])e.getMirror&&e.getMirror({nodeMirror:Ki,crossOriginIframeMirror:K.crossOriginIframeMirror,crossOriginIframeStyleMirror:K.crossOriginIframeStyleMirror});const J=new $i,X=function(e,t){try{return e?e(t):new qi}catch(e){return console.warn("Unable to initialize CanvasManager"),new qi}}(j,{mirror:Ki,win:window,mutationCb:e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.CanvasMutation,...e}}),recordCanvas:A,blockClass:o,blockSelector:i,unblockSelector:a,maxCanvasSize:C,sampling:E.canvas,dataURLOptions:k,errorHandler:N}),Q="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new Hi:new Vi({mutationCb:W,scrollCb:$,bypassOptions:{onMutation:F,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:c,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskInputOptions:B,dataURLOptions:k,maskAttributeFn:b,maskTextFn:w,maskInputFn:_,recordCanvas:A,inlineImages:T,sampling:E,slimDOMOptions:z,iframeManager:K,stylesheetManager:Y,canvasManager:X,keepIframeSrcFn:P,processedNodeManager:J},mirror:Ki}),ee=(e=!1)=>{Gi({type:ai.Meta,data:{href:window.location.href,width:Vo(),height:Ho()}},e),Y.reset(),Q.init(),ki.forEach((e=>e.lock()));const t=function(e,t){const{mirror:n=new to,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:i=null,maskAllText:a=!1,maskTextClass:s="rr-mask",unmaskTextClass:u=null,maskTextSelector:c=null,unmaskTextSelector:l=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,slimDOM:y=!1,dataURLOptions:b,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:I=(()=>!1)}=t||{};return Do(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:i,maskAllText:a,maskTextClass:s,unmaskTextClass:u,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===h?{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===h?{}:h,maskAttributeFn:m,maskTextFn:g,maskInputFn:v,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:b,inlineImages:p,recordCanvas:f,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:C,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:k,keepIframeSrcFn:I,newlyAddedElement:!1})}(document,{mirror:Ki,blockClass:o,blockSelector:i,unblockSelector:a,maskAllText:c,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskAllInputs:B,maskAttributeFn:b,maskInputFn:_,maskTextFn:w,slimDOM:z,dataURLOptions:k,recordCanvas:A,inlineImages:T,onSerialize:e=>{Ko(e,Ki)&&K.addIframe(e),Jo(e,Ki)&&Y.trackLinkElement(e),Xo(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{K.attachIframe(e,t),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Y.attachLinkElement(e,t)},keepIframeSrcFn:P});if(!t)return console.warn("Failed to snapshot the document");Gi({type:ai.FullSnapshot,data:{node:t,initialOffset:zo(window)}}),ki.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Y.adoptStyleSheets(document.adoptedStyleSheets,Ki.getId(document))};Yi=ee;try{const e=[],t=e=>Si(Ni)({onMutation:F,mutationCb:W,mousemoveCb:(e,t)=>Gi({type:ai.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.MouseInteraction,...e}}),scrollCb:$,viewportResizeCb:e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.ViewportResize,...e}}),inputCb:e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.Input,...e}}),mediaInteractionCb:e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.MediaInteraction,...e}}),styleSheetRuleCb:e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.StyleSheetRule,...e}}),styleDeclarationCb:e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.StyleDeclaration,...e}}),canvasMutationCb:G,fontCb:e=>Gi({type:ai.IncrementalSnapshot,data:{source:si.Font,...e}}),selectionCb:e=>{Gi({type:ai.IncrementalSnapshot,data:{source:si.Selection,...e}})},customElementCb:e=>{Gi({type:ai.IncrementalSnapshot,data:{source:si.CustomElement,...e}})},blockClass:o,ignoreClass:s,ignoreSelector:u,maskAllText:c,maskTextClass:l,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:B,inlineStylesheet:m,sampling:E,recordCanvas:A,inlineImages:T,userTriggeredOnInput:O,collectFonts:M,doc:e,maskAttributeFn:b,maskInputFn:_,maskTextFn:w,keepIframeSrcFn:P,blockSelector:i,unblockSelector:a,slimDOMOptions:z,dataURLOptions:k,mirror:Ki,iframeManager:K,stylesheetManager:Y,shadowDomManager:Q,processedNodeManager:J,canvasManager:X,ignoreCSSAttributes:R,plugins:f([D,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>Gi({type:ai.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});K.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{ee(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(Ro("DOMContentLoaded",(()=>{Gi({type:ai.DomContentLoaded,data:{}}),"DOMContentLoaded"===L&&n()}))),e.push(Ro("load",(()=>{Gi({type:ai.Load,data:{}}),"load"===L&&n()}),window))),()=>{e.forEach((e=>e())),J.destroy(),Yi=void 0,Ci()}}catch(e){console.warn(e)}}Ji.mirror=Ki,Ji.takeFullSnapshot=function(e){if(!Yi)throw new Error("please take full snapshot after start recording");Yi(e)};const Xi=3;function Qi(e){return e>9999999999?e:1e3*e}function ea(e){return e>9999999999?e/1e3:e}function ta(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:ai.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:ze(t,10,1e3)}}),"console"===t.category))))}const na="button,a";function ra(e){return e.closest(na)||e}function oa(e){const t=ia(e);return t&&t instanceof Element?ra(t):t}function ia(e){return function(e){return"object"==typeof e&&!!e&&"target"in e}(e)?e.target:e}let aa;function sa(e){return aa||(aa=[],K(Br,"open",(function(e){return function(...t){if(aa)try{aa.forEach((e=>e()))}catch(e){}return e.apply(Br,t)}}))),aa.push(e),()=>{const t=aa?aa.indexOf(e):-1;t>-1&&aa.splice(t,1)}}class ua{constructor(e,t,n=ta){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=sa((()=>{this._lastMutation=la()}));this._teardown=()=>{e(),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(!ca.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:ea(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};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())}registerMutation(e=Date.now()){this._lastMutation=ea(e)}registerScroll(e=Date.now()){this._lastScroll=ea(e)}registerClick(e){const t=ra(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=la();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,r=e.mutationAfter&&e.mutationAfter<=this._threshold,o=!n&&!r,{clickCount:i,clickBreadcrumb:a}=e;if(o){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:Br.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this._addBreadcrumbEvent(t,o)}else if(i>1){const e={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:Br.location.href,route:t.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=setTimeout((()=>this._checkClicks()),1e3)}}const ca=["A","BUTTON","INPUT"];function la(){return Date.now()/1e3}function da(e,t){try{if(!function(e){return e.type===Xi}(t))return;const{source:n}=t.data;if(n===si.Mutation&&e.registerMutation(t.timestamp),n===si.Scroll&&e.registerScroll(t.timestamp),function(e){return e.data.source===si.MouseInteraction}(t)){const{type:n,id:r}=t.data,o=Ji.mirror.getNode(r);o instanceof HTMLElement&&n===ui.Click&&e.registerClick(o)}}catch(e){}}function pa(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var fa;!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"}(fa||(fa={}));const ha=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function ma(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(ha.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),t[r]=e[n]}return t}const ga=e=>t=>{if(!e.isEnabled())return;const n=function(e){const{target:t,message:n}=function(e){const t="click"===e.name;let n,r=null;try{r=t?oa(e.event):ia(e.event),n=H(r,{maxStringLength:200})||""}catch(e){n=""}return{target:r,message:n}}(e);return pa({category:`ui.${e.name}`,...va(t,n)})}(t);if(!n)return;const r="click"===t.name,o=r?t.event:void 0;var i,a,s;!(r&&e.clickDetector&&o&&o.target)||o.altKey||o.metaKey||o.ctrlKey||o.shiftKey||(i=e.clickDetector,a=n,s=oa(t.event),i.handleClick(a,s)),ta(e,n)};function va(e,t){const n=Ji.mirror.getId(e),r=n&&Ji.mirror.getNode(n),o=r&&Ji.mirror.getMeta(r),i=o&&function(e){return e.type===fa.Element}(o)?o:null;return{message:t,data:i?{nodeId:n,node:{id:n,tagName:i.tagName,textContent:Array.from(i.childNodes).map((e=>e.type===fa.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:ma(i.attributes)}}:{}}}function ya(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=function(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i,target:a}=e;if(!a||function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}(a)||!i)return null;const s=t||r||o,u=1===i.length;if(!s&&u)return null;const c=H(a,{maxStringLength:200})||"",l=va(a,c);return pa({category:"ui.keyDown",message:c,data:{...l.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:i}})}(t);n&&ta(e,n)}const ba={resource:function(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:i,decodedBodySize:a,encodedBodySize:s,responseStatus:u,transferSize:c}=e;if(["fetch","xmlhttprequest"].includes(n))return null;return{type:`${t}.${n}`,start:wa(i),end:wa(o),name:r,data:{size:c,statusCode:u,decodedBodySize:a,encodedBodySize:s}}},paint:function(e){const{duration:t,entryType:n,name:r,startTime:o}=e,i=wa(o);return{type:n,name:r,start:i,end:i+t,data:void 0}},navigation:function(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:i,encodedBodySize:a,domContentLoadedEventStart:s,domContentLoadedEventEnd:u,domInteractive:c,loadEventStart:l,loadEventEnd:d,redirectCount:p,startTime:f,transferSize:h,type:m}=e;if(0===o)return null;return{type:`${t}.${m}`,start:wa(f),end:wa(i),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:a,duration:o,domInteractive:c,domContentLoadedEventStart:s,domContentLoadedEventEnd:u,loadEventStart:l,loadEventEnd:d,domComplete:i,redirectCount:p}}}};function _a(e){return ba[e.entryType]?ba[e.entryType](e):null}function wa(e){return((_||Br.performance.timeOrigin)+e)/1e3}function Ca(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(pr(e,n))})),r.push(dr((({metric:t})=>{e.replayPerformanceEntries.push(function(e){const t=e.entries,n=t[t.length-1],r=n?n.element:void 0,o=e.value,i=wa(o);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:i,end:i,data:{value:o,size:o,nodeId:r?Ji.mirror.getId(r):void 0}}}(t))}))),()=>{r.forEach((e=>e()))}}const Sa="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ea='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a>h]=l}else for(o=new n(i),a=0;a>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==r||r<0)&&(r=0),(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},A=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},_=function(r,e){for(var i=[],a=0;ad&&(d=o[a].s);var g=new n(d+1),w=x(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<e))break;p+=m-(1<>=y;p>0;){var M=o[a].s;g[M]=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},x=function(t,n,r){return-1==t.s?Math.max(x(t.l,n,r+1),x(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,C)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B255){A(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;A(r,m,Q[et]),m+=R[et],et>3&&(A(r,m,rt>>5&8191),m+=i[et])}else A(r,m,N[rt]),m+=P[rt]}return A(r,m,N[256]),m+P[256]},U=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=U[s-1],M=y>>13,E=8191&y,z=(1<7e3||q>24576)&&(N>423||!w)){p=C(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;Pnt&&(nt=et,K=rt)}}}W+=(J=K)-(K=A[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(r){for(var e=new t(n.length),i=0;i>1)),o=0,f=function(t){s[o++]=t};for(i=0;is.length){var h=new t(o+8+(a-i<<1));h.set(s),s=h}var l=n.charCodeAt(i);l<128||r?f(l):l<2048?(f(192|l>>6),f(128|63&l)):l>55295&&l<57344?(f(240|(l=65536+(1047552&l)|1023&n.charCodeAt(++i))>>18),f(128|l>>12&63),f(128|l>>6&63),f(128|63&l)):(f(224|l>>12),f(128|l>>6&63),f(128|63&l))}return b(s,0,o)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(let r=0,e=t.length;r{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function ka(e,t){Sa&&(k.info(e),t&&Aa(e))}function Ia(e,t){Sa&&(k.info(e),t&&setTimeout((()=>{Aa(e)}),0))}function Aa(e){Me({category:"console",data:{logger:"replay"},level:"info",message:e},{level:"info"})}class xa extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class La{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>$r)throw new xa;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?Qi(e):null}}class Oa{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(){ka("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,o)=>{const i=({data:t})=>{const a=t;if(a.method===e&&a.id===n){if(this._worker.removeEventListener("message",i),!a.success)return Sa&&k.error("[Replay]",a.response),void o(new Error("Error in compression worker"));r(a.response)}};this._worker.addEventListener("message",i),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class Ma{constructor(e){this._worker=new Oa(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=Qi(e.timestamp);(!this._earliestTimestamp||t$r?Promise.reject(new xa):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{Sa&&k.warn('[Replay] Sending "clear" message to worker failed',e)}))}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 Ta{constructor(e){this._fallback=new La,this._compression=new Ma(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 ka("[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){Sa&&k.warn("[Replay] Failed to add events when switching buffers.",e)}}}function Da({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=function(e){try{const t=e||function(){if("undefined"==typeof __SENTRY_EXCLUDE_REPLAY_WORKER__||!__SENTRY_EXCLUDE_REPLAY_WORKER__)return function(){const e=new Blob([Ea]);return URL.createObjectURL(e)}();return""}();if(!t)return;ka("[Replay] Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new Ta(n)}catch(e){ka("[Replay] Failed to create compression worker")}}(t);if(e)return e}return ka("[Replay] Using simple buffer"),new La}function Pa(){try{return"sessionStorage"in Br&&!!Br.sessionStorage}catch(e){return!1}}function Ra(e){!function(){if(!Pa())return;try{Br.sessionStorage.removeItem(zr)}catch(e){}}(),e.session=void 0}function Na(e){return void 0!==e&&Math.random()e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(ka(`[Replay] Skipping event with timestamp ${n} because it is after maxReplayDuration`,e.getOptions()._experiments.traceInternals),!1))}function $a(e){return!e.type}function Ga(e){return"transaction"===e.type}function Ya(e){return"feedback"===e.type}function Ka(e){return(t,n)=>{if(!e.isEnabled()||!$a(t)&&!Ga(t))return;const r=n&&n.statusCode;!r||r<200||r>=300||(Ga(t)?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,t):function(e,t){const n=e.getContext();t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id);if("buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();if("function"==typeof r&&!r(t))return;setTimeout((()=>{e.sendBufferedReplayOrFlush()}))}(e,t))}}function Ja(e){return t=>{e.isEnabled()&&$a(t)&&function(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0].value;if("string"!=typeof n)return;if(n.match(/reactjs\.org\/docs\/error-decoder\.html\?invariant=(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i)){ta(e,pa({category:"replay.hydrate-error"}))}}(e,t)}}function Xa(e){const t=Le();t&&t.on("beforeAddBreadcrumb",(t=>function(e,t){if(!e.isEnabled()||!Qa(t))return;const n=function(e){if(!Qa(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))return null;if("console"===e.category)return function(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return pa(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>Wr?(n=!0,`${e.slice(0,Wr)}…`):e;if("object"==typeof e)try{const t=ze(e,7);return JSON.stringify(t).length>Wr?(n=!0,`${JSON.stringify(t,null,2).slice(0,Wr)}…`):t}catch(e){}return e}));return pa({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(e);return pa(e)}(t);n&&ta(e,n)}(e,t)))}function Qa(e){return!!e.category}function es(e){return Object.assign(((t,n)=>{if(!e.isEnabled())return t;if(function(e){return"replay_event"===e.type}(t))return delete t.breadcrumbs,t;if(!$a(t)&&!Ga(t)&&!Ya(t))return t;if(!e.checkAndHandleExpiredSession())return t;if(Ya(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),function(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:ai.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}(e,t),t;if(function(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length||!t.originalException||!t.originalException.__rrweb__)}(t,n)&&!e.getOptions()._experiments.captureExceptions)return Sa&&k.log("[Replay] Ignoring error from rrweb internals",t),null;const r=function(e,t){return"buffer"===e.recordingMode&&t.message!==Vr&&!(!t.exception||t.type)&&Na(e.getOptions().errorSampleRate)}(e,t);return(r||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t}),{id:"Replay"})}function ts(e,t){return t.map((({type:t,start:n,end:r,name:o,data:i})=>{const a=e.throttledAddEvent({type:ai.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:o,startTimestamp:n,endTimestamp:r,data:i}}});return"string"==typeof a?Promise.resolve(null):a}))}function ns(e){return t=>{if(!e.isEnabled())return;const n=function(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(ts(e,[n]),!1))))}}function rs(e,t){e.isEnabled()&&null!==t&&(function(e,t){return(!Sa||!e.getOptions()._experiments.traceInternals)&&Te(t,Le())}(e,t.name)||e.addUpdate((()=>(ts(e,[t]),!0))))}function os(e){if(!e)return;const t=new TextEncoder;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=ps(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function is(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function as(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[ps(e)];if(!e)return[void 0]}catch(t){return Sa&&k.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Sa&&k.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function ss(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function us(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:i,statusCode:a,request:s,response:u}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:re({method:i,statusCode:a,request:s,response:u})}}function cs(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function ls(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:o,warnings:i}=function(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>qr,n=function(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){const t=e.slice(0,qr);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch(e){}return{body:e}}(n);return r.body=o,i&&i.length>0&&(r._meta={warnings:i}),r}function ds(e,t){return Object.keys(e).reduce(((n,r)=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=e[r]),n}),{})}function ps(e){return new URLSearchParams(e).toString()}function fs(e,t){const n=function(e,t=Br.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Br.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;if(!e.endsWith("/")&&r.endsWith("/"))return r.slice(0,-1);return r}(e);return Y(n,t)}async function hs(e,t,n){try{const r=await async function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r}=t,{url:a,method:s,status_code:u=0,request_body_size:c,response_body_size:l}=e.data,d=fs(a,n.networkDetailAllowUrls)&&!fs(a,n.networkDetailDenyUrls),p=d?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?function(e,t){if(1===e.length&&"string"!=typeof e[0])return vs(e[0],t);if(2===e.length)return vs(e[1],t);return{}}(n,t):{};if(!e)return ls(o,r,void 0);const i=ms(n),[a,s]=as(i),u=ls(o,r,a);if(s)return ss(u,s);return u}(n,t.input,c):cs(c),f=await async function(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&void 0!==o)return cs(o);const i=r?gs(r.headers,n):{};if(!r||!t&&void 0!==o)return ls(i,o,void 0);const[a,s]=await async function(e){const t=function(e){try{return e.clone()}catch(e){Sa&&k.warn("[Replay] Failed to clone response body",e)}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{const e=await function(e){return new Promise(((t,n)=>{const r=setTimeout((()=>n(new Error("Timeout while trying to read response body"))),500);(async function(e){return await e.text()})(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}(t);return[e]}catch(e){return Sa&&k.warn("[Replay] Failed to get text body from response",e),[void 0,"BODY_PARSE_ERROR"]}}(r),u=function(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const i=e&&e.length&&void 0===n?os(e):n;return r?ls(o,i,t?e:void 0):cs(i)}catch(e){return Sa&&k.warn("[Replay] Failed to serialize response body",e),ls(o,n,void 0)}}(a,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:i});if(s)return ss(u,s);return u}(d,n,t.response,l);return{startTimestamp:o,endTimestamp:i,url:a,method:s,statusCode:u,request:p,response:f}}(e,t,n),o=us("resource.fetch",r);rs(n.replay,o)}catch(e){Sa&&k.error("[Replay] Failed to capture fetch breadcrumb",e)}}function ms(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function gs(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function vs(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?gs(n,t):Array.isArray(n)?{}:ds(n,t):{}}async function ys(e,t,n){try{const r=function(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:i=r,input:a,xhr:s}=t,{url:u,method:c,status_code:l=0,request_body_size:d,response_body_size:p}=e.data;if(!u)return null;if(!s||!fs(u,n.networkDetailAllowUrls)||fs(u,n.networkDetailDenyUrls)){return{startTimestamp:o,endTimestamp:i,url:u,method:c,statusCode:l,request:cs(d),response:cs(p)}}const f=s[Ar],h=f?ds(f.request_headers,n.networkRequestHeaders):{},m=ds(function(e){const t=e.getAllResponseHeaders();if(!t)return{};return t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return e[n.toLowerCase()]=r,e}),{})}(s),n.networkResponseHeaders),[g,v]=n.networkCaptureBodies?as(a):[void 0],[y,b]=n.networkCaptureBodies?function(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return function(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Sa&&k.warn("[Replay] Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return Sa&&k.info("[Replay] Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return Sa&&k.warn("[Replay] Failed to get xhr response body",...t),[void 0]}(s):[void 0],_=ls(h,d,g),w=ls(m,p,y);return{startTimestamp:o,endTimestamp:i,url:u,method:c,statusCode:l,request:v?ss(_,v):_,response:b?ss(w,b):w}}(e,t,n),o=us("resource.xhr",r);rs(n.replay,o)}catch(e){Sa&&k.error("[Replay] Failed to capture xhr breadcrumb",e)}}function bs(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=os(r),i=n.getResponseHeader("content-length")?is(n.getResponseHeader("content-length")):function(e,t){try{return os("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch(e){return}}(n.response,n.responseType);void 0!==o&&(e.data.request_body_size=o),void 0!==i&&(e.data.response_body_size=i)}function _s(e){const t=Le();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:a}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:i,networkResponseHeaders:a};t&&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)&&(bs(t,n),ys(t,n,e)),function(e){return"fetch"===e.category}(t)&&function(e){return e&&e.response}(n)&&(!function(e,t){const{input:n,response:r}=t,o=os(n?ms(n):void 0),i=r?is(r.headers.get("content-length")):void 0;void 0!==o&&(e.data.request_body_size=o),void 0!==i&&(e.data.response_body_size=i)}(t,n),hs(t,n,e))}catch(e){Sa&&k.warn("Error when enriching network breadcrumb")}}(s,e,t)))}catch(e){}}function ws(e){const t=Le();Pr(ga(e)),Ur(ns(e)),Xa(e),_s(e);const n=es(e);var r;r=n,Ae().addEventProcessor(r),t&&(t.on("beforeSendEvent",Ja(e)),t.on("afterSendEvent",Ka(e)),t.on("createDsc",(t=>{const n=e.getSessionId();if(n&&e.isEnabled()&&"session"===e.recordingMode){e.checkAndHandleExpiredSession()&&(t.replay_id=n)}})),t.on("spanStart",(t=>{e.lastActiveSpan=t})),t.on("spanEnd",(t=>{e.lastActiveSpan=t})),t.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}function Cs(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Ss(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(Sa&&k.warn("[Replay] Received replay event after session expired."));const o=r||!t;t=!0,e.clickDetector&&da(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&o&&e.setInitialState(),!Va(e,n,o))return!0;if(!o)return!1;if(function(e,t){if(!t||!e.session||0!==e.session.segmentId)return;Va(e,function(e){const t=e.getOptions();return{type:ai.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),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,o),e.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){const t=e.eventBuffer.getEarliestTimestamp();t&&(ka(`[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&&ja(e.session))}return"session"===e.recordingMode&&e.flush(),!0}))}}async function Es({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:i}){const a=function({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:u,traceIds:c,initialTimestamp:l}=r,d=Le(),p=Ie(),f=d&&d.getTransport(),h=d&&d.getDsn();if(!(d&&f&&h&&i.sampled))return We({});const m={type:Hr,replay_start_timestamp:l/1e3,timestamp:o/1e3,error_ids:u,trace_ids:c,urls:s,replay_id:t,segment_id:n,replay_type:i.sampled},g=await async function({client:e,scope:t,replayId:n,event:r}){const o={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,o);const i=await Vt(e.getOptions(),r,o,t,e,Ae());if(!i)return null;i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:s,version:u}=a&&a.sdk||{};return i.sdk={...i.sdk,name:s||"sentry.javascript.unknown",version:u||"0.0.0"},i}({scope:p,client:d,replayId:t,event:m});if(!g)return d.recordDroppedEvent("event_processor","replay",m),ka("An event processor returned `null`, will not send event."),We({});delete g.sdkProcessingMetadata;const v=function(e,t,n,r){return an(gn(e,mn(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}(g,a,h,d.getOptions().tunnel);let y;try{y=await f.send(v)}catch(e){const t=new Error(Vr);try{t.cause=e}catch(e){}throw t}if("number"==typeof y.statusCode&&(y.statusCode<200||y.statusCode>=300))throw new ks(y.statusCode);const b=bn({},y);if(yn(b,"replay"))throw new Is(b);return y}class ks extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class Is extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function As(e,t={count:0,interval:5e3}){const{recordingData:n,options:r}=e;var o,i;if(n.length)try{return await Es(e),!0}catch(n){if(n instanceof ks||n instanceof Is)throw n;if(o="Replays",i={_retryCount:t.count},Ae().setContext(o,i),Sa&&r._experiments&&r._experiments.captureExceptions&&Gt(n),t.count>=3){const e=new Error(`${Vr} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{setTimeout((async()=>{try{await As(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const xs="__THROTTLED";function Ls(e,t,n){const r=new Map;let o=!1;return(...i)=>{const a=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{ne+t),0)>=t){const e=o;return o=!0,e?"__SKIPPED":xs}o=!1;const s=r.get(a)||0;return r.set(a,s+1),e(...i)}}class Os{constructor({options:e,recordingOptions:t}){Os.prototype.__init.call(this),Os.prototype.__init2.call(this),Os.prototype.__init3.call(this),Os.prototype.__init4.call(this),Os.prototype.__init5.call(this),Os.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],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 r,o,i;const a=n&&n.maxWait?Math.max(n.maxWait,t):0;function s(){return u(),r=e(),r}function u(){void 0!==o&&clearTimeout(o),void 0!==i&&clearTimeout(i),o=i=void 0}function c(){return o&&clearTimeout(o),o=setTimeout(s,t),a&&void 0===i&&(i=setTimeout(s,a)),r}return c.cancel=u,c.flush=function(){return void 0!==o||void 0!==i?s():r},c}((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Ls(((e,t)=>function(e,t,n){return Wa(e,t)?qa(e,t,n):Promise.resolve(null)}(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),o=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;o&&(this.clickDetector=new ua(this,o))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return Boolean(this._canvas)}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",Ia(`[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");Ia("[Replay] Starting replay in session mode",this._options._experiments.traceInternals),this._updateUserActivity();const e=Ha({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");Ia("[Replay] Starting replay in buffer mode",this._options._experiments.traceInternals);const e=Ha({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{const e=this._canvas;this._stopRecording=Ji({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:Ss(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}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{ka("[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,Ra(this)}catch(e){this._handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),ka("[Replay] Pausing replay",this._options._experiments.traceInternals))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),ka("[Replay] Resuming replay",this._options._experiments.traceInternals))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();ka("[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&&Za(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Br.location.pathname}${Br.location.hash}${Br.location.search}`,t=`${Br.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],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===xs){const e=pa({category:"replay.throttled"});this.addUpdate((()=>!Va(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||Nt(),t=e&&Rt(e),n=(t&&xt(t).data||{})[Je];if(t&&n&&["route","custom"].includes(n))return xt(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=Da({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){Sa&&k.error("[Replay]",e),Sa&&this._options._experiments&&this._options._experiments.captureExceptions&&Gt(e)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=Ha({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!za(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{Br.document.addEventListener("visibilitychange",this._handleVisibilityChange),Br.addEventListener("blur",this._handleWindowBlur),Br.addEventListener("focus",this._handleWindowFocus),Br.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(ws(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=Ca(this)}_removeListeners(){try{Br.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Br.removeEventListener("blur",this._handleWindowBlur),Br.removeEventListener("focus",this._handleWindowFocus),Br.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===Br.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=pa({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=pa({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{ya(this,e)}}_doChangeToBackgroundTasks(e){if(!this.session)return;Ba(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):ka("[Replay] Document has become active, but session has expired")}_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:ai.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){const e=(t=this.performanceEntries,t.map(_a).filter(Boolean)).concat(this.replayPerformanceEntries);var t;return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(ts(this,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&&nthis._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const o=await this.eventBuffer.finish();await As({replayId:e,recordingData:o,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(e){this._handleException(e),this.stop({reason:"sendReplay"});const t=Le();t&&t.recordDroppedEvent("send_error","replay")}}else Sa&&k.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(Sa&&k.error("[Replay] Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=nthis._options.maxReplayDuration+5e3;if(r||o)return ka(`[Replay] Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`,this._options._experiments.traceInternals),void(r&&this._debouncedFlush());const i=this.eventBuffer;if(i&&0===this.session.segmentId&&!i.hasCheckout&&ka("[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){Sa&&k.error(e)}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&ja(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=pa({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function Ms(e,t){return[...e,...t].join(",")}const Ts='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',Ds=["content-length","content-type","accept"];let Ps=!1;const Rs=e=>new Ns(e);class Ns{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:o=!0,useCompression:i=!0,workerUrl:a,_experiments:s={},maskAllText:u=!0,maskAllInputs:c=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:f=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:g=[],networkCaptureBodies:v=!0,networkRequestHeaders:y=[],networkResponseHeaders:b=[],mask:_=[],maskAttributes:w=["title","placeholder"],unmask:C=[],block:S=[],unblock:E=[],ignore:k=[],maskFn:I,beforeAddRecordingEvent:A,beforeErrorSampling:x}={}){this.name=Ns.id;const L=function({mask:e,unmask:t,block:n,unblock:r,ignore:o}){return{maskTextSelector:Ms(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:Ms(t,[]),blockSelector:Ms(n,[".sentry-block","[data-sentry-block]",'base[href="/"]']),unblockSelector:Ms(r,[]),ignoreSelector:Ms(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}({mask:_,unmask:C,block:S,unblock:E,ignore:k});if(this._recordingOptions={maskAllInputs:c,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:I,maskInputFn:I,maskAttributeFn:(e,t,n)=>function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:i}){return r?o.unmaskTextSelector&&e.matches(o.unmaskTextSelector)?i:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?i.replace(/[\S]/g,"*"):i:i}({maskAttributes:w,maskAllText:u,privacyOptions:L,key:e,value:t,el:n}),...L,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch(e){}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,15e3),maxReplayDuration:Math.min(r,Gr),stickySession:o,useCompression:i,workerUrl:a,blockAllMedia:l,maskAllInputs:c,maskAllText:u,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:f,slowClickIgnoreSelectors:h,networkDetailAllowUrls:m,networkDetailDenyUrls:g,networkCaptureBodies:v,networkRequestHeaders:Fs(y),networkResponseHeaders:Fs(b),beforeAddRecordingEvent:A,beforeErrorSampling:x,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Ts}`:Ts),this._isInitialized&&wn())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Ps}set _isInitialized(e){Ps=e}setupOnce(){wn()&&(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._maybeLoadFromReplayCanvasIntegration(),this._replay.initializeSampling())}_setup(){const e=function(e){const t=Le(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...re(e)};if(!n)return E((()=>{console.warn("SDK client is not available.")})),r;const o=en(n.replaysSessionSampleRate),i=en(n.replaysOnErrorSampleRate);null==o&&null==i&&E((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}));null!=o&&(r.sessionSampleRate=o);null!=i&&(r.errorSampleRate=i);return r}(this._initialOptions);this._replay=new Os({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{const e=Le().getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch(e){}}}function Fs(e){return[...Ds,...e.map((e=>e.toLowerCase()))]}function js(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=e||function(){const e=Le();return e&&e.getOptions()}();return!!t&&(t.enableTracing||"tracesSampleRate"in t||"tracesSampler"in t)}Ns.__initStatic();class Us{constructor(e={}){this._traceId=e.traceId||ie(),this._spanId=e.spanId||ie().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}}function Zs(e){if(!e||0===e.length)return;const t={};return e.forEach((e=>{const n=e.attributes||{},r=n[nt],o=n[rt];"string"==typeof r&&"number"==typeof o&&(t[e.name]={value:o,unit:r})})),t}const Bs="_sentryScope",zs="_sentryIsolationScope";function Hs(e){return{scope:e[Bs],isolationScope:e[zs]}}class Vs{constructor(e={}){this._traceId=e.traceId||ie(),this._spanId=e.spanId||ie().substring(16),this._startTime=e.startTimestamp||y(),this._attributes={},this.setAttributes({[et]:"manual",[Qe]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?Ct:0}}setAttribute(e,t){void 0===t?delete this._attributes[e]:this._attributes[e]=t}setAttributes(e){Object.keys(e).forEach((t=>this.setAttribute(t,e[t])))}updateStartTime(e){this._startTime=It(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this}end(e){this._endTime||(this._endTime=It(e),function(e){if(!Ye)return;const{description:t="< unknown name >",op:n="< unknown op >"}=xt(e),{spanId:r}=e.spanContext(),o=`[Tracing] Finishing "${n}" ${Rt(e)===e?"root ":""}span "${t}" with ID ${r}`;k.log(o)}(this),this._onSpanEnded())}getSpanJSON(){return re({data:this._attributes,description:this._name,op:this._attributes[Qe],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ot(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[et],_metrics_summary:vt(this),profile_id:this._attributes["sentry.profile_id"],exclusive_time:this._attributes[ot],measurements:Zs(this._events),is_segment:this._isStandaloneSpan&&Rt(this)===this||void 0,segment_id:this._isStandaloneSpan?Rt(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){Ye&&k.log("[Tracing] Adding an event to span:",e);const r=qs(t)?t:n||y(),o=qs(t)?{}:t||{},i={name:e,time:It(r),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=Le();e&&e.emit("spanEnd",this);if(!(this._isStandaloneSpan||this===Rt(this)))return;if(this._isStandaloneSpan)return void function(e){const t=Le();if(!t)return;const n=e[1];if(!n||0===n.length)return void t.recordDroppedEvent("before_send","span");const r=t.getTransport();r&&r.send(e).then(null,(e=>{Ye&&k.error("Error while sending span:",e)}))}(function(e,t){const n=Zt(e[0]),r={sent_at:(new Date).toISOString(),...function(e){return!!e.trace_id&&!!e.public_key}(n)&&{trace:n}},o=t&&t.getOptions().beforeSendSpan,i=o?e=>o(xt(e)):e=>xt(e),a=[];for(const t of e){const e=i(t);e&&a.push(dn(e))}return an(r,a)}([this],e));const t=this._convertSpanToTransaction();if(t){(Hs(this).scope||Ie()).captureEvent(t)}}_convertSpanToTransaction(){if(!Ws(xt(this)))return;this._name||(Ye&&k.warn("Transaction has no name, falling back to ``."),this._name="");const{scope:e,isolationScope:t}=Hs(this),n=(e||Ie()).getClient()||Le();if(!0!==this._sampled)return Ye&&k.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(n&&n.recordDroppedEvent("sample_rate","transaction"));const r=Pt(this).filter((e=>e!==this&&!function(e){return e instanceof Vs&&e.isStandaloneSpan()}(e))).map((e=>xt(e))).filter(Ws),o=this._attributes[Je],i={contexts:{trace:St(this)},spans:r,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,...re({dynamicSamplingContext:Zt(this)})},_metrics_summary:vt(this),...o&&{transaction_info:{source:o}}},a=Zs(this._events);return a&&Object.keys(a).length&&(Ye&&k.log("[Measurements] Adding measurements to transaction",JSON.stringify(a,void 0,2)),i.measurements=a),i}}function qs(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function Ws(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}const $s="__SENTRY_SUPPRESS_TRACING__";function Gs(e){const t=Js();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Ks(e),r=e.scope||Ie(),o=Qs(r);return e.onlyIfParent&&!o?new Us:Ys({parentSpan:o,spanContext:n,forceTransaction:e.forceTransaction,scope:r})}function Ys({parentSpan:e,spanContext:t,forceTransaction:n,scope:r}){if(!js())return new Us;const o=Ae();let i;if(e&&!n)i=function(e,t,n){const{spanId:r,traceId:o}=e.spanContext(),i=!t.getScopeData().sdkProcessingMetadata[$s]&&Lt(e),a=i?new Vs({...n,parentSpanId:r,traceId:o,sampled:i}):new Us({traceId:o});Dt(e,a);const s=Le();s&&(s.emit("spanStart",a),n.endTimestamp&&s.emit("spanEnd",a));return a}(e,r,t),Dt(e,i);else if(e){const n=Zt(e),{traceId:o,spanId:a}=e.spanContext(),s=Lt(e);i=Xs({traceId:o,parentSpanId:a,...t},r,s),jt(i,n)}else{const{traceId:e,dsc:n,parentSpanId:a,sampled:s}={...o.getPropagationContext(),...r.getPropagationContext()};i=Xs({traceId:e,parentSpanId:a,...t},r,s),n&&jt(i,n)}return function(e){if(!Ye)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=xt(e),{spanId:o}=e.spanContext(),i=Lt(e),a=Rt(e),s=a===e,u=`[Tracing] Starting ${i?"sampled":"unsampled"} ${s?"root ":""}span`,c=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&c.push(`parent ID: ${r}`),!s){const{op:e,description:t}=xt(a);c.push(`root ID: ${a.spanContext().spanId}`),e&&c.push(`root op: ${e}`),t&&c.push(`root description: ${t}`)}k.log(`${u}\n ${c.join("\n ")}`)}(i),function(e,t,n){e&&(J(e,zs,n),J(e,Bs,t))}(i,r,o),i}function Ks(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=It(e.startTime),delete n.startTime,n}return t}function Js(){return ke(I())}function Xs(e,t,n){const r=Le(),o=r&&r.getOptions()||{},{name:i="",attributes:a}=e,[s,u]=t.getScopeData().sdkProcessingMetadata[$s]?[!1]:function(e,t){if(!js(e))return[!1];let n;n="function"==typeof e.tracesSampler?e.tracesSampler(t):void 0!==t.parentSampled?t.parentSampled:void 0!==e.tracesSampleRate?e.tracesSampleRate:1;const r=en(n);return void 0===r?(Ye&&k.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()t&&"function"==typeof e.updateStartTime&&e.updateStartTime(t),function(e,t){const n=Js();return n.withActiveSpan?n.withActiveSpan(e,t):xe((n=>(me(n,e||void 0),t(n))))}(e,(()=>{const e=Gs({startTime:t,...r});return e&&e.end(n),e}))}function ru(){return En&&En.addEventListener&&En.performance}function ou(e){return e/1e3}const iu=2147483647;let au,su,uu=0,cu={};function lu(){const e=ru();if(e&&_){e.mark&&En.performance.mark("sentry-tracing-init");const t=br("fid",(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=ou(_),r=ou(t.startTime);Cn&&k.log("[Measurements] Adding FID"),cu.fid={value:e.value,unit:"millisecond"},cu["mark.fid"]={value:n+r,unit:"second"}}),mr,sr),n=function(e,t=!1){return br("cls",e,hr,ar,t)}((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Cn&&k.log("[Measurements] Adding CLS"),cu.cls={value:e.value,unit:""},su=t)}),!0),r=dr((({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Cn&&k.log("[Measurements] Adding LCP"),cu.lcp={value:e.value,unit:"millisecond"},au=t)}),!0),o=function(e){return br("ttfb",e,vr,cr)}((({metric:e})=>{e.entries[e.entries.length-1]&&(Cn&&k.log("[Measurements] Adding TTFB"),cu.ttfb={value:e.value,unit:"millisecond"})}));return()=>{t(),n(),r(),o()}}return()=>{}}function du(e){const t=ru();if(!t||!En.performance.getEntries||!_)return;Cn&&k.log("[Tracing] Adding & adjusting spans using Performance API");const n=ou(_),r=t.getEntries(),{op:o,start_timestamp:i}=xt(e);if(r.slice(uu).forEach((t=>{const r=ou(t.startTime),a=ou(t.duration);if(!("navigation"===o&&i&&n+r{pu(e,t,r,n)})),pu(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),pu(e,t,"fetch",n,"cache","domainLookupStart"),pu(e,t,"domainLookup",n,"DNS"),function(e,t,n){t.responseEnd&&(nu(e,n+ou(t.requestStart),n+ou(t.responseEnd),{op:"browser",name:"request",attributes:{[et]:"auto.ui.browser.metrics"}}),nu(e,n+ou(t.responseStart),n+ou(t.responseEnd),{op:"browser",name:"response",attributes:{[et]:"auto.ui.browser.metrics"}}))}(e,t,n)}(e,t,n);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,o){const i=o+n,a=i+r;nu(e,i,a,{name:t.name,op:t.entryType,attributes:{[et]:"auto.resource.browser.metrics"}})}(e,t,r,a,n);const o=Dn(),i=t.startTime{if(!cu[e]||!i||n>=i)return;const t=cu[e].value,r=n+ou(t),o=Math.abs(1e3*(r-i)),a=o-t;Cn&&k.log(`[Measurements] Normalized ${e} from ${t} to ${o} (${a})`),cu[e].value=o}));const t=cu["mark.fid"];t&&cu.fid&&(nu(e,t.value,t.value+ou(cu.fid.value),{name:"first input delay",op:"ui.action",attributes:{[et]:"auto.ui.browser.metrics"}}),delete cu["mark.fid"]),"fcp"in cu||delete cu.cls,Object.keys(cu).forEach((e=>{!function(e,t,n){const r=Nt(),o=r&&Rt(r);o&&o.addEvent(e,{[rt]:t,[nt]:n})}(e,cu[e].value,cu[e].unit)})),function(e){au&&(Cn&&k.log("[Measurements] Adding LCP Data"),au.element&&e.setAttribute("lcp.element",H(au.element)),au.id&&e.setAttribute("lcp.id",au.id),au.url&&e.setAttribute("lcp.url",au.url.trim().slice(0,200)),e.setAttribute("lcp.size",au.size));su&&su.sources&&(Cn&&k.log("[Measurements] Adding CLS Data"),su.sources.forEach(((t,n)=>e.setAttribute(`cls.source.${n+1}`,H(t.node)))))}(e)}au=void 0,su=void 0,cu={}}function pu(e,t,n,r,o,i){const a=i?t[i]:t[`${n}End`],s=t[`${n}Start`];s&&a&&nu(e,r+ou(s),r+ou(a),{op:"browser",name:o||n,attributes:{[et]:"auto.ui.browser.metrics"}})}function fu(e,t,n,r){const o=t[n];null!=o&&o{const t=Le();if(!t||null==e.value)return;const n=e.entries.find((t=>t.duration===e.value&&mu[t.name]));if(!n)return;const r=mu[n.name],o=t.getOptions(),i=ou(_+n.startTime),a=ou(e.value),s=Ie(),u=Nt(),c=u?Rt(u):void 0,l=c?xt(c).description:void 0,d=s.getUser(),p=t.getIntegrationByName("Replay"),h=p&&p.getReplayId(),m=void 0!==d?d.email||d.id||d.ip_address:void 0,g=f([s,"access",e=>e.getScopeData,"call",e=>e(),"access",e=>e.contexts,"optionalAccess",e=>e.profile,"optionalAccess",e=>e.profile_id]),v=Gs({name:H(n.target),op:`ui.interaction.${r}`,attributes:re({release:o.release,environment:o.environment,transaction:l,[ot]:e.value,user:m||void 0,profile_id:g||void 0,replay_id:h||void 0}),startTime:i,experimental:{standalone:!0}});v.addEvent("inp",{[nt]:"millisecond",[rt]:e.value}),v.end(i+a)},br("inp",e,yr,lr));return()=>{t()}}var e;return()=>{}}const mu={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};const gu={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},vu="heartbeatFailed",yu="idleTimeout",bu="finalTimeout",_u="externalFinish";function wu(e,t={}){const n=new Map;let r,o=!1,i=_u,a=!t.disableAutoFinish;const{idleTimeout:s=gu.idleTimeout,finalTimeout:u=gu.finalTimeout,childSpanTimeout:c=gu.childSpanTimeout,beforeSpanEnd:l}=t,d=Le();if(!d||!js())return new Us;const p=Ie(),f=Nt(),h=function(e){const t=Gs(e);return me(Ie(),t),Ye&&k.log("[Tracing] Started span is an idle span"),t}(e);function m(e=y()){const t=Pt(h).filter((e=>e!==h));if(!t.length)return void h.end(e);const n=t.map((e=>xt(e).timestamp)).filter((e=>!!e)),r=n.length?Math.max(...n):void 0,o=It(e),i=xt(h).start_timestamp,a=Math.min(i?i+u/1e3:1/0,Math.max(i||-1/0,Math.min(o,r||1/0)));h.end(a)}function g(){r&&(clearTimeout(r),r=void 0)}function v(e){g(),r=setTimeout((()=>{!o&&0===n.size&&a&&(i=yu,m(e))}),s)}function b(e){r=setTimeout((()=>{!o&&a&&(i=vu,m(e))}),c)}function _(){o=!0,n.clear(),l&&l(h),me(p,f);const e=xt(h),{timestamp:t,start_timestamp:r}=e;if(!t||!r)return;(e.data||{})[tt]||h.setAttribute(tt,i),k.log(`[Tracing] Idle span "${e.op}" finished`);const a=Pt(h).filter((e=>e!==h));let c=0;a.forEach((e=>{e.isRecording()&&(e.setStatus({code:_t,message:"cancelled"}),e.end(t),Ye&&k.log("[Tracing] Cancelling span since span ended early",JSON.stringify(e,void 0,2)));const n=xt(e),{timestamp:r=0,start_timestamp:o=0}=n,i=o<=t,a=r-o<(u+s)/1e3;if(Ye){const t=JSON.stringify(e,void 0,2);i?a||k.log("[Tracing] Discarding span since it finished after idle span final timeout",t):k.log("[Tracing] Discarding span since it happened after idle span was finished",t)}a&&i||(!function(e,t){e[Mt]&&e[Mt].delete(t)}(h,e),c++)})),c>0&&h.setAttribute("sentry.idle_span_discarded_spans",c)}return d.on("spanStart",(e=>{if(o||e===h||xt(e).timestamp)return;var t;Pt(h).includes(e)&&(t=e.spanContext().spanId,g(),n.set(t,!0),b(y()+c/1e3))})),d.on("spanEnd",(e=>{var t;o||(t=e.spanContext().spanId,n.has(t)&&n.delete(t),0===n.size&&v(y()+s/1e3),e===h&&_())})),d.on("idleSpanEnableAutoFinish",(e=>{e===h&&(a=!0,v(),n.size&&b())})),t.disableAutoFinish||v(),setTimeout((()=>{o||(h.setStatus({code:_t,message:"deadline_exceeded"}),i=bu,m())}),u),h}let Cu=null;function Su(e){const t="error";Er(t,e),kr(t,Eu)}function Eu(){Cu=h.onerror,h.onerror=function(e,t,n,r,o){return Ir("error",{column:r,error:o,line:n,msg:e,url:t}),!(!Cu||Cu.__SENTRY_LOADER__)&&Cu.apply(this,arguments)},h.onerror.__SENTRY_INSTRUMENTED__=!0}let ku=null;function Iu(e){const t="unhandledrejection";Er(t,e),kr(t,Au)}function Au(){ku=h.onunhandledrejection,h.onunhandledrejection=function(e){return Ir("unhandledrejection",e),!(ku&&!ku.__SENTRY_LOADER__)||ku.apply(this,arguments)},h.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let xu=!1;function Lu(){const e=Nt(),t=e&&Rt(e);if(t){const e="internal_error";Ye&&k.log(`[Tracing] Root span: ${e} -> Global error occured`),t.setStatus({code:_t,message:e})}}Lu.tag="sentry_tracingErrorCallback";const Ou="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Mu=h;let Tu=0;function Du(){return Tu>0}function Pu(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(Q(e))return e}catch(t){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const o=r.map((e=>Pu(e,t)));return e.apply(this,o)}catch(e){throw Tu++,setTimeout((()=>{Tu--})),xe((n=>{n.addEventProcessor((e=>(t.mechanism&&(ue(e,void 0,void 0),ce(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),Gt(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}X(r,e),J(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}function Ru(e,t,n,r,o="auto.http.browser"){if(!e.fetchData)return;const i=js()&&t(e.fetchData.url);if(e.endTimestamp&&i){const t=e.fetchData.__span;if(!t)return;const n=r[t];return void(n&&(!function(e,t){if(t.response){wt(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:_t,message:"internal_error"});e.end()}(n,e),delete r[t]))}const a=Ie(),s=Le(),{method:u,url:c}=e.fetchData,l=function(e){try{return new URL(e).href}catch(e){return}}(c),d=l?eu(l).host:void 0,p=!!Nt(),f=i&&p?Gs({name:`${u} ${c}`,attributes:{url:c,type:"fetch","http.method":u,"http.url":l,"server.address":d,[et]:o,[Qe]:"http.client"}}):new Us;if(e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)&&s){const t=e.args[0];e.args[1]=e.args[1]||{};const n=e.args[1];n.headers=function(e,t,n,r,o){const i=Ae(),{traceId:a,spanId:s,sampled:u,dsc:c}={...i.getPropagationContext(),...n.getPropagationContext()},l=o?kt(o):ht(a,s,u),d=lt(c||(o?Zt(o):Ut(a,t))),p=r.headers||("undefined"!=typeof Request&&U(e,Request)?e.headers:void 0);if(p){if("undefined"!=typeof Headers&&U(p,Headers)){const e=new Headers(p);return e.append("sentry-trace",l),d&&e.append(it,d),e}if(Array.isArray(p)){const e=[...p,["sentry-trace",l]];return d&&e.push([it,d]),e}{const e="baggage"in p?p.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),d&&t.push(d),{...p,"sentry-trace":l,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":l,baggage:d}}(t,s,a,n,js()&&p?f:void 0)}return f}const Nu=h;function Fu(){if(!("fetch"in Nu))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function ju(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Uu(e){const t="fetch";Er(t,e),kr(t,Zu)}function Zu(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!Fu())return!1;if(ju(Nu.fetch))return!0;let e=!1;const t=Nu.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=ju(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){w&&k.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&K(h,"fetch",(function(e){return function(...t){const{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:zu(t),method:Bu(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:zu(t),method:Bu(t,"method")?String(t.method).toUpperCase():"GET"}}(t),o={args:t,fetchData:{method:n,url:r},startTimestamp:1e3*y()};return Ir("fetch",{...o}),e.apply(h,t).then((e=>(Ir("fetch",{...o,endTimestamp:1e3*y(),response:e}),e)),(e=>{throw Ir("fetch",{...o,endTimestamp:1e3*y(),error:e}),e}))}}))}function Bu(e,t){return!!e&&"object"==typeof e&&!!e[t]}function zu(e){return"string"==typeof e?e:e?Bu(e,"url")?e.url:e.toString?e.toString():"":""}const Hu={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function Vu(e){const{traceFetch:t,traceXHR:n,shouldCreateSpanForRequest:r,enableHTTPTimings:o,tracePropagationTargets:i}={traceFetch:Hu.traceFetch,traceXHR:Hu.traceXHR,...e},a="function"==typeof r?r:e=>!0,s=e=>function(e,t){const n=Mu.location&&Mu.location.href;if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch(e){return!1}const i=r.origin===o;return t?Y(r.toString(),t)||i&&Y(r.pathname,t):i}{const n=!!e.match(/^\/(?!\/)/);return t?Y(e,t):n}}(e,i),u={};t&&Uu((e=>{const t=Ru(e,a,s,u);if(t){const n=$u(e.fetchData.url),r=n?eu(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}o&&t&&qu(t)})),n&&xr((e=>{const t=function(e,t,n,r){const o=e.xhr,i=o&&o[Ar];if(!o||o.__sentry_own_request__||!i)return;const a=js()&&t(i.url);if(e.endTimestamp&&a){const e=o.__sentry_xhr_span_id__;if(!e)return;const t=r[e];return void(t&&void 0!==i.status_code&&(wt(t,i.status_code),t.end(),delete r[e]))}const s=$u(i.url),u=s?eu(s).host:void 0,c=!!Nt(),l=a&&c?Gs({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":s,url:i.url,"server.address":u,[et]:"auto.http.browser",[Qe]:"http.client"}}):new Us;o.__sentry_xhr_span_id__=l.spanContext().spanId,r[o.__sentry_xhr_span_id__]=l;const d=Le();o.setRequestHeader&&n(i.url)&&d&&function(e,t,n){const r=Ie(),o=Ae(),{traceId:i,spanId:a,sampled:s,dsc:u}={...o.getPropagationContext(),...r.getPropagationContext()},c=n&&js()?kt(n):ht(i,a,s),l=lt(u||(n?Zt(n):Ut(i,t)));!function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(it,n)}catch(e){}}(e,c,l)}(o,d,js()&&c?l:void 0);return l}(e,a,s,u);o&&t&&qu(t)}))}function qu(e){const{url:t}=xt(e).data||{};if(!t||"string"!=typeof t)return;const n=pr("resource",(({entries:r})=>{r.forEach((r=>{if(function(e){return"resource"===e.entryType&&"initiatorType"in e&&"string"==typeof e.nextHopProtocol&&("fetch"===e.initiatorType||"xmlhttprequest"===e.initiatorType)}(r)&&r.name.endsWith(t)){(function(e){const{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(const o of e){if("/"===o){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=o}r===e&&(t=r);return{name:t,version:n}}(e.nextHopProtocol),r=[];if(r.push(["network.protocol.version",n],["network.protocol.name",t]),!_)return r;return[...r,["http.request.redirect_start",Wu(e.redirectStart)],["http.request.fetch_start",Wu(e.fetchStart)],["http.request.domain_lookup_start",Wu(e.domainLookupStart)],["http.request.domain_lookup_end",Wu(e.domainLookupEnd)],["http.request.connect_start",Wu(e.connectStart)],["http.request.secure_connection_start",Wu(e.secureConnectionStart)],["http.request.connection_end",Wu(e.connectEnd)],["http.request.request_start",Wu(e.requestStart)],["http.request.response_start",Wu(e.responseStart)],["http.request.response_end",Wu(e.responseEnd)]]})(r).forEach((t=>e.setAttribute(...t))),setTimeout(n)}}))}))}function Wu(e=0){return((_||performance.timeOrigin)+e)/1e3}function $u(e){try{return new URL(e,Mu.location.origin).href}catch(e){return}}const Gu={...gu,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!0,_experiments:{},...Hu},Yu=(e={})=>{xu||(xu=!0,Su(Lu),Iu(Lu));const{enableInp:t,enableLongTask:n,_experiments:{enableInteractions:r},beforeStartSpan:o,idleTimeout:i,finalTimeout:a,childSpanTimeout:s,markBackgroundSpan:u,traceFetch:c,traceXHR:l,shouldCreateSpanForRequest:d,enableHTTPTimings:p,instrumentPageLoad:f,instrumentNavigation:h}={...Gu,...e},m=lu();t&&hu(),n&&pr("longtask",(({entries:e})=>{for(const t of e){if(!Nt())return;const e=ou(_+t.startTime),n=ou(t.duration),r=Gs({name:"Main UI thread blocked",op:"ui.long-task",startTime:e,attributes:{[et]:"auto.ui.browser.metrics"}});r&&r.end(e+n)}})),r&&pr("event",(({entries:e})=>{for(const t of e){if(!Nt())return;if("click"===t.name){const e=ou(_+t.startTime),n=ou(t.duration),r={name:H(t.target),op:`ui.interaction.${t.name}`,startTime:e,attributes:{[et]:"auto.ui.browser.metrics"}},o=q(t.target);o&&(r.attributes["ui.component_name"]=o);const i=Gs(r);i&&i.end(e+n)}}}));const g={name:void 0,source:void 0};function v(e,t){const n="pageload"===t.op,r=o?o(t):t,u=r.attributes||{};t.name!==r.name&&(u[Je]="custom",r.attributes=u),g.name=r.name,g.source=u[Je];const c=wu(r,{idleTimeout:i,finalTimeout:a,childSpanTimeout:s,disableAutoFinish:n,beforeSpanEnd:e=>{m(),du(e)}});function l(){["interactive","complete"].includes(Mu.document.readyState)&&e.emit("idleSpanEnableAutoFinish",c)}return n&&Mu.document&&(Mu.document.addEventListener("readystatechange",(()=>{l()})),l()),c}return{name:"BrowserTracing",afterAllSetup(e){let t,n=Mu.location&&Mu.location.href;e.on("startNavigationSpan",(n=>{Le()===e&&(t&&(Ou&&k.log(`[Tracing] Finishing current root span with op: ${xt(t).op}`),t.end()),t=v(e,{op:"navigation",...n}))})),e.on("startPageLoadSpan",((n,r={})=>{if(Le()!==e)return;t&&(Ou&&k.log(`[Tracing] Finishing current root span with op: ${xt(t).op}`),t.end());const o=ft(r.sentryTrace||Ku("sentry-trace"),r.baggage||Ku("baggage"));Ie().setPropagationContext(o),t=v(e,{op:"pageload",...n})})),e.on("spanEnd",(e=>{const t=xt(e).op;if(e!==Rt(e)||"navigation"!==t&&"pageload"!==t)return;const n=Ie(),r=n.getPropagationContext();n.setPropagationContext({...r,sampled:void 0!==r.sampled?r.sampled:Lt(e),dsc:r.dsc||Zt(e)})})),Mu.location&&(f&&function(e,t,n){e.emit("startPageLoadSpan",t,n),Ie().setTransactionName(t.name);const r=Nt();r&&xt(r).op}(e,{name:Mu.location.pathname,startTime:_?_/1e3:void 0,attributes:{[Je]:"url",[et]:"auto.pageload.browser"}}),h&&Ur((({to:t,from:r})=>{void 0===r&&n&&-1!==n.indexOf(t)?n=void 0:r!==t&&(n=void 0,function(e,t){Ie().setPropagationContext(Ju()),Ae().setPropagationContext(Ju()),e.emit("startNavigationSpan",t),Ie().setTransactionName(t.name);const n=Nt();n&&xt(n).op}(e,{name:Mu.location.pathname,attributes:{[Je]:"url",[et]:"auto.navigation.browser"}}))}))),u&&(Mu&&Mu.document?Mu.document.addEventListener("visibilitychange",(()=>{const e=Nt();if(!e)return;const t=Rt(e);if(Mu.document.hidden&&t){const e="cancelled",{op:n,status:r}=xt(t);Ou&&k.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:_t,message:e}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}})):Ou&&k.warn("[Tracing] Could not set up background tab detection due to lack of global document")),r&&function(e,t,n,r){let o;const i=()=>{const i="ui.action.click",a=Nt(),s=a&&Rt(a);if(s){const e=xt(s).op;if(["navigation","pageload"].includes(e))return void(Ou&&k.warn(`[Tracing] Did not create ${i} span because a pageload or navigation span is in progress.`))}o&&(o.setAttribute(tt,"interactionInterrupted"),o.end(),o=void 0),r.name?o=wu({name:r.name,op:i,attributes:{[Je]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n}):Ou&&k.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`)};Mu.document&&addEventListener("click",i,{once:!1,capture:!0})}(i,a,s,g),Vu({traceFetch:c,traceXHR:l,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:d,enableHTTPTimings:p})}}};function Ku(e){const t=(n=`meta[name=${e}]`,B.document&&B.document.querySelector?B.document.querySelector(n):null);var n;return t?t.getAttribute("content"):void 0}function Ju(){return{traceId:ie(),spanId:ie().substring(16)}}const Xu=[];function Qu(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach((e=>{e.isDefaultInstance=!0})),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?de(n(t)):t;const o=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.keys(t).map((e=>t[e]))}(r),i=function(e,t){for(let n=0;n"Debug"===e.name));if(-1!==i){const[e]=o.splice(i,1);o.push(e)}return o}function ec(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function tc(e,t,n){if(n[t.name])Ye&&k.log(`Integration skipped because it was already installed: ${t.name}`);else{if(n[t.name]=t,-1===Xu.indexOf(t.name)&&"function"==typeof t.setupOnce&&(t.setupOnce(),Xu.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),"function"==typeof t.preprocessEvent){const n=t.preprocessEvent.bind(t);e.on("preprocessEvent",((t,r)=>n(t,r,e)))}if("function"==typeof t.processEvent){const n=t.processEvent.bind(t),r=Object.assign(((t,r)=>n(t,r,e)),{id:t.name});e.addEventProcessor(r)}Ye&&k.log(`Integration installed: ${t.name}`)}}const nc=1e6,rc=String(0),oc="main";let ic="",ac="",sc="",uc=Mu.navigator&&Mu.navigator.userAgent||"",cc="";const lc=Mu.navigator&&Mu.navigator.language||Mu.navigator&&Mu.navigator.languages&&Mu.navigator.languages[0]||"";const dc=Mu.navigator&&Mu.navigator.userAgentData;var pc;function fc(e){return function(e){return!("thread_metadata"in e)}(e)?function(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[rc]:{name:oc}}};if(!e.samples.length)return r;const o=e.samples[0].timestamp,i="number"==typeof performance.timeOrigin?performance.timeOrigin:_||0,a=i-(_||i);for(let i=0;i{if(ic=e.platform||"",sc=e.architecture||"",cc=e.model||"",ac=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){const t=e.fullVersionList[e.fullVersionList.length-1];uc=`${t.brand} ${t.version}`}})).catch((e=>{}));const gc=new WeakMap;function vc(e){const t=h._sentryDebugIds;if(!t)return[];const n=Le(),r=n&&n.getOptions(),o=r&&r.stackParser;if(!o)return[];let i;const a=gc.get(o);a?i=a:(i=new Map,gc.set(o,i));const s=Object.keys(t).reduce(((e,n)=>{let r;const a=i.get(n);a?r=a:(r=o(n),i.set(n,r));for(let o=r.length-1;o>=0;o--){const i=r[o],a=i&&i.filename;if(i&&a){e[a]=t[n];break}}return e}),{}),u=[];for(const t of e)t&&s[t]&&u.push({type:"sourcemap",code_file:t,debug_id:s[t]});return u}let yc=!1;const bc=3e4;function _c(e){if(yc)return Ou&&k.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return Ou&&k.log("[Profiling] Discarding profile because transaction was not sampled."),!1;const t=Le(),n=t&&t.getOptions();if(!n)return Ou&&k.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;if(!("number"!=typeof(o=r)&&"boolean"!=typeof o||"number"==typeof o&&isNaN(o)?(Ou&&k.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),0):!0===o||!1===o||!(o<0||o>1)||(Ou&&k.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${o}.`),0)))return Ou&&k.warn("[Profiling] Discarding profile because of invalid sample rate."),!1;var o;if(!r)return Ou&&k.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1;return!!(!0===r||Math.random(){i&&(Mu.clearTimeout(i),i=void 0),Ou&&k.log(`[Profiling] stopped profiling of span: ${xt(e).description}`),t?function(e,t){if(Cc.set(e,t),Cc.size>30){const e=Cc.keys().next().value;Cc.delete(e)}}(r,t):Ou&&k.log(`[Profiling] profiler returned null profile for: ${xt(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started")})).catch((e=>{Ou&&k.log("[Profiling] error while stopping profiler:",e)}))}Ie().setContext("profile",{profile_id:r,start_timestamp:t});let i=Mu.setTimeout((()=>{Ou&&k.log("[Profiling] max profile duration elapsed, stopping profiling for:",xt(e).description),o()}),bc);const a=e.end.bind(e);e.end=function(){return e?(o().then((()=>{a()}),(()=>{a()})),e):a()}}const kc=()=>({name:"BrowserProfiling",setup(e){const t=Nt(),n=t&&Rt(t);n&&mc(n)&&_c(n)&&Ec(n),e.on("spanStart",(e=>{e===Rt(e)&&_c(e)&&Ec(e)})),e.on("beforeEnvelope",(e=>{if(!Cc.size)return;const t=function(e){const t=[];return un(e,((e,n)=>{if("transaction"===n)for(let n=1;n({name:"InboundFilters",processEvent(t,n,r){const o=r.getOptions(),i=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Ic],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,o);return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return Ye&&k.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${se(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}`));return t}(e).some((e=>Y(e,t)))}(e,t.ignoreErrors))return Ye&&k.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${se(e)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Y(n,t)}(e,t.ignoreTransactions))return Ye&&k.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${se(e)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=xc(e);return!!n&&Y(n,t)}(e,t.denyUrls))return Ye&&k.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${se(e)}.\nUrl: ${xc(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=xc(e);return!n||Y(n,t)}(e,t.allowUrls))return Ye&&k.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${se(e)}.\nUrl: ${xc(e)}`),!0;return!1}(t,i)?null:t}});function xc(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&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return Ye&&k.error(`Cannot extract url for event ${se(e)}`),null}}let Lc;const Oc=new WeakMap,Mc=()=>({name:"FunctionToString",setupOnce(){Lc=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Q(this),n=Oc.has(Le())&&void 0!==t?t:this;return Lc.apply(n,e)}}catch(e){}},setup(e){Oc.set(e,!0)}}),Tc=()=>{let e;return{name:"Dedupe",processEvent(t){if(t.type)return t;try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Pc(e,t))return!1;if(!Dc(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Rc(t),r=Rc(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Pc(e,t))return!1;if(!Dc(e,t))return!1;return!0}(e,t))return!0;return!1}(t,e))return Ye&&k.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=t}}};function Dc(e,t){let n=Nc(e),r=Nc(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let e=0;e{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})));Ie().update(t.initialScope);const n=new e(t);!function(e){Ie().setClient(e),function(e){const t=A(I());t.hub&&"function"==typeof t.hub.getStackTop&&(t.hub.getStackTop().client=e)}(e)}(n),n.init()}class jc 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}}const Uc="7";function Zc(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Bc(e,t){return n={sentry_key:e.publicKey,sentry_version:Uc,...t&&{sentry_client:`${t.name}/${t.version}`}},Object.keys(n).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`)).join("&");var n}function zc(e,t,n){return t||`${function(e){return`${Zc(e)}${e.projectId}/envelope/`}(e)}?${Bc(e,n)}`}const Hc="Not capturing exception because it's already been captured.";class Vc{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=on(e.dsn):Ye&&k.warn("No DSN provided, client will not send events."),this._dsn){const t=zc(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){const r=ie();if(le(e))return Ye&&k.log(Hc),r;const o={event_id:r,...t};return this._process(this.eventFromException(e,o).then((e=>this._captureEvent(e,o,n)))),o.event_id}captureMessage(e,t,n,r){const o={event_id:ie(),...n},i=P(e)?e:String(e),a=R(e)?this.eventFromMessage(i,t,o):this.eventFromException(e,o);return this._process(a.then((e=>this._captureEvent(e,o,r)))),o.event_id}captureEvent(e,t,n){const r=ie();if(t&&t.originalException&&le(t.originalException))return Ye&&k.log(Hc),r;const o={event_id:r,...t},i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,o,i||n)),o.event_id}captureSession(e){"string"!=typeof e.release?Ye&&k.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),fe(e,{init:!1}))}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.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):We(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];tc(this,e,this._integrations),t||ec(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){const o=mn(n),i=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 a=gn(e,o,r,t);return delete e.sdkProcessingMetadata,an(a,[[{type:i},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=sn(n,pn(e));const r=this.sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=function(e,t,n,r){const o=mn(n);return an({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:nn(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}`;Ye&&k.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)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(Ye&&k.error("Error while sending event:",e),e))):(Ye&&k.error("Transport disabled"),We({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=function(e,t){const n={};return t.forEach((t=>{t&&tc(e,t,n)})),n}(this,e),ec(this,e)}_updateSessionFromEvent(e,t){let n=!1,r=!1;const o=t.exception&&t.exception.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const i="ok"===e.status;(i&&0===e.errors||i&&n)&&(fe(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new Ge((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,t,n,r=Ae()){const o=this.getOptions(),i=Object.keys(this._integrations);return!t.integrations&&i.length>0&&(t.integrations=i),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Vt(o,e,t,n,this,r).then((e=>{if(null===e)return e;const t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){const{traceId:n,spanId:r,parentSpanId:o,dsc:i}=t;e.contexts={trace:re({trace_id:n,span_id:r,parent_span_id:o}),...e.contexts};const a=i||Ut(n,this);e.sdkProcessingMetadata={dynamicSamplingContext:a,...e.sdkProcessingMetadata}}return e}))}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{if(Ye){const t=e;"log"===t.logLevel?k.log(t.message):k.warn(t)}}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r,i=Wc(e),a=qc(e),s=e.type||"error",u=`before send for type \`${s}\``,c=void 0===o?void 0:en(o);if(a&&"number"==typeof c&&Math.random()>c)return this.recordDroppedEvent("sample_rate","error",e),$e(new jc(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const l="replay_event"===s?"replay":s,d=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,d).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,e),new jc("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const o=function(e,t,n){const{beforeSend:r,beforeSendTransaction:o,beforeSendSpan:i}=e;if(qc(t)&&r)return r(t,n);if(Wc(t)){if(t.spans&&i){const e=[];for(const n of t.spans){const t=i(n);t&&e.push(t)}t.spans=e}if(o)return o(t,n)}return t}(r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(j(e))return e.then((e=>{if(!N(e)&&null!==e)throw new jc(n);return e}),(e=>{throw new jc(`${t} rejected with ${e}`)}));if(!N(e)&&null!==e)throw new jc(n);return e}(o,u)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",l,e),new jc(`${u} returned \`null\`, will not send event.`,"log");const o=n&&n.getSession();!i&&o&&this._updateSessionFromEvent(o,r);const a=r.transaction_info;if(i&&a&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...a,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof jc)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new jc(`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)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}}function qc(e){return void 0===e.type}function Wc(e){return"transaction"===e.type}const $c="8.2.1";function Gc(e,t,n=[t],r="npm"){const o=e._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${t}`,packages:n.map((e=>({name:`${r}:@sentry/${e}`,version:$c}))),version:$c}),e._metadata=o}function Yc(e,t){const n=Xc(e,t),r={type:t&&t.name,value:el(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Kc(e,t,n,r){const o=Le(),i=o&&o.getOptions().normalizeDepth,a=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}return}(t),s={__serialized__:He(t,i)};if(a)return{exception:{values:[Yc(e,a)]},extra:s};const u={exception:{values:[{type:F(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:rl(t,{isUnhandledRejection:r})}]},extra:s};if(n){const t=Xc(e,n);t.length&&(u.exception.values[0].stacktrace={frames:t})}return u}function Jc(e,t){return{exception:{values:[Yc(e,t)]}}}function Xc(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&Qc.test(e.message))return 1;return 0}(t),o=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,o)}catch(e){}return[]}const Qc=/Minified React error #\d+;/i;function el(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function tl(e,t,n,r,o){let i;if(M(t)&&t.error){return Jc(e,t.error)}if(T(t)||O(t,"DOMException")){const o=t;if("stack"in t)i=Jc(e,t);else{const t=o.name||(T(o)?"DOMError":"DOMException"),a=o.message?`${t}: ${o.message}`:t;i=nl(e,a,n,r),ue(i,a)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}if(L(t))return Jc(e,t);if(N(t)||F(t)){return i=Kc(e,t,n,o),ce(i,{synthetic:!0}),i}return i=nl(e,t,n,r),ue(i,`${t}`,void 0),ce(i,{synthetic:!0}),i}function nl(e,t,n,r){const o={};if(r&&n){const r=Xc(e,n);r.length&&(o.exception={values:[{value:t,stacktrace:{frames:r}}]})}if(P(t)){const{__sentry_template_string__:e,__sentry_template_values__:n}=t;return o.logentry={message:e,params:n},o}return o.message=t,o}function rl(e,{isUnhandledRejection:t}){const n=function(e,t=40){const n=Object.keys(ee(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return W(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:W(r,t)}return""}(e),r=t?"promise rejection":"exception";if(M(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if(F(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 ${r}`}return`Object captured as ${r} with keys: ${n}`}class ol extends Vc{constructor(e){const t={parentSpanIsAlwaysRootSpan:!0,...e};Gc(t,"browser",["browser"],Mu.SENTRY_SDK_SOURCE||"npm"),super(t),t.sendClientReports&&Mu.document&&Mu.document.addEventListener("visibilitychange",(()=>{"hidden"===Mu.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const o=tl(e,t,n&&n.syntheticException||void 0,r);return ce(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),We(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const i=nl(e,t,r&&r.syntheticException||void 0,o);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),We(i)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return void(Ou&&k.warn("SDK not enabled, will not capture user feedback."));const t=function(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:nn(r)}},i=function(e){return[{type:"user_report"},e]}(e);return an(o,[i])}(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(Ou&&k.log("No outcomes to send"));if(!this._dsn)return void(Ou&&k.log("No dsn provided, will not send outcomes"));Ou&&k.log("Sending outcomes:",e);const t=(n=e,an((r=this._options.tunnel&&nn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||v(),discarded_events:n}]]));var n,r,o;this.sendEnvelope(t)}}function il(){"console"in h&&C.forEach((function(e){e in h.console&&K(h.console,e,(function(t){return S[e]=t,function(...t){Ir("console",{args:t,level:e});const n=S[e];n&&n.apply(h.console,t)}}))}))}const al=["fatal","error","warning","log","info","debug"];function sl(e){return"warn"===e?"warning":al.includes(e)?e:"log"}const ul=1024,cl=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:"Breadcrumbs",setup(e){t.console&&function(e){const t="console";Er(t,e),kr(t,il)}(function(e){return function(t){if(Le()!==e)return;const n={category:"console",data:{arguments:t.args,logger:"console"},level:sl(t.level),message:$(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message=`Assertion failed: ${$(t.args.slice(1)," ")||"console.assert"}`,n.data.arguments=t.args.slice(1)}Me(n,{input:t.args,level:t.level})}}(e)),t.dom&&Pr(function(e,t){return function(n){if(Le()!==e)return;let r,o,i="object"==typeof t?t.serializeAttribute:void 0,a="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;a&&a>ul&&(Ou&&k.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${a} was configured. Sentry will use 1024 instead.`),a=ul),"string"==typeof i&&(i=[i]);try{const e=n.event,t=function(e){return!!e&&!!e.target}(e)?e.target:e;r=H(t,{keyAttrs:i,maxStringLength:a}),o=q(t)}catch(e){r=""}if(0===r.length)return;const s={category:`ui.${n.name}`,message:r};o&&(s.data={"ui.component_name":o}),Me(s,{event:n.event,name:n.name,global:n.global})}}(e,t.dom)),t.xhr&&xr(function(e){return function(t){if(Le()!==e)return;const{startTimestamp:n,endTimestamp:r}=t,o=t.xhr[Ar];if(!n||!r||!o)return;const{method:i,url:a,status_code:s,body:u}=o;Me({category:"xhr",data:{method:i,url:a,status_code:s},type:"http"},{xhr:t.xhr,input:u,startTimestamp:n,endTimestamp:r})}}(e)),t.fetch&&Uu(function(e){return function(t){if(Le()!==e)return;const{startTimestamp:n,endTimestamp:r}=t;if(r&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){Me({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args,startTimestamp:n,endTimestamp:r})}else{const e=t.response;Me({category:"fetch",data:{...t.fetchData,status_code:e&&e.status},type:"http"},{input:t.args,response:e,startTimestamp:n,endTimestamp:r})}}}(e)),t.history&&Ur(function(e){return function(t){if(Le()!==e)return;let n=t.from,r=t.to;const o=eu(Mu.location.href);let i=n?eu(n):void 0;const a=eu(r);i&&i.path||(i=o),o.protocol===a.protocol&&o.host===a.host&&(r=a.relative),o.protocol===i.protocol&&o.host===i.host&&(n=i.relative),Me({category:"navigation",data:{from:n,to:r}})}}(e)),t.sentry&&e.on("beforeSendEvent",function(e){return function(t){Le()===e&&Me({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:se(t)},{event:t})}}(e))}}};const ll=["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"],dl=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:"BrowserApiErrors",setupOnce(){t.setTimeout&&K(Mu,"setTimeout",pl),t.setInterval&&K(Mu,"setInterval",pl),t.requestAnimationFrame&&K(Mu,"requestAnimationFrame",fl),t.XMLHttpRequest&&"XMLHttpRequest"in Mu&&K(XMLHttpRequest.prototype,"send",hl);const e=t.eventTarget;if(e){(Array.isArray(e)?e:ll).forEach(ml)}}}};function pl(e){return function(...t){const n=t[0];return t[0]=Pu(n,{mechanism:{data:{function:Be(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function fl(e){return function(t){return e.apply(this,[Pu(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Be(e)},handled:!1,type:"instrument"}})])}}function hl(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&K(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Be(t)},handled:!1,type:"instrument"}},r=Q(t);return r&&(n.mechanism.data.handler=Be(r)),Pu(t,n)}))})),e.apply(this,t)}}function ml(e){const t=Mu,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(K(n,"addEventListener",(function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=Pu(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Be(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,Pu(r,{mechanism:{data:{function:"addEventListener",handler:Be(r),target:e},handled:!1,type:"instrument"}}),o])}})),K(n,"removeEventListener",(function(e){return function(t,n,r){const o=n;try{const n=o&&o.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(e){}return e.call(this,t,o,r)}})))}const gl=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(!function(e){Su((t=>{const{stackParser:n,attachStacktrace:r}=yl();if(Le()!==e||Du())return;const{msg:o,url:i,line:a,column:s,error:u}=t,c=function(e,t,n,r){const o=e.exception=e.exception||{},i=o.values=o.values||[],a=i[0]=i[0]||{},s=a.stacktrace=a.stacktrace||{},u=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,d=D(t)&&t.length>0?t:function(){try{return B.document.location.href}catch(e){return""}}();0===u.length&&u.push({colno:c,filename:d,function:Ne,in_app:!0,lineno:l});return e}(tl(n,u||o,void 0,r,!1),i,a,s);c.level="error",Yt(c,{originalException:u,mechanism:{handled:!1,type:"onerror"}})}))}(e),vl("onerror")),t.onunhandledrejection&&(!function(e){Iu((t=>{const{stackParser:n,attachStacktrace:r}=yl();if(Le()!==e||Du())return;const o=function(e){if(R(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch(e){}return e}(t),i=R(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:tl(n,o,void 0,r,!0);i.level="error",Yt(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(e),vl("onunhandledrejection"))}}};function vl(e){Ou&&k.log(`Global Handler attached: ${e}`)}function yl(){const e=Le();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const bl=()=>({name:"HttpContext",preprocessEvent(e){if(!Mu.navigator&&!Mu.location&&!Mu.document)return;const t=e.request&&e.request.url||Mu.location&&Mu.location.href,{referrer:n}=Mu.document||{},{userAgent:r}=Mu.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:o};e.request=i}});function _l(e,t,n=250,r,o,i,a){if(!(i.exception&&i.exception.values&&a&&U(a.originalException,Error)))return;const s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;var u,c;s&&(i.exception.values=(u=wl(e,t,o,a.originalException,r,i.exception.values,s,0),c=n,u.map((e=>(e.value&&(e.value=W(e.value,c)),e)))))}function wl(e,t,n,r,o,i,a,s){if(i.length>=n+1)return i;let u=[...i];if(U(r[o],Error)){Cl(a,s);const i=e(t,r[o]),c=u.length;Sl(i,o,c,s),u=wl(e,t,n,r[o],o,[i,...u],i,c)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if(U(r,Error)){Cl(a,s);const c=e(t,r),l=u.length;Sl(c,`errors[${i}]`,l,s),u=wl(e,t,n,r,o,[c,...u],c,l)}})),u}function Cl(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function Sl(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}const El=(e={})=>{const t=e.limit||5,n=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,r,o){const i=o.getOptions();_l(Yc,i.stackParser,i.maxValueLength,n,t,e,r)}}};function kl(e,t,n,r){const o={filename:e,function:""===t?Ne:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const Il=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Al=/\((\S*)(?::(\d+))(?::(\d+))\)/,xl=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ll=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ol=Ue(...[[30,e=>{const t=Il.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=Al.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=Ml(t[1]||Ne,t[2]);return kl(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{const t=xl.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=Ll.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]||Ne;return[n,e]=Ml(n,e),kl(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]]),Ml=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Ne,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function Tl(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.lengthn(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(e){return new Ge(((n,r)=>{let o=t.length;if(!o)return n(!0);const i=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{We(e).then((()=>{--o||(clearTimeout(i),n(!0))}),r)}))}))}}}const Dl=64;function Pl(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}let Rl;function Nl(){Rl=void 0}function Fl(e,t=function(){if(Rl)return Rl;if(ju(Mu.fetch))return Rl=Mu.fetch.bind(Mu);const e=Mu.document;let t=Mu.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){Ou&&k.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}try{return Rl=t.bind(Mu)}catch(e){}}()){let n=0,r=0;return function(e,t,n=Tl(e.bufferSize||Dl)){let r={};return{send:function(o){const i=[];if(un(o,((t,n)=>{const o=hn(n);if(yn(r,o)){const r=Pl(t,n);e.recordDroppedEvent("ratelimit_backoff",o,r)}else i.push(t)})),0===i.length)return We({});const a=an(o[0],i),s=t=>{un(a,((n,r)=>{const o=Pl(n,r);e.recordDroppedEvent(t,hn(r),o)}))};return n.add((()=>t({body:ln(a)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&Ye&&k.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=bn(r,e),e)),(e=>{throw s("network_error"),e})))).then((e=>e),(e=>{if(e instanceof jc)return Ye&&k.error("Skipped sending event because buffer is full."),s("queue_overflow"),We({});throw e}))},flush:e=>n.drain(e)}}(e,(function(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Nl(),$e("No fetch implementation available");try{return t(e.url,a).then((e=>(n-=i,r--,{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 Nl(),n-=i,r--,$e(e)}}))}function jl(e={}){const t=function(e={}){return{defaultIntegrations:[Ac(),Mc(),dl(),cl(),gl(),El(),Tc(),bl()],release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Mu.SENTRY_RELEASE&&Mu.SENTRY_RELEASE.id?Mu.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0,...e}}(e);if(function(){const e=Mu,t=e&&e.chrome&&e.chrome.runtime&&e.chrome.runtime.id,n=Mu;return!!(n&&n.browser&&n.browser.runtime&&n.browser.runtime.id)||!!t}())return void E((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));Ou&&(Fu()||k.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:(r=t.stackParser||Ol,Array.isArray(r)?Ue(...r):r),integrations:Qu(t),transport:t.transport||Fl};var r;Fc(ol,n),t.autoSessionTracking&&function(){if(void 0===Mu.document)return void(Ou&&k.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));Kt({ignoreDuration:!0}),Qt(),Ur((({from:e,to:t})=>{void 0!==e&&e!==t&&(Kt({ignoreDuration:!0}),Qt())}))}()}var Ul=n("oIX6"),Zl=n("PzVL");function Bl(){var e={debug:!1,environment:Ul.Gv,sampleRate:.1,replaysSessionSampleRate:0,replaysOnErrorSampleRate:.01,tracesSampler:.1,profilesSampleRate:0,dsn:"https://360b929fdaf84c15852920901c00fa3c@o435357.ingest.sentry.io/5991907",release:"imgur@".concat(Ul.i8),attachStacktrace:!0,ignoreErrors:["top.GLOBALS","originalCreateNotification","canvas.contentDocument","MyApp_RemoveAllHighlights","http://tt.epicplay.com","Can't find variable: ZiteReader","jigsaw is not defined","ComboSearch is not defined","http://loading.retry.widdit.com/","atomicFindClose","fb_xd_fragment","bmi_SafeAddOnload","EBCallBackMessageReceived","conduitPage",'SyntaxError: JSON Parse error: Unexpected identifier "ima"','SyntaxError: JSON Parse error: Unexpected identifier "Brid"','SyntaxError: JSON Parse error: Unexpected identifier "visibility"'],integrations:[Rs({blockAllMedia:!0,maskAllText:!0,maxReplayDuration:3e4}),Yu(),kc()]};Ul.Gv!==Ul.j2&&(e.debug=!1,e.tracesSampler=function(){return 0},e.tracesSampleRate=0,e.profilesSampleRate=0,e.replaysSessionSampleRate=0,e.replaysOnErrorSampleRate=0),"1"===(0,l.Do)(Zl.kk,document.cookie)&&function(e){const t={...e};Gc(t,"react"),jl(t)}(e)}var zl=n("S71b"),Hl=n("+qrI"),Vl=n("o0o1"),ql=n.n(Vl),Wl=n("yXPU"),$l=n.n(Wl),Gl=n("aWKK"),Yl=n("e1IN"),Kl="UPDATE_FEATURES",Jl="UPDATE_PLATFORM",Xl="UPDATE_REFERRER";function Ql(e){return new Promise((function(t,n){e.onload=function(){return t(e)},e.onerror=n}))}var ed=(0,Gl.Z)(Jl,(function(e,t){return{userAgent:e,site:t}})),td=(0,Gl.Z)(Kl,function(){var e=$l()(ql().mark((function e(t){var n,r,i,a;return ql().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=new Image,i=Ql(r),r.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=",e.next=5,i.catch((function(){}));case 5:return a=r.complete&&0!==r.naturalWidth,e.abrupt("return",(n={},o()(n,Yl.xv,"undefined"!=typeof Promise&&Promise.toString().indexOf("[native code]")>-1),o()(n,Yl.Hs,"undefined"!=typeof CSS&&"function"==typeof CSS.supports&&CSS.supports.toString().indexOf("[native code]")>-1),o()(n,Yl.H2,a),o()(n,Yl.Lv,t!==Yl.z7||"playsInline"in(0,d.vy)("video")),n));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),(function(){return{saveToLocalStorage:!0}})),nd=(0,Gl.Z)(Xl,(function(e){return{referrer:e}})),rd=n("/9Cr"),od=n("Txp7"),id=n("d8/m"),ad=n("JCOJ"),sd=n("l3te"),ud=n("lwsE"),cd=n.n(ud),ld=n("W8MJ"),dd=n.n(ld),pd=n("JPcv"),fd=n.n(pd);function hd(e,t){return pd.Map.isMap(e)&&0!==t.length?e.filter(function(e){var t=(0,pd.Set)(e);return function(e,n){return t.has(n)}}(t)):e}function md(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var gd=function(e){var t=e.adConfig,n=e.tags,r=e.nsfwScore,i=e.postID,a=e.inGallery,s=e.isPostVisible,u=(0,d.uI)("ANA");if(u){var c=function(e){for(var t=1;t0?r.get(s.get(0).get("postId")):void 0,c=a||o||u,l=t.getIn(["currentPostMeta","isPostVisible"]);return{post:hd(c,["id","adConfig","tags","nsfwScore","inGallery"]),isPostVisible:l}},yd=function(e){var t=e.post,n=e.isPostVisible;if(t&&t.get("id")){var r=t.get("adConfig"),o=t.get("tags")?t.get("tags").toJS():[],i=t.get("nsfwScore")||(null==r?void 0:r.get("nsfw_score"));gd({adConfig:r,tags:o,nsfwScore:i,isPostVisible:n,postID:t.get("id"),inGallery:t.get("inGallery")})}},bd=n("kWpY"),_d=function(e){var t=e.user;return{isLoggedIn:t.get("isLoggedIn"),isLoaded:t.get("isLoaded")}},wd=function(){var e=$l()(ql().mark((function e(t,n){var r,o;return ql().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.isLoggedIn,o=t.isLoaded,r||!o){e.next=10;break}if(n(),!(0,d.rI)("wunderkind-script")){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,(0,bd.ZV)();case 8:e.sent.enableWunderkind("5594");case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Cd=n("RIqP"),Sd=n.n(Cd),Ed=n("ANjH");function kd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Id(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:{},r=Ad.apply(void 0,Sd()(e));return!(0,xd.s)()&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&(r=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__(r)),(r=r(Ed.MT))(t(),n)}var Od=n("Y+p1"),Md=n.n(Od);function Td(e,t,n){var r,o;function i(){var i=t(e.getState());Md()(r,i)||n(r=i,o)}return o=e.subscribe(i),i(),o}var Dd=n("2QeP"),Pd=n("QILm"),Rd=n.n(Pd),Nd=n("Titc"),Fd=n("QkVN"),jd=n.n(Fd),Ud=n("rzhI");function Zd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bd(e){for(var t=1;t=t,u=new Date(e.expiration);if(a)return{isActive:!1,expiration:u,treatments:o,roll:t};if(!s)return{isActive:s,expiration:u,treatments:o,roll:t};var c=r,l=c>=t,d=(i-r)/o.length,p=null;if(!l)for(var f=0;f=t)break}return{forced:!1,expiration:u,isControl:l,activeTreatment:p,isActive:s,firstImpression:n,treatments:o,roll:t}}function Mp(e,t){for(var n=(new Date).getTime(),r=t,o=0,i=Object.keys(e);o(new Date).getTime()})))),t(n),n.type){case rd.AE:var i=e.getState().experiments;e.dispatch((0,Tp.z5)(Mp(r[Lp.DZ],i.toJS())));break;case Tp.yX:var a=e.getState().experiments,s=n.payload.name,u=Mp(o()({},s,r[Lp.Yz][s]),a.toJS());e.dispatch((0,Tp.z5)(u))}};const Pp=function(){return function(e){return function(t){return function(e,t){return t.meta&&t.meta.saveCookie&&t.meta.cookies&&Object.keys(t.meta.cookies).forEach((function(e){(0,l.d7)(e,t.meta.cookies[e],t.meta.expires||365,t.meta.cookieDomain||"")})),e(t)}(e,t)}}};const Rp=function(e){return function(t){return function(n){return function(e,t,n){var r=e.getState().user.get("username");return n.meta&&n.meta.authNeeded&&!r&&(0,d.gB)("".concat(Ul.FH,"/signin#").concat(encodeURIComponent((0,d.Jz)()))),t(n)}(e,t,n)}}};var Np=new function e(){cd()(this,e),o()(this,"getPageView",(function(){var e=(0,d.le)("pageView");return e?JSON.parse(e).value:1})),o()(this,"increasePageView",(function(){var e,t,n=new Date,r=(0,d.le)("pageView"),o=!0;if(r&&(t=(r=JSON.parse(r))._expires,n<=new Date(t))){if((e=r.value)>=25)return;o=!1}o&&(e=0,n.setDate(n.getDate()+1),t=n.toString()),(0,d.Rv)("pageView",JSON.stringify({value:++e,_expires:t}))}))};const Fp=Np;var jp=function(e){return function(e){return function(t){return function(e,t,n){t(n),setTimeout((function(){switch(n.type){case od.uH:case od.hq:Fp.increasePageView()}}),0)}(0,e,t)}}},Up=n("yfwS"),Zp=n.n(Up),Bp=function(){function e(t,n,r){cd()(this,e),this.MAXRETRIES=6,this.socketRetries=0,this.pollRetries=0,this.url=t,this.UID=n,this.page=r,this.socket=null,this.poll=null,this.pollCommand=null,this.connected=!1,this.socketConnected=!1,this.emitter=new(Zp())({}),this.connect()}var t;return dd()(e,[{key:"longpoll",value:(t=$l()(ql().mark((function e(t){var n,r,o,i;return ql().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.socketConnected){e.next=2;break}return e.abrupt("return");case 2:return null!=this.poll&&(this.poll.abort(),this.pollCommand=null),n={user:this.UID},this.page&&(n.page=this.page),void 0!==t&&(n.command=t,this.pollCommand=t),r=this.serialize(n),e.prev=7,this.poll=new AbortController,e.next=11,(0,d._i)("".concat(this.url,"/lp").concat(r),{signal:this.poll.signal,timeout:0});case 11:return o=e.sent,this.pollRetriesthis.MAXRETRIES||(this.socketRetries++,this.connected=!1,window.setTimeout((function(){console.log("Connection closed, retrying"),e.connectSocket()}),100))}},{key:"MessageUser",value:function(e,t,n){var r={command:"message",user:t},o={event:e,data:n},i=this.newCommand(r,o);return this.send(i)}},{key:"MessagePage",value:function(e,t,n){var r={command:"message",page:t},o={event:e,data:n},i=this.newCommand(r,o);return this.send(i)}},{key:"MessageAll",value:function(e,t){var n={event:e,data:t},r=this.newCommand({command:"message"},n);return this.send(r)}},{key:"setPage",value:function(e){if(this.page=e,this.socketConnected){var t={command:"setpage",page:e},n=this.newCommand(t,{});return this.send(n)}this.send()}},{key:"serialize",value:function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push("".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(e[n])));return"?".concat(t.join("&"))}},{key:"send",value:function(e){this.socketConnected?this.socket.send(e):this.longpoll(e)}}]),e}(),zp=n("FRfO"),Hp="UPDATE_LOCATION",Vp=(0,Gl.Z)(Hp,(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{location:e.location,params:e.params,isMobile:t}})),qp=n("Q86X"),Wp=n("g1ek"),$p=n("Nc9o"),Gp=null,Yp=function(e){return new Bp(Ul.zK,e,(0,Wp.YM)())};const Kp=function(e){return function(t){return function(n){return function(e,t,n,r){switch(t(n),n.type){case rd.Yh+Nd.MR:(Gp=r(n.payload.incus_id)).on("newNotification",(function(t){var n=t.data;if(e.dispatch((0,zp.L1)(n)),n){var r=n.id,o=fd().fromJS(n);e.dispatch((0,qp.kT)({id:r,notification:o,notificationOnClick:function(){return e.dispatch((0,zp.Xk)(o))},onClick:function(){return e.dispatch((0,qp.v7)(r))}}))}})),Gp.on("imagePoints",(function(t){var n=e.getState(),r=n.user,o=n.postsData,i=n.ui;if(!(t.downs>t.ups&&r.get("id")===o.getIn(["currentPost","account","id"]))){var a=(0,$p.lL)(i.aprilFools.get("enabled"));e.dispatch((0,od.qW)(t.hash,t.downs,t.ups,a))}})),Gp.on("removedFromPublic",(function(t){e.dispatch((0,od.i6)(t.hash))})),Gp.on("viewCount",(function(t){e.dispatch((0,od.ly)(t.hash,t.views))})),Gp.on("battlePostPoints",(function(t){e.dispatch((0,rd.ho)(t.hash,t.count))}));break;case Hp:var o=n.payload.location.pathname,i=(0,Wp.YM)(o);Gp&&Gp.setPage(i)}}(e,t,n,Yp)}}};function Jp(e){return Array.isArray(e)&&e.length>0}function Xp(e){return!Jp(e)}function Qp(e){return"number"==typeof e&&Number.isInteger(e)}function ef(e){return"string"==typeof e}function tf(e){return"string"==typeof e&&e.length>0}function nf(){for(var e=arguments.length,t=new Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=n.streamParam,o=n.streamSection,i=(arguments.length>3?arguments[3]:void 0).versionAPI,a=function(e){var t=e.postsArr,n=e.gallery,r=e.newPostsArr,o=e.streamPage,i=e.streamSection,a=e.streamParam,s=e.scrollY,u=void 0===s?0:s,c=e.versionAPI;return{time:(0,d.Td)(),posts:t||[],gallery:n,newPosts:r||[],streamPage:o,streamSection:i,streamParam:a,scrollY:u,versionAPI:c}}({postsArr:Jp(e)?e:[],gallery:t,streamPage:0,streamParam:r,streamSection:o,versionAPI:i});return(0,d.D9)(lf,JSON.stringify(a))}function bf(e){var t=hf();if(t){var n=uf(uf({},t),{},{posts:e});return(0,d.D9)(lf,JSON.stringify(n))}}function _f(e){var t=hf();if(t){var n=Object.assign(t,{scrollY:Number.parseInt(e.payload.scrollY,10)});return(0,d.D9)(lf,JSON.stringify(n))}}function wf(e,t,n){return(0,Ed.qC)(pf,(o=e.getState().fastGrid.get("location"),function(e){if(!e)return null;if(o!==af.u_&&o!==af.RN)return e;var t=e.posts,n=t.filter((function(e){return e.vote!==of.WV}));return n.length!==t.length?uf(uf({},e),{},{posts:n}):e}),function(e,t){return function(n){if(!n)return null;var r=df(e);return n.gallery!==r||t!==n.versionAPI||e.get("streamSection")!==n.streamSection?null:n}}(e.getState().gallery,n),t?(r=t,function(e){return e&&Number.isInteger(e.time)?r-e.time>cf?null:e:null}):function(e){return e},mf)(hf());var r,o}function Cf(e){var t=hf(),n=Object.assign(t,{newPosts:e});return(0,d.D9)(lf,JSON.stringify(n))}function Sf(e,t,n){var r=n.streamParam,o=n.streamSection,i=hf(),a=Object.assign(i,{time:(0,d.Td)(),posts:i.posts.concat(e),streamPage:t,streamParam:r,streamSection:o});return(0,d.D9)(lf,JSON.stringify(a))}function Ef(e,t){var n=hf(),r=n.posts.find((function(t){return t.id===e}));if(r)return r.vote=t,(0,d.D9)(lf,JSON.stringify(n))}const kf=function(e){return function(t){return function(n){switch(n.type){case Hp:var r=(0,xd.s)()?"":document.cookie;return(0,l.Do)("gallerypage",r)?"/"===n.payload.location.pathname&&e.dispatch((0,id.I1)()):vf(),t(n);case id.cc+Nd.MR:case id.cc:if(n.error)return t((0,id.xA)(n.payload,n.meta));if(!ff())return t((0,id.Uc)(n.payload,n.meta));switch(n.payload.insertionModifier){case id.HK:var o=wf(e,null,n.meta.versionAPI);if(Xp(o))return(0,d.VY)(yf,n.payload&&n.payload.posts,df(e.getState().gallery),n.payload,n.meta),t((0,id.Uc)(n.payload,n.meta));var i=(v=n.payload&&n.payload.posts,function(e){return Xp(v)?[]:Xp(e)?v:gf(v,e)})(o);return Jp(i)?((0,d.VY)(Cf,i),t((0,id.nC)({posts:i}))):t((0,id.Uc)(Object.assign(n.payload,{insertionModifier:id.Uu}),n.meta));case id.I0:if(Xp(n.payload&&n.payload.posts))return t((0,id.xA)(n.payload,n.meta));var a=wf(e,null,n.meta.versionAPI),s=(g=n.payload.posts,function(e){return Array.isArray(g)&&g.length>0?Array.isArray(e)&&e.length>0?gf(g,e):g:[]})(a);return s.length>0&&(a.length>0&&a.length<500?(0,d.VY)(Sf,s,e.getState().gallery.get("streamPage"),n.payload):(0,d.VY)(vf)),t((0,id.Uc)(n.payload,n.meta));case id.mm:return(0,d.VY)(yf,n.payload&&n.payload.posts,df(e.getState().gallery),n.payload,n.meta),t((0,id.Uc)(n.payload,n.meta));default:return t((0,id.Uc)(n.payload,n.meta))}case od.rb:var u=n.payload.hash,c=wf(e);if(!Xp(c)){var p=c.filter((function(e){return e.id!==u}));c.length!==p.length&&(0,d.VY)(bf,p)}return t(n);case od.ot+Nd.tj:var f=n.payload,h=f.postId,m=f.vote;return(0,d.VY)(Ef,h,m),t(n);default:return t(n)}var g,v}}};var If=function(e){return function(t){return function(n){switch(n.type){case id.yE:if(!ff())return t(n);var r=e.getState().user.getIn(["flags","desktopPostPageBeta"])?Ul.x6:void 0,o=wf(e,(0,d.Td)(),r);if(Jp(o)){var i=hf(),a=i.streamPage,s=i.streamParam,u=i.streamSection,c=i.scrollY,l=i.versionAPI;(0,d.VY)(t,(0,id.Lu)({posts:o,streamPage:a,streamParam:s,streamSection:u,insertionModifier:id.HK},{cache:!0,versionAPI:l})),n.payload.restoreScrollPosition&&setTimeout(d.X5,50,0,c)}else(0,d.VY)(vf);return t(n);case id.qN:return(0,d.X5)(0,0),vf(),t(n);case rf.Cr:return ff()&&(0,d.VY)(_f,n),t(n);default:return t(n)}}}},Af=n("qNBE"),xf=n("VDU/");function Lf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Of(e){for(var t=1;tn})).reduce((function(e,n){return e[n]=t[n],e}),{})}function Df(e){var t=Tf(e);return(0,d.VY)(d.Rv,e,JSON.stringify(t)),t}const Pf=function(){return function(e){return function(t){return function(e,t){switch(t.type){case $d.Wq:var n=t.payload,r=n.ctaName,o=n.endTime;return(0,d.VY)(Mf,Ul.DQ,r,o),e(t);case $d.Sn:var i=t.payload,a=i.ctaName,s=i.endTime;return i.oncePerSession&&(0,d.VY)(Mf,Ul.DQ,a,s),e(t);case Af.AF:var u=t.payload.insertionId,c=(0,xf.Cp)(7).getTime()/1e3;return(0,d.VY)(Mf,af.Oh,u,c),e(t);case $d.fc:var l=t.payload.ctas,p=(void 0===l?[]:l).map((function(e){return Of(Of({},e),{},{pixels:e.pixels.map((function(e){return e.replace("[TIMESTAMP]",Date.now())}))})})),f=Object.assign(t.payload,{ctas:p},{ctasClosed:Object.keys(Df(Ul.DQ))});return e(Object.assign(t,{payload:f}));case Af.FI:var h=Object.assign(t.payload,{sctusClosed:Object.keys(Df(af.Oh))});return e(Object.assign(t,{payload:h}));default:return e(t)}}(e,t)}}};var Rf=n("2+Sp"),Nf=n("KMJ1"),Ff=n("FaWJ"),jf=n("ucDD"),Uf=!1;function Zf(e,t){var n=0-e.ui.cover.get("collapsed")-50;return(0,d.X5)(0,n),t((0,Rf.KU)(n))}function Bf(e){return(0,d.X5)(0,0),e((0,Rf.WE)())}function zf(e){var t=(0,d.rI)(e);t&&t.scrollIntoView({behavior:"smooth"})}function Hf(e){var t=e.id,n=e.offset,r=(0,d.rI)(t);if(r){var o=(0,d.Hg)().getBoundingClientRect().top,i=r.getBoundingClientRect().top,a=Math.abs(o-i)-n;if((0,d.YA)())return void window.scrollTo({top:a,behavior:"smooth"});window.scrollTo(0,a)}}const Vf=function(e){return function(t){return function(n){switch(n.type){case Hp:return Uf=n.payload.location.pathname.startsWith("/".concat(jf.ih,"/")),t(n);case Rf.mW:if(Uf){var r=e.getState();r.ui.cover.get("fixed")?(0,d.VY)(Zf,r,e.dispatch):(0,d.VY)(Bf,e.dispatch)}return t(n);case Rf.Ox:return(0,d.VY)(zf,n.payload),t(n);case Rf.b3:return(0,d.VY)(Hf,n.payload),t(n);case rf.MV:return Uf&&(0,d.VY)(Bf,e.dispatch),t(n);case qd.pZ:case Ff.nm:case Ff.Zy:case Ff.KL:case Nf.ig:case Nf.fv:return Uf&&(0,d.VY)(Zf,e.getState(),e.dispatch),t(n);default:return t(n)}}}};var qf,Wf=n("wUWr"),$f=n.n(Wf),Gf=n("iAkV"),Yf=n("tKQO"),Kf=n("q2T8"),Jf=n("9eUW"),Xf=n("Qii0"),Qf=n("e7SQ"),eh="all_dialogs";const th=(0,Qf.Z)((qf={},o()(qf,Hl.nb,(function(e,t){var n,r=t.payload,o=r.name,i=e.get("dialogName");return!o||i||e.get("dialogName")===o?e:e.set("dialogName",o).set("eventSource",r.eventSource||"").set("followType",null!==(n=r.followType)&&void 0!==n?n:-1).set("followUserId",r.followUserId||0).set("followUsername",r.followUsername||"")})),o()(qf,Hl.tw,(function(e,t){var n=t.payload;return n.name&&n.name!==e.get("dialogName")&&n.name!==eh?e:e.set("dialogName",null)})),qf),(0,pd.Map)({dialogName:null,eventSource:null,followType:null,followUserId:null,followUsername:null}));var nh=n("Z18p"),rh=n("J4ux"),oh=n("ii6B");function ih(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ah(e){for(var t=1;t=0&&e.dispatch((0,od.ZH)(o)));var i=o>0?o-1:null,a=t.posts.get("posts").get(n.get(o+1,new pd.Map).get("postId"),null),s=t.posts.get("posts").get(n.get(i,new pd.Map).get("postId"),null);if(!Kf.yh&&a&&r&&!r.get("isHiddenPost")&&!(0,Xf.if)(r)){var u=t.postsData.get("preloadedPosts").has(a.get("id")),c=t.agent.get(Yl.H2);if(!a.get("fullyFetched")&&!u)if(e.dispatch((0,od.h1)(a.get("id"))),e.dispatch((0,od.iW)(a.get("id"))),!a.getIn(["cover","isVideo"]))(0,d.uf)().src=c&&a.getIn(["cover","animationType"])===Yf.OP?a.getIn(["cover","src","webPImage"]):a.getIn(["cover","src","coverImage"])}e.dispatch((0,od.Ow)(a,s))}const uh=function(e){return function(t){return function(n){var r,o,i,a=e.getState();switch(t(n),n.type){case od.xl:return(0,Jf.JA)(n.payload.url);case od.fO:return(0,Jf.Fd)(n.payload.url,n.payload.title);case od.Zk:return(0,Jf.DR)(n.payload.url,n.payload.title);case od.kE:return(0,Jf.sj)(n.payload.url,n.payload.title);case od._:return(0,Jf.GR)(n.payload.url,n.payload.title);case od.z5:return(0,Jf.YI)(n.payload.url,n.payload.title);case od.cB:return(0,Jf.nw)(n.payload.url,n.payload.title);case od.Es:case od.US:return function(e,t){var n=t.type,r=t.payload,o=e.getState().postsData,i=o.get(n===od.Es?"prevPost":"nextPost");if(i){var a=o.get("currentPostIndex")+(n===od.Es?-1:1);e.dispatch((0,od.ZH)(a));var s=o.get("recircSortType"),u=i.get("id"),l=ah(ah({},r.routerParams),{},{postId:u,isAlbum:i.get("isAlbum"),inGallery:i.get("inGallery")});c.m.push((0,Xf.PX)(s,l)),e.dispatch((0,od.bs)(u,n===od.Es?Gf.Gv.PREV:Gf.Gv.NEXT,r.interactionType,p.hH[s])),e.dispatch((0,Hl.gk)(eh)),e.dispatch((0,rh.ZN)())}}(e,n);case od.YV+Nd.tj:e.dispatch((0,rh.ZN)());break;case od.Xc+Nd.tj:return e.dispatch((0,rh.ZN)()),sh(e);case od.YV+Nd.MR:case od.hL+Nd.MR:case od.ST+Nd.MR:var s=n.payload,u=s.id;return s.shared_with_community&&e.dispatch((0,od._X)(u)),sh(e);case id.cc+Nd.MR:case id.cc+Nd.xy:case od.TR:return sh(e);case od.pX+Nd.MR:return function(e,t){var n=e.getState,r=t.meta;if(r.postId){var o=!!n().user.getIn(["flags","desktopEditPageBeta"]),i=(0,Xf.Bh)(r.postId,r.isAlbum);if(o)return c.m.push(i);(0,d.A3)(i)}}(e,n);case Hl.tw:return r=n,o=e.dispatch,void((i=r.payload).name&&i.name===eh&&o((0,nh.b)(!1,"")));case Hp:e.getState().gallery.get("searchQuery")&&!n.payload.location.pathname.startsWith("/".concat(jf.yg))&&e.dispatch((0,id.v2)());break;case oh.dG+Nd.MR:if(!a.comments.get("postComments").size&&!n.headerLink){var l=e.getState().postsData.getIn(["currentPostMeta","post","comment_count"],0),f=$f()(n.payload,(function(e){var t;return[e,null!==(t=e.comments)&&void 0!==t?t:[]]})).length;l>f&&e.dispatch((0,od.sJ)(l-f))}}}}};function ch(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lh(e){for(var t=1;t-1&&(bh(e,(function(){}),{type:od.Nb}),vh=!1),t(n)}}var _h=function(e){return function(t){return function(n){bh(e,t,n)}}};var wh="exit",Ch=((0,Gl.Z)(wh,(function(e){return{exitCode:e}})),n("r6De")),Sh=o()({},od.Nb,[Ch.QE]);function Eh(e,t,n){t(n);var r=e.getState();if(n.type===fh.Ub){var o=r.postsData.getIn(["currentPost","id"]),i=r.posts.getIn(["posts",o]);i&&i.get("adSource")&&(0,hh.Y)(o)}if(r.ad.get("promotedPostPlacement").get("enabled")&&Sh[n.type]){var a=r.postsData.getIn(["currentPost","id"]),s=r.posts.getIn(["posts",a]);!function(e,t,n,r){var o=e.getState(),i=o.analyticsBuffer.get("promotedPostVideoViewed").size>0,a=n.type===r&&t&&!t.get("isAd"),s=n.type===wh;i&&(s||a)&&o.analyticsBuffer.get("promotedPostVideoViewed").forEach((function(t,n){(0,p.H6)(e,[fh.IM,fh.$1],n)}))}(e,s,n,od.Nb),function(e,t,n){t&&t.get("isAd")&&t.get("eventPixels")&&n&&n.forEach((function(e){var n=t.get("eventPixels").get(e.toString(),(0,pd.List)());0!==n.size&&n.forEach((function(e){(0,p.B5)(e)}))}))}(0,s,function(e){var t=Sh[e.type];return[od.ot+Nd.tj,oh.vr+Nd.tj].includes(e.type)?t[e.payload.vote]:e.type===oh.jE+Nd.tj?t[e.payload.parentId?"reply":"new"]:t}(n))}}var kh=function(e){return function(t){return function(n){return Eh(e,t,n)}}};const Ih=function(){return function(e){return function(t){if(e(t),t.type!==rh.lc)var n;else(n=t.payload.galleryPopOverBanner)&&rh.gh.includes(n.type)&&function(e){var t=e.parentNode&&e.parentNode.closest(".GalleryComment-wrapper");if(t&&t.classList){var n=e.show?"add":"remove";t.classList[n]("active")}}(n)}}};function Ah(e){var t=e.dispatch,n=(0,e.getState)().user;return t((0,oh.cm)(n.get("mutedUsers",(0,pd.List)([])),n.get("isLoggedIn")))}function xh(e){var t=e.dispatch,n=e.getState,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=n(),i=o.postsData,a=o.comments,s=o.user;return t((0,oh.BC)(i.getIn(["currentPost","id"]),a.get("postCommentsSort"),r,null,!1,void 0,s.get("isLoggedIn")))}function Lh(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.meta.options.params.cursor;return n&&!e.getState().postsData.getIn(["isMainContentReady"])&&(0,e.dispatch)((0,od.QL)()),r&&t.headerLink&&xh(e,t.headerLink),Ah(e)}function Oh(e,t,n){var r,o,i,a,s,u,c=e.getState();if(n.type===oh.dG+Nd.MR&&n.meta.fetchContext)return function(e,t,n){var r=e.dispatch,o=n.payload;if(n.meta.commentId&&r((0,od.QL)()),o.length&&o[0]&&o[0].parent_id)return r((0,oh.rt)(o[0].parent_id,o));t(n)}(e,t,n);switch(t(n),n.type){case oh.dG+Nd.MR:return Lh(e,n);case oh.ME+Nd.MR:return Lh(e,n,!0);case oh.Qh+Nd.MR:return(0,e.dispatch)((0,oh.lj)());case rd.ZM+Nd.MR:return Ah(e);case oh.Ul:return r=e,o=c.comments,i=e.getState().comments,a=r.dispatch,s=o.get("skippedCommentsCount"),void((u=i.get("skippedCommentsCount")-s)&&a((0,od.sJ)(u)));case oh.Di+Nd.ES:return xh(e)}}const Mh=function(e){return function(t){return function(n){return Oh(e,t,n)}}};var Th=n("CI2m");function Dh(e,t,n){return n.type===Hp?(function(e){e.getState().ui.toaster2.get("toasts").forEach((function(t){0===t.timeout&&e.dispatch((0,qp.v7)(t.id))}))}(e),function(e,t){var n=t.payload&&t.payload.location&&t.payload.location.state;if(n&&n.accoladeConfetti){var r=e.getState().postsData;if(n.hash&&n.hash===r.getIn(["currentPostMeta","id"])){var o=r.getIn(["currentPostMeta","post","accolades_counts"]);o=Object.keys(o.toJS()),e.dispatch((0,od.N6)({accoladeIds:o}))}else e.dispatch((0,od.N6)({}))}}(e,n),function(e,t,n){var r=e.dispatch,o=e.getState,i=n.payload&&n.payload.location&&(0,xf.Ol)(n.payload.location.search,"nid");if(i){o().user.getIn(["userBattle","metadata","event_name"])&&o().notifications.get("notifications").find((function(e){return e.get("id")===parseInt(i,10)}),null,(0,pd.Map)()).get("type")===Th.eb&&r((0,rd.xt)(!0)),r((0,zp.zJ)(i));var a=n.payload.location,s=a.pathname,u=a.hash,l=(0,xf.Mq)(n.payload.location.search,"nid"),d=s+(l?"?".concat(l):"")+u;c.m.replace(d)}return t(n)}(e,t,n)):t(n)}const Ph=function(e){return function(t){return function(n){return Dh(e,t,n)}}};var Rh=n("mwIZ"),Nh=n.n(Rh),Fh=n("QlXF");(0,xd.s)()||(window.__ccaImgur=window.__ccaImgur||{que:[]},window.cca=window.cca||{},window.cca.custAud=window.cca.custAud||{que:[]},window.cca.privacy=window.cca.privacy||{que:[]});var jh=200;function Uh(e,t,n){(0,xd.s)()||window.__ccaImgur.que.push((function(){window.__ccaImgur.fireEvent({pageTitle:e.substring(0,jh),eventType:"pageload",imageid:t,tags:n})}))}function Zh(e,t,n,r){(0,xd.s)()||window.__ccaImgur.que.push((function(){window.__ccaImgur.fireEvent({pageTitle:e.substring(0,jh),eventType:"comment",comment:t,imageid:n,tags:r})}))}var Bh=n("rpZf");function zh(e,t,n){var r=e.getState(),o=r.agent.get("countryCode");if(n.type===rd.AE&&((0,xd.s)()||e.dispatch((0,Af.Pr)())),n.type===$d.fc&&af.tI.includes(n.payload.countryCode)&&!(0,d.Fl)("carbon")&&((0,d.F_)((0,d.vy)("script",{src:"https://imgur.ccgateway.net/script?id=".concat(Ul.VB,"&parentId=e8a16a4090"),defer:!0})),(0,Bh.Z)(n,"payload.subscription.is_subscribed")&&((0,xd.s)()||window.cca.custAud.que.push((function(){window.cca.fireAudienceEvent("2c17c155-d710-4faf-ae09-e401f614feff")})))),af.tI.includes(o)||!o){if(n.type===od.Nb){var i=r.postsData.get("currentPost");if(i){var a=i.get("tags")?i.get("tags").map((function(e){return e.get("tag")})).toJS():[];Uh(i.get("title"),i.get("id"),a)}}if(n.type===od.aB){var s=r.posts.getIn(["posts",n.payload.postId]);if(s){var u=s.get("tags")?s.get("tags").map((function(e){return e.get("name")})).toJS():[];Uh(s.get("title"),n.payload.postId,u)}}if(n.type===od.ot+Nd.tj&&(n.payload.vote===of.UP||n.payload.vote===of.WV)){var c=r.postsData.get("currentPost");if(c){var l=n.payload.vote===of.UP?"upvote":"downvote",p=c.get("tags")?c.get("tags").map((function(e){return e.get("tag")})).toJS():[];!function(e,t,n,r){(0,xd.s)()||window.__ccaImgur.que.push((function(){window.__ccaImgur.fireEvent({pageTitle:e.substring(0,jh),eventType:"vote",vote:t,imageid:n,tags:r})}))}(c.get("title"),l,c.get("id"),p)}}if(n.type===oh.fx+Nd.tj&&Zh("",n.payload.comment,n.payload.imageId,[]),n.type===oh.jE+Nd.tj){var f=r.postsData.get("currentPost");if(f){var h=f.get("tags")?f.get("tags").map((function(e){return e.get("tag")})).toJS():[];Zh(f.get("title"),n.payload.comment,n.payload.imageId,h)}}if(n.type===od.jh+Nd.tj){var m=r.postsData.get("currentPost");if(m){var g=m.get("tags")?m.get("tags").map((function(e){return e.get("tag")})).toJS():[];!function(e,t,n,r){(0,xd.s)()||window.__ccaImgur.que.push((function(){window.__ccaImgur.fireEvent({pageTitle:e.substring(0,jh),eventType:"favorite",favorite:t?"favorite":"unfavorite",imageid:n,tags:r})}))}(m.get("title"),n.payload.favorite,n.payload.postId,g)}}n.type===Fh.BP&&((0,xd.s)()||window.cca.custAud.que.push((function(){window.cca.fireAudienceEvent("0a5c1dab-f2f1-4e9d-9b8b-ccdf82ad1834")}))),n.type===Fh.HF&&((0,xd.s)()||window.cca.privacy.que.push((function(){window.cca.fireAudienceEvent("1c89737d-fd49-4c15-bf23-af2a2e7d32a7")})))}if(n.type===od.XL){var v=Nh()(n,"payload.putFirst",!1),y=Nh()(n,"payload.in_gallery",!1),b=Nh()(n,"payload.ad_config.show_ad_level",af.O.NO_ADS);v&&!y&&b===af.O.NO_ADS&&e.dispatch((0,Af.ms)({enabled:!1}))}return t(n)}const Hh=function(e){return function(t){return function(n){return zh(e,t,n)}}};const Vh=function(e){return function(t){return function(n){return function(e,t,n){var r=n.meta?n.meta.toasts:null;if(r&&r[n.type]){var o=r[n.type];e.dispatch((0,qp.QJ)(o.type)(o.payload))}return t(n)}(e,t,n)}}};var qh=n("qIoc"),Wh=n("DHkX"),$h=n("mt+I");function Gh(e){e.dispatch((0,$h.UA)(new Error((0,Wh.Z)("errGiveEmerald"))))}function Yh(e){e.dispatch((0,$h.Bs)({message:(0,Wh.Z)("errGiftReceived")})),(0,d.xx)()}function Kh(e,t,n){switch(t(n),n.type){case Fh.nc:return function(e){e.dispatch((0,Hl.G3)({name:qh.nm}))}(e);case Fh.sB+Nd.MR:return void((r=n.payload).url&&(0,d.gB)(r.url));case Fh.sB+Nd.ES:return function(e){e.dispatch((0,Hl.gk)(qh.nm)),e.dispatch((0,Fh.XW)()),Gh(e)}(e);case Fh.Vg:return function(e,t){t.showError?Gh(e):e.dispatch((0,Hl.G3)({name:qh.vE}))}(e,n.payload);case Fh.GO+Nd.ES:return Yh(e);case Fh.tn+Nd.MR:return function(e,t){var n=t.payload;n.url&&(0,d.gB)(n.url)}(0,n);case Fh.tn+Nd.ES:return Yh(e)}var r}const Jh=function(e){return function(t){return function(n){return Kh(e,t,n)}}};var Xh=n("LvDl"),Qh=n("mnaY");var em,tm=function(e){return function(t){return function(n){return function(e,t,n){if((0,xd.s)())return t(n);if(n.type===rd.AE){var r=(0,d.Uz)();if((0,Xh.has)(r,Qh.Bx)){delete r[Qh.Bx];var o=(0,d.oO)(r);return(0,d.lO)(null,"",(0,d.Jz)()+(o?"?".concat(o):"")+(0,d.FK)()),e.dispatch((0,qp.QJ)(Qh.pn)(qp.af)),t(n)}}if(n.meta){var i=n.meta,a=i.redirectTo404,s=i.redirect403To404,u=(0,Xh.get)(n,"payload.statusCode");if(a&&404===u||s&&403===u){e.dispatch((0,qp.wB)(qp.af));var c=(0,d.an)(),l=e.getState().history.get("previous");if(l){var p=l.get("pathname")+l.get("search")+l.get("hash");(0,d.lO)(null,"",p),(0,d.A3)(p)}else{var f=(0,d.cN)(c);(0,d.lO)(null,"",f),(0,d.A3)(f)}}}return t(n)}(e,t,n)}}},nm=n("8GRf"),rm="INIT_MODULES",om="PROCESS_MODULES",im="UPDATE_MODULES",am=(0,Gl.Z)(rm,(function(e){return e})),sm=(0,Gl.Z)(om,(function(e){return e})),um=(0,Gl.Z)(im,(function(e){return e}));const cm=(0,Qf.Z)((em={},o()(em,fh.P5,(function(e,t){var n,r=t.payload,o=e.get("promotedPostVideoViewed").get(r.hash);n=o?o.toJS():{totalWatchTime:0};var i=r.duration,a=n.totalWatchTime+r.timePlayed,s=e.get("promotedPostVideoViewed").set(r.hash,fd().fromJS({totalWatchTime:a,totalVideoLength:i,hash:r.albumHash}));return e.setIn(["promotedPostVideoViewed"],s)})),o()(em,fh.Ye,(function(e,t){var n=t.payload;return e.set("promotedPostVideoViewed",e.get("promotedPostVideoViewed").delete(n))})),o()(em,od.n6,(function(e,t){var n=t.payload;return e.set("postNavigation",fd().Map(n))})),o()(em,od.Pe,(function(e,t){var n=t.payload;return e.set("postNavigationSource",fd().Map(n))})),em),fd().Map({promotedPostVideoViewed:fd().Map({}),postNavigation:fd().Map({}),postNavigationSource:fd().Map({})}));var lm,dm="clearAlert",pm="showAlert",fm=((0,Gl.Z)(dm,(function(){return!0})),(0,Gl.Z)(pm,(function(){return!0})),"alertTypeNone"),hm="alertPostNotFound";const mm=(0,Qf.Z)((lm={},o()(lm,dm,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).set("visible",!1).set("type",fm)})),o()(lm,od.XL,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(arguments.length>1?arguments[1]:void 0).error?e.set("visible",!0).set("type",hm):e})),o()(lm,pm,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).set("visible",!0).set("type",hm)})),lm),fd().Map({visible:!1,type:fm}));var gm=n("ntpn"),vm={popOverBanner:{show:!1,type:rh.IL,postId:"",eventLocation:{top:0,left:0}},galleryPopOverBanner:{show:!1,type:rh.RT,title:"",description:"",parentNode:{},styles:{}},showBanner:!0};const ym=(0,Qf.Z)(o()({},rh.lc,gm.z),fd().fromJS(vm));var bm,_m=n("2sJM");const wm=(0,Qf.Z)((bm={},o()(bm,_m.dB,gm.z),o()(bm,_m.Lt,gm.z),bm),fd().fromJS({overlayVisible:!1,panelVisible:!1}));var Cm,Sm=n("9WAK"),Em=n.n(Sm),km=n("E+oP"),Im=n.n(km),Am="HYDRATE",xm=n("VQbN"),Lm=n("SOFB");function Om(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mm(e){for(var t=1;t2&&void 0!==arguments[2]&&arguments[2],o=e.get("currentPost");return n||!o||o.isEmpty()?e.set("currentPost",n?(0,pd.Map)((0,pd.fromJS)((0,Xf.W1)(n,r))):null):e}function Rm(e,t){var n=t.payload,r=e.get("currentPostMeta");return r=r instanceof pd.Map?Object.fromEntries(r):r,e.set("currentPostMeta",n?(0,pd.Map)((0,pd.fromJS)(Mm(Mm({},r),n))):null)}function Nm(e,t,n){var r=t.meta.hash;return e.set("preloadedPosts",e.get("preloadedPosts").set(r,n))}function Fm(e,t){var n=e.getIn(["currentPost","id"]);return t.get("id")===n?e.set("currentPost",t):e}function jm(e,t){var n=t.payload,r=e.get("currentPost");return n.postId!==r.get("id")||"undefined"===n.favorite?e:Fm(e.setIn(["currentPostMeta","user","favorite"],n.favorite).set("favoriteData",(0,pd.Map)({postId:n.postId,isAlbum:n.isAlbum})),r.set("favorite",n.favorite))}function Um(e,t,n,r){if(t===e)return n;var o=null!=r?r:of.pb[t],i=n+-1*(of.pb[e]-o);return Number.isNaN(i)?n:i}function Zm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).payload,n=t.postId,r=t.vote,o=t.accoladeId,i=t.randomUpvotes,a=e.get("currentPost"),s=e.get("currentPostMeta");if(!a||s.get("id")!==n||!r)return e;var u=s.getIn(["user","vote"])||of.gZ,c=s.getIn(["post","point_count"])||0;c=Um(u,r,c,i);var l=e.setIn(["currentPostMeta","user","vote"],r).setIn(["currentPostMeta","post","point_count"],c);return l=function(e,t){var n=e.getIn(["currentPostMeta","post","accolades_counts"]);n=n?n.toJS():{};var r=e.getIn(["currentPostMeta","user","accolades","accolade_id"]),o=e.getIn(["currentPostMeta","user","accolades","remaining"])||0;return n[r]&&(n[r]>1?--n[r]:delete n[r]),t&&(n[t]=n[t]?++n[t]:1,r||--o),e.setIn(["currentPostMeta","user","accolades","accolade_id"],t||null).setIn(["currentPostMeta","user","accolades","remaining"],o>0?o:0).setIn(["currentPostMeta","post","accolades_counts"],(0,pd.Map)((0,pd.fromJS)(n)))}(l,o),Fm(l,a.merge((0,pd.Map)({vote:r,score:c})))}function Bm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload,n=t.commentId,r=t.vote;return r?r&&r!==of.gZ?e.setIn(["currentPostMeta","user","comment_votes","".concat(n)],r):e.deleteIn(["currentPostMeta","user","comment_votes","".concat(n)]):e}const zm=(0,Qf.Z)((Cm={},o()(Cm,Am,(function(e,t){return t.payload.postsData})),o()(Cm,od.aB,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload.postId;return e.set("currentPostInView",t).set("historyChanges",e.get("historyChanges")+1)})),o()(Cm,od.YV+Nd.MR,Pm),o()(Cm,od.YV+Nd.ES,(function(e,t){var n=t.payload,r=e.get("error").failedFetchAttempts;return e.set("error",Mm(Mm({},n),{},{failedFetchAttempts:r+1}))})),o()(Cm,od.hL+Nd.MR,(function(e,t){return Pm(e,t,!0)})),o()(Cm,od.ST+Nd.MR,Pm),o()(Cm,od._u+Nd.MR,Rm),o()(Cm,od.Xc+Nd.tj,(function(e,t){var n=t.payload,r=e.set("currentPost",n||null).set("preloadedPosts",e.get("preloadedPosts").delete(n.get("id")));if(n&&n.has("metadata")){var o=e.get("currentPostMeta");return r.set("currentPostMeta",(0,pd.Map)([].concat(Sd()(o),Sd()(n.get("metadata")))))}return r})),o()(Cm,od.Xc+Nd.MR,Rm),o()(Cm,od.tw+Nd.tj,(function(e,t){return Nm(e,t,!1)})),o()(Cm,od.tw+Nd.MR,(function(e,t){return Nm(e,t,!0)})),o()(Cm,od.jh+Nd.tj,jm),o()(Cm,od.jh+Nd.ES,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.payload;return jm(e,Mm(Mm({},Rd()(t,["payload"])),{},{payload:Mm(Mm({},n),{},{favorite:!n.favorite})}))})),o()(Cm,od.ot+Nd.tj,Zm),o()(Cm,od.ot+Nd.ES,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.payload,r=(t.meta,Zm(e,Mm(Mm({},Rd()(t,["payload","meta"])),{},{payload:Mm(Mm({},n),{},{vote:n.initialVote,accoladeId:n.initialAccoladeId})})));return(n.accoladeId&&null===n.initialAccoladeId||!n.accoladeId&&n.initialAccoladeId)&&(r=r.setIn(["currentPostMeta","user","accolades","remaining"],r.getIn(["currentPostMeta","user","accolades","remaining"])+1)),r})),o()(Cm,od.DW,Pm),o()(Cm,od.vw,(function(e,t){var n=t.payload;return e.set("byLinePosition",n)})),o()(Cm,od.nk,(function(e,t){var n=t.payload;return e.set("prevNextPosition",n)})),o()(Cm,od.k2,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).set("isMainContentReady",!0)})),o()(Cm,od.My,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload;return e.setIn(["currentPostMeta","post","comment_count"],e.getIn(["currentPostMeta","post","comment_count"],0)-t.delta)})),o()(Cm,oh.vr+Nd.tj,Bm),o()(Cm,oh.vr+Nd.ES,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.payload;return t.meta,Zm(e,Mm(Mm({},Rd()(t,["payload","meta"])),{},{payload:Mm(Mm({},n),{},{vote:n.initialVote})}))})),o()(Cm,od.C8,(function(e,t){var n=t.payload;if(n.hash!==e.getIn(["currentPost","id"]))return e;var r=n.isEventActive?Math.max(n.ups-n.downs,e.getIn(["currentPost","score"])):n.ups-n.downs;return e.setIn(["currentPost","score"],r).setIn(["currentPostMeta","post","point_count"],r).setIn(["currentPostMeta","post","upvote_count"],n.ups).setIn(["currentPostMeta","post","downvote_count"],n.downs)})),o()(Cm,od.zw,(function(e,t){var n=t.payload;if(n.hash!==e.getIn(["currentPost","id"]))return e;var r=parseInt(n.view_count,10);return r===e.getIn(["currentPostMeta","post","view_count"])?e:e.setIn(["currentPost","views"],r).setIn(["currentPostMeta","post","view_count"],r)})),o()(Cm,oh.jE+Nd.MR,(function(){return Bm(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{payload:{commentId:(arguments.length>1?arguments[1]:void 0).payload.id,vote:of.UP}})})),o()(Cm,od.wr,(function(e,t){var n=t.payload,r=n.prev,o=n.next;return e.set("prevPost",r).set("nextPost",o)})),o()(Cm,od.uH,(function(e,t){var n=t.payload.index;return e.set("currentPostIndex",n).set("error",Tm)})),o()(Cm,od.yC,(function(e,t){var n=t.payload;return e.set("recircSortType",n.sort)})),o()(Cm,od.HT,(function(e){return e.set("favoriteData",(0,pd.Map)({}))})),o()(Cm,od.KF,(function(e,t){var n=t.payload,r=n.index,o=n.height,i=e.get("currentPost");return i?e.set("currentPost",i.setIn(["media",r,"renderHeight"],o)):e})),o()(Cm,od.u6,(function(e){var t=e.get("currentPost");if(!t)return e;var n=t.get("media");return n=n.map((function(e){return e.set("renderHeight",0)})),e.set("currentPost",t.set("media",n))})),o()(Cm,od.T1,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).payload.isPostVisible;return e.setIn(["currentPostMeta","isPostVisible"],t)})),o()(Cm,Gd.OU+Nd.MR,(function(e,t){var n,r=t.meta.followType,o=(null!==(n=e.getIn(["currentPostMeta","user"]))&&void 0!==n?n:(0,pd.Map)({})).set("user_follow",!0).set("user_follow_type",r);return e.setIn(["currentPostMeta","user"],o)})),o()(Cm,Gd.xR+Nd.MR,(function(e){var t,n=(null!==(t=e.getIn(["currentPostMeta","user"]))&&void 0!==t?t:(0,pd.Map)({})).set("user_follow",!1).set("user_follow_type",Lm._H);return e.setIn(["currentPostMeta","user"],n)})),Cm),Dm);var Hm,Vm=500,qm=fd().Map({posts:fd().OrderedMap(),postOrder:fd().List(),recircPosts:fd().OrderedMap(),recircPostOrder:fd().List()});function Wm(e,t,n,r){var o=fd().Map({postId:n,postHeight:r});return e.set("postOrder",e.get("postOrder").insert(t,o))}function $m(e){var t=e.postData,n=e.isExpanded,r=e.streamParam,o=e.streamSection,i=e.page,a=e.isV1,s=a?Xf.W1:xm.W1;return fd().fromJS(s(t)).set("previewLink",t.link).set("isAlbum",t.is_album||t.hasOwnProperty("layout")&&""!==t.layout).set("fullyFetched",!t.is_album&&!a).set("expanded",n).set("streamParam",r||t.streamParam).set("streamSection",o||t.streamSection).set("galleryPage",i).set("renderHeight",0).delete("is_album")}function Gm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(t.error)return e;var n=(0,Xf.W1)(t.payload);n.fullyFetched=!0,n.emptyPost=!1,n.currentRoute&&"galleryPost"!==n.currentRoute&&(n.isAlbum=n.isAlbum||"album"===n.currentRoute),n.showAds=!n.isAd&&!1===n.isMature;var r=fd().fromJS(t.payload).merge(n),i=e.set("posts",fd().OrderedMap(o()({},n.id,r)).concat(e.get("posts"))),a=e.getIn(["posts",n.id]);return a&&(r=a.merge(r)),r.get("putFirst")||a&&a.get("putFirst")?(i=i.setIn(["posts",n.id],r.set("expanded",!0).set("putFirst",!0)),a&&(i=i.set("postOrder",i.get("postOrder").filter((function(e){return e.get("postId")!==n.id})))),Wm(i,0,n.id,Vm)):i.setIn(["posts",n.id],r)}function Ym(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.payload.id,r=e.getIn(["posts",n]);if(!r)return e;var o=r.merge(fd().fromJS({metadata:t.payload}));return e.setIn(["posts",n],o)}function Km(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qm,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.payload,o=r.insertionModifier,i=r.shuffle,a=r.data,s=r.streamSection,u=r.streamParam,c=r.page,l=t.payload.posts;if(!l)return e;var d="posts",p="postOrder";return n&&(d="recircPosts",p="recircPostOrder"),i&&a&&!a.is_promoted&&(l=Em()(l)),o===id.mm||t.meta&&t.meta.cache?e.set(d,l.reduce((function(e,n){return e.set(n.id,$m({postData:n,isExpanded:!1,streamSection:s,streamParam:u,page:c,isV1:t.meta.versionAPI===Ul.x6}))}),fd().OrderedMap({}))).set(p,function(e){return fd().List(Object.values(e).reduce((function(e,t){var n=t.id,r=t.isAdTile,o=t.isFastGridAd;return r||o||e.push(fd().Map({postId:n,postHeight:Vm})),e}),[]))}(l)):l.reduce((function(e,n){var r=e.get(d),o=r.get(n.id);return o&&o.get("fullyFetched")?e:(o||n.isAdTile||n.isFastGridAd||(e=e.set(p,e.get(p).push(fd().Map({postId:n.id,postHeight:Vm})))),e.set(d,r.set(n.id,$m({postData:n,isExpanded:o&&o.get("expanded"),streamParam:u,streamSection:s,page:c,isV1:t.meta.versionAPI===Ul.x6}))))}),e)}const Jm=(0,Qf.Z)((Hm={},o()(Hm,Am,(function(e,t){return t.payload.posts})),o()(Hm,od.XL,Gm),o()(Hm,od.YV+Nd.MR,Gm),o()(Hm,od.tw+Nd.MR,Gm),o()(Hm,od.b4+Nd.MR,Ym),o()(Hm,od._u+Nd.MR,Ym),o()(Hm,od.Xc+Nd.MR,Ym),o()(Hm,id.cc,Km),o()(Hm,id.cc+Nd.MR,Km),o()(Hm,id.KZ+Nd.MR,(function(){return Km(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0,!0)})),o()(Hm,$d.fc,(function(e,t){var n=t.payload,r=(0,mh.h4)(n),o=(0,Bh.Z)(n,"subscription.is_subscribed");return r&&!o?e:e.set("posts",e.get("posts").filter((function(e){return!e.get("isAd")})))})),o()(Hm,id.cc+Nd.xy,Km),o()(Hm,od.Ju,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload.postId,n=e.getIn(["posts",t]).set("expanded",!0);return e.setIn(["posts",t],n)})),o()(Hm,od.Bn,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qm,t=arguments.length>1?arguments[1]:void 0,n=t.payload,r=n.ad,o=n.index,i=n.onlyAnnouncement,a=n.indexFromLocation,s=void 0===a?Ch.q7:a,u=(0,hh.yh)(r);if(!u)return e;var c=(0,hh.VN)(u);if(Im()(c))return e;if(i&&!c.isAnnouncement)return e;c=(0,hh.Br)(c,u);var l=fd().fromJS(c).merge((0,xm.W1)(c)),d=o+s,p=e.set("posts",e.get("posts").set(l.get("id"),l.set("adSource",u)));return p=Wm(p,d,c.id,Vm),t.payload.adSource=u,p})),o()(Hm,od.aB,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload.postId,n=e.getIn(["posts",t]).set("viewedOnce",!0);return e.setIn(["posts",t],n)})),o()(Hm,id.ZA,(function(){return qm})),o()(Hm,id.ng,(function(e){return e.set("recircPosts",fd().OrderedMap()).set("recircPostOrder",fd().List())})),o()(Hm,od.ot+Nd.tj,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).payload,n=t.postId,r=t.vote,o=t.randomUpvotes,i=e.getIn(["posts",n]);if(!i)return e;switch(r){case of.UP:i=i.set("ups",i.get("ups")+(null!=o?o:1));break;case of.WV:i=i.set("downs",i.get("downs")+1);break;case of.gZ:i.get("vote")===of.UP&&(i=i.set("ups",i.get("ups")-1)),i.get("vote")===of.WV&&(i=i.set("downs",i.get("downs")-1))}return i=i.set("points",Um(i.get("vote"),r,i.get("points"),o)).set("vote",r),e.setIn(["posts",n],i)})),o()(Hm,od.q8,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).payload,n=t.postId,r=t.visibleImages;return e.setIn(["posts",n,"visibleImages"],r)})),o()(Hm,od.JX,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).payload,n=t.postOrderIndex,r=t.height;return e.setIn(["postOrder",n,"postHeight"],r)})),o()(Hm,od.rb,(function(e,t){var n=t.payload.hash;return e.getIn(["posts",n],null)?e.set("postOrder",e.get("postOrder").filter((function(e){return e.get("postId")!==n}))):e})),Hm),qm);var Xm,Qm=n("zdiy"),eg=n.n(Qm),tg=n("hOZj"),ng=n("+Jo0"),rg=n("puhG"),og=n("vTdI"),ig=n("HDV1");function ag(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sg(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=(arguments.length>1?arguments[1]:void 0).payload,r=n.commentId,o=n.vote,i=n.initialVote;return o?(o===of.gZ?e=i===of.UP?-1:1:(e=o===of.UP?1:-1,i&&i!==of.gZ&&(e*=2)),t.update("postComments",lg(r,(function(t){return t.set("point_count",t.get("point_count")+e)})))):t}var pg=[];const fg=(0,Qf.Z)((Xm={},o()(Xm,Am,(function(e,t){return t.payload.comments})),o()(Xm,oh.P9,gm.z),o()(Xm,oh.vP,gm.z),o()(Xm,oh.El,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload,n=t.postId,r=t.comments,o=t.viewCommentId,i=t.viewComments;if(-1===pg.indexOf(n))for(pg.push(n);pg.length>3;)pg.shift();return eg()(r,{viewCommentId:o,viewComments:i}),e.set(n,fd().fromJS(r)).filter((function(e,t){return-1!==pg.indexOf(t)||"replyActive"===t||"commentDeeplinkId"===t}))})),o()(Xm,oh.Qh+Nd.MR,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload;return t?e.set("top",fd().fromJS(t.slice(0,9))):e})),o()(Xm,oh.dG+Nd.MR,(function(e,t){var n=t.payload,r=t.meta,o=n.reduce((function(e,t){return e.set(t.id,(0,pd.Map)((0,pd.fromJS)(t)))}),new pd.OrderedMap({}));return e.set("postComments",e.get("postComments").merge(o)).set("postCommentsSort",r.options.params.sort).set("postCommentsNextPageLink",t.headerLink).set("isAllPostCommentsLoaded",!t.headerLink)})),o()(Xm,oh.ME+Nd.MR,(function(e,t){var n=t.payload,r=t.meta,i=(0,pd.Map)((0,pd.fromJS)(n));r.replies&&(i=i.set("comments",fd().List((0,pd.fromJS)(r.replies))));var a=(0,pd.OrderedMap)(o()({},i.get("id"),i));return e.set("postComments",a)})),o()(Xm,oh.Qx,(function(e){return e.merge(ug)})),o()(Xm,oh.vr+Nd.tj,dg),o()(Xm,oh.vr+Nd.ES,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.payload;return t.meta,dg(e,sg(sg({},Rd()(t,["payload","meta"])),{},{payload:sg(sg({},n),{},{vote:n.initialVote})}))})),o()(Xm,tg.sr+Nd.MR,(function(e,t){var n=t.payload;return e.set("reactionGifCollections",fd().List(n))})),o()(Xm,tg.H9+Nd.tj,(function(e){return e.set("reactionGifRequestPending",!0)})),o()(Xm,tg.H9+Nd.MR,(function(e,t){var n=t.payload,r=[];return r=r.concat(n.images),e.set("reactionGifRequestPending",!1).set("gifsFromCategory",e.get("gifsFromCategory").concat(r)).set("reactionGifSearchFullpageNum",e.get("reactionGifSearchFullpageNum")+1)})),o()(Xm,tg.H9+Nd.ES,(function(e){return e.set("reactionGifRequestPending",!1).set("reactionGifSearchFullpageNum",0)})),o()(Xm,tg.Y0,(function(e){return e.set("reactionGifSearchFullpageNum",0).set("gifsFromCategory",fd().List([]))})),o()(Xm,oh.jE+Nd.MR,(function(e,t){var n=t.payload,r=(0,pd.Map)((0,pd.fromJS)(n));return n.parent_id?e.update("postComments",lg(n.parent_id,(function(e){return e.set("comments",e.get("comments").unshift(r))}))):(r=new pd.OrderedMap({}).set(n.id,r),e.set("postComments",r.merge(e.get("postComments"))))})),o()(Xm,oh.Ul,(function(e,t){var n=t.payload,r=e.get("postComments"),o=(0,ig.bT)(r,n.mutedUsers,n.isLoggedIn),i=o.comments,a=o.skipped;return a?e.set("postComments",i).set("skippedCommentsCount",a):e})),o()(Xm,oh.x7,(function(e){var t=e.get("postComments"),n=e.get("top");return e.set("postComments",(0,ig.Dk)(t,n))})),o()(Xm,oh.Di+Nd.tj,(function(e,t){var n=t.meta,r=(0,ig.L1)(e.get("postComments"),n.commentId).comments;return e.set("postComments",r)})),o()(Xm,oh.t6,(function(e,t){var n=t.payload;return e.set("commentToDeleteId",n.commentId)})),o()(Xm,oh.Uc,(function(e){return e.set("commentToDeleteId",0)})),o()(Xm,tg.ZB,(function(e,t){var n=t.payload;return e.set("reactionGifSearchString",n.searchString)})),Xm),cg);var hg,mg,gg=n("UCMG");function vg(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return yg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yg(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function yg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},n=(arguments.length>1?arguments[1]:void 0).payload,r=n.userAgent,o=n.site,i=new Map([[Yl.VX,/Windows Phone/],[Yl.IP,/Android/],[Yl.z7,/iPad|iPhone|iPod/]]),a=Yl.wG,s=vg(i);try{for(s.s();!(e=s.n()).done;){var u=xp()(e.value,2),c=u[0];if(u[1].test(r)){a=c;break}}}catch(e){s.e(e)}finally{s.f()}return t=(t=(t=(t=(t=t.set(Yl.yZ,r)).set(Yl.iw,a)).set(Yl.vW,gg.VD.test(r))).set(sd.q5,o===sd.q5)).set(sd.Jq,o===sd.Jq),a===Yl.z7&&(t=(t=(t=(t=(t=(t=(t=t.set(Yl.OU,gg.OL.test(r))).set(Yl.bZ,gg.Yc.test(r))).set(Yl.p_,gg.dL.test(r))).set(Yl.yj,gg.gZ.test(r))).set(Yl.vw,gg.k4.test(r)&&!t.get(Yl.yj))).set(Yl.Gr,gg.WQ.test(r))).set(Yl.f4,gg.sf.test(r))),t=(t=t.set(Yl.EU,gg.OM.test(r)||t.get(Yl.yj))).set(Yl.EX,(0,zl.F)(r))})),o()(mg,Xl,gm.z),o()(mg,$d.fc,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload,n=t.city,r=t.countryCode,o=t.metroCode,i=t.region;return e.merge({countryCode:r,city:n,metroCode:o,region:i})})),mg),bg);var wg=n("8pDf");const Cg=(0,Qf.Z)(o()({},wg.fK,gm.t),fd().Map({pinned:!1}));var Sg,Eg=n("Ha5p");const kg=(0,Qf.Z)((Sg={},o()(Sg,Eg._t,gm.z),o()(Sg,Eg.bT,gm.z),Sg),fd().fromJS({scrollTop:0,height:0,containerHeight:(0,xd.s)()?null:(0,d.Be)()}));var Ig="UPDATE_SHARE";(0,Gl.Z)(Ig,(function(e){return{show:!0,postId:e.postId}})),(0,Gl.Z)(Ig,(function(){return{show:!1,postId:void 0}})),(0,Gl.Z)("DO_SHARE",(function(e){return{postId:e.postId,destination:e.destination}}),(function(e){var t=e.postId,n=e.destination,r=e.tags;return{analytics:{type:pp.fc,payload:{type:pp.VI,destination:n,postId:t,tags:r}}}}));const Ag=(0,Qf.Z)(o()({},Ig,gm.z),fd().Map({postId:"",show:!1}));var xg=n("7Gt9");const Lg=(0,Qf.Z)(o()({},xg.Nm,gm.z),fd().Map({show:!1,type:xg.RR.DOWNLOAD_APP})),Og=(0,Qf.Z)(o()({},nh.D,gm.z),fd().Map({show:!1,src:""}));var Mg,Tg=n("VeLT");function Dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pg(e){for(var t=1;t0;if(s>=400?w=e.get("failedFetchAttempts")+1:o++,!C&&!e.get("streamIsPromoted"))if(o=0,C=!0,p)i=p;else if(1===w){var S=(0,Tg.nn)();i=S.streamSection,b=S.streamSort,y=S.streamParam}var E={failedFetchAttempts:w,isFetching:!1,fetchError:null,hasMore:C,streamSection:i,streamParam:y,streamPage:o,streamSort:b,streamWindow:_,isBlockedByWall:g,unLockedOnce:v,changingStream:!1,statusCode:s,sortList:h,sectionList:m,insertionModifier:f};return u&&Object.assign(E,{streamBackgroundHash:u.background_id||u.background_hash,streamDescription:u.description,streamDescriptionAnnotations:{},streamLogoHash:u.logo_id,streamLogoDestinationURL:u.logo_url,streamDisplayName:u.display||u.display_name,streamIsPromoted:u.is_promoted,streamFollowers:u.subscriber_count,streamTotalItems:u.post_count,streamIsWhitelisted:u.is_whitelisted}),e.merge(E)}function jg(e){return e.set("isFetching",!1)}const Ug=(0,Qf.Z)((Mg={},o()(Mg,Am,(function(e,t){return t.payload.gallery})),o()(Mg,Hl.qD,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).set("pauseAnimation",!0)})),o()(Mg,Hl.Oj,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).set("pauseAnimation",!1)})),o()(Mg,Hl.uZ,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).set("pauseAnimation",!0)})),o()(Mg,Hl.tw,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).set("pauseAnimation",!1)})),o()(Mg,id.qN,(function(){return Ng(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})})),o()(Mg,id.n4,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.payload&&t.payload.streamSection||e.get("streamSection"),r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ad.HM;return ad.jY[e].map((function(e){return{label:(0,rg.Z)("".concat(e,"GallerySort")),value:e}}))}(n),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ad.HM;return ad.db.indexOf(e)>-1?ad.db.map((function(e){return{label:(0,rg.Z)("".concat(e,"Gallery")),value:e}})):[]}(n),i=!(!t.meta||!t.meta.initial)||e.get("isInitialized");return e.merge(Pg(Pg({},t.payload),{},{sortList:r,sectionList:o,isInitialized:i}))})),o()(Mg,id.nR,gm.z),o()(Mg,id.r2,gm.z),o()(Mg,id.Rx,(function(e,t){return"user"===t.payload.streamSection&&(t.payload.streamSection="new"),(0,gm.z)(e,t)})),o()(Mg,id.rP,gm.z),o()(Mg,id.cc+Nd.tj,(function(e){return e.set("isFetching",!0)})),o()(Mg,id.cc+Nd.ES,(function(e,t){return e.merge({fetchError:{message:t.payload.message,stack:t.payload.stack},hasMore:!1,failedFetchAttempts:e.get("failedFetchAttempts")+1,isFetching:!1})})),o()(Mg,id.cc+Nd.MR,Fg),o()(Mg,id.cc+Nd.xy,Fg),o()(Mg,id.cc,Fg),o()(Mg,id.TZ,jg),o()(Mg,id.E3,jg),o()(Mg,id.KZ+Nd.MR,jg),o()(Mg,od.XL,(function(e,t){return t.payload.directLink?e.set("directLinkId",t.payload.id):e})),o()(Mg,id.ZA,(function(e){return Ng(e)})),o()(Mg,id.d6,(function(e,t){var n=t.payload;return e.set("searchQuery",n.searchQuery)})),Mg),fd().Map(Rg));var Zg;const Bg=(0,Qf.Z)((Zg={},o()(Zg,rf.MV,gm.z),o()(Zg,rf.GO,gm.z),o()(Zg,rf.k_,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload,n=t.width,r=t.height;return e.set("viewPort",fd().fromJS({width:n,height:r}))})),o()(Zg,rf.$l,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=Math.round(t.payload.scrollY);return Number.isInteger(n)&&n>=0?e.set("positionY",n):e})),Zg),fd().Map({contentWidth:1335,positionY:0,viewPort:fd().fromJS({width:0,height:0}),isRetina:!(0,xd.s)()&&(0,d.R3)()}));function zg(){var e;return(0,Qf.Z)((e={},o()(e,Tp.n8,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload,n=t.name,r=t.data;if(!e.get(n))return e;var o=(0,pd.fromJS)(r);return e.get(n).get("experimentData")&&(o=e.get(n).get("experimentData").merge(o)),e.set(n,e.get(n).set("experimentData",o))})),o()(e,Tp.Kr,gm.z),o()(e,$d.fc,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload,n=t.success,r=t.data;if(!n||!r||!r.abTests)return e;var o=e,i=new Date,a=Ud.ZP.getParams();return r.abTests.forEach((function(e){e.header&&(a[e.header.toUpperCase()]=e.variants[0].variant),o=o.set(e.test,(0,pd.Map)({expiration:i.setMonth(i.getMonth()+6),isControl:"control"===e.variants[0].variant,header:e.header,activeTreatment:0,isActive:!0,firstImpression:!0,treatments:[e.variants[0].variant]}))})),Ud.ZP.addParams(a),o})),e),(0,pd.Map)({}))}var Hg,Vg=n("btPs"),qg=n("Quwk"),Wg={is_admin:Vg.GN,is_supermoderator:Vg.GQ,is_moderator:Vg.qu,is_community:Vg.Be,is_adops:Vg.N5,is_impersonated:Vg.Ue};var $g={id:null,incusID:null,username:void 0,he:void 0,isLoggedIn:!1,editBio:!1,reputation:0,flags:(0,pd.Map)({desktopFrontPageBeta:!1,desktopProfilePageBeta:!1,desktopPostPageBeta:!1,desktopEditPageBeta:!1}),roles:[],settings:{},isLoaded:Kf.yh,isMature:!1,avatarList:[],mutedUsers:(0,pd.List)([]),hasPaid:!1,subscription:(0,pd.Map)({beta:!1,isSubscribed:!1,isFoundersClub:!1,features:{},provider:""}),sid:null,userBattle:(0,pd.Map)(),arcadeToken:"",isArcadeTokenFetched:!1};const Gg=(0,Qf.Z)((Hg={},o()(Hg,rd.Yh+Nd.MR,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.payload,r=n.url,o=n.incus_id,i=n.id,a=n.show_mature,s=n.is_subscribed,u=n.is_founders_club,c=n.provider,l=n.reputation,d=n.he,p=n.sid;return e.merge({username:r.toLowerCase(),displayUsername:r,isLoggedIn:!0,incusID:o,id:i,isLoaded:!0,isMature:a,reputation:l,he:d,sid:p}).setIn(["roles"],function(e){var t=[];for(var n in Wg)!0===e[n]&&t.push(Wg[n]);return t}(t.payload)).setIn(["subscription","isSubscribed"],s).setIn(["subscription","isFoundersClub"],u).setIn(["subscription","provider"],c)})),o()(Hg,rd.UW+Nd.MR,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload;return e.set("settings",{email:t.email})})),o()(Hg,rd.Yh,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload,n=t.isLoaded,r=void 0!==n&&n,o=t.isLoggedIn,i=void 0!==o&&o,a=t.username;return e.merge({isLoaded:r,username:a,isLoggedIn:i})})),o()(Hg,rd.Yh+Nd.ES,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).merge({username:null,isLoggedIn:!1,isLoaded:!0})})),o()(Hg,rd.CF+Nd.MR,(function(e,t){var n,r=t.payload;return e.set("arcadeToken",null!==(n=null==r?void 0:r.token)&&void 0!==n?n:"").set("isArcadeTokenFetched",!0)})),o()(Hg,rd.CF+Nd.ES,(function(e){return e.set("isArcadeTokenFetched",!0)})),o()(Hg,rd.rP,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).merge({editBio:!1})})),o()(Hg,rd.Fe,gm.z),o()(Hg,rd.y8,(function(e,t){var n=t.payload;return e.set("flags",e.get("flags").merge((0,pd.Map)(n)))})),o()(Hg,rd.mj,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).merge($g)})),o()(Hg,rd.zg,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).merge({isMature:!0})})),o()(Hg,rd.kN,gm.z),o()(Hg,rd.wD+Nd.MR,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload;return e.set("avatarList",t)})),o()(Hg,rd.gq,(function(e,t){var n=t.payload;return e.set("muteUserData",(0,pd.Map)(n))})),o()(Hg,rd.S6,(function(e){return e.set("muteUserData",(0,pd.Map)({}))})),o()(Hg,rd.ZM+Nd.MR,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload;return e.set("mutedUsers",(0,pd.List)(t.items?t.items.map((function(e){return e.url})):[]))})),o()(Hg,rd.AE,gm.z),o()(Hg,$d.fc,(function(e,t){var n=t.payload.subscription;return n?e.merge({subscription:{isSubscribed:n.is_subscribed,beta:n.beta,features:n.features}}):e})),o()(Hg,rd.l_+Nd.MR,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload;return t.metadata?e.set("userBattle",e.get("userBattle").merge((0,pd.fromJS)((0,qg.nC)(t)))):e})),o()(Hg,rd.Ni+Nd.MR,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.payload,r=t.meta,o=n.count,i=n.user_remaining_count,a=r.postId;return e.set("userBattle",e.get("userBattle").merge({currentPostCount:o,currentPostId:a,userRemainingCount:i}))})),o()(Hg,rd.cn,(function(e,t){var n=t.payload,r=n.postId,o=n.count,i=n.isUser;if(r!==e.getIn(["userBattle","currentPostId"]))return e;var a=parseInt(o,10);if(a<=e.getIn(["userBattle","currentPostCount"]))return e;var s=e.setIn(["userBattle","currentPostCount"],a);return i?s.setIn(["userBattle","userRemainingCount"],e.getIn(["userBattle","userRemainingCount"])-1):s})),o()(Hg,rd.oS,(function(e,t){var n=t.payload.showConfetti;return e.setIn(["userBattle","showConfetti"],n)})),Hg),(0,pd.Map)($g));var Yg,Kg={reachedEnd:!1,isFetching:!1,unseenNotifications:0,unseenConversations:0,unseen:!1,notifications:fd().List(),pageToken:null,isUpdateRequired:!0,resetUponReceive:!1,toastCounts:fd().Map({comments:0,votes:0,mentions:0,replies:0,trophies:0})};function Jg(e,t){var n=t.payload,r=t.meta,o=n.message,i=t.type.replace(new RegExp(Nd.ES,"g"),"");switch(i){case zp.Pl:o=o||(0,rg.Z)("errorReceivedNotifications");break;case zp.Qo:o=o||(0,rg.Z)("errorMarkAllAsRead");break;case zp.hR:o=o||(0,rg.Z)("errorMarkAsRead")}return e.mergeDeep({isUpdateRequired:!1,error:{message:o,type:i,meta:r}})}const Xg=(0,Qf.Z)((Yg={},o()(Yg,zp.BR,gm.t),o()(Yg,zp.Pl+Nd.MR,(function(e,t){var n=t.payload,r=n.notifications,o=n.unseen_notifications,i=n.unseen_conversations,a=n.toast_counts,s=t.payload.page_token,u=Number.isNaN(o)?0:Number.parseInt(o,10),c=Number.isNaN(i)?0:Number.parseInt(i,10),l=e.get("resetUponReceive")?fd().fromJS(r):e.get("notifications").concat(fd().fromJS(r));return e.mergeDeep({error:null,isUpdateRequired:!1,reachedEnd:!s,isFetching:!1,unseenNotifications:u,unseenConversations:c,unseen:u+c>0,toastCounts:a,notifications:l,pageToken:s,resetUponReceive:!1})})),o()(Yg,zp.Kj+Nd.MR,(function(e){var t=e.get("notifications").map((function(e){return e.get("state")===Th.SP?e.set("state",Th.sJ):e}));return e.mergeDeep({unseenNotifications:0,unseen:0+e.get("unseenConversations")>0,notifications:t})})),o()(Yg,zp.Qo+Nd.MR,(function(e){var t=e.get("notifications").map((function(e){return e.set("state",Th.ik)}));return e.mergeDeep({error:null,unseenNotifications:0,notifications:t})})),o()(Yg,zp.hR+Nd.MR,(function(e,t){var n=t.meta,r=e.get("notifications").map((function(e){return n&&e.get("id")===n.notificationId?e.set("state",Th.ik):e}));return e.mergeDeep({error:null,notifications:r})})),o()(Yg,zp.Pl+Nd.ES,Jg),o()(Yg,zp.Qo+Nd.ES,Jg),o()(Yg,zp.hR+Nd.ES,Jg),o()(Yg,zp.wt,(function(e){return e.set("resetUponReceive",!0).set("isUpdateRequired",!0).set("pageToken",null)})),o()(Yg,zp.rI,(function(e){return e.set("error",null)})),Yg),fd().Map(Kg));var Qg,ev=n("IH2l"),tv=n("bY2E");const nv=(0,Qf.Z)((Qg={},o()(Qg,ev.I5,gm.z),o()(Qg,ev.kd,gm.z),o()(Qg,ev.K0,gm.z),o()(Qg,ev.r1,gm.z),o()(Qg,ev.jt,gm.z),o()(Qg,ev.cA,(function(e,t){var n=t.payload.hash;return e.get("videoHashesInView").includes(n)?e:e.set("videoHashesInView",e.get("videoHashesInView").concat(n))})),o()(Qg,ev._V,(function(e,t){var n=t.payload.hash;return e.set("videoHashesInView",e.get("videoHashesInView").filter((function(e){return e!==n})))})),Qg),(0,pd.Map)({autoPlayStrategy:tv.db,audioState:tv.uT.AUDIO_STATE.PRESENT_MUTED,volume:tv.Qx,hashWithAudioOn:"",hashWithVideoOn:"",videoHashesInView:(0,pd.List)()}));var rv,ov=n("kzpL");function iv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function av(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},n=(arguments.length>1?arguments[1]:void 0).payload.data,r=t.get("accounts"),o=n.username.toLowerCase(),i=fd().OrderedSet(n.trophies);return r=r.set(o,fd().Map({id:n.id,username:o,displayUsername:n.username,reputation:Math.floor(n.reputation_count),reputationName:n.reputation_name,bio:n.bio,joinedAt:n.created_at,avatar:n.avatar_id,avatarUrl:n.avatar_url,trophies:i,is_banned:!!n.is_banned&&n.is_banned,is_spammer:!!n.is_spammer&&n.is_spammer,followType:n.follow?null!==(e=n.follow_type)&&void 0!==e?e:Lm.nl:Lm.Zp,is_indexable:!!n.is_indexable})),t.set("accounts",r)}function Rv(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.meta,r=n.sort,o=n.username,i=t.payload,a=e;a.get("commentsUsername")===o&&a.get("commentSort")===r||(a=a.set("commentsUsername",o).set("commentSort",r).set("commentsList",fd().OrderedSet([])).set("comments",fd().Map({})));var s=i.map((function(e){return Dv(Dv({},e),{},{datetime:1e3*e.datetime})})),u=a.get("comments").merge(s.reduce((function(e,t){return e.set(t.id,fd().Map(t))}),fd().Map({})));return a.set("commentsList",a.get("commentsList").concat(i.map((function(e){return e.id})))).set("comments",u)}function Nv(e,t){var n=t.meta,r=n.followUserId,o=n.followUsername,i=n.followType,a=e,s=a.get("accounts").get(o);if(s){var u=s.set("followType",i);a=a.setIn(["accounts",o],u)}var c=a.getIn(["following",r]);if(c){var l=c.set("type",i);a=a.setIn(["following",r],l)}return a}const Fv=(0,Qf.Z)((Mv={},o()(Mv,Am,(function(e,t){return t.payload.account})),o()(Mv,qd.RU,Pv),o()(Mv,qd.RU+Nd.MR,(function(e,t){return Pv(e,{payload:{data:t.payload}})})),o()(Mv,qd.yZ+Nd.MR,Rv),o()(Mv,qd.sD+Nd.MR,(function(){var e=arguments.length>1?arguments[1]:void 0;return Rv(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e).set("commentsPageLink",e.headerLink)})),o()(Mv,qd.uv+Nd.MR,(function(){var e=arguments.length>1?arguments[1]:void 0;return Rv(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e).set("commentsPageLink",e.headerLink)})),o()(Mv,qd.pZ,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload.sort;return t===e.get("commentSort")?e:e.set("commentSort",t).set("commentsList",fd().OrderedSet([]))})),o()(Mv,qd.Pk,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload,n=t.commentId,r=t.vote,o=r,i="".concat(r,"s"),a=e.getIn(["comments",n]);r===a.get("vote")&&(o=of.gZ);var s=a.set("vote",o).set(i,a.get(i)+of.e7[o]);return e.setIn(["comments",n],s)})),o()(Mv,rd.rP,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(!t.payload.hasOwnProperty("data"))return e;var n=e.get("accounts").get(t.payload.username).set("bio",t.payload.bio);return e.setIn(["accounts",t.payload.username],n)})),o()(Mv,rd.oB+Nd.tj,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.get("accounts").get(t.payload.username),r=n.set("oldAvatar",n.get("avatar")).set("oldAvatarUrl",n.get("avatarUrl")).set("avatarUrl",t.payload.avatarUrl).set("avatar",t.payload.avatarId);return e.setIn(["accounts",t.payload.username],r)})),o()(Mv,rd.oB+Nd.ES,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.get("accounts").get(t.payload.username),r=n.set("avatarUrl",n.get("oldAvatarUrl")).set("avatar",n.get("oldAvatar")).delete("oldAvatar").delete("oldAvatarUrl");return e.setIn(["accounts",t.payload.username],r)})),o()(Mv,Gd.OU+Nd.MR,Nv),o()(Mv,Gd.xR+Nd.MR,Nv),o()(Mv,qd.I1+Nd.MR,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.payload,r=t.meta.page;if(!n.length)return e.set("followingLastPage",e.get("followingNextPage"));var o=n.reduce((function(e,t){return e.set(t.id,fd().fromJS(t))}),new(fd().OrderedMap)({}));return e.set("following",e.get("following").merge(o)).set("followingNextPage",r+1)})),Mv),fd().Map({commentPageLink:"",commentSort:Yf.dn,commentsUsername:null,commentsList:fd().OrderedSet([]),comments:fd().Map({}),accounts:fd().Map({}),trophies:fd().OrderedSet([]),availableTrophies:fd().Map({}),following:fd().OrderedMap({}),followingNextPage:0,followingLastPage:-1}));var jv,Uv,Zv=n("qSj+"),Bv=n("Q0Zf"),zv={byName:(0,pd.OrderedMap)(),featured:(0,pd.Map)(),suggestedTags:(0,pd.Map)((jv={},o()(jv,Bv.UW,(0,pd.List)([])),o()(jv,Bv.Cf,(0,pd.List)([])),o()(jv,Bv.WN,(0,pd.List)([])),jv)),serverMutedTags:(0,pd.List)([]),clientMutedTags:(0,pd.List)([]),tagsSavingCount:0,tagsSavingErrorCount:0};function Hv(e,t,n,r){return fd()[e](t.filter(n).map((function(e){return[e[r],fd().fromJS(e)]})))}function Vv(e,t,n){return e.set("tagsSavingCount",e.get("tagsSavingCount")+t).set("tagsSavingErrorCount",e.get("tagsSavingErrorCount")+n)}const qv=(0,Qf.Z)((Uv={},o()(Uv,Am,(function(e,t){return t.payload.tags})),o()(Uv,Zv.vB+Nd.MR,(function(e,t){var n=t.payload;if(!n||!Array.isArray(n.tags))return e;var r=n.tags.map((function(e){return function(e){return void 0!==e.is_promoted&&(e.isPromoted=e.is_promoted,delete e.is_promoted),e}(e)}));return e.merge({byName:Hv("OrderedMap",r,(function(e){return e.name!==n.featured}),"name"),featured:Hv("Map",r,(function(e){return e.name===n.featured}),"name")})})),o()(Uv,Zv.nb+Nd.MR,(function(e,t){var n=t.payload;return e.set("suggestedTags",(0,pd.Map)((0,pd.fromJS)(n)))})),o()(Uv,Zv.ZE,(function(e){return e.set("suggestedTags",zv.suggestedTags)})),o()(Uv,Zv.A7+Nd.MR,(function(e,t){var n=t.payload,r=(0,pd.fromJS)(n.map((function(e){return{name:e.tag_name.toLocaleLowerCase()}})));return e.set("serverMutedTags",r).set("clientMutedTags",r)})),o()(Uv,Zv.V2,(function(e,t){var n=t.payload;return e.get("clientMutedTags").find((function(e){return e.get("name")===n}))?e:e.update("clientMutedTags",(function(e){return e.push((0,pd.Map)({name:n}))}))})),o()(Uv,Zv.f6,(function(e,t){var n=t.payload;return e.update("clientMutedTags",(function(e){return e.delete(n)}))})),o()(Uv,Zv.k$+Nd.tj,(function(e){return Vv(e,1,0)})),o()(Uv,Zv.tO+Nd.tj,(function(e){return Vv(e,1,0)})),o()(Uv,Zv.k$+Nd.MR,(function(e){return Vv(e,-1,0)})),o()(Uv,Zv.tO+Nd.MR,(function(e){return Vv(e,-1,0)})),o()(Uv,Zv.k$+Nd.ES,(function(e){return Vv(e,-1,1)})),o()(Uv,Zv.tO+Nd.ES,(function(e){return Vv(e,-1,1)})),o()(Uv,Hl.SU,(function(e){return e.set("tagsSavingErrorCount",0)})),Uv),(0,pd.Map)(zv));var Wv,$v,Gv=n("xaJk"),Yv=n.n(Gv),Kv=n("TW+2"),Jv=(Wv={},o()(Wv,id.cc,"post"),o()(Wv,od.t6,"post"),o()(Wv,qd.yZ,"comments"),o()(Wv,qd.sD,"comments"),o()(Wv,qd.uv,"comments"),o()(Wv,Kv.L4,"suggest"),o()(Wv,rd.Yh,"user"),o()(Wv,rd.UW,"userSettings"),o()(Wv,zp.Pl,"notifications"),o()(Wv,oh.dG,"postComments"),o()(Wv,oh.ME,"postComments"),o()(Wv,oh.jE,"createPostComment"),o()(Wv,rd.wD,"avatar"),o()(Wv,od.YV,"retrievePost"),o()(Wv,od.Xc,"retrievePostMeta"),o()(Wv,qd.I1,"following"),Wv),Xv=($v={},o()($v,Nd.tj,{loading:!0}),o()($v,Nd.ES,{loadFail:!0}),o()($v,Nd.MR,{loading:!1}),$v);const Qv=(0,Qf.Z)((ey=Jv,Yv()(ey,(function(e,t,n){return Object.keys(Xv).forEach((function(r){e[n+r]=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).set(t,Xv[r])}})),e}),{})),fd().Map());var ey,ty;function ny(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ry(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:2;return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}function yy(e,t,n){return(0,d.w0)()<678?{name:py.$R}:e?{name:py.n$,top:n+py.Uh}:{name:py.fH,bottom:t}}function by(e,t){if(!(e&&t&&t.payload))return e;var n=t.payload,r=Math.round(n.height||e.get("height")),o=function(e){if(!e)return py.oW;var t=py.R$>e?py.R$/e:1;return vy(py.oW*py.R$/e*t)}(r),i=Math.round(n.scrollY||(0,d.XO)()),a=r-e.get("collapsed"),s=Math.round(o*i),u=i+s>=a,c=u?-a:-s,l=vy(1-Math.max(u?a:i+s,1)/a),p=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?0:py.wl,o=Math.min(-r,-r-Math.round((1-e)*py.eG,0));return t?Math.min(o+n,-py.Uh):o}(l,u,s+i+c,n.resetFiltersOffset);if(function(e,t,n){return!t||t!==e.get("fixed")||n!==e.getIn(["filters","bottom"])}(e,u,p)){var f=e.getIn(["filters","useOwnSearch"]),h=function(e,t){var n=py.eG+t0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload,n=e.getIn(["filters","useOwnSearch"]),r=e.get("fixed"),o=e.getIn(["searchbar","name"]);return yy(r&&n).name!==o&&e.get("height")?by(e,{payload:{resetFiltersOffset:t&&t.resetFiltersOffset}}):e})),o()(cy,Hl.Ve,gm.z),o()(cy,Hl._N,gm.z),o()(cy,Hl.Mc,gm.z),o()(cy,Hl.KN+Nd.MR,(function(e,t){var n=t.payload,r=t.meta,o=n.hash,i=r.location;if(o){var a=(0,dy.f)(i),s="url(".concat(Ul.LS,"/").concat(o,".jpg)");return ly.Z.save(a,s),e.set(a,s)}return e})),o()(cy,Hl.KN+Nd.ES,(function(e,t){var n=t.meta.location,r=(0,dy.f)(n);return ly.Z.remove(r),e.set(r,py.fM[n])})),o()(cy,Hl.Jg,gm.z),cy),fd().Map(gy));var wy=n("vWou"),Cy=fd().Map({isFooterVisible:!0,scrollY:0,scrollAmount:0});function Sy(e,t){var n,r,o=t.scrollY,i=e.get("scrollY")-o;return(n=wy.Sh,r||(r=-n),function(e){return er})(i)?e:e.merge({scrollY:o,scrollAmount:i})}function Ey(e){var t=e.get("scrollY")0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload.width;return e.set("isSmallScreen",t=py.fv+o?-1*py.fv:r>=o?-1*(r-o):0,e.set("coverTop",n)})),fd().Map({coverTop:0}));var nb,rb=n("tYU/");var ob={contentWrapperWidth:function(){if(Kf.yh)return Kf.gl;var e,t=(0,d.w0)(),n=(0,d.x5)();if(t>=rb.$wideScreenMinWidth)e=Math.min(rb.$galleryWideScreenMaxWidth,n*rb.$galleryWideScreenWidthPercentage/100)-rb.$engagementBarDesktopWidth-rb.$sidebarWidth-2*rb.$postContentPaddingLeftRight-2*rb.$postContentMarginLeftRight;else if(t>=Ay.FN){var r=t>rb.$hideSidebarMaxWidth?rb.$sidebarWidth:0;e=Math.min(rb.$galleryDesktopMaxWidth,n*rb.$galleryDesktopWidthPercentage/100)-rb.$engagementBarDesktopWidth-r-2*rb.$postContentPaddingLeftRight-2*rb.$postContentMarginLeftRight}else e=t<=Ay.K8?Math.min(n,Ay.bU):n*Ay.MP;return Math.round(e)}(),galleryContentLoaded:!1,accoladeData:(0,pd.Map)({accoladeIds:null}),isBottomRecircVisible:!0,hasSeenTopicFilter:!1};const ib=(0,Qf.Z)((nb={},o()(nb,Hl.HW,(function(e,t){var n=t.payload;return e.set("contentWrapperWidth",n||0)})),o()(nb,Hl.oY,(function(e){return e.set("galleryContentLoaded",!0)})),o()(nb,gp.U7,(function(e,t){var n=t.payload.accoladeId;return e.set("accoladeData",(0,pd.Map)({accoladeIds:[n]}))})),o()(nb,od.ZL,(function(e,t){var n=t.payload.accoladeIds;return e.set("accoladeData",(0,pd.Map)({accoladeIds:n}))})),o()(nb,od.dj,(function(e,t){var n=t.payload;return n&&n.accoladeIds?e.setIn(["accoladeData","accoladeIds"],n.accoladeIds):e.setIn(["accoladeData","showConfetti"],!0)})),o()(nb,od._u+Nd.MR,(function(e,t){var n=t.payload;return e.getIn(["accoladeData","showConfetti"])?e.setIn(["accoladeData","accoladeIds"],Object.keys(n.post.accolades_counts)).setIn(["accoladeData","showConfetti"],!1):e})),o()(nb,Hl.PO,gm.z),o()(nb,id.k$,(function(e){return e.set("hasSeenTopicFilter",!0)})),nb),(0,pd.Map)(ob));var ab=n("8Fpl");var sb={spinner:Qv,trendingTags:uy,cover:_y,uploadCover:tb,footer:ky,notifications:xy,dialog:th,newPosts:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ly,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(t.type){case id.TZ:return Xp(t.payload&&t.payload.posts)?e:e.set("newPostsNumber",t.payload.posts.length);case id.cc:return t.payload&&t.payload.insertionModifier===id.mm?Ly:e;case id.yE:return Ly;default:return e}},modal:Oy,toast:$y,toaster2:Ky,clipboardCopy:Qy,gallery:ib,aprilFools:(0,Qf.Z)(o()({},Hl.nW,(function(e){var t=!e.get("enabled");return ly.Z.save(ab.Sc,t),e.set("enabled",t)})),fd().Map({enabled:!Kf.yh&&ly.Z.get(ab.Sc,ab.Nq)}))};const ub=(0,Ed.UY)(sb);var cb,lb=n("okfS"),db=n("9PHS");const pb=(0,Qf.Z)((cb={},o()(cb,Am,(function(e,t){var n=t.payload.messages.welcome,r=n.get("newOne");return n.set("current",r).set("previous",r)})),o()(cb,db.gc,(function(e,t){var n=t.payload.message;return"string"==typeof n?e.merge({previous:n,current:""}):e})),o()(cb,db.mo+Nd.MR,(function(e,t){var n=t.payload;return n.type===db.Vz&&"string"==typeof n.message?e.merge({newOne:n.message}):e})),o()(cb,db.mo+Nd.ES,(function(e){return e.get("current")?e:e.set("current",e.get("previous")||e.get("default"))})),o()(cb,db.dB,(function(e,t){var n=t.payload.message;return"string"==typeof n?e.set("current",n):e})),cb),fd().Map({current:"",previous:"",newOne:"",default:"Welcome Ya'll"}));var fb;const hb=(0,Qf.Z)((fb={},o()(fb,db.yA,(function(e,t){var n=t.payload.message;return"string"==typeof n?e.merge({previous:n,current:""}):e})),o()(fb,db.Li+Nd.MR,(function(e,t){var n=t.payload;return n.type===db.ss&&"string"==typeof n.message?e.merge({newOne:n.message}):e})),o()(fb,db.Li+Nd.ES,(function(e){return e.get("current")?e:e.set("current",e.get("previous")||e.get("default"))})),o()(fb,db.P1,(function(e,t){var n=t.payload.message;return"string"==typeof n?e.set("current",n):e})),o()(fb,qd.RU,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).set("inView",!1)})),o()(fb,rd.mj,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).set("inView",!0)})),fb),fd().Map({current:"",previous:"",newOne:"",default:"goodbye friend"})),mb=(0,Ed.UY)({welcome:pb,goodbye:hb});var gb=n("cDf5"),vb=n.n(gb),yb=n("P/G1"),bb=n.n(yb),_b=n("wp2A"),wb=n("HGQq"),Cb=n("Dzci"),Sb=n("tm2p"),Eb=n("txC3"),kb=(0,pd.Map)({columns:[],posts:(0,pd.Stack)(),width:0,height:0,scrollY:0,columnsNumber:0,version:0,viewUniform:!1,topOffset:0,leftOffset:_b.zE,rightOffset:_b.zE,isGridMount:!1,showAds:!1,columnWidth:_b.jr,location:"",isMobile:!1});function Ib(e){return e.set("version",e.get("version")+1)}function Ab(e,t){return!xd.s&&(0,d.Fl)(_b.D1)&&(0,d.PP)(_b.D1,{}),e.set("isGridMount",!0).set("width",t.width).set("height",t.height).set("viewUniform",t.viewUniform).set("topOffset",t.topOffset).set("showAds",t.showAds).set("location",t.location).set("isMobile",t.isMobile)}function xb(e,t){var n=t.topOffset;return n===e.get("topOffset")?e:Ib(e.set("topOffset",n))}function Lb(e,t){var n=t.leftOffset,r=t.rightOffset;return n===e.get("leftOffset")&&r===e.get("rightOffset")?e:Ib(e.set("leftOffset",n).set("rightOffset",r))}function Ob(e){if(0===e.get("columnsNumber"))return e;var t=e.get("posts").skipWhile((function(t){return e.get("columns").reduce((function(e,n){return e||n.hasPost(t.id)}),!1)}));return Ib(t.reduce((function(e,t){return function(e,t){var n=e.get("columns")[0];return e.set("columns",e.get("columns").slice(1).concat([n.add(t,e.get("height"),e.get("scrollY"))]).sort((function(e,t){return e.getSize()-t.getSize()})))}(e,t)}),e))}function Mb(e,t){if(!t||!e)return 0;var n=Number.parseInt(e/t,10);return n<0?0:n}function Tb(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.id=e.id,this._itemSize=function(e,t){var n,r,o=1.5*t;if(e.hasOwnProperty("shared_with_community")?(n=(0,Xf.xi)(e),r=(0,Xf.bE)(e)):(n=(0,xm.xi)(e),r=(0,xm.bE)(e)),e.isFastGridAd)return r;var i=0===n?t/2:t/n*r;if(e.is_ad&&null==e.title)return Number.parseInt(i,10);var a=(0,xm.X)(e.is_ad,null!=e.title&&e.title.length>0),s=Math.min(i,o)+a-(e.is_ad?_b.gW:0);return Number.parseInt(s,10)}(e,n),this.defaultSize=n,this.isDefaultSize=r,this.isInview=!1,this.wasInView=!xd.s&&this.getWasInView(),this.isAboveViewPort=!1,this.isPicsart=(0,Xf.H7)(e.cover||{}),this.position=0,this.colorLoading=(0,Cb.T)(t),this.isDeleted=!1,this.isActiveInteraction=!1,this.isFastGridAd=o}function Db(e){if(0===e.get("posts").size)return e;var t=e.get("showAds"),n=e.get("posts").filter((function(e){return!e.isFastGridAd}));if(!t)return Ib(e.set("posts",n));var r=e.get("columnsNumber"),o=e.get("isMobile"),i=e.get("location"),a=0,s=n.reduce((function(t,n,s){var u=[n];if((!o||a0?e.set("posts",n.concat(r.map((function(t,n){return new Tb(t,n,e.get("columnWidth"),e.get("viewUniform"))})))):e}function Bb(e,t){var n=t.posts;if(Xp(n))return e;var r=n.map((function(e){return e.id})),o=e.get("posts").filterNot((function(e){return r.includes(e.id)}));return Fb(e.set("posts",o))}function zb(e){return e.get("columns").forEach((function(t){return t.updatePages(e.get("height"))})),Ib(e)}function Hb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kb,t=arguments.length>1?arguments[1]:void 0;if(!t||"object"!==vb()(t))return e;switch(t.type){case Am:var n=t.payload.fastGrid,r={payload:{posts:bb()(t.payload.posts.get("posts").toJS())}};return(0,Ed.qC)((0,vv.lS)(e,"posts").run(Ob),(0,vv.YK)(Zb,Ub),(0,vv.He)({posts:Jp}))(n,r);case wb.wO:return(0,Ed.qC)((0,vv.lS)(e,"columnsNumber").run(Fb),(0,vv.lS)(e,"width").run(Pb),(0,vv.pS)(Ab),(0,vv.He)({width:Qp,viewUniform:nf(!0,!1),height:Qp,topOffset:Qp,showAds:nf(!0,!1),location:ef,isMobile:nf(!0,!1)}))(e,t);case wb._N:return(0,Ed.qC)((0,vv.lS)(e,"topOffset").run(Rb),(0,vv.pS)(xb),(0,vv.He)({topOffset:Qp}))(e,t);case wb.hd:return(0,Ed.qC)((0,vv.lS)(e,["rightOffset","leftOffset"]).run(Pb),(0,vv.pS)(Lb),(0,vv.He)({rightOffset:Qp,leftOffset:Qp}))(e,t);case wb.Jy:return(0,Ed.qC)((0,vv.lS)(e,"posts").run(Fb),(0,vv.lS)(e,"showAds").run(Db),(0,vv.pS)((0,vv.xq)("showAds")),(0,vv.He)({showAds:nf(!0,!1)}))(e,t);case id.n4:return(0,Ed.qC)((0,vv.lS)(e,"viewUniform").run(Nb),(0,vv.pS)((0,vv.xq)("viewUniform")),(0,vv.He)({viewUniform:nf(!0,!1)}))(e,t);case rf.k_:return(0,Ed.qC)((0,vv.lS)(e,"height").run(Rb),(0,vv.lS)(e,"height").run(zb),(0,vv.lS)(e,"columnsNumber").run(Fb),(0,vv.lS)(e,"width").run(jb),(0,vv.lS)(e,"width").run(Pb),(0,vv.pS)((0,vv.xq)(["width","height"])),(0,vv.He)({width:Qp,height:Qp}))(e,t);default:return e.get("isGridMount",!1)?function(e,t){switch(t.type){case id.ZA:return Fb(e.set("posts",(0,pd.Stack)()));case wb.uH:return t.payload&&t.payload.savePosts?kb.set("posts",e.get("posts")):kb.set("columnWidth",e.get("columnWidth"));case id.cc+Nd.MR:case id.cc+Nd.xy:case id.cc:case id.KZ+Nd.MR:case wb.nb:switch(t.payload&&t.payload.insertionModifier){case id.HK:case id.mm:return(0,Ed.qC)((0,vv.lS)(e,"posts").run(Ob),(0,vv.YK)(Db,Zb,Ub),(0,vv.He)({posts:Jp}))(e,t);case id.I0:return(0,Ed.qC)((0,vv.lS)(e,"posts").run(Ob),(0,vv.YK)(Db,Zb),(0,vv.He)({posts:Jp}))(e,t);default:return e}case rf.$l:return(0,Ed.qC)((0,vv.lS)(e,"scrollY").run(Rb),(0,vv.pS)((0,vv.xq)(["scrollY"])),(0,vv.He)({scrollY:Qp}))(e,t);case id.T1:return(0,Ed.qC)((0,vv.lS)(e,"posts").run(Ob),(0,vv.YK)(Bb),(0,vv.He)({posts:Jp}))(e,t);case od.rb:var n=!1,r=e.get("posts").map((function(e){return e.id===t.payload.hash&&(n=!0,e.isDeleted=!0),e})),o=e.set("posts",r);return n?Ib(o):o;case Af.LT:var i=t.payload,a=i.hash;if(!i.isInteractive)return e;var s=!1,u=e.get("posts").map((function(e){return e.isActiveInteraction=!1,e.id===a&&(s=!0,e.isActiveInteraction=!0),e})),c=e.set("posts",u);return s?Ib(c):c;default:return e}}(e,t):e}}Tb.prototype=Object.defineProperties({updatePosition:function(e){return this.position=e,this},updateView:function(e,t,n){return this.calculateIsInView(e,t,n)?(this.isInview=!0,xd.s||this.setAsViewed(),this.isAboveViewPort=!1,this.calculateIsInViewPort(e,t,n)?this.isViewPort=!0:this.isViewPort=!1):(this.isFastGridAd||(this.isInview=!1),this.isViewPort=!1,this.isAboveViewPort=this.calculateIsAboveViewPort(e,t,n)),this},calculateIsInView:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Math.max(_b.Sx,e);return e+=1.5*r,this.calculateIsInViewPort(e,t-r,n)},calculateIsInViewPort:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return(this.position+n>=t||this.position+n+this.size>t)&&this.position+n<=t+e},calculateIsAboveViewPort:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return this.position+n+this.sizen,slides:[n,t].sort((function(e,t){return e-t}))}):e}const Kb=(0,Qf.Z)((qb={},o()(qb,Wb,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.get("page");return Yb(e,t+1,t)})),o()(qb,$b,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload,n=e.get("page");return n===t.id?e:Yb(e,t.id,n)})),qb),fd().Map(Gb));var Jb,Xb=fd().Map({ctas:fd().List(),ctasClosed:fd().List(),ctaClosed:!1,ctaWidth:0,ctaHeight:0,isLoaded:!1});const Qb=(0,Qf.Z)((Jb={},o()(Jb,$d.fc,(function(e,t){return(0,gm.z)(e.set("isLoaded",!0),t)})),o()(Jb,$d.Wq,gm.z),o()(Jb,$d.YK,gm.z),Jb),Xb);var e_,t_=n("nrQ4");const n_=(0,Qf.Z)((e_={},o()(e_,t_.k1,gm.z),o()(e_,t_.a4,(function(e,t){var n=t.payload,r={},o=Math.floor(Date.now()/1e3);return Object.keys(n).map((function(e){return n[e]>o&&(r[e]=n[e]),e})),e.set("reportedComments",r)})),o()(e_,t_.a4+Nd.MR,(function(e,t){return e.set("reportedComments",t.payload)})),o()(e_,t_.av,(function(e,t){var n=t.payload,r={},o=Math.floor(Date.now()/1e3);return Object.keys(n).map((function(e){return n[e]>o&&(r[e]=n[e]),e})),e.set("reportedPosts",r)})),o()(e_,t_.av+Nd.MR,(function(e,t){return e.set("reportedPosts",t.payload)})),e_),fd().Map({id:null,reportedComments:{},reportedPosts:{},isMature:!1,type:t_.g4}));var r_;const o_=(0,Qf.Z)((r_={},o()(r_,rm,(function(e,t){var n=t.payload;return(0,pd.Map)((0,pd.fromJS)(n))})),o()(r_,om,(function(e,t){return t.payload.reduce((function(e,t){return e.set(t,nm.kN)}),e)})),o()(r_,im,(function(e,t){var n=t.payload;return e.merge(n)})),r_),(0,pd.Map)({}));var i_,a_=n("q2xP"),s_={giveEmeraldData:(0,pd.Map)({}),claimLookUpLoaded:!1,giftReceivedData:(0,pd.Map)({})};function u_(e,t){var n=t.payload;return e.set("giveEmeraldData",(0,pd.Map)(n))}const c_=(0,Qf.Z)((i_={},o()(i_,Fh.sB+Nd.tj,u_),o()(i_,Fh.nc,u_),o()(i_,Fh.Bo,(function(e){return u_(e,{payload:{}})})),o()(i_,Fh.Vg,u_),o()(i_,Fh.GO+Nd.MR,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(arguments.length>1?arguments[1]:void 0).payload;return e.merge({claimLookUpLoaded:!0,giftReceivedData:{amount:t.total_amount||0,gifters:t.gifters||[]}})})),o()(i_,Fh.GO+Nd.ES,(function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).merge({claimLookUpLoaded:!0})})),i_),(0,pd.Map)(s_));var l_,d_=n("z4T1"),p_={mutedTopics:(0,pd.List)([]),mutedTopicsSavingCount:0,mutedTopicsSavingErrorCount:0,preferenceTopics:(0,pd.List)([]),preferenceTopicsSavingCount:0,preferenceTopicsSavingErrorCount:0};function f_(e,t,n,r){var o=t.meta.type;return e.set("".concat(o,"TopicsSavingCount"),e.get("".concat(o,"TopicsSavingCount"))+n).set("".concat(o,"TopicsSavingErrorCount"),e.get("".concat(o,"TopicsSavingErrorCount"))+r)}const h_=(0,Qf.Z)((l_={},o()(l_,d_.bj+Nd.MR,(function(e,t){var n=t.payload,r=t.meta.type;return e.set("".concat(r,"Topics"),(0,pd.fromJS)(n))})),o()(l_,d_.AA+Nd.tj,(function(e,t){return f_(e,t,1,0)})),o()(l_,d_.cQ+Nd.tj,(function(e,t){return f_(e,t,1,0)})),o()(l_,d_.AA+Nd.MR,(function(e,t){return f_(e,t,-1,0)})),o()(l_,d_.cQ+Nd.MR,(function(e,t){return f_(e,t,-1,0)})),o()(l_,d_.AA+Nd.ES,(function(e,t){return f_(e,t,-1,1)})),o()(l_,d_.cQ+Nd.ES,(function(e,t){return f_(e,t,-1,1)})),o()(l_,Hl.SU,(function(e){return e.set("mutedTopicsSavingErrorCount",0).set("preferenceTopicsSavingErrorCount",0)})),o()(l_,d_.ey,(function(e,t){var n=t.payload,r=n.newValues,o=n.topicId,i=n.type,a=e.get("".concat(i,"Topics")).findIndex((function(e){return e.get("id")===o}));return e.mergeIn(["".concat(i,"Topics"),a],r)})),l_),(0,pd.Map)(p_));var m_,g_;const v_=(0,Qf.Z)((m_={},o()(m_,Af.kb,gm.t),o()(m_,Af.pe,gm.t),o()(m_,od.Bn,mh.Yp),o()(m_,Af.yE,mh.fZ),o()(m_,od.XL,mh.DV),o()(m_,$d.fc,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(!1===e.get("enabled")||t.error)return e;var n=Nh()(t,"payload.promotedPostPlacement.targeting",[]),r=e.setIn(["promotedPostPlacement","enabled"],n.includes(t.payload.countryCode)||0===n.length),o=(0,mh.h4)(t.payload);return!1===o?r.set("disabledReason",mh._V).set("enabled",o):r.set("enabled",o)})),o()(m_,Af.FI,gm.t),o()(m_,Af.So,(function(e,t){var n=t.payload,r=n.enabled,o=n.manuallyChanged;o&&(0,d.D9)(af.qJ,r?"1":"0");var i=e.setIn(["transformation","enabled"],r);return o?i.setIn(["transformation","enabledByUser"],r):i})),o()(m_,Af.XH,(function(e,t){var n=t.payload.animating;return e.setIn(["transformation","animatingIn"],n)})),o()(m_,Af.SH,(function(e,t){var n=t.payload.animating;return e.setIn(["transformation","animatingOut"],n)})),o()(m_,Af.OZ,gm.t),o()(m_,Af.jw,gm.z),m_),mh.yy.set("hasSeenUploadRewardVideo",!1).set("transformation",(0,pd.fromJS)({startTime:1730358e6,endTime:17304444e5,enabled:!1,enabledByDefault:!0,enabledByUser:(y_=(0,d.St)(af.qJ),"0"!==y_&&("1"===y_||null)),enabledForEmerald:!0,name:"Community Halloween",animatingIn:!1,animatingOut:!1,primaryColor:"255,125,0",secondaryColor:"255,125,0",backgroundColor:"46,48,53",buttonColor:"74,88,251",backgroundImage:"https://i.imgur.com/rJrLciC.png",font:"",fontFamily:'"Proxima Nova Bold", Helvetica, Arial, sans-serif',titleFontSize:"28px",stickyTitleFontSize:"16px",nextFontSize:"14px",nextAlignment:"middle",enterIcon:"https://i.imgur.com/sl6PbGZ.png",exitIcon:"https://i.imgur.com/fJ3m1BG.png",tooltipTitle:"It's Spooky Season 🎃",tooltipDescription:"It's time for the dark to have its day! Hype up Halloween with this haunting site skin.",tooltipDescriptionCTA:"Like things less spooky? Click here to revert.",tooltipBg:"https://i.imgur.com/K6yS27x.png",adClickthrough:"",ads:(g_={},o()(g_,af.hu,[""]),o()(g_,af.X2,[""]),g_),promotedPostIds:[""],enabledPixels:[""]})));var y_;function b_(){return{alerts:mm,ad:v_,analyticsBuffer:cm,posts:Jm,postsData:zm,banner:ym,seeImgur:wm,comments:fg,agent:_g,navbar:Cg,viewportData:kg,share:Ag,popUpMobile:Lg,imageViewer:Og,gallery:Ug,display:Bg,experiments:zg(),user:Gg,notifications:Xg,video:nv,favorites:mv,profilePosts:Cv,selectables:Av,drag:Ov,account:Fv,tags:qv,ui:ub,search:lb.ZP,messages:mb,fastGrid:Hb,history:Vb,introduction:Kb,config:Qb,report:n_,modules:o_,status:a_.ZP,emerald:c_,topics:h_}}function __(){return(0,Ed.UY)(b_())}var w_=n("w/6F"),C_=n("Do23"),S_="DELETE_IMAGE_FROM_ACCOUNT",E_="DELETE_IMAGE_FROM_ALBUM",k_=(0,Gl.Z)(S_,(function(e){return{imageId:e}}),(function(e,t,n){return{callAPI:!0,versionAPI:Ul.x6,httpMethod:Ud.kU,endpoint:"/media/v1/media/".concat(n?e:t),options:{includeCredentials:!0,contentType:Ud.c8},imageId:e}})),I_=(0,Gl.Z)(E_,(function(e){return{imageId:e}}),(function(e,t,n,r){return{callAPI:!0,versionAPI:Ul.x6,httpMethod:Ud.kU,endpoint:"/post/v1/albums/".concat(r?t:n,"/media"),options:{includeCredentials:!0,contentType:Ud.c8,body:{ids:[e]}}}})),A_=n("1q3c"),x_=!1;function L_(e,t){var n=e.getState().upload,r=n.get("album"),o=n.get("disableAudio");t.map((function(t,n){return t.get("type")===A_.Lv?e.dispatch((0,A_.fR)(r.get("deleteHash"),n,t)):t.get("status")===A_.sG&&e.dispatch((0,A_.vE)(t.get("data"),t.get("type"),t.get("isVideo"),o,t.get("withReplace"),t.get("deleteHash"),n)),null}))}function O_(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";t.getState().upload.get("queue").forEach((function(o,i){i===n&&e.forEach((function(e){t.dispatch(e(o.get("duration"),o.get("filetype"),o.get("filesize"),r))}))}))}function M_(e,t,n,r){var o=t.getState(),i=o.upload,a=o.postsData,s=i.get("post"),u=0,c=0,l=0,d=0,p="",f=0;i.get("queue").forEach((function(e){if(e.get("status")!==A_.lq){var t=e.get("data");return d=e.get("duration"),p=t.type,void(f=t.size)}u++,e.get("isVideo")&&c++,e.get("isVideo")&&e.get("hasAudio")&&l++}));var h=i.getIn(["post","tags"]).size,m=n===eb.th,g=null==a?void 0:a.getIn(["currentPost","id"]);t.dispatch(e(u,c,l,s.get("mature"),h,s.get("inGallery"),s.get("nsfwScore"),d,p,f,g,m,n,r))}function T_(e){var t="",n=e.get("type");return e.get("isMeme")?t="Meme":n===A_.CT?t="Url":n===A_.Lv?t="Existing":n===A_.Sf&&(t="Upload"),t}function D_(e,t){var n=t.payload,r=e.getState().upload,o=r.get("queue"),i=e.getState().user;if(n.isInvalidURL&&e.dispatch((0,A_.Iw)((0,rg.Z)("uploadInvalidURL"))),n.isUnsupportedFileType){var a=(0,rg.Z)("uploadInvalidFileType");e.dispatch((0,A_.Iw)(a.text,Ul.Uw,a.textLink))}var s=!1,u=!1;if(n.isFileSizeError&&(s=!0),!i.get("isLoggedIn")&&(o=o.filter((function(t,n){return t.get("status")!==A_.sG||!t.get("imageOverSizeAnon")||(u=!0,e.dispatch((0,A_.zo)(n)),e.dispatch((0,A_.XS)(0,t.get("filetype"),t.get("filesize"),lp.l1)),!1)}))),s){var c=(0,rg.Z)("uploadInvalidFileSize");e.dispatch((0,A_.Iw)(c.text,Ul.Uw,c.textLink)),n.analyticsData&&n.analyticsData.forEach((function(t){e.dispatch((0,A_.XS)(0,t.filetype,t.filesize,lp.Vv))}))}if(u)return e.dispatch((0,Hl.gk)()),e.dispatch((0,A_.Z_)("image")),void o.forEach((function(t,n){t.get("status")!==A_.lq&&e.dispatch((0,A_.zo)(n))}));if(o.size<1){var l=e.getState().ui;l&&l.dialog&&l.dialog.get("dialogName")===eb.bL||e.dispatch((0,Hl.gk)())}else{var p=function(e){var t=e.getState(),n=t.user,r=t.history;return"/".concat(jf.uk).startsWith(r.getIn(["location","pathname"]))?((0,d.D9)("guestUserTOS","true"),!0):!!n.get("isLoggedIn")||!!(0,d.St)("guestUserTOS")}(e);if(!p)return e.dispatch((0,Hl.gk)()),e.dispatch((0,A_.iY)());var f=r.getIn(["album","id"]);o.forEach((function(t){t.get("type")===A_.CT&&t.get("status")===A_.sG&&e.dispatch((0,A_.pM)(t.get("data"))),f&&t.get("status")===A_.sG&&e.dispatch((0,A_.XH)(T_(t),f,t.get("filetype"),t.get("filesize")))}));var h=0,m=o.reduce((function(e,t){return-1===[A_.sG,A_.xL].indexOf(t.get("status"))?e:(t.get("isVideo")&&h++,e+1)}),0);e.dispatch((0,A_.jw)(m,h)),n.albumDeleteHash||r.getIn(["album","deleteHash"])?(e.dispatch((0,A_.Vh)(null,m)),e.dispatch((0,Hl.gk)())):e.dispatch((0,A_.mp)())}}function P_(e){x_=!0;var t=e.getState().upload.get("queue").valueSeq().filter((function(e){return e.get("status")===A_.MS})).map((function(e){return e.getIn(["mediaTicket","ticketId"])})).toArray();t.length>0?(e.dispatch((0,A_.bI)()),t.forEach((function(t){e.dispatch((0,A_.St)(t))})),(0,d.iK)(P_,3e3,e)):x_=!1}function R_(e){var t=e.getState(),n=t.upload,r=t.user.get("isLoggedIn"),o=n.getIn(["album",r?"id":"deleteHash"]),i=n.get("queue").valueSeq().map((function(e){return e.get("deleteHash")})).filter((function(e){return"string"==typeof e&&e.length>0})).toArray();if(!(i.length<=0)){var a=n.get("queue").find((function(e){return e.get("deleteHash")===i[0]})).get("imageId");return e.dispatch((0,od.w3)(o,i,a))}}function N_(e){var t=e.getState().upload;if(0===t.get("inProgressCount")&&t.get("processingUpload"))return function(e){e.getState().upload.getIn(["post","isImage"])||R_(e),e.dispatch(zy()),e.dispatch((0,A_.Kk)())}(e)}function F_(e){var t=e.getState(),n=t.user,r=t.upload,o=n.get("isLoggedIn"),i=r.get("imageToDelete"),a=r.get("queue").find((function(e){return e.get("imageId")===i})).get("deleteHash");return e.dispatch(k_(i,a,o))}function j_(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.getState().upload,r=n.get("post");if(r.get("inGallery")){var o=r.get("tags").keySeq().toArray();t&&JSON.stringify(o)===JSON.stringify(t)||e.dispatch((0,A_.QU)(n.getIn(["album","id"]),o))}}function U_(e,t){return"PostMarkedAsMature-".concat(t?"Image":"Album","-").concat(e)}function Z_(e,t,n){var r=U_(t.payload.id,n);(0,d.le)(r)&&e.dispatch((0,A_.qY)(!0))}var B_;function z_(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return H_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return H_(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function H_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=(0,pd.OrderedMap)((0,pd.fromJS)(t.payload.queue)).sort((function(e,t){return e.get("filename").toLowerCase().localeCompare(t.get("filename"))})),r=n.size,o=Q_(e),i=o.get("queue").map((function(e){var t=e.get("deleteHash"),r=n.findKey((function(e){return t&&e.get("deleteHash")===t}));if(!r)return e;var o=n.get(r);return n=n.delete(r),o})).merge(n);return o.set("processingUpload",r>0).set("queue",i).set("inProgressCount",o.get("inProgressCount")+r)})),o()(B_,A_.ML+Nd.MR,J_),o()(B_,A_.ML+Nd.tj,(function(e,t){return $_(e,t.meta.id,(function(e){return e.set("status",A_.fN).set("progress",5)}))})),o()(B_,A_.t$,(function(e,t){var n=t.payload;return e.setIn(["media",n.data.id],n)})),o()(B_,A_.ML+Nd.ad,(function(e,t){var n=t.payload;return $_(e,t.meta.id,(function(e){return e.set("progress",n)}))})),o()(B_,A_.ML+Nd.ES,(function(e,t){var n=t.payload,r=t.meta.id,o=q_(e),i="uploadErrorByCode",a=(0,rg.Z)(i);return parseInt(((n.body.data||{}).error||{}).code,10)===w_.Zo?$_(o,r,(function(e){return e.set("status",A_.ER)})):(n.statusCode===w_.uE&&(a=(0,rg.Z)(i,w_.uE)),[w_.y3,w_.xe,w_.HL,w_.oA].includes(n.statusCode)&&(a=n.message||(0,rg.Z)(i,n.statusCode)),$_(o,r,(function(e){return e.set("status",A_.aX).set("error",a).set("isRetryAllowed",!(n.statusCode&&n.statusCode!==w_.CA||e.get("isRetryAllowed")))})))})),o()(B_,A_.np+Nd.MR,(function(e,t){var n=t.meta,r=q_(e);return $_(r=W_(r),n.uploadId,(function(e){return Y_(e,function(e){return{id:e.hash,link:"".concat(Ul.LS,"/").concat(e.hash).concat(e.ext),description:e.description,deletehash:e.deletehash,animated:e.animated,type:e.mimetype.startsWith("video")?"video":"image"}}(n.upload.toJS().data)).delete("data")}))})),o()(B_,A_.g_,(function(e){return V_.set("preventCommunityConfirmationDialog",e.get("preventCommunityConfirmationDialog"))})),o()(B_,A_.YP,(function(e){return e.set("processingUpload",!1)})),o()(B_,A_.bt+Nd.tj,(function(e,t){var n=t.payload;return e.setIn(["post","title"],n)})),o()(B_,A_.Vz,(function(e){return e.setIn(["post","mature"],!e.getIn(["post","mature"]))})),o()(B_,A_.Iq,(function(e,t){var n=t.payload;return e.setIn(["post","mature"],n)})),o()(B_,A_.yo+Nd.MR,(function(e,t){var n=t.payload;return e.setIn(["album","id"],n.id).setIn(["album","deleteHash"],n.deletehash)})),o()(B_,A_.B_,(function(e,t){return e.set("preventCommunityConfirmationDialog",t.payload)})),o()(B_,S_+Nd.MR,X_),o()(B_,E_+Nd.MR,X_),o()(B_,A_.Zd,(function(e,t){var n=t.payload;return e.set("imageToDelete",n.imageId)})),o()(B_,A_.oc,(function(e,t){var n=t.payload;return $_(e,t.meta.id,(function(e){return e.set("status",A_.MS).set("mediaTicket",(0,pd.Map)({ticketId:n,attempts:0}))}))})),o()(B_,A_.Jr,(function(e,t){var n=t.payload,r=t.meta.ticketId,o=e.get("queue").findKey((function(e){return e.getIn(["mediaTicket","ticketId"])===r}));return o?$_(J_(e,{payload:n,meta:{id:o}}),o,(function(e){return e.delete("mediaTicket")})):e})),o()(B_,A_.$2,(function(e,t){var n=t.payload,r=t.meta.ticketId,o=e.get("queue"),i=o.findKey((function(e){return e.getIn(["mediaTicket","ticketId"])===r}));return i?e.set("queue",o.update(i,(function(e){return e.set("status",A_.aX).set("error",n.errorMessage||(0,rg.Z)("mediaProcessingFailure")).remove("mediaTicket")}))):e})),o()(B_,A_.WN,(function(e){var t,n=e.get("queue"),r=z_(n.keys());try{for(r.s();!(t=r.n()).done;){var o=t.value;n.getIn([o,"status"])===A_.MS&&(n=n.update(o,(function(e){var t=["mediaTicket","attempts"];return e.setIn(t,e.getIn(t)+1)})))}}catch(e){r.e(e)}finally{r.f()}return e.set("queue",n)})),o()(B_,A_.nR,(function(e,t){return $_(e,t.meta.id,(function(e){return e.get("blobURL")?((0,d.sl)(e.get("blobURL")),e.delete("blobURL")):e}))})),o()(B_,A_.pZ+Nd.MR,(function(e,t){var n=t.payload,r=e.set("album",(0,pd.Map)({id:n.id,deleteHash:n.deletehash})).setIn(["post","title"],(0,Wp.jW)(n.title)).setIn(["post","inGallery"],!!n.inGallery).setIn(["post","isImage"],!n.isAlbum).set("successfulUploads",n.media.length);if(n.media&&n.media.length>0){var o=(0,pd.OrderedMap)(n.media.map((function(e){return[e.id,G_((0,pd.Map)({}),e)]})));r=r.set("queue",o)}return r})),o()(B_,A_.ok+Nd.MR,(function(e,t){var n=t.payload,r=e.set("album",(0,pd.Map)({id:n.id,deleteHash:n.deletehash})).setIn(["post","title"],(0,Wp.jW)(n.title)).setIn(["post","inGallery"],!!n.in_gallery).setIn(["post","isImage"],!0).set("successfulUploads",1),o=(0,pd.OrderedMap)([[n.id,Y_((0,pd.Map)({}),n)]]);return r=r.set("queue",o)})),o()(B_,A_.Tz+Nd.MR,(function(e,t){var n=t.payload.tags,r=e.getIn(["post","tags"]);return n.forEach((function(e){var t=e.tag;r.has(t)||(r=r.set(t,(0,pd.Map)({name:t,display_name:e.display,addFrom:A_.IX})))})),e.setIn(["post","tags"],r)})),o()(B_,A_.XY,(function(e){return e.set("isRearrangeMode",!0)})),o()(B_,A_.te,Q_),o()(B_,A_.wd,(function(e,t){var n=t.payload;return e.set("albumImagesOrder",(0,pd.List)(n.ids))})),o()(B_,A_.ct,(function(e,t){var n=t.payload;return e.set("shareImage",(0,pd.Map)({imageId:n.imageId,link:n.link}))})),o()(B_,A_.ZY,ew),o()(B_,A_.ZY+Nd.tj,ew),o()(B_,A_.ZY+Nd.ES,rw),o()(B_,A_.RM,(function(e,t){var n=t.payload;return tw(e,n.id,n.message,n.link,n.textLink)})),o()(B_,A_.D,(function(e,t){var n=t.payload;return e.set("errorMessages",e.get("errorMessages").delete(n.id))})),o()(B_,od.Kx+Nd.ES,(function(e,t){var n=t.payload.body;if(!n||!Array.isArray(n.errors))return nw(e,t);var r=e,o=!1;return n.errors.forEach((function(e){var t=Number(e.code);[429,400].indexOf(t)>-1?(r=tw(r,(0,d.Ki)(),e.detail),o=!0):403===t&&(r=e.additional_info?tw(r,(0,d.Ki)(),"",e.additional_info.link,e.detail):tw(r,(0,d.Ki)(),"",Ul.qZ,(0,rg.Z)("uploadShareFailNotVerifiedAccount")),o=!0)})),o?r:nw(e,t)})),o()(B_,A_.pZ+Nd.ES,(function(e,t){return tw(e,(0,rg.Z)("defaultFetchError",t.type))})),o()(B_,A_.yo+Nd.ES,nw),o()(B_,A_.bt+Nd.ES,nw),o()(B_,A_.j3+Nd.ES,nw),o()(B_,A_.eL+Nd.ES,nw),o()(B_,S_+Nd.ES,nw),o()(B_,E_+Nd.ES,nw),o()(B_,od.Xv+Nd.ES,nw),o()(B_,od.hl+Nd.ES,nw),o()(B_,od.Kx+Nd.MR,(function(e,t){var n=t.payload;return e.setIn(["post","inGallery"],!0).setIn(["post","nsfwScore"],Nh()(n,"ad_config.nsfw_score",0))})),o()(B_,im,(function(e,t){return t.payload.upload?V_:e})),o()(B_,A_.Wx,(function(e,t){var n=t.payload;return e.set("popUp",e.get("popUp").merge((0,pd.Map)(n)))})),o()(B_,A_.DI,(function(e,t){var n=t.payload;return $_(e,t.meta.id,(function(e){return e.get("status")===A_.xL?e.set("status",A_.BH).set("hasAudio",n.hasAudio).set("duration",n.duration):e}))})),o()(B_,A_.XA,(function(e){return e.set("disableAudio",!0)})),o()(B_,A_.ud,(function(e){return e.set("disableAudio",!1)})),o()(B_,A_.tZ,(function(e){return K_(e,A_.BH,A_.sG)})),o()(B_,A_.Km,(function(e,t){var n=t.meta,r=n.id,o=n.limit;return $_(q_(e),r,(function(e){return e.set("status",A_.aX).set("error",(0,rg.Z)("uploadVideoTooLong",o-1))}))})),o()(B_,A_.mH,(function(e,t){var n=t.payload,r=e.getIn(["post","tags"]);return e.setIn(["post","tags"],r.set(n.name,(0,pd.Map)(n)))})),o()(B_,A_.cU,(function(e,t){var n=t.payload,r=e.getIn(["post","tags"]);return e.setIn(["post","tags"],r.delete(n))})),o()(B_,A_.gG,(function(e,t){var n=t.payload.tags,r=e.getIn(["post","tags"]);return r=r.filter((function(e,t){return e.get("addFrom")!==A_.Iy||n.has(t)})),n.forEach((function(e){if(r.size>=eb.yF)return!1;r.has(e)||(r=r.set(e,(0,pd.Map)({name:e,display_name:e,addFrom:A_.Iy})))})),e.setIn(["post","tags"],r)})),o()(B_,A_.BG+Nd.ES,rw),o()(B_,A_.Hv,(function(e,t){return $_(e,t.meta.id,(function(e){return e.set("status",A_.sG)}))})),o()(B_,A_.Uf,(function(e,t){var n=t.meta.id;return e.set("queue",e.get("queue").delete(n))})),o()(B_,A_.zn+Nd.MR,(function(e,t){var n=t.payload;return 1===parseInt(n.overLimits,10)?e:K_(e,A_.ER,A_.sG)})),o()(B_,A_.zn+Nd.ES,(function(e,t){return t.payload.statusCode===w_.Zo?K_(e,A_.sG,A_.ER):K_(e,A_.ER,A_.aX)})),o()(B_,A_.d4+Nd.tj,(function(e){return e.set("isMyUploadsLoading",!0)})),o()(B_,A_.d4+Nd.ES,(function(e){return e.set("isMyUploadsLoading",!1)})),o()(B_,A_.d4+Nd.MR,(function(e,t){var n=t.payload,r=t.meta,o=e.set("isMyUploadsLoading",!1);return 1!==r.options.params.page?o.set("myUploads",o.get("myUploads").concat(n.images)):o.set("myUploads",(0,pd.List)(n.images))})),B_),V_);var iw,aw={state:nm.Fg,controller:function(e,t){switch(t.type){case A_.lZ:return D_(e,t);case A_.ML:return function(e,t){var n=t.meta,r=n.withReplace,o=n.deleteHash,i=n.id,a=r?Ud.Qq:Ud.qg,s=r?"".concat(Ul.iL,"/media/v1/media/").concat(o,"/replace?client_id=").concat(Ul.hH):"".concat(Ul.E5,"/upload?client_id=").concat(Ul.hH),u=(0,d._m)();u.upload.addEventListener("progress",(function(t){if(t.lengthComputable){var n=Math.round(100*t.loaded/t.total);e.dispatch((0,A_.ap)(n,i))}})),u.onerror=function(){e.dispatch((0,A_.VS)("XHR request error",u.status,"",i))},u.onload=function(){if(u.readyState===u.DONE)if(200===u.status){var t=JSON.parse(u.response),n=t.hasOwnProperty("data")?t.data:t;n.processing?n.processing.status!==eb.jt&&(e.dispatch((0,A_.M6)(n.id,i)),e.dispatch((0,A_.EE)(n)),x_||P_(e)):e.dispatch((0,A_.gS)(n,r,i))}else{var o;try{o=JSON.parse(u.response).data.error,"object"===vb()(o)&&(o=o.message)}catch(e){o=u.status}e.dispatch((0,A_.VS)(o,u.status,JSON.parse(u.response),i))}},u.withCredentials=!0,u.open(a,s),u.send(t.payload),e.dispatch((0,A_._G)(i))}(e,t);case A_.ML+Nd.MR:return function(e,t){var n=t.payload,r=t.meta.id,o=e.getState().upload.getIn(["queue",r]);if(n.link){var i=(0,d.uf)();i.onload=function(){return e.dispatch((0,A_.vj)(r))},i.src=n.link}return o.get("description")&&e.dispatch((0,A_.$S)(n.deletehash,o.get("description"),r)),N_(e)}(e,t);case A_.ML+Nd.ES:return function(e,t){var n=t.payload;return parseInt(((n.body.data||{}).error||{}).code||n.statusCode,10)===w_.Zo?e.dispatch((0,A_.i9)()):N_(e)}(e,t);case A_.yo+Nd.MR:return function(e,t){var n=t.payload,r=e.getState(),o=r.upload,i=r.user,a=o.get("queue"),s=a.reduce((function(e,t){return-1===[A_.sG,A_.xL].indexOf(t.get("status"))?e:e+1}),0);if(e.dispatch((0,A_.Vh)(null,s)),e.dispatch((0,Hl.gk)()),c.m.push("/".concat(jf.a4,"/").concat(n.id)),e.dispatch((0,od.SD)()),!i.get("isLoggedIn")){var u=[];try{var l=JSON.parse((0,d.St)("guestUserAlbums"));Array.isArray(l)&&(u=l),u.length>=eb.vm&&(u=u.filter((function(e){return"string"==typeof e})).slice(1,15))}catch(e){(0,d.lD)("guestUserAlbums")}u.push(o.getIn(["album","deleteHash"])),(0,d.D9)("guestUserAlbums",JSON.stringify(u))}var p=n.id;a.forEach((function(t){t.get("status")===A_.sG&&e.dispatch((0,A_.XH)(T_(t),p,t.get("filetype"),t.get("filesize")))}))}(e,t);case od.Kx+Nd.MR:return function(e,t){var n=t.payload,r=e.getState().upload,o=Ul.we+r.getIn(["album","id"]),i=(n.tags||[]).some((function(e){return!0===e.is_featured}));M_(A_.vf,e,n.spam_reason||0,i),!1!==n.is_pending?e.dispatch(Hy(o)):c.m.push(o)}(e,t);case A_.z3:return function(e){var t=e.getState(),n=t.upload,r=t.user.get("isLoggedIn"),o=n.getIn(["album",r?"id":"deleteHash"]);return e.dispatch((0,od.k3)(o))}(e);case od.Xv+Nd.MR:case A_.JZ:return function(e,t){var n=t.runNew;M_(A_.Qi,e,null,!1),e.dispatch((0,A_.j0)()),e.dispatch((0,Hl.gk)()),c.m.push(n?"/".concat(jf.uk):jf.Sd)}(e,{runNew:!1});case A_.H3:return function(e){e.dispatch((0,A_.Xw)());var t=e.getState().upload,n=t.getIn(["album","id"]),r=t.getIn(["post","title"]);e.dispatch((0,C_.BC)(eb.Bt,!0)(n,r))}(e);case A_.j3+Nd.MR:return function(e,t){var n=t.payload;if(n.state!==eb.RB){var r=e.getState().upload;if(n.state===eb.jt){var o=r.getIn(["media",n.id]).data,i=o.deletehash,a=n.id,s=o.link,u=r.getIn(["album","deleteHash"]);e.dispatch((0,A_.QT)(a,i,s,a)),e.dispatch((0,A_.AO)(u,i))}return r.get("queue").forEach((function(t){t.get("status")===A_.MS&&t.getIn(["mediaTicket","attempts"])>=eb.iX&&e.dispatch((0,A_.iS)(void 0,t.getIn(["mediaTicket","ticketId"])))})),N_(e)}e.dispatch((0,A_.iS)(void 0,n.id))}(e,t);case A_.j3+Nd.ES:return function(e){return x_=!1,e.getState().upload.get("queue").forEach((function(t){t.get("status")===A_.MS&&e.dispatch((0,A_.iS)(void 0,t.getIn(["mediaTicket","ticketId"])))})),N_(e)}(e);case A_.rO:return function(e,t){var n=t.payload;e.dispatch((0,A_.sT)()),e.dispatch((0,A_.uk)(n.imageId))}(e,t);case A_.T3:return F_(e);case A_.eY:return function(e){var t=e.getState(),n=t.user,r=t.upload,o=n.get("isLoggedIn");if(!o)return F_(e);var i=r.get("imageToDelete"),a=r.getIn(["album","id"]),s=r.getIn(["album","deleteHash"]);return e.dispatch(I_(i,a,s,o))}(e);case A_.Pl:return function(e){var t=e.getState().upload.getIn(["album","deleteHash"]);return e.dispatch((0,od.bl)(t))}(e);case S_+Nd.MR:case E_+Nd.MR:return e.dispatch((0,Hl.gk)());case A_.te:return R_(e);case A_.i4:return function(e){return e.dispatch((0,Hl.gk)()),e.dispatch((0,A_.j0)())}(e);case rd.AG:return function(e){var t=e.getState(),n=t.user,r=t.upload;if(n.get("isLoggedIn")||(0,d.D9)("guestUserTOS","true"),r.get("processingUpload"))return D_(e,{payload:{}})}(e);case rd.Yh+Nd.MR:return function(e){var t=[];try{t=JSON.parse((0,d.St)("guestUserAlbums"))}catch(e){}Array.isArray(t)&&t.length>0&&((0,d.lD)("guestUserAlbums"),e.dispatch((0,A_.oo)(t)))}(e);case A_.yo+Nd.ES:return c.m.push("/".concat(jf.uk));case A_.RM:return(0,d.iK)((function(){return e.dispatch((0,A_._X)(t.payload.id))}),6e3);case A_.DI:return function(e,t){var n=t.payload,r=t.meta,o=r.id,i=r.isError,a=Math.floor(n.duration),s=e.getState().user;a>eb.nl?(O_([A_.QZ,A_.XS],e,o,lp.Vv),e.dispatch((0,A_.iT)(o,eb.nl))):!s.get("isLoggedIn")&&a>eb.cj&&(e.dispatch((0,A_.iT)(o,eb.cj)),e.dispatch((0,A_.Z_)("video")),O_([A_.XS],e,o,lp.l1));var u=e.getState().upload,c=u.get("queue"),l=!0,d=!1,p=!1,f=u.getIn(["album","id"]);c.forEach((function(t,n){t.get("status")!==A_.xL?t.get("status")===A_.BH&&(n!==o||i||e.dispatch((0,A_.XH)(T_(t),f,t.get("filetype"),t.get("filesize"),t.get("duration"))),p=p||t.get("hasAudio"),d=!0):l=!1})),l&&d?p?e.dispatch((0,A_.Sv)()):e.dispatch((0,A_.Fy)()):N_(e)}(e,t);case A_.tZ:return L_(e,e.getState().upload.get("queue"));case A_.ud:case A_.XA:return e.dispatch((0,A_.Fy)()),e.dispatch((0,Hl.gk)());case A_.mH:return e.dispatch((0,A_.Bl)(t.payload.name,lp.KB)),j_(e);case A_.cU:return j_(e);case A_.ZY+Nd.tj:return function(e){var t=e.getState().upload,n=t.getIn(["post","tags"]),r=new pd.OrderedSet,i=function(t){var o=t.text.split("#").pop();r=r.add(o),n.has(o)||e.dispatch((0,A_.Bl)(o,lp.mx))};t.get("queue").forEach((function(e){return(0,Wp.Bc)(e.get("description"),o()({},Wp.cj,i))})),e.dispatch((0,A_.tS)(r)),j_(e,n.keySeq().toArray())}(e);case A_.Hv:return L_(e,e.getState().upload.get("queue"));case A_.zn+Nd.ES:return function(e,t){var n=t.payload;return e.dispatch((0,A_._o)()),n.statusCode===w_.Zo?e.dispatch((0,A_.i9)()):N_(e)}(e,t);case A_.zn+Nd.MR:return function(e,t){var n=t.payload;if(e.dispatch((0,A_._o)()),1===parseInt(n.overLimits,10))return e.dispatch((0,A_.i9)());var r=e.getState().upload.get("queue");return L_(e,r)}(e,t);case Af.OZ:return function(e){if(e.getState().upload.get("processingUpload"))return D_(e,{payload:{}})}(e);case A_.np+Nd.MR:return N_(e);case A_.Vz:return function(e){var t=e.getState().upload,n=U_(t.getIn(["album","id"]),t.getIn(["post","isImage"]));t.getIn(["post","mature"])?(0,d.Rv)(n,1):(0,d.e8)(n)}(e);case A_.pZ+Nd.MR:return Z_(e,t,!1);case A_.ok+Nd.MR:return Z_(e,t,!0)}},reducer:ow};const sw=(iw={},o()(iw,nm.oF,nm.J4),o()(iw,nm.tk,aw),iw);var uw=n("Te9D"),cw=n.n(uw);var lw=null;function dw(e){var t=e.getState().embed.toJS(),n=t.isAlbum,r=t.postId,o=t.title,i=t.nodeId,a=t.hasTitle;if(i&&r){var s,u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o="s.".concat(Ul.VB,"/min/embed.js"),i=!1===n?'data-context="'.concat(n,'"'):"",a=r?"":'data-analytics="false"';return'
').concat(cw()(t),'