1import{E as L,F as T,G as v,I as Z,J as ee,K as A,L as P,P as S,e as c,q as F,t as $,u as M,v as N,w as C,x as E}from"./chunk-UPDBHYZC.js";var ie="@firebase/installations",B="0.6.18";var ae=1e4,re=`w:${B}`,se="FIS_v2",De="https://firebaseinstallations.googleapis.com/v1",Fe=3600*1e3,$e="installations",Me="Installations";var Ne={"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."},y=new E($e,Me,Ne);function oe(e){return e instanceof C&&e.code.includes("request-failed")}function ce({projectId:e}){return`${De}/projects/${e}/installations`}function le(e){return{token:e.token,requestStatus:2,expiresIn:xe(e.expiresIn),creationTime:Date.now()}}function ue(e,t){return c(this,null,function*(){let i=(yield t.json()).error;return y.create("request-failed",{requestName:e,serverCode:i.code,serverMessage:i.message,serverStatus:i.status})})}function de({apiKey:e}){return new Headers({"Content-Type":"application/json",Accept:"application/json","x-goog-api-key":e})}function Le(e,{refreshToken:t}){let n=de(e);return n.append("Authorization",je(t)),n}function fe(e){return c(this,null,function*(){let t=yield e();return t.status>=500&&t.status<600?e():t})}function xe(e){return Number(e.replace("s","000"))}function je(e){return`${se} ${e}`}function qe(i,a){return c(this,arguments,function*({appConfig:e,heartbeatServiceProvider:t},{fid:n}){let r=ce(e),s=de(e),o=t.getImmediate({optional:!0});if(o){let u=yield o.getHeartbeatsHeader();u&&s.append("x-firebase-client",u)}let l={fid:n,authVersion:se,appId:e.appId,sdkVersion:re},f={method:"POST",headers:s,body:JSON.stringify(l)},d=yield fe(()=>fetch(r,f));if(d.ok){let u=yield d.json();return{fid:u.fid||n,registrationStatus:2,refreshToken:u.refreshToken,authToken:le(u.authToken)}}else throw yield ue("Create Installation",d)})}function pe(e){return new Promise(t=>{setTimeout(t,e)})}function Be(e){return btoa(String.fromCharCode(...e)).replace(/\+/g,"-").replace(/\//g,"_")}var Ue=/^[cdef][\w-]{21}$/,q="";function Ve(){try{let e=new Uint8Array(17);(self.crypto||self.msCrypto).getRandomValues(e),e[0]=112+e[0]%16;let n=ze(e);return Ue.test(n)?n:q}catch{return q}}function ze(e){return Be(e).substr(0,22)}function _(e){return`${e.appName}!${e.appId}`}var ge=new Map;function me(e,t){let n=_(e);he(n,t),Ge(n,t)}function he(e,t){let n=ge.get(e);if(n)for(let i of n)i(t)}function Ge(e,t){let n=He();n&&n.postMessage({key:e,fid:t}),Ke()}var I=null;function He(){return!I&&"BroadcastChannel"in self&&(I=new BroadcastChannel("[Firebase] FID Change"),I.onmessage=e=>{he(e.data.key,e.data.fid)}),I}function Ke(){ge.size===0&&I&&(I.close(),I=null)}var We="firebase-installations-database",Ye=1,b="firebase-installations-store",x=null;function U(){return x||(x=ee(We,Ye,{upgrade:(e,t)=>{switch(t){case 0:e.createObjectStore(b)}}})),x}function R(e,t){return c(this,null,function*(){let n=_(e),a=(yield U()).transaction(b,"readwrite"),r=a.objectStore(b),s=yield r.get(n);return yield r.put(t,n),yield a.done,(!s||s.fid!==t.fid)&&me(e,t.fid),t})}function we(e){return c(this,null,function*(){let t=_(e),i=(yield U()).transaction(b,"readwrite");yield i.objectStore(b).delete(t),yield i.done})}function O(e,t){return c(this,null,function*(){let n=_(e),a=(yield U()).transaction(b,"readwrite"),r=a.objectStore(b),s=yield r.get(n),o=t(s);return o===void 0?yield r.delete(n):yield r.put(o,n),yield a.done,o&&(!s||s.fid!==o.fid)&&me(e,o.fid),o})}function V(e){return c(this,null,function*(){let t,n=yield O(e.appConfig,i=>{let a=Je(i),r=Xe(e,a);return t=r.registrationPromise,r.installationEntry});return n.fid===q?{installationEntry:yield t}:{installationEntry:n,registrationPromise:t}})}function Je(e){let t=e||{fid:Ve(),registrationStatus:0};return Ie(t)}function Xe(e,t){if(t.registrationStatus===0){if(!navigator.onLine){let a=Prom
1ise.reject(y.create("app-offline"));return{installationEntry:t,registrationPromise:a}}let n={fid:t.fid,registrationStatus:1,registrationTime:Date.now()},i=Qe(e,n);return{installationEntry:n,registrationPromise:i}}else return t.registrationStatus===1?{installationEntry:t,registrationPromise:Ze(e)}:{installationEntry:t}}function Qe(e,t){return c(this,null,function*(){try{let n=yield qe(e,t);return R(e.appConfig,n)}catch(n){throw oe(n)&&n.customData.serverCode===409?yield we(e.appConfig):yield R(e.appConfig,{fid:t.fid,registrationStatus:0}),n}})}function Ze(e){return c(this,null,function*(){let t=yield te(e.appConfig);for(;t.registrationStatus===1;)yield pe(100),t=yield te(e.appConfig);if(t.registrationStatus===0){let{installationEntry:n,registrationPromise:i}=yield V(e);return i||n}return t})}function te(e){return O(e,t=>{if(!t)throw y.create("installation-not-found");return Ie(t)})}function Ie(e){return et(e)?{fid:e.fid,registrationStatus:0}:e}function et(e){return e.registrationStatus===1&&e.registrationTime+ae<Date.now()}function tt(i,a){return c(this,arguments,function*({appConfig:e,heartbeatServiceProvider:t},n){let r=nt(e,n),s=Le(e,n),o=t.getImmediate({optional:!0});if(o){let u=yield o.getHeartbeatsHeader();u&&s.append("x-firebase-client",u)}let l={installation:{sdkVersion:re,appId:e.appId}},f={method:"POST",headers:s,body:JSON.stringify(l)},d=yield fe(()=>fetch(r,f));if(d.ok){let u=yield d.json();return le(u)}else throw yield ue("Generate Auth Token",d)})}function nt(e,{fid:t}){return`${ce(e)}/${t}/authTokens:generate`}function z(e,t=!1){return c(this,null,function*(){let n,i=yield O(e.appConfig,r=>{if(!ye(r))throw y.create("not-registered");let s=r.authToken;if(!t&&rt(s))return r;if(s.requestStatus===1)return n=it(e,t),r;{if(!navigator.onLine)throw y.create("app-offline");let o=ot(r);return n=at(e,o),o}});return n?yield n:i.authToken})}function it(e,t){return c(this,null,function*(){let n=yield ne(e.appConfig);for(;n.authToken.requestStatus===1;)yield pe(100),n=yield ne(e.appConfig);let i=n.authToken;return i.requestStatus===0?z(e,t):i})}function ne(e){return O(e,t=>{if(!ye(t))throw y.create("not-registered");let n=t.authToken;return ct(n)?Object.assign(Object.assign({},t),{authToken:{requestStatus:0}}):t})}function at(e,t){return c(this,null,function*(){try{let n=yield tt(e,t),i=Object.assign(Object.assign({},t),{authToken:n});return yield R(e.appConfig,i),n}catch(n){if(oe(n)&&(n.customData.serverCode===401||n.customData.serverCode===404))yield we(e.appConfig);else{let i=Object.assign(Object.assign({},t),{authToken:{requestStatus:0}});yield R(e.appConfig,i)}throw n}})}function ye(e){return e!==void 0&&e.registrationStatus===2}function rt(e){return e.requestStatus===2&&!st(e)}function st(e){let t=Date.now();return t<e.creationTime||e.creationTime+e.expiresIn<t+Fe}function ot(e){let t={requestStatus:1,requestTime:Date.now()};return Object.assign(Object.assign({},e),{authToken:t})}function ct(e){return e.requestStatus===1&&e.requestTime+ae<Date.now()}function lt(e){return c(this,null,function*(){let t=e,{installationEntry:n,registrationPromise:i}=yield V(t);return i?i.catch(console.error):z(t).catch(console.error),n.fid})}function ut(e,t=!1){return c(this,null,function*(){let n=e;return yield dt(n),(yield z(n,t)).token})}function dt(e){return c(this,null,function*(){let{registrationPromise:t}=yield V(e);t&&(yield t)})}function ft(e){if(!e||!e.options)throw j("App Configuration");if(!e.name)throw j("App Name");let t=["projectId","apiKey","appId"];for(let n of t)if(!e.options[n])throw j(n);return{appName:e.name,projectId:e.options.projectId,apiKey:e.options.apiKey,appId:e.options.appId}}function j(e){return y.create("missing-app-config-values",{valueName:e})}var be="installations",pt="installations-internal",gt=e=>{let t=e.getProvider("app").getImmediate(),n=ft(t),i=P(t,"heartbeat");return{app:t,appConfig:n,heartbeatServiceProvider:i,_delete:()=>Promise.resolve()}},mt=e=>{let t=e.getProvider("app").getImmediate(),n=P(t,be).getImmediate();return{getId:()=>lt(n),getToken:a=>ut(n,a)}};function ht(){A(new v(be,gt,"PUBLIC")),A(new v(pt,mt,"PRIVATE"))}ht();S(ie,B);S(ie,B,"esm2017");var Te="analytics",wt="firebase_id",It="origin",yt=60*1e3,bt="https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig",X="https://www.googletagmanager.com/gtag/js";var p=new Z("@firebase/analytics");var Tt={"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}
1","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}."},m=new E("analytics","Analytics",Tt);function vt(e){if(!e.startsWith(X)){let t=m.create("invalid-gtag-resource",{gtagURL:e});return p.warn(t.message),""}return e}function Ee(e){return Promise.all(e.map(t=>t.catch(n=>n)))}function At(e,t){let n;return window.trustedTypes&&(n=window.trustedTypes.createPolicy(e,t)),n}function St(e,t){let n=At("firebase-js-sdk-policy",{createScriptURL:vt}),i=document.createElement("script"),a=`${X}?l=${e}&id=${t}`;i.src=n?n?.createScriptURL(a):a,i.async=!0,document.head.appendChild(i)}function kt(e){let t=[];return Array.isArray(window[e])?t=window[e]:window[e]=t,t}function Ct(e,t,n,i,a,r){return c(this,null,function*(){let s=i[a];try{if(s)yield t[s];else{let l=(yield Ee(n)).find(f=>f.measurementId===a);l&&(yield t[l.appId])}}catch(o){p.error(o)}e("config",a,r)})}function Et(e,t,n,i,a){return c(this,null,function*(){try{let r=[];if(a&&a.send_to){let s=a.send_to;Array.isArray(s)||(s=[s]);let o=yield Ee(n);for(let l of s){let f=o.find(u=>u.measurementId===l),d=f&&t[f.appId];if(d)r.push(d);else{r=[];break}}}r.length===0&&(r=Object.values(t)),yield Promise.all(r),e("event",i,a||{})}catch(r){p.error(r)}})}function Pt(e,t,n,i){function a(r,...s){return c(this,null,function*(){try{if(r==="event"){let[o,l]=s;yield Et(e,t,n,o,l)}else if(r==="config"){let[o,l]=s;yield Ct(e,t,n,i,o,l)}else if(r==="consent"){let[o,l]=s;e("consent",o,l)}else if(r==="get"){let[o,l,f]=s;e("get",o,l,f)}else if(r==="set"){let[o]=s;e("set",o)}else e(r,...s)}catch(o){p.error(o)}})}return a}function Rt(e,t,n,i,a){let r=function(...s){window[i].push(arguments)};return window[a]&&typeof window[a]=="function"&&(r=window[a]),window[a]=Pt(r,e,t,n),{gtagCore:r,wrappedGtag:window[a]}}function _t(e){let t=window.document.getElementsByTagName("script");for(let n of Object.values(t))if(n.src&&n.src.includes(X)&&n.src.includes(e))return n;return null}var Ot=30,Dt=1e3,G=class{constructor(t={},n=Dt){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]}},Pe=new G;function Ft(e){return new Headers({Accept:"application/json","x-goog-api-key":e})}function $t(e){return c(this,null,function*(){var t;let{appId:n,apiKey:i}=e,a={method:"GET",headers:Ft(i)},r=bt.replace("{app-id}",n),s=yield fetch(r,a);if(s.status!==200&&s.status!==304){let o="";try{let l=yield s.json();!((t=l.error)===null||t===void 0)&&t.message&&(o=l.error.message)}catch{}throw m.create("config-fetch-failed",{httpStatus:s.status,responseMessage:o})}return s.json()})}function Mt(i){return c(this,arguments,function*(e,t=Pe,n){let{appId:a,apiKey:r,measurementId:s}=e.options;if(!a)throw m.create("no-app-id");if(!r){if(s)return{measurementId:s,appId:a};throw m.create("no-api-key")}let o=t.getThrottleMetadata(a)||{backoffCount:0,throttleEndTimeMillis:Date.now()},l=new H;return setTimeout(()=>c(null,null,function*(){l.abort()}),n!==void 0?n:yt),Re({appId:a,apiKey:r,measurementId:s},o,l,t)})}function Re(r,s,o){return c(this,arguments,function*(e,{throttleEndTimeMillis:t,backoffCount:n},i,a=Pe){var l;let{appId:f,measurementId:d}=e;try{yield Nt(i,t)}catch(u){if(d)return p.warn(`Timed out fetching this Firebase app's measurement ID from the server. Falling back to the measurement ID ${d} provided in the "measurementId" field in the local Firebase config. [${u?.message}
1]`),{appId:f,measurementId:d};throw u}try{let u=yield $t(e);return a.deleteThrottleMetadata(f),u}catch(u){let g=u;if(!Lt(g)){if(a.deleteThrottleMetadata(f),d)return p.warn(`Failed to fetch this Firebase app's measurement ID from the server. Falling back to the measurement ID ${d} provided in the "measurementId" field in the local Firebase config. [${g?.message}]`),{appId:f,measurementId:d};throw u}let h=Number((l=g?.customData)===null||l===void 0?void 0:l.httpStatus)===503?L(n,a.intervalMillis,Ot):L(n,a.intervalMillis),Q={throttleEndTimeMillis:Date.now()+h,backoffCount:n+1};return a.setThrottleMetadata(f,Q),p.debug(`Calling attemptFetch again in ${h} millis`),Re(e,Q,i,a)}})}function Nt(e,t){return new Promise((n,i)=>{let a=Math.max(t-Date.now(),0),r=setTimeout(n,a);e.addEventListener(()=>{clearTimeout(r),i(m.create("fetch-throttle",{throttleEndTimeMillis:t}))})})}function Lt(e){if(!(e instanceof C)||!e.customData)return!1;let t=Number(e.customData.httpStatus);return t===429||t===500||t===503||t===504}var H=class{constructor(){this.listeners=[]}addEventListener(t){this.listeners.push(t)}abort(){this.listeners.forEach(t=>t())}};var K;function xt(e,t,n,i,a){return c(this,null,function*(){if(a&&a.global){e("event",n,i);return}else{let r=yield t,s=Object.assign(Object.assign({},i),{send_to:r});e("event",n,s)}})}function jt(e,t,n,i){return c(this,null,function*(){if(i&&i.global)return e("set",{screen_name:n}),Promise.resolve();{let a=yield t;e("config",a,{update:!0,screen_name:n})}})}function qt(e,t,n,i){return c(this,null,function*(){if(i&&i.global)return e("set",{user_id:n}),Promise.resolve();{let a=yield t;e("config",a,{update:!0,user_id:n})}})}function Bt(e,t,n,i){return c(this,null,function*(){if(i&&i.global){let a={};for(let r of Object.keys(n))a[`user_properties.${r}`]=n[r];return e("set",a),Promise.resolve()}else{let a=yield t;e("config",a,{update:!0,user_properties:n})}})}function Ut(e,t){return c(this,null,function*(){let n=yield e;window[`ga-disable-${n}`]=!t})}var W;function Vt(e){W=e}function zt(e){K=e}function Gt(){return c(this,null,function*(){if($())try{yield M()}catch(e){return p.warn(m.create("indexeddb-unavailable",{errorInfo:e?.toString()}).message),!1}else return p.warn(m.create("indexeddb-unavailable",{errorInfo:"IndexedDB is not available in this environment."}).message),!1;return!0})}function Ht(e,t,n,i,a,r,s){return c(this,null,function*(){var o;let l=Mt(e);l.then(h=>{n[h.measurementId]=h.appId,e.options.measurementId&&h.measurementId!==e.options.measurementId&&p.warn(`The measurement ID in the local Firebase config (${e.options.measurementId}) does not match the measurement ID fetched from the server (${h.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(h=>p.error(h)),t.push(l);let f=Gt().then(h=>{if(h)return i.getId()}),[d,u]=yield Promise.all([l,f]);_t(r)||St(r,d.measurementId),W&&(a("consent","default",W),Vt(void 0)),a("js",new Date);let g=(o=s?.config)!==null&&o!==void 0?o:{};return g[It]="firebase",g.update=!0,u!=null&&(g[wt]=u),a("config",d.measurementId,g),K&&(a("set",K),zt(void 0)),d.measurementId})}var Y=class{constructor(t){this.app=t}_delete(){return delete w[this.app.options.appId],Promise.resolve()}},w={},ve=[],Ae={},D="dataLayer",_e="gtag",Se,k,J=!1;function un(e){if(J)throw m.create("already-initialized");e.dataLayerName&&(D=e.dataLayerName),e.gtagName&&(_e=e.gtagName)}function Kt(){let e=[];
1if(F()&&e.push("This is a browser extension environment."),N()||e.push("Cookies are not available."),e.length>0){let t=e.map((i,a)=>`(${a+1}) ${i}`).join(" "),n=m.create("invalid-analytics-context",{errorInfo:t});p.warn(n.message)}}function Wt(e,t,n){Kt();let i=e.options.appId;if(!i)throw m.create("no-app-id");if(!e.options.apiKey)if(e.options.measurementId)p.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 m.create("no-api-key");if(w[i]!=null)throw m.create("already-exists",{id:i});if(!J){kt(D);let{wrappedGtag:r,gtagCore:s}=Rt(w,ve,Ae,D,_e);k=r,Se=s,J=!0}return w[i]=Ht(e,ve,Ae,t,Se,D,n),new Y(e)}function dn(){return c(this,null,function*(){if(F()||!N()||!$())return!1;try{return yield M()}catch{return!1}})}function fn(e,t,n){e=T(e),jt(k,w[e.app.options.appId],t,n).catch(i=>p.error(i))}function pn(e,t,n){e=T(e),qt(k,w[e.app.options.appId],t,n).catch(i=>p.error(i))}function gn(e,t,n){e=T(e),Bt(k,w[e.app.options.appId],t,n).catch(i=>p.error(i))}function mn(e,t){e=T(e),Ut(w[e.app.options.appId],t).catch(n=>p.error(n))}function Yt(e,t,n,i){e=T(e),xt(k,w[e.app.options.appId],t,n,i).catch(a=>p.error(a))}var ke="@firebase/analytics",Ce="0.10.17";function Jt(){A(new v(Te,(t,{options:n})=>{let i=t.getProvider("app").getImmediate(),a=t.getProvider("installations-internal").getImmediate();return Wt(i,a,n)},"PUBLIC")),A(new v("analytics-internal",e,"PRIVATE")),S(ke,Ce),S(ke,Ce,"esm2017");function e(t){try{let n=t.getProvider(Te).getImmediate();return{logEvent:(i,a,r)=>Yt(n,i,a,r)}}catch(n){throw m.create("interop-component-reg-failed",{reason:n})}}}Jt();export{un as a,dn as b,fn as c,pn as d,gn as e,mn as f,Yt as g};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.