vendor: 16,370 bytes, line 1
1(()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();const t=function(e){const t=[];let 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,t[n++]=63&i|128):55296==(64512&i)&&r+1<e.length&&56320==(64512&e.charCodeAt(r+1))?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++r)),t[n++]=i>>18|240,t[n++]=i>>12&63|128,t[n++]=i>>6&63|128,t[n++]=63&i|128):(t[n++]=i>>12|224,t[n++]=i>>6&63|128,t[n++]=63&i|128)}return t},n={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let t=0;t<e.length;t+=3){const i=e[t],a=t+1<e.length,o=a?e[t+1]:0,s=t+2<e.length,c=s?e[t+2]:0,l=i>>2,u=(3&i)<<4|o>>4;let d=(15&o)<<2|c>>6,p=63&c;s||(p=64,a||(d=64)),r.push(n[l],n[u],n[d],n[p])}return r.join("")},encodeString(e,n){return this.HAS_NATIVE_SUPPORT&&!n?btoa(e):this.encodeByteArray(t(e),n)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):function(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n++];if(i<128)t[r++]=String.fromCharCode(i);else if(i>191&&i<224){const a=e[n++];t[r++]=String.fromCharCode((31&i)<<6|63&a)}else if(i>239&&i<365){const a=((7&i)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536;t[r++]=String.fromCharCode(55296+(a>>10)),t[r++]=String.fromCharCode(56320+(1023&a))}else{const a=e[n++],o=e[n++];t[r++]=String.fromCharCode((15&i)<<12|(63&a)<<6|63&o)}}return t.join("")}(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,i=[];for(let t=0;t<e.length;){const a=n[e.charAt(t++)],o=t<e.length?n[e.charAt(t)]:0;++t;const s=t<e.length?n[e.charAt(t)]:64;++t;const c=t<e.length?n[e.charAt(t)]:64;if(++t,null==a||null==o||null==s||null==c)throw new r;const l=a<<2|o>>4;if(i.push(l),64!==s){const e=o<<4&240|s>>2;if(i.push(e),64!==c){const e=s<<6&192|c;i.push(e)}}}return i},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 r extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const i=function(e){return function(e){const r=t(e);return n.encodeByteArray(r,!0)}(e).replace(/\./g,"")},a=()=>{try{return function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==e.g)return e.g;throw new Error("Unable to locate global object.")}().__FIREBASE_DEFAULTS__||(()=>{if("undefined"==typeof process||void 0===process.env)return;const e=process.env.__FIREBASE_DEFAULTS__;return e?JSON.parse(e):void 0})()||(()=>{if("undefined"==typeof document)return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch(e){return}const t=e&&function(e){try{return n.decodeString(e,!0)}catch(e){console.error("base64Decode failed: ",e)}return null}(e[1]);return t&&JSON.parse(t)})()}catch(e){return void console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`)}},o=()=>{var e;return null===(e=a())||void 0===e?void 0:e.config};class s{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 c(){try{return"object"==typeof indexedDB}catch(e){return!1}}function l(){return new Promise(((e,t)=>{try{let n=!0;const 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 u extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name="FirebaseError",Object.setPrototypeOf(this,u.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,d.prototype.create)}}class d{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},r=`${this.service}/${e}`,i=this.errors[e],a=i?function(e,t){return e.replace(p,((e,n)=>{const r=t[n];return null!=r?String(r):`<${n}?>`}))}(i,n):"Error",o=`${this.serviceName}: ${a} (${r}).`;return new u(r,o,n)}}const p=/\{\$([^}]+)}/g;function f(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const i of n){if(!r.includes(i))return!1;const n=e[i],a=t[i];if(h(n)&&h(a)){if(!f(n,a))return!1}else if(n!==a)return!1}for(const e of r)if(!n.includes(e))return!1;return!0}function h(e){return null!==e&&"object"==typeof e}function g(e){return e&&e._delegate?e._delegate:e}class m{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}}const b="[DEFAULT]";class w{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){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const e=new s;if(this.instancesDeferred.set(t,e),this.isInitialized(t)||this.shouldAutoInitialize())try{const n=this.getOrInitializeService({instanceIdentifier:t});n&&e.resolve(n)}catch(e){}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const 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()){if(r)return null;throw Error(`Service ${this.name} is not available`)}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}}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(function(e){return"EAGER"===e.instantiationMode}(e))try{this.getOrInitializeService({instanceIdentifier:b})}catch(e){}for(const[e,t]of this.instancesDeferred.entries()){const n=this.normalizeInstanceIdentifier(e);try{const e=this.getOrInitializeService({instanceIdentifier:n});t.resolve(e)}catch(e){}}}}clearInstance(e=b){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const 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=b){return this.instances.has(e)}getOptions(e=b){return this.instancesOptions.get(e)||{}}initialize(e={}){const{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`);const r=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[e,t]of this.instancesDeferred.entries())n===this.normalizeInstanceIdentifier(e)&&t.resolve(r);return r}onInit(e,t){var n;const 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);const a=this.instances.get(r);return a&&e(a,r),()=>{i.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const 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:(r=e,r===b?void 0:r),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){}var r;return n||null}normalizeInstanceIdentifier(e=b){return this.component?this.component.multipleInstances?e:b:e}shouldAutoInitialize(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode}}class y{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new 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);const t=new w(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}const v=[];var I;!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(I||(I={}));const S={debug:I.DEBUG,verbose:I.VERBOSE,info:I.INFO,warn:I.WARN,error:I.ERROR,silent:I.SILENT},_=I.INFO,E={[I.DEBUG]:"log",[I.VERBOSE]:"log",[I.INFO]:"info",[I.WARN]:"warn",[I.ERROR]:"error"},D=(e,t,...n)=>{if(t<e.logLevel)return;const r=(new Date).toISOString(),i=E[t];if(!i)throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`);console[i](`[${r}] ${e.name}:`,...n)},C=(e,t)=>t.some((t=>e instanceof t));let k,T;const A=new WeakMap,O=new WeakMap,B=new WeakMap,L=new WeakMap,j=new WeakMap;let M={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return O.get(e);if("objectStoreNames"===t)return e.objectStoreNames||B.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return P(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function N(e){return"function"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(T||(T=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply($(this),e),P(A.get(this))}:function(...e){return P(t.apply($(this),e))}:function(e,...n){const r=t.call($(this),e,...n);return B.set(r,e.sort?e.sort():[e]),P(r)}:(e instanceof IDBTransaction&&function(e){if(O.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));O.set(e,t)}(e),C(e,k||(k=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,M):e);var t}function P(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{t(P(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((t=>{t instanceof IDBCursor&&A.set(t,e)})).catch((()=>{})),j.set(t,e),t}(e);if(L.has(e))return L.get(e);const t=N(e);return t!==e&&(L.set(e,t),j.set(t,e)),t}const $=e=>j.get(e),x=["get","getKey","getAll","getAllKeys","count"],R=["put","add","delete","clear"],H=new Map;function F(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(H.get(t))return H.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=R.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!x.includes(n))return;const a=async function(e,...t){const a=this.transaction(e,i?"readwrite":"readonly");let o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return H.set(t,a),a}var W;W=M,M={...W,get:(e,t,n)=>F(e,t)||W.get(e,t,n),has:(e,t)=>!!F(e,t)||W.has(e,t)};class K{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map((e=>{if(function(e){const t=e.getComponent();return"VERSION"===(null==t?void 0:t.type)}(e)){const t=e.getImmediate();return`${t.library}/${t.version}`}return null})).filter((e=>e)).join(" ")}}const V="@firebase/app",U="0.9.15",z=new class{constructor(e){this.name=e,this._logLevel=_,this._logHandler=D,this._userLogHandler=null,v.push(this)}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in I))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel="string"==typeof e?S[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if("function"!=typeof e)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,I.DEBUG,...e),this._logHandler(this,I.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,I.VERBOSE,...e),this._logHandler(this,I.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,I.INFO,...e),this._logHandler(this,I.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,I.WARN,...e),this._logHandler(this,I.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,I.ERROR,...e),this._logHandler(this,I.ERROR,...e)}}("@firebase/app"),q="[DEFAULT]",G={[V]:"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"},J=new Map,Y=new Map;function Q(e,t){try{e.container.addComponent(t)}catch(n){z.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function X(e){const t=e.name;if(Y.has(t))return z.debug(`There were multiple attempts to register component ${t}.`),!1;Y.set(t,e);for(const t of J.values())Q(t,e);return!0}function Z(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}const ee=new d("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.","invali
1d-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invalid-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 te{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 m("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 ee.create("app-deleted",{appName:this._name})}}function ne(e,t={}){let n=e;"object"!=typeof t&&(t={name:t});const r=Object.assign({name:q,automaticDataCollectionEnabled:!1},t),i=r.name;if("string"!=typeof i||!i)throw ee.create("bad-app-name",{appName:String(i)});if(n||(n=o()),!n)throw ee.create("no-options");const a=J.get(i);if(a){if(f(n,a.options)&&f(r,a.config))return a;throw ee.create("duplicate-app",{appName:i})}const s=new y(i);for(const e of Y.values())s.addComponent(e);const c=new te(n,r,s);return J.set(i,c),c}function re(e=q){const t=J.get(e);if(!t&&e===q&&o())return ne();if(!t)throw ee.create("no-app",{appName:e});return t}function ie(e,t,n){var r;let i=null!==(r=G[e])&&void 0!==r?r:e;n&&(i+=`-${n}`);const a=i.match(/\s|\//),o=t.match(/\s|\//);if(a||o){const e=[`Unable to register library "${i}" with version "${t}":`];return a&&e.push(`library name "${i}" contains illegal characters (whitespace or "/")`),a&&o&&e.push("and"),o&&e.push(`version name "${t}" contains illegal characters (whitespace or "/")`),void z.warn(e.join(" "))}X(new m(`${i}-version`,(()=>({library:i,version:t})),"VERSION"))}const ae="firebase-heartbeat-database",oe=1,se="firebase-heartbeat-store";let ce=null;function le(){return ce||(ce=function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=P(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(P(o.result),e.oldVersion,e.newVersion,P(o.transaction),e)})),n&&o.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),s.then((e=>{a&&e.addEventListener("close",(()=>a())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),s}(ae,oe,{upgrade:(e,t)=>{0===t&&e.createObjectStore(se)}}).catch((e=>{throw ee.create("idb-open",{originalErrorMessage:e.message})}))),ce}async function ue(e,t){try{const n=(await le()).transaction(se,"readwrite"),r=n.objectStore(se);await r.put(t,de(e)),await n.done}catch(e){if(e instanceof u)z.warn(e.message);else{const t=ee.create("idb-set",{originalErrorMessage:null==e?void 0:e.message});z.warn(t.message)}}}function de(e){return`${e.name}!${e.options.appId}`}class pe{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new he(t),this._heartbeatsCachePromise=this._storage.read().then((e=>(this._heartbeatsCache=e,e)))}async triggerHeartbeat(){const e=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),t=fe();if(null===this._heartbeatsCache&&(this._heartbeatsCache=await this._heartbeatsCachePromise),this._heartbeatsCache.lastSentHeartbeatDate!==t&&!this._heartbeatsCache.heartbeats.some((e=>e.date===t)))return this._heartbeatsCache.heartbeats.push({date:t,agent:e}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter((e=>{const t=new Date(e.date).valueOf();return Date.now()-t<=2592e6})),this._storage.overwrite(this._heartbeatsCache)}
vendor: 20,013 bytes, line 1
1async getHeartbeatsHeader(){if(null===this._heartbeatsCache&&await this._heartbeatsCachePromise,null===this._heartbeatsCache||0===this._heartbeatsCache.heartbeats.length)return"";const e=fe(),{heartbeatsToSend:t,unsentEntries:n}=function(e,t=1024){const n=[];let r=e.slice();for(const i of e){const e=n.find((e=>e.agent===i.agent));if(e){if(e.dates.push(i.date),ge(n)>t){e.dates.pop();break}}else if(n.push({agent:i.agent,dates:[i.date]}),ge(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}(this._heartbeatsCache.heartbeats),r=i(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 fe(){return(new Date).toISOString().substring(0,10)}class he{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return!!c()&&l().then((()=>!0)).catch((()=>!1))}async read(){return await this._canUseIndexedDBPromise&&await async function(e){try{const t=await le();return await t.transaction(se).objectStore(se).get(de(e))}catch(e){if(e instanceof u)z.warn(e.message);else{const t=ee.create("idb-get",{originalErrorMessage:null==e?void 0:e.message});z.warn(t.message)}}}(this.app)||{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const n=await this.read();return ue(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){const n=await this.read();return ue(this.app,{lastSentHeartbeatDate:null!==(t=e.lastSentHeartbeatDate)&&void 0!==t?t:n.lastSentHeartbeatDate,heartbeats:[...n.heartbeats,...e.heartbeats]})}}}function ge(e){return i(JSON.stringify({version:2,heartbeats:e})).length}X(new m("platform-logger",(e=>new K(e)),"PRIVATE")),X(new m("heartbeat",(e=>new pe(e)),"PRIVATE")),ie(V,U,""),ie(V,U,"esm2017"),ie("fire-js",""),ie("firebase","10.1.0","app");const me=(e,t)=>t.some((t=>e instanceof t));let be,we;const ye=new WeakMap,ve=new WeakMap,Ie=new WeakMap,Se=new WeakMap,_e=new WeakMap;let Ee={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return ve.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Ie.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Ce(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function De(e){return"function"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(we||(we=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(ke(this),e),Ce(ye.get(this))}:function(...e){return Ce(t.apply(ke(this),e))}:function(e,...n){const r=t.call(ke(this),e,...n);return Ie.set(r,e.sort?e.sort():[e]),Ce(r)}:(e instanceof IDBTransaction&&function(e){if(ve.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));ve.set(e,t)}(e),me(e,be||(be=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,Ee):e);var t}function Ce(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{t(Ce(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((t=>{t instanceof IDBCursor&&ye.set(t,e)})).catch((()=>{})),_e.set(t,e),t}(e);if(Se.has(e))return Se.get(e);const t=De(e);return t!==e&&(Se.set(e,t),_e.set(t,e)),t}const ke=e=>_e.get(e),Te=["get","getKey","getAll","getAllKeys","count"],Ae=["put","add","delete","clear"],Oe=new Map;function Be(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Oe.get(t))return Oe.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Ae.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!Te.includes(n))return;const a=async function(e,...t){const a=this.transaction(e,i?"readwrite":"readonly");let o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return Oe.set(t,a),a}Ee=(e=>({...e,get:(t,n,r)=>Be(t,n)||e.get(t,n,r),has:(t,n)=>!!Be(t,n)||e.has(t,n)}))(Ee);const Le="@firebase/installations",je="0.6.4",Me=1e4,Ne=`w:${je}`,Pe="FIS_v2",$e="https://firebaseinstallations.googleapis.com/v1",xe=36e5,Re=new d("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function He(e){return e instanceof u&&e.code.includes("request-failed")}function Fe({projectId:e}){return`${$e}/projects/${e}/installations`}function We(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function Ke(e,t){const n=(await t.json()).error;return Re.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function Ve({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}async function Ue(e){const t=await e();return t.status>=500&&t.status<600?e():t}function ze(e){return new Promise((t=>{setTimeout(t,e)}))}const qe=/^[cdef][\w-]{21}$/,Ge="";function Je(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){var t;return(t=e,btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_")).substr(0,22)}(e);return qe.test(t)?t:Ge}catch(e){return Ge}}function Ye(e){return`${e.appName}!${e.appId}`}const Qe=new Map;function Xe(e,t){const n=Ye(e);Ze(n,t),function(e,t){const n=(!et&&"BroadcastChannel"in self&&(et=new BroadcastChannel("[Firebase] FID Change"),et.onmessage=e=>{Ze(e.data.key,e.data.fid)}),et);n&&n.postMessage({key:e,fid:t}),0===Qe.size&&et&&(et.close(),et=null)}(n,t)}function Ze(e,t){const n=Qe.get(e);if(n)for(const e of n)e(t)}let et=null;const tt="firebase-installations-database",nt=1,rt="firebase-installations-store";let it=null;function at(){return it||(it=function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=Ce(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(Ce(o.result),e.oldVersion,e.newVersion,Ce(o.transaction))})),n&&o.addEventListener("blocked",(()=>n())),s.then((e=>{a&&e.addEventListener("close",(()=>a())),i&&e.addEventListener("versionchange",(()=>i()))})).catch((()=>{})),s}(tt,nt,{upgrade:(e,t)=>{0===t&&e.createObjectStore(rt)}})),it}async function ot(e,t){const n=Ye(e),r=(await at()).transaction(rt,"readwrite"),i=r.objectStore(rt),a=await i.get(n);return await i.put(t,n),await r.done,a&&a.fid===t.fid||Xe(e,t.fid),t}async function st(e){const t=Ye(e),n=(await at()).transaction(rt,"readwrite");await n.objectStore(rt).delete(t),await n.done}async function ct(e,t){const n=Ye(e),r=(await at()).transaction(rt,"readwrite"),i=r.objectStore(rt),a=await i.get(n),o=t(a);return void 0===o?await i.delete(n):await i.put(o,n),await r.done,!o||a&&a.fid===o.fid||Xe(e,o.fid),o}async function lt(e){let t;const n=await ct(e.appConfig,(n=>{const r=function(e){return pt(e||{fid:Je(),registrationStatus:0})}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine)return{installationEntry:t,registrationPromise:Promise.reject(Re.create("app-offline"))};const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=Fe(e),i=Ve(e),a=t.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={fid:n,authVersion:Pe,appId:e.appId,sdkVersion:Ne},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await Ue((()=>fetch(r,s)));if(c.ok){const e=await c.json();return{fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:We(e.authToken)}}throw await Ke("Create Installation",c)}(e,t);return ot(e.appConfig,n)}catch(n){throw He(n)&&409===n.customData.serverCode?await st(e.appConfig):await ot(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:ut(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry}));return n.fid===Ge?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function ut(e){let t=await dt(e.appConfig);for(;1===t.registrationStatus;)await ze(100),t=await dt(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await lt(e);return n||t}return t}function dt(e){return ct(e,(e=>{if(!e)throw Re.create("installation-not-found");return pt(e)}))}function pt(e){return 1===(t=e).registrationStatus&&t.registrationTime+Me<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function ft({appConfig:e,heartbeatServiceProvider:t},n){const r=function(e,{fid:t}){return`${Fe(e)}/${t}/authTokens:generate`}(e,n),i=function(e,{refreshToken:t}){const n=Ve(e);return n.append("Authorization",function(e){return`${Pe} ${e}`}(t)),n}(e,n),a=t.getImmediate({optional:!0});if(a){const e=await a.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={installation:{sdkVersion:Ne,appId:e.appId}},s={method:"POST",headers:i,body:JSON.stringify(o)},c=await Ue((()=>fetch(r,s)));if(c.ok)return We(await c.json());throw await Ke("Generate Auth Token",c)}async function ht(e,t=!1){let n;const r=await ct(e.appConfig,(r=>{if(!mt(r))throw Re.create("not-registered");const i=r.authToken;if(!t&&(2===(a=i).requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+xe}(a)))return r;var a;if(1===i.requestStatus)return n=async function(e,t){let n=await gt(e.appConfig);for(;1===n.authToken.requestStatus;)await ze(100),n=await gt(e.appConfig);const r=n.authToken;return 0===r.requestStatus?ht(e,t):r}(e,t),r;{if(!navigator.onLine)throw Re.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}(r);return n=async function(e,t){try{const n=await ft(e,t),r=Object.assign(Object.assign({},t),{authToken:n});return await ot(e.appConfig,r),n}catch(n){if(!He(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await ot(e.appConfig,n)}else await st(e.appConfig);throw n}}(e,t),t}}));return n?await n:r.authToken}function gt(e){return ct(e,(e=>{if(!mt(e))throw Re.create("not-registered");return 1===(t=e.authToken).requestStatus&&t.requestTime+Me<Date.now()?Object.assign(Object.assign({},e),{authToken:{requestStatus:0}}):e;var t}))}function mt(e){return void 0!==e&&2===e.registrationStatus}function bt(e){return Re.create("missing-app-config-values",{valueName:e})}const wt="installations";X(new m(wt,(e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw bt("App Configuration");if(!e.name)throw bt("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw bt(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:Z(t,"heartbeat"),_delete:()=>Promise.resolve()}}),"PUBLIC")),X(new m("installations-internal",(e=>{const t=Z(e.getProvider("app").getImmediate(),wt).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await lt(t);return r?r.catch(console.error):ht(t).catch(console.error),n.fid}(t),getToken:e=>async function(e,t=!1){const n=e;return await async function(e){const{registrationPromise:t}=await lt(e);t&&await t}(n),(await ht(n,t)).token}(t,e)}}),"PRIVATE")),ie(Le,je),ie(Le,je,"esm2017");const yt=(e,t)=>t.some((t=>e instanceof t));let vt,It;const St=new WeakMap,_t=new WeakMap,Et=new WeakMap,Dt=new WeakMap,Ct=new WeakMap;let kt={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return _t.get(e);if("objectStoreNames"===t)return e.objectStoreNames||Et.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return At(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Tt(e){return"function"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(It||(It=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(Ot(this),e),At(St.get(this))}:function(...e){return At(t.apply(Ot(this),e))}:function(e,...n){const r=t.call(Ot(this),e,...n);return Et.set(r,e.sort?e.sort():[e]),At(r)}:(e instanceof IDBTransaction&&function(e){if(_t.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));_t.set(e,t)}(e),yt(e,vt||(vt=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,kt):e);var t}function At(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{t(At(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((t=>{t instanceof IDBCursor&&St.set(t,e)})).catch((()=>{})),Ct.set(t,e),t}(e);if(Dt.has(e))return Dt.get(e);const t=Tt(e);return t!==e&&(Dt.set(e,t),Ct.set(t,e)),t}const Ot=e=>Ct.get(e);function Bt(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=At(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(At(o.result),e.oldVersion,e.newVersion,At(o.transaction))})),n&&o.addEventListener("blocked",(()=>n())),s.then((e=>{a&&e.addEventListener("close",(()=>a())),i&&e.addEventListener("versionchange",(()=>i()))})).catch((()=>{})),s}function Lt(e,{blocked:t}={}){const n=indexedDB.deleteDatabase(e);return t&&n.addEventListener("blocked",(()=>t())),At(n).then((()=>{}))}const jt=["get","getKey","getAll","getAllKeys","count"],Mt=["put","add","delete","clear"],Nt=new Map;function Pt(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Nt.get(t))return Nt.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Mt.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!jt.includes(n))return;const a=async function(e,...t){const a=this.transaction(e,i?"readwrite":"readonly");let o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return Nt.set(t,a),a}kt=(e=>({...e,get:(t,n,r)=>Pt(t,n)||e.get(t,n,r),has:(t,n)=>!!Pt(t,n)||e.has(t,n)}))(kt);const $t="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",xt="https://fcmregistrations.googleapis.com/v1",Rt="FCM_MSG",Ht=3,Ft=1;var Wt,Kt;function Vt(e){const t=new Uint8Array(e);return btoa(String.fromCharCode(...t)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Ut(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;++e)r[e]=n.charCodeAt(e);return r}!function(e){e[e.DATA_MESSAGE=1]="DATA_MESSAGE",e[e.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION"}(Wt||(Wt={})),function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"}(Kt||(Kt={}));const zt="fcm_token_details_db",qt=5,Gt="fcm_token_object_Store",Jt="firebase-messaging-database",Yt=1,Qt="firebase-messaging-store";let Xt=null;function Zt(){return Xt||(Xt=Bt(Jt,Yt,{upgrade:(e,t)=>{0===t&&e.createObjectStore(Qt)}})),Xt}async function en(e){const t=nn(e),n=await Zt(),r=await n.transaction(Qt).objectStore(Qt).get(t);if(r)return r;{const t=await async function(e){if("databases"in indexedDB){const e=(await indexedDB.databases()).map((e=>e.name));if(!e.includes(zt))return null}let t=null;return(await Bt(zt,qt,{upgrade:async(n,r,i,a)=>{var o;if(r<2)return;if(!n.objectStoreNames.contains(Gt))return;const s=a.objectStore(Gt),c=await s.index("fcmSenderId").get(e);if(await s.clear(),c)if(2===r){const e=c;if(!e.auth||!e.p256dh||!e.endpoint)return;t={token:e.fcmToken,createTime:null!==(o=e.createTime)&&void 0!==o?o:Date.now(),subscriptionOptions:{auth:e.auth,p256dh:e.p256dh,endpoint:e.endpoint,swScope:e.swScope,vapidKey:"string"==typeof e.vapidKey?e.vapidKey:Vt(e.vapidKey)}}}else if(3===r){const e=c;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:Vt(e.auth),p256dh:Vt(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:Vt(e.vapidKey)}}}else if(4===r){const e=c;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:Vt(e.auth),p256dh:Vt(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:Vt(e.vapidKey)}}}}})).close(),await Lt(zt),await Lt("fcm_vapid_details_db"),await Lt("undefined"),function(e){if(!e||!e.subscriptionOptions)return!1;const{subscriptionOptions:t}=e;return"number"==typeof e.createTime&&e.createTime>0&&"string"==typeof e.token&&e.token.length>0&&"string"==typeof t.auth&&t.auth.length>0&&"string"==typeof t.p256dh&&t.p256dh.length>0&&"string"==typeof t.endpoint&&t.endpoint.length>0&&"string"==typeof t.swScope&&t.swScope.length>0&&"string"==typeof t.vapidKey&&t.vapidKey.length>0}(t)?t:null}(e.appConfig.senderId);if(t)return await tn(e,t),t}}async function tn(e,t){const n=nn(e),r=(await Zt()).transaction(Qt,"readwrite");return await r.objectStore(Qt).put(t,n),await r.done,t}function nn({appConfig:e}){return e.appId}const rn=new d("messaging","Messaging",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invali
1d-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."});async function an(e,t){const n={method:"DELETE",headers:await sn(e)};try{const r=await fetch(`${on(e.appConfig)}/${t}`,n),i=await r.json();if(i.error){const e=i.error.message;throw rn.create("token-unsubscribe-failed",{errorInfo:e})}}catch(e){throw rn.create("token-unsubscribe-failed",{errorInfo:null==e?void 0:e.toString()})}}function on({projectId:e}){return`${xt}/projects/${e}/registrations`}async function sn({appConfig:e,installations:t}){const n=await t.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":`FIS ${n}`})}function cn({p256dh:e,auth:t,endpoint:n,vapidKey:r}){const i={web:{endpoint:n,auth:t,p256dh:e}};return r!==$t&&(i.web.applicationPubKey=r),i}async function ln(e){const t=await en(e.firebaseDependencies);t&&(await an(e.firebaseDependencies,t.token),await async function(e){const t=nn(e),n=(await Zt()).transaction(Qt,"readwrite");await n.objectStore(Qt).delete(t),await n.done}
1(e.firebaseDependencies));const n=await e.swRegistration.pushManager.getSubscription();return!n||n.unsubscribe()}async function un(e,t){const n=await async function(e,t){const n=await sn(e),r=cn(t),i={method:"POST",headers:n,body:JSON.stringify(r)};let a;try{const t=await fetch(on(e.appConfig),i);a=await t.json()}catch(e){throw rn.create("token-subscribe-failed",{errorInfo:null==e?void 0:e.toString()})}if(a.error){const e=a.error.message;throw rn.create("token-subscribe-failed",{errorInfo:e})}if(!a.token)throw rn.create("token-subscribe-no-token");return a.token}(e,t),r={token:n,createTime:Date.now(),subscriptionOptions:t};return await tn(e,r),r.token}function dn(e,t){const n=[];for(let r=0;r<e.length;r++)n.push(e.charAt(r)),r<t.length&&n.push(t.charAt(r));return n.join("")}async function pn(e,t){const n=function({data:e}){if(!e)return null;try{return e.json()}catch(e){return null}}(e);if(!n)return;t.deliveryMetricsExportedToBigQueryEnabled&&await async function(e,t){const n=function(e,t){var n,r;const i={};return e.from&&(i.project_number=e.from),e.fcmMessageId&&(i.message_id=e.fcmMessageId),i.instance_id=t,e.notification?i.message_type=Wt.DISPLAY_NOTIFICATION.toString():i.message_type=Wt.DATA_MESSAGE.toString(),i.sdk_platform=Ht.toString(),i.package_name=self.origin.replace(/(^\w+:|^)\/\//,""),!e.collapse_key||(i.collapse_key=e.collapse_key),i.event=Ft.toString(),!(null===(n=e.fcmOptions)||void 0===n?void 0:n.analytics_label)||(i.analytics_label=null===(r=e.fcmOptions)||void 0===r?void 0:r.analytics_label),i}(t,await e.firebaseDependencies.installations.getId());!function(e,t){const n={};n.event_time_ms=Math.floor(Date.now()).toString(),n.source_extension_json_proto3=JSON.stringify(t),e.logEvents.push(n)}(e,n)}(t,n);const r=await fn();if(function(e){return e.some((e=>"visible"===e.visibilityState&&!e.url.startsWith("chrome-extension://")))}(r))return function(e,t){t.isFirebaseMessaging=!0,t.messageType=Kt.PUSH_RECEIVED;for(const n of e)n.postMessage(t)}(r,n);if(n.notification&&await function(e){var t;const{actions:n}=e,{maxActions:r}=Notification;return n&&r&&n.length>r&&console.warn(`This browser only supports ${r} actions. The remaining actions will not be displayed.`),self.registration.showNotification(null!==(t=e.title)&&void 0!==t?t:"",e)}(function(e){const t=Object.assign({},e.notification);return t.data={[Rt]:e},t}(n)),t&&t.onBackgroundMessageHandler){const e=function(e){const t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};return function(e,t){if(!t.notification)return;e.notification={};const n=t.notification.title;n&&(e.notification.title=n);const r=t.notification.body;r&&(e.notification.body=r);const i=t.notification.image;i&&(e.notification.image=i);const a=t.notification.icon;a&&(e.notification.icon=a)}(t,e),function(e,t){t.data&&(e.data=t.data)}(t,e),function(e,t){var n,r,i,a,o;if(!t.fcmOptions&&!(null===(n=t.notification)||void 0===n?void 0:n.click_action))return;e.fcmOptions={};const s=null!==(i=null===(r=t.fcmOptions)||void 0===r?void 0:r.link)&&void 0!==i?i:null===(a=t.notification)||void 0===a?void 0:a.click_action;s&&(e.fcmOptions.link=s);const c=null===(o=t.fcmOptions)||void 0===o?void 0:o.analytics_label;c&&(e.fcmOptions.analyticsLabel=c)}(t,e),t}(n);"function"==typeof t.onBackgroundMessageHandler?await t.onBackgroundMessageHandler(e):t.onBackgroundMessageHandler.next(e)}}function fn(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function hn(e){return rn.create("missing-app-config-values",{valueName:e})}dn("hts/frbslgigp.ogepscmv/ieo/eaylg","tp:/ieaeogn-agolai.o/1frlglgc/o"),dn("AzSCbw63g1R0nCw85jG8","Iaya3yLKwmgvh7cF0q4");class gn{constructor(e,t,n){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;const r=function(e){if(!e||!e.options)throw hn("App Configuration Object");if(!e.name)throw hn("App Name");const t=["projectId","apiKey","appId","messagingSenderId"],{options:n}=e;for(const e of t)if(!n[e])throw hn(e);return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}(e);this.firebaseDependencies={app:e,appConfig:r,installations:t,analyticsProvider:n}}_delete(){return Promise.resolve()}}var mn,bn;X(new m("messaging-sw",(e=>{const t=new gn(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));return self.addEventListener("push",(e=>{e.waitUntil(pn(e,t))})),self.addEventListener("pushsubscriptionchange",(e=>{e.waitUntil(async function(e,t){var n,r;const{newSubscription:i}=e;if(!i)return void await ln(t);const a=await en(t.firebaseDependencies);await ln(t),t.vapidKey=null!==(r=null===(n=null==a?void 0:a.subscriptionOptions)||void 0===n?void 0:n.vapidKey)&&void 0!==r?r:$t,await async function(e){const t=await async function(e,t){return await e.pushManager.getSubscription()||e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:Ut(t)})}(e.swRegistration,e.vapidKey),n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:Vt(t.getKey("auth")),p256dh:Vt(t.getKey("p256dh"))},r=await en(e.firebaseDependencies);if(r){if(function(e,t){const n=t.vapidKey===e.vapidKey,r=t.endpoint===e.endpoint,i=t.auth===e.auth,a=t.p256dh===e.p256dh;return n&&r&&i&&a}(r.subscriptionOptions,n))return Date.now()>=r.createTime+6048e5?async function(e,t){try{const n=await async function(e,t){const n=await sn(e),r=cn(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)};let a;try{const n=await fetch(`${on(e.appConfig)}
1/${t.token}`,i);a=await n.json()}catch(e){throw rn.create("token-update-failed",{errorInfo:null==e?void 0:e.toString()})}if(a.error){const e=a.error.message;throw rn.create("token-update-failed",{errorInfo:e})}if(!a.token)throw rn.create("token-update-no-token");return a.token}(e.firebaseDependencies,t),r=Object.assign(Object.assign({},t),{token:n,createTime:Date.now()});return await tn(e.firebaseDependencies,r),n}catch(t){throw await ln(e),t}}(e,{token:r.token,createTime:Date.now(),subscriptionOptions:n}):r.token;try{await an(e.firebaseDependencies,r.token)}catch(e){console.warn(e)}return un(e.firebaseDependencies,n)}return un(e.firebaseDependencies,n)}(t)}(e,t))})),self.addEventListener("notificationclick",(e=>{e.waitUntil(async function(e){var t,n;const r=null===(n=null===(t=e.notification)||void 0===t?void 0:t.data)||void 0===n?void 0:n[Rt];if(!r)return;if(e.action)return;e.stopImmediatePropagation(),e.notification.close();const i=function(e){var t,n,r;return(null!==(n=null===(t=e.fcmOptions)||void 0===t?void 0:t.link)&&void 0!==n?n:null===(r=e.notification)||void 0===r?void 0:r.click_action)||("object"==typeof(i=e.data)&&i&&"google.c.a.c_id"in i?self.location.origin:null);var i}(r);if(!i)return;const a=new URL(i,self.location.href),o=new URL(self.location.origin);if(a.host!==o.host)return;let s=await async function(e){const t=await fn();for(const n of t){const t=new URL(n.url,self.location.href);if(e.host===t.host)return n}return null}(a);return s?s=await s.focus():(s=await self.clients.openWindow(i),await new Promise((e=>{setTimeout(e,3e3)}))),s?(r.messageType=Kt.NOTIFICATION_CLICKED,r.isFirebaseMessaging=!0,s.postMessage(r)):void 0}(e))})),t}),"PUBLIC")),mn=function(e=re()){return async function(){return c()&&await l()&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}().then((e=>{if(!e)throw rn.create("unsupported-browser")}),(e=>{throw rn.create("indexed-db-unsupported")})),Z(g(e),"messaging-sw").getImmediate()}(function(e){try{return re()}catch{return ne({apiKey:"<?php echo get_option( 'pnfpb_ic_fcm_api' ); ?>",projectId:"<?php echo get_option( 'pnfpb_ic_fcm_projectid' ); ?>",appId:"<?php echo get_option( 'pnfpb_ic_fcm_publickey' ); ?>",messagingSenderId:"<?php echo get_option( 'pnfpb_ic_fcm_messagingsenderid' ); ?>"})}}()),bn=e=>{console.log("[firebase-messaging-sw.js] Received background message ",e);var t={};e.data&&(t=JSON.parse(e.data.json().notification));const n=t.title,r={body:t.body,image:t.image,icon:t.icon,data:{url:t.click_action}};self.registration.showNotification(n,r)},function(e,t){if(void 0!==self.document)throw rn.create("only-available-in-sw");e.onBackgroundMessageHandler=t}(g(mn),bn),self.addEventListener("notificationclick",(e=>{if(e.preventDefault(),"read_more"===e.action)e.notification.close(),e.waitUntil(clients.matchAll({type:"window"}).then((t=>{for(client of t)if(client.url===e.notification.data.url&&"focus"in client)return client.focus();if(clients.openWindow)return clients.openWindow(e.notification.data.url)})));else if("custom_url"===e.action){var t="<?php echo get_option('pnfpb_ic_custom_click_action_url') ?>";e.notification.close(),e.waitUntil(clients.matchAll({type:"window"}).then((e=>{for(const n of e)if(n.url===t&&"focus"in n)return n.focus();if(clients.openWindow)return clients.openWindow(t)})))}else"close_notification"===e.action?e.notification.close():(e.notification.close(),e.waitUntil(clients.matchAll({type:"window"}).then((t=>{for(const n of t)if(n.url===e.notification.data.url&&"focus"in n)return n.focus();if(clients.openWindow)return clients.openWindow(e.notification.data.url)}))))}),!1)})();
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.