pwa-auth 3.7.6 → 3.7.8

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.
Files changed (154) hide show
  1. package/base/api/drawer.d.ts +3 -0
  2. package/base/api/drawer.d.ts.map +1 -1
  3. package/base/api/drawer.js +3 -0
  4. package/base/api/drawer.js.map +1 -1
  5. package/base/api/user.d.ts +2 -0
  6. package/base/api/user.d.ts.map +1 -1
  7. package/base/api/user.js +2 -0
  8. package/base/api/user.js.map +1 -1
  9. package/base/api/verify.d.ts +3 -0
  10. package/base/api/verify.d.ts.map +1 -1
  11. package/base/api/verify.js +7 -0
  12. package/base/api/verify.js.map +1 -1
  13. package/base/deprecated/email-changed.d.ts +1 -0
  14. package/base/deprecated/email-changed.d.ts.map +1 -1
  15. package/base/deprecated/email-changed.js +2 -0
  16. package/base/deprecated/email-changed.js.map +1 -1
  17. package/base/events/emit.d.ts +4 -0
  18. package/base/events/emit.d.ts.map +1 -1
  19. package/base/events/emit.js +5 -0
  20. package/base/events/emit.js.map +1 -1
  21. package/base/events/names.d.ts +15 -0
  22. package/base/events/names.d.ts.map +1 -1
  23. package/base/events/names.js +15 -0
  24. package/base/events/names.js.map +1 -1
  25. package/base/events/types.d.ts +17 -0
  26. package/base/events/types.d.ts.map +1 -1
  27. package/base/export/drawer.js +1 -0
  28. package/base/export/drawer.js.map +1 -1
  29. package/base/export/icon.js +1 -0
  30. package/base/export/icon.js.map +1 -1
  31. package/base/export/login.js +1 -0
  32. package/base/export/login.js.map +1 -1
  33. package/base/export/reset.js +1 -0
  34. package/base/export/reset.js.map +1 -1
  35. package/base/export/settings.js +1 -0
  36. package/base/export/settings.js.map +1 -1
  37. package/base/firebase/attribute.d.ts +1 -0
  38. package/base/firebase/attribute.d.ts.map +1 -1
  39. package/base/firebase/attribute.js +1 -0
  40. package/base/firebase/attribute.js.map +1 -1
  41. package/base/firebase/authentication.d.ts +7 -0
  42. package/base/firebase/authentication.d.ts.map +1 -1
  43. package/base/firebase/authentication.js +7 -0
  44. package/base/firebase/authentication.js.map +1 -1
  45. package/base/firebase/google.d.ts +4 -0
  46. package/base/firebase/google.d.ts.map +1 -1
  47. package/base/firebase/google.js +4 -0
  48. package/base/firebase/google.js.map +1 -1
  49. package/base/firebase/interface.js +26 -0
  50. package/base/firebase/interface.js.map +1 -1
  51. package/base/firebase/message.d.ts +1 -0
  52. package/base/firebase/message.d.ts.map +1 -1
  53. package/base/firebase/message.js +2 -0
  54. package/base/firebase/message.js.map +1 -1
  55. package/base/firebase/password.d.ts +3 -0
  56. package/base/firebase/password.d.ts.map +1 -1
  57. package/base/firebase/password.js +3 -0
  58. package/base/firebase/password.js.map +1 -1
  59. package/base/lazyLoader.d.ts +1 -0
  60. package/base/lazyLoader.d.ts.map +1 -1
  61. package/base/lazyLoader.js +2 -0
  62. package/base/lazyLoader.js.map +1 -1
  63. package/base/redux/session.d.ts +1 -0
  64. package/base/redux/session.d.ts.map +1 -1
  65. package/base/redux/session.js +1 -0
  66. package/base/redux/session.js.map +1 -1
  67. package/base/store.js +1 -0
  68. package/base/store.js.map +1 -1
  69. package/base/webcomponents/css/animation.js +10 -0
  70. package/base/webcomponents/css/animation.js.map +1 -1
  71. package/base/webcomponents/css/tap.js +1 -0
  72. package/base/webcomponents/css/tap.js.map +1 -1
  73. package/base/webcomponents/drawer/drawer.d.ts +10 -0
  74. package/base/webcomponents/drawer/drawer.d.ts.map +1 -1
  75. package/base/webcomponents/drawer/drawer.js +53 -8
  76. package/base/webcomponents/drawer/drawer.js.map +1 -1
  77. package/base/webcomponents/drawer/keys.d.ts +3 -0
  78. package/base/webcomponents/drawer/keys.d.ts.map +1 -1
  79. package/base/webcomponents/drawer/keys.js +4 -0
  80. package/base/webcomponents/drawer/keys.js.map +1 -1
  81. package/base/webcomponents/form/css/notice.d.ts +1 -0
  82. package/base/webcomponents/form/css/notice.d.ts.map +1 -1
  83. package/base/webcomponents/form/css/notice.js +1 -0
  84. package/base/webcomponents/form/css/notice.js.map +1 -1
  85. package/base/webcomponents/form/css/status.d.ts +2 -0
  86. package/base/webcomponents/form/css/status.d.ts.map +1 -1
  87. package/base/webcomponents/form/css/status.js +2 -0
  88. package/base/webcomponents/form/css/status.js.map +1 -1
  89. package/base/webcomponents/form/forgot.d.ts +0 -5
  90. package/base/webcomponents/form/forgot.d.ts.map +1 -1
  91. package/base/webcomponents/form/forgot.js +9 -28
  92. package/base/webcomponents/form/forgot.js.map +1 -1
  93. package/base/webcomponents/form/google-button.d.ts +1 -0
  94. package/base/webcomponents/form/google-button.d.ts.map +1 -1
  95. package/base/webcomponents/form/google-button.js +2 -0
  96. package/base/webcomponents/form/google-button.js.map +1 -1
  97. package/base/webcomponents/form/letters.d.ts +2 -0
  98. package/base/webcomponents/form/letters.d.ts.map +1 -1
  99. package/base/webcomponents/form/letters.js +2 -0
  100. package/base/webcomponents/form/letters.js.map +1 -1
  101. package/base/webcomponents/form/login.d.ts +1 -0
  102. package/base/webcomponents/form/login.d.ts.map +1 -1
  103. package/base/webcomponents/form/login.js +10 -3
  104. package/base/webcomponents/form/login.js.map +1 -1
  105. package/base/webcomponents/form/notice.js +1 -0
  106. package/base/webcomponents/form/notice.js.map +1 -1
  107. package/base/webcomponents/form/reveal.d.ts +1 -0
  108. package/base/webcomponents/form/reveal.d.ts.map +1 -1
  109. package/base/webcomponents/form/reveal.js +1 -0
  110. package/base/webcomponents/form/reveal.js.map +1 -1
  111. package/base/webcomponents/form/signup.d.ts +1 -0
  112. package/base/webcomponents/form/signup.d.ts.map +1 -1
  113. package/base/webcomponents/form/signup.js +10 -0
  114. package/base/webcomponents/form/signup.js.map +1 -1
  115. package/base/webcomponents/form/verified.d.ts +1 -0
  116. package/base/webcomponents/form/verified.d.ts.map +1 -1
  117. package/base/webcomponents/form/verified.js +1 -0
  118. package/base/webcomponents/form/verified.js.map +1 -1
  119. package/base/webcomponents/icon/icon.d.ts +2 -0
  120. package/base/webcomponents/icon/icon.d.ts.map +1 -1
  121. package/base/webcomponents/icon/icon.js +5 -0
  122. package/base/webcomponents/icon/icon.js.map +1 -1
  123. package/base/webcomponents/login/css/auth.js +3 -0
  124. package/base/webcomponents/login/css/auth.js.map +1 -1
  125. package/base/webcomponents/login/page.d.ts +6 -0
  126. package/base/webcomponents/login/page.d.ts.map +1 -1
  127. package/base/webcomponents/login/page.js +21 -6
  128. package/base/webcomponents/login/page.js.map +1 -1
  129. package/base/webcomponents/settings/input/delete.js +2 -0
  130. package/base/webcomponents/settings/input/delete.js.map +1 -1
  131. package/base/webcomponents/settings/input/email.d.ts +1 -0
  132. package/base/webcomponents/settings/input/email.d.ts.map +1 -1
  133. package/base/webcomponents/settings/input/email.js +3 -1
  134. package/base/webcomponents/settings/input/email.js.map +1 -1
  135. package/base/webcomponents/settings/input/name.js +1 -0
  136. package/base/webcomponents/settings/input/name.js.map +1 -1
  137. package/base/webcomponents/settings/input/password.js +2 -0
  138. package/base/webcomponents/settings/input/password.js.map +1 -1
  139. package/base/webcomponents/settings/input/uploader.d.ts +2 -0
  140. package/base/webcomponents/settings/input/uploader.d.ts.map +1 -1
  141. package/base/webcomponents/settings/input/uploader.js +7 -0
  142. package/base/webcomponents/settings/input/uploader.js.map +1 -1
  143. package/base/webcomponents/settings/input/verify.js +5 -0
  144. package/base/webcomponents/settings/input/verify.js.map +1 -1
  145. package/base/webcomponents/settings/settings.d.ts +8 -0
  146. package/base/webcomponents/settings/settings.d.ts.map +1 -1
  147. package/base/webcomponents/settings/settings.js +16 -0
  148. package/base/webcomponents/settings/settings.js.map +1 -1
  149. package/package.json +2 -2
  150. package/source/pwa-auth.js +33 -33
  151. package/base/webcomponents/form/draft.d.ts +0 -5
  152. package/base/webcomponents/form/draft.d.ts.map +0 -1
  153. package/base/webcomponents/form/draft.js +0 -22
  154. package/base/webcomponents/form/draft.js.map +0 -1
@@ -525,7 +525,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
525
525
  ${QE}
526
526
  Continue with Google
527
527
  </button>
528
- `}let YE="";const XE=new Set;function ZE(t){const e=t.trim();e!==YE&&(YE=e,e&&XE.forEach(t=>t()))}function t_(){return YE}var e_=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},n_=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let s_=class extends it{constructor(){super(),this.source="",this.hideGoogle=!1,this.email="",this.password="",this.status="",this.tone="",this.busy=!1,this.resetBusy=!1,this.showPassword=!1,this.signIn=async(t,e)=>{this.busy=!0,this.tone="",this.status="";try{const n=BE((await So(Qy,t,e)).user);n&&cE(wE,{user:n})}catch(t){this.show(lE(t))}finally{this.busy=!1}},this.forgot=async()=>{if(this.busy||this.resetBusy)return;this.readFields();const t=this.email.trim();if(t.length<4)this.show({code:"pwa/missing-email",message:"Enter an email address."});else if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)){this.resetBusy=!0,this.tone="",this.status="";try{await Ao(Qy,t),this.sent(t)}catch(e){"auth/user-not-found"===lE(e).code?this.sent(t):this.show(lE(e))}finally{this.resetBusy=!1}}else this.show({code:"pwa/invalid-email",message:"Enter a valid email address."})}}connectedCallback(){super.connectedCallback(),this.adoptRedirect()}updated(){this.adoptRedirect()}adoptRedirect(){if(!this.classList.contains("opened"))return;const t=pE();t&&this.show(t)}static get styles(){return[_n,VE,jE,UE,$E,JE,zE,i`
528
+ `}var YE=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},XE=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ZE=class extends it{constructor(){super(),this.source="",this.hideGoogle=!1,this.email="",this.password="",this.status="",this.tone="",this.busy=!1,this.resetBusy=!1,this.showPassword=!1,this.signIn=async(t,e)=>{this.busy=!0,this.tone="",this.status="";try{const n=BE((await So(Qy,t,e)).user);n&&cE(wE,{user:n})}catch(t){this.show(lE(t))}finally{this.busy=!1}},this.forgot=async()=>{if(this.busy||this.resetBusy)return;this.readFields();const t=this.email.trim();if(t.length<4)this.show({code:"pwa/missing-email",message:"Enter an email address."});else if(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)){this.resetBusy=!0,this.tone="",this.status="";try{await Ao(Qy,t),this.sent(t)}catch(e){"auth/user-not-found"===lE(e).code?this.sent(t):this.show(lE(e))}finally{this.resetBusy=!1}}else this.show({code:"pwa/invalid-email",message:"Enter a valid email address."})}}connectedCallback(){super.connectedCallback(),this.adoptRedirect()}updated(){this.adoptRedirect()}adoptRedirect(){if(!this.classList.contains("opened"))return;const t=pE();t&&this.show(t)}static get styles(){return[_n,VE,jE,UE,$E,JE,zE,i`
529
529
 
