cloudcommerce 0.0.104 → 0.0.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/action.yml +1 -4
- package/package.json +1 -1
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/cli/config/firebase.json +11 -1
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/firebase/lib/config.d.ts +6 -3
- package/packages/firebase/lib/config.js +7 -6
- package/packages/firebase/lib/config.js.map +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/firebase/src/config.ts +10 -8
- package/packages/modules/package.json +1 -1
- package/packages/passport/lib/firebase.js +1 -1
- package/packages/passport/lib/firebase.js.map +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/passport/src/firebase.ts +1 -1
- package/packages/ssr/lib/firebase/serve-feeds.js +8 -0
- package/packages/ssr/lib/firebase/serve-feeds.js.map +1 -0
- package/packages/ssr/lib/firebase/serve-storefront.js +24 -18
- package/packages/ssr/lib/firebase/serve-storefront.js.map +1 -1
- package/packages/ssr/lib/firebase.js +9 -10
- package/packages/ssr/lib/firebase.js.map +1 -1
- package/packages/ssr/package.json +2 -1
- package/packages/ssr/src/firebase/serve-feeds.ts +9 -0
- package/packages/ssr/src/firebase/serve-storefront.ts +25 -19
- package/packages/ssr/src/firebase.ts +9 -13
- package/packages/storefront/dist/client/{LoginOffcanvas.6707cd95.js → LoginOffcanvas.3d5263f0.js} +1 -1
- package/packages/storefront/dist/client/chunks/LoginForm.407264cf.js +1396 -0
- package/packages/storefront/dist/client/chunks/{LoginOffcanvas.21bef0b8.js → LoginOffcanvas.111b9071.js} +1 -1
- package/packages/storefront/dist/client/hoisted.71b2f749.js +1 -0
- package/packages/storefront/dist/client/sw.js +1 -1
- package/packages/storefront/dist/server/entry.mjs +4 -13
- package/packages/storefront/package.json +1 -1
- package/packages/storefront/src/lib/layouts/BaseBody.astro +0 -11
- package/packages/storefront/src/lib/ssr-context.ts +3 -1
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/chunks/LoginForm.aee2ceda.js +0 -1066
- package/packages/storefront/dist/client/chunks/index.esm.84a649c7.js +0 -331
- package/packages/storefront/dist/client/hoisted.054c36ac.js +0 -1
|
@@ -1,331 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*//**
|
|
17
|
-
* @license
|
|
18
|
-
* Copyright 2017 Google LLC
|
|
19
|
-
*
|
|
20
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21
|
-
* you may not use this file except in compliance with the License.
|
|
22
|
-
* You may obtain a copy of the License at
|
|
23
|
-
*
|
|
24
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
-
*
|
|
26
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
27
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
28
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
|
-
* See the License for the specific language governing permissions and
|
|
30
|
-
* limitations under the License.
|
|
31
|
-
*/const V=function(t){const e=[];let n=0;for(let s=0;s<t.length;s++){let r=t.charCodeAt(s);r<128?e[n++]=r:r<2048?(e[n++]=r>>6|192,e[n++]=r&63|128):(r&64512)===55296&&s+1<t.length&&(t.charCodeAt(s+1)&64512)===56320?(r=65536+((r&1023)<<10)+(t.charCodeAt(++s)&1023),e[n++]=r>>18|240,e[n++]=r>>12&63|128,e[n++]=r>>6&63|128,e[n++]=r&63|128):(e[n++]=r>>12|224,e[n++]=r>>6&63|128,e[n++]=r&63|128)}return e},te=function(t){const e=[];let n=0,s=0;for(;n<t.length;){const r=t[n++];if(r<128)e[s++]=String.fromCharCode(r);else if(r>191&&r<224){const i=t[n++];e[s++]=String.fromCharCode((r&31)<<6|i&63)}else if(r>239&&r<365){const i=t[n++],a=t[n++],o=t[n++],h=((r&7)<<18|(i&63)<<12|(a&63)<<6|o&63)-65536;e[s++]=String.fromCharCode(55296+(h>>10)),e[s++]=String.fromCharCode(56320+(h&1023))}else{const i=t[n++],a=t[n++];e[s++]=String.fromCharCode((r&15)<<12|(i&63)<<6|a&63)}}return e.join("")},W={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,s=[];for(let r=0;r<t.length;r+=3){const i=t[r],a=r+1<t.length,o=a?t[r+1]:0,h=r+2<t.length,l=h?t[r+2]:0,x=i>>2,m=(i&3)<<4|o>>4;let y=(o&15)<<2|l>>6,E=l&63;h||(E=64,a||(y=64)),s.push(n[x],n[m],n[y],n[E])}return s.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(V(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):te(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const n=e?this.charToByteMapWebSafe_:this.charToByteMap_,s=[];for(let r=0;r<t.length;){const i=n[t.charAt(r++)],o=r<t.length?n[t.charAt(r)]:0;++r;const l=r<t.length?n[t.charAt(r)]:64;++r;const m=r<t.length?n[t.charAt(r)]:64;if(++r,i==null||o==null||l==null||m==null)throw Error();const y=i<<2|o>>4;if(s.push(y),l!==64){const E=o<<4&240|l>>2;if(s.push(E),m!==64){const ee=l<<6&192|m;s.push(ee)}}}return s},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}},ne=function(t){const e=V(t);return W.encodeByteArray(e,!0)},G=function(t){return ne(t).replace(/\./g,"")},Et=function(t){try{return W.decodeString(t,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
|
|
32
|
-
* @license
|
|
33
|
-
* Copyright 2017 Google LLC
|
|
34
|
-
*
|
|
35
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
36
|
-
* you may not use this file except in compliance with the License.
|
|
37
|
-
* You may obtain a copy of the License at
|
|
38
|
-
*
|
|
39
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
-
*
|
|
41
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
42
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
43
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44
|
-
* See the License for the specific language governing permissions and
|
|
45
|
-
* limitations under the License.
|
|
46
|
-
*/class re{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}wrapCallback(e){return(n,s)=>{n?this.reject(n):this.resolve(s),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(n):e(n,s))}}}/**
|
|
47
|
-
* @license
|
|
48
|
-
* Copyright 2017 Google LLC
|
|
49
|
-
*
|
|
50
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
51
|
-
* you may not use this file except in compliance with the License.
|
|
52
|
-
* You may obtain a copy of the License at
|
|
53
|
-
*
|
|
54
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
55
|
-
*
|
|
56
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
57
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
58
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
59
|
-
* See the License for the specific language governing permissions and
|
|
60
|
-
* limitations under the License.
|
|
61
|
-
*/function K(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function _t(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(K())}function It(){const t=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof t=="object"&&t.id!==void 0}function vt(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function Dt(){const t=K();return t.indexOf("MSIE ")>=0||t.indexOf("Trident/")>=0}function se(){return typeof indexedDB=="object"}function ie(){return new Promise((t,e)=>{try{let n=!0;const s="validate-browser-context-for-indexeddb-analytics-module",r=self.indexedDB.open(s);r.onsuccess=()=>{r.result.close(),n||self.indexedDB.deleteDatabase(s),t(!0)},r.onupgradeneeded=()=>{n=!1},r.onerror=()=>{var i;e(((i=r.error)===null||i===void 0?void 0:i.message)||"")}}catch(n){e(n)}})}/**
|
|
62
|
-
* @license
|
|
63
|
-
* Copyright 2017 Google LLC
|
|
64
|
-
*
|
|
65
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
66
|
-
* you may not use this file except in compliance with the License.
|
|
67
|
-
* You may obtain a copy of the License at
|
|
68
|
-
*
|
|
69
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
70
|
-
*
|
|
71
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
72
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
73
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
74
|
-
* See the License for the specific language governing permissions and
|
|
75
|
-
* limitations under the License.
|
|
76
|
-
*/const ae="FirebaseError";class g extends Error{constructor(e,n,s){super(n),this.code=e,this.customData=s,this.name=ae,Object.setPrototypeOf(this,g.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,Y.prototype.create)}}class Y{constructor(e,n,s){this.service=e,this.serviceName=n,this.errors=s}create(e,...n){const s=n[0]||{},r=`${this.service}/${e}`,i=this.errors[e],a=i?oe(i,s):"Error",o=`${this.serviceName}: ${a} (${r}).`;return new g(r,o,s)}}function oe(t,e){return t.replace(ce,(n,s)=>{const r=e[s];return r!=null?String(r):`<${s}?>`})}const ce=/\{\$([^}]+)}/g;function Ct(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}function B(t,e){if(t===e)return!0;const n=Object.keys(t),s=Object.keys(e);for(const r of n){if(!s.includes(r))return!1;const i=t[r],a=e[r];if(P(i)&&P(a)){if(!B(i,a))return!1}else if(i!==a)return!1}for(const r of s)if(!n.includes(r))return!1;return!0}function P(t){return t!==null&&typeof t=="object"}/**
|
|
77
|
-
* @license
|
|
78
|
-
* Copyright 2017 Google LLC
|
|
79
|
-
*
|
|
80
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
81
|
-
* you may not use this file except in compliance with the License.
|
|
82
|
-
* You may obtain a copy of the License at
|
|
83
|
-
*
|
|
84
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
85
|
-
*
|
|
86
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
87
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
88
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
89
|
-
* See the License for the specific language governing permissions and
|
|
90
|
-
* limitations under the License.
|
|
91
|
-
*/function wt(t){const e=[];for(const[n,s]of Object.entries(t))Array.isArray(s)?s.forEach(r=>{e.push(encodeURIComponent(n)+"="+encodeURIComponent(r))}):e.push(encodeURIComponent(n)+"="+encodeURIComponent(s));return e.length?"&"+e.join("&"):""}function St(t){const e={};return t.replace(/^\?/,"").split("&").forEach(s=>{if(s){const[r,i]=s.split("=");e[decodeURIComponent(r)]=decodeURIComponent(i)}}),e}function At(t){const e=t.indexOf("?");if(!e)return"";const n=t.indexOf("#",e);return t.substring(e,n>0?n:void 0)}function Bt(t,e){const n=new he(t,e);return n.subscribe.bind(n)}class he{constructor(e,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{e(this)}).catch(s=>{this.error(s)})}next(e){this.forEachObserver(n=>{n.next(e)})}error(e){this.forEachObserver(n=>{n.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,n,s){let r;if(e===void 0&&n===void 0&&s===void 0)throw new Error("Missing Observer.");le(e,["next","error","complete"])?r=e:r={next:e,error:n,complete:s},r.next===void 0&&(r.next=D),r.error===void 0&&(r.error=D),r.complete===void 0&&(r.complete=D);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?r.error(this.finalError):r.complete()}catch{}}),this.observers.push(r),i}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,e)}sendOne(e,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{n(this.observers[e])}catch(s){typeof console<"u"&&console.error&&console.error(s)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function le(t,e){if(typeof t!="object"||t===null)return!1;for(const n of e)if(n in t&&typeof t[n]=="function")return!0;return!1}function D(){}/**
|
|
92
|
-
* @license
|
|
93
|
-
* Copyright 2021 Google LLC
|
|
94
|
-
*
|
|
95
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
96
|
-
* you may not use this file except in compliance with the License.
|
|
97
|
-
* You may obtain a copy of the License at
|
|
98
|
-
*
|
|
99
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
100
|
-
*
|
|
101
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
102
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
103
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
104
|
-
* See the License for the specific language governing permissions and
|
|
105
|
-
* limitations under the License.
|
|
106
|
-
*/function Ot(t){return t&&t._delegate?t._delegate:t}class I{constructor(e,n,s){this.name=e,this.instanceFactory=n,this.type=s,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}}/**
|
|
107
|
-
* @license
|
|
108
|
-
* Copyright 2019 Google LLC
|
|
109
|
-
*
|
|
110
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111
|
-
* you may not use this file except in compliance with the License.
|
|
112
|
-
* You may obtain a copy of the License at
|
|
113
|
-
*
|
|
114
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
115
|
-
*
|
|
116
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
117
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
118
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
119
|
-
* See the License for the specific language governing permissions and
|
|
120
|
-
* limitations under the License.
|
|
121
|
-
*/const f="[DEFAULT]";/**
|
|
122
|
-
* @license
|
|
123
|
-
* Copyright 2019 Google LLC
|
|
124
|
-
*
|
|
125
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
126
|
-
* you may not use this file except in compliance with the License.
|
|
127
|
-
* You may obtain a copy of the License at
|
|
128
|
-
*
|
|
129
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
130
|
-
*
|
|
131
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
132
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
133
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
134
|
-
* See the License for the specific language governing permissions and
|
|
135
|
-
* limitations under the License.
|
|
136
|
-
*/class de{constructor(e,n){this.name=e,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const n=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(n)){const s=new re;if(this.instancesDeferred.set(n,s),this.isInitialized(n)||this.shouldAutoInitialize())try{const r=this.getOrInitializeService({instanceIdentifier:n});r&&s.resolve(r)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(e){var n;const s=this.normalizeInstanceIdentifier(e?.identifier),r=(n=e?.optional)!==null&&n!==void 0?n:!1;if(this.isInitialized(s)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:s})}catch(i){if(r)return null;throw i}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(ue(e))try{this.getOrInitializeService({instanceIdentifier:f})}catch{}for(const[n,s]of this.instancesDeferred.entries()){const r=this.normalizeInstanceIdentifier(n);try{const i=this.getOrInitializeService({instanceIdentifier:r});s.resolve(i)}catch{}}}}clearInstance(e=f){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(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...e.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=f){return this.instances.has(e)}getOptions(e=f){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:n={}}=e,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`);const r=this.getOrInitializeService({instanceIdentifier:s,options:n});for(const[i,a]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(i);s===o&&a.resolve(r)}return r}onInit(e,n){var s;const r=this.normalizeInstanceIdentifier(n),i=(s=this.onInitCallbacks.get(r))!==null&&s!==void 0?s: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,n){const s=this.onInitCallbacks.get(n);if(!!s)for(const r of s)try{r(e,n)}catch{}}getOrInitializeService({instanceIdentifier:e,options:n={}}){let s=this.instances.get(e);if(!s&&this.component&&(s=this.component.instanceFactory(this.container,{instanceIdentifier:fe(e),options:n}),this.instances.set(e,s),this.instancesOptions.set(e,n),this.invokeOnInitCallbacks(s,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,s)}catch{}return s||null}normalizeInstanceIdentifier(e=f){return this.component?this.component.multipleInstances?e:f:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function fe(t){return t===f?void 0:t}function ue(t){return t.instantiationMode==="EAGER"}/**
|
|
137
|
-
* @license
|
|
138
|
-
* Copyright 2019 Google LLC
|
|
139
|
-
*
|
|
140
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
141
|
-
* you may not use this file except in compliance with the License.
|
|
142
|
-
* You may obtain a copy of the License at
|
|
143
|
-
*
|
|
144
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
145
|
-
*
|
|
146
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
147
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
148
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
149
|
-
* See the License for the specific language governing permissions and
|
|
150
|
-
* limitations under the License.
|
|
151
|
-
*/class pe{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const n=this.getProvider(e.name);if(n.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);n.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const n=new de(e,this);return this.providers.set(e,n),n}getProviders(){return Array.from(this.providers.values())}}/**
|
|
152
|
-
* @license
|
|
153
|
-
* Copyright 2017 Google LLC
|
|
154
|
-
*
|
|
155
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
156
|
-
* you may not use this file except in compliance with the License.
|
|
157
|
-
* You may obtain a copy of the License at
|
|
158
|
-
*
|
|
159
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
160
|
-
*
|
|
161
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
162
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
163
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
164
|
-
* See the License for the specific language governing permissions and
|
|
165
|
-
* limitations under the License.
|
|
166
|
-
*/var c;(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"})(c||(c={}));const me={debug:c.DEBUG,verbose:c.VERBOSE,info:c.INFO,warn:c.WARN,error:c.ERROR,silent:c.SILENT},be=c.INFO,ge={[c.DEBUG]:"log",[c.VERBOSE]:"log",[c.INFO]:"info",[c.WARN]:"warn",[c.ERROR]:"error"},ye=(t,e,...n)=>{if(e<t.logLevel)return;const s=new Date().toISOString(),r=ge[e];if(r)console[r](`[${s}] ${t.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class Ee{constructor(e){this.name=e,this._logLevel=be,this._logHandler=ye,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in c))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?me[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,c.DEBUG,...e),this._logHandler(this,c.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,c.VERBOSE,...e),this._logHandler(this,c.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,c.INFO,...e),this._logHandler(this,c.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,c.WARN,...e),this._logHandler(this,c.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,c.ERROR,...e),this._logHandler(this,c.ERROR,...e)}}const _e=(t,e)=>e.some(n=>t instanceof n);let H,L;function Ie(){return H||(H=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function ve(){return L||(L=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const q=new WeakMap,O=new WeakMap,X=new WeakMap,C=new WeakMap,$=new WeakMap;function De(t){const e=new Promise((n,s)=>{const r=()=>{t.removeEventListener("success",i),t.removeEventListener("error",a)},i=()=>{n(d(t.result)),r()},a=()=>{s(t.error),r()};t.addEventListener("success",i),t.addEventListener("error",a)});return e.then(n=>{n instanceof IDBCursor&&q.set(n,t)}).catch(()=>{}),$.set(e,t),e}function Ce(t){if(O.has(t))return;const e=new Promise((n,s)=>{const r=()=>{t.removeEventListener("complete",i),t.removeEventListener("error",a),t.removeEventListener("abort",a)},i=()=>{n(),r()},a=()=>{s(t.error||new DOMException("AbortError","AbortError")),r()};t.addEventListener("complete",i),t.addEventListener("error",a),t.addEventListener("abort",a)});O.set(t,e)}let T={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return O.get(t);if(e==="objectStoreNames")return t.objectStoreNames||X.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return d(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function we(t){T=t(T)}function Se(t){return t===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...n){const s=t.call(w(this),e,...n);return X.set(s,e.sort?e.sort():[e]),d(s)}:ve().includes(t)?function(...e){return t.apply(w(this),e),d(q.get(this))}:function(...e){return d(t.apply(w(this),e))}}function Ae(t){return typeof t=="function"?Se(t):(t instanceof IDBTransaction&&Ce(t),_e(t,Ie())?new Proxy(t,T):t)}function d(t){if(t instanceof IDBRequest)return De(t);if(C.has(t))return C.get(t);const e=Ae(t);return e!==t&&(C.set(t,e),$.set(e,t)),e}const w=t=>$.get(t);function Be(t,e,{blocked:n,upgrade:s,blocking:r,terminated:i}={}){const a=indexedDB.open(t,e),o=d(a);return s&&a.addEventListener("upgradeneeded",h=>{s(d(a.result),h.oldVersion,h.newVersion,d(a.transaction))}),n&&a.addEventListener("blocked",()=>n()),o.then(h=>{i&&h.addEventListener("close",()=>i()),r&&h.addEventListener("versionchange",()=>r())}).catch(()=>{}),o}const Oe=["get","getKey","getAll","getAllKeys","count"],Te=["put","add","delete","clear"],S=new Map;function k(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(S.get(e))return S.get(e);const n=e.replace(/FromIndex$/,""),s=e!==n,r=Te.includes(n);if(!(n in(s?IDBIndex:IDBObjectStore).prototype)||!(r||Oe.includes(n)))return;const i=async function(a,...o){const h=this.transaction(a,r?"readwrite":"readonly");let l=h.store;return s&&(l=l.index(o.shift())),(await Promise.all([l[n](...o),r&&h.done]))[0]};return S.set(e,i),i}we(t=>({...t,get:(e,n,s)=>k(e,n)||t.get(e,n,s),has:(e,n)=>!!k(e,n)||t.has(e,n)}));/**
|
|
167
|
-
* @license
|
|
168
|
-
* Copyright 2019 Google LLC
|
|
169
|
-
*
|
|
170
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
171
|
-
* you may not use this file except in compliance with the License.
|
|
172
|
-
* You may obtain a copy of the License at
|
|
173
|
-
*
|
|
174
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
175
|
-
*
|
|
176
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
177
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
178
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
179
|
-
* See the License for the specific language governing permissions and
|
|
180
|
-
* limitations under the License.
|
|
181
|
-
*/class Me{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(Ne(n)){const s=n.getImmediate();return`${s.library}/${s.version}`}else return null}).filter(n=>n).join(" ")}}function Ne(t){const e=t.getComponent();return e?.type==="VERSION"}const M="@firebase/app",j="0.7.33";/**
|
|
182
|
-
* @license
|
|
183
|
-
* Copyright 2019 Google LLC
|
|
184
|
-
*
|
|
185
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
186
|
-
* you may not use this file except in compliance with the License.
|
|
187
|
-
* You may obtain a copy of the License at
|
|
188
|
-
*
|
|
189
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
190
|
-
*
|
|
191
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
192
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
193
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
194
|
-
* See the License for the specific language governing permissions and
|
|
195
|
-
* limitations under the License.
|
|
196
|
-
*/const u=new Ee("@firebase/app"),Re="@firebase/app-compat",$e="@firebase/analytics-compat",xe="@firebase/analytics",Pe="@firebase/app-check-compat",He="@firebase/app-check",Le="@firebase/auth",ke="@firebase/auth-compat",je="@firebase/database",Fe="@firebase/database-compat",ze="@firebase/functions",Ue="@firebase/functions-compat",Ve="@firebase/installations",We="@firebase/installations-compat",Ge="@firebase/messaging",Ke="@firebase/messaging-compat",Ye="@firebase/performance",qe="@firebase/performance-compat",Xe="@firebase/remote-config",Je="@firebase/remote-config-compat",Qe="@firebase/storage",Ze="@firebase/storage-compat",et="@firebase/firestore",tt="@firebase/firestore-compat",nt="firebase",rt="9.10.0";/**
|
|
197
|
-
* @license
|
|
198
|
-
* Copyright 2019 Google LLC
|
|
199
|
-
*
|
|
200
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
201
|
-
* you may not use this file except in compliance with the License.
|
|
202
|
-
* You may obtain a copy of the License at
|
|
203
|
-
*
|
|
204
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
205
|
-
*
|
|
206
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
207
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
208
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
209
|
-
* See the License for the specific language governing permissions and
|
|
210
|
-
* limitations under the License.
|
|
211
|
-
*/const J="[DEFAULT]",st={[M]:"fire-core",[Re]:"fire-core-compat",[xe]:"fire-analytics",[$e]:"fire-analytics-compat",[He]:"fire-app-check",[Pe]:"fire-app-check-compat",[Le]:"fire-auth",[ke]:"fire-auth-compat",[je]:"fire-rtdb",[Fe]:"fire-rtdb-compat",[ze]:"fire-fn",[Ue]:"fire-fn-compat",[Ve]:"fire-iid",[We]:"fire-iid-compat",[Ge]:"fire-fcm",[Ke]:"fire-fcm-compat",[Ye]:"fire-perf",[qe]:"fire-perf-compat",[Xe]:"fire-rc",[Je]:"fire-rc-compat",[Qe]:"fire-gcs",[Ze]:"fire-gcs-compat",[et]:"fire-fst",[tt]:"fire-fst-compat","fire-js":"fire-js",[nt]:"fire-js-all"};/**
|
|
212
|
-
* @license
|
|
213
|
-
* Copyright 2019 Google LLC
|
|
214
|
-
*
|
|
215
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
216
|
-
* you may not use this file except in compliance with the License.
|
|
217
|
-
* You may obtain a copy of the License at
|
|
218
|
-
*
|
|
219
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
220
|
-
*
|
|
221
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
222
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
223
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
224
|
-
* See the License for the specific language governing permissions and
|
|
225
|
-
* limitations under the License.
|
|
226
|
-
*/const v=new Map,N=new Map;function it(t,e){try{t.container.addComponent(e)}catch(n){u.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`,n)}}function R(t){const e=t.name;if(N.has(e))return u.debug(`There were multiple attempts to register component ${e}.`),!1;N.set(e,t);for(const n of v.values())it(n,t);return!0}function Tt(t,e){const n=t.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),t.container.getProvider(e)}/**
|
|
227
|
-
* @license
|
|
228
|
-
* Copyright 2019 Google LLC
|
|
229
|
-
*
|
|
230
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
231
|
-
* you may not use this file except in compliance with the License.
|
|
232
|
-
* You may obtain a copy of the License at
|
|
233
|
-
*
|
|
234
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
235
|
-
*
|
|
236
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
237
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
238
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
239
|
-
* See the License for the specific language governing permissions and
|
|
240
|
-
* limitations under the License.
|
|
241
|
-
*/const at={["no-app"]:"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",["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",["invalid-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}."},p=new Y("app","Firebase",at);/**
|
|
242
|
-
* @license
|
|
243
|
-
* Copyright 2019 Google LLC
|
|
244
|
-
*
|
|
245
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
246
|
-
* you may not use this file except in compliance with the License.
|
|
247
|
-
* You may obtain a copy of the License at
|
|
248
|
-
*
|
|
249
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
250
|
-
*
|
|
251
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
252
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
253
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
254
|
-
* See the License for the specific language governing permissions and
|
|
255
|
-
* limitations under the License.
|
|
256
|
-
*/class ot{constructor(e,n,s){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},n),this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=s,this.container.addComponent(new I("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 p.create("app-deleted",{appName:this._name})}}/**
|
|
257
|
-
* @license
|
|
258
|
-
* Copyright 2019 Google LLC
|
|
259
|
-
*
|
|
260
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
261
|
-
* you may not use this file except in compliance with the License.
|
|
262
|
-
* You may obtain a copy of the License at
|
|
263
|
-
*
|
|
264
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
265
|
-
*
|
|
266
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
267
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
268
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
269
|
-
* See the License for the specific language governing permissions and
|
|
270
|
-
* limitations under the License.
|
|
271
|
-
*/const Mt=rt;function Nt(t,e={}){typeof e!="object"&&(e={name:e});const n=Object.assign({name:J,automaticDataCollectionEnabled:!1},e),s=n.name;if(typeof s!="string"||!s)throw p.create("bad-app-name",{appName:String(s)});const r=v.get(s);if(r){if(B(t,r.options)&&B(n,r.config))return r;throw p.create("duplicate-app",{appName:s})}const i=new pe(s);for(const o of N.values())i.addComponent(o);const a=new ot(t,n,i);return v.set(s,a),a}function Rt(t=J){const e=v.get(t);if(!e)throw p.create("no-app",{appName:t});return e}function _(t,e,n){var s;let r=(s=st[t])!==null&&s!==void 0?s:t;n&&(r+=`-${n}`);const i=r.match(/\s|\//),a=e.match(/\s|\//);if(i||a){const o=[`Unable to register library "${r}" with version "${e}":`];i&&o.push(`library name "${r}" contains illegal characters (whitespace or "/")`),i&&a&&o.push("and"),a&&o.push(`version name "${e}" contains illegal characters (whitespace or "/")`),u.warn(o.join(" "));return}R(new I(`${r}-version`,()=>({library:r,version:e}),"VERSION"))}/**
|
|
272
|
-
* @license
|
|
273
|
-
* Copyright 2021 Google LLC
|
|
274
|
-
*
|
|
275
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
276
|
-
* you may not use this file except in compliance with the License.
|
|
277
|
-
* You may obtain a copy of the License at
|
|
278
|
-
*
|
|
279
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
280
|
-
*
|
|
281
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
282
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
283
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
284
|
-
* See the License for the specific language governing permissions and
|
|
285
|
-
* limitations under the License.
|
|
286
|
-
*/const ct="firebase-heartbeat-database",ht=1,b="firebase-heartbeat-store";let A=null;function Q(){return A||(A=Be(ct,ht,{upgrade:(t,e)=>{switch(e){case 0:t.createObjectStore(b)}}}).catch(t=>{throw p.create("idb-open",{originalErrorMessage:t.message})})),A}async function lt(t){var e;try{return(await Q()).transaction(b).objectStore(b).get(Z(t))}catch(n){if(n instanceof g)u.warn(n.message);else{const s=p.create("idb-get",{originalErrorMessage:(e=n)===null||e===void 0?void 0:e.message});u.warn(s.message)}}}async function F(t,e){var n;try{const r=(await Q()).transaction(b,"readwrite");return await r.objectStore(b).put(e,Z(t)),r.done}catch(s){if(s instanceof g)u.warn(s.message);else{const r=p.create("idb-set",{originalErrorMessage:(n=s)===null||n===void 0?void 0:n.message});u.warn(r.message)}}}function Z(t){return`${t.name}!${t.options.appId}`}/**
|
|
287
|
-
* @license
|
|
288
|
-
* Copyright 2021 Google LLC
|
|
289
|
-
*
|
|
290
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
291
|
-
* you may not use this file except in compliance with the License.
|
|
292
|
-
* You may obtain a copy of the License at
|
|
293
|
-
*
|
|
294
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
295
|
-
*
|
|
296
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
297
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
298
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
299
|
-
* See the License for the specific language governing permissions and
|
|
300
|
-
* limitations under the License.
|
|
301
|
-
*/const dt=1024,ft=30*24*60*60*1e3;class ut{constructor(e){this.container=e,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new mt(n),this._heartbeatsCachePromise=this._storage.read().then(s=>(this._heartbeatsCache=s,s))}async triggerHeartbeat(){const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),s=z();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===s||this._heartbeatsCache.heartbeats.some(r=>r.date===s)))return this._heartbeatsCache.heartbeats.push({date:s,agent:n}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(r=>{const i=new Date(r.date).valueOf();return Date.now()-i<=ft}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=z(),{heartbeatsToSend:n,unsentEntries:s}=pt(this._heartbeatsCache.heartbeats),r=G(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=e,s.length>0?(this._heartbeatsCache.heartbeats=s,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),r}}function z(){return new Date().toISOString().substring(0,10)}function pt(t,e=dt){const n=[];let s=t.slice();for(const r of t){const i=n.find(a=>a.agent===r.agent);if(i){if(i.dates.push(r.date),U(n)>e){i.dates.pop();break}}else if(n.push({agent:r.agent,dates:[r.date]}),U(n)>e){n.pop();break}s=s.slice(1)}return{heartbeatsToSend:n,unsentEntries:s}}class mt{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return se()?ie().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await lt(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var n;if(await this._canUseIndexedDBPromise){const r=await this.read();return F(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:r.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var n;if(await this._canUseIndexedDBPromise){const r=await this.read();return F(this.app,{lastSentHeartbeatDate:(n=e.lastSentHeartbeatDate)!==null&&n!==void 0?n:r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...e.heartbeats]})}else return}}function U(t){return G(JSON.stringify({version:2,heartbeats:t})).length}/**
|
|
302
|
-
* @license
|
|
303
|
-
* Copyright 2019 Google LLC
|
|
304
|
-
*
|
|
305
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
306
|
-
* you may not use this file except in compliance with the License.
|
|
307
|
-
* You may obtain a copy of the License at
|
|
308
|
-
*
|
|
309
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
310
|
-
*
|
|
311
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
312
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
313
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
314
|
-
* See the License for the specific language governing permissions and
|
|
315
|
-
* limitations under the License.
|
|
316
|
-
*/function bt(t){R(new I("platform-logger",e=>new Me(e),"PRIVATE")),R(new I("heartbeat",e=>new ut(e),"PRIVATE")),_(M,j,t),_(M,j,"esm2017"),_("fire-js","")}bt("");var gt="firebase",yt="9.10.0";/**
|
|
317
|
-
* @license
|
|
318
|
-
* Copyright 2020 Google LLC
|
|
319
|
-
*
|
|
320
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
321
|
-
* you may not use this file except in compliance with the License.
|
|
322
|
-
* You may obtain a copy of the License at
|
|
323
|
-
*
|
|
324
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
325
|
-
*
|
|
326
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
327
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
328
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
329
|
-
* See the License for the specific language governing permissions and
|
|
330
|
-
* limitations under the License.
|
|
331
|
-
*/_(gt,yt,"app");export{I as C,Y as E,g as F,Ee as L,Mt as S,Tt as _,_t as a,vt as b,R as c,B as d,It as e,Ot as f,Rt as g,Bt as h,Nt as i,K as j,Dt as k,c as l,Ct as m,Et as n,St as o,At as p,wt as q,_ as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as m}from"./chunks/preload-helper.f15ab524.js";import{i as f}from"./chunks/index.esm.84a649c7.js";function g(c={}){const{immediate:d=!1,onNeedRefresh:w,onOfflineReady:o,onRegistered:r,onRegisteredSW:t,onRegisterError:a}=c;let i,s;const p=async(n=!0)=>{await s};async function l(){if("serviceWorker"in navigator){const{Workbox:n,messageSW:v}=await m(()=>import("./chunks/workbox-window.prod.es5.4b654ae6.js"),[]);i=new n("/sw.js",{scope:"/",type:"classic"}),i.addEventListener("activated",e=>{e.isUpdate?window.location.reload():o?.()}),i.register({immediate:d}).then(e=>{t?t("/sw.js",e):r?.(e)}).catch(e=>{a?.(e)})}}return s=l(),p}g();const u=window.firebaseConfig||{apiKey:"AIzaSyCrVzemDgpyp9i6ni7Yc5ZuEVfXYwl-4J0",authDomain:"ecom2-002.firebaseapp.com",projectId:"ecom2-002",storageBucket:"ecom2-002.appspot.com",messagingSenderId:"402807248219",appId:"1:402807248219:web:cf7d57759751e74776367e",measurementId:"G-SC592CE0GB"};f(u);
|