vendor: 8,731 bytes, lines 1-3
1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a02b5930-8251-5dfe-ad6b-63631c498440")}catch(e){}}(); 3import{a as he,b as pe,g as Ye,l as h}from"./chunk-EKFLB6J2.js";var me=()=>{};var V={NODE_CLIENT:!1,NODE_ADMIN:!1,SDK_VERSION:"${JSCORE_VERSION}"};var qe=function(t,e){if(!t)throw Xe(e)},Xe=function(t){return new Error("Firebase Database ("+V.SDK_VERSION+") INTERNAL ASSERT FAILED: "+t)};var ve=function(t){let e=[],n=0;for(let i=0;i<t.length;i++){let r=t.charCodeAt(i);r<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=r&63|128):(r&64512)===55296&&i+1<t.length&&(t.charCodeAt(i+1)&64512)===56320?(r=65536+((r&1023)<<10)+(t.charCodeAt(++i)&1023),e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=r&63|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=r&63|128)}return e},Qe=function(t){let e=[],n=0,i=0;for(;n<t.length;){let r=t[n++];if(r<128)e[i++]=String.fromCharCode(r);else if(r>191&&r<224){let s=t[n++];e[i++]=String.fromCharCode((r&31)<<6|s&63)}else if(r>239&&r<365){let s=t[n++],o=t[n++],c=t[n++],l=((r&7)<<18|(s&63)<<12|(o&63)<<6|c&63)-65536;e[i++]=String.fromCharCode(55296+(l>>10)),e[i++]=String.fromCharCode(56320+(l&1023))}else{let s=t[n++],o=t[n++];e[i++]=String.fromCharCode((r&15)<<12|(s&63)<<6|o&63)}}return e.join("")},Ee={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:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();let n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,i=[];for(let r=0;r<t.length;r+=3){let s=t[r],o=r+1<t.length,c=o?t[r+1]:0,l=r+2<t.length,d=l?t[r+2]:0,p=s>>2,f=(s&3)<<4|c>>4,a=(c&15)<<2|d>>6,g=d&63;l||(g=64,o||(a=64)),i.push(n[p],n[f],n[a],n[g])}return i.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(ve(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):Qe(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();let n=e?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let r=0;r<t.length;){let s=n[t.charAt(r++)],c=r<t.length?n[t.charAt(r)]:0;++r;let d=r<t.length?n[t.charAt(r)]:64;++r;let f=r<t.length?n[t.charAt(r)]:64;if(++r,s==null||c==null||d==null||f==null)throw new W;let a=s<<2|c>>4;if(i.push(a),d!==64){let g=c<<4&240|d>>2;if(i.push(g),f!==64){let C=d<<6&192|f;i.push(C)}}}return i},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},W=class extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}},et=function(t){let e=ve(t);return Ee.encodeByteArray(e,!0)},A=function(t){return et(t).replace(/\./g,"")},O=function(t){try{return Ee.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};function Sn(t){return we(void 0,t)}function we(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:let n=e;return new Date(n.getTime());case Object:t===void 0&&(t={});break;case Array:t=[];break;default:return e}for(let n in e)!e.hasOwnProperty(n)||!tt(n)||(t[n]=we(t[n],e[n]));return t}function tt(t){return t!=="__proto__"}function nt(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}var rt=()=>nt().__FIREBASE_DEFAULTS__,it=()=>{if(typeof process>"u"||typeof process.env>"u")return;let t=process.env.__FIREBASE_DEFAULTS__;if(t)return JSON.parse(t)},st=()=>{if(typeof document>"u")return;let t;try{t=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}let e=t&&O(t[1]);return e&&JSON.parse(e)},J=()=>{try{return me()||rt()||it()||st()}catch(t){console.info("Unable to get __FIREBASE_DEFAULTS__ due to: ".concat(t));return}};var K=()=>{var t;return(t=J())===null||t===void 0?void 0:t.config},In=t=>{var e;return(e=J())===null||e===void 0?void 0:e["_".concat(t)]};var L=class{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,i)=>{n?this.reject(n):this.resolve(i),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,i))}}};function ot(t){try{return(t.startsWith("http://")||t.startsWith("https://")?new URL(t).hostname:t).endsWith(".cloudworkstations.dev")}catch{return!1}}function An(t){return h(this,null,function*(){return(yield fetch(t,{credentials:"include"})).ok})}function On(t,e){if(t.uid)throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');let n={alg:"none",type:"JWT"},i=e||"demo-project",r=t.iat||0,s=t.sub||t.user_id;if(!s)throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");let o=Object.assign({iss:"https://securetoken.google.com/".concat(i),aud:i,iat:r,exp:r+3600,auth_time:r,sub:s,user_id:s,firebase:{sign_in_provider:"custom",identities:{}}},t);return[A(JSON.stringify(n)),A(JSON.stringify(o)),""].join(".")}var I={};function at(){let t={prod:[],emulator:[]};for(let e of Object.keys(I))I[e]?t.emulator.push(e):t.prod.push(e);return t}function ct(t){let e=document.getElementById(t),n=!1;return e||(e=document.createElement("div"),e.setAttribute("id",t),n=!0),{created:n,element:e}}var ge=!1;function xn(t,e){if(typeof window>"u"||typeof document>"u"||!ot(window.location.host)||I[t]===e||I[t]||ge)return;I[t]=e;function n(a){return"__firebase__banner__".concat(a)}let i="__firebase__banner",s=at().prod.length>0;function o(){let a=document.getElementById(i);a&&a.remove()}function c(a){a.style.display="flex",a.style.background="#7faaf0",a.style.position="fixed",a.style.bottom="5px",a.style.left="5px",a.style.padding=".5em",a.style.borderRadius="5px",a.style.alignItems="center"}function l(a,g){a.setAttribute("width","24"),a.setAttribute("id",g),a.setAttribute("height","24"),a.setAttribute("viewBox","0 0 24 24"),a.setAttribute("fill","none"),a.style.marginLeft="-6px"}function d(){let a=document.createElement("span");return a.style.cursor="pointer",a.style.marginLeft="16px",a.style.fontSize="24px",a.innerHTML=" ×",a.onclick=()=>{ge=!0,o()},a}function p(a,g){a.setAttribute("id",g),a.innerText="Learn more",a.href="https://firebase.google.com/docs/studio/preview-apps#preview-backend",a.setAttribute("target","__blank"),a.style.paddingLeft="5px",a.style.textDecoration="underline"}function f(){let a=ct(i),g=n("text"),C=document.getElementById(g)||document.createElement("span"),fe=n("learnmore"),de=document.getElementById(fe)||document.createElement("a"),ue=n("preprendIcon"),R=document.getElementById(ue)||document.createElementNS("http://www.w3.org/2000/svg","svg");if(a.created){let z=a.element;c(z),p(de,fe);let Ze=d();l(R,ue),z.append(R,C,de,Ze),document.body.appendChild(z)}s?(C.innerText="Preview backend disconnected.",R.innerHTML='<g clip-path="url(#clip0_6013_33858)">\n<path d="M4.8 17.6L12 5.6L19.2 17.6H4.8ZM6.91667 16.4H17.0833L12 7.93333L6.91667 16.4ZM12 15.6C12.1667 15.6 12.3056 15.5444 12.4167 15.4333C12.5389 15.3111 12.6 15.1667 12.6 15C12.6 14.8333 12.5389 14.6944 12.4167 14.5833C12.3056 14.4611 12.1667 14.4 12 14.4C11.8333 14.4 11.6889 14.4611 11.5667 14.5833C11.4556 14.6944 11.4 14.8333 11.4 15C11.4 15.1667 11.4556 15.3111 11.5667 15.4333C11.6889 15.5444 11.8333 15.6 12 15.6ZM11.4 13.6H12.6V10.4H11.4V13.6Z" fill="#212121"/>\n</g>\n<defs>\n<clipPath id="clip0_6013_33858">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>'):(R.innerHTML='<g clip-path="url(#clip0_6083_34804)">\n<path d="M11.4 15.2H12.6V11.2H11.4V15.2ZM12 10C12.1667 10 12.3056 9.94444 12.4167 9.83333C12.5389 9.71111 12.6 9.56667 12.6 9.4C12.6 9.23333 12.5389 9.09444 12.4167 8.98333C12.3056 8.86111 12.1667 8.8 12 8.8C11.8333 8.8 11.6889 8.86111 11.5667 8.98333C11.4556 9.09444 11.4 9.23333 11.4 9.4C11.4 9.56667 11.4556 9.71111 11.5667 9.83333C11.6889 9.94444
311.8333 10 12 10ZM12 18.4C11.1222 18.4 10.2944 18.2333 9.51667 17.9C8.73889 17.5667 8.05556 17.1111 7.46667 16.5333C6.88889 15.9444 6.43333 15.2611 6.1 14.4833C5.76667 13.7056 5.6 12.8778 5.6 12C5.6 11.1111 5.76667 10.2833 6.1 9.51667C6.43333 8.73889 6.88889 8.06111 7.46667 7.48333C8.05556 6.89444 8.73889 6.43333 9.51667 6.1C10.2944 5.76667 11.1222 5.6 12 5.6C12.8889 5.6 13.7167 5.76667 14.4833 6.1C15.2611 6.43333 15.9389 6.89444 16.5167 7.48333C17.1056 8.06111 17.5667 8.73889 17.9 9.51667C18.2333 10.2833 18.4 11.1111 18.4 12C18.4 12.8778 18.2333 13.7056 17.9 14.4833C17.5667 15.2611 17.1056 15.9444 16.5167 16.5333C15.9389 17.1111 15.2611 17.5667 14.4833 17.9C13.7167 18.2333 12.8889 18.4 12 18.4ZM12 17.2C13.4444 17.2 14.6722 16.6944 15.6833 15.6833C16.6944 14.6722 17.2 13.4444 17.2 12C17.2 10.5556 16.6944 9.32778 15.6833 8.31667C14.6722 7.30555 13.4444 6.8 12 6.8C10.5556 6.8 9.32778 7.30555 8.31667 8.31667C7.30556 9.32778 6.8 10.5556 6.8 12C6.8 13.4444 7.30556 14.6722 8.31667 15.6833C9.32778 16.6944 10.5556 17.2 12 17.2Z" fill="#212121"/>\n</g>\n<defs>\n<clipPath id="clip0_6083_34804">\n<rect width="24" height="24" fill="white"/>\n</clipPath>\n</defs>',C.innerText="Preview backend running in this workspace."),C.setAttribute("id",g)}document.readyState==="loading"?window.addEventListener("DOMContentLoaded",f):f()}function Ce(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function Bn(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ce())}function Tn(){var t;let e=(t=J())===null||t===void 0?void 0:t.forceEnvironment;if(e==="node")return!0;if(e==="browser")return!1;try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function De(){return typeof window<"u"||Z()}function Z(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function Mn(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function Nn(){let t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function Rn(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Ln(){let t=Ce();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function kn(){return V.NODE_CLIENT===!0||V.NODE_ADMIN===!0}function Se(){try{return typeof indexedDB=="object"}catch{return!1}}function Ie(){return new Promise((t,e)=>{try{let n=!0,i="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(i);r.onsuccess=()=>{r.result.close(),n||self.indexedDB.deleteDatabase(i),t(!0)},r.onupgradeneeded=()=>{n=!1},r.onerror=()=>{var s;e(((s=r.error)===null||s===void 0?void 0:s.message)||"")}}catch(n){e(n)}})}function Pn(){return!(typeof navigator>"u"||!navigator.cookieEnabled)}var lt="FirebaseError",y=class t extends Error{constructor(e,n,i){super(n),this.code=e,this.customData=i,this.name=lt,Object.setPrototypeOf(this,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,x.prototype.create)}},x=class{constructor(e,n,i){this.service=e,this.serviceName=n,this.errors=i}create(e,...n){let i=n[0]||{},r="".concat(this.service,"/").concat(e),s=this.errors[e],o=s?ft(s,i):"Error",c="".concat(this.serviceName,": ").concat(o," (").concat(r,").");return new y(r,c,i)}};function ft(t,e){return t.replace(dt,(n,i)=>{let r=e[i];return r!=null?String(r):"<".concat(i,"?>")})}var dt=/\{\$([^}]+)}/g;function be(t){return JSON.parse(t)}function $n(t){return JSON.stringify(t)}var Ae=function(t){let e={},n={},i={},r="";try{let s=t.split(".");e=be(O(s[0])||""),n=be(O(s[1])||""),r=s[2],i=n.d||{},delete n.d}catch{}return{header:e,claims:n,data:i,signature:r}};var Hn=function(t){let e=Ae(t),n=e.claims;return!!n&&typeof n=="object"&&n.hasOwnProperty("iat")},Fn=function(t){let e=Ae(t).claims;return typeof e=="object"&&e.admin===!0};function jn(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function zn(t,e){if(Object.prototype.hasOwnProperty.call(t,e))return t[e]}function Un(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function Vn(t,e,n){let i={};for(let r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=e.call(n,t[r],r,t));return i}function k(t,e){if(t===e)return!0;let n=Object.keys(t),i=Object.keys(e);for(let r of n){if(!i.includes(r))return!1;let s=t[r],o=e[r];if(_e(s)&&_e(o)){if(!k(s,o))return!1}else if(s!==o)return!1}for(let r of i)if(!n.includes(r))return!1;return!0}function _e(t){return t!==null&&typeof t=="object"}function Wn(t){let e=[];
3for(let[n,i]of Object.entries(t))Array.isArray(i)?i.forEach(r=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(r))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(i));return e.length?"&"+e.join("&"):""}function Gn(t){let e={};return t.replace(/^\?/,"").split("&").forEach(i=>{if(i){let[r,s]=i.split("=");e[decodeURIComponent(r)]=decodeURIComponent(s)}}),e}function Jn(t){let e=t.indexOf("?");if(!e)return"";let n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}var ye=class{constructor(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=512/8,this.pad_[0]=128;for(let e=1;e<this.blockSize;++e)this.pad_[e]=0;this.reset()}reset(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0}compress_(e,n){n||(n=0);let i=this.W_;if(typeof e=="string")for(let f=0;f<16;f++)i[f]=e.charCodeAt(n)<<24|e.charCodeAt(n+1)<<16|e.charCodeAt(n+2)<<8|e.charCodeAt(n+3),n+=4;else for(let f=0;f<16;f++)i[f]=e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3],n+=4;for(let f=16;f<80;f++){let a=i[f-3]^i[f-8]^i[f-14]^i[f-16];i[f]=(a<<1|a>>>31)&4294967295}let r=this.chain_[0],s=this.chain_[1],o=this.chain_[2],c=this.chain_[3],l=this.chain_[4],d,p;for(let f=0;f<80;f++){f<40?f<20?(d=c^s&(o^c),p=1518500249):(d=s^o^c,p=1859775393):f<60?(d=s&o|c&(s|o),p=2400959708):(d=s^o^c,p=3395469782);let a=(r<<5|r>>>27)+d+l+p+i[f]&4294967295;l=c,c=o,o=(s<<30|s>>>2)&4294967295,s=r,r=a}this.chain_[0]=this.chain_[0]+r&4294967295,this.chain_[1]=this.chain_[1]+s&4294967295,this.chain_[2]=this.chain_[2]+o&4294967295,this.chain_[3]=this.chain_[3]+c&4294967295,this.chain_[4]=this.chain_[4]+l&4294967295}update(e,n){if(e==null)return;n===void 0&&(n=e.length);let i=n-this.blockSize,r=0,s=this.buf_,o=this.inbuf_;for(;r<n;){if(o===0)for(;r<=i;)this.compress_(e,r),r+=this.blockSize;if(typeof e=="string"){for(;r<n;)if(s[o]=e.charCodeAt(r),++o,++r,o===this.blockSize){this.compress_(s),o=0;break}}else for(;r<n;)if(s[o]=e[r],++o,++r,o===this.blockSize){this.compress_(s),o=0;break}}this.inbuf_=o,this.total_+=n}digest(){let e=[],n=this.total_*8;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(let r=this.blockSize-1;r>=56;r--)this.buf_[r]=n&255,n/=256;this.compress_(this.buf_);let i=0;for(let r=0;r<5;r++)for(let s=24;s>=0;s-=8)e[i]=this.chain_[r]>>s&255,++i;return e}};function Kn(t,e){let n=new G(t,e);return n.subscribe.bind(n)}var G=class{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(i=>{this.error(i)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,i){let r;if(e===void 0&&n===void 0&&i===void 0)throw new Error("Missing Observer.");ut(e,["next","error","complete"])?r=e:r={next:e,error:n,complete:i},r.next===void 0&&(r.next=U),r.error===void 0&&(r.error=U),r.complete===void 0&&(r.complete=U);let s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),s}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(i){typeof console<"u"&&console.error&&console.error(i)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}};function ut(t,e){if(typeof t!="object"||t===null)return!1;for(let n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function U(){}var Zn=function(t,e,n,i){let r;if(i<e?r="at least "+e:i>n&&(r=n===0?"none":"no more than "+n),r){let s=t+" failed: Was called with "+i+(i===1?" argument.":" arguments.")+" Expects "+r+".";throw new Error(s)}};function Oe(t,e){return"".concat(t," failed: ").concat(e," argument ")}function Yn(t,e,n,i){if(!(i&&!n)&&typeof n!="function")throw new Error(Oe(t,e)+"must be a valid function.")}function qn(t,e,n,i){if(!(i&&!n)&&(typeof n!="object"||n===null))throw new Error(Oe(t,e)+"must be a valid context object.")}var Xn=function(t){let e=[],n=0;for(let i=0;i<t.length;i++){let r=t.charCodeAt(i);if(r>=55296&&r<=56319){let s=r-55296;i++,qe(i<t.length,"Surrogate pair missing trail surrogate.");let o=t.charCodeAt(i)-56320;r=65536+(s<<10)+o}r<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=r&63|128):r<65536?(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=r&63|128):(e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=r&63|128)}return e},Qn=function(t){let e=0;for(let n=0;n<t.length;n++){let i=t.charCodeAt(n);
3i<128?e++:i<2048?e+=2:i>=55296&&i<=56319?(e+=4,n++):e+=3}return e};var er=14400*1e3;function tr(t){return t&&t._delegate?t._delegate:t}var w=class{constructor(e,n,i){this.name=e,this.instanceFactory=n,this.type=i,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}};var E="[DEFAULT]";var Y=class{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){let n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){let i=new L;if(this.instancesDeferred.set(n,i),this.isInitialized(n)||this.shouldAutoInitialize())try{let r=this.getOrInitializeService({instanceIdentifier:n});r&&i.resolve(r)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;let i=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),r=(n=e==null?void 0:e.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(i)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:i})}catch(s){if(r)return null;throw s}else{if(r)return null;throw Error("Service ".concat(this.name," is not available"))}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error("Mismatching Component ".concat(e.name," for Provider ").concat(this.name,"."));if(this.component)throw Error("Component for ".concat(this.name," has already been provided"));if(this.component=e,!!this.shouldAutoInitialize()){if(pt(e))try{this.getOrInitializeService({instanceIdentifier:E})}catch{}for(let[n,i]of this.instancesDeferred.entries()){let r=this.normalizeInstanceIdentifier(n);try{let s=this.getOrInitializeService({instanceIdentifier:r});i.resolve(s)}catch{}}}}clearInstance(e=E){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}delete(){return h(this,null,function*(){let e=Array.from(this.instances.values());yield Promise.all([...e.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])})}isComponentSet(){return this.component!=null}isInitialized(e=E){return this.instances.has(e)}getOptions(e=E){return this.instancesOptions.get(e)||{}}initialize(e={}){let{options:n={}}=e,i=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(i))throw Error("".concat(this.name,"(").concat(i,") has already been initialized"));if(!this.isComponentSet())throw Error("Component ".concat(this.name," has not been registered yet"));let r=this.getOrInitializeService({instanceIdentifier:i,options:n});for(let[s,o]of this.instancesDeferred.entries()){let c=this.normalizeInstanceIdentifier(s);i===c&&o.resolve(r)}return r}onInit(e,n){var i;let r=this.normalizeInstanceIdentifier(n),s=(i=this.onInitCallbacks.get(r))!==null&&i!==void 0?i:new Set;s.add(e),this.onInitCallbacks.set(r,s);let o=this.instances.get(r);return o&&e(o,r),()=>{s.delete(e)}}invokeOnInitCallbacks(e,n){let i=this.onInitCallbacks.get(n);if(i)for(let r of i)try{r(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let i=this.instances.get(e);if(!i&&this.component&&(i=this.component.instanceFactory(this.container,{instanceIdentifier:ht(e),options:n}),this.instances.set(e,i),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(i,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,i)}catch{}return i||null}normalizeInstanceIdentifier(e=E){return this.component?this.component.multipleInstances?e:E:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}};function ht(t){return t===E?void 0:t}function pt(t){return t.instantiationMode==="EAGER"}var B=class{constructor(e){this.name=e,this.providers=new Map}addComponent(e){let n=this.getProvider(e.name);if(n.isComponentSet())throw new Error("Component ".concat(e.name," has already been registered with ").concat(this.name));n.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 n=new Y(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}};var q=[],u=(function(t){return t[t.DEBUG=0]="DEBUG",t[t.VERBOSE=1]="VERBOSE",t[t.INFO=2]="INFO",t[t.WARN=3]="WARN",t[t.ERROR=4]="ERROR",t[t.SILENT=5]="SILENT",t})(u||{}),xe={debug:u.DEBUG,verbose:u.VERBOSE,info:u.INFO,warn:u.WARN,error:u.ERROR,silent:u.SILENT},mt=u.INFO,gt={[u.DEBUG]:"log",[u.VERBOSE]:"log",[u.INFO]:"info",[u.WARN]:"warn",[u.ERROR]:"error"},bt=(t,e,...n)=>{if(e<t.logLevel)return;let i=new Date().toISOString(),r=gt[e];if(r)console[r]("[".concat(i,"] ").concat(t.name,":"),...n);
3else throw new Error("Attempted to log a message with an invalid logType (value: ".concat(e,")"))},P=class{constructor(e){this.name=e,this._logLevel=mt,this._logHandler=bt,this._userLogHandler=null,q.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in u))throw new TypeError('Invalid value "'.concat(e,'" assigned to `logLevel`'));this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?xe[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new 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,u.DEBUG,...e),this._logHandler(this,u.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,u.VERBOSE,...e),this._logHandler(this,u.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,u.INFO,...e),this._logHandler(this,u.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,u.WARN,...e),this._logHandler(this,u.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,u.ERROR,...e),this._logHandler(this,u.ERROR,...e)}};function Be(t){q.forEach(e=>{e.setLogLevel(t)})}function Te(t,e){for(let n of q){let i=null;e&&e.level&&(i=xe[e.level]),t===null?n.userLogHandler=null:n.userLogHandler=(r,s,...o)=>{let c=o.map(l=>{if(l==null)return null;if(typeof l=="string")return l;if(typeof l=="number"||typeof l=="boolean")return l.toString();if(l instanceof Error)return l.message;try{return JSON.stringify(l)}catch{return null}}).filter(l=>l).join(" ");s>=(i!=null?i:r.logLevel)&&t({level:u[s].toLowerCase(),message:c,args:o,type:r.name})}}}var _t=(t,e)=>e.some(n=>t instanceof n),Me,Ne;function yt(){return Me||(Me=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function vt(){return Ne||(Ne=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}var Re=new WeakMap,Q=new WeakMap,Le=new WeakMap,X=new WeakMap,te=new WeakMap;function Et(t){let e=new Promise((n,i)=>{let r=()=>{t.removeEventListener("success",s),t.removeEventListener("error",o)},s=()=>{n(b(t.result)),r()},o=()=>{i(t.error),r()};t.addEventListener("success",s),t.addEventListener("error",o)});return e.then(n=>{n instanceof IDBCursor&&Re.set(n,t)}).catch(()=>{}),te.set(e,t),e}function wt(t){if(Q.has(t))return;let e=new Promise((n,i)=>{let r=()=>{t.removeEventListener("complete",s),t.removeEventListener("error",o),t.removeEventListener("abort",o)},s=()=>{n(),r()},o=()=>{i(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",s),t.addEventListener("error",o),t.addEventListener("abort",o)});Q.set(t,e)}var ee={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return Q.get(t);if(e==="objectStoreNames")return t.objectStoreNames||Le.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return b(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function ke(t){ee=t(ee)}function Ct(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){let i=t.call($(this),e,...n);return Le.set(i,e.sort?e.sort():[e]),b(i)}:vt().includes(t)?function(...e){return t.apply($(this),e),b(Re.get(this))}:function(...e){return b(t.apply($(this),e))}}function Dt(t){return typeof t=="function"?Ct(t):(t instanceof IDBTransaction&&wt(t),_t(t,yt())?new Proxy(t,ee):t)}function b(t){if(t instanceof IDBRequest)return Et(t);if(X.has(t))return X.get(t);let e=Dt(t);return e!==t&&(X.set(t,e),te.set(e,t)),e}var $=t=>te.get(t);function $e(t,e,{blocked:n,upgrade:i,blocking:r,terminated:s}={}){let o=indexedDB.open(t,e),c=b(o);return i&&o.addEventListener("upgradeneeded",l=>{i(b(o.result),l.oldVersion,l.newVersion,b(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),c.then(l=>{s&&l.addEventListener("close",()=>s()),r&&l.addEventListener("versionchange",d=>r(d.oldVersion,d.newVersion,d))}).catch(()=>{}),c}function fr(t,{blocked:e}={}){let n=indexedDB.deleteDatabase(t);return e&&n.addEventListener("blocked",i=>e(i.oldVersion,i)),b(n).then(()=>{})}var St=["get","getKey","getAll","getAllKeys","count"],It=["put","add","delete","clear"],ne=new Map;function Pe(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(ne.get(e))return ne.get(e);let n=e.replace(/FromIndex$/,""),i=e!==n,r=It.includes(n);if(!(n in(i?IDBIndex:IDBObjectStore).prototype)||!(r||St.includes(n)))return;let s=function(o,...c){return h(this,null,function*(){let l=this.transaction(o,r?"readwrite":"readonly"),d=l.store;return i&&(d=d.index(c.shift())),(yield Promise.all([d[n](...c),r&&l.done]))[0]})};return ne.set(e,s),s}ke(t=>pe(he({},t),{get:(e,n,i)=>Pe(e,n)||t.get(e,n,i),has:(e,n)=>!!Pe(e,n)||t.has(e,n)}));var wn={};Ye(wn,{FirebaseError:()=>y,SDK_VERSION:()=>cn,_DEFAULT_ENTRY_NAME:()=>M,_addComponent:()=>oe,_addOrOverwriteComponent:()=>nn,_apps:()=>v,_clearComponents:()=>on,_components:()=>S,_getProvider:()=>Ue,_isFirebaseApp:()=>Ve,_isFirebaseServerApp:()=>sn,_registerComponent:()=>F,_removeServiceInstance:()=>rn,_serverApps:()=>D,deleteApp:()=>Ge,getApp:()=>fn,getApps:()=>dn,initializeApp:()=>We,initializeServerApp:()=>ln,onLog:()=>un,registerVersion:()=>T,setLogLevel:()=>hn});var ie=class{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(At(n)){let i=n.getImmediate();return"".concat(i.library,"/").concat(i.version)}else return null}).filter(n=>n).join(" ")}};function At(t){let e=t.getComponent();return(e==null?void 0:e.type)==="VERSION"}var H="@firebase/app",se="0.13.2";var _=new P("@firebase/app"),Ot="@firebase/app-compat",xt="@firebase/analytics-compat",Bt="@firebase/analytics",Tt="@firebase/app-check-compat",Mt="@firebase/app-check",Nt="@firebase/auth",Rt="@firebase/auth-compat",Lt="@firebase/database",kt="@firebase/data-connect",Pt="@firebase/database-compat",$t="@firebase/functions",Ht="@firebase/functions-compat",Ft="@firebase/installations",jt="@firebase/installations-compat",zt="@firebase/messaging",Ut="@firebase/messaging-compat",Vt="@firebase/performance",Wt="@firebase/performance-compat",Gt="@firebase/remote-config",Jt="@firebase/remote-config-compat",Kt="@firebase/storage",Zt="@firebase/storage-compat",Yt="@firebase/firestore",qt="@firebase/ai",Xt="@firebase/firestore-compat",Qt="firebase",en="11.10.0";var M="[DEFAULT]",tn={[H]:"fire-core",[Ot]:"fire-core-compat",[Bt]:"fire-analytics",[xt]:"fire-analytics-compat",[Mt]:"fire-app-check",[Tt]:"fire-app-check-compat",[Nt]:"fire-auth",[Rt]:"fire-auth-compat",[Lt]:"fire-rtdb",[kt]:"fire-data-connect",[Pt]:"fire-rtdb-compat",[$t]:"fire-fn",[Ht]:"fire-fn-compat",[Ft]:"fire-iid",[jt]:"fire-iid-compat",[zt]:"fire-fcm",[Ut]:"fire-fcm-compat",[Vt]:"fire-perf",[Wt]:"fire-perf-compat",[Gt]:"fire-rc",[Jt]:"fire-rc-compat",[Kt]:"fire-g
3cs",[Zt]:"fire-gcs-compat",[Yt]:"fire-fst",[Xt]:"fire-fst-compat",[qt]:"fire-vertex","fire-js":"fire-js",[Qt]:"fire-js-all"};var v=new Map,D=new Map,S=new Map;function oe(t,e){try{t.container.addComponent(e)}catch(n){_.debug("Component ".concat(e.name," failed to register with FirebaseApp ").concat(t.name),n)}}function nn(t,e){t.container.addOrOverwriteComponent(e)}function F(t){let e=t.name;if(S.has(e))return _.debug("There were multiple attempts to register component ".concat(e,".")),!1;S.set(e,t);for(let n of v.values())oe(n,t);for(let n of D.values())oe(n,t);return!0}function Ue(t,e){let n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}function rn(t,e,n=M){Ue(t,e).clearInstance(n)}function Ve(t){return t.options!==void 0}function sn(t){return t==null?!1:t.settings!==void 0}function on(){S.clear()}var an={"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","server-app-deleted":"Firebase Server App has been 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
3d-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}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},m=new x("app","Firebase",an);var j=class{constructor(e,n,i){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=i,this.container.addComponent(new w("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 m.create("app-deleted",{appName:this._name})}};function He(t,e){let n=O(t.split(".")[1]);if(n===null){console.error("FirebaseServerApp ".concat(e," is invalid: second part could not be parsed."));return}if(JSON.parse(n).exp===void 0){console.error("FirebaseServerApp ".concat(e," is invalid: expiration claim could not be parsed"));return}let r=JSON.parse(n).exp*1e3,s=new Date().getTime();r-s<=0&&console.error("FirebaseServerApp ".concat(e," is invalid: the token has expired."))}var ae=class extends j{constructor(e,n,i,r){let s=n.automaticDataCollectionEnabled!==void 0?n.automaticDataCollectionEnabled:!0,o={name:i,automaticDataCollectionEnabled:s};if(e.apiKey!==void 0)super(e,o,r);else{let c=e;super(c.options,o,r)}this._serverConfig=Object.assign({automaticDataCollectionEnabled:s},n),this._serverConfig.authIdToken&&He(this._serverConfig.authIdToken,"authIdToken"),this._serverConfig.appCheckToken&&He(this._serverConfig.appCheckToken,"appCheckToken"),this._finalizationRegistry=null,typeof FinalizationRegistry<"u"&&(this._finalizationRegistry=new FinalizationRegistry(()=>{this.automaticCleanup()})),this._refCount=0,this.incRefCount(this._serverConfig.releaseOnDeref),this._serverConfig.releaseOnDeref=void 0,n.releaseOnDeref=void 0,T(H,se,"serverapp")}toJSON(){}get refCount(){return this._refCount}incRefCount(e){this.isDeleted||(this._refCount++,e!==void 0&&this._finalizationRegistry!==null&&this._finalizationRegistry.register(e,this))}decRefCount(){return this.isDeleted?0:--this._refCount}automaticCleanup(){Ge(this)}get settings(){return this.checkDestroyed(),this._serverConfig}checkDestroyed(){if(this.isDeleted)throw m.create("server-app-deleted")}};var cn=en;function We(t,e={}){let n=t;typeof e!="object"&&(e={name:e});let i=Object.assign({name:M,automaticDataCollectionEnabled:!0},e),r=i.name;if(typeof r!="string"||!r)throw m.create("bad-app-name",{appName:String(r)});if(n||(n=K()),!n)throw m.create("no-options");let s=v.get(r);if(s){if(k(n,s.options)&&k(i,s.config))return s;throw m.create("duplicate-app",{appName:r})}let o=new B(r);for(let l of S.values())o.addComponent(l);let c=new j(n,i,o);return v.set(r,c),c}function ln(t,e){if(De()&&!Z())throw m.create("invalid-server-app-environment");e.automaticDataCollectionEnabled===void 0&&(e.automaticDataCollectionEnabled=!0);let n;Ve(t)?n=t.options:n=t;let i=Object.assign(Object.assign({},e),n);i.releaseOnDeref!==void 0&&delete i.releaseOnDeref;let r=d=>[...d].reduce((p,f)=>Math.imul(31,p)+f.charCodeAt(0)|0,0);if(e.releaseOnDeref!==void 0&&typeof FinalizationRegistry>"u")throw m.create("finalization-registry-not-supported",{});let s=""+r(JSON.stringify(i)),o=D.get(s);if(o)return o.incRefCount(e.releaseOnDeref),o;let c=new B(s);for(let d of S.values())c.addComponent(d);let l=new ae(n,e,s,c);return D.set(s,l),l}function fn(t=M){let e=v.get(t);if(!e&&t===M&&K())return We();if(!e)throw m.create("no-app",{appName:t});return e}function dn(){return Array.from(v.values())}function Ge(t){return h(this,null,function*(){let e=!1,n=t.name;v.has(n)?(e=!0,v.delete(n)):D.has(n)&&t.decRefCount()<=0&&(D.delete(n),e=!0),e&&(yield Promise.all(t.container.getProviders().map(i=>i.delete())),t.isDeleted=!0)})}function T(t,e,n){var i;let r=(i=tn[t])!==null&&i!==void 0?i:t;n&&(r+="-".concat(n));let s=r.match(/\s|\//),o=e.match(/\s|\//);if(s||o){let c=['Unable to register library "'.concat(r,'" with version "').concat(e,'":')];s&&c.push('library name "'.concat(r,'" contains illegal characters (whitespace or "/")')),s&&o&&c.push("and"),o&&c.push('version name "'.concat(e,'" contains illegal characters (whitespace or "/")')),_.
vendor: 5,082 bytes, lines 3-5
3warn(c.join(" "));return}F(new w("".concat(r,"-version"),()=>({library:r,version:e}),"VERSION"))}function un(t,e){if(t!==null&&typeof t!="function")throw m.create("invalid-log-argument");Te(t,e)}function hn(t){Be(t)}var pn="firebase-heartbeat-database",mn=1,N="firebase-heartbeat-store",re=null;function Je(){return re||(re=$e(pn,mn,{upgrade:(t,e)=>{switch(e){case 0:try{t.createObjectStore(N)}catch(n){console.warn(n)}}}}).catch(t=>{throw m.create("idb-open",{originalErrorMessage:t.message})})),re}function gn(t){return h(this,null,function*(){try{let n=(yield Je()).transaction(N),i=yield n.objectStore(N).get(Ke(t));return yield n.done,i}catch(e){if(e instanceof y)_.warn(e.message);else{let n=m.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});_.warn(n.message)}}})}function Fe(t,e){return h(this,null,function*(){try{let i=(yield Je()).transaction(N,"readwrite");yield i.objectStore(N).put(e,Ke(t)),yield i.done}catch(n){if(n instanceof y)_.warn(n.message);else{let i=m.create("idb-set",{originalErrorMessage:n==null?void 0:n.message});_.warn(i.message)}}})}function Ke(t){return"".concat(t.name,"!").concat(t.options.appId)}var bn=1024,_n=30,ce=class{constructor(e){this.container=e,this._heartbeatsCache=null;let n=this.container.getProvider("app").getImmediate();this._storage=new le(n),this._heartbeatsCachePromise=this._storage.read().then(i=>(this._heartbeatsCache=i,i))}triggerHeartbeat(){return h(this,null,function*(){var e,n;try{let r=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=je();if(((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null&&(this._heartbeatsCache=yield this._heartbeatsCachePromise,((n=this._heartbeatsCache)===null||n===void 0?void 0:n.heartbeats)==null)||this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(o=>o.date===s))return;if(this._heartbeatsCache.heartbeats.push({date:s,agent:r}),this._heartbeatsCache.heartbeats.length>_n){let o=vn(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(o,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(i){_.warn(i)}})}getHeartbeatsHeader(){return h(this,null,function*(){var e;try{if(this._heartbeatsCache===null&&(yield this._heartbeatsCachePromise),((e=this._heartbeatsCache)===null||e===void 0?void 0:e.heartbeats)==null||this._heartbeatsCache.heartbeats.length===0)return"";let n=je(),{heartbeatsToSend:i,unsentEntries:r}=yn(this._heartbeatsCache.heartbeats),s=A(JSON.stringify({version:2,heartbeats:i}));return this._heartbeatsCache.lastSentHeartbeatDate=n,r.length>0?(this._heartbeatsCache.heartbeats=r,yield this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),s}catch(n){return _.warn(n),""}})}};function je(){return new Date().toISOString().substring(0,10)}function yn(t,e=bn){let n=[],i=t.slice();for(let r of t){let s=n.find(o=>o.agent===r.agent);if(s){if(s.dates.push(r.date),ze(n)>e){s.dates.pop();break}}else if(n.push({agent:r.agent,dates:[r.date]}),ze(n)>e){n.pop();break}i=i.slice(1)}return{heartbeatsToSend:n,unsentEntries:i}}var le=class{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}runIndexedDBEnvironmentCheck(){return h(this,null,function*(){return Se()?Ie().then(()=>!0).catch(()=>!1):!1})}read(){return h(this,null,function*(){if(yield this._canUseIndexedDBPromise){let n=yield gn(this.app);return n!=null&&n.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}})}overwrite(e){return h(this,null,function*(){var n;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return Fe(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return})}add(e){return h(this,null,function*(){var n;if(yield this._canUseIndexedDBPromise){let r=yield this.read();return Fe(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return})}};function ze(t){return A(JSON.stringify({version:2,heartbeats:t})).length}function vn(t){if(t.length===0)return-1;let e=0,n=t[0].date;for(let i=1;i<t.length;i++)t[i].date<n&&(n=t[i].date,e=i);return e}function En(t){F(new w("platform-logger",e=>new ie(e),"PRIVATE")),F(new w("heartbeat",e=>new ce(e),"PRIVATE")),T(H,se,t),T(H,se,"esm2017"),T("fire-js","")}En("");export{qe as a,Xe as b,Ee as c,et as d,O as e,Sn as f,we as g,nt as h,In as i,L as j,ot as k,An as l,On as m,xn as n,Ce as o,Bn as p,Tn as q,Mn as r,Nn as s,Rn as t,Ln as u,kn as v,Se as w,Ie as x,Pn as y,y as z,x as A,be as B,$n as C,Hn as D,Fn as E,jn as F,zn as G,Un as H,Vn as I,k as J,Wn as K,Gn as L,Jn as M,ye as N,Kn as O,Zn as P,Oe as Q,Yn as R,qn as S,Xn as T,Qn as U,tr as V,w as W,Y as X,B as Y,u as Z,P as _,$e as $,fr as aa,M as ba,oe as ca,nn as da,F as ea,Ue as fa,sn as ga,cn as ha,We as ia,fn as ja,dn as ka,Ge as la,T as ma,un as na,hn as oa,wn as pa}; 4 5//# debugId=a02b5930-8251-5dfe-ad6b-63631c498440
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.