pwa-auth 3.4.5 → 3.4.7
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/README.md +9 -4
- package/base/export/pwa-auth.d.ts +1 -1
- package/base/export/pwa-auth.js +1 -1
- package/base/export/pwa-auth.js.map +1 -1
- package/base/firebase/interface.d.ts +1 -0
- package/base/firebase/interface.js +3 -0
- package/base/firebase/interface.js.map +1 -1
- package/base/webcomponents/drawer/drawer.d.ts +1 -1
- package/base/webcomponents/drawer/drawer.js +6 -0
- package/base/webcomponents/drawer/drawer.js.map +1 -1
- package/package.json +1 -1
- package/source/pwa-auth.js +20 -20
package/README.md
CHANGED
|
@@ -32,10 +32,17 @@ Continue reading to understand how to install this project:
|
|
|
32
32
|
- script-context
|
|
33
33
|
- module-context
|
|
34
34
|
```javascript
|
|
35
|
-
// ES
|
|
35
|
+
// Import ES Modules
|
|
36
36
|
import 'pwa-auth';
|
|
37
|
+
// Import Firebase Objects
|
|
37
38
|
import { auth, db, user, storage, application, firebaseConfig } from "pwa-auth";
|
|
39
|
+
// Import Functions
|
|
40
|
+
import { logOut, logAccount, logAccountDelete, deleteDocument, pwaDrawerToggle } from "pwa-auth";
|
|
38
41
|
|
|
42
|
+
// Optional - copy CoreJS files
|
|
43
|
+
'./npm/pwa-auth/source/**/*'
|
|
44
|
+
|
|
45
|
+
// Global Login Object
|
|
39
46
|
window.process = { env: { FIREBASE_CONFIG: JSON.stringify({
|
|
40
47
|
apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
|
|
41
48
|
authDomain: "xxxxxxx.xxxxxxx.xxx",
|
|
@@ -50,8 +57,6 @@ window.process = { env: { FIREBASE_CONFIG: JSON.stringify({
|
|
|
50
57
|
|
|
51
58
|
if (localhost) { window.process = { env: { FIREBASE_CONFIG: 'etc.' } } }
|
|
52
59
|
|
|
53
|
-
// Optional - copy CoreJS files
|
|
54
|
-
'./npm/pwa-auth/source/**/*'
|
|
55
60
|
```
|
|
56
61
|
|
|
57
62
|
## Technical Summary
|
|
@@ -106,7 +111,7 @@ if (localhost) { window.process = { env: { FIREBASE_CONFIG: 'etc.' } } }
|
|
|
106
111
|
- property: empty: location of empty image
|
|
107
112
|
- `<user-drawer>`
|
|
108
113
|
- feature: Top-down drawer: 1.4 seconds
|
|
109
|
-
- property: url
|
|
114
|
+
- property: **url**: location of `<pwa-settings>` Tag
|
|
110
115
|
- property: subscribe: (Initial State): Subscribe
|
|
111
116
|
- property: subscribe: else (Initial State): Login
|
|
112
117
|
- `<user-login>`
|
|
@@ -4,4 +4,4 @@ export { UserSettings } from '../webcomponents/settings/settings';
|
|
|
4
4
|
export { UserIcon } from '../webcomponents/icon/icon';
|
|
5
5
|
export { EmailReset } from '../webcomponents/form/forgot';
|
|
6
6
|
export { firebaseConfig, application, db, storage, auth, user } from '../firebase/authentication';
|
|
7
|
-
export { logOut, logAccount, logAccountDelete, deleteDocument } from "../firebase/interface";
|
|
7
|
+
export { logOut, logAccount, logAccountDelete, deleteDocument, pwaDrawerToggle } from "../firebase/interface";
|
package/base/export/pwa-auth.js
CHANGED
|
@@ -4,5 +4,5 @@ export { UserSettings } from '../webcomponents/settings/settings';
|
|
|
4
4
|
export { UserIcon } from '../webcomponents/icon/icon';
|
|
5
5
|
export { EmailReset } from '../webcomponents/form/forgot';
|
|
6
6
|
export { firebaseConfig, application, db, storage, auth, user } from '../firebase/authentication';
|
|
7
|
-
export { logOut, logAccount, logAccountDelete, deleteDocument } from "../firebase/interface";
|
|
7
|
+
export { logOut, logAccount, logAccountDelete, deleteDocument, pwaDrawerToggle } from "../firebase/interface";
|
|
8
8
|
//# sourceMappingURL=pwa-auth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pwa-auth.js","sourceRoot":"","sources":["../../typescript/export/pwa-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAiB,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAgB,gCAAgC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAc,oCAAoC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAkB,4BAA4B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAgB,8BAA8B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"pwa-auth.js","sourceRoot":"","sources":["../../typescript/export/pwa-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAiB,6BAA6B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAgB,gCAAgC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAc,oCAAoC,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAkB,4BAA4B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAgB,8BAA8B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -33,6 +33,9 @@ let pendingEmailVerification = false;
|
|
|
33
33
|
window.addEventListener("userEmailChanged", () => {
|
|
34
34
|
pendingEmailVerification = true;
|
|
35
35
|
});
|
|
36
|
+
export const pwaDrawerToggle = () => {
|
|
37
|
+
store.dispatch(closeSign());
|
|
38
|
+
};
|
|
36
39
|
onAuthStateChanged(auth, (user) => {
|
|
37
40
|
if (user) {
|
|
38
41
|
store.dispatch(userA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AE,CAAE,CAAC;QAMnC,KAAK,CAAC,QAAQ,CAAE,QAAQ,CAAK,UAAU,CAAE,CAAE,CAAC;QAC5C,KAAK,CAAC,QAAQ,CAAE,QAAQ,CAAK,EAAE,CAAE,CAAE,CAAC;IAItC,CAAC;AAEH,CAAC,CAAC,CAAC;AAcH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAS,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,CAAE,WAAW,GAAG,KAAK,CAAE,CAAC,CAA8E,CAAC,CAAA;AAG7J,MAAM,CAAC,MAAM,MAAM,GAAe,KAAK,IAAI,EAAE,GAAG,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,UAAU,GAAW,KAAK,IAAI,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AACzF,MAAM,CAAC,MAAM,gBAAgB,GAAK,KAAK,IAAI,EAAE,GAAG,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;AACzF,MAAM,CAAC,MAAM,cAAc,GAAO,KAAK,EAAE,OAAc,EAAE,IAAW,EAAE,EAAE;IAEtE,MAAM,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AAE1C,CAAC,CAAC"}
|
|
@@ -38,7 +38,7 @@ declare const UserDrawer_base: (new (...args: any[]) => {
|
|
|
38
38
|
readonly isConnected: boolean;
|
|
39
39
|
}) & typeof LitElement;
|
|
40
40
|
export declare class UserDrawer extends UserDrawer_base {
|
|
41
|
-
|
|
41
|
+
url: string;
|
|
42
42
|
drawer: boolean;
|
|
43
43
|
subscribe: boolean;
|
|
44
44
|
private name;
|
|
@@ -49,6 +49,12 @@ let UserDrawer = class UserDrawer extends connect(store)(LitElement) {
|
|
|
49
49
|
}
|
|
50
50
|
store.dispatch(toggleSign());
|
|
51
51
|
});
|
|
52
|
+
const link = this.shadowRoot.querySelectorAll('a');
|
|
53
|
+
link.forEach(item => {
|
|
54
|
+
item.addEventListener('click', () => {
|
|
55
|
+
store.dispatch(toggleSign());
|
|
56
|
+
});
|
|
57
|
+
});
|
|
52
58
|
}
|
|
53
59
|
static get styles() {
|
|
54
60
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sourceRoot":"","sources":["../../../typescript/webcomponents/drawer/drawer.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAkB,IAAI,EAAE,UAAU,EAAE,MAAQ,KAAK,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAU,mBAAmB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAiC,2BAA2B,CAAC;AAE/E,OAAO,EAAE,KAAK,EAAY,MAAO,aAAa,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAiB,YAAY,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAkB,eAAe,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAa,kBAAkB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAW,cAAc,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAa,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAa,YAAY,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAa,iBAAiB,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAY,sBAAsB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAgB,0BAA0B,CAAC;AAE5D,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGtC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAexD;QAAgB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AC;;GAChB,UAAU,CAsHtB"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://www.jackspublishing.com",
|
|
7
7
|
"email": "jack.solutionbox@gmail.com"
|
|
8
8
|
},
|
|
9
|
-
"version": "3.4.
|
|
9
|
+
"version": "3.4.7",
|
|
10
10
|
"description": "pwa-auth is a collection of four HTML webomponents for User Management to display a login button with icon picture state once logged in. Sign up and login within a drawer and optionally a static for a page. Being able to log out, change account details, and delete account.",
|
|
11
11
|
"homepage": "https://pwa-authentic.firebaseapp.com",
|
|
12
12
|
"repository": {
|
package/source/pwa-auth.js
CHANGED
|
@@ -327,7 +327,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
327
327
|
|
|
328
328
|
</form>
|
|
329
329
|
|
|
330
|
-
`}change(){wn.dispatch(Jt(this.source))}handleEmail(e){const t=e.target;this.email=t.value}handlePassword(e){const t=e.target;this.password=t.value}_handleSubmit(e){e.preventDefault()}login(){this.email.length<4?alert("Please enter an email address."):this.password.length<4?alert("Please enter a password."):this.signIn(this.email,this.password)}};Vg([ue({type:String}),Bg("design:type",Object)],zg.prototype,"source",void 0),Vg([he(),Bg("design:type",Object)],zg.prototype,"email",void 0),Vg([he(),Bg("design:type",Object)],zg.prototype,"password",void 0),zg=Vg([ae("form-login"),Bg("design:paramtypes",[])],zg);const qg="@firebase/installations",Hg="0.6.19",Kg=1e4,Wg=`w:${Hg}`,Gg="FIS_v2",Xg=36e5,Qg=new Qn("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function Jg(e){return e instanceof Xn&&e.code.includes("request-failed")}function Yg({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function Zg(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function em(e,t){const n=(await t.json()).error;return Qg.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function tm({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function nm(e,{refreshToken:t}){const n=tm(e);return n.append("Authorization",function(e){return`${Gg} ${e}`}(t)),n}async function rm(e){const t=await e();return t.status>=500&&t.status<600?e():t}function im(e){return new Promise(t=>{setTimeout(t,e)})}const sm=/^[cdef][\w-]{21}$/;function om(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){const t=(n=e,btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_"));var n;return t.substr(0,22)}(e);return sm.test(t)?t:""}catch{return""}}function am(e){return`${e.appName}!${e.appId}`}const cm=new Map;function lm(e,t){const n=am(e);um(n,t),function(e,t){const n=function(){!hm&&"BroadcastChannel"in self&&(hm=new BroadcastChannel("[Firebase] FID Change"),hm.onmessage=e=>{um(e.data.key,e.data.fid)});return hm}();n&&n.postMessage({key:e,fid:t});0===cm.size&&hm&&(hm.close(),hm=null)}(n,t)}function um(e,t){const n=cm.get(e);if(n)for(const e of n)e(t)}let hm=null;const dm="firebase-installations-store";let pm=null;function fm(){return pm||(pm=Rr("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(dm)}})),pm}async function gm(e,t){const n=am(e),r=(await fm()).transaction(dm,"readwrite"),i=r.objectStore(dm),s=await i.get(n);return await i.put(t,n),await r.done,s&&s.fid===t.fid||lm(e,t.fid),t}async function mm(e){const t=am(e),n=(await fm()).transaction(dm,"readwrite");await n.objectStore(dm).delete(t),await n.done}async function ym(e,t){const n=am(e),r=(await fm()).transaction(dm,"readwrite"),i=r.objectStore(dm),s=await i.get(n),o=t(s);return void 0===o?await i.delete(n):await i.put(o,n),await r.done,!o||s&&s.fid===o.fid||lm(e,o.fid),o}async function _m(e){let t;const n=await ym(e.appConfig,n=>{const r=function(e){const t=e||{fid:om(),registrationStatus:0};return bm(t)}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(Qg.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=Yg(e),i=tm(e),s=t.getImmediate({optional:!0});if(s){const e=await s.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={fid:n,authVersion:Gg,appId:e.appId,sdkVersion:Wg},a={method:"POST",headers:i,body:JSON.stringify(o)},c=await rm(()=>fetch(r,a));if(c.ok){const e=await c.json();return{fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:Zg(e.authToken)}}throw await em("Create Installation",c)}(e,t);return gm(e.appConfig,n)}catch(n){throw Jg(n)&&409===n.customData.serverCode?await mm(e.appConfig):await gm(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:wm(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry});return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function wm(e){let t=await vm(e.appConfig);for(;1===t.registrationStatus;)await im(100),t=await vm(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await _m(e);return n||t}return t}function vm(e){return ym(e,e=>{if(!e)throw Qg.create("installation-not-found");return bm(e)})}function bm(e){return 1===(t=e).registrationStatus&&t.registrationTime+Kg<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function Em({appConfig:e,heartbeatServiceProvider:t},n){const r=function(e,{fid:t}){return`${Yg(e)}/${t}/authTokens:generate`}(e,n),i=nm(e,n),s=t.getImmediate({optional:!0});if(s){const e=await s.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={installation:{sdkVersion:Wg,appId:e.appId}},a={method:"POST",headers:i,body:JSON.stringify(o)},c=await rm(()=>fetch(r,a));if(c.ok){return Zg(await c.json())}throw await em("Generate Auth Token",c)}async function Tm(e,t=!1){let n;const r=await ym(e.appConfig,r=>{if(!Sm(r))throw Qg.create("not-registered");const i=r.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+Xg}(e)}(i))return r;if(1===i.requestStatus)return n=async function(e,t){let n=await Im(e.appConfig);for(;1===n.authToken.requestStatus;)await im(100),n=await Im(e.appConfig);const r=n.authToken;return 0===r.requestStatus?Tm(e,t):r}(e,t),r;{if(!navigator.onLine)throw Qg.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return{...e,authToken:t}}(r);return n=async function(e,t){try{const n=await Em(e,t),r={...t,authToken:n};return await gm(e.appConfig,r),n}catch(n){if(!Jg(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n={...t,authToken:{requestStatus:0}};await gm(e.appConfig,n)}else await mm(e.appConfig);throw n}}(e,t),t}});return n?await n:r.authToken}function Im(e){return ym(e,e=>{if(!Sm(e))throw Qg.create("not-registered");const t=e.authToken;return 1===(n=t).requestStatus&&n.requestTime+Kg<Date.now()?{...e,authToken:{requestStatus:0}}:e;var n})}function Sm(e){return void 0!==e&&2===e.registrationStatus}async function Cm(e,t=!1){const n=e;await async function(e){const{registrationPromise:t}=await _m(e);t&&await t}(n);return(await Tm(n,t)).token}function km(e){return Qg.create("missing-app-config-values",{valueName:e})}const Am="installations",Rm=e=>{const t=_i(e.getProvider("app").getImmediate(),Am).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await _m(t);return r?r.catch(console.error):Tm(t).catch(console.error),n.fid}(t),getToken:e=>Cm(t,e)}};yi(new ar(Am,e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw km("App Configuration");if(!e.name)throw km("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw km(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:_i(t,"heartbeat"),_delete:()=>Promise.resolve()}},"PUBLIC")),yi(new ar("installations-internal",Rm,"PRIVATE")),Si(qg,Hg),Si(qg,Hg,"esm2020");const Om="analytics",Pm="https://www.googletagmanager.com/gtag/js",xm=new mr("@firebase/analytics"),Nm=new Qn("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});function Dm(e){if(!e.startsWith(Pm)){const t=Nm.create("invalid-gtag-resource",{gtagURL:e});return xm.warn(t.message),""}return e}function Lm(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function Mm(e,t){const n=function(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}("firebase-js-sdk-policy",{createScriptURL:Dm}),r=document.createElement("script"),i=`${Pm}?l=${e}&id=${t}`;r.src=n?n?.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function Um(e,t,n,r){return async function(i,...s){try{if("event"===i){const[r,i]=s;await async function(e,t,n,r,i){try{let s=[];if(i&&i.send_to){let e=i.send_to;Array.isArray(e)||(e=[e]);const r=await Lm(n);for(const n of e){const e=r.find(e=>e.measurementId===n),i=e&&t[e.appId];if(!i){s=[];break}s.push(i)}}0===s.length&&(s=Object.values(t)),await Promise.all(s),e("event",r,i||{})}catch(e){xm.error(e)}}(e,t,n,r,i)}else if("config"===i){const[i,o]=s;await async function(e,t,n,r,i,s){const o=r[i];try{if(o)await t[o];else{const e=(await Lm(n)).find(e=>e.measurementId===i);e&&await t[e.appId]}}catch(e){xm.error(e)}e("config",i,s)}(e,t,n,r,i,o)}else if("consent"===i){const[t,n]=s;e("consent",t,n)}else if("get"===i){const[t,n,r]=s;e("get",t,n,r)}else if("set"===i){const[t]=s;e("set",t)}else e(i,...s)}catch(e){xm.error(e)}}}const $m=new class{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function Fm(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function jm(e,t=$m,n){const{appId:r,apiKey:i,measurementId:s}=e.options;if(!r)throw Nm.create("no-app-id");if(!i){if(s)return{measurementId:s,appId:r};throw Nm.create("no-api-key")}const o=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new Bm;return setTimeout(async()=>{a.abort()},6e4),Vm({appId:r,apiKey:i,measurementId:s},o,a,t)}async function Vm(e,{throttleEndTimeMillis:t,backoffCount:n},r,i=$m){const{appId:s,measurementId:o}=e;try{await function(e,t){return new Promise((n,r)=>{const i=Math.max(t-Date.now(),0),s=setTimeout(n,i);e.addEventListener(()=>{clearTimeout(s),r(Nm.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}(r,t)}catch(e){if(o)return xm.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${e?.message}]`),{appId:s,measurementId:o};throw e}try{const t=await async function(e){const{appId:t,apiKey:n}=e,r={method:"GET",headers:Fm(n)},i="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",t),s=await fetch(i,r);if(200!==s.status&&304!==s.status){let e="";try{const t=await s.json();t.error?.message&&(e=t.error.message)}catch(e){}throw Nm.create("config-fetch-failed",{httpStatus:s.status,responseMessage:e})}return s.json()}(e);return i.deleteThrottleMetadata(s),t}catch(t){const a=t;if(!function(e){if(!(e instanceof Xn&&e.customData))return!1;const t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(a)){if(i.deleteThrottleMetadata(s),o)return xm.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${a?.message}]`),{appId:s,measurementId:o};throw t}const c=503===Number(a?.customData?.httpStatus)?sr(n,i.intervalMillis,30):sr(n,i.intervalMillis),l={throttleEndTimeMillis:Date.now()+c,backoffCount:n+1};return i.setThrottleMetadata(s,l),xm.debug(`Calling attemptFetch again in ${c} millis`),Vm(e,l,r,i)}}class Bm{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function zm(e,t,n,r,i,s,o){const a=jm(e);a.then(t=>{n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&xm.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${t.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(e=>xm.error(e)),t.push(a);const c=async function(){if(!Kn())return xm.warn(Nm.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await Wn()}catch(e){return xm.warn(Nm.create("indexeddb-unavailable",{errorInfo:e?.toString()}).message),!1}return!0}().then(e=>e?r.getId():void 0),[l,u]=await Promise.all([a,c]);(function(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(Pm)&&n.src.includes(e))return n;return null})(s)||Mm(s,l.measurementId),i("js",new Date);const h=o?.config??{};return h.origin="firebase",h.update=!0,null!=u&&(h.firebase_id=u),i("config",l.measurementId,h),l.measurementId}class qm{constructor(e){this.app=e}_delete(){return delete Hm[this.app.options.appId],Promise.resolve()}}let Hm={},Km=[];const Wm={};let Gm,Xm,Qm="dataLayer",Jm=!1;function Ym(e,t,n){!function(){const e=[];if(qn()&&e.push("This is a browser extension environment."),Gn()||e.push("Cookies are not available."),e.length>0){const t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),n=Nm.create("invalid-analytics-context",{errorInfo:t});xm.warn(n.message)}}();const r=e.options.appId;if(!r)throw Nm.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw Nm.create("no-api-key");xm.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=Hm[r])throw Nm.create("already-exists",{id:r});if(!Jm){!function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(Qm);const{wrappedGtag:e,gtagCore:t}=function(e,t,n,r,i){let s=function(...e){window[r].push(arguments)};return window[i]&&"function"==typeof window[i]&&(s=window[i]),window[i]=Um(s,e,t,n),{gtagCore:s,wrappedGtag:window[i]}}(Hm,Km,Wm,Qm,"gtag");Xm=e,Gm=t,Jm=!0}Hm[r]=zm(e,Km,Wm,t,Gm,Qm,n);return new qm(e)}function Zm(e=Ii()){const t=_i(e=or(e),Om);return t.isInitialized()?t.getImmediate():function(e,t={}){const n=_i(e,Om);if(n.isInitialized()){const e=n.getImmediate();if(Yn(t,n.getOptions()))return e;throw Nm.create("already-initialized")}const r=n.initialize({options:t});return r}(e)}function ey(e,t,n){e=or(e),async function(e,t,n,r){if(r&&r.global){const t={};for(const e of Object.keys(n))t[`user_properties.${e}`]=n[e];return e("set",t),Promise.resolve()}e("config",await t,{update:!0,user_properties:n})}(Xm,Hm[e.app.options.appId],t,n).catch(e=>xm.error(e))}function ty(e,t,n,r){e=or(e),async function(e,t,n,r,i){if(i&&i.global)e("event",n,r);else{const i=await t;e("event",n,{...r,send_to:i})}}(Xm,Hm[e.app.options.appId],t,n,r).catch(e=>xm.error(e))}const ny="@firebase/analytics",ry="0.10.19";yi(new ar(Om,(e,{options:t})=>Ym(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),yi(new ar("analytics-internal",function(e){try{const t=e.getProvider(Om).getImmediate();return{logEvent:(e,n,r)=>ty(t,e,n,r),setUserProperties:(e,n)=>ey(t,e,n)}}catch(e){throw Nm.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),Si(ny,ry),Si(ny,ry,"esm2020");const iy="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",sy="google.c.a.c_id",oy=1e4;var ay,cy;function ly(e){const t=new Uint8Array(e);return btoa(String.fromCharCode(...t)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function uy(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;++e)r[e]=n.charCodeAt(e);return r}!function(e){e[e.DATA_MESSAGE=1]="DATA_MESSAGE",e[e.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION"}(ay||(ay={})),function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"}(cy||(cy={}));const hy="fcm_token_details_db",dy="fcm_token_object_Store";const py="firebase-messaging-store";let fy=null;function gy(){return fy||(fy=Rr("firebase-messaging-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(py)}})),fy}async function my(e){const t=_y(e),n=await gy(),r=await n.transaction(py).objectStore(py).get(t);if(r)return r;{const t=await async function(e){if("databases"in indexedDB){const e=(await indexedDB.databases()).map(e=>e.name);if(!e.includes(hy))return null}let t=null;return(await Rr(hy,5,{upgrade:async(n,r,i,s)=>{if(r<2)return;if(!n.objectStoreNames.contains(dy))return;const o=s.objectStore(dy),a=await o.index("fcmSenderId").get(e);if(await o.clear(),a)if(2===r){const e=a;if(!e.auth||!e.p256dh||!e.endpoint)return;t={token:e.fcmToken,createTime:e.createTime??Date.now(),subscriptionOptions:{auth:e.auth,p256dh:e.p256dh,endpoint:e.endpoint,swScope:e.swScope,vapidKey:"string"==typeof e.vapidKey?e.vapidKey:ly(e.vapidKey)}}}else if(3===r){const e=a;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:ly(e.auth),p256dh:ly(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:ly(e.vapidKey)}}}else if(4===r){const e=a;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:ly(e.auth),p256dh:ly(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:ly(e.vapidKey)}}}}})).close(),await Or(hy),await Or("fcm_vapid_details_db"),await Or("undefined"),function(e){if(!e||!e.subscriptionOptions)return!1;const{subscriptionOptions:t}=e;return"number"==typeof e.createTime&&e.createTime>0&&"string"==typeof e.token&&e.token.length>0&&"string"==typeof t.auth&&t.auth.length>0&&"string"==typeof t.p256dh&&t.p256dh.length>0&&"string"==typeof t.endpoint&&t.endpoint.length>0&&"string"==typeof t.swScope&&t.swScope.length>0&&"string"==typeof t.vapidKey&&t.vapidKey.length>0}(t)?t:null}(e.appConfig.senderId);if(t)return await yy(e,t),t}}async function yy(e,t){const n=_y(e),r=(await gy()).transaction(py,"readwrite");return await r.objectStore(py).put(t,n),await r.done,t}function _y({appConfig:e}){return e.appId}const wy=new Qn("messaging","Messaging",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invalid-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."});function vy({projectId:e}){return`https://fcmregistrations.googleapis.com/v1/projects/${e}/registrations`}async function by({appConfig:e,installations:t}){const n=await t.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":`FIS ${n}`})}function Ey({p256dh:e,auth:t,endpoint:n,vapidKey:r}){const i={web:{endpoint:n,auth:t,p256dh:e}};return r!==iy&&(i.web.applicationPubKey=r),i}async function Ty(e){const t=await async function(e,t){const n=await e.pushManager.getSubscription();if(n)return n;return e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:uy(t)})}(e.swRegistration,e.vapidKey),n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:ly(t.getKey("auth")),p256dh:ly(t.getKey("p256dh"))},r=await my(e.firebaseDependencies);if(r){if(function(e,t){const n=t.vapidKey===e.vapidKey,r=t.endpoint===e.endpoint,i=t.auth===e.auth,s=t.p256dh===e.p256dh;return n&&r&&i&&s}(r.subscriptionOptions,n))return Date.now()>=r.createTime+6048e5?async function(e,t){try{const n=await async function(e,t){const n=await by(e),r=Ey(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)};let s;try{const n=await fetch(`${vy(e.appConfig)}/${t.token}`,i);s=await n.json()}catch(e){throw wy.create("token-update-failed",{errorInfo:e?.toString()})}if(s.error){const e=s.error.message;throw wy.create("token-update-failed",{errorInfo:e})}if(!s.token)throw wy.create("token-update-no-token");return s.token}(e.firebaseDependencies,t),r={...t,token:n,createTime:Date.now()};return await yy(e.firebaseDependencies,r),n}catch(e){throw e}}(e,{token:r.token,createTime:Date.now(),subscriptionOptions:n}):r.token;try{await async function(e,t){const n={method:"DELETE",headers:await by(e)};try{const r=await fetch(`${vy(e.appConfig)}/${t}`,n),i=await r.json();if(i.error){const e=i.error.message;throw wy.create("token-unsubscribe-failed",{errorInfo:e})}}catch(e){throw wy.create("token-unsubscribe-failed",{errorInfo:e?.toString()})}}(e.firebaseDependencies,r.token)}catch(e){}return Iy(e.firebaseDependencies,n)}return Iy(e.firebaseDependencies,n)}async function Iy(e,t){const n=await async function(e,t){const n=await by(e),r=Ey(t),i={method:"POST",headers:n,body:JSON.stringify(r)};let s;try{const t=await fetch(vy(e.appConfig),i);s=await t.json()}catch(e){throw wy.create("token-subscribe-failed",{errorInfo:e?.toString()})}if(s.error){const e=s.error.message;throw wy.create("token-subscribe-failed",{errorInfo:e})}if(!s.token)throw wy.create("token-subscribe-no-token");return s.token}(e,t),r={token:n,createTime:Date.now(),subscriptionOptions:t};return await yy(e,r),r.token}function Sy(e){const t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};return function(e,t){if(!t.notification)return;e.notification={};const n=t.notification.title;n&&(e.notification.title=n);const r=t.notification.body;r&&(e.notification.body=r);const i=t.notification.image;i&&(e.notification.image=i);const s=t.notification.icon;s&&(e.notification.icon=s)}(t,e),function(e,t){if(!t.data)return;e.data=t.data}(t,e),function(e,t){if(!t.fcmOptions&&!t.notification?.click_action)return;e.fcmOptions={};const n=t.fcmOptions?.link??t.notification?.click_action;n&&(e.fcmOptions.link=n);const r=t.fcmOptions?.analytics_label;r&&(e.fcmOptions.analyticsLabel=r)}(t,e),t}function Cy(e){return wy.create("missing-app-config-values",{valueName:e})}class ky{constructor(e,t,n){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;const r=function(e){if(!e||!e.options)throw Cy("App Configuration Object");if(!e.name)throw Cy("App Name");const t=["projectId","apiKey","appId","messagingSenderId"],{options:n}=e;for(const e of t)if(!n[e])throw Cy(e);return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}(e);this.firebaseDependencies={app:e,appConfig:r,installations:t,analyticsProvider:n}}_delete(){return Promise.resolve()}}async function Ay(e){try{e.swRegistration=await navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}),e.swRegistration.update().catch(()=>{}),await async function(e){return new Promise((t,n)=>{const r=setTimeout(()=>n(new Error("Service worker not registered after 10000 ms")),oy),i=e.installing||e.waiting;e.active?(clearTimeout(r),t()):i?i.onstatechange=e=>{"activated"===e.target?.state&&(i.onstatechange=null,clearTimeout(r),t())}:(clearTimeout(r),n(new Error("No incoming service worker found.")))})}(e.swRegistration)}catch(e){throw wy.create("failed-service-worker-registration",{browserErrorMessage:e?.message})}}async function Ry(e,t){if(!navigator)throw wy.create("only-available-in-window");if("default"===Notification.permission&&await Notification.requestPermission(),"granted"!==Notification.permission)throw wy.create("permission-blocked");return await async function(e,t){t?e.vapidKey=t:e.vapidKey||(e.vapidKey=iy)}(e,t?.vapidKey),await async function(e,t){if(t||e.swRegistration||await Ay(e),t||!e.swRegistration){if(!(t instanceof ServiceWorkerRegistration))throw wy.create("invalid-sw-registration");e.swRegistration=t}}(e,t?.serviceWorkerRegistration),Ty(e)}async function Oy(e,t,n){const r=function(e){switch(e){case cy.NOTIFICATION_CLICKED:return"notification_open";case cy.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(t);(await e.firebaseDependencies.analyticsProvider.get()).logEvent(r,{message_id:n[sy],message_name:n["google.c.a.c_l"],message_time:n["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)})}async function Py(e,t){const n=t.data;if(!n.isFirebaseMessaging)return;e.onMessageHandler&&n.messageType===cy.PUSH_RECEIVED&&("function"==typeof e.onMessageHandler?e.onMessageHandler(Sy(n)):e.onMessageHandler.next(Sy(n)));const r=n.data;var i;"object"==typeof(i=r)&&i&&sy in i&&"1"===r["google.c.a.e"]&&await Oy(e,n.messageType,r)}const xy="@firebase/messaging",Ny="0.12.23",Dy=e=>{const t=new ky(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",e=>Py(t,e)),t},Ly=e=>{const t=e.getProvider("messaging").getImmediate();return{getToken:e=>Ry(t,e)}};let My;yi(new ar("messaging",Dy,"PUBLIC")),yi(new ar("messaging-internal",Ly,"PRIVATE")),Si(xy,Ny),Si(xy,Ny,"esm2020"),za().useDeviceLanguage(),(async()=>{await async function(){try{await Wn()}catch(e){return!1}return"undefined"!=typeof window&&Kn()&&Gn()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}()&&(My=Zm(xg))})(),navigator,window;let Uy=!1;window.addEventListener("userEmailChanged",()=>{Uy=!0}),function(e,t,n,r){or(e).onAuthStateChanged(t,n,r)}(Lg,e=>{e?(wn.dispatch(tn(!0)),wn.dispatch(rn()),wn.dispatch(dn(e.uid)),wn.dispatch(pn(e.displayName||"John Doe")),wn.dispatch(gn(e.email||"")),wn.dispatch(mn(e.photoURL||"")),wn.dispatch(en(e.displayName||"John Doe")),wn.dispatch(Zt(e.photoURL||"")),Uy&&!e.emailVerified?Po(e).then(()=>{Uy=!1}).catch(e=>{Uy=!1}):e.emailVerified):(wn.dispatch(tn(!1)),wn.dispatch(dn("")),wn.dispatch(pn("John Doe")),wn.dispatch(gn("")),wn.dispatch(mn("")),wn.dispatch(en("John Doe")),wn.dispatch(Zt("")))});const $y=async()=>function(e){return or(e).signOut()}(Lg),Fy=async()=>{ty(My,"create_account")},jy=async()=>{ty(My,"delete_account")},Vy=async(e,t)=>{await tf(Lp(Ng,e,t))};var By=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},zy=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let qy=class extends se{constructor(){super(),this.source="",this.email="",this.password="",this.newAccount=async(e,t)=>{await Oo(Lg,e,t).then(e=>{Po(e.user).then(()=>{})}).then(()=>{Fy()})}}static get styles(){return[In,$g,Fg,Ug,jg,s`
|
|
330
|
+
`}change(){wn.dispatch(Jt(this.source))}handleEmail(e){const t=e.target;this.email=t.value}handlePassword(e){const t=e.target;this.password=t.value}_handleSubmit(e){e.preventDefault()}login(){this.email.length<4?alert("Please enter an email address."):this.password.length<4?alert("Please enter a password."):this.signIn(this.email,this.password)}};Vg([ue({type:String}),Bg("design:type",Object)],zg.prototype,"source",void 0),Vg([he(),Bg("design:type",Object)],zg.prototype,"email",void 0),Vg([he(),Bg("design:type",Object)],zg.prototype,"password",void 0),zg=Vg([ae("form-login"),Bg("design:paramtypes",[])],zg);const qg="@firebase/installations",Hg="0.6.19",Kg=1e4,Wg=`w:${Hg}`,Gg="FIS_v2",Xg=36e5,Qg=new Qn("installations","Installations",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"not-registered":"Firebase Installation is not registered.","installation-not-found":"Firebase Installation not found.","request-failed":'{$requestName} request failed with error "{$serverCode} {$serverStatus}: {$serverMessage}"',"app-offline":"Could not process request. Application offline.","delete-pending-registration":"Can't delete installation while there is a pending registration request."});function Jg(e){return e instanceof Xn&&e.code.includes("request-failed")}function Yg({projectId:e}){return`https://firebaseinstallations.googleapis.com/v1/projects/${e}/installations`}function Zg(e){return{token:e.token,requestStatus:2,expiresIn:(t=e.expiresIn,Number(t.replace("s","000"))),creationTime:Date.now()};var t}async function em(e,t){const n=(await t.json()).error;return Qg.create("request-failed",{requestName:e,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function tm({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function nm(e,{refreshToken:t}){const n=tm(e);return n.append("Authorization",function(e){return`${Gg} ${e}`}(t)),n}async function rm(e){const t=await e();return t.status>=500&&t.status<600?e():t}function im(e){return new Promise(t=>{setTimeout(t,e)})}const sm=/^[cdef][\w-]{21}$/;function om(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const t=function(e){const t=(n=e,btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_"));var n;return t.substr(0,22)}(e);return sm.test(t)?t:""}catch{return""}}function am(e){return`${e.appName}!${e.appId}`}const cm=new Map;function lm(e,t){const n=am(e);um(n,t),function(e,t){const n=function(){!hm&&"BroadcastChannel"in self&&(hm=new BroadcastChannel("[Firebase] FID Change"),hm.onmessage=e=>{um(e.data.key,e.data.fid)});return hm}();n&&n.postMessage({key:e,fid:t});0===cm.size&&hm&&(hm.close(),hm=null)}(n,t)}function um(e,t){const n=cm.get(e);if(n)for(const e of n)e(t)}let hm=null;const dm="firebase-installations-store";let pm=null;function fm(){return pm||(pm=Rr("firebase-installations-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(dm)}})),pm}async function gm(e,t){const n=am(e),r=(await fm()).transaction(dm,"readwrite"),i=r.objectStore(dm),s=await i.get(n);return await i.put(t,n),await r.done,s&&s.fid===t.fid||lm(e,t.fid),t}async function mm(e){const t=am(e),n=(await fm()).transaction(dm,"readwrite");await n.objectStore(dm).delete(t),await n.done}async function ym(e,t){const n=am(e),r=(await fm()).transaction(dm,"readwrite"),i=r.objectStore(dm),s=await i.get(n),o=t(s);return void 0===o?await i.delete(n):await i.put(o,n),await r.done,!o||s&&s.fid===o.fid||lm(e,o.fid),o}async function _m(e){let t;const n=await ym(e.appConfig,n=>{const r=function(e){const t=e||{fid:om(),registrationStatus:0};return bm(t)}(n),i=function(e,t){if(0===t.registrationStatus){if(!navigator.onLine){return{installationEntry:t,registrationPromise:Promise.reject(Qg.create("app-offline"))}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},r=async function(e,t){try{const n=await async function({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const r=Yg(e),i=tm(e),s=t.getImmediate({optional:!0});if(s){const e=await s.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={fid:n,authVersion:Gg,appId:e.appId,sdkVersion:Wg},a={method:"POST",headers:i,body:JSON.stringify(o)},c=await rm(()=>fetch(r,a));if(c.ok){const e=await c.json();return{fid:e.fid||n,registrationStatus:2,refreshToken:e.refreshToken,authToken:Zg(e.authToken)}}throw await em("Create Installation",c)}(e,t);return gm(e.appConfig,n)}catch(n){throw Jg(n)&&409===n.customData.serverCode?await mm(e.appConfig):await gm(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}(e,n);return{installationEntry:n,registrationPromise:r}}return 1===t.registrationStatus?{installationEntry:t,registrationPromise:wm(e)}:{installationEntry:t}}(e,r);return t=i.registrationPromise,i.installationEntry});return""===n.fid?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}async function wm(e){let t=await vm(e.appConfig);for(;1===t.registrationStatus;)await im(100),t=await vm(e.appConfig);if(0===t.registrationStatus){const{installationEntry:t,registrationPromise:n}=await _m(e);return n||t}return t}function vm(e){return ym(e,e=>{if(!e)throw Qg.create("installation-not-found");return bm(e)})}function bm(e){return 1===(t=e).registrationStatus&&t.registrationTime+Kg<Date.now()?{fid:e.fid,registrationStatus:0}:e;var t}async function Em({appConfig:e,heartbeatServiceProvider:t},n){const r=function(e,{fid:t}){return`${Yg(e)}/${t}/authTokens:generate`}(e,n),i=nm(e,n),s=t.getImmediate({optional:!0});if(s){const e=await s.getHeartbeatsHeader();e&&i.append("x-firebase-client",e)}const o={installation:{sdkVersion:Wg,appId:e.appId}},a={method:"POST",headers:i,body:JSON.stringify(o)},c=await rm(()=>fetch(r,a));if(c.ok){return Zg(await c.json())}throw await em("Generate Auth Token",c)}async function Tm(e,t=!1){let n;const r=await ym(e.appConfig,r=>{if(!Sm(r))throw Qg.create("not-registered");const i=r.authToken;if(!t&&function(e){return 2===e.requestStatus&&!function(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+Xg}(e)}(i))return r;if(1===i.requestStatus)return n=async function(e,t){let n=await Im(e.appConfig);for(;1===n.authToken.requestStatus;)await im(100),n=await Im(e.appConfig);const r=n.authToken;return 0===r.requestStatus?Tm(e,t):r}(e,t),r;{if(!navigator.onLine)throw Qg.create("app-offline");const t=function(e){const t={requestStatus:1,requestTime:Date.now()};return{...e,authToken:t}}(r);return n=async function(e,t){try{const n=await Em(e,t),r={...t,authToken:n};return await gm(e.appConfig,r),n}catch(n){if(!Jg(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n={...t,authToken:{requestStatus:0}};await gm(e.appConfig,n)}else await mm(e.appConfig);throw n}}(e,t),t}});return n?await n:r.authToken}function Im(e){return ym(e,e=>{if(!Sm(e))throw Qg.create("not-registered");const t=e.authToken;return 1===(n=t).requestStatus&&n.requestTime+Kg<Date.now()?{...e,authToken:{requestStatus:0}}:e;var n})}function Sm(e){return void 0!==e&&2===e.registrationStatus}async function Cm(e,t=!1){const n=e;await async function(e){const{registrationPromise:t}=await _m(e);t&&await t}(n);return(await Tm(n,t)).token}function km(e){return Qg.create("missing-app-config-values",{valueName:e})}const Am="installations",Rm=e=>{const t=_i(e.getProvider("app").getImmediate(),Am).getImmediate();return{getId:()=>async function(e){const t=e,{installationEntry:n,registrationPromise:r}=await _m(t);return r?r.catch(console.error):Tm(t).catch(console.error),n.fid}(t),getToken:e=>Cm(t,e)}};yi(new ar(Am,e=>{const t=e.getProvider("app").getImmediate(),n=function(e){if(!e||!e.options)throw km("App Configuration");if(!e.name)throw km("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw km(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}(t);return{app:t,appConfig:n,heartbeatServiceProvider:_i(t,"heartbeat"),_delete:()=>Promise.resolve()}},"PUBLIC")),yi(new ar("installations-internal",Rm,"PRIVATE")),Si(qg,Hg),Si(qg,Hg,"esm2020");const Om="analytics",Pm="https://www.googletagmanager.com/gtag/js",xm=new mr("@firebase/analytics"),Nm=new Qn("analytics","Analytics",{"already-exists":"A Firebase Analytics instance with the appId {$id} already exists. Only one Firebase Analytics instance can be created for each appId.","already-initialized":"initializeAnalytics() cannot be called again with different options than those it was initially called with. It can be called again with the same options to return the existing instance, or getAnalytics() can be used to get a reference to the already-initialized instance.","already-initialized-settings":"Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.","interop-component-reg-failed":"Firebase Analytics Interop Component failed to instantiate: {$reason}","invalid-analytics-context":"Firebase Analytics is not supported in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","indexeddb-unavailable":"IndexedDB unavailable or restricted in this environment. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments. Details: {$errorInfo}","fetch-throttle":"The config fetch request timed out while in an exponential backoff state. Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.","config-fetch-failed":"Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}","no-api-key":'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid API key.',"no-app-id":'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field tocontain a valid app ID.',"no-client-id":'The "client_id" field is empty.',"invalid-gtag-resource":"Trusted Types detected an invalid gtag resource: {$gtagURL}."});function Dm(e){if(!e.startsWith(Pm)){const t=Nm.create("invalid-gtag-resource",{gtagURL:e});return xm.warn(t.message),""}return e}function Lm(e){return Promise.all(e.map(e=>e.catch(e=>e)))}function Mm(e,t){const n=function(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}("firebase-js-sdk-policy",{createScriptURL:Dm}),r=document.createElement("script"),i=`${Pm}?l=${e}&id=${t}`;r.src=n?n?.createScriptURL(i):i,r.async=!0,document.head.appendChild(r)}function Um(e,t,n,r){return async function(i,...s){try{if("event"===i){const[r,i]=s;await async function(e,t,n,r,i){try{let s=[];if(i&&i.send_to){let e=i.send_to;Array.isArray(e)||(e=[e]);const r=await Lm(n);for(const n of e){const e=r.find(e=>e.measurementId===n),i=e&&t[e.appId];if(!i){s=[];break}s.push(i)}}0===s.length&&(s=Object.values(t)),await Promise.all(s),e("event",r,i||{})}catch(e){xm.error(e)}}(e,t,n,r,i)}else if("config"===i){const[i,o]=s;await async function(e,t,n,r,i,s){const o=r[i];try{if(o)await t[o];else{const e=(await Lm(n)).find(e=>e.measurementId===i);e&&await t[e.appId]}}catch(e){xm.error(e)}e("config",i,s)}(e,t,n,r,i,o)}else if("consent"===i){const[t,n]=s;e("consent",t,n)}else if("get"===i){const[t,n,r]=s;e("get",t,n,r)}else if("set"===i){const[t]=s;e("set",t)}else e(i,...s)}catch(e){xm.error(e)}}}const $m=new class{constructor(e={},t=1e3){this.throttleMetadata=e,this.intervalMillis=t}getThrottleMetadata(e){return this.throttleMetadata[e]}setThrottleMetadata(e,t){this.throttleMetadata[e]=t}deleteThrottleMetadata(e){delete this.throttleMetadata[e]}};function Fm(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function jm(e,t=$m,n){const{appId:r,apiKey:i,measurementId:s}=e.options;if(!r)throw Nm.create("no-app-id");if(!i){if(s)return{measurementId:s,appId:r};throw Nm.create("no-api-key")}const o=t.getThrottleMetadata(r)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new Bm;return setTimeout(async()=>{a.abort()},6e4),Vm({appId:r,apiKey:i,measurementId:s},o,a,t)}async function Vm(e,{throttleEndTimeMillis:t,backoffCount:n},r,i=$m){const{appId:s,measurementId:o}=e;try{await function(e,t){return new Promise((n,r)=>{const i=Math.max(t-Date.now(),0),s=setTimeout(n,i);e.addEventListener(()=>{clearTimeout(s),r(Nm.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}(r,t)}catch(e){if(o)return xm.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${e?.message}]`),{appId:s,measurementId:o};throw e}try{const t=await async function(e){const{appId:t,apiKey:n}=e,r={method:"GET",headers:Fm(n)},i="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",t),s=await fetch(i,r);if(200!==s.status&&304!==s.status){let e="";try{const t=await s.json();t.error?.message&&(e=t.error.message)}catch(e){}throw Nm.create("config-fetch-failed",{httpStatus:s.status,responseMessage:e})}return s.json()}(e);return i.deleteThrottleMetadata(s),t}catch(t){const a=t;if(!function(e){if(!(e instanceof Xn&&e.customData))return!1;const t=Number(e.customData.httpStatus);return 429===t||500===t||503===t||504===t}(a)){if(i.deleteThrottleMetadata(s),o)return xm.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${o} provided in the "measurementId" field in the local Firebase config. [${a?.message}]`),{appId:s,measurementId:o};throw t}const c=503===Number(a?.customData?.httpStatus)?sr(n,i.intervalMillis,30):sr(n,i.intervalMillis),l={throttleEndTimeMillis:Date.now()+c,backoffCount:n+1};return i.setThrottleMetadata(s,l),xm.debug(`Calling attemptFetch again in ${c} millis`),Vm(e,l,r,i)}}class Bm{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}abort(){this.listeners.forEach(e=>e())}}async function zm(e,t,n,r,i,s,o){const a=jm(e);a.then(t=>{n[t.measurementId]=t.appId,e.options.measurementId&&t.measurementId!==e.options.measurementId&&xm.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${t.measurementId}). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.`)}).catch(e=>xm.error(e)),t.push(a);const c=async function(){if(!Kn())return xm.warn(Nm.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await Wn()}catch(e){return xm.warn(Nm.create("indexeddb-unavailable",{errorInfo:e?.toString()}).message),!1}return!0}().then(e=>e?r.getId():void 0),[l,u]=await Promise.all([a,c]);(function(e){const t=window.document.getElementsByTagName("script");for(const n of Object.values(t))if(n.src&&n.src.includes(Pm)&&n.src.includes(e))return n;return null})(s)||Mm(s,l.measurementId),i("js",new Date);const h=o?.config??{};return h.origin="firebase",h.update=!0,null!=u&&(h.firebase_id=u),i("config",l.measurementId,h),l.measurementId}class qm{constructor(e){this.app=e}_delete(){return delete Hm[this.app.options.appId],Promise.resolve()}}let Hm={},Km=[];const Wm={};let Gm,Xm,Qm="dataLayer",Jm=!1;function Ym(e,t,n){!function(){const e=[];if(qn()&&e.push("This is a browser extension environment."),Gn()||e.push("Cookies are not available."),e.length>0){const t=e.map((e,t)=>`(${t+1}) ${e}`).join(" "),n=Nm.create("invalid-analytics-context",{errorInfo:t});xm.warn(n.message)}}();const r=e.options.appId;if(!r)throw Nm.create("no-app-id");if(!e.options.apiKey){if(!e.options.measurementId)throw Nm.create("no-api-key");xm.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=Hm[r])throw Nm.create("already-exists",{id:r});if(!Jm){!function(e){let t=[];Array.isArray(window[e])?t=window[e]:window[e]=t}(Qm);const{wrappedGtag:e,gtagCore:t}=function(e,t,n,r,i){let s=function(...e){window[r].push(arguments)};return window[i]&&"function"==typeof window[i]&&(s=window[i]),window[i]=Um(s,e,t,n),{gtagCore:s,wrappedGtag:window[i]}}(Hm,Km,Wm,Qm,"gtag");Xm=e,Gm=t,Jm=!0}Hm[r]=zm(e,Km,Wm,t,Gm,Qm,n);return new qm(e)}function Zm(e=Ii()){const t=_i(e=or(e),Om);return t.isInitialized()?t.getImmediate():function(e,t={}){const n=_i(e,Om);if(n.isInitialized()){const e=n.getImmediate();if(Yn(t,n.getOptions()))return e;throw Nm.create("already-initialized")}const r=n.initialize({options:t});return r}(e)}function ey(e,t,n){e=or(e),async function(e,t,n,r){if(r&&r.global){const t={};for(const e of Object.keys(n))t[`user_properties.${e}`]=n[e];return e("set",t),Promise.resolve()}e("config",await t,{update:!0,user_properties:n})}(Xm,Hm[e.app.options.appId],t,n).catch(e=>xm.error(e))}function ty(e,t,n,r){e=or(e),async function(e,t,n,r,i){if(i&&i.global)e("event",n,r);else{const i=await t;e("event",n,{...r,send_to:i})}}(Xm,Hm[e.app.options.appId],t,n,r).catch(e=>xm.error(e))}const ny="@firebase/analytics",ry="0.10.19";yi(new ar(Om,(e,{options:t})=>Ym(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),t),"PUBLIC")),yi(new ar("analytics-internal",function(e){try{const t=e.getProvider(Om).getImmediate();return{logEvent:(e,n,r)=>ty(t,e,n,r),setUserProperties:(e,n)=>ey(t,e,n)}}catch(e){throw Nm.create("interop-component-reg-failed",{reason:e})}},"PRIVATE")),Si(ny,ry),Si(ny,ry,"esm2020");const iy="BDOU99-h67HcA6JeFXHbSNMu7e2yNNu3RzoMj8TM4W88jITfq7ZmPvIM1Iv-4_l2LxQcYwhqby2xGpWwzjfAnG4",sy="google.c.a.c_id",oy=1e4;var ay,cy;function ly(e){const t=new Uint8Array(e);return btoa(String.fromCharCode(...t)).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function uy(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;++e)r[e]=n.charCodeAt(e);return r}!function(e){e[e.DATA_MESSAGE=1]="DATA_MESSAGE",e[e.DISPLAY_NOTIFICATION=3]="DISPLAY_NOTIFICATION"}(ay||(ay={})),function(e){e.PUSH_RECEIVED="push-received",e.NOTIFICATION_CLICKED="notification-clicked"}(cy||(cy={}));const hy="fcm_token_details_db",dy="fcm_token_object_Store";const py="firebase-messaging-store";let fy=null;function gy(){return fy||(fy=Rr("firebase-messaging-database",1,{upgrade:(e,t)=>{if(0===t)e.createObjectStore(py)}})),fy}async function my(e){const t=_y(e),n=await gy(),r=await n.transaction(py).objectStore(py).get(t);if(r)return r;{const t=await async function(e){if("databases"in indexedDB){const e=(await indexedDB.databases()).map(e=>e.name);if(!e.includes(hy))return null}let t=null;return(await Rr(hy,5,{upgrade:async(n,r,i,s)=>{if(r<2)return;if(!n.objectStoreNames.contains(dy))return;const o=s.objectStore(dy),a=await o.index("fcmSenderId").get(e);if(await o.clear(),a)if(2===r){const e=a;if(!e.auth||!e.p256dh||!e.endpoint)return;t={token:e.fcmToken,createTime:e.createTime??Date.now(),subscriptionOptions:{auth:e.auth,p256dh:e.p256dh,endpoint:e.endpoint,swScope:e.swScope,vapidKey:"string"==typeof e.vapidKey?e.vapidKey:ly(e.vapidKey)}}}else if(3===r){const e=a;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:ly(e.auth),p256dh:ly(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:ly(e.vapidKey)}}}else if(4===r){const e=a;t={token:e.fcmToken,createTime:e.createTime,subscriptionOptions:{auth:ly(e.auth),p256dh:ly(e.p256dh),endpoint:e.endpoint,swScope:e.swScope,vapidKey:ly(e.vapidKey)}}}}})).close(),await Or(hy),await Or("fcm_vapid_details_db"),await Or("undefined"),function(e){if(!e||!e.subscriptionOptions)return!1;const{subscriptionOptions:t}=e;return"number"==typeof e.createTime&&e.createTime>0&&"string"==typeof e.token&&e.token.length>0&&"string"==typeof t.auth&&t.auth.length>0&&"string"==typeof t.p256dh&&t.p256dh.length>0&&"string"==typeof t.endpoint&&t.endpoint.length>0&&"string"==typeof t.swScope&&t.swScope.length>0&&"string"==typeof t.vapidKey&&t.vapidKey.length>0}(t)?t:null}(e.appConfig.senderId);if(t)return await yy(e,t),t}}async function yy(e,t){const n=_y(e),r=(await gy()).transaction(py,"readwrite");return await r.objectStore(py).put(t,n),await r.done,t}function _y({appConfig:e}){return e.appId}const wy=new Qn("messaging","Messaging",{"missing-app-config-values":'Missing App configuration value: "{$valueName}"',"only-available-in-window":"This method is available in a Window context.","only-available-in-sw":"This method is available in a service worker context.","permission-default":"The notification permission was not granted and dismissed instead.","permission-blocked":"The notification permission was not granted and blocked instead.","unsupported-browser":"This browser doesn't support the API's required to use the Firebase SDK.","indexed-db-unsupported":"This browser doesn't support indexedDb.open() (ex. Safari iFrame, Firefox Private Browsing, etc)","failed-service-worker-registration":"We are unable to register the default service worker. {$browserErrorMessage}","token-subscribe-failed":"A problem occurred while subscribing the user to FCM: {$errorInfo}","token-subscribe-no-token":"FCM returned no token when subscribing the user to push.","token-unsubscribe-failed":"A problem occurred while unsubscribing the user from FCM: {$errorInfo}","token-update-failed":"A problem occurred while updating the user from FCM: {$errorInfo}","token-update-no-token":"FCM returned no token when updating the user to push.","use-sw-after-get-token":"The useServiceWorker() method may only be called once and must be called before calling getToken() to ensure your service worker is used.","invalid-sw-registration":"The input to useServiceWorker() must be a ServiceWorkerRegistration.","invalid-bg-handler":"The input to setBackgroundMessageHandler() must be a function.","invalid-vapid-key":"The public VAPID key must be a string.","use-vapid-key-after-get-token":"The usePublicVapidKey() method may only be called once and must be called before calling getToken() to ensure your VAPID key is used."});function vy({projectId:e}){return`https://fcmregistrations.googleapis.com/v1/projects/${e}/registrations`}async function by({appConfig:e,installations:t}){const n=await t.getToken();return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e.apiKey,"x-goog-firebase-installations-auth":`FIS ${n}`})}function Ey({p256dh:e,auth:t,endpoint:n,vapidKey:r}){const i={web:{endpoint:n,auth:t,p256dh:e}};return r!==iy&&(i.web.applicationPubKey=r),i}async function Ty(e){const t=await async function(e,t){const n=await e.pushManager.getSubscription();if(n)return n;return e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:uy(t)})}(e.swRegistration,e.vapidKey),n={vapidKey:e.vapidKey,swScope:e.swRegistration.scope,endpoint:t.endpoint,auth:ly(t.getKey("auth")),p256dh:ly(t.getKey("p256dh"))},r=await my(e.firebaseDependencies);if(r){if(function(e,t){const n=t.vapidKey===e.vapidKey,r=t.endpoint===e.endpoint,i=t.auth===e.auth,s=t.p256dh===e.p256dh;return n&&r&&i&&s}(r.subscriptionOptions,n))return Date.now()>=r.createTime+6048e5?async function(e,t){try{const n=await async function(e,t){const n=await by(e),r=Ey(t.subscriptionOptions),i={method:"PATCH",headers:n,body:JSON.stringify(r)};let s;try{const n=await fetch(`${vy(e.appConfig)}/${t.token}`,i);s=await n.json()}catch(e){throw wy.create("token-update-failed",{errorInfo:e?.toString()})}if(s.error){const e=s.error.message;throw wy.create("token-update-failed",{errorInfo:e})}if(!s.token)throw wy.create("token-update-no-token");return s.token}(e.firebaseDependencies,t),r={...t,token:n,createTime:Date.now()};return await yy(e.firebaseDependencies,r),n}catch(e){throw e}}(e,{token:r.token,createTime:Date.now(),subscriptionOptions:n}):r.token;try{await async function(e,t){const n={method:"DELETE",headers:await by(e)};try{const r=await fetch(`${vy(e.appConfig)}/${t}`,n),i=await r.json();if(i.error){const e=i.error.message;throw wy.create("token-unsubscribe-failed",{errorInfo:e})}}catch(e){throw wy.create("token-unsubscribe-failed",{errorInfo:e?.toString()})}}(e.firebaseDependencies,r.token)}catch(e){}return Iy(e.firebaseDependencies,n)}return Iy(e.firebaseDependencies,n)}async function Iy(e,t){const n=await async function(e,t){const n=await by(e),r=Ey(t),i={method:"POST",headers:n,body:JSON.stringify(r)};let s;try{const t=await fetch(vy(e.appConfig),i);s=await t.json()}catch(e){throw wy.create("token-subscribe-failed",{errorInfo:e?.toString()})}if(s.error){const e=s.error.message;throw wy.create("token-subscribe-failed",{errorInfo:e})}if(!s.token)throw wy.create("token-subscribe-no-token");return s.token}(e,t),r={token:n,createTime:Date.now(),subscriptionOptions:t};return await yy(e,r),r.token}function Sy(e){const t={from:e.from,collapseKey:e.collapse_key,messageId:e.fcmMessageId};return function(e,t){if(!t.notification)return;e.notification={};const n=t.notification.title;n&&(e.notification.title=n);const r=t.notification.body;r&&(e.notification.body=r);const i=t.notification.image;i&&(e.notification.image=i);const s=t.notification.icon;s&&(e.notification.icon=s)}(t,e),function(e,t){if(!t.data)return;e.data=t.data}(t,e),function(e,t){if(!t.fcmOptions&&!t.notification?.click_action)return;e.fcmOptions={};const n=t.fcmOptions?.link??t.notification?.click_action;n&&(e.fcmOptions.link=n);const r=t.fcmOptions?.analytics_label;r&&(e.fcmOptions.analyticsLabel=r)}(t,e),t}function Cy(e){return wy.create("missing-app-config-values",{valueName:e})}class ky{constructor(e,t,n){this.deliveryMetricsExportedToBigQueryEnabled=!1,this.onBackgroundMessageHandler=null,this.onMessageHandler=null,this.logEvents=[],this.isLogServiceStarted=!1;const r=function(e){if(!e||!e.options)throw Cy("App Configuration Object");if(!e.name)throw Cy("App Name");const t=["projectId","apiKey","appId","messagingSenderId"],{options:n}=e;for(const e of t)if(!n[e])throw Cy(e);return{appName:e.name,projectId:n.projectId,apiKey:n.apiKey,appId:n.appId,senderId:n.messagingSenderId}}(e);this.firebaseDependencies={app:e,appConfig:r,installations:t,analyticsProvider:n}}_delete(){return Promise.resolve()}}async function Ay(e){try{e.swRegistration=await navigator.serviceWorker.register("/firebase-messaging-sw.js",{scope:"/firebase-cloud-messaging-push-scope"}),e.swRegistration.update().catch(()=>{}),await async function(e){return new Promise((t,n)=>{const r=setTimeout(()=>n(new Error("Service worker not registered after 10000 ms")),oy),i=e.installing||e.waiting;e.active?(clearTimeout(r),t()):i?i.onstatechange=e=>{"activated"===e.target?.state&&(i.onstatechange=null,clearTimeout(r),t())}:(clearTimeout(r),n(new Error("No incoming service worker found.")))})}(e.swRegistration)}catch(e){throw wy.create("failed-service-worker-registration",{browserErrorMessage:e?.message})}}async function Ry(e,t){if(!navigator)throw wy.create("only-available-in-window");if("default"===Notification.permission&&await Notification.requestPermission(),"granted"!==Notification.permission)throw wy.create("permission-blocked");return await async function(e,t){t?e.vapidKey=t:e.vapidKey||(e.vapidKey=iy)}(e,t?.vapidKey),await async function(e,t){if(t||e.swRegistration||await Ay(e),t||!e.swRegistration){if(!(t instanceof ServiceWorkerRegistration))throw wy.create("invalid-sw-registration");e.swRegistration=t}}(e,t?.serviceWorkerRegistration),Ty(e)}async function Oy(e,t,n){const r=function(e){switch(e){case cy.NOTIFICATION_CLICKED:return"notification_open";case cy.PUSH_RECEIVED:return"notification_foreground";default:throw new Error}}(t);(await e.firebaseDependencies.analyticsProvider.get()).logEvent(r,{message_id:n[sy],message_name:n["google.c.a.c_l"],message_time:n["google.c.a.ts"],message_device_time:Math.floor(Date.now()/1e3)})}async function Py(e,t){const n=t.data;if(!n.isFirebaseMessaging)return;e.onMessageHandler&&n.messageType===cy.PUSH_RECEIVED&&("function"==typeof e.onMessageHandler?e.onMessageHandler(Sy(n)):e.onMessageHandler.next(Sy(n)));const r=n.data;var i;"object"==typeof(i=r)&&i&&sy in i&&"1"===r["google.c.a.e"]&&await Oy(e,n.messageType,r)}const xy="@firebase/messaging",Ny="0.12.23",Dy=e=>{const t=new ky(e.getProvider("app").getImmediate(),e.getProvider("installations-internal").getImmediate(),e.getProvider("analytics-internal"));return navigator.serviceWorker.addEventListener("message",e=>Py(t,e)),t},Ly=e=>{const t=e.getProvider("messaging").getImmediate();return{getToken:e=>Ry(t,e)}};let My;yi(new ar("messaging",Dy,"PUBLIC")),yi(new ar("messaging-internal",Ly,"PRIVATE")),Si(xy,Ny),Si(xy,Ny,"esm2020"),za().useDeviceLanguage(),(async()=>{await async function(){try{await Wn()}catch(e){return!1}return"undefined"!=typeof window&&Kn()&&Gn()&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window&&"fetch"in window&&ServiceWorkerRegistration.prototype.hasOwnProperty("showNotification")&&PushSubscription.prototype.hasOwnProperty("getKey")}()&&(My=Zm(xg))})(),navigator,window;let Uy=!1;window.addEventListener("userEmailChanged",()=>{Uy=!0});const $y=()=>{wn.dispatch(rn())};!function(e,t,n,r){or(e).onAuthStateChanged(t,n,r)}(Lg,e=>{e?(wn.dispatch(tn(!0)),wn.dispatch(rn()),wn.dispatch(dn(e.uid)),wn.dispatch(pn(e.displayName||"John Doe")),wn.dispatch(gn(e.email||"")),wn.dispatch(mn(e.photoURL||"")),wn.dispatch(en(e.displayName||"John Doe")),wn.dispatch(Zt(e.photoURL||"")),Uy&&!e.emailVerified?Po(e).then(()=>{Uy=!1}).catch(e=>{Uy=!1}):e.emailVerified):(wn.dispatch(tn(!1)),wn.dispatch(dn("")),wn.dispatch(pn("John Doe")),wn.dispatch(gn("")),wn.dispatch(mn("")),wn.dispatch(en("John Doe")),wn.dispatch(Zt("")))});const Fy=async()=>function(e){return or(e).signOut()}(Lg),jy=async()=>{ty(My,"create_account")},Vy=async()=>{ty(My,"delete_account")},By=async(e,t)=>{await tf(Lp(Ng,e,t))};var zy=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},qy=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let Hy=class extends se{constructor(){super(),this.source="",this.email="",this.password="",this.newAccount=async(e,t)=>{await Oo(Lg,e,t).then(e=>{Po(e.user).then(()=>{})}).then(()=>{jy()})}}static get styles(){return[In,$g,Fg,Ug,jg,s`
|
|
331
331
|
|
|
332
332
|
:host {
|
|
333
333
|
background-color: white;
|
|
@@ -404,7 +404,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
404
404
|
|
|
405
405
|
</form>
|
|
406
406
|
|
|
407
|
-
`}change(){wn.dispatch(Jt(this.source))}_handleSubmit(e){e.preventDefault()}handleEmail(e){const t=e.target;this.email=t.value}handlePassword(e){const t=e.target;this.password=t.value}signUp(){this.email.length<4?alert("Please enter an email address."):this.password.length<4?alert("Please enter a password."):this.newAccount(this.email,this.password)}};
|
|
407
|
+
`}change(){wn.dispatch(Jt(this.source))}_handleSubmit(e){e.preventDefault()}handleEmail(e){const t=e.target;this.email=t.value}handlePassword(e){const t=e.target;this.password=t.value}signUp(){this.email.length<4?alert("Please enter an email address."):this.password.length<4?alert("Please enter a password."):this.newAccount(this.email,this.password)}};zy([ue({type:String}),qy("design:type",Object)],Hy.prototype,"source",void 0),zy([he(),qy("design:type",Object)],Hy.prototype,"email",void 0),zy([he(),qy("design:type",Object)],Hy.prototype,"password",void 0),Hy=zy([ae("form-signup"),qy("design:paramtypes",[])],Hy);var Ky=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},Wy=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let Gy=class extends(de(wn)(se)){constructor(){super(),this.subscribe=!1,this._name="",this._log=!1,this._sign=!1}stateChanged(e){this._name=e.backend.name,this._log=e.frontend.login,this._sign=e.frontend.registerTwo}static get styles(){return[vn,bn,En,In,Tn]}render(){return V`
|
|
408
408
|
|
|
409
409
|
<section class="service">
|
|
410
410
|
|
|
@@ -446,12 +446,12 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
446
446
|
|
|
447
447
|
</section>
|
|
448
448
|
|
|
449
|
-
`}};
|
|
449
|
+
`}};Ky([ue({type:Boolean,attribute:!0,reflect:!0}),Wy("design:type",Object)],Gy.prototype,"subscribe",void 0),Ky([he(),Wy("design:type",Object)],Gy.prototype,"_name",void 0),Ky([he(),Wy("design:type",Object)],Gy.prototype,"_log",void 0),Ky([he(),Wy("design:type",Object)],Gy.prototype,"_sign",void 0),Gy=Ky([ae("user-login"),Wy("design:paramtypes",[])],Gy),V`<svg viewBox="0 0 24 24" height="34px" width="34px"><path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8z"></path></svg>`,V`<svg viewBox="0 0 24 24"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path></svg>`;const Xy=V`<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></svg>`,Qy=s`
|
|
450
450
|
|
|
451
451
|
.spec[on] { display: grid; }
|
|
452
452
|
.spec { display: none; }
|
|
453
453
|
|
|
454
|
-
`,
|
|
454
|
+
`,Jy=s`
|
|
455
455
|
|
|
456
456
|
:host {
|
|
457
457
|
position: var(--pwa_drawer_position, absolute);
|
|
@@ -525,7 +525,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
525
525
|
animation-timing-function: linear;
|
|
526
526
|
}
|
|
527
527
|
|
|
528
|
-
`,
|
|
528
|
+
`,Yy=s`
|
|
529
529
|
|
|
530
530
|
.exit {
|
|
531
531
|
display: grid;
|
|
@@ -577,7 +577,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
577
577
|
|
|
578
578
|
|
|
579
579
|
|
|
580
|
-
`,
|
|
580
|
+
`,Zy=s`
|
|
581
581
|
|
|
582
582
|
a {
|
|
583
583
|
text-transform: uppercase;
|
|
@@ -587,7 +587,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
587
587
|
text-decoration: none;
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
-
`,
|
|
590
|
+
`,e_=s`
|
|
591
591
|
|
|
592
592
|
.setLog > a {
|
|
593
593
|
padding: 16px;
|
|
@@ -607,7 +607,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
|
|
610
|
-
`;var
|
|
610
|
+
`;var t_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},n_=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let r_=class extends(de(wn)(se)){constructor(){super(),this.url="",this.drawer=!1,this.subscribe=!1,this.name="",this.user=!1,this.signup=!1}stateChanged(e){this.name=e.backend.name,this.drawer=e.frontend.drawer,this.user=e.frontend.login,this.signup=e.frontend.registerOne}firstUpdated(){this.shadowRoot.querySelector(".close").addEventListener("click",()=>{wn.dispatch(nn())}),this.shadowRoot.querySelector(".leave").addEventListener("click",()=>{this.user&&Fy(),wn.dispatch(nn())});this.shadowRoot.querySelectorAll("a").forEach(e=>{e.addEventListener("click",()=>{wn.dispatch(nn())})})}static get styles(){return[Qy,Tn,Jy,Yy,Zy,e_,In]}render(){return V`
|
|
611
611
|
|
|
612
612
|
<!-- Drawer Wrapper -->
|
|
613
613
|
<section
|
|
@@ -617,7 +617,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
617
617
|
<header class="exit">
|
|
618
618
|
<div></div>
|
|
619
619
|
<h3>${!1===this.user?this.signup===this.subscribe?"Login":"Subscribe":this.name}</h3>
|
|
620
|
-
<button class="close">${
|
|
620
|
+
<button class="close">${Xy}</button>
|
|
621
621
|
</header>
|
|
622
622
|
|
|
623
623
|
<!-- Logged-out State -->
|
|
@@ -662,7 +662,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
662
662
|
|
|
663
663
|
</section>
|
|
664
664
|
|
|
665
|
-
`}};
|
|
665
|
+
`}};t_([ue({type:String,reflect:!0}),n_("design:type",Object)],r_.prototype,"url",void 0),t_([ue({type:Boolean,attribute:!0,reflect:!0}),n_("design:type",Object)],r_.prototype,"drawer",void 0),t_([ue({type:Boolean,attribute:!0,reflect:!0}),n_("design:type",Object)],r_.prototype,"subscribe",void 0),t_([he(),n_("design:type",Object)],r_.prototype,"name",void 0),t_([he(),n_("design:type",Object)],r_.prototype,"user",void 0),t_([he(),n_("design:type",Object)],r_.prototype,"signup",void 0),r_=t_([ae("user-drawer"),n_("design:paramtypes",[])],r_);const i_=s`
|
|
666
666
|
|
|
667
667
|
nav {
|
|
668
668
|
overflow: hidden;
|
|
@@ -730,7 +730,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
730
730
|
box-shadow: 0px 6px 6px -6px;
|
|
731
731
|
}
|
|
732
732
|
|
|
733
|
-
`;var
|
|
733
|
+
`;var s_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},o_=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class a_ extends(de(wn)(se)){constructor(){super(),this.photo="",this.emptyArtwork="",this.user="",this.login=!1,this.progress=0,this.error="",this.status="",this.dispatchPhoto=async e=>{Lg.currentUser&&(await xo(Lg.currentUser,{photoURL:e}).catch(e=>{}),wn.dispatch(mn(e)))},this.progress=0,this.error="",this.status=""}stateChanged(e){this.login=e.frontend.login,this.user=e.backend.userId,this.photo=e.backend.photoURL}static get styles(){return[$g,s`
|
|
734
734
|
|
|
735
735
|
:host {
|
|
736
736
|
box-sizing: border-box;
|
|
@@ -816,7 +816,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
816
816
|
</label>
|
|
817
817
|
|
|
818
818
|
<p style="text-align:center;">${this.status}${this.error}</p>
|
|
819
|
-
`}async saveImage(){const e=this.shadowRoot.querySelector(".uploader");if(Lg.currentUser){this.error="",this.status="Uploading...";const r=this.shadowRoot.querySelector("#photoURL");if(!r)return;const i=(t=Dg,n="/pwa-auth/"+this.user+"/"+r.files[0].name,Tg(t=or(t),n)),s={cacheControl:"public,max-age=300",contentType:r.files[0].type},o=Rg(i,r.files[0],s);o.on("state_changed",t=>{switch(this.progress=t.bytesTransferred/t.totalBytes*100,this.status=`Upload is ${Math.round(this.progress)}% done`,t.state){case"paused":this.status="Upload is paused";break;case"running":this.status=`Upload is running (${Math.round(this.progress)}%)`}let n=0;t.totalBytes>0&&(n=t.bytesTransferred/t.totalBytes*100),isFinite(n)?(e.value=n,e.textContent=`${Math.round(n)}%`):(e.value=0,e.textContent="0%")},t=>{this.error=`Upload failed: ${t.message}`,this.status="",e.value=0,e.textContent="Error"},async()=>{await function(e){return bg(e=or(e))}(o.snapshot.ref).then(t=>{(function(e,t){return vg(e=or(e),t)})(i,s).then(()=>{}).catch(e=>{}),Mg&&(xo(Mg,{photoURL:t}).then(()=>{e.value=100,e.textContent="Complete"}),this.status="User profile updated successfully!",this.dispatchPhoto(t))}).catch(()=>{})})}var t,n}}
|
|
819
|
+
`}async saveImage(){const e=this.shadowRoot.querySelector(".uploader");if(Lg.currentUser){this.error="",this.status="Uploading...";const r=this.shadowRoot.querySelector("#photoURL");if(!r)return;const i=(t=Dg,n="/pwa-auth/"+this.user+"/"+r.files[0].name,Tg(t=or(t),n)),s={cacheControl:"public,max-age=300",contentType:r.files[0].type},o=Rg(i,r.files[0],s);o.on("state_changed",t=>{switch(this.progress=t.bytesTransferred/t.totalBytes*100,this.status=`Upload is ${Math.round(this.progress)}% done`,t.state){case"paused":this.status="Upload is paused";break;case"running":this.status=`Upload is running (${Math.round(this.progress)}%)`}let n=0;t.totalBytes>0&&(n=t.bytesTransferred/t.totalBytes*100),isFinite(n)?(e.value=n,e.textContent=`${Math.round(n)}%`):(e.value=0,e.textContent="0%")},t=>{this.error=`Upload failed: ${t.message}`,this.status="",e.value=0,e.textContent="Error"},async()=>{await function(e){return bg(e=or(e))}(o.snapshot.ref).then(t=>{(function(e,t){return vg(e=or(e),t)})(i,s).then(()=>{}).catch(e=>{}),Mg&&(xo(Mg,{photoURL:t}).then(()=>{e.value=100,e.textContent="Complete"}),this.status="User profile updated successfully!",this.dispatchPhoto(t))}).catch(()=>{})})}var t,n}}s_([ue(),o_("design:type",Object)],a_.prototype,"photo",void 0),s_([ue({type:String,reflect:!0}),o_("design:type",Object)],a_.prototype,"emptyArtwork",void 0),s_([he(),o_("design:type",Object)],a_.prototype,"user",void 0),s_([he(),o_("design:type",Boolean)],a_.prototype,"login",void 0),s_([he(),o_("design:type",Number)],a_.prototype,"progress",void 0),s_([he(),o_("design:type",String)],a_.prototype,"error",void 0),s_([he(),o_("design:type",String)],a_.prototype,"status",void 0),customElements.define("contact-photo",a_);var c_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},l_=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class u_ extends(de(wn)(se)){constructor(){super(),this.value="",this.login=!1,this.default=e=>{e.preventDefault()},this.alertProfile=async()=>{Lg.currentUser?await xo(Lg.currentUser,{displayName:this.value}).then(()=>{wn.dispatch(pn(this.value))}).then(()=>{alert("updated name:"+this.value)}):alert("Please Login")}}stateChanged(e){this.login=e.frontend.login,this.value=e.backend.name}static get styles(){return[$g,Fg,Ug,s`
|
|
820
820
|
|
|
821
821
|
:host, form { display: grid; }
|
|
822
822
|
|
|
@@ -846,7 +846,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
846
846
|
|
|
847
847
|
</form>
|
|
848
848
|
|
|
849
|
-
`}handleInput(e){const t=e.target;this.value=t.value}}
|
|
849
|
+
`}handleInput(e){const t=e.target;this.value=t.value}}c_([ue({type:String,reflect:!0}),l_("design:type",Object)],u_.prototype,"value",void 0),c_([he(),l_("design:type",Boolean)],u_.prototype,"login",void 0),customElements.define("input-name",u_);var h_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},d_=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class p_ extends(de(wn)(se)){constructor(){super(),this.email="",this.login=!1,this.mail="",this.default=e=>{e.preventDefault()},this.saveEmail=async()=>{if(Lg.currentUser){let e=this.shadowRoot?.querySelector("#pwa-email");await function(e,t){const n=or(e);return wi(n.auth.app)?Promise.reject(qi(n.auth)):No(n,t,null)}(Lg.currentUser,e.value).catch(e=>{});const t=new CustomEvent("userEmailChanged",{detail:{email:e.value}});window.dispatchEvent(t),alert("Email Updated")}}}stateChanged(e){this.login=e.frontend.login,this.mail=e.backend.email}handleEmail(e){const t=e.target;this.mail=t.value}static get styles(){return[$g,Fg,Ug,s`
|
|
850
850
|
|
|
851
851
|
:host, form { display: grid; }
|
|
852
852
|
|
|
@@ -878,7 +878,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
878
878
|
|
|
879
879
|
</form>
|
|
880
880
|
|
|
881
|
-
`}}
|
|
881
|
+
`}}h_([ue({type:String,reflect:!0}),d_("design:type",Object)],p_.prototype,"email",void 0),h_([he(),d_("design:type",Boolean)],p_.prototype,"login",void 0),h_([he(),d_("design:type",String)],p_.prototype,"mail",void 0),customElements.define("contact-email",p_);var f_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},g_=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class m_ extends(de(wn)(se)){constructor(){super(),this.message="",this.password="",this.login=!1,this.default=e=>{e.preventDefault()},this.updatePass=async e=>{Lg.currentUser?await function(e,t){return No(or(e),null,t)}(Lg.currentUser,e).then(()=>{}).catch(e=>{}):alert("Please Login")}}firstUpdated(){this.shadowRoot.querySelector(".pass").addEventListener("click",()=>{this.alertPassword()})}stateChanged(e){this.login=e.frontend.login}handleInputChange(e){const t=e.target;this.password=t.value}static get styles(){return[$g,Fg,Ug,s`
|
|
882
882
|
|
|
883
883
|
:host{
|
|
884
884
|
display: grid;
|
|
@@ -944,7 +944,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
944
944
|
|
|
945
945
|
</form>
|
|
946
946
|
|
|
947
|
-
`}alertPassword(){this.password?this.password.length<8?this.message="Password must be at least 8 characters long":(this.message="Password entered:",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/.test(this.password)?Lg.currentUser?this.updatePass(this.password):alert("Please Login"):this.message="Password must include letters, numbers, and be 8+ characters"):this.message="Please enter a password"}}
|
|
947
|
+
`}alertPassword(){this.password?this.password.length<8?this.message="Password must be at least 8 characters long":(this.message="Password entered:",/^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$/.test(this.password)?Lg.currentUser?this.updatePass(this.password):alert("Please Login"):this.message="Password must include letters, numbers, and be 8+ characters"):this.message="Please enter a password"}}f_([he(),g_("design:type",String)],m_.prototype,"message",void 0),f_([he(),g_("design:type",String)],m_.prototype,"password",void 0),f_([he(),g_("design:type",Boolean)],m_.prototype,"login",void 0),customElements.define("input-password",m_);var y_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},__=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class w_ extends(de(wn)(se)){constructor(){super(),this.login=!1,this.email="",this.officialDelete=async()=>{if(Lg.currentUser)return Lg.currentUser.delete().then(()=>{}).catch(()=>{});alert("Please Sign-in")}}firstUpdated(){this.shadowRoot.querySelector(".deleteUser").addEventListener("click",()=>{this.alertDelete()})}stateChanged(e){this.login=e.frontend.login,this.email=e.backend.email}static get styles(){return[Ug,s`
|
|
948
948
|
|
|
949
949
|
:host {
|
|
950
950
|
display: grid;
|
|
@@ -963,7 +963,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
963
963
|
class="action-button deleteUser"
|
|
964
964
|
?disabled="${!1===this.login}">Delete</button>
|
|
965
965
|
|
|
966
|
-
`}alertDelete(){Lg.currentUser?this.deleteUser():alert("Please Login")}deleteUser(){1==confirm("Delete Account?")&&this.officialDelete()}}
|
|
966
|
+
`}alertDelete(){Lg.currentUser?this.deleteUser():alert("Please Login")}deleteUser(){1==confirm("Delete Account?")&&this.officialDelete()}}y_([he(),__("design:type",Boolean)],w_.prototype,"login",void 0),y_([he(),__("design:type",String)],w_.prototype,"email",void 0),customElements.define("delete-user",w_);var v_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},b_=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let E_=class extends(de(wn)(se)){constructor(){super(),this.empty="",this.profileTopic="",this.name=""}firstUpdated(){this.querySelectorAll("form").forEach(e=>{e.preventDefault()}),this.shadowRoot.querySelector("button[value=profile]").addEventListener("click",()=>{wn.dispatch(Yt("profile"))}),this.shadowRoot.querySelector("button[value=verification]").addEventListener("click",()=>{wn.dispatch(Yt("verification"))}),this.shadowRoot.querySelector("button[value=password]").addEventListener("click",()=>{wn.dispatch(Yt("password"))}),this.shadowRoot.querySelector("button[value=delete]").addEventListener("click",()=>{wn.dispatch(Yt("delete"))})}stateChanged(e){this.profileTopic=e.frontend.settings,this.name=e.backend.name}static get styles(){return[i_,In,Tn,s`
|
|
967
967
|
|
|
968
968
|
:host {
|
|
969
969
|
display: grid;
|
|
@@ -1083,7 +1083,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
1083
1083
|
</div>
|
|
1084
1084
|
</div>
|
|
1085
1085
|
|
|
1086
|
-
`}};
|
|
1086
|
+
`}};v_([ue({type:String,reflect:!0}),b_("design:type",Object)],E_.prototype,"empty",void 0),v_([he(),b_("design:type",Object)],E_.prototype,"profileTopic",void 0),v_([he(),b_("design:type",Object)],E_.prototype,"name",void 0),E_=v_([ae("user-settings"),b_("design:paramtypes",[])],E_);const T_=s`
|
|
1087
1087
|
|
|
1088
1088
|
.icon, .login {
|
|
1089
1089
|
cursor: pointer;
|
|
@@ -1132,7 +1132,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
1132
1132
|
margin: auto;
|
|
1133
1133
|
}
|
|
1134
1134
|
|
|
1135
|
-
`;var
|
|
1135
|
+
`;var I_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},S_=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let C_=class extends(de(wn)(se)){constructor(){super(),this.subscribe=!1,this.empty="",this._user=!1,this._photoURL=""}firstUpdated(){this.shadowRoot.querySelector(".toggles").addEventListener("click",()=>{wn.dispatch(nn())})}stateChanged(e){this._user=e.frontend.login,this._photoURL=e.backend.photoURL}static get styles(){return[T_,s`:host { border-radius: 8px; }`]}render(){return V`
|
|
1136
1136
|
|
|
1137
1137
|
<!-- two classes: icon / login -->
|
|
1138
1138
|
<button
|
|
@@ -1154,7 +1154,7 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
1154
1154
|
|
|
1155
1155
|
</button>
|
|
1156
1156
|
|
|
1157
|
-
`}};
|
|
1157
|
+
`}};I_([ue({type:Boolean,reflect:!0}),S_("design:type",Object)],C_.prototype,"subscribe",void 0),I_([ue({type:String,reflect:!0}),S_("design:type",Object)],C_.prototype,"empty",void 0),I_([he(),S_("design:type",Object)],C_.prototype,"_user",void 0),I_([he(),S_("design:type",Object)],C_.prototype,"_photoURL",void 0),C_=I_([ae("user-icon"),S_("design:paramtypes",[])],C_);var k_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},A_=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};class R_ extends se{constructor(){super(),this.active=!1}shouldUpdate(){return this.active}}k_([ue({type:Boolean}),A_("design:type",Boolean)],R_.prototype,"active",void 0);var O_=function(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o},P_=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};let x_=class extends R_{constructor(){super(),this.userEmail="",this.restPassword=async()=>{await async function(e,t){const n=Gs(e),r={requestType:"PASSWORD_RESET",email:t,clientType:"CLIENT_TYPE_WEB"};await ro(n,r,"getOobCode",ho)}(Lg,this.userEmail).catch(e=>{})}}firstUpdated(){this.shadowRoot.querySelector(".reset").addEventListener("click",()=>{this.restPassword()})}handleEmail(e){const t=e.target;this.userEmail=t.value}render(){return V`
|
|
1158
1158
|
|
|
1159
1159
|
<form class="resetPass">
|
|
1160
1160
|
|
|
@@ -1174,4 +1174,4 @@ const e=globalThis,t=e.ShadowRoot&&(void 0===e.ShadyCSS||e.ShadyCSS.nativeShadow
|
|
|
1174
1174
|
class ="phoneVerify"
|
|
1175
1175
|
type ="text" />
|
|
1176
1176
|
|
|
1177
|
-
`}};
|
|
1177
|
+
`}};O_([he(),P_("design:type",String)],x_.prototype,"userEmail",void 0),x_=O_([ae("email-reset"),P_("design:paramtypes",[])],x_);export{x_ as EmailReset,r_ as UserDrawer,C_ as UserIcon,Gy as UserLogin,E_ as UserSettings,xg as application,Lg as auth,Ng as db,By as deleteDocument,Pg as firebaseConfig,jy as logAccount,Vy as logAccountDelete,Fy as logOut,$y as pwaDrawerToggle,Dg as storage,Mg as user};
|