@realtimex/realtimex-alchemy 1.0.86 → 1.0.87
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/dist/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.87] - 2026-02-02
|
|
9
|
+
|
|
10
|
+
### Maintenance
|
|
11
|
+
- **Internal**: Maintenance release.
|
|
12
|
+
|
|
8
13
|
## [1.0.86] - 2026-02-02
|
|
9
14
|
|
|
10
15
|
### Improved
|
|
@@ -147,7 +147,7 @@ ${n("shell.changelog_error")}`)}finally{a(!1)}};return u.jsx($t,{children:e&&u.j
|
|
|
147
147
|
${_.includes("❌")||_.includes("Error")?"text-error":""}
|
|
148
148
|
${_.includes("🚀")||_.includes("Starting")?"text-primary font-bold":""}
|
|
149
149
|
${!_.includes("✅")&&!_.includes("❌")&&!_.includes("🚀")?"text-white/70":""}
|
|
150
|
-
`,children:_})]},w)),u.jsx("div",{ref:y})]})})]})]}),u.jsxs("div",{className:"px-6 py-4 bg-white/[0.02] border-t border-white/5 flex items-center gap-3",children:[u.jsx("div",{className:"text-warning",children:u.jsx(Jh,{size:16})}),u.jsx("p",{className:"text-[10px] text-white/40 leading-tight",children:"Migration will apply cumulative schema updates to your Supabase instance. Do not close this window during execution."})]})]})}):null}class Az{audioContext=null;enabled=!0;constructor(){}getAudioContext(){return this.audioContext||(this.audioContext=new(window.AudioContext||window.webkitAudioContext)),this.audioContext}setEnabled(t){this.enabled=t}isEnabled(){return this.enabled}playTone(t,n,r=.3){if(this.enabled)try{const s=this.getAudioContext(),o=s.createOscillator(),a=s.createGain();o.connect(a),a.connect(s.destination),o.frequency.value=t,o.type="sine",a.gain.setValueAtTime(r,s.currentTime),a.gain.exponentialRampToValueAtTime(.01,s.currentTime+n),o.start(s.currentTime),o.stop(s.currentTime+n)}catch(s){console.warn("[Sound] Failed to play tone:",s)}}playSequence(t,n=.3){if(!this.enabled)return;let r=0;t.forEach(s=>{setTimeout(()=>{this.playTone(s.freq,s.duration,n)},r),r+=s.delay})}syncStart(){this.playSequence([{freq:261.63,duration:.15,delay:0},{freq:329.63,duration:.15,delay:100},{freq:392,duration:.2,delay:100}],.2)}signalFound(){this.playSequence([{freq:392,duration:.1,delay:0},{freq:523.25,duration:.15,delay:80}],.25)}syncComplete(){this.playSequence([{freq:261.63,duration:.12,delay:0},{freq:329.63,duration:.12,delay:80},{freq:392,duration:.12,delay:80},{freq:523.25,duration:.2,delay:80}],.2)}error(){this.playSequence([{freq:329.63,duration:.15,delay:0},{freq:261.63,duration:.2,delay:100}],.3)}click(){this.playTone(440,.05,.15)}}const Jo=new Az;function Pz(){const{t:e}=nt(),[t,n]=A.useState([]),[r,s]=A.useState([]),[o,a]=A.useState("discovery"),[c,d]=A.useState(!1),[f,p]=A.useState(null),[m,y]=A.useState(!0),[x,_]=A.useState(!k0),[w,k]=A.useState(!0),[S,C]=A.useState(!1),[j,R]=A.useState(!1),[N,T]=A.useState(null),[I,V]=A.useState(!1),[J,D]=A.useState(!1),[Y,$]=A.useState(!1),[ne,H]=A.useState(!0),[K,ee]=A.useState(()=>localStorage.getItem("theme")||"dark"),[te,W]=A.useState(null),[re,P]=A.useState(null),[M,X]=A.useState(!1),O=A.useRef(null);A.useMemo(()=>{const Ce=r.length;let Ge=0,Je=0,Ne=null;for(const Nt of r){Ge+=Nt.score,Nt.score>Je&&(Je=Nt.score);const ae=new Date(Nt.date);(!Ne||ae>new Date(Ne.date))&&(Ne=Nt)}const mt=Ce?Math.round(Ge/Ce):0,Rt=Ne?new Date(Ne.date):null;return{total:Ce,average:mt,top:Je,latestTimestamp:Rt,latestTitle:Ne?.title??Ne?.category??null}},[r]),A.useEffect(()=>{(async()=>{if(!k0){_(!0),y(!1);return}try{const{data:Je,error:Ne}=await oe.from("init_state").select("is_initialized").single();Ne?(console.warn("[App] Init check error (might be fresh DB):",Ne),Ne.code==="42P01"&&k(!1)):k(Je.is_initialized>0);const{data:{session:mt}}=await oe.auth.getSession();if(p(mt?.user??null),mt?.user){const Rt=await Zw(oe);P(Rt.needsMigration?Rt:null)}}catch(Je){console.error("[App] Status check failed:",Je)}finally{y(!1)}})();const{data:{subscription:Ge}}=oe.auth.onAuthStateChange((Je,Ne)=>{p(Ne?.user??null)});return()=>Ge.unsubscribe()},[]),A.useEffect(()=>{document.documentElement.setAttribute("data-theme",K),localStorage.setItem("theme",K)},[K]);const[me,Ae]=A.useState({});A.useEffect(()=>{(async()=>{if(!f)return;const{data:Ge}=await oe.from("alchemy_settings").select("sync_start_date, last_sync_checkpoint").eq("user_id",f.id).maybeSingle();Ge&&Ae(Ge)})()},[f,I]),A.useEffect(()=>{if(!f)return;(async()=>{const{data:Je}=await oe.from("alchemy_settings").select("sound_enabled").eq("user_id",f.id).maybeSingle();if(Je){const Ne=Je.sound_enabled??!0;H(Ne),Jo.setEnabled(Ne)}})();const Ge=oe.channel("processing_events").on("postgres_changes",{event:"INSERT",schema:"public",table:"processing_events",filter:`user_id=eq.${f.id}`},Je=>{const Ne=Je.new;["Completed","Stopped","Failed"].includes(Ne.agent_state)||Ne.metadata?.is_completion?(D(!1),ne&&(Ne.metadata?.errors>0||Ne.agent_state==="Failed"?Jo.error():Ne.agent_state==="Completed"&&Jo.syncComplete()),Ne.agent_state==="Completed"&&setTimeout(()=>{$(!1)},5e3),ye()):(J||D(!0),Ne.metadata?.is_start&&!J&&($(!0),ne&&Jo.syncStart()),Ne.agent_state==="Signal"&&ne&&Jo.signalFound())}).subscribe();return()=>{oe.removeChannel(Ge)}},[f,J,ne]),A.useEffect(()=>{const Ce=new EventSource("/events");return Ce.onmessage=Ge=>{const Je=JSON.parse(Ge.data);Je.type==="history"?n(Ne=>[...Je.data,...Ne].slice(0,100)):n(Ne=>[Je,...Ne].slice(0,100))},ye(),()=>Ce.close()},[f]),A.useEffect(()=>{O.current&&O.current.scrollIntoView({behavior:"smooth"})},[t]);const ye=async()=>{try{if(f){const{data:Ge,error:Je}=await oe.from("signals").select("*").order("created_at",{ascending:!1});if(!Je&&Ge){s(Ge.map(Ne=>({id:Ne.id,title:Ne.title,score:Ne.score,summary:Ne.summary,date:Ne.created_at,category:Ne.category,entities:Ne.entities})));return}}const Ce=await et.get("/api/signals");s(Ce.data)}catch(Ce){console.error("Failed to fetch signals",Ce)}},He=async()=>{d(!0),$(!0);try{await et.post("/api/mine"),ye()}catch(Ce){console.error("Mining failed:",Ce)}finally{d(!1)}},ce=async()=>{try{await et.post("/api/mine/stop")}catch(Ce){console.error("[App] Failed to stop sync:",Ce)}},Ee=(Ce,Ge)=>{Ce==="logs"?(W(Ge),a("logs")):a(Ce)};return m?u.jsx("div",{className:"flex items-center justify-center h-screen bg-bg",children:u.jsx("div",{className:"w-12 h-12 border-4 border-primary/20 border-t-primary rounded-full animate-spin"})}):x?u.jsx(Gw,{onComplete:()=>_(!1)}):f?u.jsx(bL,{children:u.jsx(EL,{children:u.jsx(jL,{children:u.jsxs("div",{className:"flex h-screen w-screen overflow-hidden bg-bg text-fg",children:[u.jsxs(Ie.aside,{animate:{width:S?72:240},className:"glass m-4 mr-0 flex flex-col relative",children:[u.jsxs("div",{className:`px-4 py-3 pb-4 flex items-center gap-3 ${S?"justify-center":""}`,children:[u.jsx("div",{className:"w-10 h-10 min-w-[40px] bg-gradient-to-br from-primary to-accent rounded-xl flex items-center justify-center shadow-lg glow-primary",children:u.jsx(qt,{className:"text-white fill-current",size:24})}),!S&&u.jsx(Ie.h1,{initial:{opacity:0},animate:{opacity:1},className:"text-xl font-bold tracking-tight",children:"Alchemist"})]}),u.jsxs("nav",{className:"flex-1 flex flex-col gap-1 px-3",children:[u.jsx(Ci,{active:o==="discovery",onClick:()=>a("discovery"),icon:u.jsx(Oj,{size:20}),label:e("tabs.discovery"),collapsed:S}),u.jsx(Ci,{active:o==="chat",onClick:()=>a("chat"),icon:u.jsx(Qh,{size:20}),label:e("tabs.chat"),collapsed:S}),u.jsx(Ci,{active:o==="transmute",onClick:()=>a("transmute"),icon:u.jsx(qt,{size:20}),label:e("tabs.transmute"),collapsed:S}),u.jsx(Ci,{active:o==="engine",onClick:()=>a("engine"),icon:u.jsx(vc,{size:20}),label:e("common.settings"),collapsed:S}),u.jsx(Ci,{active:o==="logs",onClick:()=>a("logs"),icon:u.jsx(qi,{size:20}),label:e("tabs.logs"),collapsed:S}),u.jsx(Ci,{active:o==="account",onClick:()=>a("account"),icon:u.jsx(Vc,{size:20}),label:e("common.account"),collapsed:S})]}),u.jsx("div",{className:"px-3 pb-2 border-t border-white/5 pt-4 mt-2 relative z-[100]",children:u.jsx("div",{className:S?"flex justify-center":"px-1",children:u.jsx(Vp,{collapsed:S,position:"top"})})}),u.jsx("div",{className:"px-3 pb-2",children:u.jsxs("button",{onClick:()=>ee(K==="dark"?"light":"dark"),className:`w-full flex items-center ${S?"justify-center":"gap-3"} px-4 py-2.5 rounded-lg text-fg/40 hover:text-fg hover:bg-surface/50 transition-all text-xs font-medium`,title:S?e(K==="dark"?"shell.switch_light":"shell.switch_dark"):"",children:[u.jsx("div",{className:"min-w-[20px] flex justify-center",children:K==="dark"?u.jsx(Hj,{size:18}):u.jsx(zj,{size:18})}),!S&&u.jsx(Ie.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"whitespace-nowrap",children:e(K==="dark"?"common.light_mode":"common.dark_mode")})]})}),u.jsxs("div",{className:"px-3 pb-3",children:[u.jsx("button",{onClick:()=>C(!S),className:`w-full flex items-center px-4 py-2.5 rounded-lg text-fg/40 hover:text-fg hover:bg-surface/50 transition-all text-xs font-medium ${S?"justify-center":"gap-3"}`,children:S?u.jsx(Sj,{size:20}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"min-w-[20px] flex justify-center",children:u.jsx(kj,{size:20})}),u.jsx("span",{children:e("common.collapse")})]})}),u.jsxs("button",{onClick:()=>R(!0),className:"w-full flex items-center justify-center gap-2 px-3 py-2 mt-2 text-[10px] font-mono text-fg/30 hover:text-primary hover:bg-surface/30 rounded-lg transition-all group",title:e("shell.view_changelog"),children:[!S&&u.jsxs(u.Fragment,{children:[u.jsx(ef,{size:12,className:"group-hover:text-primary transition-colors"}),u.jsxs("span",{children:["v","1.0.86"]})]}),S&&u.jsx(ef,{size:14,className:"group-hover:text-primary transition-colors"})]})]})]}),u.jsxs("main",{className:"flex-1 flex flex-col p-4 gap-4 overflow-hidden relative",children:[re&&u.jsx(Nz,{onOpen:()=>X(!0)}),o==="discovery"&&u.jsxs(u.Fragment,{children:[u.jsxs("header",{className:"flex justify-between items-center px-4 py-2",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold",children:e("tabs.discovery")}),u.jsx("p",{className:"text-sm text-fg/50",children:e("setup.welcome_desc")})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsxs("button",{onClick:()=>V(!0),className:"px-6 py-3 glass hover:bg-surface transition-colors flex items-center gap-2 text-sm font-medium",children:[u.jsx(vc,{size:16}),u.jsxs("div",{className:"flex flex-col items-start",children:[u.jsx("span",{children:e("discovery.sync_settings")}),u.jsx("span",{className:"text-[10px] text-fg/40 font-mono",children:me.sync_start_date?`${e("discovery.from")}: ${new Date(me.sync_start_date).toLocaleString([],{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`:me.last_sync_checkpoint?`${e("discovery.checkpoint")}: ${new Date(me.last_sync_checkpoint).toLocaleString([],{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`:e("discovery.all_time")})]})]}),u.jsxs("button",{onClick:He,disabled:J,className:"px-6 py-3 bg-gradient-to-r from-primary to-accent text-white font-bold rounded-xl shadow-lg glow-primary hover:scale-105 active:scale-95 transition-all flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100",children:[u.jsx(Vs,{size:18,className:J?"animate-spin":""}),e(J?"discovery.syncing":"discovery.sync_history")]})]})]}),u.jsx(GL,{onOpenUrl:Ce=>window.open(Ce,"_blank","noopener,noreferrer"),onSync:He,isSyncing:J,onCopyText:Ce=>{navigator.clipboard.writeText(Ce)}})]}),o==="chat"&&u.jsx(kz,{}),o==="transmute"&&u.jsx(Ez,{}),o==="engine"&&u.jsx(SL,{}),o==="account"&&u.jsx(AL,{}),o==="logs"&&u.jsx($L,{initialState:te}),u.jsx(TL,{isExpanded:Y,onToggle:()=>$(!Y),onNavigate:Ee,liftUp:o==="chat",isSyncing:J,onStop:ce})]}),u.jsx(LL,{signal:N,onClose:()=>T(null)}),u.jsx(IL,{isOpen:I,onClose:()=>V(!1)}),u.jsx(Sz,{isOpen:j,onClose:()=>R(!1)}),u.jsx(Tz,{isOpen:M,onClose:()=>X(!1),status:re})]})})})}):u.jsx(gL,{onAuthSuccess:()=>ye(),isInitialized:w})}function Ci({active:e,icon:t,label:n,onClick:r,collapsed:s}){return u.jsx("button",{onClick:r,title:s?n:"",className:`w-full flex items-center ${s?"justify-center":"gap-3"} px-4 py-3 rounded-xl transition-all ${e?"bg-primary/10 text-primary shadow-sm":"text-fg/60 hover:bg-surface hover:text-fg"}`,children:s?Ui.cloneElement(t,{className:e?"text-primary":""}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"min-w-[20px] flex justify-center",children:Ui.cloneElement(t,{className:e?"text-primary":""})}),u.jsx(Ie.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"font-semibold text-sm whitespace-nowrap",children:n})]})})}function Rz(){et.interceptors.request.use(async e=>{try{const{data:{session:t}}=await oe.auth.getSession();t?.access_token&&(e.headers.Authorization=`Bearer ${t.access_token}`);const n=os();n&&(e.headers["x-supabase-url"]=n.url,e.headers["x-supabase-key"]=n.anonKey)}catch(t){console.error("[Axios] Error injecting headers:",t)}return e})}const{slice:Oz,forEach:Lz}=[];function Iz(e){return Lz.call(Oz.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Dz(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const p_=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Mz=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(t);let o=`${e}=${s}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!p_.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!p_.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},m_={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=Mz(e,t,s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var zz={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return m_.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=t;n&&typeof document<"u"&&m_.create(n,e,r,s,o)}},Fz={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a<o.length;a++){const c=o[a].indexOf("=");c>0&&o[a].substring(0,c)===t&&(n=o[a].substring(c+1))}}return n}},$z={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const o=s.substring(1);if(t){const a=o.split("&");for(let c=0;c<a.length;c++){const d=a[c].indexOf("=");d>0&&a[c].substring(0,d)===t&&(r=a[c].substring(d+1))}}if(r)return r;if(!r&&n>-1){const a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Ei=null;const g_=()=>{if(Ei!==null)return Ei;try{if(Ei=typeof window<"u"&&window.localStorage!==null,!Ei)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ei=!1}return Ei};var Uz={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&g_())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&g_()&&window.localStorage.setItem(n,e)}};let Ni=null;const y_=()=>{if(Ni!==null)return Ni;try{if(Ni=typeof window<"u"&&window.sessionStorage!==null,!Ni)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Ni=!1}return Ni};var Bz={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&y_())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&y_()&&window.sessionStorage.setItem(n,e)}},Vz={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),s&&t.push(s)}return t.length>0?t:void 0}},qz={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Hz={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Kz={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let ok=!1;try{document.cookie,ok=!0}catch{}const ak=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];ok||ak.splice(1,1);const Wz=()=>({order:ak,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class lk{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Iz(n,this.options||{},Wz()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(zz),this.addDetector(Fz),this.addDetector(Uz),this.addDetector(Bz),this.addDetector(Vz),this.addDetector(qz),this.addDetector(Hz),this.addDetector(Kz),this.addDetector($z)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(r=>r!=null&&!Dz(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}lk.type="languageDetector";const Gz={save:"Save",cancel:"Cancel",loading:"Loading...",error:"Error",success:"Success",settings:"Settings",search:"Search",back:"Back",all:"All",delete:"Delete",update:"Update",edit:"Edit",close:"Close",complete:"Complete",skip:"Skip",begin:"Begin",connection:"Connection",setup:"Setup",project:"Project",account:"Account",logout:"Logout",welcome:"Welcome",dark_mode:"Dark Mode",light_mode:"Light Mode",collapse:"Collapse",just_now:"Just now",enabled:"Enabled",disabled:"Disabled",system_default:"System Default",default:"Default",quick:"Quick (5)",balanced:"Balanced (50)",thorough:"Thorough (200)",resetting:"Resetting...",saving:"Saving...",locale_code:"en-US",categories:{ai_ml:"AI & ML",business:"Business",politics:"Politics",technology:"Technology",finance:"Finance",crypto:"Crypto",science:"Science",other:"Other"}},Jz={discovery:"Discovery",chat:"Chat",transmute:"Generate",logs:"System Logs",history:"History"},Xz={welcome_title:"Setup Your Workspace",welcome_desc:"The app needs a Supabase project to store signal fragments and intelligence patterns.",requirements:"Requirements:",project_url:"Supabase Project URL",anon_key:"Anon Public API Key",db_password:"Database Password",project_url_placeholder:"https://xxx.supabase.co or project-id",anon_key_placeholder:"eyJ...",project_id_placeholder:"abcdefghijklm",access_token_placeholder:"sbp_...",begin_init:"BEGIN INITIALIZATION",connect_essence:"CONNECT DATABASE",credentials_title:"Database Credentials",credentials_desc:"Connect the application to your cloud database.",validating:"Validating connection",resonance:"Synchronizing Connection...",init_schema:"Initialize Schema",schema_desc:"Run database migrations to set up required tables and functions.",project_id:"Project ID",access_token:"Access Token",run_migrations:"RUN MIGRATIONS",running_migrations:"Running Migrations",take_minute:"This may take a minute...",engine_aligned:"System Ready",restarting:"Restarting services...",forge_project:"Create project in Supabase",project_id_help:"Found in Supabase Dashboard → Project Settings → General",access_token_help:"Generate one at",access_token_link:"supabase.com/dashboard/account/tokens",project_id_required:"Project ID is required",access_token_required:"Access token is required",migration_failed_logs:"Migration failed. Check logs for details.",stream_error:"Failed to read migration stream",back:"BACK",retry:"RETRY",choose_setup_path:"Choose Setup Path",forge_how:"How do you want to set up your workspace?",quick_launch:"Quick Launch",quick_launch_desc:"Create a Supabase project for me (requires Access Token)",manual_connection:"Manual Connection",manual_connection_desc:"Connect an existing project (requires URL and anon key)",quick_provision_desc:"Provide an access token to auto-provision everything",get_token:"GET TOKEN",project_name:"Project Name",project_name_placeholder:"e.g. My App",organization:"Organization",region:"Region",launch_engine:"Launch Engine",provisioning_forge:"Provisioning Project",building_instance:"Building your private Supabase instance...",regions:{"us-east-1":"US East (N. Virginia)","us-west-1":"US West (N. California)","eu-central-1":"Europe (Frankfurt)","eu-west-2":"Europe (London)","ap-southeast-1":"Asia Pacific (Singapore)","ap-southeast-2":"Asia Pacific (Sydney)","sa-east-1":"South America (São Paulo)"}},Qz={title_init:"INITIALIZE ADMIN",title_join:"JOIN TEAM",title_mystic:"ACCESS LOGIN",title_login:"LOGIN",desc_init:"Create the primary account",desc_mystic_email:"Enter your email",desc_mystic_code:"Enter the verification code",desc_login:"Turn your data into intelligence",first_name:"First Name",last_name:"Last Name",first_name_placeholder:"John",last_name_placeholder:"Doe",email_address:"Email Address",email_placeholder:"user@example.com",complexity_key:"Password",password_placeholder:"••••••••",init_account:"INITIALIZE ACCOUNT",send_code:"SEND CODE",unseal_engine:"UNLOCK SYSTEM",verify_code:"VERIFY CODE",change_email:"Change email address",sign_in_code:"Sign in with Code",sign_in_password:"Sign in with Password",already_alchemist:"Already have an account?",new_to_alchemy:"New to the app?",login_instead:"Login instead",create_account:"Create an account",session_failed:"Failed to create session",invalid_code:"Invalid code"},Yz={filters:"Filters",category:"Category",intelligence_score:"Intelligence Score",no_signals_in_category:"No signals in {{category}} yet.",no_categories:"No categories yet.",discovery_hint:"Items will be organized here once discovered.",loading_signals:"Loading signals...",dismiss_hint:"Dismiss (Not interested)",signal_count_one:"{{count}} signal",signal_count_other:"{{count}} signals",time_min_ago:"{{count}}m ago",time_hour_ago:"{{count}}h ago",time_day_ago:"{{count}}d ago",add_note_title:"Add Note",target:"Target",note_placeholder:"Enter your thoughts, ideas, or action items regarding this signal...",save_note:"Save Note",view_all_sources:"View all sources",source_count_one:"{{count}} source",source_count_other:"{{count}} sources",source_found_in:"Found in {{count}} different sources",high_confidence:"High confidence - found in {{count}} sources",new_signals:"New Signals",smart_summary:"Smart Summary",entities:"Entities",sources:"Sources",last_sync:"Last Sync",syncnow:"Sync Now",all_time:"All time",checkpoint:"Checkpoint",from:"From",score_high:"HIGH",score_medium:"MEDIUM",score_low:"LOW",sources_count:"{{count}} sources",open_source:"Open",add_note:"Note",boost_topic:"Boost Topic",boosted:"Boosted",dismissed:"Dismissed",remove_favourite:"Remove from favorites",add_favourite:"Add to favorites",sync_history:"Sync History",syncing:"Syncing...",sync_settings:"Sync Settings",discovered:"Discovered",original_source:"Original Source",ai_summary:"AI Summary",full_content:"Full Content",copied:"Copied!",open_link:"Open",detail_title:"Signal Details",sync_from:"Sync From (Optional)",urls_per_sync:"URLs per Sync",sync_from_hint:"Leave empty to sync only new URLs since the last sync. Set a date to process URLs from that day forward.",reset_checkpoint:"Reset Checkpoint",reset_checkpoint_hint:'Clear the sync checkpoint to force a full resync from your "Sync From" date.',sync_info:'The system tracks progress automatically. Use "Sync From" to backfill history or "Reset Checkpoint" to start over.',save_settings:"Save Settings",sync_saved:"Sync settings saved successfully",checkpoint_reset:"Checkpoint reset successfully",login_to_save:"Please log in to save settings",login_to_reset:"Please log in to reset checkpoint",status_updated:"Engine status updated to {{status}}",asset_ready:'Asset "{{title}}" is ready!',scanning:"Scanning for new categories and topics...",discovery_complete:"Engine discovery complete!",discovery_failed:"Discovery failed. Check settings.",welcome_title:"Welcome!",welcome_desc:"Connect your browser history to start discovering signals. We'll automatically analyze your visited pages to find mentions of AI, tech, and more.",auto_detect_sync:"Auto-detect & Sync",privacy_first:"Privacy First",offline_first:"Offline First",load_failed:"Failed to load engines",starting_run:"Starting engine run...",run_complete:"Engine run complete! Created: {{title}}",run_started_desktop:"Engine run started on Desktop. Tracking ID: {{id}}",run_failed:"Failed to run engine",brief_failed:"Failed to generate production brief",topic:"Topic",pipeline:"Pipeline"},Zz={history:"History",ask_anything:"Ask anything about your browsing history...",sources:"Sources",processing:"Processing your query...",new_chat:"New Chat",no_messages:"No messages yet. Start a conversation!",no_history:"No chat history yet.",title:"Ask AI",desc:"I can help you recall information, summarize topics, and find insights from your browsing history.",thinking:"Thinking...",placeholder:"Ask about your history...",error_message:"Sorry, I encountered an error processing your request.",relevant_context:"Relevant Context",match_score:"{{score}}% Match",rag_attribution:"AI used these {{count}} items to answer",suggestions:{react:"What have I read about React recently?",ai:"Summarize the latest AI news I visited.",finance:"Do I have any notes on Finance?",performance:"Find articles about 'Performance'"},speak:"Speak",stop_speaking:"Stop",speaking:"Speaking..."},eF={engines:"Generation Pipelines",assets:"Generated Assets",newsletter:"Newsletter",thread:"Thread",audio:"Audio",report:"Report",title:"Generation Engine",desc:"Active generation pipelines and assets",generate:"Generate",processing_desktop:"Processing on Desktop...",ensure_defaults:"Ensure Default Engines",create_engine:"Create Engine",no_assets:"No assets generated yet.",generate_engines:"Generate Engines",new_engine:"New Engine",no_engines:"No Engines Configured",no_engines_desc:"Create your first pipeline to automatically turn signals into newsletters, threads, or audio briefs.",run_engine:"Run Engine",running:"Running...",last_run:"Last Run",never:"Never",schedule:"Schedule",manual:"Manual",topic:"Topic",pipeline:"Pipeline",pause:"Pause",resume:"Resume",view_json:"View Production Brief JSON",json_contract:"Stateless & Self-Contained Contract",json_desc:"This JSON contains the full context (Signals + User Persona) required for the Desktop Studio.",generating_asset:"Generating Asset...",queued_desktop:"Queued for Desktop...",desktop_processing:"The RealTimeX Desktop app is processing this request. This modal will update automatically once finished.",unsupported_type:"Unsupported asset type",edit_engine:"Edit Engine",engine_name:"Engine Name",type:"Type",status:"Status",execution_env:"Execution Environment",local_llm:"Local (Built-in LLM)",desktop_swarm:"RealTimeX Desktop (Agent Swarm)",env_desc_desktop:"Delegates heavy tasks like Audio/Video to the desktop app.",env_desc_local:"Runs simple Markdown tasks directly in Alchemy.",min_score:"Min Score",max_signals:"Max Signals",category_filter:"Category Filter (multi-select)",multi_select_hint:"Hold Cmd/Ctrl to select multiple categories",schedule_hint:"Note: Scheduling is not yet automated",prompt_override:"Custom Prompt Override (optional)",prompt_placeholder:"Override the default prompt for this engine type...",delete_confirm:"Really delete?",confirm:"Confirm",copied_json:"JSON copied to clipboard",json_footer:"This JSON contains the full context (Signals + User Persona) required for the Desktop Studio."},tF={title:"Account Configuration",desc:"Manage your profile and database connection.",profile:"Profile",security:"Security",supabase:"Supabase",first_name:"First Name",last_name:"Last Name",email_locked:"Email Address (Locked)",sound_effects:"Sound Effects",sound_desc:"Enable audio feedback for sync events and signal discoveries.",sign_out:"Sign Out",logout_desc:"End your current session and return to the login screen.",preserve_profile:"Preserve Profile",security_title:"Update Password",new_password:"New Password",confirm_password:"Confirm Password",password_mismatch:"Passwords do not match.",password_too_short:"Password too weak. Minimum 8 characters.",password_rotate_success:"Key rotation successful.",rotate_key:"Rotate Key",essence_resonance:"Database Connection",byok_desc:"Bring Your Own Keys (BYOK) for intelligence persistence.",established_link:"Established Link",env_notice:"Active from environment variables. UI override is enabled.",realign_link:"Realign Link",sever_link:"Sever Link",sever_confirm:"Sever connection to this essence? This will reset local resonance.",anon_secret_fragment:"Anon Secret Fragment",no_resonance:"No Database Connection",no_resonance_desc:"The system needs a cloud database to store intelligence fragments.",initiate_link:"Initiate Link",test_connection:"Test Connection",tts_title:"Text-to-Speech",tts_desc:"Configure voice playback for assistant messages in Chat.",tts_auto_play:"Auto-play assistant responses",tts_provider:"TTS Provider",tts_voice:"Voice",tts_quality:"Quality",tts_speed:"Speed",tts_quality_low:"Performance",tts_quality_high:"Quality",tts_test:"Test Voice",tts_enabled:"Enable TTS"},nF={title:"System Logs",desc:"Detailed history of sync runs, sources, and URL processing",blacklist_suggestion:"Potential Blacklist",blacklist_desc:"Candidates for blocking",recent_errors:"Recent Errors",errors_desc:"Failed URL processing",total_signals:"Total Signals",signals_desc:"Successfully fetched",blacklist_modal_title:"Blacklist Suggestions",blacklist_modal_desc:"Review domains suggested for blacklisting based on low scores.",no_suggestions:"No suggestions right now",quality_good:"Your signal quality looks good!",signals_count:"{{count}} signals",avg_score:"Avg Score: {{score}}",low_quality:"Consistently Low Quality",repetitive:"Repetitive Pattern",blacklist_domain:"Blacklist Domain",errors_modal_title:"Recent Errors",errors_modal_desc:"Log of recent failures and issues.",no_recent_errors:"No recent errors found.",signals_modal_title:"Found Signals",signals_modal_desc:"Browse and manage your fetched items history.",search_placeholder:"Search signals...",any_score:"Any Score",high_score:"High (80%+)",medium_score:"Medium (50-79%)",low_score:"Low (<50%)",all_categories:"All Categories",page_x:"Page {{page}}"},rF={title:"System Engine",live:"LIVE",clear:"Clear",idle:"Idle. Awaiting data fetching events...",run_completed:"Mining Run Completed",signals:"Signals",urls:"URLs",skipped:"Skipped",failed_to_process:"{{count}} URLs failed to process",view_logs:"View Logs",hide_details:"Hide Details",view_details:"View Details",engine_log:"Live Engine Log",stop_sync:"Stop Sync",state_reading:"Reading",state_thinking:"Thinking",state_signal:"Signal",state_skipped:"Skipped",state_error:"Error",state_completed:"Completed",msg_reading:"Reading content from: {{url}}",msg_thinking:"Analyzing relevance of: {{title}}",msg_found_signal:"Found signal: {{summary}} ({{score}}%)",msg_low_signal:"Low signal stored for review ({{score}}%): {{title}}",msg_failed:"Analysis failed for {{title}}: {{error}}",msg_sync_completed:"Sync completed: {{signals}} signals found, {{skipped}} skipped, {{errors}} errors"},sF={switch_light:"Switch to Light Mode",switch_dark:"Switch to Dark Mode",view_changelog:"View Changelog",release_notes:"Release Notes",changelog_error:"Failed to load changelog."},iF={title:"System Status",mining:"Processing",standing_by:"Ready",idle:"Idle",tracked:"Items tracked",avg_score:"Average score",top_signal:"Top item",latest:"Latest",awaiting:"Awaiting processing",no_signals:"No items yet"},oF={title:"Intelligence Engine",subtitle:"Fine-tune the system's parameters and provider links.",configuration:"AI Configuration",test_connection:"Test Connection",save_config:"Save Configuration",llm_provider:"LLM Provider",embedding_provider:"Embedding Provider",sdk_connected:"SDK Connected",sdk_not_available:"SDK Not Available",provider:"Provider",intelligence_model:"Intelligence Model",embedding_model:"Embedding Model",loading_providers:"Loading providers...",sdk_info_success:"✓ Using RealTimeX configured provider",sdk_info_fail:"⚠️ RealTimeX SDK not detected. Configure in RealTimeX Desktop.",embedding_info_success:"✓ Embeddings are generated using your RealTimeX configured provider",embedding_info_fail:"⚠️ RealTimeX SDK not detected. Configure providers in RealTimeX Desktop.",persona_title:"User Profile",save_memory:"Save Memory",interests_title:"Active Interests",interests_priority:"High Priority",interests_desc:"The system prioritizes content matching these topics. Updated automatically based on Favorites & Boosts.",interests_placeholder:"e.g. User focuses on React performance, Rust backend systems, and AI Agent architecture...",antipatterns_title:"Dislikes",antipatterns_priority:"Avoid",antipatterns_desc:"The system filters out or scores down content matching these patterns. Updated via Dismissals.",antipatterns_placeholder:"e.g. Dislikes marketing fluff, generic listicles, and crypto hype...",browser_sources:"Browser History Sources",save_browser:"Save Browser Sources",blacklist_title:"Blacklist Domains",blacklist_desc:"URLs containing these patterns will be skipped during mining. Enter one pattern per line.",blacklist_label:"Domain Patterns (one per line)",blacklist_placeholder:`google.com/search
|
|
150
|
+
`,children:_})]},w)),u.jsx("div",{ref:y})]})})]})]}),u.jsxs("div",{className:"px-6 py-4 bg-white/[0.02] border-t border-white/5 flex items-center gap-3",children:[u.jsx("div",{className:"text-warning",children:u.jsx(Jh,{size:16})}),u.jsx("p",{className:"text-[10px] text-white/40 leading-tight",children:"Migration will apply cumulative schema updates to your Supabase instance. Do not close this window during execution."})]})]})}):null}class Az{audioContext=null;enabled=!0;constructor(){}getAudioContext(){return this.audioContext||(this.audioContext=new(window.AudioContext||window.webkitAudioContext)),this.audioContext}setEnabled(t){this.enabled=t}isEnabled(){return this.enabled}playTone(t,n,r=.3){if(this.enabled)try{const s=this.getAudioContext(),o=s.createOscillator(),a=s.createGain();o.connect(a),a.connect(s.destination),o.frequency.value=t,o.type="sine",a.gain.setValueAtTime(r,s.currentTime),a.gain.exponentialRampToValueAtTime(.01,s.currentTime+n),o.start(s.currentTime),o.stop(s.currentTime+n)}catch(s){console.warn("[Sound] Failed to play tone:",s)}}playSequence(t,n=.3){if(!this.enabled)return;let r=0;t.forEach(s=>{setTimeout(()=>{this.playTone(s.freq,s.duration,n)},r),r+=s.delay})}syncStart(){this.playSequence([{freq:261.63,duration:.15,delay:0},{freq:329.63,duration:.15,delay:100},{freq:392,duration:.2,delay:100}],.2)}signalFound(){this.playSequence([{freq:392,duration:.1,delay:0},{freq:523.25,duration:.15,delay:80}],.25)}syncComplete(){this.playSequence([{freq:261.63,duration:.12,delay:0},{freq:329.63,duration:.12,delay:80},{freq:392,duration:.12,delay:80},{freq:523.25,duration:.2,delay:80}],.2)}error(){this.playSequence([{freq:329.63,duration:.15,delay:0},{freq:261.63,duration:.2,delay:100}],.3)}click(){this.playTone(440,.05,.15)}}const Jo=new Az;function Pz(){const{t:e}=nt(),[t,n]=A.useState([]),[r,s]=A.useState([]),[o,a]=A.useState("discovery"),[c,d]=A.useState(!1),[f,p]=A.useState(null),[m,y]=A.useState(!0),[x,_]=A.useState(!k0),[w,k]=A.useState(!0),[S,C]=A.useState(!1),[j,R]=A.useState(!1),[N,T]=A.useState(null),[I,V]=A.useState(!1),[J,D]=A.useState(!1),[Y,$]=A.useState(!1),[ne,H]=A.useState(!0),[K,ee]=A.useState(()=>localStorage.getItem("theme")||"dark"),[te,W]=A.useState(null),[re,P]=A.useState(null),[M,X]=A.useState(!1),O=A.useRef(null);A.useMemo(()=>{const Ce=r.length;let Ge=0,Je=0,Ne=null;for(const Nt of r){Ge+=Nt.score,Nt.score>Je&&(Je=Nt.score);const ae=new Date(Nt.date);(!Ne||ae>new Date(Ne.date))&&(Ne=Nt)}const mt=Ce?Math.round(Ge/Ce):0,Rt=Ne?new Date(Ne.date):null;return{total:Ce,average:mt,top:Je,latestTimestamp:Rt,latestTitle:Ne?.title??Ne?.category??null}},[r]),A.useEffect(()=>{(async()=>{if(!k0){_(!0),y(!1);return}try{const{data:Je,error:Ne}=await oe.from("init_state").select("is_initialized").single();Ne?(console.warn("[App] Init check error (might be fresh DB):",Ne),Ne.code==="42P01"&&k(!1)):k(Je.is_initialized>0);const{data:{session:mt}}=await oe.auth.getSession();if(p(mt?.user??null),mt?.user){const Rt=await Zw(oe);P(Rt.needsMigration?Rt:null)}}catch(Je){console.error("[App] Status check failed:",Je)}finally{y(!1)}})();const{data:{subscription:Ge}}=oe.auth.onAuthStateChange((Je,Ne)=>{p(Ne?.user??null)});return()=>Ge.unsubscribe()},[]),A.useEffect(()=>{document.documentElement.setAttribute("data-theme",K),localStorage.setItem("theme",K)},[K]);const[me,Ae]=A.useState({});A.useEffect(()=>{(async()=>{if(!f)return;const{data:Ge}=await oe.from("alchemy_settings").select("sync_start_date, last_sync_checkpoint").eq("user_id",f.id).maybeSingle();Ge&&Ae(Ge)})()},[f,I]),A.useEffect(()=>{if(!f)return;(async()=>{const{data:Je}=await oe.from("alchemy_settings").select("sound_enabled").eq("user_id",f.id).maybeSingle();if(Je){const Ne=Je.sound_enabled??!0;H(Ne),Jo.setEnabled(Ne)}})();const Ge=oe.channel("processing_events").on("postgres_changes",{event:"INSERT",schema:"public",table:"processing_events",filter:`user_id=eq.${f.id}`},Je=>{const Ne=Je.new;["Completed","Stopped","Failed"].includes(Ne.agent_state)||Ne.metadata?.is_completion?(D(!1),ne&&(Ne.metadata?.errors>0||Ne.agent_state==="Failed"?Jo.error():Ne.agent_state==="Completed"&&Jo.syncComplete()),Ne.agent_state==="Completed"&&setTimeout(()=>{$(!1)},5e3),ye()):(J||D(!0),Ne.metadata?.is_start&&!J&&($(!0),ne&&Jo.syncStart()),Ne.agent_state==="Signal"&&ne&&Jo.signalFound())}).subscribe();return()=>{oe.removeChannel(Ge)}},[f,J,ne]),A.useEffect(()=>{const Ce=new EventSource("/events");return Ce.onmessage=Ge=>{const Je=JSON.parse(Ge.data);Je.type==="history"?n(Ne=>[...Je.data,...Ne].slice(0,100)):n(Ne=>[Je,...Ne].slice(0,100))},ye(),()=>Ce.close()},[f]),A.useEffect(()=>{O.current&&O.current.scrollIntoView({behavior:"smooth"})},[t]);const ye=async()=>{try{if(f){const{data:Ge,error:Je}=await oe.from("signals").select("*").order("created_at",{ascending:!1});if(!Je&&Ge){s(Ge.map(Ne=>({id:Ne.id,title:Ne.title,score:Ne.score,summary:Ne.summary,date:Ne.created_at,category:Ne.category,entities:Ne.entities})));return}}const Ce=await et.get("/api/signals");s(Ce.data)}catch(Ce){console.error("Failed to fetch signals",Ce)}},He=async()=>{d(!0),$(!0);try{await et.post("/api/mine"),ye()}catch(Ce){console.error("Mining failed:",Ce)}finally{d(!1)}},ce=async()=>{try{await et.post("/api/mine/stop")}catch(Ce){console.error("[App] Failed to stop sync:",Ce)}},Ee=(Ce,Ge)=>{Ce==="logs"?(W(Ge),a("logs")):a(Ce)};return m?u.jsx("div",{className:"flex items-center justify-center h-screen bg-bg",children:u.jsx("div",{className:"w-12 h-12 border-4 border-primary/20 border-t-primary rounded-full animate-spin"})}):x?u.jsx(Gw,{onComplete:()=>_(!1)}):f?u.jsx(bL,{children:u.jsx(EL,{children:u.jsx(jL,{children:u.jsxs("div",{className:"flex h-screen w-screen overflow-hidden bg-bg text-fg",children:[u.jsxs(Ie.aside,{animate:{width:S?72:240},className:"glass m-4 mr-0 flex flex-col relative",children:[u.jsxs("div",{className:`px-4 py-3 pb-4 flex items-center gap-3 ${S?"justify-center":""}`,children:[u.jsx("div",{className:"w-10 h-10 min-w-[40px] bg-gradient-to-br from-primary to-accent rounded-xl flex items-center justify-center shadow-lg glow-primary",children:u.jsx(qt,{className:"text-white fill-current",size:24})}),!S&&u.jsx(Ie.h1,{initial:{opacity:0},animate:{opacity:1},className:"text-xl font-bold tracking-tight",children:"Alchemist"})]}),u.jsxs("nav",{className:"flex-1 flex flex-col gap-1 px-3",children:[u.jsx(Ci,{active:o==="discovery",onClick:()=>a("discovery"),icon:u.jsx(Oj,{size:20}),label:e("tabs.discovery"),collapsed:S}),u.jsx(Ci,{active:o==="chat",onClick:()=>a("chat"),icon:u.jsx(Qh,{size:20}),label:e("tabs.chat"),collapsed:S}),u.jsx(Ci,{active:o==="transmute",onClick:()=>a("transmute"),icon:u.jsx(qt,{size:20}),label:e("tabs.transmute"),collapsed:S}),u.jsx(Ci,{active:o==="engine",onClick:()=>a("engine"),icon:u.jsx(vc,{size:20}),label:e("common.settings"),collapsed:S}),u.jsx(Ci,{active:o==="logs",onClick:()=>a("logs"),icon:u.jsx(qi,{size:20}),label:e("tabs.logs"),collapsed:S}),u.jsx(Ci,{active:o==="account",onClick:()=>a("account"),icon:u.jsx(Vc,{size:20}),label:e("common.account"),collapsed:S})]}),u.jsx("div",{className:"px-3 pb-2 border-t border-white/5 pt-4 mt-2 relative z-[100]",children:u.jsx("div",{className:S?"flex justify-center":"px-1",children:u.jsx(Vp,{collapsed:S,position:"top"})})}),u.jsx("div",{className:"px-3 pb-2",children:u.jsxs("button",{onClick:()=>ee(K==="dark"?"light":"dark"),className:`w-full flex items-center ${S?"justify-center":"gap-3"} px-4 py-2.5 rounded-lg text-fg/40 hover:text-fg hover:bg-surface/50 transition-all text-xs font-medium`,title:S?e(K==="dark"?"shell.switch_light":"shell.switch_dark"):"",children:[u.jsx("div",{className:"min-w-[20px] flex justify-center",children:K==="dark"?u.jsx(Hj,{size:18}):u.jsx(zj,{size:18})}),!S&&u.jsx(Ie.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"whitespace-nowrap",children:e(K==="dark"?"common.light_mode":"common.dark_mode")})]})}),u.jsxs("div",{className:"px-3 pb-3",children:[u.jsx("button",{onClick:()=>C(!S),className:`w-full flex items-center px-4 py-2.5 rounded-lg text-fg/40 hover:text-fg hover:bg-surface/50 transition-all text-xs font-medium ${S?"justify-center":"gap-3"}`,children:S?u.jsx(Sj,{size:20}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"min-w-[20px] flex justify-center",children:u.jsx(kj,{size:20})}),u.jsx("span",{children:e("common.collapse")})]})}),u.jsxs("button",{onClick:()=>R(!0),className:"w-full flex items-center justify-center gap-2 px-3 py-2 mt-2 text-[10px] font-mono text-fg/30 hover:text-primary hover:bg-surface/30 rounded-lg transition-all group",title:e("shell.view_changelog"),children:[!S&&u.jsxs(u.Fragment,{children:[u.jsx(ef,{size:12,className:"group-hover:text-primary transition-colors"}),u.jsxs("span",{children:["v","1.0.87"]})]}),S&&u.jsx(ef,{size:14,className:"group-hover:text-primary transition-colors"})]})]})]}),u.jsxs("main",{className:"flex-1 flex flex-col p-4 gap-4 overflow-hidden relative",children:[re&&u.jsx(Nz,{onOpen:()=>X(!0)}),o==="discovery"&&u.jsxs(u.Fragment,{children:[u.jsxs("header",{className:"flex justify-between items-center px-4 py-2",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-2xl font-bold",children:e("tabs.discovery")}),u.jsx("p",{className:"text-sm text-fg/50",children:e("setup.welcome_desc")})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsxs("button",{onClick:()=>V(!0),className:"px-6 py-3 glass hover:bg-surface transition-colors flex items-center gap-2 text-sm font-medium",children:[u.jsx(vc,{size:16}),u.jsxs("div",{className:"flex flex-col items-start",children:[u.jsx("span",{children:e("discovery.sync_settings")}),u.jsx("span",{className:"text-[10px] text-fg/40 font-mono",children:me.sync_start_date?`${e("discovery.from")}: ${new Date(me.sync_start_date).toLocaleString([],{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`:me.last_sync_checkpoint?`${e("discovery.checkpoint")}: ${new Date(me.last_sync_checkpoint).toLocaleString([],{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`:e("discovery.all_time")})]})]}),u.jsxs("button",{onClick:He,disabled:J,className:"px-6 py-3 bg-gradient-to-r from-primary to-accent text-white font-bold rounded-xl shadow-lg glow-primary hover:scale-105 active:scale-95 transition-all flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100",children:[u.jsx(Vs,{size:18,className:J?"animate-spin":""}),e(J?"discovery.syncing":"discovery.sync_history")]})]})]}),u.jsx(GL,{onOpenUrl:Ce=>window.open(Ce,"_blank","noopener,noreferrer"),onSync:He,isSyncing:J,onCopyText:Ce=>{navigator.clipboard.writeText(Ce)}})]}),o==="chat"&&u.jsx(kz,{}),o==="transmute"&&u.jsx(Ez,{}),o==="engine"&&u.jsx(SL,{}),o==="account"&&u.jsx(AL,{}),o==="logs"&&u.jsx($L,{initialState:te}),u.jsx(TL,{isExpanded:Y,onToggle:()=>$(!Y),onNavigate:Ee,liftUp:o==="chat",isSyncing:J,onStop:ce})]}),u.jsx(LL,{signal:N,onClose:()=>T(null)}),u.jsx(IL,{isOpen:I,onClose:()=>V(!1)}),u.jsx(Sz,{isOpen:j,onClose:()=>R(!1)}),u.jsx(Tz,{isOpen:M,onClose:()=>X(!1),status:re})]})})})}):u.jsx(gL,{onAuthSuccess:()=>ye(),isInitialized:w})}function Ci({active:e,icon:t,label:n,onClick:r,collapsed:s}){return u.jsx("button",{onClick:r,title:s?n:"",className:`w-full flex items-center ${s?"justify-center":"gap-3"} px-4 py-3 rounded-xl transition-all ${e?"bg-primary/10 text-primary shadow-sm":"text-fg/60 hover:bg-surface hover:text-fg"}`,children:s?Ui.cloneElement(t,{className:e?"text-primary":""}):u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"min-w-[20px] flex justify-center",children:Ui.cloneElement(t,{className:e?"text-primary":""})}),u.jsx(Ie.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:"font-semibold text-sm whitespace-nowrap",children:n})]})})}function Rz(){et.interceptors.request.use(async e=>{try{const{data:{session:t}}=await oe.auth.getSession();t?.access_token&&(e.headers.Authorization=`Bearer ${t.access_token}`);const n=os();n&&(e.headers["x-supabase-url"]=n.url,e.headers["x-supabase-key"]=n.anonKey)}catch(t){console.error("[Axios] Error injecting headers:",t)}return e})}const{slice:Oz,forEach:Lz}=[];function Iz(e){return Lz.call(Oz.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}function Dz(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(e))}const p_=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Mz=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(t);let o=`${e}=${s}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!p_.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!p_.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(o+="; Partitioned"),o},m_={create(e,t,n,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+n*60*1e3)),r&&(s.domain=r),document.cookie=Mz(e,t,s)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let s=n[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return s.substring(t.length,s.length)}return null},remove(e,t){this.create(e,"",-1,t)}};var zz={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return m_.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:s,cookieOptions:o}=t;n&&typeof document<"u"&&m_.create(n,e,r,s,o)}},Fz={name:"querystring",lookup(e){let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:r}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a<o.length;a++){const c=o[a].indexOf("=");c>0&&o[a].substring(0,c)===t&&(n=o[a].substring(c+1))}}return n}},$z={name:"hash",lookup(e){let{lookupHash:t,lookupFromHashIndex:n}=e,r;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const o=s.substring(1);if(t){const a=o.split("&");for(let c=0;c<a.length;c++){const d=a[c].indexOf("=");d>0&&a[c].substring(0,d)===t&&(r=a[c].substring(d+1))}}if(r)return r;if(!r&&n>-1){const a=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?a[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return r}};let Ei=null;const g_=()=>{if(Ei!==null)return Ei;try{if(Ei=typeof window<"u"&&window.localStorage!==null,!Ei)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ei=!1}return Ei};var Uz={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&g_())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&g_()&&window.localStorage.setItem(n,e)}};let Ni=null;const y_=()=>{if(Ni!==null)return Ni;try{if(Ni=typeof window<"u"&&window.sessionStorage!==null,!Ni)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Ni=!1}return Ni};var Bz={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&y_())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&y_()&&window.sessionStorage.setItem(n,e)}},Vz={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:s}=navigator;if(n)for(let o=0;o<n.length;o++)t.push(n[o]);r&&t.push(r),s&&t.push(s)}return t.length>0?t:void 0}},qz={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Hz={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Kz={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let ok=!1;try{document.cookie,ok=!0}catch{}const ak=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];ok||ak.splice(1,1);const Wz=()=>({order:ak,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class lk{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Iz(n,this.options||{},Wz()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(zz),this.addDetector(Fz),this.addDetector(Uz),this.addDetector(Bz),this.addDetector(Vz),this.addDetector(qz),this.addDetector(Hz),this.addDetector(Kz),this.addDetector($z)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(n=n.concat(s))}}),n=n.filter(r=>r!=null&&!Dz(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}lk.type="languageDetector";const Gz={save:"Save",cancel:"Cancel",loading:"Loading...",error:"Error",success:"Success",settings:"Settings",search:"Search",back:"Back",all:"All",delete:"Delete",update:"Update",edit:"Edit",close:"Close",complete:"Complete",skip:"Skip",begin:"Begin",connection:"Connection",setup:"Setup",project:"Project",account:"Account",logout:"Logout",welcome:"Welcome",dark_mode:"Dark Mode",light_mode:"Light Mode",collapse:"Collapse",just_now:"Just now",enabled:"Enabled",disabled:"Disabled",system_default:"System Default",default:"Default",quick:"Quick (5)",balanced:"Balanced (50)",thorough:"Thorough (200)",resetting:"Resetting...",saving:"Saving...",locale_code:"en-US",categories:{ai_ml:"AI & ML",business:"Business",politics:"Politics",technology:"Technology",finance:"Finance",crypto:"Crypto",science:"Science",other:"Other"}},Jz={discovery:"Discovery",chat:"Chat",transmute:"Generate",logs:"System Logs",history:"History"},Xz={welcome_title:"Setup Your Workspace",welcome_desc:"The app needs a Supabase project to store signal fragments and intelligence patterns.",requirements:"Requirements:",project_url:"Supabase Project URL",anon_key:"Anon Public API Key",db_password:"Database Password",project_url_placeholder:"https://xxx.supabase.co or project-id",anon_key_placeholder:"eyJ...",project_id_placeholder:"abcdefghijklm",access_token_placeholder:"sbp_...",begin_init:"BEGIN INITIALIZATION",connect_essence:"CONNECT DATABASE",credentials_title:"Database Credentials",credentials_desc:"Connect the application to your cloud database.",validating:"Validating connection",resonance:"Synchronizing Connection...",init_schema:"Initialize Schema",schema_desc:"Run database migrations to set up required tables and functions.",project_id:"Project ID",access_token:"Access Token",run_migrations:"RUN MIGRATIONS",running_migrations:"Running Migrations",take_minute:"This may take a minute...",engine_aligned:"System Ready",restarting:"Restarting services...",forge_project:"Create project in Supabase",project_id_help:"Found in Supabase Dashboard → Project Settings → General",access_token_help:"Generate one at",access_token_link:"supabase.com/dashboard/account/tokens",project_id_required:"Project ID is required",access_token_required:"Access token is required",migration_failed_logs:"Migration failed. Check logs for details.",stream_error:"Failed to read migration stream",back:"BACK",retry:"RETRY",choose_setup_path:"Choose Setup Path",forge_how:"How do you want to set up your workspace?",quick_launch:"Quick Launch",quick_launch_desc:"Create a Supabase project for me (requires Access Token)",manual_connection:"Manual Connection",manual_connection_desc:"Connect an existing project (requires URL and anon key)",quick_provision_desc:"Provide an access token to auto-provision everything",get_token:"GET TOKEN",project_name:"Project Name",project_name_placeholder:"e.g. My App",organization:"Organization",region:"Region",launch_engine:"Launch Engine",provisioning_forge:"Provisioning Project",building_instance:"Building your private Supabase instance...",regions:{"us-east-1":"US East (N. Virginia)","us-west-1":"US West (N. California)","eu-central-1":"Europe (Frankfurt)","eu-west-2":"Europe (London)","ap-southeast-1":"Asia Pacific (Singapore)","ap-southeast-2":"Asia Pacific (Sydney)","sa-east-1":"South America (São Paulo)"}},Qz={title_init:"INITIALIZE ADMIN",title_join:"JOIN TEAM",title_mystic:"ACCESS LOGIN",title_login:"LOGIN",desc_init:"Create the primary account",desc_mystic_email:"Enter your email",desc_mystic_code:"Enter the verification code",desc_login:"Turn your data into intelligence",first_name:"First Name",last_name:"Last Name",first_name_placeholder:"John",last_name_placeholder:"Doe",email_address:"Email Address",email_placeholder:"user@example.com",complexity_key:"Password",password_placeholder:"••••••••",init_account:"INITIALIZE ACCOUNT",send_code:"SEND CODE",unseal_engine:"UNLOCK SYSTEM",verify_code:"VERIFY CODE",change_email:"Change email address",sign_in_code:"Sign in with Code",sign_in_password:"Sign in with Password",already_alchemist:"Already have an account?",new_to_alchemy:"New to the app?",login_instead:"Login instead",create_account:"Create an account",session_failed:"Failed to create session",invalid_code:"Invalid code"},Yz={filters:"Filters",category:"Category",intelligence_score:"Intelligence Score",no_signals_in_category:"No signals in {{category}} yet.",no_categories:"No categories yet.",discovery_hint:"Items will be organized here once discovered.",loading_signals:"Loading signals...",dismiss_hint:"Dismiss (Not interested)",signal_count_one:"{{count}} signal",signal_count_other:"{{count}} signals",time_min_ago:"{{count}}m ago",time_hour_ago:"{{count}}h ago",time_day_ago:"{{count}}d ago",add_note_title:"Add Note",target:"Target",note_placeholder:"Enter your thoughts, ideas, or action items regarding this signal...",save_note:"Save Note",view_all_sources:"View all sources",source_count_one:"{{count}} source",source_count_other:"{{count}} sources",source_found_in:"Found in {{count}} different sources",high_confidence:"High confidence - found in {{count}} sources",new_signals:"New Signals",smart_summary:"Smart Summary",entities:"Entities",sources:"Sources",last_sync:"Last Sync",syncnow:"Sync Now",all_time:"All time",checkpoint:"Checkpoint",from:"From",score_high:"HIGH",score_medium:"MEDIUM",score_low:"LOW",sources_count:"{{count}} sources",open_source:"Open",add_note:"Note",boost_topic:"Boost Topic",boosted:"Boosted",dismissed:"Dismissed",remove_favourite:"Remove from favorites",add_favourite:"Add to favorites",sync_history:"Sync History",syncing:"Syncing...",sync_settings:"Sync Settings",discovered:"Discovered",original_source:"Original Source",ai_summary:"AI Summary",full_content:"Full Content",copied:"Copied!",open_link:"Open",detail_title:"Signal Details",sync_from:"Sync From (Optional)",urls_per_sync:"URLs per Sync",sync_from_hint:"Leave empty to sync only new URLs since the last sync. Set a date to process URLs from that day forward.",reset_checkpoint:"Reset Checkpoint",reset_checkpoint_hint:'Clear the sync checkpoint to force a full resync from your "Sync From" date.',sync_info:'The system tracks progress automatically. Use "Sync From" to backfill history or "Reset Checkpoint" to start over.',save_settings:"Save Settings",sync_saved:"Sync settings saved successfully",checkpoint_reset:"Checkpoint reset successfully",login_to_save:"Please log in to save settings",login_to_reset:"Please log in to reset checkpoint",status_updated:"Engine status updated to {{status}}",asset_ready:'Asset "{{title}}" is ready!',scanning:"Scanning for new categories and topics...",discovery_complete:"Engine discovery complete!",discovery_failed:"Discovery failed. Check settings.",welcome_title:"Welcome!",welcome_desc:"Connect your browser history to start discovering signals. We'll automatically analyze your visited pages to find mentions of AI, tech, and more.",auto_detect_sync:"Auto-detect & Sync",privacy_first:"Privacy First",offline_first:"Offline First",load_failed:"Failed to load engines",starting_run:"Starting engine run...",run_complete:"Engine run complete! Created: {{title}}",run_started_desktop:"Engine run started on Desktop. Tracking ID: {{id}}",run_failed:"Failed to run engine",brief_failed:"Failed to generate production brief",topic:"Topic",pipeline:"Pipeline"},Zz={history:"History",ask_anything:"Ask anything about your browsing history...",sources:"Sources",processing:"Processing your query...",new_chat:"New Chat",no_messages:"No messages yet. Start a conversation!",no_history:"No chat history yet.",title:"Ask AI",desc:"I can help you recall information, summarize topics, and find insights from your browsing history.",thinking:"Thinking...",placeholder:"Ask about your history...",error_message:"Sorry, I encountered an error processing your request.",relevant_context:"Relevant Context",match_score:"{{score}}% Match",rag_attribution:"AI used these {{count}} items to answer",suggestions:{react:"What have I read about React recently?",ai:"Summarize the latest AI news I visited.",finance:"Do I have any notes on Finance?",performance:"Find articles about 'Performance'"},speak:"Speak",stop_speaking:"Stop",speaking:"Speaking..."},eF={engines:"Generation Pipelines",assets:"Generated Assets",newsletter:"Newsletter",thread:"Thread",audio:"Audio",report:"Report",title:"Generation Engine",desc:"Active generation pipelines and assets",generate:"Generate",processing_desktop:"Processing on Desktop...",ensure_defaults:"Ensure Default Engines",create_engine:"Create Engine",no_assets:"No assets generated yet.",generate_engines:"Generate Engines",new_engine:"New Engine",no_engines:"No Engines Configured",no_engines_desc:"Create your first pipeline to automatically turn signals into newsletters, threads, or audio briefs.",run_engine:"Run Engine",running:"Running...",last_run:"Last Run",never:"Never",schedule:"Schedule",manual:"Manual",topic:"Topic",pipeline:"Pipeline",pause:"Pause",resume:"Resume",view_json:"View Production Brief JSON",json_contract:"Stateless & Self-Contained Contract",json_desc:"This JSON contains the full context (Signals + User Persona) required for the Desktop Studio.",generating_asset:"Generating Asset...",queued_desktop:"Queued for Desktop...",desktop_processing:"The RealTimeX Desktop app is processing this request. This modal will update automatically once finished.",unsupported_type:"Unsupported asset type",edit_engine:"Edit Engine",engine_name:"Engine Name",type:"Type",status:"Status",execution_env:"Execution Environment",local_llm:"Local (Built-in LLM)",desktop_swarm:"RealTimeX Desktop (Agent Swarm)",env_desc_desktop:"Delegates heavy tasks like Audio/Video to the desktop app.",env_desc_local:"Runs simple Markdown tasks directly in Alchemy.",min_score:"Min Score",max_signals:"Max Signals",category_filter:"Category Filter (multi-select)",multi_select_hint:"Hold Cmd/Ctrl to select multiple categories",schedule_hint:"Note: Scheduling is not yet automated",prompt_override:"Custom Prompt Override (optional)",prompt_placeholder:"Override the default prompt for this engine type...",delete_confirm:"Really delete?",confirm:"Confirm",copied_json:"JSON copied to clipboard",json_footer:"This JSON contains the full context (Signals + User Persona) required for the Desktop Studio."},tF={title:"Account Configuration",desc:"Manage your profile and database connection.",profile:"Profile",security:"Security",supabase:"Supabase",first_name:"First Name",last_name:"Last Name",email_locked:"Email Address (Locked)",sound_effects:"Sound Effects",sound_desc:"Enable audio feedback for sync events and signal discoveries.",sign_out:"Sign Out",logout_desc:"End your current session and return to the login screen.",preserve_profile:"Preserve Profile",security_title:"Update Password",new_password:"New Password",confirm_password:"Confirm Password",password_mismatch:"Passwords do not match.",password_too_short:"Password too weak. Minimum 8 characters.",password_rotate_success:"Key rotation successful.",rotate_key:"Rotate Key",essence_resonance:"Database Connection",byok_desc:"Bring Your Own Keys (BYOK) for intelligence persistence.",established_link:"Established Link",env_notice:"Active from environment variables. UI override is enabled.",realign_link:"Realign Link",sever_link:"Sever Link",sever_confirm:"Sever connection to this essence? This will reset local resonance.",anon_secret_fragment:"Anon Secret Fragment",no_resonance:"No Database Connection",no_resonance_desc:"The system needs a cloud database to store intelligence fragments.",initiate_link:"Initiate Link",test_connection:"Test Connection",tts_title:"Text-to-Speech",tts_desc:"Configure voice playback for assistant messages in Chat.",tts_auto_play:"Auto-play assistant responses",tts_provider:"TTS Provider",tts_voice:"Voice",tts_quality:"Quality",tts_speed:"Speed",tts_quality_low:"Performance",tts_quality_high:"Quality",tts_test:"Test Voice",tts_enabled:"Enable TTS"},nF={title:"System Logs",desc:"Detailed history of sync runs, sources, and URL processing",blacklist_suggestion:"Potential Blacklist",blacklist_desc:"Candidates for blocking",recent_errors:"Recent Errors",errors_desc:"Failed URL processing",total_signals:"Total Signals",signals_desc:"Successfully fetched",blacklist_modal_title:"Blacklist Suggestions",blacklist_modal_desc:"Review domains suggested for blacklisting based on low scores.",no_suggestions:"No suggestions right now",quality_good:"Your signal quality looks good!",signals_count:"{{count}} signals",avg_score:"Avg Score: {{score}}",low_quality:"Consistently Low Quality",repetitive:"Repetitive Pattern",blacklist_domain:"Blacklist Domain",errors_modal_title:"Recent Errors",errors_modal_desc:"Log of recent failures and issues.",no_recent_errors:"No recent errors found.",signals_modal_title:"Found Signals",signals_modal_desc:"Browse and manage your fetched items history.",search_placeholder:"Search signals...",any_score:"Any Score",high_score:"High (80%+)",medium_score:"Medium (50-79%)",low_score:"Low (<50%)",all_categories:"All Categories",page_x:"Page {{page}}"},rF={title:"System Engine",live:"LIVE",clear:"Clear",idle:"Idle. Awaiting data fetching events...",run_completed:"Mining Run Completed",signals:"Signals",urls:"URLs",skipped:"Skipped",failed_to_process:"{{count}} URLs failed to process",view_logs:"View Logs",hide_details:"Hide Details",view_details:"View Details",engine_log:"Live Engine Log",stop_sync:"Stop Sync",state_reading:"Reading",state_thinking:"Thinking",state_signal:"Signal",state_skipped:"Skipped",state_error:"Error",state_completed:"Completed",msg_reading:"Reading content from: {{url}}",msg_thinking:"Analyzing relevance of: {{title}}",msg_found_signal:"Found signal: {{summary}} ({{score}}%)",msg_low_signal:"Low signal stored for review ({{score}}%): {{title}}",msg_failed:"Analysis failed for {{title}}: {{error}}",msg_sync_completed:"Sync completed: {{signals}} signals found, {{skipped}} skipped, {{errors}} errors"},sF={switch_light:"Switch to Light Mode",switch_dark:"Switch to Dark Mode",view_changelog:"View Changelog",release_notes:"Release Notes",changelog_error:"Failed to load changelog."},iF={title:"System Status",mining:"Processing",standing_by:"Ready",idle:"Idle",tracked:"Items tracked",avg_score:"Average score",top_signal:"Top item",latest:"Latest",awaiting:"Awaiting processing",no_signals:"No items yet"},oF={title:"Intelligence Engine",subtitle:"Fine-tune the system's parameters and provider links.",configuration:"AI Configuration",test_connection:"Test Connection",save_config:"Save Configuration",llm_provider:"LLM Provider",embedding_provider:"Embedding Provider",sdk_connected:"SDK Connected",sdk_not_available:"SDK Not Available",provider:"Provider",intelligence_model:"Intelligence Model",embedding_model:"Embedding Model",loading_providers:"Loading providers...",sdk_info_success:"✓ Using RealTimeX configured provider",sdk_info_fail:"⚠️ RealTimeX SDK not detected. Configure in RealTimeX Desktop.",embedding_info_success:"✓ Embeddings are generated using your RealTimeX configured provider",embedding_info_fail:"⚠️ RealTimeX SDK not detected. Configure providers in RealTimeX Desktop.",persona_title:"User Profile",save_memory:"Save Memory",interests_title:"Active Interests",interests_priority:"High Priority",interests_desc:"The system prioritizes content matching these topics. Updated automatically based on Favorites & Boosts.",interests_placeholder:"e.g. User focuses on React performance, Rust backend systems, and AI Agent architecture...",antipatterns_title:"Dislikes",antipatterns_priority:"Avoid",antipatterns_desc:"The system filters out or scores down content matching these patterns. Updated via Dismissals.",antipatterns_placeholder:"e.g. Dislikes marketing fluff, generic listicles, and crypto hype...",browser_sources:"Browser History Sources",save_browser:"Save Browser Sources",blacklist_title:"Blacklist Domains",blacklist_desc:"URLs containing these patterns will be skipped during mining. Enter one pattern per line.",blacklist_label:"Domain Patterns (one per line)",blacklist_placeholder:`google.com/search
|
|
151
151
|
localhost:
|
|
152
152
|
127.0.0.1
|
|
153
153
|
facebook.com
|
package/dist/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
10
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
11
11
|
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Outfit:wght@300;400;600;800&display=swap" rel="stylesheet">
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-CVXKFUNb.js"></script>
|
|
13
13
|
<link rel="stylesheet" crossorigin href="/assets/index-C0pRp6-X.css">
|
|
14
14
|
</head>
|
|
15
15
|
<body>
|
package/package.json
CHANGED