PageSourceSearch

https://www.woofyclub.com/_next/static/chunks/pages/_app-eeaa9b9701ed1013.js

js woofyclub.com collected 2026-10-01 23:52:25 UTC 674,939 bytes, 31 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{74444:function(e,t,n){"use strict";n.d(t,{BH:function(){return _},G6:function(){return C},L:function(){return u},LL:function(){return O},P0:function(){return g},Pz:function(){return v},Sg:function(){return b},UG:function(){return S},ZR:function(){return A},aH:function(){return y},b$:function(){return I},eu:function(){return R},hl:function(){return x},m9:function(){return $},ne:function(){return U},pd:function(){return j},q4:function(){return m},ru:function(){return T},tV:function(){return c},uI:function(){return E},vZ:function(){return function e(t,n){if(t===n)return!0;let r=Object.keys(t),i=Object.keys(n);for(let s of r){if(!i.includes(s))return!1;let r=t[s],o=n[s];if(M(r)&&M(o)){if(!e(r,o))return!1}else if(r!==o)return!1}for(let e of i)if(!r.includes(e))return!1;return!0}},w1:function(){return k},xO:function(){return L},xb:function(){return D},z$:function(){return w},zd:function(){return P}});var r=n(34155);let i=function(e){let t=[],n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);i<128?t[n++]=i:(i<2048?t[n++]=i>>6|192:((64512&i)==55296&&r+1<e.length&&(64512&e.charCodeAt(r+1))==56320?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128):t[n++]=i>>12|224,t[n++]=i>>6&63|128),t[n++]=63&i|128)}return t},s=function(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){let s=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&s)}else if(i>239&&i<365){let s=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(s>>10)),t[r++]=String.fromCharCode(56320+(1023&s))}else{let s=e[n++],o=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&s)<<6|63&o)}}return t.join("")},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_();let n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){let i=e[t],s=t+1<e.length,o=s?e[t+1]:0,a=t+2<e.length,l=a?e[t+2]:0,u=i>>2,c=(3&i)<<4|o>>4,h=(15&o)<<2|l>>6,d=63&l;a||(d=64,s||(h=64)),r.push(n[u],n[c],n[h],n[d])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(i(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):s(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();let n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let t=0;t<e.length;){let i=n[e.charAt(t++)],s=t<e.length?n[e.charAt(t)]:0,o=++t<e.length?n[e.charAt(t)]:64,l=++t<e.length?n[e.charAt(t)]:64;if(++t,null==i||null==s||null==o||null==l)throw new a;let u=i<<2|s>>4;if(r.push(u),64!==o){let e=s<<4&240|o>>2;if(r.push(e),64!==l){let e=o<<6&192|l;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.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};class a extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}let l=function(e){let t=i(e);return o.encodeByteArray(t,!0)},u=function(e){return l(e).replace(/\./g,"")},c=function(e){try{return o.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null},h=()=>(function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n.g)return n.g;throw Error("Unable to locate global object.")})().__FIREBASE_DEFAULTS__,d=()=>
1{if(void 0===r||void 0===r.env)return;let e=r.env.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},f=()=>{let e;if("undefined"==typeof document)return;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}let t=e&&c(e[1]);return t&&JSON.parse(t)},p=()=>{try{return h()||d()||f()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},m=e=>{var t,n;return null===(n=null===(t=p())||void 0===t?void 0:t.emulatorHosts)||void 0===n?void 0:n[e]},g=e=>{let t=m(e);if(!t)return;let n=t.lastIndexOf(":");if(n<=0||n+1===t.length)throw Error(`Invalid host ${t} with no separate hostname and port!`);let r=parseInt(t.substring(n+1),10);return"["===t[0]?[t.substring(1,n-1),r]:[t.substring(0,n),r]},y=()=>{var e;return null===(e=p())||void 0===e?void 0:e.config},v=e=>{var t;return null===(t=p())||void 0===t?void 0:t[`_${e}`]};class _{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 b(e,t){if(e.uid)throw Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let n=t||"demo-project",r=e.iat||0,i=e.sub||e.user_id;if(!i)throw Error("mockUserToken must contain 'sub' or 'user_id' field!");let s=Object.assign({iss:`https://securetoken.google.com/${n}`,aud:n,iat:r,exp:r+3600,auth_time:r,sub:i,user_id:i,firebase:{sign_in_provider:"custom",identities:{}}},e);return[u(JSON.stringify({alg:"none",type:"JWT"})),u(JSON.stringify(s)),""].join(".")}function w(){return"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:""}function E(){return"undefined"!=typeof window&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(w())}function S(){var e;let t=null===(e=p())||void 0===e?void 0:e.forceEnvironment;if("node"===t)return!0;if("browser"===t)return!1;try{return"[object process]"===Object.prototype.toString.call(n.g.process)}catch(e){return!1}}function T(){let e="object"==typeof chrome?chrome.runtime:"object"==typeof browser?browser.runtime:void 0;return"object"==typeof e&&void 0!==e.id}function I(){return"object"==typeof navigator&&"ReactNative"===navigator.product}function k(){let e=w();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function C(){return!S()&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome")}function x(){try{return"object"==typeof indexedDB}catch(e){return!1}}function R(){return new Promise((e,t)=>{try{let n=!0,r="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(r);i.onsuccess=()=>{i.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},i.onupgradeneeded=()=>{n=!1},i.onerror=()=>{var e;t((null===(e=i.error)||void 0===e?void 0:e.message)||"")}}catch(e){t(e)}})}class A extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,A.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,O.prototype.create)}}class O{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){let n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],s=i?i.replace(N,(e,t)=>{let r=n[t];return null!=r?String(r):`<${t}?>`}):"Error",o=`${this.serviceName}: ${s} (${r}).`;return new A(r,o,n)}}let N=/\{\$([^}]+)}/g;function D(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function M(e){return null!==e&&"object"==typeof e}function L(e){let t=[];for(let[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(e=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(e))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function P(e){let t={};return e.replace(/^\?/,"").split("&").forEach(e=>{if(e){let[n,r]=e.split("=");
1t[decodeURIComponent(n)]=decodeURIComponent(r)}}),t}function j(e){let t=e.indexOf("?");if(!t)return"";let n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function U(e,t){let n=new F(e,t);return n.subscribe.bind(n)}class F{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(e=>{this.error(e)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let r;if(void 0===e&&void 0===t&&void 0===n)throw Error("Missing Observer.");void 0===(r=!function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])?{next:e,error:t,complete:n}:e).next&&(r.next=B),void 0===r.error&&(r.error=B),void 0===r.complete&&(r.complete=B);let i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch(e){}}),this.observers.push(r),i}unsubscribeOne(e){void 0!==this.observers&&void 0!==this.observers[e]&&(delete this.observers[e],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(void 0!==this.observers&&void 0!==this.observers[e])try{t(this.observers[e])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}})}close(e){this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function B(){}function $(e){return e&&e._delegate?e._delegate:e}},32092:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294);function i(){return(0,r.useState)(null)}},92029:function(e,t,n){"use strict";var r=n(67294);t.Z=function(e){let t=(0,r.useRef)(e);return(0,r.useEffect)(()=>{t.current=e},[e]),t}},78146:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(67294),i=n(92029);function s(e){let t=(0,i.Z)(e);return(0,r.useCallback)(function(...e){return t.current&&t.current(...e)},[t])}},99585:function(e,t,n){"use strict";var r=n(67294);let i=void 0!==n.g&&n.g.navigator&&"ReactNative"===n.g.navigator.product,s="undefined"!=typeof document;t.Z=s||i?r.useLayoutEffect:r.useEffect},35654:function(e,t,n){"use strict";var r=n(67294);let i=e=>e&&"function"!=typeof e?t=>{e.current=t}:e;t.Z=function(e,t){return(0,r.useMemo)(()=>(function(e,t){let n=i(e),r=i(t);return e=>{n&&n(e),r&&r(e)}})(e,t),[e,t])}},6454:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294);function i(){let e=(0,r.useRef)(!0),t=(0,r.useRef)(()=>e.current);return(0,r.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}},88833:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(67294);function i(e){let t=(0,r.useRef)(null);return(0,r.useEffect)(()=>{t.current=e}),t.current}},70861:function(e,t,n){"use strict";n.d(t,{FT:function(){return o}});var r=n(67294),i=n(85893);let s=["as","disabled"];function o({tagName:e,disabled:t,href:n,target:r,rel:i,role:s,onClick:o,tabIndex:a=0,type:l}){e||(e=null!=n||null!=r||null!=i?"a":"button");let u={tagName:e};if("button"===e)return[{type:l||"button",disabled:t},u];let c=r=>{var i;if(!t&&("a"!==e||(i=n)&&"#"!==i.trim())||r.preventDefault(),t){r.stopPropagation();return}null==o||o(r)};return"a"===e&&(n||(n="#"),t&&(n=void 0)),[{role:null!=s?s:"button",disabled:void 0,tabIndex:t?void 0:a,href:n,target:"a"===e?r:void 0,"aria-disabled":t||void 0,rel:"a"===e?i:void 0,onClick:c,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),c(e))}},u]}r.forwardRef((e,t)=>{let{as:n,disabled:r}=e,a=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,s),[l,{tagName:u}]=o(Object.assign({tagName:n,disabled:r},a));return(0,i.jsx)(u,Object.assign({},a,l,{ref:t}))}).displayName="Button"},9351:function(e,t,n){"use strict";var r=n(23004),i=!1,s=!1;
1try{var o={get passive(){return i=!0},get once(){return s=i=!0}};r.Z&&(window.addEventListener("test",o,o),window.removeEventListener("test",o,!0))}catch(e){}t.ZP=function(e,t,n,r){if(r&&"boolean"!=typeof r&&!s){var o=r.once,a=r.capture,l=n;!s&&o&&(l=n.__once||function e(r){this.removeEventListener(t,e,a),n.call(this,r)},n.__once=l),e.addEventListener(t,l,i?r:a)}e.addEventListener(t,n,r)}},23004:function(e,t){"use strict";t.Z=!!("undefined"!=typeof window&&window.document&&window.document.createElement)},91505:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(67216),i=/([A-Z])/g,s=/^ms-/;function o(e){return e.replace(i,"-$1").toLowerCase().replace(s,"-ms-")}var a=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,l=function(e,t){var n,i="",s="";if("string"==typeof t)return e.style.getPropertyValue(o(t))||((n=(0,r.Z)(e))&&n.defaultView||window).getComputedStyle(e,void 0).getPropertyValue(o(t));Object.keys(t).forEach(function(n){var r=t[n];r||0===r?n&&a.test(n)?s+=n+"("+r+") ":i+=o(n)+": "+r+";":e.style.removeProperty(o(n))}),s&&(i+="transform: "+s+";"),e.style.cssText+=";"+i}},72950:function(e,t,n){"use strict";var r=n(9351),i=n(30099);t.Z=function(e,t,n,s){return(0,r.ZP)(e,t,n,s),function(){(0,i.Z)(e,t,n,s)}}},67216:function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{Z:function(){return r}})},30099:function(e,t){"use strict";t.Z=function(e,t,n,r){var i=r&&"boolean"!=typeof r?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}},94305:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(91505),i=n(72950);function s(e,t,n,s){null==n&&(a=-1===(o=(0,r.Z)(e,"transitionDuration")||"").indexOf("ms")?1e3:1,n=parseFloat(o)*a||0);var o,a,l,u,c,h,d,f=(l=n,void 0===(u=s)&&(u=5),c=!1,h=setTimeout(function(){c||function(e,t,n,r){if(void 0===n&&(n=!1),void 0===r&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}(e,"transitionend",!0)},l+u),d=(0,i.Z)(e,"transitionend",function(){c=!0},{once:!0}),function(){clearTimeout(h),d()}),p=(0,i.Z)(e,"transitionend",t);return function(){f(),p()}}},91118:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return n(84994)}])},12605:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});let r="production"},90048:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});let r=!1},65083:function(e,t,n){"use strict";n.d(t,{RP:function(){return function e(t,n,r,l=0){return new i.cW((i,u)=>{let c=t[l];if(null===n||"function"!=typeof c)i(n);else{let h=c({...n},r);a.X&&c.id&&null===h&&s.kg.log(`Event processor "${c.id}" dropped event`),(0,o.J8)(h)?h.then(n=>e(t,n,r,l+1).then(i)).then(null,u):e(t,h,r,l+1).then(i).then(null,u)}})}},cc:function(){return u},fH:function(){return l}});var r=n(76692),i=n(73996),s=n(7612),o=n(8642),a=n(90048);function l(){return(0,r.Y)("globalEventProcessors",()=>[])}function u(e){l().push(e)}},44166:function(e,t,n){"use strict";n.d(t,{$e:function(){return m},Tb:function(){return c},av:function(){return p},cg:function(){return E},eN:function(){return h},nZ:function(){return v},n_:function(){return d},s3:function(){return y},v:function(){return f},yj:function(){return _},yl:function(){return g}});var r=n(7612),i=n(76692),s=n(12605),o=n(90048),a=n(42938),l=n(70268),u=n(87661);function c(e,t){return(0,a.Gd)().captureException(e,(0,u.U0)(t))}function h(e,t){return(0,a.Gd)().captureEvent(e,t)}function d(e,t){(0,a.Gd)().addBreadcrumb(e,t)}function f(e,t){(0,a.Gd)().setContext(e,t)}function p(e){(0,a.Gd)().setUser(e)}function m(...e){let t=(0,a.Gd)();if(2===e.length){let[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}async function g(e){let t=y();return t?t.flush(e):(o.X&&r.kg.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}function y(){return(0,a.Gd)().getClient()}function v(){return(0,a.Gd)().getScope()}function _(e){let t=y(),n=(0,a.aF)(),r=v(),{release:o,environment:u=s.J}=t&&t.getOptions()||{},{userAgent:c}=i.GLOBAL_OBJ.navigator||{},h=(0,l.Hv)({release:o,environment:u,user:r.getUser()||n.getUser(),...c&&{userAgent:c},...e}
1),d=n.getSession();return d&&"ok"===d.status&&(0,l.CT)(d,{status:"exited"}),b(),n.setSession(h),r.setSession(h),h}function b(){let e=(0,a.aF)(),t=v(),n=t.getSession()||e.getSession();n&&(0,l.RJ)(n),w(),e.setSession(),t.setSession()}function w(){let e=(0,a.aF)(),t=v(),n=y(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function E(e=!1){if(e){b();return}w()}},42938:function(e,t,n){"use strict";n.d(t,{Gd:function(){return g},aF:function(){return y},cu:function(){return p}});var r=n(8642),i=n(16374),s=n(61280),o=n(7612),a=n(76692),l=n(12605),u=n(90048),c=n(87499),h=n(70268);let d=parseFloat(n(81768).J);class f{constructor(e,t,n,r=d){let i,s;this._version=r,t?i=t:(i=new c.sX).setClient(e),n?s=n:(s=new c.sX).setClient(e),this._stack=[{scope:i}],e&&this.bindClient(e),this._isolationScope=s}isOlderThan(e){return this._version<e}bindClient(e){let t=this.getStackTop();t.client=e,t.scope.setClient(e),e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){let e=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){let t;let n=this.pushScope();try{t=e(n)}catch(e){throw this.popScope(),e}return(0,r.J8)(t)?t.then(e=>(this.popScope(),e),e=>{throw this.popScope(),e}):(this.popScope(),t)}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]}captureException(e,t){let n=this._lastEventId=t&&t.event_id?t.event_id:(0,i.DM)(),r=Error("Sentry syntheticException");return this.getScope().captureException(e,{originalException:e,syntheticException:r,...t,event_id:n}),n}captureMessage(e,t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:(0,i.DM)(),s=Error(e);return this.getScope().captureMessage(e,t,{originalException:e,syntheticException:s,...n,event_id:r}),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:(0,i.DM)();return e.type||(this._lastEventId=n),this.getScope().captureEvent(e,{...t,event_id:n}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){let{scope:n,client:r}=this.getStackTop();if(!r)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=100}=r.getOptions&&r.getOptions()||{};if(a<=0)return;let l={timestamp:(0,s.yW)(),...e},u=i?(0,o.Cf)(()=>i(l,t)):l;null!==u&&(r.emit&&r.emit("beforeAddBreadcrumb",u,t),n.addBreadcrumb(u,a))}setUser(e){this.getScope().setUser(e),this.getIsolationScope().setUser(e)}setTags(e){this.getScope().setTags(e),this.getIsolationScope().setTags(e)}setExtras(e){this.getScope().setExtras(e),this.getIsolationScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t),this.getIsolationScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t),this.getIsolationScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t),this.getIsolationScope().setContext(e,t)}configureScope(e){let{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){let t=m(this);try{e(this)}finally{m(t)}}getIntegration(e){let t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return u.X&&o.kg.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){let n=this._callExtensionMethod("startTransaction",e,t);return u.X&&!n&&(this.getClient()?o.kg.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
2Sentry.addTracingExtensions();
3Sentry.init({...});
4`):o.kg.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop().scope,t=e.getSession();t&&(0,h.RJ)(t),this._sendSessionUpdate(),e.setSession()}startSession(e){let{scope:t,client:n}=this.getStackTop(),{release:r,environment:i=l.J}=n&&n.getOptions()||{},{userAgent:s}=a.GLOBAL_OBJ.navigator||{},o=(0,h.Hv)({release:r,environment:i,user:t.getUser(),...s&&{userAgent:s},...e}),u=t.getSession&&t.getSession();return u&&"ok"===u.status&&(0,h.CT)(u,{status:"exited"}),this.endSession(),t.setSession(o),o}shouldSendDefaultPii(){let e=this.getClient(),t=e&&e.getOptions();return!!(t&&t.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_callExtensionMethod(e,...t){let n=p().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);u.X&&o.kg.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function p(){return a.GLOBAL_OBJ.__SENTRY__=a.GLOBAL_OBJ.__SENTRY__||{extensions:{},hub:void 0},a.GLOBAL_OBJ}function m(e){let t=p(),n=v(t);return _(t,e),n}function g(){let e=p();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return function(e=p()){return(!(e&&e.__SENTRY__&&e.__SENTRY__.hub)||v(e).isOlderThan(d))&&_(e,new f),v(e)}(e)}function y(){return g().getIsolationScope()}function v(e){return(0,a.Y)("hub",()=>new f,e)}function _(e,t){return!!e&&((e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0)}},87499:function(e,t,n){"use strict";let r;n.d(t,{lW:function(){return d},sX:function(){return h}});var i=n(8642),s=n(61280),o=n(16374),a=n(7612),l=n(65083),u=n(70268),c=n(73419);class h{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=f()}static clone(e){return e?e.clone():new h}clone(){let e=new h;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._span=this._span,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}setClient(e){this._client=e}getClient(){return this._client}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,segment:void 0,username:void 0},this._session&&(0,u.CT)(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this._span;return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;let t="function"==typeof e?e(this):e;if(t instanceof h){let e=t.getScopeData();this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&Object.keys(e.user).length&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint.length&&(this._fingerprint=e.fingerprint),t.getRequestSession()&&(this._requestSession=t.getRequestSession()),e.propagationContext&&(this._propagationContext=e.propagationContext)}else(0,i.PO)(t)&&(this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession),e.propagationContext&&(this._propagationContext=e.propagationContext));return this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=f(),this}addBreadcrumb(e,t){let n="number"==typeof t?t:100;if(n<=0)return this;let r={timestamp:(0,s.yW)(),...e},i=this._breadcrumbs;return i.push(r),this._breadcrumbs=i.length>n?i.slice(-n):i,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}
4getAttachments(){return this.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){let{_breadcrumbs:e,_attachments:t,_contexts:n,_tags:r,_extra:i,_user:s,_level:o,_fingerprint:a,_eventProcessors:l,_propagationContext:u,_sdkProcessingMetadata:c,_transactionName:h,_span:d}=this;return{breadcrumbs:e,attachments:t,contexts:n,tags:r,extra:i,user:s,level:o,fingerprint:a||[],eventProcessors:l,propagationContext:u,sdkProcessingMetadata:c,transactionName:h,span:d}}applyToEvent(e,t={},n=[]){(0,c.gi)(e,this.getScopeData());let r=[...n,...(0,l.fH)(),...this._eventProcessors];return(0,l.RP)(r,e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t&&t.event_id?t.event_id:(0,o.DM)();if(!this._client)return a.kg.warn("No client configured on scope - will not capture exception!"),n;let r=Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n&&n.event_id?n.event_id:(0,o.DM)();if(!this._client)return a.kg.warn("No client configured on scope - will not capture message!"),r;let i=Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=t&&t.event_id?t.event_id:(0,o.DM)();return this._client?this._client.captureEvent(e,{...t,event_id:n},this):a.kg.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)}}function d(){return r||(r=new h),r}function f(){return{traceId:(0,o.DM)(),spanId:(0,o.DM)().substring(16)}}},70268:function(e,t,n){"use strict";n.d(t,{CT:function(){return a},Hv:function(){return o},RJ:function(){return l}});var r=n(61280),i=n(16374),s=n(61887);function o(e){let t=(0,r.ph)(),n={sid:(0,i.DM)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>(0,s.Jr)({sid:`${n.sid}`,init:n.init,started:new Date(1e3*n.started).toISOString(),timestamp:new Date(1e3*n.timestamp).toISOString(),status:n.status,errors:n.errors,did:"number"==typeof n.did||"string"==typeof n.did?`${n.did}`:void 0,duration:n.duration,abnormal_mechanism:n.abnormal_mechanism,attrs:{release:n.release,environment:n.environment,ip_address:n.ipAddress,user_agent:n.userAgent}})};return e&&a(n,e),n}function a(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||(0,r.ph)(),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:(0,i.DM)()),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{let 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)}function l(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),a(e,n)}},62146:function(e,t,n){"use strict";n.d(t,{_:function(){return l},j:function(){return u}});var r=n(61887),i=n(12605),s=n(44166),o=n(39877),a=n(98077);function l(e,t,n){let s=t.getOptions(),{publicKey:o}=t.getDsn()||{},{segment:a}=n&&n.getUser()||{},l=(0,r.Jr)({environment:s.environment||i.J,release:s.release,user_segment:a,public_key:o,trace_id:e});return t.emit&&t.emit("createDsc",l),l}function u(e){let t=(0,s.s3)();if(!t)return{};let n=l((0,a.XU)(e).trace_id||"",t,(0,s.nZ)()),r=(0,o.G)(e);if(!r)return n;let i=r&&r._frozenDynamicSamplingContext;if(i)return i;let{sampleRate:u,source:c}=r.metadata;null!=u&&(n.sample_rate=`${u}`);let h=(0,a.XU)(r);return c&&"url"!==c&&(n.transaction=h.description),n.sampled=String((0,a.Tt)(r)),t.emit&&t.emit("createDsc",n),n}},73419:function(e,t,n){"use strict";n.d(t,{gi:function(){return l},yo:function(){return u}});var r=n(61887),i=n(16374),s=n(62146),o=n(39877),a=n(98077);function l(e,t){let{fingerprint:n,span:l,breadcrumbs:u,sdkProcessingMetadata:c}=t;(function(e,t){let{extra:n,tags:i,user:s,contexts:o,level:a,transactionName:l}=t,u=(0,r.Jr)(n);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});let c=(0,r.Jr)(i);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});let h=(0,r.Jr)(s);h&&Object.keys(h).length&&(e.user={...h,...e.user});let d=(0,r.Jr)(o);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),a&&(e.level=a),l&&(e.transaction=l)})(e,t),l&&function(e,t){e.contexts={trace:(0,a.wy)(t),...e.contexts};let n=(0,o.G)(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:(0,s.j)(t),...e.sdkProcessingMetadata};let r=(0,a.XU)(n).description;r&&(e.tags={transaction:r,...e.tags})}}(e,l),e.fingerprint=e.fingerprint?(0,i.lE)(e.fingerprint):[],n&&(e.fingerprint=e.fingerprint.concat(n)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint,function(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(e,u),e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...c}}function u(e,t){let{extra:n,tags:r,user:i,contexts:s,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:u,eventProcessors:h,attachments:d,propagationContext:f,transactionName:p,span:m}=t;c(e,"extra",n),c(e,"tags",r),c(e,"user",i),c(e,"contexts",s),c(e,"s
4dkProcessingMetadata",a),o&&(e.level=o),p&&(e.transactionName=p),m&&(e.span=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),h.length&&(e.eventProcessors=[...e.eventProcessors,...h]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...f}}function c(e,t,n){if(n&&Object.keys(n).length)for(let r in e[t]={...e[t]},n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}},39877:function(e,t,n){"use strict";function r(e){return e.transaction}n.d(t,{G:function(){return r}})},87661:function(e,t,n){"use strict";n.d(t,{R:function(){return f},U0:function(){return m}});var r=n(16374),i=n(61280),s=n(44293),o=n(76692),a=n(9569),l=n(12605),u=n(65083),c=n(87499),h=n(73419),d=n(98077);function f(e,t,n,f,m,g){let{normalizeDepth:y=3,normalizeMaxBreadth:v=1e3}=e,_={...t,event_id:t.event_id||n.event_id||(0,r.DM)(),timestamp:t.timestamp||(0,i.yW)()},b=n.integrations||e.integrations.map(e=>e.name);(function(e,t){let{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:l.J),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=(0,s.$G)(e.message,o));let a=e.exception&&e.exception.values&&e.exception.values[0];a&&a.value&&(a.value=(0,s.$G)(a.value,o));let u=e.request;u&&u.url&&(u.url=(0,s.$G)(u.url,o))})(_,e),b.length>0&&(_.sdk=_.sdk||{},_.sdk.integrations=[..._.sdk.integrations||[],...b]),void 0===t.type&&function(e,t){let n;let r=o.GLOBAL_OBJ._sentryDebugIds;if(!r)return;let i=p.get(t);i?n=i:(n=new Map,p.set(t,n));let s=Object.keys(r).reduce((e,i)=>{let s;let o=n.get(i);o?s=o:(s=t(i),n.set(i,s));for(let t=s.length-1;t>=0;t--){let n=s[t];if(n.filename){e[n.filename]=r[i];break}}return e},{});try{e.exception.values.forEach(e=>{e.stacktrace.frames.forEach(e=>{e.filename&&(e.debug_id=s[e.filename])})})}catch(e){}}(_,e.stackParser);let w=function(e,t){if(!t)return e;let n=e?e.clone():new c.sX;return n.update(t),n}(f,n.captureContext);n.mechanism&&(0,r.EG)(_,n.mechanism);let E=m&&m.getEventProcessors?m.getEventProcessors():[],S=(0,c.lW)().getScopeData();if(g){let e=g.getScopeData();(0,h.yo)(S,e)}if(w){let e=w.getScopeData();(0,h.yo)(S,e)}let T=[...n.attachments||[],...S.attachments];T.length&&(n.attachments=T),(0,h.gi)(_,S);let I=[...E,...(0,u.fH)(),...S.eventProcessors];return(0,u.RP)(I,_,n).then(e=>(e&&function(e){let 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||[];let n=e.debug_meta.images;Object.keys(t).forEach(e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})})}(e),"number"==typeof y&&y>0)?function(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:(0,a.Fv)(e.data,t,n)}}))},...e.user&&{user:(0,a.Fv)(e.user,t,n)},...e.contexts&&{contexts:(0,a.Fv)(e.contexts,t,n)},...e.extra&&{extra:(0,a.Fv)(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=(0,a.Fv)(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>{let r=(0,d.XU)(e).data;return r&&(e.data=(0,a.Fv)(r,t,n)),e})),r}(e,y,v):e)}let p=new WeakMap;function m(e){return e?e instanceof c.sX||"function"==typeof e||Object.keys(e).some(e=>g.includes(e))?{captureContext:e}:e:void 0}let g=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"]},98077:function(e,t,n){"use strict";n.d(t,{$k:function(){return c},Hb:function(){return u},Tt:function(){return f},XU:function(){return d},i0:function(){return a},ve:function(){return o},wy:function(){return l}});var r=n(61887),i=n(56819),s=n(61280);let o=0,a=1;function l(e){let{spanId:t,traceId:n}=e.spanContext(),{data:i,op:s,parent_span_id:o,status:a,tags:l,origin:u}=d(e);return(0,r.Jr)({data:i,op:s,parent_span_id:o,span_id:t,status:a,tags:l,trace_id:n,origin:u})}function u(e){let{traceId:t,spanId:n}=e.spanContext(),r=f(e);return(0,i.$p)(t,n,r)}function c(e){return"number"==typeof e?h(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?h(e.getTime()):(0,s.ph)()}function h(e){return e>9999999999?e/1e3:e}function d(e){return"function"==typeof e.getSpanJSON?e.getSpanJSON():"function"==typeof e.toJSON?e.toJSON():{}}function f(e){let{traceFlags:t}=e.spanContext();return!!(t&a)}},81768:function(e,t,n){"use strict";n.d(t,{J:function(){return r}});let r="7.120.4"},29912:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});let r=!1},19296:function(e,t,n){"use strict";let r,i,s,o,a,l,u,c,h,d,f,p,m,g,y,v,_,b,w,E,S,T,I;
4var k,C,x,R,A,O,N,D,M,L,P={};n.r(P),n.d(P,{FunctionToString:function(){return et},InboundFilters:function(){return ea},LinkedErrors:function(){return em}});var j={};n.r(j),n.d(j,{Breadcrumbs:function(){return tm},Dedupe:function(){return tT},GlobalHandlers:function(){return ez},HttpContext:function(){return tw},LinkedErrors:function(){return tv},TryCatch:function(){return eJ}});var U=n(81768);function F(e,t,n=[t],r="npm"){let i=e._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${t}`,packages:n.map(e=>({name:`${r}:@sentry/${e}`,version:U.J})),version:U.J}),e._metadata=i}var B=n(44166);function $(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;let t=(0,B.s3)(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}var V=n(61887),q=n(16374),z=n(7612),H=n(90048),W=n(65083),G=n(42938);let K=[];function X(e,t){for(let n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function J(e,t,n){if(n[t.name]){H.X&&z.kg.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,-1===K.indexOf(t.name)&&(t.setupOnce(W.cc,G.Gd),K.push(t.name)),t.setup&&"function"==typeof t.setup&&t.setup(e),e.on&&"function"==typeof t.preprocessEvent){let n=t.preprocessEvent.bind(t);e.on("preprocessEvent",(t,r)=>n(t,r,e))}if(e.addEventProcessor&&"function"==typeof t.processEvent){let n=t.processEvent.bind(t),r=(t,r)=>n(t,r,e);r.id=t.name,e.addEventProcessor(r)}H.X&&z.kg.log(`Integration installed: ${t.name}`)}function Z(e,t){let n=function(...e){return t(...e)};return n.id=e,n}let Y="FunctionToString",Q=new WeakMap,ee=()=>({name:Y,setupOnce(){r=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=(0,V.HK)(this),n=Q.has((0,B.s3)())&&void 0!==t?t:this;return r.apply(n,e)}}catch(e){}},setup(e){Q.set(e,!0)}}),et=Z(Y,ee);var en=n(44293);let er=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],ei=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],es="InboundFilters",eo=(e={})=>({name:es,setupOnce(){},processEvent:(t,n,r)=>{var i,s;return((i=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:er],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:ei],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(e,r.getOptions())).ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(t)?(H.X&&z.kg.warn(`Event dropped due to being internal Sentry Error.
5Event: ${(0,q.jH)(t)}`),0):(s=i.ignoreErrors,!t.type&&s&&s.length&&(function(e){let t;let n=[];e.message&&n.push(e.message);try{t=e.exception.values[e.exception.values.length-1]}catch(e){}return t&&t.value&&(n.push(t.value),t.type&&n.push(`${t.type}: ${t.value}`)),H.X&&0===n.length&&z.kg.error(`Could not extract message for event ${(0,q.jH)(e)}`),n})(t).some(e=>(0,en.U0)(e,s)))?(H.X&&z.kg.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
6Event: ${(0,q.jH)(t)}`),0):!function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;let n=e.transaction;return!!n&&(0,en.U0)(n,t)}(t,i.ignoreTransactions)?!function(e,t){if(!t||!t.length)return!1;let n=el(e);return!!n&&(0,en.U0)(n,t)}(t,i.denyUrls)?function(e,t){if(!t||!t.length)return!0;let n=el(e);return!n||(0,en.U0)(n,t)}(t,i.allowUrls)||(H.X&&z.kg.warn(`Event dropped due to not being matched by \`allowUrls\` option.
7Event: ${(0,q.jH)(t)}.
8Url: ${el(t)}`),0):(H.X&&z.kg.warn(`Event dropped due to being matched by \`denyUrls\` option.
9Event: ${(0,q.jH)(t)}.
10Url: ${el(t)}`),0):(H.X&&z.kg.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
11Event: ${(0,q.jH)(t)}`),0))?t:null}}),ea=Z(es,eo);function el(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--){let n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return H.X&&z.kg.error(`Cannot extract url for event ${(0,q.jH)(e)}`),null}}var eu=n(8642);function ec(e,t,n=250,r,i,s,o){if(!s.exception||!s.exception.values||!o||!(0,eu.V9)(o.originalException,Error))return;let a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=(function e(t,n,r,i,s,o,a,l){if(o.length>=r+1)return o;let u=[...o];if((0,eu.V9)(i[s],Error)){eh(a,l);let o=t(n,i[s]),c=u.length;ed(o,s,c,l),u=e(t,n,r,i[s],s,[o,...u],o,c)}
11return Array.isArray(i.errors)&&i.errors.forEach((i,o)=>{if((0,eu.V9)(i,Error)){eh(a,l);let c=t(n,i),h=u.length;ed(c,`errors[${o}]`,h,l),u=e(t,n,r,i,s,[c,...u],c,h)}}),u})(e,t,i,o.originalException,r,s.exception.values,a,0).map(e=>(e.value&&(e.value=(0,en.$G)(e.value,n)),e)))}function eh(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 ed(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}}function ef(e,t){let n={type:t.name||t.constructor.name,value:t.message},r=e(t.stack||"",1);return r.length&&(n.stacktrace={frames:r}),n}let ep="LinkedErrors",em=Z(ep,(e={})=>{let t=e.limit||5,n=e.key||"cause";return{name:ep,setupOnce(){},preprocessEvent(e,r,i){let s=i.getOptions();ec(ef,s.stackParser,s.maxValueLength,n,t,e,r)}}});var eg=n(76692);let ey=eg.GLOBAL_OBJ,ev=0;function e_(e,t={},n){if("function"!=typeof e)return e;try{let t=e.__sentry_wrapped__;if(t){if("function"==typeof t)return t;return e}if((0,V.HK)(e))return e}catch(t){return e}let r=function(){let r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);let i=r.map(e=>e_(e,t));return e.apply(this,i)}catch(e){throw ev++,setTimeout(()=>{ev--}),(0,B.$e)(n=>{n.addEventProcessor(e=>(t.mechanism&&((0,q.Db)(e,void 0,void 0),(0,q.EG)(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),(0,B.Tb)(e)}),e}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}(0,V.$Q)(r,e),(0,V.xp)(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}var eb=n(46009),ew=n(78508);let eE={},eS={};function eT(e,t){eE[e]=eE[e]||[],eE[e].push(t)}function eI(e,t){eS[e]||(t(),eS[e]=!0)}function ek(e,t){let n=e&&eE[e];if(n)for(let r of n)try{r(t)}catch(t){eb.X&&z.kg.error(`Error while triggering instrumentation handler.
12Type: ${e}
13Name: ${(0,ew.$P)(r)}
14Error:`,t)}}let eC=null;function ex(e){let t="error";eT(t,e),eI(t,eR)}function eR(){eC=eg.GLOBAL_OBJ.onerror,eg.GLOBAL_OBJ.onerror=function(e,t,n,r,i){return ek("error",{column:r,error:i,line:n,msg:e,url:t}),!!eC&&!eC.__SENTRY_LOADER__&&eC.apply(this,arguments)},eg.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}let eA=null;function eO(e){let t="unhandledrejection";eT(t,e),eI(t,eN)}function eN(){eA=eg.GLOBAL_OBJ.onunhandledrejection,eg.GLOBAL_OBJ.onunhandledrejection=function(e){return ek("unhandledrejection",e),!eA||!!eA.__SENTRY_LOADER__||eA.apply(this,arguments)},eg.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var eD=n(9149),eM=n(9569),eL=n(73996);function eP(e,t){let n=eU(e,t),r={type:t&&t.name,value:function(e){let t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ej(e,t){return{exception:{values:[eP(e,t)]}}}function eU(e,t){let n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(eF.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}let eF=/Minified React error #\d+;/i;function eB(e,t,n,r,i){let s;if((0,eu.VW)(t)&&t.error)return ej(e,t.error);if((0,eu.TX)(t)||(0,eu.fm)(t)){if("stack"in t)s=ej(e,t);else{let i=t.name||((0,eu.TX)(t)?"DOMError":"DOMException"),o=t.message?`${i}: ${t.message}`:i;s=e$(e,o,n,r),(0,q.Db)(s,o)}return"code"in t&&(s.tags={...s.tags,"DOMException.code":`${t.code}`}),s}return(0,eu.VZ)(t)?ej(e,t):((0,eu.PO)(t)||(0,eu.cO)(t)?s=function(e,t,n,r){let i=(0,B.s3)(),s=i&&i.getOptions().normalizeDepth,o={exception:{values:[{type:(0,eu.cO)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:function(e,{isUnhandledRejection:t}){let n=(0,V.zf)(e),r=t?"promise rejection":"exception";if((0,eu.VW)(e))return`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``;if((0,eu.cO)(e)){let t=function(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(e);return`Event \`${t}\` (type=${e.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}(t,{isUnhandledRejection:r})}]},extra:{__serialized__:(0,eM.Qy)(t,s)}};if(n){let t=eU(e,n);t.length&&(o.exception.values[0].stacktrace={frames:t})}return o}(e,t,n,i):(s=e$(e,t,n,r),(0,q.Db)(s,`${t}`,void 0)),(0,q.EG)(s,{synthetic:!0}),s)}function e$(e,t,n,r){let i={};if(r&&n){let r=eU(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}
14if((0,eu.Le)(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}let eV="GlobalHandlers",eq=(e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:eV,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&ex(t=>{let{stackParser:n,attachStacktrace:r}=eW();if((0,B.s3)()!==e||ev>0)return;let{msg:i,url:s,line:o,column:a,error:l}=t,u=void 0===l&&(0,eu.HD)(i)?function(e,t,n,r){let i=(0,eu.VW)(e)?e.message:e,s="Error",o=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);return o&&(s=o[1],i=o[2]),eH({exception:{values:[{type:s,value:i}]}},t,n,r)}(i,s,o,a):eH(eB(n,l||i,void 0,r,!1),s,o,a);u.level="error",(0,B.eN)(u,{originalException:l,mechanism:{handled:!1,type:"onerror"}})}),t.onunhandledrejection&&eO(t=>{let{stackParser:n,attachStacktrace:r}=eW();if((0,B.s3)()!==e||ev>0)return;let i=function(e){if((0,eu.pt)(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),s=(0,eu.pt)(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:eB(n,i,void 0,r,!0);s.level="error",(0,B.eN)(s,{originalException:i,mechanism:{handled:!1,type:"onunhandledrejection"}})})}}},ez=Z(eV,eq);function eH(e,t,n,r){let i=e.exception=e.exception||{},s=i.values=i.values||[],o=s[0]=s[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,h=(0,eu.HD)(t)&&t.length>0?t:(0,eD.l4)();return 0===l.length&&l.push({colno:u,filename:h,function:"?",in_app:!0,lineno:c}),e}function eW(){let e=(0,B.s3)();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}let eG=["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"],eK="TryCatch",eX=(e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:eK,setupOnce(){t.setTimeout&&(0,V.hl)(ey,"setTimeout",eZ),t.setInterval&&(0,V.hl)(ey,"setInterval",eZ),t.requestAnimationFrame&&(0,V.hl)(ey,"requestAnimationFrame",eY),t.XMLHttpRequest&&"XMLHttpRequest"in ey&&(0,V.hl)(XMLHttpRequest.prototype,"send",eQ);let e=t.eventTarget;e&&(Array.isArray(e)?e:eG).forEach(e0)}}},eJ=Z(eK,eX);function eZ(e){return function(...t){let n=t[0];return t[0]=e_(n,{mechanism:{data:{function:(0,ew.$P)(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function eY(e){return function(t){return e.apply(this,[e_(t,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,ew.$P)(e)},handled:!1,type:"instrument"}})])}}function eQ(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&(0,V.hl)(n,e,function(t){let n={mechanism:{data:{function:e,handler:(0,ew.$P)(t)},handled:!1,type:"instrument"}},r=(0,V.HK)(t);return r&&(n.mechanism.data.handler=(0,ew.$P)(r)),e_(t,n)})}),e.apply(this,t)}}function e0(e){let t=ey[e]&&ey[e].prototype;t&&t.hasOwnProperty&&t.hasOwnProperty("addEventListener")&&((0,V.hl)(t,"addEventListener",function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=e_(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,ew.$P)(r),target:e},handled:!1,type:"instrument"}}))}catch(e){}return t.apply(this,[n,e_(r,{mechanism:{data:{function:"addEventListener",handler:(0,ew.$P)(r),target:e},handled:!1,type:"instrument"}}),i])}}),(0,V.hl)(t,"removeEventListener",function(e){return function(t,n,r){try{let i=n&&n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch(e){}return e.call(this,t,n,r)}}))}function e1(){"console"in eg.GLOBAL_OBJ&&z.RU.forEach(function(e){e in eg.GLOBAL_OBJ.console&&(0,V.hl)(eg.G
14LOBAL_OBJ.console,e,function(t){return z.LD[e]=t,function(...t){ek("console",{args:t,level:e});let n=z.LD[e];n&&n.apply(eg.GLOBAL_OBJ.console,t)}})})}let e2=eg.GLOBAL_OBJ;function e4(e){eT("dom",e),eI("dom",e9)}function e9(){if(!e2.document)return;let e=ek.bind(null,"dom"),t=e6(e,!0);e2.document.addEventListener("click",t,!1),e2.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{let n=e2[t]&&e2[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,V.hl)(n,"addEventListener",function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=r[n]=r[n]||{refCount:0};if(!s.handler){let r=e6(e);s.handler=r,t.call(this,n,r,i)}s.refCount++}catch(e){}return t.call(this,n,r,i)}}),(0,V.hl)(n,"removeEventListener",function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}}))})}function e6(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=function(e){try{return e.target}catch(e){return null}}(n);if("keypress"===n.type&&(!r||!r.tagName||"INPUT"!==r.tagName&&"TEXTAREA"!==r.tagName&&!r.isContentEditable))return;(0,V.xp)(n,"_sentryCaptured",!0),r&&!r._sentryId&&(0,V.xp)(r,"_sentryId",(0,q.DM)());let a="keypress"===n.type?"input":n.type;!function(e){if(e.type!==s)return!1;try{if(!e.target||e.target._sentryId!==o)return!1}catch(e){}return!0}(n)&&(e({event:n,name:a,global:t}),s=n.type,o=r?r._sentryId:void 0),clearTimeout(i),i=e2.setTimeout(()=>{o=void 0,s=void 0},1e3)}}let e3=eg.GLOBAL_OBJ,e5="__sentry_xhr_v3__";function e7(e){eT("xhr",e),eI("xhr",e8)}function e8(){if(!e3.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;(0,V.hl)(e,"open",function(e){return function(...t){let n=Date.now(),r=(0,eu.HD)(t[0])?t[0].toUpperCase():void 0,i=function(e){if((0,eu.HD)(e))return e;try{return e.toString()}catch(e){}}(t[1]);if(!r||!i)return e.apply(this,t);this[e5]={method:r,url:i,request_headers:{}},"POST"===r&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let e=this[e5];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}ek("xhr",{args:[r,i],endTimestamp:Date.now(),startTimestamp:n,xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?(0,V.hl)(this,"onreadystatechange",function(e){return function(...t){return s(),e.apply(this,t)}}):this.addEventListener("readystatechange",s),(0,V.hl)(this,"setRequestHeader",function(e){return function(...t){let[n,r]=t,i=this[e5];return i&&(0,eu.HD)(n)&&(0,eu.HD)(r)&&(i.request_headers[n.toLowerCase()]=r),e.apply(this,t)}}),e.apply(this,t)}}),(0,V.hl)(e,"send",function(e){return function(...t){let n=this[e5];return n&&(void 0!==t[0]&&(n.body=t[0]),ek("xhr",{args:[n.method,n.url],startTimestamp:Date.now(),xhr:this})),e.apply(this,t)}})}let te=(0,eg.R)();function tt(){if(!("fetch"in te))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function tn(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function tr(e){let t="fetch";eT(t,e),eI(t,ti)}function ti(){(function(){if("string"==typeof EdgeRuntime)return!0;if(!tt())return!1;if(tn(te.fetch))return!0;let e=!1,t=te.document;if(t&&"function"==typeof t.createElement)try{let n=t.createElement("iframe");
14n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=tn(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){eb.X&&z.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e})()&&(0,V.hl)(eg.GLOBAL_OBJ,"fetch",function(e){return function(...t){let{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){let[t,n]=e;return{url:to(t),method:ts(n,"method")?String(n.method).toUpperCase():"GET"}}let t=e[0];return{url:to(t),method:ts(t,"method")?String(t.method).toUpperCase():"GET"}}(t),i={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return ek("fetch",{...i}),e.apply(eg.GLOBAL_OBJ,t).then(e=>(ek("fetch",{...i,endTimestamp:Date.now(),response:e}),e),e=>{throw ek("fetch",{...i,endTimestamp:Date.now(),error:e}),e})}})}function ts(e,t){return!!e&&"object"==typeof e&&!!e[t]}function to(e){return"string"==typeof e?e:e?ts(e,"url")?e.url:e.toString?e.toString():"":""}let ta=(0,eg.R)(),tl=eg.GLOBAL_OBJ;function tu(e){let t="history";eT(t,e),eI(t,tc)}function tc(){if(!function(){let e=ta.chrome,t=e&&e.app&&e.app.runtime,n="history"in ta&&!!ta.history.pushState&&!!ta.history.replaceState;return!t&&n}())return;let e=tl.onpopstate;function t(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let e=a,t=String(n);a=t,ek("history",{from:e,to:t})}return e.apply(this,t)}}tl.onpopstate=function(...t){let n=tl.location.href,r=a;if(a=n,ek("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},(0,V.hl)(tl.history,"pushState",t),(0,V.hl)(tl.history,"replaceState",t)}let th=["fatal","error","warning","log","info","debug"];function td(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}let tf="Breadcrumbs",tp=(e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:tf,setupOnce(){},setup(e){var n;t.console&&function(e){let t="console";eT(t,e),eI(t,e1)}(function(t){var n;if((0,B.s3)()!==e)return;let r={category:"console",data:{arguments:t.args,logger:"console"},level:"warn"===(n=t.level)?"warning":th.includes(n)?n:"log",message:(0,en.nK)(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;r.message=`Assertion failed: ${(0,en.nK)(t.args.slice(1)," ")||"console.assert"}`,r.data.arguments=t.args.slice(1)}(0,B.n_)(r,{input:t.args,level:t.level})}),t.dom&&e4((n=t.dom,function(t){let r,i;if((0,B.s3)()!==e)return;let s="object"==typeof n?n.serializeAttribute:void 0,o="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;o&&o>1024&&(o=1024),"string"==typeof s&&(s=[s]);try{let e=t.event,n=e&&e.target?e.target:e;r=(0,eD.Rt)(n,{keyAttrs:s,maxStringLength:o}),i=(0,eD.iY)(n)}catch(e){r="<unknown>"}if(0===r.length)return;let a={category:`ui.${t.name}`,message:r};i&&(a.data={"ui.component_name":i}),(0,B.n_)(a,{event:t.event,name:t.name,global:t.global})})),t.xhr&&e7(function(t){if((0,B.s3)()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[e5];if(!n||!r||!i)return;let{method:s,url:o,status_code:a,body:l}=i,u={xhr:t.xhr,input:l,startTimestamp:n,endTimestamp:r};(0,B.n_)({category:"xhr",data:{method:s,url:o,status_code:a},type:"http"},u)}),t.fetch&&tr(function(t){if((0,B.s3)()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(!(!r||t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method)){if(t.error){let e=t.fetchData,i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r};(0,B.n_)({category:"fetch",data:e,level:"error",type:"http"},i)}else{let e=t.response,i={...t.fetchData,status_code:e&&e.status},s={input:t.args,response:e,startTimestamp:n,endTimestamp:r};(0,B.n_)({category:"fetch",data:i,type:"http"},s)}}}),t.history&&tu(function(t){if((0,B.s3)()!==e)return;let n=t.from,r=t.to,i=td(ey.location.href),s=n?td(n):void 0,o=td(r);s&&s.path||(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),(0,B.n_)({category:"navigation",data:{from:n,to:r}})}),t.sentry&&e.on&&e.on("beforeSendEvent",function(t){(0,B.s3)()===e&&(0,B.n_)({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:(0,q.jH)(t)},{event:t})})}}},tm=Z(tf,tp),tg="LinkedErrors",ty=(e={})=>{let t=e.limit||5,n=e.key||"cause";return{name:tg,setupOnce(){},preprocessEvent(e,r,i){let s=i.getOptions();ec(eP,s.stackParser,s.maxValueLength,n,t,e,r)}}},tv=Z(tg,ty),t_="HttpContext",tb=()=>({name:t_,setupOnce(){},preprocessEvent(e){if(!ey.navigator&&!ey.location&&!ey.document)return;let t=e.request&&e.request.url||ey.location&&ey.location.href,{referrer:n}=ey.document||{},{userAgent:r}=ey.navigator||{},i={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...e.request,...t&&{url:t},headers:i};e.request=s}}),tw=Z(t_,tb),tE="Dedupe",tS=()=>{let e;return{name:tE,setupOnce(){},processEvent(t){if(t.type)return t;try{var n;if((n=e)&&(function(e,t){let n=e.message,r=t.message;return!!((n||r)&&(!n||r)&&(n||!r)&&n===r&&tk(e,t)&&tI(e,t))}(t,n)||function(e,t){let n=tC(t),r=tC(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&tk(e,t)&&tI(e,t))}(t,n)))return null}catch(e){}return e=t}}},tT=Z(tE,tS);function tI(e,t){let n=tx(e),r=tx(t);if(!n&&!r)return!0;
14if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function tk(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function tC(e){return e.exception&&e.exception.values&&e.exception.values[0]}function tx(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){}}let tR={};ey.Sentry&&ey.Sentry.Integrations&&(tR=ey.Sentry.Integrations);let tA={...tR,...P,...j},tO=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function tN(e,t=!1){let{host:n,path:r,pass:i,port:s,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${o}`}function tD(e){let t=tO.exec(e);if(!t){(0,z.Cf)(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i="",s,o="",a]=t.slice(1),l="",u=a,c=u.split("/");if(c.length>1&&(l=c.slice(0,-1).join("/"),u=c.pop()),u){let e=u.match(/^\d+/);e&&(u=e[0])}return tM({host:s,pass:i,path:l,projectId:u,port:o,protocol:n,publicKey:r})}function tM(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function tL(e,t=[]){return[e,t]}function tP(e,t){for(let n of e[1]){let e=n[0].type;if(t(n,e))return!0}return!1}function tj(e,t){return(t||new TextEncoder).encode(e)}let tU={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 tF(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function tB(e,t,n,r){let i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:tN(r)},...i&&{trace:(0,V.Jr)({...i})}}}class t$ 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}}var tV=n(70268),tq=n(62146),tz=n(87661);let tH="Not capturing exception because it's already been captured.";class tW{constructor(e){if(this._options=e,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=function(e){let t="string"==typeof e?tD(e):tM(e);if(t&&function(e){if(!eb.X)return!0;let{port:t,projectId:n,protocol:r}=e;return!["protocol","publicKey","host","projectId"].find(t=>!e[t]&&(z.kg.error(`Invalid Sentry Dsn: ${t} missing`),!0))&&(n.match(/^\d+$/)?"http"===r||"https"===r?!(t&&isNaN(parseInt(t,10)))||(z.kg.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):(z.kg.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(z.kg.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1))}(t))return t}(e.dsn):H.X&&z.kg.warn("No DSN provided, client will not send events."),this._dsn){let t=function(e,t={}){let n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}(e)}${e.projectId}/envelope/?${(0,V._j)({sentry_key:e.publicKey,sentry_version:"7",...r&&{sentry_client:`${r.name}/${r.version}`}})}`}(this._dsn,e);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if((0,q.YO)(e)){H.X&&z.kg.log(tH);return}let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id,s=(0,eu.Le)(e)?e:String(e),o=(0,eu.pt)(e)?this.eventFromMessage(s,t,n):this.eventFromException(e,n);return this._process(o.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&(0,q.YO)(t.originalException)){H.X&&z.kg.log(tH);return}let r=t&&t.event_id,i=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,t,i||n).then(e=>{r=e})),r}captureSession(e){"string"!=typeof e.release?H.X&&z.kg.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),(0,tV.CT)(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let t=this._transport;return t?(this.metricsAggregator&&this.metricsAggregator.flush(),this._isCl
14ientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e))):(0,eL.WD)(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),e))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}setupIntegrations(e){(e&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(e){return this.getIntegrationByName(e)}getIntegrationByName(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return H.X&&z.kg.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}addIntegration(e){let t=this._integrations[e.name];J(this,e,this._integrations),t||X(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=function(e,t,n,r){var i;let s=tF(n),o=e.type&&"replay_event"!==e.type?e.type:"event";(i=n&&n.sdk)&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||i.name,e.sdk.version=e.sdk.version||i.version,e.sdk.integrations=[...e.sdk.integrations||[],...i.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...i.packages||[]]);let a=tB(e,s,r,t);return delete e.sdkProcessingMetadata,tL(a,[[{type:o},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])n=function(e,t){let[n,r]=e;return[n,[...r,t]]}(n,function(e,t){let n="string"==typeof e.data?tj(e.data,t):e.data;return[(0,V.Jr)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));let r=this._sendEnvelope(n);r&&r.then(t=>this.emit("afterSendEvent",e,t),null)}sendSession(e){let t=function(e,t,n,r){let i=tF(n);return tL({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:tN(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){let r="number"==typeof n?n:1,i=`${e}:${t}`;H.X&&z.kg.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}captureAggregateMetrics(e){H.X&&z.kg.log(`Flushing aggregated metrics, number of metrics: ${e.length}`);let t=function(e,t,n,r){let i={sent_at:new Date().toISOString()};return n&&n.sdk&&(i.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(i.dsn=tN(t)),tL(i,[function(e){let t=function(e){let t="";for(let n of e){let e=Object.entries(n.tags),r=e.length>0?`|#${e.map(([e,t])=>`${e}:${t}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}
15`}return t}(e);return[{type:"statsd",length:t.length},t]}(e)])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}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))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=function(e,t){let n={};return t.forEach(t=>{t&&J(e,t,n)}),n}(this,e),X(this,e),this._integrationsInitialized=!0}_updateSessionFromEvent(e,t){let n=!1,r=!1,i=t.exception&&t.exception.values;if(i)for(let e of(r=!0,i)){let t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}let s="ok"===e.status;(s&&0===e.errors||s&&n)&&((0,tV.CT)(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new eL.cW(t=>{let n=0,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=(0,G.aF)()){let i=this.getOptions(),s=Object.keys(this._integrations);return!t.integrations&&s.length>0&&(t.integrations=s),this.emit("preprocessEvent",e,t),(0,tz.R)(i,e,t,n,this,r).then(e=>{if(null===e)return e;let t={...r.getPropagationContext(),...n?n.getPropagationContext():void 0};if(!(e.contexts&&e.contexts.trace)&&t){let{traceId:r,spanId:i,parentSpanId:s,dsc:o}=t;e.contexts={trace:{trace_id:r,span_id:i,parent_span_id:s},...e.contexts};let a=o||(0,tq._)(r,this,n);e.sdkProcessingMetadata={dynamicSamplingContext:a,...e.sdkProcessingMetadata}}return e})}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{H.X&&("log"===e.logLevel?z.kg.log(e.message):z.kg.warn(e))})}_processEvent(e,t,n){let r=this.getOptions(),{sampleRate:i}=r,s=tK(e),o=tG(e),a=e.type||"error",l=`before send for type \`${a}\``;if(o&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",e),(0,eL.$2)(new t$(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));let u="replay_event"===a?"replay":a,c=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,c).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",u,e),new t$("An event processor returned `null`, will not send event.","log");return t.data&&!0===t.data.__sentry__?n:function(e,t){let n=`${t} must return \`null\` or a valid event.`;if((0,eu.J8)(e))return e.then(e=>{if(!(0,eu.PO)(e)&&null!==e)throw new t$(n);return e},e=>{throw new t$(`${t} rejected with ${e}`)});if(!(0,eu.PO)(e)&&null!==e)throw new t$(n);return e}(function(e,t,n){let{beforeSend:r,beforeSendTransaction:i}=e;if(tG(t)&&r)return r(t,n);if(tK(t)&&i){if(t.spans){let e=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(t,n)}return t}(r,n,t),l)}).then(r=>{if(null===r){if(this.recordDroppedEvent("before_send",u,e),s){let t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new t$(`${l} returned \`null\`, will not send event.`,"log")}let i=n&&n.getSession();if(!s&&i&&this._updateSessionFromEvent(i,r),s){let e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}let o=r.transaction_info;return s&&o&&r.transaction!==e.transaction&&(r.transaction_info={...o,source:"custom"}),this.sendEvent(r,t),r}).then(null,e=>{if(e instanceof t$)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new t$(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
16Reason: ${e}`)})}_process(e){this._numProcessing++,e.then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e))}
16_sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)return this._transport.send(e).then(null,e=>{H.X&&z.kg.error("Error while sending event:",e)});H.X&&z.kg.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{let[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function tG(e){return void 0===e.type}function tK(e){return"transaction"===e.type}var tX=n(17929),tJ=n(61280);class tZ extends tW{constructor(e){F(e,"browser",["browser"],ey.SENTRY_SDK_SOURCE||(0,tX.S)()),super(e),e.sendClientReports&&ey.document&&ey.document.addEventListener("visibilitychange",()=>{"hidden"===ey.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){let i=eB(e,t,n&&n.syntheticException||void 0,r);return(0,q.EG)(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),(0,eL.WD)(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){let s=e$(e,t,r&&r.syntheticException||void 0,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),(0,eL.WD)(s)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}captureUserFeedback(e){if(!this._isEnabled())return;let t=function(e,{metadata:t,tunnel:n,dsn:r}){return tL({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:tN(r)}},[[{type:"user_report"},e]])}(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(){var e;let t=this._clearOutcomes();if(0===t.length||!this._dsn)return;let n=tL((e=this._options.tunnel&&tN(this._dsn))?{dsn:e}:{},[[{type:"client_report"},{timestamp:(0,tJ.yW)(),discarded_events:t}]]);this._sendEnvelope(n)}}function tY(e,t,n,r){let i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}let tQ=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,t0=/\((\S*)(?::(\d+))(?::(\d+))\)/,t1=[30,e=>{let t=tQ.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){let e=t0.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}let[e,n]=t5(t[1]||"?",t[2]);return tY(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],t2=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,t4=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,t9=[50,e=>{let t=t2.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let e=t4.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]||"?";return[n,e]=t5(n,e),tY(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],t6=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,t3=(0,ew.pE)(t1,t9,[40,e=>{let t=t6.exec(e);return t?tY(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0}]),t5=(e,t)=>{let n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function t7(e,t,n=Date.now()){return(e[t]||e.all||0)>n}function t8(e,{statusCode:t,headers:n},r=Date.now()){let i={...e},s=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(s)for(let e of s.trim().split(",")){let[t,n,,,s]=e.split(":",5),o=parseInt(t,10),a=(isNaN(o)?60:o)*1e3;if(n)for(let e of n.split(";"))"metric_bucket"===e?(!s||s.split(";").includes("custom"))&&(i[e]=r+a):i[e]=r+a;else i.all=r+a}else o?i.all=r+function(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}(o,r):429===t&&(i.all=r+6e4);return i}function ne(e,t,n=function(e){let t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.length<e))return(0,eL.$2)(new t$("Not adding Promise because buffer limit was reached."));let i=r();return -1===t.indexOf(i)&&t.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new eL.cW((n,r)=>{let i=t.length;if(!i)return n(!0);let s=setTimeout(()=>{e&&e>0&&n(!1)},e);
16t.forEach(e=>{(0,eL.WD)(e).then(()=>{--i||(clearTimeout(s),n(!0))},r)})})}}}(e.bufferSize||30)){let r={};function i(i){let s=[];if(tP(i,(t,n)=>{let i=tU[n];if(t7(r,i)){let r=nt(t,n);e.recordDroppedEvent("ratelimit_backoff",i,r)}else s.push(t)}),0===s.length)return(0,eL.WD)();let o=tL(i[0],s),a=t=>{tP(o,(n,r)=>{let i=nt(n,r);e.recordDroppedEvent(t,tU[r],i)})};return n.add(()=>t({body:function(e,t){let[n,r]=e,i=JSON.stringify(n);function s(e){"string"==typeof i?i="string"==typeof e?i+e:[tj(i,t),e]:i.push("string"==typeof e?tj(e,t):e)}for(let e of r){let[t,n]=e;if(s(`
17${JSON.stringify(t)}
18`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify((0,eM.Fv)(n))}s(e)}}return"string"==typeof i?i:function(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}(i)}(o,e.textEncoder)}).then(e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&H.X&&z.kg.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=t8(r,e),e),e=>{throw a("network_error"),e})).then(e=>e,e=>{if(e instanceof t$)return H.X&&z.kg.error("Skipped sending event because buffer is full."),a("queue_overflow"),(0,eL.WD)();throw e})}return i.__sentry__baseTransport__=!0,{send:i,flush:e=>n.drain(e)}}function nt(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}function nn(e,t=function(){if(S)return S;if(tn(ey.fetch))return S=ey.fetch.bind(ey);let e=ey.document,t=ey.fetch;if(e&&"function"==typeof e.createElement)try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){}return S=t.bind(ey)}()){let n=0,r=0;return ne(e,function(i){let s=i.body.length;n+=s,r++;let o={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,o).then(e=>(n-=s,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 S=void 0,n-=s,r--,(0,eL.$2)(e)}})}function nr(e){return ne(e,function(t){return new eL.cW((n,r)=>{let i=new XMLHttpRequest;for(let t in i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url),e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)})})}let ni=[eo(),ee(),eX(),tp(),eq(),ty(),tS(),tb()];var ns=n(34155),no=n(98077);function na(e){let t=l?l.get(e):void 0;if(!t)return;let n={};for(let[,[e,r]]of t)n[e]||(n[e]=[]),n[e].push((0,V.Jr)(r));return n}let nl="sentry.source",nu="sentry.sample_rate",nc="sentry.op",nh="sentry.origin";var nd=n(39877);function nf(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);let n=function(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(t);"unknown_error"!==n&&e.setStatus(n)}(k=D||(D={})).Ok="ok",k.DeadlineExceeded="deadline_exceeded",k.Unauthenticated="unauthenticated",k.PermissionDenied="permission_denied",k.NotFound="not_found",k.ResourceExhausted="resource_exhausted",k.InvalidArgument="invalid_argument",k.Unimplemented="unimplemented",k.Unavailable="unavailable",k.InternalError="internal_error",k.UnknownError="unknown_error",k.Cancelled="cancelled",k.AlreadyExists="already_exists",k.FailedPrecondition="failed_precondition",k.Aborted="aborted",k.OutOfRange="out_of_range",k.DataLoss="data_loss";class np{constructor(e=1e3){this._maxlen=e,this.spans=[]}add(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class nm{constructor(e={}){this._traceId=e.traceId||(0,q.DM)(),this._spanId=e.spanId||(0,q.DM)().substring(16),this._startTime=e.startTimestamp||(0,tJ.ph)(),this.tags=e.tags?{...e.tags}:{},this.data=e.data?{...e.data}:{},this.instrumenter=e.instrumenter||"sentry",this._attributes={},this.setAttributes({[nh]:e.origin||"manual",[nc]:e.op,...e.attributes}),this._name=e.name||e.description,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.status&&(this._status=e.status),e.endTimestamp&&(this._endTime=e.endTimestamp),void 0!==e.exclusiveTime&&(this._exclusiveTime=e.exclusiveTime),this._measurements=e.measurements?{...e.measurements}:{}}get name(){return this._name||""}set name(e){this.updateName(e)}get description(){return this._name}set description(e){this._name=e}get traceId(){return this._traceId}set traceId(e){this._traceId=e}get spanId(){return this._spanId}set spanId(e){this._spanId=e}set parentSpanId(e){this._parentSpanId=e}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(e){this._sampled=e}get attributes(){return this._attributes}set attributes(e){this._attributes=e}get startTimestamp(){return this._startTime}set startTimestamp(e){this._startTime=e}get endTimestamp(){return this._endTime}set endTimestamp(e){this._endTime=e}get status(){return this._status}set status(e){this._status=e}get op(){return this._attributes[nc]}set op(e){this.setAttribute(nc,e)}get origin(){return this._attributes[nh]}set origin(e){this.setAttribute(nh,e)}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?no.i0:no.ve}}startChild(e){let t=new nm({...e,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t);let n=(0,nd.G)(this);if(t.transaction=n,H.X&&n){let r=e&&e.op||"< unknown op >",i=(0,no.XU)(t).description||"< unknown name >",s=n.spanContext().spanId,o=`[Tracing] Starting '${r}' span on transaction '${i}' (${s}).`;z.kg.log(o),this._logMessage=o}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}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]))}setStatus(e){return this._status=e,this}setHttpStatus(e){return nf(this,e),this}setName(e){this.updateName(e)}updateName(e){return this._name=e,this}isSuccess(){return"ok"===this._status}finish(e){return this.end(e)}end(e){if(this._endTime)return;let t=(0,nd.G)(this);if(H.X&&t&&t.spanContext().spanId!==this._spanId){let e=this._logMessage;e&&z.kg.log(e.replace("Starting","Finishing"))}this._endTime=(0,no.$k)(e)}toTraceparent(){return(0,no.Hb)(this)}toContext(){return(0,V.Jr)({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(e){return this.data=e.data||{},this._name=e.name||e.description,this._endTime=e.endTimestamp,this.op=e.op,this._parentSpanId=e.parentSpanId,this._sampled=e.sampled,this._spanId=e.spanId||this._spanId,this._startTime=e.startTimestamp||this._startTime,this._status=e.status,this.tags=e.tags||{},this._traceId=e.traceId||this._traceId,this}getTraceContext(){return(0,no.wy)(this)}getSpanJSON(){return(0,V.Jr)({data:this._getData(),description:this._name,op:this._attributes[nc],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[nh],_metrics_summary:na(this),profile_id:this._attributes.profile_id,exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}
18toJSON(){return this.getSpanJSON()}_getData(){let{data:e,_attributes:t}=this,n=Object.keys(e).length>0,r=Object.keys(t).length>0;return n||r?n&&r?{...e,...t}:n?e:t:void 0}}function ng(e){if(!$())return;let t=function(e){if(e.startTime){let t={...e};return t.startTimestamp=(0,no.$k)(e.startTime),delete t.startTime,t}return e}(e),n=(0,G.Gd)(),r=e.scope?e.scope.getSpan():ny();if(e.onlyIfParent&&!r)return;let i=(e.scope||(0,B.nZ)()).clone();return function(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:i}){var s;let o;if(!$())return;let a=(0,G.aF)();if(t&&!r)o=t.startChild(n);else if(t){let r=(0,tq.j)(t),{traceId:i,spanId:s}=t.spanContext(),a=(0,no.Tt)(t);o=e.startTransaction({traceId:i,parentSpanId:s,parentSampled:a,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}else{let{traceId:t,dsc:r,parentSpanId:s,sampled:l}={...a.getPropagationContext(),...i.getPropagationContext()};o=e.startTransaction({traceId:t,parentSpanId:s,parentSampled:l,...n,metadata:{dynamicSamplingContext:r,...n.metadata}})}return i.setSpan(o),(s=o)&&((0,V.xp)(s,n_,a),(0,V.xp)(s,nv,i)),o}(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:i})}function ny(){return(0,B.nZ)().getSpan()}let nv="_sentryScope",n_="_sentryIsolationScope";class nb extends nm{constructor(e,t){super(e),this._contexts={},this._hub=t||(0,G.Gd)(),this._name=e.name||"",this._metadata={...e.metadata},this._trimEnd=e.trimEnd,this.transaction=this;let n=this._metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[nl]&&{source:this._attributes[nl]},...this._attributes[nu]&&{sampleRate:this._attributes[nu]}}}set metadata(e){this._metadata=e}setName(e,t="custom"){this._name=e,this.setAttribute(nl,t)}updateName(e){return this._name=e,this}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new np(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this._metadata={...this._metadata,...e}}end(e){let t=(0,no.$k)(e),n=this._finishTransaction(t);if(n)return this._hub.captureEvent(n)}toContext(){let e=super.toContext();return(0,V.Jr)({...e,name:this._name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this._name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){return(0,tq.j)(this)}setHub(e){this._hub=e}getProfileId(){if(void 0!==this._contexts&&void 0!==this._contexts.profile)return this._contexts.profile.profile_id}_finishTransaction(e){if(void 0!==this._endTime)return;this._name||(H.X&&z.kg.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(e);let t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this._sampled){H.X&&z.kg.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","transaction");return}let n=this.spanRecorder?this.spanRecorder.spans.filter(e=>e!==this&&(0,no.XU)(e).timestamp):[];if(this._trimEnd&&n.length>0){let e=n.map(e=>(0,no.XU)(e).timestamp).filter(Boolean);this._endTime=e.reduce((e,t)=>e>t?e:t)}let{scope:r,isolationScope:i}={scope:this[nv],isolationScope:this[n_]},{metadata:s}=this,{source:o}=s,a={contexts:{...this._contexts,trace:(0,no.wy)(this)},spans:n,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...s,capturedSpanScope:r,capturedSpanIsolationScope:i,...(0,V.Jr)({dynamicSamplingContext:(0,tq.j)(this)})},_metrics_summary:na(this),...o&&{transaction_info:{source:o}}};return Object.keys(this._measurements).length>0&&(H.X&&z.kg.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),a.measurements=this._measurements),H.X&&z.kg.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),a}}let nw={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3};class nE extends np{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){if(e.spanContext().spanId!==this.transactionSpanId){let t=e.end;e.end=(...n)=>(this._popActivity(e.spanContext().spanId),t.apply(e,n)),void 0===(0,no.XU)(e).timestamp&&this._pushActivity(e.spanContext().spanId)}super.add(e)}}class nS extends nb{constructor(e,t,n=nw.idleTimeout,r=nw.finalTimeout,i=nw.heartbeatInterval,s=!1,o=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason="externalFinish",this._autoFinishAllowed=!o,s&&(H.X&&z.kg.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),t.getScope().setSpan(this)),o||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason="finalTimeout",this.end())},this._finalTimeout)}end(e){let t=(0,no.$k)(e);if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setAttribute("finishReason",this._finishReason),this.spanRecorder){for(let e of(H.X&&z.kg.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op),this._beforeFinishCallbacks))e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanContext().spanId===this.spanContext().spanId)return!0;!(0,no.XU)(e).timestamp&&(e.setStatus("cancelled"),e.end(t),H.X&&z.kg.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));let{start_timestamp:n,timestamp:r}=(0,no.XU)(e),i=n&&n<t,s=(this._finalTimeout+this._idleTimeout)/1e3,o=r&&n&&r-n<s;if(H.X){let t=JSON.stringify(e,void 0,2);i?o||z.kg.log("[Tracing] discarding Span since it finished after Transaction final timeout",t):z.kg.log("[Tracing] discarding Span since it happened after Transaction was finished",t)}return i&&o}),H.X&&z.kg.log("[Tracing] flushing IdleTransaction")}else H.X&&z.kg.log("[Tracing] No active IdleTransaction");if(this._onScope){let e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.end(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){this.spanRecorder||(this.spanRecorder=new nE(e=>{this._finished||this._pushActivity(e)},e=>{this._finished||this._popActivity(e)},this.spanContext().spanId,e),H.X&&z.kg.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason="cancelled",this.end(e)))}setFinishReason(e){this._finishReason=e}sendAutoFinishSignal(){this._autoFinishAllowed||(H.X&&z.kg.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason="idleTimeout",this.end(e))},this._idleTimeout)}
18_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),H.X&&z.kg.log(`[Tracing] pushActivity: ${e}`),this.activities[e]=!0,H.X&&z.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(H.X&&z.kg.log(`[Tracing] popActivity ${e}`),delete this.activities[e],H.X&&z.kg.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){let e=(0,tJ.ph)();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason="cancelled",this.end(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?this._autoFinishAllowed&&(H.X&&z.kg.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason="heartbeatFailed",this.end()):this._pingHeartbeat()}_pingHeartbeat(){H.X&&z.kg.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function nT(e){return(e||(0,G.Gd)()).getScope().getTransaction()}let nI=!1;function nk(){let e=nT();if(e){let t="internal_error";H.X&&z.kg.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}function nC(e,t,n){let r;return $(t)?void 0!==e.sampled?e.setAttribute(nu,Number(e.sampled)):("function"==typeof t.tracesSampler?(r=t.tracesSampler(n),e.setAttribute(nu,Number(r))):void 0!==n.parentSampled?r=n.parentSampled:void 0!==t.tracesSampleRate?(r=t.tracesSampleRate,e.setAttribute(nu,Number(r))):(r=1,e.setAttribute(nu,r)),nx(r))?r?(e.sampled=Math.random()<r,e.sampled)?H.X&&z.kg.log(`[Tracing] starting ${e.op} transaction - ${(0,no.XU)(e).description}`):H.X&&z.kg.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`):(H.X&&z.kg.log(`[Tracing] Discarding transaction because ${"function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1):(H.X&&z.kg.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1):e.sampled=!1,e}function nx(e){return(0,eu.i2)(e)||!("number"==typeof e||"boolean"==typeof e)?(H.X&&z.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):!(e<0)&&!(e>1)||(H.X&&z.kg.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1)}function nR(){let e=this.getScope().getSpan();return e?{"sentry-trace":(0,no.Hb)(e)}:{}}function nA(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",s=e.instrumenter||"sentry";i!==s&&(H.X&&z.kg.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${i}\` instrumenter.
19The transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),e.sampled=!1);let o=new nb(e,this);return(o=nC(o,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t})).isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function nO(e,t,n,r,i,s,o,a=!1){let l=e.getClient(),u=l&&l.getOptions()||{},c=new nS(t,e,n,r,o,i,a);return(c=nC(c,u,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...s})).isRecording()&&c.initSpanRecorder(u._experiments&&u._experiments.maxSpans),l&&l.emit&&l.emit("startTransaction",c),c}function nN(){let e=(0,G.cu)();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=nA),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=nR),nI||(nI=!0,ex(nk),eO(nk)))}nk.tag="sentry_tracingErrorCallback";var nD=n(56819);let nM=eg.GLOBAL_OBJ;function nL(){nM.document&&nM.document.addEventListener("visibilitychange",()=>{let e=nT();if(nM.document.hidden&&e){let{op:t,status:n}=(0,no.XU)(e);n||e.setStatus("cancelled"),e.setTag("visibilitychange","document.hidden"),e.end()}})}
19let nP=(e,t,n)=>{let r,i;return s=>{t.value>=0&&(s||n)&&((i=t.value-(r||0))||void 0===r)&&(r=t.value,t.delta=i,e(t))}},nj=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,nU=()=>{let e=nM.performance.timing,t=nM.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(let t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n},nF=()=>nM.__WEB_VITALS_POLYFILL__?nM.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||nU()):nM.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],nB=()=>{let e=nF();return e&&e.activationStart||0},n$=(e,t)=>{let n=nF(),r="navigate";return n&&(r=nM.document&&nM.document.prerendering||nB()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:nj(),navigationType:r}},nV=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{t(e.getEntries())});return r.observe({type:e,buffered:!0,...n}),r}}catch(e){}},nq=(e,t)=>{let n=r=>{("pagehide"===r.type||"hidden"===nM.document.visibilityState)&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};nM.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},nz=(e,t={})=>{let n;let r=n$("CLS",0),i=0,s=[],o=e=>{e.forEach(e=>{if(!e.hadRecentInput){let t=s[0],o=s[s.length-1];i&&0!==s.length&&e.startTime-o.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,s.push(e)):(i=e.value,s=[e]),i>r.value&&(r.value=i,r.entries=s,n&&n())}})},a=nV("layout-shift",o);if(a){n=nP(e,r,t.reportAllChanges);let i=()=>{o(a.takeRecords()),n(!0)};return nq(i),i}},nH=-1,nW=()=>{nM.document&&nM.document.visibilityState&&(nH="hidden"!==nM.document.visibilityState||nM.document.prerendering?1/0:0)},nG=()=>{nq(({timeStamp:e})=>{nH=e},!0)},nK=()=>(nH<0&&(nW(),nG()),{get firstHiddenTime(){return nH}}),nX=e=>{let t;let n=nK(),r=n$("FID"),i=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),t(!0))},s=e=>{e.forEach(i)},o=nV("first-input",s);t=nP(e,r),o&&nq(()=>{s(o.takeRecords()),o.disconnect()},!0)},nJ=0,nZ=1/0,nY=0,nQ=e=>{e.forEach(e=>{e.interactionId&&(nZ=Math.min(nZ,e.interactionId),nJ=(nY=Math.max(nY,e.interactionId))?(nY-nZ)/7+1:0)})},n0=()=>u?nJ:performance.interactionCount||0,n1=()=>{"interactionCount"in performance||u||(u=nV("event",nQ,{type:"event",buffered:!0,durationThreshold:0}))},n2=()=>n0(),n4=[],n9={},n6=e=>{let t=n4[n4.length-1],n=n9[e.interactionId];if(n||n4.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{let t={id:e.interactionId,latency:e.duration,entries:[e]};n9[t.id]=t,n4.push(t)}n4.sort((e,t)=>t.latency-e.latency),n4.splice(10).forEach(e=>{delete n9[e.id]})}},n3=()=>{let e=Math.min(n4.length-1,Math.floor(n2()/50));return n4[e]},n5=(e,t)=>{let n;t=t||{},n1();let r=n$("INP"),i=e=>{e.forEach(e=>{e.interactionId&&n6(e),"first-input"!==e.entryType||n4.some(t=>t.entries.some(t=>e.duration===t.duration&&e.startTime===t.startTime))||n6(e)});let t=n3();t&&t.latency!==r.value&&(r.value=t.latency,r.entries=t.entries,n())},s=nV("event",i,{durationThreshold:t.durationThreshold||40});n=nP(e,r,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),nq(()=>{i(s.takeRecords()),r.value<0&&n2()>0&&(r.value=0,r.entries=[]),n(!0)}))},n7={},n8=e=>{let t;let n=nK(),r=n$("LCP"),i=e=>{let i=e[e.length-1];if(i){let e=Math.max(i.startTime-nB(),0);e<n.firstHiddenTime&&(r.value=e,r.entries=[i],t())}},s=nV("largest-contentful-paint",i);if(s){t=nP(e,r);let n=()=>{n7[r.id]||(i(s.takeRecords()),s.disconnect(),n7[r.id]=!0,t(!0))};return["keydown","click"].forEach(e=>{nM.document&&addEventListener(e,n,{once:!0,capture:!0})}),nq(n,!0),n}},re=e=>{nM.document&&(nM.document.prerendering?addEventListener("prerenderingchange",()=>re(e),!0):"complete"!==nM.document.readyState?addEventListener("load",()=>re(e),!0):setTimeout(e,0))},rt=(e,t)=>{t=t||{};let n=n$("TTFB"),r=nP(e,n,t.reportAllChanges);re(()=>{let e=nF();if(e){if(n.value=Math.max(e.responseStart-nB(),0),n.value<0||n.value>performance.now())return;n.entries=[e],r(!0)}})},rn={},rr={};function ri(e,t=!1){return rd("lcp",e,ru,d,t)}function rs(e,t){return rf(e,t),rr[e]||(function(e){let t={};"event"===e&&(t.durationThreshold=0),nV(e,t=>{ro(e,{entries:t})},t)}(e),rr[e]=!0),rp(e,t)}function ro(e,t){let n=rn[e];if(n&&n.length)for(let e of n)try{e(t)}catch(e){}}function ra(){return nz(e=>{ro("cls",{metric:e}),c=e},{reportAllChanges:!0})}function rl(){return nX(e=>{ro("fid",{metric:e}),h=e})}function ru(){return n8(e=>{ro("lcp",{metric:e}),d=e})}function rc(){return rt(e=>{ro("ttfb",{metric:e}),f=e})}function rh(){return n5(e=>{ro("inp",{metric:e}),p=e})}function rd(e,t,n,r,i=!1){let s;return rf(e,t),rr[e]||(s=n(),rr[e]=!0),r&&t({metric:r}),rp(e,t,i?s:void 0)}function rf(e,t){rn[e]=rn[e]||[],rn[e].push(t)}function rp(e,t,n){return()=>{n&&n();let r=rn[e];if(!r)return;let i=r.indexOf(t);-1!==i&&r.splice(i,1)}}function rm(e){return[{type:"span"},e]}function rg(e){return"number"==typeof e&&isFinite(e)}function ry(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function rv(e){return e/1e3}function r_(){return nM&&nM.addEventListener&&nM.performance}let rb=0,rw={};function rE(){let e=r_();if(e&&tJ.Z1){e.mark&&nM.performance.mark("sentry-tracing-init");let t=rd("fid",({metric:e})=>{let t=e.entries[e.entries.length-1];if(!t)return;let n=rv(tJ.Z1),r=rv(t.startTime);rw.fid={value:e.value,unit:"millisecond"},rw["mark.fid"]={value:n+r,unit:"second"}},rl,h),n=function(e,t=!1){return rd("cls",e,ra,c,t)}(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(rw.cls={value:e.value,unit:""},g=t)},!0),r=ri(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(rw.lcp={value:e.value,unit:"millisecond"},m=t)},!0),i=rd("ttfb",({metric:e})=>{e.entries[e.entries.length-1]&&(rw.ttfb={value:e.value,unit:"millisecond"})},rc,f);return()=>{t(),n(),r(),i()}}return()=>void 0}function rS(){rs("longtask",({entries:e})=>{for(let t of e){let e=nT();if(!e)return;let n=rv(tJ.Z1+t.startTime),r=rv(t.duration);e.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r})}})}function rT(){rs("event",({entries:e})=>{for(let t of e){let e=nT();if(!e)return;if("click"===t.name){let n=rv(tJ.Z1+t.startTime),r=rv(t.duration),i={description:(0,eD.Rt)(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:n,endTimestamp:n+r},s=(0,eD.iY)(t.target);s&&(i.attributes={"ui.component_name":s}),e.startChild(i)}}})}function rI(e,t){if(r_()&&tJ.Z1){let n=rd("inp",({metric:n})=>{let r;if(void 0===n.value)return;let i=n.entries.find(e=>e.duration===n.value&&void 0!==rk[e.name]),s=(0,B.s3)();if(!i||!s)return;let o=rk[i.name],a=s.getOptions(),l=rv(tJ.Z1+i.startTime),u=rv(n.value),
19c=void 0!==i.interactionId?e[i.interactionId]:void 0;if(void 0===c)return;let{routeName:h,parentContext:d,activeTransaction:f,user:p,replayId:m}=c,g=void 0!==p?p.email||p.id||p.ip_address:void 0,y=void 0!==f?f.getProfileId():void 0,v=new nm({startTimestamp:l,endTimestamp:l+u,op:`ui.interaction.${o}`,name:(0,eD.Rt)(i.target),attributes:{release:a.release,environment:a.environment,transaction:h,...void 0!==g&&""!==g?{user:g}:{},...void 0!==y?{profile_id:y}:{},...void 0!==m?{replay_id:m}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),_=!!$(a)&&!!nx(r=void 0!==d&&"function"==typeof a.tracesSampler?a.tracesSampler({transactionContext:d,name:d.name,parentSampled:d.parentSampled,attributes:{...d.data,...d.attributes},location:nM.location}):void 0!==d&&void 0!==d.sampled?d.sampled:void 0!==a.tracesSampleRate?a.tracesSampleRate:1)&&(!0===r?t:!1===r?0:r*t);if(_&&Math.random()<_){let e=v?function(e,t){let n={sent_at:new Date().toISOString()};return t&&(n.dsn=tN(t)),tL(n,e.map(rm))}([v],s.getDsn()):void 0,t=s&&s.getTransport();t&&e&&t.send(e).then(null,e=>{});return}},rh,p);return()=>{n()}}return()=>void 0}let rk={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"};function rC(e){let t=r_();if(!t||!nM.performance.getEntries||!tJ.Z1)return;let n=rv(tJ.Z1),r=t.getEntries(),{op:i,start_timestamp:s}=(0,no.XU)(e);if(r.slice(rb).forEach(t=>{let r=rv(t.startTime),i=rv(t.duration);if("navigation"!==e.op||!s||!(n+r<s))switch(t.entryType){case"navigation":["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{rx(e,t,r,n)}),rx(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),rx(e,t,"fetch",n,"cache","domainLookupStart"),rx(e,t,"domainLookup",n,"DNS"),t.responseEnd&&(ry(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+rv(t.requestStart),endTimestamp:n+rv(t.responseEnd)}),ry(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+rv(t.responseStart),endTimestamp:n+rv(t.responseEnd)}));break;case"mark":case"paint":case"measure":{(function(e,t,n,r,i){let s=i+n;ry(e,{description:t.name,endTimestamp:s+r,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:s})})(e,t,r,i,n);let s=nK(),o=t.startTime<s.firstHiddenTime;"first-paint"===t.name&&o&&(rw.fp={value:t.startTime,unit:"millisecond"}),"first-contentful-paint"===t.name&&o&&(rw.fcp={value:t.startTime,unit:"millisecond"});break}case"resource":(function(e,t,n,r,i,s){if("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType)return;let o=td(n),a={};rR(a,t,"transferSize","http.response_transfer_size"),rR(a,t,"encodedBodySize","http.response_content_length"),rR(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(nM.location.origin);let l=s+r;ry(e,{description:n.replace(nM.location.origin,""),endTimestamp:l+i,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:l,data:a})})(e,t,t.name,r,i,n)}}),rb=Math.max(r.length-1,0),function(e){let t=nM.navigator;if(!t)return;let n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),rg(n.rtt)&&(rw["connection.rtt"]={value:n.rtt,unit:"millisecond"})),rg(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),rg(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}(e),"pageload"===i){(function(e){let t=nF();if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}
19)(rw),["fcp","fp","lcp"].forEach(e=>{if(!rw[e]||!s||n>=s)return;let t=Math.abs((n+rv(rw[e].value)-s)*1e3);rw[e].value=t});let t=rw["mark.fid"];t&&rw.fid&&(ry(e,{description:"first input delay",endTimestamp:t.value+rv(rw.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:t.value}),delete rw["mark.fid"]),"fcp"in rw||delete rw.cls,Object.keys(rw).forEach(e=>{!function(e,t,n){let r=nT();r&&r.setMeasurement(e,t,n)}(e,rw[e].value,rw[e].unit)}),m&&(m.element&&e.setTag("lcp.element",(0,eD.Rt)(m.element)),m.id&&e.setTag("lcp.id",m.id),m.url&&e.setTag("lcp.url",m.url.trim().slice(0,200)),e.setTag("lcp.size",m.size)),g&&g.sources&&g.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,(0,eD.Rt)(t.node)))}m=void 0,g=void 0,rw={}}function rx(e,t,n,r,i,s){let o=s?t[s]:t[`${n}End`],a=t[`${n}Start`];a&&o&&ry(e,{op:"browser",origin:"auto.browser.browser.metrics",description:i||n,startTimestamp:r+rv(a),endTimestamp:r+rv(o)})}function rR(e,t,n,r){let i=t[n];null!=i&&i<2147483647&&(e[r]=i)}var rA=n(41654);let rO=["localhost",/^\/(?!\/)/],rN={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:rO,tracePropagationTargets:rO};function rD(e){let{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s,enableHTTPTimings:o}={traceFetch:rN.traceFetch,traceXHR:rN.traceXHR,...e},a="function"==typeof s?s:e=>!0,l=e=>{var t;return t=r||i,(0,en.U0)(e,t||rO)},u={};t&&tr(e=>{let t=function(e,t,n,r,i="auto.http.browser"){if(!$()||!e.fetchData)return;let s=t(e.fetchData.url);if(e.endTimestamp&&s){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(function(e,t){if(t.response){nf(e,t.response.status);let n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){let t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus("internal_error");e.end()}(n,e),delete r[t]);return}let o=(0,B.nZ)(),a=(0,B.s3)(),{method:l,url:u}=e.fetchData,c=function(e){try{return new URL(e).href}catch(e){return}}(u),h=c?td(c).host:void 0,d=s?ng({name:`${l} ${u}`,onlyIfParent:!0,attributes:{url:u,type:"fetch","http.method":l,"http.url":c,"server.address":h,[nh]:i},op:"http.client"}):void 0;if(d&&(e.fetchData.__span=d.spanContext().spanId,r[d.spanContext().spanId]=d),n(e.fetchData.url)&&a){let t=e.args[0];e.args[1]=e.args[1]||{};let n=e.args[1];n.headers=function(e,t,n,r,i){let s=i||n.getSpan(),{traceId:o,spanId:a,sampled:l,dsc:u}={...(0,G.aF)().getPropagationContext(),...n.getPropagationContext()},c=s?(0,no.Hb)(s):(0,nD.$p)(o,a,l),h=(0,rA.IQ)(u||(s?(0,tq.j)(s):(0,tq._)(o,t,n))),d=r.headers||("undefined"!=typeof Request&&(0,eu.V9)(e,Request)?e.headers:void 0);if(!d)return{"sentry-trace":c,baggage:h};if("undefined"!=typeof Headers&&(0,eu.V9)(d,Headers)){let e=new Headers(d);return e.append("sentry-trace",c),h&&e.append(rA.bU,h),e}if(Array.isArray(d)){let e=[...d,["sentry-trace",c]];return h&&e.push([rA.bU,h]),e}{let e="baggage"in d?d.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),h&&t.push(h),{...d,"sentry-trace":c,baggage:t.length>0?t.join(","):void 0}}}(t,a,o,n,d)}return d}(e,a,l,u);if(t){let n=rP(e.fetchData.url),r=n?td(n).host:void 0;t.setAttributes({"http.url":n,"server.address":r})}o&&t&&rM(t)}),n&&e7(e=>{let t=function(e,t,n,r){let i=e.xhr,s=i&&i[e5];if(!$()||!i||i.__sentry_own_request__||!s)return;let o=t(s.url);if(e.endTimestamp&&o){let e=i.__sentry_xhr_span_id__;if(!e)return;let t=r[e];t&&void 0!==s.status_code&&(nf(t,s.status_code),t.end(),delete r[e]);return}let a=(0,B.nZ)(),l=(0,G.aF)(),u=rP(s.url),c=u?td(u).host:void 0,h=o?ng({name:`${s.method} ${s.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":s.method,"http.url":u,url:s.url,"server.address":c,[nh]:"auto.http.browser"},op:"http.client"}):void 0;h&&(i.__sentry_xhr_span_id__=h.spanContext().spanId,r[i.__sentry_xhr_span_id__]=h);let d=(0,B.s3)();if(i.setRequestHeader&&n(s.url)&&d){let{traceId:e,spanId:t,sampled:n,dsc:r}={...l.getPropagationContext(),...a.getPropagationContext()};(function(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(rA.bU,n)}catch(e){}}
19)(i,h?(0,no.Hb)(h):(0,nD.$p)(e,t,n),(0,rA.IQ)(r||(h?(0,tq.j)(h):(0,tq._)(e,d,a))))}return h}(e,a,l,u);o&&t&&rM(t)})}function rM(e){let{url:t}=(0,no.XU)(e).data||{};if(!t||"string"!=typeof t)return;let n=rs("resource",({entries:r})=>{r.forEach(r=>{"resource"===r.entryType&&"initiatorType"in r&&"string"==typeof r.nextHopProtocol&&("fetch"===r.initiatorType||"xmlhttprequest"===r.initiatorType)&&r.name.endsWith(t)&&((function(e){let{name:t,version:n}=function(e){let t="unknown",n="unknown",r="";for(let i of e){if("/"===i){[t,n]=e.split("/");break}if(!isNaN(Number(i))){t="h"===r?"http":r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}(e.nextHopProtocol),r=[];return(r.push(["network.protocol.version",n],["network.protocol.name",t]),tJ.Z1)?[...r,["http.request.redirect_start",rL(e.redirectStart)],["http.request.fetch_start",rL(e.fetchStart)],["http.request.domain_lookup_start",rL(e.domainLookupStart)],["http.request.domain_lookup_end",rL(e.domainLookupEnd)],["http.request.connect_start",rL(e.connectStart)],["http.request.secure_connection_start",rL(e.secureConnectionStart)],["http.request.connection_end",rL(e.connectEnd)],["http.request.request_start",rL(e.requestStart)],["http.request.response_start",rL(e.responseStart)],["http.request.response_end",rL(e.responseEnd)]]:r})(r).forEach(t=>e.setAttribute(...t)),setTimeout(n))})})}function rL(e=0){return((tJ.Z1||performance.timeOrigin)+e)/1e3}function rP(e){try{return new URL(e,nM.location.origin).href}catch(e){return}}let rj={...nw,markBackgroundTransactions:!0,routingInstrumentation:function(e,t=!0,n=!0){let r;if(!nM||!nM.location)return;let i=nM.location.href;t&&(r=e({name:nM.location.pathname,startTimestamp:tJ.Z1?tJ.Z1/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&tu(({to:t,from:n})=>{if(void 0===n&&i&&-1!==i.indexOf(t)){i=void 0;return}n!==t&&(i=void 0,r&&r.end(),r=e({name:nM.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...rN};class rU{constructor(e){this.name="BrowserTracing",this._hasSetTracePropagationTargets=!1,nN(),this.options={...rj,...e},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),e&&!e.tracePropagationTargets&&e.tracingOrigins&&(this.options.tracePropagationTargets=e.tracingOrigins),this._collectWebVitals=rE(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&rI(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&rS(),this.options._experiments.enableInteractions&&rT(),this._latestRoute={name:void 0,context:void 0}}setupOnce(e,t){this._getCurrentHub=t;let n=t().getClient(),r=n&&n.getOptions(),{routingInstrumentation:i,startTransactionOnLocationChange:s,startTransactionOnPageLoad:o,markBackgroundTransactions:a,traceFetch:l,traceXHR:u,shouldCreateSpanForRequest:c,enableHTTPTimings:h,_experiments:d}=this.options,f=r&&r.tracePropagationTargets||this.options.tracePropagationTargets;i(e=>{let n=this._createRouteTransaction(e);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,e,t),n},o,s),a&&nL(),d.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),rD({traceFetch:l,traceXHR:u,tracePropagationTargets:f,shouldCreateSpanForRequest:c,enableHTTPTimings:h})}_createRouteTransaction(e){let t;if(!this._getCurrentHub)return;let n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:i,finalTimeout:s,heartbeatInterval:o}=this.options,a="pageload"===e.op;if(a){let n=a?rF("sentry-trace"):"",r=a?rF("baggage"):void 0,{traceId:i,dsc:s,parentSpanId:o,sampled:l}=(0,nD.pT)(n,r);t={traceId:i,parentSpanId:o,parentSampled:l,...e,metadata:{...e.metadata,dynamicSamplingContext:s},trimEnd:!0}}else t={trimEnd:!0,...e};let l="function"==typeof r?r(t):t,u=void 0===l?{...t,sampled:!1}:l;u.metadata=u.name!==t.name?{...u.metadata,source:"custom"}:u.metadata,this._latestRoute.name=u.name,this._latestRoute.context=u,u.sampled;let{location:c}=nM,h=nO(n,u,i,s,!0,{location:c},o,a);return a&&nM.document&&(nM.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(nM.document.readyState)&&h.sendAutoFinishSignal()}),["interactive","complete"].includes(nM.document.readyState)&&h.sendAutoFinishSignal()),h.registerBeforeFinishCallback(e=>{this._collectWebVitals(),rC(e)}),h}_registerInteractionListener(){let e;let t=()=>{let{idleTimeout:t,finalTimeout:n,heartbeatInterval:r}=this.options,i=nT();if(i&&i.op&&["navigation","pageload"].includes(i.op)||(e&&(e.setFinishReason("interactionInterrupted"),e.end(),e=void 0),!this._getCurrentHub)||!this._latestRoute.name)return;let s=this._getCurrentHub(),{location:o}=nM;e=nO(s,{name:this._latestRoute.name,op:"ui.action.click",trimEnd:!0,data:{[nl]:this._latestRoute.context?function(e){let t=e.attributes&&e.attributes[nl],n=e.data&&e.data[nl],r=e.metadata&&e.metadata.source;return t||n||r}(this._latestRoute.context):"url"}},t,n,!0,{location:o},r)};
19["click"].forEach(e=>{nM.document&&addEventListener(e,t,{once:!1,capture:!0})})}_registerInpInteractionListener(){let e=({entries:e})=>{let t=(0,B.s3)(),n=void 0!==t&&void 0!==t.getIntegrationByName?t.getIntegrationByName("Replay"):void 0,r=void 0!==n?n.getReplayId():void 0,i=nT(),s=(0,B.nZ)(),o=void 0!==s?s.getUser():void 0;e.forEach(e=>{if("duration"in e){let t=e.interactionId;if(void 0===t)return;let n=this._interactionIdToRouteNameMapping[t],s=e.duration,a=e.startTime,l=Object.keys(this._interactionIdToRouteNameMapping),u=l.length>0?l.reduce((e,t)=>this._interactionIdToRouteNameMapping[e].duration<this._interactionIdToRouteNameMapping[t].duration?e:t):void 0;if(!("first-input"===e.entryType&&l.map(e=>this._interactionIdToRouteNameMapping[e]).some(e=>e.duration===s&&e.startTime===a))&&t){if(n)n.duration=Math.max(n.duration,s);else if(l.length<10||void 0===u||s>this._interactionIdToRouteNameMapping[u].duration){let e=this._latestRoute.name,n=this._latestRoute.context;e&&n&&(u&&Object.keys(this._interactionIdToRouteNameMapping).length>=10&&delete this._interactionIdToRouteNameMapping[u],this._interactionIdToRouteNameMapping[t]={routeName:e,duration:s,parentContext:n,user:o,activeTransaction:i,replayId:r,startTime:a})}}}})};rs("event",e),rs("first-input",e)}}function rF(e){let t=(0,eD.qT)(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}let rB={...nw,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...rN},r$=(e={})=>{nN(),!e.tracePropagationTargets&&e.tracingOrigins&&(e.tracePropagationTargets=e.tracingOrigins);let t={...rB,...e},n=rE(),r={};t.enableInp&&rI(r,t.interactionsSampleRate),t.enableLongTask&&rS(),t._experiments.enableInteractions&&rT();let i={name:void 0,context:void 0};function s(e){let r;let s=(0,G.Gd)(),{beforeStartSpan:o,idleTimeout:a,finalTimeout:l,heartbeatInterval:u}=t,c="pageload"===e.op;if(c){let t=c?rz("sentry-trace"):"",n=c?rz("baggage"):void 0,{traceId:i,dsc:s,parentSpanId:o,sampled:a}=(0,nD.pT)(t,n);r={traceId:i,parentSpanId:o,parentSampled:a,...e,metadata:{...e.metadata,dynamicSamplingContext:s},trimEnd:!0}}else r={trimEnd:!0,...e};let h=o?o(r):r;h.metadata=h.name!==r.name?{...h.metadata,source:"custom"}:h.metadata,i.name=h.name,i.context=h,h.sampled;let{location:d}=nM,f=nO(s,h,a,l,!0,{location:d},u,c);return c&&nM.document&&(nM.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(nM.document.readyState)&&f.sendAutoFinishSignal()}),["interactive","complete"].includes(nM.document.readyState)&&f.sendAutoFinishSignal()),f.registerBeforeFinishCallback(e=>{n(),rC(e)}),f}return{name:"BrowserTracing",setupOnce:()=>{},afterAllSetup(e){let n;let o=e.getOptions(),{markBackgroundSpan:a,traceFetch:l,traceXHR:u,shouldCreateSpanForRequest:c,enableHTTPTimings:h,_experiments:d}=t,f=o&&o.tracePropagationTargets||t.tracePropagationTargets,p=nM.location&&nM.location.href;e.on&&(e.on("startNavigationSpan",e=>{n&&n.end(),n=s({op:"navigation",...e})}),e.on("startPageLoadSpan",e=>{n&&n.end(),n=s({op:"pageload",...e})})),t.instrumentPageLoad&&e.emit&&nM.location&&rV(e,{name:nM.location.pathname,startTimestamp:tJ.Z1?tJ.Z1/1e3:void 0,origin:"auto.pageload.browser",attributes:{[nl]:"url"}}),t.instrumentNavigation&&e.emit&&nM.location&&tu(({to:t,from:n})=>{if(void 0===n&&p&&-1!==p.indexOf(t)){p=void 0;return}n!==t&&(p=void 0,rq(e,{name:nM.location.pathname,origin:"auto.navigation.browser",attributes:{[nl]:"url"}}))}),a&&nL(),d.enableInteractions&&function(e,t){let n;let r=()=>{let{idleTimeout:r,finalTimeout:i,heartbeatInterval:s}=e,o=nT();if(o&&o.op&&["navigation","pageload"].includes(o.op)||(n&&(n.setFinishReason("interactionInterrupted"),n.end(),n=void 0),!t.name))return;let{location:a}=nM,l={name:t.name,op:"ui.action.click",trimEnd:!0,data:{[nl]:t.context?function(e){let t=e.attributes&&e.attributes[nl],n=e.data&&e.data[nl],r=e.metadata&&e.metadata.source;return t||n||r}(t.context):"url"}};n=nO((0,G.Gd)(),l,r,i,!0,{location:a},s)};["click"].forEach(e=>{nM.document&&addEventListener(e,r,{once:!1,capture:!0})})}(t,i),t.enableInp&&function(e,t){let n=({entries:n})=>{let r=(0,B.s3)(),i=void 0!==r&&void 0!==r.getIntegrationByName?r.getIntegrationByName("Replay"):void 0,s=void 0!==i?i.getReplayId():void 0,o=nT(),a=(0,B.nZ)(),l=void 0!==a?a.getUser():void 0;
19n.forEach(n=>{if("duration"in n){let r=n.interactionId;if(void 0===r)return;let i=e[r],a=n.duration,u=n.startTime,c=Object.keys(e),h=c.length>0?c.reduce((t,n)=>e[t].duration<e[n].duration?t:n):void 0;if(!("first-input"===n.entryType&&c.map(t=>e[t]).some(e=>e.duration===a&&e.startTime===u))&&r){if(i)i.duration=Math.max(i.duration,a);else if(c.length<10||void 0===h||a>e[h].duration){let n=t.name,i=t.context;n&&i&&(h&&Object.keys(e).length>=10&&delete e[h],e[r]={routeName:n,duration:a,parentContext:i,user:l,activeTransaction:o,replayId:s,startTime:u})}}}})};rs("event",n),rs("first-input",n)}(r,i),rD({traceFetch:l,traceXHR:u,tracePropagationTargets:f,shouldCreateSpanForRequest:c,enableHTTPTimings:h})},options:t}};function rV(e,t){if(!e.emit)return;e.emit("startPageLoadSpan",t);let n=ny();return"pageload"===(n&&(0,no.XU)(n).op)?n:void 0}function rq(e,t){if(!e.emit)return;e.emit("startNavigationSpan",t);let n=ny();return"navigation"===(n&&(0,no.XU)(n).op)?n:void 0}function rz(e){let t=(0,eD.qT)(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}let rH={"routing.instrumentation":"next-app-router"};var rW=n(11163),rG=n.n(rW),rK=n(29912);let rX={"routing.instrumentation":"next-pages-router"},rJ=(0,B.s3)();function rZ(e,t=!0,n=!0,r,i){ey.document.getElementById("__NEXT_DATA__")?function(e,t=!0,n=!0,r,i){let{route:s,params:o,sentryTrace:a,baggage:l}=function(){let e;let t=ey.document.getElementById("__NEXT_DATA__");if(t&&t.innerHTML)try{e=JSON.parse(t.innerHTML)}catch(e){rK.X&&z.kg.warn("Could not extract __NEXT_DATA__")}if(!e)return{};let n={},{page:r,query:i,props:s}=e;return n.route=r,n.params=i,s&&s.pageProps&&(n.sentryTrace=s.pageProps._sentryTraceData,n.baggage=s.pageProps._sentryBaggage),n}(),{traceparentData:u,dynamicSamplingContext:c,propagationContext:h}=(0,nD.KA)(a,l);if((0,B.nZ)().setPropagationContext(h),I=s||ey.location.pathname,t){let t={name:I,op:"pageload",origin:"auto.pageload.nextjs.pages_router_instrumentation",tags:rX,startTimestamp:tJ.Z1?tJ.Z1/1e3:void 0,...o&&rJ&&rJ.getOptions().sendDefaultPii&&{data:o},...u,metadata:{source:s?"route":"url",dynamicSamplingContext:u&&!c?{}:c}};T=e(t),r(t)}n&&rG().events.on("routeChangeStart",t=>{let n,r;let s=t.split(/[\?#]/,1)[0],o=function(e){let t=(ey.__BUILD_MANIFEST||{}).sortedPages;if(t)return t.find(t=>{let n=function(e){let t=e.split("/"),n="";t[t.length-1].match(/^\[\[\.\.\..+\]\]$/)&&(t.pop(),n="(?:/(.+?))?");let r=t.map(e=>e.replace(/^\[\.\.\..+\]$/,"(.+?)").replace(/^\[.*\]$/,"([^/]+?)")).join("/");return RegExp(`^${r}${n}(?:/)?$`)}(t);return e.match(n)})}(s);o?(n=o,r="route"):(n=s,r="url");let a={...rX,from:I};I=n,T&&T.end();let l={name:n,op:"navigation",origin:"auto.navigation.nextjs.pages_router_instrumentation",tags:a,metadata:{source:r}},u=e(l);if(i(l),u){let e=u.startChild({op:"ui.nextjs.route-change",origin:"auto.ui.nextjs.pages_router_instrumentation",description:"Next.js Route Change"}),t=()=>{e.end(),rG().events.off("routeChangeComplete",t)};rG().events.on("routeChangeComplete",t)}})}(e,t,n,r||(()=>void 0),i||(()=>void 0)):function(e,t=!0,n=!0,r,i){let s;let o=ey.location.pathname;if(t){let t={name:o,op:"pageload",origin:"auto.pageload.nextjs.app_router_instrumentation",tags:rH,startTimestamp:tJ.Z1?tJ.Z1/1e3:void 0,metadata:{source:"url"}};s=e(t),r(t)}n&&tr(t=>{if(void 0!==t.endTimestamp||"GET"!==t.fetchData.method)return;let n=function(e){if(!e[0]||"object"!=typeof e[0]||void 0===e[0].searchParams||!e[1]||"object"!=typeof e[1]||!("headers"in e[1]))return null;try{let t=e[0],n=e[1].headers;if("1"!==n.RSC||"1"===n["Next-Router-Prefetch"])return null;return{targetPathname:t.pathname}}catch(e){return null}}(t.args);if(null===n)return;let r=n.targetPathname,a={...rH,from:o};o=r,s&&s.end();let l={name:r,op:"navigation",origin:"auto.navigation.nextjs.app_router_instrumentation",tags:a,metadata:{source:"url"}};e(l),i(l)})}(e,t,n,r||(()=>void 0),i||(()=>void 0))}class rY extends rU{constructor(e){super({tracingOrigins:[...rN.tracingOrigins,/^(api\/)/],routingInstrumentation:rZ,...e})}}function rQ(e){let t=r$({tracingOrigins:[...rN.tracingOrigins,/^(api\/)/],...e,instrumentNavigation:!1,instrumentPageLoad:!1}),n={...t.options,instrumentPageLoad:!0,instrumentNavigation:!0,...e};return{...t,options:n,afterAllSetup(e){let r=t=>{rV(e,t)},i=t=>{rq(e,t)};rZ(()=>void 0,!1,n.instrumentNavigation,r,i),t.afterAllSetup(e),rZ(()=>void 0,n.instrumentPageLoad,!1,r,i)}}}function r0(e){let t;let n=e[0],r=1;for(;r<e.length;){let i=e[r],s=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=s(n)):("call"===i||"optionalCall"===i)&&(n=s((...e)=>n.call(t,...e)),t=void 0)}return n}let r1=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function r2(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n="/"===i.charAt(0))}return t=(function(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;n)e.unshift("..");return e})(t.split("/").filter(e=>!!e),!n).join("/"),(n?"/":"")+t||"."}function r4(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}let r9="RewriteFrames",r6=(e={})=>{let t=e.root,n=e.prefix||"app:///",r=e.iteratee||(e=>{if(!e.filename)return e;let r=/^[a-zA-Z]:\\/.test(e.filename)||e.filename.includes("\\")&&!e.filename.includes("/"),i=/^\//.test(e.filename);if(r||i){let i;let s=r?e.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):e.filename,o=t?function(e,t){e=r2(e).slice(1),t=r2(t).slice(1);let n=r4(e.split("/")),r=r4(t.split("/")),i=Math.min(n.length,r.length),s=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){s=e;break}let o=[];for(let e=s;e<n.length;e++)o.push("..");return(o=o.concat(r.slice(s))).join("/")}(t,s):function(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=r1.exec(t);return n?n.slice(1):[]}(s)[2];e.filename=`${n}${o}`}return e});return{name:r9,setupOnce(){},processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=function(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>{var t;return{...e,...e.stacktrace&&{stacktrace:{...t=e.stacktrace,frames:t&&t.frames&&t.frames.map(e=>r(e))}}}})}}}catch(t){return e}}(t)),t}}};Z(r9,r6);let r3=eg.GLOBAL_OBJ,r5=e=>{let t=r3.__rewriteFramesAssetPrefixPath__||"";return r6({iteratee:e=>{try{let{origin:n}=new URL(e.filename);e.filename=r0([e,"access",e=>e.filename,"optionalAccess",e=>e.replace,"call",e=>e(n,"app://"),"access",e=>e.replace,"call",e=>e(t,"")])}catch(e){}return e.filename&&e.filename.startsWith("app:///_next")&&(e.filename=decodeURI(e.filename)),e.filename&&e.filename.match(/^app:\/\/\/_next\/static\/chunks\/(main-|main-app-|polyfills-|webpack-|framework-|framework\.)[0-9a-f]+\.js$/)&&(e.in_app=!1),e},...e})},r7=eg.GLOBAL_OBJ;function r8(e){let t=e.find(e=>"BrowserTracing"===e.name);if(!t)return e;if(t.afterAllSetup&&t.options){let{options:n}=t;e[e.indexOf(t)]=rQ(n)}if(!(t instanceof rY)){let n=t.options;delete n.routingInstrumentation,delete n.tracingOrigins,e[e.indexOf(t)]=new rY(n)}return e}function ie(e){return"/"===e[e.length-1]?e.slice(0,-1):e}({...tA});var it=n(41850);function ir(){return"undefined"!=typeof window&&(!(0,it.KV)()||void 0!==eg.GLOBAL_OBJ.process&&"renderer"===eg.GLOBAL_OBJ.process.type)}let ii=eg.GLOBAL_OBJ,is="sentryReplaySession",io="Unable to send Replay";function ia(e){let t;let n=e[0],r=1;for(;r<e.length;){let i=e[r],s=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=s(n)):("call"===i||"optionalCall"===i)&&(n=s((...e)=>n.call(t,...e)),t=void 0)}return n}function il(e){let t=ia([e,"optionalAccess",e=>e.host]);return ia([t,"optionalAccess",e=>e.shadowRoot])===e}function iu(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ic(e){try{var t;let n=e.rules||e.cssRules;return n?((t=Array.from(n,ih).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}}function ih(e){let t;if("styleSheet"in e)try{t=ic(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let 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("selectorText"in e&&e.selectorText.includes(":"))return e.cssText.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2");return t||e.cssText}(C=M||(M={}))[C.Document=0]="Document",C[C.DocumentType=1]="DocumentType",C[C.Element=2]="Element",C[C.Text=3]="Text",C[C.CDATA=4]="CDATA",C[C.Comment=5]="Comment";
19class id{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;return e?(()=>-1,null!=(t=ia([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]))?t:-1):-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let 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 ip({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function im({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}function ig(e){return e.toLowerCase()}function iy(e){return e.toUpperCase()}let iv="__rrweb_original__";function i_(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ig(t):null}function ib(e,t,n){return"INPUT"===t&&("radio"===n||"checkbox"===n)?e.getAttribute("value")||"":e.value}let iw=1,iE=RegExp("[^a-z0-9-_:]");function iS(){return iw++}let iT=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,iI=/^(?:[a-z+]+:)?\/\//i,ik=/^www\..*/i,iC=/^(data:)([^,]*),(.*)/i;function ix(e,t){return(e||"").replace(iT,(e,n,r,i,s,o)=>{let a=r||s||o,l=n||i||"";if(!a)return e;if(iI.test(a)||ik.test(a)||iC.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+a}${l})`;let u=t.split("/"),c=a.split("/");for(let e of(u.pop(),c))"."!==e&&(".."===e?u.pop():u.push(e));return`url(${l}${u.join("/")}${l})`})}let iR=/^[^ \t\n\r\u000c]+/,iA=/^[, \t\n\r\u000c]+/;function iO(e,t){if(!t||""===t.trim())return t;let n=e.createElement("a");return n.href=t,n.href}function iN(){let e=document.createElement("a");return e.href="",e.href}function iD(e,t,n,r,i,s){return r?"src"!==n&&("href"!==n||"use"===t&&"#"===r[0])&&("xlink:href"!==n||"#"===r[0])&&("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;let i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}let i=[];for(;r(iA),!(n>=t.length);){let s=r(iR);if(","===s.slice(-1))s=iO(e,s.substring(0,s.length-1)),i.push(s);else{let r="";s=iO(e,s);let o=!1;for(;;){let e=t.charAt(n);if(""===e){i.push((s+r).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){n+=1,i.push((s+r).trim());break}"("===e&&(o=!0)}r+=e,n+=1}}}return i.join(", ")}(e,r):"style"===n?ix(r,iN()):"object"===t&&"data"===n?iO(e,r):"function"==typeof s?s(n,r,i):r:iO(e,r):r}function iM(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function iL(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:iL(e.parentNode,t,n,r+1)}function iP(e,t){return n=>{if(null===n)return!1;try{if(e){if("string"==typeof e){if(n.matches(`.${e}`))return!0}else if(function(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}(n,e))return!0}if(t&&n.matches(t))return!0;return!1}catch(e){return!1}}}function ij(e,t,n,r,i,s){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===o)return!1;if("INPUT"===o.tagName){let e=o.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let a=-1,l=-1;if(s){if((l=iL(o,iP(r,i)))<0)return!0;a=iL(o,iP(t,n),l>=0?l:1/0)}else{if((a=iL(o,iP(t,n)))<0)return!1;l=iL(o,iP(r,i),a>=0?a:1/0)}return a>=0?!(l>=0)||a<=l:!(l>=0)&&!!s}catch(e){}return!!s}function iU(e){return null==e?"":e.toLowerCase()}function iF(e,t){let n;let{doc:r,mirror:i,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:h,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:g,maskTextFn:_,maskInputFn:b,slimDOMOptions:w,dataURLOptions:E={}
19,inlineImages:S=!1,recordCanvas:T=!1,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:C=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:R=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:O=!1}=t,{preserveWhiteSpace:N=!0}=t,D=function(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:o,maskAllText:a,maskAttributeFn:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:f,maskInputOptions:p={},maskTextFn:m,maskInputFn:g,dataURLOptions:_={},inlineImages:b,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:S=!1}=t,T=function(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:M.Document,childNodes:[],compatMode:e.compatMode};return{type:M.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:M.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:T};case e.ELEMENT_NODE:return function(e,t){let n;let{doc:r,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:a,maskInputOptions:l={},maskAttributeFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:g,maskAllText:_,maskTextClass:b,unmaskTextClass:w,maskTextSelector:E,unmaskTextSelector:S}=t,T=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--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch(e){}return!1}(e,i,s,o),I=function(e){if(e instanceof HTMLFormElement)return"form";let t=ig(e.tagName);return iE.test(t)?"div":t}(e),k={},C=e.attributes.length;for(let t=0;t<C;t++){let n=e.attributes[t];n.name&&!iM(I,n.name,n.value)&&(k[n.name]=iD(r,I,ig(n.name),n.value,e,u))}if("link"===I&&a){let t=Array.from(r.styleSheets).find(t=>t.href===e.href),n=null;t&&(n=ic(t)),n&&(delete k.rel,delete k.href,k._cssText=ix(n,t.href))}if("style"===I&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){let t=ic(e.sheet);t&&(k._cssText=ix(t,iN()))}if("input"===I||"textarea"===I||"select"===I||"option"===I){let t=i_(e),n=ib(e,iy(I),t),r=e.checked;if("submit"!==t&&"button"!==t&&n){let r=ij(e,b,E,w,S,ip({type:t,tagName:iy(I),maskInputOptions:l}));k.value=im({isMasked:r,element:e,value:n,maskInputFn:c})}r&&(k.checked=r)}if("option"===I&&(e.selected&&!l.select?k.selected=!0:delete k.selected),"canvas"===I&&f){if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData;if(new Uint32Array((iv in i?i[iv]:i).call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0}(e)&&(k.rr_dataURL=e.toDataURL(h.type,h.quality));else if(!("__context"in e)){let t=e.toDataURL(h.type,h.quality),n=document.createElement("canvas");n.width=e.width,n.height=e.height,t!==n.toDataURL(h.type,h.quality)&&(k.rr_dataURL=t)}}if("img"===I&&d){y||(v=(y=r.createElement("canvas")).getContext("2d"));let t=e.crossOrigin;e.crossOrigin="anonymous";let n=()=>{e.removeEventListener("load",n);try{y.width=e.naturalWidth,y.height=e.naturalHeight,v.drawImage(e,0,0),k.rr_dataURL=y.toDataURL(h.type,h.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}t?k.crossOrigin=t:e.removeAttribute("crossorigin")};e.complete&&0!==e.naturalWidth?n():e.addEventListener("load",n)}if(("audio"===I||"video"===I)&&(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),!m&&(e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop)),T){let{width:t,height:n}=e.getBoundingClientRect();k={class:k.class,rr_width:`${t}px`,rr_height:`${n}px`}}"iframe"!==I||p(k.src)||(e.contentDocument||(k.rr_src=k.src),delete k.src);try{customElements.get(I)&&(n=!0)}catch(e){}return{type:M.Element,tagName:I,attributes:k,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:T,rootId:g,isCustom:n}}(e,{doc:n,blockClass:i,blockSelector:s,unblockSelector:o,inlineStylesheet:f,maskAttributeFn:l,maskInputOptions:p,maskInputFn:g,dataURLOptions:_,inlineImages:b,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:S,rootId:T,maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:h,unmaskTextSelector:d});case e.TEXT_NODE:return function(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:o,maskTextFn:a,maskInputOptions:l,maskInputFn:u,rootId:c}=t,h=e.parentNode&&e.parentNode.tagName,d=e.textContent,f="STYLE"===h||void 0,p="SCRIPT"===h||void 0,m="TEXTAREA"===h||void 0;if(f&&d){try{e.nextSibling||e.previousSibling||ia([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(d=ic(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}d=ix(d,iN())}p&&(d="SCRIPT_PLACEHOLDER");let g=ij(e,r,s,i,o,n);return f||p||m||!d||!g||(d=a?a(d,e.parentElement):d.replace(/[\S]/g,"*")),m&&d&&(l.textarea||g)&&(d=u?u(d,e.parentNode):d.replace(/[\S]/g,"*")),"OPTION"===h&&d&&(d=im({isMasked:ij(e,r,s,i,o,ip({type:null,tagName:h,maskInputOptions:l})),element:e,value:d,maskInputFn:u})),{type:M.Text,textContent:d||"",isStyle:f,rootId:c}}(e,{maskAllText:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:h,unmaskTextSelector:d,maskTextFn:m,maskInputOptions:p,maskInputFn:g,rootId:T});case e.CDATA_SECTION_NODE:return{type:M.CDATA,textContent:"",rootId:T};case e.COMMENT_NODE:return{type:M.Comment,textContent:e.textContent||"",rootId:T};default:return!1}}(e,{doc:r,mirror:i,blockClass:s,blockSelector:o,maskAllText:l,unblockSelector:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:h,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:g,maskTextFn:_,maskInputFn:b,dataURLOptions:E,inlineImages:S,recordCanvas:T,keepIframeSrcFn:A,newlyAddedElement:O});if(!D)return console.warn(e,"not serialized"),null;n=i.hasNode(e)?i.getId(e):!function(e,t){if(t.comment&&e.type===M.Comment)return!0;
19if(e.type===M.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"))||t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(iU(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===iU(e.attributes.name)||"icon"===iU(e.attributes.rel)||"apple-touch-icon"===iU(e.attributes.rel)||"shortcut icon"===iU(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&iU(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(iU(e.attributes.property).match(/^(og|twitter|fb):/)||iU(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===iU(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===iU(e.attributes.name)||"googlebot"===iU(e.attributes.name)||"bingbot"===iU(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===iU(e.attributes.name)||"generator"===iU(e.attributes.name)||"framework"===iU(e.attributes.name)||"publisher"===iU(e.attributes.name)||"progid"===iU(e.attributes.name)||iU(e.attributes.property).match(/^article:/)||iU(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===iU(e.attributes.name)||"yandex-verification"===iU(e.attributes.name)||"csrf-token"===iU(e.attributes.name)||"p:domain_verify"===iU(e.attributes.name)||"verify-v1"===iU(e.attributes.name)||"verification"===iU(e.attributes.name)||"shopify-checkout-api-token"===iU(e.attributes.name)))return!0}}return!1}(D,w)&&(N||D.type!==M.Text||D.isStyle||D.textContent.replace(/^\s+|\s+$/gm,"").length)?iS():-2;let L=Object.assign(D,{id:n});if(i.add(e,L),-2===n)return null;I&&I(e);let P=!f;if(L.type===M.Element){P=P&&!L.needBlock,delete L.needBlock;let t=e.shadowRoot;t&&iu(t)&&(L.isShadowHost=!0)}if((L.type===M.Document||L.type===M.Element)&&P){w.headWhitespace&&L.type===M.Element&&"head"===L.tagName&&(N=!1);let t={doc:r,mirror:i,blockClass:s,blockSelector:o,maskAllText:l,unblockSelector:a,maskTextClass:u,unmaskTextClass:c,maskTextSelector:h,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:g,maskTextFn:_,maskInputFn:b,slimDOMOptions:w,dataURLOptions:E,inlineImages:S,recordCanvas:T,preserveWhiteSpace:N,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:C,onStylesheetLoad:x,stylesheetLoadTimeout:R,keepIframeSrcFn:A};for(let n of Array.from(e.childNodes)){let e=iF(n,t);e&&L.childNodes.push(e)}if(e.nodeType===e.ELEMENT_NODE&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=iF(n,t);r&&(iu(e.shadowRoot)&&(r.isShadow=!0),L.childNodes.push(r))}}return e.parentNode&&il(e.parentNode)&&iu(e.parentNode)&&(L.isShadow=!0),L.type===M.Element&&"iframe"===L.tagName&&function(e,t,n){let r;let i=e.contentWindow;if(!i)return;let s=!1;try{r=i.document.readyState}catch(e){return}if("complete"!==r){let r=setTimeout(()=>{s||(t(),s=!0)},n);e.addEventListener("load",()=>{clearTimeout(r),s=!0,t()});return}let o="about:blank";if(i.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=e.contentDocument;if(t&&k){let n=iF(t,{doc:t,mirror:i,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:h,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:g,maskTextFn:_,maskInputFn:b,slimDOMOptions:w,dataURLOptions:E,inlineImages:S,recordCanvas:T,preserveWhiteSpace:N,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:C,onStylesheetLoad:x,stylesheetLoadTimeout:R,keepIframeSrcFn:A});n&&k(e,n)}},C),L.type===M.Element&&"link"===L.tagName&&"stylesheet"===L.attributes.rel&&function(e,t,n){let r,i=!1;try{r=e.sheet}catch(e){return}if(r)return;let s=setTimeout(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{clearTimeout(s),i=!0,t()})}(e,()=>{if(x){let t=iF(e,{doc:r,mirror:i,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:l,maskTextClass:u,unmaskTextClass:c,maskTextSelector:h,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:g,maskTextFn:_,maskInputFn:b,slimDOMOptions:w,dataURLOptions:E,inlineImages:S,recordCanvas:T,preserveWhiteSpace:N,onSerialize:I,onIframeLoad:k,iframeLoadTimeout:C,onStylesheetLoad:x,stylesheetLoadTimeout:R,keepIframeSrcFn:A});t&&x(e,t)}},R),L}function iB(e){let t;let n=e[0],r=1;for(;r<e.length;){let i=e[r],s=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=s(n)):("call"===i||"optionalCall"===i)&&(n=s((...e)=>n.call(t,...e)),t=void 0)}return n}function i$(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}let iV="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.",iq={map:{},getId:()=>(console.error(iV),-1),getNode:()=>(console.error(iV),null),removeNodeFromMap(){console.error(iV)},has:()=>(console.error(iV),!1),reset(){console.error(iV)}};function iz(e,t,n={}){let r=null,i=0;return function(...s){let o=Date.now();i||!1!==n.leading||(i=o);let a=t-(o-i),l=this;a<=0||a>t?(r&&(function(...e){i5("clearTimeout")(...e)}
19(r),r=null),i=o,e.apply(l,s)):r||!1===n.trailing||(r=i7(()=>{i=!1===n.leading?0:Date.now(),r=null,e.apply(l,s)},a))}}function iH(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(iq=new Proxy(iq,{get:(e,t,n)=>("map"===t&&console.error(iV),Reflect.get(e,t,n))}));let iW=Date.now;function iG(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:iB([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||iB([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||iB([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:iB([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||iB([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||iB([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function iK(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function iX(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function iJ(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function iZ(e,t,n,r,i){if(!e)return!1;let s=iJ(e);if(!s)return!1;let o=iP(t,n);if(!i){let e=r&&s.matches(r);return o(s)&&!e}let a=iL(s,o),l=-1;return!(a<0)&&(r&&(l=iL(s,iP(null,r))),a>-1&&l<0||a<l)}function iY(e,t){return -2===t.getId(e)}function iQ(e){return!!e.changedTouches}function i0(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function i1(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function i2(e){return!!iB([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(iW=()=>new Date().getTime());class i4{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return t=this.styleIDMap.get(e),null!=t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){let n;return this.has(e)?this.getId(e):(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 i9(e){let t=null;return iB([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 i6(e){let t=e.ownerDocument;return!!t&&(t.contains(e)||function(e){let t=e.ownerDocument;if(!t)return!1;let n=function(e){let t,n=e;for(;t=i9(n);)n=t;return n}(e);return t.contains(n)}(e))}let i3={};function i5(e){let t=i3[e];if(t)return t;let n=window.document,r=window[e];if(n&&"function"==typeof n.createElement)try{let t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch(e){}return i3[e]=r.bind(window)}function i7(...e){return i5("setTimeout")(...e)}var i8=((x=i8||{})[x.DomContentLoaded=0]="DomContentLoaded",x[x.Load=1]="Load",x[x.FullSnapshot=2]="FullSnapshot",x[x.IncrementalSnapshot=3]="IncrementalSnapshot",x[x.Meta=4]="Meta",x[x.Custom=5]="Custom",x[x.Plugin=6]="Plugin",x),se=((R=se||{})[R.Mutation=0]="Mutation",R[R.MouseMove=1]="MouseMove",R[R.MouseInteraction=2]="MouseInteraction",R[R.Scroll=3]="Scroll",R[R.ViewportResize=4]="ViewportResize",R[R.Input=5]="Input",R[R.TouchMove=6]="TouchMove",R[R.MediaInteraction=7]="MediaInteraction",R[R.StyleSheetRule=8]="StyleSheetRule",R[R.CanvasMutation=9]="CanvasMutation",R[R.Font=10]="Font",R[R.Log=11]="Log",R[R.Drag=12]="Drag",R[R.StyleDeclaration=13]="StyleDeclaration",R[R.Selection=14]="Selection",R[R.AdoptedStyleSheet=15]="AdoptedStyleSheet",R[R.CustomElement=16]="CustomElement",R),st=((A=st||{})[A.MouseUp=0]="MouseUp",A[A.MouseDown=1]="MouseDown",A[A.Click=2]="Click",A[A.ContextMenu=3]="ContextMenu",A[A.DblClick=4]="DblClick",A[A.Focus=5]="Focus",A[A.Blur=6]="Blur",A[A.TouchStart=7]="TouchStart",A[A.TouchMove_Departed=8]="TouchMove_Departed",A[A.TouchEnd=9]="TouchEnd",A[A.TouchCancel=10]="TouchCancel",A),sn=((O=sn||{})[O.Mouse=0]="Mouse",O[O.Pen=1]="Pen",O[O.Touch=2]="Touch",O);class sr{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=function(e){let t;let n=e[0],r=1;for(;r<e.length;){let i=e[r],s=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=s(n)):("call"===i||"optionalCall"===i)&&(n=s((...e)=>n.call(t,...e)),t=void 0)}return n}([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&
19(n.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let 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){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let si=(e,t)=>`${e}@${t}`;class ss{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new sr,r=e=>{let t=e,n=-2;for(;-2===n;)n=(t=t&&t.nextSibling)&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!i6(i))return;let s=il(i.parentNode)?this.mirror.getId(i9(i)):this.mirror.getId(i.parentNode),o=r(i);if(-1===s||-1===o)return n.addNode(i);let a=iF(i,{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=>{i0(e,this.mirror)&&this.iframeManager.addIframe(e),i1(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),i2(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});a&&(e.push({parentId:s,nextId:o,node:a}),t.add(a.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!sa(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&i(e);for(let e of this.addedSet)sl(this.droppedSet,e)||sa(this.removes,e,this.mirror)?sl(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let s=null;for(;n.length;){let e=null;if(s){let t=this.mirror.getId(s.value.parentNode),n=r(s.value);-1!==t&&-1!==n&&(e=s)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}s=e.previous,n.removeNode(e.value),i(e.value)}let o={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=>{let{attributes:t}=e;if("string"==typeof t.style){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!iY(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;iZ(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||t===e.oldValue||this.texts.push({value:ij(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,iJ(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){let n=i_(t),i=t.tagName;r=ib(t,i,n);let s=ip({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=im({isMasked:ij(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,s),element:t,value:r,maskInputFn:this.maskInputFn})}if(iZ(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);
19if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(t.contentDocument)return;n="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!iM(t.tagName,n)&&(i.attributes[n]=iD(this.doc,ig(t.tagName),ig(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let n=this.unattachedDoc.createElement("span");for(let r of(e.oldValue&&n.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(r),s=t.style.getPropertyPriority(r);e!==n.style.getPropertyValue(r)||s!==n.style.getPropertyPriority(r)?""===s?i.styleDiff[r]=e:i.styleDiff[r]=[e,s]:i._unchangedStyles[r]=[e,s]}for(let e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}break}case"childList":if(iZ(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=il(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);iZ(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||iY(t,this.mirror)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(so(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||function e(t,n){if(il(t))return!1;let r=n.getId(t);return!n.has(r)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,n))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[si(n,r)]?so(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!!(il(e.target)&&iu(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(iY(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[si(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!iZ(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&(e.childNodes.forEach(e=>this.genAdds(e)),i2(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 so(e,t){e.delete(t),t.childNodes.forEach(t=>so(e,t))}function sa(e,t,n){return 0!==e.length&&function e(t,n,r){let{parentNode:i}=n;if(!i)return!1;let s=r.getId(i);return!!t.some(e=>e.id===s)||e(t,i,r)}(e,t,n)}function sl(e,t){return 0!==e.size&&function e(t,n){let{parentNode:r}=n;return!!r&&(!!t.has(r)||e(t,r))}(e,t)}let su=e=>_?(...t)=>{try{return e(...t)}catch(e){if(_&&!0===_(e))return()=>{};throw e}}:e;function sc(e){let t;let n=e[0],r=1;for(;r<e.length;){let i=e[r],s=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=s(n)):("call"===i||"optionalCall"===i)&&(n=s((...e)=>n.call(t,...e)),t=void 0)}return n}let sh=[];function sd(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function sf(e,t){let n=new ss;sh.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=sc([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);i&&window[i]&&(r=window[i]);let s=new r(su(t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function sp({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){return i$("scroll",su(iz(su(o=>{let a=sd(o);if(!a||iZ(a,r,i,s,!0))return;let l=n.getId(a);if(a===t&&t.defaultView){let n=iG(t.defaultView);e({id:l,x:n.left,y:n.top})}else e({id:l,x:a.scrollLeft,y:a.scrollTop})}),o.scroll||100)),t)}let sm=["INPUT","TEXTAREA","SELECT"],sg=new WeakMap;function sy(e){var t;return t=[],sw("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||sw("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||sw("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||sw("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?t.unshift(Array.from(e.parentRule.cssRules).indexOf(e)):e.parentStyleSheet&&t.unshift(Array.from(e.parentStyleSheet.cssRules).indexOf(e)),t}function sv(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function s_({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);let i="#document"===n.nodeName?sc([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):sc([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),s=sc([i,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(sc([i,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&i&&s?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return sc([s,"access",e=>
19e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){let n=sc([s,"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}}),su(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function sb(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r=sf(e,e.doc),i=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){let i;if(!1===t.mousemove)return()=>{};let s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],l=iz(su(t=>{let n=Date.now()-i;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],i=null}),o),u=su(iz(su(e=>{let t=sd(e),{clientX:n,clientY:s}=iQ(e)?e.changedTouches[0]:e;i||(i=iW()),a.push({x:n,y:s,id:r.getId(t),timeOffset:iW()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?se.Drag:e instanceof MouseEvent?se.MouseMove:se.TouchMove)}),s,{trailing:!1})),c=[i$("mousemove",u,n),i$("touchmove",u,n),i$("drag",u,n)];return su(()=>{c.forEach(e=>e())})}(e),s=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:o}){if(!1===o.mouseInteraction)return()=>{};let a=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,l=[],u=null,c=t=>o=>{let a=sd(o);if(iZ(a,r,i,s,!0))return;let l=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":l=sn.Mouse;break;case"touch":l=sn.Touch;break;case"pen":l=sn.Pen}l===sn.Touch?st[t]===st.MouseDown?c="TouchStart":st[t]===st.MouseUp&&(c="TouchEnd"):sn.Pen}else iQ(o)&&(l=sn.Touch);null!==l?(u=l,(c.startsWith("Touch")&&l===sn.Touch||c.startsWith("Mouse")&&l===sn.Mouse)&&(l=null)):st[t]===st.Click&&(l=u,u=null);let h=iQ(o)?o.changedTouches[0]:o;if(!h)return;let d=n.getId(a),{clientX:f,clientY:p}=h;su(e)({type:st[c],id:d,x:f,y:p,...null!==l&&{pointerType:l}})};return Object.keys(st).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]).forEach(e=>{let n=ig(e),r=c(e);if(window.PointerEvent)switch(st[e]){case st.MouseDown:case st.MouseUp:n=n.replace("mouse","pointer");break;case st.TouchStart:case st.TouchEnd:return}l.push(i$(n,r,t))}),su(()=>{l.forEach(e=>e())})}(e),o=sp(e),a=function({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return i$("resize",su(iz(su(()=>{let t=iK(),i=iX();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}(e,{win:n}),l=function({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:l,maskInputFn:u,sampling:c,userTriggeredOnInput:h,maskTextClass:d,unmaskTextClass:f,maskTextSelector:p,unmaskTextSelector:m}){function g(e){let n=sd(e),c=e.isTrusted,g=n&&iy(n.tagName);if("OPTION"===g&&(n=n.parentElement),!n||!g||0>sm.indexOf(g)||iZ(n,r,i,s,!0))return;let v=n;if(v.classList.contains(o)||a&&v.matches(a))return;let _=i_(n),b=ib(v,g,_),w=!1,E=ip({maskInputOptions:l,tagName:g,type:_}),S=ij(n,d,p,f,m,E);("radio"===_||"checkbox"===_)&&(w=n.checked),b=im({isMasked:S,element:n,value:b,maskInputFn:u}),y(n,h?{text:b,isChecked:w,userTriggered:c}:{text:b,isChecked:w});let T=n.name;"radio"===_&&T&&w&&t.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(e=>{if(e!==n){let t=im({isMasked:S,element:e,value:ib(e,g,_),maskInputFn:u});y(e,h?{text:t,isChecked:!w,userTriggered:!1}:{text:t,isChecked:!w})}})}function y(t,r){let i=sg.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){sg.set(t,r);let i=n.getId(t);su(e)({...r,id:i})}}let v=("last"===c.input?["change"]:["input","change"]).map(e=>i$(e,su(g),t)),_=t.defaultView;if(!_)return()=>{v.forEach(e=>e())};let b=_.Object.getOwnPropertyDescriptor(_.HTMLInputElement.prototype,"value"),w=[[_.HTMLInputElement.prototype,"value"],[_.HTMLInputElement.prototype,"checked"],[_.HTMLSelectElement.prototype,"value"],[_.HTMLTextAreaElement.prototype,"value"],[_.HTMLSelectElement.prototype,"selectedIndex"],[_.HTMLOptionElement.prototype,"selected"]];return b&&b.set&&v.push(...w.map(e=>(function e(t,n,r,i,s=window){let o=s.Object.getOwnPropertyDescriptor(t,n);return s.Object.defineProperty(t,n,i?r:{set(e){i7(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,n,o||{},!0)})(e[0],e[1],{set(){su(g)({target:this,isTrusted:!1})}},!1,_))),su(()=>
19{v.forEach(e=>e())})}(e),u=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:o}){let a=su(o=>iz(su(s=>{let a=sd(s);if(!a||iZ(a,t,n,r,!0))return;let{currentTime:l,volume:u,muted:c,playbackRate:h}=a;e({type:o,id:i.getId(a),currentTime:l,volume:u,muted:c,playbackRate:h})}),s.media||500)),l=[i$("play",a(0),o),i$("pause",a(1),o),i$("seeked",a(2),o),i$("volumechange",a(3),o),i$("ratechange",a(4),o)];return su(()=>{l.forEach(e=>e())})}(e),c=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){let i,s;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:su((r,i,s)=>{let[o,a]=s,{id:l,styleId:u}=sv(i,t,n.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:o,index:a}]}),r.apply(i,s)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:su((r,i,s)=>{let[o]=s,{id:a,styleId:l}=sv(i,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),r.apply(i,s)})}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:su((r,i,s)=>{let[o]=s,{id:a,styleId:l}=sv(i,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),r.apply(i,s)})})),r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:su((r,i,s)=>{let[o]=s,{id:a,styleId:l}=sv(i,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),r.apply(i,s)})}));let l={};sE("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(sE("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),sE("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),sE("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));let u={};return Object.entries(l).forEach(([r,i])=>{u[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(u[r].insertRule,{apply:su((r,i,s)=>{let[o,a]=s,{id:l,styleId:u}=sv(i.parentStyleSheet,t,n.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:o,index:[...sy(i),a||0]}]}),r.apply(i,s)})}),i.prototype.deleteRule=new Proxy(u[r].deleteRule,{apply:su((r,i,s)=>{let[o]=s,{id:a,styleId:l}=sv(i.parentStyleSheet,t,n.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...sy(i),o]}]}),r.apply(i,s)})})}),su(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=a,i&&(r.CSSStyleSheet.prototype.replace=i),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:n}),h=s_(e,e.doc),d=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:su((i,o,a)=>{let[l,u,c]=a;if(n.has(l))return s.apply(o,[l,u,c]);let{id:h,styleId:d}=sv(sc([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(h&&-1!==h||d&&-1!==d)&&e({id:h,styleId:d,set:{property:l,value:u,priority:c},index:sy(o.parentRule)}),i.apply(o,a)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:su((i,s,a)=>{let[l]=a;if(n.has(l))return o.apply(s,[l]);let{id:u,styleId:c}=sv(sc([s,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(u&&-1!==u||c&&-1!==c)&&e({id:u,styleId:c,remove:{property:l},index:sy(s.parentRule)}),i.apply(s,a)})}),su(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:n}),f=e.collectFonts?function({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(e,t,n){let r=new s(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=iH(t.fonts,"add",function(t){return function(n){return i7(su(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(o),su(()=>
19{r.forEach(e=>e())})}(e):()=>{},p=function(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:o}=e,a=!0,l=su(()=>{let e=t.getSelection();if(!e||a&&sc([e,"optionalAccess",e=>e.isCollapsed]))return;a=e.isCollapsed||!1;let l=[],u=e.rangeCount||0;for(let t=0;t<u;t++){let{startContainer:o,startOffset:a,endContainer:u,endOffset:c}=e.getRangeAt(t);iZ(o,r,i,s,!0)||iZ(u,r,i,s,!0)||l.push({start:n.getId(o),startOffset:a,end:n.getId(u),endOffset:c})}o({ranges:l})});return l(),i$("selectionchange",l)}(e),m=function({doc:e,customElementCb:t}){let n=e.defaultView;return n&&n.customElements?iH(n.customElements,"define",function(e){return function(n,r,i){try{t({define:{name:n}})}catch(e){}return e.apply(this,[n,r,i])}}):()=>{}}(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return su(()=>{sh.forEach(e=>e.reset()),r.disconnect(),i(),s(),o(),a(),l(),u(),c(),h(),d(),f(),p(),m(),g.forEach(e=>e())})}function sw(e){return void 0!==window[e]}function sE(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class sS{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),s.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}
19getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:r.get(t)||-1}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function sT(e){let t;let n=e[0],r=1;for(;r<e.length;){let i=e[r],s=e[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(t=n,n=s(n)):("call"===i||"optionalCall"===i)&&(n=s((...e)=>n.call(t,...e)),t=void 0)}return n}class sI{constructor(){this.crossOriginIframeMirror=new sS(iS),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class sk{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new sS(iS),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new sS(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}),sT([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){if("rrweb"!==e.data.type||e.origin!==e.data.origin||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case i8.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:i8.IncrementalSnapshot,data:{source:se.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case i8.Meta:case i8.Load:case i8.DomContentLoaded:break;case i8.Plugin:return t;case i8.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case i8.IncrementalSnapshot:switch(t.data.source){case se.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let 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 se.Drag:case se.TouchMove:case se.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case se.ViewportResize:return!1;case se.MediaInteraction:case se.MouseInteraction:case se.Scroll:case se.CanvasMutation:case se.Input:return this.replaceIds(t.data,e,["id"]),t;case se.StyleSheetRule:case se.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case se.Font:return t;case se.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case se.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),sT([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(let i of r)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));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.forEac
19h(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===M.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class sC{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class sx{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(!iu(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=sf({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(sp({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),i7(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(s_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(iH(e.prototype,"attachShadow",function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&i6(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class sR{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}}class sA{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new i4,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:ih(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 sO{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){!function(...e){i5("requestAnimationFrame")(...e)}(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,t){let 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 sN=new id;function sD(e={}){let t;let{emit:n,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:s="rr-block",blockSelector:o=null,unblockSelector:a=null,ignoreClass:l="rr-ignore",ignoreSelector:u=null,maskAllText:c=!1,maskTextClass:h="rr-mask",unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:v,maskAttributeFn:E,maskInputFn:S,maskTextFn:T,maxCanvasSize:I=null,packFn:k,sampling:C={},dataURLOptions:x={},mousemoveWait:R,recordCanvas:A=!1,recordCrossOriginIframes:O=!1,recordAfter:N="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:D=!1,collectFonts:M=!1,inlineImages:L=!1,plugins:P,keepIframeSrcFn:j=()=>!1,ignoreCSSAttributes:U=new Set([]),errorHandler:F,onMutation:B,getCanvasManager:$}=e;_=F;let V=!O||window.parent===window,q=!1;if(!V)try{window.parent.document&&(q=!1)}catch(e){q=!0}if(V&&!n)throw Error("emit function is required");void 0!==R&&void 0===C.mousemove&&(C.mousemove=R),sN.reset();let z=!0===g?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==y?y:{},H=!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===v,headMetaDescKeywords:"all"===v}:v||{};!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 TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}();let W=0,G=e=>{for(let t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!q&&(e=k(e)),e};b=(e,s)=>{if(e.timestamp=iW(),r0([sh,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&e.type!==i8.FullSnapshot&&!(e.type===i8.IncrementalSnapshot&&e.data.source===se.Mutation)&&sh.forEac
19h(e=>e.unfreeze()),V)r0([n,"optionalCall",t=>t(G(e),s)]);else if(q){let t={type:"rrweb",event:G(e),origin:window.location.origin,isCheckout:s};window.parent.postMessage(t,"*")}if(e.type===i8.FullSnapshot)t=e,W=0;else if(e.type===i8.IncrementalSnapshot){if(e.data.source===se.Mutation&&e.data.isAttachIframe)return;W++;let n=i&&W>=i,s=r&&t&&e.timestamp-t.timestamp>r;(n||s)&&en(!0)}};let K=e=>{b({type:i8.IncrementalSnapshot,data:{source:se.Mutation,...e}})},X=e=>b({type:i8.IncrementalSnapshot,data:{source:se.Scroll,...e}}),J=e=>b({type:i8.IncrementalSnapshot,data:{source:se.CanvasMutation,...e}}),Z=new sA({mutationCb:K,adoptedStyleSheetCb:e=>b({type:i8.IncrementalSnapshot,data:{source:se.AdoptedStyleSheet,...e}})}),Y="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new sI:new sk({mirror:sN,mutationCb:K,stylesheetManager:Z,recordCrossOriginIframes:O,wrappedEmit:b});for(let e of P||[])e.getMirror&&e.getMirror({nodeMirror:sN,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});let Q=new sO,ee=function(e,t){try{return e?e(t):new sR}catch(e){return console.warn("Unable to initialize CanvasManager"),new sR}}($,{mirror:sN,win:window,mutationCb:e=>b({type:i8.IncrementalSnapshot,data:{source:se.CanvasMutation,...e}}),recordCanvas:A,blockClass:s,blockSelector:o,unblockSelector:a,maxCanvasSize:I,sampling:C.canvas,dataURLOptions:x,errorHandler:F}),et="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new sC:new sx({mutationCb:K,scrollCb:X,bypassOptions:{onMutation:B,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:c,maskTextClass:h,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:z,dataURLOptions:x,maskAttributeFn:E,maskTextFn:T,maskInputFn:S,recordCanvas:A,inlineImages:L,sampling:C,slimDOMOptions:H,iframeManager:Y,stylesheetManager:Z,canvasManager:ee,keepIframeSrcFn:j,processedNodeManager:Q},mirror:sN}),en=(e=!1)=>{b({type:i8.Meta,data:{href:window.location.href,width:iX(),height:iK()}}
19,e),Z.reset(),et.init(),sh.forEach(e=>e.lock());let t=function(e,t){let{mirror:n=new id,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:o=!1,maskTextClass:a="rr-mask",unmaskTextClass:l=null,maskTextSelector:u=null,unmaskTextSelector:c=null,inlineStylesheet:h=!0,inlineImages:d=!1,recordCanvas:f=!1,maskAllInputs:p=!1,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOM:v=!1,dataURLOptions:_,preserveWhiteSpace:b,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:S,onStylesheetLoad:T,stylesheetLoadTimeout:I,keepIframeSrcFn:k=()=>!1}=t||{};return iF(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:o,maskTextClass:a,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===p?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===p?{}:p,maskAttributeFn:m,maskTextFn:g,maskInputFn:y,slimDOMOptions:!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===v,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===v?{}:v,dataURLOptions:_,inlineImages:d,recordCanvas:f,preserveWhiteSpace:b,onSerialize:w,onIframeLoad:E,iframeLoadTimeout:S,onStylesheetLoad:T,stylesheetLoadTimeout:I,keepIframeSrcFn:k,newlyAddedElement:!1})}(document,{mirror:sN,blockClass:s,blockSelector:o,unblockSelector:a,maskAllText:c,maskTextClass:h,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:z,maskAttributeFn:E,maskInputFn:S,maskTextFn:T,slimDOM:H,dataURLOptions:x,recordCanvas:A,inlineImages:L,onSerialize:e=>{i0(e,sN)&&Y.addIframe(e),i1(e,sN)&&Z.trackLinkElement(e),i2(e)&&et.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),et.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Z.attachLinkElement(e,t)},keepIframeSrcFn:j});if(!t)return console.warn("Failed to snapshot the document");b({type:i8.FullSnapshot,data:{node:t,initialOffset:iG(window)}}
19),sh.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,sN.getId(document))};w=en;try{let e=[],t=e=>su(sb)({onMutation:B,mutationCb:K,mousemoveCb:(e,t)=>b({type:i8.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>b({type:i8.IncrementalSnapshot,data:{source:se.MouseInteraction,...e}}),scrollCb:X,viewportResizeCb:e=>b({type:i8.IncrementalSnapshot,data:{source:se.ViewportResize,...e}}),inputCb:e=>b({type:i8.IncrementalSnapshot,data:{source:se.Input,...e}}),mediaInteractionCb:e=>b({type:i8.IncrementalSnapshot,data:{source:se.MediaInteraction,...e}}),styleSheetRuleCb:e=>b({type:i8.IncrementalSnapshot,data:{source:se.StyleSheetRule,...e}}),styleDeclarationCb:e=>b({type:i8.IncrementalSnapshot,data:{source:se.StyleDeclaration,...e}}),canvasMutationCb:J,fontCb:e=>b({type:i8.IncrementalSnapshot,data:{source:se.Font,...e}}),selectionCb:e=>{b({type:i8.IncrementalSnapshot,data:{source:se.Selection,...e}})},customElementCb:e=>{b({type:i8.IncrementalSnapshot,data:{source:se.CustomElement,...e}})},blockClass:s,ignoreClass:l,ignoreSelector:u,maskAllText:c,maskTextClass:h,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:z,inlineStylesheet:m,sampling:C,recordCanvas:A,inlineImages:L,userTriggeredOnInput:D,collectFonts:M,doc:e,maskAttributeFn:E,maskInputFn:S,maskTextFn:T,keepIframeSrcFn:j,blockSelector:o,unblockSelector:a,slimDOMOptions:H,dataURLOptions:x,mirror:sN,iframeManager:Y,stylesheetManager:Z,shadowDomManager:et,processedNodeManager:Q,canvasManager:ee,ignoreCSSAttributes:U,plugins:r0([P,"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=>b({type:i8.Plugin,data:{plugin:e.name,payload:t}})}))])||[]},{});Y.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{en(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(i$("DOMContentLoaded",()=>{b({type:i8.DomContentLoaded,data:{}}),"DOMContentLoaded"===N&&n()})),e.push(i$("load",()=>{b({type:i8.Load,data:{}}),"load"===N&&n()},window))),()=>{e.forEach(e=>e()),Q.destroy(),w=void 0,_=void 0}}catch(e){console.warn(e)}}function sM(e){return e>9999999999?e:1e3*e}function sL(e){return e>9999999999?e/1e3:e}function sP(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:i8.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:(0,eM.Fv)(t,10,1e3)}}),"console"===t.category)))}function sj(e){return e.closest("button,a")||e}function sU(e){let t=sF(e);return t&&t instanceof Element?sj(t):t}function sF(e){return"object"==typeof e&&e&&"target"in e?e.target:e}sD.mirror=sN,sD.takeFullSnapshot=function(e){if(!w)throw Error("please take full snapshot after start recording");w(e)};class sB{constructor(e,t,n=sP){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(){var e;let t=(e=()=>{this._lastMutation=sV()},E||(E=[],(0,V.hl)(ii,"open",function(e){return function(...t){if(E)try{E.forEach(e=>e())}catch(e){}return e.apply(ii,t)}})),E.push(e),()=>{let t=E?E.indexOf(e):-1;t>-1&&E.splice(t,1)});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){var n;if(n=this._ignoreSelector,!s$.includes(t.tagName)||"INPUT"===t.tagName&&!["submit","button"].includes(t.getAttribute("type")||"")||"A"===t.tagName&&(t.hasAttribute("download")||t.hasAttribute("target")&&"_self"!==t.getAttribute("target"))||n&&t.matches(n)||!(e.data&&"number"==typeof e.data.nodeId&&e.timestamp))return;let r={timestamp:sL(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===r.node&&1>
19Math.abs(e.timestamp-r.timestamp))||(this._clicks.push(r),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=sL(e)}registerScroll(e=Date.now()){this._lastScroll=sL(e)}registerClick(e){let t=sj(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=sV();for(let n of(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)}),e)){let e=this._clicks.indexOf(n);e>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,{clickCount:i,clickBreadcrumb:s}=e;if(!n&&!r){let n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",o={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.slowClickDetected",data:{...s.data,url:ii.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:i||1}};this._addBreadcrumbEvent(t,o);return}if(i>1){let e={type:"default",message:s.message,timestamp:s.timestamp,category:"ui.multiClick",data:{...s.data,url:ii.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)}}let s$=["A","BUTTON","INPUT"];function sV(){return Date.now()/1e3}function sq(e){return{timestamp:Date.now()/1e3,type:"default",...e}}(N=L||(L={}))[N.Document=0]="Document",N[N.DocumentType=1]="DocumentType",N[N.Element=2]="Element",N[N.Text=3]="Text",N[N.CDATA=4]="CDATA",N[N.Comment=5]="Comment";let sz=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]),sH=e=>t=>{if(!e.isEnabled())return;let n=function(e){let{target:t,message:n}=function(e){let t;let n="click"===e.name,r=null;try{r=n?sU(e.event):sF(e.event),t=(0,eD.Rt)(r,{maxStringLength:200})||"<unknown>"}catch(e){t="<unknown>"}return{target:r,message:t}}(e);return sq({category:`ui.${e.name}`,...sW(t,n)})}(t);if(!n)return;let r="click"===t.name,i=r?t.event:void 0;r&&e.clickDetector&&i&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&function(e,t,n){e.handleClick(t,n)}(e.clickDetector,n,sU(t.event)),sP(e,n)};function sW(e,t){let n=sD.mirror.getId(e),r=n&&sD.mirror.getNode(n),i=r&&sD.mirror.getMeta(r),s=i&&i.type===L.Element?i:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(e=>e.type===L.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(""),attributes:function(e){let t={};for(let n in e)if(sz.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}(s.attributes)}}:{}}}let sG={resource:function(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:o,encodedBodySize:a,responseStatus:l,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:sX(s),end:sX(i),name:r,data:{size:u,statusCode:l,decodedBodySize:o,encodedBodySize:a}}},paint:function(e){let{duration:t,entryType:n,name:r,startTime:i}=e,s=sX(i);return{type:n,name:r,start:s,end:s+t,data:void 0}},navigation:function(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:o,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,domInteractive:u,loadEventStart:c,loadEventEnd:h,redirectCount:d,startTime:f,transferSize:p,type:m}=e;return 0===i?null:{type:`${t}.${m}`,start:sX(f),end:sX(s),name:n,data:{size:p,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:l,loadEventStart:c,loadEventEnd:h,domComplete:s,redirectCount:d}}}};function sK(e){return sG[e.entryType]?sG[e.entryType](e):null}function sX(e){return((tJ.Z1||ii.performance.timeOrigin)+e)/1e3}
19class sJ extends Error{constructor(){super("Event buffer exceeded maximum size of 20000000.")}}class sZ{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){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>2e7)throw new sJ;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=this.events.map(e=>e.timestamp).sort()[0];return e?sM(e):null}}class sY{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(){this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{let s=({data:t})=>{if(t.method===e&&t.id===n){if(this._worker.removeEventListener("message",s),!t.success){i(Error("Error in compression worker"));return}r(t.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:e,arg:t})})}_getAndIncrementId(){return this._id++}}class sQ{constructor(e){this._worker=new sY(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){let t=sM(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return(this._totalSize+=n.length,this._totalSize>2e7)?Promise.reject(new sJ):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){let e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class s0{constructor(e){this._fallback=new sZ,this._compression=new sQ(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}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t}=this._fallback,n=[];for(let t of e)n.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._used=this._compression;try{await Promise.all(n)}catch(e){}}}function s1(){try{return"sessionStorage"in ii&&!!ii.sessionStorage}catch(e){return!1}}function s2(e){return void 0!==e&&Math.random()<e}function s4(e){let t=Date.now(),n=e.id||(0,q.DM)(),r=e.started||t,i=e.lastActivity||t;return{id:n,started:r,lastActivity:i,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function s9(e){if(s1())try{ii.sessionStorage.setItem(is,JSON.stringify(e))}catch(e){}}function s6({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=s4({sampled:s2(e)?"session":!!t&&"buffer",previousSessionId:r});return n&&s9(i),i}function s3(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function s5(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return s3(e.started,t,r)||s3(e.lastActivity,n,r)}function s7(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!!s5(e,{sessionIdleExpire:t,maxReplayDuration:n})&&("buffer"!==e.sampled||0!==e.segmentId)}function s8({traceInternals:e,sessionIdleExpire:t,maxReplayDuration:n,previousSessionId:r},i){let s=i.stickySession&&function(e){if(!s1())return null;try{let e=ii.sessionStorage.getItem(is);if(!e)return null;let t=JSON.parse(e);return s4(t)}catch(e){return null}}(0);return s?s7(s,{sessionIdleExpire:t,maxReplayDuration:n})?s6(i,{previousSessionId:s.id}):s:s6(i,{previousSessionId:r})}function oe(e,t,n){return!!on(e,t)&&(ot(e,t,n),!0)}async function ot(e,t,n){if(!e.eventBuffer)return null;try{n&&"buffer"===e.recordingMode&&e.eventBuffer.clear(),n&&(e.eventBuffer.hasCheckout=!0);let r=e.getOptions(),i=function(e,t){try{if("function"==typeof t&&e.type===i8.Custom)return t(e)}catch(e){return null}return e}(t,r.beforeAddRecordingEvent);if(!i)return;return await e.eventBuffer.addEvent(i)}catch(n){await e.stop({reason:n&&n instanceof sJ?"addEventSizeExceeded":"addEvent"});let t=(0,B.s3)();t&&t.recordDroppedEvent("internal_sdk_error","replay")}}
19function on(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=sM(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(e.getOptions()._experiments.traceInternals,!1))}function or(e){return"transaction"===e.type}function oi(e){return"feedback"===e.type}function os(e){let t=function(){let e=(0,B.s3)();if(!e)return!1;let t=e.getTransport();return!!t&&(t.send.__sentry__baseTransport__||!1)}();return(n,r)=>{if(!e.isEnabled()||n.type&&!or(n))return;let i=r&&r.statusCode;if(!t||i&&!(i<200)&&!(i>=300)){if(or(n)){!function(e,t){let n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}(e,n);return}!function(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;let{beforeErrorSampling:r}=e.getOptions();("function"!=typeof r||r(t))&&setTimeout(()=>{e.sendBufferedReplayOrFlush()})}(e,n)}}}function oo(e,t){return t.map(({type:t,start:n,end:r,name:i,data:s})=>{let o=e.throttledAddEvent({type:i8.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:s}}});return"string"==typeof o?Promise.resolve(null):o})}function oa(e,t){e.isEnabled()&&null!==t&&!function(e,t){let n=t&&void 0!==t.getClient?t.getClient():t,r=n&&n.getDsn(),i=n&&n.getOptions().tunnel;return!!r&&e.includes(r.host)||!!i&&ie(e)===ie(i)}(t.name,(0,B.s3)())&&e.addUpdate(()=>(oo(e,[t]),!0))}function ol(e,t){if(e)try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=og(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch(e){}}function ou(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function oc(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[og(e)];if(!e)return[void 0]}catch(e){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}function oh(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function od(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:o,request:a,response:l}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:(0,V.Jr)({method:s,statusCode:o,request:a,response:l})}}function of(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function op(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:s}=function(e){if(!e||"string"!=typeof e)return{body:e};let t=e.length>15e4,n=function(e){let t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}(e);if(t){let t=e.slice(0,15e4);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=i,s&&s.length>0&&(r._meta={warnings:s}),r}function om(e,t){return Object.keys(e).reduce((n,r)=>{let i=r.toLowerCase();return t.includes(i)&&e[r]&&(n[i]=e[r]),n},{})}function og(e){return new URLSearchParams(e).toString()}function oy(e,t){let n=function(e,t=ii.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(ii.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}(e);return(0,en.U0)(n,t)}async function ov(e,t,n){try{let r=await o_(e,t,n),i=od("resource.fetch",r);oa(n.replay,i)}catch(e){}}async function o_(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r}=t,{url:o,method:a,status_code:l=0,request_body_size:u,response_body_size:c}=e.data,h=oy(o,n.networkDetailAllowUrls)&&!oy(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:s,url:o,method:a,statusCode:l,request:h?function({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?1===n.length&&"string"!=typeof n[0]?oT(n[0],t):2===n.length?oT(n[1],t):{}:{};if(!e)return op(i,r,void 0);let[s,o]=oc(oE(n)),a=op(i,r,s);return o?oh(a,o):a}(n,t.input,u):of(u),response:await ob(h,n,t.response,c)}}async function ob(e,{networkCaptureBodies:t,textEncoder:n,networkResponseHeaders:r},i,s){if(!e&&void 0!==s)return of(s);let o=i?oS(i.headers,r):{};if(!i||!t&&void 0!==s)return op(o,s,void 0);let[a,l]=await ow(i),u=function(e,{networkCaptureBodies:t,textEncoder:n,responseBodySize:r,captureDetails:i,headers:s}){try{let o=e&&e.length&&void 0===r?ol(e,n):r;if(!i)return of(o);if(t)return op(s,o,e);return op(s,o,void 0)}catch(e){return op(s,r,void 0)}}(a,{networkCaptureBodies:t,textEncoder:n,responseBodySize:s,captureDetails:e,headers:o});return l?oh(u,l):u}async function ow(e){let t=function(e){try{return e.clone()}catch(e){}}(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];
19try{return[await new Promise((e,n)=>{let r=setTimeout(()=>n(Error("Timeout while trying to read response body")),500);oI(t).then(t=>e(t),e=>n(e)).finally(()=>clearTimeout(r))})]}catch(e){return[void 0,"BODY_PARSE_ERROR"]}}function oE(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function oS(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function oT(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?oS(n,t):Array.isArray(n)?{}:om(n,t):{}}async function oI(e){return await e.text()}async function ok(e,t,n){try{let r=function(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r,input:o,xhr:a}=t,{url:l,method:u,status_code:c=0,request_body_size:h,response_body_size:d}=e.data;if(!l)return null;if(!a||!oy(l,n.networkDetailAllowUrls)||oy(l,n.networkDetailDenyUrls)){let e=of(h);return{startTimestamp:i,endTimestamp:s,url:l,method:u,statusCode:c,request:e,response:of(d)}}let f=a[e5],p=f?om(f.request_headers,n.networkRequestHeaders):{},m=om(function(e){let t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce((e,t)=>{let[n,r]=t.split(": ");return e[n.toLowerCase()]=r,e},{}):{}}(a),n.networkResponseHeaders),[g,y]=n.networkCaptureBodies?oc(o):[void 0],[v,_]=n.networkCaptureBodies?function(e){let 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(e){return[void 0,"BODY_PARSE_ERROR"]}return[void 0,"UNPARSEABLE_BODY_TYPE"]}(e.response,e.responseType)}catch(e){t.push(e)}return[void 0]}(a):[void 0],b=op(p,h,g),w=op(m,d,v);return{startTimestamp:i,endTimestamp:s,url:l,method:u,statusCode:c,request:y?oh(b,y):b,response:_?oh(w,_):w}}(e,t,n),i=od("resource.xhr",r);oa(n.replay,i)}catch(e){}}let oC=null,ox=e=>t=>{if(!e.isEnabled())return;let n=function(e){let t=e.getLastBreadcrumb&&e.getLastBreadcrumb();return oC!==t&&t?(oC=t,!t.category||["fetch","xhr","sentry.event","sentry.transaction"].includes(t.category)||t.category.startsWith("ui."))?null:"console"===t.category?function(e){let t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return sq(e);let n=!1,r=t.map(e=>{if(!e)return e;if("string"==typeof e)return e.length>5e3?(n=!0,`${e.slice(0,5e3)}…`):e;if("object"==typeof e)try{let t=(0,eM.Fv)(e,7);if(JSON.stringify(t).length>5e3)return n=!0,`${JSON.stringify(t,null,2).slice(0,5e3)}…`;return t}catch(e){}return e});return sq({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}(t):sq(t):null}(t);n&&sP(e,n)};async function oR(e){try{return Promise.all(oo(e,[function(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}(ii.performance.memory)]))}catch(e){return[]}}async function oA({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit&&e.emit("preprocessEvent",r,i);let s=await (0,tz.R)(e.getOptions(),r,i,t,e,(0,G.aF)());if(!s)return null;s.platform=s.platform||"javascript";let o=e.getSdkMetadata&&e.getSdkMetadata(),{name:a,version:l}=o&&o.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:l||"0.0.0"},s}async function oO({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:s}){var o;let a;let l=function({recordingData:e,headers:t}){let n;let r=`${JSON.stringify(t)}
20`;if("string"==typeof e)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);(n=new Uint8Array(t.length+e.length)).set(t),n.set(e,t.length)}return n}({recordingData:e,headers:{segment_id:n}}),{urls:u,errorIds:c,traceIds:h,initialTimestamp:d}=r,f=(0,B.s3)(),p=(0,B.nZ)(),m=f&&f.getTransport(),g=f&&f.getDsn();if(!f||!m||!g||!s.sampled)return;let y={type:"replay_event",replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:c,trace_ids:h,urls:u,replay_id:t,segment_id:n,replay_type:s.sampled},v=await oA({scope:p,client:f,replayId:t,event:y});if(!v){f.recordDroppedEvent("event_processor","replay",y);return}delete v.sdkProcessingMetadata;let _=(o=f.getOptions().tunnel,tL(tB(v,tF(v),o,g),[[{type:"replay_event"},v],[{type:"replay_recording",length:"string"==typeof l?new TextEncoder().encode(l).length:l.length},l]]));try{a=await m.send(_)}catch(t){let e=Error(io);try{e.cause=t}catch(e){}throw e}if(!a)return a;
20if("number"==typeof a.statusCode&&(a.statusCode<200||a.statusCode>=300))throw new oN(a.statusCode);let b=t8({},a);if(t7(b,"replay"))throw new oD(b);return a}class oN extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class oD extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function oM(e,t={count:0,interval:5e3}){let{recordingData:n,options:r}=e;if(n.length)try{return await oO(e),!0}catch(n){if(n instanceof oN||n instanceof oD)throw n;if((0,B.v)("Replays",{_retryCount:t.count}),t.count>=3){let e=Error(`${io} - max retries exceeded`);try{e.cause=n}catch(e){}throw e}return t.interval*=++t.count,new Promise((n,r)=>{setTimeout(async()=>{try{await oM(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}let oL="__THROTTLED";class oP{constructor({options:e,recordingOptions:t}){oP.prototype.__init.call(this),oP.prototype.__init2.call(this),oP.prototype.__init3.call(this),oP.prototype.__init4.call(this),oP.prototype.__init5.call(this),oP.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,i,s;let o=n&&n.maxWait?Math.max(n.maxWait,t):0;function a(){return l(),r=e()}function l(){void 0!==i&&clearTimeout(i),void 0!==s&&clearTimeout(s),i=s=void 0}function u(){return i&&clearTimeout(i),i=setTimeout(a,t),o&&void 0===s&&(s=setTimeout(a,o)),r}return u.cancel=l,u.flush=function(){return void 0!==i||void 0!==s?a():r},u}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=function(e,t,n){let r=new Map,i=e=>{let t=e-5;r.forEach((e,n)=>{n<t&&r.delete(n)})},s=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...t)=>{let n=Math.floor(Date.now()/1e3);if(i(n),s()>=300){let e=o;return o=!0,e?"__SKIPPED":oL}o=!1;let a=r.get(n)||0;return r.set(n,a+1),e(...t)}}((e,t)=>on(this,e)?ot(this,e,t):Promise.resolve(null),0,0);let{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(3e3,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;i&&(this.clickDetector=new sB(this,i))}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options;if(!(t<=0)||!(n<=0)){if(this._initializeSessionForSampling(e),!this.session){this._handleException(Error("Unable to initialize and create session"));return}!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",this.recordingMode,this._options._experiments.traceInternals,this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)throw Error("Replay recording is already in progress");if(this._isEnabled&&"buffer"===this.recordingMode)throw Error("Replay buffering is in progress, call `flush()` to save the replay");this._options._experiments.traceInternals,this._updateUserActivity();let e=s8({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 Error("Replay recording is already in progress");this._options._experiments.traceInternals;let e=s8({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{var e;let t;let n=this._canvas;this._stopRecording=sD({...this._recordingOptions,..."buffer"===this.recordingMode&&{checkoutEveryNms:6e4},emit:(e=this,t=!1,(n,r)=>{if(!e.checkAndHandleExpiredSession())return;let i=r||!t;t=!0,e.clickDetector&&function(e,t){try{if(3!==t.type)return;let{source:n}=t.data;if(n===se.Mutation&&e.registerMutation(t.timestamp),n===se.Scroll&&e.registerScroll(t.timestamp),t.data.source===se.MouseInteraction){let{type:n,id:r}=t.data,i=sD.mirror.getNode(r);i instanceof HTMLElement&&n===st.Click&&e.registerClick(i)}}catch(e){}}(e.clickDetector,n),e.addUpdate(()=>{if("buffer"===e.recordingMode&&i&&e.setInitialState(),!oe(e,n,i)
20)return!0;if(!i)return!1;if(i&&e.session&&0===e.session.segmentId&&oe(e,function(e){let t=e.getOptions();return{type:i8.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.session&&e.session.previousSessionId)return!0;if("buffer"===e.recordingMode&&e.session&&e.eventBuffer){let t=e.eventBuffer.getEarliestTimestamp();t&&(e.getOptions()._experiments.traceInternals,e.session.started=t,e.getOptions().stickySession&&s9(e.session))}return"session"===e.recordingMode&&e.flush(),!0})}),onMutation:this._onMutationHandler,...n?{recordCanvas:n.recordCanvas,getCanvasManager:n.getCanvasManager,sampling:n.sampling,dataURLOptions:n.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{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,function(){if(s1())try{ii.sessionStorage.removeItem(is)}catch(e){}}(),this.session=void 0}catch(e){this._handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),this._options._experiments.traceInternals)}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),this._options._experiments.traceInternals)}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();let t=Date.now();this._options._experiments.traceInternals,await this.flushImmediate();let 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){let t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}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&&s3(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${ii.location.pathname}${ii.location.hash}${ii.location.search}`,t=`${ii.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){let n=this._throttledAddEvent(e,t);if(n===oL){let e=sq({category:"replay.throttled"});this.addUpdate(()=>!oe(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastTransaction||(0,B.nZ)().getTransaction(),t=(e&&(0,no.XU)(e).data||{})[nl];if(e&&t&&["route","custom"].includes(t))return(0,no.XU)(e).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=function({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=function(e){try{let t=e||("undefined"!=typeof __SENTRY_EXCLUDE_REPLAY_WORKER__&&__SENTRY_EXCLUDE_REPLAY_WORKER__?"":function(){let e=new Blob(['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<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}
vendor: 5,353 bytes, line 20
20},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>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<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>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;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(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<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=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<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},C=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=_(f,15),M=b.t,E=b.l,x=_(h,15),C=x.t,U=x.l,F=D(M),I=F.c,S=F.n,L=D(C),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=_(q,7),H=G.t,J=G.l,K=19;K>4&&!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+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(C,U,0),R=C;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){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,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<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>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}}},L=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<<o)-1,A=c.p||new n(32768),_=c.h||new n(z+1),x=Math.ceil(o/3),D=2*x,T=function(t){return(a[t]^a[t+1]<<x^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=_[H];if(A[J]=K,_[H]=J,B<=j){var N=v-j;if((L>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;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;
20++P){var rt=j-W+P&32767,et=rt-A[rt]&32767;et>nt&&(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;++j)F[q++]=a[j],++I[a[j]];p=C(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=_,c.p=A,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=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)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=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(L(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}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,a=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),s=a.length;return 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&&O(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)}}(a,n),O(a,s-8,r.d()),O(a,s-4,e),a}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(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=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(r){for(var e=new t(n.length),i=0;i<n.length;++i)e[i]=n.charCodeAt(i);return e}if(G)return G.encode(n);var a=n.length,s=new t(n.length+(n.length>>1)),o=0,f=function(t){s[o++]=t};for(i=0;i<a;++i){if(o+5>s.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)}const N=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<e;r++)n+=t[r].length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[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});']);return URL.createObjectURL(e)}());if(!t)return;let n=new Worker(t);return new s0(n)}catch(e){}}(t);if(e)return e}return new sZ}({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_handleException(e){}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=s8({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;let e=this.session;return!s7(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{ii.document.addEventListener("visibilitychange",this._handleVisibilityChange),ii.addEventListener("blur",this._handleWindowBlur),ii.addEventListener("focus",this._handleWindowFocus),ii.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(function(e){let t=(0,B.nZ)(),n=(0,B.s3)();t.addScopeListener(ox(e)),e4(sH(e)),tu(t=>{if(!e.isEnabled())return;let n=function(e){let{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(()=>(oo(e,[n]),!1)))}),function(e){let t=(0,B.s3)();try{let n=new TextEncoder,{networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:a}=e.getOptions(),l={replay:e,textEncoder:n,networkDetailAllowUrls:r,networkDetailDenyUrls:i,networkCaptureBodies:s,networkRequestHeaders:o,networkResponseHeaders:a};t&&t.on?t.on("beforeAddBreadcrumb",(e,t)=>(function(e,t,n){if(t.data)try{var r,i;"xhr"===t.category&&(r=n)&&r.xhr&&(function(e,t,n){let{xhr:r,input:i}=t;if(!r)return;let s=ol(i,n.textEncoder),o=r.getResponseHeader("content-length")?ou(r.getResponseHeader("content-length")):function(e,t,n){try{let r="json"===t&&e&&"object"==typeof e?JSON.stringify(e):e;return ol(r,n)}catch(e){return}}(r.response,r.responseType,n.textEncoder);void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}(t,n,e),ok(t,n,e)),"fetch"===t.category&&(i=n)&&i.response&&(function(e,t,n){let{input
20:r,response:i}=t,s=ol(r?oE(r):void 0,n.textEncoder),o=i?ou(i.headers.get("content-length")):void 0;void 0!==s&&(e.data.request_body_size=s),void 0!==o&&(e.data.response_body_size=o)}(t,n,e),ov(t,n,e))}catch(e){}})(l,e,t)):(tr(t=>{e.isEnabled()&&oa(e,function(e){let{startTimestamp:t,endTimestamp:n,fetchData:r,response:i}=e;if(!n)return null;let{method:s,url:o}=r;return{type:"resource.fetch",start:t/1e3,end:n/1e3,name:o,data:{method:s,statusCode:i?i.status:void 0}}}(t))}),e7(t=>{e.isEnabled()&&oa(e,function(e){let{startTimestamp:t,endTimestamp:n,xhr:r}=e,i=r[e5];if(!t||!n||!i)return null;let{method:s,url:o,status_code:a}=i;return void 0===o?null:{type:"resource.xhr",name:o,start:t/1e3,end:n/1e3,data:{method:s,statusCode:a}}}(t))}))}catch(e){}}(e);let r=function(e,t=!1){let n=t?os(e):void 0;return Object.assign((t,r)=>e.isEnabled()?"replay_event"===t.type?(delete t.breadcrumbs,t):(!t.type||or(t)||oi(t))&&e.checkAndHandleExpiredSession()?oi(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:i8.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)),t):!t.type&&t.exception&&t.exception.values&&t.exception.values.length&&r.originalException&&r.originalException.__rrweb__&&!e.getOptions()._experiments.captureExceptions?null:(("buffer"===e.recordingMode&&t.message!==io&&t.exception&&!t.type&&s2(e.getOptions().errorSampleRate)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),n&&n(t,{statusCode:200}),t):t:t,{id:"Replay"})}(e,!(n&&n.on));n&&n.addEventProcessor?n.addEventProcessor(r):function(e){let t=(0,B.s3)();t&&t.addEventProcessor&&t.addEventProcessor(e)}(r),n&&n.on&&(n.on("beforeSendEvent",t=>{e.isEnabled()&&!t.type&&function(e,t){let n=t.exception&&t.exception.values&&t.exception.values[0].value;"string"==typeof n&&(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))&&sP(e,sq({category:"replay.hydrate-error"}))}(e,t)}),n.on("afterSendEvent",os(e)),n.on("createDsc",t=>{let n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),n.on("startTransaction",t=>{e.lastTransaction=t}),n.on("finishTransaction",t=>{e.lastTransaction=t}),n.on("beforeSendFeedback",(t,n)=>{let r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)}))}(this),this._hasInitializedCoreListeners=!0)}catch(e){this._handleException(e)}this._performanceCleanupCallback=function(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];return["navigation","paint","resource"].forEach(e=>{r.push(rs(e,n))}),r.push(ri(({metric:t})=>{e.replayPerformanceEntries.push(function(e){let t=e.entries,n=t[t.length-1],r=n?n.element:void 0,i=e.value,s=sX(i);return{type:"largest-contentful-paint",name:"largest-contentful-paint",start:s,end:s,data:{value:i,size:i,nodeId:r?sD.mirror.getId(r):void 0}}}(t))})),()=>{r.forEach(e=>e())}}(this)}_removeListeners(){try{ii.document.removeEventListener("visibilitychange",this._handleVisibilityChange),ii.removeEventListener("blur",this._handleWindowBlur),ii.removeEventListener("focus",this._handleWindowFocus),ii.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this._handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===ii.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{let e=sq({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{let e=sq({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{!function(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=function(e){var t;let{metaKey:n,shiftKey:r,ctrlKey:i,altKey:s,key:o,target:a}=e;if(!a||"INPUT"===(t=a).tagName||"TEXTAREA"===t.tagName||t.isContentEditable||!o)return null;let l=n||i||s,u=1===o.length;if(!l&&u)return null;
20let c=(0,eD.Rt)(a,{maxStringLength:200})||"<unknown>",h=sW(a,c);return sq({category:"ui.keyDown",message:c,data:{...h.data,metaKey:n,shiftKey:r,ctrlKey:i,altKey:s,key:o}})}(t);n&&sP(e,n)}(this,e)}}_doChangeToBackgroundTasks(e){!this.session||s5(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){this.session&&this.checkAndHandleExpiredSession()&&e&&this._createCustomBreadcrumb(e)}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:i8.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=this.performanceEntries.map(sK).filter(Boolean).concat(this.replayPerformanceEntries);return this.performanceEntries=[],this.replayPerformanceEntries=[],Promise.all(oo(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}
20_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(this.session&&this.eventBuffer&&e&&(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents)&&(await oR(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw Error("Session is too long, not sending replay");let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();let i=await this.eventBuffer.finish();await oM({replayId:e,recordingData:i,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:t})}catch(t){this._handleException(t),this.stop({reason:"sendReplay"});let e=(0,B.s3)();e&&e.recordDroppedEvent("send_error","replay")}}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e||!this.checkAndHandleExpiredSession()||!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){this._options._experiments.traceInternals,r&&this._debouncedFlush();return}let s=this.eventBuffer;if(s&&0===this.session.segmentId&&!s.hasCheckout&&this._options._experiments.traceInternals,!this._flushLock){this._flushLock=this._runFlush(),await this._flushLock,this._flushLock=void 0;return}try{await this._flushLock}catch(e){}finally{this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&s9(this.session)}__init6(){this._onMutationHandler=e=>{let t=e.length,n=this._options.mutationLimit,r=this._options.mutationBreadcrumbLimit,i=n&&t>n;if(t>r||i){let e=sq({category:"replay.mutations",data:{count:t,limit:i}});this._createCustomBreadcrumb(e)}return!i||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function oj(e,t,n,r){let i=[...e,..."string"==typeof r?r.split(","):[],...t];return void 0!==n&&("string"==typeof n&&i.push(`.${n}`),(0,z.Cf)(()=>{console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")})),i.join(",")}let oU='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',oF=["content-length","content-type","accept"],oB=!1;class o${static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=5e3,flushMaxDelay:t=5500,minReplayDuration:n=4999,maxReplayDuration:r=36e5,stickySession:i=!0,useCompression:s=!0,workerUrl:o,_experiments:a={},sessionSampleRate:l,errorSampleRate:u,maskAllText:c=!0,maskAllInputs:h=!0,blockAllMedia:d=!0,mutationBreadcrumbLimit:f=750,mutationLimit:p=1e4,slowClickTimeout:m=7e3,slowClickIgnoreSelectors:g=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:v=[],networkCaptureBodies:_=!0,networkRequestHeaders:b=[],networkResponseHeaders:w=[],mask:E=[],maskAttributes:S=["title","placeholder"],unmask:T=[],block:I=[],unblock:k=[],ignore:C=[],maskFn:x,beforeAddRecordingEvent:R,beforeErrorSampling:A,blockClass:O,blockSelector:N,maskInputOptions:D,maskTextClass:M,maskTextSelector:L,ignoreClass:P}={}){this.name=o$.id;let j=function({mask:e,unmask:t,block:n,unblock:r,ignore:i,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:l,ignoreClass:u}){let c={maskTextSelector:oj(e,[".sentry-mask","[data-sentry-mask]"],a,l),unmaskTextSelector:oj(t,[".sentry-unmask","[data-sentry-unmask]"]),blockSelector:oj(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],s,o),unblockSelector:oj(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:oj(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],u)};return s instanceof RegExp&&(c.blockClass=s),a instanceof RegExp&&(c.maskTextClass=a),c}({mask:E,unmask:T,block:I,unblock:k,ignore:C,blockClass:O,blockSelector:N,maskTextClass:M,maskTextSelector:L,ignoreClass:P});if(this._recordingOptions={maskAllInputs:h,maskAllText:c,maskInputOptions:{...D||{},password:!0},maskTextFn:x,maskInputFn:x,maskAttributeFn:(e,t,n)=>(function({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:s}){return!r||i.unmaskTextSelector&&e.matches(i.unmaskTextSelector)?s:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?s.replace(/[\S]/g,"*"):s})({maskAttributes:S,maskAllText:c,privacyOptions:j,key:e,value:t,el:n}),...j,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,3
206e5),stickySession:i,sessionSampleRate:l,errorSampleRate:u,useCompression:s,workerUrl:o,blockAllMedia:d,maskAllInputs:h,maskAllText:c,mutationBreadcrumbLimit:f,mutationLimit:p,slowClickTimeout:m,slowClickIgnoreSelectors:g,networkDetailAllowUrls:y,networkDetailDenyUrls:v,networkCaptureBodies:_,networkRequestHeaders:oV(b),networkResponseHeaders:oV(w),beforeAddRecordingEvent:R,beforeErrorSampling:A,_experiments:a},"number"==typeof l&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.
21This option is deprecated and will be removed soon.
22Instead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:
23Sentry.init({ replaysSessionSampleRate: ${l} })`),this._initialOptions.sessionSampleRate=l),"number"==typeof u&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.
24This option is deprecated and will be removed soon.
25Instead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:
26Sentry.init({ replaysOnErrorSampleRate: ${u} })`),this._initialOptions.errorSampleRate=u),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${oU}`:oU),this._isInitialized&&ir())throw Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return oB}set _isInitialized(e){oB=e}setupOnce(){ir()&&(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(){let e=function(e){let t=(0,B.s3)(),n=t&&t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...(0,V.Jr)(e)};return n?(null==e.sessionSampleRate&&null==e.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&(0,z.Cf)(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate),"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate)):(0,z.Cf)(()=>{console.warn("SDK client is not available.")}),r}(this._initialOptions);this._replay=new oP({options:e,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(){try{let e=(0,B.s3)().getIntegrationByName("ReplayCanvas");if(!e)return;this._replay._canvas=e.getOptions()}catch(e){}}}function oV(e){return[...oF,...e.map(e=>e.toLowerCase())]}o$.__initStatic();var oq=window;oq.__sentryRewritesTunnelPath__="/monitoring",oq.SENTRY_RELEASE={id:"81ed227d3c892a2ac50c117066507f7541cd3a04"},oq.__sentryBasePath=void 0,oq.__rewriteFramesAssetPrefixPath__="",function(e){let t={environment:function(e){let t=e?"production":ns.env.VERCEL_ENV;return t?`vercel-${t}`:void 0}(!0)||"production",defaultIntegrations:function(e){let t=[...ni,r5()];return("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&$(e)&&t.push(rQ()),t}(e),...e};(function(e){let{integrations:t}=e;t&&(Array.isArray(t)?e.integrations=r8(t):e.integrations=e=>r8(t(e)))})(t),function(e){let t=r7.__sentryRewritesTunnelPath__;if(t&&e.dsn){let n=tD(e.dsn);if(!n)return;let r=n.host.match(/^o(\d+)\.ingest(?:\.([a-z]{2}))?\.sentry\.io$/);if(r){let i=r[1],s=r[2],o=`${t}?o=${i}&p=${n.projectId}`;s&&(o+=`&r=${s}`),e.tunnel=o,rK.X&&z.kg.info(`Tunneling events to "${o}"`)}else rK.X&&z.kg.warn("Provided DSN is not a Sentry SaaS DSN. Will not tunnel events.")}}(t),F(t,"nextjs",["nextjs","react"]),function(e){let t={...e};F(t,"react"),function(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=[...ni]),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),ey.SENTRY_RELEASE&&ey.SENTRY_RELEASE.id&&(e.release=ey.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0),function(e,t){!0===t.debug&&(H.X?z.kg.enable():(0,z.Cf)(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),(0,B.nZ)().update(t.initialScope);let n=new e(t);(function(e){let t=(0,G.Gd)().getStackTop();t.client=e,t.scope.setClient(e)})(n),n.init?n.init():n.setupIntegrations&&n.setupIntegrations()}(tZ,{...e,stackParser:(0,ew.Sq)(e.stackParser||t3),integrations:function(e){let t=e.defaultIntegrations||[],n=e.integrations;
26t.forEach(e=>{e.isDefaultInstance=!0});let r=function(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.keys(t).map(e=>t[e])}(Array.isArray(n)?[...t,...n]:"function"==typeof n?(0,q.lE)(n(t)):t),i=function(e,t){for(let n=0;n<e.length;n++)if(!0===t(e[n]))return n;return -1}(r,e=>"Debug"===e.name);if(-1!==i){let[e]=r.splice(i,1);r.push(e)}return r}(e),transport:e.transport||(tt()?nn:nr)}),e.autoSessionTracking&&void 0!==ey.document&&((0,B.yj)({ignoreDuration:!0}),(0,B.cg)(),tu(({from:e,to:t})=>{void 0!==e&&e!==t&&((0,B.yj)({ignoreDuration:!0}),(0,B.cg)())}))}(t)}(t);let n=(0,B.nZ)();n.setTag("runtime","browser");let r=e=>"transaction"===e.type&&"/404"===e.transaction?null:e;r.id="NextClient404Filter",n.addEventProcessor(r)}({enabled:!1,dsn:"https://cde10560eeca4dea4228713dda2fa6e7@o4504155694432256.ingest.us.sentry.io/4506828416548864",tracesSampleRate:1,debug:!1,replaysOnErrorSampleRate:1,replaysSessionSampleRate:.1,integrations:[new o$({maskAllText:!0,blockAllMedia:!0})],ignoreErrors:[/^Can't find variable: gmo$/]})},41654:function(e,t,n){"use strict";n.d(t,{EN:function(){return u},IQ:function(){return c},bU:function(){return o}});var r=n(46009),i=n(8642),s=n(7612);let o="baggage",a="sentry-",l=/^sentry-/;function u(e){if(!(0,i.HD)(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((e,t)=>{let n=h(t);for(let t of Object.keys(n))e[t]=n[t];return e},{});else{if(!e)return;t=h(e)}let n=Object.entries(t).reduce((e,[t,n])=>(t.match(l)&&(e[t.slice(a.length)]=n),e),{});return Object.keys(n).length>0?n:void 0}function c(e){if(e)return function(e){if(0!==Object.keys(e).length)return Object.entries(e).reduce((e,[t,n],i)=>{let o=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,a=0===i?o:`${e},${o}`;return a.length>8192?(r.X&&s.kg.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):a},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${a}${t}`]=n),e),{}))}function h(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(e[t]=n,e),{})}},9149:function(e,t,n){"use strict";n.d(t,{Rt:function(){return s},iY:function(){return l},l4:function(){return o},qT:function(){return a}});var r=n(8642);let i=(0,n(76692).R)();function s(e,t={}){if(!e)return"<unknown>";try{let n,s=e,o=[],a=0,l=0,u=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||80;for(;s&&a++<5&&(n=function(e,t){let n,s,o,a,l;let u=[];if(!e||!e.tagName)return"";if(i.HTMLElement&&e instanceof HTMLElement&&e.dataset&&e.dataset.sentryComponent)return e.dataset.sentryComponent;u.push(e.tagName.toLowerCase());let c=t&&t.length?t.filter(t=>e.getAttribute(t)).map(t=>[t,e.getAttribute(t)]):null;if(c&&c.length)c.forEach(e=>{u.push(`[${e[0]}="${e[1]}"]`)});else if(e.id&&u.push(`#${e.id}`),(n=e.className)&&(0,r.HD)(n))for(l=0,s=n.split(/\s+/);l<s.length;l++)u.push(`.${s[l]}`);let h=["aria-label","type","name","title","alt"];for(l=0;l<h.length;l++)o=h[l],(a=e.getAttribute(o))&&u.push(`[${o}="${a}"]`);return u.join("")}(s,u),"html"!==n&&(!(a>1)||!(l+3*o.length+n.length>=c)));)o.push(n),l+=n.length,s=s.parentNode;return o.reverse().join(" > ")}catch(e){return"<unknown>"}}function o(){try{return i.document.location.href}catch(e){return""}}function a(e){return i.document&&i.document.querySelector?i.document.querySelector(e):null}function l(e){if(!i.HTMLElement)return null;let t=e;for(let e=0;e<5&&t;e++){if(t instanceof HTMLElement&&t.dataset.sentryComponent)return t.dataset.sentryComponent;t=t.parentNode}return null}},46009:function(e,t,n){"use strict";n.d(t,{X:function(){return r}});let r=!1},17929:function(e,t,n){"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function i(){return"npm"}n.d(t,{S:function(){return i},n:function(){return r}})},8642:function(e,t,n){"use strict";n.d(t,{Cy:function(){return y},HD:function(){return u},J8:function(){return g},Kj:function(){return m},Le:function(){return c},PO:function(){return d},TX:function(){return a},V9:function(){return _},VW:function(){return o},VZ:function(){return i},cO:function(){return f},fm:function(){return l},i2:function(){return v},kK:function(){return p},pt:function(){return h},y1:function(){return b}});let r=Object.prototype.toString;function i(e){switch(r.call(e)){case"[object Error]":case"[object E
26xception]":case"[object DOMException]":return!0;default:return _(e,Error)}}function s(e,t){return r.call(e)===`[object ${t}]`}function o(e){return s(e,"ErrorEvent")}function a(e){return s(e,"DOMError")}function l(e){return s(e,"DOMException")}function u(e){return s(e,"String")}function c(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function h(e){return null===e||c(e)||"object"!=typeof e&&"function"!=typeof e}function d(e){return s(e,"Object")}function f(e){return"undefined"!=typeof Event&&_(e,Event)}function p(e){return"undefined"!=typeof Element&&_(e,Element)}function m(e){return s(e,"RegExp")}function g(e){return!!(e&&e.then&&"function"==typeof e.then)}function y(e){return d(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function v(e){return"number"==typeof e&&e!=e}function _(e,t){try{return e instanceof t}catch(e){return!1}}function b(e){return!!("object"==typeof e&&null!==e&&(e.__isVue||e._isVue))}},7612:function(e,t,n){"use strict";n.d(t,{Cf:function(){return a},LD:function(){return o},RU:function(){return s},kg:function(){return l}});var r=n(46009),i=n(76692);let s=["debug","info","warn","error","log","assert","trace"],o={};function a(e){if(!("console"in i.GLOBAL_OBJ))return e();let t=i.GLOBAL_OBJ.console,n={},r=Object.keys(o);r.forEach(e=>{let r=o[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}let l=function(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return r.X?s.forEach(n=>{t[n]=(...t)=>{e&&a(()=>{i.GLOBAL_OBJ.console[n](`Sentry Logger [${n}]:`,...t)})}}):s.forEach(e=>{t[e]=()=>void 0}),t}()},16374:function(e,t,n){"use strict";n.d(t,{DM:function(){return s},Db:function(){return l},EG:function(){return u},YO:function(){return c},jH:function(){return a},lE:function(){return h}});var r=n(61887),i=n(76692);function s(){let e=i.GLOBAL_OBJ,t=e.crypto||e.msCrypto,n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return"10000000100040008000100000000000".replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function o(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function a(e){let{message:t,event_id:n}=e;if(t)return t;let r=o(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function l(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function u(e,t){let n=o(e);if(!n)return;let r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){let e={...r&&r.data,...t.data};n.mechanism.data=e}}function c(e){if(e&&e.__sentry_captured__)return!0;try{(0,r.xp)(e,"__sentry_captured__",!0)}catch(e){}return!1}function h(e){return Array.isArray(e)?e:[e]}},41850:function(e,t,n){"use strict";n.d(t,{KV:function(){return s}});var r=n(17929);e=n.hmd(e);var i=n(34155);function s(){return!(0,r.n)()&&"[object process]"===Object.prototype.toString.call(void 0!==i?i:0)}},9569:function(e,t,n){"use strict";n.d(t,{Fv:function(){return o},Qy:function(){return function e(t,n=3,r=102400){let i=o(t,n);return~-encodeURI(JSON.stringify(i)).split(/%..|./).length>r?e(t,n-1,r):i}}});var r=n(8642),i=n(61887),s=n(78508);function o(e,t=100,o=Infinity){try{return function e(t,o,a=Infinity,l=Infinity,u=function(){let e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}()){let[c,h]=u;if(null==o||["number","boolean","string"].includes(typeof o)&&!(0,r.i2)(o))return o;let d=function(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(void 0!==n.g&&t===n.g)return"[Global]";if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if((0,r.y1)(t))return"[VueViewModel]";if((0,r.Cy)(t))return"[SyntheticEvent]";if("number"==typeof t&&t!=t)return"[NaN]";if("function"==typeof t)return`[Function: ${(0,s.$P)(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;let i=function(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(t);if(/^HTML(\w*)Element$/.test(i))return`[HTMLElement: ${i}]`;return`[object ${i}]`}catch(e){return`**non-serializable** (${e})`}}(t,o);if(!d.startsWith("[object "))return d;if(o.__sentry_skip_normalization__)return o;let f="number"==typeof o.__sentry_override_normalization_depth__?o.__sentry_override_normalization_depth__:a;if(0===f)return d.replace("object ","");if(c(o))return"[Circular ~]";
26if(o&&"function"==typeof o.toJSON)try{let t=o.toJSON();return e("",t,f-1,l,u)}catch(e){}let p=Array.isArray(o)?[]:{},m=0,g=(0,i.Sh)(o);for(let t in g){if(!Object.prototype.hasOwnProperty.call(g,t))continue;if(m>=l){p[t]="[MaxProperties ~]";break}let n=g[t];p[t]=e(t,n,f-1,l,u),m++}return h(o),p}("",e,t,o)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}},61887:function(e,t,n){"use strict";n.d(t,{$Q:function(){return c},HK:function(){return h},Jr:function(){return y},Sh:function(){return f},_j:function(){return d},hl:function(){return l},xp:function(){return u},zf:function(){return g}});var r=n(9149),i=n(46009),s=n(8642),o=n(7612),a=n(44293);function l(e,t,n){if(!(t in e))return;let r=e[t],i=n(r);"function"==typeof i&&c(i,r),e[t]=i}function u(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch(n){i.X&&o.kg.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function c(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,u(e,"__sentry_original__",t)}catch(e){}}function h(e){return e.__sentry_original__}function d(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function f(e){if((0,s.VZ)(e))return{message:e.message,name:e.name,stack:e.stack,...m(e)};if(!(0,s.cO)(e))return e;{let t={type:e.type,target:p(e.target),currentTarget:p(e.currentTarget),...m(e)};return"undefined"!=typeof CustomEvent&&(0,s.V9)(e,CustomEvent)&&(t.detail=e.detail),t}}function p(e){try{return(0,s.kK)(e)?(0,r.Rt)(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function m(e){if("object"!=typeof e||null===e)return{};{let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}}function g(e,t=40){let n=Object.keys(f(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return(0,a.$G)(n[0],t);for(let e=n.length;e>0;e--){let r=n.slice(0,e).join(", ");if(!(r.length>t)){if(e===n.length)return r;return(0,a.$G)(r,t)}}return""}function y(e){return function e(t,n){if(function(e){if(!(0,s.PO)(e))return!1;try{let t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(t)){let r=n.get(t);if(void 0!==r)return r;let i={};for(let r of(n.set(t,i),Object.keys(t)))void 0!==t[r]&&(i[r]=e(t[r],n));return i}if(Array.isArray(t)){let r=n.get(t);if(void 0!==r)return r;let i=[];return n.set(t,i),t.forEach(t=>{i.push(e(t,n))}),i}return t}(e,new Map)}},78508:function(e,t,n){"use strict";n.d(t,{$P:function(){return l},Sq:function(){return o},pE:function(){return s}});let r=/\(error: (.*)\)/,i=/captureMessage|captureException/;function s(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{let s=[],o=e.split("\n");for(let e=n;e<o.length;e++){let n=o[e];if(n.length>1024)continue;let i=r.test(n)?n.replace(r,"$1"):n;if(!i.match(/\S*Error: /)){for(let e of t){let t=e(i);if(t){s.push(t);break}}if(s.length>=50)break}}return function(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),i.test(t[t.length-1].function||"")&&(t.pop(),i.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,50).map(e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"}))}(s)}}function o(e){return Array.isArray(e)?s(...e):e}let a="<anonymous>";function l(e){try{if(!e||"function"!=typeof e)return a;return e.name||a}catch(e){return a}}},44293:function(e,t,n){"use strict";n.d(t,{$G:function(){return i},U0:function(){return o},nK:function(){return s}});var r=n(8642);function i(e,t=0){return"string"!=typeof e||0===t?e:e.length<=t?e:`${e.slice(0,t)}...`}function s(e,t){if(!Array.isArray(e))return"";let n=[];for(let t=0;t<e.length;t++){let i=e[t];try{(0,r.y1)(i)?n.push("[VueViewModel]"):n.push(String(i))}catch(e){n.push("[value cannot be serialized]")}}return n.join(t)}function o(e,t=[],n=!1){return t.some(t=>(function(e,t,n=!1){return!!(0,r.HD)(e)&&((0,r.Kj)(t)?t.test(e):!!(0,r.HD)(t)&&(n?e===t:e.includes(t)))})(e,t,n))}},73996:function(e,t,n){"use strict";n.d(t,{$2:function(){return a},WD:function(){return o},cW:function(){return l}});var r,i,s=n(8642);function o(e){return new l(t=>{t(e)})}function a(e){return new l((t,n)=>{n(e)})}(r=i||(i={}
26))[r.PENDING=0]="PENDING",r[r.RESOLVED=1]="RESOLVED",r[r.REJECTED=2]="REJECTED";class l{constructor(e){l.prototype.__init.call(this),l.prototype.__init2.call(this),l.prototype.__init3.call(this),l.prototype.__init4.call(this),this._state=i.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new l((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 l((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{if(i){n(r);return}t(r)})})}__init(){this._resolve=e=>{this._setResult(i.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(i.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===i.PENDING){if((0,s.J8)(t)){t.then(this._resolve,this._reject);return}this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===i.PENDING)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===i.RESOLVED&&e[1](this._value),this._state===i.REJECTED&&e[2](this._value),e[0]=!0)})}}}},61280:function(e,t,n){"use strict";n.d(t,{Z1:function(){return o},ph:function(){return s},yW:function(){return i}});var r=n(76692);function i(){return Date.now()/1e3}let s=function(){let{performance:e}=r.GLOBAL_OBJ;if(!e||!e.now)return i;let t=Date.now()-e.now(),n=void 0==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/1e3}(),o=(()=>{let{performance:e}=r.GLOBAL_OBJ;if(!e||!e.now)return;let t=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+t-n):36e5,s=e.timing&&e.timing.navigationStart,o="number"==typeof s?Math.abs(s+t-n):36e5;return i<36e5||o<36e5?i<=o?e.timeOrigin:s:n})()},56819:function(e,t,n){"use strict";n.d(t,{$p:function(){return u},KA:function(){return a},pT:function(){return l}});var r=n(41654),i=n(16374);let s=RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function o(e){let t;if(!e)return;let n=e.match(s);if(n)return"1"===n[3]?t=!0:"0"===n[3]&&(t=!1),{traceId:n[1],parentSampled:t,parentSpanId:n[2]}}function a(e,t){let n=o(e),s=(0,r.EN)(t),{traceId:a,parentSpanId:l,parentSampled:u}=n||{};return n?{traceparentData:n,dynamicSamplingContext:s||{},propagationContext:{traceId:a||(0,i.DM)(),parentSpanId:l||(0,i.DM)().substring(16),spanId:(0,i.DM)().substring(16),sampled:u,dsc:s||{}}}:{traceparentData:n,dynamicSamplingContext:void 0,propagationContext:{traceId:a||(0,i.DM)(),spanId:(0,i.DM)().substring(16)}}}function l(e,t){let n=o(e),s=(0,r.EN)(t),{traceId:a,parentSpanId:l,parentSampled:u}=n||{};return n?{traceId:a||(0,i.DM)(),parentSpanId:l||(0,i.DM)().substring(16),spanId:(0,i.DM)().substring(16),sampled:u,dsc:s||{}}:{traceId:a||(0,i.DM)(),spanId:(0,i.DM)().substring(16)}}function u(e=(0,i.DM)(),t=(0,i.DM)().substring(16),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${e}-${t}${r}`}},76692:function(e,t,n){"use strict";function r(e){return e&&e.Math==Math?e:void 0}n.d(t,{GLOBAL_OBJ:function(){return i},R:function(){return s},Y:function(){return o}});let i="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof n.g&&r(n.g)||function(){return this}()||{};function s(){return i}function o(e,t,n){let r=n||i,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}},70031:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return l.ReadonlyURLSearchParams},RedirectType:function(){return l.RedirectType},ServerInsertedHTMLContext:function(){return u.ServerInsertedHTMLContext},notFound:function(){return l.notFound},permanentRedirect:function(){return l.permanentRedirect},redirect:function(){return l.redirect},useParams:function(){return f},usePathname:function(){return h},useRouter:function(){return d},useSearchParams:function(){return c},useSelectedLayoutSegment:function(){return m},useSelectedLayoutSegments:function(){return p},useServerInsertedHTML:function(){return u.useServerInsertedHTML}});let r=n(67294),i=n(3068),s=n(10213),o=n(66162),a=n(73737),l=n(46209),u=n(3744);function c(){let e=(0,r.useContext)(s.SearchParamsContext);return(0,r.useMemo)(()=>e?new l.ReadonlyURLSearchParams(e):null,[e])}function h(){return(0,r.useContext)(s.PathnameContext)}function d(){let e=(0,r.useContext)(i.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mou
26nted");return e}function f(){return(0,r.useContext)(s.PathParamsContext)}function p(e){void 0===e&&(e="children");let t=(0,r.useContext)(i.LayoutRouterContext);return t?function e(t,n,r,i){let s;if(void 0===r&&(r=!0),void 0===i&&(i=[]),r)s=t[1][n];else{var l;let e=t[1];s=null!=(l=e.children)?l:Object.values(e)[0]}if(!s)return i;let u=s[0],c=(0,o.getSegmentValue)(u);return!c||c.startsWith(a.PAGE_SEGMENT_KEY)?i:(i.push(c),e(s,n,!1,i))}(t.tree,e):null}function m(e){void 0===e&&(e="children");let t=p(e);if(!t||0===t.length)return null;let n="children"===e?t[0]:t[t.length-1];return n===a.DEFAULT_SEGMENT_KEY?null:n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},46209:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return o},RedirectType:function(){return r.RedirectType},notFound:function(){return i.notFound},permanentRedirect:function(){return r.permanentRedirect},redirect:function(){return r.redirect}});let r=n(67878),i=n(95610);class s extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class o extends URLSearchParams{append(){throw new s}delete(){throw new s}set(){throw new s}sort(){throw new s}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},95610:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{isNotFoundError:function(){return i},notFound:function(){return r}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function i(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19598:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}}),(r=n||(n={}))[r.SeeOther=303]="SeeOther",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},67878:function(e,t,n){"use strict";var r,i;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return u},getRedirectStatusCodeFromError:function(){return m},getRedirectTypeFromError:function(){return p},getURLFromRedirectError:function(){return f},isRedirectError:function(){return d},permanentRedirect:function(){return h},redirect:function(){return c}});let s=n(40837),o=n(34134),a=n(19598),l="NEXT_REDIRECT";function u(e,t,n){void 0===n&&(n=a.RedirectStatusCode.TemporaryRedirect);let r=Error(l);r.digest=l+";"+t+";"+e+";"+n+";";let i=s.requestAsyncStorage.getStore();return i&&(r.mutableCookies=i.mutableCookies),r}function c(e,t){void 0===t&&(t="replace");let n=o.actionAsyncStorage.getStore();throw u(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function h(e,t){void 0===t&&(t="replace");let n=o.actionAsyncStorage.getStore();throw u(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,n,r,i]=e.digest.split(";",4),s=Number(i);
26return t===l&&("replace"===n||"push"===n)&&"string"==typeof r&&!isNaN(s)&&s in a.RedirectStatusCode}function f(e){return d(e)?e.digest.split(";",3)[2]:null}function p(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function m(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(i=r||(r={})).push="push",i.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},66162:function(e,t){"use strict";function n(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75132:function(e,t){"use strict";var n,r,i,s;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION_FAST_REFRESH:function(){return h},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return c},ACTION_REFRESH:function(){return o},ACTION_RESTORE:function(){return l},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return u},PrefetchCacheEntryStatus:function(){return r},PrefetchKind:function(){return n},isThenable:function(){return f}});let o="refresh",a="navigate",l="restore",u="server-patch",c="prefetch",h="fast-refresh",d="server-action";function f(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(i=n||(n={})).AUTO="auto",i.FULL="full",i.TEMPORARY="temporary",(s=r||(r={})).fresh="fresh",s.reusable="reusable",s.expired="expired",s.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92842:function(e,t,n){"use strict";function r(e,t,n,r){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return r}}),n(68796),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63500:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return b}});let r=n(38754),i=n(85893),s=r._(n(67294)),o=n(64813),a=n(65853),l=n(5058),u=n(45782),c=n(28878),h=n(37171),d=n(3068),f=n(91487),p=n(92842),m=n(41412),g=n(75132),y=new Set;function v(e,t,n,r,i,s){if(s||(0,a.isLocalURL)(t)){if(!r.bypassPrefetchedCheck){let i=t+"%"+n+"%"+(void 0!==r.locale?r.locale:"locale"in e?e.locale:void 0);if(y.has(i))return;y.add(i)}(async()=>s?e.prefetch(t,i):e.prefetch(t,n,r))().catch(e=>{})}}function _(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let b=s.default.forwardRef(function(e,t){let n,r;let{href:l,as:y,children:b,prefetch:w=null,passHref:E,replace:S,shallow:T,scroll:I,locale:k,onClick:C,onMouseEnter:x,onTouchStart:R,legacyBehavior:A=!1,...O}=e;n=b,A&&("string"==typeof n||"number"==typeof n)&&(n=(0,i.jsx)("a",{children:n}));let N=s.default.useContext(h.RouterContext),D=s.default.useContext(d.AppRouterContext),M=null!=N?N:D,L=!N,P=!1!==w,j=null===w?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:U,as:F}=s.default.useMemo(()=>{if(!N){let e=_(l);return{href:e,as:y?_(y):e}}let[e,t]=(0,o.resolveHref)(N,l,!0);return{href:e,as:y?(0,o.resolveHref)(N,y):t||e}},[N,l,y]),B=s.default.useRef(U),$=s.default.useRef(F);A&&(r=s.default.Children.only(n));let V=A?r&&"object"==typeof r&&r.ref:t,[q,z,H]=(0,f.useIntersection)({rootMargin:"200px"}),W=s.default.useCallback(e=>{($.current!==F||B.current!==U)&&(H(),$.current=F,B.current=U),q(e),V&&("function"==typeof V?V(e):"object"==typeof V&&(V.current=e))},[F,V,U,H,q]);s.default.useEffect(()=>{M&&z&&P&&v(M,U,F,{locale:k},{kind:j},L)},[F,U,z,k,P,null==N?void 0:N.locale,M,L,j]);let G={ref:W,onClick(e){A||"function"!=typeof C||C(e),A&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),M&&!e.defaultPrevented&&function(e,t,n,r,i,o,l,u,c){let{nodeName:h}=e.currentTarget;if("A"===h.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,a.isLocalURL)(n)))return;e.preventDefault();let d=()=>{let e=null==l||l;"beforePopState"in t?t[i?"replace":"push"](n,r,{shallow:o,locale:u,scroll:e}):t[i?"replace":"push"](r||n,{scroll:e})};c?s.default.startTransition(d):d()}(e,M,U,F,S,T,I,k,L)},onMouseEnter(e){A||"function"!=typeof x||x(e),A&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),M&&(P||!L)&&v(M,U,F,{locale:k,priority:!0,bypassPrefetchedCheck:!0},{kind:j},L)},onTouchStart:function(e){A||"function"!=typeof R||R(e),A&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),M&&(P||!L)&&v(M,U,F,{locale:k,priority:!0,bypassPrefetchedCheck:!0},{kind:j},L)}};if((0,u.isAbsoluteUrl)(F))G.href=F;else if(!A||E||"a"===r.type&&!("href"in r.props)){let e=void 0!==k?k:null==N?void 0:N.locale,t=(null==N?void 0:N.isLocaleDomain)&&(0,p.getDomainLocale)(F,e,null==N?void 0:N.locales,null==N?void 0:N.domainLocales);G.href=t||(0,m.addBasePath)((0,c.addLocale)(F,e,null==N?void 0:N.defaultLocale))}return A?s.default.cloneElement(r,G):(0,i.jsx)("a",{...O,...G,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esMo
26dule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},91487:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(67294),i=n(66078),s="function"==typeof IntersectionObserver,o=new Map,a=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,u=l||!s,[c,h]=(0,r.useState)(!1),d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{d.current=e},[]);return(0,r.useEffect)(()=>{if(s){if(u||c)return;let e=d.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:i,elements:s}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=a.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=o.get(r)))return t;let i=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=i.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:i},a.push(n),o.set(n,t),t}(n);return s.set(e,t),i.observe(e),function(){if(s.delete(e),i.unobserve(e),0===s.size){i.disconnect(),o.delete(r);let e=a.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&a.splice(e,1)}}}(e,e=>e&&h(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,i.requestIdleCallback)(()=>h(!0));return()=>(0,i.cancelIdleCallback)(e)}},[u,n,t,c,d.current]),[f,c,(0,r.useCallback)(()=>{h(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return i},useServerInsertedHTML:function(){return s}});let r=n(61757)._(n(67294)),i=r.default.createContext(null);function s(e){let t=(0,r.useContext)(i);t&&t(e)}},7644:function(e,t,n){"use strict";var r=n(93967),i=n.n(r),s=n(67294),o=n(70861),a=n(98814),l=n(85893);let u=s.forwardRef((e,t)=>{let{as:n,bsPrefix:r,variant:s="primary",size:u,active:c=!1,disabled:h=!1,className:d,...f}=e,p=(0,a.vE)(r,"btn"),[m,{tagName:g}]=(0,o.FT)({tagName:n,disabled:h,...f});return(0,l.jsx)(g,{...m,...f,ref:t,disabled:h,className:i()(d,p,c&&"active",s&&"".concat(p,"-").concat(s),u&&"".concat(p,"-").concat(u),f.href&&h&&"disabled")})});u.displayName="Button",t.Z=u},48945:function(e,t,n){"use strict";var r=n(45697),i=n.n(r),s=n(67294),o=n(93967),a=n.n(o),l=n(85893);let u={"aria-label":i().string,onClick:i().func,variant:i().oneOf(["white"])},c=s.forwardRef((e,t)=>{let{className:n,variant:r,"aria-label":i="Close",...s}=e;return(0,l.jsx)("button",{ref:t,type:"button",className:a()("btn-close",r&&"btn-close-".concat(r),n),"aria-label":i,...s})});c.displayName="CloseButton",c.propTypes=u,t.Z=c},41818:function(e,t,n){"use strict";var r=n(93967),i=n.n(r),s=n(67294),o=n(84527),a=n(31829),l=n(70570),u=n(43473),c=n(85893);let h={[o.d0]:"show",[o.cn]:"show"},d=s.forwardRef((e,t)=>{let{className:n,children:r,transitionClasses:o={},onEnter:d,...f}=e,p={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...f},m=(0,s.useCallback)((e,t)=>{(0,l.Z)(e),null==d||d(e,t)},[d]);return(0,c.jsx)(u.Z,{ref:t,addEndListener:a.Z,...p,onEnter:m,childRef:r.ref,children:(e,t)=>s.cloneElement(r,{...t,className:i()("fade",n,r.props.className,h[e],o[e])})})});d.displayName="Fade",t.Z=d},43553:function(e,t,n){"use strict";let r,i;n.d(t,{Z:function(){return es}});var s,o=n(93967),a=n.n(o),l=n(9351),u=n(23004),c=n(67216),h=n(30099);function d(e){if((!s&&0!==s||e)&&u.Z){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),s=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return s}var f=n(32092),p=n(78146),m=n(35654),g=n(67294);function y(e){let t=function(e){let t=(0,g.useRef)(e);return t.current=e,t}(e);(0,g.useEffect)(()=>()=>t.current(),[])}var v=n(94305);function _(e){void 0===e&&(e=(0,c.Z)());try{var t=e.activeElement;if(!t||!t.nodeName)return null;return t}catch(t){return e.body}}function b(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):void 0}var w=n(72950),E=n(73935),S=n(6454),T=n(88833),I=n(91505);let k="data-rr-ui-modal-open";class C{constructor({ownerDocument:e,handleContainerOverflow:t=!0,isRTL:n=!1}={}){this.handleContainerOverflow=t,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(e=document){return Math.abs(e.defaultView.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){let t={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(t[n]=`${parseInt((0,I.Z)(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(k,""),(0,I.Z)(r,t)}
26reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){let t=this.getElement();t.removeAttribute(k),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return -1!==t||(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state))),t}remove(e){let t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}var x=C;let R=(0,g.createContext)(u.Z?window:void 0);function A(){return(0,g.useContext)(R)}R.Provider;let O=(e,t)=>u.Z?null==e?(t||(0,c.Z)()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect))?e:null:null;var N=n(99585),D=function({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:i}){let s=(0,g.useRef)(null),o=(0,g.useRef)(t),a=(0,p.Z)(n);(0,g.useEffect)(()=>{t?o.current=!0:a(s.current)},[t,a]);let l=(0,m.Z)(s,e.ref),u=(0,g.cloneElement)(e,{ref:l});return t?u:i||!o.current&&r?null:u},M=n(85893);function L({children:e,in:t,onExited:n,onEntered:r,transition:i}){let[s,o]=(0,g.useState)(!t);t&&s&&o(!1);let a=function({in:e,onTransition:t}){let n=(0,g.useRef)(null),r=(0,g.useRef)(!0),i=(0,p.Z)(t);return(0,N.Z)(()=>{if(!n.current)return;let t=!1;return i({in:e,element:n.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,i]),(0,N.Z)(()=>(r.current=!1,()=>{r.current=!0}),[]),n}({in:!!t,onTransition:e=>{Promise.resolve(i(e)).then(()=>{e.isStale()||(e.in?null==r||r(e.element,e.initial):(o(!0),null==n||n(e.element)))},t=>{throw e.in||o(!0),t})}}),l=(0,m.Z)(a,e.ref);return s&&!t?null:(0,g.cloneElement)(e,{ref:l})}function P(e,t,n){return e?(0,M.jsx)(e,Object.assign({},n)):t?(0,M.jsx)(L,Object.assign({},n,{transition:t})):(0,M.jsx)(D,Object.assign({},n))}let j=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"],U=(0,g.forwardRef)((e,t)=>{let{show:n=!1,role:i="dialog",className:s,style:o,children:a,backdrop:l=!0,keyboard:c=!0,onBackdropClick:h,onEscapeKeyDown:d,transition:f,runTransition:m,backdropTransition:v,runBackdropTransition:I,autoFocus:k=!0,enforceFocus:C=!0,restoreFocus:R=!0,restoreFocusOptions:N,renderDialog:D,renderBackdrop:L=e=>(0,M.jsx)("div",Object.assign({},e)),manager:U,container:F,onShow:B,onHide:$=()=>{},onExit:V,onExited:q,onExiting:z,onEnter:H,onEntering:W,onEntered:G}=e,K=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r<s.length;r++)n=s[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,j),X=A(),J=function(e,t){let n=A(),[r,i]=(0,g.useState)(()=>O(e,null==n?void 0:n.document));if(!r){let t=O(e);t&&i(t)}return(0,g.useEffect)(()=>{},[void 0,r]),(0,g.useEffect)(()=>{let t=O(e);t!==r&&i(t)},[e,r]),r}(F),Z=function(e){let t=A(),n=e||(r||(r=new x({ownerDocument:null==t?void 0:t.document})),r),i=(0,g.useRef)({dialog:null,backdrop:null});return Object.assign(i.current,{add:()=>n.add(i.current),remove:()=>n.remove(i.current),isTopModal:()=>n.isTopModal(i.current),setDialogRef:(0,g.useCallback)(e=>{i.current.dialog=e},[]),setBackdropRef:(0,g.useCallback)(e=>{i.current.backdrop=e},[])})}(U),Y=(0,S.Z)(),Q=(0,T.Z)(n),[ee,et]=(0,g.useState)(!n),en=(0,g.useRef)(null);(0,g.useImperativeHandle)(t,()=>Z,[Z]),u.Z&&!Q&&n&&(en.current=_(null==X?void 0:X.document)),n&&ee&&et(!1);let er=(0,p.Z)(()=>{if(Z.add(),eu.current=(0,w.Z)(document,"keydown",ea),el.current=(0,w.Z)(document,"focus",()=>setTimeout(es),!0),B&&B(),k){var e,t;let n=_(null!=(e=null==(t=Z.dialog)?void 0:t.ownerDocument)?e:null==X?void 0:X.document);Z.dialog&&n&&!b(Z.dialog,n)&&(en.current=n,Z.dialog.focus())}}),ei=(0,p.Z)(()=>
26{if(Z.remove(),null==eu.current||eu.current(),null==el.current||el.current(),R){var e;null==(e=en.current)||null==e.focus||e.focus(N),en.current=null}});(0,g.useEffect)(()=>{n&&J&&er()},[n,J,er]),(0,g.useEffect)(()=>{ee&&ei()},[ee,ei]),y(()=>{ei()});let es=(0,p.Z)(()=>{if(!C||!Y()||!Z.isTopModal())return;let e=_(null==X?void 0:X.document);Z.dialog&&e&&!b(Z.dialog,e)&&Z.dialog.focus()}),eo=(0,p.Z)(e=>{e.target===e.currentTarget&&(null==h||h(e),!0===l&&$())}),ea=(0,p.Z)(e=>{c&&("Escape"===e.code||27===e.keyCode)&&Z.isTopModal()&&(null==d||d(e),e.defaultPrevented||$())}),el=(0,g.useRef)(),eu=(0,g.useRef)();if(!J)return null;let ec=Object.assign({role:i,ref:Z.setDialogRef,"aria-modal":"dialog"===i||void 0},K,{style:o,className:s,tabIndex:-1}),eh=D?D(ec):(0,M.jsx)("div",Object.assign({},ec,{children:g.cloneElement(a,{role:"document"})}));eh=P(f,m,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:V,onExiting:z,onExited:(...e)=>{et(!0),null==q||q(...e)},onEnter:H,onEntering:W,onEntered:G,children:eh});let ed=null;return l&&(ed=P(v,I,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:ed=L({ref:Z.setBackdropRef,onClick:eo})})),(0,M.jsx)(M.Fragment,{children:E.createPortal((0,M.jsxs)(M.Fragment,{children:[ed,eh]}),J)})});U.displayName="Modal";var F=Object.assign(U,{Manager:x}),B=Function.prototype.bind.call(Function.prototype.call,[].slice);function $(e,t){return B(e.querySelectorAll(t))}
26function V(e,t){return e.replace(RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}let q={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class z extends x{adjustAndStore(e,t,n){let r=t.style[e];t.dataset[e]=r,(0,I.Z)(t,{[e]:"".concat(parseFloat((0,I.Z)(t,e))+n,"px")})}restore(e,t){let n=t.dataset[e];void 0!==n&&(delete t.dataset[e],(0,I.Z)(t,{[e]:n}))}setContainerStyle(e){var t,n;super.setContainerStyle(e);let r=this.getElement();if(n="modal-open",(t=r).classList?t.classList.add(n):(t.classList?n&&t.classList.contains(n):-1!==(" "+(t.className.baseVal||t.className)+" ").indexOf(" "+n+" "))||("string"==typeof t.className?t.className=t.className+" "+n:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+n)),!e.scrollBarWidth)return;let i=this.isRTL?"paddingLeft":"paddingRight",s=this.isRTL?"marginLeft":"marginRight";$(r,q.FIXED_CONTENT).forEach(t=>this.adjustAndStore(i,t,e.scrollBarWidth)),$(r,q.STICKY_CONTENT).forEach(t=>this.adjustAndStore(s,t,-e.scrollBarWidth)),$(r,q.NAVBAR_TOGGLER).forEach(t=>this.adjustAndStore(s,t,e.scrollBarWidth))}removeContainerStyle(e){var t;super.removeContainerStyle(e);let n=this.getElement();t="modal-open",n.classList?n.classList.remove(t):"string"==typeof n.className?n.className=V(n.className,t):n.setAttribute("class",V(n.className&&n.className.baseVal||"",t));let r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";$(n,q.FIXED_CONTENT).forEach(e=>this.restore(r,e)),$(n,q.STICKY_CONTENT).forEach(e=>this.restore(i,e)),$(n,q.NAVBAR_TOGGLER).forEach(e=>this.restore(i,e))}}var H=n(41818),W=n(98814);let G=g.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:i="div",...s}=e;return r=(0,W.vE)(r,"modal-body"),(0,M.jsx)(i,{ref:t,className:a()(n,r),...s})});G.displayName="ModalBody";let K=g.createContext({onHide(){}}),X=g.forwardRef((e,t)=>{let{bsPrefix:n,className:r,contentClassName:i,centered:s,size:o,fullscreen:l,children:u,scrollable:c,...h}=e;n=(0,W.vE)(n,"modal");let d="".concat(n,"-dialog"),f="string"==typeof l?"".concat(n,"-fullscreen-").concat(l):"".concat(n,"-fullscreen");return(0,M.jsx)("div",{...h,ref:t,className:a()(d,r,o&&"".concat(n,"-").concat(o),s&&"".concat(d,"-centered"),c&&"".concat(d,"-scrollable"),l&&f),children:(0,M.jsx)("div",{className:a()("".concat(n,"-content"),i),children:u})})});X.displayName="ModalDialog";let J=g.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:i="div",...s}=e;return r=(0,W.vE)(r,"modal-footer"),(0,M.jsx)(i,{ref:t,className:a()(n,r),...s})});J.displayName="ModalFooter";var Z=n(48945);let Y=g.forwardRef((e,t)=>{let{closeLabel:n="Close",closeVariant:r,closeButton:i=!1,onHide:s,children:o,...a}=e,l=(0,g.useContext)(K),u=(0,p.Z)(()=>{null==l||l.onHide(),null==s||s()});return(0,M.jsxs)("div",{ref:t,...a,children:[o,i&&(0,M.jsx)(Z.Z,{"aria-label":n,variant:r,onClick:u})]})}),Q=g.forwardRef((e,t)=>{let{bsPrefix:n,className:r,closeLabel:i="Close",closeButton:s=!1,...o}=e;return n=(0,W.vE)(n,"modal-header"),(0,M.jsx)(Y,{ref:t,...o,className:a()(r,n),closeLabel:i,closeButton:s})});Q.displayName="ModalHeader";let ee=(0,n(41085).Z)("h4"),et=g.forwardRef((e,t)=>{let{className:n,bsPrefix:r,as:i=ee,...s}=e;return r=(0,W.vE)(r,"modal-title"),(0,M.jsx)(i,{ref:t,className:a()(n,r),...s})});function en(e){return(0,M.jsx)(H.Z,{...e,timeout:null})}function er(e){return(0,M.jsx)(H.Z,{...e,timeout:null})}et.displayName="ModalTitle";let ei=g.forwardRef((e,t)=>{let{bsPrefix:n,className:r,style:s,dialogClassName:o,contentClassName:_,children:b,dialogAs:w=X,"data-bs-theme":E,"aria-labelledby":S,"aria-describedby":T,"aria-label":I,show:k=!1,animation:C=!0,backdrop:x=!0,keyboard:R=!0,onEscapeKeyDown:A,onShow:O,onHide:N,container:D,autoFocus:L=!0,enforceFocus:P=!0,restoreFocus:j=!0,restoreFocusOptions:U,onEntered:B,onExit:$,onExiting:V,onEnter:q,onEntering:H,onExited:G,backdropClassName:J,manager:Z,...Y}=e,[Q,ee]=(0,g.useState)({}),[et,ei]=(0,g.useState)(!1),es=(0,g.useRef)(!1),eo=(0,g.useRef)(!1),ea=(0,g.useRef)(null),[el,eu]=(0,f.Z)(),ec=(0,m.Z)(t,eu),eh=(0,p.Z)(N),ed=(0,W.SC)();n=(0,W.vE)(n,"modal");let ef=(0,g.useMemo)(()=>({onHide:eh}),[eh]);function ep(){var e;return Z||(e={isRTL:ed},i||(i=new z(e)),i)}function em(e){if(!u.Z)return;let t=ep().getScrollbarWidth()>0,n=e.scrollHeight>(0,c.Z)(e).documentElement.clientHeight;ee({paddingRight:t&&!n?d():void 0,paddingLeft:!t&&n?d():void 0})}let eg=(0,p.Z)(()=>{el&&em(el.dialog)});y(()=>{(0,h.Z)(window,"resize",eg),null==ea.current||ea.current()});let ey=()=>{es.current=!0},ev=e=>{es.current&&el&&e.target===el.dialog&&(eo.current=!0),es.current=!1},e_=()=>{ei(!0),ea.current=(0,v.Z)(el.dialog,()=>{ei(!1)})},eb=e=>{e.target===e.currentTarget&&e_()},ew=e=>{if("static"===x){eb(e);return}if(eo.current||e.target!==e.currentTarget){eo.current=!1;return}null==N||N()},eE=(0,g.useCallback)(e=>(0,M.jsx)("div",{...e,className:a()("".concat(n,"-backdrop"),J,!C&&"show")}),[C,J,n]),eS={...s,...Q};return eS.display="block",(0,M.jsx)(K.Provider,{value:ef,children:(0,M.jsx)(F,{show:k,ref:ec,backdrop:x,container:D,keyboard:!0,autoFocus:L,enforceFocus:P,restoreFocus:j,restoreFocusOptions:U,onEscapeKeyDown:e=>{R?null==A||A(e):(e.preventDefault(),"static"===x&&e_())},onShow:O,onHide:N,onEnter:(e,t)=>{e&&em(e),null==q||q(e,t)},onEntering:(e,t)=>
26{null==H||H(e,t),(0,l.ZP)(window,"resize",eg)},onEntered:B,onExit:e=>{null==ea.current||ea.current(),null==$||$(e)},onExiting:V,onExited:e=>{e&&(e.style.display=""),null==G||G(e),(0,h.Z)(window,"resize",eg)},manager:ep(),transition:C?en:void 0,backdropTransition:C?er:void 0,renderBackdrop:eE,renderDialog:e=>(0,M.jsx)("div",{role:"dialog",...e,style:eS,className:a()(r,n,et&&"".concat(n,"-static"),!C&&"show"),onClick:x?ew:void 0,onMouseUp:ev,"data-bs-theme":E,"aria-label":I,"aria-labelledby":S,"aria-describedby":T,children:(0,M.jsx)(w,{...Y,onMouseDown:ey,className:o,contentClassName:_,children:b})})})})});ei.displayName="Modal";var es=Object.assign(ei,{Body:G,Header:Q,Title:et,Footer:J,Dialog:X,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150})},98814:function(e,t,n){"use strict";n.d(t,{SC:function(){return c},pi:function(){return l},vE:function(){return a},zG:function(){return u}});var r=n(67294);n(85893);let i=r.createContext({prefixes:{},breakpoints:["xxl","xl","lg","md","sm","xs"],minBreakpoint:"xs"}),{Consumer:s,Provider:o}=i;function a(e,t){let{prefixes:n}=(0,r.useContext)(i);return e||n[t]||t}function l(){let{breakpoints:e}=(0,r.useContext)(i);return e}function u(){let{minBreakpoint:e}=(0,r.useContext)(i);return e}function c(){let{dir:e}=(0,r.useContext)(i);return"rtl"===e}},43473:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(67294),i=n(84527),s=n(35654),o=n(73935),a=n(85893),l=r.forwardRef((e,t)=>{let{onEnter:n,onEntering:l,onEntered:u,onExit:c,onExiting:h,onExited:d,addEndListener:f,children:p,childRef:m,...g}=e,y=(0,r.useRef)(null),v=(0,s.Z)(y,m),_=e=>{v(e&&"setState"in e?o.findDOMNode(e):null!=e?e:null)},b=e=>t=>{e&&y.current&&e(y.current,t)},w=(0,r.useCallback)(b(n),[n]),E=(0,r.useCallback)(b(l),[l]),S=(0,r.useCallback)(b(u),[u]),T=(0,r.useCallback)(b(c),[c]),I=(0,r.useCallback)(b(h),[h]),k=(0,r.useCallback)(b(d),[d]),C=(0,r.useCallback)(b(f),[f]);return(0,a.jsx)(i.ZP,{ref:t,...g,onEnter:w,onEntered:S,onEntering:E,onExit:T,onExited:k,onExiting:I,addEndListener:C,nodeRef:y,children:"function"==typeof p?(e,t)=>p(e,{...t,ref:_}):r.cloneElement(p,{ref:_})})})},41085:function(e,t,n){"use strict";var r=n(67294),i=n(93967),s=n.n(i),o=n(85893);t.Z=e=>r.forwardRef((t,n)=>(0,o.jsx)("div",{...t,ref:n,className:s()(t.className,e)}))},31829:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(91505),i=n(94305);function s(e,t){let n=(0,r.Z)(e,t)||"",i=-1===n.indexOf("ms")?1e3:1;return parseFloat(n)*i}function o(e,t){let n=s(e,"transitionDuration"),r=s(e,"transitionDelay"),o=(0,i.Z)(e,n=>{n.target===e&&(o(),t(n))},n+r)}},70570:function(e,t,n){"use strict";function r(e){e.offsetHeight}n.d(t,{Z:function(){return r}})},3151:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(85893);n(67294);var i=n(7644);let s="#DE6449";function o(e){let t;let n=e.variant||"primary";return"primary"===n?t={backgroundColor:s,borderColor:s,borderRadius:"4px"}:"outline-secondary"===n?(n="outline-dark",t={borderRadius:"4px"},e.disabled&&(t.borderColor="#ccc")):"outline-link"===n&&(t={textDecoration:"underline",borderWidth:"0px"}),(0,r.jsx)(i.Z,{type:e.type,style:t,variant:n,size:e.size,className:e.className,onClick:e.onClick,disabled:e.disabled,href:e.href,target:e.target,children:e.children})}},75193:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(85893);n(67294);var i=n(43553);function s(e){let{header:t,headerText:n,body:s,footer:o,children:a,closable:l,onHide:u,size:c="lg",showHeader:h=!0,showFooter:d=!0,...f}=e;return(0,r.jsx)(i.Z,{...f,show:!0,size:c,onHide:u,"aria-labelledby":"contained-modal-title-vcenter",centered:!0,children:a||(0,r.jsxs)(r.Fragment,{children:[h?(0,r.jsx)(i.Z.Header,{closeButton:l,children:t||(0,r.jsx)(i.Z.Title,{id:"contained-modal-title-vcenter",style:{display:"inline-flex",alignItems:"center"},children:n})}):null,(0,r.jsx)(i.Z.Body,{children:s}),d?(0,r.jsx)(i.Z.Footer,{children:o}):null]})})}},37568:function(e,t,n){"use strict";n.d(t,{Gu:function(){return i},Ho:function(){return m},aC:function(){return g}});var r,i,s=n(85893),o=n(67294),a=n(36100),l=n(44166),u=n(40842),c=n(14908),h=n(75406);let d=(0,a.ad)(),f={user:null,profile:null};(r=i||(i={}))[r.Loading=0]="Loading",r[r.UserFetched=1]="UserFetched",r[r.Completed=2]="Completed";let p=(0,o.createContext)({currentUser:null,userAuth:{...f},refreshCurrentUser:()=>{console.log("AuthContext: setCurrentUser not implemented")},loadingState:0}),m=e=>{let{children:t}=e,[n,r]=(0,o.useState)(null),[i,u]=(0,o.useState)({...f}),[c,m]=(0,o.useState)(0),g=async()=>{let e=h.bU.currentUser,t=await v(null==e?void 0:e.uid);w({user:e,profile:t})},b=async e=>{w({user:e,profile:null}),m(1);try{e?(_(e),(0,a.cf)((0,a.JU)(d,"users",e.uid),async t=>{if(t.exists()){let t=await v(e.uid);w({user:e,profile:t}),m(2)}})):(w({...f}),m(2))}catch(e){console.error("App.js: Error initializing",e),l.Tb(e)}},w=async e=>{u(e),r(y(e))};return(0,o.useEffect)(()=>h.bU.onAuthStateChanged(b),[]),(0,s.jsx)(p.Provider,{value:{userAuth:i,currentUser:n,refreshCurrentUser:g,loadingState:c},children:t})},g=()=>(0,o.useContext)(p),y=e=>e.user&&e.profile?{user:e.user,profile:e.profile}:null,v=async e=>{if(!e)return null;let t=await (0,a.QT)((0,a.JU)(d,"users",e));return(0,c.y)(t)},_=e=>{l.av({uid:e.uid}),(0,u.C1)(e.uid,e.email)}},22687:function(e,t,n){"use strict";n.d(t,{Ih:function(){return s},RD:function(){return o},mP:function(){return a}});var r=n(75406),i=n(24367);function s(){return r.bU.currentUser}function o(){(0,i.w7)(r.bU).then(()=>{console.log("Logging out successfully")},e=>{console.log("Logging out unsuccessfully"),console.log(e)})}async function a(e){return(0,i.LS)(r.bU,e)}},2171:function(e,t,n){"use strict";n.d(t,{EZ:function(){return o},VE:function(){return s},ko:function(){return a},kz:function(){return r},l5:function(){return i}});let r="https://firebasestorage.googleapis.com/v0/b/vacation-dog-swap.appspot.com/o/default_pics%2Fperson-profile.png?alt=media&token=29035ca5-724d-46b3-831f-058807e1382b",i="https://apps.apple.com/us/app/woofyclub/id6449718000",s="https://play.google.com/store/apps/details?id=com.woofyclub",o=[],a=[{title:"Learn more",subItems:[{title:"Cities",url:"/dog-boarding",pageId:"dog-boarding",external:!1},{title:"Blog",url:"/blog",pageId:"blog",external:!1},{title:"Dog breeds",url:"/dog-breeds",pageId:"dog-breeds",external:!1},{title:"Dog Care",url:"/dog-care",pageId:"dog-care",external:!1},{title:"Nutrition",url:"/dog-nutrition",pageId:"dog-nutrition",external:!1}]},{title:"About us",subItems:[{title:"Support",url:"mailto:[email protected]",pageId:"support",external:!1},{title:"Terms of Service",url:"/terms-of-service",pageId:"terms-of-service",external:!1},{title:"Privacy Policy",url:"/privacy-policy",pageId:"privacy-policy",external:!1},{title:"Sitemap",url:"/sitemap.xml",pageId:"sitemap",external:!1}]}]},75406:function(e,t,n){"use strict";n.d(t,{bU:function(){return l},I5:function(){return a}});var r=n(25816);(0,r.KN)("firebase","9.23.0","app");var i=n(86650),s=n(24367);let o=(0,r.ZF)({apiKey:"AIzaSyBOzWIymz490-VLvf0GAQrMnKnfynRgSoM",authDomain:"vacation-dog-swap.firebaseapp.com",projectId:"vacation-dog-swap",storageBucket:"vacation-dog-swap.appspot.com",messagingSenderId:"845801415612",appId:"1:845801415612:web:474d4457e1aba6d37881b9"}),a=(0,i.cF)(o),l=(0,s.v0)(o)},40842:function(e,t,n){"use strict";n.d(t,{C1:function(){return i},nT:function(){return r}});let r={init:e=>{},track:(e,t)=>{},identify:e=>{},people:{set:e=>{}}};function i(e,t){e&&(r.identify(e),t&&r.people.set({$email:t}))}},14908:function(e,t,n){"use strict";n.d(t,{y:function(){return i},Z:function(){return s}});var r=n(44166);function i(e){return e.exists&&s(e.data(),e.id)||null}function s(e,t){var n;if(!e||!t||!e.name||!e.username||!e.dogs)return(0,r.Tb)(Error("Missing fields when parsing user: "+t)),null;let i=[];if(Array.isArray(e.dogs))for(let t of e.dogs){let e=function(e){var t;if(!e)return null;let n=[];if((null===(t=e.image_urls)||void 0===t?void 0:t.length)>0)for(let t of e.image_urls)t&&n.push(t);else e.profile_pic_url&&n.push(e.profile_pic_url);return{...e,image_urls:n}}(t);e&&i.push(e)}else(0,r.Tb)("Invalid dogs field when parsing user",{extra:{uid:t}});return{uid:t,address:(n=e.address)?{address_components:n.address_components,formatted_address:n.formatted_address,latitude:n.latitude,longitude:n.longitude,place_id:n.place_id}:{address_components:{administrative_area_level_1:{long_name:"California",short_name:"CA"},administrative_area_level_2:{long_name:"San Francisco County",short_name:"San Francisco County"},country:{long_name:"United States",short_name:"US"},locality:{long_name:"San Francisco",short_name:"SF"},neighborhood:{long_name:"Noe Valley",short_name:"Noe Valley"},postal_code:{long_name:"94131",short_name:"94131"},postal_code_suffix:{long_name:"2010",short_name:"2010"}},formatted_address:"27th St, San Francisco, CA 94131, USA",latitude:37.3382082,longitude:-121.8863286,place_id:"ChIJRcLrOWp-j4ARdo9gu5fbb1c"},first_name:e.first_name,last_name:e.last_name,name:e.name,username:e.username,instagram:e.instagram,intro_text:e.intro_text,membership_tier:e.membership_tier||0,profile_pic_url:e.profile_pic_url,created_at:e.created_at,updated_at:e.updated_at,dogs:i,banned:e.banned||!1,smoking_inside_home:e.smoking_inside_home,space_type:e.space_type,yard_type:e.yard_type,referral_reason:e.referral_reason,referral_source:e.referral_source,dogs_allowed_on_bed:e.dogs_allowed_on_bed,dogs_allowed_on_funiture:e.dogs_allowed_on_funiture,dogs_might_visit_dog_par
26k:e.dogs_might_visit_dog_park,dogs_stay_in_crate:e.dogs_stay_in_crate,pref_travel_distance:e.pref_travel_distance,pref_number_of_dogs:e.pref_number_of_dogs,children_0_5:e.children_0_5,children_6_12:e.children_6_12,cats_in_home:e.cats_in_home,dogs_allowed_on_furniture:e.dogs_allowed_on_furniture,dogs_might_meet_other_dogs_in_building:e.dogs_might_meet_other_dogs_in_building,pref_pet_size:e.pref_pet_size,pref_pet_schedule:e.pref_pet_schedule,pref_shedding_type:e.pref_shedding_type,pref_additional:e.pref_additional}}},84994:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return R}});var r=n(85893);n(75409),n(17908);var i=n(67294);n(11163);var s=n(41664),o=n.n(s);let a=e=>{let{headerMenu:t,onTabClick:n}=e;return t.subItems?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)("li",{children:(0,r.jsx)(o(),{className:"tw-inline-block tw-text-base tw-text-gray-900 hover:tw-text-primary-500 tw-font-semibold",href:t.url,rel:t.external?"noopener noreferrer nofollow":"",onClick:()=>n(t.pageId),children:t.title})})},l=e=>{let{headerMenu:t,onTabClick:n=()=>{}}=e;return t.subItems?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)("li",{children:(0,r.jsx)(o(),{className:"tw-block tw-py-4 tw-px-5 tw-text-gray-900 hover:tw-text-primary-500 tw-text-xl tw-rounded-lg",href:t.url,rel:t.external?"noopener noreferrer nofollow":"",onClick:()=>n(t.pageId),children:t.title})})};var u=n(1954),c=e=>(0,r.jsx)("img",{...e,src:"/assets/images/common/logo.svg",alt:"Logo",className:"tw-w-auto tw-h-8"}),h=n(2171),d=n(37568),f=n(3151),p=n(39332),m=n(22687);function g(e){let[t,n]=(0,i.useState)(!1),{userAuth:s}=(0,d.aC)(),g=(0,p.usePathname)(),y=()=>(null==g?void 0:g.indexOf("/profile"))!==-1||(null==g?void 0:g.indexOf("/newsfeed"))!==-1,v=e=>{};return(0,r.jsxs)("section",{children:[(0,r.jsx)("nav",{className:"tw-relative tw-py-6 tw-z-50",children:(0,r.jsx)("div",{className:"tw-container tw-mx-auto",children:(0,r.jsxs)("div",{className:"tw-flex tw-items-center",children:[(0,r.jsx)(o(),{className:"tw-inline-block tw-text-lg tw-font-bold",href:"/",children:(0,r.jsx)(c,{})}),(0,r.jsxs)("div",{className:"lg:tw-hidden tw-ml-auto",children:[h.EZ.length>0&&(0,r.jsx)("button",{className:"navbar-burger tw-flex tw-w-12 tw-h-12 tw-items-center tw-justify-center tw-bg-gray-100 hover:tw-bg-gray-200 tw-rounded-md tw-transition tw-duration-200",onClick:()=>n(!0),children:(0,r.jsx)(u.JO,{icon:"heroicons-solid:menu",width:"24",height:"24",color:"black"})}),s.profile&&y()&&(0,r.jsx)(f.Z,{v2:!0,variant:"outline-secondary",onClick:m.RD,children:"Log out"})]}),(0,r.jsx)("ul",{className:"tw-hidden lg:tw-flex tw-ml-14 lg:tw-w-auto lg:tw-space-x-12 tw-list-none",children:h.EZ.map(e=>(0,r.jsx)(a,{headerMenu:e,onTabClick:v},e.pageId))}),(0,r.jsx)("div",{className:"tw-hidden lg:tw-block tw-ml-auto",children:(0,r.jsx)("div",{className:"tw-flex tw-items-center",children:s.profile&&y()&&(0,r.jsx)(f.Z,{v2:!0,variant:"outline-secondary",onClick:m.RD,children:"Log out"})})})]})})}),t&&(0,r.jsxs)("div",{className:"navbar-menu tw-fixed tw-top-0 tw-left-0 tw-bottom-0 tw-w-5/6 tw-max-w-md tw-z-50",children:[(0,r.jsx)("div",{className:"navbar-backdrop tw-fixed tw-inset-0 tw-bg-gray-800 tw-opacity-25"}),(0,r.jsxs)("nav",{className:"tw-relative tw-flex tw-flex-col tw-py-6 tw-px-10 tw-w-full tw-h-full tw-bg-white tw-border-r tw-overflow-y-auto",children:[(0,r.jsxs)("div",{className:"tw-flex tw-items-center tw-mb-16",children:[(0,r.jsx)(o(),{className:"tw-mr-auto tw-text-2xl tw-font-medium tw-leading-none",href:"/",children:(0,r.jsx)(c,{})}),(0,r.jsx)("button",{className:"navbar-close",onClick:()=>n(!1),children:(0,r.jsx)(u.JO,{icon:"heroicons-solid:x",width:24,height:24,color:"black"})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("ul",{className:"tw-mb-2",children:h.EZ.map(e=>(0,r.jsx)(l,{headerMenu:e},e.pageId))}),(0,r.jsx)("div",{className:"tw-mb-6 tw-border-t tw-border-gray-200"}),(0,r.jsx)("div",{className:"tw-flex tw-px-6 tw-mb-16 tw-items-center"})]})]})]})]})}var y=n(9008),v=n.n(y),_=()=>{let e=e=>{};return(0,r.jsx)("footer",{className:"tw-container tw-bg-white dark:tw-bg-gray-900",children:(0,r.jsxs)("div",{className:"tw-mx-auto tw-w-full tw-max-w-screen-xl tw-p-4 tw-py-6 lg:tw-py-8",children:[(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"tw-grid tw-gap-8 sm:tw-gap-6 tw-grid-cols-2  sm:tw-grid-cols-4",children:[(0,r.jsx)("div",{className:"tw-mb-0 tw-col-span-2 sm:tw-col-span-1",children:(0,r.jsx)(o(),{href:"/",className:"tw-flex tw-items-center",children:(0,r.jsx)(c,{className:"max-w-[80%]"})})}),h.ko.map(t=>(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"tw-text-md tw-font-bold tw-text-gray-900 dark:tw-text-white",children:t.title}),(0,r.jsx)("ul",{className:"tw-pl-0 tw-list-none tw-text-gray-900 dark:tw-text-gray-400 tw-font-normal tw-mt-4",children:t.subItems.map(t=>(0,r.jsx)("li",{className:"tw-mb-4",children:(0,r.jsx)(o(),{href:t.url,className:"hover:tw-underline tw-no-underline tw-text-gray-900 hover:tw-text-gray-900",rel:t.external?"noopener noreferrer":"",onClick:()=>e(t.pageId),children:t.title})},t.url))})]},t.title)),(0,r.jsxs)("div",{className:"tw-col-span-2 sm:tw-col-span-1",children:[(0,r.jsx)("span",{className:"tw-text-md tw-font-bold tw-text-gray-900 dark:tw-text-white",children:"Download the app"}),(0,r.jsxs)("div",{className:"tw-mt-4 tw-flex tw-gap-2",children:[(0,r.jsx)("a",{href:h.l5,target:"_blank",children:(0,r.jsx)("img",{src:"/assets/images/common/app-store.svg",className:"tw-h-10"})}),(0,r.jsx)("a",{href:h.VE,target:"_blank",children:(0,r.jsx)("img",{src:"/assets/images/common/google-play.svg",className:"tw-h-10"})})]})]})]})}
26),(0,r.jsx)("hr",{className:"tw-my-6 tw-border-gray-200 sm:tw-mx-auto dark:tw-border-gray-700 lg:tw-my-8"}),(0,r.jsxs)("div",{className:"sm:tw-flex sm:tw-items-center sm:tw-justify-between",children:[(0,r.jsxs)("span",{className:"tw-text-base tw-text-gray-700 sm:tw-text-center dark:tw-text-gray-400",children:["\xa9 ",new Date().getFullYear()," WoofyClub. All Rights Reserved."]}),(0,r.jsxs)("div",{className:"tw-flex tw-mt-4 tw-space-x-5 sm:tw-justify-center sm:tw-mt-0",children:[(0,r.jsxs)("a",{href:"https://www.facebook.com/woofyclub",target:"_blank",className:"tw-text-gray-700 hover:tw-text-gray-900 dark:hover:tw-text-white",children:[(0,r.jsx)(u.JO,{icon:"ion:logo-facebook",width:"24",height:"24"}),(0,r.jsx)("span",{className:"tw-sr-only",children:"Facebook page"})]}),(0,r.jsxs)("a",{href:"https://www.instagram.com/woofyclubpack/",target:"_blank",className:"tw-text-gray-700 hover:tw-text-gray-900 dark:hover:tw-text-white",children:[(0,r.jsx)(u.JO,{icon:"ion:logo-instagram",width:"24",height:"24"}),(0,r.jsx)("span",{className:"tw-sr-only",children:"Instagram page"})]}),(0,r.jsxs)("a",{href:"https://www.tiktok.com/@woofyclubpack",target:"_blank",className:"tw-text-gray-700 hover:tw-text-gray-900 dark:hover:tw-text-white",children:[(0,r.jsx)(u.JO,{icon:"ion:logo-tiktok",width:"24",height:"24"}),(0,r.jsx)("span",{className:"tw-sr-only",children:"Tiktok profile"})]}),(0,r.jsxs)("a",{href:"https://www.linkedin.com/company/woofyclub",target:"_blank",className:"tw-text-gray-700 hover:tw-text-gray-900 dark:hover:tw-text-white",children:[(0,r.jsx)(u.JO,{icon:"ion:logo-linkedin",width:"24",height:"24"}),(0,r.jsx)("span",{className:"tw-sr-only",children:"Linkedin page"})]})]})]})]})})};function b(e){let{children:t,title:n,description:i,openGraph:s}=e,{userAuth:o}=(0,d.aC)(),a=n?"".concat(n," | WoofyClub"):"WoofyClub | Swap dog boarding with loving neighbors",l=i||"Swap dog boarding with loving neighbors";return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(v(),{children:[(0,r.jsx)("title",{children:a}),(0,r.jsx)("meta",{name:"og:title",content:a}),(0,r.jsx)("meta",{name:"og:description",content:l},"og:description"),(0,r.jsx)("meta",{name:"description",content:l},"description"),(0,r.jsx)("meta",{name:"og:image",content:(null==s?void 0:s.image)||"https://firebasestorage.googleapis.com/v0/b/vacation-dog-swap.appspot.com/o/default_pics%2Fwoofyclub_vacation_dog_swap_group_photo.png?alt=media&token=6a4cdfa1-32cb-46cc-b2a7-2bde9422d3ad"},"og:image")]}),(0,r.jsx)(g,{}),(0,r.jsx)("main",{children:t}),(0,r.jsx)("hr",{className:"my-0"}),(0,r.jsx)(_,{})]})}let w={APP_UPSELL:"APP_UPSELL"},E=(0,i.createContext)({currentModal:null,showModal:e=>console.warn("Method not implemented"),closeModal:e=>console.warn("Method not implemented")}),S=()=>(0,i.useContext)(E),T=e=>{let[t,n]=(0,i.useState)(null),s=(0,i.useCallback)(e=>{if(!e){n(null);return}let t=null==e?void 0:e.modalKey;t&&w[t]&&n({modalKey:t,props:null==e?void 0:e.props})},[]),o=(0,i.useCallback)(()=>{var e;(null==t?void 0:null===(e=t.props)||void 0===e?void 0:e.onModalClose)&&t.props.onModalClose(),n(null)},[null==t?void 0:t.props]);return(0,r.jsx)(E.Provider,{value:{currentModal:t,showModal:s,closeModal:o},children:e.children})};var I=n(75193),k=n(40842);let C={[w.APP_UPSELL]:e=>{let{onModalClose:t,customHeaderText:n,customBodyText:i}=e;return(0,r.jsx)(I.Z,{onHide:t,closable:!0,headerText:n||"Download WoofyClub Now!",body:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{children:i||(0,r.jsx)(r.Fragment,{children:"Download the app and sign up for free to connect with thousands of nearby pawrents!"})}),(0,r.jsx)("br",{}),(0,r.jsxs)("div",{className:"d-flex justify-content-center align-items-center mobile-store-download-grid",children:[(0,r.jsxs)("div",{className:"d-flex justify-content-center align-items-center flex-column",children:[(0,r.jsx)("img",{src:"/assets/images/common/ios-download-qr.svg",alt:"WoofyClub on App Store QR Code",className:"d-none d-md-block mb-4",style:{width:150,height:150}}),(0,r.jsx)("div",{onClick:()=>{k.nT.track("download_app_button_clicked"),window.open(h.l5,"_blank","noopener,noreferrer")},role:"button",target:"_blank",rel:"noreferrer",children:(0,r.jsx)("img",{alt:"WoofyClub on App Store",src:"/assets/images/common/app-store.svg",style:{height:40}})})]}),(0,r.jsx)("div",{className:"d-flex justify-content-center align-items-center flex-column",children:(0,r.jsx)("div",{style:{width:80}})}),(0,r.jsxs)("div",{className:"d-flex justify-content-center align-items-center flex-column",children:[(0,r.jsx)("img",{src:"/assets/images/common/android-download-qr.svg",alt:"WoofyClub on Google Play QR Code",className:"d-none d-md-block mb-4",style:{width:150,height:150}}),(0,r.jsx)("div",{onClick:()=>{k.nT.track("download_app_button_clicked"),window.open(h.VE,"_blank","noopener,noreferrer")},role:"button",target:"_blank",rel:"noreferrer",children:(0,r.jsx)("img",{alt:"WoofyClub on Google Play",src:"/assets/images/common/google-play.svg",style:{height:40}})})]})]})]}),footer:(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(f.Z,{variant:"outline-dark",onClick:t,children:"Close"})})})}};function x(){let{currentModal:e,showModal:t}=S(),n=()=>{t(null)};if(!e)return null;let i=C[null==e?void 0:e.modalKey],s=(null==e?void 0:e.props)||{};return i?(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(i,{...s,onModalClose:e=>{n(),(null==s?void 0:s.onModalClose)&&(null==s||s.onModalClose(e))}})}):null}function R(e){let{Component:t,pageProps:n}=e;return(0,i.useRef)(""),(0,r.jsx)(d.Ho,{children:(0,r.jsxs)(T,{children:[(0,r.jsx)(b,{title:n.title,de
26scription:n.description,children:(0,r.jsx)(t,{...n})}),(0,r.jsx)(x,{})]})})}},75409:function(){},17908:function(){},9008:function(e,t,n){e.exports=n(50494)},41664:function(e,t,n){e.exports=n(63500)},39332:function(e,t,n){e.exports=n(70031)},11163:function(e,t,n){e.exports=n(37253)},34155:function(e){var t,n,r,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l=[],u=!1,c=-1;function h(){u&&r&&(u=!1,r.length?l=r.concat(l):c=-1,l.length&&d())}function d(){if(!u){var e=a(h);u=!0;for(var t=l.length;t;){for(r=l,l=[];++c<t;)r&&r[c].run();c=-1,t=l.length}r=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new f(e,t)),1!==l.length||u||a(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}},92703:function(e,t,n){"use strict";
26var r=n(50414);function i(){}function s(){}s.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,s,o){if(o!==r){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:s,resetWarningCache:i};return n.PropTypes=n,n}},45697:function(e,t,n){e.exports=n(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},84527:function(e,t,n){"use strict";n.d(t,{cn:function(){return d},d0:function(){return h},Wj:function(){return c},Ix:function(){return f},ZP:function(){return g}});var r=n(63366);function i(e,t){return(i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var s=n(67294),o=n(73935),a={disabled:!1},l=s.createContext(null),u="unmounted",c="exited",h="entering",d="entered",f="exiting",p=function(e){function t(t,n){r=e.call(this,t,n)||this;var r,i,s=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?s?(i=c,r.appearStatus=h):i=d:i=t.unmountOnExit||t.mountOnEnter?u:c,r.state={status:i},r.nextCallback=null,r}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===u?{status:c}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==d&&(t=h):(n===h||n===d)&&(t=f)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){if(this.cancelNextCallback(),t===h){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this);n&&n.scrollTop}this.performEnter(e)}else this.performExit()}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:u})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,i=this.props.nodeRef?[r]:[o.findDOMNode(this),r],s=i[0],l=i[1],u=this.getTimeouts(),c=r?u.appear:u.enter;if(!e&&!n||a.disabled){this.safeSetState({status:d},function(){t.props.onEntered(s)});return}this.props.onEnter(s,l),this.safeSetState({status:h},function(){t.props.onEntering(s,l),t.onTransitionEnd(c,function(){t.safeSetState({status:d},function(){t.props.onEntered(s,l)})})})},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:o.findDOMNode(this);if(!t||a.disabled){this.safeSetState({status:c},function(){e.props.onExited(r)});return}this.props.onExit(r),this.safeSetState({status:f},function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,function(){e.safeSetState({status:c},function(){e.props.onExited(r)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:o.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(!n||r){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],s=i[0],a=i[1];this.props.addEndListener(s,a)}null!=e&&setTimeout(this.nextCallback,e)},n.render=function(){var e=this.state.status;if(e===u)return null;var t=this.props,n=t.children,i=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,r.Z)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return s.createElement(l.Provider,{value:null},"function"==typeof n?n(e,i):s.cloneElement(s.Children.only(n),i))},t}(s.Component);function m(){}p.contextType=l,p.propTypes={},p.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter
26:!0,exit:!0,onEnter:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},p.UNMOUNTED=u,p.EXITED=c,p.ENTERING=h,p.ENTERED=d,p.EXITING=f;var g=p},47149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},34134:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r.actionAsyncStorage}});let r=n(47149);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54832:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return s}});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}let i=globalThis.AsyncLocalStorage;function s(){return i?new i:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25575:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},40837:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getExpectedRequestStore:function(){return i},requestAsyncStorage:function(){return r.requestAsyncStorage}});let r=n(25575);function i(e){let t=r.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},93967:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=s(t,n));return t}(n)))}return e}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0!==(n=(function(){return i}).apply(t,[]))&&(e.exports=n)}()},63366:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{Z:function(){return r}})},25816:function(e,t,n){"use strict";let r,i,s;n.d(t,{Jn:function(){return M},qX:function(){return O},Xd:function(){return A},Mq:function(){return P},ZF:function(){return L},KN:function(){return j}});var o=n(8463),a=n(53333),l=n(74444);let u=(e,t)=>t.some(t=>e instanceof t),c=new WeakMap,h=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,m={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return h.get(e);if("objectStoreNames"===t)return e.objectStoreNames||d.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return g(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function g(e){var t;if(e instanceof IDBRequest)return function(e){let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{t(g(e.result)),r()},s=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",s)});return t.then(t=>{t instanceof IDBCursor&&c.set(t,e)}).catch(()=>{}),p.set(t,e),t}(e);if(f.has(e))return f.get(e);let n="function"==typeof(t=e)?t!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(i||(i=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(y(this),e),g(c.get(this))}:function(...e){return g(t.apply(y(this),e))}:function(e,...n){let r=t.call(y(this),e,...n);return d.set(r,e.sort?e.sort():[e]),g(r)}:(t instanceof IDBTransaction&&function(e){if(h.has(e))return;let t=new Promise((t,n)=>{let r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{t(),r()},s=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});h.set(e,t)}(t),u(t,r||(r=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])))?new Proxy(t,m):t;return n!==e&&(f.set(e,n),p.set(n,e)),n}let y=e=>p.get(e),v=["get","getKey","getAll","getAllKeys","count"],_=["put","add","delete","clear"],b=new Map;function w(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&"string"==typeof t))return;if(b.get(t))return b.get(t);let n=t.replace(/FromIndex$/,""),r=t!==n,i=_.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(i||v.includes(n)))return;let s=async function(e,...t){let s=this.transaction(e,i?"readwrite":"readonly"),o=s.store;
26return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&s.done]))[0]};return b.set(t,s),s}m={...s=m,get:(e,t,n)=>w(e,t)||s.get(e,t,n),has:(e,t)=>!!w(e,t)||s.has(e,t)};class E{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(e=>{if(!function(e){let t=e.getComponent();return(null==t?void 0:t.type)==="VERSION"}(e))return null;{let t=e.getImmediate();return`${t.library}/${t.version}`}}).filter(e=>e).join(" ")}}let S="@firebase/app",T="0.9.13",I=new a.Yd("@firebase/app"),k="[DEFAULT]",C={[S]:"fire-core","@firebase/app-compat":"fire-core-compat","@firebase/analytics":"fire-analytics","@firebase/analytics-compat":"fire-analytics-compat","@firebase/app-check":"fire-app-check","@firebase/app-check-compat":"fire-app-check-compat","@firebase/auth":"fire-auth","@firebase/auth-compat":"fire-auth-compat","@firebase/database":"fire-rtdb","@firebase/database-compat":"fire-rtdb-compat","@firebase/functions":"fire-fn","@firebase/functions-compat":"fire-fn-compat","@firebase/installations":"fire-iid","@firebase/installations-compat":"fire-iid-compat","@firebase/messaging":"fire-fcm","@firebase/messaging-compat":"fire-fcm-compat","@firebase/performance":"fire-perf","@firebase/performance-compat":"fire-perf-compat","@firebase/remote-config":"fire-rc","@firebase/remote-config-compat":"fire-rc-compat","@firebase/storage":"fire-gcs","@firebase/storage-compat":"fire-gcs-compat","@firebase/firestore":"fire-fst","@firebase/firestore-compat":"fire-fst-compat","fire-js":"fire-js",firebase:"fire-js-all"},x=new Map,R=new Map;function A(e){let t=e.name;if(R.has(t))return I.debug(`There were multiple attempts to register component ${t}.`),!1;for(let n of(R.set(t,e),x.values()))!function(e,t){try{e.container.addComponent(t)}catch(n){I.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}(n,e);return!0}function O(e,t){let n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}let N=new l.LL("app","Firebase",{"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}","duplicate-app":"Firebase App named '{$appName}' already exists with different options or config","app-deleted":"Firebase App named '{$appName}' already deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
26d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."});class D{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new o.wA("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw N.create("app-deleted",{appName:this._name})}}let M="9.23.0";function L(e,t={}){let n=e;"object"!=typeof t&&(t={name:t});let r=Object.assign({name:k,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!=typeof i||!i)throw N.create("bad-app-name",{appName:String(i)});if(n||(n=(0,l.aH)()),!n)throw N.create("no-options");let s=x.get(i);if(s){if((0,l.vZ)(n,s.options)&&(0,l.vZ)(r,s.config))return s;throw N.create("duplicate-app",{appName:i})}let a=new o.H0(i);for(let e of R.values())a.addComponent(e);let u=new D(n,r,a);return x.set(i,u),u}function P(e=k){let t=x.get(e);if(!t&&e===k&&(0,l.aH)())return L();if(!t)throw N.create("no-app",{appName:e});return t}function j(e,t,n){var r;let i=null!==(r=C[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);let s=i.match(/\s|\//),a=t.match(/\s|\//);if(s||a){let e=[`Unable to register library "${i}" with version "${t}":`];s&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),s&&a&&e.push("and"),a&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),I.warn(e.join(" "));return}A(new o.wA(`${i}-version`,()=>({library:i,version:t}),"VERSION"))}let U="firebase-heartbeat-store",F=null;function B(){return F||(F=(function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:s}={}){let o=indexedDB.open(e,1),a=g(o);return r&&o.addEventListener("upgradeneeded",e=>{r(g(o.result),e.oldVersion,e.newVersion,g(o.transaction),e)}),n&&o.addEventListener("blocked",e=>n(e.oldVersion,e.newVersion,e)),a.then(e=>{s&&e.addEventListener("close",()=>s()),i&&e.addEventListener("versionchange",e=>i(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a})("firebase-heartbeat-database",0,{upgrade:(e,t)=>{0===t&&e.createObjectStore(U)}}).catch(e=>{throw N.create("idb-open",{originalErrorMessage:e.message})})),F}async function $(e){try{let t=await B();return await t.transaction(U).objectStore(U).get(q(e))}catch(e){if(e instanceof l.ZR)I.warn(e.message);else{let t=N.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});I.warn(t.message)}}}async function V(e,t){try{let n=(await B()).transaction(U,"readwrite"),r=n.objectStore(U);await r.put(t,q(e)),await n.done}catch(e){if(e instanceof l.ZR)I.warn(e.message);else{let t=N.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});I.warn(t.message)}}}function q(e){return`${e.name}!${e.options.appId}`}class z{constructor(e){this.container=e,this._heartbeatsCache=null;let t=this.container.getProvider("app").getImmediate();this._storage=new W(t),this._heartbeatsCachePromise=this._storage.read().then(e=>(this._heartbeatsCache=e,e))}async triggerHeartbeat(){let e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=H();return(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate===t||this._heartbeatsCache.heartbeats.some(e=>e.date===t))?void 0:(this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(e=>{let t=new Date(e.date).valueOf();return Date.now()-t<=2592e6}),this._storage.overwrite(this._heartbeatsCache))}
26async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";let e=H(),{heartbeatsToSend:t,unsentEntries:n}=function(e,t=1024){let n=[],r=e.slice();for(let i of e){let e=n.find(e=>e.agent===i.agent);if(e){if(e.dates.push(i.date),G(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),G(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),r=(0,l.L)(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}}function H(){return new Date().toISOString().substring(0,10)}class W{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!(0,l.hl)()&&(0,l.eu)().then(()=>!0).catch(()=>!1)}async read(){return await this._canUseIndexedDBPromise&&await $(this.app)||{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){let n=await this.read();return V(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:e.heartbeats})}}async add(e){var t;if(await this._canUseIndexedDBPromise){let n=await this.read();return V(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function G(e){return(0,l.L)(JSON.stringify({version:2,heartbeats:e})).length}A(new o.wA("platform-logger",e=>new E(e),"PRIVATE")),A(new o.wA("heartbeat",e=>new z(e),"PRIVATE")),j(S,T,""),j(S,T,"esm2017"),j("fire-js","")},8463:function(e,t,n){"use strict";n.d(t,{H0:function(){return a},wA:function(){return i}});var r=n(74444);class i{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}let s="[DEFAULT]";class o{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){let e=new r.BH;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{let n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;let n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,this.shouldAutoInitialize()){if("EAGER"===e.instantiationMode)try{this.getOrInitializeService({instanceIdentifier:s})}catch(e){}for(let[e,t]of this.instancesDeferred.entries()){let n=this.normalizeInstanceIdentifier(e);try{let e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=s){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){let e=Array.from(this.instances.values());await Promise.all([...e.filter(e=>"INTERNAL"in e).map(e=>e.INTERNAL.delete()),...e.filter(e=>"_delete"in e).map(e=>e._delete())])}isComponentSet(){return null!=this.component}isInitialized(e=s){return this.instances.has(e)}getOptions(e=s){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);let r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(let[e,t]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(e)&&t.resolve(r);return r}onInit(e,t){var n;let r=this.normalizeInstanceIdentifier(t),i=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;i.add(e),this.onInitCallbacks.set(r,i);let s=this.instances.get(r);return s&&e(s,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){let n=this.onInitCallbacks.get(t);if(n)for(let r of n)try{r(e,t)}catch(e){}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:e===s?void 0:e,options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch(e){}return n||null}normalizeInstanceIdentifier(e=s){return this.component?this.component.multipleInstances?e:s:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class a{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let t=this.getProvider(e.name);if(t.isComponentSet())throw Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);let t=new o(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}},53333:function(e,t,n){"use strict";var r,i;n.d(t,{Yd:function(){return c},in:function(){return r}});let s=[];(i=r||(r={}))[i.DEBUG=0]="DEBUG",i[i.VERBOSE=1]="VERBOSE",i[i.INFO=2]="INFO",i[i.WARN=3]="WARN",i[i.ERROR=4]="ERROR",i[i.SILENT=5]="SILENT";let o={debug:r.DEBUG,verbose:r.VERBOSE,info:r.INFO,warn:r.WARN,error:r.ERROR,silent:r.SILENT},a=r.INFO,l={[r.DEBUG]:"log",[r.VERBOSE]:"log",[r.INFO]:"info",[r.WARN]:"warn",[r.ERROR]:"error"},u=(e,t,...n)=>{if(t<e.logLevel)return;let r=new Date().toISOString(),i=l[t];if(i)console[i](`[${r}]  ${e.name}:`,...n);
26else throw Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class c{constructor(e){this.name=e,this._logLevel=a,this._logHandler=u,this._userLogHandler=null,s.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in r))throw TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?o[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)throw TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,r.DEBUG,...e),this._logHandler(this,r.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,r.VERBOSE,...e),this._logHandler(this,r.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,r.INFO,...e),this._logHandler(this,r.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,r.WARN,...e),this._logHandler(this,r.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,r.ERROR,...e),this._logHandler(this,r.ERROR,...e)}}},1954:function(e,t,n){"use strict";let r;n.d(t,{JO:function(){return eb}});var i,s=n(67294);let o=/^[a-z0-9]+(-[a-z0-9]+)*$/,a=(e,t,n,r="")=>{let i=e.split(":");if("@"===e.slice(0,1)){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),s={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!l(s)?null:s}let s=i[0],o=s.split("-");if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join("-")};return t&&!l(e)?null:e}if(n&&""===r){let e={provider:r,prefix:"",name:s};return t&&!l(e,n)?null:e}return null},l=(e,t)=>!!e&&!!((""===e.provider||e.provider.match(o))&&(t&&""===e.prefix||e.prefix.match(o)
26)&&e.name.match(o)),u=Object.freeze({left:0,top:0,width:16,height:16}),c=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...u,...c}),d=Object.freeze({...h,body:"",hidden:!1});function f(e,t){let n=function(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}(e,t);for(let r in d)r in c?r in e&&!(r in n)&&(n[r]=c[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function p(e,t){let n=[];if("object"!=typeof e||"object"!=typeof e.icons)return n;e.not_found instanceof Array&&e.not_found.forEach(e=>{t(e,null),n.push(e)});let r=function(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);return Object.keys(n).concat(Object.keys(r)).forEach(function e(t){if(n[t])return i[t]=[];if(!(t in i)){i[t]=null;let n=r[t]&&r[t].parent,s=n&&e(n);s&&(i[t]=[n].concat(s))}return i[t]}),i}(e);for(let i in r){let s=r[i];s&&(t(i,function(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),s={};function o(e){s=f(r[e]||i[e],s)}return o(t),n.forEach(o),f(e,s)}(e,i,s)),n.push(i))}return n}let m={provider:"",aliases:{},not_found:{},...u};function g(e,t){for(let n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function y(e){if("object"!=typeof e||null===e||"string"!=typeof e.prefix||!e.icons||"object"!=typeof e.icons||!g(e,m))return null;let t=e.icons;for(let e in t){let n=t[e];if(!e.match(o)||"string"!=typeof n.body||!g(n,d))return null}let n=e.aliases||Object.create(null);for(let e in n){let r=n[e],i=r.parent;if(!e.match(o)||"string"!=typeof i||!t[i]&&!n[i]||!g(r,d))return null}return e}let v=Object.create(null);function _(e,t){let n=v[e]||(v[e]=Object.create(null));return n[t]||(n[t]={provider:e,prefix:t,icons:Object.create(null),missing:new Set})}function b(e,t){return y(t)?p(t,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}let w=!1;function E(e){return"boolean"==typeof e&&(w=e),w}let S=Object.freeze({width:null,height:null}),T=Object.freeze({...S,...c}),I=/(-?[0-9.]*[0-9]+[0-9.]*)/g,k=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function C(e,t,n){if(1===t)return e;if(n=n||100,"number"==typeof e)return Math.ceil(e*t*n)/n;if("string"!=typeof e)return e;let r=e.split(I);if(null===r||!r.length)return e;let i=[],s=r.shift(),o=k.test(s);for(;;){if(o){let e=parseFloat(s);isNaN(e)?i.push(s):i.push(Math.ceil(e*t*n)/n)}else i.push(s);if(void 0===(s=r.shift()))return i.join("");o=!o}}let x=e=>"unset"===e||"undefined"===e||"none"===e,R=/\sid="(\S+)"/g,A="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),O=0,N=Object.create(null);function D(e){return N[e]||N[""]}function M(e){let t;if("string"==typeof e.resources)t=[e.resources];else if(!((t=e.resources)instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:!0===e.random,index:e.index||0,dataAfterTimeout:!1!==e.dataAfterTimeout}}let L=Object.create(null),P=["https://api.simplesvg.com","https://api.unisvg.com"],j=[];for(;P.length>0;)1===P.length?j.push(P.shift()):Math.random()>.5?j.push(P.shift()):j.push(P.pop());L[""]=M({resources:["https://api.iconify.design"].concat(j)});let U=(()=>{let e;try{if(e=fetch,"function"==typeof e)return e}catch(e){}})();function F(e,t){e.forEach(e=>{let n=e.loaderCallbacks;n&&(e.loaderCallbacks=n.filter(e=>e.id!==t))})}let B=0;var $={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function V(e){let t={...$,...e},n=[];function r(){n=n.filter(e=>"pending"===e().status)}return{query:function(e,i,s){let o=function(e,t,n,r){let i,s;let o=e.resources.length,a=e.random?Math.floor(Math.random()*o):e.index;if(e.random){let t=e.resources.slice(0);for(i=[];t.length>1;){let e=Math.floor(Math.random()*t.length);i.push(t[e]),t=t.slice(0,e).concat(t.slice(e+1))}i=i.concat(t)}else i=e.resources.slice(a).concat(e.resources.slice(0,a));let l=Date.now(),u="pending",c=0,h=null,d=[],f=[];function p(){h&&(clearTimeout(h),h=null)}function m(){"pending"===u&&(u="aborted"),p(),d.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),d=[]}
26function g(e,t){t&&(f=[]),"function"==typeof e&&f.push(e)}function y(){u="failed",f.forEach(e=>{e(void 0,s)})}function v(){d.forEach(e=>{"pending"===e.status&&(e.status="aborted")}),d=[]}return"function"==typeof r&&f.push(r),setTimeout(function r(){if("pending"!==u)return;p();let o=i.shift();if(void 0===o){if(d.length){h=setTimeout(()=>{p(),"pending"===u&&(v(),y())},e.timeout);return}y();return}let a={status:"pending",resource:o,callback:(t,n)=>{!function(t,n,o){let a="success"!==n;switch(d=d.filter(e=>e!==t),u){case"pending":break;case"failed":if(a||!e.dataAfterTimeout)return;break;default:return}if("abort"===n){s=o,y();return}if(a){s=o,d.length||(i.length?r():y());return}if(p(),v(),!e.random){let n=e.resources.indexOf(t.resource);-1!==n&&n!==e.index&&(e.index=n)}u="completed",f.forEach(e=>{e(o)})}(a,t,n)}};d.push(a),c++,h=setTimeout(r,e.rotate),n(o,t,a.callback)}),function(){return{startTime:l,payload:t,status:u,queriesSent:c,queriesPending:d.length,subscribe:g,abort:m}}}(t,e,i,(e,t)=>{r(),s&&s(e,t)});return n.push(o),o},find:function(e){return n.find(t=>e(t))||null},setIndex:e=>{t.index=e},getIndex:()=>t.index,cleanup:r}}let q=Object.create(null),z="iconify2",H="iconify",W=H+"-count",G=H+"-version";function K(e,t){try{return e.getItem(t)}catch(e){}}function X(e,t,n){try{return e.setItem(t,n),!0}catch(e){}}function J(e,t){try{e.removeItem(t)}catch(e){}}function Z(e,t){return X(e,W,t.toString())}function Y(e){return parseInt(K(e,W))||0}let Q={local:!0,session:!0},ee={local:new Set,session:new Set},et=!1,en="undefined"==typeof window?{}:window;function er(e){let t=e+"Storage";try{if(en&&en[t]&&"number"==typeof en[t].length)return en[t]}catch(e){}Q[e]=!1}function ei(e,t){let n=er(e);if(!n)return;let r=K(n,G);if(r!==z){if(r){let e=Y(n);for(let t=0;t<e;t++)J(n,H+t.toString())}X(n,G,z),Z(n,0);return}let i=Math.floor(Date.now()/36e5)-168,s=e=>{let r=H+e.toString(),s=K(n,r);if("string"==typeof s){try{let n=JSON.parse(s);if("object"==typeof n&&"number"==typeof n.cached&&n.cached>i&&"string"==typeof n.provider&&"object"==typeof n.data&&"string"==typeof n.data.prefix&&t(n,e))return!0}catch(e){}J(n,r)}},o=Y(n);for(let t=o-1;t>=0;t--)s(t)||(t===o-1?Z(n,--o):ee[e].add(t))}function es(){if(!et)for(let e in et=!0,Q)ei(e,e=>{let t=e.data,n=_(e.provider,t.prefix);if(!b(n,t).length)return!1;let r=t.lastModified||-1;return n.lastModifiedCached=n.lastModifiedCached?Math.min(n.lastModifiedCached,r):r,!0})}function eo(){}let ea=(e,t)=>{let n,r;let i=function(e){let t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((e,t)=>e.provider!==t.provider?e.provider.localeCompare(t.provider):e.prefix!==t.prefix?e.prefix.localeCompare(t.prefix):e.name.localeCompare(t.name));let r={provider:"",prefix:"",name:""};return e.forEach(e=>{if(r.name===e.name&&r.prefix===e.prefix&&r.provider===e.provider)return;r=e;let i=e.provider,s=e.prefix,o=e.name,a=n[i]||(n[i]=Object.create(null)),l=a[s]||(a[s]=_(i,s));(o in l.icons?t.loaded:""===s||l.missing.has(o)?t.missing:t.pending).push({provider:i,prefix:s,name:o})}),t}(function(e,t=!0,n=!1){let r=[];return e.forEach(e=>{let i="string"==typeof e?a(e,t,n):e;i&&r.push(i)}),r}(e,!0,E()));if(!i.pending.length){let e=!0;return t&&setTimeout(()=>{e&&t(i.loaded,i.missing,i.pending,eo)}),()=>{e=!1}}let s=Object.create(null),o=[];return i.pending.forEach(e=>{let{provider:t,prefix:i}=e;if(i===r&&t===n)return;n=t,r=i,o.push(_(t,i));let a=s[t]||(s[t]=Object.create(null));a[i]||(a[i]=[])}),i.pending.forEach(e=>{let{provider:t,prefix:n,name:r}=e,i=_(t,n),o=i.pendingIcons||(i.pendingIcons=new Set);o.has(r)||(o.add(r),s[t][n].push(r))}),o.forEach(e=>{let{provider:t,prefix:n}=e;if(s[t][n].length){var r;r=s[t][n],e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{let t;e.iconsQueueFlag=!1;let{provider:n,prefix:r}=e,i=e.iconsToLoad;delete e.iconsToLoad,i&&(t=D(n))&&t.prepare(n,r,i).forEach(t=>{!function(e,t,n){let r,i;if("string"==typeof e){let t=D(e);if(!t)return n(void 0,424);i=t.send;let s=function(e){if(!q[e]){let t=L[e];if(!t)return;let n=V(t);q[e]={config:t,redundancy:n}}return q[e]}(e);s&&(r=s.redundancy)}else{let t=M(e);if(t){r=V(t);let n=D(e.resources?e.resources[0]:"");n&&(i=n.send)}}r&&i?r.query(t,i,n)().abort:n(void 0,424)}(n,t,n=>{if("object"!=typeof n)t.icons.forEach(t=>{e.missing.add(t)});else try{let t=b(e,n);if(!t.length)return;let r=e.pendingIcons;
26r&&t.forEach(e=>{r.delete(e)}),function(e,t){function n(n){let r,i;if(!Q[n]||!(r=er(n)))return;let s=ee[n];if(s.size)s.delete(i=Array.from(s).shift());else if(i=Y(r),!Z(r,i+1))return;let o={cached:Math.floor(Date.now()/36e5),provider:e.provider,data:t};return X(r,H+i.toString(),JSON.stringify(o))}et||es(),(!t.lastModified||function(e,t){let n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(let n in Q)ei(n,n=>{let r=n.data;return n.provider!==e.provider||r.prefix!==e.prefix||r.lastModified===t});return!0}(e,t.lastModified))&&Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}(e,n)}catch(e){console.error(e)}e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;let t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1,r=e.provider,i=e.prefix;t.forEach(t=>{let s=t.icons,o=s.pending.length;s.pending=s.pending.filter(t=>{if(t.prefix!==i)return!0;let o=t.name;if(e.icons[o])s.loaded.push({provider:r,prefix:i,name:o});else{if(!e.missing.has(o))return n=!0,!0;s.missing.push({provider:r,prefix:i,name:o})}return!1}),s.pending.length!==o&&(n||F([e],t.id),t.callback(s.loaded.slice(0),s.missing.slice(0),s.pending.slice(0),t.abort))})}))}))})})}))}}),t?function(e,t,n){let r=B++,i=F.bind(null,n,r);if(!t.pending.length)return i;let s={id:r,icons:t,callback:e,abort:i};return n.forEach(e=>{(e.loaderCallbacks||(e.loaderCallbacks=[])).push(s)}),i}(t,i,o):eo},el=/[\s,]+/,eu={...T,inline:!1},ec={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},eh={display:"inline-block"},ed={backgroundColor:"currentColor"},ef={backgroundColor:"transparent"},ep={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},em={WebkitMask:ed,mask:ed,background:ef};for(let e in em){let t=em[e];for(let n in ep)t[e+n]=ep[n]}let eg={...eu,inline:!0};function ey(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}let ev=(e,t,n,i)=>{let o=n?eg:eu,a=function(e,t){let n={...e};for(let e in t){let r=t[e],i=typeof r;e in S?(null===r||r&&("string"===i||"number"===i))&&(n[e]=r):i===typeof n[e]&&(n[e]="rotate"===e?r%4:r)}return n}(o,t),l=t.mode||"svg",u={},c=t.style||{},d={..."svg"===l?ec:{},ref:i};for(let e in t){let n=t[e];if(void 0!==n)switch(e){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":a[e]=!0===n||"true"===n||1===n;break;case"flip":"string"==typeof n&&function(e,t){t.split(el).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0}})}(a,n);break;case"color":u.color=n;break;case"rotate":"string"==typeof n?a[e]=function(e,t=0){let n=e.replace(/^-?[0-9.]*/,"");function r(e){for(;e<0;)e+=4;return e%4}if(""===n){let t=parseInt(e);return isNaN(t)?0:r(t)}if(n!==e){let t=0;switch(n){case"%":t=25;break;case"deg":t=90}if(t){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i/=t)%1==0?r(i):0}}return t}(n):"number"==typeof n&&(a[e]=n);break;case"ariaHidden":case"aria-hidden":!0!==n&&"true"!==n&&delete d["aria-hidden"];break;default:void 0===o[e]&&(d[e]=n)}}let f=function(e,t){let n,r;let i={...h,...e},s={...T,...t},o={left:i.left,top:i.top,width:i.width,height:i.height},a=i.body;[i,s].forEach(e=>{let t;let n=[],r=e.hFlip,i=e.vFlip,s=e.rotate;switch(r?i?s+=2:(n.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),n.push("scale(-1 1)"),o.top=o.left=0):i&&(n.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),n.push("scale(1 -1)"),o.top=o.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4){case 1:n.unshift("rotate(90 "+(t=o.height/2+o.top).toString()+" "+t.toString()+")");break;case 2:n.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:n.unshift("rotate(-90 "+(t=o.width/2+o.left).toString()+" "+t.toString()+")")}s%2==1&&(o.left!==o.top&&(t=o.left,o.left=o.top,o.top=t),o.width!==o.height&&(t=o.width,o.width=o.height,o.height=t)),n.length&&(a='<g transform="'+n.join(" ")+'">'+a+"</g>")});let l=s.width,u=s.height,c=o.width,d=o.height;null===l?n=C(r=null===u?"1em":"auto"===u?d:u,c/d):(n="auto"===l?c:l,r=null===u?C(n,d/c):"auto"===u?d:u);let f={},p=(e,t)=>{x(t)||(f[e]=t.toString())};return p("width",n),p("height",r),f.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+d.toString(),{attributes:f,body:a}}(e,a),p=f.attributes;if(a.inline&&(u.verticalAlign="-0.125em"),"svg"===l){var m;d.style={...u,...c},Object.assign(d,p);let e=0,n=t.id;return"string"==typeof n&&(n=n.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:(m=function(e,t=A){let n;let r=[];for(;n=R.exec(e);)r.push(n[1]);if(!r.length)return e;let i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach(n=>{let r="function"==typeof t?t(n):t+(O++).toString(),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),e=e.replace(RegExp(i,"g"),"")}(f.body,n?()=>n+"ID"+e++:"iconifyReact"),void 0===r&&function(){try{r=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch(e){r=null}}(),r?r.createHTML(m):m)},s.createElement("svg",d)}let{body:g,width:y,height:v}=e,_="mask"===l||"bg"!==l&&-1!==g.indexOf("currentColor"),b=function(e,t){let n=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let e in t)n+=" "+e+'="'+t[e]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}(g,{...p,width:y+"",height:v+""});return d.style={...u,"--svg":'url("data:image/svg+xml,'+b.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")+'")',width:ey(p.width),height:ey(p.height),...eh,..._?ed:ef,...c},s.createElement("span",d)};
26if(E(!0),i={prepare:(e,t,n)=>{let r=[],i=function(e,t){let n;let r=L[e];if(!r)return 0;if(r.maxURL){let e=0;r.resources.forEach(t=>{e=Math.max(e,t.length)}),n=r.maxURL-e-r.path.length-(t+".json?icons=").length}else n=0;return n}(e,t),s="icons",o={type:s,provider:e,prefix:t,icons:[]},a=0;return n.forEach((n,l)=>{(a+=n.length+1)>=i&&l>0&&(r.push(o),o={type:s,provider:e,prefix:t,icons:[]},a=n.length),o.icons.push(n)}),r.push(o),r},send:(e,t,n)=>{if(!U){n("abort",424);return}let r=function(e){if("string"==typeof e){let t=L[e];if(t)return t.path}return"/"}(t.provider);switch(t.type){case"icons":r+=t.prefix+".json?"+new URLSearchParams({icons:t.icons.join(",")}).toString();break;case"custom":{let e=t.uri;r+="/"===e.slice(0,1)?e.slice(1):e;break}default:n("abort",400);return}let i=503;U(e+r).then(e=>{let t=e.status;if(200!==t){setTimeout(()=>{n(404===t?"abort":"next",t)});return}return i=501,e.json()}).then(e=>{if("object"!=typeof e||null===e){setTimeout(()=>{404===e?n("abort",e):n("next",i)});return}setTimeout(()=>{n("success",e)})}).catch(()=>{n("next",i)})}},N[""]=i,"undefined"!=typeof document&&"undefined"!=typeof window){es();let e=window;if(void 0!==e.IconifyPreload){let t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof t&&null!==t&&(t instanceof Array?t:[t]).forEach(e=>{try{("object"!=typeof e||null===e||e instanceof Array||"object"!=typeof e.icons||"string"!=typeof e.prefix||!function(e,t){if("object"!=typeof e)return!1;if("string"!=typeof t&&(t=e.provider||""),w&&!t&&!e.prefix){let t=!1;return y(e)&&(e.prefix="",p(e,(e,n)=>{n&&function(e,t){let n=a(e,!0,w);return!!n&&function(e,t,n){try{if("string"==typeof n.body)return e.icons[t]={...n},!0}catch(e){}return!1}(_(n.provider,n.prefix),n.name,t)}(e,n)&&(t=!0)})),t}let n=e.prefix;return!!l({provider:t,prefix:n,name:"a"})&&!!b(_(t,n),e)}(e))&&console.error(n)}catch(e){console.error(n)}})}if(void 0!==e.IconifyProviders){let t=e.IconifyProviders;if("object"==typeof t&&null!==t)for(let e in t){let n="IconifyProviders["+e+"] is invalid.";try{let r=t[e];if("object"!=typeof r||!r||void 0===r.resources)continue;!function(e,t){let n=M(t);return null!==n&&(L[e]=n,!0)}(e,r)&&console.error(n)}catch(e){console.error(n)}}}}class e_ extends s.Component{constructor(e){super(e),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(e){this.state.icon!==e&&this.setState({icon:e})}_checkIcon(e){let t;let n=this.state,r=this.props.icon;if("object"==typeof r&&null!==r&&"string"==typeof r.body){this._icon="",this._abortLoading(),(e||null===n.icon)&&this._setData({data:r});return}if("string"!=typeof r||null===(t=a(r,!1,!0))){this._abortLoading(),this._setData(null);return}let i=function(e){let t="string"==typeof e?a(e,!0,w):e;if(t){let e=_(t.provider,t.prefix),n=t.name;return e.icons[n]||(e.missing.has(n)?null:void 0)}}(t);if(!i){this._loading&&this._loading.name===r||(this._abortLoading(),this._icon="",this._setData(null),null!==i&&(this._loading={name:r,abort:ea([t],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||null===n.icon){this._abortLoading(),this._icon=r;let e=["iconify"];""!==t.prefix&&e.push("iconify--"+t.prefix),""!==t.provider&&e.push("iconify--"+t.provider),this._setData({data:i,classes:e}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(e){e.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){let e=this.props,t=this.state.icon;if(null===t)return e.children?e.children:s.createElement("span",{});let n=e;return t.classes&&(n={...e,className:("string"==typeof e.className?e.className+" ":"")+t.classes.join(" ")}),ev({...h,...t.data},n,e._inline,e._ref)}}let eb=s.forwardRef(function(e,t){let n={...e,_ref:t,_inline:!1};return s.createElement(e_,n)});s.forwardRef(function(e,t){let n={...e,_ref:t,_inline:!0};return s.createElement(e_,n)})},24367:function(e,t,n){"use strict";n.d(t,{v0:function(){return t6},LS:function(){return e0},w7:function(){return e1}});var r,i=n(74444),s=n(25816),o=n(97582),a=n(53333),l=n(8463);function u(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}let c=new i.LL("auth","Firebase",u()),h=new a.Yd("@firebase/auth");function d(e,...t){h.logLevel<=a.in.ERROR&&h.error(`Auth (${s.Jn}): ${e}`,...t)}function f(e,...t){throw m(e,...t)}function p(e,...t){return m(e,...t)}function m(e,...t){if("string"!=typeof e){let n=t[0],r=[...t.slice(1)];
26return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return c.create(e,...t)}function g(e,t,...n){if(!e)throw m(t,...n)}function y(e){let t="INTERNAL ASSERTION FAILED: "+e;throw d(t),Error(t)}function v(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.href)||""}function _(){var e;return"undefined"!=typeof self&&(null===(e=self.location)||void 0===e?void 0:e.protocol)||null}class b{constructor(e,t){var n;this.shortDelay=e,this.longDelay=t,n="Short delay should be less than long delay!",t>e||y(n),this.isMobile=(0,i.uI)()||(0,i.b$)()}get(){return!("undefined"!=typeof navigator&&navigator&&"onLine"in navigator&&"boolean"==typeof navigator.onLine&&("http:"===_()||"https:"===_()||(0,i.ru)()||"connection"in navigator))||navigator.onLine?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function w(e,t){var n,r;n=e.emulator,r="Emulator should always be set here",n||y(r);let{url:i}=e.emulator;return t?`${i}${t.startsWith("/")?t.slice(1):t}`:i}class E{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){return this.fetchImpl?this.fetchImpl:"undefined"!=typeof self&&"fetch"in self?self.fetch:void y("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){return this.headersImpl?this.headersImpl:"undefined"!=typeof self&&"Headers"in self?self.Headers:void y("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){return this.responseImpl?this.responseImpl:"undefined"!=typeof self&&"Response"in self?self.Response:void y("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}let S={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-recaptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"},T=new b(3e4,6e4);function I(e,t){return e.tenantId&&!t.tenantId?Object.assign(Object.assign({},t),{tenantId:e.tenantId}):t}async function k(e,t,n,r,s={}){return C(e,s,async()=>{let s={},o={};r&&("GET"===t?o=r:s={body:JSON.stringify(r)});let a=(0,i.xO)(Object.assign({key:e.config.apiKey},o)).slice(1),l=await e._getAdditionalHeaders();return l["Content-Type"]="application/json",e.languageCode&&(l["X-Firebase-Locale"]=e.languageCode),E.fetch()(R(e,e.config.apiHost,n,a),Object.assign({method:t,headers:l,referrerPolicy:"no-referrer"},s))})}
26async function C(e,t,n){e._canInitEmulator=!1;let r=Object.assign(Object.assign({},S),t);try{let t=new A(e),s=await Promise.race([n(),t.promise]);t.clearNetworkTimeout();let o=await s.json();if("needConfirmation"in o)throw O(e,"account-exists-with-different-credential",o);if(s.ok&&!("errorMessage"in o))return o;{let[t,n]=(s.ok?o.errorMessage:o.error.message).split(" : ");if("FEDERATED_USER_ID_ALREADY_LINKED"===t)throw O(e,"credential-already-in-use",o);if("EMAIL_EXISTS"===t)throw O(e,"email-already-in-use",o);if("USER_DISABLED"===t)throw O(e,"user-disabled",o);let a=r[t]||t.toLowerCase().replace(/[_\s]+/g,"-");if(n)throw function(e,t,n){let r=Object.assign(Object.assign({},u()),{[t]:n});return new i.LL("auth","Firebase",r).create(t,{appName:e.name})}(e,a,n);f(e,a)}}catch(t){if(t instanceof i.ZR)throw t;f(e,"network-request-failed",{message:String(t)})}}async function x(e,t,n,r,i={}){let s=await k(e,t,n,r,i);return"mfaPendingCredential"in s&&f(e,"multi-factor-auth-required",{_serverResponse:s}),s}function R(e,t,n,r){let i=`${t}${n}?${r}`;return e.config.emulator?w(e.config,i):`${e.config.apiScheme}://${i}`}class A{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((e,t)=>{this.timer=setTimeout(()=>t(p(this.auth,"network-request-failed")),T.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function O(e,t,n){let r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);let i=p(e,t,r);return i.customData._tokenResponse=n,i}async function N(e,t){return k(e,"POST","/v1/accounts:delete",t)}async function D(e,t){return k(e,"POST","/v1/accounts:lookup",t)}function M(e){if(e)try{let t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch(e){}}async function L(e,t=!1){let n=(0,i.m9)(e),r=await n.getIdToken(t),s=j(r);g(s&&s.exp&&s.auth_time&&s.iat,n.auth,"internal-error");let o="object"==typeof s.firebase?s.firebase:void 0,a=null==o?void 0:o.sign_in_provider;return{claims:s,token:r,authTime:M(P(s.auth_time)),issuedAtTime:M(P(s.iat)),expirationTime:M(P(s.exp)),signInProvider:a||null,signInSecondFactor:(null==o?void 0:o.sign_in_second_factor)||null}}function P(e){return 1e3*Number(e)}function j(e){let[t,n,r]=e.split(".");if(void 0===t||void 0===n||void 0===r)return d("JWT malformed, contained fewer than 3 sections"),null;try{let e=(0,i.tV)(n);if(!e)return d("Failed to decode base64 JWT payload"),null;return JSON.parse(e)}catch(e){return d("Caught error parsing JWT payload as JSON",null==e?void 0:e.toString()),null}}async function U(e,t,n=!1){if(n)return t;try{return await t}catch(t){throw t instanceof i.ZR&&function({code:e}){return"auth/user-disabled"===e||"auth/user-token-expired"===e}(t)&&e.auth.currentUser===e&&await e.auth.signOut(),t}}class F{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,null!==this.timerId&&clearTimeout(this.timerId))}getInterval(e){var t;if(!e)return this.errorBackoff=3e4,Math.max(0,(null!==(t=this.user.stsTokenManager.expirationTime)&&void 0!==t?t:0)-Date.now()-3e5);{let e=this.errorBackoff;return this.errorBackoff=Math.min(2*this.errorBackoff,96e4),e}}schedule(e=!1){if(!this.isRunning)return;let t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(null==e?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class B{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=M(this.lastLoginAt),this.creationTime=M(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function $(e){var t;let n=e.auth,r=await e.getIdToken(),i=await U(e,D(n,{idToken:r}));g(null==i?void 0:i.users.length,n,"internal-error");let s=i.users[0];e._notifyReloadListener(s);let a=(null===(t=s.providerUserInfo)||void 0===t?void 0:t.length)?s.providerUserInfo.map(e=>{var{providerId:t}=e,n=(0,o._T)(e,["providerId"]);
26return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}}):[],l=[...e.providerData.filter(e=>!a.some(t=>t.providerId===e.providerId)),...a],u=e.isAnonymous,c=!(e.email&&s.passwordHash)&&!(null==l?void 0:l.length);Object.assign(e,{uid:s.localId,displayName:s.displayName||null,photoURL:s.photoUrl||null,email:s.email||null,emailVerified:s.emailVerified||!1,phoneNumber:s.phoneNumber||null,tenantId:s.tenantId||null,providerData:l,metadata:new B(s.createdAt,s.lastLoginAt),isAnonymous:!!u&&c})}async function V(e){let t=(0,i.m9)(e);await $(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}async function q(e,t){let n=await C(e,{},async()=>{let n=(0,i.xO)({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:r,apiKey:s}=e.config,o=R(e,r,"/v1/token",`key=${s}`),a=await e._getAdditionalHeaders();return a["Content-Type"]="application/x-www-form-urlencoded",E.fetch()(o,{method:"POST",headers:a,body:n})});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}class z{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){g(e.idToken,"internal-error"),g(void 0!==e.idToken,"internal-error"),g(void 0!==e.refreshToken,"internal-error");let t="expiresIn"in e&&void 0!==e.expiresIn?Number(e.expiresIn):function(e){let t=j(e);return g(t,"internal-error"),g(void 0!==t.exp,"internal-error"),g(void 0!==t.iat,"internal-error"),Number(t.exp)-Number(t.iat)}(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return(g(!this.accessToken||this.refreshToken,e,"user-token-expired"),t||!this.accessToken||this.isExpired)?this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null:this.accessToken}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){let{accessToken:n,refreshToken:r,expiresIn:i}=await q(e,t);this.updateTokensAndExpiration(n,r,Number(i))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+1e3*n}static fromJSON(e,t){let{refreshToken:n,accessToken:r,expirationTime:i}=t,s=new z;return n&&(g("string"==typeof n,"internal-error",{appName:e}),s.refreshToken=n),r&&(g("string"==typeof r,"internal-error",{appName:e}),s.accessToken=r),i&&(g("number"==typeof i,"internal-error",{appName:e}),s.expirationTime=i),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new z,this.toJSON())}_performRefresh(){return y("not implemented")}}function H(e,t){g("string"==typeof e||void 0===e,"internal-error",{appName:t})}class W{constructor(e){var{uid:t,auth:n,stsTokenManager:r}=e,i=(0,o._T)(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new F(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=i.displayName||null,this.email=i.email||null,this.emailVerified=i.emailVerified||!1,this.phoneNumber=i.phoneNumber||null,this.photoURL=i.photoURL||null,this.isAnonymous=i.isAnonymous||!1,this.tenantId=i.tenantId||null,this.providerData=i.providerData?[...i.providerData]:[],this.metadata=new B(i.createdAt||void 0,i.lastLoginAt||void 0)}async getIdToken(e){let t=await U(this,this.stsTokenManager.getToken(this.auth,e));return g(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return L(this,e)}reload(){return V(this)}_assign(e){this!==e&&(g(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(e=>Object.assign({},e)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){let t=new W(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}));return t.metadata._copy(this.metadata),t}_onReload(e){g(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await $(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){let e=await this.getIdToken();return await U(this,N(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
26nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,r,i,s,o,a,l,u;let c=null!==(n=t.displayName)&&void 0!==n?n:void 0,h=null!==(r=t.email)&&void 0!==r?r:void 0,d=null!==(i=t.phoneNumber)&&void 0!==i?i:void 0,f=null!==(s=t.photoURL)&&void 0!==s?s:void 0,p=null!==(o=t.tenantId)&&void 0!==o?o:void 0,m=null!==(a=t._redirectEventId)&&void 0!==a?a:void 0,y=null!==(l=t.createdAt)&&void 0!==l?l:void 0,v=null!==(u=t.lastLoginAt)&&void 0!==u?u:void 0,{uid:_,emailVerified:b,isAnonymous:w,providerData:E,stsTokenManager:S}=t;g(_&&S,e,"internal-error");let T=z.fromJSON(this.name,S);g("string"==typeof _,e,"internal-error"),H(c,e.name),H(h,e.name),g("boolean"==typeof b,e,"internal-error"),g("boolean"==typeof w,e,"internal-error"),H(d,e.name),H(f,e.name),H(p,e.name),H(m,e.name),H(y,e.name),H(v,e.name);let I=new W({uid:_,auth:e,email:h,emailVerified:b,displayName:c,isAnonymous:w,photoURL:f,phoneNumber:d,tenantId:p,stsTokenManager:T,createdAt:y,lastLoginAt:v});return E&&Array.isArray(E)&&(I.providerData=E.map(e=>Object.assign({},e))),m&&(I._redirectEventId=m),I}static async _fromIdTokenResponse(e,t,n=!1){let r=new z;r.updateFromServerResponse(t);let i=new W({uid:t.localId,auth:e,stsTokenManager:r,isAnonymous:n});return await $(i),i}}let G=new Map;function K(e){var t,n;t="Expected a class definition",e instanceof Function||y(t);let r=G.get(e);return r?(n="Instance stored in cache mismatched with class",r instanceof e||y(n)):(r=new e,G.set(e,r)),r}class X{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){let t=this.storage[e];return void 0===t?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}function J(e,t,n){return`firebase:${e}:${t}:${n}`}X.type="NONE";class Z{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;let{config:r,name:i}=this.auth;this.fullUserKey=J(this.userKey,r.apiKey,i),this.fullPersistenceKey=J("persistence",r.apiKey,i),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){let e=await this.persistence._get(this.fullUserKey);return e?W._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;let t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new Z(K(X),e,n);let r=(await Promise.all(t.map(async e=>{if(await e._isAvailable())return e}))).filter(e=>e),i=r[0]||K(X),s=J(n,e.config.apiKey,e.name),o=null;for(let n of t)try{let t=await n._get(s);if(t){let r=W._fromJSON(e,t);n!==i&&(o=r),i=n;break}}catch(e){}let a=r.filter(e=>e._shouldAllowMigration);return i._shouldAllowMigration&&a.length&&(i=a[0],o&&await i._set(s,o.toJSON()),await Promise.all(t.map(async e=>{if(e!==i)try{await e._remove(s)}catch(e){}}))),new Z(i,e,n)}}function Y(e){let t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(en(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";{if(t.includes("edge/"))return"Edge";if(Q(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ei(t))return"Blackberry";if(es(t))return"Webos";if(ee(t))return"Safari";if((t.includes("chrome/")||et(t))&&!t.includes("edge/"))return"Chrome";if(er(t))return"Android";let n=e.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/);if((null==n?void 0:n.length)===2)return n[1]}return"Other"}function Q(e=(0,i.z$)()){return/firefox\//i.test(e)}function ee(e=(0,i.z$)()){let t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function et(e=(0,i.z$)()){return/crios\//i.test(e)}function en(e=(0,i.z$)()){return/iemobile/i.test(e)}function er(e=(0,i.z$)()){return/android/i.test(e)}function ei(e=(0,i.z$)()){return/blackberry/i.test(e)}function es(e=(0,i.z$)()){return/webos/i.test(e)}function eo(e=(0,i.z$)()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function ea(e=(0,i.z$)()){return eo(e)||er(e)||es(e)||ei(e)||/windows phone/i.test(e)||en(e)}function el(e,t=[]){let n;switch(e){case"Browser":n=Y((0,i.z$)());break;case"Worker":n=`${Y((0,i.z$)())}-${e}`;break;default:n=e}let r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${s.Jn}/${r}`}async function eu(e,t){return k(e,"GET","/v2/recaptchaConfig",I(e,t))}function ec(e){return void 0!==e&&void 0!==e.enterprise}class eh{constructor(e){if(this.siteKey="",this.emailPasswordEnabled=!1,void 0===e.recaptchaKey)throw Error("recaptchaKey undefined");this.siteKey=e.recaptchaKey.split("/")[3],this.emailPasswordEnabled=e.recaptchaEnforcementState.some(e=>"EMAIL_PASSWORD_PROVIDER"===e.provider&&"OFF"!==e.enforcementState)}}function ed(e){return new Promise((t,n)=>{var r,i;let s=document.createElement("script");s.setAttribute("src",e),s.onload=t,s.onerror=e=>{let t=p("internal-error");t.customData=e,n(t)},s.type="text/javascript",s.charset="UTF-8",(null!==(i=null===(r=document.getElementsByTagName("head"))||void 0===r?void 0:r[0])&&void 0!==i?i:document).appendChild(s)})}function ef(e){return`__${e}${Math.floor(1e6*Math.random())}`}class ep{constructor(e){this.type="recaptcha-enterprise",this.auth=ev
26(e)}async verify(e="verify",t=!1){async function n(e){if(!t){if(null==e.tenantId&&null!=e._agentRecaptchaConfig)return e._agentRecaptchaConfig.siteKey;if(null!=e.tenantId&&void 0!==e._tenantRecaptchaConfigs[e.tenantId])return e._tenantRecaptchaConfigs[e.tenantId].siteKey}return new Promise(async(t,n)=>{eu(e,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(r=>{if(void 0===r.recaptchaKey)n(Error("recaptcha Enterprise site key undefined"));else{let n=new eh(r);return null==e.tenantId?e._agentRecaptchaConfig=n:e._tenantRecaptchaConfigs[e.tenantId]=n,t(n.siteKey)}}).catch(e=>{n(e)})})}function r(t,n,r){let i=window.grecaptcha;ec(i)?i.enterprise.ready(()=>{i.enterprise.execute(t,{action:e}).then(e=>{n(e)}).catch(()=>{n("NO_RECAPTCHA")})}):r(Error("No reCAPTCHA enterprise script loaded."))}return new Promise((e,i)=>{n(this.auth).then(n=>{if(!t&&ec(window.grecaptcha))r(n,e,i);else{if("undefined"==typeof window){i(Error("RecaptchaVerifier is only supported in browser"));return}ed("https://www.google.com/recaptcha/enterprise.js?render="+n).then(()=>{r(n,e,i)}).catch(e=>{i(e)})}}).catch(e=>{i(e)})})}}async function em(e,t,n,r=!1){let i;let s=new ep(e);try{i=await s.verify(n)}catch(e){i=await s.verify(n,!0)}let o=Object.assign({},t);return r?Object.assign(o,{captchaResp:i}):Object.assign(o,{captchaResponse:i}),Object.assign(o,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(o,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),o}class eg{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){let n=t=>new Promise((n,r)=>{try{let r=e(t);n(r)}catch(e){r(e)}});n.onAbort=t,this.queue.push(n);let r=this.queue.length-1;return()=>{this.queue[r]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;let t=[];try{for(let n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(e){for(let e of(t.reverse(),t))try{e()}catch(e){}throw this.auth._errorFactory.create("login-blocked",{originalMessage:null==e?void 0:e.message})}}}class ey{constructor(e,t,n,r){this.app=e,this.heartbeatServiceProvider=t,this.appCheckServiceProvider=n,this.config=r,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new e_(this),this.idTokenSubscription=new e_(this),this.beforeStateQueue=new eg(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=c,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=r.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=K(t)),this._initializationPromise=this.queue(async()=>{var n,r;if(!this._deleted&&(this.persistenceManager=await Z.create(this,e),!this._deleted)){if(null===(n=this._popupRedirectResolver)||void 0===n?void 0:n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch(e){}await this.initializeCurrentUser(t),this.lastNotifiedUid=(null===(r=this.currentUser)||void 0===r?void 0:r.uid)||null,this._deleted||(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;let e=await this.assertedPersistence.getCurrentUser();if(this.currentUser||e){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var t;let n=await this.assertedPersistence.getCurrentUser(),r=n,i=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();let n=null===(t=this.redirectUser)||void 0===t?void 0:t._redirectEventId,s=null==r?void 0:r._redirectEventId,o=await this.tryRedirectSignIn(e);(!n||n===s)&&(null==o?void 0:o.user)&&(r=o.user,i=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(i)try{await this.beforeStateQueue.runMiddleware(r)}catch(e){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(e))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return(g(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId)?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch(e){await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await $(e)}catch(e){if((null==e?void 0:e.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=function(){if("undefined"==typeof navigator)return null;let e=navigator;return e.languages&&e.languages[0]||e.language||null}()}async _delete(){this._deleted=!0}
26async updateCurrentUser(e){let t=e?(0,i.m9)(e):null;return t&&g(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&g(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(K(e))})}async initializeRecaptchaConfig(){let e=new eh(await eu(this,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}));null==this.tenantId?this._agentRecaptchaConfig=e:this._tenantRecaptchaConfigs[this.tenantId]=e,e.emailPasswordEnabled&&new ep(this).verify()}_getRecaptchaConfig(){return null==this.tenantId?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new i.LL("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:null===(e=this._currentUser)||void 0===e?void 0:e.toJSON()}}async _setRedirectUser(e,t){let n=await this.getOrInitRedirectPersistenceManager(t);return null===e?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){let t=e&&K(e)||this._popupRedirectResolver;g(t,this,"argument-error"),this.redirectPersistenceManager=await Z.create(this,[K(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return(this._isInitialized&&await this.queue(async()=>{}),(null===(t=this._currentUser)||void 0===t?void 0:t._redirectEventId)===e)?this._currentUser:(null===(n=this.redirectUser)||void 0===n?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);let n=null!==(t=null===(e=this.currentUser)||void 0===e?void 0:e.uid)&&void 0!==t?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,r){if(this._deleted)return()=>{};let i="function"==typeof t?t:t.next.bind(t),s=this._isInitialized?Promise.resolve():this._initializationPromise;return(g(s,this,"internal-error"),s.then(()=>i(this.currentUser)),"function"==typeof t)?e.addObserver(t,n,r):e.addObserver(t)}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return g(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=el(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;let t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);let n=await (null===(e=this.heartbeatServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getHeartbeatsHeader());n&&(t["X-Firebase-Client"]=n);let r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){var e;let t=await (null===(e=this.appCheckServiceProvider.getImmediate({optional:!0}))||void 0===e?void 0:e.getToken());return(null==t?void 0:t.error)&&function(e,...t){h.logLevel<=a.in.WARN&&h.warn(`Auth (${s.Jn}): ${e}`,...t)}(`Error while retrieving App Check token: ${t.error}`),null==t?void 0:t.token}}function ev(e){return(0,i.m9)(e)}class e_{constructor(e){this.auth=e,this.observer=null,this.addObserver=(0,i.ne)(e=>this.observer=e)}get next(){return g(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function eb(e){let t=e.indexOf(":");
26return t<0?"":e.substr(0,t+1)}function ew(e){if(!e)return null;let t=Number(e);return isNaN(t)?null:t}class eE{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return y("not implemented")}_getIdTokenResponse(e){return y("not implemented")}_linkToIdToken(e,t){return y("not implemented")}_getReauthenticationResolver(e){return y("not implemented")}}async function eS(e,t){return k(e,"POST","/v1/accounts:update",t)}async function eT(e,t){return x(e,"POST","/v1/accounts:signInWithPassword",I(e,t))}async function eI(e,t){return k(e,"POST","/v1/accounts:sendOobCode",I(e,t))}async function ek(e,t){return eI(e,t)}async function eC(e,t){return x(e,"POST","/v1/accounts:signInWithEmailLink",I(e,t))}async function ex(e,t){return x(e,"POST","/v1/accounts:signInWithEmailLink",I(e,t))}class eR extends eE{constructor(e,t,n,r=null){super("password",n),this._email=e,this._password=t,this._tenantId=r}static _fromEmailAndPassword(e,t){return new eR(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new eR(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e;if((null==t?void 0:t.email)&&(null==t?void 0:t.password)){if("password"===t.signInMethod)return this._fromEmailAndPassword(t.email,t.password);if("emailLink"===t.signInMethod)return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){var t;switch(this.signInMethod){case"password":let n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};if(null===(t=e._getRecaptchaConfig())||void 0===t||!t.emailPasswordEnabled)return eT(e,n).catch(async t=>{if("auth/missing-recaptcha-token"!==t.code)return Promise.reject(t);{console.log("Sign-in with email address and password is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow.");let t=await em(e,n,"signInWithPassword");return eT(e,t)}});{let t=await em(e,n,"signInWithPassword");return eT(e,t)}case"emailLink":return eC(e,{email:this._email,oobCode:this._password});default:f(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return eS(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return ex(e,{idToken:t,email:this._email,oobCode:this._password});default:f(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}async function eA(e,t){return x(e,"POST","/v1/accounts:signInWithIdp",I(e,t))}class eO extends eE{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){let t=new eO(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):f("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,n
26once:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){let t="string"==typeof e?JSON.parse(e):e,{providerId:n,signInMethod:r}=t,i=(0,o._T)(t,["providerId","signInMethod"]);if(!n||!r)return null;let s=new eO(n,r);return s.idToken=i.idToken||void 0,s.accessToken=i.accessToken||void 0,s.secret=i.secret,s.nonce=i.nonce,s.pendingToken=i.pendingToken||null,s}_getIdTokenResponse(e){return eA(e,this.buildRequest())}_linkToIdToken(e,t){let n=this.buildRequest();return n.idToken=t,eA(e,n)}_getReauthenticationResolver(e){let t=this.buildRequest();return t.autoCreate=!1,eA(e,t)}buildRequest(){let e={requestUri:"http://localhost",returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{let t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=(0,i.xO)(t)}return e}}async function eN(e,t){return k(e,"POST","/v1/accounts:sendVerificationCode",I(e,t))}async function eD(e,t){return x(e,"POST","/v1/accounts:signInWithPhoneNumber",I(e,t))}async function eM(e,t){let n=await x(e,"POST","/v1/accounts:signInWithPhoneNumber",I(e,t));if(n.temporaryProof)throw O(e,"account-exists-with-different-credential",n);return n}let eL={USER_NOT_FOUND:"user-not-found"};async function eP(e,t){return x(e,"POST","/v1/accounts:signInWithPhoneNumber",I(e,Object.assign(Object.assign({},t),{operation:"REAUTH"})),eL)}class ej extends eE{constructor(e){super("phone","phone"),this.params=e}static _fromVerification(e,t){return new ej({verificationId:e,verificationCode:t})}static _fromTokenResponse(e,t){return new ej({phoneNumber:e,temporaryProof:t})}_getIdTokenResponse(e){return eD(e,this._makeVerificationRequest())}_linkToIdToken(e,t){return eM(e,Object.assign({idToken:t},this._makeVerificationRequest()))}_getReauthenticationResolver(e){return eP(e,this._makeVerificationRequest())}_makeVerificationRequest(){let{temporaryProof:e,phoneNumber:t,verificationId:n,verificationCode:r}=this.params;return e&&t?{temporaryProof:e,phoneNumber:t}:{sessionInfo:n,code:r}}toJSON(){let e={providerId:this.providerId};return this.params.phoneNumber&&(e.phoneNumber=this.params.phoneNumber),this.params.temporaryProof&&(e.temporaryProof=this.params.temporaryProof),this.params.verificationCode&&(e.verificationCode=this.params.verificationCode),this.params.verificationId&&(e.verificationId=this.params.verificationId),e}static fromJSON(e){"string"==typeof e&&(e=JSON.parse(e));let{verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}=e;return n||t||r||i?new ej({verificationId:t,verificationCode:n,phoneNumber:r,temporaryProof:i}):null}}class eU{constructor(e){var t,n,r,s,o,a;let l=(0,i.zd)((0,i.pd)(e)),u=null!==(t=l.apiKey)&&void 0!==t?t:null,c=null!==(n=l.oobCode)&&void 0!==n?n:null,h=function(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}(null!==(r=l.mode)&&void 0!==r?r:null);g(u&&c&&h,"argument-error"),this.apiKey=u,this.operation=h,this.code=c,this.continueUrl=null!==(s=l.continueUrl)&&void 0!==s?s:null,this.languageCode=null!==(o=l.languageCode)&&void 0!==o?o:null,this.tenantId=null!==(a=l.tenantId)&&void 0!==a?a:null}static parseLink(e){let t=function(e){let t=(0,i.zd)((0,i.pd)(e)).link,n=t?(0,i.zd)((0,i.pd)(t)).deep_link_id:null,r=(0,i.zd)((0,i.pd)(e)).deep_link_id;return(r?(0,i.zd)((0,i.pd)(r)).link:null)||r||n||t||e}(e);try{return new eU(t)}catch(e){return null}}}class eF{constructor(){this.providerId=eF.PROVIDER_ID}static credential(e,t){return eR._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){let n=eU.parseLink(t);return g(n,"argument-error"),eR._fromEmailAndCode(e,n.code,n.tenantId)}}eF.PROVIDER_ID="password",eF.EMAIL_PASSWORD_SIGN_IN_METHOD="password",eF.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class eB{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}class e$ extends eB{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}class eV extends e${constructor(){super("facebook.com")}static credential(e){return eO._fromParams({providerId:eV.PROVIDER_ID,signInMethod:eV.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return eV.credentialFromTaggedObject(e)}static credentialFromError(e){return eV.credentialFromTaggedObject(e.customData||{})}
26static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return eV.credential(e.oauthAccessToken)}catch(e){return null}}}eV.FACEBOOK_SIGN_IN_METHOD="facebook.com",eV.PROVIDER_ID="facebook.com";class eq extends e${constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return eO._fromParams({providerId:eq.PROVIDER_ID,signInMethod:eq.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return eq.credentialFromTaggedObject(e)}static credentialFromError(e){return eq.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return eq.credential(t,n)}catch(e){return null}}}eq.GOOGLE_SIGN_IN_METHOD="google.com",eq.PROVIDER_ID="google.com";class ez extends e${constructor(){super("github.com")}static credential(e){return eO._fromParams({providerId:ez.PROVIDER_ID,signInMethod:ez.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return ez.credentialFromTaggedObject(e)}static credentialFromError(e){return ez.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return ez.credential(e.oauthAccessToken)}catch(e){return null}}}ez.GITHUB_SIGN_IN_METHOD="github.com",ez.PROVIDER_ID="github.com";class eH extends e${constructor(){super("twitter.com")}static credential(e,t){return eO._fromParams({providerId:eH.PROVIDER_ID,signInMethod:eH.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return eH.credentialFromTaggedObject(e)}static credentialFromError(e){return eH.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return eH.credential(t,n)}catch(e){return null}}}eH.TWITTER_SIGN_IN_METHOD="twitter.com",eH.PROVIDER_ID="twitter.com";class eW{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,r=!1){return new eW({user:await W._fromIdTokenResponse(e,n,r),providerId:eG(n),_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){return await e._updateTokensIfNecessary(n,!0),new eW({user:e,providerId:eG(n),_tokenResponse:n,operationType:t})}}function eG(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class eK extends i.ZR{constructor(e,t,n,r){var i;super(t.code,t.message),this.operationType=n,this.user=r,Object.setPrototypeOf(this,eK.prototype),this.customData={appName:e.name,tenantId:null!==(i=e.tenantId)&&void 0!==i?i:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,r){return new eK(e,t,n,r)}}function eX(e,t,n,r){return("reauthenticate"===t?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(n=>{if("auth/multi-factor-auth-required"===n.code)throw eK._fromErrorAndOperation(e,n,t,r);throw n})}async function eJ(e,t,n=!1){let r=await U(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return eW._forOperation(e,"link",r)}async function eZ(e,t,n=!1){let{auth:r}=e,i="reauthenticate";try{let s=await U(e,eX(r,i,t,e),n);g(s.idToken,r,"internal-error");let o=j(s.idToken);g(o,r,"internal-error");let{sub:a}=o;return g(e.uid===a,r,"user-mismatch"),eW._forOperation(e,i,s)}catch(e){throw(null==e?void 0:e.code)==="auth/user-not-found"&&f(r,"user-mismatch"),e}}async function eY(e,t,n=!1){let r="signIn",i=await eX(e,r,t),s=await eW._fromIdTokenResponse(e,r,i);return n||await e._updateCurrentUser(s.user),s}function eQ(e,t,n){var r;g((null===(r=n.url)||void 0===r?void 0:r.length)>0,e,"invalid-continue-uri"),g(void 0===n.dynamicLinkDomain||n.dynamicLinkDomain.length>0,e,"invalid-dynamic-link-domain"),t.continueUrl=n.url,t.dynamicLinkDomain=n.dynamicLinkDomain,t.canHandleCodeInApp=n.handleCodeInApp,n.iOS&&(g(n.iOS.bundleId.length>0,e,"missing-ios-bundle-id"),t.iOSBundleId=n.iOS.bundleId),n.android&&(g(n.android.packageName.length>0,e,"missing-android-pkg-name"),t.androidInstallApp=n.android.installApp,t.androidMinimumVersionCode=n.android.minimumVersion,t.androidPackageName=n.android.packageName)}async function e0(e,t,n){var r;let i=ev(e),s={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};if(null===(r=i._getRecaptchaConfig())||void 0===r?void 0:r.emailPasswordEnabled){let e=await em(i,s,"getOobCode",!0);n&&eQ(i,e,n),await ek(i,e)}else n&&eQ(i,s,n),await ek(i,s).catch(async e=>
26{if("auth/missing-recaptcha-token"!==e.code)return Promise.reject(e);{console.log("Password resets are protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the password reset flow.");let e=await em(i,s,"getOobCode",!0);n&&eQ(i,e,n),await ek(i,e)}})}function e1(e){return(0,i.m9)(e).signOut()}new WeakMap;let e2="__sak";class e4{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{if(!this.storage)return Promise.resolve(!1);return this.storage.setItem(e2,"1"),this.storage.removeItem(e2),Promise.resolve(!0)}catch(e){return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){let t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}class e9 extends e4{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=function(){let e=(0,i.z$)();return ee(e)||eo(e)}()&&function(){try{return!!(window&&window!==window.top)}catch(e){return!1}}(),this.fallbackToPolling=ea(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(let t of Object.keys(this.listeners)){let n=this.storage.getItem(t),r=this.localCache[t];n!==r&&e(t,r,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((e,t,n)=>{this.notifyListeners(e,n)});return}let n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){let r=this.storage.getItem(n);if(e.newValue!==r)null!==e.newValue?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}let r=()=>{let e=this.storage.getItem(n);(t||this.localCache[n]!==e)&&this.notifyListeners(n,e)},s=this.storage.getItem(n);(0,i.w1)()&&10===document.documentMode&&s!==e.newValue&&e.newValue!==e.oldValue?setTimeout(r,10):r()}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t?JSON.parse(t):t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)})},1e3)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){0===Object.keys(this.listeners).length&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){let t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}e9.type="LOCAL";class e6 extends e4{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}e6.type="SESSION";class e3{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){let t=this.receivers.find(t=>t.isListeningto(e));if(t)return t;let n=new e3(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){let{eventId:t,eventType:n,data:r}=e.data,i=this.handlersMap[n];if(!(null==i?void 0:i.size))return;e.ports[0].postMessage({status:"ack",eventId:t,eventType:n});let s=Array.from(i).map(async t=>t(e.origin,r)),o=await Promise.all(s.map(async e=>{try{let t=await e;return{fulfilled:!0,value:t}}catch(e){return{fulfilled:!1,reason:e}}}));e.ports[0].postMessage({status:"done",eventId:t,eventType:n,response:o})}_subscribe(e,t){0===Object.keys(this.handlersMap).length&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),t&&0!==this.handlersMap[e].size||delete this.handlersMap[e],0===Object.keys(this.handlersMap).length&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}function e5(e="",t=10){let n="";for(let e=0;e<t;e++)n+=Math.floor(10*Math.random());return e+n}e3.receivers=[];class e7{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,n=50){let r,i;let s="undefined"!=typeof MessageChannel?new MessageChannel:null;if(!s)throw Error("connection_unavailable");return new Promise((o,a)=>{let l=e5("",20);s.port1.start();let u=setTimeout(()=>{a(Error("unsupported_event"))},n);i={messageChannel:s,onMessage(e){if(e.data.eventId===l)switch(e.data.status){case"ack":clearTimeout(u),r=setTimeout(()=>{a(Error("timeout"))},3e3);break;case"done":clearTimeout(r),o(e.data.response);break;default:clearTimeout(u),clearTimeout(r),a(Error("invalid_response"))}}},this.handlers.add(i),s.port1.addEventListener("message",i.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[s.port2])}).finally(()=>{i&&this.removeMessageHandler(i)})}}function e8(){return window}
26function te(){return void 0!==e8().WorkerGlobalScope&&"function"==typeof e8().importScripts}async function tt(){if(!(null==navigator?void 0:navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch(e){return null}}let tn="firebaseLocalStorageDb",tr="firebaseLocalStorage",ti="fbase_key";class ts{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function to(e,t){return e.transaction([tr],t?"readwrite":"readonly").objectStore(tr)}function ta(){let e=indexedDB.open(tn,1);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{let t=e.result;try{t.createObjectStore(tr,{keyPath:ti})}catch(e){n(e)}}),e.addEventListener("success",async()=>{let n=e.result;n.objectStoreNames.contains(tr)?t(n):(n.close(),await new ts(indexedDB.deleteDatabase(tn)).toPromise(),t(await ta()))})})}async function tl(e,t,n){return new ts(to(e,!0).put({[ti]:t,value:n})).toPromise()}async function tu(e,t){let n=to(e,!1).get(t),r=await new ts(n).toPromise();return void 0===r?null:r.value}function tc(e,t){return new ts(to(e,!0).delete(t)).toPromise()}class th{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db||(this.db=await ta()),this.db}async _withRetries(e){let t=0;for(;;)try{let t=await this._openDb();return await e(t)}catch(e){if(t++>3)throw e;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return te()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=e3._getInstance(te()?self:null),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await tt(),!this.activeServiceWorker)return;this.sender=new e7(this.activeServiceWorker);let n=await this.sender._send("ping",{},800);n&&(null===(e=n[0])||void 0===e?void 0:e.fulfilled)&&(null===(t=n[0])||void 0===t?void 0:t.value.includes("keyChanged"))&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){var t;if(this.sender&&this.activeServiceWorker&&((null===(t=null==navigator?void 0:navigator.serviceWorker)||void 0===t?void 0:t.controller)||null)===this.activeServiceWorker)try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch(e){}}async _isAvailable(){try{if(!indexedDB)return!1;let e=await ta();return await tl(e,e2,"1"),await tc(e,e2),!0}catch(e){}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>tl(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){let t=await this._withRetries(t=>tu(t,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>tc(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){let e=await this._withRetries(e=>new ts(to(e,!1).getAll()).toPromise());if(!e||0!==this.pendingWrites)return[];let t=[],n=new Set;for(let{fbase_key:r,value:i}of e)n.add(r),JSON.stringify(this.localCache[r])!==JSON.stringify(i)&&(this.notifyListeners(r,i),t.push(r));for(let e of Object.keys(this.localCache))this.localCache[e]&&!n.has(e)&&(this.notifyListeners(e,null),t.push(e));return t}notifyListeners(e,t){this.localCache[e]=t;let n=this.listeners[e];if(n)for(let e of Array.from(n))e(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),800)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){0===Object.keys(this.listeners).length&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),0===this.listeners[e].size&&delete this.listeners[e]),0===Object.keys(this.listeners).length&&this.stopPolling()}}async function td(e,t,n){var r,i,s;let o=await n.verify();try{let a;if(g("string"==typeof o,e,"argument-error"),g("recaptcha"===n.type,e,"argument-error"),a="string"==typeof t?{phoneNumber:t}
26:t,"session"in a){let t=a.session;if("phoneNumber"in a)return g("enroll"===t.type,e,"internal-error"),(await (i={idToken:t.credential,phoneEnrollmentInfo:{phoneNumber:a.phoneNumber,recaptchaToken:o}},k(e,"POST","/v2/accounts/mfaEnrollment:start",I(e,i)))).phoneSessionInfo.sessionInfo;{g("signin"===t.type,e,"internal-error");let n=(null===(r=a.multiFactorHint)||void 0===r?void 0:r.uid)||a.multiFactorUid;return g(n,e,"missing-multi-factor-info"),(await (s={mfaPendingCredential:t.credential,mfaEnrollmentId:n,phoneSignInInfo:{recaptchaToken:o}},k(e,"POST","/v2/accounts/mfaSignIn:start",I(e,s)))).phoneResponseInfo.sessionInfo}}{let{sessionInfo:t}=await eN(e,{phoneNumber:a.phoneNumber,recaptchaToken:o});return t}}finally{n._reset()}}th.type="LOCAL",ef("rcb"),new b(3e4,6e4);class tf{constructor(e){this.providerId=tf.PROVIDER_ID,this.auth=ev(e)}verifyPhoneNumber(e,t){return td(this.auth,e,(0,i.m9)(t))}static credential(e,t){return ej._fromVerification(e,t)}static credentialFromResult(e){return tf.credentialFromTaggedObject(e)}static credentialFromError(e){return tf.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;let{phoneNumber:t,temporaryProof:n}=e;return t&&n?ej._fromTokenResponse(t,n):null}}tf.PROVIDER_ID="phone",tf.PHONE_SIGN_IN_METHOD="phone";class tp extends eE{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return eA(e,this._buildIdpRequest())}_linkToIdToken(e,t){return eA(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return eA(e,this._buildIdpRequest())}_buildIdpRequest(e){let t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function tm(e){return eY(e.auth,new tp(e),e.bypassAuthState)}function tg(e){let{auth:t,user:n}=e;return g(n,t,"internal-error"),eZ(n,new tp(e),e.bypassAuthState)}async function ty(e){let{auth:t,user:n}=e;return g(n,t,"internal-error"),eJ(n,new tp(e),e.bypassAuthState)}class tv{constructor(e,t,n,r,i=!1){this.auth=e,this.resolver=n,this.user=r,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(e){this.reject(e)}})}async onAuthEvent(e){let{urlResponse:t,sessionId:n,postBody:r,tenantId:i,error:s,type:o}=e;if(s){this.reject(s);return}let a={auth:this.auth,requestUri:t,sessionId:n,tenantId:i||void 0,postBody:r||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(o)(a))}catch(e){this.reject(e)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return tm;case"linkViaPopup":case"linkViaRedirect":return ty;case"reauthViaPopup":case"reauthViaRedirect":return tg;default:f(this.auth,"internal-error")}}resolve(e){var t,n;t=this.pendingPromise,n="Pending promise was never set",t||y(n),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){var t,n;t=this.pendingPromise,n="Pending promise was never set",t||y(n),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}let t_=new b(2e3,1e4);class tb extends tv{constructor(e,t,n,r,i){super(e,t,r,i),this.provider=n,this.authWindow=null,this.pollId=null,tb.currentPopupAction&&tb.currentPopupAction.cancel(),tb.currentPopupAction=this}async executeNotNull(){let e=await this.execute();return g(e,this.auth,"internal-error"),e}async onExecution(){var e,t;e=1===this.filter.length,t="Popup operations only handle one event",e||y(t);let n=e5();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],n),this.authWindow.associatedEvent=n,this.resolver._originValidation(this.auth).catch(e=>{this.reject(e)}),this.resolver._isIframeWebStorageSupported(this.auth,e=>{e||this.reject(p(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return(null===(e=this.authWindow)||void 0===e?void 0:e.associatedEvent)||null}cancel(){this.reject(p(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,tb.currentPopupAction=null}pollUserCancellation(){let e=()=>{var t,n;if(null===(n=null===(t=this.authWindow)||void 0===t?void 0:t.window)||void 0===n?void 0:n.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(p(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(e,t_.get())};e()}}tb.currentPopupAction=null;let tw=new Map;class tE extends tv{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=tw.get(this.auth._key());if(!e){try{let t=await tS(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(t)}catch(t){e=()=>Promise.reject(t)}tw.set(this.auth._key(),e)}return this.bypassAuthState||tw.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if("signInViaRedirect"===e.type)return super.onAuthEvent(e);
26if("unknown"===e.type){this.resolve(null);return}if(e.eventId){let t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function tS(e,t){let n=J("pendingRedirect",t.config.apiKey,t.name),r=K(e._redirectPersistence);if(!await r._isAvailable())return!1;let i=await r._get(n)==="true";return await r._remove(n),i}function tT(e,t){tw.set(e._key(),t)}async function tI(e,t,n=!1){let r=ev(e),i=t?K(t):(g(r._popupRedirectResolver,r,"argument-error"),r._popupRedirectResolver),s=new tE(r,i,n),o=await s.execute();return o&&!n&&(delete o.user._redirectEventId,await r._persistUserIfCurrent(o.user),await r._setRedirectUser(null,t)),o}class tk{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!function(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return tx(e);default:return!1}}(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!tx(e)){let r=(null===(n=e.error.code)||void 0===n?void 0:n.split("auth/")[1])||"internal-error";t.onError(p(this.auth,r))}else t.onAuthEvent(e)}isEventForConsumer(e,t){let n=null===t.eventId||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=6e5&&this.cachedEventUids.clear(),this.cachedEventUids.has(tC(e))}saveEventToCache(e){this.cachedEventUids.add(tC(e)),this.lastProcessedEventTime=Date.now()}}function tC(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(e=>e).join("-")}function tx({type:e,error:t}){return"unknown"===e&&(null==t?void 0:t.code)==="auth/no-auth-event"}async function tR(e,t={}){return k(e,"GET","/v1/projects",t)}let tA=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,tO=/^https?/;async function tN(e){if(e.config.emulator)return;let{authorizedDomains:t}=await tR(e);for(let e of t)try{if(function(e){let t=v(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){let i=new URL(e);return""===i.hostname&&""===r?"chrome-extension:"===n&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):"chrome-extension:"===n&&i.hostname===r}if(!tO.test(n))return!1;if(tA.test(e))return r===e;let i=e.replace(/\./g,"\\.");return RegExp("^(.+\\."+i+"|"+i+")$","i").test(r)}(e))return}catch(e){}f(e,"unauthorized-domain")}let tD=new b(3e4,6e4);function tM(){let e=e8().___jsl;if(null==e?void 0:e.H){for(let t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let t=0;t<e.CP.length;t++)e.CP[t]=null}}let tL=null,tP=new b(5e3,15e3),tj={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},tU=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);async function tF(e){let t=await (tL=tL||new Promise((t,n)=>{var r,i,s;function o(){tM(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{tM(),n(p(e,"network-request-failed"))},timeout:tD.get()})}if(null===(i=null===(r=e8().gapi)||void 0===r?void 0:r.iframes)||void 0===i?void 0:i.Iframe)t(gapi.iframes.getContext());else if(null===(s=e8().gapi)||void 0===s?void 0:s.load)o();else{let t=ef("iframefcb");return e8()[t]=()=>{gapi.load?o():n(p(e,"network-request-failed"))},ed(`https://apis.google.com/js/api.js?onload=${t}`).catch(e=>n(e))}}).catch(e=>{throw tL=null,e})),n=e8().gapi;return g(n,e,"internal-error"),t.open({where:document.body,url:function(e){let t=e.config;g(t.authDomain,e,"auth-domain-config-required");let n=t.emulator?w(t,"emulator/auth/iframe"):`https://${e.config.authDomain}
26/__/auth/iframe`,r={apiKey:t.apiKey,appName:e.name,v:s.Jn},o=tU.get(e.config.apiHost);o&&(r.eid=o);let a=e._getFrameworks();return a.length&&(r.fw=a.join(",")),`${n}?${(0,i.xO)(r).slice(1)}`}(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:tj,dontclear:!0},t=>new Promise(async(n,r)=>{await t.restyle({setHideOnLeave:!1});let i=p(e,"network-request-failed"),s=e8().setTimeout(()=>{r(i)},tP.get());function o(){e8().clearTimeout(s),n(t)}t.ping(o).then(o,()=>{r(i)})}))}let tB={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"};class t${constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch(e){}}}let tV=encodeURIComponent("fac");async function tq(e,t,n,r,o,a){g(e.config.authDomain,e,"auth-domain-config-required"),g(e.config.apiKey,e,"invalid-api-key");let l={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:s.Jn,eventId:o};if(t instanceof eB)for(let[n,r]of(t.setDefaultLanguage(e.languageCode),l.providerId=t.providerId||"",(0,i.xb)(t.getCustomParameters())||(l.customParameters=JSON.stringify(t.getCustomParameters())),Object.entries(a||{})))l[n]=r;if(t instanceof e$){let e=t.getScopes().filter(e=>""!==e);e.length>0&&(l.scopes=e.join(","))}for(let t of(e.tenantId&&(l.tid=e.tenantId),Object.keys(l)))void 0===l[t]&&delete l[t];let u=await e._getAppCheckToken(),c=u?`#${tV}=${encodeURIComponent(u)}`:"";return`${function({config:e}){return e.emulator?w(e,"emulator/auth/handler"):`https://${e.authDomain}/__/auth/handler`}(e)}?${(0,i.xO)(l).slice(1)}${c}`}let tz="webStorageSupport";class tH{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=e6,this._completeRedirectFn=tI,this._overrideRedirectResult=tT}async _openPopup(e,t,n,r){var s,o,a;o=null===(s=this.eventManagers[e._key()])||void 0===s?void 0:s.manager,a="_initialize() not called before _openPopup()",o||y(a);let l=await tq(e,t,n,v(),r);return function(e,t,n,r=500,s=600){let o=Math.max((window.screen.availHeight-s)/2,0).toString(),a=Math.max((window.screen.availWidth-r)/2,0).toString(),l="",u=Object.assign(Object.assign({},tB),{width:r.toString(),height:s.toString(),top:o,left:a}),c=(0,i.z$)().toLowerCase();n&&(l=et(c)?"_blank":n),Q(c)&&(t=t||"http://localhost",u.scrollbars="yes");let h=Object.entries(u).reduce((e,[t,n])=>`${e}${t}=${n},`,"");if(function(e=(0,i.z$)()){var t;return eo(e)&&!!(null===(t=window.navigator)||void 0===t?void 0:t.standalone)}(c)&&"_self"!==l)return function(e,t){let n=document.createElement("a");n.href=e,n.target=t;let r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}(t||"",l),new t$(null);let d=window.open(t||"",l,h);g(d,e,"popup-blocked");try{d.focus()}catch(e){}return new t$(d)}(e,l,e5())}async _openRedirect(e,t,n,r){var i;return await this._originValidation(e),i=await tq(e,t,n,v(),r),e8().location.href=i,new Promise(()=>{})}_initialize(e){let t=e._key();if(this.eventManagers[t]){var n;let{manager:e,promise:r}=this.eventManagers[t];return e?Promise.resolve(e):(n="If manager is not set, promise should be",r||y(n),r)}let r=this.initAndGetManager(e);return this.eventManagers[t]={promise:r},r.catch(()=>{delete this.eventManagers[t]}),r}async initAndGetManager(e){let t=await tF(e),n=new tk(e);return t.register("authEvent",t=>(g(null==t?void 0:t.authEvent,e,"invalid-auth-event"),{status:n.onEvent(t.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send(tz,{type:tz},n=>{var r;let i=null===(r=null==n?void 0:n[0])||void 0===r?void 0:r[tz];void 0!==i&&t(!!i),f(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){let t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=tN(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return ea()||ee()||eo()}}class tW{constructor(e){this.factorId=e}_process(e,t,n){switch(t.type){case"enroll":return this._finalizeEnroll(e,t.credential,n);case"signin":return this._finalizeSignIn(e,t.credential);default:return y("unexpected MultiFactorSessionType")}}}class tG extends tW{constructor(e){super("phone"),this.credential=e}static _fromCredential(e){return new tG(e)}_finalizeEnroll(e,t,n){return k(e,"POST","/v2/accounts/mfaEnrollment:finalize",I(e,{idToken:t,displayName:n,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}_finalizeSignIn(e,t){return k(e,"POST","/v2/accounts/mfaSignIn:finalize",I(e,{mfaPendingCredential:t,phoneVerificationInfo:this.credential._makeVerificationRequest()}))}}class tK{constructor(){}static assertion(e){return tG._fromCredential(e)}}tK.FACTOR_ID="phone";class tX{static assertionForEnrollment(e,t){return tJ._fromSecret(e,t)}static assertionForSignIn(e,t){return tJ._fromEnrollmentId(e,t)}static async generateSecret(e){var t;g(void 0!==e.auth,"internal-error");let n=await k(t=e.auth,"POST","/v2/accounts/mfaEnrollment:start",I(t,{idToken:e.credential,totpEnrollmentInfo:{}}));return tZ._fromStartTotpMfaEnrollmentResponse(n,e.auth)}}tX.FACTOR_ID="totp";class tJ extends tW{constructor(e,t,n){super("totp"),this.otp=e,this.enrollmentId=t,this.secret=n}static _fromSecret(e,t){return new tJ(t,void 0,e)}static _fromEnrollmentId(e,t){return new tJ(t,e)}async _finalizeEnroll(e,t,n){return g(void 0!==this.secret,e,"argument-error"),k(e,"POST","/v2/accounts/mfaEnrollment:finalize",I(e,{idToken:t,displayName:n,totpVerificationInfo:this.secret._makeTotpVerificationInfo(this.otp)}))}async _finalizeSignIn(e,t){g(void 0!==this.enrollmentId&&void 0!==this.otp,e,"argument-error");let n={verificationCode:this.otp};return k(e,"POST","/v2/accounts/mfaSignIn:finalize",I(e,{mfaPendingCredential:t,mfaEnrollmentId:this.enrollmentId,totpVerificationInfo:n}))}}class tZ{constructor(e,t,n,r,i,s,o){this.sessionInfo=s,this.auth=o,this.secretKey=e,this.hashingAlgorithm=t,this.co
26deLength=n,this.codeIntervalSeconds=r,this.enrollmentCompletionDeadline=i}static _fromStartTotpMfaEnrollmentResponse(e,t){return new tZ(e.totpSessionInfo.sharedSecretKey,e.totpSessionInfo.hashingAlgorithm,e.totpSessionInfo.verificationCodeLength,e.totpSessionInfo.periodSec,new Date(e.totpSessionInfo.finalizeEnrollmentTime).toUTCString(),e.totpSessionInfo.sessionInfo,t)}_makeTotpVerificationInfo(e){return{sessionInfo:this.sessionInfo,verificationCode:e}}generateQrCodeUrl(e,t){var n;let r=!1;return(tY(e)||tY(t))&&(r=!0),r&&(tY(e)&&(e=(null===(n=this.auth.currentUser)||void 0===n?void 0:n.email)||"unknownuser"),tY(t)&&(t=this.auth.name)),`otpauth://totp/${t}:${e}?secret=${this.secretKey}&issuer=${t}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`}}function tY(e){return void 0===e||(null==e?void 0:e.length)===0}var tQ="@firebase/auth",t0="0.23.2";class t1{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),(null===(e=this.auth.currentUser)||void 0===e?void 0:e.uid)||null}async getToken(e){return(this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser)?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;let t=this.auth.onIdTokenChanged(t=>{e((null==t?void 0:t.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();let t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){g(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}let t2=(0,i.Pz)("authIdTokenMaxAge")||300,t4=null,t9=e=>async t=>{let n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>t2)return;let i=null==n?void 0:n.token;t4!==i&&(t4=i,await fetch(e,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function t6(e=(0,s.Mq)()){let t=(0,s.qX)(e,"auth");if(t.isInitialized())return t.getImmediate();let n=function(e,t){let n=(0,s.qX)(e,"auth");if(n.isInitialized()){let e=n.getImmediate(),r=n.getOptions();if((0,i.vZ)(r,null!=t?t:{}))return e;f(e,"already-initialized")}return n.initialize({options:t})}(e,{popupRedirectResolver:tH,persistence:[th,e9,e6]}),r=(0,i.Pz)("authTokenSyncURL");if(r){var o,a;let e=t9(r);o=()=>e(n.currentUser),(0,i.m9)(n).beforeAuthStateChanged(e,o),a=t=>e(t),(0,i.m9)(n).onIdTokenChanged(a,void 0,void 0)}let l=(0,i.q4)("auth");return l&&function(e,t,n){let r=ev(e);g(r._canInitEmulator,r,"emulator-config-failed"),g(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");let i=eb(t),{host:s,port:o}=function(e){let t=eb(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};let r=n[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(r);if(i){let e=i[1];return{host:e,port:ew(r.substr(e.length+1))}}{let[e,t]=r.split(":");return{host:e,port:ew(t)}}}(t),a=null===o?"":`:${o}`;r.config.emulator={url:`${i}//${s}${a}/`},r.settings.appVerificationDisabledForTesting=!0,r.emulatorConfig=Object.freeze({host:s,port:o,protocol:i.replace(":",""),options:Object.freeze({disableWarnings:!1})}),function(){function e(){let e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),"undefined"!=typeof window&&"undefined"!=typeof document&&("loading"===document.readyState?window.addEventListener("DOMContentLoaded",e):e())}()}(n,`http://${l}`),n}r="Browser",(0,s.Xd)(new l.wA("auth",(e,{options:t})=>{let n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),s=e.getProvider("app-check-internal"),{apiKey:o,authDomain:a}=n.options;g(o&&!o.includes(":"),"invalid-api-key",{appName:n.name});let l=new ey(n,i,s,{apiKey:o,authDomain:a,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:el(r)});return function(e,t){let n=(null==t?void 0:t.persistence)||[],r=(Array.isArray(n)?n:[n]).map(K);(null==t?void 0:t.errorMap)&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,null==t?void 0:t.popupRedirectResolver)}(l,t),l},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),(0,s.Xd)(new l.wA("auth-internal",e=>new t1(ev(e.getProvider("auth").getImmediate())),"PRIVATE").setInstantiationMode("EXPLICIT")),(0,s.KN)(tQ,t0,function(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}(r)),(0,s.KN)(tQ,t0,"esm2017")},36100:function(e,t,n){"use strict";n.d(t,{hJ:function(){return aO},JU:function(){return aN},QT:function(){return la},PL:function(){return lu},ad:function(){return aP},cf:function(){return lc},Xo:function(){return a5},IO:function(){return a2},ar:function(){return a9}});var r,i,s,o,a,l,u,c=n(25816),h=n(8463),d=n(53333),f=n(74444),p={},m=m||{},g=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{})||self;function y(e){var t=typeof e;return"array"==(t="object"!=t?t:e?Array.isArray(e)?"array":t:"null")||"object"==t&&"number"==typeof e.length}function v(e){var t=typeof e;return"object"==t&&null!=e||"function"==t}function _(e,t,n){return e.call.apply(e.bind,arguments)}function b(e,t,n){if(!e)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),e.apply(t,n)}}return function(){return e.apply(t,arguments)}}function w(e,t,n){return(w=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?_:b).apply(null,arguments)}
26function E(e,t){var n=Array.prototype.slice.call(arguments,1);return function(){var t=n.slice();return t.push.apply(t,arguments),e.apply(this,t)}}function S(e,t){function n(){}n.prototype=t.prototype,e.$=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.ac=function(e,n,r){for(var i=Array(arguments.length-2),s=2;s<arguments.length;s++)i[s-2]=arguments[s];return t.prototype[n].apply(e,i)}}function T(){this.s=this.s,this.o=this.o}T.prototype.s=!1,T.prototype.sa=function(){this.s||(this.s=!0,this.N())},T.prototype.N=function(){if(this.o)for(;this.o.length;)this.o.shift()()};let I=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t,void 0)}:function(e,t){if("string"==typeof e)return"string"!=typeof t||1!=t.length?-1:e.indexOf(t,0);for(let n=0;n<e.length;n++)if(n in e&&e[n]===t)return n;return -1};function k(e){let t=e.length;if(0<t){let n=Array(t);for(let r=0;r<t;r++)n[r]=e[r];return n}return[]}function C(e,t){for(let t=1;t<arguments.length;t++){let n=arguments[t];if(y(n)){let t=e.length||0,r=n.length||0;e.length=t+r;for(let i=0;i<r;i++)e[t+i]=n[i]}else e.push(n)}}function x(e,t){this.type=e,this.g=this.target=t,this.defaultPrevented=!1}x.prototype.h=function(){this.defaultPrevented=!0};var R=function(){if(!g.addEventListener||!Object.defineProperty)return!1;var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}});try{g.addEventListener("test",()=>{},t),g.removeEventListener("test",()=>{},t)}catch(e){}return e}();function A(e){return/^[\s\xa0]*$/.test(e)}function O(){var e=g.navigator;return e&&(e=e.userAgent)?e:""}function N(e){return -1!=O().indexOf(e)}function D(e){return D[" "](e),e}D[" "]=function(){};var M=N("Opera"),L=N("Trident")||N("MSIE"),P=N("Edge"),j=P||L,U=N("Gecko")&&!(-1!=O().toLowerCase().indexOf("webkit")&&!N("Edge"))&&!(N("Trident")||N("MSIE"))&&!N("Edge"),F=-1!=O().toLowerCase().indexOf("webkit")&&!N("Edge");function B(){var e=g.document;return e?e.documentMode:void 0}e:{var $,V="",q=($=O(),U?/rv:([^\);]+)(\)|;)/.exec($):P?/Edge\/([\d\.]+)/.exec($):L?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec($):F?/WebKit\/(\S+)/.exec($):M?/(?:Version)[ \/]?(\S+)/.exec($):void 0);if(q&&(V=q?q[1]:""),L){var z=B();if(null!=z&&z>parseFloat(V)){i=String(z);break e}}i=V}var H=g.document&&L&&(B()||parseInt(i,10))||void 0;function W(e,t){if(x.call(this,e?e.type:""),this.relatedTarget=this.g=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.state=null,this.pointerId=0,this.pointerType="",this.i=null,e){var n=this.type=e.type,r=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:null;if(this.target=e.target||e.srcElement,this.g=t,t=e.relatedTarget){if(U){e:{try{D(t.nodeName);var i=!0;break e}catch(e){}i=!1}i||(t=null)}}else"mouseover"==n?t=e.fromElement:"mouseout"==n&&(t=e.toElement);this.relatedTarget=t,r?(this.clientX=void 0!==r.clientX?r.clientX:r.pageX,this.clientY=void 0!==r.clientY?r.clientY:r.pageY,this.screenX=r.screenX||0,this.screenY=r.screenY||0):(this.clientX=void 0!==e.clientX?e.clientX:e.pageX,this.clientY=void 0!==e.clientY?e.clientY:e.pageY,this.screenX=e.screenX||0,this.screenY=e.screenY||0),this.button=e.button,this.key=e.key||"",this.ctrlKey=e.ctrlKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.metaKey=e.metaKey,this.pointerId=e.pointerId||0,this.pointerType="string"==typeof e.pointerType?e.pointerType:G[e.pointerType]||"",this.state=e.state,this.i=e,e.defaultPrevented&&W.$.h.call(this)}}S(W,x);var G={2:"touch",3:"pen",4:"mouse"};W.prototype.h=function(){W.$.h.call(this);var e=this.i;e.preventDefault?e.preventDefault():e.returnValue=!1};var K="closure_listenable_"+(1e6*Math.random()|0),X=0;function J(e,t,n,r,i){this.listener=e,this.proxy=null,this.src=t,this.type=n,this.capture=!!r,this.la=i,this.key=++X,this.fa=this.ia=!1}function Z(e){e.fa=!0,e.listener=null,e.proxy=null,e.src=null,e.la=null}function Y(e,t,n){for(let r in e)t.call(n,e[r],r,e)}function Q(e){let t={};for(let n in e)t[n]=e[n];return t}let ee="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleStr
26ing toString valueOf".split(" ");function et(e,t){let n,r;for(let t=1;t<arguments.length;t++){for(n in r=arguments[t])e[n]=r[n];for(let t=0;t<ee.length;t++)n=ee[t],Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}}function en(e){this.src=e,this.g={},this.h=0}function er(e,t){var n=t.type;if(n in e.g){var r,i=e.g[n],s=I(i,t);(r=0<=s)&&Array.prototype.splice.call(i,s,1),r&&(Z(t),0==e.g[n].length&&(delete e.g[n],e.h--))}}function ei(e,t,n,r){for(var i=0;i<e.length;++i){var s=e[i];if(!s.fa&&s.listener==t&&!!n==s.capture&&s.la==r)return i}return -1}en.prototype.add=function(e,t,n,r,i){var s=e.toString();(e=this.g[s])||(e=this.g[s]=[],this.h++);var o=ei(e,t,r,i);return -1<o?(t=e[o],n||(t.ia=!1)):((t=new J(t,this.src,s,!!r,i)).ia=n,e.push(t)),t};var es="closure_lm_"+(1e6*Math.random()|0),eo={};function ea(e,t,n,r,i,s){if(!t)throw Error("Invalid event type");var o=v(i)?!!i.capture:!!i,a=eh(e);if(a||(e[es]=a=new en(e)),(n=a.add(t,n,r,o,s)).proxy)return n;if(r=function e(t){return ec.call(e.src,e.listener,t)},n.proxy=r,r.src=e,r.listener=n,e.addEventListener)R||(i=o),void 0===i&&(i=!1),e.addEventListener(t.toString(),r,i);else if(e.attachEvent)e.attachEvent(eu(t.toString()),r);else if(e.addListener&&e.removeListener)e.addListener(r);else throw Error("addEventListener and attachEvent are unavailable.");return n}function el(e){if("number"!=typeof e&&e&&!e.fa){var t=e.src;if(t&&t[K])er(t.i,e);else{var n=e.type,r=e.proxy;t.removeEventListener?t.removeEventListener(n,r,e.capture):t.detachEvent?t.detachEvent(eu(n),r):t.addListener&&t.removeListener&&t.removeListener(r),(n=eh(t))?(er(n,e),0==n.h&&(n.src=null,t[es]=null)):Z(e)}}}function eu(e){return e in eo?eo[e]:eo[e]="on"+e}function ec(e,t){if(e.fa)e=!0;else{t=new W(t,this);var n=e.listener,r=e.la||e.src;e.ia&&el(e),e=n.call(r,t)}return e}function eh(e){return(e=e[es])instanceof en?e:null}var ed="__closure_events_fn_"+(1e9*Math.random()>>>0);function ef(e){return"function"==typeof e?e:(e[ed]||(e[ed]=function(t){return e.handleEvent(t)}),e[ed])}function ep(){T.call(this),this.i=new en(this),this.S=this,this.J=null}function em(e,t){var n,r=e.J;if(r)for(n=[];r;r=r.J)n.push(r);if(e=e.S,r=t.type||t,"string"==typeof t)t=new x(t,e);else if(t instanceof x)t.target=t.target||e;else{var i=t;et(t=new x(r,e),i)}if(i=!0,n)for(var s=n.length-1;0<=s;s--){var o=t.g=n[s];i=eg(o,r,!0,t)&&i}if(i=eg(o=t.g=e,r,!0,t)&&i,i=eg(o,r,!1,t)&&i,n)for(s=0;s<n.length;s++)i=eg(o=t.g=n[s],r,!1,t)&&i}function eg(e,t,n,r){if(!(t=e.i.g[String(t)]))return!0;t=t.concat();for(var i=!0,s=0;s<t.length;++s){var o=t[s];if(o&&!o.fa&&o.capture==n){var a=o.listener,l=o.la||o.src;o.ia&&er(e.i,o),i=!1!==a.call(l,r)&&i}}return i&&!r.defaultPrevented}S(ep,T),ep.prototype[K]=!0,ep.prototype.removeEventListener=function(e,t,n,r){!function e(t,n,r,i,s){if(Array.isArray(n))for(var o=0;o<n.length;o++)e(t,n[o],r,i,s);else(i=v(i)?!!i.capture:!!i,r=ef(r),t&&t[K])?(t=t.i,(n=String(n).toString())in t.g&&-1<(r=ei(o=t.g[n],r,i,s))&&(Z(o[r]),Array.prototype.splice.call(o,r,1),0==o.length&&(delete t.g[n],t.h--))):t&&(t=eh(t))&&(n=t.g[n.toString()],t=-1,n&&(t=ei(n,r,i,s)),(r=-1<t?n[t]:null)&&el(r))}(this,e,t,n,r)},ep.prototype.N=function(){if(ep.$.N.call(this),this.i){var e,t=this.i;for(e in t.g){for(var n=t.g[e],r=0;r<n.length;r++)Z(n[r]);delete t.g[e],t.h--}}this.J=null},ep.prototype.O=function(e,t,n,r){return this.i.add(String(e),t,!1,n,r)},ep.prototype.P=function(e,t,n,r){return this.i.add(String(e),t,!0,n,r)};var ey=g.JSON.stringify;class ev{constructor(e,t){this.i=e,this.j=t,this.h=0,this.g=null}get(){let e;return 0<this.h?(this.h--,e=this.g,this.g=e.next,e.next=null):e=this.i(),e}}class e_{constructor(){this.h=this.g=null}add(e,t){let n=eb.get();n.set(e,t),this.h?this.h.next=n:this.g=n,this.h=n}}var eb=new ev(()=>new ew,e=>e.reset());class ew{constructor(){this.next=this.g=this.h=null}set(e,t){this.h=e,this.g=t,this.next=null}reset(){this.next=this.g=this.h=null}}let eE,eS=!1,eT=new e_,eI=()=>{let e=g.Promise.resolve(void 0);eE=()=>{e.then(ek)}};var ek=()=>{let e;for(var t;e=null,eT.g&&(e=eT.g,eT.g=eT.g.next,eT.g||(eT.h=null),e.next=null),t=e;){try{t.h.call(t.g)}catch(e){!function(e){g.setTimeout(()=>{throw e},0)}(e)}eb.j(t),100>eb.h&&(eb.h++,t.next=eb.g,eb.g=t)}eS=!1};function eC(e,t){ep.call(this),this.h=e||1,this.g=t||g,this.j=w(this.qb,this),this.l=Date.now()}function ex(e){e.ga=!1,e.T&&(e.g.clearTimeout(e.T),e.T=null)}function eR(e,t,n){if("function"==typeof e)n&&(e=w(e,n));else if(e&&"function"==typeof e.handleEvent)e=w(e.handleEvent,e);else throw Error("Invalid listener argument");return 2147483647<Number(t)?-1:g.setTimeout(e,t||0)}S(eC,ep),(u=eC.prototype).ga=!1,u.T=null,u.qb=function(){if(this.ga){var e=Date.now()-this.l;0<e&&e<.8*this.h?this.T=this.g.setTimeout(this.j,this.h-e):(this.T&&(this.g.clearTimeout(this.T),this.T=null),em(this,"tick"),this.ga&&(ex(this),this.start()))}},u.start=function(){this.ga=!0,this.T||(this.T=this.g.setTimeout(this.j,this.h),this.l=Date.now())},u.N=function(){eC.$.N.call(this),ex(this),delete this.g};class eA extends T{constructor(e,t){super(),this.m=e,this.j=t,this.h=null,this.i=!1,this.g=null}l(e){this.h=arguments,this.g?this.i=!0:function e(t){t.g=eR(()=>{t.g=null,t.i&&(t.i=!1,e(t))},t.j);let n=t.h;t.h=null,t.m.apply(null,n)}(this)}N(){super.N(),this.g&&(g.clearTimeout(this.g),this.g=null,this.i=!1,this.h=null)}}function eO(e){T.call(this),this.h=e,this.g={}}S(eO,T);var eN=[];function eD(e,t,n,r){Array.isArray(n)||(n&&(eN[0]=n.toString()),n=eN);for(var i=0;i<n.length;i++){var s=function e(t,n,r,i,s){if(i&&i.once)return function e(t,n,r,i,s){if(Array.isArray(n)){for(var o=0;o<n.length;o++)e(t,n[o],r,i,s);return null}return r=ef(r),t&&t[K]?t.P(n,r,v(i)?!!i.capture:!!i,s):ea(t,n,r,!0,i,s)}(t,n,r,i,s);if(Array.isArray(n)){for(var o=0;o<n.length;o++)e(t,n[o],r,i,s);return null}return r=ef(r),t&&t[K]?t.O(n,r,v(i)?!!i.capture:!!i,s):ea(t,n,r,!1,i,s)}(t,n[i],r||e.handleEvent,!1,e.h||e);if(!s)break;e.g[s.key]=s}}function eM(e){Y(e.g,function(e,t){this.g.hasOwnProperty(t)&&el(e)},e),e.g={}}function eL(){this.g=!0}function eP(e,t,n,r){e.info(function(){return"XMLHTTP TEXT ("+t+"): "+function(e,t){if(!e.g)return t;if(!t)return null;try{var n=JSON.parse(t);if(n){for(e=0;e<n.length;e++)if(Array.isArray(n[e])){var r=n[e];if(!(2>r.length)){var i=r[1];if(Array.isArray(i)&&!(1>i.length)){var s=i[0];if("noop"!=s&&"stop"!=s&&"close"!=s)for(var o=1;o<i.length;o++)i[o]=""}}}}return ey(n)}catch(e){return t}}(e,n)+(r?" "+r:"")})}
26eO.prototype.N=function(){eO.$.N.call(this),eM(this)},eO.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented")},eL.prototype.Ea=function(){this.g=!1},eL.prototype.info=function(){};var ej={},eU=null;function eF(){return eU=eU||new ep}function eB(e){x.call(this,ej.Ta,e)}function e$(e){let t=eF();em(t,new eB(t))}function eV(e,t){x.call(this,ej.STAT_EVENT,e),this.stat=t}function eq(e){let t=eF();em(t,new eV(t,e))}function ez(e,t){x.call(this,ej.Ua,e),this.size=t}function eH(e,t){if("function"!=typeof e)throw Error("Fn must not be null and must be a function");return g.setTimeout(function(){e()},t)}ej.Ta="serverreachability",S(eB,x),ej.STAT_EVENT="statevent",S(eV,x),ej.Ua="timingevent",S(ez,x);var eW={NO_ERROR:0,rb:1,Eb:2,Db:3,yb:4,Cb:5,Fb:6,Qa:7,TIMEOUT:8,Ib:9},eG={wb:"complete",Sb:"success",Ra:"error",Qa:"abort",Kb:"ready",Lb:"readystatechange",TIMEOUT:"timeout",Gb:"incrementaldata",Jb:"progress",zb:"downloadprogress",$b:"uploadprogress"};function eK(){}function eX(e){return e.h||(e.h=e.i())}function eJ(){}eK.prototype.h=null;var eZ={OPEN:"a",vb:"b",Ra:"c",Hb:"d"};function eY(){x.call(this,"d")}function eQ(){x.call(this,"c")}function e0(){}function e1(e,t,n,r){this.l=e,this.j=t,this.m=n,this.W=r||1,this.U=new eO(this),this.P=e4,e=j?125:void 0,this.V=new eC(e),this.I=null,this.i=!1,this.s=this.A=this.v=this.L=this.G=this.Y=this.B=null,this.F=[],this.g=null,this.C=0,this.o=this.u=null,this.ca=-1,this.J=!1,this.O=0,this.M=null,this.ba=this.K=this.aa=this.S=!1,this.h=new e2}function e2(){this.i=null,this.g="",this.h=!1}S(eY,x),S(eQ,x),S(e0,eK),e0.prototype.g=function(){return new XMLHttpRequest},e0.prototype.i=function(){return{}},o=new e0;var e4=45e3,e9={},e6={};function e3(e,t,n){e.L=1,e.v=tp(tu(t)),e.s=n,e.S=!0,e5(e,null)}function e5(e,t){e.G=Date.now(),te(e),e.A=tu(e.v);var n=e.A,r=e.W;Array.isArray(r)||(r=[String(r)]),tC(n.i,"t",r),e.C=0,n=e.l.J,e.h=new e2,e.g=ng(e.l,n?t:null,!e.s),0<e.O&&(e.M=new eA(w(e.Pa,e,e.g),e.O)),eD(e.U,e.g,"readystatechange",e.nb),t=e.I?Q(e.I):{},e.s?(e.u||(e.u="POST"),t["Content-Type"]="application/x-www-form-urlencoded",e.g.ha(e.A,e.u,e.s,t)):(e.u="GET",e.g.ha(e.A,e.u,null,t)),e$(),function(e,t,n,r,i,s){e.info(function(){if(e.g){if(s)for(var o="",a=s.split("&"),l=0;l<a.length;l++){var u=a[l].split("=");if(1<u.length){var c=u[0];u=u[1];var h=c.split("_");o=2<=h.length&&"type"==h[1]?o+(c+"=")+u+"&":o+(c+"=redacted&")}}else o=null}else o=s;return"XMLHTTP REQ ("+r+") [attempt "+i+"]: "+t+"\n"+n+"\n"+o})}(e.j,e.u,e.A,e.m,e.W,e.s)}function e7(e){return!!e.g&&"GET"==e.u&&2!=e.L&&e.l.Ha}function e8(e,t,n){let r=!0,i;for(;!e.J&&e.C<n.length;)if((i=function(e,t){var n=e.C,r=t.indexOf("\n",n);return -1==r?e6:isNaN(n=Number(t.substring(n,r)))?e9:(r+=1)+n>t.length?e6:(t=t.slice(r,r+n),e.C=r+n,t)}(e,n))==e6){4==t&&(e.o=4,eq(14),r=!1),eP(e.j,e.m,null,"[Incomplete Response]");break}else if(i==e9){e.o=4,eq(15),eP(e.j,e.m,n,"[Invalid Chunk]"),r=!1;break}else eP(e.j,e.m,i,null),ts(e,i);e7(e)&&i!=e6&&i!=e9&&(e.h.g="",e.C=0),4!=t||0!=n.length||e.h.h||(e.o=1,eq(16),r=!1),e.i=e.i&&r,r?0<n.length&&!e.ba&&(e.ba=!0,(t=e.l).g==e&&t.ca&&!t.M&&(t.l.info("Great, no buffering proxy detected. Bytes received: "+n.length),nl(t),t.M=!0,eq(11))):(eP(e.j,e.m,n,"[Invalid Chunked Response]"),ti(e),tr(e))}function te(e){e.Y=Date.now()+e.P,tt(e,e.P)}function tt(e,t){if(null!=e.B)throw Error("WatchDog timer not null");e.B=eH(w(e.lb,e),t)}function tn(e){e.B&&(g.clearTimeout(e.B),e.B=null)}function tr(e){0==e.l.H||e.J||nh(e.l,e)}function ti(e){tn(e);var t=e.M;t&&"function"==typeof t.sa&&t.sa(),e.M=null,ex(e.V),eM(e.U),e.g&&(t=e.g,e.g=null,t.abort(),t.sa())}function ts(e,t){try{var n=e.l;if(0!=n.H&&(n.g==e||tM(n.i,e))){if(!e.K&&tM(n.i,e)&&3==n.H){try{var r=n.Ja.g.parse(t)}catch(e){r=null}if(Array.isArray(r)&&3==r.length){var i=r;if(0==i[0]){e:if(!n.u){if(n.g){if(n.g.G+3e3<e.G)nc(n),ne(n);else break e}na(n),eq(18)}}else n.Fa=i[1],0<n.Fa-n.V&&37500>i[2]&&n.G&&0==n.A&&!n.v&&(n.v=eH(w(n.ib,n),6e3));if(1>=tD(n.i)&&n.oa){try{n.oa()}catch(e){}n.oa=void 0}}else nf(n,11)}else if((e.K||n.g==e)&&nc(n),!A(t))for(i=n.Ja.g.parse(t),t=0;t<i.length;t++){let a=i[t];if(n.V=a[0],a=a[1],2==n.H){if("c"==a[0]){n.K=a[1],n.pa=a[2];let t=a[3];null!=t&&(n.ra=t,n.l.info("VER="+n.ra));let i=a[4];null!=i&&(n.Ga=i,n.l.info("SVER="+n.Ga));let l=a[5];null!=l&&"number"==typeof l&&0<l&&(r=1.5*l,n.L=r,n.l.info("backChannelRequestTimeoutMs_="+r)),r=n;let u=e.g;if(u){let e=u.g?u.g.getResponseHeader("X-Client-Wire-Protocol"):null;if(e){var s=r.i;s.g||-1==e.indexOf("spdy")&&-1==e.indexOf("quic")&&-1==e.indexOf("h2")||(s.j=s.l,s.g=new Set,s.h&&(tL(s,s.h),s.h=null))}if(r.F){let e=u.g?u.g.getResponseHeader("X-HTTP-Session-Id"):null;e&&(r.Da=e,tf(r.I,r.F,e))}}if(n.H=3,n.h&&n.h.Ba(),n.ca&&(n.S=Date.now()-e.G,n.l.info("Handshake RTT: "+n.S+"ms")),(r=n).wa=nm(r,r.J?r.pa:null,r.Y),e.K){tP(r.i,e);var o=r.L;o&&e.setTimeout(o),e.B&&(tn(e),te(e)),r.g=e}else no(r);0<n.j.length&&nn(n)}else"stop"!=a[0]&&"close"!=a[0]||nf(n,7)}else 3==n.H&&("stop"==a[0]||"close"==a[0]?"stop"==a[0]?nf(n,7):t8(n):"noop"!=a[0]&&n.h&&n.h.Aa(a),n.A=0)}}e$(4)}catch(e){}}function to(e,t){if(e.forEach&&"function"==typeof e.forEach)e.forEach(t,void 0);else if(y(e)||"string"==typeof e)Array.prototype.forEach.call(e,t,void 0);else for(var n=function(e){if(e.ta&&"function"==typeof e.ta)return e.ta();if(!e.Z||"function"!=typeof e.Z){if("undefined"!=typeof Map&&e instanceof Map)return Array.from(e.keys());if(!("undefined"!=typeof Set&&e instanceof Set)){if(y(e)||"string"==typeof e){var t=[];e=e.length;for(var n=0;n<e;n++)t.push(n);return t}for(let r in t=[],n=0,e)t[n++]=r;return t}}}(e),r=function(e){if(e.Z&&"function"==typeof e.Z)return e.Z();if("undefined"!=typeof Map&&e instanceof Map||"undefined"!=typeof Set&&e instanceof Set)return Array.from(e.values());if("string"==typeof e)return e.split("");
26if(y(e)){for(var t=[],n=e.length,r=0;r<n;r++)t.push(e[r]);return t}for(r in t=[],n=0,e)t[n++]=e[r];return t}(e),i=r.length,s=0;s<i;s++)t.call(void 0,r[s],n&&n[s],e)}(u=e1.prototype).setTimeout=function(e){this.P=e},u.nb=function(e){e=e.target;let t=this.M;t&&3==t4(e)?t.l():this.Pa(e)},u.Pa=function(e){try{if(e==this.g)e:{let c=t4(this.g);var t=this.g.Ia();let h=this.g.da();if(!(3>c)&&(3!=c||j||this.g&&(this.h.h||this.g.ja()||t9(this.g)))){this.J||4!=c||7==t||(8==t||0>=h?e$(3):e$(2)),tn(this);var n=this.g.da();this.ca=n;t:if(e7(this)){var r=t9(this.g);e="";var i=r.length,s=4==t4(this.g);if(!this.h.i){if("undefined"==typeof TextDecoder){ti(this),tr(this);var o="";break t}this.h.i=new g.TextDecoder}for(t=0;t<i;t++)this.h.h=!0,e+=this.h.i.decode(r[t],{stream:s&&t==i-1});r.splice(0,i),this.h.g+=e,this.C=0,o=this.h.g}else o=this.g.ja();if(this.i=200==n,function(e,t,n,r,i,s,o){e.info(function(){return"XMLHTTP RESP ("+r+") [ attempt "+i+"]: "+t+"\n"+n+"\n"+s+" "+o})}(this.j,this.u,this.A,this.m,this.W,c,n),this.i){if(this.aa&&!this.K){t:{if(this.g){var a,l=this.g;if((a=l.g?l.g.getResponseHeader("X-HTTP-Initial-Response"):null)&&!A(a)){var u=a;break t}}u=null}if(n=u)eP(this.j,this.m,n,"Initial handshake response via X-HTTP-Initial-Response"),this.K=!0,ts(this,n);else{this.i=!1,this.o=3,eq(12),ti(this),tr(this);break e}}this.S?(e8(this,c,o),j&&this.i&&3==c&&(eD(this.U,this.V,"tick",this.mb),this.V.start())):(eP(this.j,this.m,o,null),ts(this,o)),4==c&&ti(this),this.i&&!this.J&&(4==c?nh(this.l,this):(this.i=!1,te(this)))}else(function(e){let t={};e=(e.g&&2<=t4(e)&&e.g.getAllResponseHeaders()||"").split("\r\n");for(let r=0;r<e.length;r++){if(A(e[r]))continue;var n=function(e){var t=1;e=e.split(":");let n=[];for(;0<t&&e.length;)n.push(e.shift()),t--;return e.length&&n.push(e.join(":")),n}(e[r]);let i=n[0];if("string"!=typeof(n=n[1]))continue;n=n.trim();let s=t[i]||[];t[i]=s,s.push(n)}!function(e,t){for(let n in e)t.call(void 0,e[n],n,e)}(t,function(e){return e.join(", ")})})(this.g),400==n&&0<o.indexOf("Unknown SID")?(this.o=3,eq(12)):(this.o=0,eq(13)),ti(this),tr(this)}}}catch(e){}finally{}},u.mb=function(){if(this.g){var e=t4(this.g),t=this.g.ja();this.C<t.length&&(tn(this),e8(this,e,t),this.i&&4!=e&&te(this))}},u.cancel=function(){this.J=!0,ti(this)},u.lb=function(){this.B=null;let e=Date.now();0<=e-this.Y?(function(e,t){e.info(function(){return"TIMEOUT: "+t})}(this.j,this.A),2!=this.L&&(e$(),eq(17)),ti(this),this.o=2,tr(this)):tt(this,this.Y-e)};var ta=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$");function tl(e){if(this.g=this.s=this.j="",this.m=null,this.o=this.l="",this.h=!1,e instanceof tl){this.h=e.h,tc(this,e.j),this.s=e.s,this.g=e.g,th(this,e.m),this.l=e.l;var t=e.i,n=new tS;n.i=t.i,t.g&&(n.g=new Map(t.g),n.h=t.h),td(this,n),this.o=e.o}else e&&(t=String(e).match(ta))?(this.h=!1,tc(this,t[1]||"",!0),this.s=tm(t[2]||""),this.g=tm(t[3]||"",!0),th(this,t[4]),this.l=tm(t[5]||"",!0),td(this,t[6]||"",!0),this.o=tm(t[7]||"")):(this.h=!1,this.i=new tS(null,this.h))}function tu(e){return new tl(e)}function tc(e,t,n){e.j=n?tm(t,!0):t,e.j&&(e.j=e.j.replace(/:$/,""))}function th(e,t){if(t){if(isNaN(t=Number(t))||0>t)throw Error("Bad port number "+t);e.m=t}else e.m=null}function td(e,t,n){var r,i;t instanceof tS?(e.i=t,r=e.i,(i=e.h)&&!r.j&&(tT(r),r.i=null,r.g.forEach(function(e,t){var n=t.toLowerCase();t!=n&&(tI(this,t),tC(this,n,e))},r)),r.j=i):(n||(t=tg(t,tw)),e.i=new tS(t,e.h))}function tf(e,t,n){e.i.set(t,n)}function tp(e){return tf(e,"zx",Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Date.now()).toString(36)),e}function tm(e,t){return e?t?decodeURI(e.replace(/%25/g,"%2525")):decodeURIComponent(e):""}function tg(e,t,n){return"string"==typeof e?(e=encodeURI(e).replace(t,ty),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function ty(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}tl.prototype.toString=function(){var e=[],t=this.j;t&&e.push(tg(t,tv,!0),":");var n=this.g;return(n||"file"==t)&&(e.push("//"),(t=this.s)&&e.push(tg(t,tv,!0),"@"),e.push(encodeURIComponent(String(n)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(n=this.m)&&e.push(":",String(n))),(n=this.l)&&(this.g&&"/"!=n.charAt(0)&&e.push("/"),e.push(tg(n,"/"==n.charAt(0)?tb:t_,!0))),(n=this.i.toString())&&e.push("?",n),(n=this.o)&&e.push("#",tg(n,tE)),e.join("")};var tv=/[#\/\?@]/g,t_=/[#\?:]/g,tb=/[#\?]/g,tw=/[#\?@]/g,tE=/#/g;function tS(e,t){this.h=this.g=null,this.i=e||null,this.j=!!t}function tT(e){e.g||(e.g=new Map,e.h=0,e.i&&function(e,t){if(e){e=e.split("&");for(var n=0;n<e.length;n++){var r=e[n].indexOf("="),i=null;if(0<=r){var s=e[n].substring(0,r);i=e[n].substring(r+1)}else s=e[n];t(s,i?decodeURIComponent(i.replace(/\+/g," ")):"")}}}(e.i,function(t,n){e.add(decodeURIComponent(t.replace(/\+/g," ")),n)}))}function tI(e,t){tT(e),t=tx(e,t),e.g.has(t)&&(e.i=null,e.h-=e.g.get(t).length,e.g.delete(t))}function tk(e,t){return tT(e),t=tx(e,t),e.g.has(t)}
26function tC(e,t,n){tI(e,t),0<n.length&&(e.i=null,e.g.set(tx(e,t),k(n)),e.h+=n.length)}function tx(e,t){return t=String(t),e.j&&(t=t.toLowerCase()),t}(u=tS.prototype).add=function(e,t){tT(this),this.i=null,e=tx(this,e);var n=this.g.get(e);return n||this.g.set(e,n=[]),n.push(t),this.h+=1,this},u.forEach=function(e,t){tT(this),this.g.forEach(function(n,r){n.forEach(function(n){e.call(t,n,r,this)},this)},this)},u.ta=function(){tT(this);let e=Array.from(this.g.values()),t=Array.from(this.g.keys()),n=[];for(let r=0;r<t.length;r++){let i=e[r];for(let e=0;e<i.length;e++)n.push(t[r])}return n},u.Z=function(e){tT(this);let t=[];if("string"==typeof e)tk(this,e)&&(t=t.concat(this.g.get(tx(this,e))));else{e=Array.from(this.g.values());for(let n=0;n<e.length;n++)t=t.concat(e[n])}return t},u.set=function(e,t){return tT(this),this.i=null,tk(this,e=tx(this,e))&&(this.h-=this.g.get(e).length),this.g.set(e,[t]),this.h+=1,this},u.get=function(e,t){return e&&0<(e=this.Z(e)).length?String(e[0]):t},u.toString=function(){if(this.i)return this.i;if(!this.g)return"";let e=[],t=Array.from(this.g.keys());for(var n=0;n<t.length;n++){var r=t[n];let s=encodeURIComponent(String(r)),o=this.Z(r);for(r=0;r<o.length;r++){var i=s;""!==o[r]&&(i+="="+encodeURIComponent(String(o[r]))),e.push(i)}}return this.i=e.join("&")};var tR=class{constructor(e,t){this.g=e,this.map=t}};function tA(e){this.l=e||tO,e=g.PerformanceNavigationTiming?0<(e=g.performance.getEntriesByType("navigation")).length&&("hq"==e[0].nextHopProtocol||"h2"==e[0].nextHopProtocol):!!(g.g&&g.g.Ka&&g.g.Ka()&&g.g.Ka().ec),this.j=e?this.l:1,this.g=null,1<this.j&&(this.g=new Set),this.h=null,this.i=[]}var tO=10;function tN(e){return!!e.h||!!e.g&&e.g.size>=e.j}function tD(e){return e.h?1:e.g?e.g.size:0}function tM(e,t){return e.h?e.h==t:!!e.g&&e.g.has(t)}function tL(e,t){e.g?e.g.add(t):e.h=t}function tP(e,t){e.h&&e.h==t?e.h=null:e.g&&e.g.has(t)&&e.g.delete(t)}function tj(e){if(null!=e.h)return e.i.concat(e.h.F);if(null!=e.g&&0!==e.g.size){let t=e.i;for(let n of e.g.values())t=t.concat(n.F);return t}return k(e.i)}tA.prototype.cancel=function(){if(this.i=tj(this),this.h)this.h.cancel(),this.h=null;else if(this.g&&0!==this.g.size){for(let e of this.g.values())e.cancel();this.g.clear()}};var tU=class{stringify(e){return g.JSON.stringify(e,void 0)}parse(e){return g.JSON.parse(e,void 0)}};function tF(){this.g=new tU}function tB(e,t,n,r,i){try{t.onload=null,t.onerror=null,t.onabort=null,t.ontimeout=null,i(r)}catch(e){}}function t$(e){this.l=e.fc||null,this.j=e.ob||!1}function tV(e,t){ep.call(this),this.F=e,this.u=t,this.m=void 0,this.readyState=tq,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.v=new Headers,this.h=null,this.C="GET",this.B="",this.g=!1,this.A=this.j=this.l=null}S(t$,eK),t$.prototype.g=function(){return new tV(this.l,this.j)},t$.prototype.i=(r={},function(){return r}),S(tV,ep);var tq=0;function tz(e){e.j.read().then(e.Xa.bind(e)).catch(e.ka.bind(e))}function tH(e){e.readyState=4,e.l=null,e.j=null,e.A=null,tW(e)}function tW(e){e.onreadystatechange&&e.onreadystatechange.call(e)}(u=tV.prototype).open=function(e,t){if(this.readyState!=tq)throw this.abort(),Error("Error reopening a connection");this.C=e,this.B=t,this.readyState=1,tW(this)},u.send=function(e){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.g=!0;let t={headers:this.v,method:this.C,credentials:this.m,cache:void 0};e&&(t.body=e),(this.F||g).fetch(new Request(this.B,t)).then(this.$a.bind(this),this.ka.bind(this))},u.abort=function(){this.response=this.responseText="",this.v=new Headers,this.status=0,this.j&&this.j.cancel("Request was aborted.").catch(()=>{}),1<=this.readyState&&this.g&&4!=this.readyState&&(this.g=!1,tH(this)),this.readyState=tq},u.$a=function(e){if(this.g&&(this.l=e,this.h||(this.status=this.l.status,this.statusText=this.l.statusText,this.h=e.headers,this.readyState=2,tW(this)),this.g&&(this.readyState=3,tW(this),this.g))){if("arraybuffer"===this.responseType)e.arrayBuffer().then(this.Ya.bind(this),this.ka.bind(this));else if(void 0!==g.ReadableStream&&"body"in e){if(this.j=e.body.getReader(),this.u){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=[]}else this.response=this.responseText="",this.A=new TextDecoder;tz(this)}else e.text().then(this.Za.bind(this),this.ka.bind(this))}},u.Xa=function(e){if(this.g){if(this.u&&e.value)this.response.push(e.value);else if(!this.u){var t=e.value?e.value:new Uint8Array(0);(t=this.A.decode(t,{stream:!e.done}))&&(this.response=this.responseText+=t)}e.done?tH(this):tW(this),3==this.readyState&&tz(this)}},u.Za=function(e){this.g&&(this.response=this.responseText=e,tH(this))},u.Ya=function(e){this.g&&(this.response=e,tH(this))},u.ka=function(){this.g&&tH(this)},u.setRequestHeader=function(e,t){this.v.append(e,t)},u.getResponseHeader=function(e){return this.h&&this.h.get(e.toLowerCase())||""},u.getAllResponseHeaders=function(){if(!this.h)return"";let e=[],t=this.h.entries();for(var n=t.next();!n.done;)e.push((n=n.value)[0]+": "+n[1]),n=t.next();return e.join("\r\n")},Object.defineProperty(tV.prototype,"withCredentials",{get:function(){return"include"===this.m},set:function(e){this.m=e?"include":"same-origin"}});var tG=g.JSON.parse;function tK(e){ep.call(this),this.headers=new Map,this.u=e||null,this.h=!1,this.C=this.g=null,this.I="",this.m=0,this.j="",this.l=this.G=this.v=this.F=!1,this.B=0,this.A=null,this.K=tX,this.L=this.M=!1}S(tK,ep);var tX="",tJ=/^https?$/i,tZ=["POST","PUT"];function tY(e,t){e.h=!1,e.g&&(e.l=!0,e.g.abort(),e.l=!1),e.j=t,e.m=5,tQ(e),t1(e)}function tQ(e){e.F||(e.F=!0,em(e,"complete"),em(e,"error"))}function t0(e){if(e.h&&void 0!==m&&(!e.C[1]||4!=t4(e)||2!=e.da())){if(e.v&&4==t4(e))eR(e.La,0,e);else if(em(e,"readystatechange"),4==t4(e)){e.h=!1;try{let o=e.da();switch(o){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t,n,r=!0;break;default:r=!1}if(!(t=r)){if(n=0===o){var i=String(e.I).match(ta)[1]||null;!i&&g.self&&g.self.location&&(i=g.self.location.protocol.slice(0,-1)),n=!tJ.test(i?i.toLowerCase():"")}t=n}if(t)em(e,"complete"),em(e,"success");else{e.m=6;try{var s=2<t4(e)?e.g.statusText:""}catch(e){s=""}e.j=s+" ["+e.da()+"]",tQ(e)}}finally{t1(e)}}}}function t1(e,t){if(e.g){t2(e);let n=e.g,r=e.C[0]?()=>{}:null;e.g=null,e.C=null,t||em(e,"ready");try{n.onreadystatechange=r}catch(e){}}}
26function t2(e){e.g&&e.L&&(e.g.ontimeout=null),e.A&&(g.clearTimeout(e.A),e.A=null)}function t4(e){return e.g?e.g.readyState:0}function t9(e){try{if(!e.g)return null;if("response"in e.g)return e.g.response;switch(e.K){case tX:case"text":return e.g.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in e.g)return e.g.mozResponseArrayBuffer}return null}catch(e){return null}}function t6(e){let t="";return Y(e,function(e,n){t+=n+":"+e+"\r\n"}),t}function t3(e,t,n){e:{for(r in n){var r=!1;break e}r=!0}r||(n=t6(n),"string"==typeof e?null!=n&&encodeURIComponent(String(n)):tf(e,t,n))}function t5(e,t,n){return n&&n.internalChannelParams&&n.internalChannelParams[e]||t}function t7(e){this.Ga=0,this.j=[],this.l=new eL,this.pa=this.wa=this.I=this.Y=this.g=this.Da=this.F=this.na=this.o=this.U=this.s=null,this.fb=this.W=0,this.cb=t5("failFast",!1,e),this.G=this.v=this.u=this.m=this.h=null,this.aa=!0,this.Fa=this.V=-1,this.ba=this.A=this.C=0,this.ab=t5("baseRetryDelayMs",5e3,e),this.hb=t5("retryDelaySeedMs",1e4,e),this.eb=t5("forwardChannelMaxRetries",2,e),this.xa=t5("forwardChannelRequestTimeoutMs",2e4,e),this.va=e&&e.xmlHttpFactory||void 0,this.Ha=e&&e.dc||!1,this.L=void 0,this.J=e&&e.supportsCrossDomainXhr||!1,this.K="",this.i=new tA(e&&e.concurrentRequestLimit),this.Ja=new tF,this.P=e&&e.fastHandshake||!1,this.O=e&&e.encodeInitMessageHeaders||!1,this.P&&this.O&&(this.O=!1),this.bb=e&&e.bc||!1,e&&e.Ea&&this.l.Ea(),e&&e.forceLongPolling&&(this.aa=!1),this.ca=!this.P&&this.aa&&e&&e.detectBufferingProxy||!1,this.qa=void 0,e&&e.longPollingTimeout&&0<e.longPollingTimeout&&(this.qa=e.longPollingTimeout),this.oa=void 0,this.S=0,this.M=!1,this.ma=this.B=null}function t8(e){if(nt(e),3==e.H){var t=e.W++,n=tu(e.I);if(tf(n,"SID",e.K),tf(n,"RID",t),tf(n,"TYPE","terminate"),ni(e,n),(t=new e1(e,e.l,t)).L=2,t.v=tp(tu(n)),n=!1,g.navigator&&g.navigator.sendBeacon)try{n=g.navigator.sendBeacon(t.v.toString(),"")}catch(e){}!n&&g.Image&&((new Image).src=t.v,n=!0),n||(t.g=ng(t.l,null),t.g.ha(t.v)),t.G=Date.now(),te(t)}np(e)}function ne(e){e.g&&(nl(e),e.g.cancel(),e.g=null)}function nt(e){ne(e),e.u&&(g.clearTimeout(e.u),e.u=null),nc(e),e.i.cancel(),e.m&&("number"==typeof e.m&&g.clearTimeout(e.m),e.m=null)}function nn(e){if(!tN(e.i)&&!e.m){e.m=!0;var t=e.Na;eE||eI(),eS||(eE(),eS=!0),eT.add(t,e),e.C=0}}function nr(e,t){var n;n=t?t.m:e.W++;let r=tu(e.I);tf(r,"SID",e.K),tf(r,"RID",n),tf(r,"AID",e.V),ni(e,r),e.o&&e.s&&t3(r,e.o,e.s),n=new e1(e,e.l,n,e.C+1),null===e.o&&(n.I=e.s),t&&(e.j=t.F.concat(e.j)),t=ns(e,n,1e3),n.setTimeout(Math.round(.5*e.xa)+Math.round(.5*e.xa*Math.random())),tL(e.i,n),e3(n,r,t)}function ni(e,t){e.na&&Y(e.na,function(e,n){tf(t,n,e)}),e.h&&to({},function(e,n){tf(t,n,e)})}function ns(e,t,n){n=Math.min(e.j.length,n);var r=e.h?w(e.h.Va,e.h,e):null;e:{var i=e.j;let t=-1;for(;;){let e=["count="+n];-1==t?0<n?(t=i[0].g,e.push("ofs="+t)):t=0:e.push("ofs="+t);let s=!0;for(let o=0;o<n;o++){let n=i[o].g,a=i[o].map;if(0>(n-=t))t=Math.max(0,i[o].g-100),s=!1;else try{!function(e,t,n){let r=n||"";try{to(e,function(e,n){let i=e;v(e)&&(i=ey(e)),t.push(r+n+"="+encodeURIComponent(i))})}catch(e){throw t.push(r+"type="+encodeURIComponent("_badmap")),e}}(a,e,"req"+n+"_")}catch(e){r&&r(a)}}if(s){r=e.join("&");break e}}}return e=e.j.splice(0,n),t.F=e,r}function no(e){if(!e.g&&!e.u){e.ba=1;var t=e.Ma;eE||eI(),eS||(eE(),eS=!0),eT.add(t,e),e.A=0}}function na(e){return!e.g&&!e.u&&!(3<=e.A)&&(e.ba++,e.u=eH(w(e.Ma,e),nd(e,e.A)),e.A++,!0)}function nl(e){null!=e.B&&(g.clearTimeout(e.B),e.B=null)}function nu(e){e.g=new e1(e,e.l,"rpc",e.ba),null===e.o&&(e.g.I=e.s),e.g.O=0;var t=tu(e.wa);tf(t,"RID","rpc"),tf(t,"SID",e.K),tf(t,"AID",e.V),tf(t,"CI",e.G?"0":"1"),!e.G&&e.qa&&tf(t,"TO",e.qa),tf(t,"TYPE","xmlhttp"),ni(e,t),e.o&&e.s&&t3(t,e.o,e.s),e.L&&e.g.setTimeout(e.L);var n=e.g;e=e.pa,n.L=1,n.v=tp(tu(t)),n.s=null,n.S=!0,e5(n,e)}function nc(e){null!=e.v&&(g.clearTimeout(e.v),e.v=null)}function nh(e,t){var n=null;if(e.g==t){nc(e),nl(e),e.g=null;var r=2}else{if(!tM(e.i,t))return;n=t.F,tP(e.i,t),r=1}if(0!=e.H){if(t.i){if(1==r){n=t.s?t.s.length:0,t=Date.now()-t.G;var i,s=e.C;em(r=eF(),new ez(r,n)),nn(e)}else no(e)}
26else if(3==(s=t.o)||0==s&&0<t.ca||!(1==r&&(i=t,!(tD(e.i)>=e.i.j-(e.m?1:0))&&(e.m?(e.j=i.F.concat(e.j),!0):1!=e.H&&2!=e.H&&!(e.C>=(e.cb?0:e.eb))&&(e.m=eH(w(e.Na,e,i),nd(e,e.C)),e.C++,!0)))||2==r&&na(e)))switch(n&&0<n.length&&((t=e.i).i=t.i.concat(n)),s){case 1:nf(e,5);break;case 4:nf(e,10);break;case 3:nf(e,6);break;default:nf(e,2)}}}function nd(e,t){let n=e.ab+Math.floor(Math.random()*e.hb);return e.isActive()||(n*=2),n*t}function nf(e,t){if(e.l.info("Error code "+t),2==t){var n=null;e.h&&(n=null);var r=w(e.pb,e);n||(n=new tl("//www.google.com/images/cleardot.gif"),g.location&&"http"==g.location.protocol||tc(n,"https"),tp(n)),function(e,t){let n=new eL;if(g.Image){let r=new Image;r.onload=E(tB,n,r,"TestLoadImage: loaded",!0,t),r.onerror=E(tB,n,r,"TestLoadImage: error",!1,t),r.onabort=E(tB,n,r,"TestLoadImage: abort",!1,t),r.ontimeout=E(tB,n,r,"TestLoadImage: timeout",!1,t),g.setTimeout(function(){r.ontimeout&&r.ontimeout()},1e4),r.src=e}else t(!1)}(n.toString(),r)}else eq(2);e.H=0,e.h&&e.h.za(t),np(e),nt(e)}function np(e){if(e.H=0,e.ma=[],e.h){let t=tj(e.i);(0!=t.length||0!=e.j.length)&&(C(e.ma,t),C(e.ma,e.j),e.i.i.length=0,k(e.j),e.j.length=0),e.h.ya()}}function nm(e,t,n){var r=n instanceof tl?tu(n):new tl(n);if(""!=r.g)t&&(r.g=t+"."+r.g),th(r,r.m);else{var i=g.location;r=i.protocol,t=t?t+"."+i.hostname:i.hostname,i=+i.port;var s=new tl(null);r&&tc(s,r),t&&(s.g=t),i&&th(s,i),n&&(s.l=n),r=s}return n=e.F,t=e.Da,n&&t&&tf(r,n,t),tf(r,"VER",e.ra),ni(e,r),r}function ng(e,t,n){if(t&&!e.J)throw Error("Can't create secondary domain capable XhrIo object.");return(t=new tK(n&&e.Ha&&!e.va?new t$({ob:!0}):e.va)).Oa(e.J),t}function ny(){}function nv(){if(L&&!(10<=Number(H)))throw Error("Environmental error: no available transport.")}function n_(e,t){ep.call(this),this.g=new t7(t),this.l=e,this.h=t&&t.messageUrlParams||null,e=t&&t.messageHeaders||null,t&&t.clientProtocolHeaderRequired&&(e?e["X-Client-Protocol"]="webchannel":e={"X-Client-Protocol":"webchannel"}),this.g.s=e,e=t&&t.initMessageHeaders||null,t&&t.messageContentType&&(e?e["X-WebChannel-Content-Type"]=t.messageContentType:e={"X-WebChannel-Content-Type":t.messageContentType}),t&&t.Ca&&(e?e["X-WebChannel-Client-Profile"]=t.Ca:e={"X-WebChannel-Client-Profile":t.Ca}),this.g.U=e,(e=t&&t.cc)&&!A(e)&&(this.g.o=e),this.A=t&&t.supportsCrossDomainXhr||!1,this.v=t&&t.sendRawJson||!1,(t=t&&t.httpSessionIdParam)&&!A(t)&&(this.g.F=t,null!==(e=this.h)&&t in e&&t in(e=this.h)&&delete e[t]),this.j=new nE(this)}function nb(e){eY.call(this),e.__headers__&&(this.headers=e.__headers__,this.statusCode=e.__status__,delete e.__headers__,delete e.__status__);var t=e.__sm__;if(t){e:{for(let n in t){e=n;break e}e=void 0}(this.i=e)&&(e=this.i,t=null!==t&&e in t?t[e]:void 0),this.data=t}else this.data=e}function nw(){eQ.call(this),this.status=1}function nE(e){this.g=e}function nS(){this.blockSize=-1,this.blockSize=64,this.g=[,,,,],this.m=Array(this.blockSize),this.i=this.h=0,this.reset()}function nT(e,t,n){n||(n=0);var r=Array(16);if("string"==typeof t)for(var i=0;16>i;++i)r[i]=t.charCodeAt(n++)|t.charCodeAt(n++)<<8|t.charCodeAt(n++)<<16|t.charCodeAt(n++)<<24;else for(i=0;16>i;++i)r[i]=t[n++]|t[n++]<<8|t[n++]<<16|t[n++]<<24;t=e.g[0],n=e.g[1],i=e.g[2];var s=e.g[3],o=t+(s^n&(i^s))+r[0]+3614090360&4294967295;o=s+(i^(t=n+(o<<7&4294967295|o>>>25))&(n^i))+r[1]+3905402710&4294967295,o=i+(n^(s=t+(o<<12&4294967295|o>>>20))&(t^n))+r[2]+606105819&4294967295,o=n+(t^(i=s+(o<<17&4294967295|o>>>15))&(s^t))+r[3]+3250441966&4294967295,o=t+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[4]+4118548399&4294967295,o=s+(i^(t=n+(o<<7&4294967295|o>>>25))&(n^i))+r[5]+1200080426&4294967295,o=i+(n^(s=t+(o<<12&4294967295|o>>>20))&(t^n))+r[6]+2821735955&4294967295,o=n+(t^(i=s+(o<<17&4294967295|o>>>15))&(s^t))+r[7]+4249261313&4294967295,o=t+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[8]+1770035416&4294967295,o=s+(i^(t=n+(o<<7&4294967295|o>>>25))&(n^i))+r[9]+2336552879&4294967295,o=i+(n^(s=t+(o<<12&4294967295|o>>>20))&(t^n))+r[10]+4294925233&4294967295,o=n+(t^(i=s+(o<<17&4294967295|o>>>15))&(s^t))+r[11]+2304563134&4294967295,o=t+(s^(n=i+(o<<22&4294967295|o>>>10))&(i^s))+r[12]+1804603682&4294967295,o=s+(i^(t=n+(o<<7&4294967295|o>>>25))&(n^i))+r[13]+4254626195&4294967295,o=i+(n^(s=t+(o<<12&4294967295|o>>>20))&(t^n))+r[14]+2792965006&4294967295,o=n+(t^(i=s+(o<<17&4294967295|o>>>15))&(s^t))+r[15]+1236535329&4294967295,n=i+(o<<22&4294967295|o>>>10),o=t+(i^s&(n^i))+r[1]+4129170786&4294967295,t=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(t^n))+r[6]+3225465664&4294967295,s=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(s^t))+r[11]+643717713&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^t&(i^s))+r[0]+3921069994&4294967295,n=i+(o<<20&4294967295|o>>>12),o=t+(i^s&(n^i))+r[5]+3593408605&4294967295,t=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(t^n))+r[10]+38016083&4294967295,s=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(s^t))+r[15]+3634488961&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^t&(i^s))+r[4]+3889429448&4294967295,n=i+(o<<20&4294967295|o>>>12),o=t+(i^s&(n^i))+r[9]+568446438&4294967295,t=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(t^n))+r[14]+3275163606&4294967295,s=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(s^t))+r[3]+4107603335&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^t&(i^s))+r[8]+1163531501&4294967295,n=i+(o<<20&4294967295|o>>>12),o=t+(i^s&(n^i))+r[13]+2850285829&4294967295,t=n+(o<<5&4294967295|o>>>27),o=s+(n^i&(t^n))+r[2]+4243563512&4294967295,s=t+(o<<9&4294967295|o>>>23),o=i+(t^n&(s^t))+r[7]+1735328473&4294967295,i=s+(o<<14&4294967295|o>>>18),o=n+(s^t&(i^s))+r[12]+2368359562&4294967295,o=t+((n=i+(o<<20&4294967295|o>>>12))^i^s)+r[5]+4294588738&4294967295,o=s+((t=n+(o<<4&4294967295|o>>>28))^n^i)+r[8]+2272392833&4294967295,o=i+((s=t+(o<<11&4294967295|o>>>21))^t^n)+r[11]+1839030562&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^t)+r[14]+4259657740&4294967295,o=t+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[1]+2763975236&4294967295,o=s+((t=n+(o<<4&4294967295|o>>>28))^n^i)+r[4]+1272893353&4294967295,o=i+((s=t+(o<<11&4294967295|o>>>21))^t^n)+r[7]+4139469664&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^t)+r[10]+3200236656&4294967295,o=t+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[13]+681279174&4294967295,o=s+((t=n+(o<<4&4294967295|o>>>28))^n^i)+r[0]+3936430074&4294967295,o=i+((s=t+(o<<11&4294967295|o>>>21))^t^n)+r[3]+3572445317&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^t)+r[6]+76029189&4294967295,o=t+((n=i+(o<<23&4294967295|o>>>9))^i^s)+r[9]+3654602809&4294967295,o=s+((t=n+(o<<4&4294967295|o>>>28))^n^i)+r[12]+3873151461&4294967295,o=i+((s=t+(o<<11&4294967295|o>>>21))^t^n)+r[15]+530742520&4294967295,o=n+((i=s+(o<<16&4294967295|o>>>16))^s^t)+r[2]+3299628645&4294967295,n=i+(o<<23&4294967295|o>>>9),o=t+(i^(n|~s))+r[0]+4096336452&4294967295,t=n+(o<<6&4294967295|o>>>26),o=s+(n^(t|~i))+r[7]+1126891415&4294967295,s=t+(o<<10&4294967295|o>>>22),o=i+(t^(s|~n))+r[14]+2878612391&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~t))+r[5]+4237533241&4294967295,n=i+(o<<21&4294967295|o>>>11),o=t+(i^(n|~s))+r[12]+1700485571&4294967295,t=n+(o<<6&4294967295|o>>>26),o=s+(n^(t|~i))+r[3]+2399980690&4294967295,s=t+(o<<10&4294967295|o>>>22),o=i+(t^(s|~n))+r[10]+4293915773&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~t))+r[1]+2240044497&4294967295,n=i+(o<<21&4294967295|o>>>11),o=t+(i^(n|~s))+r[8]+1873313359&4294967295,t=n+(o<<6&4294967295|o>>>26),o=s+(n^(t|~i))+r[15]+4264355552&4294967295,s=t+(o<<10&4294967295|o>>>22),o=i+(t^(s|~n))+r[6]+2734768916&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~t))+r[13]+1309151649&4294967295,n=i+(o<<21&4294967295|o>>>11),o=t+(i^(n|~s))+r[4]+4149444226&4294967295,t=n+(o<<6&4294967295|o>>>
2626),o=s+(n^(t|~i))+r[11]+3174756917&4294967295,s=t+(o<<10&4294967295|o>>>22),o=i+(t^(s|~n))+r[2]+718787259&4294967295,i=s+(o<<15&4294967295|o>>>17),o=n+(s^(i|~t))+r[9]+3951481745&4294967295,e.g[0]=e.g[0]+t&4294967295,e.g[1]=e.g[1]+(i+(o<<21&4294967295|o>>>11))&4294967295,e.g[2]=e.g[2]+i&4294967295,e.g[3]=e.g[3]+s&4294967295}function nI(e,t){this.h=t;for(var n=[],r=!0,i=e.length-1;0<=i;i--){var s=0|e[i];r&&s==t||(n[i]=s,r=!1)}this.g=n}(u=tK.prototype).Oa=function(e){this.M=e},u.ha=function(e,t,n,r){if(this.g)throw Error("[goog.net.XhrIo] Object is active with another request="+this.I+"; newUri="+e);t=t?t.toUpperCase():"GET",this.I=e,this.j="",this.m=0,this.F=!1,this.h=!0,this.g=this.u?this.u.g():o.g(),this.C=this.u?eX(this.u):eX(o),this.g.onreadystatechange=w(this.La,this);try{this.G=!0,this.g.open(t,String(e),!0),this.G=!1}catch(e){tY(this,e);return}if(e=n||"",n=new Map(this.headers),r){if(Object.getPrototypeOf(r)===Object.prototype)for(var i in r)n.set(i,r[i]);else if("function"==typeof r.keys&&"function"==typeof r.get)for(let e of r.keys())n.set(e,r.get(e));else throw Error("Unknown input type for opt_headers: "+String(r))}for(let[s,o]of(r=Array.from(n.keys()).find(e=>"content-type"==e.toLowerCase()),i=g.FormData&&e instanceof g.FormData,!(0<=I(tZ,t))||r||i||n.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),n))this.g.setRequestHeader(s,o);this.K&&(this.g.responseType=this.K),"withCredentials"in this.g&&this.g.withCredentials!==this.M&&(this.g.withCredentials=this.M);try{var s;t2(this),0<this.B&&((this.L=(s=this.g,L&&"number"==typeof s.timeout&&void 0!==s.ontimeout))?(this.g.timeout=this.B,this.g.ontimeout=w(this.ua,this)):this.A=eR(this.ua,this.B,this)),this.v=!0,this.g.send(e),this.v=!1}catch(e){tY(this,e)}},u.ua=function(){void 0!==m&&this.g&&(this.j="Timed out after "+this.B+"ms, aborting",this.m=8,em(this,"timeout"),this.abort(8))},u.abort=function(e){this.g&&this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1,this.m=e||7,em(this,"complete"),em(this,"abort"),t1(this))},u.N=function(){this.g&&(this.h&&(this.h=!1,this.l=!0,this.g.abort(),this.l=!1),t1(this,!0)),tK.$.N.call(this)},u.La=function(){this.s||(this.G||this.v||this.l?t0(this):this.kb())},u.kb=function(){t0(this)},u.isActive=function(){return!!this.g},u.da=function(){try{return 2<t4(this)?this.g.status:-1}catch(e){return -1}},u.ja=function(){try{return this.g?this.g.responseText:""}catch(e){return""}},u.Wa=function(e){if(this.g){var t=this.g.responseText;return e&&0==t.indexOf(e)&&(t=t.substring(e.length)),tG(t)}},u.Ia=function(){return this.m},u.Sa=function(){return"string"==typeof this.j?this.j:String(this.j)},(u=t7.prototype).ra=8,u.H=1,u.Na=function(e){if(this.m){if(this.m=null,1==this.H){if(!e){this.W=Math.floor(1e5*Math.random()),e=this.W++;let i=new e1(this,this.l,e),s=this.s;if(this.U&&(s?et(s=Q(s),this.U):s=this.U),null!==this.o||this.O||(i.I=s,s=null),this.P)e:{for(var t=0,n=0;n<this.j.length;n++){t:{var r=this.j[n];if("__data__"in r.map&&"string"==typeof(r=r.map.__data__)){r=r.length;break t}r=void 0}if(void 0===r)break;if(4096<(t+=r)){t=n;break e}if(4096===t||n===this.j.length-1){t=n+1;break e}}t=1e3}else t=1e3;t=ns(this,i,t),tf(n=tu(this.I),"RID",e),tf(n,"CVER",22),this.F&&tf(n,"X-HTTP-Session-Id",this.F),ni(this,n),s&&(this.O?t="headers="+encodeURIComponent(String(t6(s)))+"&"+t:this.o&&t3(n,this.o,s)),tL(this.i,i),this.bb&&tf(n,"TYPE","init"),this.P?(tf(n,"$req",t),tf(n,"SID","null"),i.aa=!0,e3(i,n,null)):e3(i,n,t),this.H=2}}else 3==this.H&&(e?nr(this,e):0==this.j.length||tN(this.i)||nr(this))}},u.Ma=function(){if(this.u=null,nu(this),this.ca&&!(this.M||null==this.g||0>=this.S)){var e=2*this.S;this.l.info("BP detection timer enabled: "+e),this.B=eH(w(this.jb,this),e)}},u.jb=function(){this.B&&(this.B=null,this.l.info("BP detection timeout reached."),this.l.info("Buffering proxy detected and switch to long-polling!"),this.G=!1,this.M=!0,eq(10),ne(this),nu(this))},u.ib=function(){null!=this.v&&(this.v=null,ne(this),na(this),eq(19))},u.pb=function(e){e?(this.l.info("Successfully pinged google.com"),eq(2)):(this.l.info("Failed to ping google.com"),eq(1))},u.isActive=function(){return!!this.h&&this.h.isActive(this)},(u=ny.prototype).Ba=function(){},u.Aa=function(){},u.za=function(){},u.ya=function(){},u.isActive=function(){return!0},u.Va=function(){},nv.prototype.g=function(e,t){return new n_(e,t)},S(n_,ep),n_.prototype.m=function(){this.g.h=this.j,this.A&&(this.g.J=!0);var e=this.g,t=this.l,n=this.h||void 0;eq(0),e.Y=t,e.na=n||{},e.G=e.aa,e.I=nm(e,null,e.Y),nn(e)},n_.prototype.close=function(){t8(this.g)},n_.prototype.u=function(e){var t=this.g;if("string"==typeof e){var n={};n.__data__=e,e=n}else this.v&&((n={}).__data__=ey(e),e=n);t.j.push(new tR(t.fb++,e)),3==t.H&&nn(t)},n_.prototype.N=function(){this.g.h=null,delete this.j,t8(this.g),delete this.g,n_.$.N.call(this)},S(nb,eY),S(nw,eQ),S(nE,ny),nE.prototype.Ba=function(){em(this.g,"a")},nE.prototype.Aa=function(e){em(this.g,new nb(e))},nE.prototype.za=function(e){em(this.g,new nw)},nE.prototype.ya=function(){em(this.g,"b")},S(nS,function(){this.blockSize=-1}),nS.prototype.reset=function(){this.g[0]=1732584193,this.g[1]=4023233417,this.g[2]=2562383102,this.g[3]=271733878,this.i=this.h=0},nS.prototype.j=function(e,t){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=this.m,i=this.h,s=0;s<t;){if(0==i)for(;s<=n;)nT(this,e,s),s+=this.blockSize;if("string"==typeof e){for(;s<t;)if(r[i++]=e.charCodeAt(s++),i==this.blockSize){nT(this,r),i=0;break}}else for(;s<t;)if(r[i++]=e[s++],i==this.blockSize){nT(this,r),i=0;break}}this.h=i,this.i+=t},nS.prototype.l=function(){var e=Array((56>this.h?this.blockSize:2*this.blockSize)-this.h);e[0]=128;for(var t=1;t<e.length-8;++t)e[t]=0;var n=8*this.i;for(t=e.length-8;t<e.length;++t)e[t]=255&n,n/=256;for(this.j(e),e=Array(16),t=n=0;4>t;++t)for(var r=0;32>r;r+=8)e[n++]=this.g[t]>>>r&255;return e};var nk={};function nC(e){var t;return -128<=e&&128>e?(t=function(e){return new nI([0|e],0>e?-1:0)},Object.prototype.hasOwnProperty.call(nk,e)?nk[e]:nk[e]=t(e)):new nI([0|e],0>e?-1:0)}function nx(e){if(isNaN(e)||!isFinite(e))return nA;if(0>e)return nL(nx(-e));for(var t=[],n=1,r=0;e>=n;r++)t[r]=e/n|0,n*=nR;return new nI(t,0)}var nR=4294967296,nA=nC(0),nO=nC(1),nN=nC(16777216);function nD(e){if(0!=e.h)return!1;for(var t=0;t<e.g.length;t++)if(0!=e.g[t])return!1;return!0}function nM(e){return -1==e.h}function nL(e){for(var t=e.g.length,n=[],r=0;r<t;r++)n[r]=~e.g[r];return new nI(n,~e.h).add(nO)}function nP(e,t){return e.add(nL(t))}function nj(e,t){for(;(65535&e[t])!=e[t];)e[t+1]+=e[t]>>>16,e[t]&=65535,t++}function nU(e,t){this.g=e,this.h=t}function nF(e,t){if(nD(t))throw Error("division by zero");if(nD(e))return new nU(nA,nA);if(nM(e))return t=nF(nL(e),t),new nU(nL(t.g),nL(t.h));if(nM(t))return t=nF(e,nL(t)),new nU(nL(t.g),t.h);if(30<e.g.length){if(nM(e)||nM(t))throw Error("slowDivide_ only works with positive integers.");for(var n=nO,r=t;0>=r.X(e);)n=nB(n),r=nB(r);var i=n$(n,1),s=n$(r,1);for(r=n$(r,2),n=n$(n,2);!nD(r);){var o=s.add(r);0>=o.X(e)&&(i=i.add(n),s=o),r=n$(r,1),n=n$(n,1)}return t=nP(e,i.R(t)),new nU(i,t)}for(i=nA;0<=e.X(t);){for(r=48>=(r=Math.ceil(Math.log(n=Math.max(1,Math.floor(e.ea()/t.ea())))/M
26ath.LN2))?1:Math.pow(2,r-48),o=(s=nx(n)).R(t);nM(o)||0<o.X(e);)n-=r,o=(s=nx(n)).R(t);nD(s)&&(s=nO),i=i.add(s),e=nP(e,o)}return new nU(i,e)}function nB(e){for(var t=e.g.length+1,n=[],r=0;r<t;r++)n[r]=e.D(r)<<1|e.D(r-1)>>>31;return new nI(n,e.h)}function n$(e,t){var n=t>>5;t%=32;for(var r=e.g.length-n,i=[],s=0;s<r;s++)i[s]=0<t?e.D(s+n)>>>t|e.D(s+n+1)<<32-t:e.D(s+n);return new nI(i,e.h)}(u=nI.prototype).ea=function(){if(nM(this))return-nL(this).ea();for(var e=0,t=1,n=0;n<this.g.length;n++){var r=this.D(n);e+=(0<=r?r:nR+r)*t,t*=nR}return e},u.toString=function(e){if(2>(e=e||10)||36<e)throw Error("radix out of range: "+e);if(nD(this))return"0";if(nM(this))return"-"+nL(this).toString(e);for(var t=nx(Math.pow(e,6)),n=this,r="";;){var i=nF(n,t).g,s=((0<(n=nP(n,i.R(t))).g.length?n.g[0]:n.h)>>>0).toString(e);if(nD(n=i))return s+r;for(;6>s.length;)s="0"+s;r=s+r}},u.D=function(e){return 0>e?0:e<this.g.length?this.g[e]:this.h},u.X=function(e){return nM(e=nP(this,e))?-1:nD(e)?0:1},u.abs=function(){return nM(this)?nL(this):this},u.add=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0,i=0;i<=t;i++){var s=r+(65535&this.D(i))+(65535&e.D(i)),o=(s>>>16)+(this.D(i)>>>16)+(e.D(i)>>>16);r=o>>>16,s&=65535,o&=65535,n[i]=o<<16|s}return new nI(n,-2147483648&n[n.length-1]?-1:0)},u.R=function(e){if(nD(this)||nD(e))return nA;if(nM(this))return nM(e)?nL(this).R(nL(e)):nL(nL(this).R(e));if(nM(e))return nL(this.R(nL(e)));if(0>this.X(nN)&&0>e.X(nN))return nx(this.ea()*e.ea());for(var t=this.g.length+e.g.length,n=[],r=0;r<2*t;r++)n[r]=0;for(r=0;r<this.g.length;r++)for(var i=0;i<e.g.length;i++){var s=this.D(r)>>>16,o=65535&this.D(r),a=e.D(i)>>>16,l=65535&e.D(i);n[2*r+2*i]+=o*l,nj(n,2*r+2*i),n[2*r+2*i+1]+=s*l,nj(n,2*r+2*i+1),n[2*r+2*i+1]+=o*a,nj(n,2*r+2*i+1),n[2*r+2*i+2]+=s*a,nj(n,2*r+2*i+2)}for(r=0;r<t;r++)n[r]=n[2*r+1]<<16|n[2*r];for(r=t;r<2*t;r++)n[r]=0;return new nI(n,0)},u.gb=function(e){return nF(this,e).h},u.and=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)&e.D(r);return new nI(n,this.h&e.h)},u.or=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)|e.D(r);return new nI(n,this.h|e.h)},u.xor=function(e){for(var t=Math.max(this.g.length,e.g.length),n=[],r=0;r<t;r++)n[r]=this.D(r)^e.D(r);return new nI(n,this.h^e.h)},nv.prototype.createWebChannel=nv.prototype.g,n_.prototype.send=n_.prototype.u,n_.prototype.open=n_.prototype.m,n_.prototype.close=n_.prototype.close,eW.NO_ERROR=0,eW.TIMEOUT=8,eW.HTTP_ERROR=6,eG.COMPLETE="complete",eJ.EventType=eZ,eZ.OPEN="a",eZ.CLOSE="b",eZ.ERROR="c",eZ.MESSAGE="d",ep.prototype.listen=ep.prototype.O,tK.prototype.listenOnce=tK.prototype.P,tK.prototype.getLastError=tK.prototype.Sa,tK.prototype.getLastErrorCode=tK.prototype.Ia,tK.prototype.getStatus=tK.prototype.da,tK.prototype.getResponseJson=tK.prototype.Wa,tK.prototype.getResponseText=tK.prototype.ja,tK.prototype.send=tK.prototype.ha,tK.prototype.setWithCredentials=tK.prototype.Oa,nS.prototype.digest=nS.prototype.l,nS.prototype.reset=nS.prototype.reset,nS.prototype.update=nS.prototype.j,nI.prototype.add=nI.prototype.add,nI.prototype.multiply=nI.prototype.R,nI.prototype.modulo=nI.prototype.gb,nI.prototype.compare=nI.prototype.X,nI.prototype.toNumber=nI.prototype.ea,nI.prototype.toString=nI.prototype.toString,nI.prototype.getBits=nI.prototype.D,nI.fromNumber=nx,nI.fromString=function e(t,n){if(0==t.length)throw Error("number format error: empty string");if(2>(n=n||10)||36<n)throw Error("radix out of range: "+n);if("-"==t.charAt(0))return nL(e(t.substring(1),n));if(0<=t.indexOf("-"))throw Error('number format error: interior "-" character');for(var r=nx(Math.pow(n,8)),i=nA,s=0;s<t.length;s+=8){var o=Math.min(8,t.length-s),a=parseInt(t.substring(s,s+o),n);8>o?(o=nx(Math.pow(n,o)),i=i.R(o).add(nx(a))):i=(i=i.R(r)).add(nx(a))}return i};var nV=p.createWebChannelTransport=function(){return new nv},nq=p.getStatEventTarget=function(){return eF()},nz=p.ErrorCode=eW,nH=p.EventType=eG,nW=p.Event=ej,nG=p.Stat={xb:0,Ab:1,Bb:2,Ub:3,Zb:4,Wb:5,Xb:6,Vb:7,Tb:8,Yb:9,PROXY:10,NOPROXY:11,Rb:12,Nb:13,Ob:14,Mb:15,Pb:16,Qb:17,tb:18,sb:19,ub:20},nK=p.FetchXmlHttpFactory=t$,nX=p.WebChannel=eJ,nJ=p.XhrIo=tK,nZ=p.Md5=nS,nY=p.Integer=nI;n(34155);
26let nQ="@firebase/firestore";class n0{constructor(e){this.uid=e}isAuthenticated(){return null!=this.uid}toKey(){return this.isAuthenticated()?"uid:"+this.uid:"anonymous-user"}isEqual(e){return e.uid===this.uid}}n0.UNAUTHENTICATED=new n0(null),n0.GOOGLE_CREDENTIALS=new n0("google-credentials-uid"),n0.FIRST_PARTY=new n0("first-party-uid"),n0.MOCK_USER=new n0("mock-user");let n1="9.23.0",n2=new d.Yd("@firebase/firestore");function n4(){return n2.logLevel}function n9(e,...t){if(n2.logLevel<=d.in.DEBUG){let n=t.map(n5);n2.debug(`Firestore (${n1}): ${e}`,...n)}}function n6(e,...t){if(n2.logLevel<=d.in.ERROR){let n=t.map(n5);n2.error(`Firestore (${n1}): ${e}`,...n)}}function n3(e,...t){if(n2.logLevel<=d.in.WARN){let n=t.map(n5);n2.warn(`Firestore (${n1}): ${e}`,...n)}}function n5(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(t){return e}}function n7(e="Unexpected state"){let t=`FIRESTORE (${n1}) INTERNAL ASSERTION FAILED: `+e;throw n6(t),Error(t)}let n8={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class re extends f.ZR{constructor(e,t){super(e,t),this.code=e,this.message=t,this.toString=()=>`${this.name}: [code=${this.code}]: ${this.message}`}}class rt{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}class rn{constructor(e,t){this.user=t,this.type="OAuth",this.headers=new Map,this.headers.set("Authorization",`Bearer ${e}`)}}class rr{getToken(){return Promise.resolve(null)}invalidateToken(){}start(e,t){e.enqueueRetryable(()=>t(n0.UNAUTHENTICATED))}shutdown(){}}class ri{constructor(e){this.token=e,this.changeListener=null}getToken(){return Promise.resolve(this.token)}invalidateToken(){}start(e,t){this.changeListener=t,e.enqueueRetryable(()=>t(this.token.user))}shutdown(){this.changeListener=null}}class rs{constructor(e){this.t=e,this.currentUser=n0.UNAUTHENTICATED,this.i=0,this.forceRefresh=!1,this.auth=null}start(e,t){let n=this.i,r=e=>this.i!==n?(n=this.i,t(e)):Promise.resolve(),i=new rt;this.o=()=>{this.i++,this.currentUser=this.u(),i.resolve(),i=new rt,e.enqueueRetryable(()=>r(this.currentUser))};let s=()=>{let t=i;e.enqueueRetryable(async()=>{await t.promise,await r(this.currentUser)})},o=e=>{n9("FirebaseAuthCredentialsProvider","Auth detected"),this.auth=e,this.auth.addAuthTokenListener(this.o),s()};this.t.onInit(e=>o(e)),setTimeout(()=>{if(!this.auth){let e=this.t.getImmediate({optional:!0});e?o(e):(n9("FirebaseAuthCredentialsProvider","Auth not yet detected"),i.resolve(),i=new rt)}},0),s()}getToken(){let e=this.i,t=this.forceRefresh;return this.forceRefresh=!1,this.auth?this.auth.getToken(t).then(t=>this.i!==e?(n9("FirebaseAuthCredentialsProvider","getToken aborted due to token change."),this.getToken()):t?("string"==typeof t.accessToken||n7(),new rn(t.accessToken,this.currentUser)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.auth&&this.auth.removeAuthTokenListener(this.o)}u(){let e=this.auth&&this.auth.getUid();return null===e||"string"==typeof e||n7(),new n0(e)}}class ro{constructor(e,t,n){this.h=e,this.l=t,this.m=n,this.type="FirstParty",this.user=n0.FIRST_PARTY,this.g=new Map}p(){return this.m?this.m():null}get headers(){this.g.set("X-Goog-AuthUser",this.h);let e=this.p();return e&&this.g.set("Authorization",e),this.l&&this.g.set("X-Goog-Iam-Authorization-Token",this.l),this.g}}class ra{constructor(e,t,n){this.h=e,this.l=t,this.m=n}getToken(){return Promise.resolve(new ro(this.h,this.l,this.m))}start(e,t){e.enqueueRetryable(()=>t(n0.FIRST_PARTY))}shutdown(){}invalidateToken(){}}class rl{constructor(e){this.value=e,this.type="AppCheck",this.headers=new Map,e&&e.length>0&&this.headers.set("x-firebase-appcheck",this.value)}}class ru{constructor(e){this.I=e,this.forceRefresh=!1,this.appCheck=null,this.T=null}start(e,t){let n=e=>{null!=e.error&&n9("FirebaseAppCheckTokenProvider",`Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);let n=e.token!==this.T;return this.T=e.token,n9("FirebaseAppCheckTokenProvider",`Received ${n?"new":"existing"} token.`),n?t(e.token):Promise.resolve()};this.o=t=>{e.enqueueRetryable(()=>n(t))};let r=e=>{n9("FirebaseAppCheckTokenProvider","AppCheck detected"),this.appCheck=e,this.appCheck.addTokenListener(this.o)};this.I.onInit(e=>r(e)),setTimeout(()=>{if(!this.appCheck){let e=this.I.getImmediate({optional:!0});e?r(e):n9("FirebaseAppCheckTokenProvider","AppCheck not yet detected")}},0)}getToken(){let e=this.forceRefresh;return this.forceRefresh=!1,this.appCheck?this.appCheck.getToken(e).then(e=>e?("string"==typeof e.token||n7(),this.T=e.token,new rl(e.token)):null):Promise.resolve(null)}invalidateToken(){this.forceRefresh=!0}shutdown(){this.appCheck&&this.appCheck.removeTokenListener(this.o)}}class rc{static A(){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",t=Math.floor(256/e.length)*e.length,n="";for(;n.length<20;){let r=function(e){let t="undefined"!=typeof self&&(self.crypto||self.msCrypto),n=new Uint8Array(40);if(t&&"function"==typeof t.getRandomValues)t.getRandomValues(n);else for(let e=0;e<40;
26e++)n[e]=Math.floor(256*Math.random());return n}(0);for(let i=0;i<r.length;++i)n.length<20&&r[i]<t&&(n+=e.charAt(r[i]%e.length))}return n}}function rh(e,t){return e<t?-1:e>t?1:0}function rd(e,t,n){return e.length===t.length&&e.every((e,r)=>n(e,t[r]))}class rf{constructor(e,t){if(this.seconds=e,this.nanoseconds=t,t<0||t>=1e9)throw new re(n8.INVALID_ARGUMENT,"Timestamp nanoseconds out of range: "+t);if(e<-62135596800||e>=253402300800)throw new re(n8.INVALID_ARGUMENT,"Timestamp seconds out of range: "+e)}static now(){return rf.fromMillis(Date.now())}static fromDate(e){return rf.fromMillis(e.getTime())}static fromMillis(e){let t=Math.floor(e/1e3);return new rf(t,Math.floor(1e6*(e-1e3*t)))}toDate(){return new Date(this.toMillis())}toMillis(){return 1e3*this.seconds+this.nanoseconds/1e6}_compareTo(e){return this.seconds===e.seconds?rh(this.nanoseconds,e.nanoseconds):rh(this.seconds,e.seconds)}isEqual(e){return e.seconds===this.seconds&&e.nanoseconds===this.nanoseconds}toString(){return"Timestamp(seconds="+this.seconds+", nanoseconds="+this.nanoseconds+")"}toJSON(){return{seconds:this.seconds,nanoseconds:this.nanoseconds}}valueOf(){return String(this.seconds- -62135596800).padStart(12,"0")+"."+String(this.nanoseconds).padStart(9,"0")}}class rp{constructor(e){this.timestamp=e}static fromTimestamp(e){return new rp(e)}static min(){return new rp(new rf(0,0))}static max(){return new rp(new rf(253402300799,999999999))}compareTo(e){return this.timestamp._compareTo(e.timestamp)}isEqual(e){return this.timestamp.isEqual(e.timestamp)}toMicroseconds(){return 1e6*this.timestamp.seconds+this.timestamp.nanoseconds/1e3}toString(){return"SnapshotVersion("+this.timestamp.toString()+")"}toTimestamp(){return this.timestamp}}class rm{constructor(e,t,n){void 0===t?t=0:t>e.length&&n7(),void 0===n?n=e.length-t:n>e.length-t&&n7(),this.segments=e,this.offset=t,this.len=n}get length(){return this.len}isEqual(e){return 0===rm.comparator(this,e)}child(e){let t=this.segments.slice(this.offset,this.limit());return e instanceof rm?e.forEach(e=>{t.push(e)}):t.push(e),this.construct(t)}limit(){return this.offset+this.length}popFirst(e){return e=void 0===e?1:e,this.construct(this.segments,this.offset+e,this.length-e)}popLast(){return this.construct(this.segments,this.offset,this.length-1)}firstSegment(){return this.segments[this.offset]}lastSegment(){return this.get(this.length-1)}get(e){return this.segments[this.offset+e]}isEmpty(){return 0===this.length}isPrefixOf(e){if(e.length<this.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}isImmediateParentOf(e){if(this.length+1!==e.length)return!1;for(let t=0;t<this.length;t++)if(this.get(t)!==e.get(t))return!1;return!0}forEach(e){for(let t=this.offset,n=this.limit();t<n;t++)e(this.segments[t])}toArray(){return this.segments.slice(this.offset,this.limit())}static comparator(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e.get(r),i=t.get(r);if(n<i)return -1;if(n>i)return 1}return e.length<t.length?-1:e.length>t.length?1:0}}class rg extends rm{construct(e,t,n){return new rg(e,t,n)}canonicalString(){return this.toArray().join("/")}toString(){return this.canonicalString()}static fromString(...e){let t=[];for(let n of e){if(n.indexOf("//")>=0)throw new re(n8.INVALID_ARGUMENT,`Invalid segment (${n}). Paths must not contain // in them.`);t.push(...n.split("/").filter(e=>e.length>0))}return new rg(t)}static emptyPath(){return new rg([])}}let ry=/^[_a-zA-Z][_a-zA-Z0-9]*$/;class rv extends rm{construct(e,t,n){return new rv(e,t,n)}static isValidIdentifier(e){return ry.test(e)}canonicalString(){return this.toArray().map(e=>(e=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`"),rv.isValidIdentifier(e)||(e="`"+e+"`"),e)).join(".")}toString(){return this.canonicalString()}isKeyField(){return 1===this.length&&"__name__"===this.get(0)}static keyField(){return new rv(["__name__"])}static fromServerFormat(e){let t=[],n="",r=0,i=()=>{if(0===n.length)throw new re(n8.INVALID_ARGUMENT,`Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);t.push(n),n=""},s=!1;for(;r<e.length;){let t=e[r];
26if("\\"===t){if(r+1===e.length)throw new re(n8.INVALID_ARGUMENT,"Path has trailing escape character: "+e);let t=e[r+1];if("\\"!==t&&"."!==t&&"`"!==t)throw new re(n8.INVALID_ARGUMENT,"Path has invalid escape sequence: "+e);n+=t,r+=2}else"`"===t?s=!s:"."!==t||s?n+=t:i(),r++}if(i(),s)throw new re(n8.INVALID_ARGUMENT,"Unterminated ` in path: "+e);return new rv(t)}static emptyPath(){return new rv([])}}class r_{constructor(e){this.path=e}static fromPath(e){return new r_(rg.fromString(e))}static fromName(e){return new r_(rg.fromString(e).popFirst(5))}static empty(){return new r_(rg.emptyPath())}get collectionGroup(){return this.path.popLast().lastSegment()}hasCollectionId(e){return this.path.length>=2&&this.path.get(this.path.length-2)===e}getCollectionGroup(){return this.path.get(this.path.length-2)}getCollectionPath(){return this.path.popLast()}isEqual(e){return null!==e&&0===rg.comparator(this.path,e.path)}toString(){return this.path.toString()}static comparator(e,t){return rg.comparator(e.path,t.path)}static isDocumentKey(e){return e.length%2==0}static fromSegments(e){return new r_(new rg(e.slice()))}}class rb{constructor(e,t,n,r){this.indexId=e,this.collectionGroup=t,this.fields=n,this.indexState=r}}rb.UNKNOWN_ID=-1;class rw{constructor(e,t,n){this.readTime=e,this.documentKey=t,this.largestBatchId=n}static min(){return new rw(rp.min(),r_.empty(),-1)}static max(){return new rw(rp.max(),r_.empty(),-1)}}class rE{constructor(){this.onCommittedListeners=[]}addOnCommittedListener(e){this.onCommittedListeners.push(e)}raiseOnCommittedEvent(){this.onCommittedListeners.forEach(e=>e())}}async function rS(e){if(e.code!==n8.FAILED_PRECONDITION||"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab."!==e.message)throw e;n9("LocalStore","Unexpectedly lost primary lease")}class rT{constructor(e){this.nextCallback=null,this.catchCallback=null,this.result=void 0,this.error=void 0,this.isDone=!1,this.callbackAttached=!1,e(e=>{this.isDone=!0,this.result=e,this.nextCallback&&this.nextCallback(e)},e=>{this.isDone=!0,this.error=e,this.catchCallback&&this.catchCallback(e)})}catch(e){return this.next(void 0,e)}next(e,t){return this.callbackAttached&&n7(),this.callbackAttached=!0,this.isDone?this.error?this.wrapFailure(t,this.error):this.wrapSuccess(e,this.result):new rT((n,r)=>{this.nextCallback=t=>{this.wrapSuccess(e,t).next(n,r)},this.catchCallback=e=>{this.wrapFailure(t,e).next(n,r)}})}toPromise(){return new Promise((e,t)=>{this.next(e,t)})}wrapUserFunction(e){try{let t=e();return t instanceof rT?t:rT.resolve(t)}catch(e){return rT.reject(e)}}wrapSuccess(e,t){return e?this.wrapUserFunction(()=>e(t)):rT.resolve(t)}wrapFailure(e,t){return e?this.wrapUserFunction(()=>e(t)):rT.reject(t)}static resolve(e){return new rT((t,n)=>{t(e)})}static reject(e){return new rT((t,n)=>{n(e)})}static waitFor(e){return new rT((t,n)=>{let r=0,i=0,s=!1;e.forEach(e=>{++r,e.next(()=>{++i,s&&i===r&&t()},e=>n(e))}),s=!0,i===r&&t()})}static or(e){let t=rT.resolve(!1);for(let n of e)t=t.next(e=>e?rT.resolve(e):n());return t}static forEach(e,t){let n=[];return e.forEach((e,r)=>{n.push(t.call(this,e,r))}),this.waitFor(n)}static mapArray(e,t){return new rT((n,r)=>{let i=e.length,s=Array(i),o=0;for(let a=0;a<i;a++){let l=a;t(e[l]).next(e=>{s[l]=e,++o===i&&n(s)},e=>r(e))}})}static doWhile(e,t){return new rT((n,r)=>{let i=()=>{!0===e()?t().next(()=>{i()},r):n()};i()})}}function rI(e){return"IndexedDbTransactionError"===e.name}class rk{constructor(e,t){this.previousValue=e,t&&(t.sequenceNumberHandler=e=>this.ot(e),this.ut=e=>t.writeSequenceNumber(e))}ot(e){return this.previousValue=Math.max(e,this.previousValue),this.previousValue}next(){let e=++this.previousValue;return this.ut&&this.ut(e),e}}function rC(e){return 0===e&&1/e==-1/0}function rx(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function rR(e,t){for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(n,e[n])}function rA(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}rk.ct=-1;class rO{constructor(e,t){this.comparator=e,this.root=t||rD.EMPTY}insert(e,t){return new rO(this.comparator,this.root.insert(e,t,this.comparator).copy(null,null,rD.BLACK,null,
26null))}remove(e){return new rO(this.comparator,this.root.remove(e,this.comparator).copy(null,null,rD.BLACK,null,null))}get(e){let t=this.root;for(;!t.isEmpty();){let n=this.comparator(e,t.key);if(0===n)return t.value;n<0?t=t.left:n>0&&(t=t.right)}return null}indexOf(e){let t=0,n=this.root;for(;!n.isEmpty();){let r=this.comparator(e,n.key);if(0===r)return t+n.left.size;r<0?n=n.left:(t+=n.left.size+1,n=n.right)}return -1}isEmpty(){return this.root.isEmpty()}get size(){return this.root.size}minKey(){return this.root.minKey()}maxKey(){return this.root.maxKey()}inorderTraversal(e){return this.root.inorderTraversal(e)}forEach(e){this.inorderTraversal((t,n)=>(e(t,n),!1))}toString(){let e=[];return this.inorderTraversal((t,n)=>(e.push(`${t}:${n}`),!1)),`{${e.join(", ")}}`}reverseTraversal(e){return this.root.reverseTraversal(e)}getIterator(){return new rN(this.root,null,this.comparator,!1)}getIteratorFrom(e){return new rN(this.root,e,this.comparator,!1)}getReverseIterator(){return new rN(this.root,null,this.comparator,!0)}getReverseIteratorFrom(e){return new rN(this.root,e,this.comparator,!0)}}class rN{constructor(e,t,n,r){this.isReverse=r,this.nodeStack=[];let i=1;for(;!e.isEmpty();)if(i=t?n(e.key,t):1,t&&r&&(i*=-1),i<0)e=this.isReverse?e.left:e.right;else{if(0===i){this.nodeStack.push(e);break}this.nodeStack.push(e),e=this.isReverse?e.right:e.left}}getNext(){let e=this.nodeStack.pop(),t={key:e.key,value:e.value};if(this.isReverse)for(e=e.left;!e.isEmpty();)this.nodeStack.push(e),e=e.right;else for(e=e.right;!e.isEmpty();)this.nodeStack.push(e),e=e.left;return t}hasNext(){return this.nodeStack.length>0}peek(){if(0===this.nodeStack.length)return null;let e=this.nodeStack[this.nodeStack.length-1];return{key:e.key,value:e.value}}}class rD{constructor(e,t,n,r,i){this.key=e,this.value=t,this.color=null!=n?n:rD.RED,this.left=null!=r?r:rD.EMPTY,this.right=null!=i?i:rD.EMPTY,this.size=this.left.size+1+this.right.size}copy(e,t,n,r,i){return new rD(null!=e?e:this.key,null!=t?t:this.value,null!=n?n:this.color,null!=r?r:this.left,null!=i?i:this.right)}isEmpty(){return!1}inorderTraversal(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)}reverseTraversal(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)}min(){return this.left.isEmpty()?this:this.left.min()}minKey(){return this.min().key}maxKey(){return this.right.isEmpty()?this.key:this.right.maxKey()}insert(e,t,n){let r=this,i=n(e,r.key);return(r=i<0?r.copy(null,null,null,r.left.insert(e,t,n),null):0===i?r.copy(null,t,null,null,null):r.copy(null,null,null,null,r.right.insert(e,t,n))).fixUp()}removeMin(){if(this.left.isEmpty())return rD.EMPTY;let e=this;return e.left.isRed()||e.left.left.isRed()||(e=e.moveRedLeft()),(e=e.copy(null,null,null,e.left.removeMin(),null)).fixUp()}remove(e,t){let n,r=this;if(0>t(e,r.key))r.left.isEmpty()||r.left.isRed()||r.left.left.isRed()||(r=r.moveRedLeft()),r=r.copy(null,null,null,r.left.remove(e,t),null);else{if(r.left.isRed()&&(r=r.rotateRight()),r.right.isEmpty()||r.right.isRed()||r.right.left.isRed()||(r=r.moveRedRight()),0===t(e,r.key)){if(r.right.isEmpty())return rD.EMPTY;n=r.right.min(),r=r.copy(n.key,n.value,null,null,r.right.removeMin())}r=r.copy(null,null,null,null,r.right.remove(e,t))}return r.fixUp()}isRed(){return this.color}fixUp(){let e=this;return e.right.isRed()&&!e.left.isRed()&&(e=e.rotateLeft()),e.left.isRed()&&e.left.left.isRed()&&(e=e.rotateRight()),e.left.isRed()&&e.right.isRed()&&(e=e.colorFlip()),e}moveRedLeft(){let e=this.colorFlip();return e.right.left.isRed()&&(e=(e=(e=e.copy(null,null,null,null,e.right.rotateRight())).rotateLeft()).colorFlip()),e}moveRedRight(){let e=this.colorFlip();return e.left.left.isRed()&&(e=(e=e.rotateRight()).colorFlip()),e}rotateLeft(){let e=this.copy(null,null,rD.RED,null,this.right.left);return this.right.copy(null,null,this.color,e,null)}rotateRight(){let e=this.copy(null,null,rD.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,e)}colorFlip(){let e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)}checkMaxDepth(){return Math.pow(2,this.check())<=this.size+1}check(){if(this.isRed()&&this.left.isRed()||this.right.isRed())throw n7();let e=this.left.check();if(e!==this.right.check())throw n7();return e+(this.isRed()?0:1)}}
26rD.EMPTY=null,rD.RED=!0,rD.BLACK=!1,rD.EMPTY=new class{constructor(){this.size=0}get key(){throw n7()}get value(){throw n7()}get color(){throw n7()}get left(){throw n7()}get right(){throw n7()}copy(e,t,n,r,i){return this}insert(e,t,n){return new rD(e,t)}remove(e,t){return this}isEmpty(){return!0}inorderTraversal(e){return!1}reverseTraversal(e){return!1}minKey(){return null}maxKey(){return null}isRed(){return!1}checkMaxDepth(){return!0}check(){return 0}};class rM{constructor(e){this.comparator=e,this.data=new rO(this.comparator)}has(e){return null!==this.data.get(e)}first(){return this.data.minKey()}last(){return this.data.maxKey()}get size(){return this.data.size}indexOf(e){return this.data.indexOf(e)}forEach(e){this.data.inorderTraversal((t,n)=>(e(t),!1))}forEachInRange(e,t){let n=this.data.getIteratorFrom(e[0]);for(;n.hasNext();){let r=n.getNext();if(this.comparator(r.key,e[1])>=0)return;t(r.key)}}forEachWhile(e,t){let n;for(n=void 0!==t?this.data.getIteratorFrom(t):this.data.getIterator();n.hasNext();)if(!e(n.getNext().key))return}firstAfterOrEqual(e){let t=this.data.getIteratorFrom(e);return t.hasNext()?t.getNext().key:null}getIterator(){return new rL(this.data.getIterator())}getIteratorFrom(e){return new rL(this.data.getIteratorFrom(e))}add(e){return this.copy(this.data.remove(e).insert(e,!0))}delete(e){return this.has(e)?this.copy(this.data.remove(e)):this}isEmpty(){return this.data.isEmpty()}unionWith(e){let t=this;return t.size<e.size&&(t=e,e=this),e.forEach(e=>{t=t.add(e)}),t}isEqual(e){if(!(e instanceof rM)||this.size!==e.size)return!1;let t=this.data.getIterator(),n=e.data.getIterator();for(;t.hasNext();){let e=t.getNext().key,r=n.getNext().key;if(0!==this.comparator(e,r))return!1}return!0}toArray(){let e=[];return this.forEach(t=>{e.push(t)}),e}toString(){let e=[];return this.forEach(t=>e.push(t)),"SortedSet("+e.toString()+")"}copy(e){let t=new rM(this.comparator);return t.data=e,t}}class rL{constructor(e){this.iter=e}getNext(){return this.iter.getNext().key}hasNext(){return this.iter.hasNext()}}class rP{constructor(e){this.fields=e,e.sort(rv.comparator)}static empty(){return new rP([])}unionWith(e){let t=new rM(rv.comparator);for(let e of this.fields)t=t.add(e);for(let n of e)t=t.add(n);return new rP(t.toArray())}covers(e){for(let t of this.fields)if(t.isPrefixOf(e))return!0;return!1}isEqual(e){return rd(this.fields,e.fields,(e,t)=>e.isEqual(t))}}class rj extends Error{constructor(){super(...arguments),this.name="Base64DecodeError"}}class rU{constructor(e){this.binaryString=e}static fromBase64String(e){return new rU(function(e){try{return atob(e)}catch(e){throw"undefined"!=typeof DOMException&&e instanceof DOMException?new rj("Invalid base64 string: "+e):e}}(e))}static fromUint8Array(e){return new rU(function(e){let t="";for(let n=0;n<e.length;++n)t+=String.fromCharCode(e[n]);return t}(e))}[Symbol.iterator](){let e=0;return{next:()=>e<this.binaryString.length?{value:this.binaryString.charCodeAt(e++),done:!1}:{value:void 0,done:!0}}}toBase64(){return btoa(this.binaryString)}toUint8Array(){return function(e){let t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}(this.binaryString)}approximateByteSize(){return 2*this.binaryString.length}compareTo(e){return rh(this.binaryString,e.binaryString)}isEqual(e){return this.binaryString===e.binaryString}}rU.EMPTY_BYTE_STRING=new rU("");let rF=new RegExp(/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.(\d+))?Z$/);function rB(e){if(e||n7(),"string"==typeof e){let t=0,n=rF.exec(e);if(n||n7(),n[1]){let e=n[1];t=Number(e=(e+"000000000").substr(0,9))}return{seconds:Math.floor(new Date(e).getTime()/1e3),nanos:t}}return{seconds:r$(e.seconds),nanos:r$(e.nanos)}}function r$(e){return"number"==typeof e?e:"string"==typeof e?Number(e):0}function rV(e){return"string"==typeof e?rU.fromBase64String(e):rU.fromUint8Array(e)}function rq(e){var t,n;return"server_timestamp"===(null===(n=((null===(t=null==e?void 0:e.mapValue)||void 0===t?void 0:t.fields)||{}).__type__)||void 0===n?void 0:n.stringValue)}function rz(e){let t=e.mapValue.fields.__previous_value__;return rq(t)?rz(t):t}function rH(e){let t=rB(e.mapValue.fields.__local_write_time__.timestampValue);return new rf(t.seconds,t.nanos)}class rW{constructor(e,t,n,r,i,s,o,a,l){this.databaseId=e,this.appId=t,this.persistenceKey=n,this.host=r,this.ssl=i,this.forceLongPolling=s,this.autoDetectLongPolling=o,this.longPollingOptions=a,this.useFetchStreams=l}}class rG{constructor(e,t){this.projectId=e,this.database=t||"(default)"}static empty(){return new rG("","")}get isDefaultDatabase(){return"(default)"===this.database}isEqual(e){return e instanceof rG&&e.projectId===this.projectId&&e.database===this.database}}let rK={mapValue:{fields:{__type__:{stringValue:"__max__"}}}};function rX(e){return"nullValue"in e?0:"booleanValue"in e?1:"integerValue"in e||"doubleValue"in e?2:"timestampValue"in e?3:"stringValue"in e?5:"bytesValue"in e?6:"referenceValue"in e?7:"geoPointValue"in e?8:"arrayValue"in e?9:"mapValue"in e?rq(e)?4:r7(e)?9007199254740991:10:n7()}function rJ(e,t){if(e===t)return!0;let n=rX(e);if(n!==rX(t))return!1;switch(n){case 0:case 9007199254740991:return!0;case 1:return e.booleanValue===t.booleanValue;case 4:return rH(e).isEqual(rH(t));case 3:return function(e,t){if("string"==typeof e.timestampValue&&"string"==typeof t.timestampValue&&e.timestampValue.length===t.timestampValue.length)return e.timestampValue===t.timestampValue;let n=rB(e.timestampValue),r=rB(t.timestampValue);return n.seconds===r.seconds&&n.nanos===r.nanos}(e,t);case 5:return e.stringValue===t.stringValue;case 6:return rV(e.bytesValue).isEqual(rV(t.bytesValue));case 7:return e.referenceValue===t.referenceValue;case 8:return r$(e.geoPointValue.latitude)===r$(t.geoPointValue.latitude)&&r$(e.geoPointValue.longitude)===r$(t.geoPointValue.longitude);case 2:return function(e,t){if("integerValue"in e&&"integerValue"in t)return r$(e.integerValue)===r$(t.integerValue);if("doubleValue"in e&&"doubleValue"in t){let n=r$(e.doubleValue),r=r$(t.doubleValue);return n===r?rC(n)===rC(r):isNaN(n)&&isNaN(r)}return!1}(e,t);case 9:return rd(e.arrayValue.values||[],t.arrayValue.values||[],rJ);case 10:return function(e,t){let n=e.mapValue.fields||{},r=t.mapValue.fields||{};if(rx(n)!==rx(r))return!1;for(let e in n)if(n.hasOwnProperty(e)&&(void 0===r[e]||!rJ(n[e],r[e])))return!1;return!0}(e,t);default:return n7()}}function rZ(e,t){return void 0!==(e.values||[]).find(e=>rJ(e,t))}function rY(e,t){if(e===t)return 0;let n=rX(e),r=rX(t);if(n!==r)return rh(n,r);switch(n){case 0:case 9007199254740991:return 0;case 1:return rh(e.booleanValue,t.booleanValue);case 2:return function(e,t){let n=r$(e.integerValue||e.doubleValue),r=r$(t.integerValue||t.doubleValue);return n<r?-1:n>r?1:n===r?0:isNaN(n)?isNaN(r)?0:-1:1}(e,t);case 3:return rQ(e.timestampValue,t.timestampValue);case 4:return rQ(rH(e),rH(t));case 5:return rh(e.stringValue,t.stringValue);case 6:return function(e,t){let n=rV(e),r=rV(t);return n.compareTo(r)}(e.bytesValue,t.bytesValue);case 7:return function(e,t){let n=e.split("/"),r=t.split("/");for(let e=0;e<n.length&&e<r.length;e++){let t=rh(n[e],r[e]);if(0!==t)return t}return rh(n.length,r.length)}(e.referenceValue,t.referenceValue);case 8:return function(e,t){let n=rh(r$(e.latitude),r$(t.latitude));return 0!==n?n:rh(r$(e.longitude),r$(t.longitude))}(e.geoPointValue,t.geoPointValue);case 9:return function(e,t){let n=e.values||[],r=t.values||[];for(let e=0;e<n.length&&e<r.length;++e){let t=rY(n[e],r[e]);if(t)return t}return rh(n.length,r.length)}(e.arrayValue,t.arrayValue);case 10:return function(e,t){if(e===rK.mapValue&&t===rK.mapValue)return 0;if(e===rK.mapValue)return 1;if(t===rK.mapValue)return -1;let n=e.fields||{},r=Object.keys(n),i=t.fields||{},s=Object.keys(i);r.sort(),s.sort();for(let e=0;e<r.length&&e<s.length;++e){let t=rh(r[e],s[e]);if(0!==t)return t;let o=rY(n[r[e]],i[s[e]]);if(0!==o)return o}return rh(r.length,s.length)}(e.mapValue,t.mapValue);default:throw n7()}}function rQ(e,t){if("string"==typeof e&&"string"==typeof t&&e.length===t.length)return rh(e,t);let n=rB(e),r=rB(t),i=rh(n.seconds,r.seconds);return 0!==i?i:rh(n.nanos,r.nanos)}function r0(e){var t,n;return"nullValue"in e?"null":"booleanValue"in e?""+e.booleanValue:"integerValue"in e?""+e.integerValue:"doubleValue"in e?""+e.doubleValue:"timestampValue"in e?function(e){let t=rB(e);return`time(${t.seconds},${t.nanos})`}(e.timestampValue):"stringValue"in e?e.stringValue:"bytesValue"in e?rV(e.bytesValue).toBase64():"referenceValue"in e?(n=e.referenceValue,r_.fromName(n).toString()):"geoPointValue"in e?`geo(${(t=e.geoPointValue).latitude},${t.longitude})`:"arrayValue"in e?function(e){let t="[",n=!0;for(let r of e.values||[])n?n=!1:t+=",",t+=r0(r);return t+"]"}(e.arrayValue):"mapValue"in e?function(e){let t=Object.keys(e.fields||{}).sort(),n="{",r=!0;for(let i of t)r?r=!1:n+=",",n+=`${i}:${r0(e.fields[i])}`;return n+"}"}(e.mapValue):n7()}function r1(e,t){return{referenceValue:`projects/${e.projectId}/databases/${e.database}/documents/${t.path.canonicalString()}`}}function r2(e){return!!e&&"integerValue"in e}function r4(e){return!!e&&"arrayValue"in e}function r9(e){return!!e&&"nullValue"in e}function r6(e){return!!e&&"doubleValue"in e&&isNaN(Number(e.doubleValue))}function r3(e){return!!e&&"mapValue"in e}function r5(e){if(e.geoPointValue)return{geoPointValue:Object.assign({},e.geoPointValue)};if(e.timestampValue&&"object"==typeof e.timestampValue)return{timestampValue:Object.assign({},e.timestampValue)};if(e.mapValue){let t={mapValue:{fields:{}}};return rR(e.mapValue.fields,(e,n)=>t.mapValue.fields[e]=r5(n)),t}if(e.arrayValue){let t={arrayValue:{values:[]}};for(let n=0;n<(e.arrayValue.values||[]).length;++n)t.arrayValue.values[n]=r5(e.arrayValue.values[n]);return t}return Object.assign({},e)}function r7(e){return"__max__"===(((e.mapValue||{}).fields||{}).__type__||{}).stringValue}class r8{constructor(e){this.value=e}static empty(){return new r8({mapValue:{}})}field(e){if(e.isEmpty())return this.value;{let t=this.value;for(let n=0;n<e.length-1;++n)if(!r3(t=(t.mapValue.fields||{})[e.get(n)]))return null;return(t=(t.mapValue.fields||{})[e.lastSegment()])||null}}set(e,t){this.getFieldsMap(e.popLast())[e.lastSegment()]=r5(t)}setAll(e){let t=rv.emptyPath(),n={},r=[];e.forEach((e,i)=>{if(!t.isImmediateParentOf(i)){let e=this.getFieldsMap(t);this.applyChanges(e,n,r),n={},r=[],t=i.popLast()}e?n[i.lastSegment()]=r5(e):r.push(i.lastSegment())});let i=this.getFieldsMap(t);this.applyChanges(i,n,r)}delete(e){let t=this.field(e.popLast());r3(t)&&t.mapValue.fields&&delete t.mapValue.fields[e.lastSegment()]}isEqual(e){return rJ(this.value,e.value)}getFieldsMap(e){let t=this.value;t.mapValue.fields||(t.mapValue={fields:{}});for(let n=0;n<e.length;++n){let r=t.mapValue.fields[e.get(n)];r3(r)&&r.mapValue.fields||(r={mapValue:{fields:{}}},t.mapValue.fields[e.get(n)]=r),t=r}return t.mapValue.fields}
26applyChanges(e,t,n){for(let r of(rR(t,(t,n)=>e[t]=n),n))delete e[r]}clone(){return new r8(r5(this.value))}}class ie{constructor(e,t,n,r,i,s,o){this.key=e,this.documentType=t,this.version=n,this.readTime=r,this.createTime=i,this.data=s,this.documentState=o}static newInvalidDocument(e){return new ie(e,0,rp.min(),rp.min(),rp.min(),r8.empty(),0)}static newFoundDocument(e,t,n,r){return new ie(e,1,t,rp.min(),n,r,0)}static newNoDocument(e,t){return new ie(e,2,t,rp.min(),rp.min(),r8.empty(),0)}static newUnknownDocument(e,t){return new ie(e,3,t,rp.min(),rp.min(),r8.empty(),2)}convertToFoundDocument(e,t){return this.createTime.isEqual(rp.min())&&(2===this.documentType||0===this.documentType)&&(this.createTime=e),this.version=e,this.documentType=1,this.data=t,this.documentState=0,this}convertToNoDocument(e){return this.version=e,this.documentType=2,this.data=r8.empty(),this.documentState=0,this}convertToUnknownDocument(e){return this.version=e,this.documentType=3,this.data=r8.empty(),this.documentState=2,this}setHasCommittedMutations(){return this.documentState=2,this}setHasLocalMutations(){return this.documentState=1,this.version=rp.min(),this}setReadTime(e){return this.readTime=e,this}get hasLocalMutations(){return 1===this.documentState}get hasCommittedMutations(){return 2===this.documentState}get hasPendingWrites(){return this.hasLocalMutations||this.hasCommittedMutations}isValidDocument(){return 0!==this.documentType}isFoundDocument(){return 1===this.documentType}isNoDocument(){return 2===this.documentType}isUnknownDocument(){return 3===this.documentType}isEqual(e){return e instanceof ie&&this.key.isEqual(e.key)&&this.version.isEqual(e.version)&&this.documentType===e.documentType&&this.documentState===e.documentState&&this.data.isEqual(e.data)}mutableCopy(){return new ie(this.key,this.documentType,this.version,this.readTime,this.createTime,this.data.clone(),this.documentState)}toString(){return`Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`}}class it{constructor(e,t){this.position=e,this.inclusive=t}}function ir(e,t,n){let r=0;for(let i=0;i<e.position.length;i++){let s=t[i],o=e.position[i];if(r=s.field.isKeyField()?r_.comparator(r_.fromName(o.referenceValue),n.key):rY(o,n.data.field(s.field)),"desc"===s.dir&&(r*=-1),0!==r)break}return r}function ii(e,t){if(null===e)return null===t;if(null===t||e.inclusive!==t.inclusive||e.position.length!==t.position.length)return!1;for(let n=0;n<e.position.length;n++)if(!rJ(e.position[n],t.position[n]))return!1;return!0}class is{constructor(e,t="asc"){this.field=e,this.dir=t}}class io{}class ia extends io{constructor(e,t,n){super(),this.field=e,this.op=t,this.value=n}static create(e,t,n){return e.isKeyField()?"in"===t||"not-in"===t?this.createKeyFieldInFilter(e,t,n):new ih(e,t,n):"array-contains"===t?new ig(e,n):"in"===t?new iy(e,n):"not-in"===t?new iv(e,n):"array-contains-any"===t?new i_(e,n):new ia(e,t,n)}static createKeyFieldInFilter(e,t,n){return"in"===t?new id(e,n):new ip(e,n)}matches(e){let t=e.data.field(this.field);return"!="===this.op?null!==t&&this.matchesComparison(rY(t,this.value)):null!==t&&rX(this.value)===rX(t)&&this.matchesComparison(rY(t,this.value))}matchesComparison(e){switch(this.op){case"<":return e<0;case"<=":return e<=0;case"==":return 0===e;case"!=":return 0!==e;case">":return e>0;case">=":return e>=0;default:return n7()}}isInequality(){return["<","<=",">",">=","!=","not-in"].indexOf(this.op)>=0}getFlattenedFilters(){return[this]}getFilters(){return[this]}getFirstInequalityField(){return this.isInequality()?this.field:null}}class il extends io{constructor(e,t){super(),this.filters=e,this.op=t,this.lt=null}static create(e,t){return new il(e,t)}matches(e){return iu(this)?void 0===this.filters.find(t=>!t.matches(e)):void 0!==this.filters.find(t=>t.matches(e))}getFlattenedFilters(){return null!==this.lt||(this.lt=this.filters.reduce((e,t)=>e.concat(t.getFlattenedFilters()),[])),this.lt}getFilters(){return Object.assign([],this.filters)}getFirstInequalityField(){let e=this.ft(e=>e.isInequality());return null!==e?e.field:null}ft(e){for(let t of this.getFlattenedFilters())if(e(t))return t;return null}}function iu(e){return"and"===e.op}function ic(e){for(let t of e.filters)if(t instanceof il)return!1;return!0}class ih extends ia{constructor(e,t,n){super(e,t,n),this.key=r_.fromName(n.referenceValue)}matches(e){let t=r_.comparator(e.key,this.key);return this.matchesComparison(t)}}
26class id extends ia{constructor(e,t){super(e,"in",t),this.keys=im("in",t)}matches(e){return this.keys.some(t=>t.isEqual(e.key))}}class ip extends ia{constructor(e,t){super(e,"not-in",t),this.keys=im("not-in",t)}matches(e){return!this.keys.some(t=>t.isEqual(e.key))}}function im(e,t){var n;return((null===(n=t.arrayValue)||void 0===n?void 0:n.values)||[]).map(e=>r_.fromName(e.referenceValue))}class ig extends ia{constructor(e,t){super(e,"array-contains",t)}matches(e){let t=e.data.field(this.field);return r4(t)&&rZ(t.arrayValue,this.value)}}class iy extends ia{constructor(e,t){super(e,"in",t)}matches(e){let t=e.data.field(this.field);return null!==t&&rZ(this.value.arrayValue,t)}}class iv extends ia{constructor(e,t){super(e,"not-in",t)}matches(e){if(rZ(this.value.arrayValue,{nullValue:"NULL_VALUE"}))return!1;let t=e.data.field(this.field);return null!==t&&!rZ(this.value.arrayValue,t)}}class i_ extends ia{constructor(e,t){super(e,"array-contains-any",t)}matches(e){let t=e.data.field(this.field);return!(!r4(t)||!t.arrayValue.values)&&t.arrayValue.values.some(e=>rZ(this.value.arrayValue,e))}}class ib{constructor(e,t=null,n=[],r=[],i=null,s=null,o=null){this.path=e,this.collectionGroup=t,this.orderBy=n,this.filters=r,this.limit=i,this.startAt=s,this.endAt=o,this.dt=null}}function iw(e,t=null,n=[],r=[],i=null,s=null,o=null){return new ib(e,t,n,r,i,s,o)}function iE(e){if(null===e.dt){let t=e.path.canonicalString();null!==e.collectionGroup&&(t+="|cg:"+e.collectionGroup),t+="|f:"+e.filters.map(e=>(function e(t){if(t instanceof ia)return t.field.canonicalString()+t.op.toString()+r0(t.value);if(ic(t)&&iu(t))return t.filters.map(t=>e(t)).join(",");{let n=t.filters.map(t=>e(t)).join(",");return`${t.op}(${n})`}})(e)).join(",")+"|ob:"+e.orderBy.map(e=>e.field.canonicalString()+e.dir).join(","),null==e.limit||(t+="|l:"+e.limit),e.startAt&&(t+="|lb:"+(e.startAt.inclusive?"b:":"a:")+e.startAt.position.map(e=>r0(e)).join(",")),e.endAt&&(t+="|ub:"+(e.endAt.inclusive?"a:":"b:")+e.endAt.position.map(e=>r0(e)).join(",")),e.dt=t}return e.dt}function iS(e,t){if(e.limit!==t.limit||e.orderBy.length!==t.orderBy.length)return!1;for(let i=0;i<e.orderBy.length;i++){var n,r;if(n=e.orderBy[i],r=t.orderBy[i],!(n.dir===r.dir&&n.field.isEqual(r.field)))return!1}if(e.filters.length!==t.filters.length)return!1;for(let n=0;n<e.filters.length;n++)if(!function e(t,n){return t instanceof ia?n instanceof ia&&t.op===n.op&&t.field.isEqual(n.field)&&rJ(t.value,n.value):t instanceof il?n instanceof il&&t.op===n.op&&t.filters.length===n.filters.length&&t.filters.reduce((t,r,i)=>t&&e(r,n.filters[i]),!0):void n7()}(e.filters[n],t.filters[n]))return!1;return e.collectionGroup===t.collectionGroup&&!!e.path.isEqual(t.path)&&!!ii(e.startAt,t.startAt)&&ii(e.endAt,t.endAt)}function iT(e){return r_.isDocumentKey(e.path)&&null===e.collectionGroup&&0===e.filters.length}class iI{constructor(e,t=null,n=[],r=[],i=null,s="F",o=null,a=null){this.path=e,this.collectionGroup=t,this.explicitOrderBy=n,this.filters=r,this.limit=i,this.limitType=s,this.startAt=o,this.endAt=a,this.wt=null,this._t=null,this.startAt,this.endAt}}function ik(e){return new iI(e)}function iC(e){return 0===e.filters.length&&null===e.limit&&null==e.startAt&&null==e.endAt&&(0===e.explicitOrderBy.length||1===e.explicitOrderBy.length&&e.explicitOrderBy[0].field.isKeyField())}function ix(e){return e.explicitOrderBy.length>0?e.explicitOrderBy[0].field:null}function iR(e){for(let t of e.filters){let e=t.getFirstInequalityField();if(null!==e)return e}return null}function iA(e){return null!==e.collectionGroup}function iO(e){if(null===e.wt){e.wt=[];let t=iR(e),n=ix(e);if(null!==t&&null===n)t.isKeyField()||e.wt.push(new is(t)),e.wt.push(new is(rv.keyField(),"asc"));else{let t=!1;for(let n of e.explicitOrderBy)e.wt.push(n),n.field.isKeyField()&&(t=!0);if(!t){let t=e.explicitOrderBy.length>0?e.explicitOrderBy[e.explicitOrderBy.length-1].dir:"asc";e.wt.push(new is(rv.keyField(),t))}}}return e.wt}function iN(e){if(!e._t){if("F"===e.limitType)e._t=iw(e.path,e.collectionGroup,iO(e),e.filters,e.limit,e.startAt,e.endAt);else{let t=[];for(let n of iO(e)){let e="desc"===n.dir?"asc":"desc";t.push(new is(n.field,e))}let n=e.endAt?new it(e.endAt.position,e.endAt.inclusive):null,r=e.startAt?new it(e.startAt.position,e.startAt.inclusive):null;e._t=iw(e.path,e.collectionGroup,t,e.filters,e.limit,n,r)}}return e._t}function iD(e,t){t.getFirstInequalityField(),iR(e);let n=e.filters.concat([t]);return new iI(e.path,e.collectionGroup,e.explicitOrderBy.slice(),n,e.limit,e.limitType,e.startAt,e.endAt)}function iM(e,t,n){return new iI(e.path,e.collectionGroup,e.explicitOrderBy.slice(),e.filters.slice(),t,n,e.startAt,e.endAt)}function iL(e,t){return iS(iN(e),iN(t))&&e.limitType===t.limitType}function iP(e){return`${iE(iN(e))}|lt:${e.limitType}`}function ij(e){var t;let n;return`Query(target=${n=(t=iN(e)).path.canonicalString(),null!==t.collectionGroup&&(n+=" collectionGroup="+t.collectionGroup),t.filters.length>0&&(n+=`, filters: [${t.filters.map(e=>(function e(t){return t instanceof ia?`${t.field.canonicalString()} ${t.op} ${r0(t.value)}`:t instanceof il?t.op.toString()+" {"+t.getFilters().map(e).join(" ,")+"}":"Filter"})(e)).join(", ")}]`),null==t.limit||(n+=", limit: "+t.limit),t.orderBy.length>0&&(n+=`, orderBy: [${t.orderBy.map(e=>`${e.field.canonicalString()} (${e.dir})`).join(", ")}]`),t.startAt&&(n+=", startAt: "+(t.startAt.inclusive?"b:":"a:")+t.startAt.position.map(e=>r0(e)).join(",")),t.endAt&&(n+=", endAt: "+(t.endAt.inclusive?"a:":"b:")+t.endAt.position.map(e=>r0(e)).join(",")),`Target(${n})`}; limitType=${e.limitType})`}function iU(e,t){return t.isFoundDocument()&&function(e,t){let n=t.key.path;return null!==e.collectionGroup?t.key.hasCollectionId(e.collectionGroup)&&e.path.isPrefixOf(n):r_.isDocumentKey(e.path)?e.path.isEqual(n):e.path.isImmediateParentOf(n)}(e,t)&&function(e,t){for(let n of iO(e))if(!n.field.isKeyField()&&null===t.data.field(n.field))return!1;return!0}(e,t)&&function(e,t){for(let n of e.filters)if(!n.matches(t))return!1;return!0}(e,t)&&(!e.startAt||!!function(e,t,n){let r=ir(e,t,n);return e.inclusive?r<=0:r<0}(e.startAt,iO(e),t))&&(!e.endAt||!!function(e,t,n){let r=ir(e,t,n);return e.inclusive?r>=0:r>0}(e.endAt,iO(e),t))}function iF(e){return(t,n)=>{let r=!1;for(let i of iO(e)){let e=function(e,t,n){let r=e.field.isKeyField()?r_.comparator(t.key,n.key):function(e,t,n){let r=t.data.field(e),i=n.data.field(e);return null!==r&&null!==i?rY(r,i):n7()}(e.field,t,n);switch(e.dir){case"asc":return r;case"desc":return -1*r;default:return n7()}}(i,t,n);if(0!==e)return e;r=r||i.field.isKeyField()}return 0}}class iB{constructor(e,t){this.mapKeyFn=e,this.equalsFn=t,this.inner={},this.innerSize=0}get(e){let t=this.mapKeyFn(e),n=this.inner[t];if(void 0!==n){for(let[t,r]of n)if(this.equalsFn(t,e))return r}}has(e){return void 0!==this.get(e)}set(e,t){let n=this.mapKeyFn(e),r=this.inner[n];if(void 0===r)return this.inner[n]=[[e,t]],void this.innerSize++;for(let n=0;n<r.length;n++)if(this.equalsFn(r[n][0],e))return void(r[n]=[e,t]);
26r.push([e,t]),this.innerSize++}delete(e){let t=this.mapKeyFn(e),n=this.inner[t];if(void 0===n)return!1;for(let r=0;r<n.length;r++)if(this.equalsFn(n[r][0],e))return 1===n.length?delete this.inner[t]:n.splice(r,1),this.innerSize--,!0;return!1}forEach(e){rR(this.inner,(t,n)=>{for(let[t,r]of n)e(t,r)})}isEmpty(){return rA(this.inner)}size(){return this.innerSize}}let i$=new rO(r_.comparator),iV=new rO(r_.comparator);function iq(...e){let t=iV;for(let n of e)t=t.insert(n.key,n);return t}function iz(){return new iB(e=>e.toString(),(e,t)=>e.isEqual(t))}new rO(r_.comparator);let iH=new rM(r_.comparator);function iW(...e){let t=iH;for(let n of e)t=t.add(n);return t}let iG=new rM(rh);function iK(e,t){if(e.useProto3Json){if(isNaN(t))return{doubleValue:"NaN"};if(t===1/0)return{doubleValue:"Infinity"};if(t===-1/0)return{doubleValue:"-Infinity"}}return{doubleValue:rC(t)?"-0":t}}function iX(e){return{integerValue:""+e}}class iJ{constructor(){this._=void 0}}class iZ extends iJ{}class iY extends iJ{constructor(e){super(),this.elements=e}}function iQ(e,t){let n=i9(t);for(let t of e.elements)n.some(e=>rJ(e,t))||n.push(t);return{arrayValue:{values:n}}}class i0 extends iJ{constructor(e){super(),this.elements=e}}function i1(e,t){let n=i9(t);for(let t of e.elements)n=n.filter(e=>!rJ(e,t));return{arrayValue:{values:n}}}class i2 extends iJ{constructor(e,t){super(),this.serializer=e,this.gt=t}}function i4(e){return r$(e.integerValue||e.doubleValue)}function i9(e){return r4(e)&&e.arrayValue.values?e.arrayValue.values.slice():[]}class i6{constructor(e,t){this.updateTime=e,this.exists=t}static none(){return new i6}static exists(e){return new i6(void 0,e)}static updateTime(e){return new i6(e)}get isNone(){return void 0===this.updateTime&&void 0===this.exists}isEqual(e){return this.exists===e.exists&&(this.updateTime?!!e.updateTime&&this.updateTime.isEqual(e.updateTime):!e.updateTime)}}function i3(e,t){return void 0!==e.updateTime?t.isFoundDocument()&&t.version.isEqual(e.updateTime):void 0===e.exists||e.exists===t.isFoundDocument()}class i5{}function i7(e,t){if(!e.hasLocalMutations||t&&0===t.fields.length)return null;if(null===t)return e.isNoDocument()?new so(e.key,i6.none()):new st(e.key,e.data,i6.none());{let n=e.data,r=r8.empty(),i=new rM(rv.comparator);for(let e of t.fields)if(!i.has(e)){let t=n.field(e);null===t&&e.length>1&&(e=e.popLast(),t=n.field(e)),null===t?r.delete(e):r.set(e,t),i=i.add(e)}return new sn(e.key,r,new rP(i.toArray()),i6.none())}}function i8(e,t,n,r){return e instanceof st?function(e,t,n,r){if(!i3(e.precondition,t))return n;let i=e.value.clone(),s=ss(e.fieldTransforms,r,t);return i.setAll(s),t.convertToFoundDocument(t.version,i).setHasLocalMutations(),null}(e,t,n,r):e instanceof sn?function(e,t,n,r){if(!i3(e.precondition,t))return n;let i=ss(e.fieldTransforms,r,t),s=t.data;return(s.setAll(sr(e)),s.setAll(i),t.convertToFoundDocument(t.version,s).setHasLocalMutations(),null===n)?null:n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map(e=>e.field))}(e,t,n,r):i3(e.precondition,t)?(t.convertToNoDocument(t.version).setHasLocalMutations(),null):n}function se(e,t){var n,r;return e.type===t.type&&!!e.key.isEqual(t.key)&&!!e.precondition.isEqual(t.precondition)&&(n=e.fieldTransforms,r=t.fieldTransforms,!!(void 0===n&&void 0===r||!(!n||!r)&&rd(n,r,(e,t)=>{var n,r;return e.field.isEqual(t.field)&&(n=e.transform,r=t.transform,n instanceof iY&&r instanceof iY||n instanceof i0&&r instanceof i0?rd(n.elements,r.elements,rJ):n instanceof i2&&r instanceof i2?rJ(n.gt,r.gt):n instanceof iZ&&r instanceof iZ)})))&&(0===e.type?e.value.isEqual(t.value):1!==e.type||e.data.isEqual(t.data)&&e.fieldMask.isEqual(t.fieldMask))}class st extends i5{constructor(e,t,n,r=[]){super(),this.key=e,this.value=t,this.precondition=n,this.fieldTransforms=r,this.type=0}getFieldMask(){return null}}class sn extends i5{constructor(e,t,n,r,i=[]){super(),this.key=e,this.data=t,this.fieldMask=n,this.precondition=r,this.fieldTransforms=i,this.type=1}getFieldMask(){return this.fieldMask}}function sr(e){let t=new Map;return e.fieldMask.fields.forEach(n=>{if(!n.isEmpty()){let r=e.data.field(n);t.set(n,r)}}),t}function si(e,t,n){var r;let i=new Map;e.length===n.length||n7();for(let s=0;s<n.length;s++){let o=e[s],a=o.transform,l=t.data.field(o.field);i.set(o.field,(r=n[s],a instanceof iY?iQ(a,l):a instanceof i0?i1(a,l):r))}return i}function ss(e,t,n){let r=new Map;for(let i of e){let e=i.transform,s=n.data.field(i.field);r.set(i.field,e instanceof iZ?function(e,t){let n={fields:{__type__:{stringValue:"server_timestamp"},__local_write_time__:{timestampValue:{seconds:e.seconds,nanos:e.nanoseconds}}}};return t&&rq(t)&&(t=rz(t)),t&&(n.fields.__previous_value__=t),{mapValue:n}}(t,s):e instanceof iY?iQ(e,s):e instanceof i0?i1(e,s):function(e,t){var n,r;let i=(n=e,r=t,n instanceof i2?r2(r)||r&&"doubleValue"in r?r:{integerValue:0}:null),s=i4(i)+i4(e.gt);return r2(i)&&r2(e.gt)?iX(s):iK(e.serializer,s)}(e,s))}return r}class so extends i5{constructor(e,t){super(),this.key=e,this.prec
26ondition=t,this.type=2,this.fieldTransforms=[]}getFieldMask(){return null}}class sa{constructor(e,t,n,r){this.batchId=e,this.localWriteTime=t,this.baseMutations=n,this.mutations=r}applyToRemoteDocument(e,t){let n=t.mutationResults;for(let t=0;t<this.mutations.length;t++){let i=this.mutations[t];if(i.key.isEqual(e.key)){var r;r=n[t],i instanceof st?function(e,t,n){let r=e.value.clone(),i=si(e.fieldTransforms,t,n.transformResults);r.setAll(i),t.convertToFoundDocument(n.version,r).setHasCommittedMutations()}(i,e,r):i instanceof sn?function(e,t,n){if(!i3(e.precondition,t))return void t.convertToUnknownDocument(n.version);let r=si(e.fieldTransforms,t,n.transformResults),i=t.data;i.setAll(sr(e)),i.setAll(r),t.convertToFoundDocument(n.version,i).setHasCommittedMutations()}(i,e,r):function(e,t,n){t.convertToNoDocument(n.version).setHasCommittedMutations()}(0,e,r)}}}applyToLocalView(e,t){for(let n of this.baseMutations)n.key.isEqual(e.key)&&(t=i8(n,e,t,this.localWriteTime));for(let n of this.mutations)n.key.isEqual(e.key)&&(t=i8(n,e,t,this.localWriteTime));return t}applyToLocalDocumentSet(e,t){let n=iz();return this.mutations.forEach(r=>{let i=e.get(r.key),s=i.overlayedDocument,o=this.applyToLocalView(s,i.mutatedFields),a=i7(s,o=t.has(r.key)?null:o);null!==a&&n.set(r.key,a),s.isValidDocument()||s.convertToNoDocument(rp.min())}),n}keys(){return this.mutations.reduce((e,t)=>e.add(t.key),iW())}isEqual(e){return this.batchId===e.batchId&&rd(this.mutations,e.mutations,(e,t)=>se(e,t))&&rd(this.baseMutations,e.baseMutations,(e,t)=>se(e,t))}}class sl{constructor(e,t){this.largestBatchId=e,this.mutation=t}getKey(){return this.mutation.key}isEqual(e){return null!==e&&this.mutation===e.mutation}toString(){return`Overlay{
27      largestBatchId: ${this.largestBatchId},
28      mutation: ${this.mutation.toString()}
29    }`}}class su{constructor(e,t){this.count=e,this.unchangedNames=t}}function sc(e){if(void 0===e)return n6("GRPC error has no .code"),n8.UNKNOWN;switch(e){case a.OK:return n8.OK;case a.CANCELLED:return n8.CANCELLED;case a.UNKNOWN:return n8.UNKNOWN;case a.DEADLINE_EXCEEDED:return n8.DEADLINE_EXCEEDED;case a.RESOURCE_EXHAUSTED:return n8.RESOURCE_EXHAUSTED;case a.INTERNAL:return n8.INTERNAL;case a.UNAVAILABLE:return n8.UNAVAILABLE;case a.UNAUTHENTICATED:return n8.UNAUTHENTICATED;case a.INVALID_ARGUMENT:return n8.INVALID_ARGUMENT;case a.NOT_FOUND:return n8.NOT_FOUND;case a.ALREADY_EXISTS:return n8.ALREADY_EXISTS;case a.PERMISSION_DENIED:return n8.PERMISSION_DENIED;case a.FAILED_PRECONDITION:return n8.FAILED_PRECONDITION;case a.ABORTED:return n8.ABORTED;case a.OUT_OF_RANGE:return n8.OUT_OF_RANGE;case a.UNIMPLEMENTED:return n8.UNIMPLEMENTED;case a.DATA_LOSS:return n8.DATA_LOSS;default:return n7()}}(l=a||(a={}))[l.OK=0]="OK",l[l.CANCELLED=1]="CANCELLED",l[l.UNKNOWN=2]="UNKNOWN",l[l.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",l[l.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",l[l.NOT_FOUND=5]="NOT_FOUND",l[l.ALREADY_EXISTS=6]="ALREADY_EXISTS",l[l.PERMISSION_DENIED=7]="PERMISSION_DENIED",l[l.UNAUTHENTICATED=16]="UNAUTHENTICATED",l[l.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",l[l.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",l[l.ABORTED=10]="ABORTED",l[l.OUT_OF_RANGE=11]="OUT_OF_RANGE",l[l.UNIMPLEMENTED=12]="UNIMPLEMENTED",l[l.INTERNAL=13]="INTERNAL",l[l.UNAVAILABLE=14]="UNAVAILABLE",l[l.DATA_LOSS=15]="DATA_LOSS";class sh{constructor(){this.onExistenceFilterMismatchCallbacks=new Map}static get instance(){return sd}static getOrCreateInstance(){return null===sd&&(sd=new sh),sd}onExistenceFilterMismatch(e){let t=Symbol();return this.onExistenceFilterMismatchCallbacks.set(t,e),()=>this.onExistenceFilterMismatchCallbacks.delete(t)}notifyOnExistenceFilterMismatch(e){this.onExistenceFilterMismatchCallbacks.forEach(t=>t(e))}}let sd=null,sf=new nY([4294967295,4294967295],0);function sp(e){let t=(new TextEncoder).encode(e),n=new nZ;return n.update(t),new Uint8Array(n.digest())}function sm(e){let t=new DataView(e.buffer),n=t.getUint32(0,!0),r=t.getUint32(4,!0),i=t.getUint32(8,!0),s=t.getUint32(12,!0);return[new nY([n,r],0),new nY([i,s],0)]}class sg{constructor(e,t,n){if(this.bitmap=e,this.padding=t,this.hashCount=n,t<0||t>=8)throw new sy(`Invalid padding: ${t}`);if(n<0||e.length>0&&0===this.hashCount)throw new sy(`Invalid hash count: ${n}`);if(0===e.length&&0!==t)throw new sy(`Invalid padding when bitmap length is 0: ${t}`);this.It=8*e.length-t,this.Tt=nY.fromNumber(this.It)}Et(e,t,n){let r=e.add(t.multiply(nY.fromNumber(n)));return 1===r.compare(sf)&&(r=new nY([r.getBits(0),r.getBits(1)],0)),r.modulo(this.Tt).toNumber()}At(e){return 0!=(this.bitmap[Math.floor(e/8)]&1<<e%8)}vt(e){if(0===this.It)return!1;let[t,n]=sm(sp(e));for(let e=0;e<this.hashCount;e++){let r=this.Et(t,n,e);if(!this.At(r))return!1}return!0}
29static create(e,t,n){let r=new sg(new Uint8Array(Math.ceil(e/8)),e%8==0?0:8-e%8,t);return n.forEach(e=>r.insert(e)),r}insert(e){if(0===this.It)return;let[t,n]=sm(sp(e));for(let e=0;e<this.hashCount;e++){let r=this.Et(t,n,e);this.Rt(r)}}Rt(e){this.bitmap[Math.floor(e/8)]|=1<<e%8}}class sy extends Error{constructor(){super(...arguments),this.name="BloomFilterError"}}class sv{constructor(e,t,n,r,i){this.snapshotVersion=e,this.targetChanges=t,this.targetMismatches=n,this.documentUpdates=r,this.resolvedLimboDocuments=i}static createSynthesizedRemoteEventForCurrentChange(e,t,n){let r=new Map;return r.set(e,s_.createSynthesizedTargetChangeForCurrentChange(e,t,n)),new sv(rp.min(),r,new rO(rh),i$,iW())}}class s_{constructor(e,t,n,r,i){this.resumeToken=e,this.current=t,this.addedDocuments=n,this.modifiedDocuments=r,this.removedDocuments=i}static createSynthesizedTargetChangeForCurrentChange(e,t,n){return new s_(n,t,iW(),iW(),iW())}}class sb{constructor(e,t,n,r){this.Pt=e,this.removedTargetIds=t,this.key=n,this.bt=r}}class sw{constructor(e,t){this.targetId=e,this.Vt=t}}class sE{constructor(e,t,n=rU.EMPTY_BYTE_STRING,r=null){this.state=e,this.targetIds=t,this.resumeToken=n,this.cause=r}}class sS{constructor(){this.St=0,this.Dt=sk(),this.Ct=rU.EMPTY_BYTE_STRING,this.xt=!1,this.Nt=!0}get current(){return this.xt}get resumeToken(){return this.Ct}get kt(){return 0!==this.St}get Mt(){return this.Nt}$t(e){e.approximateByteSize()>0&&(this.Nt=!0,this.Ct=e)}Ot(){let e=iW(),t=iW(),n=iW();return this.Dt.forEach((r,i)=>{switch(i){case 0:e=e.add(r);break;case 2:t=t.add(r);break;case 1:n=n.add(r);break;default:n7()}}),new s_(this.Ct,this.xt,e,t,n)}Ft(){this.Nt=!1,this.Dt=sk()}Bt(e,t){this.Nt=!0,this.Dt=this.Dt.insert(e,t)}Lt(e){this.Nt=!0,this.Dt=this.Dt.remove(e)}qt(){this.St+=1}Ut(){this.St-=1}Kt(){this.Nt=!0,this.xt=!0}}class sT{constructor(e){this.Gt=e,this.Qt=new Map,this.jt=i$,this.zt=sI(),this.Wt=new rO(rh)}Ht(e){for(let t of e.Pt)e.bt&&e.bt.isFoundDocument()?this.Jt(t,e.bt):this.Yt(t,e.key,e.bt);for(let t of e.removedTargetIds)this.Yt(t,e.key,e.bt)}Xt(e){this.forEachTarget(e,t=>{let n=this.Zt(t);switch(e.state){case 0:this.te(t)&&n.$t(e.resumeToken);break;case 1:n.Ut(),n.kt||n.Ft(),n.$t(e.resumeToken);break;case 2:n.Ut(),n.kt||this.removeTarget(t);break;case 3:this.te(t)&&(n.Kt(),n.$t(e.resumeToken));break;case 4:this.te(t)&&(this.ee(t),n.$t(e.resumeToken));break;default:n7()}})}forEachTarget(e,t){e.targetIds.length>0?e.targetIds.forEach(t):this.Qt.forEach((e,n)=>{this.te(n)&&t(n)})}ne(e){var t;let n=e.targetId,r=e.Vt.count,i=this.se(n);if(i){let s=i.target;if(iT(s)){if(0===r){let e=new r_(s.path);this.Yt(n,e,ie.newNoDocument(e,rp.min()))}else 1===r||n7()}else{let i=this.ie(n);if(i!==r){let r=this.re(e,i);0!==r&&(this.ee(n),this.Wt=this.Wt.insert(n,2===r?"TargetPurposeExistenceFilterMismatchBloom":"TargetPurposeExistenceFilterMismatch")),null===(t=sh.instance)||void 0===t||t.notifyOnExistenceFilterMismatch(function(e,t,n){var r,i,s,o,a,l;let u={localCacheCount:t,existenceFilterCount:n.count},c=n.unchangedNames;return c&&(u.bloomFilter={applied:0===e,hashCount:null!==(r=null==c?void 0:c.hashCount)&&void 0!==r?r:0,bitmapLength:null!==(o=null===(s=null===(i=null==c?void 0:c.bits)||void 0===i?void 0:i.bitmap)||void 0===s?void 0:s.length)&&void 0!==o?o:0,padding:null!==(l=null===(a=null==c?void 0:c.bits)||void 0===a?void 0:a.padding)&&void 0!==l?l:0}),u}(r,i,e.Vt))}}}}re(e,t){let n,r;let{unchangedNames:i,count:s}=e.Vt;if(!i||!i.bits)return 1;let{bits:{bitmap:o="",padding:a=0},hashCount:l=0}=i;try{n=rV(o).toUint8Array()}catch(e){if(e instanceof rj)return n3("Decoding the base64 bloom filter in existence filter failed ("+e.message+"); ignoring the bloom filter and falling back to full re-query."),1;throw e}try{r=new sg(n,a,l)}catch(e){return n3(e instanceof sy?"BloomFilter error: ":"Applying bloom filter failed: ",e),1}return 0===r.It?1:s!==t-this.oe(e.targetId,r)?2:0}oe(e,t){let n=this.Gt.getRemoteKeysForTarget(e),r=0;return n.forEach(n=>{let i=this.Gt.ue(),s=`projects/${i.projectId}/databases/${i.database}/documents/${n.path.canonicalString()}`;t.vt(s)||(this.Yt(e,n,null),r++)}),r}ce(e){let t=new Map;this.Qt.forEach((n,r)=>{let i=this.se(r);if(i){if(n.current&&iT(i.target)){let t=new r_(i.target.path);null!==this.jt.get(t)||this.ae(r,t)||this.Yt(r,t,ie.newNoDocument(t,e))}n.Mt&&(t.set(r,n.Ot()),n.Ft())}});let n=iW();this.zt.forEach((e,t)=>{let r=!0;t.forEachWhile(e=>{let t=this.se(e);return!t||"TargetPurposeLimboResolution"===t.purpose||(r=!1,!1)}),r&&(n=n.add(e))}),this.jt.forEach((t,n)=>n.setReadTime(e));let r=new sv(e,t,this.Wt,this.jt,n);return this.jt=i$,this.zt=sI(),this.Wt=new rO(rh),r}Jt(e,t){if(!this.te(e))return;let n=this.ae(e,t.key)?2:0;this.Zt(e).Bt(t.key,n),this.jt=this.jt.insert(t.key,t),this.zt=this.zt.insert(t.key,this.he(t.key).add(e))}Yt(e,t,n){if(!this.te(e))return;let r=this.Zt(e);this.ae(e,t)?r.Bt(t,1):r.Lt(t),this.zt=this.zt.insert(t,this.he(t).delete(e)),n&&(this.jt=this.jt.insert(t,n))}removeTarget(e){this.Qt.delete(e)}ie(e){let t=this.Zt(e).Ot();return this.Gt.getRemoteKeysForTarget(e).size+t.addedDocuments.size-t.removedDocuments.size}qt(e){this.Zt(e).qt()}Zt(e){let t=this.Qt.get(e);return t||(t=new sS,this.Qt.set(e,t)),t}he(e){let t=this.zt.get(e);return t||(t=new rM(rh),this.zt=this.zt.insert(e,t)),t}te(e){let t=null!==this.se(e);return t||n9("WatchChangeAggregator","Detected inactive target",e),t}se(e){let t=this.Qt.get(e);return t&&t.kt?null:this.Gt.le(e)}ee(e){this.Qt.set(e,new sS),this.Gt.getRemoteKeysForTarget(e).forEach(t=>{this.Yt(e,t,null)})}ae(e,t){return this.Gt.getRemoteKeysForTarget(e).has(t)}}function sI(){return new rO(r_.comparator)}function sk(){return new rO(r_.comparator)}let sC={asc:"ASCENDING",desc:"DESCENDING"},sx={"<":"LESS_THAN","<=":"LESS_THAN_OR_EQUAL",">":"GREATER_THAN",">=":"GREATER_THAN_OR_EQUAL","==":"EQUAL","!=":"NOT_EQUAL","array-contains":"ARRAY_CONTAINS",in:"IN","not-in":"NOT_IN","array-contains-any":"ARRAY_CONTAINS_ANY"},sR={and:"AND",or:"OR"};class sA{constructor(e,t){this.databaseId=e,this.useProto3Json=t}}function sO(e,t){return e.useProto3Json||null==t?t:{value:t}}function sN(e,t){return e.useProto3Json?`${new Date(1e3*t.seconds).toISOString().replace(/\.\d*/,"").replace("Z","")}.${("000000000"+t.nanoseconds).slice(-9)}Z`:{seconds:""+t.seconds,nanos:t.nanoseconds}}function sD(e,t){return e.useProto3Json?t.toBase64():t.toUint8Array()}function sM(e){return e||n7(),rp.fromTimestamp(function(e){let t=rB(e);return new rf(t.seconds,t.nanos)}(e))}function sL(e,t){return new rg(["projects",e.projectId,"databases",e.database]).child("documents").child(t).canonicalString()}function sP(e){let t=rg.fromString(e);return sq(t)||n7(),t}function sj(e,t){let n=sP(t);
29if(n.get(1)!==e.databaseId.projectId)throw new re(n8.INVALID_ARGUMENT,"Tried to deserialize key from different project: "+n.get(1)+" vs "+e.databaseId.projectId);if(n.get(3)!==e.databaseId.database)throw new re(n8.INVALID_ARGUMENT,"Tried to deserialize key from different database: "+n.get(3)+" vs "+e.databaseId.database);return new r_(sB(n))}function sU(e,t){return sL(e.databaseId,t)}function sF(e){return new rg(["projects",e.databaseId.projectId,"databases",e.databaseId.database]).canonicalString()}function sB(e){return e.length>4&&"documents"===e.get(4)||n7(),e.popFirst(5)}function s$(e){return{fieldPath:e.canonicalString()}}function sV(e){return rv.fromServerFormat(e.fieldPath)}function sq(e){return e.length>=4&&"projects"===e.get(0)&&"databases"===e.get(2)}class sz{constructor(e,t,n,r,i=rp.min(),s=rp.min(),o=rU.EMPTY_BYTE_STRING,a=null){this.target=e,this.targetId=t,this.purpose=n,this.sequenceNumber=r,this.snapshotVersion=i,this.lastLimboFreeSnapshotVersion=s,this.resumeToken=o,this.expectedCount=a}withSequenceNumber(e){return new sz(this.target,this.targetId,this.purpose,e,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,this.expectedCount)}withResumeToken(e,t){return new sz(this.target,this.targetId,this.purpose,this.sequenceNumber,t,this.lastLimboFreeSnapshotVersion,e,null)}withExpectedCount(e){return new sz(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,this.lastLimboFreeSnapshotVersion,this.resumeToken,e)}withLastLimboFreeSnapshotVersion(e){return new sz(this.target,this.targetId,this.purpose,this.sequenceNumber,this.snapshotVersion,e,this.resumeToken,this.expectedCount)}}class sH{constructor(e){this.fe=e}}class sW{constructor(){}_e(e,t){this.me(e,t),t.ge()}me(e,t){if("nullValue"in e)this.ye(t,5);else if("booleanValue"in e)this.ye(t,10),t.pe(e.booleanValue?1:0);else if("integerValue"in e)this.ye(t,15),t.pe(r$(e.integerValue));else if("doubleValue"in e){let n=r$(e.doubleValue);isNaN(n)?this.ye(t,13):(this.ye(t,15),rC(n)?t.pe(0):t.pe(n))}else if("timestampValue"in e){let n=e.timestampValue;this.ye(t,20),"string"==typeof n?t.Ie(n):(t.Ie(`${n.seconds||""}`),t.pe(n.nanos||0))}else if("stringValue"in e)this.Te(e.stringValue,t),this.Ee(t);else if("bytesValue"in e)this.ye(t,30),t.Ae(rV(e.bytesValue)),this.Ee(t);else if("referenceValue"in e)this.ve(e.referenceValue,t);else if("geoPointValue"in e){let n=e.geoPointValue;this.ye(t,45),t.pe(n.latitude||0),t.pe(n.longitude||0)}else"mapValue"in e?r7(e)?this.ye(t,Number.MAX_SAFE_INTEGER):(this.Re(e.mapValue,t),this.Ee(t)):"arrayValue"in e?(this.Pe(e.arrayValue,t),this.Ee(t)):n7()}Te(e,t){this.ye(t,25),this.be(e,t)}be(e,t){t.Ie(e)}Re(e,t){let n=e.fields||{};for(let e of(this.ye(t,55),Object.keys(n)))this.Te(e,t),this.me(n[e],t)}Pe(e,t){let n=e.values||[];for(let e of(this.ye(t,50),n))this.me(e,t)}ve(e,t){this.ye(t,37),r_.fromName(e).path.forEach(e=>{this.ye(t,60),this.be(e,t)})}ye(e,t){e.pe(t)}Ee(e){e.pe(2)}}sW.Ve=new sW;class sG{constructor(){this.rn=new sK}addToCollectionParentIndex(e,t){return this.rn.add(t),rT.resolve()}getCollectionParents(e,t){return rT.resolve(this.rn.getEntries(t))}addFieldIndex(e,t){return rT.resolve()}deleteFieldIndex(e,t){return rT.resolve()}getDocumentsMatchingTarget(e,t){return rT.resolve(null)}getIndexType(e,t){return rT.resolve(0)}getFieldIndexes(e,t){return rT.resolve([])}getNextCollectionGroupToUpdate(e){return rT.resolve(null)}getMinOffset(e,t){return rT.resolve(rw.min())}getMinOffsetFromCollectionGroup(e,t){return rT.resolve(rw.min())}updateCollectionGroup(e,t,n){return rT.resolve()}updateIndexEntries(e,t){return rT.resolve()}}class sK{constructor(){this.index={}}add(e){let t=e.lastSegment(),n=e.popLast(),r=this.index[t]||new rM(rg.comparator),i=!r.has(n);return this.index[t]=r.add(n),i}has(e){let t=e.lastSegment(),n=e.popLast(),r=this.index[t];return r&&r.has(n)}getEntries(e){return(this.index[e]||new rM(rg.comparator)).toArray()}}new Uint8Array(0);class sX{constructor(e,t,n){this.cacheSizeCollectionThreshold=e,this.percentileToCollect=t,this.maximumSequenceNumbersToCollect=n}static withCacheSize(e){return new sX(e,sX.DEFAULT_COLLECTION_PE
29RCENTILE,sX.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT)}}sX.DEFAULT_COLLECTION_PERCENTILE=10,sX.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT=1e3,sX.DEFAULT=new sX(41943040,sX.DEFAULT_COLLECTION_PERCENTILE,sX.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT),sX.DISABLED=new sX(-1,0,0);class sJ{constructor(e){this.Nn=e}next(){return this.Nn+=2,this.Nn}static kn(){return new sJ(0)}static Mn(){return new sJ(-1)}}class sZ{constructor(){this.changes=new iB(e=>e.toString(),(e,t)=>e.isEqual(t)),this.changesApplied=!1}addEntry(e){this.assertNotApplied(),this.changes.set(e.key,e)}removeEntry(e,t){this.assertNotApplied(),this.changes.set(e,ie.newInvalidDocument(e).setReadTime(t))}getEntry(e,t){this.assertNotApplied();let n=this.changes.get(t);return void 0!==n?rT.resolve(n):this.getFromCache(e,t)}getEntries(e,t){return this.getAllFromCache(e,t)}apply(e){return this.assertNotApplied(),this.changesApplied=!0,this.applyChanges(e)}assertNotApplied(){}}class sY{constructor(e,t){this.overlayedDocument=e,this.mutatedFields=t}}class sQ{constructor(e,t,n,r){this.remoteDocumentCache=e,this.mutationQueue=t,this.documentOverlayCache=n,this.indexManager=r}getDocument(e,t){let n=null;return this.documentOverlayCache.getOverlay(e,t).next(r=>(n=r,this.remoteDocumentCache.getEntry(e,t))).next(e=>(null!==n&&i8(n.mutation,e,rP.empty(),rf.now()),e))}getDocuments(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.getLocalViewOfDocuments(e,t,iW()).next(()=>t))}getLocalViewOfDocuments(e,t,n=iW()){let r=iz();return this.populateOverlays(e,r,t).next(()=>this.computeViews(e,t,r,n).next(e=>{let t=iq();return e.forEach((e,n)=>{t=t.insert(e,n.overlayedDocument)}),t}))}getOverlayedDocuments(e,t){let n=iz();return this.populateOverlays(e,n,t).next(()=>this.computeViews(e,t,n,iW()))}populateOverlays(e,t,n){let r=[];return n.forEach(e=>{t.has(e)||r.push(e)}),this.documentOverlayCache.getOverlays(e,r).next(e=>{e.forEach((e,n)=>{t.set(e,n)})})}computeViews(e,t,n,r){let i=i$,s=iz(),o=iz();return t.forEach((e,t)=>{let o=n.get(t.key);r.has(t.key)&&(void 0===o||o.mutation instanceof sn)?i=i.insert(t.key,t):void 0!==o?(s.set(t.key,o.mutation.getFieldMask()),i8(o.mutation,t,o.mutation.getFieldMask(),rf.now())):s.set(t.key,rP.empty())}),this.recalculateAndSaveOverlays(e,i).next(e=>(e.forEach((e,t)=>s.set(e,t)),t.forEach((e,t)=>{var n;return o.set(e,new sY(t,null!==(n=s.get(e))&&void 0!==n?n:null))}),o))}recalculateAndSaveOverlays(e,t){let n=iz(),r=new rO((e,t)=>e-t),i=iW();return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e,t).next(e=>{for(let i of e)i.keys().forEach(e=>{let s=t.get(e);if(null===s)return;let o=n.get(e)||rP.empty();o=i.applyToLocalView(s,o),n.set(e,o);let a=(r.get(i.batchId)||iW()).add(e);r=r.insert(i.batchId,a)})}).next(()=>{let s=[],o=r.getReverseIterator();for(;o.hasNext();){let r=o.getNext(),a=r.key,l=r.value,u=iz();l.forEach(e=>{if(!i.has(e)){let r=i7(t.get(e),n.get(e));null!==r&&u.set(e,r),i=i.add(e)}}),s.push(this.documentOverlayCache.saveOverlays(e,a,u))}return rT.waitFor(s)}).next(()=>n)}recalculateAndSaveOverlaysForDocumentKeys(e,t){return this.remoteDocumentCache.getEntries(e,t).next(t=>this.recalculateAndSaveOverlays(e,t))}getDocumentsMatchingQuery(e,t,n){return r_.isDocumentKey(t.path)&&null===t.collectionGroup&&0===t.filters.length?this.getDocumentsMatchingDocumentQuery(e,t.path):iA(t)?this.getDocumentsMatchingCollectionGroupQuery(e,t,n):this.getDocumentsMatchingCollectionQuery(e,t,n)}getNextDocuments(e,t,n,r){return this.remoteDocumentCache.getAllFromCollectionGroup(e,t,n,r).next(i=>{let s=r-i.size>0?this.documentOverlayCache.getOverlaysForCollectionGroup(e,t,n.largestBatchId,r-i.size):rT.resolve(iz()),o=-1,a=i;return s.next(t=>rT.forEach(t,(t,n)=>(o<n.largestBatchId&&(o=n.largestBatchId),i.get(t)?rT.resolve():this.remoteDocumentCache.getEntry(e,t).next(e=>{a=a.insert(t,e)}))).next(()=>this.populateOverlays(e,t,i)).next(()=>this.computeViews(e,a,t,iW())).next(e=>{let t;return{batchId:o,changes:(t=iV,e.forEach((e,n)=>t=t.insert(e,n.overlayedDocument)),t)}}))})}getDocumentsMatchingDocumentQuery(e,t){return this.getDocument(e,new r_(t)).next(e=>{let t=iq();
29return e.isFoundDocument()&&(t=t.insert(e.key,e)),t})}getDocumentsMatchingCollectionGroupQuery(e,t,n){let r=t.collectionGroup,i=iq();return this.indexManager.getCollectionParents(e,r).next(s=>rT.forEach(s,s=>{let o=new iI(s.child(r),null,t.explicitOrderBy.slice(),t.filters.slice(),t.limit,t.limitType,t.startAt,t.endAt);return this.getDocumentsMatchingCollectionQuery(e,o,n).next(e=>{e.forEach((e,t)=>{i=i.insert(e,t)})})}).next(()=>i))}getDocumentsMatchingCollectionQuery(e,t,n){let r;return this.documentOverlayCache.getOverlaysForCollection(e,t.path,n.largestBatchId).next(i=>(r=i,this.remoteDocumentCache.getDocumentsMatchingQuery(e,t,n,r))).next(e=>{r.forEach((t,n)=>{let r=n.getKey();null===e.get(r)&&(e=e.insert(r,ie.newInvalidDocument(r)))});let n=iq();return e.forEach((e,i)=>{let s=r.get(e);void 0!==s&&i8(s.mutation,i,rP.empty(),rf.now()),iU(t,i)&&(n=n.insert(e,i))}),n})}}class s0{constructor(e){this.serializer=e,this.cs=new Map,this.hs=new Map}getBundleMetadata(e,t){return rT.resolve(this.cs.get(t))}saveBundleMetadata(e,t){return this.cs.set(t.id,{id:t.id,version:t.version,createTime:sM(t.createTime)}),rT.resolve()}getNamedQuery(e,t){return rT.resolve(this.hs.get(t))}saveNamedQuery(e,t){return this.hs.set(t.name,{name:t.name,query:function(e){let t=function(e){var t;let n,r=function(e){let t=sP(e);return 4===t.length?rg.emptyPath():sB(t)}(e.parent),i=e.structuredQuery,s=i.from?i.from.length:0,o=null;if(s>0){1===s||n7();let e=i.from[0];e.allDescendants?o=e.collectionId:r=r.child(e.collectionId)}let a=[];i.where&&(a=function(e){var t;let n=function e(t){return void 0!==t.unaryFilter?function(e){switch(e.unaryFilter.op){case"IS_NAN":let t=sV(e.unaryFilter.field);return ia.create(t,"==",{doubleValue:NaN});case"IS_NULL":let n=sV(e.unaryFilter.field);return ia.create(n,"==",{nullValue:"NULL_VALUE"});case"IS_NOT_NAN":let r=sV(e.unaryFilter.field);return ia.create(r,"!=",{doubleValue:NaN});case"IS_NOT_NULL":let i=sV(e.unaryFilter.field);return ia.create(i,"!=",{nullValue:"NULL_VALUE"});default:return n7()}}(t):void 0!==t.fieldFilter?ia.create(sV(t.fieldFilter.field),function(e){switch(e){case"EQUAL":return"==";case"NOT_EQUAL":return"!=";case"GREATER_THAN":return">";case"GREATER_THAN_OR_EQUAL":return">=";case"LESS_THAN":return"<";case"LESS_THAN_OR_EQUAL":return"<=";case"ARRAY_CONTAINS":return"array-contains";case"IN":return"in";case"NOT_IN":return"not-in";case"ARRAY_CONTAINS_ANY":return"array-contains-any";default:return n7()}}(t.fieldFilter.op),t.fieldFilter.value):void 0!==t.compositeFilter?il.create(t.compositeFilter.filters.map(t=>e(t)),function(e){switch(e){case"AND":return"and";case"OR":return"or";default:return n7()}}(t.compositeFilter.op)):n7()}(e);return n instanceof il&&ic(t=n)&&iu(t)?n.getFilters():[n]}(i.where));let l=[];i.orderBy&&(l=i.orderBy.map(e=>new is(sV(e.field),function(e){switch(e){case"ASCENDING":return"asc";case"DESCENDING":return"desc";default:return}}(e.direction))));let u=null;i.limit&&(u=null==(n="object"==typeof(t=i.limit)?t.value:t)?null:n);let c=null;i.startAt&&(c=function(e){let t=!!e.before;return new it(e.values||[],t)}(i.startAt));let h=null;return i.endAt&&(h=function(e){let t=!e.before;return new it(e.values||[],t)}(i.endAt)),new iI(r,o,l,a,u,"F",c,h)}({parent:e.parent,structuredQuery:e.structuredQuery});return"LAST"===e.limitType?iM(t,t.limit,"L"):t}(t.bundledQuery),readTime:sM(t.readTime)}),rT.resolve()}}class s1{constructor(){this.overlays=new rO(r_.comparator),this.ls=new Map}getOverlay(e,t){return rT.resolve(this.overlays.get(t))}getOverlays(e,t){let n=iz();return rT.forEach(t,t=>this.getOverlay(e,t).next(e=>{null!==e&&n.set(t,e)})).next(()=>n)}saveOverlays(e,t,n){return n.forEach((n,r)=>{this.we(e,t,r)}),rT.resolve()}removeOverlaysForBatchId(e,t,n){let r=this.ls.get(n);return void 0!==r&&(r.forEach(e=>this.overlays=this.overlays.remove(e)),this.ls.delete(n)),rT.resolve()}getOverlaysForCollection(e,t,n){let r=iz(),i=t.length+1,s=new r_(t.child("")),o=this.overlays.getIteratorFrom(s);for(;o.hasNext();){let e=o.getNext().value,s=e.getKey();if(!t.isPrefixOf(s.path))break;s.path.length===i&&e.largestBatchId>n&&r.set(e.getKey(),e)}return rT.resolve(r)}getOverlaysForCollectionGroup(e,t,n,r){let i=new rO((e,t)=>
29e-t),s=this.overlays.getIterator();for(;s.hasNext();){let e=s.getNext().value;if(e.getKey().getCollectionGroup()===t&&e.largestBatchId>n){let t=i.get(e.largestBatchId);null===t&&(t=iz(),i=i.insert(e.largestBatchId,t)),t.set(e.getKey(),e)}}let o=iz(),a=i.getIterator();for(;a.hasNext()&&(a.getNext().value.forEach((e,t)=>o.set(e,t)),!(o.size()>=r)););return rT.resolve(o)}we(e,t,n){let r=this.overlays.get(n.key);if(null!==r){let e=this.ls.get(r.largestBatchId).delete(n.key);this.ls.set(r.largestBatchId,e)}this.overlays=this.overlays.insert(n.key,new sl(t,n));let i=this.ls.get(t);void 0===i&&(i=iW(),this.ls.set(t,i)),this.ls.set(t,i.add(n.key))}}class s2{constructor(){this.fs=new rM(s4.ds),this.ws=new rM(s4._s)}isEmpty(){return this.fs.isEmpty()}addReference(e,t){let n=new s4(e,t);this.fs=this.fs.add(n),this.ws=this.ws.add(n)}gs(e,t){e.forEach(e=>this.addReference(e,t))}removeReference(e,t){this.ys(new s4(e,t))}ps(e,t){e.forEach(e=>this.removeReference(e,t))}Is(e){let t=new r_(new rg([])),n=new s4(t,e),r=new s4(t,e+1),i=[];return this.ws.forEachInRange([n,r],e=>{this.ys(e),i.push(e.key)}),i}Ts(){this.fs.forEach(e=>this.ys(e))}ys(e){this.fs=this.fs.delete(e),this.ws=this.ws.delete(e)}Es(e){let t=new r_(new rg([])),n=new s4(t,e),r=new s4(t,e+1),i=iW();return this.ws.forEachInRange([n,r],e=>{i=i.add(e.key)}),i}containsKey(e){let t=new s4(e,0),n=this.fs.firstAfterOrEqual(t);return null!==n&&e.isEqual(n.key)}}class s4{constructor(e,t){this.key=e,this.As=t}static ds(e,t){return r_.comparator(e.key,t.key)||rh(e.As,t.As)}static _s(e,t){return rh(e.As,t.As)||r_.comparator(e.key,t.key)}}class s9{constructor(e,t){this.indexManager=e,this.referenceDelegate=t,this.mutationQueue=[],this.vs=1,this.Rs=new rM(s4.ds)}checkEmpty(e){return rT.resolve(0===this.mutationQueue.length)}addMutationBatch(e,t,n,r){let i=this.vs;this.vs++,this.mutationQueue.length>0&&this.mutationQueue[this.mutationQueue.length-1];let s=new sa(i,t,n,r);for(let t of(this.mutationQueue.push(s),r))this.Rs=this.Rs.add(new s4(t.key,i)),this.indexManager.addToCollectionParentIndex(e,t.key.path.popLast());return rT.resolve(s)}lookupMutationBatch(e,t){return rT.resolve(this.Ps(t))}getNextMutationBatchAfterBatchId(e,t){let n=this.bs(t+1),r=n<0?0:n;return rT.resolve(this.mutationQueue.length>r?this.mutationQueue[r]:null)}getHighestUnacknowledgedBatchId(){return rT.resolve(0===this.mutationQueue.length?-1:this.vs-1)}getAllMutationBatches(e){return rT.resolve(this.mutationQueue.slice())}getAllMutationBatchesAffectingDocumentKey(e,t){let n=new s4(t,0),r=new s4(t,Number.POSITIVE_INFINITY),i=[];return this.Rs.forEachInRange([n,r],e=>{let t=this.Ps(e.As);i.push(t)}),rT.resolve(i)}getAllMutationBatchesAffectingDocumentKeys(e,t){let n=new rM(rh);return t.forEach(e=>{let t=new s4(e,0),r=new s4(e,Number.POSITIVE_INFINITY);this.Rs.forEachInRange([t,r],e=>{n=n.add(e.As)})}),rT.resolve(this.Vs(n))}getAllMutationBatchesAffectingQuery(e,t){let n=t.path,r=n.length+1,i=n;r_.isDocumentKey(i)||(i=i.child(""));let s=new s4(new r_(i),0),o=new rM(rh);return this.Rs.forEachWhile(e=>{let t=e.key.path;return!!n.isPrefixOf(t)&&(t.length===r&&(o=o.add(e.As)),!0)},s),rT.resolve(this.Vs(o))}Vs(e){let t=[];return e.forEach(e=>{let n=this.Ps(e);null!==n&&t.push(n)}),t}removeMutationBatch(e,t){0===this.Ss(t.batchId,"removed")||n7(),this.mutationQueue.shift();let n=this.Rs;return rT.forEach(t.mutations,r=>{let i=new s4(r.key,t.batchId);return n=n.delete(i),this.referenceDelegate.markPotentiallyOrphaned(e,r.key)}).next(()=>{this.Rs=n})}Cn(e){}containsKey(e,t){let n=new s4(t,0),r=this.Rs.firstAfterOrEqual(n);return rT.resolve(t.isEqual(r&&r.key))}performConsistencyCheck(e){return this.mutationQueue.length,rT.resolve()}Ss(e,t){return this.bs(e)}bs(e){return 0===this.mutationQueue.length?0:e-this.mutationQueue[0].batchId}Ps(e){let t=this.bs(e);return t<0||t>=this.mutationQueue.length?null:this.mutationQueue[t]}}class s6{constructor(e){this.Ds=e,this.docs=new rO(r_.comparator),this.size=0}setIndexManager(e){this.indexManager=e}addEntry(e,t){let n=t.key,r=this.docs.get(n),i=r?r.size:0,s=this.Ds(t);return this.docs=this.docs.insert(n,{document:t.mutableCopy(),size:s}),this.size+=s-i,this.indexManager.addToCollectionParentIndex(e,n.path.popLast())}removeEntry(e){let t=this.docs.get(e);t&&(this.docs=this.docs.remove(e),this.size-=t.size)}getEntry(e,t){let n=this.docs.get(t);return rT.resolve(n?n.document.mutableCopy():ie.newInvalidDocument(t))}getEntries(e,t){let n=i$;
29return t.forEach(e=>{let t=this.docs.get(e);n=n.insert(e,t?t.document.mutableCopy():ie.newInvalidDocument(e))}),rT.resolve(n)}getDocumentsMatchingQuery(e,t,n,r){let i=i$,s=t.path,o=new r_(s.child("")),a=this.docs.getIteratorFrom(o);for(;a.hasNext();){let{key:e,value:{document:o}}=a.getNext();if(!s.isPrefixOf(e.path))break;e.path.length>s.length+1||0>=function(e,t){let n=e.readTime.compareTo(t.readTime);return 0!==n?n:0!==(n=r_.comparator(e.documentKey,t.documentKey))?n:rh(e.largestBatchId,t.largestBatchId)}(new rw(o.readTime,o.key,-1),n)||(r.has(o.key)||iU(t,o))&&(i=i.insert(o.key,o.mutableCopy()))}return rT.resolve(i)}getAllFromCollectionGroup(e,t,n,r){n7()}Cs(e,t){return rT.forEach(this.docs,e=>t(e))}newChangeBuffer(e){return new s3(this)}getSize(e){return rT.resolve(this.size)}}class s3 extends sZ{constructor(e){super(),this.os=e}applyChanges(e){let t=[];return this.changes.forEach((n,r)=>{r.isValidDocument()?t.push(this.os.addEntry(e,r)):this.os.removeEntry(n)}),rT.waitFor(t)}getFromCache(e,t){return this.os.getEntry(e,t)}getAllFromCache(e,t){return this.os.getEntries(e,t)}}class s5{constructor(e){this.persistence=e,this.xs=new iB(e=>iE(e),iS),this.lastRemoteSnapshotVersion=rp.min(),this.highestTargetId=0,this.Ns=0,this.ks=new s2,this.targetCount=0,this.Ms=sJ.kn()}forEachTarget(e,t){return this.xs.forEach((e,n)=>t(n)),rT.resolve()}getLastRemoteSnapshotVersion(e){return rT.resolve(this.lastRemoteSnapshotVersion)}getHighestSequenceNumber(e){return rT.resolve(this.Ns)}allocateTargetId(e){return this.highestTargetId=this.Ms.next(),rT.resolve(this.highestTargetId)}setTargetsMetadata(e,t,n){return n&&(this.lastRemoteSnapshotVersion=n),t>this.Ns&&(this.Ns=t),rT.resolve()}Fn(e){this.xs.set(e.target,e);let t=e.targetId;t>this.highestTargetId&&(this.Ms=new sJ(t),this.highestTargetId=t),e.sequenceNumber>this.Ns&&(this.Ns=e.sequenceNumber)}addTargetData(e,t){return this.Fn(t),this.targetCount+=1,rT.resolve()}updateTargetData(e,t){return this.Fn(t),rT.resolve()}removeTargetData(e,t){return this.xs.delete(t.target),this.ks.Is(t.targetId),this.targetCount-=1,rT.resolve()}removeTargets(e,t,n){let r=0,i=[];return this.xs.forEach((s,o)=>{o.sequenceNumber<=t&&null===n.get(o.targetId)&&(this.xs.delete(s),i.push(this.removeMatchingKeysForTargetId(e,o.targetId)),r++)}),rT.waitFor(i).next(()=>r)}getTargetCount(e){return rT.resolve(this.targetCount)}getTargetData(e,t){let n=this.xs.get(t)||null;return rT.resolve(n)}addMatchingKeys(e,t,n){return this.ks.gs(t,n),rT.resolve()}removeMatchingKeys(e,t,n){this.ks.ps(t,n);let r=this.persistence.referenceDelegate,i=[];return r&&t.forEach(t=>{i.push(r.markPotentiallyOrphaned(e,t))}),rT.waitFor(i)}removeMatchingKeysForTargetId(e,t){return this.ks.Is(t),rT.resolve()}getMatchingKeysForTargetId(e,t){let n=this.ks.Es(t);return rT.resolve(n)}containsKey(e,t){return rT.resolve(this.ks.containsKey(t))}}class s7{constructor(e,t){this.$s={},this.overlays={},this.Os=new rk(0),this.Fs=!1,this.Fs=!0,this.referenceDelegate=e(this),this.Bs=new s5(this),this.indexManager=new sG,this.remoteDocumentCache=new s6(e=>this.referenceDelegate.Ls(e)),this.serializer=new sH(t),this.qs=new s0(this.serializer)}start(){return Promise.resolve()}shutdown(){return this.Fs=!1,Promise.resolve()}get started(){return this.Fs}setDatabaseDeletedListener(){}setNetworkEnabled(){}getIndexManager(e){return this.indexManager}getDocumentOverlayCache(e){let t=this.overlays[e.toKey()];return t||(t=new s1,this.overlays[e.toKey()]=t),t}getMutationQueue(e,t){let n=this.$s[e.toKey()];return n||(n=new s9(t,this.referenceDelegate),this.$s[e.toKey()]=n),n}getTargetCache(){return this.Bs}getRemoteDocumentCache(){return this.remoteDocumentCache}getBundleCache(){return this.qs}runTransaction(e,t,n){n9("MemoryPersistence","Starting transaction:",e);let r=new s8(this.Os.next());return this.referenceDelegate.Us(),n(r).next(e=>this.referenceDelegate.Ks(r).next(()=>e)).toPromise().then(e=>(r.raiseOnCommittedEvent(),e))}Gs(e,t){return rT.or(Object.values(this.$s).map(n=>()=>n.containsKey(e,t)))}}class s8 extends rE{constructor(e){super(),this.currentSequenceNumber=e}}class oe{constructor(e){this.persistence=e,this.Qs=new s2,this.js=null}static zs(e){return new oe(e)}get Ws(){if(this.js)return this.js;throw n7()}addReference(e,t,n){return this.Qs.addReference(n,t),this.Ws.delete(n.toString()),rT.resolve()}removeReference(e,t,n){return this.Qs.removeReference(n,t),this.Ws.add(n.toString()),rT.resolve()}markPotentiallyOrphaned(e,t){return this.Ws.add(t.toString()),rT.resolve()}
29removeTarget(e,t){this.Qs.Is(t.targetId).forEach(e=>this.Ws.add(e.toString()));let n=this.persistence.getTargetCache();return n.getMatchingKeysForTargetId(e,t.targetId).next(e=>{e.forEach(e=>this.Ws.add(e.toString()))}).next(()=>n.removeTargetData(e,t))}Us(){this.js=new Set}Ks(e){let t=this.persistence.getRemoteDocumentCache().newChangeBuffer();return rT.forEach(this.Ws,n=>{let r=r_.fromPath(n);return this.Hs(e,r).next(e=>{e||t.removeEntry(r,rp.min())})}).next(()=>(this.js=null,t.apply(e)))}updateLimboDocument(e,t){return this.Hs(e,t).next(e=>{e?this.Ws.delete(t.toString()):this.Ws.add(t.toString())})}Ls(e){return 0}Hs(e,t){return rT.or([()=>rT.resolve(this.Qs.containsKey(t)),()=>this.persistence.getTargetCache().containsKey(e,t),()=>this.persistence.Gs(e,t)])}}class ot{constructor(e,t,n,r){this.targetId=e,this.fromCache=t,this.Fi=n,this.Bi=r}static Li(e,t){let n=iW(),r=iW();for(let e of t.docChanges)switch(e.type){case 0:n=n.add(e.doc.key);break;case 1:r=r.add(e.doc.key)}return new ot(e,t.fromCache,n,r)}}class on{constructor(){this.qi=!1}initialize(e,t){this.Ui=e,this.indexManager=t,this.qi=!0}getDocumentsMatchingQuery(e,t,n,r){return this.Ki(e,t).next(i=>i||this.Gi(e,t,r,n)).next(n=>n||this.Qi(e,t))}Ki(e,t){if(iC(t))return rT.resolve(null);let n=iN(t);return this.indexManager.getIndexType(e,n).next(r=>0===r?null:(null!==t.limit&&1===r&&(n=iN(t=iM(t,null,"F"))),this.indexManager.getDocumentsMatchingTarget(e,n).next(r=>{let i=iW(...r);return this.Ui.getDocuments(e,i).next(r=>this.indexManager.getMinOffset(e,n).next(n=>{let s=this.ji(t,r);return this.zi(t,s,i,n.readTime)?this.Ki(e,iM(t,null,"F")):this.Wi(e,s,t,n)}))})))}Gi(e,t,n,r){return iC(t)||r.isEqual(rp.min())?this.Qi(e,t):this.Ui.getDocuments(e,n).next(i=>{let s=this.ji(t,i);return this.zi(t,s,n,r)?this.Qi(e,t):(n4()<=d.in.DEBUG&&n9("QueryEngine","Re-using previous result from %s to execute query: %s",r.toString(),ij(t)),this.Wi(e,s,t,function(e,t){let n=e.toTimestamp().seconds,r=e.toTimestamp().nanoseconds+1;return new rw(rp.fromTimestamp(1e9===r?new rf(n+1,0):new rf(n,r)),r_.empty(),-1)}(r,0)))})}ji(e,t){let n=new rM(iF(e));return t.forEach((t,r)=>{iU(e,r)&&(n=n.add(r))}),n}zi(e,t,n,r){if(null===e.limit)return!1;if(n.size!==t.size)return!0;let i="F"===e.limitType?t.last():t.first();return!!i&&(i.hasPendingWrites||i.version.compareTo(r)>0)}Qi(e,t){return n4()<=d.in.DEBUG&&n9("QueryEngine","Using full collection scan to execute query:",ij(t)),this.Ui.getDocumentsMatchingQuery(e,t,rw.min())}Wi(e,t,n,r){return this.Ui.getDocumentsMatchingQuery(e,n,r).next(e=>(t.forEach(t=>{e=e.insert(t.key,t)}),e))}}class or{constructor(e,t,n,r){this.persistence=e,this.Hi=t,this.serializer=r,this.Ji=new rO(rh),this.Yi=new iB(e=>iE(e),iS),this.Xi=new Map,this.Zi=e.getRemoteDocumentCache(),this.Bs=e.getTargetCache(),this.qs=e.getBundleCache(),this.tr(n)}tr(e){this.documentOverlayCache=this.persistence.getDocumentOverlayCache(e),this.indexManager=this.persistence.getIndexManager(e),this.mutationQueue=this.persistence.getMutationQueue(e,this.indexManager),this.localDocuments=new sQ(this.Zi,this.mutationQueue,this.documentOverlayCache,this.indexManager),this.Zi.setIndexManager(this.indexManager),this.Hi.initialize(this.localDocuments,this.indexManager)}collectGarbage(e){return this.persistence.runTransaction("Collect garbage","readwrite-primary",t=>e.collect(t,this.Ji))}}async function oi(e,t){return await e.persistence.runTransaction("Handle user change","readonly",n=>{let r;return e.mutationQueue.getAllMutationBatches(n).next(i=>(r=i,e.tr(t),e.mutationQueue.getAllMutationBatches(n))).next(t=>{let i=[],s=[],o=iW();for(let e of r)for(let t of(i.push(e.batchId),e.mutations))o=o.add(t.key);for(let e of t)for(let t of(s.push(e.batchId),e.mutations))o=o.add(t.key);return e.localDocuments.getDocuments(n,o).next(e=>({er:e,removedBatchIds:i,addedBatchIds:s}))})})}function os(e){return e.persistence.runTransaction("Get last remote snapshot version","readonly",t=>e.Bs.getLastRemoteSnapshotVersion(t))}async function oo(e,t,n){let r=e.Ji.get(t);try{n||await e.persistence.runTransaction("Release target",n?"readwrite":"readwrite-primary",t=>e.persistence.referenceDelegate.removeTarget(t,r))}catch(e){if(!rI(e))throw e;n9("LocalStore",`Failed to update sequence numbers for target ${t}: ${e}`)}e.Ji=e.Ji.remove(t),e.Yi.delete(r.target)}
29function oa(e,t,n){let r=rp.min(),i=iW();return e.persistence.runTransaction("Execute query","readonly",s=>(function(e,t,n){let r=e.Yi.get(n);return void 0!==r?rT.resolve(e.Ji.get(r)):e.Bs.getTargetData(t,n)})(e,s,iN(t)).next(t=>{if(t)return r=t.lastLimboFreeSnapshotVersion,e.Bs.getMatchingKeysForTargetId(s,t.targetId).next(e=>{i=e})}).next(()=>e.Hi.getDocumentsMatchingQuery(s,t,n?r:rp.min(),n?i:iW())).next(n=>{var r;let s;return r=t.collectionGroup||(t.path.length%2==1?t.path.lastSegment():t.path.get(t.path.length-2)),s=e.Xi.get(r)||rp.min(),n.forEach((e,t)=>{t.readTime.compareTo(s)>0&&(s=t.readTime)}),e.Xi.set(r,s),{documents:n,ir:i}}))}class ol{constructor(){this.activeTargetIds=iG}lr(e){this.activeTargetIds=this.activeTargetIds.add(e)}dr(e){this.activeTargetIds=this.activeTargetIds.delete(e)}hr(){return JSON.stringify({activeTargetIds:this.activeTargetIds.toArray(),updateTimeMs:Date.now()})}}class ou{constructor(){this.Hr=new ol,this.Jr={},this.onlineStateHandler=null,this.sequenceNumberHandler=null}addPendingMutation(e){}updateMutationState(e,t,n){}addLocalQueryTarget(e){return this.Hr.lr(e),this.Jr[e]||"not-current"}updateQueryState(e,t,n){this.Jr[e]=t}removeLocalQueryTarget(e){this.Hr.dr(e)}isLocalQueryTarget(e){return this.Hr.activeTargetIds.has(e)}clearQueryState(e){delete this.Jr[e]}getAllActiveQueryTargets(){return this.Hr.activeTargetIds}isActiveQueryTarget(e){return this.Hr.activeTargetIds.has(e)}start(){return this.Hr=new ol,Promise.resolve()}handleUserChange(e,t,n){}setOnlineState(e){}shutdown(){}writeSequenceNumber(e){}notifyBundleLoaded(e){}}class oc{Yr(e){}shutdown(){}}class oh{constructor(){this.Xr=()=>this.Zr(),this.eo=()=>this.no(),this.so=[],this.io()}Yr(e){this.so.push(e)}shutdown(){window.removeEventListener("online",this.Xr),window.removeEventListener("offline",this.eo)}io(){window.addEventListener("online",this.Xr),window.addEventListener("offline",this.eo)}Zr(){for(let e of(n9("ConnectivityMonitor","Network connectivity changed: AVAILABLE"),this.so))e(0)}no(){for(let e of(n9("ConnectivityMonitor","Network connectivity changed: UNAVAILABLE"),this.so))e(1)}static D(){return"undefined"!=typeof window&&void 0!==window.addEventListener&&void 0!==window.removeEventListener}}let od=null;function of(){return null===od?od=268435456+Math.round(2147483648*Math.random()):od++,"0x"+od.toString(16)}let op={BatchGetDocuments:"batchGet",Commit:"commit",RunQuery:"runQuery",RunAggregationQuery:"runAggregationQuery"};class om{constructor(e){this.ro=e.ro,this.oo=e.oo}uo(e){this.co=e}ao(e){this.ho=e}onMessage(e){this.lo=e}close(){this.oo()}send(e){this.ro(e)}fo(){this.co()}wo(e){this.ho(e)}_o(e){this.lo(e)}}let og="WebChannelConnection";class oy extends class{constructor(e){this.databaseInfo=e,this.databaseId=e.databaseId;let t=e.ssl?"https":"http";this.mo=t+"://"+e.host,this.yo="projects/"+this.databaseId.projectId+"/databases/"+this.databaseId.database+"/documents"}get po(){return!1}Io(e,t,n,r,i){let s=of(),o=this.To(e,t);n9("RestConnection",`Sending RPC '${e}' ${s}:`,o,n);let a={};return this.Eo(a,r,i),this.Ao(e,o,a,n).then(t=>(n9("RestConnection",`Received RPC '${e}' ${s}: `,t),t),t=>{throw n3("RestConnection",`RPC '${e}' ${s} failed with error: `,t,"url: ",o,"request:",n),t})}vo(e,t,n,r,i,s){return this.Io(e,t,n,r,i)}Eo(e,t,n){e["X-Goog-Api-Client"]="gl-js/ fire/"+n1,e["Content-Type"]="text/plain",this.databaseInfo.appId&&(e["X-Firebase-GMPID"]=this.databaseInfo.appId),t&&t.headers.forEach((t,n)=>e[n]=t),n&&n.headers.forEach((t,n)=>e[n]=t)}To(e,t){let n=op[e];return`${this.mo}/v1/${t}:${n}`}}{constructor(e){super(e),this.forceLongPolling=e.forceLongPolling,this.autoDetectLongPolling=e.autoDetectLongPolling,this.useFetchStreams=e.useFetchStreams,this.longPollingOptions=e.longPollingOptions}Ao(e,t,n,r){let i=of();return new Promise((s,o)=>{let a=new nJ;a.setWithCredentials(!0),a.listenOnce(nH.COMPLETE,()=>{try{switch(a.getLastErrorCode()){case nz.NO_ERROR:let t=a.getResponseJson();n9(og,`XHR for RPC '${e}' ${i} received:`,JSON.stringify(t)),s(t);break;case nz.TIMEOUT:n9(og,`RPC '${e}' ${i} timed out`),o(new re(n8.DEADLINE_EXCEEDED,"Request time out"));break;case nz.HTTP_ERROR:let n=a.getStatus();if(n9(og,`RPC '${e}' ${i} failed with status:`,n,"response text:",a.getResponseText()),n>0){let e=a.getResponseJson();Array.isArray(e)&&(e=e[0]);let t=null==e?void 0:e.error;if(t&&t.status&&t.message){let e=function(e){let t=e.toLowerCase().replace(/_/g,"-");return Object.values(n8).indexOf(t)>=0?t:n8.UNKNOWN}(t.status);o(new re(e,t.message))}else o(new re(n8.UNKNOWN,"Server responded with status "+a.getStatus()))}else o(new re(n8.UNAVAILABLE,"Connection failed."));break;default:n7()}}finally{n9(og,`RPC '${e}' ${i} completed.`)}});let l=JSON.stringify(r);n9(og,`RPC '${e}' ${i} sending request:`,r),a.send(t,"POST",l,n,15)})}
29Ro(e,t,n){let r=of(),i=[this.mo,"/","google.firestore.v1.Firestore","/",e,"/channel"],s=nV(),o=nq(),l={httpSessionIdParam:"gsessionid",initMessageHeaders:{},messageUrlParams:{database:`projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`},sendRawJson:!0,supportsCrossDomainXhr:!0,internalChannelParams:{forwardChannelRequestTimeoutMs:6e5},forceLongPolling:this.forceLongPolling,detectBufferingProxy:this.autoDetectLongPolling},u=this.longPollingOptions.timeoutSeconds;void 0!==u&&(l.longPollingTimeout=Math.round(1e3*u)),this.useFetchStreams&&(l.xmlHttpFactory=new nK({})),this.Eo(l.initMessageHeaders,t,n),l.encodeInitMessageHeaders=!0;let c=i.join("");n9(og,`Creating RPC '${e}' stream ${r}: ${c}`,l);let h=s.createWebChannel(c,l),d=!1,f=!1,p=new om({ro:t=>{f?n9(og,`Not sending because RPC '${e}' stream ${r} is closed:`,t):(d||(n9(og,`Opening RPC '${e}' stream ${r} transport.`),h.open(),d=!0),n9(og,`RPC '${e}' stream ${r} sending:`,t),h.send(t))},oo:()=>h.close()}),m=(e,t,n)=>{e.listen(t,e=>{try{n(e)}catch(e){setTimeout(()=>{throw e},0)}})};return m(h,nX.EventType.OPEN,()=>{f||n9(og,`RPC '${e}' stream ${r} transport opened.`)}),m(h,nX.EventType.CLOSE,()=>{f||(f=!0,n9(og,`RPC '${e}' stream ${r} transport closed`),p.wo())}),m(h,nX.EventType.ERROR,t=>{f||(f=!0,n3(og,`RPC '${e}' stream ${r} transport errored:`,t),p.wo(new re(n8.UNAVAILABLE,"The operation could not be completed")))}),m(h,nX.EventType.MESSAGE,t=>{var n;if(!f){let i=t.data[0];i||n7();let s=i.error||(null===(n=i[0])||void 0===n?void 0:n.error);if(s){n9(og,`RPC '${e}' stream ${r} received error:`,s);let t=s.status,n=function(e){let t=a[e];if(void 0!==t)return sc(t)}(t),i=s.message;void 0===n&&(n=n8.INTERNAL,i="Unknown error status: "+t+" with message "+s.message),f=!0,p.wo(new re(n,i)),h.close()}else n9(og,`RPC '${e}' stream ${r} received:`,i),p._o(i)}}),m(o,nW.STAT_EVENT,t=>{t.stat===nG.PROXY?n9(og,`RPC '${e}' stream ${r} detected buffering proxy`):t.stat===nG.NOPROXY&&n9(og,`RPC '${e}' stream ${r} detected no buffering proxy`)}),setTimeout(()=>{p.fo()},0),p}}function ov(){return"undefined"!=typeof document?document:null}function o_(e){return new sA(e,!0)}class ob{constructor(e,t,n=1e3,r=1.5,i=6e4){this.ii=e,this.timerId=t,this.Po=n,this.bo=r,this.Vo=i,this.So=0,this.Do=null,this.Co=Date.now(),this.reset()}reset(){this.So=0}xo(){this.So=this.Vo}No(e){this.cancel();let t=Math.floor(this.So+this.ko()),n=Math.max(0,Date.now()-this.Co),r=Math.max(0,t-n);r>0&&n9("ExponentialBackoff",`Backing off for ${r} ms (base delay: ${this.So} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`),this.Do=this.ii.enqueueAfterDelay(this.timerId,r,()=>(this.Co=Date.now(),e())),this.So*=this.bo,this.So<this.Po&&(this.So=this.Po),this.So>this.Vo&&(this.So=this.Vo)}Mo(){null!==this.Do&&(this.Do.skipDelay(),this.Do=null)}cancel(){null!==this.Do&&(this.Do.cancel(),this.Do=null)}ko(){return(Math.random()-.5)*this.So}}class ow{constructor(e,t,n,r,i,s,o,a){this.ii=e,this.$o=n,this.Oo=r,this.connection=i,this.authCredentialsProvider=s,this.appCheckCredentialsProvider=o,this.listener=a,this.state=0,this.Fo=0,this.Bo=null,this.Lo=null,this.stream=null,this.qo=new ob(e,t)}Uo(){return 1===this.state||5===this.state||this.Ko()}Ko(){return 2===this.state||3===this.state}start(){4!==this.state?this.auth():this.Go()}async stop(){this.Uo()&&await this.close(0)}Qo(){this.state=0,this.qo.reset()}jo(){this.Ko()&&null===this.Bo&&(this.Bo=this.ii.enqueueAfterDelay(this.$o,6e4,()=>this.zo()))}Wo(e){this.Ho(),this.stream.send(e)}async zo(){if(this.Ko())return this.close(0)}Ho(){this.Bo&&(this.Bo.cancel(),this.Bo=null)}Jo(){this.Lo&&(this.Lo.cancel(),this.Lo=null)}async close(e,t){this.Ho(),this.Jo(),this.qo.cancel(),this.Fo++,4!==e?this.qo.reset():t&&t.code===n8.RESOURCE_EXHAUSTED?(n6(t.toString()),n6("Using maximum backoff delay to prevent overloading the backend."),this.qo.xo()):t&&t.code===n8.UNAUTHENTICATED&&3!==this.state&&(this.authCredentialsProvider.invalidateToken(),this.appCheckCredentialsProvider.invalidateToken()),null!==this.stream&&(this.Yo(),this.stream.close(),this.stream=null),this.state=e,await this.listener.ao(t)}Yo(){}auth(){this.state=1;let e=this.Xo(this.Fo),t=this.Fo;Promise.all([this.authCredentialsProvider.getToken(),this.appCheckCredentialsProvider.getToken()]).then(([e,n])=>{this.Fo===t&&this.Zo(e,n)},t=>{e(()=>{let e=new re(n8.UNKNOWN,"Fetching auth token failed: "+t.message);return this.tu(e)})})}Zo(e,t){let n=this.Xo(this.Fo);this.stream=this.eu(e,t),this.stream.uo(()=>{n(()=>(this.state=2,this.Lo=this.ii.enqueueAfterDelay(this.Oo,1e4,()=>(this.Ko()&&(this.state=3),Promise.resolve())),this.listener.uo()))}),this.stream.ao(e=>{n(()=>this.tu(e))}),this.stream.onMessage(e=>{n(()=>this.onMessage(e))})}Go(){this.state=5,this.qo.No(async()=>{this.state=0,this.start()})}tu(e){return n9("PersistentStream",`close with error: ${e}`),this.stream=null,this.close(4,e)}Xo(e){return t=>{this.ii.enqueueAndForget(()=>this.Fo===e?t():(n9("PersistentStream","stream callback skipped by getCloseGuardedDispatcher."),Promise.resolve()))}}}class oE extends ow{constructor(e,t,n,r,i,s){super(e,"listen_stream_connection_backoff","listen_stream_idle","health_check_timeout",t,n,r,s
29),this.serializer=i}eu(e,t){return this.connection.Ro("Listen",e,t)}onMessage(e){this.qo.reset();let t=function(e,t){let n;if("targetChange"in t){var r,i;t.targetChange;let s="NO_CHANGE"===(r=t.targetChange.targetChangeType||"NO_CHANGE")?0:"ADD"===r?1:"REMOVE"===r?2:"CURRENT"===r?3:"RESET"===r?4:n7(),o=t.targetChange.targetIds||[],a=(i=t.targetChange.resumeToken,e.useProto3Json?(void 0===i||"string"==typeof i||n7(),rU.fromBase64String(i||"")):(void 0===i||i instanceof Uint8Array||n7(),rU.fromUint8Array(i||new Uint8Array))),l=t.targetChange.cause;n=new sE(s,o,a,l&&new re(void 0===l.code?n8.UNKNOWN:sc(l.code),l.message||"")||null)}else if("documentChange"in t){t.documentChange;let r=t.documentChange;r.document,r.document.name,r.document.updateTime;let i=sj(e,r.document.name),s=sM(r.document.updateTime),o=r.document.createTime?sM(r.document.createTime):rp.min(),a=new r8({mapValue:{fields:r.document.fields}}),l=ie.newFoundDocument(i,s,o,a);n=new sb(r.targetIds||[],r.removedTargetIds||[],l.key,l)}else if("documentDelete"in t){t.documentDelete;let r=t.documentDelete;r.document;let i=sj(e,r.document),s=r.readTime?sM(r.readTime):rp.min(),o=ie.newNoDocument(i,s);n=new sb([],r.removedTargetIds||[],o.key,o)}else if("documentRemove"in t){t.documentRemove;let r=t.documentRemove;r.document;let i=sj(e,r.document);n=new sb([],r.removedTargetIds||[],i,null)}else{if(!("filter"in t))return n7();{t.filter;let e=t.filter;e.targetId;let{count:r=0,unchangedNames:i}=e,s=new su(r,i);n=new sw(e.targetId,s)}}return n}(this.serializer,e),n=function(e){if(!("targetChange"in e))return rp.min();let t=e.targetChange;return t.targetIds&&t.targetIds.length?rp.min():t.readTime?sM(t.readTime):rp.min()}(e);return this.listener.nu(t,n)}su(e){let t={};t.database=sF(this.serializer),t.addTarget=function(e,t){let n;let r=t.target;if((n=iT(r)?{documents:{documents:[sU(e,r.path)]}}:{query:function(e,t){var n,r;let i={structuredQuery:{}},s=t.path;null!==t.collectionGroup?(i.parent=sU(e,s),i.structuredQuery.from=[{collectionId:t.collectionGroup,allDescendants:!0}]):(i.parent=sU(e,s.popLast()),i.structuredQuery.from=[{collectionId:s.lastSegment()}]);let o=function(e){if(0!==e.length)return function e(t){return t instanceof ia?function(e){if("=="===e.op){if(r6(e.value))return{unaryFilter:{field:s$(e.field),op:"IS_NAN"}};if(r9(e.value))return{unaryFilter:{field:s$(e.field),op:"IS_NULL"}}}else if("!="===e.op){if(r6(e.value))return{unaryFilter:{field:s$(e.field),op:"IS_NOT_NAN"}};if(r9(e.value))return{unaryFilter:{field:s$(e.field),op:"IS_NOT_NULL"}}}return{fieldFilter:{field:s$(e.field),op:sx[e.op],value:e.value}}}(t):t instanceof il?function(t){let n=t.getFilters().map(t=>e(t));return 1===n.length?n[0]:{compositeFilter:{op:sR[t.op],filters:n}}}(t):n7()}(il.create(e,"and"))}(t.filters);o&&(i.structuredQuery.where=o);let a=function(e){if(0!==e.length)return e.map(e=>({field:s$(e.field),direction:sC[e.dir]}))}(t.orderBy);a&&(i.structuredQuery.orderBy=a);let l=sO(e,t.limit);return null!==l&&(i.structuredQuery.limit=l),t.startAt&&(i.structuredQuery.startAt={before:(n=t.startAt).inclusive,values:n.position}),t.endAt&&(i.structuredQuery.endAt={before:!(r=t.endAt).inclusive,values:r.position}),i}(e,r)}).targetId=t.targetId,t.resumeToken.approximateByteSize()>0){n.resumeToken=sD(e,t.resumeToken);let r=sO(e,t.expectedCount);null!==r&&(n.expectedCount=r)}else if(t.snapshotVersion.compareTo(rp.min())>0){n.readTime=sN(e,t.snapshotVersion.toTimestamp());let r=sO(e,t.expectedCount);null!==r&&(n.expectedCount=r)}return n}(this.serializer,e);let n=function(e,t){let n=function(e){switch(e){case"TargetPurposeListen":return null;case"TargetPurposeExistenceFilterMismatch":return"existence-filter-mismatch";case"TargetPurposeExistenceFilterMismatchBloom":return"existence-filter-mismatch-bloom";case"TargetPurposeLimboResolution":return"limbo-document";default:return n7()}}(t.purpose);return null==n?null:{"goog-listen-tags":n}}(this.serializer,e);n&&(t.labels=n),this.Wo(t)}iu(e){let t={};t.database=sF(this.serializer),t.removeTarget=e,this.Wo(t)}}class oS extends class{}{constructor(e,t,n,r){super(),this.authCredentials=e,this.appCheckCredentials=t,this.connection=n,this.serializer
29=r,this.lu=!1}fu(){if(this.lu)throw new re(n8.FAILED_PRECONDITION,"The client has already been terminated.")}Io(e,t,n){return this.fu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([r,i])=>this.connection.Io(e,t,n,r,i)).catch(e=>{throw"FirebaseError"===e.name?(e.code===n8.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new re(n8.UNKNOWN,e.toString())})}vo(e,t,n,r){return this.fu(),Promise.all([this.authCredentials.getToken(),this.appCheckCredentials.getToken()]).then(([i,s])=>this.connection.vo(e,t,n,i,s,r)).catch(e=>{throw"FirebaseError"===e.name?(e.code===n8.UNAUTHENTICATED&&(this.authCredentials.invalidateToken(),this.appCheckCredentials.invalidateToken()),e):new re(n8.UNKNOWN,e.toString())})}terminate(){this.lu=!0}}class oT{constructor(e,t){this.asyncQueue=e,this.onlineStateHandler=t,this.state="Unknown",this.wu=0,this._u=null,this.mu=!0}gu(){0===this.wu&&(this.yu("Unknown"),this._u=this.asyncQueue.enqueueAfterDelay("online_state_timeout",1e4,()=>(this._u=null,this.pu("Backend didn't respond within 10 seconds."),this.yu("Offline"),Promise.resolve())))}Iu(e){"Online"===this.state?this.yu("Unknown"):(this.wu++,this.wu>=1&&(this.Tu(),this.pu(`Connection failed 1 times. Most recent error: ${e.toString()}`),this.yu("Offline")))}set(e){this.Tu(),this.wu=0,"Online"===e&&(this.mu=!1),this.yu(e)}yu(e){e!==this.state&&(this.state=e,this.onlineStateHandler(e))}pu(e){let t=`Could not reach Cloud Firestore backend. ${e}
30This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;this.mu?(n6(t),this.mu=!1):n9("OnlineStateTracker",t)}Tu(){null!==this._u&&(this._u.cancel(),this._u=null)}}class oI{constructor(e,t,n,r,i){this.localStore=e,this.datastore=t,this.asyncQueue=n,this.remoteSyncer={},this.Eu=[],this.Au=new Map,this.vu=new Set,this.Ru=[],this.Pu=i,this.Pu.Yr(e=>{n.enqueueAndForget(async()=>{oM(this)&&(n9("RemoteStore","Restarting streams for network reachability change."),await async function(e){e.vu.add(4),await oC(e),e.bu.set("Unknown"),e.vu.delete(4),await ok(e)}(this))})}),this.bu=new oT(n,r)}}async function ok(e){if(oM(e))for(let t of e.Ru)await t(!0)}async function oC(e){for(let t of e.Ru)await t(!1)}function ox(e,t){e.Au.has(t.targetId)||(e.Au.set(t.targetId,t),oD(e)?oN(e):o$(e).Ko()&&oA(e,t))}function oR(e,t){let n=o$(e);e.Au.delete(t),n.Ko()&&oO(e,t),0===e.Au.size&&(n.Ko()?n.jo():oM(e)&&e.bu.set("Unknown"))}function oA(e,t){if(e.Vu.qt(t.targetId),t.resumeToken.approximateByteSize()>0||t.snapshotVersion.compareTo(rp.min())>0){let n=e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;t=t.withExpectedCount(n)}o$(e).su(t)}function oO(e,t){e.Vu.qt(t),o$(e).iu(t)}function oN(e){e.Vu=new sT({getRemoteKeysForTarget:t=>e.remoteSyncer.getRemoteKeysForTarget(t),le:t=>e.Au.get(t)||null,ue:()=>e.datastore.serializer.databaseId}),o$(e).start(),e.bu.gu()}function oD(e){return oM(e)&&!o$(e).Uo()&&e.Au.size>0}function oM(e){return 0===e.vu.size}async function oL(e){e.Au.forEach((t,n)=>{oA(e,t)})}async function oP(e,t){e.Vu=void 0,oD(e)?(e.bu.Iu(t),oN(e)):e.bu.set("Unknown")}async function oj(e,t,n){if(e.bu.set("Online"),t instanceof sE&&2===t.state&&t.cause)try{await async function(e,t){let n=t.cause;for(let r of t.targetIds)e.Au.has(r)&&(await e.remoteSyncer.rejectListen(r,n),e.Au.delete(r),e.Vu.removeTarget(r))}(e,t)}catch(n){n9("RemoteStore","Failed to remove targets %s: %s ",t.targetIds.join(","),n),await oU(e,n)}else if(t instanceof sb?e.Vu.Ht(t):t instanceof sw?e.Vu.ne(t):e.Vu.Xt(t),!n.isEqual(rp.min()))try{let t=await os(e.localStore);n.compareTo(t)>=0&&await function(e,t){let n=e.Vu.ce(t);
30return n.targetChanges.forEach((n,r)=>{if(n.resumeToken.approximateByteSize()>0){let i=e.Au.get(r);i&&e.Au.set(r,i.withResumeToken(n.resumeToken,t))}}),n.targetMismatches.forEach((t,n)=>{let r=e.Au.get(t);if(!r)return;e.Au.set(t,r.withResumeToken(rU.EMPTY_BYTE_STRING,r.snapshotVersion)),oO(e,t);let i=new sz(r.target,t,n,r.sequenceNumber);oA(e,i)}),e.remoteSyncer.applyRemoteEvent(n)}(e,n)}catch(t){n9("RemoteStore","Failed to raise snapshot:",t),await oU(e,t)}}async function oU(e,t,n){if(!rI(t))throw t;e.vu.add(1),await oC(e),e.bu.set("Offline"),n||(n=()=>os(e.localStore)),e.asyncQueue.enqueueRetryable(async()=>{n9("RemoteStore","Retrying IndexedDB access"),await n(),e.vu.delete(1),await ok(e)})}async function oF(e,t){e.asyncQueue.verifyOperationInProgress(),n9("RemoteStore","RemoteStore received new credentials");let n=oM(e);e.vu.add(3),await oC(e),n&&e.bu.set("Unknown"),await e.remoteSyncer.handleCredentialChange(t),e.vu.delete(3),await ok(e)}async function oB(e,t){t?(e.vu.delete(2),await ok(e)):t||(e.vu.add(2),await oC(e),e.bu.set("Unknown"))}function o$(e){var t,n,r;return e.Su||(e.Su=(t=e.datastore,n=e.asyncQueue,r={uo:oL.bind(null,e),ao:oP.bind(null,e),nu:oj.bind(null,e)},t.fu(),new oE(n,t.connection,t.authCredentials,t.appCheckCredentials,t.serializer,r)),e.Ru.push(async t=>{t?(e.Su.Qo(),oD(e)?oN(e):e.bu.set("Unknown")):(await e.Su.stop(),e.Vu=void 0)})),e.Su}class oV{constructor(e,t,n,r,i){this.asyncQueue=e,this.timerId=t,this.targetTimeMs=n,this.op=r,this.removalCallback=i,this.deferred=new rt,this.then=this.deferred.promise.then.bind(this.deferred.promise),this.deferred.promise.catch(e=>{})}static createAndSchedule(e,t,n,r,i){let s=new oV(e,t,Date.now()+n,r,i);return s.start(n),s}start(e){this.timerHandle=setTimeout(()=>this.handleDelayElapsed(),e)}skipDelay(){return this.handleDelayElapsed()}cancel(e){null!==this.timerHandle&&(this.clearTimeout(),this.deferred.reject(new re(n8.CANCELLED,"Operation cancelled"+(e?": "+e:""))))}handleDelayElapsed(){this.asyncQueue.enqueueAndForget(()=>null!==this.timerHandle?(this.clearTimeout(),this.op().then(e=>this.deferred.resolve(e))):Promise.resolve())}clearTimeout(){null!==this.timerHandle&&(this.removalCallback(this),clearTimeout(this.timerHandle),this.timerHandle=null)}}function oq(e,t){if(n6("AsyncQueue",`${t}: ${e}`),rI(e))return new re(n8.UNAVAILABLE,`${t}: ${e}`);throw e}class oz{constructor(e){this.comparator=e?(t,n)=>e(t,n)||r_.comparator(t.key,n.key):(e,t)=>r_.comparator(e.key,t.key),this.keyedMap=iq(),this.sortedSet=new rO(this.comparator)}static emptySet(e){return new oz(e.comparator)}has(e){return null!=this.keyedMap.get(e)}get(e){return this.keyedMap.get(e)}first(){return this.sortedSet.minKey()}last(){return this.sortedSet.maxKey()}isEmpty(){return this.sortedSet.isEmpty()}indexOf(e){let t=this.keyedMap.get(e);return t?this.sortedSet.indexOf(t):-1}get size(){return this.sortedSet.size}forEach(e){this.sortedSet.inorderTraversal((t,n)=>(e(t),!1))}add(e){let t=this.delete(e.key);return t.copy(t.keyedMap.insert(e.key,e),t.sortedSet.insert(e,null))}delete(e){let t=this.get(e);return t?this.copy(this.keyedMap.remove(e),this.sortedSet.remove(t)):this}isEqual(e){if(!(e instanceof oz)||this.size!==e.size)return!1;let t=this.sortedSet.getIterator(),n=e.sortedSet.getIterator();for(;t.hasNext();){let e=t.getNext().key,r=n.getNext().key;if(!e.isEqual(r))return!1}return!0}toString(){let e=[];return this.forEach(t=>{e.push(t.toString())}),0===e.length?"DocumentSet ()":"DocumentSet (\n  "+e.join("  \n")+"\n)"}copy(e,t){let n=new oz;return n.comparator=this.comparator,n.keyedMap=e,n.sortedSet=t,n}}class oH{constructor(){this.Cu=new rO(r_.comparator)}track(e){let t=e.doc.key,n=this.Cu.get(t);n?0!==e.type&&3===n.type?this.Cu=this.Cu.insert(t,e):3===e.type&&1!==n.type?this.Cu=this.Cu.insert(t,{type:n.type,doc:e.doc}):2===e.type&&2===n.type?this.Cu=this.Cu.insert(t,{type:2,doc:e.doc}):2===e.type&&0===n.type?this.Cu=this.Cu.insert(t,{type:0,doc:e.doc}):1===e.type&&0===n.type?this.Cu=this.Cu.remove(t):1===e.type&&2===n.type?this.Cu=this.Cu.insert(t,{type:1,doc:n.doc}):0===e.type&&1===n.type?this.Cu=this.Cu.insert(t,{type:2,doc:e.doc}):n7():this.Cu=this.Cu.insert(t,e)}xu(){let e=[];return this.Cu.inorderTraversal((t,n)=>{e.push(n)}),e}}class oW{constructor(e,t,n,r,i,s,o,a,l){this.query=e,this.docs=t,this.oldDocs=n,this.docChanges=r,this.mutatedKeys=i,this.fromCache=s,this.syncStateChanged=o,this.excludesMetadataChanges=a,this.hasCachedResults=l}static fromInitialDocuments(e,t,n,r,i){let s=[];
30return t.forEach(e=>{s.push({type:0,doc:e})}),new oW(e,t,oz.emptySet(t),s,n,r,!0,!1,i)}get hasPendingWrites(){return!this.mutatedKeys.isEmpty()}isEqual(e){if(!(this.fromCache===e.fromCache&&this.hasCachedResults===e.hasCachedResults&&this.syncStateChanged===e.syncStateChanged&&this.mutatedKeys.isEqual(e.mutatedKeys)&&iL(this.query,e.query)&&this.docs.isEqual(e.docs)&&this.oldDocs.isEqual(e.oldDocs)))return!1;let t=this.docChanges,n=e.docChanges;if(t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e].type!==n[e].type||!t[e].doc.isEqual(n[e].doc))return!1;return!0}}class oG{constructor(){this.Nu=void 0,this.listeners=[]}}class oK{constructor(){this.queries=new iB(e=>iP(e),iL),this.onlineState="Unknown",this.ku=new Set}}async function oX(e,t){let n=t.query,r=!1,i=e.queries.get(n);if(i||(r=!0,i=new oG),r)try{i.Nu=await e.onListen(n)}catch(n){let e=oq(n,`Initialization of query '${ij(t.query)}' failed`);return void t.onError(e)}e.queries.set(n,i),i.listeners.push(t),t.Mu(e.onlineState),i.Nu&&t.$u(i.Nu)&&oQ(e)}async function oJ(e,t){let n=t.query,r=!1,i=e.queries.get(n);if(i){let e=i.listeners.indexOf(t);e>=0&&(i.listeners.splice(e,1),r=0===i.listeners.length)}if(r)return e.queries.delete(n),e.onUnlisten(n)}function oZ(e,t){let n=!1;for(let r of t){let t=r.query,i=e.queries.get(t);if(i){for(let e of i.listeners)e.$u(r)&&(n=!0);i.Nu=r}}n&&oQ(e)}function oY(e,t,n){let r=e.queries.get(t);if(r)for(let e of r.listeners)e.onError(n);e.queries.delete(t)}function oQ(e){e.ku.forEach(e=>{e.next()})}class o0{constructor(e,t,n){this.query=e,this.Ou=t,this.Fu=!1,this.Bu=null,this.onlineState="Unknown",this.options=n||{}}$u(e){if(!this.options.includeMetadataChanges){let t=[];for(let n of e.docChanges)3!==n.type&&t.push(n);e=new oW(e.query,e.docs,e.oldDocs,t,e.mutatedKeys,e.fromCache,e.syncStateChanged,!0,e.hasCachedResults)}let t=!1;return this.Fu?this.Lu(e)&&(this.Ou.next(e),t=!0):this.qu(e,this.onlineState)&&(this.Uu(e),t=!0),this.Bu=e,t}onError(e){this.Ou.error(e)}Mu(e){this.onlineState=e;let t=!1;return this.Bu&&!this.Fu&&this.qu(this.Bu,e)&&(this.Uu(this.Bu),t=!0),t}qu(e,t){return!e.fromCache||(!this.options.Ku||!("Offline"!==t))&&(!e.docs.isEmpty()||e.hasCachedResults||"Offline"===t)}Lu(e){if(e.docChanges.length>0)return!0;let t=this.Bu&&this.Bu.hasPendingWrites!==e.hasPendingWrites;return!(!e.syncStateChanged&&!t)&&!0===this.options.includeMetadataChanges}Uu(e){e=oW.fromInitialDocuments(e.query,e.docs,e.mutatedKeys,e.fromCache,e.hasCachedResults),this.Fu=!0,this.Ou.next(e)}}class o1{constructor(e){this.key=e}}class o2{constructor(e){this.key=e}}class o4{constructor(e,t){this.query=e,this.Yu=t,this.Xu=null,this.hasCachedResults=!1,this.current=!1,this.Zu=iW(),this.mutatedKeys=iW(),this.tc=iF(e),this.ec=new oz(this.tc)}get nc(){return this.Yu}sc(e,t){let n=t?t.ic:new oH,r=t?t.ec:this.ec,i=t?t.mutatedKeys:this.mutatedKeys,s=r,o=!1,a="F"===this.query.limitType&&r.size===this.query.limit?r.last():null,l="L"===this.query.limitType&&r.size===this.query.limit?r.first():null;if(e.inorderTraversal((e,t)=>{let u=r.get(e),c=iU(this.query,t)?t:null,h=!!u&&this.mutatedKeys.has(u.key),d=!!c&&(c.hasLocalMutations||this.mutatedKeys.has(c.key)&&c.hasCommittedMutations),f=!1;u&&c?u.data.isEqual(c.data)?h!==d&&(n.track({type:3,doc:c}
30),f=!0):this.rc(u,c)||(n.track({type:2,doc:c}),f=!0,(a&&this.tc(c,a)>0||l&&0>this.tc(c,l))&&(o=!0)):!u&&c?(n.track({type:0,doc:c}),f=!0):u&&!c&&(n.track({type:1,doc:u}),f=!0,(a||l)&&(o=!0)),f&&(c?(s=s.add(c),i=d?i.add(e):i.delete(e)):(s=s.delete(e),i=i.delete(e)))}),null!==this.query.limit)for(;s.size>this.query.limit;){let e="F"===this.query.limitType?s.last():s.first();s=s.delete(e.key),i=i.delete(e.key),n.track({type:1,doc:e})}return{ec:s,ic:n,zi:o,mutatedKeys:i}}rc(e,t){return e.hasLocalMutations&&t.hasCommittedMutations&&!t.hasLocalMutations}applyChanges(e,t,n){let r=this.ec;this.ec=e.ec,this.mutatedKeys=e.mutatedKeys;let i=e.ic.xu();i.sort((e,t)=>(function(e,t){let n=e=>{switch(e){case 0:return 1;case 2:case 3:return 2;case 1:return 0;default:return n7()}};return n(e)-n(t)})(e.type,t.type)||this.tc(e.doc,t.doc)),this.oc(n);let s=t?this.uc():[],o=0===this.Zu.size&&this.current?1:0,a=o!==this.Xu;return(this.Xu=o,0!==i.length||a)?{snapshot:new oW(this.query,e.ec,r,i,e.mutatedKeys,0===o,a,!1,!!n&&n.resumeToken.approximateByteSize()>0),cc:s}:{cc:s}}Mu(e){return this.current&&"Offline"===e?(this.current=!1,this.applyChanges({ec:this.ec,ic:new oH,mutatedKeys:this.mutatedKeys,zi:!1},!1)):{cc:[]}}ac(e){return!this.Yu.has(e)&&!!this.ec.has(e)&&!this.ec.get(e).hasLocalMutations}oc(e){e&&(e.addedDocuments.forEach(e=>this.Yu=this.Yu.add(e)),e.modifiedDocuments.forEach(e=>{}),e.removedDocuments.forEach(e=>this.Yu=this.Yu.delete(e)),this.current=e.current)}uc(){if(!this.current)return[];let e=this.Zu;this.Zu=iW(),this.ec.forEach(e=>{this.ac(e.key)&&(this.Zu=this.Zu.add(e.key))});let t=[];return e.forEach(e=>{this.Zu.has(e)||t.push(new o2(e))}),this.Zu.forEach(n=>{e.has(n)||t.push(new o1(n))}),t}hc(e){this.Yu=e.ir,this.Zu=iW();let t=this.sc(e.documents);return this.applyChanges(t,!0)}lc(){return oW.fromInitialDocuments(this.query,this.ec,this.mutatedKeys,0===this.Xu,this.hasCachedResults)}}class o9{constructor(e,t,n){this.query=e,this.targetId=t,this.view=n}}class o6{constructor(e){this.key=e,this.fc=!1}}class o3{constructor(e,t,n,r,i,s){this.localStore=e,this.remoteStore=t,this.eventManager=n,this.sharedClientState=r,this.currentUser=i,this.maxConcurrentLimboResolutions=s,this.dc={},this.wc=new iB(e=>iP(e),iL),this._c=new Map,this.mc=new Set,this.gc=new rO(r_.comparator),this.yc=new Map,this.Ic=new s2,this.Tc={},this.Ec=new Map,this.Ac=sJ.Mn(),this.onlineState="Unknown",this.vc=void 0}get isPrimaryClient(){return!0===this.vc}}async function o5(e,t){var n,r;let i,s;let o=(e.remoteStore.remoteSyncer.applyRemoteEvent=ae.bind(null,e),e.remoteStore.remoteSyncer.getRemoteKeysForTarget=au.bind(null,e),e.remoteStore.remoteSyncer.rejectListen=an.bind(null,e),e.dc.nu=oZ.bind(null,e.eventManager),e.dc.Pc=oY.bind(null,e.eventManager),e),a=o.wc.get(t);if(a)i=a.targetId,o.sharedClientState.addLocalQueryTarget(i),s=a.view.lc();else{let e=await (n=o.localStore,r=iN(t),n.persistence.runTransaction("Allocate target","readwrite",e=>{let t;return n.Bs.getTargetData(e,r).next(i=>i?(t=i,rT.resolve(t)):n.Bs.allocateTargetId(e).next(i=>(t=new sz(r,i,"TargetPurposeListen",e.currentSequenceNumber),n.Bs.addTargetData(e,t).next(()=>t))))}).then(e=>{let t=n.Ji.get(e.targetId);return(null===t||e.snapshotVersion.compareTo(t.snapshotVersion)>0)&&(n.Ji=n.Ji.insert(e.targetId,e),n.Yi.set(r,e.targetId)),e})),a=o.sharedClientState.addLocalQueryTarget(e.targetId);i=e.targetId,s=await o7(o,t,i,"current"===a,e.resumeToken),o.isPrimaryClient&&ox(o.remoteStore,e)}return s}async function o7(e,t,n,r,i){e.Rc=(t,n,r)=>(async function(e,t,n,r){let i=t.view.sc(n);i.zi&&(i=await oa(e.localStore,t.query,!1).then(({documents:e})=>t.view.sc(e,i)));let s=r&&r.targetChanges.get(t.targetId),o=t.view.applyChanges(i,e.isPrimaryClient,s);return as(e,t.targetId,o.cc),o.snapshot})(e,t,n,r);let s=await oa(e.localStore,t,!0),o=new o4(t,s.ir),a=o.sc(s.documents),l=s_.createSynthesizedTargetChangeForCurrentChange(n,r&&"Offline"!==e.onlineState,i),u=o.applyChanges(a,e.isPrimaryClient,l);as(e,n,u.cc);let c=new o9(t,n,o);return e.wc.set(t,c),e._c.has(n)?e._c.get(n).push(t):e._c.set(n,[t]),u.snapshot}async function o8(e,t){let n=e.wc.get(t),r=e._c.get(n.targetId);if(r.length>1)return e._c.set(n.targetId,r.filter(e=>!iL(e,t))),void e.wc.delete(t);
30e.isPrimaryClient?(e.sharedClientState.removeLocalQueryTarget(n.targetId),e.sharedClientState.isActiveQueryTarget(n.targetId)||await oo(e.localStore,n.targetId,!1).then(()=>{e.sharedClientState.clearQueryState(n.targetId),oR(e.remoteStore,n.targetId),ar(e,n.targetId)}).catch(rS)):(ar(e,n.targetId),await oo(e.localStore,n.targetId,!0))}async function ae(e,t){try{let n=await function(e,t){let n=t.snapshotVersion,r=e.Ji;return e.persistence.runTransaction("Apply remote event","readwrite-primary",i=>{var s;let o,a;let l=e.Zi.newChangeBuffer({trackRemovals:!0});r=e.Ji;let u=[];t.targetChanges.forEach((s,o)=>{var a;let l=r.get(o);if(!l)return;u.push(e.Bs.removeMatchingKeys(i,s.removedDocuments,o).next(()=>e.Bs.addMatchingKeys(i,s.addedDocuments,o)));let c=l.withSequenceNumber(i.currentSequenceNumber);null!==t.targetMismatches.get(o)?c=c.withResumeToken(rU.EMPTY_BYTE_STRING,rp.min()).withLastLimboFreeSnapshotVersion(rp.min()):s.resumeToken.approximateByteSize()>0&&(c=c.withResumeToken(s.resumeToken,n)),r=r.insert(o,c),a=c,(0===l.resumeToken.approximateByteSize()||a.snapshotVersion.toMicroseconds()-l.snapshotVersion.toMicroseconds()>=3e8||s.addedDocuments.size+s.modifiedDocuments.size+s.removedDocuments.size>0)&&u.push(e.Bs.updateTargetData(i,c))});let c=i$,h=iW();if(t.documentUpdates.forEach(n=>{t.resolvedLimboDocuments.has(n)&&u.push(e.persistence.referenceDelegate.updateLimboDocument(i,n))}),u.push((s=t.documentUpdates,o=iW(),a=iW(),s.forEach(e=>o=o.add(e)),l.getEntries(i,o).next(e=>{let t=i$;return s.forEach((n,r)=>{let i=e.get(n);r.isFoundDocument()!==i.isFoundDocument()&&(a=a.add(n)),r.isNoDocument()&&r.version.isEqual(rp.min())?(l.removeEntry(n,r.readTime),t=t.insert(n,r)):!i.isValidDocument()||r.version.compareTo(i.version)>0||0===r.version.compareTo(i.version)&&i.hasPendingWrites?(l.addEntry(r),t=t.insert(n,r)):n9("LocalStore","Ignoring outdated watch update for ",n,". Current version:",i.version," Watch version:",r.version)}),{nr:t,sr:a}})).next(e=>{c=e.nr,h=e.sr})),!n.isEqual(rp.min())){let t=e.Bs.getLastRemoteSnapshotVersion(i).next(t=>e.Bs.setTargetsMetadata(i,i.currentSequenceNumber,n));u.push(t)}return rT.waitFor(u).next(()=>l.apply(i)).next(()=>e.localDocuments.getLocalViewOfDocuments(i,c,h)).next(()=>c)}).then(t=>(e.Ji=r,t))}(e.localStore,t);
30t.targetChanges.forEach((t,n)=>{let r=e.yc.get(n);r&&(t.addedDocuments.size+t.modifiedDocuments.size+t.removedDocuments.size<=1||n7(),t.addedDocuments.size>0?r.fc=!0:t.modifiedDocuments.size>0?r.fc||n7():t.removedDocuments.size>0&&(r.fc||n7(),r.fc=!1))}),await aa(e,n,t)}catch(e){await rS(e)}}function at(e,t,n){var r;if(e.isPrimaryClient&&0===n||!e.isPrimaryClient&&1===n){let n;let i=[];e.wc.forEach((e,n)=>{let r=n.view.Mu(t);r.snapshot&&i.push(r.snapshot)}),(r=e.eventManager).onlineState=t,n=!1,r.queries.forEach((e,r)=>{for(let e of r.listeners)e.Mu(t)&&(n=!0)}),n&&oQ(r),i.length&&e.dc.nu(i),e.onlineState=t,e.isPrimaryClient&&e.sharedClientState.setOnlineState(t)}}async function an(e,t,n){e.sharedClientState.updateQueryState(t,"rejected",n);let r=e.yc.get(t),i=r&&r.key;if(i){let n=new rO(r_.comparator);n=n.insert(i,ie.newNoDocument(i,rp.min()));let r=iW().add(i),s=new sv(rp.min(),new Map,new rO(rh),n,r);await ae(e,s),e.gc=e.gc.remove(i),e.yc.delete(t),ao(e)}else await oo(e.localStore,t,!1).then(()=>ar(e,t,n)).catch(rS)}function ar(e,t,n=null){for(let r of(e.sharedClientState.removeLocalQueryTarget(t),e._c.get(t)))e.wc.delete(r),n&&e.dc.Pc(r,n);e._c.delete(t),e.isPrimaryClient&&e.Ic.Is(t).forEach(t=>{e.Ic.containsKey(t)||ai(e,t)})}function ai(e,t){e.mc.delete(t.path.canonicalString());let n=e.gc.get(t);null!==n&&(oR(e.remoteStore,n),e.gc=e.gc.remove(t),e.yc.delete(n),ao(e))}function as(e,t,n){for(let r of n)r instanceof o1?(e.Ic.addReference(r.key,t),function(e,t){let n=t.key,r=n.path.canonicalString();e.gc.get(n)||e.mc.has(r)||(n9("SyncEngine","New document in limbo: "+n),e.mc.add(r),ao(e))}(e,r)):r instanceof o2?(n9("SyncEngine","Document no longer in limbo: "+r.key),e.Ic.removeReference(r.key,t),e.Ic.containsKey(r.key)||ai(e,r.key)):n7()}function ao(e){for(;e.mc.size>0&&e.gc.size<e.maxConcurrentLimboResolutions;){let t=e.mc.values().next().value;e.mc.delete(t);let n=new r_(rg.fromString(t)),r=e.Ac.next();e.yc.set(r,new o6(n)),e.gc=e.gc.insert(n,r),ox(e.remoteStore,new sz(iN(ik(n.path)),r,"TargetPurposeLimboResolution",rk.ct))}}async function aa(e,t,n){let r=[],i=[],s=[];e.wc.isEmpty()||(e.wc.forEach((o,a)=>{s.push(e.Rc(a,t,n).then(t=>{if((t||n)&&e.isPrimaryClient&&e.sharedClientState.updateQueryState(a.targetId,(null==t?void 0:t.fromCache)?"not-current":"current"),t){r.push(t);let e=ot.Li(a.targetId,t);i.push(e)}}))}),await Promise.all(s),e.dc.nu(r),await async function(e,t){try{await e.persistence.runTransaction("notifyLocalViewChanges","readwrite",n=>rT.forEach(t,t=>rT.forEach(t.Fi,r=>e.persistence.referenceDelegate.addReference(n,t.targetId,r)).next(()=>rT.forEach(t.Bi,r=>e.persistence.referenceDelegate.removeReference(n,t.targetId,r)))))}catch(e){if(!rI(e))throw e;n9("LocalStore","Failed to update sequence numbers: "+e)}for(let n of t){let t=n.targetId;if(!n.fromCache){let n=e.Ji.get(t),r=n.snapshotVersion,i=n.withLastLimboFreeSnapshotVersion(r);e.Ji=e.Ji.insert(t,i)}}}(e.localStore,i))}async function al(e,t){var n;if(!e.currentUser.isEqual(t)){n9("SyncEngine","User change. New user:",t.toKey());let r=await oi(e.localStore,t);e.currentUser=t,n="'waitForPendingWrites' promise is rejected due to a user change.",e.Ec.forEach(e=>{e.forEach(e=>{e.reject(new re(n8.CANCELLED,n))})}),e.Ec.clear(),e.sharedClientState.handleUserChange(t,r.removedBatchIds,r.addedBatchIds),await aa(e,r.er)}}function au(e,t){let n=e.yc.get(t);if(n&&n.fc)return iW().add(n.key);{let n=iW(),r=e._c.get(t);if(!r)return n;for(let t of r){let r=e.wc.get(t);n=n.unionWith(r.view.nc)}return n}}class ac{constructor(){this.synchronizeTabs=!1}async initialize(e){this.serializer=o_(e.databaseInfo.databaseId),this.sharedClientState=this.createSharedClientState(e),this.persistence=this.createPersistence(e),await this.persistence.start(),this.localStore=this.createLocalStore(e),this.gcScheduler=this.createGarbageCollectionScheduler(e,this.localStore),this.indexBackfillerScheduler=this.createIndexBackfillerScheduler(e,this.localStore)}createGarbageCollectionScheduler(e,t){return null}createIndexBackfillerScheduler(e,t){return null}createLocalStore(e){var t;return t=this.persistence,new or(t,new on,e.initialUser,this.serializer)}createPersistence(e){return new s7(oe.zs,this.serializer)}
30createSharedClientState(e){return new ou}async terminate(){this.gcScheduler&&this.gcScheduler.stop(),await this.sharedClientState.shutdown(),await this.persistence.shutdown()}}class ah{async initialize(e,t){this.localStore||(this.localStore=e.localStore,this.sharedClientState=e.sharedClientState,this.datastore=this.createDatastore(t),this.remoteStore=this.createRemoteStore(t),this.eventManager=this.createEventManager(t),this.syncEngine=this.createSyncEngine(t,!e.synchronizeTabs),this.sharedClientState.onlineStateHandler=e=>at(this.syncEngine,e,1),this.remoteStore.remoteSyncer.handleCredentialChange=al.bind(null,this.syncEngine),await oB(this.remoteStore,this.syncEngine.isPrimaryClient))}createEventManager(e){return new oK}createDatastore(e){let t=o_(e.databaseInfo.databaseId),n=new oy(e.databaseInfo);return new oS(e.authCredentials,e.appCheckCredentials,n,t)}createRemoteStore(e){var t;return t=this.localStore,new oI(t,this.datastore,e.asyncQueue,e=>at(this.syncEngine,e,0),oh.D()?new oh:new oc)}createSyncEngine(e,t){return function(e,t,n,r,i,s,o){let a=new o3(e,t,n,r,i,s);return o&&(a.vc=!0),a}(this.localStore,this.remoteStore,this.eventManager,this.sharedClientState,e.initialUser,e.maxConcurrentLimboResolutions,t)}terminate(){return async function(e){n9("RemoteStore","RemoteStore shutting down."),e.vu.add(5),await oC(e),e.Pu.shutdown(),e.bu.set("Unknown")}(this.remoteStore)}}class ad{constructor(e){this.observer=e,this.muted=!1}next(e){this.observer.next&&this.Sc(this.observer.next,e)}error(e){this.observer.error?this.Sc(this.observer.error,e):n6("Uncaught Error in snapshot listener:",e.toString())}Dc(){this.muted=!0}Sc(e,t){this.muted||setTimeout(()=>{this.muted||e(t)},0)}}class af{constructor(e,t,n,r){this.authCredentials=e,this.appCheckCredentials=t,this.asyncQueue=n,this.databaseInfo=r,this.user=n0.UNAUTHENTICATED,this.clientId=rc.A(),this.authCredentialListener=()=>Promise.resolve(),this.appCheckCredentialListener=()=>Promise.resolve(),this.authCredentials.start(n,async e=>{n9("FirestoreClient","Received user=",e.uid),await this.authCredentialListener(e),this.user=e}),this.appCheckCredentials.start(n,e=>(n9("FirestoreClient","Received new app check token=",e),this.appCheckCredentialListener(e,this.user)))}async getConfiguration(){return{asyncQueue:this.asyncQueue,databaseInfo:this.databaseInfo,clientId:this.clientId,authCredentials:this.authCredentials,appCheckCredentials:this.appCheckCredentials,initialUser:this.user,maxConcurrentLimboResolutions:100}}setCredentialChangeListener(e){this.authCredentialListener=e}setAppCheckTokenChangeListener(e){this.appCheckCredentialListener=e}verifyNotTerminated(){if(this.asyncQueue.isShuttingDown)throw new re(n8.FAILED_PRECONDITION,"The client has already been terminated.")}terminate(){this.asyncQueue.enterRestrictedMode();let e=new rt;return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async()=>{try{this._onlineComponents&&await this._onlineComponents.terminate(),this._offlineComponents&&await this._offlineComponents.terminate(),this.authCredentials.shutdown(),this.appCheckCredentials.shutdown(),e.resolve()}catch(n){let t=oq(n,"Failed to shutdown persistence");e.reject(t)}}),e.promise}}async function ap(e,t){e.asyncQueue.verifyOperationInProgress(),n9("FirestoreClient","Initializing OfflineComponentProvider");let n=await e.getConfiguration();await t.initialize(n);let r=n.initialUser;e.setCredentialChangeListener(async e=>{r.isEqual(e)||(await oi(t.localStore,e),r=e)}),t.persistence.setDatabaseDeletedListener(()=>e.terminate()),e._offlineComponents=t}async function am(e,t){e.asyncQueue.verifyOperationInProgress();let n=await ag(e);n9("FirestoreClient","Initializing OnlineComponentProvider");let r=await e.getConfiguration();await t.initialize(n,r),e.setCredentialChangeListener(e=>oF(t.remoteStore,e)),e.setAppCheckTokenChangeListener((e,n)=>oF(t.remoteStore,n)),e._onlineComponents=t}async function ag(e){if(!e._offlineComponents){if(e._uninitializedComponentsProvider){n9("FirestoreClient","Using user provided OfflineComponentProvider");try{await ap(e,e._uninitializedComponentsProvider._offline)}catch(t){if(!("FirebaseError"===t.name?t.code===n8.FAILED_PRECONDITION||t.code===n8.UNIMPLEMENT
30ED:!("undefined"!=typeof DOMException&&t instanceof DOMException)||22===t.code||20===t.code||11===t.code))throw t;n3("Error using user provided cache. Falling back to memory cache: "+t),await ap(e,new ac)}}else n9("FirestoreClient","Using default OfflineComponentProvider"),await ap(e,new ac)}return e._offlineComponents}async function ay(e){return e._onlineComponents||(e._uninitializedComponentsProvider?(n9("FirestoreClient","Using user provided OnlineComponentProvider"),await am(e,e._uninitializedComponentsProvider._online)):(n9("FirestoreClient","Using default OnlineComponentProvider"),await am(e,new ah))),e._onlineComponents}async function av(e){let t=await ay(e),n=t.eventManager;return n.onListen=o5.bind(null,t.syncEngine),n.onUnlisten=o8.bind(null,t.syncEngine),n}function a_(e){let t={};return void 0!==e.timeoutSeconds&&(t.timeoutSeconds=e.timeoutSeconds),t}let ab=new Map;function aw(e,t,n){if(!n)throw new re(n8.INVALID_ARGUMENT,`Function ${e}() cannot be called with an empty ${t}.`)}function aE(e){if(!r_.isDocumentKey(e))throw new re(n8.INVALID_ARGUMENT,`Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`)}function aS(e){if(r_.isDocumentKey(e))throw new re(n8.INVALID_ARGUMENT,`Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`)}function aT(e){if(void 0===e)return"undefined";if(null===e)return"null";if("string"==typeof e)return e.length>20&&(e=`${e.substring(0,20)}...`),JSON.stringify(e);if("number"==typeof e||"boolean"==typeof e)return""+e;if("object"==typeof e){if(e instanceof Array)return"an array";{var t;let n=(t=e).constructor?t.constructor.name:null;return n?`a custom ${n} object`:"an object"}}return"function"==typeof e?"a function":n7()}function aI(e,t){if("_delegate"in e&&(e=e._delegate),!(e instanceof t)){if(t.name===e.constructor.name)throw new re(n8.INVALID_ARGUMENT,"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?");{let n=aT(e);throw new re(n8.INVALID_ARGUMENT,`Expected type '${t.name}', but it was: ${n}`)}}return e}class ak{constructor(e){var t,n;if(void 0===e.host){if(void 0!==e.ssl)throw new re(n8.INVALID_ARGUMENT,"Can't provide ssl option if host option is not set");this.host="firestore.googleapis.com",this.ssl=!0}else this.host=e.host,this.ssl=null===(t=e.ssl)||void 0===t||t;if(this.credentials=e.credentials,this.ignoreUndefinedProperties=!!e.ignoreUndefinedProperties,this.cache=e.localCache,void 0===e.cacheSizeBytes)this.cacheSizeBytes=41943040;else{if(-1!==e.cacheSizeBytes&&e.cacheSizeBytes<1048576)throw new re(n8.INVALID_ARGUMENT,"cacheSizeBytes must be at least 1048576");this.cacheSizeBytes=e.cacheSizeBytes}(function(e,t,n,r){if(!0===t&&!0===r)throw new re(n8.INVALID_ARGUMENT,`${e} and ${n} cannot be used together.`)})("experimentalForceLongPolling",e.experimentalForceLongPolling,"experimentalAutoDetectLongPolling",e.experimentalAutoDetectLongPolling),this.experimentalForceLongPolling=!!e.experimentalForceLongPolling,this.experimentalForceLongPolling?this.experimentalAutoDetectLongPolling=!1:void 0===e.experimentalAutoDetectLongPolling?this.experimentalAutoDetectLongPolling=!0:this.experimentalAutoDetectLongPolling=!!e.experimentalAutoDetectLongPolling,this.experimentalLongPollingOptions=a_(null!==(n=e.experimentalLongPollingOptions)&&void 0!==n?n:{}),function(e){if(void 0!==e.timeoutSeconds){if(isNaN(e.timeoutSeconds))throw new re(n8.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);if(e.timeoutSeconds<5)throw new re(n8.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);if(e.timeoutSeconds>30)throw new re(n8.INVALID_ARGUMENT,`invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`)}}(this.experimentalLongPollingOptions),this.useFetchStreams=!!e.useFetchStreams}isEqual(e){var t,n;return this.host===e.host&&this.ssl===e.ssl&&this.credentials===e.credentials&&this.cacheSizeBytes===e.cacheSizeBytes&&this.experimentalForceLongPolling===e.experimentalForceLongPolling&&this.experimentalAutoDetectLongPolling===e.experimentalAutoDetectLongPolling&&(t=this.experimentalLongPollingOptions,n=e.experimentalLongPollingOptions,t.timeoutSeconds===n.timeoutSeconds)&&this.ignoreUndefinedProperties===e.ignoreUndefinedProperties&&this.useFetchStreams===e.useFetchStreams}}class aC{constructor(e,t,n,r){this._authCredentials=e,this._appCheckCredentials=t,this._databaseId=n,this._app=r,this.type="firestore-lite",this._persistenceKey="(lite)",this._settings=new ak({}),this._settingsFrozen=!1}get app(){if(!this._app)throw new re(n8.FAILED_PRECONDITION,"Firestore was not initialized using the Firebase SDK. 'app' is not available");return this._app}get _initialized(){return this._settingsFrozen}get _terminated(){return void 0!==this._terminateTask}_setSettings(e){if(this._settingsFrozen)throw new re(n8.FAILED_PRECONDITION,"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.");this._settings=new ak(e),void 0!==e.credentials&&(this._authCredentials=function(e){if(!e)return new rr;switch(e.type){case"firstParty":return new ra(e.sessionIndex||"0",e.iamToken||null,e.authTokenFactory||null);case"provider":return e.client;
30default:throw new re(n8.INVALID_ARGUMENT,"makeAuthCredentialsProvider failed due to invalid credential type")}}(e.credentials))}_getSettings(){return this._settings}_freezeSettings(){return this._settingsFrozen=!0,this._settings}_delete(){return this._terminateTask||(this._terminateTask=this._terminate()),this._terminateTask}toJSON(){return{app:this._app,databaseId:this._databaseId,settings:this._settings}}_terminate(){return function(e){let t=ab.get(e);t&&(n9("ComponentProvider","Removing Datastore"),ab.delete(e),t.terminate())}(this),Promise.resolve()}}class ax{constructor(e,t,n){this.converter=t,this._key=n,this.type="document",this.firestore=e}get _path(){return this._key.path}get id(){return this._key.path.lastSegment()}get path(){return this._key.path.canonicalString()}get parent(){return new aA(this.firestore,this.converter,this._key.path.popLast())}withConverter(e){return new ax(this.firestore,e,this._key)}}class aR{constructor(e,t,n){this.converter=t,this._query=n,this.type="query",this.firestore=e}withConverter(e){return new aR(this.firestore,e,this._query)}}class aA extends aR{constructor(e,t,n){super(e,t,ik(n)),this._path=n,this.type="collection"}get id(){return this._query.path.lastSegment()}get path(){return this._query.path.canonicalString()}get parent(){let e=this._path.popLast();return e.isEmpty()?null:new ax(this.firestore,null,new r_(e))}withConverter(e){return new aA(this.firestore,e,this._path)}}function aO(e,t,...n){if(e=(0,f.m9)(e),aw("collection","path",t),e instanceof aC){let r=rg.fromString(t,...n);return aS(r),new aA(e,null,r)}{if(!(e instanceof ax||e instanceof aA))throw new re(n8.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let r=e._path.child(rg.fromString(t,...n));return aS(r),new aA(e.firestore,null,r)}}function aN(e,t,...n){if(e=(0,f.m9)(e),1==arguments.length&&(t=rc.A()),aw("doc","path",t),e instanceof aC){let r=rg.fromString(t,...n);return aE(r),new ax(e,null,new r_(r))}{if(!(e instanceof ax||e instanceof aA))throw new re(n8.INVALID_ARGUMENT,"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore");let r=e._path.child(rg.fromString(t,...n));return aE(r),new ax(e.firestore,e instanceof aA?e.converter:null,new r_(r))}}class aD{constructor(){this.Gc=Promise.resolve(),this.Qc=[],this.jc=!1,this.zc=[],this.Wc=null,this.Hc=!1,this.Jc=!1,this.Yc=[],this.qo=new ob(this,"async_queue_retry"),this.Xc=()=>{let e=ov();e&&n9("AsyncQueue","Visibility state changed to "+e.visibilityState),this.qo.Mo()};let e=ov();e&&"function"==typeof e.addEventListener&&e.addEventListener("visibilitychange",this.Xc)}get isShuttingDown(){return this.jc}enqueueAndForget(e){this.enqueue(e)}enqueueAndForgetEvenWhileRestricted(e){this.Zc(),this.ta(e)}enterRestrictedMode(e){if(!this.jc){this.jc=!0,this.Jc=e||!1;let t=ov();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("visibilitychange",this.Xc)}}enqueue(e){if(this.Zc(),this.jc)return new Promise(()=>{});let t=new rt;return this.ta(()=>this.jc&&this.Jc?Promise.resolve():(e().then(t.resolve,t.reject),t.promise)).then(()=>t.promise)}enqueueRetryable(e){this.enqueueAndForget(()=>(this.Qc.push(e),this.ea()))}async ea(){if(0!==this.Qc.length){try{await this.Qc[0](),this.Qc.shift(),this.qo.reset()}catch(e){if(!rI(e))throw e;n9("AsyncQueue","Operation failed with retryable error: "+e)}this.Qc.length>0&&this.qo.No(()=>this.ea())}}ta(e){let t=this.Gc.then(()=>(this.Hc=!0,e().catch(e=>{let t;throw this.Wc=e,this.Hc=!1,n6("INTERNAL UNHANDLED ERROR: ",(t=e.message||"",e.stack&&(t=e.stack.includes(e.message)?e.stack:e.message+"\n"+e.stack),t)),e}).then(e=>(this.Hc=!1,e))));return this.Gc=t,t}enqueueAfterDelay(e,t,n){this.Zc(),this.Yc.indexOf(e)>-1&&(t=0);let r=oV.createAndSchedule(this,e,t,n,e=>this.na(e));return this.zc.push(r),r}Zc(){this.Wc&&n7()}verifyOperationInProgress(){}async sa(){let e;do e=this.Gc,await e;while(e!==this.Gc)}ia(e){for(let t of this.zc)if(t.timerId===e)return!0;return!1}ra(e){return this.sa().then(()=>{for(let t of(this.zc.sort((e,t)=>
30e.targetTimeMs-t.targetTimeMs),this.zc))if(t.skipDelay(),"all"!==e&&t.timerId===e)break;return this.sa()})}oa(e){this.Yc.push(e)}na(e){let t=this.zc.indexOf(e);this.zc.splice(t,1)}}function aM(e){return function(e,t){if("object"!=typeof e||null===e)return!1;for(let n of t)if(n in e&&"function"==typeof e[n])return!0;return!1}(e,["next","error","complete"])}class aL extends aC{constructor(e,t,n,r){super(e,t,n,r),this.type="firestore",this._queue=new aD,this._persistenceKey=(null==r?void 0:r.name)||"[DEFAULT]"}_terminate(){return this._firestoreClient||aU(this),this._firestoreClient.terminate()}}function aP(e,t){let n="object"==typeof e?e:(0,c.Mq)(),r=(0,c.qX)(n,"firestore").getImmediate({identifier:"string"==typeof e?e:t||"(default)"});if(!r._initialized){let e=(0,f.P0)("firestore");e&&function(e,t,n,r={}){var i;let s=(e=aI(e,aC))._getSettings(),o=`${t}:${n}`;if("firestore.googleapis.com"!==s.host&&s.host!==o&&n3("Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used."),e._setSettings(Object.assign(Object.assign({},s),{host:o,ssl:!1})),r.mockUserToken){let t,n;if("string"==typeof r.mockUserToken)t=r.mockUserToken,n=n0.MOCK_USER;else{t=(0,f.Sg)(r.mockUserToken,null===(i=e._app)||void 0===i?void 0:i.options.projectId);let s=r.mockUserToken.sub||r.mockUserToken.user_id;if(!s)throw new re(n8.INVALID_ARGUMENT,"mockUserToken must contain 'sub' or 'user_id' field!");n=new n0(s)}e._authCredentials=new ri(new rn(t,n))}}(r,...e)}return r}function aj(e){return e._firestoreClient||aU(e),e._firestoreClient.verifyNotTerminated(),e._firestoreClient}function aU(e){var t,n,r,i;let s=e._freezeSettings(),o=(i=e._databaseId,new rW(i,(null===(t=e._app)||void 0===t?void 0:t.options.appId)||"",e._persistenceKey,s.host,s.ssl,s.experimentalForceLongPolling,s.experimentalAutoDetectLongPolling,a_(s.experimentalLongPollingOptions),s.useFetchStreams));e._firestoreClient=new af(e._authCredentials,e._appCheckCredentials,e._queue,o),(null===(n=s.cache)||void 0===n?void 0:n._offlineComponentProvider)&&(null===(r=s.cache)||void 0===r?void 0:r._onlineComponentProvider)&&(e._firestoreClient._uninitializedComponentsProvider={_offlineKind:s.cache.kind,_offline:s.cache._offlineComponentProvider,_online:s.cache._onlineComponentProvider})}class aF{constructor(e){this._byteString=e}static fromBase64String(e){try{return new aF(rU.fromBase64String(e))}catch(e){throw new re(n8.INVALID_ARGUMENT,"Failed to construct data from Base64 string: "+e)}}static fromUint8Array(e){return new aF(rU.fromUint8Array(e))}toBase64(){return this._byteString.toBase64()}toUint8Array(){return this._byteString.toUint8Array()}toString(){return"Bytes(base64: "+this.toBase64()+")"}isEqual(e){return this._byteString.isEqual(e._byteString)}}class aB{constructor(...e){for(let t=0;t<e.length;++t)if(0===e[t].length)throw new re(n8.INVALID_ARGUMENT,"Invalid field name at argument $(i + 1). Field names must not be empty.");this._internalPath=new rv(e)}isEqual(e){return this._internalPath.isEqual(e._internalPath)}}class a${constructor(e){this._methodName=e}}class aV{constructor(e,t){if(!isFinite(e)||e<-90||e>90)throw new re(n8.INVALID_ARGUMENT,"Latitude must be a number between -90 and 90, but was: "+e);if(!isFinite(t)||t<-180||t>180)throw new re(n8.INVALID_ARGUMENT,"Longitude must be a number between -180 and 180, but was: "+t);this._lat=e,this._long=t}get latitude(){return this._lat}get longitude(){return this._long}isEqual(e){return this._lat===e._lat&&this._long===e._long}toJSON(){return{latitude:this._lat,longitude:this._long}}_compareTo(e){return rh(this._lat,e._lat)||rh(this._long,e._long)}}let aq=/^__.*__$/;function az(e){switch(e){case 0:case 2:case 1:return!0;case 3:case 4:return!1;default:throw n7()}}class aH{constructor(e,t,n,r,i,s){this.settings=e,this.databaseId=t,this.serializer=n,this.ignoreUndefinedProperties=r,void 0===i&&this.ua(),this.fieldTransforms=i||[],this.fieldMask=s||[]}get path(){return this.settings.path}get ca(){return this.settings.ca}aa(e){return new aH(Object.assign(Object.assign({},this.settings),e),this.databaseId,this.serializer,this.ignoreUndefinedProperties,this.fieldTransforms,this.fieldMask)}ha(e){var t;let n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.aa({path:n,la:!1});return r.fa(e),r}da(e){var t;let n=null===(t=this.path)||void 0===t?void 0:t.child(e),r=this.aa({path:n,la:!1});return r.ua(),r}wa(e){return this.aa({path:void 0,la:!0})}_a(e){return aX(e,this.settings.methodName,this.settings.ma||!1,this.path,this.settings.ga)}contains(e){return void 0!==this.fieldMask.find(t=>e.isPrefixOf(t))||void 0!==this.fieldTransforms.find(t=>e.isPrefixOf(t.field))}ua(){if(this.path)for(let e=0;e<this.path.length;e++)this.fa(this.path.get(e))}fa(e){if(0===e.length)throw this._a("Document fields must not be empty");if(az(this.ca)&&aq.test(e))throw this._a('Document fields cannot begin and end with "__"')}}class aW{constructor(e,t,n){this.databaseId=e,this.ignoreUndefinedProperties=t,this.serializer
30=n||o_(e)}ya(e,t,n,r=!1){return new aH({ca:e,methodName:t,ga:n,path:rv.emptyPath(),la:!1,ma:r},this.databaseId,this.serializer,this.ignoreUndefinedProperties)}}function aG(e){return!("object"!=typeof e||null===e||e instanceof Array||e instanceof Date||e instanceof rf||e instanceof aV||e instanceof aF||e instanceof ax||e instanceof a$)}let aK=RegExp("[~\\*/\\[\\]]");function aX(e,t,n,r,i){let s=r&&!r.isEmpty(),o=void 0!==i,a=`Function ${t}() called with invalid data`;n&&(a+=" (via `toFirestore()`)"),a+=". ";let l="";return(s||o)&&(l+=" (found",s&&(l+=` in field ${r}`),o&&(l+=` in document ${i}`),l+=")"),new re(n8.INVALID_ARGUMENT,a+e+l)}class aJ{constructor(e,t,n,r,i){this._firestore=e,this._userDataWriter=t,this._key=n,this._document=r,this._converter=i}get id(){return this._key.path.lastSegment()}get ref(){return new ax(this._firestore,this._converter,this._key)}exists(){return null!==this._document}data(){if(this._document){if(this._converter){let e=new aZ(this._firestore,this._userDataWriter,this._key,this._document,null);return this._converter.fromFirestore(e)}return this._userDataWriter.convertValue(this._document.data.value)}}get(e){if(this._document){let t=this._document.data.field(aY("DocumentSnapshot.get",e));if(null!==t)return this._userDataWriter.convertValue(t)}}}class aZ extends aJ{data(){return super.data()}}function aY(e,t){return"string"==typeof t?function(e,t,n){if(t.search(aK)>=0)throw aX(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`,e,!1,void 0,void 0);try{return new aB(...t.split("."))._internalPath}catch(n){throw aX(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`,e,!1,void 0,void 0)}}(e,t):t instanceof aB?t._internalPath:t._delegate._internalPath}function aQ(e){if("L"===e.limitType&&0===e.explicitOrderBy.length)throw new re(n8.UNIMPLEMENTED,"limitToLast() queries require specifying at least one orderBy() clause")}class a0{}class a1 extends a0{}function a2(e,t,...n){let r=[];for(let i of(t instanceof a0&&r.push(t),function(e){let t=e.filter(e=>e instanceof a6).length,n=e.filter(e=>e instanceof a4).length;if(t>1||t>0&&n>0)throw new re(n8.INVALID_ARGUMENT,"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.")}(r=r.concat(n)),r))e=i._apply(e);return e}class a4 extends a1{constructor(e,t,n){super(),this._field=e,this._op=t,this._value=n,this.type="where"}static _create(e,t,n){return new a4(e,t,n)}_apply(e){let t=this._parse(e);return le(e._query,t),new aR(e.firestore,e.converter,iD(e._query,t))}_parse(e){let t=function(e){let t=e._freezeSettings(),n=o_(e._databaseId);return new aW(e._databaseId,!!t.ignoreUndefinedProperties,n)}(e.firestore);return function(e,t,n,r,i,s,o){let a;if(i.isKeyField()){if("array-contains"===s||"array-contains-any"===s)throw new re(n8.INVALID_ARGUMENT,`Invalid Query. You can't perform '${s}' queries on documentId().`);if("in"===s||"not-in"===s){a8(o,s);let t=[];for(let n of o)t.push(a7(r,e,n));a={arrayValue:{values:t}}}else a=a7(r,e,o)}else"in"!==s&&"not-in"!==s&&"array-contains-any"!==s||a8(o,s),a=function(e,t,n,r=!1){return function e(t,n){if(aG(t=(0,f.m9)(t)))return function(e,t,n){if(!aG(n)||!("object"==typeof n&&null!==n&&(Object.getPrototypeOf(n)===Object.prototype||null===Object.getPrototypeOf(n)))){let r=aT(n);throw"an object"===r?t._a(e+" a custom object"):t._a(e+" "+r)}}("Unsupported field value:",n,t),function(t,n){let r={};return rA(t)?n.path&&n.path.length>0&&n.fieldMask.push(n.path):rR(t,(t,i)=>{let s=e(i,n.ha(t));null!=s&&(r[t]=s)}),{mapValue:{fields:r}}}(t,n);if(t instanceof a$)return function(e,t){if(!az(t.ca))throw t._a(`${e._methodName}() can only be used with update() and set()`);if(!t.path)throw t._a(`${e._methodName}() is not currently supported inside arrays`);let n=e._toFieldTransform(t);n&&t.fieldTransforms.push(n)}(t,n),null;if(void 0===t&&n.ignoreUndefinedProperties)return null;if(n.path&&n.fieldMask.push(n.path),t instanceof Array){if(n.settings.la&&4!==n.ca)throw n._a("Nested arrays are not supported");return function(t,n){let r=[],i=0;for(let s of t){let t=e(s,n.wa(i));null==t&&(t={nullValue:"NULL_VALUE"}),r.push(t),i++}return{arrayValue:{values:r}}}
30(t,n)}return function(e,t){if(null===(e=(0,f.m9)(e)))return{nullValue:"NULL_VALUE"};if("number"==typeof e){var n,r,i;return n=t.serializer,"number"==typeof(i=r=e)&&Number.isInteger(i)&&!rC(i)&&i<=Number.MAX_SAFE_INTEGER&&i>=Number.MIN_SAFE_INTEGER?iX(r):iK(n,r)}if("boolean"==typeof e)return{booleanValue:e};if("string"==typeof e)return{stringValue:e};if(e instanceof Date){let n=rf.fromDate(e);return{timestampValue:sN(t.serializer,n)}}if(e instanceof rf){let n=new rf(e.seconds,1e3*Math.floor(e.nanoseconds/1e3));return{timestampValue:sN(t.serializer,n)}}if(e instanceof aV)return{geoPointValue:{latitude:e.latitude,longitude:e.longitude}};if(e instanceof aF)return{bytesValue:sD(t.serializer,e._byteString)};if(e instanceof ax){let n=t.databaseId,r=e.firestore._databaseId;if(!r.isEqual(n))throw t._a(`Document reference is for database ${r.projectId}/${r.database} but should be for database ${n.projectId}/${n.database}`);return{referenceValue:sL(e.firestore._databaseId||t.databaseId,e._key.path)}}throw t._a(`Unsupported field value: ${aT(e)}`)}(t,n)}(n,e.ya(r?4:3,t))}(n,t,o,"in"===s||"not-in"===s);return ia.create(i,s,a)}(e._query,"where",t,e.firestore._databaseId,this._field,this._op,this._value)}}function a9(e,t,n){let r=aY("where",e);return a4._create(r,t,n)}class a6 extends a0{constructor(e,t){super(),this.type=e,this._queryConstraints=t}static _create(e,t){return new a6(e,t)}_parse(e){let t=this._queryConstraints.map(t=>t._parse(e)).filter(e=>e.getFilters().length>0);return 1===t.length?t[0]:il.create(t,this._getOperator())}_apply(e){let t=this._parse(e);return 0===t.getFilters().length?e:(function(e,t){let n=e;for(let e of t.getFlattenedFilters())le(n,e),n=iD(n,e)}(e._query,t),new aR(e.firestore,e.converter,iD(e._query,t)))}_getQueryConstraints(){return this._queryConstraints}_getOperator(){return"and"===this.type?"and":"or"}}class a3 extends a1{constructor(e,t){super(),this._field=e,this._direction=t,this.type="orderBy"}static _create(e,t){return new a3(e,t)}_apply(e){let t=function(e,t,n){if(null!==e.startAt)throw new re(n8.INVALID_ARGUMENT,"Invalid query. You must not call startAt() or startAfter() before calling orderBy().");if(null!==e.endAt)throw new re(n8.INVALID_ARGUMENT,"Invalid query. You must not call endAt() or endBefore() before calling orderBy().");let r=new is(t,n);return function(e,t){if(null===ix(e)){let n=iR(e);null!==n&&lt(e,n,t.field)}}(e,r),r}(e._query,this._field,this._direction);return new aR(e.firestore,e.converter,function(e,t){let n=e.explicitOrderBy.concat([t]);return new iI(e.path,e.collectionGroup,n,e.filters.slice(),e.limit,e.limitType,e.startAt,e.endAt)}(e._query,t))}}function a5(e,t="asc"){let n=aY("orderBy",e);return a3._create(n,t)}function a7(e,t,n){if("string"==typeof(n=(0,f.m9)(n))){if(""===n)throw new re(n8.INVALID_ARGUMENT,"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.");if(!iA(t)&&-1!==n.indexOf("/"))throw new re(n8.INVALID_ARGUMENT,`Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);let r=t.path.child(rg.fromString(n));if(!r_.isDocumentKey(r))throw new re(n8.INVALID_ARGUMENT,`Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);return r1(e,new r_(r))}if(n instanceof ax)return r1(e,n._key);throw new re(n8.INVALID_ARGUMENT,`Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${aT(n)}.`)}function a8(e,t){if(!Array.isArray(e)||0===e.length)throw new re(n8.INVALID_ARGUMENT,`Invalid Query. A non-empty array is required for '${t.toString()}' filters.`)}function le(e,t){if(t.isInequality()){let n=iR(e),r=t.field;if(null!==n&&!n.isEqual(r))throw new re(n8.INVALID_ARGUMENT,`Invalid query. All where filters with an inequality (<, <=, !=, not-in, >, or >=) must be on the same field. But you have inequality filters on '${n.toString()}' and '${r.toString()}'`);let i=ix(e);null!==i&&lt(e,r,i)}let n=function(e,t){for(let n of e)for(let e of n.getFlattenedFilters())if(t.indexOf(e.op)>=0)return e.op;return null}(e.filters,function(e){switch(e){case"!=":return["!=","not-in"];case"array-contains-any":case"in":return["not-in"];case"not-in":return["array-contains-any","in","not-in","!="];default:return[]}}(t.op));
30if(null!==n)throw n===t.op?new re(n8.INVALID_ARGUMENT,`Invalid query. You cannot use more than one '${t.op.toString()}' filter.`):new re(n8.INVALID_ARGUMENT,`Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`)}function lt(e,t,n){if(!n.isEqual(t))throw new re(n8.INVALID_ARGUMENT,`Invalid query. You have a where filter with an inequality (<, <=, !=, not-in, >, or >=) on field '${t.toString()}' and so you must also use '${t.toString()}' as your first argument to orderBy(), but your first orderBy() is on field '${n.toString()}' instead.`)}class ln{convertValue(e,t="none"){switch(rX(e)){case 0:return null;case 1:return e.booleanValue;case 2:return r$(e.integerValue||e.doubleValue);case 3:return this.convertTimestamp(e.timestampValue);case 4:return this.convertServerTimestamp(e,t);case 5:return e.stringValue;case 6:return this.convertBytes(rV(e.bytesValue));case 7:return this.convertReference(e.referenceValue);case 8:return this.convertGeoPoint(e.geoPointValue);case 9:return this.convertArray(e.arrayValue,t);case 10:return this.convertObject(e.mapValue,t);default:throw n7()}}convertObject(e,t){return this.convertObjectMap(e.fields,t)}convertObjectMap(e,t="none"){let n={};return rR(e,(e,r)=>{n[e]=this.convertValue(r,t)}),n}convertGeoPoint(e){return new aV(r$(e.latitude),r$(e.longitude))}convertArray(e,t){return(e.values||[]).map(e=>this.convertValue(e,t))}convertServerTimestamp(e,t){switch(t){case"previous":let n=rz(e);return null==n?null:this.convertValue(n,t);case"estimate":return this.convertTimestamp(rH(e));default:return null}}convertTimestamp(e){let t=rB(e);return new rf(t.seconds,t.nanos)}convertDocumentKey(e,t){let n=rg.fromString(e);sq(n)||n7();let r=new rG(n.get(1),n.get(3)),i=new r_(n.popFirst(5));return r.isEqual(t)||n6(`Document ${i} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`),i}}class lr{constructor(e,t){this.hasPendingWrites=e,this.fromCache=t}isEqual(e){return this.hasPendingWrites===e.hasPendingWrites&&this.fromCache===e.fromCache}}class li extends aJ{constructor(e,t,n,r,i,s){super(e,t,n,r,s),this._firestore=e,this._firestoreImpl=e,this.metadata=i}exists(){return super.exists()}data(e={}){if(this._document){if(this._converter){let t=new ls(this._firestore,this._userDataWriter,this._key,this._document,this.metadata,null);return this._converter.fromFirestore(t,e)}return this._userDataWriter.convertValue(this._document.data.value,e.serverTimestamps)}}get(e,t={}){if(this._document){let n=this._document.data.field(aY("DocumentSnapshot.get",e));if(null!==n)return this._userDataWriter.convertValue(n,t.serverTimestamps)}}}class ls extends li{data(e={}){return super.data(e)}}class lo{constructor(e,t,n,r){this._firestore=e,this._userDataWriter=t,this._snapshot=r,this.metadata=new lr(r.hasPendingWrites,r.fromCache),this.query=n}get docs(){let e=[];return this.forEach(t=>e.push(t)),e}get size(){return this._snapshot.docs.size}get empty(){return 0===this.size}forEach(e,t){this._snapshot.docs.forEach(n=>{e.call(t,new ls(this._firestore,this._userDataWriter,n.key,n,new lr(this._snapshot.mutatedKeys.has(n.key),this._snapshot.fromCache),this.query.converter))})}docChanges(e={}){let t=!!e.includeMetadataChanges;if(t&&this._snapshot.excludesMetadataChanges)throw new re(n8.INVALID_ARGUMENT,"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().");return this._cachedChanges&&this._cachedChangesIncludeMetadataChanges===t||(this._cachedChanges=function(e,t){if(e._snapshot.oldDocs.isEmpty()){let t=0;return e._snapshot.docChanges.map(n=>{let r=new ls(e._firestore,e._userDataWriter,n.doc.key,n.doc,new lr(e._snapshot.mutatedKeys.has(n.doc.key),e._snapshot.fromCache),e.query.converter);return n.doc,{type:"added",doc:r,oldIndex:-1,newIndex:t++}})}{let n=e._snapshot.oldDocs;return e._snapshot.docChanges.filter(e=>t||3!==e.type).map(t=>{let r=new ls(e._firestore,e._userDataWriter,t.doc.key,t.doc,new lr(e._snapshot.mutatedKeys.has(t.doc.key),e._snapshot.fromCache),e.query.converter),i=-1,s=-1;return 0!==t.type&&(i=n.indexOf(t.doc.key),n=n.delete(t.doc.key)),1!==t.type&&(s=(n=n.add(t.doc)).indexOf(t.doc.key)),{type:function(e){switch(e){case 0:return"added";case 2:case 3:return"modified";case 1:return"removed";default:return n7()}}(t.type),doc:r,oldIndex:i,newIndex:s}})}}(this,t),this._cachedChangesIncludeMetadataChanges=t),this._cachedChanges}}function la(e){e=aI(e,ax);let t=aI(e.firestore,aL);return(function(e,t,n={}){let r=new rt;return e.asyncQueue.enqueueAndForget(async()=>(function(e,t,n,r,i){let s=new ad({next:s=>{t.enqueueAndForget(()=>oJ(e,o));let a=s.docs.has(n);!a&&s.fromCache?i.reject(new re(n8.UNAVAILABLE,"Failed to get document because the client is offline.")):a&&s.fromCache&&r&&"server"===r.source?i.reject(new re(n8.UNAVAILABLE,'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to "server" to retrieve the cached document.)')):i.resolve(s)},error:e=>i.reject(e)}),o=new o0(ik(n.path),s,{includeMetadataChanges:!0,Ku:!0});return oX(e,o)})(await av(e),e.asyncQueue,t,n,r)),r.promise})(aj(t),e._key).then(n=>lh(t,e,n))}class ll extends ln{constructor(e){super(),this.firestore=e}convertBytes(e){return new aF(e)}convertReference(e){let t=this.convertDocumentKey(e,this.firestore._databaseId);
30return new ax(this.firestore,null,t)}}function lu(e){e=aI(e,aR);let t=aI(e.firestore,aL),n=aj(t),r=new ll(t);return aQ(e._query),(function(e,t,n={}){let r=new rt;return e.asyncQueue.enqueueAndForget(async()=>(function(e,t,n,r,i){let s=new o0(n,new ad({next:n=>{t.enqueueAndForget(()=>oJ(e,s)),n.fromCache&&"server"===r.source?i.reject(new re(n8.UNAVAILABLE,'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to "server" to retrieve the cached documents.)')):i.resolve(n)},error:e=>i.reject(e)}),{includeMetadataChanges:!0,Ku:!0});return oX(e,s)})(await av(e),e.asyncQueue,t,n,r)),r.promise})(n,e._query).then(n=>new lo(t,r,e,n))}function lc(e,...t){var n,r,i;let s,o,a;e=(0,f.m9)(e);let l={includeMetadataChanges:!1},u=0;"object"!=typeof t[0]||aM(t[u])||(l=t[u],u++);let c={includeMetadataChanges:l.includeMetadataChanges};if(aM(t[u])){let e=t[u];t[u]=null===(n=e.next)||void 0===n?void 0:n.bind(e),t[u+1]=null===(r=e.error)||void 0===r?void 0:r.bind(e),t[u+2]=null===(i=e.complete)||void 0===i?void 0:i.bind(e)}if(e instanceof ax)o=aI(e.firestore,aL),a=ik(e._key.path),s={next:n=>{t[u]&&t[u](lh(o,e,n))},error:t[u+1],complete:t[u+2]};else{let n=aI(e,aR);o=aI(n.firestore,aL),a=n._query;let r=new ll(o);s={next:e=>{t[u]&&t[u](new lo(o,r,n,e))},error:t[u+1],complete:t[u+2]},aQ(e._query)}return function(e,t,n,r){let i=new ad(r),s=new o0(t,i,n);return e.asyncQueue.enqueueAndForget(async()=>oX(await av(e),s)),()=>{i.Dc(),e.asyncQueue.enqueueAndForget(async()=>oJ(await av(e),s))}}(aj(o),a,c,s)}function lh(e,t,n){let r=n.docs.get(t._key),i=new ll(e);return new li(e,i,t._key,r,new lr(n.hasPendingWrites,n.fromCache),t.converter)}!function(e,t=!0){n1=c.Jn,(0,c.Xd)(new h.wA("firestore",(e,{instanceIdentifier:n,options:r})=>{let i=e.getProvider("app").getImmediate(),s=new aL(new rs(e.getProvider("auth-internal")),new ru(e.getProvider("app-check-internal")),function(e,t){if(!Object.prototype.hasOwnProperty.apply(e.options,["projectId"]))throw new re(n8.INVALID_ARGUMENT,'"projectId" not provided in firebase.initializeApp.');return new rG(e.options.projectId,t)}(i,n),i);return r=Object.assign({useFetchStreams:t},r),s._setSettings(r),s},"PUBLIC").setMultipleInstances(!0)),(0,c.KN)(nQ,"3.13.0",void 0),(0,c.KN)(nQ,"3.13.0","esm2017")}()},86650:function(e,t,n){"use strict";n.d(t,{Jt:function(){return ey},cF:function(){return e_},iH:function(){return ev},B0:function(){return eg}});var r,i,s,o,a=n(25816),l=n(74444),u=n(8463);let c="firebasestorage.googleapis.com",h="storageBucket";class d extends l.ZR{constructor(e,t,n=0){super(f(e),`Firebase Storage: ${t} (${f(e)})`),this.status_=n,this.customData={serverResponse:null},this._baseMessage=this.message,Object.setPrototypeOf(this,d.prototype)}get status(){return this.status_}set status(e){this.status_=e}_codeEquals(e){return f(e)===this.code}get serverResponse(){return this.customData.serverResponse}set serverResponse(e){this.customData.serverResponse=e,this.customData.serverResponse?this.message=`${this._baseMessage}
31${this.customData.serverResponse}`:this.message=this._baseMessage}}function f(e){return"storage/"+e}function p(){return new d(s.UNKNOWN,"An unknown error occurred, please check the error payload for server response.")}function m(){return new d(s.RETRY_LIMIT_EXCEEDED,"Max retry time for operation exceeded, please try again.")}function g(){return new d(s.CANCELED,"User canceled the upload/download.")}function y(){return new d(s.CANNOT_SLICE_BLOB,"Cannot slice blob for upload. Please retry the upload.")}function v(e){return new d(s.INVALID_ARGUMENT,e)}function _(){return new d(s.APP_DELETED,"The Firebase app was deleted.")}function b(e,t){return new d(s.INVALID_FORMAT,"String does not match format '"+e+"': "+t)}function w(e){throw new d(s.INTERNAL_ERROR,"Internal error: "+e)}(r=s||(s={})).UNKNOWN="unknown",r.OBJECT_NOT_FOUND="object-not-found",r.BUCKET_NOT_FOUND="bucket-not-found",r.PROJECT_NOT_FOUND="project-not-found",r.QUOTA_EXCEEDED="quota-exceeded",r.UNAUTHENTICATED="unauthenticated",r.UNAUTHORIZED="unauthorized",r.UNAUTHORIZED_APP="unauthorized-app",r.RETRY_LIMIT_EXCEEDED="retry-limit-exceeded",r.INVALID_CHECKSUM="invalid-checksum",r.CANCELED="canceled",r.INVALID_EVENT_NAME="invalid-event-name",r.INVALID_URL="invalid-url",r.INVALID_DEFAULT_BUCKET="invalid-default-bucket",r.NO_DEFAULT_BUCKET="no-default-bucket",r.CANNOT_SLICE_BLOB="cannot-slice-blob",r.SERVER_FILE_WRONG_SIZE="server-file-wrong-size",r.NO_DOWNLOAD_URL="no-download-url",r.INVALID_ARGUMENT="invalid-argument",r.INVALID_ARGUMENT_COUNT="invalid-argument-count",r.APP_DELETED="app-deleted",r.INVALID_ROOT_OPERATION="invalid-root-operation",r.INVALID_FORMAT="invalid-format",r.INTERNAL_ERROR="internal-error",r.UNSUPPORTED_ENVIRONMENT="unsupported-environment";class E{constructor(e,t){this.bucket=e,this.path_=t}get path(){return this.path_}get isRoot(){return 0===this.path.length}fullServerUrl(){let e=encodeURIComponent;return"/b/"+e(this.bucket)+"/o/"+e(this.path)}bucketOnlyServerUrl(){return"/b/"+encodeURIComponent(this.bucket)+"/o"}static makeFromBucketSpec(e,t){let n;try{n=E.makeFromUrl(e,t)}catch(t){return new E(e,"")}if(""===n.path)return n;throw new d(s.INVALID_DEFAULT_BUCKET,"Invalid default bucket '"+e+"'.")}static makeFromUrl(e,t){let n=null,r="([A-Za-z0-9.\\-_]+)",i=RegExp("^gs://"+r+"(
31/(.*))?$","i");function o(e){e.path_=decodeURIComponent(e.path)}let a=t.replace(/[.]/g,"\\."),l=[{regex:i,indices:{bucket:1,path:3},postModify:function(e){"/"===e.path.charAt(e.path.length-1)&&(e.path_=e.path_.slice(0,-1))}},{regex:RegExp(`^https?://${a}/v[A-Za-z0-9_]+/b/${r}/o(/([^?#]*).*)?$`,"i"),indices:{bucket:1,path:3},postModify:o},{regex:RegExp(`^https?://${t===c?"(?:storage.googleapis.com|storage.cloud.google.com)":t}/${r}/([^?#]*)`,"i"),indices:{bucket:1,path:2},postModify:o}];for(let t=0;t<l.length;t++){let r=l[t],i=r.regex.exec(e);if(i){let e=i[r.indices.bucket],t=i[r.indices.path];t||(t=""),n=new E(e,t),r.postModify(n);break}}if(null==n)throw new d(s.INVALID_URL,"Invalid URL '"+e+"'.");return n}}class S{constructor(e){this.promise_=Promise.reject(e)}getPromise(){return this.promise_}cancel(e=!1){}}function T(e){return"string"==typeof e||e instanceof String}function I(e){return k()&&e instanceof Blob}function k(){return"undefined"!=typeof Blob&&!(0,l.UG)()}function C(e,t,n,r){if(r<t)throw v(`Invalid value for '${e}'. Expected ${t} or greater.`);if(r>n)throw v(`Invalid value for '${e}'. Expected ${n} or less.`)}function x(e,t,n){let r=t;return null==n&&(r=`https://${t}`),`${n}://${r}/v0${e}`}function R(e){let t=encodeURIComponent,n="?";for(let r in e)e.hasOwnProperty(r)&&(n=n+(t(r)+"=")+t(e[r])+"&");return n.slice(0,-1)}function A(e,t){let n=e>=500&&e<600,r=-1!==[408,429].indexOf(e),i=-1!==t.indexOf(e);return n||r||i}(i=o||(o={}))[i.NO_ERROR=0]="NO_ERROR",i[i.NETWORK_ERROR=1]="NETWORK_ERROR",i[i.ABORT=2]="ABORT";class O{constructor(e,t,n,r,i,s,o,a,l,u,c,h=!0){this.url_=e,this.method_=t,this.headers_=n,this.body_=r,this.successCodes_=i,this.additionalRetryCodes_=s,this.callback_=o,this.errorCallback_=a,this.timeout_=l,this.progressCallback_=u,this.connectionFactory_=c,this.retry=h,this.pendingConnection_=null,this.backoffId_=null,this.canceled_=!1,this.appDelete_=!1,this.promise_=new Promise((e,t)=>{this.resolve_=e,this.reject_=t,this.start_()})}start_(){let e=(e,t)=>{let n=this.resolve_,r=this.reject_,i=t.connection;if(t.wasSuccessCode)try{let e=this.callback_(i,i.getResponse());void 0!==e?n(e):n()}catch(e){r(e)}else if(null!==i){let e=p();e.serverResponse=i.getErrorText(),r(this.errorCallback_?this.errorCallback_(i,e):e)}else r(t.canceled?this.appDelete_?_():g():m())};this.canceled_?e(!1,new N(!1,null,!0)):this.backoffId_=function(e,t,n){let r=1,i=null,s=null,o=!1,a=0,l=!1;function u(...e){l||(l=!0,t.apply(null,e))}function c(t){i=setTimeout(()=>{i=null,e(d,2===a)},t)}function h(){s&&clearTimeout(s)}function d(e,...t){let n;if(l){h();return}if(e||2===a||o){h(),u.call(null,e,...t);return}r<64&&(r*=2),1===a?(a=2,n=0):n=(r+Math.random())*1e3,c(n)}let f=!1;function p(e){!f&&(f=!0,h(),!l&&(null!==i?(e||(a=2),clearTimeout(i),c(0)):e||(a=1)))}return c(0),s=setTimeout(()=>{o=!0,p(!0)},n),p}((e,t)=>{if(t){e(!1,new N(!1,null,!0));return}let n=this.connectionFactory_();this.pendingConnection_=n;let r=e=>{let t=e.loaded,n=e.lengthComputable?e.total:-1;null!==this.progressCallback_&&this.progressCallback_(t,n)};null!==this.progressCallback_&&n.addUploadProgressListener(r),n.send(this.url_,this.method_,this.body_,this.headers_).then(()=>{null!==this.progressCallback_&&n.removeUploadProgressListener(r),this.pendingConnection_=null;let t=n.getErrorCode()===o.NO_ERROR,i=n.getStatus();if(!t||A(i,this.additionalRetryCodes_)&&this.retry){e(!1,new N(!1,null,n.getErrorCode()===o.ABORT));return}e(!0,new N(-1!==this.successCodes_.indexOf(i),n))})},e,this.timeout_)}getPromise(){return this.promise_}cancel(e){this.canceled_=!0,this.appDelete_=e||!1,null!==this.backoffId_&&(0,this.backoffId_)(!1),null!==this.pendingConnection_&&this.pendingConnection_.abort()}}class N{constructor(e,t,n){this.wasSuccessCode=e,this.connection=t,this.canceled=!!n}}function D(...e){let t="undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:void 0;if(void 0!==t){let n=new t;for(let t=0;t<e.length;t++)n.append(e[t]);return n.getBlob()}if(k())return new Blob(e);throw new d(s.UNSUPPORTED_ENVIRONMENT,"This browser doesn't seem to supp
31ort creating Blobs")}let M={RAW:"raw",BASE64:"base64",BASE64URL:"base64url",DATA_URL:"data_url"};class L{constructor(e,t){this.data=e,this.contentType=t||null}}function P(e){let t=[];for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r<=127?t.push(r):r<=2047?t.push(192|r>>6,128|63&r):(64512&r)==55296?n<e.length-1&&(64512&e.charCodeAt(n+1))==56320?(r=65536|(1023&r)<<10|1023&e.charCodeAt(++n),t.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)):t.push(239,191,189):(64512&r)==56320?t.push(239,191,189):t.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(t)}function j(e,t){let n;switch(e){case M.BASE64:{let n=-1!==t.indexOf("-"),r=-1!==t.indexOf("_");if(n||r)throw b(e,"Invalid character '"+(n?"-":"_")+"' found: is it base64url encoded?");break}case M.BASE64URL:{let n=-1!==t.indexOf("+"),r=-1!==t.indexOf("/");if(n||r)throw b(e,"Invalid character '"+(n?"+":"/")+"' found: is it base64 encoded?");t=t.replace(/-/g,"+").replace(/_/g,"/")}}try{n=function(e){if("undefined"==typeof atob)throw new d(s.UNSUPPORTED_ENVIRONMENT,"base-64 is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.");return atob(e)}(t)}catch(t){if(t.message.includes("polyfill"))throw t;throw b(e,"Invalid character found")}let r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r}class U{constructor(e){var t;this.base64=!1,this.contentType=null;let n=e.match(/^data:([^,]+)?,/);if(null===n)throw b(M.DATA_URL,"Must be formatted 'data:[<mediatype>][;base64],<data>");let r=n[1]||null;null!=r&&(this.base64=(t=";base64",r.length>=t.length&&r.substring(r.length-t.length)===t),this.contentType=this.base64?r.substring(0,r.length-7):r),this.rest=e.substring(e.indexOf(",")+1)}}class F{constructor(e,t){let n=0,r="";I(e)?(this.data_=e,n=e.size,r=e.type):e instanceof ArrayBuffer?(t?this.data_=new Uint8Array(e):(this.data_=new Uint8Array(e.byteLength),this.data_.set(new Uint8Array(e))),n=this.data_.length):e instanceof Uint8Array&&(t?this.data_=e:(this.data_=new Uint8Array(e.length),this.data_.set(e)),n=e.length),this.size_=n,this.type_=r}size(){return this.size_}type(){return this.type_}slice(e,t){if(!I(this.data_))return new F(new Uint8Array(this.data_.buffer,e,t-e),!0);{var n;let r=(n=this.data_).webkitSlice?n.webkitSlice(e,t):n.mozSlice?n.mozSlice(e,t):n.slice?n.slice(e,t):null;return null===r?null:new F(r)}}static getBlob(...e){if(k()){let t=e.map(e=>e instanceof F?e.data_:e);return new F(D.apply(null,t))}{let t=e.map(e=>T(e)?function(e,t){switch(e){case M.RAW:return new L(P(t));case M.BASE64:case M.BASE64URL:return new L(j(e,t));case M.DATA_URL:return new L(function(e){let t=new U(e);return t.base64?j(M.BASE64,t.rest):function(e){let t;try{t=decodeURIComponent(e)}catch(e){throw b(M.DATA_URL,"Malformed data URL.")}return P(t)}(t.rest)}(t),new U(t).contentType)}throw p()}(M.RAW,e).data:e.data_),n=0;t.forEach(e=>{n+=e.byteLength});let r=new Uint8Array(n),i=0;return t.forEach(e=>{for(let t=0;t<e.length;t++)r[i++]=e[t]}),new F(r,!0)}}uploadData(){return this.data_}}function B(e){var t;let n;try{n=JSON.parse(e)}catch(e){return null}return"object"!=typeof(t=n)||Array.isArray(t)?null:n}function $(e){let t=e.lastIndexOf("/",e.length-2);return -1===t?e:e.slice(t+1)}function V(e,t){return t}class q{constructor(e,t,n,r){this.server=e,this.local=t||e,this.writable=!!n,this.xform=r||V}}let z=null;function H(){if(z)return z;let e=[];e.push(new q("bucket")),e.push(new q("generation")),e.push(new q("metageneration")),e.push(new q("name","fullPath",!0));let t=new q("name");t.xform=function(e,t){return!T(t)||t.length<2?t:$(t)},e.push(t);let n=new q("size");return n.xform=function(e,t){return void 0!==t?Number(t):t},e.push(n),e.push(new q("timeCreated")),e.push(new q("updated")),e.push(new q("md5Hash",null,!0)),e.push(new q("cacheControl",null,!0)),e.push(new q("contentDisposition",null,!0)),e.push(new q("contentEncoding",null,!0)),e.push(new q("contentLanguage",null,!0)),e.push(new q("contentType",null,!0)),e.push(new q("metadata","customMetadata",!0)),z=e}function W(e,t,n){let r=B(t);return null===r?null:function(e,t,n){let r={};r.type="file";let i=n.length;for(let e=0;e<i;e++){let i=n[e];r[i.local]=i.xform(r,t[i.server])}return Object.defineProperty(r,"ref",{get:function(){let t=new E(r.bucket,r.fullPath);return e._makeStorageReference(t)}}),r}(e,r,n)}function G(e,t){let n={},r=t.length;for(let i=0;i<r;i++){let r=t[i];r.writable&&(n[r.server]=e[r.local])}return JSON.stringify(n)}class K{constructor(e,t,n,r){this.url=e,this.method=t,this.handler=n,this.timeout=r,this.urlParam
31s={},this.headers={},this.body=null,this.errorHandler=null,this.progressCallback=null,this.successCodes=[200],this.additionalRetryCodes=[]}}function X(e){if(!e)throw p()}function J(e,t){return function(n,r){let i=W(e,r,t);return X(null!==i),i}}function Z(e){return function(t,n){var r,i;let o;return 401===t.getStatus()?o=t.getErrorText().includes("Firebase App Check token is invalid")?new d(s.UNAUTHORIZED_APP,"This app does not have permission to access Firebase Storage on this project."):new d(s.UNAUTHENTICATED,"User is not authenticated, please authenticate using Firebase Authentication and try again."):402===t.getStatus()?(r=e.bucket,o=new d(s.QUOTA_EXCEEDED,"Quota for bucket '"+r+"' exceeded, please view quota on https://firebase.google.com/pricing/.")):403===t.getStatus()?(i=e.path,o=new d(s.UNAUTHORIZED,"User does not have permission to access '"+i+"'.")):o=n,o.status=t.getStatus(),o.serverResponse=n.serverResponse,o}}function Y(e){let t=Z(e);return function(n,r){let i=t(n,r);if(404===n.getStatus()){var o;o=e.path,i=new d(s.OBJECT_NOT_FOUND,"Object '"+o+"' does not exist.")}return i.serverResponse=r.serverResponse,i}}function Q(e,t,n){let r=Object.assign({},n);return r.fullPath=e.path,r.size=t.size(),!r.contentType&&(r.contentType=t&&t.type()||"application/octet-stream"),r}class ee{constructor(e,t,n,r){this.current=e,this.total=t,this.finalized=!!n,this.metadata=r||null}}function et(e,t){let n=null;try{n=e.getResponseHeader("X-Goog-Upload-Status")}catch(e){X(!1)}return X(!!n&&-1!==(t||["active"]).indexOf(n)),n}let en={RUNNING:"running",PAUSED:"paused",SUCCESS:"success",CANCELED:"canceled",ERROR:"error"};function er(e){switch(e){case"running":case"pausing":case"canceling":return en.RUNNING;case"paused":return en.PAUSED;case"success":return en.SUCCESS;case"canceled":return en.CANCELED;default:return en.ERROR}}class ei{constructor(e,t,n){"function"==typeof e||null!=t||null!=n?(this.next=e,this.error=null!=t?t:void 0,this.complete=null!=n?n:void 0):(this.next=e.next,this.error=e.error,this.complete=e.complete)}}function es(e){return(...t)=>{Promise.resolve().then(()=>e(...t))}}class eo{constructor(){this.sent_=!1,this.xhr_=new XMLHttpRequest,this.initXhr(),this.errorCode_=o.NO_ERROR,this.sendPromise_=new Promise(e=>{this.xhr_.addEventListener("abort",()=>{this.errorCode_=o.ABORT,e()}),this.xhr_.addEventListener("error",()=>{this.errorCode_=o.NETWORK_ERROR,e()}),this.xhr_.addEventListener("load",()=>{e()})})}send(e,t,n,r){if(this.sent_)throw w("cannot .send() more than once");if(this.sent_=!0,this.xhr_.open(t,e,!0),void 0!==r)for(let e in r)r.hasOwnProperty(e)&&this.xhr_.setRequestHeader(e,r[e].toString());return void 0!==n?this.xhr_.send(n):this.xhr_.send(),this.sendPromise_}getErrorCode(){if(!this.sent_)throw w("cannot .getErrorCode() before sending");return this.errorCode_}getStatus(){if(!this.sent_)throw w("cannot .getStatus() before sending");try{return this.xhr_.status}catch(e){return -1}}getResponse(){if(!this.sent_)throw w("cannot .getResponse() before sending");return this.xhr_.response}getErrorText(){if(!this.sent_)throw w("cannot .getErrorText() before sending");return this.xhr_.statusText}abort(){this.xhr_.abort()}getResponseHeader(e){return this.xhr_.getResponseHeader(e)}addUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.addEventListener("progress",e)}removeUploadProgressListener(e){null!=this.xhr_.upload&&this.xhr_.upload.removeEventListener("progress",e)}}class ea extends eo{initXhr(){this.xhr_.responseType="text"}}function el(){return new ea}class eu{constructor(e,t,n=null){this._transferred=0,this._needToFetchStatus=!1,this._needToFetchMetadata=!1,this._observers=[],this._error=void 0,this._uploadUrl=void 0,this._request=void 0,this._chunkMultiplier=1,this._resolve=void 0,this._reject=void 0,this._ref=e,this._blob=t,this._metadata=n,this._mappings=H(),this._resumable=this._shouldDoResumable(this._blob),this._state="running",this._errorHandler=e=>{if(this._request=void 0,this._chunkMultiplier=1,e._codeEquals(s.CANCELED))this._needToFetchStatus=!0,this.completeTransitions_();else{let t=this.isExponentialBackoffExpired();if(A(e.status,[])){if(t)e=m();else{this.sleepTime=Math.max(2*this.sleepTime,1e3),this._needToFetchStatus=!0,this.completeTransitions_();return}}this._error=e,this._transition("error")}},this._metadataErrorHandler=e=>{this._request=void 0,e._codeEquals(s.CANCELED)?this.completeTransitions_():(this._error=e,this._transition("error"))},this.sleepTime=0,this.maxSleepTime=this._ref.storage.maxUploadRetryTime,this._promise=new Promise((e,t)=>
31{this._resolve=e,this._reject=t,this._start()}),this._promise.then(null,()=>{})}isExponentialBackoffExpired(){return this.sleepTime>this.maxSleepTime}_makeProgressCallback(){let e=this._transferred;return t=>this._updateProgress(e+t)}_shouldDoResumable(e){return e.size()>262144}_start(){"running"===this._state&&void 0===this._request&&(this._resumable?void 0===this._uploadUrl?this._createResumable():this._needToFetchStatus?this._fetchStatus():this._needToFetchMetadata?this._fetchMetadata():this.pendingTimeout=setTimeout(()=>{this.pendingTimeout=void 0,this._continueUpload()},this.sleepTime):this._oneShotUpload())}_resolveToken(e){Promise.all([this._ref.storage._getAuthToken(),this._ref.storage._getAppCheckToken()]).then(([t,n])=>{switch(this._state){case"running":e(t,n);break;case"canceling":this._transition("canceled");break;case"pausing":this._transition("paused")}})}_createResumable(){this._resolveToken((e,t)=>{let n=function(e,t,n,r,i){let s=t.bucketOnlyServerUrl(),o=Q(t,r,i),a={name:o.fullPath},l=x(s,e.host,e._protocol),u={"X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${r.size()}`,"X-Goog-Upload-Header-Content-Type":o.contentType,"Content-Type":"application/json; charset=utf-8"},c=G(o,n),h=new K(l,"POST",function(e){let t;et(e);try{t=e.getResponseHeader("X-Goog-Upload-URL")}catch(e){X(!1)}return X(T(t)),t},e.maxUploadRetryTime);return h.urlParams=a,h.headers=u,h.body=c,h.errorHandler=Z(t),h}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(n,el,e,t);this._request=r,r.getPromise().then(e=>{this._request=void 0,this._uploadUrl=e,this._needToFetchStatus=!1,this.completeTransitions_()},this._errorHandler)})}_fetchStatus(){let e=this._uploadUrl;this._resolveToken((t,n)=>{let r=function(e,t,n,r){let i=new K(n,"POST",function(e){let t=et(e,["active","final"]),n=null;try{n=e.getResponseHeader("X-Goog-Upload-Size-Received")}catch(e){X(!1)}n||X(!1);let i=Number(n);return X(!isNaN(i)),new ee(i,r.size(),"final"===t)},e.maxUploadRetryTime);return i.headers={"X-Goog-Upload-Command":"query"},i.errorHandler=Z(t),i}(this._ref.storage,this._ref._location,e,this._blob),i=this._ref.storage._makeRequest(r,el,t,n);this._request=i,i.getPromise().then(e=>{this._request=void 0,this._updateProgress(e.current),this._needToFetchStatus=!1,e.finalized&&(this._needToFetchMetadata=!0),this.completeTransitions_()},this._errorHandler)})}_continueUpload(){let e=262144*this._chunkMultiplier,t=new ee(this._transferred,this._blob.size()),n=this._uploadUrl;this._resolveToken((r,i)=>{let o;try{o=function(e,t,n,r,i,o,a,l){let u=new ee(0,0);if(a?(u.current=a.current,u.total=a.total):(u.current=0,u.total=r.size()),r.size()!==u.total)throw new d(s.SERVER_FILE_WRONG_SIZE,"Server recorded incorrect upload file size, please retry the upload.");let c=u.total-u.current,h=c;i>0&&(h=Math.min(h,i));let f=u.current,p=f+h,m={"X-Goog-Upload-Command":0===h?"finalize":c===h?"upload, finalize":"upload","X-Goog-Upload-Offset":`${u.current}`},g=r.slice(f,p);if(null===g)throw y();let v=new K(n,"POST",function(e,n){let i;let s=et(e,["active","final"]),a=u.current+h,l=r.size();return i="final"===s?J(t,o)(e,n):null,new ee(a,l,"final"===s,i)},t.maxUploadRetryTime);return v.headers=m,v.body=g.uploadData(),v.progressCallback=l||null,v.errorHandler=Z(e),v}(this._ref._location,this._ref.storage,n,this._blob,e,this._mappings,t,this._makeProgressCallback())}catch(e){this._error=e,this._transition("error");return}let a=this._ref.storage._makeRequest(o,el,r,i,!1);this._request=a,a.getPromise().then(e=>{this._increaseMultiplier(),this._request=void 0,this._updateProgress(e.current),e.finalized?(this._metadata=e.metadata,this._transition("success")):this.completeTransitions_()},this._errorHandler)})}_increaseMultiplier(){262144*this._chunkMultiplier*2<33554432&&(this._chunkMultiplier*=2)}_fetchMetadata(){this._resolveToken((e,t)=>{let n=function(e,t,n){let r=x(t.fullServerUrl(),e.host,e._protocol),i=e.maxOperationRetryTime,s=new K(r,"GET",J(e,n),i);return s.errorHandler=Y(t),s}(this._ref.storage,this._ref._location,this._mappings),r=this._ref.storage._makeRequest
31(n,el,e,t);this._request=r,r.getPromise().then(e=>{this._request=void 0,this._metadata=e,this._transition("success")},this._metadataErrorHandler)})}_oneShotUpload(){this._resolveToken((e,t)=>{let n=function(e,t,n,r,i){let s=t.bucketOnlyServerUrl(),o={"X-Goog-Upload-Protocol":"multipart"},a=function(){let e="";for(let t=0;t<2;t++)e+=Math.random().toString().slice(2);return e}();o["Content-Type"]="multipart/related; boundary="+a;let l=Q(t,r,i),u="--"+a+"\r\nContent-Type: application/json; charset=utf-8\r\n\r\n"+G(l,n)+"\r\n--"+a+"\r\nContent-Type: "+l.contentType+"\r\n\r\n",c=F.getBlob(u,r,"\r\n--"+a+"--");if(null===c)throw y();let h={name:l.fullPath},d=x(s,e.host,e._protocol),f=e.maxUploadRetryTime,p=new K(d,"POST",J(e,n),f);return p.urlParams=h,p.headers=o,p.body=c.uploadData(),p.errorHandler=Z(t),p}(this._ref.storage,this._ref._location,this._mappings,this._blob,this._metadata),r=this._ref.storage._makeRequest(n,el,e,t);this._request=r,r.getPromise().then(e=>{this._request=void 0,this._metadata=e,this._updateProgress(this._blob.size()),this._transition("success")},this._errorHandler)})}_updateProgress(e){let t=this._transferred;this._transferred=e,this._transferred!==t&&this._notifyObservers()}_transition(e){if(this._state!==e)switch(e){case"canceling":case"pausing":this._state=e,void 0!==this._request?this._request.cancel():this.pendingTimeout&&(clearTimeout(this.pendingTimeout),this.pendingTimeout=void 0,this.completeTransitions_());break;case"running":let t="paused"===this._state;this._state=e,t&&(this._notifyObservers(),this._start());break;case"paused":case"error":case"success":this._state=e,this._notifyObservers();break;case"canceled":this._error=g(),this._state=e,this._notifyObservers()}}completeTransitions_(){switch(this._state){case"pausing":this._transition("paused");break;case"canceling":this._transition("canceled");break;case"running":this._start()}}get snapshot(){let e=er(this._state);return{bytesTransferred:this._transferred,totalBytes:this._blob.size(),state:e,metadata:this._metadata,task:this,ref:this._ref}}on(e,t,n,r){let i=new ei(t||void 0,n||void 0,r||void 0);return this._addObserver(i),()=>{this._removeObserver(i)}}then(e,t){return this._promise.then(e,t)}catch(e){return this.then(null,e)}_addObserver(e){this._observers.push(e),this._notifyObserver(e)}_removeObserver(e){let t=this._observers.indexOf(e);-1!==t&&this._observers.splice(t,1)}_notifyObservers(){this._finishPromise(),this._observers.slice().forEach(e=>{this._notifyObserver(e)})}_finishPromise(){if(void 0!==this._resolve){let e=!0;switch(er(this._state)){case en.SUCCESS:es(this._resolve.bind(null,this.snapshot))();break;case en.CANCELED:case en.ERROR:es(this._reject.bind(null,this._error))();break;default:e=!1}e&&(this._resolve=void 0,this._reject=void 0)}}_notifyObserver(e){switch(er(this._state)){case en.RUNNING:case en.PAUSED:e.next&&es(e.next.bind(e,this.snapshot))();break;case en.SUCCESS:e.complete&&es(e.complete.bind(e))();break;case en.CANCELED:case en.ERROR:default:e.error&&es(e.error.bind(e,this._error))()}}resume(){let e="paused"===this._state||"pausing"===this._state;return e&&this._transition("running"),e}pause(){let e="running"===this._state;return e&&this._transition("pausing"),e}cancel(){let e="running"===this._state||"pausing"===this._state;return e&&this._transition("canceling"),e}}class ec{constructor(e,t){this._service=e,t instanceof E?this._location=t:this._location=E.makeFromUrl(t,e.host)}toString(){return"gs://"+this._location.bucket+"/"+this._location.path}_newRef(e,t){return new ec(e,t)}get root(){let e=new E(this._location.bucket,"");return this._newRef(this._service,e)}get bucket(){return this._location.bucket}get fullPath(){return this._location.path}get name(){return $(this._location.path)}get storage(){return this._service}get parent(){let e=function(e){if(0===e.length)return null;let t=e.lastIndexOf("/");return -1===t?"":e.slice(0,t)}(this._location.path);if(null===e)return null;let t=new E(this._location.bucket,e);return new ec(this._service,t)}_throwIfRoot(e){if(""===this._location.path)throw new d(s.INVALID_ROOT_OPERATION,"The operation '"+e+"' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').")}}function eh(e,t){let n=null==t?void 0:t[h];return null==n?null:E.makeFromBucketSpec(n,e)}class ed{constructor(e,t,n,r,i){this.app=e,this._authProvider=t,this._appCheckProvider=n,this._url=r,this._firebaseVersion=i,this._bucket=null,this._host=c,this._protocol="https",this._appId=null,this._deleted=!1,this._maxOperationRetryTime=12e4,this._maxUploadRetryTime=6e5,this._requests=new Set,null!=r?this._bucket=E.makeFromBucketSpec(r,this._host):this._bucket=eh(this._host,this.app.options)}get host(){return this._host}set host(e){this._host=e,null!=this._url?this._bucket=E.makeFromBucketSpec(this._url,e):this._bucket=eh(e,this.app.options)}get maxUploadRetryTime(){return this._maxUploadRetryTime}set maxUploadRetryTime(e){C("time",0,Number.POSITIVE_INFINITY,e),this._maxUploadRetryTime=e}get maxOperationRetryTime(){return this._maxOperationRetryTime}set maxOperationRetryTime(e){C("time",0,Number.POSITIVE_INFINITY,e),this._maxOperationRetryTime=e}async _getAuthToken(){if(this._overrideAuthToken)return this._overrideAuthToken;let e=this._authProvider.getImmediate({optional:!0});if(e){let t=await e.getToken();if(null!==t)return t.accessToken}return null}async _getAppCheckToken(){let e=this._appCheckProvider.getImmediate({optional:!0});
31return e?(await e.getToken()).token:null}_delete(){return this._deleted||(this._deleted=!0,this._requests.forEach(e=>e.cancel()),this._requests.clear()),Promise.resolve()}_makeStorageReference(e){return new ec(this,e)}_makeRequest(e,t,n,r,i=!0){if(this._deleted)return new S(_());{let s=function(e,t,n,r,i,s,o=!0){let a=R(e.urlParams),l=e.url+a,u=Object.assign({},e.headers);return t&&(u["X-Firebase-GMPID"]=t),null!==n&&n.length>0&&(u.Authorization="Firebase "+n),u["X-Firebase-Storage-Version"]="webjs/"+(null!=s?s:"AppManager"),null!==r&&(u["X-Firebase-AppCheck"]=r),new O(l,e.method,u,e.body,e.successCodes,e.additionalRetryCodes,e.handler,e.errorHandler,e.timeout,e.progressCallback,i,o)}(e,this._appId,n,r,t,this._firebaseVersion,i);return this._requests.add(s),s.getPromise().then(()=>this._requests.delete(s),()=>this._requests.delete(s)),s}}async makeRequestWithTokens(e,t){let[n,r]=await Promise.all([this._getAuthToken(),this._getAppCheckToken()]);return this._makeRequest(e,t,n,r).getPromise()}}let ef="@firebase/storage",ep="0.11.2",em="storage";function eg(e,t,n){var r;return(r=e=(0,l.m9)(e))._throwIfRoot("uploadBytesResumable"),new eu(r,new F(t),n)}function ey(e){return function(e){e._throwIfRoot("getDownloadURL");let t=function(e,t,n){let r=new K(x(t.fullServerUrl(),e.host,e._protocol),"GET",function(t,r){let i=W(e,r,n);return X(null!==i),function(e,t,n,r){let i=B(t);if(null===i||!T(i.downloadTokens))return null;let s=i.downloadTokens;if(0===s.length)return null;let o=encodeURIComponent;return s.split(",").map(t=>{let i=e.bucket,s=e.fullPath;return x("/b/"+o(i)+"/o/"+o(s),n,r)+R({alt:"media",token:t})})[0]}(i,r,e.host,e._protocol)},e.maxOperationRetryTime);return r.errorHandler=Y(t),r}(e.storage,e._location,H());return e.storage.makeRequestWithTokens(t,el).then(e=>{if(null===e)throw new d(s.NO_DOWNLOAD_URL,"The given file does not have any download URLs.");return e})}(e=(0,l.m9)(e))}function ev(e,t){return function(e,t){if(!(t&&/^[A-Za-z]+:\/\//.test(t)))return function e(t,n){if(t instanceof ed){if(null==t._bucket)throw new d(s.NO_DEFAULT_BUCKET,"No default bucket found. Did you set the '"+h+"' property when initializing the app?");let r=new ec(t,t._bucket);return null!=n?e(r,n):r}return void 0!==n?function(e,t){let n=function(e,t){let n=t.split("/").filter(e=>e.length>0).join("/");return 0===e.length?n:e+"/"+n}(e._location.path,t),r=new E(e._location.bucket,n);return new ec(e.storage,r)}(t,n):t}(e,t);if(e instanceof ed)return new ec(e,t);throw v("To use ref(service, url), the first argument must be a Storage instance.")}(e=(0,l.m9)(e),t)}function e_(e=(0,a.Mq)(),t){e=(0,l.m9)(e);let n=(0,a.qX)(e,em).getImmediate({identifier:t}),r=(0,l.P0)("storage");return r&&function(e,t,n,r={}){!function(e,t,n,r={}){e.host=`${t}:${n}`,e._protocol="http";let{mockUserToken:i}=r;i&&(e._overrideAuthToken="string"==typeof i?i:(0,l.Sg)(i,e.app.options.projectId))}(e,t,n,r)}(n,...r),n}(0,a.Xd)(new u.wA(em,function(e,{instanceIdentifier:t}){return new ed(e.getProvider("app").getImmediate(),e.getProvider("auth-internal"),e.getProvider("app-check-internal"),t,a.Jn)},"PUBLIC").setMultipleInstances(!0)),(0,a.KN)(ef,ep,""),(0,a.KN)(ef,ep,"esm2017")},97582:function(e,t,n){"use strict";n.d(t,{CR:function(){return u},FC:function(){return d},Jh:function(){return a},KL:function(){return f},XA:function(){return l},ZT:function(){return i},_T:function(){return s},ev:function(){return c},mG:function(){return o},qq:function(){return h}});var r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)0>t.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}
31function o(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(o,a)}l((r=r.apply(e,t||[])).next())})}function a(e,t){var n,r,i,s,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function l(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}function c(e,t,n){if(n||2==arguments.length)for(var r,i=0,s=t.length;i<s;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function h(e){return this instanceof h?(this.v=e,this):new h(e)}function d(e,t,n){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),s=[];return r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r;function o(e){i[e]&&(r[e]=function(t){return new Promise(function(n,r){s.push([e,t,n,r])>1||a(e,t)})})}function a(e,t){try{var n;(n=i[e](t)).value instanceof h?Promise.resolve(n.value.v).then(l,u):c(s[0][2],n)}catch(e){c(s[0][3],e)}}function l(e){a("next",e)}function u(e){a("throw",e)}function c(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function f(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=l(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,i){!function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}(r,i,(t=e[n](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(19296),t(91118),t(37253)}),_N_E=e.O()}]);

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