PageSourceSearch

https://bucky-app-355a3.web.app/assets/firebaseHelper-CezmP0DK.js

js bucky-app-355a3.web.app collected 2026-10-03 12:18:58 UTC 13,577 bytes, 1 lines download raw bytes

1import{y as ce,z as le,A as ue,v as R,B as de,C as fe,D as pe,q as Z,f as N,g as me,i as he,d as ge,s as be}from"./vendor-firebase-Cr-z2ntb.js";import{r as ee}from"./vendor-react-DVKDpznt.js";const we="modulepreload",ye=function(t){return"/"+t},K={},ve=function(e,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(l=>{if(l=ye(l),l in K)return;K[l]=!0;const d=l.endsWith(".css"),b=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${b}`))return;const c=document.createElement("link");if(c.rel=d?"stylesheet":we,d||(c.as="script"),c.crossOrigin="",c.href=l,a&&c.setAttribute("nonce",a),document.head.appendChild(c),d)return new Promise((u,S)=>{c.addEventListener("load",u),c.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return r.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return e().catch(o)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */var k;(function(t){t.Unimplemented="UNIMPLEMENTED",t.Unavailable="UNAVAILABLE"})(k||(k={}));class W extends Error{constructor(e,n,s){super(e),this.message=e,this.code=n,this.data=s}}const Ce=t=>{var e,n;return t!=null&&t.androidBridge?"android":!((n=(e=t==null?void 0:t.webkit)===null||e===void 0?void 0:e.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},Ee=t=>{const e=t.CapacitorCustomPlatform||null,n=t.Capacitor||{},s=n.Plugins=n.Plugins||{},r=()=>e!==null?e.name:Ce(t),o=()=>r()!=="web",i=c=>{const u=d.get(c);return!!(u!=null&&u.platforms.has(r())||a(c))},a=c=>{var u;return(u=n.PluginHeaders)===null||u===void 0?void 0:u.find(S=>S.name===c)},l=c=>t.console.error(c),d=new Map,b=(c,u={})=>{const S=d.get(c);if(S)return console.warn(`Capacitor plugin "${c}" already registered. Cannot register plugins twice.`),S.proxy;const C=r(),P=a(c);let g;const oe=async()=>(!g&&C in u?g=typeof u[C]=="function"?g=await u[C]():g=u[C]:e!==null&&!g&&"web"in u&&(g=typeof u.web=="function"?g=await u.web():g=u.web),g),ie=(f,p)=>{var h,w;if(P){const y=P==null?void 0:P.methods.find(m=>p===m.name);if(y)return y.rtype==="promise"?m=>n.nativePromise(c,p.toString(),m):(m,$)=>n.nativeCallback(c,p.toString(),m,$);if(f)return(h=f[p])===null||h===void 0?void 0:h.bind(f)}else{if(f)return(w=f[p])===null||w===void 0?void 0:w.bind(f);throw new W(`"${c}" plugin is not implemented on ${C}`,k.Unimplemented)}},q=f=>{let p;const h=(...w)=>{const y=oe().then(m=>{const $=ie(m,f);if($){const T=$(...w);return p=T==null?void 0:T.remove,T}else throw new W(`"${c}.${f}()" is not implemented on ${C}`,k.Unimplemented)});return f==="addListener"&&(y.remove=async()=>p()),y};return h.toString=()=>`${f.toString()}() { [capacitor code] }`,Object.defineProperty(h,"name",{value:f,writable:!1,configurable:!1}),h},B=q("addListener"),G=q("removeListener"),ae=(f,p)=>{const h=B({eventName:f},p),w=async()=>{const m=await h;G({eventName:f,callbackId:m},p)},y=new Promise(m=>h.then(()=>m({remove:w})));return y.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await w()},y},M=new Proxy({},{get(f,p){switch(p){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return P?ae:B;case"removeListener":return G;default:return q(p)}}});return s[c]=M,d.set(c,{name:c,proxy:M,platforms:new Set([...Object.keys(u),...P?[C]:[]])}),M};return n.convertFileSrc||(n.convertFileSrc=c=>c),n.getPlatform=r,n.handleError=l,n.isNativePlatform=o,n.isPluginAvailable=i,n.registerPlugin=b,n.Exception=W,n.DEBUG=!!n.DEBUG,n.isLoggingEnabled=!!n.isLoggingEnabled,n},Se=t=>t.Capacitor=Ee(t),j=Se(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),te=j.registerPlugin;class ne{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(e,n){let s=!1;this.listeners[e]||(this.listeners[e]=[],s=!0),this.listeners[e].push(n);const o=this.windowListeners[e];o&&!o.registered&&this.addWindowListener(o),s&&this.sendRetainedArgumentsForEvent(e);const i=async()=>this.removeListener(e,n);return Promise.resolve({remove:i})}async removeAllListeners(){this.listeners={};for(const e in this.windowListeners)this.removeWindowListener(this.windowListeners[e]);this.windowListeners={}}notifyListeners(e,n,s){const r=this.listeners[e];if(!r){if(s){let o=this.retainedEventArguments[e];o||(o=[]),o.push(n),this.retainedEventArguments[e]=o}return}r.forEach(o=>o(n))}hasListeners(e){var n;return!!(!((n=this.listeners[e])===null||n===void 0)&&n.length)}registerWindowListener(e,n){this.windowListeners[n]={registered:!1,windowEventName:e,pluginEventName:n,handler:s=>{this.notifyListeners(n,s)}}}unimplemented(e="not implemented"){return new j.Exception(e,k.Unimplemented)}unavailable(e="not available"){return new j.Exception(e,k.Unavailable)}async removeListener(e,n){const s=this.listeners[e];if(!s)return;const r=s.indexOf(n);this.listeners[e].splice(r,1),this.listeners[e].length||this.removeWindowListener(this.windowListeners[e])}addWindowListener(e){window.addEventListener(e.windowEventName,e.handler),e.registered=!0}removeWindowListener(e){e&&(window.removeEventListener(e.windowEventName,e.handler),e.registered=!1)}sendRetainedArgumentsForEvent(e){const n=this.retainedEventArguments[e];
1n&&(delete this.retainedEventArguments[e],n.forEach(s=>{this.notifyListeners(e,s)}))}}const V=t=>encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),J=t=>t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Pe extends ne{async getCookies(){const e=document.cookie,n={};return e.split(";").forEach(s=>{if(s.length<=0)return;let[r,o]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");r=J(r).trim(),o=J(o).trim(),n[r]=o}),n}async setCookie(e){try{const n=V(e.key),s=V(e.value),r=`; expires=${(e.expires||"").replace("expires=","")}`,o=(e.path||"/").replace("path=",""),i=e.url!=null&&e.url.length>0?`domain=${e.url}`:"";document.cookie=`${n}=${s||""}${r}; path=${o}; ${i};`}catch(n){return Promise.reject(n)}}async deleteCookie(e){try{document.cookie=`${e.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const e=document.cookie.split(";")||[];for(const n of e)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(e){return Promise.reject(e)}}async clearAllCookies(){try{await this.clearCookies()}catch(e){return Promise.reject(e)}}}te("CapacitorCookies",{web:()=>new Pe});const Le=async t=>new Promise((e,n)=>{const s=new FileReader;s.onload=()=>{const r=s.result;e(r.indexOf(",")>=0?r.split(",")[1]:r)},s.onerror=r=>n(r),s.readAsDataURL(t)}),ke=(t={})=>{const e=Object.keys(t);return Object.keys(t).map(r=>r.toLocaleLowerCase()).reduce((r,o,i)=>(r[o]=t[e[i]],r),{})},Oe=(t,e=!0)=>t?Object.entries(t).reduce((s,r)=>{const[o,i]=r;let a,l;return Array.isArray(i)?(l="",i.forEach(d=>{a=e?encodeURIComponent(d):d,l+=`${o}=${a}&`}),l.slice(0,-1)):(a=e?encodeURIComponent(i):i,l=`${o}=${a}`),`${s}&${l}`},"").substr(1):null,_e=(t,e={})=>{const n=Object.assign({method:t.method||"GET",headers:t.headers},e),r=ke(t.headers)["content-type"]||"";if(typeof t.data=="string")n.body=t.data;else if(r.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[i,a]of Object.entries(t.data||{}))o.set(i,a);n.body=o.toString()}else if(r.includes("multipart/form-data")||t.data instanceof FormData){const o=new FormData;if(t.data instanceof FormData)t.data.forEach((a,l)=>{o.append(l,a)});else for(const a of Object.keys(t.data))o.append(a,t.data[a]);n.body=o;const i=new Headers(n.headers);i.delete("content-type"),n.headers=i}else(r.includes("application/json")||typeof t.data=="object")&&(n.body=JSON.stringify(t.data));return n};class Ae extends ne{async request(e){const n=_e(e,e.webFetchExtra),s=Oe(e.params,e.shouldEncodeUrlParams),r=s?`${e.url}?${s}`:e.url,o=await fetch(r,n),i=o.headers.get("content-type")||"";let{responseType:a="text"}=o.ok?e:{};i.includes("application/json")&&(a="json");let l,d;switch(a){case"arraybuffer":case"blob":d=await o.blob(),l=await Le(d);break;case"json":l=await o.json();break;case"document":case"text":default:l=await o.text()}const b={};return o.headers.forEach((c,u)=>{b[u]=c}),{data:l,headers:b,status:o.status,url:o.url}}async get(e){return this.request(Object.assign(Object.assign({},e),{method:"GET"}))}async post(e){return this.request(Object.assign(Object.assign({},e),{method:"POST"}))}async put(e){return this.request(Object.assign(Object.assign({},e),{method:"PUT"}))}async patch(e){return this.request(Object.assign(Object.assign({},e),{method:"PATCH"}))}async delete(e){return this.request(Object.assign(Object.assign({},e),{method:"DELETE"}))}}te("CapacitorHttp",{web:()=>new Ae});const D=j.isNativePlatform(),xe=D?"Native (iOS/Android)":"Web/Electron",F={apiKey:D?"AIzaSyCAQtq-7g5Vv2PNjaMPUGZp6XD1RRur-6I":"AIzaSyC8l2OtvO3lFwMSGQUUYRK8Z25iN-xKxDw",authDomain:"bucky-app-355a3.firebaseapp.com",projectId:"bucky-app-355a3",storageBucket:"bucky-app-355a3.firebasestorage.app",messagingSenderId:"708243107053",appId:D?"1:708243107053:ios:426cd931a2b0e8423eb0e4":"1:708243107053:web:a275293979b607503eb0e4",measurementId:"G-5F8D5DPMP7"};console.log("Firebase initializing with config:",{platform:xe,projectId:F.projectId,appId:F.appId.substring(0,30)+"..."});const A=ce(F),$e=D?le(A,{persistence:[fe,pe]}):ue(A),Te=R(A),je=de(A),et=Object.freeze(Object.defineProperty({__proto__:null,auth:$e,db:Te,default:A,functions:je},Symbol.toStringTag,{value:"Module"})),De=2e3,H=12*60*1e3,Ue=150,Re=["buckyaichat","streammeetingcard","gatemeetingutterance","upcomingstaffmeetings","publicchatbot","synthesizepodcast","admintrigger","backfill","
1ingest","siteaudit","runsavimonthlybatch","generateweekly"];let v={active:!1,count:0,since:0,suppressCount:0};const z=new Set,O=new Map,E=new Set,Q=45e3,U=new Map;let L=null;const re="bucky.coldstart.warm.v1",I=new Map;function Ie(){try{if(typeof localStorage>"u")return;const t=localStorage.getItem(re);if(!t)return;const e=JSON.parse(t),n=Date.now()-H;for(const[s,r]of Object.entries(e))typeof r=="number"&&r>n&&I.set(s,r)}catch{}}Ie();function qe(){try{if(typeof localStorage>"u")return;const t=Date.now()-H,e={};for(const[n,s]of I)s>t&&(e[n]=s);localStorage.setItem(re,JSON.stringify(e))}catch{}}function Me(t){t&&(I.set(t.toLowerCase(),Date.now()),qe())}function We(t){if(!t)return!0;const e=I.get(t.toLowerCase());return e===void 0||Date.now()-e>H}function tt(t){const e=t.toLowerCase();let n=e.match(/cloudfunctions\.net\/([a-z0-9_-]+)/);return n||(n=e.match(/^https?:\/\/([a-z0-9_-]+)-[a-z0-9]+-[a-z0-9]+\.a\.run\.app/),n)?n[1]:null}let X=0;function se(){return X+=1,`cs_${X}`}function Fe(){for(const t of z)t()}function ze(t,e){return t.active===e.active&&t.count===e.count&&t.since===e.since&&t.suppressCount===e.suppressCount}function _(t){const e={...v,...t};ze(e,v)||(v=e,Fe())}function x(){const t=E.size;t>0?(L&&(clearTimeout(L),L=null),_({active:!0,count:t,since:v.since||Date.now()})):v.active&&!L?L=setTimeout(()=>{L=null,_({active:!1,count:0,since:0})},Ue):_({count:t})}function He(t){if(!t)return!1;const e=t.toLowerCase(),n=e.includes("cloudfunctions.net")||e.includes(".run.app"),s=!e.includes("/")&&!e.includes("://");return!n&&!s?!1:!Re.some(r=>e.includes(r))}function Be(t,e={}){if(e.silent||O.has(t)||E.has(t))return;const n=setTimeout(()=>{O.delete(t),We(e.fnKey)&&(E.add(t),x(),U.set(t,setTimeout(()=>{U.delete(t),E.delete(t)&&(console.warn(`[coldStart] request ${t} never settled after ${Q}ms — clearing the overlay`),x())},Q)))},De);O.set(t,n)}function Ge(t){const e=O.get(t);e&&(clearTimeout(e),O.delete(t));const n=U.get(t);n&&(clearTimeout(n),U.delete(t)),E.delete(t)&&x()}function Y(){return v}function Ke(t){return z.add(t),()=>z.delete(t)}function nt(){return ee.useSyncExternalStore(Ke,Y,Y)}function Ve(){_({suppressCount:v.suppressCount+1});let t=!1;return()=>{t||(t=!0,_({suppressCount:Math.max(0,v.suppressCount-1)}))}}function rt(){ee.useEffect(()=>Ve(),[])}function st(t=8e3){const e=se();E.add(e),x(),setTimeout(()=>{E.delete(e),x()},t)}async function Je(t,e,n){try{const s=R(),r=Z(N(s,t),...e);return(await he(r)).docs.map(i=>({id:i.id,...i.data()}))}catch(s){throw console.error(`Error querying ${t}:`,s),s}}async function Qe(t,e,n,s,r=!1){const o=R(),i=ge(o,t,e);await be(i,n,r?{merge:!0}:{})}async function Xe(t,e={},n,s){const r=se();Be(r,{silent:!He(t),fnKey:t});try{const{getFunctions:o,httpsCallable:i}=await ve(async()=>{const{getFunctions:b,httpsCallable:c}=await import("./vendor-firebase-Cr-z2ntb.js").then(u=>u.S);return{getFunctions:b,httpsCallable:c}},[]),a=o(),d=await i(a,t,{timeout:(s==null?void 0:s.timeoutMs)??6e4})(e);return Me(t),d.data}finally{Ge(r)}}function Ye(t,e,n,s){if(!t||!e||!n)throw new Error("Invalid parameters provided to firestoreSubscribe");const r=R(),o=Z(N(r,t),...e);return me(o,i=>{const a=i.docs.map(l=>({id:l.id,...l.data()}));n(a)},i=>{console.error(`Error in ${t} snapshot:`,i)})}const ot=Object.freeze(Object.defineProperty({__proto__:null,callFunction:Xe,firestoreQuery:Je,firestoreSet:Qe,firestoreSubscribe:Ye},Symbol.toStringTag,{value:"Module"}));export{j as C,ne as W,ve as _,Ye as a,Je as b,Xe as c,Te as d,$e as e,Qe as f,nt as g,st as h,tt as i,Be as j,Ge as k,A as l,Me as m,se as n,et as o,ot as p,te as r,He as s,rt as u};

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.