1import{a4 as wt,ap as L,aq as U,ar as f,as as p,a2 as ne,a3 as I}from"./main-CX5PqK3X.js";import{kP as It,dO as Et}from"./App-DIz0IRcC.js";function St(t){return J(void 0,t)}function J(t,e){if(!(e instanceof Object))return e;switch(e.constructor){case Date:var n=e;return new Date(n.getTime());case Object:t===void 0&&(t={});break;case Array:t=[];break;default:return e}for(var r in e)!e.hasOwnProperty(r)||!kt(r)||(t[r]=J(t[r],e[r]));return t}function kt(t){return t!=="__proto__"}var Tt=(function(){function t(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise(function(n,r){e.resolve=n,e.reject=r})}return t.prototype.wrapCallback=function(e){var n=this;return function(r,i){r?n.reject(r):n.resolve(i),typeof e=="function"&&(n.promise.catch(function(){}),e.length===1?e(r):e(r,i))}},t})();function Ct(){try{return Object.prototype.toString.call(global.process)==="[object process]"}catch{return!1}}function Ot(){return typeof self=="object"&&self.self===self}var At="FirebaseError",Ue=(function(t){wt(e,t);function e(n,r,i){var o=t.call(this,r)||this;return o.code=n,o.customData=i,o.name=At,Object.setPrototypeOf(o,e.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,X.prototype.create),o}return e})(Error),X=(function(){function t(e,n,r){this.service=e,this.serviceName=n,this.errors=r}return t.prototype.create=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=n[0]||{},o=this.service+"/"+e,s=this.errors[e],a=s?Nt(s,i):"Error",u=this.serviceName+": "+a+" ("+o+").",c=new Ue(o,u,i);return c},t})();function Nt(t,e){return t.replace(Pt,function(n,r){var i=e[r];return i!=null?String(i):"<"+r+"?>"})}var Pt=/\{\$([^}]+)}/g;function Fe(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Rt(t,e){var n=new Dt(t,e);return n.subscribe.bind(n)}var Dt=(function(){function t(e,n){var r=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(function(){e(r)}).catch(function(i){r.error(i)})}return t.prototype.next=function(e){this.forEachObserver(function(n){n.next(e)})},t.prototype.error=function(e){this.forEachObserver(function(n){n.error(e)}),this.close(e)},t.prototype.complete=function(){this.forEachObserver(function(e){e.complete()}),this.close()},t.prototype.subscribe=function(e,n,r){var i=this,o;if(e===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");Mt(e,["next","error","complete"])?o=e:o={next:e,error:n,complete:r},o.next===void 0&&(o.next=fe),o.error===void 0&&(o.error=fe),o.complete===void 0&&(o.complete=fe);var s=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(function(){try{i.finalError?o.error(i.finalError):o.complete()}catch{}}),this.observers.push(o),s},t.prototype.unsubscribeOne=function(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))},t.prototype.forEachObserver=function(e){if(!this.finalized)for(var n=0;n<this.observers.length;n++)this.sendOne(n,e)},t.prototype.sendOne=function(e,n){var r=this;this.task.then(function(){if(r.observers!==void 0&&r.observers[e]!==void 0)try{n(r.observers[e])}catch(i){typeof console<"u"&&console.error&&console.error(i)}})},t.prototype.close=function(e){var n=this;this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(function(){n.observers=void 0,n.onNoObservers=void 0}))},t})();function Mt(t,e){if(typeof t!="object"||t===null)return!1;for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i in t&&typeof t[i]=="function")return!0}return!1}function fe(){}var Z=(function(){function t(e,n,r){this.name=e,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return t.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},t.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},t.prototype.setServiceProps=function(e){return this.serviceProps=e,this},t.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},t})();var F="[DEFAULT]";var Lt=(function(){function t(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}return t.prototype.get=function(e){var n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){var r=new Tt;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{var i=this.getOrInitializeService({instanceIdentifier:n});i&&r.resolve(i)}catch{}}return this.instancesDeferred.get(n).promise},t.prototype.getImmediate=function(e){var n,r=this.normalizeInstanceIdentifier(e?.identifier),i=(n=e?.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(r)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:r})}catch(o){if(i)return null;throw o}else{if(i)return null;throw Error("Service "+this.name+" is not available")}},t.prototype.getComponent=function(){return this.component},t.prototype.setComponent=function(e){var n,r;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");
1if(this.component=e,!!this.shouldAutoInitialize()){if(Ft(e))try{this.getOrInitializeService({instanceIdentifier:F})}catch{}try{for(var i=L(this.instancesDeferred.entries()),o=i.next();!o.done;o=i.next()){var s=U(o.value,2),a=s[0],u=s[1],c=this.normalizeInstanceIdentifier(a);try{var l=this.getOrInitializeService({instanceIdentifier:c});u.resolve(l)}catch{}}}catch(m){n={error:m}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},t.prototype.clearInstance=function(e){e===void 0&&(e=F),this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)},t.prototype.delete=function(){return f(this,void 0,void 0,function(){var e;return p(this,function(n){switch(n.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(ne(ne([],U(e.filter(function(r){return"INTERNAL"in r}).map(function(r){return r.INTERNAL.delete()}))),U(e.filter(function(r){return"_delete"in r}).map(function(r){return r._delete()}))))];case 1:return n.sent(),[2]}})})},t.prototype.isComponentSet=function(){return this.component!=null},t.prototype.isInitialized=function(e){return e===void 0&&(e=F),this.instances.has(e)},t.prototype.getOptions=function(e){return e===void 0&&(e=F),this.instancesOptions.get(e)||{}},t.prototype.initialize=function(e){var n,r;e===void 0&&(e={});var i=e.options,o=i===void 0?{}:i,s=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(s))throw Error(this.name+"("+s+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var a=this.getOrInitializeService({instanceIdentifier:s,options:o});try{for(var u=L(this.instancesDeferred.entries()),c=u.next();!c.done;c=u.next()){var l=U(c.value,2),m=l[0],h=l[1],d=this.normalizeInstanceIdentifier(m);s===d&&h.resolve(a)}}catch(E){n={error:E}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return a},t.prototype.onInit=function(e,n){var r,i=this.normalizeInstanceIdentifier(n),o=(r=this.onInitCallbacks.get(i))!==null&&r!==void 0?r:new Set;o.add(e),this.onInitCallbacks.set(i,o);var s=this.instances.get(i);return s&&e(s,i),function(){o.delete(e)}},t.prototype.invokeOnInitCallbacks=function(e,n){var r,i,o=this.onInitCallbacks.get(n);if(o)try{for(var s=L(o),a=s.next();!a.done;a=s.next()){var u=a.value;try{u(e,n)}catch{}}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}},t.prototype.getOrInitializeService=function(e){var n=e.instanceIdentifier,r=e.options,i=r===void 0?{}:r,o=this.instances.get(n);if(!o&&this.component&&(o=this.component.instanceFactory(this.container,{instanceIdentifier:xt(n),options:i}),this.instances.set(n,o),this.instancesOptions.set(n,i),this.invokeOnInitCallbacks(o,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,o)}catch{}return o||null},t.prototype.normalizeInstanceIdentifier=function(e){return e===void 0&&(e=F),this.component?this.component.multipleInstances?e:F:e},t.prototype.shouldAutoInitialize=function(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"},t})();function xt(t){return t===F?void 0:t}function Ft(t){return t.instantiationMode==="EAGER"}var jt=(function(){function t(e){this.name=e,this.providers=new Map}return t.prototype.addComponent=function(e){var n=this.getProvider(e.name);if(n.isComponentSet())throw new Error("Component "+e.name+" has already been registered with "+this.name);n.setComponent(e)},t.prototype.addOrOverwriteComponent=function(e){var n=this.getProvider(e.name);n.isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)},t.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var n=new Lt(e,this);return this.providers.set(e,n),n},t.prototype.getProviders=function(){return Array.from(this.providers.values())},t})();function T(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var o=arguments[e],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var x,we=[],g;(function(t){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"})(g||(g={}));var _e={debug:g.DEBUG,verbose:g.VERBOSE,info:g.INFO,warn:g.WARN,error:g.ERROR,silent:g.SILENT},Vt=g.INFO,Bt=(x={},x[g.DEBUG]="log",x[g.VERBOSE]="log",x[g.INFO]="info",x[g.WARN]="warn",x[g.ERROR]="error",x),qt=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(e<t.logLevel)){var i=new Date().toISOString(),o=Bt[e];if(o)console[o].apply(console,T(["["+i+"] "+t.name+":"],n));
1else throw new Error("Attempted to log a message with an invalid logType (value: "+e+")")}},Kt=(function(){function t(e){this.name=e,this._logLevel=Vt,this._logHandler=qt,this._userLogHandler=null,we.push(this)}return Object.defineProperty(t.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in g))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),t.prototype.setLogLevel=function(e){this._logLevel=typeof e=="string"?_e[e]:e},Object.defineProperty(t.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,T([this,g.DEBUG],e)),this._logHandler.apply(this,T([this,g.DEBUG],e))},t.prototype.log=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,T([this,g.VERBOSE],e)),this._logHandler.apply(this,T([this,g.VERBOSE],e))},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,T([this,g.INFO],e)),this._logHandler.apply(this,T([this,g.INFO],e))},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,T([this,g.WARN],e)),this._logHandler.apply(this,T([this,g.WARN],e))},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._userLogHandler&&this._userLogHandler.apply(this,T([this,g.ERROR],e)),this._logHandler.apply(this,T([this,g.ERROR],e))},t})();function Ht(t){we.forEach(function(e){e.setLogLevel(t)})}function Ut(t,e){for(var n=function(s){var a=null;e&&e.level&&(a=_e[e.level]),t===null?s.userLogHandler=null:s.userLogHandler=function(u,c){for(var l=[],m=2;m<arguments.length;m++)l[m-2]=arguments[m];var h=l.map(function(d){if(d==null)return null;if(typeof d=="string")return d;if(typeof d=="number"||typeof d=="boolean")return d.toString();if(d instanceof Error)return d.message;try{return JSON.stringify(d)}catch{return null}}).filter(function(d){return d}).join(" ");c>=(a??u.logLevel)&&t({level:g[c].toLowerCase(),message:h,args:l,type:u.name})}},r=0,i=we;r<i.length;r++){var o=i[r];n(o)}}var D,_t=(D={},D["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",D["bad-app-name"]="Illegal App name: '{$appName}",D["duplicate-app"]="Firebase App named '{$appName}' already exists",D["app-deleted"]="Firebase App named '{$appName}' already deleted",D["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",D["invalid-log-argument"]="First argument to `onLog` must be null or a function.",D),H=new X("app","Firebase",_t),$e="@firebase/app",$t="0.6.30",zt="@firebase/analytics",Wt="@firebase/app-check",Gt="@firebase/auth",Jt="@firebase/database",Yt="@firebase/functions",Xt="@firebase/installations",Zt="@firebase/messaging",Qt="@firebase/performance",en="@firebase/remote-config",tn="@firebase/storage",nn="@firebase/firestore",rn="firebase-wrapper";var w,re="[DEFAULT]",on=(w={},w[$e]="fire-core",w[zt]="fire-analytics",w[Wt]="fire-app-check",w[Gt]="fire-auth",w[Jt]="fire-rtdb",w[Yt]="fire-fn",w[Xt]="fire-iid",w[Zt]="fire-fcm",w[Qt]="fire-perf",w[en]="fire-rc",w[tn]="fire-gcs",w[nn]="fire-fst",w["fire-js"]="fire-js",w[rn]="fire-js-all",w);var _=new Kt("@firebase/app");var te=(function(){function t(e,n,r){var i=this;this.firebase_=r,this.isDeleted_=!1,this.name_=n.name,this.automaticDataCollectionEnabled_=n.automaticDataCollectionEnabled||!1,this.options_=St(e),this.container=new jt(n.name),this._addComponent(new Z("app",function(){return i}
1,"PUBLIC")),this.firebase_.INTERNAL.components.forEach(function(o){return i._addComponent(o)})}return Object.defineProperty(t.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),t.prototype.delete=function(){var e=this;return new Promise(function(n){e.checkDestroyed_(),n()}).then(function(){return e.firebase_.INTERNAL.removeApp(e.name_),Promise.all(e.container.getProviders().map(function(n){return n.delete()}))}).then(function(){e.isDeleted_=!0})},t.prototype._getService=function(e,n){var r;n===void 0&&(n=re),this.checkDestroyed_();var i=this.container.getProvider(e);return!i.isInitialized()&&((r=i.getComponent())===null||r===void 0?void 0:r.instantiationMode)==="EXPLICIT"&&i.initialize(),i.getImmediate({identifier:n})}
1,t.prototype._removeServiceInstance=function(e,n){n===void 0&&(n=re),this.container.getProvider(e).clearInstance(n)},t.prototype._addComponent=function(e){try{this.container.addComponent(e)}catch(n){_.debug("Component "+e.name+" failed to register with FirebaseApp "+this.name,n)}},t.prototype._addOrOverwriteComponent=function(e){this.container.addOrOverwriteComponent(e)},t.prototype.toJSON=function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}},t.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw H.create("app-deleted",{appName:this.name_})},t})();te.prototype.name&&te.prototype.options||te.prototype.delete||console.log("dc");var sn="8.10.0";function an(t){var e={},n=new Map,r={__esModule:!0,initializeApp:s,app:o,registerVersion:c,setLogLevel:Ht,onLog:l,apps:null,SDK_VERSION:sn,INTERNAL:{registerComponent:u,removeApp:i,components:n,useAsService:m}};r.default=r,Object.defineProperty(r,"apps",{get:a});function i(h){delete e[h]}function o(h){if(h=h||re,!Fe(e,h))throw H.create("no-app",{appName:h});return e[h]}o.App=t;function s(h,d){if(d===void 0&&(d={}),typeof d!="object"||d===null){var E=d;d={name:E}}var S=d;S.name===void 0&&(S.name=re);var y=S.name;if(typeof y!="string"||!y)throw H.create("bad-app-name",{appName:String(y)});if(Fe(e,y))throw H.create("duplicate-app",{appName:y});var R=new t(h,S,r);return e[y]=R,R}function a(){return Object.keys(e).map(function(h){return e[h]})}function u(h){var d=h.name;if(n.has(d))return _.debug("There were multiple attempts to register component "+d+"."),h.type==="PUBLIC"?r[d]:null;if(n.set(d,h),h.type==="PUBLIC"){var E=function(k){if(k===void 0&&(k=o()),typeof k[d]!="function")throw H.create("invalid-app-argument",{appName:d});return k[d]()};h.serviceProps!==void 0&&J(E,h.serviceProps),r[d]=E,t.prototype[d]=function(){for(var k=[],O=0;O<arguments.length;O++)k[O]=arguments[O];var yt=this._getService.bind(this,d);return yt.apply(this,h.multipleInstances?k:[])}}for(var S=0,y=Object.keys(e);S<y.length;S++){var R=y[S];e[R]._addComponent(h)}return h.type==="PUBLIC"?r[d]:null}function c(h,d,E){var S,y=(S=on[h])!==null&&S!==void 0?S:h;E&&(y+="-"+E);var R=y.match(/\s|\//),k=d.match(/\s|\//);if(R||k){var O=['Unable to register library "'+y+'" with version "'+d+'":'];R&&O.push('library name "'+y+'" contains illegal characters (whitespace or "/")'),R&&k&&O.push("and"),k&&O.push('version name "'+d+'" contains illegal characters (whitespace or "/")'),_.warn(O.join(" "));return}u(new Z(y+"-version",function(){return{library:y,version:d}},"VERSION"))}function l(h,d){if(h!==null&&typeof h!="function")throw H.create("invalid-log-argument");Ut(h,d)}function m(h,d){if(d==="serverAuth")return null;var E=d;return E}return r}function ze(){var t=an(te);t.INTERNAL=I(I({},t.INTERNAL),{createFirebaseNamespace:ze,extendNamespace:e,createSubscribe:Rt,ErrorFactory:X,deepExtend:J});function e(n){J(t,n)}return t}var Ie=ze();var un=(function(){function t(e){this.container=e}return t.prototype.getPlatformInfoString=function(){var e=this.container.getProviders();return e.map(function(n){if(cn(n)){var r=n.getImmediate();return r.library+"/"+r.version}else return null}).filter(function(n){return n}).join(" ")},t})();function cn(t){var e=t.getComponent();return e?.type==="VERSION"}function ln(t,e){t.INTERNAL.registerComponent(new Z("platform-logger",function(n){return new un(n)},"PRIVATE")),t.registerVersion($e,$t,e),t.registerVersion("fire-js","")}if(Ot()&&self.firebase!==void 0){_.warn(` 2 Warning: Firebase is already defined in the global scope. Please make sure 3 Firebase library is only loaded once. 4 `);var je=self.firebase.SDK_VERSION;je&&je.indexOf("LITE")>=0&&_.warn(` 5 Warning: You are trying to load Firebase while using Firebase Performance standalone script. 6 You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code. 7 `)}var fn=Ie.initializeApp;Ie.initializeApp=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ct()&&_.warn(` 8 Warning: This is a browser-targeted Firebase bundle but it appears it is being 9 run in a Node environment. If running in a Node environment, make sure you 10 are using the bundle specified by the "main" field in package.json. 11 12 If you are using Webpack, you can specify "main" as the first item in 13 "resolve.mainFields": 14 https://webpack.js.org/configuration/resolve/#resolvemainfields 15 16 If using Rollup, use the @rollup/plugin-node-resolve plugin and specify "main" 17 as the first item in "mainFields", e.g. ['main', 'module']. 18 https://github.com/rollup/@rollup/plugin-node-resolve 19 `),fn.apply(void 0,t)};var N=Ie;ln(N);var pn="firebase",We="8.10.1";N.registerVersion(pn,We,"app");N.SDK_VERSION=We;function dn(t){return Array.prototype.slice.call(t)}function Ge(t){return new Promise(function(e,n){t.onsuccess=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function ae(t,e,n){var r,i=new Promise(function(o,s){r=t[e].apply(t,n),Ge(r).then(o,s)});return i.request=r,i}function hn(t,e,n){var r=ae(t,e,n);return r.then(function(i){if(i)return new Y(i,r.request)})}
19function z(t,e,n){n.forEach(function(r){Object.defineProperty(t.prototype,r,{get:function(){return this[e][r]},set:function(i){this[e][r]=i}})})}function Ee(t,e,n,r){r.forEach(function(i){i in n.prototype&&(t.prototype[i]=function(){return ae(this[e],i,arguments)})})}function ue(t,e,n,r){r.forEach(function(i){i in n.prototype&&(t.prototype[i]=function(){return this[e][i].apply(this[e],arguments)})})}function Je(t,e,n,r){r.forEach(function(i){i in n.prototype&&(t.prototype[i]=function(){return hn(this[e],i,arguments)})})}function K(t){this._index=t}z(K,"_index",["name","keyPath","multiEntry","unique"]);Ee(K,"_index",IDBIndex,["get","getKey","getAll","getAllKeys","count"]);Je(K,"_index",IDBIndex,["openCursor","openKeyCursor"]);function Y(t,e){this._cursor=t,this._request=e}z(Y,"_cursor",["direction","key","primaryKey","value"]);Ee(Y,"_cursor",IDBCursor,["update","delete"]);["advance","continue","continuePrimaryKey"].forEach(function(t){t in IDBCursor.prototype&&(Y.prototype[t]=function(){var e=this,n=arguments;return Promise.resolve().then(function(){return e._cursor[t].apply(e._cursor,n),Ge(e._request).then(function(r){if(r)return new Y(r,e._request)})})})});function C(t){this._store=t}C.prototype.createIndex=function(){return new K(this._store.createIndex.apply(this._store,arguments))};C.prototype.index=function(){return new K(this._store.index.apply(this._store,arguments))};z(C,"_store",["name","keyPath","indexNames","autoIncrement"]);Ee(C,"_store",IDBObjectStore,["put","add","delete","clear","get","getAll","getKey","getAllKeys","count"]);
19Je(C,"_store",IDBObjectStore,["openCursor","openKeyCursor"]);ue(C,"_store",IDBObjectStore,["deleteIndex"]);function Q(t){this._tx=t,this.complete=new Promise(function(e,n){t.oncomplete=function(){e()},t.onerror=function(){n(t.error)},t.onabort=function(){n(t.error)}})}Q.prototype.objectStore=function(){return new C(this._tx.objectStore.apply(this._tx,arguments))};z(Q,"_tx",["objectStoreNames","mode"]);ue(Q,"_tx",IDBTransaction,["abort"]);function ce(t,e,n){this._db=t,this.oldVersion=e,this.transaction=new Q(n)}ce.prototype.createObjectStore=function(){return new C(this._db.createObjectStore.apply(this._db,arguments))};z(ce,"_db",["name","version","objectStoreNames"]);ue(ce,"_db",IDBDatabase,["deleteObjectStore","close"]);function le(t){this._db=t}le.prototype.transaction=function(){return new Q(this._db.transaction.apply(this._db,arguments))};z(le,"_db",["name","version","objectStoreNames"]);ue(le,"_db",IDBDatabase,["close"]);["openCursor","openKeyCursor"].forEach(function(t){[C,K].forEach(function(e){t in e.prototype&&(e.prototype[t.replace("open","iterate")]=function(){var n=dn(arguments),r=n[n.length-1],i=this._store||this._index,o=i[t].apply(i,n.slice(0,-1));o.onsuccess=function(){r(o.result)}})})});[K,C].forEach(function(t){t.prototype.getAll||(t.prototype.getAll=function(e,n){var r=this,i=[];return new Promise(function(o){r.iterateCursor(e,function(s){if(!s){o(i);return}if(i.push(s.value),n!==void 0&&i.length==n){o(i);return}s.continue()})})})});function Se(t,e,n){var r=ae(indexedDB,"open",[t,e]),i=r.request;return i&&(i.onupgradeneeded=function(o){n&&n(new ce(i.result,o.oldVersion,i.transaction))}),r.then(function(o){return new le(o)})}function pe(t){return ae(indexedDB,"deleteDatabase",[t])}var vn="@firebase/installations",Ye="0.4.32";var Xe=1e4,Ze="w:"+Ye,Qe="FIS_v2",gn="https://firebaseinstallations.googleapis.com/v1",mn=3600*1e3,bn="installations",yn="Installations";var M,wn=(M={},M["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',M["not-registered"]="Firebase Installation is not registered.",M["installation-not-found"]="Firebase Installation not found.",M["request-failed"]='{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',M["app-offline"]="Could not process request. Application offline.",M["delete-pending-registration"]="Can't delete installation while there is a pending registration request.",M),P=new X(bn,yn,wn);function et(t){return t instanceof Ue&&t.code.includes("request-failed")}function ke(t){var e=t.projectId;return gn+"/projects/"+e+"/installations"}function tt(t){return{token:t.token,requestStatus:2,expiresIn:In(t.expiresIn),creationTime:Date.now()}}function Te(t,e){return f(this,void 0,void 0,function(){var n,r;return p(this,function(i){switch(i.label){case 0:return[4,e.json()];case 1:return n=i.sent(),r=n.error,[2,P.create("request-failed",{requestName:t,serverCode:r.code,serverMessage:r.message,serverStatus:r.status})]}})})}function nt(t){var e=t.apiKey;return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function rt(t,e){var n=e.refreshToken,r=nt(t);return r.append("Authorization",En(n)),r}function Ce(t){return f(this,void 0,void 0,function(){var e;return p(this,function(n){switch(n.label){case 0:return[4,t()];case 1:return e=n.sent(),e.status>=500&&e.status<600?[2,t()]:[2,e]}})})}function In(t){return Number(t.replace("s","000"))}function En(t){return Qe+" "+t}function Sn(t,e){var n=e.fid;return f(this,void 0,void 0,function(){var r,i,o,s,a,u,c;return p(this,function(l){switch(l.label){case 0:return r=ke(t),i=nt(t),o={fid:n,authVersion:Qe,appId:t.appId,sdkVersion:Ze},s={method:"POST",headers:i,body:JSON.stringify(o)},[4,Ce(function(){return fetch(r,s)})];case 1:return a=l.sent(),a.ok?[4,a.json()]:[3,3];case 2:return u=l.sent(),c={fid:u.fid||n,registrationStatus:2,refreshToken:u.refreshToken,authToken:tt(u.authToken)},[2,c];case 3:return[4,Te("Create Installation",a)];case 4:throw l.sent()}})})}function it(t){return new Promise(function(e){setTimeout(e,t)})}function kn(t){var e=btoa(String.fromCharCode.apply(String,ne([],U(t))));return e.replace(/\+/g,"-").replace(/\//g,"_")}var Tn=/^[cdef][\w-]{21}$/,be="";function Cn(){try{var t=new Uint8Array(17),e=self.crypto||self.msCrypto;e.getRandomValues(t),t[0]=112+t[0]%16;var n=On(t);return Tn.test(n)?n:be}catch{return be}}function On(t){var e=kn(t);return e.substr(0,22)}function W(t){return t.appName+"!"+t.appId}var $=new Map;function ot(t,e){var n=W(t);st(n,e),Pn(n,e)}function An(t,e){at();var n=W(t),r=$.get(n);r||(r=new Set,$.set(n,r)),r.add(e)}function Nn(t,e){var n=W(t),r=$.get(n);r&&(r.delete(e),r.size===0&&$.delete(n),ut())}function st(t,e){var n,r,i=$.get(t);if(i)try{for(var o=L(i),s=o.next();!s.done;s=o.next()){var a=s.value;a(e)}}catch(u){n={error:u}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}function Pn(t,e){var n=at();n&&n.postMessage({key:t,fid:e}),ut()}var j=null;function at(){return!j&&"BroadcastChannel"in self&&(j=new BroadcastChannel("[Firebase] FID Change"),j.onmessage=function(t){st(t.data.key,t.data.fid)}),j}function ut(){$.size===0&&j&&(j.close(),j=null)}var Rn="firebase-installations-database",Dn=1,V="firebase-installations-store",de=null;function Oe(){return de||(de=Se(Rn,Dn,function(t){t.oldVersion===0&&t.createObjectStore(V)})),de}function ie(t,e){return f(this,void 0,void 0,function(){var n,r,i,o,s;return p(this,function(a){switch(a.label){case 0:return n=W(t),[4,Oe()];case 1:return r=a.sent(),i=r.transaction(V,"readwrite"),o=i.objectStore(V),[4,o.get(n)];case 2:return s=a.sent(),[4,o.put(e,n)];case 3:return a.sent(),[4,i.complete];case 4:return a.sent(),(!s||s.fid!==e.fid)&&ot(t,e.fid),[2,e]}})})}function Ae(t){return f(this,void 0,void 0,function(){var e,n,r;return p(this,function(i){switch(i.label){case 0:return e=W(t),[4,Oe()];case 1:return n=i.sent(),r=n.transaction(V,"readwrite"),[4,r.objectStore(V).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}})})}function ee(t,e){return f(this,void 0,void 0,function(){var n,r,i,o,s,a;return p(this,function(u){switch(u.label){case 0:return n=W(t),[4,Oe()];case 1:return r=u.sent(),i=r.transaction(V,"readwrite"),o=i.objectStore(V),[4,o.get(n)];case 2:return s=u.sent(),a=e(s),a!==void 0?[3,4]:[4,o.delete(n)];case 3:return u.sent(),[3,6];case 4:return[4,o.put(a,n)];case 5:u.sent(),u.label=6;case 6:return[4,i.complete];case 7:return u.sent(),a&&(!s||s.fid!==a.fid)&&ot(t,a.fid),[2,a]}})})}function Ne(t){return f(this,void 0,void 0,function(){var e,n,r;return p(this,function(i){switch(i.label){case 0:return[4,ee(t,function(o){var s=Mn(o),a=Ln(t,s);return e=a.registrationPromise,a.installationEntry})];case 1:return n=i.sent(),n.fid!==be?[3,3]:(r={},[4,e]);case 2:return[2,(r.installationEntry=i.sent(),r)];case 3:return[2,{installationEntry:n,registrationPromise:e}]}})})}function Mn(t){var e=t||{fid:Cn(),registrationStatus:0};return ct(e)}function Ln(t,e){if(e.registrationStatus===0){if(!navigator.onLine){var n=Promise.reject(P.create("app-offline"));return{installationEntry:e,registrationPromise:n}}var r={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},i=xn(t,r);return{installationEntry:r,registrationPromise:i}}else return e.registrationStatus===1?{installationEntry:e,registrationPromise:Fn(t)}:{installationEntry:e}}function xn(t,e){return f(this,void 0,void 0,function(){var n,r;return p(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,7]),[4,Sn(t,e)];case 1:return n=i.sent(),[2,ie(t,n)];case 2:return r=i.sent(),et(r)&&r.customData.serverCode===409?[4,Ae(t)]:[3,4];case 3:return i.sent(),[3,6];case 4:return[4,ie(t,{fid:e.fid,registrationStatus:0})];case 5:i.sent(),i.label=6;case 6:throw r;case 7:return[2]}})})}function Fn(t){return f(this,void 0,void 0,function(){var e,n,r,i;return p(this,function(o){switch(o.label){case 0:return[4,Ve(t)];case 1:e=o.sent(),o.label=2;case 2:return e.registrationStatus!==1?[3,5]:[4,it(100)];case 3:return o.sent(),[4,Ve(t)];case 4:return e=o.sent(),[3,2];case 5:return e.registrationStatus!==0?[3,7]:[4,Ne(t)];case 6:return n=o.sent(),r=n.installationEntry,i=n.registrationPromise,i?[2,i]:[2,r];case 7:return[2,e]}})})}function Ve(t){return ee(t,function(e){if(!e)throw P.create("installation-not-found");return ct(e)})}function ct(t){return jn(t)?{fid:t.fid,registrationStatus:0}:t}function jn(t){return t.registrationStatus===1&&t.registrationTime+Xe<Date.now()}function Vn(t,e){var n=t.appConfig,r=t.platformLoggerProvider;return f(this,void 0,void 0,function(){var i,o,s,a,u,c,l,m;return p(this,function(h){switch(h.label){case 0:return i=Bn(n,e),o=rt(n,e),s=r.getImmediate({optional:!0}),s&&o.append("x-firebase-client",s.getPlatformInfoString()),a={installation:{sdkVersion:Ze}},u={method:"POST",headers:o,body:JSON.stringify(a)},[4,Ce(function(){return fetch(i,u)})];case 1:return c=h.sent(),c.ok?[4,c.json()]:[3,3];case 2:return l=h.sent(),m=tt(l),[2,m];case 3:return[4,Te("Generate Auth Token",c)];case 4:throw h.sent()}})})}function Bn(t,e){var n=e.fid;return ke(t)+"/"+n+"/authTokens:generate"}function Pe(t,e){return e===void 0&&(e=!1),f(this,void 0,void 0,function(){var n,r,i,o;return p(this,function(s){switch(s.label){case 0:return[4,ee(t.appConfig,function(a){if
19(!lt(a))throw P.create("not-registered");var u=a.authToken;if(!e&&Hn(u))return a;if(u.requestStatus===1)return n=qn(t,e),a;if(!navigator.onLine)throw P.create("app-offline");var c=_n(a);return n=Kn(t,c),c})];case 1:return r=s.sent(),n?[4,n]:[3,3];case 2:return o=s.sent(),[3,4];case 3:o=r.authToken,s.label=4;case 4:return i=o,[2,i]}})})}function qn(t,e){return f(this,void 0,void 0,function(){var n,r;return p(this,function(i){switch(i.label){case 0:return[4,Be(t.appConfig)];case 1:n=i.sent(),i.label=2;case 2:return n.authToken.requestStatus!==1?[3,5]:[4,it(100)];case 3:return i.sent(),[4,Be(t.appConfig)];case 4:return n=i.sent(),[3,2];case 5:return r=n.authToken,r.requestStatus===0?[2,Pe(t,e)]:[2,r]}})})}function Be(t){return ee(t,function(e){if(!lt(e))throw P.create("not-registered");var n=e.authToken;return $n(n)?I(I({},e),{authToken:{requestStatus:0}}):e})}function Kn(t,e){return f(this,void 0,void 0,function(){var n,i,r,i;return p(this,function(o){switch(o.label){case 0:return o.trys.push([0,3,,8]),[4,Vn(t,e)];case 1:return n=o.sent(),i=I(I({},e),{authToken:n}),[4,ie(t.appConfig,i)];case 2:return o.sent(),[2,n];case 3:return r=o.sent(),et(r)&&(r.customData.serverCode===401||r.customData.serverCode===404)?[4,Ae(t.appConfig)]:[3,5];case 4:return o.sent(),[3,7];case 5:return i=I(I({},e),{authToken:{requestStatus:0}}),[4,ie(t.appConfig,i)];case 6:o.sent(),o.label=7;case 7:throw r;case 8:return[2]}})})}function lt(t){return t!==void 0&&t.registrationStatus===2}function Hn(t){return t.requestStatus===2&&!Un(t)}function Un(t){var e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+mn}function _n(t){var e={requestStatus:1,requestTime:Date.now()};return I(I({},t),{authToken:e})}function $n(t){return t.requestStatus===1&&t.requestTime+Xe<Date.now()}function zn(t){return f(this,void 0,void 0,function(){var e,n,r;return p(this,function(i){switch(i.label){case 0:return[4,Ne(t.appConfig)];case 1:return e=i.sent(),n=e.installationEntry,r=e.registrationPromise,r?r.catch(console.error):Pe(t).catch(console.error),[2,n.fid]}})})}function Wn(t,e){return e===void 0&&(e=!1),f(this,void 0,void 0,function(){var n;return p(this,function(r){switch(r.label){case 0:return[4,Gn(t.appConfig)];case 1:return r.sent(),[4,Pe(t,e)];case 2:return n=r.sent(),[2,n.token]}})})}function Gn(t){return f(this,void 0,void 0,function(){var e;return p(this,function(n){switch(n.label){case 0:return[4,Ne(t)];case 1:return e=n.sent().registrationPromise,e?[4,e]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})}function Jn(t,e){return f(this,void 0,void 0,function(){var n,r,i,o;return p(this,function(s){switch(s.label){case 0:return n=Yn(t,e),r=rt(t,e),i={method:"DELETE",headers:r},[4,Ce(function(){return fetch(n,i)})];case 1:return o=s.sent(),o.ok?[3,3]:[4,Te("Delete Installation",o)];case 2:throw s.sent();case 3:return[2]}})})}function Yn(t,e){var n=e.fid;return ke(t)+"/"+n}function Xn(t){return f(this,void 0,void 0,function(){var e,n;return p(this,function(r){switch(r.label){case 0:return e=t.appConfig,[4,ee(e,function(i){if(!(i&&i.registrationStatus===0))return i})];case 1:if(n=r.sent(),!n)return[3,6];if(n.registrationStatus!==1)return[3,2];throw P.create("delete-pending-registration");case 2:if(n.registrationStatus!==2)return[3,6];if(navigator.onLine)return[3,3];throw P.create("app-offline");case 3:return[4,Jn(e,n)];case 4:return r.sent(),[4,Ae(e)];case 5:r.sent(),r.label=6;case 6:return[2]}})})}function Zn(t,e){var n=t.appConfig;return An(n,e),function(){Nn(n,e)}}function Qn(t){var e,n;if(!t||!t.options)throw he("App Configuration");if(!t.name)throw he("App Name");var r=["projectId","apiKey","appId"];try{for(var i=L(r),o=i.next();!o.done;o=i.next()){var s=o.value;if(!t.options[s])throw he(s)}}catch(a){e={error:a}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}function he(t){return P.create("missing-app-config-values",{valueName:t})}function er(t){var e="installations";t.INTERNAL.registerComponent(new Z(e,function(n){var r=n.getProvider("app").getImmediate(),i=Qn(r),o=n.getProvider("platform-logger"),s={appConfig:i,platformLoggerProvider:o},a={app:r,getId:function(){return zn(s)},getToken:function(u){return Wn(s,u)},delete:function(){return Xn(s)},onIdChange:function(u){return Zn(s,u)}};return a},"PUBLIC")),t.registerVersion(vn,Ye)}er(N);var b,tr=(b={},b["missing-app-config-values"]='Missing App configuration value: "{$valueName}"',b["only-available-in-window"]="This method is available in a Window context.",b["only-available-in-sw"]="This method is available in a service worker context.",b["permission-default"]="The notification permission was not granted and dismissed instead.",b["permission-blocked"]="The notification permission was not granted and blocked instead.",b["unsupported-browser"]="This browser doesn't support the API's required to use the firebase SDK.",b["failed-service-worker-registration"]="We are unable to register the default service worker. {$browserErrorMessage}",b["token-subscribe-failed"]="A problem occurred while subscribing the user to FCM: {$errorInfo}",b["token-subscribe-no-token"]="FCM returned no token when subscribing the user to push.",b["token-unsubscribe-failed"]="A problem occurred while unsubscribing the user from FCM: {$errorInfo}",b["token-update-failed"]="A problem occurred while updating the user from FCM: {$errorInfo}",b["token-update-no-token"]="FCM returned no token when updating the user to push.",b["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.",b["invali
19d-sw-registration"]="The input to useServiceWorker() must be a ServiceWorkerRegistration.",b["invalid-bg-handler"]="The input to setBackgroundMessageHandler() must be a function.",b["invalid-vapid-key"]="The public VAPID key must be a string.",b["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.",b),v=new X("messaging","Messaging",tr);var nr="/firebase-messaging-sw.js",rr="/firebase-cloud-messaging-push-scope",oe="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",ir="https://fcmregistrations.googleapis.com/v1",ft="FCM_MSG",or="FirebaseMessaging: ",sr="google.c.a.e",pt="google.c.a.c_id",ar="google.c.a.ts",ur="google.c.a.c_l",cr=1e3,lr=3e3;var B;(function(t){t.PUSH_RECEIVED="push-received",t.NOTIFICATION_CLICKED="notification-clicked"})(B||(B={}));function A(t){var e=new Uint8Array(t),n=btoa(String.fromCharCode.apply(String,ne([],U(e))));return n.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function fr(t){for(var e="=".repeat((4-t.length%4)%4),n=(t+e).replace(/\-/g,"+").replace(/_/g,"/"),r=atob(n),i=new Uint8Array(r.length),o=0;o<r.length;++o)i[o]=r.charCodeAt(o);return i}var ve="fcm_token_details_db",pr=5,qe="fcm_token_object_Store";function dr(t){return f(this,void 0,void 0,function(){var e,n,r,i,o=this;return p(this,function(s){switch(s.label){case 0:return"databases"in indexedDB?[4,indexedDB.databases()]:[3,2];case 1:if(e=s.sent(),n=e.map(function(a){return a.name}),!n.includes(ve))return[2,null];s.label=2;case 2:return r=null,[4,Se(ve,pr,function(a){return f(o,void 0,void 0,function(){var u,c,l,l,l,m;return p(this,function(h){switch(h.label){case 0:return a.oldVersion<2?[2]:a.objectStoreNames.contains(qe)?(u=a.transaction.objectStore(qe),[4,u.index("fcmSenderId").get(t)]):[2];case 1:return c=h.sent(),[4,u.clear()];case 2:if(h.sent(),!c)return[2];if(a.oldVersion===2){if(l=c,!l.auth||!l.p256dh||!l.endpoint)return[2];r={token:l.fcmToken,createTime:(m=l.createTime)!==null&&m!==void 0?m:Date.now(),subscriptionOptions:{auth:l.auth,p256dh:l.p256dh,endpoint:l.endpoint,swScope:l.swScope,vapidKey:typeof l.vapidKey=="string"?l.vapidKey:A(l.vapidKey)}}}else a.oldVersion===3?(l=c,r={token:l.fcmToken,createTime:l.createTime,subscriptionOptions:{auth:A(l.auth),p256dh:A(l.p256dh),endpoint:l.endpoint,swScope:l.swScope,vapidKey:A(l.vapidKey)}}):a.oldVersion===4&&(l=c,r={token:l.fcmToken,createTime:l.createTime,subscriptionOptions:{auth:A(l.auth),p256dh:A(l.p256dh),endpoint:l.endpoint,swScope:l.swScope,vapidKey:A(l.vapidKey)}});return[2]}})})})];case 3:return i=s.sent(),i.close(),[4,pe(ve)];case 4:return s.sent(),[4,pe("fcm_vapid_details_db")];case 5:return s.sent(),[4,pe("undefined")];case 6:return s.sent(),[2,hr(r)?r:null]}})})}function hr(t){if(!t||!t.subscriptionOptions)return!1;var e=t.subscriptionOptions;return typeof t.createTime=="number"&&t.createTime>0&&typeof t.token=="string"&&t.token.length>0&&typeof e.auth=="string"&&e.auth.length>0&&typeof e.p256dh=="string"&&e.p256dh.length>0&&typeof e.endpoint=="string"&&e.endpoint.length>0&&typeof e.swScope=="string"&&e.swScope.length>0&&typeof e.vapidKey=="string"&&e.vapidKey.length>0}var vr="firebase-messaging-database",gr=1,q="firebase-messaging-store",ge=null;function Re(){return ge||(ge=Se(vr,gr,function(t){t.oldVersion===0&&t.createObjectStore(q)})),ge}function se(t){return f(this,void 0,void 0,function(){var e,n,r,i;return p(this,function(o){switch(o.label){case 0:return e=Me(t),[4,Re()];case 1:return n=o.sent(),[4,n.transaction(q).objectStore(q).get(e)];case 2:return r=o.sent(),r?[2,r]:[3,3];case 3:return[4,dr(t.appConfig.senderId)];case 4:return i=o.sent(),i?[4,De(t,i)]:[3,6];case 5:return o.sent(),[2,i];case 6:return[2]}})})}function De(t,e){return f(this,void 0,void 0,function(){var n,r,i;return p(this,function(o){switch(o.label){case 0:return n=Me(t),[4,Re()];case 1:return r=o.sent(),i=r.transaction(q,"readwrite"),[4,i.objectStore(q).put(e,n)];case 2:return o.sent(),[4,i.complete];case 3:return o.sent(),[2,e]}})})}function mr(t){return f(this,void 0,void 0,function(){var e,n,r;return p(this,function(i){switch(i.label){case 0:return e=Me(t),[4,Re()];case 1:return n=i.sent(),r=n.transaction(q,"readwrite"),[4,r.objectStore(q).delete(e)];case 2:return i.sent(),[4,r.complete];case 3:return i.sent(),[2]}})})}function Me(t){var e=t.appConfig;return e.appId}function br(t,e){return f(this,void 0,void 0,function(){var n,r,i,o,s,a,u;return p(this,function(c){switch(c.label){case 0:return[4,xe(t)];case 1:n=c.sent(),r=ht(e),i={method:"POST",headers:n,body:JSON.stringify(r)},c.label=2;case 2:return c.trys.push([2,5,,6]),[4,fetch(Le(t.appConfig),i)];case 3:return s=c.sent(),[4,s.json()];case 4:return o=c.sent(),[3,6];case 5:throw a=c.sent(),v.create("token-subscribe-failed",{errorInfo:a});case 6:if(o.error)throw u=o.error.message,v.create("token-subscribe-failed",{errorInfo:u});if(!o.token)throw v.create("token-subscribe-no-token");return[2,o.token]}})})}function yr(t,e){return f(this,void 0,void 0,function(){var n,r,i,o,s,a,u;return p(this,function(c){switch(c.label){case 0:return[4,xe(t)];case 1:n=c.sent(),r=ht(e.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)},c.label=2;case 2:return c.trys.push([2,5,,6]),[4,fetch(Le(t.appConfig)+"/"+e.token,i)];case 3:return s=c.sent(),[4,s.json()];case 4:return o=c.sent(),[3,6];case 5:throw a=c.sent(),v.create("token-update-failed",{errorInfo:a});case 6:if(o.error)throw u=o.error.message,v.create("token-update-failed",{errorInfo:u});if(!o.token)throw v.create("token-update-no-token");return[2,o.token]}})})}function dt(t,e){return f(this,void 0,void 0,function(){var n,r,i,o,s,a;return p(this,function(u){switch(u.label){case 0:return[4,xe(t)];case 1:n=u.sent(),r={method:"DELETE",headers:n},u.label=2;case 2:return u.trys.push([2,5,,6]),[4,fetch(Le(t.appConfig)+"/"+e,r)];case 3:return i=u.sent(),[4,i.json()];case 4:if(o=u.sent(),o.error)throw s=o.error.message,v.create("token-unsubscribe-failed",{errorInfo:s});return[3,6];case 5:throw a=u.sent(),v.create("token-unsubscribe-failed",{errorInfo:a});case 6:return[2]}})})}function Le(t){var e=t.projectId;return ir+"/projects/"+e+"/registrations"}function xe(t){var e=t.appConfig,n=t.installations;return f(this,void 0,void 0,function(){var r;return p(this,function(i){switch(i.label){case 0:return[4,n.getToken()];case 1:return r=i.sent(),[2,new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":"FIS "+r})]}})})}function ht(t){var e=t.p256dh,n=t.auth,r=t.endpoint,i=t.vapidKey,o={web:{endpoint:r,auth:n,p256dh:e}};return i!==oe&&(o.web.applicationPubKey=i),o}var wr=10080*60*1e3;function ye(t,e,n){return f(this,void 0,void 0,function(){var r,i,o,s;return p(this,function(a){switch(a.label){case 0:if(Notification.permission!=="granted")throw v.create("permission-blocked");return[4,Er(e,n)];case 1:return r=a.sent(),[4,se(t)];case 2:return i=a.sent(),o={vapidKey:n,swScope:e.scope,endpoint:r.endpoint,auth:A(r.getKey("auth")),p256dh:A(r.getKey("p256dh"))},i?[3,3]:[2,Ke(t,o)];case 3:if(Sr(i.subscriptionOptions,o))return[3,8];a.label=4;case 4:return a.trys.push([4,6,,7]),[4,dt(t,i.token)];case 5:return a.sent(),[3,7];case 6:return s=a.sent(),console.warn(s),[3,7];case 7:return[2,Ke(t,o)];case 8:return Date.now()>=i.createTime+wr?[2,Ir({token:i.token,createTime:Date.now(),subscriptionOptions:o},t,e)]:[2,i.token];case 9:return[2]}})})}function G(t,e){return f(this,void 0,void 0,function(){var n,r;return p(this,function(i){switch(i.label){case 0:return[4,se(t)];case 1:return n=i.sent(),n?[4,dt(t,n.token)]:[3,4];case 2:return i.sent(),[4,mr(t)];case 3:i.sent(),i.label=4;case 4:return[4,e.pushManager.getSubscription()];case 5:return r=i.sent(),r?[2,r.unsubscribe()]:[2,!0]}})})}function Ir(t,e,n){return f(this,void 0,void 0,function(){var r,i,o;return p(this,function(s){switch(s.label){case 0:return s.trys.push([0,3,,5]),[4,yr(e,t)];case 1:return r=s.sent(),i=I(I({},t),{token:r,createTime:Date.now()}),[4,De(e,i)];case 2:return s.sent(),[2,r];case 3:return o=s.sent(),[4,G(e,n)];case 4:throw s.sent(),o;case 5:return[2]}})})}function Ke(t,e){return f(this,void 0,void 0,function(){var n,r;return p(this,function(i){switch(i.label){case 0:return[4,br(t,e)];case 1:return n=i.sent(),r={token:n,createTime:Date.now(),subscriptionOptions:e},[4,De(t,r)];case 2:return i.sent(),[2,r.token]}})})}function Er(t,e){return f(this,void 0,void 0,function(){var n;return p(this,function(r){switch(r.label){case 0:return[4,t.pushManager.getSubscription()];case 1:return n=r.sent(),n?[2,n]:[2,t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:fr(e)})]}})})}function Sr(t,e){var n=e.vapidKey===t.vapidKey,r=e.endpoint===t.endpoint,i=e.auth===t.auth,o=e.p256dh===t.p256dh;return n&&r&&i&&o}function kr(t){var e={from:t.from,collapseKey:t.collapse_key,messageId:t.fcm_message_id};return Tr(e,t),Cr(e,t),Or(e,t),e}function Tr(t,e){if(e.notification){t.notification={};var n=e.notification.title;n&&(t.notification.title=n);var r=e.notification.body;r&&(t.notification.body=r);var i=e.notification.image;i&&(t.notification.image=i)}}function Cr(t,e){e.data&&(t.data=e.data)}function Or(t,e){if(e.fcmOptions){t.fcmOptions={};var n=e.fcmOptions.link;n&&(t.fcmOptions.link=n);var r=e.fcmOptions.analytics_label;r&&(t.fcmOptions.analyticsLabel=r)}}function vt(t){return typeof t=="object"&&!!t&&pt in t}function He(t){return new Promise(function(e){setTimeout(e,t)})}var Ar=(function(){function t(e){var n=this;
19this.firebaseDependencies=e,this.isOnBackgroundMessageUsed=null,this.vapidKey=null,this.bgMessageHandler=null,self.addEventListener("push",function(r){r.waitUntil(n.onPush(r))}),self.addEventListener("pushsubscriptionchange",function(r){r.waitUntil(n.onSubChange(r))}),self.addEventListener("notificationclick",function(r){r.waitUntil(n.onNotificationClick(r))})}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),t.prototype.setBackgroundMessageHandler=function(e){if(this.isOnBackgroundMessageUsed=!1,!e||typeof e!="function")throw v.create("invalid-bg-handler");this.bgMessageHandler=e},t.prototype.onBackgroundMessage=function(e){var n=this;return this.isOnBackgroundMessageUsed=!0,this.bgMessageHandler=e,function(){n.bgMessageHandler=null}},t.prototype.getToken=function(){var e,n;return f(this,void 0,void 0,function(){var r;return p(this,function(i){switch(i.label){case 0:return this.vapidKey?[3,2]:[4,se(this.firebaseDependencies)];case 1:r=i.sent(),this.vapidKey=(n=(e=r?.subscriptionOptions)===null||e===void 0?void 0:e.vapidKey)!==null&&n!==void 0?n:oe,i.label=2;case 2:return[2,ye(this.firebaseDependencies,self.registration,this.vapidKey)]}})})},t.prototype.deleteToken=function(){return G(this.firebaseDependencies,self.registration)},t.prototype.requestPermission=function(){throw v.create("only-available-in-window")},t.prototype.usePublicVapidKey=function(e){if(this.vapidKey!==null)throw v.create("use-vapid-key-after-get-token");if(typeof e!="string"||e.length===0)throw v.create("invalid-vapid-key");this.vapidKey=e},t.prototype.useServiceWorker=function(){throw v.create("only-available-in-window")},t.prototype.onMessage=function(){throw v.create("only-available-in-window")},t.prototype.onTokenRefresh=function(){throw v.create("only-available-in-window")},t.prototype.onPush=function(e){return f(this,void 0,void 0,function(){var n,r,i,o;return p(this,function(s){switch(s.label){case 0:return n=Pr(e),n?[4,gt()]:(console.debug(or+"failed to get parsed MessagePayload from the PushEvent. Skip handling the push."),[2]);case 1:return r=s.sent(),Dr(r)?[2,Mr(r,n)]:(i=!1,n.notification?[4,Lr(Nr(n))]:[3,3]);case 2:s.sent(),i=!0,s.label=3;case 3:return i===!0&&this.isOnBackgroundMessageUsed===!1?[2]:(this.bgMessageHandler&&(o=kr(n),typeof this.bgMessageHandler=="function"?this.bgMessageHandler(o):this.bgMessageHandler.next(o)),[4,He(cr)]);case 4:return s.sent(),[2]}})})},t.prototype.onSubChange=function(e){var n,r;return f(this,void 0,void 0,function(){var i,o;return p(this,function(s){switch(s.label){case 0:return i=e.newSubscription,i?[3,2]:[4,G(this.firebaseDependencies,self.registration)];case 1:return s.sent(),[2];case 2:return[4,se(this.firebaseDependencies)];case 3:return o=s.sent(),[4,G(this.firebaseDependencies,self.registration)];case 4:return s.sent(),[4,ye(this.firebaseDependencies,self.registration,(r=(n=o?.subscriptionOptions)===null||n===void 0?void 0:n.vapidKey)!==null&&r!==void 0?r:oe)];case 5:return s.sent(),[2]}})})},t.prototype.onNotificationClick=function(e){var n,r;return f(this,void 0,void 0,function(){var i,o,s,a,u;return p(this,function(c){switch(c.label){case 0:if(i=(r=(n=e.notification)===null||n===void 0?void 0:n.data)===null||r===void 0?void 0:r[ft],i){if(e.action)return[2]}else return[2];return e.stopImmediatePropagation(),e.notification.close(),o=xr(i),o?(s=new URL(o,self.location.href),a=new URL(self.location.origin),s.host!==a.host?[2]:[4,Rr(s)]):[2];case 1:return u=c.sent(),u?[3,4]:[4,self.clients.openWindow(o)];case 2:return u=c.sent(),[4,He(lr)];case 3:return c.sent(),[3,6];case 4:return[4,u.focus()];case 5:u=c.sent(),c.label=6;case 6:return u?(i.messageType=B.NOTIFICATION_CLICKED,i.isFirebaseMessaging=!0,[2,u.postMessage(i)]):[2]}})})},t})();function Nr(t){var e,n=I({},t.notification);return n.data=(e={},e[ft]=t,e),n}function Pr(t){var e=t.data;if(!e)return null;try{return e.json()}catch{return null}}function Rr(t){return f(this,void 0,void 0,function(){var e,n,r,i,o,s,a;return p(this,function(u){switch(u.label){case 0:return[4,gt()];case 1:e=u.sent();try{for(n=L(e),r=n.next();!r.done;r=n.next())if(i=r.value,o=new URL(i.url,self.location.href),t.host===o.host)return[2,i]}catch(c){s={error:c}}finally{try{r&&!r.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}}return[2,null]}})})}function Dr(t){return t.some(function(e){return e.visibilityState==="visible"&&!e.url.startsWith("chrome-extension://")})}function Mr(t,e){var n,r;e.isFirebaseMessaging=!0,e.messageType=B.PUSH_RECEIVED;try{for(var i=L(t),o=i.next();!o.done;o=i.next()){var s=o.value;s.postMessage(e)}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function gt(){return self.clients.matchAll({type:"window",includeUncontrolled:!0})}function Lr(t){var e,n=t.actions,r=Notification.maxActions;return n&&r&&n.length>r&&console.warn("This browser only supports "+r+" actions. The remaining actions will not be displayed."),self.registration.showNotification((e=t.title)!==null&&e!==void 0?e:"",t)}function xr(t){var e,n,r,i=(n=(e=t.fcmOptions)===null||e===void 0?void 0:e.link)!==null&&n!==void 0?n:(r=t.notification)===null||r===void 0?void 0:r.click_action;
19return i||(vt(t.data)?self.location.origin:null)}var Fr=(function(){function t(e){var n=this;this.firebaseDependencies=e,this.vapidKey=null,this.onMessageCallback=null,navigator.serviceWorker.addEventListener("message",function(r){return n.messageEventListener(r)})}return Object.defineProperty(t.prototype,"app",{get:function(){return this.firebaseDependencies.app},enumerable:!1,configurable:!0}),t.prototype.messageEventListener=function(e){return f(this,void 0,void 0,function(){var n,r;return p(this,function(i){switch(i.label){case 0:return n=e.data,n.isFirebaseMessaging?(this.onMessageCallback&&n.messageType===B.PUSH_RECEIVED&&(typeof this.onMessageCallback=="function"?this.onMessageCallback(Vr(Object.assign({},n))):this.onMessageCallback.next(Object.assign({},n))),r=n.data,vt(r)&&r[sr]==="1"?[4,this.logEvent(n.messageType,r)]:[3,2]):[2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},t.prototype.getVapidKey=function(){return this.vapidKey},t.prototype.getSwReg=function(){return this.swRegistration},t.prototype.getToken=function(e){return f(this,void 0,void 0,function(){return p(this,function(n){switch(n.label){case 0:return Notification.permission!=="default"?[3,2]:[4,Notification.requestPermission()];case 1:n.sent(),n.label=2;case 2:if(Notification.permission!=="granted")throw v.create("permission-blocked");return[4,this.updateVapidKey(e?.vapidKey)];case 3:return n.sent(),[4,this.updateSwReg(e?.serviceWorkerRegistration)];case 4:return n.sent(),[2,ye(this.firebaseDependencies,this.swRegistration,this.vapidKey)]}})})},t.prototype.updateVapidKey=function(e){return f(this,void 0,void 0,function(){return p(this,function(n){return e?this.vapidKey=e:this.vapidKey||(this.vapidKey=oe),[2]})})},t.prototype.updateSwReg=function(e){return f(this,void 0,void 0,function(){return p(this,function(n){switch(n.label){case 0:return!e&&!this.swRegistration?[4,this.registerDefaultSw()]:[3,2];case 1:n.sent(),n.label=2;case 2:if(!e&&this.swRegistration)return[2];if(!(e instanceof ServiceWorkerRegistration))throw v.create("invalid-sw-registration");return this.swRegistration=e,[2]}})})},t.prototype.registerDefaultSw=function(){return f(this,void 0,void 0,function(){var e,n;return p(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),e=this,[4,navigator.serviceWorker.register(nr,{scope:rr})];case 1:return e.swRegistration=r.sent(),this.swRegistration.update().catch(function(){}),[3,3];case 2:throw n=r.sent(),v.create("failed-service-worker-registration",{browserErrorMessage:n.message});case 3:return[2]}})})},t.prototype.deleteToken=function(){return f(this,void 0,void 0,function(){return p(this,function(e){switch(e.label){case 0:return this.swRegistration?[3,2]:[4,this.registerDefaultSw()];case 1:e.sent(),e.label=2;case 2:return[2,G(this.firebaseDependencies,this.swRegistration)]}})})},t.prototype.requestPermission=function(){return f(this,void 0,void 0,function(){var e;return p(this,function(n){switch(n.label){case 0:return Notification.permission==="granted"?[2]:[4,Notification.requestPermission()];case 1:if(e=n.sent(),e==="granted")return[2];throw e==="denied"?v.create("permission-blocked"):v.create("permission-default")}})})},t.prototype.usePublicVapidKey=function(e){if(this.vapidKey!==null)throw v.create("use-vapid-key-after-get-token");if(typeof e!="string"||e.length===0)throw v.create("invalid-vapid-key");this.vapidKey=e},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw v.create("invalid-sw-registration");if(this.swRegistration)throw v.create("use-sw-after-get-token");this.swRegistration=e},t.prototype.onMessage=function(e){var n=this;return this.onMessageCallback=e,function(){n.onMessageCallback=null}},t.prototype.setBackgroundMessageHandler=function(){throw v.create("only-available-in-sw")},t.prototype.onBackgroundMessage=function(){throw v.create("only-available-in-sw")},t.prototype.onTokenRefresh=function(){return function(){}},t.prototype.logEvent=function(e,n){return f(this,void 0,void 0,function(){var r,i;return p(this,function(o){switch(o.label){case 0:return r=jr(e),[4,this.firebaseDependencies.analyticsProvider.get()];case 1:return i=o.sent(),i.logEvent(r,{message_id:n[pt],message_name:n[ur],message_time:n[ar],message_device_time:Math.floor(Date.now()/1e3)}),[2]}})})},t})();function jr(t){switch(t){case B.NOTIFICATION_CLICKED:return"notification_open";case B.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}function Vr(t){return delete t.messageType,delete t.isFirebaseMessaging,t}function Br(t){var e,n;if(!t||!t.options)throw me("App Configuration Object");
19if(!t.name)throw me("App Name");var r=["projectId","apiKey","appId","messagingSenderId"],i=t.options;try{for(var o=L(r),s=o.next();!s.done;s=o.next()){var a=s.value;if(!i[a])throw me(a)}}catch(u){e={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}return{appName:t.name,projectId:i.projectId,apiKey:i.apiKey,appId:i.appId,senderId:i.messagingSenderId}}function me(t){return v.create("missing-app-config-values",{valueName:t})}var qr="messaging";function Kr(t){var e=t.getProvider("app").getImmediate(),n=Br(e),r=t.getProvider("installations").getImmediate(),i=t.getProvider("analytics-internal"),o={app:e,appConfig:n,installations:r,analyticsProvider:i};if(!mt())throw v.create("unsupported-browser");return self&&"ServiceWorkerGlobalScope"in self?new Ar(o):new Fr(o)}var Hr={isSupported:mt};N.INTERNAL.registerComponent(new Z(qr,Kr,"PUBLIC").setServiceProps(Hr));function mt(){return self&&"ServiceWorkerGlobalScope"in self?_r():Ur()}function Ur(){return"indexedDB"in window&&indexedDB!==null&&navigator.cookieEnabled&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}function _r(){return"indexedDB"in self&&indexedDB!==null&&"PushManager"in self&&"Notification"in self&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}const $r=5e3;function Xr(){if(N.apps.length===0)try{N.initializeApp(It.getFirebaseConfig())}catch(e){return console.error("Error initialising firebase app",e),Promise.reject(e)}const t=N.messaging();return t.requestPermission().then(()=>t.getToken()).then(e=>e?Et.sendPushNotificationToken(e):Promise.resolve(null)).then(e=>(e&&(zr(),Wr()),e)).catch(e=>(console.error("Error requesting permission",e),null))}function zr(){N.messaging().onMessage(t=>{const e=t.data.title,n={body:t.data.body,icon:"/android-chrome-192x192.png",data:t.data,tag:"hon",renotify:!0},r=t.data.url,i=new Notification(e,n);i.onclick=()=>{bt(r),i.close()},setTimeout(i.close.bind(i),$r)})}function Wr(){navigator.serviceWorker.addEventListener("message",t=>{if(!Gr(t))return;const e=t.data;bt(e.url)})}function Gr(t){return t.data.notificationType}function bt(t){t&&t.length>0&&location.assign(t)}export{Xr as requestPermissionForPushNotifications};
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.