cloudcommerce 0.0.75 → 0.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/extensions.json +2 -1
- package/.vscode/settings.json +9 -0
- package/CHANGELOG.md +17 -0
- package/package.json +1 -1
- package/packages/api/package.json +1 -1
- package/packages/apps/correios/package.json +1 -1
- package/packages/apps/custom-shipping/package.json +1 -1
- package/packages/apps/discounts/package.json +1 -1
- package/packages/apps/frenet/package.json +1 -1
- package/packages/apps/tiny-erp/package.json +1 -1
- package/packages/cli/config/firebase.json +7 -0
- package/packages/cli/package.json +1 -1
- package/packages/config/package.json +1 -1
- package/packages/events/package.json +1 -1
- package/packages/firebase/package.json +1 -1
- package/packages/modules/package.json +1 -1
- package/packages/passport/package.json +1 -1
- package/packages/ssr/package.json +1 -1
- package/packages/storefront/astro.config.mjs +9 -3
- package/packages/storefront/dist/client/assets/_...3d331176.css +1 -0
- package/packages/storefront/dist/client/assets/{fallback.9cd2ed3f.css → _...b330a555.css} +1 -1
- package/packages/storefront/dist/client/assets/_...c1ec409f.css +4 -0
- package/packages/storefront/dist/client/assets/fallback-index.552fd862.css +1 -0
- package/packages/storefront/dist/client/assets/{_...27b7eb4d.css → fallback.a3f85892.css} +1 -1
- package/packages/storefront/dist/client/assets/{index.c5a9ea80.css → index.73f26ab5.css} +1 -1
- package/packages/storefront/dist/client/client.80baece3.js +1 -0
- package/packages/storefront/dist/client/hoisted.61a32b69.js +661 -0
- package/packages/storefront/dist/server/entry.mjs +326 -161
- package/packages/storefront/package.json +6 -1
- package/packages/storefront/src/html.d.ts +23 -0
- package/packages/storefront/src/lib/components/Card.astro +1 -1
- package/packages/storefront/src/lib/components/LoginModal.vue +14 -20
- package/packages/storefront/src/lib/layouts/Base.astro +129 -0
- package/packages/storefront/src/lib/layouts/Checkout.astro +0 -0
- package/packages/storefront/src/lib/layouts/Pages.astro +30 -0
- package/packages/storefront/src/lib/layouts/meta/Head.astro +62 -1
- package/packages/storefront/src/lib/layouts/meta/Json.astro +49 -10
- package/packages/storefront/src/lib/main/Home.astro +84 -0
- package/packages/storefront/src/lib/main/Wildcard.astro +0 -0
- package/packages/storefront/src/lib/ssr-context.ts +2 -1
- package/packages/storefront/src/lib/views/[...slug].astro +3 -3
- package/packages/storefront/src/lib/views/fallback.astro +5 -3
- package/packages/storefront/src/lib/views/index.astro +4 -3
- package/packages/storefront/src/pages/index.astro +7 -2
- package/packages/storefront/tailwind.config.ts +0 -0
- package/packages/storefront/uno.config.ts +98 -0
- package/packages/types/package.json +1 -1
- package/packages/storefront/dist/client/LoginModal.d6b935cf.js +0 -1
- package/packages/storefront/dist/client/assets/_...b3f65c5c.css +0 -1
- package/packages/storefront/dist/client/assets/fallback-index.90217cf0.css +0 -1
- package/packages/storefront/dist/client/chunks/index.esm.69f70489.js +0 -1726
- package/packages/storefront/dist/client/chunks/index.esm2017.1194d1a1.js +0 -457
- package/packages/storefront/dist/client/chunks/runtime-core.esm-bundler.a7337834.js +0 -1
- package/packages/storefront/dist/client/client.80b904f3.js +0 -1
- package/packages/storefront/dist/client/hoisted.24787260.js +0 -376
- package/packages/storefront/src/lib/layouts/Layout.astro +0 -84
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as N,d as p,e as M,f as x,g as O,h as I,j as B,k as T,l as w,m as z,n as q,p as D,q as _,s as W,u as $,v as u}from"./chunks/runtime-core.esm-bundler.a7337834.js";const j="http://www.w3.org/2000/svg",a=typeof document<"u"?document:null,g=a&&a.createElement("template"),F={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const r=t?a.createElementNS(j,e):a.createElement(e,n?{is:n}:void 0);return e==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:e=>a.createTextNode(e),createComment:e=>a.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>a.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,i,r,s){const c=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===s||!(r=r.nextSibling)););else{g.innerHTML=i?`<svg>${e}</svg>`:e;const o=g.content;if(i){const f=o.firstChild;for(;f.firstChild;)o.appendChild(f.firstChild);o.removeChild(f)}t.insertBefore(o,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function U(e,t,n){const i=e._vtc;i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function X(e,t,n){const i=e.style,r=p(n);if(n&&!r){for(const s in n)m(i,s,n[s]);if(t&&!p(t))for(const s in t)n[s]==null&&m(i,s,"")}else{const s=i.display;r?t!==n&&(i.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(i.display=s)}}const S=/\s*!important$/;function m(e,t,n){if(T(n))n.forEach(i=>m(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=G(e,t);S.test(n)?e.setProperty(w(i),n.replace(S,""),"important"):e[i]=n}}const b=["Webkit","Moz","ms"],d={};function G(e,t){const n=d[t];if(n)return n;let i=z(t);if(i!=="filter"&&i in e)return d[t]=i;i=q(i);for(let r=0;r<b.length;r++){const s=b[r]+i;if(s in e)return d[t]=s}return t}const A="http://www.w3.org/1999/xlink";function J(e,t,n,i,r){if(i&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(A,t.slice(6,t.length)):e.setAttributeNS(A,t,n);else{const s=D(t);n==null||s&&!_(n)?e.removeAttribute(t):e.setAttribute(t,s?"":n)}}function K(e,t,n,i,r,s,c){if(t==="innerHTML"||t==="textContent"){i&&c(i,r,s),e[t]=n??"";return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const f=n??"";(e.value!==f||e.tagName==="OPTION")&&(e.value=f),n==null&&e.removeAttribute(t);return}let o=!1;if(n===""||n==null){const f=typeof e[t];f==="boolean"?n=_(n):n==null&&f==="string"?(n="",o=!0):f==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(t)}const[P,Q]=(()=>{let e=Date.now,t=!1;if(typeof window<"u"){Date.now()>document.createEvent("Event").timeStamp&&(e=performance.now.bind(performance));const n=navigator.userAgent.match(/firefox\/(\d+)/i);t=!!(n&&Number(n[1])<=53)}return[e,t]})();let h=0;const Y=Promise.resolve(),Z=()=>{h=0},V=()=>h||(Y.then(Z),h=P());function y(e,t,n,i){e.addEventListener(t,n,i)}function k(e,t,n,i){e.removeEventListener(t,n,i)}function tt(e,t,n,i,r=null){const s=e._vei||(e._vei={}),c=s[t];if(i&&c)c.value=i;else{const[o,f]=et(t);if(i){const R=s[t]=nt(i,r);y(e,o,R,f)}else c&&(k(e,o,c,f),s[t]=void 0)}}const E=/(?:Once|Passive|Capture)$/;function et(e){let t;if(E.test(e)){t={};let i;for(;i=e.match(E);)e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):w(e.slice(2)),t]}function nt(e,t){const n=i=>{const r=i.timeStamp||P();(Q||r>=n.attached-1)&&W(it(i,n.value),t,5,[i])};return n.value=e,n.attached=V(),n}function it(e,t){if(T(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(i=>r=>!r._stopped&&i&&i(r))}else return t}const C=/^on[a-z]/,rt=(e,t,n,i,r=!1,s,c,o,f)=>{t==="class"?U(e,i,r):t==="style"?X(e,n,i):I(t)?B(t)||tt(e,t,n,i,c):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):st(e,t,i,r))?K(e,t,i,s,c,o,f):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),J(e,t,i,r))};function st(e,t,n,i){return i?!!(t==="innerHTML"||t==="textContent"||t in e&&C.test(t)&&N(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||C.test(t)&&p(n)?!1:t in e}const H=O({patchProp:rt},F);let l,v=!1;function ot(){return l||(l=M(H))}function ct(){return l=v?l:x(H),v=!0,l}const ft=(...e)=>{const t=ot().createApp(...e),{mount:n}=t;return t.mount=i=>{const r=L(i);if(!r)return;const s=t._component;!N(s)&&!s.render&&!s.template&&(s.template=r.innerHTML),r.innerHTML="";const c=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),c},t},at=(...e)=>{const t=ct().createApp(...e),{mount:n}=t;return t.mount=i=>{const r=L(i);if(r)return n(r,!0,r instanceof SVGElement)},t};function L(e){return p(e)?document.querySelector(e):e}const lt=$({props:{value:String,name:String},setup({name:e,value:t}){return t?()=>u("astro-slot",{name:e,innerHTML:t}):()=>null}}),pt=e=>(t,n,i,{client:r})=>{if(delete n.class,!e.hasAttribute("ssr"))return;const s=t.name?`${t.name} Host`:void 0,c={};for(const[o,f]of Object.entries(i))c[o]=()=>u(lt,{value:f,name:o==="default"?void 0:o});r==="only"?ft({name:s,render:()=>u(t,n,c)}).mount(e,!1):at({name:s,render:()=>u(t,n,c)}).mount(e,!0)};export{pt as default};
|
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
import{f as F,r as b,_ as T,E as U,C as v,a as C,F as H,o as Ie,g as Y,b as ye,d as be,L as Te,i as ve,c as j,e as Ae,v as Se,h as Ce}from"./chunks/index.esm2017.1194d1a1.js";var Ee="firebase",ke="9.9.4";/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/F.registerVersion(Ee,ke,"app-compat");const W="@firebase/installations",P="0.5.12";/**
|
|
17
|
-
* @license
|
|
18
|
-
* Copyright 2019 Google LLC
|
|
19
|
-
*
|
|
20
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21
|
-
* you may not use this file except in compliance with the License.
|
|
22
|
-
* You may obtain a copy of the License at
|
|
23
|
-
*
|
|
24
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
-
*
|
|
26
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
27
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
28
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
|
-
* See the License for the specific language governing permissions and
|
|
30
|
-
* limitations under the License.
|
|
31
|
-
*/const J=1e4,X=`w:${P}`,Z="FIS_v2",Re="https://firebaseinstallations.googleapis.com/v1",_e=60*60*1e3,De="installations",Oe="Installations";/**
|
|
32
|
-
* @license
|
|
33
|
-
* Copyright 2019 Google LLC
|
|
34
|
-
*
|
|
35
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
36
|
-
* you may not use this file except in compliance with the License.
|
|
37
|
-
* You may obtain a copy of the License at
|
|
38
|
-
*
|
|
39
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
40
|
-
*
|
|
41
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
42
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
43
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
44
|
-
* See the License for the specific language governing permissions and
|
|
45
|
-
* limitations under the License.
|
|
46
|
-
*/const Fe={["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."},w=new U(De,Oe,Fe);function Q(e){return e instanceof H&&e.code.includes("request-failed")}/**
|
|
47
|
-
* @license
|
|
48
|
-
* Copyright 2019 Google LLC
|
|
49
|
-
*
|
|
50
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
51
|
-
* you may not use this file except in compliance with the License.
|
|
52
|
-
* You may obtain a copy of the License at
|
|
53
|
-
*
|
|
54
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
55
|
-
*
|
|
56
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
57
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
58
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
59
|
-
* See the License for the specific language governing permissions and
|
|
60
|
-
* limitations under the License.
|
|
61
|
-
*/function ee({projectId:e}){return`${Re}/projects/${e}/installations`}function te(e){return{token:e.token,requestStatus:2,expiresIn:Me(e.expiresIn),creationTime:Date.now()}}async function ne(e,t){const a=(await t.json()).error;return w.create("request-failed",{requestName:e,serverCode:a.code,serverMessage:a.message,serverStatus:a.status})}function ae({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Pe(e,{refreshToken:t}){const n=ae(e);return n.append("Authorization",$e(t)),n}async function ie(e){const t=await e();return t.status>=500&&t.status<600?e():t}function Me(e){return Number(e.replace("s","000"))}function $e(e){return`${Z} ${e}`}/**
|
|
62
|
-
* @license
|
|
63
|
-
* Copyright 2019 Google LLC
|
|
64
|
-
*
|
|
65
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
66
|
-
* you may not use this file except in compliance with the License.
|
|
67
|
-
* You may obtain a copy of the License at
|
|
68
|
-
*
|
|
69
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
70
|
-
*
|
|
71
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
72
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
73
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
74
|
-
* See the License for the specific language governing permissions and
|
|
75
|
-
* limitations under the License.
|
|
76
|
-
*/async function Ne({appConfig:e,heartbeatServiceProvider:t},{fid:n}){const a=ee(e),i=ae(e),s=t.getImmediate({optional:!0});if(s){const l=await s.getHeartbeatsHeader();l&&i.append("x-firebase-client",l)}const r={fid:n,authVersion:Z,appId:e.appId,sdkVersion:X},o={method:"POST",headers:i,body:JSON.stringify(r)},c=await ie(()=>fetch(a,o));if(c.ok){const l=await c.json();return{fid:l.fid||n,registrationStatus:2,refreshToken:l.refreshToken,authToken:te(l.authToken)}}else throw await ne("Create Installation",c)}/**
|
|
77
|
-
* @license
|
|
78
|
-
* Copyright 2019 Google LLC
|
|
79
|
-
*
|
|
80
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
81
|
-
* you may not use this file except in compliance with the License.
|
|
82
|
-
* You may obtain a copy of the License at
|
|
83
|
-
*
|
|
84
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
85
|
-
*
|
|
86
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
87
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
88
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
89
|
-
* See the License for the specific language governing permissions and
|
|
90
|
-
* limitations under the License.
|
|
91
|
-
*/function se(e){return new Promise(t=>{setTimeout(t,e)})}/**
|
|
92
|
-
* @license
|
|
93
|
-
* Copyright 2019 Google LLC
|
|
94
|
-
*
|
|
95
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
96
|
-
* you may not use this file except in compliance with the License.
|
|
97
|
-
* You may obtain a copy of the License at
|
|
98
|
-
*
|
|
99
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
100
|
-
*
|
|
101
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
102
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
103
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
104
|
-
* See the License for the specific language governing permissions and
|
|
105
|
-
* limitations under the License.
|
|
106
|
-
*/function je(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_")}/**
|
|
107
|
-
* @license
|
|
108
|
-
* Copyright 2019 Google LLC
|
|
109
|
-
*
|
|
110
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
111
|
-
* you may not use this file except in compliance with the License.
|
|
112
|
-
* You may obtain a copy of the License at
|
|
113
|
-
*
|
|
114
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
115
|
-
*
|
|
116
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
117
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
118
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
119
|
-
* See the License for the specific language governing permissions and
|
|
120
|
-
* limitations under the License.
|
|
121
|
-
*/const xe=/^[cdef][\w-]{21}$/,O="";function qe(){try{const e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;const n=Le(e);return xe.test(n)?n:O}catch{return O}}function Le(e){return je(e).substr(0,22)}/**
|
|
122
|
-
* @license
|
|
123
|
-
* Copyright 2019 Google LLC
|
|
124
|
-
*
|
|
125
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
126
|
-
* you may not use this file except in compliance with the License.
|
|
127
|
-
* You may obtain a copy of the License at
|
|
128
|
-
*
|
|
129
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
130
|
-
*
|
|
131
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
132
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
133
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
134
|
-
* See the License for the specific language governing permissions and
|
|
135
|
-
* limitations under the License.
|
|
136
|
-
*/function E(e){return`${e.appName}!${e.appId}`}/**
|
|
137
|
-
* @license
|
|
138
|
-
* Copyright 2019 Google LLC
|
|
139
|
-
*
|
|
140
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
141
|
-
* you may not use this file except in compliance with the License.
|
|
142
|
-
* You may obtain a copy of the License at
|
|
143
|
-
*
|
|
144
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
145
|
-
*
|
|
146
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
147
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
148
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
149
|
-
* See the License for the specific language governing permissions and
|
|
150
|
-
* limitations under the License.
|
|
151
|
-
*/const re=new Map;function oe(e,t){const n=E(e);ce(n,t),Be(n,t)}function ce(e,t){const n=re.get(e);if(!!n)for(const a of n)a(t)}function Be(e,t){const n=Ve();n&&n.postMessage({key:e,fid:t}),ze()}let m=null;function Ve(){return!m&&"BroadcastChannel"in self&&(m=new BroadcastChannel("[Firebase] FID Change"),m.onmessage=e=>{ce(e.data.key,e.data.fid)}),m}function ze(){re.size===0&&m&&(m.close(),m=null)}/**
|
|
152
|
-
* @license
|
|
153
|
-
* Copyright 2019 Google LLC
|
|
154
|
-
*
|
|
155
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
156
|
-
* you may not use this file except in compliance with the License.
|
|
157
|
-
* You may obtain a copy of the License at
|
|
158
|
-
*
|
|
159
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
160
|
-
*
|
|
161
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
162
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
163
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
164
|
-
* See the License for the specific language governing permissions and
|
|
165
|
-
* limitations under the License.
|
|
166
|
-
*/const Ge="firebase-installations-database",Ke=1,I="firebase-installations-store";let R=null;function M(){return R||(R=Ie(Ge,Ke,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(I)}}})),R}async function A(e,t){const n=E(e),i=(await M()).transaction(I,"readwrite"),s=i.objectStore(I),r=await s.get(n);return await s.put(t,n),await i.done,(!r||r.fid!==t.fid)&&oe(e,t.fid),t}async function le(e){const t=E(e),a=(await M()).transaction(I,"readwrite");await a.objectStore(I).delete(t),await a.done}async function k(e,t){const n=E(e),i=(await M()).transaction(I,"readwrite"),s=i.objectStore(I),r=await s.get(n),o=t(r);return o===void 0?await s.delete(n):await s.put(o,n),await i.done,o&&(!r||r.fid!==o.fid)&&oe(e,o.fid),o}/**
|
|
167
|
-
* @license
|
|
168
|
-
* Copyright 2019 Google LLC
|
|
169
|
-
*
|
|
170
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
171
|
-
* you may not use this file except in compliance with the License.
|
|
172
|
-
* You may obtain a copy of the License at
|
|
173
|
-
*
|
|
174
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
175
|
-
*
|
|
176
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
177
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
178
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
179
|
-
* See the License for the specific language governing permissions and
|
|
180
|
-
* limitations under the License.
|
|
181
|
-
*/async function $(e){let t;const n=await k(e.appConfig,a=>{const i=Ue(a),s=He(e,i);return t=s.registrationPromise,s.installationEntry});return n.fid===O?{installationEntry:await t}:{installationEntry:n,registrationPromise:t}}function Ue(e){const t=e||{fid:qe(),registrationStatus:0};return ue(t)}function He(e,t){if(t.registrationStatus===0){if(!navigator.onLine){const i=Promise.reject(w.create("app-offline"));return{installationEntry:t,registrationPromise:i}}const n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},a=Ye(e,n);return{installationEntry:n,registrationPromise:a}}else return t.registrationStatus===1?{installationEntry:t,registrationPromise:We(e)}:{installationEntry:t}}async function Ye(e,t){try{const n=await Ne(e,t);return A(e.appConfig,n)}catch(n){throw Q(n)&&n.customData.serverCode===409?await le(e.appConfig):await A(e.appConfig,{fid:t.fid,registrationStatus:0}),n}}async function We(e){let t=await x(e.appConfig);for(;t.registrationStatus===1;)await se(100),t=await x(e.appConfig);if(t.registrationStatus===0){const{installationEntry:n,registrationPromise:a}=await $(e);return a||n}return t}function x(e){return k(e,t=>{if(!t)throw w.create("installation-not-found");return ue(t)})}function ue(e){return Je(e)?{fid:e.fid,registrationStatus:0}:e}function Je(e){return e.registrationStatus===1&&e.registrationTime+J<Date.now()}/**
|
|
182
|
-
* @license
|
|
183
|
-
* Copyright 2019 Google LLC
|
|
184
|
-
*
|
|
185
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
186
|
-
* you may not use this file except in compliance with the License.
|
|
187
|
-
* You may obtain a copy of the License at
|
|
188
|
-
*
|
|
189
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
190
|
-
*
|
|
191
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
192
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
193
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
194
|
-
* See the License for the specific language governing permissions and
|
|
195
|
-
* limitations under the License.
|
|
196
|
-
*/async function Xe({appConfig:e,heartbeatServiceProvider:t},n){const a=Ze(e,n),i=Pe(e,n),s=t.getImmediate({optional:!0});if(s){const l=await s.getHeartbeatsHeader();l&&i.append("x-firebase-client",l)}const r={installation:{sdkVersion:X,appId:e.appId}},o={method:"POST",headers:i,body:JSON.stringify(r)},c=await ie(()=>fetch(a,o));if(c.ok){const l=await c.json();return te(l)}else throw await ne("Generate Auth Token",c)}function Ze(e,{fid:t}){return`${ee(e)}/${t}/authTokens:generate`}/**
|
|
197
|
-
* @license
|
|
198
|
-
* Copyright 2019 Google LLC
|
|
199
|
-
*
|
|
200
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
201
|
-
* you may not use this file except in compliance with the License.
|
|
202
|
-
* You may obtain a copy of the License at
|
|
203
|
-
*
|
|
204
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
205
|
-
*
|
|
206
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
207
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
208
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
209
|
-
* See the License for the specific language governing permissions and
|
|
210
|
-
* limitations under the License.
|
|
211
|
-
*/async function N(e,t=!1){let n;const a=await k(e.appConfig,s=>{if(!de(s))throw w.create("not-registered");const r=s.authToken;if(!t&&tt(r))return s;if(r.requestStatus===1)return n=Qe(e,t),s;{if(!navigator.onLine)throw w.create("app-offline");const o=at(s);return n=et(e,o),o}});return n?await n:a.authToken}async function Qe(e,t){let n=await q(e.appConfig);for(;n.authToken.requestStatus===1;)await se(100),n=await q(e.appConfig);const a=n.authToken;return a.requestStatus===0?N(e,t):a}function q(e){return k(e,t=>{if(!de(t))throw w.create("not-registered");const n=t.authToken;return it(n)?Object.assign(Object.assign({},t),{authToken:{requestStatus:0}}):t})}async function et(e,t){try{const n=await Xe(e,t),a=Object.assign(Object.assign({},t),{authToken:n});return await A(e.appConfig,a),n}catch(n){if(Q(n)&&(n.customData.serverCode===401||n.customData.serverCode===404))await le(e.appConfig);else{const a=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});await A(e.appConfig,a)}throw n}}function de(e){return e!==void 0&&e.registrationStatus===2}function tt(e){return e.requestStatus===2&&!nt(e)}function nt(e){const t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+_e}function at(e){const t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}function it(e){return e.requestStatus===1&&e.requestTime+J<Date.now()}/**
|
|
212
|
-
* @license
|
|
213
|
-
* Copyright 2019 Google LLC
|
|
214
|
-
*
|
|
215
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
216
|
-
* you may not use this file except in compliance with the License.
|
|
217
|
-
* You may obtain a copy of the License at
|
|
218
|
-
*
|
|
219
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
220
|
-
*
|
|
221
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
222
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
223
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
224
|
-
* See the License for the specific language governing permissions and
|
|
225
|
-
* limitations under the License.
|
|
226
|
-
*/async function st(e){const t=e,{installationEntry:n,registrationPromise:a}=await $(t);return a?a.catch(console.error):N(t).catch(console.error),n.fid}/**
|
|
227
|
-
* @license
|
|
228
|
-
* Copyright 2019 Google LLC
|
|
229
|
-
*
|
|
230
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
231
|
-
* you may not use this file except in compliance with the License.
|
|
232
|
-
* You may obtain a copy of the License at
|
|
233
|
-
*
|
|
234
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
235
|
-
*
|
|
236
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
237
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
238
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
239
|
-
* See the License for the specific language governing permissions and
|
|
240
|
-
* limitations under the License.
|
|
241
|
-
*/async function rt(e,t=!1){const n=e;return await ot(n),(await N(n,t)).token}async function ot(e){const{registrationPromise:t}=await $(e);t&&await t}/**
|
|
242
|
-
* @license
|
|
243
|
-
* Copyright 2019 Google LLC
|
|
244
|
-
*
|
|
245
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
246
|
-
* you may not use this file except in compliance with the License.
|
|
247
|
-
* You may obtain a copy of the License at
|
|
248
|
-
*
|
|
249
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
250
|
-
*
|
|
251
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
252
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
253
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
254
|
-
* See the License for the specific language governing permissions and
|
|
255
|
-
* limitations under the License.
|
|
256
|
-
*/function ct(e){if(!e||!e.options)throw _("App Configuration");if(!e.name)throw _("App Name");const t=["projectId","apiKey","appId"];for(const n of t)if(!e.options[n])throw _(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}function _(e){return w.create("missing-app-config-values",{valueName:e})}/**
|
|
257
|
-
* @license
|
|
258
|
-
* Copyright 2020 Google LLC
|
|
259
|
-
*
|
|
260
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
261
|
-
* you may not use this file except in compliance with the License.
|
|
262
|
-
* You may obtain a copy of the License at
|
|
263
|
-
*
|
|
264
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
265
|
-
*
|
|
266
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
267
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
268
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
269
|
-
* See the License for the specific language governing permissions and
|
|
270
|
-
* limitations under the License.
|
|
271
|
-
*/const fe="installations",lt="installations-internal",ut=e=>{const t=e.getProvider("app").getImmediate(),n=ct(t),a=C(t,"heartbeat");return{app:t,appConfig:n,heartbeatServiceProvider:a,_delete:()=>Promise.resolve()}},dt=e=>{const t=e.getProvider("app").getImmediate(),n=C(t,fe).getImmediate();return{getId:()=>st(n),getToken:i=>rt(n,i)}};function ft(){T(new v(fe,ut,"PUBLIC")),T(new v(lt,dt,"PRIVATE"))}ft();b(W,P);b(W,P,"esm2017");/**
|
|
272
|
-
* @license
|
|
273
|
-
* Copyright 2019 Google LLC
|
|
274
|
-
*
|
|
275
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
276
|
-
* you may not use this file except in compliance with the License.
|
|
277
|
-
* You may obtain a copy of the License at
|
|
278
|
-
*
|
|
279
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
280
|
-
*
|
|
281
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
282
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
283
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
284
|
-
* See the License for the specific language governing permissions and
|
|
285
|
-
* limitations under the License.
|
|
286
|
-
*/const S="analytics",pt="firebase_id",gt="origin",ht=60*1e3,mt="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",pe="https://www.googletagmanager.com/gtag/js";/**
|
|
287
|
-
* @license
|
|
288
|
-
* Copyright 2019 Google LLC
|
|
289
|
-
*
|
|
290
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
291
|
-
* you may not use this file except in compliance with the License.
|
|
292
|
-
* You may obtain a copy of the License at
|
|
293
|
-
*
|
|
294
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
295
|
-
*
|
|
296
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
297
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
298
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
299
|
-
* See the License for the specific language governing permissions and
|
|
300
|
-
* limitations under the License.
|
|
301
|
-
*/const d=new Te("@firebase/analytics");/**
|
|
302
|
-
* @license
|
|
303
|
-
* Copyright 2019 Google LLC
|
|
304
|
-
*
|
|
305
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
306
|
-
* you may not use this file except in compliance with the License.
|
|
307
|
-
* You may obtain a copy of the License at
|
|
308
|
-
*
|
|
309
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
310
|
-
*
|
|
311
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
312
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
313
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
314
|
-
* See the License for the specific language governing permissions and
|
|
315
|
-
* limitations under the License.
|
|
316
|
-
*/function ge(e){return Promise.all(e.map(t=>t.catch(n=>n)))}function wt(e,t){const n=document.createElement("script");n.src=`${pe}?l=${e}&id=${t}`,n.async=!0,document.head.appendChild(n)}function It(e){let t=[];return Array.isArray(window[e])?t=window[e]:window[e]=t,t}async function yt(e,t,n,a,i,s){const r=a[i];try{if(r)await t[r];else{const c=(await ge(n)).find(l=>l.measurementId===i);c&&await t[c.appId]}}catch(o){d.error(o)}e("config",i,s)}async function bt(e,t,n,a,i){try{let s=[];if(i&&i.send_to){let r=i.send_to;Array.isArray(r)||(r=[r]);const o=await ge(n);for(const c of r){const l=o.find(g=>g.measurementId===c),u=l&&t[l.appId];if(u)s.push(u);else{s=[];break}}}s.length===0&&(s=Object.values(t)),await Promise.all(s),e("event",a,i||{})}catch(s){d.error(s)}}function Tt(e,t,n,a){async function i(s,r,o){try{s==="event"?await bt(e,t,n,r,o):s==="config"?await yt(e,t,n,a,r,o):s==="consent"?e("consent","update",o):e("set",r)}catch(c){d.error(c)}}return i}function vt(e,t,n,a,i){let s=function(...r){window[a].push(arguments)};return window[i]&&typeof window[i]=="function"&&(s=window[i]),window[i]=Tt(s,e,t,n),{gtagCore:s,wrappedGtag:window[i]}}function At(){const e=window.document.getElementsByTagName("script");for(const t of Object.values(e))if(t.src&&t.src.includes(pe))return t;return null}/**
|
|
317
|
-
* @license
|
|
318
|
-
* Copyright 2019 Google LLC
|
|
319
|
-
*
|
|
320
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
321
|
-
* you may not use this file except in compliance with the License.
|
|
322
|
-
* You may obtain a copy of the License at
|
|
323
|
-
*
|
|
324
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
325
|
-
*
|
|
326
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
327
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
328
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
329
|
-
* See the License for the specific language governing permissions and
|
|
330
|
-
* limitations under the License.
|
|
331
|
-
*/const St={["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-intialized 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.'},f=new U("analytics","Analytics",St);/**
|
|
332
|
-
* @license
|
|
333
|
-
* Copyright 2020 Google LLC
|
|
334
|
-
*
|
|
335
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
336
|
-
* you may not use this file except in compliance with the License.
|
|
337
|
-
* You may obtain a copy of the License at
|
|
338
|
-
*
|
|
339
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
340
|
-
*
|
|
341
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
342
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
343
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
344
|
-
* See the License for the specific language governing permissions and
|
|
345
|
-
* limitations under the License.
|
|
346
|
-
*/const Ct=30,Et=1e3;class kt{constructor(t={},n=Et){this.throttleMetadata=t,this.intervalMillis=n}getThrottleMetadata(t){return this.throttleMetadata[t]}setThrottleMetadata(t,n){this.throttleMetadata[t]=n}deleteThrottleMetadata(t){delete this.throttleMetadata[t]}}const he=new kt;function Rt(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}async function _t(e){var t;const{appId:n,apiKey:a}=e,i={method:"GET",headers:Rt(a)},s=mt.replace("{app-id}",n),r=await fetch(s,i);if(r.status!==200&&r.status!==304){let o="";try{const c=await r.json();!((t=c.error)===null||t===void 0)&&t.message&&(o=c.error.message)}catch{}throw f.create("config-fetch-failed",{httpStatus:r.status,responseMessage:o})}return r.json()}async function Dt(e,t=he,n){const{appId:a,apiKey:i,measurementId:s}=e.options;if(!a)throw f.create("no-app-id");if(!i){if(s)return{measurementId:s,appId:a};throw f.create("no-api-key")}const r=t.getThrottleMetadata(a)||{backoffCount:0,throttleEndTimeMillis:Date.now()},o=new Pt;return setTimeout(async()=>{o.abort()},n!==void 0?n:ht),me({appId:a,apiKey:i,measurementId:s},r,o,t)}async function me(e,{throttleEndTimeMillis:t,backoffCount:n},a,i=he){var s,r;const{appId:o,measurementId:c}=e;try{await Ot(a,t)}catch(l){if(c)return d.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${c} provided in the "measurementId" field in the local Firebase config. [${(s=l)===null||s===void 0?void 0:s.message}]`),{appId:o,measurementId:c};throw l}try{const l=await _t(e);return i.deleteThrottleMetadata(o),l}catch(l){const u=l;if(!Ft(u)){if(i.deleteThrottleMetadata(o),c)return d.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${c} provided in the "measurementId" field in the local Firebase config. [${u?.message}]`),{appId:o,measurementId:c};throw l}const g=Number((r=u?.customData)===null||r===void 0?void 0:r.httpStatus)===503?j(n,i.intervalMillis,Ct):j(n,i.intervalMillis),h={throttleEndTimeMillis:Date.now()+g,backoffCount:n+1};return i.setThrottleMetadata(o,h),d.debug(`Calling attemptFetch again in ${g} millis`),me(e,h,a,i)}}function Ot(e,t){return new Promise((n,a)=>{const i=Math.max(t-Date.now(),0),s=setTimeout(n,i);e.addEventListener(()=>{clearTimeout(s),a(f.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}function Ft(e){if(!(e instanceof H)||!e.customData)return!1;const t=Number(e.customData.httpStatus);return t===429||t===500||t===503||t===504}class Pt{constructor(){this.listeners=[]}addEventListener(t){this.listeners.push(t)}abort(){this.listeners.forEach(t=>t())}}async function Mt(e,t,n,a,i){if(i&&i.global){e("event",n,a);return}else{const s=await t,r=Object.assign(Object.assign({},a),{send_to:s});e("event",n,r)}}/**
|
|
347
|
-
* @license
|
|
348
|
-
* Copyright 2020 Google LLC
|
|
349
|
-
*
|
|
350
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
351
|
-
* you may not use this file except in compliance with the License.
|
|
352
|
-
* You may obtain a copy of the License at
|
|
353
|
-
*
|
|
354
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
355
|
-
*
|
|
356
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
357
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
358
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
359
|
-
* See the License for the specific language governing permissions and
|
|
360
|
-
* limitations under the License.
|
|
361
|
-
*/async function $t(){var e;if(Ae())try{await Se()}catch(t){return d.warn(f.create("indexeddb-unavailable",{errorInfo:(e=t)===null||e===void 0?void 0:e.toString()}).message),!1}else return d.warn(f.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0}async function Nt(e,t,n,a,i,s,r){var o;const c=Dt(e);c.then(p=>{n[p.measurementId]=p.appId,e.options.measurementId&&p.measurementId!==e.options.measurementId&&d.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${p.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(p=>d.error(p)),t.push(c);const l=$t().then(p=>{if(p)return a.getId()}),[u,g]=await Promise.all([c,l]);At()||wt(s,u.measurementId),i("js",new Date);const h=(o=r?.config)!==null&&o!==void 0?o:{};return h[gt]="firebase",h.update=!0,g!=null&&(h[pt]=g),i("config",u.measurementId,h),u.measurementId}/**
|
|
362
|
-
* @license
|
|
363
|
-
* Copyright 2019 Google LLC
|
|
364
|
-
*
|
|
365
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
366
|
-
* you may not use this file except in compliance with the License.
|
|
367
|
-
* You may obtain a copy of the License at
|
|
368
|
-
*
|
|
369
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
370
|
-
*
|
|
371
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
372
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
373
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
374
|
-
* See the License for the specific language governing permissions and
|
|
375
|
-
* limitations under the License.
|
|
376
|
-
*/class jt{constructor(t){this.app=t}_delete(){return delete y[this.app.options.appId],Promise.resolve()}}let y={},L=[];const B={};let D="dataLayer",xt="gtag",V,we,z=!1;function qt(){const e=[];if(ve()&&e.push("This is a browser extension environment."),Ce()||e.push("Cookies are not available."),e.length>0){const t=e.map((a,i)=>`(${i+1}) ${a}`).join(" "),n=f.create("invalid-analytics-context",{errorInfo:t});d.warn(n.message)}}function Lt(e,t,n){qt();const a=e.options.appId;if(!a)throw f.create("no-app-id");if(!e.options.apiKey)if(e.options.measurementId)d.warn(`The "apiKey" field is empty in the local Firebase config. This is needed to fetch the latest measurement ID for this Firebase app. Falling back to the measurement ID ${e.options.measurementId} provided in the "measurementId" field in the local Firebase config.`);else throw f.create("no-api-key");if(y[a]!=null)throw f.create("already-exists",{id:a});if(!z){It(D);const{wrappedGtag:s,gtagCore:r}=vt(y,L,B,D,xt);we=s,V=r,z=!0}return y[a]=Nt(e,L,B,t,V,D,n),new jt(e)}function Bt(e=ye()){e=Y(e);const t=C(e,S);return t.isInitialized()?t.getImmediate():Vt(e)}function Vt(e,t={}){const n=C(e,S);if(n.isInitialized()){const i=n.getImmediate();if(be(t,n.getOptions()))return i;throw f.create("already-initialized")}return n.initialize({options:t})}function zt(e,t,n,a){e=Y(e),Mt(we,y[e.app.options.appId],t,n,a).catch(i=>d.error(i))}const G="@firebase/analytics",K="0.8.0";function Gt(){T(new v(S,(t,{options:n})=>{const a=t.getProvider("app").getImmediate(),i=t.getProvider("installations-internal").getImmediate();return Lt(a,i,n)},"PUBLIC")),T(new v("analytics-internal",e,"PRIVATE")),b(G,K),b(G,K,"esm2017");function e(t){try{const n=t.getProvider(S).getImmediate();return{logEvent:(a,i,s)=>zt(n,a,i,s)}}catch(n){throw f.create("interop-component-reg-failed",{reason:n})}}}Gt();const Kt=window.firebaseConfig||{apiKey:"AIzaSyCrVzemDgpyp9i6ni7Yc5ZuEVfXYwl-4J0",authDomain:"ecom2-002.firebaseapp.com",projectId:"ecom2-002",storageBucket:"ecom2-002.appspot.com",messagingSenderId:"402807248219",appId:"1:402807248219:web:cf7d57759751e74776367e",measurementId:"G-SC592CE0GB"};window.firebase=F;const Ut=F.initializeApp(Kt);Bt(Ut);
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
import { getConfig } from '../ssr-context';
|
|
3
|
-
import MetaHead from './meta/Head.astro';
|
|
4
|
-
import MetaJson from './meta/Json.astro';
|
|
5
|
-
import LoginModal from '../components/LoginModal.vue';
|
|
6
|
-
|
|
7
|
-
export interface Props {
|
|
8
|
-
title: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const { lang } = getConfig();
|
|
12
|
-
const { title } = Astro.props as Props;
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
<!DOCTYPE html>
|
|
16
|
-
<html lang={lang.replace('_', '-')}>
|
|
17
|
-
<head>
|
|
18
|
-
<MetaHead />
|
|
19
|
-
<title>{title}</title>
|
|
20
|
-
</head>
|
|
21
|
-
<body>
|
|
22
|
-
<LoginModal client:idle />
|
|
23
|
-
<slot />
|
|
24
|
-
<MetaJson />
|
|
25
|
-
<slot name="firebase-init">
|
|
26
|
-
<script>
|
|
27
|
-
// Import Firebase in compat version for Auth UI
|
|
28
|
-
// https://github.com/firebase/firebaseui-web#starting-the-sign-in-flow
|
|
29
|
-
import firebase from "firebase/compat/app";
|
|
30
|
-
import { getAnalytics } from "firebase/analytics";
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
const firebaseConfig = window.firebaseConfig || {
|
|
33
|
-
apiKey: "AIzaSyCrVzemDgpyp9i6ni7Yc5ZuEVfXYwl-4J0",
|
|
34
|
-
authDomain: "ecom2-002.firebaseapp.com",
|
|
35
|
-
projectId: "ecom2-002",
|
|
36
|
-
storageBucket: "ecom2-002.appspot.com",
|
|
37
|
-
messagingSenderId: "402807248219",
|
|
38
|
-
appId: "1:402807248219:web:cf7d57759751e74776367e",
|
|
39
|
-
measurementId: "G-SC592CE0GB"
|
|
40
|
-
};
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
window.firebase = firebase;
|
|
43
|
-
const app = firebase.initializeApp(firebaseConfig);
|
|
44
|
-
const analytics = getAnalytics(app);
|
|
45
|
-
</script>
|
|
46
|
-
</slot>
|
|
47
|
-
</body>
|
|
48
|
-
</html>
|
|
49
|
-
|
|
50
|
-
<style>
|
|
51
|
-
:root {
|
|
52
|
-
--font-size-base: clamp(1rem, 0.34vw + 0.91rem, 1.19rem);
|
|
53
|
-
--font-size-lg: clamp(1.2rem, 0.7vw + 1.2rem, 1.5rem);
|
|
54
|
-
--font-size-xl: clamp(2.44rem, 2.38vw + 1.85rem, 3.75rem);
|
|
55
|
-
|
|
56
|
-
--color-text: hsl(12, 5%, 4%);
|
|
57
|
-
--color-bg: hsl(10, 21%, 95%);
|
|
58
|
-
--color-border: hsl(17, 24%, 90%);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
html {
|
|
62
|
-
font-family: system-ui, sans-serif;
|
|
63
|
-
font-size: var(--font-size-base);
|
|
64
|
-
color: var(--color-text);
|
|
65
|
-
background-color: var(--color-bg);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
body {
|
|
69
|
-
margin: 0;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
:global(h1) {
|
|
73
|
-
font-size: var(--font-size-xl);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:global(h2) {
|
|
77
|
-
font-size: var(--font-size-lg);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
:global(code) {
|
|
81
|
-
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
|
82
|
-
Bitstream Vera Sans Mono, Courier New, monospace;
|
|
83
|
-
}
|
|
84
|
-
</style>
|