530
530
  :host {
531
531
  background-color: var(--pwa_background, var(--section_background_color, #fff));
@@ -626,7 +626,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
626
626
 
627
627
  </form>
628
628
 
629
- `}change(){Cn.dispatch(un(this.source))}async google(){if(!this.busy&&!this.resetBusy){this.busy=!0,this.tone="",this.status="";try{await CE()}catch(t){this.show(lE(t))}finally{this.busy=!1}}}show(t,e=!0){this.tone=e?"error":"",this.status=HE(t),e&&cE(AE,t)}handleEmail(t){const e=t.target;this.email=e.value,ZE(this.email)}handlePassword(t){const e=t.target;this.password=e.value}readFields(){const t=this.renderRoot.querySelector('input[type="email"]'),e=this.renderRoot.querySelector('input[name="password"]');this.email=t?.value??"",this.password=e?.value??"",ZE(this.email)}_handleSubmit(t){t.preventDefault(),this.login()}async login(){this.busy||(this.readFields(),this.email.length<4?this.show({code:"pwa/missing-email",message:"Enter an email address."}):this.password?await this.signIn(this.email,this.password):this.show({code:"pwa/missing-password",message:"Enter a password."}))}sent(t){this.tone="",this.status="If an account uses that email, a reset link is on its way.",cE(IE,{email:t})}};e_([lt({type:String}),n_("design:type",Object)],s_.prototype,"source",void 0),e_([lt({type:Boolean,attribute:"hide-google",reflect:!0}),n_("design:type",Object)],s_.prototype,"hideGoogle",void 0),e_([ut(),n_("design:type",Object)],s_.prototype,"email",void 0),e_([ut(),n_("design:type",Object)],s_.prototype,"password",void 0),e_([ut(),n_("design:type",Object)],s_.prototype,"status",void 0),e_([ut(),n_("design:type",Object)],s_.prototype,"tone",void 0),e_([ut(),n_("design:type",Object)],s_.prototype,"busy",void 0),e_([ut(),n_("design:type",Object)],s_.prototype,"resetBusy",void 0),e_([ut(),n_("design:type",Object)],s_.prototype,"showPassword",void 0),s_=e_([at("form-login"),n_("design:paramtypes",[])],s_);const r_="@firebase/installations",i_="0.6.24",o_=1e4,a_=`w:${i_}`,B_="FIS_v2",c_=36e5,l_=new jn("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 u_(t){return t instanceof Vn&&t.code.includes("request-failed")}function h_({projectId:t}){return`https://firebaseinstallations.googleapis.com/v1/projects/${t}/installations`}function d_(t){return{token:t.token,requestStatus:2,expiresIn:(e=t.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()};var e}async function p_(t,e){const n=(await e.json()).error;return l_.create("request-failed",{requestName:t,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function f_({apiKey:t}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function C_(t,{refreshToken:e}){const n=f_(t);return n.append("Authorization",function(t){return`${B_} ${t}`}(e)),n}async function g_(t){const e=await t();return e.status>=500&&e.status<600?t():e}function m_(t){return new Promise(e=>{setTimeout(e,t)})}const w_=/^[cdef][\w-]{21}$/;function y_(){try{const t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;const e=function(t){const e=(n=t,btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_"));var n;return e.substr(0,22)}(t);return w_.test(e)?e:""}catch{return""}}function E_(t){return`${t.appName}!${t.appId}`}const __=new Map;function D_(t,e){const n=E_(t);b_(n,e),function(t,e){const n=function(){!v_&&"BroadcastChannel"in self&&(v_=new BroadcastChannel("[Firebase] FID Change"),v_.onmessage=t=>{b_(t.data.key,t.data.fid)});return v_}();n&&n.postMessage({key:t,fid:e});0===__.size&&v_&&(v_.close(),v_=null)}(n,e)}function b_(t,e){const n=__.get(t);if(n)for(const t of n)t(e)}let v_=null;const I_="firebase-installations-store";let T_=null;function O_(){return T_||(T_=Ds("firebase-installations-database",1,{upgrade:(t,e)=>{if(0===e)t.createObjectStore(I_)}})),T_}async function A_(t,e){const n=E_(t),s=(await O_()).transaction(I_,"readwrite"),r=s.objectStore(I_),i=await r.get(n);return await r.put(e,n),await s.done,i&&i.fid===e.fid||D_(t,e.fid),e}async function S_(t){const e=E_(t),n=(await O_()).transaction(I_,"readwrite");await n.objectStore(I_).delete(e),await n.done}async function R_(t,e){const n=E_(t),s=(await O_()).transaction(I_,"readwrite"),r=s.objectStore(I_),i=await r.get(n),o=e(i);return void 0===o?await r.delete(n):await r.put(o,n),await s.done,!o||i&&i.fid===o.fid||D_(t,o.fid),o}async function N_(t){let e;const n=await R_(t.appConfig,n=>{const s=function(t){const e=t||{fid:y_(),registrationStatus:0};return L_(e)}(n),r=function(t,e){if(0===e.registrationStatus){if(!navigator.onLine){return{installationEntry:e,registrationPromise:Promise.reject(l_.create("app-offline"))}}const n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},s=async function(t,e){try{const n=await async function({appConfig:t,heartbeatServiceProvider:e},{fid:n}){const s=h_(t),r=f_(t),i=e.getImmediate({optional:!0});if(i){const t=await i.getHeartbeatsHeader();t&&r.append("x-firebase-client",t)}const o={fid:n,authVersion:B_,appId:t.appId,sdkVersion:a_},a={method:"POST",headers:r,body:JSON.stringify(o)},B=await g_(()=>fetch(s,a));if(B.ok){const t=await B.json();return{fid:t.fid||n,registrationStatus:2,refreshToken:t.refreshToken,authToken:d_(t.authToken)}}throw await p_("Create Installation",B)}(t,e);return A_(t.appConfig,n)}catch(n){throw u_(n)&&409===n.customData.serverCode?await S_(t.appConfig):await A_(t.appConfig,{fid:e.fid,registrationStatus:0}),n}}(t,n);return{installationEntry:n,registrationPromise:s}}return 1===e.registrationStatus?{installationEntry:e,registrationPromise:x_(t)}:{installationEntry:e}}(t,s);return e=r.registrationPromise,r.installationEntry});return""===n.fid?{installationEntry:await e}:{installationEntry:n,registrationPromise:e}}async function x_(t){let e=await k_(t.appConfig);for(;1===e.registrationStatus;)await m_(100),e=await k_(t.appConfig);if(0===e.registrationStatus){const{installationEntry:e,registrationPromise:n}=await N_(t);return n||e}return e}function k_(t){return R_(t,t=>{if(!t)throw l_.create("installation-not-found");return L_(t)})}function L_(t){return 1===(e=t).registrationStatus&&e.registrationTime+o_<Date.now()?{fid:t.fid,registrationStatus:0}:t;var e}async function F_({appConfig:t,heartbeatServiceProvider:e},n){const s=function(t,{fid:e}){return`${h_(t)}/${e}/authTokens:generate`}(t,n),r=C_(t,n),i=e.getImmediate({optional:!0});if(i){const t=await i.getHeartbeatsHeader();t&&r.append("x-firebase-client",t)}const o={installation:{sdkVersion:a_,appId:t.appId}},a={method:"POST",headers:r,body:JSON.stringify(o)},B=await g_(()=>fetch(s,a));if(B.ok){return d_(await B.json())}throw await p_("Generate Auth Token",B)}async function P_(t,e=!1){let n;const s=await R_(t.appConfig,s=>{if(!G_(s))throw l_.create("not-registered");const r=s.authToken;if(!e&&function(t){return 2===t.requestStatus&&!function(t){const e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+c_}(t)}(r))return s;if(1===r.requestStatus)return n=async function(t,e){let n=await M_(t.appConfig);for(;1===n.authToken.requestStatus;)await m_(100),n=await M_(t.appConfig);const s=n.authToken;return 0===s.requestStatus?P_(t,e):s}(t,e),s;{if(!navigator.onLine)throw l_.create("app-offline");const e=function(t){const e={requestStatus:1,requestTime:Date.now()};return{...t,authToken:e}}(s);return n=async function(t,e){try{const n=await F_(t,e),s={...e,authToken:n};return await A_(t.appConfig,s),n}catch(n){if(!u_(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n={...e,authToken:{requestStatus:0}};await A_(t.appConfig,n)}else await S_(t.appConfig);throw n}}(t,e),e}});return n?await n:s.authToken}function M_(t){return R_(t,t=>{if(!G_(t))throw l_.create("not-registered");const e=t.authToken;return 1===(n=e).requestStatus&&n.requestTime+o_<Date.now()?{...t,authToken:{requestStatus:0}}:t;var n})}function G_(t){return void 0!==t&&2===t.registrationStatus}async function H_(t,e=!1){const n=t;await async function(t){const{registrationPromise:e}=await N_(t);e&&await e}(n);return(await P_(n,e)).token}function U_(t){return l_.create("missing-app-config-values",{valueName:t})}const V_="installations",j_=t=>{const e=ur(t.getProvider("app").getImmediate(),V_).getImmediate();return{getId:()=>async function(t){const e=t,{installationEntry:n,registrationPromise:s}=await N_(e);return s?s.catch(console.error):P_(e).catch(console.error),n.fid}(e),getToken:t=>H_(e,t)}};lr(new es(V_,t=>{const e=t.getProvider("app").getImmediate(),n=function(t){if(!t||!t.options)throw U_("App Configuration");if(!t.name)throw U_("App Name");const e=["projectId","apiKey","appId"];for(const n of e)if(!t.options[n])throw U_(n);return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}(e);return{app:e,appConfig:n,heartbeatServiceProvider:ur(e,"heartbeat"),_delete:()=>Promise.resolve()}},"PUBLIC")),lr(new es("installations-internal",j_,"PRIVATE")),mr(r_,i_),mr(r_,i_,"esm2020");const $_="analytics",J_="https://www.googletagmanager.com/gtag/js",q_=new ls("@firebase/analytics"),z_=new jn("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 K_(t){if(!t.startsWith(J_)){const e=z_.create("invalid-gtag-resource",{gtagURL:t});return q_.warn(e.message),""}return t}function Q_(t){return Promise.all(t.map(t=>t.catch(t=>t)))}function W_(t,e){const n=function(t,e){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(t,e)),n}("firebase-js-sdk-policy",{createScriptURL:K_}),s=document.createElement("script"),r=`${J_}?l=${t}&id=${e}`;s.src=n?n?.createScriptURL(r):r,s.async=!0,document.head.appendChild(s)}function Y_(t,e,n,s){return async function(r,...i){try{if("event"===r){const[s,r]=i;await async function(t,e,n,s,r){try{let i=[];if(r&&r.send_to){let t=r.send_to;Array.isArray(t)||(t=[t]);const s=await Q_(n);for(const n of t){const t=s.find(t=>t.measurementId===n),r=t&&e[t.appId];if(!r){i=[];break}i.push(r)}}0===i.length&&(i=Object.values(e)),await Promise.all(i),t("event",s,r||{})}catch(t){q_.error(t)}}(t,e,n,s,r)}else if("config"===r){const[r,o]=i;await async function(t,e,n,s,r,i){const o=s[r];try{if(o)await e[o];else{const t=(await Q_(n)).find(t=>t.measurementId===r);t&&await e[t.appId]}}catch(t){q_.error(t)}t("config",r,i)}(t,e,n,s,r,o)}else if("consent"===r){const[e,n]=i;t("consent",e,n)}else if("get"===r){const[e,n,s]=i;t("get",e,n,s)}else if("set"===r){const[e]=i;t("set",e)}else t(r,...i)}catch(t){q_.error(t)}}}const X_=new class{constructor(t={},e=1e3){this.throttleMetadata=t,this.intervalMillis=e}getThrottleMetadata(t){return this.throttleMetadata[t]}setThrottleMetadata(t,e){this.throttleMetadata[t]=e}deleteThrottleMetadata(t){delete this.throttleMetadata[t]}};function Z_(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}async function tD(t,e=X_,n){const{appId:s,apiKey:r,measurementId:i}=t.options;if(!s)throw z_.create("no-app-id");if(!r){if(i)return{measurementId:i,appId:s};throw z_.create("no-api-key")}const o=e.getThrottleMetadata(s)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new nD;return setTimeout(async()=>{a.abort()},6e4),eD({appId:s,apiKey:r,measurementId:i},o,a,e)}async function eD(t,{throttleEndTimeMillis:e,backoffCount:n},s,r=X_){const{appId:i,measurementId:o}=t;try{await function(t,e){return new Promise((n,s)=>{const r=Math.max(e-Date.now(),0),i=setTimeout(n,r);t.addEventListener(()=>{clearTimeout(i),s(z_.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}(s,e)}catch(t){if(o)return q_.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. [${t?.message}]`),{appId:i,measurementId:o};throw t}try{const e=await async function(t){const{appId:e,apiKey:n}=t,s={method:"GET",headers:Z_(n)},r="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",e),i=await fetch(r,s);if(200!==i.status&&304!==i.status){let t="";try{const e=await i.json();e.error?.message&&(t=e.error.message)}catch(t){}throw z_.create("config-fetch-failed",{httpStatus:i.status,responseMessage:t})}return i.json()}(t);return r.deleteThrottleMetadata(i),e}catch(e){const a=e;if(!function(t){if(!(t instanceof Vn&&t.customData))return!1;const e=Number(t.customData.httpStatus);return 429===e||500===e||503===e||504===e}(a)){if(r.deleteThrottleMetadata(i),o)return q_.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:i,measurementId:o};throw e}const B=503===Number(a?.customData?.httpStatus)?Yn(n,r.intervalMillis,30):Yn(n,r.intervalMillis),c={throttleEndTimeMillis:Date.now()+B,backoffCount:n+1};return r.setThrottleMetadata(i,c),q_.debug(`Calling attemptFetch again in ${B} millis`),eD(t,c,s,r)}}class nD{constructor(){this.listeners=[]}addEventListener(t){this.listeners.push(t)}abort(){this.listeners.forEach(t=>t())}}async function sD(t,e,n,s,r,i,o){const a=tD(t);a.then(e=>{n[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&q_.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${e.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(t=>q_.error(t)),e.push(a);const B=async function(){if(!Gn())return q_.warn(z_.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await Hn()}catch(t){return q_.warn(z_.create("indexeddb-unavailable",{errorInfo:t?.toString()}).message),!1}return!0}().then(t=>t?s.getId():void 0),[c,l]=await Promise.all([a,B]);(function(t){const e=window.document.getElementsByTagName("script");for(const n of Object.values(e))if(n.src&&n.src.includes(J_)&&n.src.includes(t))return n;return null})(i)||W_(i,c.measurementId),r("js",new Date);const u=o?.config??{};return u.origin="firebase",u.update=!0,null!=l&&(u.firebase_id=l),r("config",c.measurementId,u),c.measurementId}class rD{constructor(t){this.app=t}_delete(){return delete iD[this.app.options.appId],Promise.resolve()}}let iD={},oD=[];const aD={};let BD,cD,lD="dataLayer",uD=!1;function hD(t,e,n){!function(){const t=[];if(Pn()&&t.push("This is a browser extension environment."),Un()||t.push("Cookies are not available."),t.length>0){const e=t.map((t,e)=>`(${e+1}) ${t}`).join(" "),n=z_.create("invalid-analytics-context",{errorInfo:e});q_.warn(n.message)}}();const s=t.options.appId;if(!s)throw z_.create("no-app-id");if(!t.options.apiKey){if(!t.options.measurementId)throw z_.create("no-api-key");q_.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 ${t.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=iD[s])throw z_.create("already-exists",{id:s});if(!uD){!function(t){let e=[];Array.isArray(window[t])?e=window[t]:window[t]=e}(lD);const{wrappedGtag:t,gtagCore:e}=function(t,e,n,s,r){let i=function(...t){window[s].push(arguments)};return window[r]&&"function"==typeof window[r]&&(i=window[r]),window[r]=Y_(i,t,e,n),{gtagCore:i,wrappedGtag:window[r]}}(iD,oD,aD,lD,"gtag");cD=t,BD=e,uD=!0}iD[s]=sD(t,oD,aD,e,BD,lD,n);return new rD(t)}function dD(t=gr()){const e=ur(t=Xn(t),$_);return e.isInitialized()?e.getImmediate():function(t,e={}){const n=ur(t,$_);if(n.isInitialized()){const t=n.getImmediate();if($n(e,n.getOptions()))return t;throw z_.create("already-initialized")}const s=n.initialize({options:e});return s}(t)}function pD(t,e,n){t=Xn(t),async function(t,e,n,s){if(s&&s.global){const e={};for(const t of Object.keys(n))e[`user_properties.${t}`]=n[t];return t("set",e),Promise.resolve()}t("config",await e,{update:!0,user_properties:n})}(cD,iD[t.app.options.appId],e,n).catch(t=>q_.error(t))}function fD(t,e,n,s){t=Xn(t),async function(t,e,n,s,r){if(r&&r.global)t("event",n,s);else{const r=await e;t("event",n,{...s,send_to:r})}}(cD,iD[t.app.options.appId],e,n,s).catch(t=>q_.error(t))}const CD="@firebase/analytics",gD="0.10.25";lr(new es($_,(t,{options:e})=>hD(t.getProvider("app").getImmediate(),t.getProvider("installations-internal").getImmediate(),e),"PUBLIC")),lr(new es("analytics-internal",function(t){try{const e=t.getProvider($_).getImmediate();return{logEvent:(t,n,s)=>fD(e,t,n,s),setUserProperties:(t,n)=>pD(e,t,n)}}catch(t){throw z_.create("interop-component-reg-failed",{reason:t})}},"PRIVATE")),mr(CD,gD),mr(CD,gD,"esm2020");let mD,wD=null;function yD(){const t=wD;return wD=null,t}function ED(t){wD=t,cE(AE,t)}let _D=Promise.resolve();const DD=()=>{Cn.dispatch(ln())};sE(()=>{gE(),Ka(qy).useDeviceLanguage(),_D=(async()=>{await async function(){if(Pn())return!1;if(!Un())return!1;if(!Gn())return!1;try{return await Hn()}catch(t){return!1}}()&&(mD=dD(qy))})(),Lo(Qy,t=>{cE(mE,{user:BE(t)}),t?(Cn.dispatch(an(!0)),Cn.dispatch(ln()),Cn.dispatch(hn(t.displayName??"")),Cn.dispatch(dn(t.email||"")),Cn.dispatch(pn(t.photoURL||"")),Cn.dispatch(fn(!0===t.emailVerified))):(Cn.dispatch(an(!1)),Cn.dispatch(hn("")),Cn.dispatch(dn("")),Cn.dispatch(pn("")),Cn.dispatch(fn(!1)))})});const bD=async t=>{const e=Qy.currentUser;if(!e||!e.email)return ED({code:"pwa/signed-out",message:"Sign in first."}),!1;try{const n=ho.credential(e.email,t);return await async function(t,e){return vo(Xn(t),e)}(e,n),!0}catch(t){return ED(lE(t)),!1}},vD=async()=>{if(!nE()){const t={code:"pwa/not-ready",message:"Sign-in is not ready yet."};throw cE(AE,t),new Error(t.message)}try{await function(t){return Xn(t).signOut()}(Qy),cE(yE,{user:null})}catch(t){throw cE(AE,lE(t)),t}},ID=async()=>{await _D,mD&&fD(mD,"create_account")},TD=async()=>{await _D,mD&&fD(mD,"delete_account")},OD=async(t,e)=>{await iw(xp(zy,t,e))};let AD="",SD=!1,RD=!1;function ND(t){if(!t)return AD="",SD=!1,!1;const e=!0===t.emailVerified;return t.uid!==AD?(AD=t.uid,SD=e,!1):!SD&&e?(SD=!0,!0):(SD=e,!1)}function xD(t){Cn.dispatch(fn(!0));const e=BE({...t,emailVerified:!0});e&&cE(RE,{user:e})}async function kD(t){if(!nE())return!1;const e=Qy.currentUser;if(!e)return ND(null),!1;try{await e.reload()}catch(n){return t&&cE(AE,lE(n)),!0===e.emailVerified}return Cn.dispatch(fn(!0===e.emailVerified)),ND(e)&&xD(e),!0===e.emailVerified}function LD(){kD(!1)}function FD(){"visible"===document.visibilityState&&kD(!1)}function PD(t,e){const n={code:t,message:e};throw cE(AE,n),Object.assign(new Error(e),n)}async function MD(){nE()||PD("pwa/not-ready","Sign-in is not ready yet.");const t=Qy.currentUser;if(t||PD("pwa/signed-out","Sign in first."),t.email||PD("pwa/missing-email","Enter an email address."),t.emailVerified)return!1;const e=eE();try{e?await Ro(t,e):await Ro(t)}catch(t){throw cE(AE,lE(t)),t}return cE(SE,{email:t.email}),!0}async function GD(){return kD(!0)}RD||(RD=!0,sE(()=>{Lo(Qy,t=>{t&&ND(t)&&xD(t),t||ND(null)}),"undefined"!=typeof window&&(window.addEventListener("focus",LD),document.addEventListener("visibilitychange",FD))}));const HD=i`
629
+ `}change(){Cn.dispatch(un(this.source))}async google(){if(!this.busy&&!this.resetBusy){this.busy=!0,this.tone="",this.status="";try{await CE()}catch(t){this.show(lE(t))}finally{this.busy=!1}}}show(t,e=!0){this.tone=e?"error":"",this.status=HE(t),e&&cE(AE,t)}handleEmail(t){const e=t.target;this.email=e.value}handlePassword(t){const e=t.target;this.password=e.value}readFields(){const t=this.renderRoot.querySelector('input[type="email"]'),e=this.renderRoot.querySelector('input[name="password"]');this.email=t?.value??"",this.password=e?.value??""}_handleSubmit(t){t.preventDefault(),this.login()}async login(){this.busy||(this.readFields(),this.email.length<4?this.show({code:"pwa/missing-email",message:"Enter an email address."}):this.password?await this.signIn(this.email,this.password):this.show({code:"pwa/missing-password",message:"Enter a password."}))}sent(t){this.tone="",this.status="If an account uses that email, a reset link is on its way.",cE(IE,{email:t})}};YE([lt({type:String}),XE("design:type",Object)],ZE.prototype,"source",void 0),YE([lt({type:Boolean,attribute:"hide-google",reflect:!0}),XE("design:type",Object)],ZE.prototype,"hideGoogle",void 0),YE([ut(),XE("design:type",Object)],ZE.prototype,"email",void 0),YE([ut(),XE("design:type",Object)],ZE.prototype,"password",void 0),YE([ut(),XE("design:type",Object)],ZE.prototype,"status",void 0),YE([ut(),XE("design:type",Object)],ZE.prototype,"tone",void 0),YE([ut(),XE("design:type",Object)],ZE.prototype,"busy",void 0),YE([ut(),XE("design:type",Object)],ZE.prototype,"resetBusy",void 0),YE([ut(),XE("design:type",Object)],ZE.prototype,"showPassword",void 0),ZE=YE([at("form-login"),XE("design:paramtypes",[])],ZE);const t_="@firebase/installations",e_="0.6.24",n_=1e4,s_=`w:${e_}`,r_="FIS_v2",i_=36e5,o_=new jn("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 a_(t){return t instanceof Vn&&t.code.includes("request-failed")}function B_({projectId:t}){return`https://firebaseinstallations.googleapis.com/v1/projects/${t}/installations`}function c_(t){return{token:t.token,requestStatus:2,expiresIn:(e=t.expiresIn,Number(e.replace("s","000"))),creationTime:Date.now()};var e}async function l_(t,e){const n=(await e.json()).error;return o_.create("request-failed",{requestName:t,serverCode:n.code,serverMessage:n.message,serverStatus:n.status})}function u_({apiKey:t}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":t})}function h_(t,{refreshToken:e}){const n=u_(t);return n.append("Authorization",function(t){return`${r_} ${t}`}(e)),n}async function d_(t){const e=await t();return e.status>=500&&e.status<600?t():e}function p_(t){return new Promise(e=>{setTimeout(e,t)})}const f_=/^[cdef][\w-]{21}$/;function C_(){try{const t=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(t),t[0]=112+t[0]%16;const e=function(t){const e=(n=t,btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_"));var n;return e.substr(0,22)}(t);return f_.test(e)?e:""}catch{return""}}function g_(t){return`${t.appName}!${t.appId}`}const m_=new Map;function w_(t,e){const n=g_(t);y_(n,e),function(t,e){const n=function(){!E_&&"BroadcastChannel"in self&&(E_=new BroadcastChannel("[Firebase] FID Change"),E_.onmessage=t=>{y_(t.data.key,t.data.fid)});return E_}();n&&n.postMessage({key:t,fid:e});0===m_.size&&E_&&(E_.close(),E_=null)}(n,e)}function y_(t,e){const n=m_.get(t);if(n)for(const t of n)t(e)}let E_=null;const __="firebase-installations-store";let D_=null;function b_(){return D_||(D_=Ds("firebase-installations-database",1,{upgrade:(t,e)=>{if(0===e)t.createObjectStore(__)}})),D_}async function v_(t,e){const n=g_(t),s=(await b_()).transaction(__,"readwrite"),r=s.objectStore(__),i=await r.get(n);return await r.put(e,n),await s.done,i&&i.fid===e.fid||w_(t,e.fid),e}async function I_(t){const e=g_(t),n=(await b_()).transaction(__,"readwrite");await n.objectStore(__).delete(e),await n.done}async function T_(t,e){const n=g_(t),s=(await b_()).transaction(__,"readwrite"),r=s.objectStore(__),i=await r.get(n),o=e(i);return void 0===o?await r.delete(n):await r.put(o,n),await s.done,!o||i&&i.fid===o.fid||w_(t,o.fid),o}async function O_(t){let e;const n=await T_(t.appConfig,n=>{const s=function(t){const e=t||{fid:C_(),registrationStatus:0};return R_(e)}(n),r=function(t,e){if(0===e.registrationStatus){if(!navigator.onLine){return{installationEntry:e,registrationPromise:Promise.reject(o_.create("app-offline"))}}const n={fid:e.fid,registrationStatus:1,registrationTime:Date.now()},s=async function(t,e){try{const n=await async function({appConfig:t,heartbeatServiceProvider:e},{fid:n}){const s=B_(t),r=u_(t),i=e.getImmediate({optional:!0});if(i){const t=await i.getHeartbeatsHeader();t&&r.append("x-firebase-client",t)}const o={fid:n,authVersion:r_,appId:t.appId,sdkVersion:s_},a={method:"POST",headers:r,body:JSON.stringify(o)},B=await d_(()=>fetch(s,a));if(B.ok){const t=await B.json();return{fid:t.fid||n,registrationStatus:2,refreshToken:t.refreshToken,authToken:c_(t.authToken)}}throw await l_("Create Installation",B)}(t,e);return v_(t.appConfig,n)}catch(n){throw a_(n)&&409===n.customData.serverCode?await I_(t.appConfig):await v_(t.appConfig,{fid:e.fid,registrationStatus:0}),n}}(t,n);return{installationEntry:n,registrationPromise:s}}return 1===e.registrationStatus?{installationEntry:e,registrationPromise:A_(t)}:{installationEntry:e}}(t,s);return e=r.registrationPromise,r.installationEntry});return""===n.fid?{installationEntry:await e}:{installationEntry:n,registrationPromise:e}}async function A_(t){let e=await S_(t.appConfig);for(;1===e.registrationStatus;)await p_(100),e=await S_(t.appConfig);if(0===e.registrationStatus){const{installationEntry:e,registrationPromise:n}=await O_(t);return n||e}return e}function S_(t){return T_(t,t=>{if(!t)throw o_.create("installation-not-found");return R_(t)})}function R_(t){return 1===(e=t).registrationStatus&&e.registrationTime+n_<Date.now()?{fid:t.fid,registrationStatus:0}:t;var e}async function N_({appConfig:t,heartbeatServiceProvider:e},n){const s=function(t,{fid:e}){return`${B_(t)}/${e}/authTokens:generate`}(t,n),r=h_(t,n),i=e.getImmediate({optional:!0});if(i){const t=await i.getHeartbeatsHeader();t&&r.append("x-firebase-client",t)}const o={installation:{sdkVersion:s_,appId:t.appId}},a={method:"POST",headers:r,body:JSON.stringify(o)},B=await d_(()=>fetch(s,a));if(B.ok){return c_(await B.json())}throw await l_("Generate Auth Token",B)}async function x_(t,e=!1){let n;const s=await T_(t.appConfig,s=>{if(!L_(s))throw o_.create("not-registered");const r=s.authToken;if(!e&&function(t){return 2===t.requestStatus&&!function(t){const e=Date.now();return e<t.creationTime||t.creationTime+t.expiresIn<e+i_}(t)}(r))return s;if(1===r.requestStatus)return n=async function(t,e){let n=await k_(t.appConfig);for(;1===n.authToken.requestStatus;)await p_(100),n=await k_(t.appConfig);const s=n.authToken;return 0===s.requestStatus?x_(t,e):s}(t,e),s;{if(!navigator.onLine)throw o_.create("app-offline");const e=function(t){const e={requestStatus:1,requestTime:Date.now()};return{...t,authToken:e}}(s);return n=async function(t,e){try{const n=await N_(t,e),s={...e,authToken:n};return await v_(t.appConfig,s),n}catch(n){if(!a_(n)||401!==n.customData.serverCode&&404!==n.customData.serverCode){const n={...e,authToken:{requestStatus:0}};await v_(t.appConfig,n)}else await I_(t.appConfig);throw n}}(t,e),e}});return n?await n:s.authToken}function k_(t){return T_(t,t=>{if(!L_(t))throw o_.create("not-registered");const e=t.authToken;return 1===(n=e).requestStatus&&n.requestTime+n_<Date.now()?{...t,authToken:{requestStatus:0}}:t;var n})}function L_(t){return void 0!==t&&2===t.registrationStatus}async function F_(t,e=!1){const n=t;await async function(t){const{registrationPromise:e}=await O_(t);e&&await e}(n);return(await x_(n,e)).token}function P_(t){return o_.create("missing-app-config-values",{valueName:t})}const M_="installations",G_=t=>{const e=ur(t.getProvider("app").getImmediate(),M_).getImmediate();return{getId:()=>async function(t){const e=t,{installationEntry:n,registrationPromise:s}=await O_(e);return s?s.catch(console.error):x_(e).catch(console.error),n.fid}(e),getToken:t=>F_(e,t)}};lr(new es(M_,t=>{const e=t.getProvider("app").getImmediate(),n=function(t){if(!t||!t.options)throw P_("App Configuration");if(!t.name)throw P_("App Name");const e=["projectId","apiKey","appId"];for(const n of e)if(!t.options[n])throw P_(n);return{appName:t.name,projectId:t.options.projectId,apiKey:t.options.apiKey,appId:t.options.appId}}(e);return{app:e,appConfig:n,heartbeatServiceProvider:ur(e,"heartbeat"),_delete:()=>Promise.resolve()}},"PUBLIC")),lr(new es("installations-internal",G_,"PRIVATE")),mr(t_,e_),mr(t_,e_,"esm2020");const H_="analytics",U_="https://www.googletagmanager.com/gtag/js",V_=new ls("@firebase/analytics"),j_=new jn("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 $_(t){if(!t.startsWith(U_)){const e=j_.create("invalid-gtag-resource",{gtagURL:t});return V_.warn(e.message),""}return t}function J_(t){return Promise.all(t.map(t=>t.catch(t=>t)))}function q_(t,e){const n=function(t,e){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(t,e)),n}("firebase-js-sdk-policy",{createScriptURL:$_}),s=document.createElement("script"),r=`${U_}?l=${t}&id=${e}`;s.src=n?n?.createScriptURL(r):r,s.async=!0,document.head.appendChild(s)}function z_(t,e,n,s){return async function(r,...i){try{if("event"===r){const[s,r]=i;await async function(t,e,n,s,r){try{let i=[];if(r&&r.send_to){let t=r.send_to;Array.isArray(t)||(t=[t]);const s=await J_(n);for(const n of t){const t=s.find(t=>t.measurementId===n),r=t&&e[t.appId];if(!r){i=[];break}i.push(r)}}0===i.length&&(i=Object.values(e)),await Promise.all(i),t("event",s,r||{})}catch(t){V_.error(t)}}(t,e,n,s,r)}else if("config"===r){const[r,o]=i;await async function(t,e,n,s,r,i){const o=s[r];try{if(o)await e[o];else{const t=(await J_(n)).find(t=>t.measurementId===r);t&&await e[t.appId]}}catch(t){V_.error(t)}t("config",r,i)}(t,e,n,s,r,o)}else if("consent"===r){const[e,n]=i;t("consent",e,n)}else if("get"===r){const[e,n,s]=i;t("get",e,n,s)}else if("set"===r){const[e]=i;t("set",e)}else t(r,...i)}catch(t){V_.error(t)}}}const K_=new class{constructor(t={},e=1e3){this.throttleMetadata=t,this.intervalMillis=e}getThrottleMetadata(t){return this.throttleMetadata[t]}setThrottleMetadata(t,e){this.throttleMetadata[t]=e}deleteThrottleMetadata(t){delete this.throttleMetadata[t]}};function Q_(t){return new Headers({Accept:"application/json","x-goog-api-key":t})}async function W_(t,e=K_,n){const{appId:s,apiKey:r,measurementId:i}=t.options;if(!s)throw j_.create("no-app-id");if(!r){if(i)return{measurementId:i,appId:s};throw j_.create("no-api-key")}const o=e.getThrottleMetadata(s)||{backoffCount:0,throttleEndTimeMillis:Date.now()},a=new X_;return setTimeout(async()=>{a.abort()},6e4),Y_({appId:s,apiKey:r,measurementId:i},o,a,e)}async function Y_(t,{throttleEndTimeMillis:e,backoffCount:n},s,r=K_){const{appId:i,measurementId:o}=t;try{await function(t,e){return new Promise((n,s)=>{const r=Math.max(e-Date.now(),0),i=setTimeout(n,r);t.addEventListener(()=>{clearTimeout(i),s(j_.create("fetch-throttle",{throttleEndTimeMillis:e}))})})}(s,e)}catch(t){if(o)return V_.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. [${t?.message}]`),{appId:i,measurementId:o};throw t}try{const e=await async function(t){const{appId:e,apiKey:n}=t,s={method:"GET",headers:Q_(n)},r="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig".replace("{app-id}",e),i=await fetch(r,s);if(200!==i.status&&304!==i.status){let t="";try{const e=await i.json();e.error?.message&&(t=e.error.message)}catch(t){}throw j_.create("config-fetch-failed",{httpStatus:i.status,responseMessage:t})}return i.json()}(t);return r.deleteThrottleMetadata(i),e}catch(e){const a=e;if(!function(t){if(!(t instanceof Vn&&t.customData))return!1;const e=Number(t.customData.httpStatus);return 429===e||500===e||503===e||504===e}(a)){if(r.deleteThrottleMetadata(i),o)return V_.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:i,measurementId:o};throw e}const B=503===Number(a?.customData?.httpStatus)?Yn(n,r.intervalMillis,30):Yn(n,r.intervalMillis),c={throttleEndTimeMillis:Date.now()+B,backoffCount:n+1};return r.setThrottleMetadata(i,c),V_.debug(`Calling attemptFetch again in ${B} millis`),Y_(t,c,s,r)}}class X_{constructor(){this.listeners=[]}addEventListener(t){this.listeners.push(t)}abort(){this.listeners.forEach(t=>t())}}async function Z_(t,e,n,s,r,i,o){const a=W_(t);a.then(e=>{n[e.measurementId]=e.appId,t.options.measurementId&&e.measurementId!==t.options.measurementId&&V_.warn(`The measurement ID in the local Firebase config (${t.options.measurementId}) does not match the measurement ID fetched from the server (${e.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(t=>V_.error(t)),e.push(a);const B=async function(){if(!Gn())return V_.warn(j_.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;try{await Hn()}catch(t){return V_.warn(j_.create("indexeddb-unavailable",{errorInfo:t?.toString()}).message),!1}return!0}().then(t=>t?s.getId():void 0),[c,l]=await Promise.all([a,B]);(function(t){const e=window.document.getElementsByTagName("script");for(const n of Object.values(e))if(n.src&&n.src.includes(U_)&&n.src.includes(t))return n;return null})(i)||q_(i,c.measurementId),r("js",new Date);const u=o?.config??{};return u.origin="firebase",u.update=!0,null!=l&&(u.firebase_id=l),r("config",c.measurementId,u),c.measurementId}class tD{constructor(t){this.app=t}_delete(){return delete eD[this.app.options.appId],Promise.resolve()}}let eD={},nD=[];const sD={};let rD,iD,oD="dataLayer",aD=!1;function BD(t,e,n){!function(){const t=[];if(Pn()&&t.push("This is a browser extension environment."),Un()||t.push("Cookies are not available."),t.length>0){const e=t.map((t,e)=>`(${e+1}) ${t}`).join(" "),n=j_.create("invalid-analytics-context",{errorInfo:e});V_.warn(n.message)}}();const s=t.options.appId;if(!s)throw j_.create("no-app-id");if(!t.options.apiKey){if(!t.options.measurementId)throw j_.create("no-api-key");V_.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 ${t.options.measurementId} provided in the "measurementId" field in the local Firebase config.`)}if(null!=eD[s])throw j_.create("already-exists",{id:s});if(!aD){!function(t){let e=[];Array.isArray(window[t])?e=window[t]:window[t]=e}(oD);const{wrappedGtag:t,gtagCore:e}=function(t,e,n,s,r){let i=function(...t){window[s].push(arguments)};return window[r]&&"function"==typeof window[r]&&(i=window[r]),window[r]=z_(i,t,e,n),{gtagCore:i,wrappedGtag:window[r]}}(eD,nD,sD,oD,"gtag");iD=t,rD=e,aD=!0}eD[s]=Z_(t,nD,sD,e,rD,oD,n);return new tD(t)}function cD(t=gr()){const e=ur(t=Xn(t),H_);return e.isInitialized()?e.getImmediate():function(t,e={}){const n=ur(t,H_);if(n.isInitialized()){const t=n.getImmediate();if($n(e,n.getOptions()))return t;throw j_.create("already-initialized")}const s=n.initialize({options:e});return s}(t)}function lD(t,e,n){t=Xn(t),async function(t,e,n,s){if(s&&s.global){const e={};for(const t of Object.keys(n))e[`user_properties.${t}`]=n[t];return t("set",e),Promise.resolve()}t("config",await e,{update:!0,user_properties:n})}(iD,eD[t.app.options.appId],e,n).catch(t=>V_.error(t))}function uD(t,e,n,s){t=Xn(t),async function(t,e,n,s,r){if(r&&r.global)t("event",n,s);else{const r=await e;t("event",n,{...s,send_to:r})}}(iD,eD[t.app.options.appId],e,n,s).catch(t=>V_.error(t))}const hD="@firebase/analytics",dD="0.10.25";lr(new es(H_,(t,{options:e})=>BD(t.getProvider("app").getImmediate(),t.getProvider("installations-internal").getImmediate(),e),"PUBLIC")),lr(new es("analytics-internal",function(t){try{const e=t.getProvider(H_).getImmediate();return{logEvent:(t,n,s)=>uD(e,t,n,s),setUserProperties:(t,n)=>lD(e,t,n)}}catch(t){throw j_.create("interop-component-reg-failed",{reason:t})}},"PRIVATE")),mr(hD,dD),mr(hD,dD,"esm2020");let pD,fD=null;function CD(){const t=fD;return fD=null,t}function gD(t){fD=t,cE(AE,t)}let mD=Promise.resolve();const wD=()=>{Cn.dispatch(ln())};sE(()=>{gE(),Ka(qy).useDeviceLanguage(),mD=(async()=>{await async function(){if(Pn())return!1;if(!Un())return!1;if(!Gn())return!1;try{return await Hn()}catch(t){return!1}}()&&(pD=cD(qy))})(),Lo(Qy,t=>{cE(mE,{user:BE(t)}),t?(Cn.dispatch(an(!0)),Cn.dispatch(ln()),Cn.dispatch(hn(t.displayName??"")),Cn.dispatch(dn(t.email||"")),Cn.dispatch(pn(t.photoURL||"")),Cn.dispatch(fn(!0===t.emailVerified))):(Cn.dispatch(an(!1)),Cn.dispatch(hn("")),Cn.dispatch(dn("")),Cn.dispatch(pn("")),Cn.dispatch(fn(!1)))})});const yD=async t=>{const e=Qy.currentUser;if(!e||!e.email)return gD({code:"pwa/signed-out",message:"Sign in first."}),!1;try{const n=ho.credential(e.email,t);return await async function(t,e){return vo(Xn(t),e)}(e,n),!0}catch(t){return gD(lE(t)),!1}},ED=async()=>{if(!nE()){const t={code:"pwa/not-ready",message:"Sign-in is not ready yet."};throw cE(AE,t),new Error(t.message)}try{await function(t){return Xn(t).signOut()}(Qy),cE(yE,{user:null})}catch(t){throw cE(AE,lE(t)),t}},_D=async()=>{await mD,pD&&uD(pD,"create_account")},DD=async()=>{await mD,pD&&uD(pD,"delete_account")},bD=async(t,e)=>{await iw(xp(zy,t,e))};let vD="",ID=!1,TD=!1;function OD(t){if(!t)return vD="",ID=!1,!1;const e=!0===t.emailVerified;return t.uid!==vD?(vD=t.uid,ID=e,!1):!ID&&e?(ID=!0,!0):(ID=e,!1)}function AD(t){Cn.dispatch(fn(!0));const e=BE({...t,emailVerified:!0});e&&cE(RE,{user:e})}async function SD(t){if(!nE())return!1;const e=Qy.currentUser;if(!e)return OD(null),!1;try{await e.reload()}catch(n){return t&&cE(AE,lE(n)),!0===e.emailVerified}return Cn.dispatch(fn(!0===e.emailVerified)),OD(e)&&AD(e),!0===e.emailVerified}function RD(){SD(!1)}function ND(){"visible"===document.visibilityState&&SD(!1)}function xD(t,e){const n={code:t,message:e};throw cE(AE,n),Object.assign(new Error(e),n)}async function kD(){nE()||xD("pwa/not-ready","Sign-in is not ready yet.");const t=Qy.currentUser;if(t||xD("pwa/signed-out","Sign in first."),t.email||xD("pwa/missing-email","Enter an email address."),t.emailVerified)return!1;const e=eE();try{e?await Ro(t,e):await Ro(t)}catch(t){throw cE(AE,lE(t)),t}return cE(SE,{email:t.email}),!0}async function LD(){return SD(!0)}TD||(TD=!0,sE(()=>{Lo(Qy,t=>{t&&OD(t)&&AD(t),t||OD(null)}),"undefined"!=typeof window&&(window.addEventListener("focus",RD),document.addEventListener("visibilitychange",ND))}));const FD=i`
630
630
 
631
631
  .notice {
632
632
  margin: 4px 0 8px;
@@ -643,7 +643,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
643
643
  line-height: 1.45;
644
644
  }
645
645
 
646
- `;let UD="";const VD=new Set;function jD(){return UD}function $D(t){return VD.add(t),()=>{VD.delete(t)}}var JD=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},qD=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let zD=class extends it{constructor(){super(),this.source="",this.hideGoogle=!1,this.email="",this.password="",this.status="",this.tone="",this.busy=!1,this.showPassword=!1,this.notice="",this.newAccount=async(t,e)=>{this.busy=!0,this.tone="",this.status="";try{const n=await async function(t,e,n){if(hr(t.app))return Promise.reject(Mr(t));const s=ji(t),r=Zi(s,{returnSecureToken:!0,email:e,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",yo),i=await r.catch(e=>{throw"auth/password-does-not-meet-requirements"===e.code&&Oo(t),e}),o=await Eo._fromIdTokenResponse(s,"signIn",i);return await s._updateCurrentUser(o.user),o}(Qy,t,e);await ID();const s=BE(n.user);s&&cE(EE,{user:s});try{await MD(),this.notice="Check your inbox for the verification email. You can still sign in.",function(t){UD=t,VD.forEach(t=>t())}(t)}catch(t){this.tone="error",this.status=HE(t)}}catch(t){this.show(lE(t))}finally{this.busy=!1}}}connectedCallback(){super.connectedCallback(),this.adoptRedirect()}updated(){this.adoptRedirect()}adoptRedirect(){if(!this.classList.contains("opened"))return;const t=pE();t&&this.show(t)}static get styles(){return[_n,VE,jE,UE,$E,JE,HD,zE,i`
646
+ `;let PD="";const MD=new Set;function GD(){return PD}function HD(t){return MD.add(t),()=>{MD.delete(t)}}var UD=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},VD=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let jD=class extends it{constructor(){super(),this.source="",this.hideGoogle=!1,this.email="",this.password="",this.status="",this.tone="",this.busy=!1,this.showPassword=!1,this.notice="",this.newAccount=async(t,e)=>{this.busy=!0,this.tone="",this.status="";try{const n=await async function(t,e,n){if(hr(t.app))return Promise.reject(Mr(t));const s=ji(t),r=Zi(s,{returnSecureToken:!0,email:e,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",yo),i=await r.catch(e=>{throw"auth/password-does-not-meet-requirements"===e.code&&Oo(t),e}),o=await Eo._fromIdTokenResponse(s,"signIn",i);return await s._updateCurrentUser(o.user),o}(Qy,t,e);await _D();const s=BE(n.user);s&&cE(EE,{user:s});try{await kD(),this.notice="Check your inbox for the verification email. You can still sign in.",function(t){PD=t,MD.forEach(t=>t())}(t)}catch(t){this.tone="error",this.status=HE(t)}}catch(t){this.show(lE(t))}finally{this.busy=!1}}}connectedCallback(){super.connectedCallback(),this.adoptRedirect()}updated(){this.adoptRedirect()}adoptRedirect(){if(!this.classList.contains("opened"))return;const t=pE();t&&this.show(t)}static get styles(){return[_n,VE,jE,UE,$E,JE,FD,zE,i`
647
647
 
648
648
  :host {
649
649
  background-color: var(--pwa_background, var(--section_background_color, #fff));
@@ -745,7 +745,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
745
745
 
746
746
  </form>
747
747
 
748
- `}change(){Cn.dispatch(un(this.source))}async google(){if(!this.busy){this.busy=!0,this.tone="",this.status="";try{await CE()}catch(t){this.show(lE(t))}finally{this.busy=!1}}}show(t){this.tone="error",this.status=HE(t),cE(AE,t)}readFields(){const t=this.renderRoot.querySelector('input[type="email"]'),e=this.renderRoot.querySelector('input[name="new-password"]');this.email=t?.value??"",this.password=e?.value??""}_handleSubmit(t){t.preventDefault(),this.signUp()}handleEmail(t){const e=t.target;this.email=e.value}handlePassword(t){const e=t.target;this.password=e.value}async signUp(){if(this.busy)return;if(this.readFields(),this.email.length<4)return void this.show({code:"pwa/missing-email",message:"Enter an email address."});const t=ME(this.password);t?this.show(t):await this.newAccount(this.email,this.password)}};function KD(t){if(nE())return;const e=t.getAttribute("firebase-config");if(e)try{iE({config:JSON.parse(e)})}catch(t){cE(AE,lE(t))}}function QD(t,e){const n=t.trim();if(n){return n.split(/\s+/).slice(0,2).map(t=>t.charAt(0)).join("").toUpperCase()}const s=e.trim();return s?s.charAt(0).toUpperCase():""}function WD(t,e){const n=t.trim();if(n)return n;const s=e.trim();return s||"Account"}JD([lt({type:String}),qD("design:type",Object)],zD.prototype,"source",void 0),JD([lt({type:Boolean,attribute:"hide-google",reflect:!0}),qD("design:type",Object)],zD.prototype,"hideGoogle",void 0),JD([ut(),qD("design:type",Object)],zD.prototype,"email",void 0),JD([ut(),qD("design:type",Object)],zD.prototype,"password",void 0),JD([ut(),qD("design:type",Object)],zD.prototype,"status",void 0),JD([ut(),qD("design:type",Object)],zD.prototype,"tone",void 0),JD([ut(),qD("design:type",Object)],zD.prototype,"busy",void 0),JD([ut(),qD("design:type",Object)],zD.prototype,"showPassword",void 0),JD([ut(),qD("design:type",Object)],zD.prototype,"notice",void 0),zD=JD([at("form-signup"),qD("design:paramtypes",[])],zD);var YD=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},XD=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ZD=class extends(wt(Cn)(it)){constructor(){super(),this.subscribe=!1,this.hideGoogle=!1,this._name="",this._email="",this._verified=!1,this._notice="",this._log=!1,this._sign=!1,this.motion=!1,this.clipHeight="auto",this.sheetShift="none",this.rollMotion=!1,this.booted=!1,this.stopNotice=null,this.heldHeight=null,this.columnWidth=0,this.columnObserver=null,this.onClipEnd=t=>{t instanceof TransitionEvent&&t.target===t.currentTarget&&"max-height"===t.propertyName&&this.rest()}}connectedCallback(){KD(this),this.hasAttribute("role")||this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Account"),super.connectedCallback(),this._notice=jD(),this.stopNotice=$D(()=>{this._notice=jD()})}disconnectedCallback(){this.stopNotice?.(),this.stopNotice=null,this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}stateChanged(t){this._name=t.session.name,this._email=t.session.email,this._verified=Boolean(t.session.verified),this._log=t.session.login,this._sign=t.session.registerTwo}willUpdate(t){if(!this.booted)return;if(!t.has("_sign")&&!t.has("_log"))return;t.has("_sign")&&(this.motion=!0);const e=this.clip();e&&(this.heldHeight=Math.ceil(e.getBoundingClientRect().height),this.rollMotion=!1,this.clipHeight=`${this.heldHeight}px`,this.sheetShift="translate3d(0, 0, 0)")}updated(t){const e=!this.booted;if(this.booted=!0,e)return this.watchColumn(),void requestAnimationFrame(()=>{this.motion=!0});if(!t.has("_sign")&&!t.has("_log"))return;const n=this.clip(),s=this.sheet();if(!n||!s||null==this.heldHeight)return;const r=this.heldHeight;this.heldHeight=null;const i=Math.ceil(s.getBoundingClientRect().height);Math.abs(i-r)>1?this.rollBetween(n,s,r,i,i):this.rest()}watchColumn(){"undefined"!=typeof ResizeObserver&&(this.columnObserver=new ResizeObserver(()=>{const t=Math.round(this.getBoundingClientRect().width);if(!t||t===this.columnWidth)return;if(this.columnWidth=t,!this.rollMotion)return;const e=this.clip(),n=this.sheet();if(!e||!n)return;const s=Math.ceil(e.getBoundingClientRect().height),r=Math.ceil(n.getBoundingClientRect().height);this.rollBetween(e,n,s,r,r)}),this.columnObserver.observe(this))}clip(){return this.shadowRoot?.querySelector(".login-clip")??null}sheet(){return this.shadowRoot?.querySelector(".service")??null}reduced(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}rest(){this.rollMotion=!1,this.clipHeight="auto",this.sheetShift="none"}clipStyle(){const t=this.rollMotion&&!this.reduced();return{height:this.clipHeight,maxHeight:"auto"===this.clipHeight?"none":this.clipHeight,transition:t?"height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out":"none"}}sheetStyle(){const t=this.rollMotion&&!this.reduced();return{transform:this.sheetShift,transition:t?"transform var(--pwa_slide, 2s) ease-in-out":"none"}}rollBetween(t,e,n,s,r){const i=n-r,o=s-r,a=t=>`translate3d(0, ${t}px, 0)`;if(this.reduced()||Math.abs(s-n)<=1)return void this.rest();t.style.transition="none",e.style.transition="none",t.style.height=`${Math.max(0,n)}px`,t.style.maxHeight=`${Math.max(0,n)}px`,e.style.transform=a(i),t.offsetHeight,t.style.transition="height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out",e.style.transition="transform var(--pwa_slide, 2s) ease-in-out",t.style.height=`${Math.max(0,s)}px`,t.style.maxHeight=`${Math.max(0,s)}px`,e.style.transform=a(o),this.rollMotion=!0,this.clipHeight=`${Math.max(0,s)}px`,this.sheetShift=a(o)}static get styles(){return[wn,yn,En,_n,gn,zE,HD,i`
748
+ `}change(){Cn.dispatch(un(this.source))}async google(){if(!this.busy){this.busy=!0,this.tone="",this.status="";try{await CE()}catch(t){this.show(lE(t))}finally{this.busy=!1}}}show(t){this.tone="error",this.status=HE(t),cE(AE,t)}readFields(){const t=this.renderRoot.querySelector('input[type="email"]'),e=this.renderRoot.querySelector('input[name="new-password"]');this.email=t?.value??"",this.password=e?.value??""}_handleSubmit(t){t.preventDefault(),this.signUp()}handleEmail(t){const e=t.target;this.email=e.value}handlePassword(t){const e=t.target;this.password=e.value}async signUp(){if(this.busy)return;if(this.readFields(),this.email.length<4)return void this.show({code:"pwa/missing-email",message:"Enter an email address."});const t=ME(this.password);t?this.show(t):await this.newAccount(this.email,this.password)}};function $D(t){if(nE())return;const e=t.getAttribute("firebase-config");if(e)try{iE({config:JSON.parse(e)})}catch(t){cE(AE,lE(t))}}function JD(t,e){const n=t.trim();if(n){return n.split(/\s+/).slice(0,2).map(t=>t.charAt(0)).join("").toUpperCase()}const s=e.trim();return s?s.charAt(0).toUpperCase():""}function qD(t,e){const n=t.trim();if(n)return n;const s=e.trim();return s||"Account"}UD([lt({type:String}),VD("design:type",Object)],jD.prototype,"source",void 0),UD([lt({type:Boolean,attribute:"hide-google",reflect:!0}),VD("design:type",Object)],jD.prototype,"hideGoogle",void 0),UD([ut(),VD("design:type",Object)],jD.prototype,"email",void 0),UD([ut(),VD("design:type",Object)],jD.prototype,"password",void 0),UD([ut(),VD("design:type",Object)],jD.prototype,"status",void 0),UD([ut(),VD("design:type",Object)],jD.prototype,"tone",void 0),UD([ut(),VD("design:type",Object)],jD.prototype,"busy",void 0),UD([ut(),VD("design:type",Object)],jD.prototype,"showPassword",void 0),UD([ut(),VD("design:type",Object)],jD.prototype,"notice",void 0),jD=UD([at("form-signup"),VD("design:paramtypes",[])],jD);var zD=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},KD=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let QD=class extends(wt(Cn)(it)){constructor(){super(),this.subscribe=!1,this.hideGoogle=!1,this._name="",this._email="",this._verified=!1,this._notice="",this._log=!1,this._sign=!1,this.motion=!1,this.clipHeight="auto",this.sheetShift="none",this.rollMotion=!1,this.booted=!1,this.stopNotice=null,this.heldHeight=null,this.columnWidth=0,this.columnObserver=null,this.onClipEnd=t=>{t instanceof TransitionEvent&&t.target===t.currentTarget&&"max-height"===t.propertyName&&this.rest()}}connectedCallback(){$D(this),this.hasAttribute("role")||this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Account"),super.connectedCallback(),this._notice=GD(),this.stopNotice=HD(()=>{this._notice=GD()})}disconnectedCallback(){this.stopNotice?.(),this.stopNotice=null,this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}stateChanged(t){this._name=t.session.name,this._email=t.session.email,this._verified=Boolean(t.session.verified),this._log=t.session.login,this._sign=t.session.registerTwo}willUpdate(t){if(!this.booted)return;if(!t.has("_sign")&&!t.has("_log"))return;t.has("_sign")&&(this.motion=!0);const e=this.clip();e&&(this.heldHeight=Math.ceil(e.getBoundingClientRect().height),this.rollMotion=!1,this.clipHeight=`${this.heldHeight}px`,this.sheetShift="translate3d(0, 0, 0)")}updated(t){const e=!this.booted;if(this.booted=!0,e)return this.watchColumn(),void requestAnimationFrame(()=>{this.motion=!0});if(!t.has("_sign")&&!t.has("_log"))return;const n=this.clip(),s=this.sheet();if(!n||!s||null==this.heldHeight)return;const r=this.heldHeight;this.heldHeight=null;const i=Math.ceil(s.getBoundingClientRect().height);Math.abs(i-r)>1?this.rollBetween(n,s,r,i,i):this.rest()}watchColumn(){"undefined"!=typeof ResizeObserver&&(this.columnObserver=new ResizeObserver(()=>{const t=Math.round(this.getBoundingClientRect().width);if(!t||t===this.columnWidth)return;if(this.columnWidth=t,!this.rollMotion)return;const e=this.clip(),n=this.sheet();if(!e||!n)return;const s=Math.ceil(e.getBoundingClientRect().height),r=Math.ceil(n.getBoundingClientRect().height);this.rollBetween(e,n,s,r,r)}),this.columnObserver.observe(this))}clip(){return this.shadowRoot?.querySelector(".login-clip")??null}sheet(){return this.shadowRoot?.querySelector(".service")??null}reduced(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}rest(){this.rollMotion=!1,this.clipHeight="auto",this.sheetShift="none"}clipStyle(){const t=this.rollMotion&&!this.reduced();return{height:this.clipHeight,maxHeight:"auto"===this.clipHeight?"none":this.clipHeight,transition:t?"height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out":"none"}}sheetStyle(){const t=this.rollMotion&&!this.reduced();return{transform:this.sheetShift,transition:t?"transform var(--pwa_slide, 2s) ease-in-out":"none"}}rollBetween(t,e,n,s,r){const i=n-r,o=s-r,a=t=>`translate3d(0, ${t}px, 0)`;if(this.reduced()||Math.abs(s-n)<=1)return void this.rest();t.style.transition="none",e.style.transition="none",t.style.height=`${Math.max(0,n)}px`,t.style.maxHeight=`${Math.max(0,n)}px`,e.style.transform=a(i),t.offsetHeight,t.style.transition="height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out",e.style.transition="transform var(--pwa_slide, 2s) ease-in-out",t.style.height=`${Math.max(0,s)}px`,t.style.maxHeight=`${Math.max(0,s)}px`,e.style.transform=a(o),this.rollMotion=!0,this.clipHeight=`${Math.max(0,s)}px`,this.sheetShift=a(o)}static get styles(){return[wn,yn,En,_n,gn,zE,FD,i`
749
749
  /* Required - this card's roll only. Block, so the sheet is not stretched to the clip. */
750
750
  .login-clip {
751
751
  display: block;
@@ -766,7 +766,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
766
766
  <section class="service" part="panel" style=${mt(this.sheetStyle())}>
767
767
 
768
768
  <div part="header">
769
- <h2 part="title">${this._log?WD(this._name,this._email):this._sign===this.subscribe?"Login":"Subscribe"}</h2>
769
+ <h2 part="title">${this._log?qD(this._name,this._email):this._sign===this.subscribe?"Login":"Subscribe"}</h2>
770
770
  </div>
771
771
 
772
772
  <!-- Logged-out State -->
@@ -816,15 +816,15 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
816
816
  </section>
817
817
  </div>
818
818
 
819
- `}};YD([lt({type:Boolean,attribute:!0,reflect:!0}),XD("design:type",Object)],ZD.prototype,"subscribe",void 0),YD([lt({type:Boolean,attribute:"hide-google",reflect:!0}),XD("design:type",Object)],ZD.prototype,"hideGoogle",void 0),YD([ut(),XD("design:type",Object)],ZD.prototype,"_name",void 0),YD([ut(),XD("design:type",Object)],ZD.prototype,"_email",void 0),YD([ut(),XD("design:type",Object)],ZD.prototype,"_verified",void 0),YD([ut(),XD("design:type",Object)],ZD.prototype,"_notice",void 0),YD([ut(),XD("design:type",Object)],ZD.prototype,"_log",void 0),YD([ut(),XD("design:type",Object)],ZD.prototype,"_sign",void 0),YD([ut(),XD("design:type",Object)],ZD.prototype,"motion",void 0),YD([ut(),XD("design:type",Object)],ZD.prototype,"clipHeight",void 0),YD([ut(),XD("design:type",Object)],ZD.prototype,"sheetShift",void 0),YD([ut(),XD("design:type",Object)],ZD.prototype,"rollMotion",void 0),ZD=YD([at("user-login"),XD("design:paramtypes",[])],ZD);const tb=U`<svg viewBox="0 0 24 24" aria-hidden="true" fill="none">
819
+ `}};zD([lt({type:Boolean,attribute:!0,reflect:!0}),KD("design:type",Object)],QD.prototype,"subscribe",void 0),zD([lt({type:Boolean,attribute:"hide-google",reflect:!0}),KD("design:type",Object)],QD.prototype,"hideGoogle",void 0),zD([ut(),KD("design:type",Object)],QD.prototype,"_name",void 0),zD([ut(),KD("design:type",Object)],QD.prototype,"_email",void 0),zD([ut(),KD("design:type",Object)],QD.prototype,"_verified",void 0),zD([ut(),KD("design:type",Object)],QD.prototype,"_notice",void 0),zD([ut(),KD("design:type",Object)],QD.prototype,"_log",void 0),zD([ut(),KD("design:type",Object)],QD.prototype,"_sign",void 0),zD([ut(),KD("design:type",Object)],QD.prototype,"motion",void 0),zD([ut(),KD("design:type",Object)],QD.prototype,"clipHeight",void 0),zD([ut(),KD("design:type",Object)],QD.prototype,"sheetShift",void 0),zD([ut(),KD("design:type",Object)],QD.prototype,"rollMotion",void 0),QD=zD([at("user-login"),KD("design:paramtypes",[])],QD);const WD=U`<svg viewBox="0 0 24 24" aria-hidden="true" fill="none">
820
820
  <line x1="7" y1="7" x2="17" y2="17" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line>
821
821
  <line x1="17" y1="7" x2="7" y2="17" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line>
822
- </svg>`,eb=i`
822
+ </svg>`,YD=i`
823
823
 
824
824
  .spec[on] { display: grid; }
825
825
  .spec { display: none; }
826
826
 
827
- `,nb=i`
827
+ `,XD=i`
828
828
 
829
829
  :host {
830
830
  /* Required - stay where the tag is. Height 0 so a closed drawer takes no space. */
@@ -875,7 +875,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
875
875
  padding-top: env(safe-area-inset-top);
876
876
  }
877
877
 
878
- `,sb=i`
878
+ `,ZD=i`
879
879
 
880
880
  .exit {
881
881
  display: grid;
@@ -951,7 +951,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
951
951
 
952
952
 
953
953
 
954
- `,rb=i`
954
+ `,tb=i`
955
955
 
956
956
  a {
957
957
  font-size: 0.95rem;
@@ -960,7 +960,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
960
960
  text-decoration: none;
961
961
  }
962
962
 
963
- `,ib=i`
963
+ `,eb=i`
964
964
 
965
965
  .setLog > a,
966
966
  .setLog > button.settings {
@@ -1004,13 +1004,13 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1004
1004
  }
1005
1005
 
1006
1006
 
1007
- `;function ob(t){const e=[],n=t=>{t.querySelectorAll("button, a[href], input, select, textarea").forEach(t=>{t.hasAttribute("disabled")||t.tabIndex<0||function(t){let e=t;for(;e;){if(e instanceof HTMLElement){if(e.classList.contains("closed"))return!0;if(e.classList.contains("spec")&&!e.hasAttribute("on"))return!0}if(e instanceof Element&&e.assignedSlot&&e.assignedSlot!==e){e=e.assignedSlot;continue}if(e.parentElement){e=e.parentElement;continue}const t=e.getRootNode();if(!(t instanceof ShadowRoot))break;e=t.host}return!1}(t)||e.push(t)}),t.querySelectorAll("*").forEach(t=>{t.shadowRoot&&n(t.shadowRoot)})};return t.shadowRoot&&n(t.shadowRoot),n(t),e.filter((t,n)=>e.indexOf(t)===n)}function ab(){let t=document.activeElement;for(;t?.shadowRoot?.activeElement instanceof HTMLElement;)t=t.shadowRoot.activeElement;return t}const Bb=U`
1007
+ `;function nb(t){const e=[],n=t=>{t.querySelectorAll("button, a[href], input, select, textarea").forEach(t=>{t.hasAttribute("disabled")||t.tabIndex<0||function(t){let e=t;for(;e;){if(e instanceof HTMLElement){if(e.classList.contains("closed"))return!0;if(e.classList.contains("spec")&&!e.hasAttribute("on"))return!0}if(e instanceof Element&&e.assignedSlot&&e.assignedSlot!==e){e=e.assignedSlot;continue}if(e.parentElement){e=e.parentElement;continue}const t=e.getRootNode();if(!(t instanceof ShadowRoot))break;e=t.host}return!1}(t)||e.push(t)}),t.querySelectorAll("*").forEach(t=>{t.shadowRoot&&n(t.shadowRoot)})};return t.shadowRoot&&n(t.shadowRoot),n(t),e.filter((t,n)=>e.indexOf(t)===n)}function sb(){let t=document.activeElement;for(;t?.shadowRoot?.activeElement instanceof HTMLElement;)t=t.shadowRoot.activeElement;return t}const rb=U`
1008
1008
  <span class="verified" part="verified" role="img" aria-label="Email verified">
1009
1009
  <svg viewBox="0 0 24 24" aria-hidden="true">
1010
1010
  <path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path>
1011
1011
  </svg>
1012
1012
  </span>
1013
- `,cb=i`
1013
+ `,ib=i`
1014
1014
 
1015
1015
  .verified {
1016
1016
  display: inline-grid;
@@ -1045,7 +1045,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1045
1045
  min-width: 0;
1046
1046
  }
1047
1047
 
1048
- `;var lb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},ub=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class hb extends(wt(Cn)(it)){constructor(){super(),this.login=!1,this.verified=!1,this.email="",this.status="",this.tone="",this.busy=!1,this.cooldown=0,this.timer=0,this.resend=async t=>{if(t.preventDefault(),!(this.busy||this.cooldown>0||this.verified)){this.busy=!0,this.tone="",this.status="";try{await MD()&&this.showSent()}catch(t){this.showFirebase(t)}finally{this.busy=!1}}}}disconnectedCallback(){this.clearWait(),super.disconnectedCallback()}stateChanged(t){this.login=Boolean(t.session.login),this.verified=Boolean(t.session.verified),this.email=t.session.email??"",this.hidden=!this.login,this.verified&&this.clearWait()}static get styles(){return[UE,zE,cb,i`
1048
+ `;var ob=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},ab=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class Bb extends(wt(Cn)(it)){constructor(){super(),this.login=!1,this.verified=!1,this.email="",this.status="",this.tone="",this.busy=!1,this.cooldown=0,this.timer=0,this.resend=async t=>{if(t.preventDefault(),!(this.busy||this.cooldown>0||this.verified)){this.busy=!0,this.tone="",this.status="";try{await kD()&&this.showSent()}catch(t){this.showFirebase(t)}finally{this.busy=!1}}}}disconnectedCallback(){this.clearWait(),super.disconnectedCallback()}stateChanged(t){this.login=Boolean(t.session.login),this.verified=Boolean(t.session.verified),this.email=t.session.email??"",this.hidden=!this.login,this.verified&&this.clearWait()}static get styles(){return[UE,zE,ib,i`
1049
1049
 
1050
1050
  :host {
1051
1051
  display: block;
@@ -1143,7 +1143,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1143
1143
  <div class="notice ok" part="notice">
1144
1144
  <p class="row">
1145
1145
  <span class="mail">${this.email}</span>
1146
- ${Bb}
1146
+ ${rb}
1147
1147
  </p>
1148
1148
  </div>
1149
1149
  `;return U`
@@ -1178,7 +1178,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1178
1178
  </form>
1179
1179
 
1180
1180
  </div>
1181
- `}showSent(){this.tone="",this.status="Check your inbox for the verification email.",this.cooldown=45,this.armCooldown(),this.updateComplete.then(()=>{this.focusStatus()})}showFirebase(t){this.tone="error",this.status=HE(t),this.updateComplete.then(()=>{this.focusStatus()})}focusStatus(){const t=this.renderRoot.querySelector("#pwa-verify-status");t?.focus()}clearWait(){window.clearInterval(this.timer),this.timer=0,this.cooldown=0}armCooldown(){window.clearInterval(this.timer),this.timer=window.setInterval(()=>{if(this.cooldown<=1)return this.cooldown=0,window.clearInterval(this.timer),void(this.timer=0);this.cooldown-=1},1e3)}}lb([ut(),ub("design:type",Object)],hb.prototype,"login",void 0),lb([ut(),ub("design:type",Object)],hb.prototype,"verified",void 0),lb([ut(),ub("design:type",Object)],hb.prototype,"email",void 0),lb([ut(),ub("design:type",Object)],hb.prototype,"status",void 0),lb([ut(),ub("design:type",Object)],hb.prototype,"tone",void 0),lb([ut(),ub("design:type",Object)],hb.prototype,"busy",void 0),lb([ut(),ub("design:type",Object)],hb.prototype,"cooldown",void 0),customElements.define("email-verify",hb);var db=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},pb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let fb=class extends(wt(Cn)(it)){constructor(){super(),this.url="",this.drawer=!1,this.subscribe=!1,this.hideGoogle=!1,this.name="",this.email="",this.verified=!1,this.notice="",this.user=!1,this.sheetSigned=!1,this.holdSheet=!1,this.openSheetPx=0,this.liveName="",this.liveEmail="",this.liveVerified=!1,this.signup=!1,this.sliding=!1,this.motion=!1,this.clipHeight="0px",this.sheetShift="translate3d(0, -100%, 0)",this.rollMotion=!1,this.booted=!1,this.wasOpen=!1,this.sawOpen=!1,this.returnFocus=null,this.stopNotice=null,this.heldHeight=null,this.columnWidth=0,this.columnObserver=null,this.onClipEnd=t=>{if(!(t instanceof TransitionEvent))return;if(t.target!==t.currentTarget)return;if("max-height"!==t.propertyName)return;const e=t.currentTarget;e instanceof HTMLElement&&(this.drawer?this.restOpen():e.getBoundingClientRect().height>1||(this.sliding=!1,this.restShut(),this.releaseSheet()))},this.onKey=t=>{if(!this.drawer)return;if("Escape"===t.key)return t.preventDefault(),void Cn.dispatch(ln());if("Tab"!==t.key)return;const e=ob(this);if(!e.length)return;const n=e[0],s=e[e.length-1],r=ab(),i=!!r&&e.includes(r);t.shiftKey?i&&r!==n||(t.preventDefault(),s.focus({preventScroll:!0})):i&&r!==s||(t.preventDefault(),n.focus({preventScroll:!0}))},this.onLightClick=t=>{if(t.defaultPrevented)return;const e=t.target;if(!(e instanceof Element))return;const n=e.closest("a, button");n instanceof HTMLElement&&this.contains(n)&&(this.shadowRoot?.contains(n)||Cn.dispatch(ln()))},this.onSettings=t=>{const e=this.destination();if(!this.dispatchEvent(new CustomEvent(OE,{bubbles:!0,composed:!0,cancelable:!0,detail:{url:e}})))return void t.preventDefault();if(Cn.dispatch(ln()),e)return;t.preventDefault();const n=document.querySelector("user-settings");n instanceof HTMLElement&&n.scrollIntoView({block:"nearest"})}}connectedCallback(){KD(this),this.id||(this.id="pwa-user-drawer"),super.connectedCallback(),this.addEventListener("keydown",this.onKey),this.addEventListener("click",this.onLightClick),this.notice=jD(),this.stopNotice=$D(()=>{this.notice=jD()})}disconnectedCallback(){this.removeEventListener("keydown",this.onKey),this.removeEventListener("click",this.onLightClick),this.stopNotice?.(),this.stopNotice=null,this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}stateChanged(t){const e=t.session.drawer,n=this.drawer,s=!0===this.user;this.liveName=t.session.name,this.liveEmail=t.session.email,this.liveVerified=Boolean(t.session.verified),e?this.sliding=!0:this.reduced()&&(this.sliding=!1),this.drawer=e,this.user=t.session.login,this.signup=t.session.registerOne,this.paintAccount(s,n);(this.sawOpen?e!==this.wasOpen:e)&&function(t,e,n){t.dispatchEvent(new CustomEvent(e,{...aE,detail:n}))}(this,TE,{open:e}),this.wasOpen=e,this.sawOpen=!0}paintAccount(t,e){if(!0===this.user)return this.holdSheet=!1,this.name=this.liveName,this.email=this.liveEmail,this.verified=this.liveVerified,void(this.sheetSigned=!0);if(t&&e){const t=this.sheet(),e=t?Math.ceil(t.getBoundingClientRect().height):0;return e>1&&(this.openSheetPx=e),this.holdSheet=!0,void(this.sheetSigned=!0)}this.holdSheet||(this.name=this.liveName,this.email=this.liveEmail,this.verified=this.liveVerified,this.sheetSigned=!1)}releaseSheet(){this.holdSheet&&(this.holdSheet=!1,this.name=this.liveName,this.email=this.liveEmail,this.verified=this.liveVerified,this.sheetSigned=!0===this.user)}willUpdate(t){if(!this.booted)return void(this.drawer&&this.restOpen());if(t.has("signup")&&(this.motion=!0),t.has("drawer")||!t.has("signup")||!this.drawer)return;const e=this.clip();e&&(this.heldHeight=Math.ceil(e.getBoundingClientRect().height),this.rollMotion=!1,this.clipHeight=`${this.heldHeight}px`,this.sheetShift="translate3d(0, 0, 0)")}updated(t){const e=!this.booted;if(this.booted=!0,!e&&t.has("drawer"))this.heldHeight=null,this.drawer?this.unroll():this.rollUp();else if(!e&&null!=this.heldHeight&&this.drawer){const t=this.heldHeight;this.heldHeight=null;const e=this.clip(),n=this.sheet();if(e&&n){const s=Math.ceil(n.getBoundingClientRect().height);Math.abs(s-t)>1?this.rollBetween(e,n,t,s,s):this.restOpen()}}if(e&&requestAnimationFrame(()=>{this.motion=!0}),!t.has("drawer"))return;if(this.drawer){const t=ab();return this.returnFocus=t&&!this.contains(t)?t:this.returnFocus,this.shadowRoot?.querySelector(".close")?.focus({preventScroll:!0}),void kD(!1)}const n=this.returnFocus??this.toggleButton();n?.focus({preventScroll:!0}),this.returnFocus=null}clip(){return this.shadowRoot?.querySelector(".drawer-clip")??null}sheet(){return this.shadowRoot?.querySelector(".userDrawer")??null}toggleButton(){const t=document.querySelector("user-icon"),e=t?.shadowRoot?.querySelector("button");return e instanceof HTMLElement?e:null}reduced(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}restShut(){this.rollMotion=!1,this.clipHeight="0px",this.sheetShift="translate3d(0, -100%, 0)";const t=this.sheet();t&&(t.style.minHeight="")}restOpen(){this.rollMotion=!1,this.clipHeight="auto",this.sheetShift="none"}clipStyle(){const t=this.rollMotion&&!this.reduced();return{height:this.clipHeight,maxHeight:"auto"===this.clipHeight?"none":this.clipHeight,transition:t?"height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out":"none"}}sheetStyle(){const t=this.rollMotion&&!this.reduced();return{transform:this.sheetShift,transition:t?"transform var(--pwa_slide, 2s) ease-in-out":"none"}}unroll(){const t=this.clip(),e=this.sheet();if(!t||!e)return;this.scrollTop=0,this.placeAnchor();const n=this.sheetPx(t,e),s=Math.ceil(t.getBoundingClientRect().height);this.rollBetween(t,e,s,n,n)}rollUp(){const t=this.clip(),e=this.sheet();if(!t||!e)return;this.placeAnchor();let n=Math.ceil(e.getBoundingClientRect().height),s=Math.ceil(t.getBoundingClientRect().height);this.holdSheet&&this.openSheetPx>1&&(s=this.openSheetPx,n=this.openSheetPx,e.style.minHeight=`${this.openSheetPx}px`),this.rollBetween(t,e,s,0,n),this.reduced()&&(this.sliding=!1)}sheetPx(t,e){const n=t.style.transition,s=t.style.maxHeight,r=t.style.height;t.style.transition="none",t.style.maxHeight="none",t.style.height="auto";const i=Math.ceil(e.getBoundingClientRect().height);return t.style.height=r,t.style.maxHeight=s,t.style.transition=n,i}rollBetween(t,e,n,s,r){const i=n-r,o=s-r,a=t=>`translate3d(0, ${t}px, 0)`;if(this.reduced()||Math.abs(s-n)<=1)return void(0===s?(this.restShut(),this.releaseSheet()):this.restOpen());t.style.transition="none",e.style.transition="none",t.style.height=`${Math.max(0,n)}px`,t.style.maxHeight=`${Math.max(0,n)}px`,e.style.transform=a(i),t.offsetHeight,t.style.transition="height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out",e.style.transition="transform var(--pwa_slide, 2s) ease-in-out",t.style.height=`${Math.max(0,s)}px`,t.style.maxHeight=`${Math.max(0,s)}px`,e.style.transform=a(o),this.rollMotion=!0,this.clipHeight=`${Math.max(0,s)}px`,this.sheetShift=a(o)}firstUpdated(){this.shadowRoot.querySelector(".close").addEventListener("click",()=>{Cn.dispatch(ln())}),this.shadowRoot.querySelector(".leave").addEventListener("click",async()=>{if(this.user)try{await vD()}catch{return}Cn.dispatch(ln())});this.shadowRoot.querySelectorAll("a").forEach(t=>{t.addEventListener("click",()=>{Cn.dispatch(ln())})}),this.watchColumn()}placeAnchor(){const t=getComputedStyle(this).position;if("fixed"===t||"absolute"===t)return void(this.style.top&&(this.style.top=""));const e=this.parentElement;if(!e)return;const n=this.previousElementSibling,s=n?n.getBoundingClientRect().bottom:e.getBoundingClientRect().top+(parseFloat(getComputedStyle(e).paddingTop)||0),r=parseFloat(this.style.top)||0,i=s-(this.getBoundingClientRect().top-r);Math.abs(i-r)<=.5||(this.style.top=Math.abs(i)<=.5?"":`${i}px`)}watchColumn(){if("undefined"==typeof ResizeObserver)return;this.columnObserver=new ResizeObserver(()=>{this.placeAnchor();const t=Math.round(this.getBoundingClientRect().width);t&&t!==this.columnWidth&&(this.columnWidth=t,this.onColumnResize())}),this.columnObserver.observe(this);const t=this.previousElementSibling;t&&this.columnObserver.observe(t),this.placeAnchor()}onColumnResize(){if(!this.rollMotion)return;const t=this.clip(),e=this.sheet();if(!t||!e)return;const n=Math.ceil(t.getBoundingClientRect().height),s=this.sheetPx(t,e);this.rollBetween(t,e,n,this.drawer?s:0,s)}static get styles(){return[eb,gn,mn,nb,sb,rb,ib,_n,zE,HD,cb,i`
1181
+ `}showSent(){this.tone="",this.status="Check your inbox for the verification email.",this.cooldown=45,this.armCooldown(),this.updateComplete.then(()=>{this.focusStatus()})}showFirebase(t){this.tone="error",this.status=HE(t),this.updateComplete.then(()=>{this.focusStatus()})}focusStatus(){const t=this.renderRoot.querySelector("#pwa-verify-status");t?.focus()}clearWait(){window.clearInterval(this.timer),this.timer=0,this.cooldown=0}armCooldown(){window.clearInterval(this.timer),this.timer=window.setInterval(()=>{if(this.cooldown<=1)return this.cooldown=0,window.clearInterval(this.timer),void(this.timer=0);this.cooldown-=1},1e3)}}ob([ut(),ab("design:type",Object)],Bb.prototype,"login",void 0),ob([ut(),ab("design:type",Object)],Bb.prototype,"verified",void 0),ob([ut(),ab("design:type",Object)],Bb.prototype,"email",void 0),ob([ut(),ab("design:type",Object)],Bb.prototype,"status",void 0),ob([ut(),ab("design:type",Object)],Bb.prototype,"tone",void 0),ob([ut(),ab("design:type",Object)],Bb.prototype,"busy",void 0),ob([ut(),ab("design:type",Object)],Bb.prototype,"cooldown",void 0),customElements.define("email-verify",Bb);var cb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},lb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let ub=class extends(wt(Cn)(it)){constructor(){super(),this.url="",this.drawer=!1,this.subscribe=!1,this.hideGoogle=!1,this.name="",this.email="",this.verified=!1,this.notice="",this.user=!1,this.sheetSigned=!1,this.holdSheet=!1,this.openSheetPx=0,this.liveName="",this.liveEmail="",this.liveVerified=!1,this.signup=!1,this.sliding=!1,this.motion=!1,this.clipHeight="0px",this.sheetShift="translate3d(0, -100%, 0)",this.rollMotion=!1,this.booted=!1,this.wasOpen=!1,this.sawOpen=!1,this.returnFocus=null,this.stopNotice=null,this.heldHeight=null,this.columnWidth=0,this.columnObserver=null,this.onClipEnd=t=>{if(!(t instanceof TransitionEvent))return;if(t.target!==t.currentTarget)return;if("max-height"!==t.propertyName)return;const e=t.currentTarget;e instanceof HTMLElement&&(this.drawer?this.restOpen():e.getBoundingClientRect().height>1||(this.sliding=!1,this.restShut(),this.releaseSheet()))},this.onKey=t=>{if(!this.drawer)return;if("Escape"===t.key)return t.preventDefault(),void Cn.dispatch(ln());if("Tab"!==t.key)return;const e=nb(this);if(!e.length)return;const n=e[0],s=e[e.length-1],r=sb(),i=!!r&&e.includes(r);t.shiftKey?i&&r!==n||(t.preventDefault(),s.focus({preventScroll:!0})):i&&r!==s||(t.preventDefault(),n.focus({preventScroll:!0}))},this.onLightClick=t=>{if(t.defaultPrevented)return;const e=t.target;if(!(e instanceof Element))return;const n=e.closest("a, button");n instanceof HTMLElement&&this.contains(n)&&(this.shadowRoot?.contains(n)||Cn.dispatch(ln()))},this.onSettings=t=>{const e=this.destination();if(!this.dispatchEvent(new CustomEvent(OE,{bubbles:!0,composed:!0,cancelable:!0,detail:{url:e}})))return void t.preventDefault();if(Cn.dispatch(ln()),e)return;t.preventDefault();const n=document.querySelector("user-settings");n instanceof HTMLElement&&n.scrollIntoView({block:"nearest"})}}connectedCallback(){$D(this),this.id||(this.id="pwa-user-drawer"),super.connectedCallback(),this.addEventListener("keydown",this.onKey),this.addEventListener("click",this.onLightClick),this.notice=GD(),this.stopNotice=HD(()=>{this.notice=GD()})}disconnectedCallback(){this.removeEventListener("keydown",this.onKey),this.removeEventListener("click",this.onLightClick),this.stopNotice?.(),this.stopNotice=null,this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}stateChanged(t){const e=t.session.drawer,n=this.drawer,s=!0===this.user;this.liveName=t.session.name,this.liveEmail=t.session.email,this.liveVerified=Boolean(t.session.verified),e?this.sliding=!0:this.reduced()&&(this.sliding=!1),this.drawer=e,this.user=t.session.login,this.signup=t.session.registerOne,this.paintAccount(s,n);(this.sawOpen?e!==this.wasOpen:e)&&function(t,e,n){t.dispatchEvent(new CustomEvent(e,{...aE,detail:n}))}(this,TE,{open:e}),this.wasOpen=e,this.sawOpen=!0}paintAccount(t,e){if(!0===this.user)return this.holdSheet=!1,this.name=this.liveName,this.email=this.liveEmail,this.verified=this.liveVerified,void(this.sheetSigned=!0);if(t&&e){const t=this.sheet(),e=t?Math.ceil(t.getBoundingClientRect().height):0;return e>1&&(this.openSheetPx=e),this.holdSheet=!0,void(this.sheetSigned=!0)}this.holdSheet||(this.name=this.liveName,this.email=this.liveEmail,this.verified=this.liveVerified,this.sheetSigned=!1)}releaseSheet(){this.holdSheet&&(this.holdSheet=!1,this.name=this.liveName,this.email=this.liveEmail,this.verified=this.liveVerified,this.sheetSigned=!0===this.user)}willUpdate(t){if(!this.booted)return void(this.drawer&&this.restOpen());if(t.has("signup")&&(this.motion=!0),t.has("drawer")||!t.has("signup")||!this.drawer)return;const e=this.clip();e&&(this.heldHeight=Math.ceil(e.getBoundingClientRect().height),this.rollMotion=!1,this.clipHeight=`${this.heldHeight}px`,this.sheetShift="translate3d(0, 0, 0)")}updated(t){const e=!this.booted;if(this.booted=!0,!e&&t.has("drawer"))this.heldHeight=null,this.drawer?this.unroll():this.rollUp();else if(!e&&null!=this.heldHeight&&this.drawer){const t=this.heldHeight;this.heldHeight=null;const e=this.clip(),n=this.sheet();if(e&&n){const s=Math.ceil(n.getBoundingClientRect().height);Math.abs(s-t)>1?this.rollBetween(e,n,t,s,s):this.restOpen()}}if(e&&requestAnimationFrame(()=>{this.motion=!0}),!t.has("drawer"))return;if(this.drawer){const t=sb();return this.returnFocus=t&&!this.contains(t)?t:this.returnFocus,this.shadowRoot?.querySelector(".close")?.focus({preventScroll:!0}),void SD(!1)}const n=this.returnFocus??this.toggleButton();n?.focus({preventScroll:!0}),this.returnFocus=null}clip(){return this.shadowRoot?.querySelector(".drawer-clip")??null}sheet(){return this.shadowRoot?.querySelector(".userDrawer")??null}toggleButton(){const t=document.querySelector("user-icon"),e=t?.shadowRoot?.querySelector("button");return e instanceof HTMLElement?e:null}reduced(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}restShut(){this.rollMotion=!1,this.clipHeight="0px",this.sheetShift="translate3d(0, -100%, 0)";const t=this.sheet();t&&(t.style.minHeight="")}restOpen(){this.rollMotion=!1,this.clipHeight="auto",this.sheetShift="none"}clipStyle(){const t=this.rollMotion&&!this.reduced();return{height:this.clipHeight,maxHeight:"auto"===this.clipHeight?"none":this.clipHeight,transition:t?"height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out":"none"}}sheetStyle(){const t=this.rollMotion&&!this.reduced();return{transform:this.sheetShift,transition:t?"transform var(--pwa_slide, 2s) ease-in-out":"none"}}unroll(){const t=this.clip(),e=this.sheet();if(!t||!e)return;this.scrollTop=0,this.placeAnchor();const n=this.sheetPx(t,e),s=Math.ceil(t.getBoundingClientRect().height);this.rollBetween(t,e,s,n,n)}rollUp(){const t=this.clip(),e=this.sheet();if(!t||!e)return;this.placeAnchor();let n=Math.ceil(e.getBoundingClientRect().height),s=Math.ceil(t.getBoundingClientRect().height);this.holdSheet&&this.openSheetPx>1&&(s=this.openSheetPx,n=this.openSheetPx,e.style.minHeight=`${this.openSheetPx}px`),this.rollBetween(t,e,s,0,n),this.reduced()&&(this.sliding=!1)}sheetPx(t,e){const n=t.style.transition,s=t.style.maxHeight,r=t.style.height;t.style.transition="none",t.style.maxHeight="none",t.style.height="auto";const i=Math.ceil(e.getBoundingClientRect().height);return t.style.height=r,t.style.maxHeight=s,t.style.transition=n,i}rollBetween(t,e,n,s,r){const i=n-r,o=s-r,a=t=>`translate3d(0, ${t}px, 0)`;if(this.reduced()||Math.abs(s-n)<=1)return void(0===s?(this.restShut(),this.releaseSheet()):this.restOpen());t.style.transition="none",e.style.transition="none",t.style.height=`${Math.max(0,n)}px`,t.style.maxHeight=`${Math.max(0,n)}px`,e.style.transform=a(i),t.offsetHeight,t.style.transition="height var(--pwa_slide, 2s) ease-in-out, max-height var(--pwa_slide, 2s) ease-in-out",e.style.transition="transform var(--pwa_slide, 2s) ease-in-out",t.style.height=`${Math.max(0,s)}px`,t.style.maxHeight=`${Math.max(0,s)}px`,e.style.transform=a(o),this.rollMotion=!0,this.clipHeight=`${Math.max(0,s)}px`,this.sheetShift=a(o)}firstUpdated(){this.shadowRoot.querySelector(".close").addEventListener("click",()=>{Cn.dispatch(ln())}),this.shadowRoot.querySelector(".leave").addEventListener("click",async()=>{if(this.user)try{await ED()}catch{return}Cn.dispatch(ln())});this.shadowRoot.querySelectorAll("a").forEach(t=>{t.addEventListener("click",()=>{Cn.dispatch(ln())})}),this.watchColumn()}placeAnchor(){const t=getComputedStyle(this).position;if("fixed"===t||"absolute"===t)return void(this.style.top&&(this.style.top=""));const e=this.parentElement;if(!e)return;const n=this.previousElementSibling,s=n?n.getBoundingClientRect().bottom:e.getBoundingClientRect().top+(parseFloat(getComputedStyle(e).paddingTop)||0),r=parseFloat(this.style.top)||0,i=s-(this.getBoundingClientRect().top-r);Math.abs(i-r)<=.5||(this.style.top=Math.abs(i)<=.5?"":`${i}px`)}watchColumn(){if("undefined"==typeof ResizeObserver)return;this.columnObserver=new ResizeObserver(()=>{this.placeAnchor();const t=Math.round(this.getBoundingClientRect().width);t&&t!==this.columnWidth&&(this.columnWidth=t,this.onColumnResize())}),this.columnObserver.observe(this);const t=this.previousElementSibling;t&&this.columnObserver.observe(t),this.placeAnchor()}onColumnResize(){if(!this.rollMotion)return;const t=this.clip(),e=this.sheet();if(!t||!e)return;const n=Math.ceil(t.getBoundingClientRect().height),s=this.sheetPx(t,e);this.rollBetween(t,e,n,this.drawer?s:0,s)}static get styles(){return[YD,gn,mn,XD,ZD,tb,eb,_n,zE,FD,ib,i`
1182
1182
  /* Required - this drawer's roll only. The clip hangs from the tag and grows down. */
1183
1183
  .drawer-clip {
1184
1184
  display: block;
@@ -1274,10 +1274,10 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1274
1274
  <div class="exit" part="header">
1275
1275
  <div></div>
1276
1276
  <h2 id="pwa-drawer-title" part="title">
1277
- <span class="who">${!1===this.sheetSigned?this.signup===this.subscribe?"Login":"Subscribe":WD(this.name,this.email)}</span>
1278
- ${this.sheetSigned?this.verified?Bb:U`<span class="unverified" part="unverified">Not verified</span>`:""}
1277
+ <span class="who">${!1===this.sheetSigned?this.signup===this.subscribe?"Login":"Subscribe":qD(this.name,this.email)}</span>
1278
+ ${this.sheetSigned?this.verified?rb:U`<span class="unverified" part="unverified">Not verified</span>`:""}
1279
1279
  </h2>
1280
- <button class="close" part="close" type="button" aria-label="Close">${tb}</button>
1280
+ <button class="close" part="close" type="button" aria-label="Close">${WD}</button>
1281
1281
  </div>
1282
1282
 
1283
1283
  <!-- Logged-out State -->
@@ -1338,7 +1338,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1338
1338
  </section>
1339
1339
  </div>
1340
1340
 
1341
- `}destination(){return(this.url||"").trim()}settingsControl(){const t=this.destination();return t?U`<a href="${t}" part="settings" @click="${this.onSettings}">Settings</a>`:U`<button type="button" class="settings" part="settings" @click="${this.onSettings}">Settings</button>`}};db([lt({type:String,reflect:!0}),pb("design:type",Object)],fb.prototype,"url",void 0),db([lt({type:Boolean,attribute:!0,reflect:!0}),pb("design:type",Object)],fb.prototype,"drawer",void 0),db([lt({type:Boolean,attribute:!0,reflect:!0}),pb("design:type",Object)],fb.prototype,"subscribe",void 0),db([lt({type:Boolean,attribute:"hide-google",reflect:!0}),pb("design:type",Object)],fb.prototype,"hideGoogle",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"name",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"email",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"verified",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"notice",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"user",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"sheetSigned",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"signup",void 0),db([lt({type:Boolean,reflect:!0}),pb("design:type",Object)],fb.prototype,"sliding",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"motion",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"clipHeight",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"sheetShift",void 0),db([ut(),pb("design:type",Object)],fb.prototype,"rollMotion",void 0),fb=db([at("user-drawer"),pb("design:paramtypes",[])],fb);const Cb=i`
1341
+ `}destination(){return(this.url||"").trim()}settingsControl(){const t=this.destination();return t?U`<a href="${t}" part="settings" @click="${this.onSettings}">Settings</a>`:U`<button type="button" class="settings" part="settings" @click="${this.onSettings}">Settings</button>`}};cb([lt({type:String,reflect:!0}),lb("design:type",Object)],ub.prototype,"url",void 0),cb([lt({type:Boolean,attribute:!0,reflect:!0}),lb("design:type",Object)],ub.prototype,"drawer",void 0),cb([lt({type:Boolean,attribute:!0,reflect:!0}),lb("design:type",Object)],ub.prototype,"subscribe",void 0),cb([lt({type:Boolean,attribute:"hide-google",reflect:!0}),lb("design:type",Object)],ub.prototype,"hideGoogle",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"name",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"email",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"verified",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"notice",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"user",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"sheetSigned",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"signup",void 0),cb([lt({type:Boolean,reflect:!0}),lb("design:type",Object)],ub.prototype,"sliding",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"motion",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"clipHeight",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"sheetShift",void 0),cb([ut(),lb("design:type",Object)],ub.prototype,"rollMotion",void 0),ub=cb([at("user-drawer"),lb("design:paramtypes",[])],ub);const hb=i`
1342
1342
 
1343
1343
  nav {
1344
1344
  overflow: hidden;
@@ -1423,7 +1423,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1423
1423
  padding: 20px var(--pwa_inset, 0px) 4px;
1424
1424
  }
1425
1425
 
1426
- `;var gb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},mb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};function wb(t){return"pwa-auth/"+t+"/photo"}async function yb(t){const e=await async function(t){try{return await createImageBitmap(t,{imageOrientation:"from-image"})}catch{return await createImageBitmap(t)}}(t);try{if(e.width<1||e.height<1)throw new Error("empty image");const t=function(t,e){const n=Math.max(t,e);if(!(n>1024))return{width:Math.max(1,Math.round(t)),height:Math.max(1,Math.round(e))};const s=1024/n;return{width:Math.max(1,Math.round(t*s)),height:Math.max(1,Math.round(e*s))}}(e.width,e.height),n=document.createElement("canvas");n.width=t.width,n.height=t.height;const s=n.getContext("2d");if(!s)throw new Error("no canvas");s.drawImage(e,0,0,t.width,t.height);const r=await new Promise(t=>{n.toBlob(e=>t(e),"image/jpeg",.8)});if(!r)throw new Error("no jpeg");return r}finally{e.close()}}class Eb extends(wt(Cn)(it)){constructor(){super(),this.photo="",this.emptyArtwork="",this.signed=!1,this.person="",this.mail="",this.progress=0,this.error="",this.status="",this.tone="",this.busy=!1,this.stopAuth=null,this.saveImage=async t=>{const e=t.target,n=e?.files?.[0],s=Qy.currentUser;if(this.error="",this.tone="",!s)return this.resetPicker(),void this.fail({code:"pwa/signed-out",message:"Sign in first."});if(!n)return this.resetPicker(),void this.fail({code:"pwa/missing-file",message:"Choose a photo first."});const r=function(t){return t.type.startsWith("image/")?t.size>5242880?{code:"pwa/photo-too-large",message:"Choose an image under 5 MB."}:null:{code:"pwa/not-image",message:"Choose an image file."}}(n);if(r)return this.resetPicker(),void this.fail(r);let i;this.busy=!0,this.progress=0,this.status="Preparing…";try{i=await yb(n)}catch{return this.busy=!1,this.progress=0,this.resetPicker(),void this.fail({code:"pwa/photo-unreadable",message:"That image could not be prepared. Try another."})}const o=Qy.currentUser;if(!o)return this.busy=!1,this.progress=0,this.resetPicker(),void this.fail({code:"pwa/signed-out",message:"Sign in first."});this.status="Uploading…";const a=jy(Ky,wb(o.uid)),B={cacheControl:"public,max-age=300",contentType:i.type||"image/jpeg"},c=Hy(a,i,B);c.on("state_changed",t=>{const e=t.totalBytes>0?t.bytesTransferred/t.totalBytes*100:0;this.progress=isFinite(e)?e:0,this.status=`Uploading… ${Math.round(this.progress)}%`},t=>{this.busy=!1,this.progress=0,this.resetPicker(),this.fail(t)},async()=>{try{const t=await function(t){return Ry(t=Xn(t))}(c.snapshot.ref),e=Qy.currentUser;if(!e)return await Vy(a).catch(()=>{}),void this.fail({code:"pwa/signed-out",message:"Sign in first."});try{await xo(e,{photoURL:t})}catch(t){throw await Vy(a).catch(()=>{}),t}Cn.dispatch(pn(t)),this.photo=t,this.progress=100,this.tone="",this.error="",this.status="Photo saved.",cE(DE,{uid:e.uid,displayName:e.displayName,photoURL:t})}catch(t){this.fail(t)}finally{this.busy=!1,this.resetPicker()}})},this.clearPhoto=async()=>{const t=Qy.currentUser;if(t&&!this.busy){this.busy=!0,this.error="",this.tone="",this.status="";try{await xo(t,{photoURL:null}),Cn.dispatch(pn("")),this.photo="",await Vy(jy(Ky,wb(t.uid))).catch(()=>{}),this.status="Photo removed.",cE(DE,{uid:t.uid,displayName:t.displayName,photoURL:null})}catch(t){this.fail(t)}finally{this.busy=!1,this.resetPicker()}}}}connectedCallback(){super.connectedCallback(),sE(()=>{this.stopAuth?.(),this.stopAuth=Lo(Qy,t=>{if(this.signed=!!t,!t)return this.tone="",this.error="",void(this.status="Sign in to upload a photo.");"Sign in to upload a photo."===this.status&&(this.status="")})})}disconnectedCallback(){this.stopAuth?.(),this.stopAuth=null,super.disconnectedCallback()}stateChanged(t){this.photo=t.session.photoURL,this.person=t.session.name,this.mail=t.session.email}static get styles(){return[VE,JE,i`
1426
+ `;var db=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},pb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};function fb(t){return"pwa-auth/"+t+"/photo"}async function Cb(t){const e=await async function(t){try{return await createImageBitmap(t,{imageOrientation:"from-image"})}catch{return await createImageBitmap(t)}}(t);try{if(e.width<1||e.height<1)throw new Error("empty image");const t=function(t,e){const n=Math.max(t,e);if(!(n>1024))return{width:Math.max(1,Math.round(t)),height:Math.max(1,Math.round(e))};const s=1024/n;return{width:Math.max(1,Math.round(t*s)),height:Math.max(1,Math.round(e*s))}}(e.width,e.height),n=document.createElement("canvas");n.width=t.width,n.height=t.height;const s=n.getContext("2d");if(!s)throw new Error("no canvas");s.drawImage(e,0,0,t.width,t.height);const r=await new Promise(t=>{n.toBlob(e=>t(e),"image/jpeg",.8)});if(!r)throw new Error("no jpeg");return r}finally{e.close()}}class gb extends(wt(Cn)(it)){constructor(){super(),this.photo="",this.emptyArtwork="",this.signed=!1,this.person="",this.mail="",this.progress=0,this.error="",this.status="",this.tone="",this.busy=!1,this.stopAuth=null,this.saveImage=async t=>{const e=t.target,n=e?.files?.[0],s=Qy.currentUser;if(this.error="",this.tone="",!s)return this.resetPicker(),void this.fail({code:"pwa/signed-out",message:"Sign in first."});if(!n)return this.resetPicker(),void this.fail({code:"pwa/missing-file",message:"Choose a photo first."});const r=function(t){return t.type.startsWith("image/")?t.size>5242880?{code:"pwa/photo-too-large",message:"Choose an image under 5 MB."}:null:{code:"pwa/not-image",message:"Choose an image file."}}(n);if(r)return this.resetPicker(),void this.fail(r);let i;this.busy=!0,this.progress=0,this.status="Preparing…";try{i=await Cb(n)}catch{return this.busy=!1,this.progress=0,this.resetPicker(),void this.fail({code:"pwa/photo-unreadable",message:"That image could not be prepared. Try another."})}const o=Qy.currentUser;if(!o)return this.busy=!1,this.progress=0,this.resetPicker(),void this.fail({code:"pwa/signed-out",message:"Sign in first."});this.status="Uploading…";const a=jy(Ky,fb(o.uid)),B={cacheControl:"public,max-age=300",contentType:i.type||"image/jpeg"},c=Hy(a,i,B);c.on("state_changed",t=>{const e=t.totalBytes>0?t.bytesTransferred/t.totalBytes*100:0;this.progress=isFinite(e)?e:0,this.status=`Uploading… ${Math.round(this.progress)}%`},t=>{this.busy=!1,this.progress=0,this.resetPicker(),this.fail(t)},async()=>{try{const t=await function(t){return Ry(t=Xn(t))}(c.snapshot.ref),e=Qy.currentUser;if(!e)return await Vy(a).catch(()=>{}),void this.fail({code:"pwa/signed-out",message:"Sign in first."});try{await xo(e,{photoURL:t})}catch(t){throw await Vy(a).catch(()=>{}),t}Cn.dispatch(pn(t)),this.photo=t,this.progress=100,this.tone="",this.error="",this.status="Photo saved.",cE(DE,{uid:e.uid,displayName:e.displayName,photoURL:t})}catch(t){this.fail(t)}finally{this.busy=!1,this.resetPicker()}})},this.clearPhoto=async()=>{const t=Qy.currentUser;if(t&&!this.busy){this.busy=!0,this.error="",this.tone="",this.status="";try{await xo(t,{photoURL:null}),Cn.dispatch(pn("")),this.photo="",await Vy(jy(Ky,fb(t.uid))).catch(()=>{}),this.status="Photo removed.",cE(DE,{uid:t.uid,displayName:t.displayName,photoURL:null})}catch(t){this.fail(t)}finally{this.busy=!1,this.resetPicker()}}}}connectedCallback(){super.connectedCallback(),sE(()=>{this.stopAuth?.(),this.stopAuth=Lo(Qy,t=>{if(this.signed=!!t,!t)return this.tone="",this.error="",void(this.status="Sign in to upload a photo.");"Sign in to upload a photo."===this.status&&(this.status="")})})}disconnectedCallback(){this.stopAuth?.(),this.stopAuth=null,super.disconnectedCallback()}stateChanged(t){this.photo=t.session.photoURL,this.person=t.session.name,this.mail=t.session.email}static get styles(){return[VE,JE,i`
1427
1427
 
1428
1428
  :host {
1429
1429
  position: relative;
@@ -1550,7 +1550,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1550
1550
  opacity: 0.72;
1551
1551
  }
1552
1552
 
1553
- `]}letters(){return QD(this.person,this.mail)}resetPicker(){const t=this.renderRoot.querySelector("input[type=file]");t&&(t.value="")}render(){const t=this.letters(),e="string"==typeof this.photo?this.photo:"",n=!this.signed||this.busy;return U`
1553
+ `]}letters(){return JD(this.person,this.mail)}resetPicker(){const t=this.renderRoot.querySelector("input[type=file]");t&&(t.value="")}render(){const t=this.letters(),e="string"==typeof this.photo?this.photo:"",n=!this.signed||this.busy;return U`
1554
1554
 
1555
1555
  <div class="chooser">
1556
1556
  <input
@@ -1597,7 +1597,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1597
1597
  `:""}
1598
1598
 
1599
1599
  ${qE("pwa-photo-status",this.error||this.status,this.tone)}
1600
- `}fail(t){const e="object"==typeof t&&null!==t&&"code"in t&&"message"in t&&!(t instanceof Error)?t:lE(t);this.tone="error",this.error=HE(e),this.status="",cE(AE,e)}}gb([lt(),mb("design:type",Object)],Eb.prototype,"photo",void 0),gb([lt({type:String,reflect:!0}),mb("design:type",Object)],Eb.prototype,"emptyArtwork",void 0),gb([ut(),mb("design:type",Object)],Eb.prototype,"signed",void 0),gb([ut(),mb("design:type",Object)],Eb.prototype,"person",void 0),gb([ut(),mb("design:type",Object)],Eb.prototype,"mail",void 0),gb([ut(),mb("design:type",Number)],Eb.prototype,"progress",void 0),gb([ut(),mb("design:type",String)],Eb.prototype,"error",void 0),gb([ut(),mb("design:type",String)],Eb.prototype,"status",void 0),gb([ut(),mb("design:type",String)],Eb.prototype,"tone",void 0),gb([ut(),mb("design:type",Object)],Eb.prototype,"busy",void 0),customElements.define("contact-photo",Eb);var _b=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Db=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class bb extends(wt(Cn)(it)){constructor(){super(),this.login=!1,this.draft="",this.busy=!1,this.status="",this.tone="",this.dirty=!1,this.default=t=>{t.preventDefault(),this.alertProfile()},this.alertProfile=async()=>{if(this.busy)return;const t=this.renderRoot.querySelector("#pwa-name"),e=(t?.value??this.draft).trim(),n=Qy.currentUser;if(n){this.busy=!0,this.tone="",this.status="";try{await xo(n,{displayName:e}),this.dirty=!1,this.draft=e,Cn.dispatch(hn(e)),this.status="Name saved.",cE(DE,{uid:n.uid,displayName:e,photoURL:n.photoURL})}catch(t){this.show(lE(t))}finally{this.busy=!1}}else this.show({code:"pwa/signed-out",message:"Sign in first."})}}stateChanged(t){const e=Boolean(t.session.login);e!==this.login&&(this.dirty=!1),this.login=e,this.dirty||(this.draft=t.session.name??"")}static get styles(){return[VE,jE,UE,JE,i`
1600
+ `}fail(t){const e="object"==typeof t&&null!==t&&"code"in t&&"message"in t&&!(t instanceof Error)?t:lE(t);this.tone="error",this.error=HE(e),this.status="",cE(AE,e)}}db([lt(),pb("design:type",Object)],gb.prototype,"photo",void 0),db([lt({type:String,reflect:!0}),pb("design:type",Object)],gb.prototype,"emptyArtwork",void 0),db([ut(),pb("design:type",Object)],gb.prototype,"signed",void 0),db([ut(),pb("design:type",Object)],gb.prototype,"person",void 0),db([ut(),pb("design:type",Object)],gb.prototype,"mail",void 0),db([ut(),pb("design:type",Number)],gb.prototype,"progress",void 0),db([ut(),pb("design:type",String)],gb.prototype,"error",void 0),db([ut(),pb("design:type",String)],gb.prototype,"status",void 0),db([ut(),pb("design:type",String)],gb.prototype,"tone",void 0),db([ut(),pb("design:type",Object)],gb.prototype,"busy",void 0),customElements.define("contact-photo",gb);var mb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},wb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class yb extends(wt(Cn)(it)){constructor(){super(),this.login=!1,this.draft="",this.busy=!1,this.status="",this.tone="",this.dirty=!1,this.default=t=>{t.preventDefault(),this.alertProfile()},this.alertProfile=async()=>{if(this.busy)return;const t=this.renderRoot.querySelector("#pwa-name"),e=(t?.value??this.draft).trim(),n=Qy.currentUser;if(n){this.busy=!0,this.tone="",this.status="";try{await xo(n,{displayName:e}),this.dirty=!1,this.draft=e,Cn.dispatch(hn(e)),this.status="Name saved.",cE(DE,{uid:n.uid,displayName:e,photoURL:n.photoURL})}catch(t){this.show(lE(t))}finally{this.busy=!1}}else this.show({code:"pwa/signed-out",message:"Sign in first."})}}stateChanged(t){const e=Boolean(t.session.login);e!==this.login&&(this.dirty=!1),this.login=e,this.dirty||(this.draft=t.session.name??"")}static get styles(){return[VE,jE,UE,JE,i`
1601
1601
 
1602
1602
  :host, form { display: grid; align-content: start; }
1603
1603
 
@@ -1635,7 +1635,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1635
1635
 
1636
1636
  </form>
1637
1637
 
1638
- `}handleInput(t){const e=t.target;this.dirty=!0,this.draft=e.value}show(t){this.tone="error",this.status=HE(t),cE(AE,t)}}_b([ut(),Db("design:type",Object)],bb.prototype,"login",void 0),_b([ut(),Db("design:type",Object)],bb.prototype,"draft",void 0),_b([ut(),Db("design:type",Object)],bb.prototype,"busy",void 0),_b([ut(),Db("design:type",Object)],bb.prototype,"status",void 0),_b([ut(),Db("design:type",Object)],bb.prototype,"tone",void 0),customElements.define("input-name",bb);const vb="userEmailChanged";var Ib=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Tb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class Ob extends(wt(Cn)(it)){constructor(){super(),this.email="",this.login=!1,this.mail="",this.busy=!1,this.status="",this.tone="",this.showPassword=!1,this.saveEmail=async t=>{if(t.preventDefault(),this.busy)return;const e=Qy.currentUser;if(!e)return void this.show({code:"pwa/signed-out",message:"Sign in first."});const n=this.shadowRoot?.querySelector("#pwa-current-email-password")?.value??"",s=this.shadowRoot?.querySelector("#pwa-email");if(!s)return;if(n.length<6)return void this.show({code:"pwa/current-password",message:"Enter your current password."});this.busy=!0,this.tone="",this.status="";if(!await bD(n)){const t=yD();return this.tone="error",this.status=HE(t??{code:"pwa/unknown",message:"Something went wrong. Try again."}),void(this.busy=!1)}try{const t=eE();t?await No(e,s.value,t):await No(e,s.value);const n={email:s.value};if(cE(bE,n),function(t){window.dispatchEvent(new CustomEvent(vb,{detail:t,bubbles:!0,composed:!0}))}(n),this.tone="",this.status="Check your inbox to confirm the new address.",!e.emailVerified)try{await MD()}catch{}}catch(t){const e=lE(t);this.tone="error",this.status=HE(t),cE(AE,e)}finally{this.busy=!1}}}stateChanged(t){this.login=t.session.login,this.mail=t.session.email}handleEmail(t){const e=t.target;this.mail=e.value}static get styles(){return[VE,jE,UE,$E,JE,i`
1638
+ `}handleInput(t){const e=t.target;this.dirty=!0,this.draft=e.value}show(t){this.tone="error",this.status=HE(t),cE(AE,t)}}mb([ut(),wb("design:type",Object)],yb.prototype,"login",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"draft",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"busy",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"status",void 0),mb([ut(),wb("design:type",Object)],yb.prototype,"tone",void 0),customElements.define("input-name",yb);const Eb="userEmailChanged";var _b=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Db=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class bb extends(wt(Cn)(it)){constructor(){super(),this.email="",this.login=!1,this.mail="",this.busy=!1,this.status="",this.tone="",this.showPassword=!1,this.saveEmail=async t=>{if(t.preventDefault(),this.busy)return;const e=Qy.currentUser;if(!e)return void this.show({code:"pwa/signed-out",message:"Sign in first."});const n=this.shadowRoot?.querySelector("#pwa-current-email-password")?.value??"",s=this.shadowRoot?.querySelector("#pwa-email");if(!s)return;if(n.length<6)return void this.show({code:"pwa/current-password",message:"Enter your current password."});this.busy=!0,this.tone="",this.status="";if(!await yD(n)){const t=CD();return this.tone="error",this.status=HE(t??{code:"pwa/unknown",message:"Something went wrong. Try again."}),void(this.busy=!1)}try{const t=eE();t?await No(e,s.value,t):await No(e,s.value);const n={email:s.value};if(cE(bE,n),function(t){window.dispatchEvent(new CustomEvent(Eb,{detail:t,bubbles:!0,composed:!0}))}(n),this.tone="",this.status="Check your inbox to confirm the new address.",!e.emailVerified)try{await kD()}catch{}}catch(t){const e=lE(t);this.tone="error",this.status=HE(t),cE(AE,e)}finally{this.busy=!1}}}stateChanged(t){this.login=t.session.login,this.mail=t.session.email}handleEmail(t){const e=t.target;this.mail=e.value}static get styles(){return[VE,jE,UE,$E,JE,i`
1639
1639
 
1640
1640
  :host, form { display: grid; align-content: start; }
1641
1641
 
@@ -1692,7 +1692,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1692
1692
 
1693
1693
  </form>
1694
1694
 
1695
- `}show(t){this.tone="error",this.status=HE(t),cE(AE,t)}}Ib([lt({type:String,reflect:!0}),Tb("design:type",Object)],Ob.prototype,"email",void 0),Ib([ut(),Tb("design:type",Boolean)],Ob.prototype,"login",void 0),Ib([ut(),Tb("design:type",String)],Ob.prototype,"mail",void 0),Ib([ut(),Tb("design:type",Object)],Ob.prototype,"busy",void 0),Ib([ut(),Tb("design:type",Object)],Ob.prototype,"status",void 0),Ib([ut(),Tb("design:type",Object)],Ob.prototype,"tone",void 0),Ib([ut(),Tb("design:type",Object)],Ob.prototype,"showPassword",void 0),customElements.define("contact-email",Ob);var Ab=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Sb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class Rb extends(wt(Cn)(it)){constructor(){super(),this.message="",this.tone="",this.password="",this.login=!1,this.busy=!1,this.showCurrent=!1,this.showNext=!1,this.showVerify=!1,this.default=t=>{t.preventDefault(),this.alertPassword()},this.updatePass=async(t,e)=>{const n=Qy.currentUser;if(!n)return void this.show({code:"pwa/signed-out",message:"Sign in first."});this.busy=!0,this.tone="",this.message="";if(!await bD(t)){const t=yD();return this.tone="error",this.message=HE(t??{code:"pwa/unknown",message:"Something went wrong. Try again."}),void(this.busy=!1)}try{await ko(n,e),this.tone="",this.message="Password saved.",cE(vE,{uid:n.uid})}catch(t){const e=lE(t);this.tone="error",this.message=HE(t),cE(AE,e)}finally{this.busy=!1}}}stateChanged(t){this.login=t.session.login}handleInputChange(t){const e=t.target;this.password=e.value}static get styles(){return[VE,jE,UE,$E,JE,i`
1695
+ `}show(t){this.tone="error",this.status=HE(t),cE(AE,t)}}_b([lt({type:String,reflect:!0}),Db("design:type",Object)],bb.prototype,"email",void 0),_b([ut(),Db("design:type",Boolean)],bb.prototype,"login",void 0),_b([ut(),Db("design:type",String)],bb.prototype,"mail",void 0),_b([ut(),Db("design:type",Object)],bb.prototype,"busy",void 0),_b([ut(),Db("design:type",Object)],bb.prototype,"status",void 0),_b([ut(),Db("design:type",Object)],bb.prototype,"tone",void 0),_b([ut(),Db("design:type",Object)],bb.prototype,"showPassword",void 0),customElements.define("contact-email",bb);var vb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Ib=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class Tb extends(wt(Cn)(it)){constructor(){super(),this.message="",this.tone="",this.password="",this.login=!1,this.busy=!1,this.showCurrent=!1,this.showNext=!1,this.showVerify=!1,this.default=t=>{t.preventDefault(),this.alertPassword()},this.updatePass=async(t,e)=>{const n=Qy.currentUser;if(!n)return void this.show({code:"pwa/signed-out",message:"Sign in first."});this.busy=!0,this.tone="",this.message="";if(!await yD(t)){const t=CD();return this.tone="error",this.message=HE(t??{code:"pwa/unknown",message:"Something went wrong. Try again."}),void(this.busy=!1)}try{await ko(n,e),this.tone="",this.message="Password saved.",cE(vE,{uid:n.uid})}catch(t){const e=lE(t);this.tone="error",this.message=HE(t),cE(AE,e)}finally{this.busy=!1}}}stateChanged(t){this.login=t.session.login}handleInputChange(t){const e=t.target;this.password=e.value}static get styles(){return[VE,jE,UE,$E,JE,i`
1696
1696
 
1697
1697
  :host{
1698
1698
  display: grid;
@@ -1789,7 +1789,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1789
1789
 
1790
1790
  </form>
1791
1791
 
1792
- `}show(t){this.tone="error",this.message=HE(t),cE(AE,t)}async alertPassword(){if(this.busy)return;const t=this.shadowRoot.querySelector("#pwa-current-password").value,e=this.shadowRoot.querySelector("#pwa-new-password").value,n=this.shadowRoot.querySelector("#pwa-verify-password").value;if(this.password=e,t.length<6)return void this.show({code:"pwa/current-password",message:"Enter your current password."});const s=ME(this.password);s?this.show(s):this.password===n?Qy.currentUser?await this.updatePass(t,this.password):this.show({code:"pwa/signed-out",message:"Sign in first."}):this.show({code:"pwa/password-mismatch",message:PE})}}Ab([ut(),Sb("design:type",String)],Rb.prototype,"message",void 0),Ab([ut(),Sb("design:type",String)],Rb.prototype,"tone",void 0),Ab([ut(),Sb("design:type",String)],Rb.prototype,"password",void 0),Ab([ut(),Sb("design:type",Boolean)],Rb.prototype,"login",void 0),Ab([ut(),Sb("design:type",Boolean)],Rb.prototype,"busy",void 0),Ab([ut(),Sb("design:type",Object)],Rb.prototype,"showCurrent",void 0),Ab([ut(),Sb("design:type",Object)],Rb.prototype,"showNext",void 0),Ab([ut(),Sb("design:type",Object)],Rb.prototype,"showVerify",void 0),customElements.define("input-password",Rb);var Nb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},xb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class kb extends(wt(Cn)(it)){constructor(){super(),this.login=!1,this.email="",this.busy=!1,this.status="",this.tone="",this.showPassword=!1,this.alertDelete=()=>{if(this.busy)return;if(!Qy.currentUser)return void this.show({code:"pwa/signed-out",message:"Sign in first."});const t=this.shadowRoot.querySelector("#pwa-delete-password").value;if(t.length<6)return void this.show({code:"pwa/current-password",message:"Enter your current password."});1==confirm("Delete Account?")&&this.officialDelete(t)},this.officialDelete=async t=>{this.busy=!0,this.tone="",this.status="";if(!await bD(t)){const t=yD();return this.tone="error",this.status=HE(t??{code:"pwa/unknown",message:"Something went wrong. Try again."}),void(this.busy=!1)}const e=Qy.currentUser;if(!e)return this.show({code:"pwa/signed-out",message:"Sign in first."}),void(this.busy=!1);try{const t=e.uid;await(async t=>{const e=jy(Ky,"pwa-auth/"+t),n=await Uy(e);await Promise.all(n.items.map(t=>Vy(t)));for(const t of n.prefixes){const e=await Uy(t);await Promise.all(e.items.map(t=>Vy(t)))}})(t),await TD(),await e.delete(),cE(_E,{uid:t})}catch(t){const e=lE(t);this.tone="error",this.status=HE(t),cE(AE,e)}finally{this.busy=!1}}}stateChanged(t){this.login=t.session.login,this.email=t.session.email}static get styles(){return[UE,VE,jE,$E,JE,i`
1792
+ `}show(t){this.tone="error",this.message=HE(t),cE(AE,t)}async alertPassword(){if(this.busy)return;const t=this.shadowRoot.querySelector("#pwa-current-password").value,e=this.shadowRoot.querySelector("#pwa-new-password").value,n=this.shadowRoot.querySelector("#pwa-verify-password").value;if(this.password=e,t.length<6)return void this.show({code:"pwa/current-password",message:"Enter your current password."});const s=ME(this.password);s?this.show(s):this.password===n?Qy.currentUser?await this.updatePass(t,this.password):this.show({code:"pwa/signed-out",message:"Sign in first."}):this.show({code:"pwa/password-mismatch",message:PE})}}vb([ut(),Ib("design:type",String)],Tb.prototype,"message",void 0),vb([ut(),Ib("design:type",String)],Tb.prototype,"tone",void 0),vb([ut(),Ib("design:type",String)],Tb.prototype,"password",void 0),vb([ut(),Ib("design:type",Boolean)],Tb.prototype,"login",void 0),vb([ut(),Ib("design:type",Boolean)],Tb.prototype,"busy",void 0),vb([ut(),Ib("design:type",Object)],Tb.prototype,"showCurrent",void 0),vb([ut(),Ib("design:type",Object)],Tb.prototype,"showNext",void 0),vb([ut(),Ib("design:type",Object)],Tb.prototype,"showVerify",void 0),customElements.define("input-password",Tb);var Ob=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Ab=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class Sb extends(wt(Cn)(it)){constructor(){super(),this.login=!1,this.email="",this.busy=!1,this.status="",this.tone="",this.showPassword=!1,this.alertDelete=()=>{if(this.busy)return;if(!Qy.currentUser)return void this.show({code:"pwa/signed-out",message:"Sign in first."});const t=this.shadowRoot.querySelector("#pwa-delete-password").value;if(t.length<6)return void this.show({code:"pwa/current-password",message:"Enter your current password."});1==confirm("Delete Account?")&&this.officialDelete(t)},this.officialDelete=async t=>{this.busy=!0,this.tone="",this.status="";if(!await yD(t)){const t=CD();return this.tone="error",this.status=HE(t??{code:"pwa/unknown",message:"Something went wrong. Try again."}),void(this.busy=!1)}const e=Qy.currentUser;if(!e)return this.show({code:"pwa/signed-out",message:"Sign in first."}),void(this.busy=!1);try{const t=e.uid;await(async t=>{const e=jy(Ky,"pwa-auth/"+t),n=await Uy(e);await Promise.all(n.items.map(t=>Vy(t)));for(const t of n.prefixes){const e=await Uy(t);await Promise.all(e.items.map(t=>Vy(t)))}})(t),await DD(),await e.delete(),cE(_E,{uid:t})}catch(t){const e=lE(t);this.tone="error",this.status=HE(t),cE(AE,e)}finally{this.busy=!1}}}stateChanged(t){this.login=t.session.login,this.email=t.session.email}static get styles(){return[UE,VE,jE,$E,JE,i`
1793
1793
 
1794
1794
  :host {
1795
1795
  display: grid;
@@ -1840,7 +1840,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1840
1840
  ?disabled="${!1===this.login||this.busy}"
1841
1841
  @click="${this.alertDelete}">${this.busy?"Deleting…":"Delete"}</button>
1842
1842
 
1843
- `}show(t){this.tone="error",this.status=HE(t),cE(AE,t)}}Nb([ut(),xb("design:type",Boolean)],kb.prototype,"login",void 0),Nb([ut(),xb("design:type",String)],kb.prototype,"email",void 0),Nb([ut(),xb("design:type",Object)],kb.prototype,"busy",void 0),Nb([ut(),xb("design:type",Object)],kb.prototype,"status",void 0),Nb([ut(),xb("design:type",Object)],kb.prototype,"tone",void 0),Nb([ut(),xb("design:type",Object)],kb.prototype,"showPassword",void 0),customElements.define("delete-user",kb);var Lb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Fb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Pb=class extends(wt(Cn)(it)){constructor(){super(),this.empty="",this.profileTopic="",this.name="",this.email="",this.login=!1,this.clipHeight="auto",this.sheetShift="none",this.rollMotion=!1,this.leaving="",this.leaveClipHeight="0px",this.leaveSheetShift="translate3d(0, 0, 0)",this.leaveMotion=!1,this.booted=!1,this.heldHeight=null,this.leaveFrom=0,this.columnWidth=0,this.columnObserver=null,this.onSubmit=t=>{t.preventDefault()},this.onFrontEnd=t=>{t instanceof TransitionEvent&&t.target===t.currentTarget&&"max-height"===t.propertyName&&this.rest()},this.onBackEnd=t=>{t instanceof TransitionEvent&&t.target===t.currentTarget&&"max-height"===t.propertyName&&(this.leaving="",this.leaveMotion=!1)}}connectedCallback(){KD(this),this.hasAttribute("role")||this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Account settings"),super.connectedCallback(),this.addEventListener("submit",this.onSubmit)}disconnectedCallback(){this.removeEventListener("submit",this.onSubmit),this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}onTabKey(t){if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;t.preventDefault();const e=["profile","verification","password","delete"],n=e.indexOf(this.profileTopic),s=e[(n+("ArrowRight"===t.key?1:-1)+e.length)%e.length];Cn.dispatch(on(s)),this.updateComplete.then(()=>{this.shadowRoot?.querySelector(`button[value="${s}"]`)?.focus()})}stateChanged(t){this.profileTopic=t.session.settings,this.login=Boolean(t.session.login),this.name=t.session.name,this.email=t.session.email}static get styles(){return[Cb,_n,zE,i`
1843
+ `}show(t){this.tone="error",this.status=HE(t),cE(AE,t)}}Ob([ut(),Ab("design:type",Boolean)],Sb.prototype,"login",void 0),Ob([ut(),Ab("design:type",String)],Sb.prototype,"email",void 0),Ob([ut(),Ab("design:type",Object)],Sb.prototype,"busy",void 0),Ob([ut(),Ab("design:type",Object)],Sb.prototype,"status",void 0),Ob([ut(),Ab("design:type",Object)],Sb.prototype,"tone",void 0),Ob([ut(),Ab("design:type",Object)],Sb.prototype,"showPassword",void 0),customElements.define("delete-user",Sb);var Rb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Nb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let xb=class extends(wt(Cn)(it)){constructor(){super(),this.empty="",this.profileTopic="",this.name="",this.email="",this.login=!1,this.clipHeight="auto",this.sheetShift="none",this.rollMotion=!1,this.leaving="",this.leaveClipHeight="0px",this.leaveSheetShift="translate3d(0, 0, 0)",this.leaveMotion=!1,this.booted=!1,this.heldHeight=null,this.leaveFrom=0,this.columnWidth=0,this.columnObserver=null,this.onSubmit=t=>{t.preventDefault()},this.onFrontEnd=t=>{t instanceof TransitionEvent&&t.target===t.currentTarget&&"max-height"===t.propertyName&&this.rest()},this.onBackEnd=t=>{t instanceof TransitionEvent&&t.target===t.currentTarget&&"max-height"===t.propertyName&&(this.leaving="",this.leaveMotion=!1)}}connectedCallback(){$D(this),this.hasAttribute("role")||this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Account settings"),super.connectedCallback(),this.addEventListener("submit",this.onSubmit)}disconnectedCallback(){this.removeEventListener("submit",this.onSubmit),this.columnObserver?.disconnect(),this.columnObserver=null,super.disconnectedCallback()}onTabKey(t){if("ArrowRight"!==t.key&&"ArrowLeft"!==t.key)return;t.preventDefault();const e=["profile","verification","password","delete"],n=e.indexOf(this.profileTopic),s=e[(n+("ArrowRight"===t.key?1:-1)+e.length)%e.length];Cn.dispatch(on(s)),this.updateComplete.then(()=>{this.shadowRoot?.querySelector(`button[value="${s}"]`)?.focus()})}stateChanged(t){this.profileTopic=t.session.settings,this.login=Boolean(t.session.login),this.name=t.session.name,this.email=t.session.email}static get styles(){return[hb,_n,zE,i`
1844
1844
 
1845
1845
  :host {
1846
1846
  display: block;
@@ -1940,7 +1940,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
1940
1940
  </section>
1941
1941
  `}render(){if(!this.login)return U`
1942
1942
  <p class="signed-out" part="signed-out" role="status">Sign in to change the photo, name, email, or password.</p>
1943
- `;const t=WD(this.name,this.email);return U`
1943
+ `;const t=qD(this.name,this.email);return U`
1944
1944
 
1945
1945
  <!-- Page Menu -->
1946
1946
  <nav aria-label="Account" @keydown="${this.onTabKey}">
@@ -2026,7 +2026,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2026
2026
  `})}
2027
2027
  </div>
2028
2028
 
2029
- `}};Lb([lt({type:String,reflect:!0}),Fb("design:type",Object)],Pb.prototype,"empty",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"profileTopic",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"name",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"email",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"login",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"clipHeight",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"sheetShift",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"rollMotion",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"leaving",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"leaveClipHeight",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"leaveSheetShift",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"leaveMotion",void 0),Pb=Lb([at("user-settings"),Fb("design:paramtypes",[])],Pb);const Mb=i`
2029
+ `}};Rb([lt({type:String,reflect:!0}),Nb("design:type",Object)],xb.prototype,"empty",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"profileTopic",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"name",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"email",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"login",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"clipHeight",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"sheetShift",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"rollMotion",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"leaving",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"leaveClipHeight",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"leaveSheetShift",void 0),Rb([ut(),Nb("design:type",Object)],xb.prototype,"leaveMotion",void 0),xb=Rb([at("user-settings"),Nb("design:paramtypes",[])],xb);const kb=i`
2030
2030
 
2031
2031
  :host {
2032
2032
  display: block;
@@ -2098,7 +2098,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2098
2098
  letter-spacing: 0.04em;
2099
2099
  }
2100
2100
 
2101
- `;var Gb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Hb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Ub=class extends(wt(Cn)(it)){constructor(){super(),this.subscribe=!1,this.empty="",this._user=!1,this._open=!1,this._photoURL="",this._name="",this._email=""}connectedCallback(){KD(this),super.connectedCallback()}firstUpdated(){this.shadowRoot.querySelector(".toggles").addEventListener("click",()=>{Cn.dispatch(Bn())})}stateChanged(t){this._user=t.session.login,this._open=t.session.drawer,this._photoURL=t.session.photoURL,this._name=t.session.name,this._email=t.session.email}updated(){const t=this.shadowRoot?.querySelector("button"),e=document.querySelector("user-drawer");if(!(t&&e instanceof HTMLElement&&e.id))return;t.setAttribute("aria-controls",e.id);"ariaControlsElements"in t&&(t.ariaControlsElements=[e])}static get styles(){return[Mb,i`:host { border-radius: 10px; }`]}render(){return U`
2101
+ `;var Lb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Fb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Pb=class extends(wt(Cn)(it)){constructor(){super(),this.subscribe=!1,this.empty="",this._user=!1,this._open=!1,this._photoURL="",this._name="",this._email=""}connectedCallback(){$D(this),super.connectedCallback()}firstUpdated(){this.shadowRoot.querySelector(".toggles").addEventListener("click",()=>{Cn.dispatch(Bn())})}stateChanged(t){this._user=t.session.login,this._open=t.session.drawer,this._photoURL=t.session.photoURL,this._name=t.session.name,this._email=t.session.email}updated(){const t=this.shadowRoot?.querySelector("button"),e=document.querySelector("user-drawer");if(!(t&&e instanceof HTMLElement&&e.id))return;t.setAttribute("aria-controls",e.id);"ariaControlsElements"in t&&(t.ariaControlsElements=[e])}static get styles(){return[kb,i`:host { border-radius: 10px; }`]}render(){return U`
2102
2102
 
2103
2103
  <!-- two classes: icon / login -->
2104
2104
  <button
@@ -2114,7 +2114,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2114
2114
 
2115
2115
  </button>
2116
2116
 
2117
- `}face(){if(this._photoURL)return U`<img class="userImage" part="photo" alt="" src="${this._photoURL}">`;const t=QD(this._name,this._email);return t?U`<span class="initials" part="initials" aria-hidden="true">${t}</span>`:this.empty?U`<img class="userImage" part="photo" alt="" src="${this.empty}">`:U`<span class="initials" part="initials" aria-hidden="true">?</span>`}};Gb([lt({type:Boolean,reflect:!0}),Hb("design:type",Object)],Ub.prototype,"subscribe",void 0),Gb([lt({type:String,reflect:!0}),Hb("design:type",Object)],Ub.prototype,"empty",void 0),Gb([ut(),Hb("design:type",Object)],Ub.prototype,"_user",void 0),Gb([ut(),Hb("design:type",Object)],Ub.prototype,"_open",void 0),Gb([ut(),Hb("design:type",Object)],Ub.prototype,"_photoURL",void 0),Gb([ut(),Hb("design:type",Object)],Ub.prototype,"_name",void 0),Gb([ut(),Hb("design:type",Object)],Ub.prototype,"_email",void 0),Ub=Gb([at("user-icon"),Hb("design:paramtypes",[])],Ub);var Vb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},jb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class $b extends it{constructor(){super(),this.active=!1}shouldUpdate(){return this.active}}function Jb(){Cn.dispatch(cn())}function qb(){Cn.dispatch(ln())}function zb(){Cn.dispatch(Bn())}Vb([lt({type:Boolean}),jb("design:type",Boolean)],$b.prototype,"active",void 0);var Kb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Qb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let Wb=class extends $b{constructor(){super(),this.userEmail="",this.status="",this.tone="",this.invalid=!1,this.busy=!1,this.cooldown=0,this.touched=!1,this.timer=0,this.stopDraft=null,this.resetPassword=async t=>{if(t.preventDefault(),this.busy||this.cooldown>0)return;const e=this.renderRoot.querySelector(".email");this.userEmail=(e?e.value:this.userEmail).trim(),e&&e.value!==this.userEmail&&(e.value=this.userEmail);const n=(s=this.userEmail).length<4?{code:"pwa/missing-email",message:"Enter an email address."}:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)?null:{code:"pwa/invalid-email",message:"Enter a valid email address."};var s;if(n)this.showError(n,"email");else{this.busy=!0,this.tone="",this.status="";try{await Ao(Qy,this.userEmail),this.showSent()}catch(t){!function(t){return"auth/user-not-found"===lE(t).code}(t)?this.showFirebase(t):this.showSent()}finally{this.busy=!1}}},this.backToSignIn=()=>{const t=document.querySelector("user-drawer");if(t){const e=t.hasAttribute("subscribe");return Boolean(Cn.getState().session?.registerOne)!==e&&Cn.dispatch(un("drawer")),void Jb()}const e=document.querySelector("user-login");if(!e)return;const n=e.hasAttribute("subscribe");Boolean(Cn.getState().session?.registerTwo)!==n&&Cn.dispatch(un("page")),e.scrollIntoView({block:"nearest"})}}static{this.styles=[VE,jE,UE,$E,i`
2117
+ `}face(){if(this._photoURL)return U`<img class="userImage" part="photo" alt="" src="${this._photoURL}">`;const t=JD(this._name,this._email);return t?U`<span class="initials" part="initials" aria-hidden="true">${t}</span>`:this.empty?U`<img class="userImage" part="photo" alt="" src="${this.empty}">`:U`<span class="initials" part="initials" aria-hidden="true">?</span>`}};Lb([lt({type:Boolean,reflect:!0}),Fb("design:type",Object)],Pb.prototype,"subscribe",void 0),Lb([lt({type:String,reflect:!0}),Fb("design:type",Object)],Pb.prototype,"empty",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"_user",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"_open",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"_photoURL",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"_name",void 0),Lb([ut(),Fb("design:type",Object)],Pb.prototype,"_email",void 0),Pb=Lb([at("user-icon"),Fb("design:paramtypes",[])],Pb);var Mb=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Gb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class Hb extends it{constructor(){super(),this.active=!1}shouldUpdate(){return this.active}}function Ub(){Cn.dispatch(cn())}function Vb(){Cn.dispatch(ln())}function jb(){Cn.dispatch(Bn())}Mb([lt({type:Boolean}),Gb("design:type",Boolean)],Hb.prototype,"active",void 0);var $b=function(t,e,n,s){var r,i=arguments.length,o=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,n):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,s);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(i<3?r(o):i>3?r(e,n,o):r(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Jb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let qb=class extends Hb{constructor(){super(),this.userEmail="",this.status="",this.tone="",this.invalid=!1,this.busy=!1,this.cooldown=0,this.timer=0,this.resetPassword=async t=>{if(t.preventDefault(),this.busy||this.cooldown>0)return;const e=this.renderRoot.querySelector(".email");this.userEmail=(e?e.value:this.userEmail).trim(),e&&e.value!==this.userEmail&&(e.value=this.userEmail);const n=(s=this.userEmail).length<4?{code:"pwa/missing-email",message:"Enter an email address."}:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)?null:{code:"pwa/invalid-email",message:"Enter a valid email address."};var s;if(n)this.showError(n,"email");else{this.busy=!0,this.tone="",this.status="";try{await Ao(Qy,this.userEmail),this.showSent()}catch(t){!function(t){return"auth/user-not-found"===lE(t).code}(t)?this.showFirebase(t):this.showSent()}finally{this.busy=!1}}},this.backToSignIn=()=>{const t=document.querySelector("user-drawer");if(t){const e=t.hasAttribute("subscribe");return Boolean(Cn.getState().session?.registerOne)!==e&&Cn.dispatch(un("drawer")),void Ub()}const e=document.querySelector("user-login");if(!e)return;const n=e.hasAttribute("subscribe");Boolean(Cn.getState().session?.registerTwo)!==n&&Cn.dispatch(un("page")),e.scrollIntoView({block:"nearest"})}}static{this.styles=[VE,jE,UE,$E,i`
2118
2118
  :host {
2119
2119
  display: block;
2120
2120
  background-color: var(--pwa_background, #fff);
@@ -2157,7 +2157,7 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2157
2157
  button.new {
2158
2158
  display: block;
2159
2159
  }
2160
- `]}connectedCallback(){var t;this.hasAttribute("role")||this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Reset password"),super.connectedCallback(),this.stopDraft=(t=()=>{this.prefill()},XE.add(t),()=>{XE.delete(t)}),this.prefill()}disconnectedCallback(){window.clearInterval(this.timer),this.timer=0,this.stopDraft?.(),this.stopDraft=null,super.disconnectedCallback()}updated(){this.paintEmail()}prefill(){if(this.touched)return;const t=t_();t&&t!==this.userEmail&&(this.userEmail=t,this.paintEmail())}paintEmail(){if(this.touched)return;const t=this.renderRoot.querySelector(".email");t&&!t.value&&this.userEmail&&(t.value=this.userEmail)}handleEmail(t){const e=t.target;this.touched=!0,this.userEmail=e.value,this.invalid&&(this.invalid=!1)}buttonLabel(){return this.busy?"Sending…":this.cooldown>0?`Send again in ${this.cooldown}s`:"Send reset email"}render(){const t="pwa-reset-status";return U`
2160
+ `]}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","region"),this.hasAttribute("aria-label")||this.setAttribute("aria-label","Reset password"),super.connectedCallback()}disconnectedCallback(){window.clearInterval(this.timer),this.timer=0,super.disconnectedCallback()}handleEmail(t){const e=t.target;this.userEmail=e.value,this.invalid&&(this.invalid=!1)}buttonLabel(){return this.busy?"Sending…":this.cooldown>0?`Send again in ${this.cooldown}s`:"Send reset email"}render(){const t="pwa-reset-status";return U`
2161
2161
 
2162
2162
  <form
2163
2163
  class="resetPass"
@@ -2207,4 +2207,4 @@ const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow
2207
2207
 
2208
2208
  </form>
2209
2209
 
2210
- `}showSent(){this.tone="",this.status="If an account uses that email, a reset link is on its way.",this.invalid=!1,this.cooldown=45,this.armCooldown(),cE(IE,{email:this.userEmail}),this.updateComplete.then(()=>{this.focusStatus()})}showError(t,e){this.tone="error",this.status=HE(t),this.invalid="email"===e,cE(AE,t),this.updateComplete.then(()=>{this.focusAfter(e)})}showFirebase(t){const e=lE(t);this.tone="error",this.status=HE(t),this.invalid="auth/invalid-email"===e.code,cE(AE,e),this.updateComplete.then(()=>{this.focusAfter(this.invalid?"email":"status")})}focusAfter(t){"email"===t?this.focusEmail():this.focusStatus()}focusEmail(){const t=this.renderRoot.querySelector(".email");t?.focus()}focusStatus(){const t=this.renderRoot.querySelector("#pwa-reset-status");t?.focus()}armCooldown(){window.clearInterval(this.timer),this.timer=window.setInterval(()=>{if(this.cooldown<=1)return this.cooldown=0,window.clearInterval(this.timer),void(this.timer=0);this.cooldown-=1},1e3)}};function Yb(){return nE()?BE(Qy.currentUser):null}function Xb(t){let e,n=!1;return sE(()=>{n||(e=Lo(Qy,e=>{t(BE(e))}))}),()=>{n=!0,e&&e()}}Kb([ut(),Qb("design:type",String)],Wb.prototype,"userEmail",void 0),Kb([ut(),Qb("design:type",String)],Wb.prototype,"status",void 0),Kb([ut(),Qb("design:type",String)],Wb.prototype,"tone",void 0),Kb([ut(),Qb("design:type",Boolean)],Wb.prototype,"invalid",void 0),Kb([ut(),Qb("design:type",Boolean)],Wb.prototype,"busy",void 0),Kb([ut(),Qb("design:type",Number)],Wb.prototype,"cooldown",void 0),Wb=Kb([at("email-reset"),Qb("design:paramtypes",[])],Wb);export{Wb as EmailReset,fb as UserDrawer,Ub as UserIcon,ZD as UserLogin,Pb as UserSettings,qy as application,Qy as auth,qb as closeDrawer,zy as db,OD as deleteDocument,NE as eventName,Wy as firebaseConfig,Yb as getCurrentUser,iE as initialize,GD as isEmailVerified,ID as logAccount,TD as logAccountDelete,vD as logOut,Xb as onUserChanged,Jb as openDrawer,_E as pwaAccountDeleted,mE as pwaAuthChanged,AE as pwaAuthError,DD as pwaDrawerToggle,TE as pwaDrawerToggleName,bE as pwaEmailChanged,RE as pwaEmailVerified,wE as pwaLogin,yE as pwaLogout,vE as pwaPasswordChanged,DE as pwaProfileUpdated,IE as pwaResetSent,OE as pwaSettings,EE as pwaSignup,SE as pwaVerificationSent,bD as reauthenticate,MD as sendVerification,Ky as storage,zb as toggleDrawer,Yy as user,vb as userEmailChanged};
2210
+ `}showSent(){this.tone="",this.status="If an account uses that email, a reset link is on its way.",this.invalid=!1,this.cooldown=45,this.armCooldown(),cE(IE,{email:this.userEmail}),this.updateComplete.then(()=>{this.focusStatus()})}showError(t,e){this.tone="error",this.status=HE(t),this.invalid="email"===e,cE(AE,t),this.updateComplete.then(()=>{this.focusAfter(e)})}showFirebase(t){const e=lE(t);this.tone="error",this.status=HE(t),this.invalid="auth/invalid-email"===e.code,cE(AE,e),this.updateComplete.then(()=>{this.focusAfter(this.invalid?"email":"status")})}focusAfter(t){"email"===t?this.focusEmail():this.focusStatus()}focusEmail(){const t=this.renderRoot.querySelector(".email");t?.focus()}focusStatus(){const t=this.renderRoot.querySelector("#pwa-reset-status");t?.focus()}armCooldown(){window.clearInterval(this.timer),this.timer=window.setInterval(()=>{if(this.cooldown<=1)return this.cooldown=0,window.clearInterval(this.timer),void(this.timer=0);this.cooldown-=1},1e3)}};function zb(){return nE()?BE(Qy.currentUser):null}function Kb(t){let e,n=!1;return sE(()=>{n||(e=Lo(Qy,e=>{t(BE(e))}))}),()=>{n=!0,e&&e()}}$b([ut(),Jb("design:type",String)],qb.prototype,"userEmail",void 0),$b([ut(),Jb("design:type",String)],qb.prototype,"status",void 0),$b([ut(),Jb("design:type",String)],qb.prototype,"tone",void 0),$b([ut(),Jb("design:type",Boolean)],qb.prototype,"invalid",void 0),$b([ut(),Jb("design:type",Boolean)],qb.prototype,"busy",void 0),$b([ut(),Jb("design:type",Number)],qb.prototype,"cooldown",void 0),qb=$b([at("email-reset"),Jb("design:paramtypes",[])],qb);export{qb as EmailReset,ub as UserDrawer,Pb as UserIcon,QD as UserLogin,xb as UserSettings,qy as application,Qy as auth,Vb as closeDrawer,zy as db,bD as deleteDocument,NE as eventName,Wy as firebaseConfig,zb as getCurrentUser,iE as initialize,LD as isEmailVerified,_D as logAccount,DD as logAccountDelete,ED as logOut,Kb as onUserChanged,Ub as openDrawer,_E as pwaAccountDeleted,mE as pwaAuthChanged,AE as pwaAuthError,wD as pwaDrawerToggle,TE as pwaDrawerToggleName,bE as pwaEmailChanged,RE as pwaEmailVerified,wE as pwaLogin,yE as pwaLogout,vE as pwaPasswordChanged,DE as pwaProfileUpdated,IE as pwaResetSent,OE as pwaSettings,EE as pwaSignup,SE as pwaVerificationSent,yD as reauthenticate,kD as sendVerification,Ky as storage,jb as toggleDrawer,Yy as user,Eb as userEmailChanged};