@fudrouter/fsrouter 0.6.107 → 0.6.108
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/routes/db/info/route.js +22 -0
- package/package.json +1 -1
- package/public/.vite/manifest.json +85 -85
- package/public/assets/EndpointPageClient.BN-D__UM.js +6 -0
- package/public/assets/Loading.BoU3gy5K.js +1 -0
- package/public/assets/NoAuthProxyCard.CLW2-XwE.js +89 -0
- package/public/assets/index.BO_pNnMt.js +89 -0
- package/public/assets/page.-P08pALK.js +6 -0
- package/public/assets/page.-PU2bgJe.js +1 -0
- package/public/assets/page.2bfZgPuP.js +1 -0
- package/public/assets/page.Asf9tesx.js +1 -0
- package/public/assets/page.B11lN3QC.js +1 -0
- package/public/assets/page.B1ZhgC-Y.js +1 -0
- package/public/assets/page.B28QUiM4.js +1 -0
- package/public/assets/page.BBnpNaQh.js +6 -0
- package/public/assets/page.BOy_Vt2f.js +1 -0
- package/public/assets/page.BRDONwuI.js +1 -0
- package/public/assets/page.BWFxAlAj.js +1 -0
- package/public/assets/page.BebFlAF6.js +1 -0
- package/public/assets/page.BqxsFxH_.js +2 -0
- package/public/assets/page.C1Z5-h5h.js +1 -0
- package/public/assets/page.CIxYSsJm.js +1 -0
- package/public/assets/page.CQLGTJxs.js +1 -0
- package/public/assets/page.CTO5ojlP.js +1 -0
- package/public/assets/page.CTx0rdSY.js +1 -0
- package/public/assets/page.CXAgJ2hd.js +1 -0
- package/public/assets/page.CdVrDM5I.js +1 -0
- package/public/assets/page.CgidHjOu.js +1 -0
- package/public/assets/page.CqPzqV4I.js +7 -0
- package/public/assets/page.Cr-bxDIh.js +4 -0
- package/public/assets/page.CsL3JXbA.js +1 -0
- package/public/assets/page.D6eEvzRr.js +5 -0
- package/public/assets/page.DHyqPTHy.js +1 -0
- package/public/assets/page.DS5iFEwr.js +31 -0
- package/public/assets/page.Dre9jdlU.js +1 -0
- package/public/assets/page.IyBPROCc.js +1 -0
- package/public/assets/page.KoOCODPg.js +5 -0
- package/public/assets/page.MP_9jcAE.js +1 -0
- package/public/assets/page.WAG7HQOU.js +2 -0
- package/public/assets/page.XKedaymF.js +1 -0
- package/public/assets/page.ZZHz9al1.js +64 -0
- package/public/assets/page.alTMqTdj.js +1 -0
- package/public/assets/page.tpebkgG7.js +1 -0
- package/public/assets/page.xIh7b02j.js +23 -0
- package/public/index.html +4 -4
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import{j as e,B as m}from"./index.BO_pNnMt.js";import{b as r}from"./router.Cjj1--8t.js";import{C as Ye,T as Ge,B as qe}from"./NoAuthProxyCard.CLW2-XwE.js";import{L as Xe}from"./Loading.BoU3gy5K.js";import"./zustand.akaTi5uX.js";function it(){const[u,h]=r.useState("codebuddy"),X=(x,ee,f)=>e.jsxs("button",{onClick:()=>h(x),className:`flex items-center gap-2 pb-3 text-sm font-semibold transition-all border-b-2 cursor-pointer ${u===x?"border-primary text-primary":"border-transparent text-text-muted hover:text-text-main"}`,children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:ee}),f]});return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex border-b border-border-subtle pb-px gap-6 flex-wrap",children:[X("codebuddy","smart_toy","Automation"),X("fsmail","mail","FSMail Temp Mail")]}),u==="codebuddy"&&e.jsx(et,{}),u==="fsmail"&&e.jsx(st,{})]})}function et(){const u={codebuddy:"CodeBuddy",kiro:"Kiro AI",qoder:"Qoder",leonardo:"Leonardo AI",weavy:"Weavy AI","kimi-coding":"Kimi Coding",cloudflare:"Cloudflare Workers AI",openvecta:"OpenVecta",flashloop:"Flashloop"},[h,X]=r.useState([]),[x,ee]=r.useState(""),[f,te]=r.useState(null),[N,I]=r.useState([]);r.useRef(null);const $=r.useRef(new Set),[se,ue]=r.useState(1),ae=r.useRef(-1),pe=10,Se=r.useRef(!1),[g,Ue]=r.useState(!1),[K,Ce]=r.useState(3),[$e,re]=r.useState(!1),[ne,he]=r.useState(!1),[A,Re]=r.useState(""),[_e,j]=r.useState(""),[i,R]=r.useState("cloudflare"),[G,be]=r.useState(!0),[O,U]=r.useState(!1),[Te,We]=r.useState(!1),[oe,fe]=r.useState(!1),[k,V]=r.useState([]),[ze,W]=r.useState(!1),[ge,le]=r.useState(""),[Be,Ae]=r.useState(""),[Fe,S]=r.useState(""),[Le,Q]=r.useState(!1),[z,L]=r.useState({general:!0,proxy:!1}),C=t=>{L(a=>({...a,[t]:!a[t]}))},Pe=(t,a,n,l)=>e.jsxs("button",{onClick:l,type:"button",className:"flex items-center gap-1.5 hover:text-primary text-text-main font-semibold text-xs transition-all cursor-pointer select-none py-1",children:[e.jsx("span",{className:`material-symbols-outlined text-[16px] text-text-muted transition-transform duration-200 ${n?"":"-rotate-90"}`,children:"expand_more"}),e.jsx("span",{children:t})]}),[_,Z]=r.useState(!1),[D,B]=r.useState(0),[F,je]=r.useState({}),[d,ie]=r.useState(!1),[T,J]=r.useState(new Set),[M,Je]=r.useState(!1),[ye,Oe]=r.useState(5),[we,He]=r.useState([]),[ce,de]=r.useState("");r.useEffect(()=>{if(typeof window<"u"){const t=localStorage.getItem("automation_target_provider");R(t||"cloudflare");const a=localStorage.getItem("automation_concurrency");a&&Ce(parseInt(a)||3);const n=localStorage.getItem("automation_auto_email");n&&Je(n==="1");const l=localStorage.getItem("automation_generate_count");l&&Oe(parseInt(l)||5);const b=localStorage.getItem("automation_open_settings");if(b)try{L(c=>({...c,...JSON.parse(b)}))}catch(c){console.error("Failed to parse saved automation open settings",c)}Ue(!0)}},[]),r.useEffect(()=>{g&&localStorage.setItem("automation_target_provider",i)},[i,g]),r.useEffect(()=>{g&&localStorage.setItem("automation_concurrency",String(K))},[K,g]),r.useEffect(()=>{g&&localStorage.setItem("automation_auto_email",M?"1":"0")},[M,g]),r.useEffect(()=>{g&&localStorage.setItem("automation_generate_count",String(ye))},[ye,g]),r.useEffect(()=>{g&&localStorage.setItem("automation_open_settings",JSON.stringify(z))},[z,g]);const[y,Ve]=r.useState(""),[xe,De]=r.useState(1),Me=8;r.useEffect(()=>{fetch("/api/automation/fsmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"list-domains"})}).then(t=>t.json()).then(t=>{var a;(a=t.domains)!=null&&a.length&&(He(t.domains),de(n=>n||t.default_domain||t.domains[0]))}).catch(()=>{})},[]);const w=async(t=!1)=>{var a,n;try{const l=await fetch("/api/automation/codebuddy"),b=await l.json();if(l.ok){if(X(b.accounts||[]),ee(b.active_job_id||""),b.active_job_id&&Se.current&&(Se.current=!1,$.current.clear()),!Se.current)if(te(b.active_job||null),(n=(a=b.active_job)==null?void 0:a.results)!=null&&n.length){const c=b.active_job.results.filter(p=>p).map((p,ke)=>({idx:ke,email:p.email||`Account #${ke+1}`,status:p.status||"pending",step:p.status==="failed"?p.error||p.step||"-":p.step||"-",ok:p.ok})).filter(p=>!$.current.has(p.email.toLowerCase()));I(c)}else b.active_job_id;if(t){const c=b.settings||{};re(c.auto_fsrouter==="1"||c.auto_fsrouter===!0),be(!!c.browser_headless),U(!!c.debug_mode),We(c.leave_canva_team==="1"||c.leave_canva_team===!0),fe(!!c.proxy_enabled);try{const p=JSON.parse(c.proxy_pool||"[]");V(Array.isArray(p)?p:[])}catch{V([])}Ae(c.leonardo_invite_link||""),S(c.codebuddy_2captcha_api_key||"")}}}catch(l){console.error(l)}};r.useEffect(()=>{g&&w(!0)},[g]),r.useEffect(()=>{if(!g)return;const a=setInterval(()=>w(!1),x?3e3:15e3);return()=>clearInterval(a)},[g,x]),r.useEffect(()=>{if(N.length===0){ue(1),ae.current=-1;return}const t=N.findIndex(a=>a.status==="running");if(t!==-1&&t!==ae.current){ae.current=t;const a=Math.floor(t/pe)+1;ue(a)}},[N]),r.useEffect(()=>{if(O&&x){const t=setInterval(()=>{fetch("/api/automation/codebuddy/debug-vnc?action=status").then(a=>a.json()).then(a=>{a.available&&(Z(!0),B(Date.now()),clearInterval(t))}).catch(()=>{})},2e3);return()=>clearInterval(t)}else if(!x&&_){const t=setTimeout(()=>{Z(!1),B(0)},1e4);return()=>clearTimeout(t)}},[O,x]);const Qe=async()=>{Q(!0);try{(await fetch("/api/automation/codebuddy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"settings",auto_fsrouter:$e,browser_headless:G,debug_mode:O,leave_canva_team:Te,proxy_enabled:oe,proxy_pool:JSON.stringify(k),leonardo_invite_link:Be,codebuddy_2captcha_api_key:Fe})})).ok&&(j("Settings saved successfully."),setTimeout(()=>j(""),3e3),await w(!0))}catch(t){console.error(t)}finally{Q(!1)}},Ze=async()=>{var t,a;if(!A.trim()){j("Please enter at least one email:password line.");return}j("Adding accounts...");try{const n=await fetch("/api/automation/codebuddy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"add-google",accounts_text:A,run_now:ne,concurrency:K,provider:i})}),l=await n.json();n.ok?(Re(""),j(`Created: ${((t=l.created)==null?void 0:t.length)||0}, Skipped: ${((a=l.skipped)==null?void 0:a.length)||0}${l.job_id?" (Job started)":""}`),w()):j(`Error: ${l.error}`)}catch(n){j(`Failed: ${n.message}`)}},Ee=async()=>{var t;j("Generating emails...");try{const a=await fetch("/api/automation/codebuddy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"auto-generate-email",count:ye,provider:i,run_now:!0,concurrency:K,domain:ce||void 0})}),n=await a.json();a.ok?(j(`✓ Generated ${((t=n.created)==null?void 0:t.length)||0} temp mail accounts and started signup job.`),w()):j(`Error: ${n.error||"Failed to generate emails"}`)}catch(a){console.error(a),j("Failed to contact server.")}},Ie=async()=>{try{const t=await fetch("/api/automation/codebuddy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"run-all",concurrency:K,provider:i})}),a=await t.json();t.ok?($.current.clear(),ee(a.job_id),w()):j(`Failed: ${a.error}`)}catch(t){j(`Failed: ${t.message}`)}},E=async()=>{try{const t=await fetch("/api/automation/codebuddy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"stop"})}),a=await t.json();t.ok?w():alert(a.error)}catch(t){console.error(t)}},ve=async t=>{try{const a=await fetch(`/api/automation/codebuddy/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"run"})}),n=await a.json();a.ok?($.current.clear(),ee(n.job_id),w()):alert(n.error)}catch(a){console.error(a)}},Ne=async t=>{try{const a=await fetch(`/api/automation/codebuddy/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"add-to-fsrouter"})}),n=await a.json();a.ok?(alert(`✓ ${n.message||"Added successfully!"}`),w()):alert(`Failed: ${n.error}`)}catch(a){console.error(a)}},s=async()=>{const t=u[i]||"CodeBuddy";if(confirm(`Inject all Ready ${t} accounts into fsrouter?`))try{const a=await fetch("/api/automation/codebuddy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"bulk-add-to-fsrouter",provider:i})}),n=await a.json();a.ok?(alert(n.message),w()):alert(`Failed: ${n.error}`)}catch(a){console.error(a)}},o=async t=>{if(!confirm("Hapus akun ini?"))return;const a=confirm("Apakah ingin menghapus juga koneksi akun ini di fsrouter?"),n=h.find(l=>l.id===t);try{await fetch(`/api/automation/codebuddy/${t}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",deleteFromfsrouter:a})}),n&&($.current.add(n.email.toLowerCase()),I(l=>l.filter(b=>b.email.toLowerCase()!==n.email.toLowerCase()))),w()}catch(l){console.error(l)}},v=async(t,a=null)=>{const n=a?`${a.length} selected accounts`:`all accounts with status: ${t.join(", ")}`;if(!confirm(`Delete ${n}?`))return;const l=confirm("Apakah ingin menghapus juga koneksi akun-akun tersebut di fsrouter?"),b=h.filter(c=>a?a.includes(c.id):c.provider===i&&t.includes(c.api_key_status)).map(c=>c.email.toLowerCase());try{(await fetch("/api/automation/codebuddy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a?{action:"bulk-delete-ids",ids:a,provider:i,deleteFromfsrouter:l}:{action:"bulk-delete",statuses:t,provider:i,deleteFromfsrouter:l})})).ok&&(b.forEach(p=>$.current.add(p)),I(p=>p.filter(ke=>!b.includes(ke.email.toLowerCase()))),J(new Set),w())}catch(c){console.error(c)}},P=h.filter(t=>t.provider===i&&(t.email.toLowerCase().includes(y.toLowerCase())||t.api_key&&t.api_key.toLowerCase().includes(y.toLowerCase()))),me=Math.ceil(P.length/Me),H=P.slice((xe-1)*Me,xe*Me),Y=Math.ceil(N.length/pe)||1,q=Math.min(se,Y),Ke=N.slice((q-1)*pe,q*pe);return e.jsxs("div",{children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-1 space-y-6",children:[e.jsxs(Ye,{padding:"md",className:"space-y-4",children:[e.jsxs("h2",{className:"text-sm font-bold text-text-main flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"person_add"}),(i==="leonardo"||i==="weavy"||i==="cloudflare")&&M?"Generate Temp Accounts":"Add Accounts"]}),e.jsxs("div",{className:"flex flex-col gap-1.5 pb-1",children:[e.jsx("label",{className:"text-xs font-semibold text-text-main",children:"Target Provider Connection"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("img",{src:i==="weavy"?"/providers/weavy.jpeg":i==="kimi-coding"?"/providers/kimi.png":`/providers/${i}.png`,alt:i,className:"size-5 rounded object-contain",onError:t=>{t.target.style.display="none"}}),e.jsxs("select",{value:i,onChange:t=>{const a=t.target.value;R(a),De(1)},className:"flex-1 text-xs p-2 rounded-lg border border-border-subtle bg-surface text-text-main focus:outline-none focus:border-primary cursor-pointer",children:[e.jsx("option",{value:"cloudflare",children:"☁️ Cloudflare Workers AI"}),e.jsx("option",{value:"openvecta",children:"🟣 OpenVecta"}),e.jsx("option",{value:"flashloop",children:"⚡ Flashloop"})]})]})]}),(i==="leonardo"||i==="weavy"||i==="cloudflare"||i==="openvecta"||i==="flashloop")&&e.jsx("div",{className:"pt-1 border-t border-border-subtle",children:e.jsxs("label",{className:"flex items-center gap-2 text-xs text-text-main cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:M,onChange:t=>Je(t.target.checked),className:"rounded border-border-subtle accent-primary size-4"}),"Auto Generate Email (FSMail)"]})}),(i==="leonardo"||i==="weavy"||i==="cloudflare"||i==="openvecta"||i==="flashloop")&&M?e.jsxs("div",{className:"space-y-3 pt-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Count to generate:"}),e.jsx("input",{type:"number",min:1,max:50,value:ye,onChange:t=>Oe(parseInt(t.target.value)||1),className:"w-16 text-xs p-1.5 rounded-lg border border-border-subtle bg-surface text-center text-text-main"})]}),we.length>=1&&e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs text-text-muted",children:"Email domain:"}),e.jsx("select",{value:ce,onChange:t=>de(t.target.value),className:"flex-1 text-xs p-1.5 rounded-lg border border-border-subtle bg-surface text-text-main ml-2 max-w-[180px]",children:we.map(t=>e.jsxs("option",{value:t,children:["@",t]},t))})]}),e.jsx(m,{variant:"primary",size:"sm",fullWidth:!0,onClick:Ee,children:"Generate & Run"})]}):e.jsxs("div",{className:"space-y-4 pt-1",children:[e.jsxs("p",{className:"text-xs text-text-muted",children:["Format: ",e.jsx("code",{className:"bg-surface-2 px-1 rounded",children:"email:password"})," (one per line)."]}),e.jsx("textarea",{value:A,onChange:t=>Re(t.target.value),rows:4,placeholder:`user1@gmail.com:Passw0rd1
|
|
2
|
+
user2@gmail.com:Passw0rd2`,className:"w-full text-xs font-mono p-3 rounded-lg border border-border-subtle bg-surface focus:outline-none focus:border-primary resize-y text-text-main"}),e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("label",{className:"flex items-center gap-2 text-xs text-text-main cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:ne,onChange:t=>he(t.target.checked),className:"rounded border-border-subtle accent-primary size-4"}),"Run immediately"]}),e.jsx(m,{variant:"primary",size:"sm",onClick:Ze,children:"Add Accounts"})]})]}),_e&&e.jsx("p",{className:"text-[11px] text-primary italic",children:_e})]}),e.jsxs(Ye,{padding:"md",className:"space-y-4",children:[e.jsxs("h2",{className:"text-sm font-bold text-text-main flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"settings"}),"Automation Settings"]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[Pe("General Settings","dns",z.general,()=>C("general")),z.general&&e.jsxs("div",{className:"pl-6 pr-2 py-2 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-medium text-text-main",children:"Headless Browser"}),e.jsx("span",{className:"text-[10px] text-text-muted",children:"Jalankan di latar belakang tanpa membuka jendela baru"})]}),e.jsx(Ge,{checked:G,onChange:be})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-xs font-medium text-text-main",children:"Tampilkan Preview Panel"}),e.jsx("span",{className:"text-[10px] text-text-muted",children:"Aktifkan live stream visual di bawah"})]}),e.jsx(Ge,{checked:O,onChange:U})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-xs font-medium text-text-main",children:"Auto Inject to fsrouter"}),e.jsx(Ge,{checked:$e,onChange:re})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[Pe("Outbound Proxy Settings","vpn_lock",z.proxy,()=>C("proxy")),z.proxy&&e.jsxs("div",{className:"pl-6 pr-2 py-2 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-xs font-medium text-text-main",children:"Enable Outbound Proxy"}),e.jsx(Ge,{checked:oe,onChange:fe})]}),oe&&e.jsxs("div",{className:"space-y-2 pt-1 border-t border-border-subtle",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-text-muted",children:[k.length," ",k.length===1?"proxy":"proxies"," configured"]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[k.length>0&&e.jsx("button",{onClick:async()=>{if(d)return;ie(!0);const t={};for(const a of k){t[a]={testing:!0},je({...t});try{const l=await(await fetch("/api/automation/codebuddy/test-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxy:a})})).json();t[a]=l}catch{t[a]={ok:!1,error:"Request failed"}}je({...t})}ie(!1)},disabled:d,className:`text-[11px] px-3 py-1 rounded-lg border font-medium transition-colors ${d?"bg-surface-2 border-border-subtle text-text-muted cursor-wait":"bg-surface-2 border-border-subtle hover:border-green-500 text-green-400 hover:text-green-300"}`,children:d?"⏳ Testing...":"🧪 Test"}),e.jsx("button",{onClick:()=>{le(k.join(`
|
|
3
|
+
`)),W(!0)},className:"text-[11px] px-3 py-1 rounded-lg bg-surface-2 border border-border-subtle hover:border-primary text-primary font-medium transition-colors",children:"✏️ Edit"})]})]}),k.length>0&&e.jsx("div",{className:"text-[10px] bg-surface-2 rounded-lg p-2 max-h-[120px] overflow-y-auto font-mono space-y-1",children:k.map((t,a)=>{const n=F[t],l=t.replace(/:[^:@]*@/,":***@");return e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"truncate text-text-muted flex-1",title:l,children:l}),n&&e.jsx("span",{className:`shrink-0 whitespace-nowrap ${n.testing?"text-yellow-400":n.ok?"text-green-400":"text-red-400"}`,children:n.testing?"⏳":n.ok?`✅ ${n.ip} · ${n.latency}ms`:`❌ ${n.error}`})]},a)})})]})]})]}),e.jsx(m,{variant:"secondary",size:"sm",fullWidth:!0,onClick:Qe,disabled:Le,children:Le?"Saving...":"Save Settings"})]})]})]}),e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[(x||N.length>0)&&e.jsxs("div",{className:"border border-border-subtle bg-surface-2 rounded-xl p-4 space-y-3 relative overflow-hidden",children:[f&&e.jsx("div",{className:"absolute top-0 left-0 h-1 bg-gradient-to-r from-primary to-green-500 transition-all duration-500",style:{width:`${f.progress||0}%`}}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[x?e.jsx("span",{className:"material-symbols-outlined text-[18px] text-primary animate-spin",children:"autorenew"}):(f==null?void 0:f.status)==="stopped"?e.jsx("span",{className:"material-symbols-outlined text-[18px] text-red-400",children:"cancel"}):e.jsx("span",{className:"material-symbols-outlined text-[18px] text-green-400",children:"check_circle"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold text-text-main",children:x?"Job Running":(f==null?void 0:f.status)==="stopped"?"Job Stopped":"Job Completed"}),f&&e.jsxs("p",{className:"text-[11px] text-text-muted mt-0.5",children:["Progress: ",f.completed,"/",f.count," ·",e.jsxs("span",{className:"text-green-400 ml-1",children:["✓ ",f.success]}),e.jsxs("span",{className:"text-red-400 ml-1",children:["✗ ",f.failed]})]})]})]}),e.jsxs("div",{className:"flex gap-2",children:[!x&&N.length>0&&e.jsx(m,{variant:"ghost",size:"sm",onClick:async()=>{Se.current=!0,N.forEach(t=>$.current.add(t.email.toLowerCase())),I([]),te(null);try{await fetch("/api/automation/codebuddy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clear-logs"})})}catch{}},children:"Clear"}),x&&e.jsx(m,{variant:"danger",size:"sm",onClick:E,children:"■ Stop"})]})]}),e.jsx("div",{className:"max-h-96 overflow-y-auto overflow-x-auto rounded-lg bg-black/40 border border-border/40 text-[11px] font-mono",children:e.jsxs("table",{className:"w-full min-w-[540px]",children:[e.jsx("thead",{className:"sticky top-0 bg-black/80 backdrop-blur-sm",children:e.jsxs("tr",{className:"text-text-muted text-left",children:[e.jsx("th",{className:"px-2 py-1 w-6",children:"#"}),e.jsx("th",{className:"px-2 py-1",children:"Email"}),e.jsx("th",{className:"px-2 py-1 w-16",children:"Status"}),e.jsx("th",{className:"px-2 py-1",children:"Step"}),e.jsx("th",{className:"px-2 py-1 w-14 text-right",children:"Time"}),e.jsx("th",{className:"px-2 py-1 w-12 text-right",children:"Actions"})]})}),e.jsx("tbody",{children:N.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"px-2 py-2 text-center text-text-muted",children:"Waiting for log entries..."})}):Ke.map((t,a)=>{var c;const n=(c=t.step)==null?void 0:c.match(/\[([^\]]+s)\]$/),l=n?t.step.replace(n[0],"").trim():t.step,b=n?n[1]:"--";return e.jsxs("tr",{className:`border-t border-border/20 ${t.status==="failed"?"bg-red-500/5":t.status==="done"?"bg-green-500/5":""}`,children:[e.jsx("td",{className:"px-2 py-1 text-text-muted",children:t.idx+1}),e.jsx("td",{className:"px-2 py-1 text-text-main truncate max-w-[160px]",title:t.email,children:t.email}),e.jsxs("td",{className:"px-2 py-1 whitespace-nowrap",children:[t.status==="running"&&e.jsx("span",{className:"text-blue-400",children:"● run"}),t.status==="done"&&e.jsx("span",{className:"text-green-400",children:"✓ ok"}),t.status==="failed"&&e.jsx("span",{className:"text-red-400",children:"✗ fail"}),t.status==="pending"&&e.jsx("span",{className:"text-text-muted",children:"◌"})]}),e.jsx("td",{className:"px-2 py-1 text-text-muted truncate max-w-[280px]",title:t.status==="done"?t.balance!==void 0?`Success · ${t.balance} tokens${t.left_team===!0?" · Left team ✓":t.left_team===!1?" · Left team ✗":""}`:"Success":l,children:t.status==="done"?e.jsxs("span",{className:"text-green-400 font-medium",children:[t.balance!==void 0?`Success · ${t.balance} tokens`:"Success",t.left_team===!0&&e.jsx("span",{className:"text-purple-400 ml-1",children:"· Left team ✓"}),t.left_team===!1&&e.jsx("span",{className:"text-yellow-400 ml-1",children:"· Left team ✗"})]}):l}),e.jsx("td",{className:"px-2 py-1 text-right text-[10px] text-text-muted font-mono",children:b}),e.jsx("td",{className:"px-2 py-1 text-right whitespace-nowrap",children:t.status==="failed"&&e.jsx("button",{onClick:()=>{const p=h.find(ke=>ke.email.toLowerCase()===t.email.toLowerCase());p?ve(p.id):alert("Account tidak ditemukan.")},disabled:!!x,className:`text-[9px] font-bold px-1.5 py-0.5 rounded cursor-pointer transition-colors ${x?"text-text-muted bg-surface-3 cursor-not-allowed opacity-50":"text-brand-400 hover:text-brand-300 hover:bg-brand-500/15 bg-brand-500/5"}`,children:"Retry"})})]},a)})})]})}),Y>1&&e.jsxs("div",{className:"flex items-center justify-between gap-4 pt-2",children:[e.jsx(m,{variant:"secondary",size:"sm",onClick:()=>ue(t=>Math.max(1,t-1)),disabled:q===1,children:"Previous"}),e.jsxs("span",{className:"text-xs text-text-muted",children:["Page ",q," of ",Y," · (",N.length," items)"]}),e.jsx(m,{variant:"secondary",size:"sm",onClick:()=>ue(t=>Math.min(Y,t+1)),disabled:q===Y,children:"Next"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("h2",{className:"text-sm font-bold text-text-main flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"group"}),"Accounts"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs text-text-muted",children:[h.filter(t=>t.provider===i).length," total"]}),e.jsxs(qe,{variant:"success",size:"sm",children:[h.filter(t=>t.provider===i&&t.api_key_status==="ready").length," ready"]})]})]}),e.jsxs("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[e.jsx("input",{type:"text",placeholder:"Search email...",value:y,onChange:t=>Ve(t.target.value),className:"text-xs p-2 rounded-lg border border-border-subtle bg-surface focus:outline-none focus:border-primary w-48"}),e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs("label",{className:"text-xs text-text-main flex items-center gap-1",children:["Limit:",e.jsx("input",{type:"number",min:1,max:20,value:K,onChange:t=>Ce(parseInt(t.target.value)||3),className:"w-12 text-center p-1 rounded border border-border-subtle bg-surface"})]}),e.jsx(m,{variant:"primary",size:"sm",onClick:Ie,disabled:!!x,children:"Run All Pending"}),e.jsx(m,{variant:"secondary",size:"sm",onClick:s,children:"⚡ Add All Ready → fsrouter"}),e.jsx(m,{variant:"danger",size:"sm",onClick:()=>v(["pending","failed"]),children:"🗑 Delete Pending/Failed"})]})]}),T.size>0&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-primary/10 border border-primary/30 text-xs",children:[e.jsxs("span",{className:"text-primary font-semibold",children:[T.size," selected"]}),e.jsx("span",{className:"text-text-muted",children:"·"}),e.jsx("button",{onClick:async()=>{const t=[...T];J(new Set),await Promise.all(t.map(a=>ve(a)))},disabled:!!x,className:"text-brand-400 hover:text-brand-300 font-semibold disabled:opacity-40 disabled:cursor-not-allowed",children:"▶ Run Selected"}),e.jsx("span",{className:"text-text-muted",children:"·"}),e.jsx("button",{onClick:()=>v(null,[...T]),className:"text-red-400 hover:text-red-300 font-semibold",children:"🗑 Delete Selected"}),e.jsx("button",{onClick:()=>J(new Set),className:"ml-auto text-text-muted hover:text-text-main",children:"✕ Clear"})]}),e.jsx("div",{className:"rounded-xl border border-border-subtle bg-surface-2 overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs text-left border-collapse min-w-[640px]",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-surface text-text-muted border-b border-border-subtle font-semibold",children:[e.jsx("th",{className:"p-2.5 w-8",children:e.jsx("input",{type:"checkbox",className:"rounded cursor-pointer accent-primary",checked:H.length>0&&H.every(t=>T.has(t.id)),onChange:t=>{t.target.checked?J(a=>new Set([...a,...H.map(n=>n.id)])):J(a=>{const n=new Set(a);return H.forEach(l=>n.delete(l.id)),n})}})}),e.jsx("th",{className:"p-2.5 w-10",children:"#"}),e.jsx("th",{className:"p-2.5",children:"Email"}),e.jsx("th",{className:"p-2.5 w-24",children:"Status"}),e.jsx("th",{className:"p-2.5",children:"API Key"}),e.jsx("th",{className:"p-2.5 text-right",children:"Actions"})]})}),e.jsxs("tbody",{children:[H.map(t=>e.jsxs("tr",{className:`border-b border-border-subtle transition-colors ${T.has(t.id)?"bg-primary/5":"hover:bg-surface/50"}`,children:[e.jsx("td",{className:"p-2.5",children:e.jsx("input",{type:"checkbox",className:"rounded cursor-pointer accent-primary",checked:T.has(t.id),onChange:a=>{J(n=>{const l=new Set(n);return a.target.checked?l.add(t.id):l.delete(t.id),l})}})}),e.jsxs("td",{className:"p-2.5 font-mono text-text-muted",children:["#",t.id]}),e.jsx("td",{className:"p-2.5 font-semibold text-text-main truncate max-w-[100px] sm:max-w-[140px] sm:max-w-[200px]",title:t.email,children:t.email}),e.jsxs("td",{className:"p-2.5",children:[e.jsx(qe,{variant:t.api_key_status==="ready"?"success":t.api_key_status==="failed"?"danger":t.api_key_status==="running"?"primary":"default",size:"sm",children:t.api_key_status}),t.last_error&&e.jsxs("p",{className:"text-[10px] text-red-500 mt-0.5 truncate max-w-[150px]",title:t.last_error,children:["⚠ ",t.last_error]})]}),e.jsx("td",{className:"p-2.5",children:t.api_key?e.jsx("code",{className:"bg-surface px-1.5 py-0.5 rounded font-mono text-[10px] text-text-main max-w-[100px] sm:max-w-[140px] block truncate",title:t.api_key,children:t.api_key}):e.jsx("span",{className:"text-text-muted",children:"—"})}),e.jsx("td",{className:"p-2.5 text-right whitespace-nowrap",children:e.jsxs("div",{className:"inline-flex items-center gap-3",children:[e.jsxs("button",{onClick:()=>ve(t.id),disabled:!!x||t.api_key_status==="running",className:`inline-flex items-center gap-0.5 text-[11px] font-bold transition-all cursor-pointer ${x||t.api_key_status==="running"?"text-text-muted cursor-not-allowed opacity-40":"text-brand-400 hover:text-brand-300 hover:underline"}`,children:[e.jsx("span",{className:"material-symbols-outlined text-[13px]",children:"play_arrow"}),"Process"]}),t.api_key_status==="ready"&&t.api_key&&e.jsxs("button",{onClick:()=>Ne(t.id),className:"inline-flex items-center gap-0.5 text-[11px] font-bold text-green-400 hover:text-green-300 hover:underline transition-all cursor-pointer",children:[e.jsx("span",{className:"material-symbols-outlined text-[13px]",children:"add_link"}),"+fsrouter"]}),e.jsxs("button",{onClick:()=>o(t.id),className:"inline-flex items-center gap-0.5 text-[11px] font-bold text-red-400 hover:text-red-300 hover:underline transition-all cursor-pointer",children:[e.jsx("span",{className:"material-symbols-outlined text-[13px]",children:"delete"}),"Delete"]})]})})]},t.id)),H.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"p-6 text-center text-text-muted",children:"No accounts found. Add manual accounts to get started."})})]})]})}),me>1&&e.jsxs("div",{className:"flex items-center justify-between gap-4 pt-2",children:[e.jsx(m,{variant:"secondary",size:"sm",onClick:()=>De(t=>Math.max(1,t-1)),disabled:xe===1,children:"Previous"}),e.jsxs("span",{className:"text-xs text-text-muted",children:["Page ",xe," of ",me]}),e.jsx(m,{variant:"secondary",size:"sm",onClick:()=>De(t=>Math.min(me,t+1)),disabled:xe===me,children:"Next"})]})]})]})]}),O&&e.jsxs(Ye,{padding:"md",className:"space-y-3 border border-brand-500/20 bg-brand-500/5 mt-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h2",{className:"text-xs font-bold text-brand-400 flex items-center gap-1.5",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px]",children:"bug_report"}),"🖥️ Live Browser Preview"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[!_&&e.jsx("span",{className:"text-[10px] text-text-muted",children:x?"Starting...":"Run a job to see the browser"}),_&&e.jsxs("span",{className:"text-[10px] text-green-400 flex items-center gap-1",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-green-400 animate-pulse"}),"Live · ~2fps"]})]})]}),e.jsx("div",{className:"relative rounded-lg overflow-hidden border border-border-subtle bg-black",style:{aspectRatio:"16/10"},children:_?e.jsx("img",{src:`/api/automation/codebuddy/debug-vnc?action=screenshot&t=${D}`,alt:"Browser preview",className:"w-full h-full object-contain",style:{minHeight:"400px",imageRendering:"auto"},onLoad:()=>{O&&x&&setTimeout(()=>B(Date.now()),400)},onError:()=>{setTimeout(()=>B(Date.now()),2e3)}},"debug-screenshot"):e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx("span",{className:"material-symbols-outlined text-[32px] text-text-muted",children:"desktop_windows"}),e.jsx("p",{className:"text-xs text-text-muted",children:x?"Starting browser preview...":"Run a job with Debug Mode to see live browser"})]})})})]}),ze&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>W(!1),children:e.jsxs("div",{className:"bg-surface border border-border-subtle rounded-2xl shadow-2xl w-full max-w-lg mx-4 max-h-[90vh] overflow-hidden",onClick:t=>t.stopPropagation(),children:[e.jsxs("div",{className:"p-5 border-b border-border-subtle",children:[e.jsxs("h3",{className:"text-base font-bold text-text-main flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-primary",children:"dns"}),"Edit Proxy Pool"]}),e.jsx("p",{className:"text-xs text-text-muted mt-1",children:"Enter one proxy per line. A random proxy will be selected for each automation run."})]}),e.jsxs("div",{className:"p-5 space-y-3",children:[e.jsx("textarea",{value:ge,onChange:t=>le(t.target.value),placeholder:`socks5://user:pass@host:port
|
|
4
|
+
http://host:port
|
|
5
|
+
host:port:user:pass
|
|
6
|
+
host:port`,rows:10,className:"w-full text-xs p-3 rounded-xl border border-border-subtle bg-surface-2 focus:outline-none focus:border-primary text-text-main font-mono resize-none",spellCheck:!1}),e.jsxs("div",{className:"text-[10px] text-text-muted bg-surface-2 rounded-lg p-3 space-y-1",children:[e.jsx("div",{className:"font-semibold text-text-main mb-1",children:"Supported formats:"}),e.jsx("div",{children:e.jsx("code",{className:"text-primary",children:"socks5://user:pass@host:port"})}),e.jsx("div",{children:e.jsx("code",{className:"text-primary",children:"http://user:pass@host:port"})}),e.jsx("div",{children:e.jsx("code",{className:"text-primary",children:"socks5://host:port"})}),e.jsx("div",{children:e.jsx("code",{className:"text-primary",children:"http://host:port"})}),e.jsx("div",{children:e.jsx("code",{className:"text-primary",children:"host:port:user:pass"})}),e.jsx("div",{children:e.jsx("code",{className:"text-primary",children:"host:port"})})]})]}),e.jsxs("div",{className:"p-5 border-t border-border-subtle flex items-center justify-between gap-3",children:[e.jsxs("span",{className:"text-xs text-text-muted",children:[ge.split(`
|
|
7
|
+
`).filter(t=>t.trim()).length," proxies"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>W(!1),className:"px-4 py-2 text-xs rounded-lg border border-border-subtle text-text-muted hover:text-text-main transition-colors",children:"Cancel"}),e.jsx("button",{onClick:async()=>{const t=ge.split(`
|
|
8
|
+
`).map(a=>a.trim()).filter(Boolean);V(t),W(!1);try{await fetch("/api/automation/codebuddy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"settings",proxy_enabled:!0,proxy_pool:JSON.stringify(t)})})}catch{}},className:"px-4 py-2 text-xs rounded-lg bg-primary text-white font-medium hover:opacity-90 transition-opacity",children:"Save Proxies"})]})]})]})})]})}function tt(u){if(!u)return"";const h=`
|
|
9
|
+
<style id="router-injected-styles">
|
|
10
|
+
html, body {
|
|
11
|
+
overflow-x: auto !important;
|
|
12
|
+
overflow-y: auto !important;
|
|
13
|
+
margin: 0 !important;
|
|
14
|
+
padding: 12px !important;
|
|
15
|
+
background-color: #ffffff !important;
|
|
16
|
+
color: #000000 !important;
|
|
17
|
+
}
|
|
18
|
+
img {
|
|
19
|
+
max-width: 100% !important;
|
|
20
|
+
height: auto !important;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
`;return u.includes("<head>")?u.replace("<head>",`<head>${h}`):u.includes("<HEAD>")?u.replace("<HEAD>",`<HEAD>${h}`):u.includes("<body>")?u.replace("<body>",`<body>${h}`):u.includes("<BODY>")?u.replace("<BODY>",`<BODY>${h}`):h+u}function st(){const[u,h]=r.useState(!1),[X,x]=r.useState(!1),[ee,f]=r.useState(!0),[te,N]=r.useState(!1),[I,$]=r.useState(""),[se,ue]=r.useState([]),[ae,pe]=r.useState([]),[Se,g]=r.useState(null),[Ue,K]=r.useState(""),[Ce,$e]=r.useState([]),[re,ne]=r.useState(1),[he,A]=r.useState(!1),[Re,_e]=r.useState(!1),[j,i]=r.useState(!1),[R,G]=r.useState(""),[be,O]=r.useState(""),[U,Te]=r.useState(""),[We,oe]=r.useState(""),[fe,k]=r.useState("manual"),[V,ze]=r.useState(""),[W,ge]=r.useState(""),[le,Be]=r.useState(""),[Ae,Fe]=r.useState(""),[S,Le]=r.useState(""),[Q,z]=r.useState({}),[L,C]=r.useState(null),Pe=r.useRef(!1);r.useEffect(()=>{Pe.current=he,he||C(null)},[he]);const[_,Z]=r.useState("all"),[D,B]=r.useState(""),[F,je]=r.useState(null),[d,ie]=r.useState(null),[T,J]=r.useState("html"),[M,Je]=r.useState(""),[ye,Oe]=r.useState(!1),[we,He]=r.useState(""),[ce,de]=r.useState(""),y=async()=>{var s,o,v,P,me,H,Y,q,Ke;try{const t=await fetch("/api/automation/fsmail"),a=await t.json();if(t.ok){x(a.configured),N(a.connection_ok),$(a.connection_error),ue(a.domains||[]);const n=a.inboxes||[];pe(n),B(l=>l&&n.some(c=>c.address.toLowerCase()===l.toLowerCase())?l:n.length>0?n[0].address:""),g(a.webhook),K(a.webhook_url),$e(a.otps||[]),Pe.current||(G(((s=a.settings)==null?void 0:s.base_url)||""),O(((o=a.settings)==null?void 0:o.api_key)||""),Te(((v=a.settings)==null?void 0:v.default_domain)||""),oe(((P=a.settings)==null?void 0:P.webhook_secret)||""),ze(((me=a.settings)==null?void 0:me.cf_account_id)||""),ge(((H=a.settings)==null?void 0:H.cf_api_token)||""),Be(((Y=a.settings)==null?void 0:Y.cf_domain)||""),Fe(((q=a.settings)==null?void 0:q.cf_telegram_bot_token)||""),Le(((Ke=a.settings)==null?void 0:Ke.cf_workers_dev_url)||""))}}catch(t){console.error(t)}finally{f(!1)}};r.useEffect(()=>{y();const s=setInterval(y,5e3);return()=>clearInterval(s)},[]);const Ve=async()=>{try{(await fetch("/api/automation/fsmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"settings",base_url:R,api_key:be,default_domain:U,webhook_secret:We,cf_account_id:V,cf_api_token:W,cf_domain:le,cf_telegram_bot_token:Ae,cf_workers_dev_url:S})})).ok&&(A(!1),y())}catch(s){alert(`Save failed: ${s.message}`)}},xe=async()=>{h(!0),C(null);try{const s=await fetch("/api/automation/fsmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"test-connection",base_url:R,api_key:be})}),o=await s.json();s.ok?(C({ok:!0,message:"Koneksi ke worker berhasil!"}),y()):C({ok:!1,message:`Koneksi gagal: ${o.error}`})}catch(s){C({ok:!1,message:`Error: ${s.message}`})}finally{h(!1)}},De=async()=>{if(!V||!W||!le){alert("Account ID, API Token, dan Domain wajib diisi!");return}h(!0),C(null);try{const s=await fetch("/api/automation/fsmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"auto-deploy",cf_account_id:V,cf_api_token:W,cf_domain:le,telegram_bot_token:Ae})}),o=await s.json();s.ok?(C({ok:!0,message:"Sukses! Worker telah di-deploy ke Cloudflare dan siap digunakan."}),G(o.base_url||""),O(o.api_key||""),Te(o.default_domain||""),oe(o.webhook_secret||""),Le(o.cf_workers_dev_url||""),y()):C({ok:!1,message:`Deploy gagal: ${o.error}`})}catch(s){C({ok:!1,message:`Error: ${s.message}`})}finally{h(!1)}},Me=async()=>{try{const s=await fetch("/api/automation/fsmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"webhook-register"})}),o=await s.json();s.ok?(alert("Webhook registered successfully!"),y()):alert(`Failed: ${o.error}`)}catch(s){alert(`Error: ${s.message}`)}},w=async s=>{s.preventDefault();try{const o=await fetch("/api/automation/fsmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"inbox-create",alias:we,domain:ce})}),v=await o.json();if(o.ok){i(!1);const P=`${we}@${ce}`.toLowerCase();B(P),He(""),de(""),y()}else alert(v.error)}catch(o){alert(o.message)}},Qe=async s=>{if(confirm(`Hapus inbox ${s}?`))try{(await fetch("/api/automation/fsmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"inbox-delete",alias:s})})).ok&&(D&&D.split("@")[0]===s&&B(""),d&&d.alias===s&&(je(null),ie(null)),y())}catch(o){console.error(o)}},Ze=async s=>{je(s),ie(null),ne(1);try{const o=await fetch(`/api/automation/fsmail/otps/${s}`),v=await o.json();o.ok&&(ie(v.otp),y())}catch(o){console.error(o)}},Ee=async(s,o)=>{if(s.stopPropagation(),!!confirm("Delete this email?"))try{await fetch(`/api/automation/fsmail/otps/${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete"})}),F===o&&(je(null),ie(null)),y()}catch(v){console.error(v)}},Ie=s=>{navigator.clipboard.writeText(s),z(o=>({...o,[s]:!0})),setTimeout(()=>{z(o=>({...o,[s]:!1}))},1500)},E=({value:s,text:o="Copy",className:v=""})=>{const P=Q[s];return e.jsxs("button",{type:"button",onClick:()=>Ie(s),className:`text-[10px] px-2 py-1 rounded cursor-pointer transition-all duration-150 flex items-center gap-1 border font-semibold ${P?"text-green-400 bg-green-500/10 border-green-500/20":"text-white/50 hover:text-white bg-white/5 hover:bg-white/10 border-transparent"} ${v}`,children:[e.jsx("span",{className:"material-symbols-outlined text-[12px]",children:P?"check":"content_copy"}),P?"Copied":o]})},ve=Ce.filter(s=>{if(!D||s.address.toLowerCase()!==D.toLowerCase()||_==="unread"&&s.used_at||_==="read"&&!s.used_at||_==="otp"&&!s.otp_code)return!1;if(M){const o=M.toLowerCase();return s.sender.toLowerCase().includes(o)||s.subject.toLowerCase().includes(o)||s.otp_code&&s.otp_code.includes(o)}return!0}),Ne=s=>Ce.filter(o=>!(!D||o.address.toLowerCase()!==D.toLowerCase()||s==="unread"&&o.used_at||s==="read"&&!o.used_at||s==="otp"&&!o.otp_code)).length;return e.jsxs("div",{className:"border border-border-subtle rounded-2xl overflow-hidden bg-vibrancy backdrop-blur-xl flex flex-col h-[calc(100vh-210px)] min-h-[500px] shadow-[var(--shadow-warm)]",children:[ee?e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-8 text-center space-y-3",children:e.jsx(Xe,{size:"lg",label:"Memuat setelan Temp Mail..."})}):X?e.jsxs("div",{className:"flex-1 flex divide-x divide-border-subtle min-h-0",children:[e.jsxs("aside",{className:"w-60 shrink-0 bg-surface/40 flex flex-col min-h-0",children:[e.jsxs("div",{className:"p-4 border-b border-border-subtle flex items-center justify-between gap-3",children:[e.jsxs("span",{className:"text-xs font-bold text-text-main flex items-center gap-1.5",title:!te&&I?I:void 0,children:[e.jsx("span",{className:`inline-block size-2 rounded-full ${te?"bg-green-500":"bg-red-500 animate-ping"}`}),te?"Connected":"Disconnected"]}),e.jsx("button",{onClick:()=>A(!0),className:"text-text-muted hover:text-text-main cursor-pointer",title:"Settings",children:e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"settings"})})]}),!te&&I&&e.jsxs("div",{className:"px-4 py-2.5 bg-red-500/10 border-b border-red-500/20 text-[10px] text-red-400 break-all space-y-1",children:[e.jsxs("div",{className:"font-semibold flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[12px]",children:"error"}),"Koneksi Gagal:"]}),e.jsx("div",{className:"opacity-80",children:I}),S&&R!==S&&e.jsx("button",{onClick:()=>{G(S),A(!0),k("manual")},className:"text-primary hover:underline text-[9px] font-semibold block mt-1 text-left",children:"💡 Gunakan domain workers.dev fallback"})]}),e.jsx("div",{className:"p-4",children:e.jsx(m,{variant:"primary",size:"sm",fullWidth:!0,onClick:()=>{de(U||(se.length>0?se[0]:"")),i(!0)},children:"+ New Inbox"})}),e.jsxs("nav",{className:"flex flex-col px-2 space-y-0.5",children:[e.jsxs("button",{onClick:()=>{Z("all")},className:`flex items-center justify-between px-3 py-1.5 rounded-lg text-xs font-semibold cursor-pointer ${_==="all"?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-4 opacity-80",children:[e.jsx("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),e.jsx("path",{d:"M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"})]}),"Inbox"]}),e.jsx("span",{className:"bg-surface-3 px-1.5 py-0.5 rounded-full text-[10px] text-text-muted",children:Ne("all")})]}),e.jsxs("button",{onClick:()=>Z("unread"),className:`flex items-center justify-between px-3 py-1.5 rounded-lg text-xs font-semibold cursor-pointer ${_==="unread"?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-4 opacity-80",children:[e.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),e.jsx("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]}),"Unread"]}),e.jsx("span",{className:"bg-surface-3 px-1.5 py-0.5 rounded-full text-[10px] text-text-muted",children:Ne("unread")})]}),e.jsxs("button",{onClick:()=>Z("read"),className:`flex items-center justify-between px-3 py-1.5 rounded-lg text-xs font-semibold cursor-pointer ${_==="read"?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-4 opacity-80",children:[e.jsx("path",{d:"M2 17V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2Z"}),e.jsx("path",{d:"M2 7l10 7 10-7"})]}),"Read"]}),e.jsx("span",{className:"bg-surface-3 px-1.5 py-0.5 rounded-full text-[10px] text-text-muted",children:Ne("read")})]}),e.jsxs("button",{onClick:()=>Z("otp"),className:`flex items-center justify-between px-3 py-1.5 rounded-lg text-xs font-semibold cursor-pointer ${_==="otp"?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-4 opacity-80",children:e.jsx("path",{d:"M21 2l-2 2m-7.61 7.61a5.5 5.5 0 1 1-7.778 7.778 5.5 5.5 0 0 1 7.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"})}),"With OTP"]}),e.jsx("span",{className:"bg-surface-3 px-1.5 py-0.5 rounded-full text-[10px] text-text-muted",children:Ne("otp")})]})]}),e.jsx("div",{className:"px-4 py-3 border-t border-b border-border-subtle/45 mt-4 bg-surface/10",children:e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",placeholder:"Search inboxes...",value:M,onChange:s=>Je(s.target.value),className:"w-full text-xs pl-8 pr-3 py-1.5 rounded-lg border border-border-subtle bg-surface focus:outline-none focus:border-primary text-text-main"}),e.jsx("span",{className:"absolute left-2.5 top-2.5 text-text-muted/60",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar px-2 pt-4",children:e.jsxs("div",{children:[e.jsxs("p",{className:"px-3 text-[10px] font-semibold text-text-muted uppercase tracking-wider mb-2",children:["Active Inboxes (",ae.length,")"]}),e.jsxs("div",{className:"space-y-0.5",children:[ae.filter(s=>s.address.toLowerCase().includes(M.toLowerCase())).map(s=>e.jsxs("div",{onClick:()=>{B(s.address),Z("all")},className:`group/inbox flex items-center justify-between px-3 py-2 rounded-lg text-xs font-medium cursor-pointer transition-colors ${D.toLowerCase()===s.address.toLowerCase()?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface"}`,children:[e.jsx("span",{className:"truncate w-32",title:s.address,children:s.address}),e.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-1",children:[e.jsx("button",{onClick:o=>{o.stopPropagation(),Ie(s.address)},className:`size-6 flex items-center justify-center rounded-md transition-all duration-150 ${Q[s.address]?"text-green-400 bg-green-500/15":"text-text-muted hover:text-primary hover:bg-primary/15"}`,title:"Copy address",children:Q[s.address]?e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:[e.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),e.jsx("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}),e.jsx("button",{onClick:o=>{o.stopPropagation(),Qe(s.alias)},className:"size-6 flex items-center justify-center rounded-md text-text-muted hover:text-red-400 hover:bg-red-500/15 transition-all duration-150",title:"Delete inbox",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})]},s.address)),ae.length===0&&e.jsx("p",{className:"px-3 text-[11px] text-text-muted italic",children:"No inboxes. Click New Inbox above."})]})]})})]}),e.jsxs("section",{className:"w-80 shrink-0 flex flex-col min-h-0 bg-surface/10",children:[e.jsxs("div",{className:"p-3 border-b border-border-subtle flex items-center justify-between gap-2 bg-surface/10",children:[e.jsx("span",{className:"text-xs font-bold text-text-muted uppercase tracking-wider pl-1",children:"Messages"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{onClick:()=>{Oe(!0),y().finally(()=>Oe(!1))},className:`p-1.5 hover:bg-surface rounded-lg cursor-pointer text-text-muted transition-colors duration-150 ${ye?"animate-spin":""}`,title:"Refresh",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:[e.jsx("path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),e.jsx("path",{d:"M3 3v5h5"}),e.jsx("path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"}),e.jsx("path",{d:"M16 16h5v5"})]})}),e.jsx("button",{onClick:s=>{F&&Ee(s,F)},disabled:!F,className:`p-1.5 rounded-lg cursor-pointer transition-colors duration-150 ${F?"text-red-500 hover:bg-red-500/10":"text-text-muted/30 cursor-not-allowed"}`,title:"Delete selected email",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-4",children:[e.jsx("path",{d:"M3 6h18"}),e.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),e.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}),e.jsx("line",{x1:"10",y1:"11",x2:"10",y2:"17"}),e.jsx("line",{x1:"14",y1:"11",x2:"14",y2:"17"})]})})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto custom-scrollbar p-2 space-y-1.5",children:D?ve.length===0?e.jsx("div",{className:"text-center p-8 text-text-muted text-xs italic",children:"No messages found."}):ve.map(s=>e.jsxs("div",{onClick:()=>Ze(s.id),className:`group p-3 rounded-xl border border-border-subtle cursor-pointer transition-colors relative flex flex-col gap-1 ${F===s.id?"bg-primary/10 border-primary":s.used_at?"bg-surface/40 hover:bg-surface":"bg-surface font-semibold shadow-[var(--shadow-soft)] hover:bg-surface/80"}`,children:[e.jsxs("div",{className:"flex justify-between items-baseline gap-2",children:[e.jsx("span",{className:"text-xs text-text-main truncate w-36",children:s.sender}),e.jsx("span",{className:"text-[9px] text-text-muted shrink-0",children:new Date(s.received_at*1e3).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),e.jsx("h4",{className:"text-xs text-text-main truncate",children:s.subject}),s.otp_code&&e.jsx("div",{className:"mt-1",children:e.jsxs("span",{className:"bg-amber-500/10 text-amber-500 border border-amber-500/20 px-1.5 py-0.5 rounded font-mono text-[10px] font-bold tracking-wider",children:["🔑 ",s.otp_code]})}),e.jsx("button",{onClick:o=>Ee(o,s.id),className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 text-text-muted hover:text-red-500 transition-all p-1 hover:bg-red-500/10 rounded cursor-pointer",title:"Delete email",children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3.5",children:[e.jsx("path",{d:"M3 6h18"}),e.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),e.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})})]},s.id)):e.jsx("div",{className:"text-center p-8 text-text-muted text-xs italic",children:"Select an inbox to view messages."})})]}),e.jsx("article",{className:"flex-1 flex flex-col min-h-0 bg-surface/5",children:F===null?e.jsx("div",{className:"flex-1 flex items-center justify-center text-text-muted text-xs italic",children:"Select an email to read its contents."}):d===null?e.jsxs("div",{className:"flex-1 flex items-center justify-center text-text-muted text-xs",children:[e.jsx("span",{className:"animate-spin mr-2",children:"⏳"})," Loading email details..."]}):e.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[e.jsxs("div",{className:"p-6 border-b border-border-subtle space-y-4",children:[e.jsxs("div",{className:"flex justify-between items-start gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-bold text-text-main",children:d.subject}),e.jsxs("p",{className:"text-xs text-text-muted mt-1",children:["From: ",e.jsx("span",{className:"font-semibold text-text-main",children:d.sender})]}),e.jsxs("p",{className:"text-xs text-text-muted",children:["To: ",e.jsx("span",{className:"font-semibold text-text-main",children:d.address})]})]}),e.jsxs("div",{className:"text-right flex flex-col items-end gap-2 shrink-0",children:[e.jsx("span",{className:"text-[11px] text-text-muted",children:new Date(d.received_at*1e3).toLocaleString()}),e.jsxs("button",{onClick:s=>Ee(s,d.id),className:"inline-flex items-center gap-1.5 px-2.5 py-1 text-[11px] font-bold rounded-lg border bg-red-500/10 text-red-400 hover:bg-red-500/20 border-red-500/20 transition-all active:scale-95 cursor-pointer mt-1",title:"Delete this email",children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"size-3",children:[e.jsx("path",{d:"M3 6h18"}),e.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),e.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]}),"Delete Email"]})]})]}),d.otp_code&&e.jsxs("div",{className:"bg-amber-500/10 border border-amber-500/25 rounded-xl p-4 flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-amber-500 uppercase tracking-widest font-bold",children:"Verification OTP"}),e.jsx("p",{className:"text-2xl font-black font-mono tracking-widest text-text-main mt-1",children:d.otp_code})]}),e.jsx(m,{variant:Q[d.otp_code]?"success":"secondary",size:"sm",onClick:()=>Ie(d.otp_code),children:Q[d.otp_code]?e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"material-symbols-outlined text-[14px]",children:"check"}),"Copied!"]}):"Copy Code"})]}),d.verify_url&&e.jsxs("div",{className:"bg-primary/10 border border-primary/20 rounded-xl p-3 flex items-center justify-between gap-3 text-xs",children:[e.jsxs("span",{className:"truncate flex-1 text-text-main",title:d.verify_url,children:["🔗 ",d.verify_url]}),e.jsx("a",{href:d.verify_url,target:"_blank",rel:"noreferrer",className:"bg-primary hover:bg-primary/95 text-white px-3 py-1.5 rounded-lg font-semibold shrink-0",children:"Open Link"})]})]}),e.jsxs("div",{className:"flex justify-between items-center border-b border-border-subtle bg-surface/20 px-6 shrink-0",children:[e.jsxs("div",{className:"flex",children:[d.body_html&&e.jsx("button",{onClick:()=>J("html"),className:`px-4 py-2.5 text-xs font-semibold border-b-2 cursor-pointer ${T==="html"?"border-primary text-primary":"border-transparent text-text-muted"}`,children:"HTML View"}),e.jsx("button",{onClick:()=>J("text"),className:`px-4 py-2.5 text-xs font-semibold border-b-2 cursor-pointer ${T==="text"||!d.body_html?"border-primary text-primary":"border-transparent text-text-muted"}`,children:"Plain Text"})]}),T==="html"&&d.body_html&&e.jsxs("div",{className:"flex items-center gap-2 py-1.5 text-xs text-text-muted select-none",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px] text-white/40",children:"zoom_in"}),e.jsx("button",{onClick:()=>ne(s=>Math.max(.4,s-.1)),className:"px-2 py-0.5 rounded bg-white/5 hover:bg-white/10 border border-white/10 active:bg-white/20 transition-colors text-[10px] font-bold cursor-pointer text-white",title:"Zoom Out",children:"A-"}),e.jsxs("span",{className:"font-mono text-[10px] w-10 text-center text-white/80",children:[Math.round(re*100),"%"]}),e.jsx("button",{onClick:()=>ne(s=>Math.min(1.5,s+.1)),className:"px-2 py-0.5 rounded bg-white/5 hover:bg-white/10 border border-white/10 active:bg-white/20 transition-colors text-[10px] font-bold cursor-pointer text-white",title:"Zoom In",children:"A+"}),e.jsx("button",{onClick:()=>ne(1),className:"px-2 py-0.5 rounded bg-white/5 hover:bg-white/10 border border-white/10 active:bg-white/20 transition-colors text-[10px] font-semibold cursor-pointer text-white ml-1",children:"Reset"})]})]}),e.jsx("div",{className:"flex-1 overflow-auto custom-scrollbar p-6 relative min-h-[450px]",children:T==="html"&&d.body_html?e.jsx("div",{className:"w-full h-full relative overflow-auto custom-scrollbar",children:e.jsx("iframe",{srcDoc:tt(d.body_html),title:"Email Preview",sandbox:"allow-popups allow-popups-to-escape-sandbox",style:{transform:`scale(${re})`,transformOrigin:"top left",width:`${100/re}%`,height:`${100/re}%`},className:"border border-border-subtle rounded-xl bg-white absolute inset-0"})}):e.jsx("pre",{className:"text-xs font-sans whitespace-pre-wrap leading-relaxed text-text-main",children:d.body_text})})]})})]}):e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-8 text-center space-y-4",children:[e.jsx("div",{className:"size-16 rounded-full bg-primary/10 text-primary flex items-center justify-center",children:e.jsx("span",{className:"material-symbols-outlined text-[32px]",children:"mail_lock"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-base font-semibold text-text-main",children:"FSMail Client Not Configured"}),e.jsx("p",{className:"text-xs text-text-muted mt-1 max-w-sm",children:"Please enter your FSMail Cloudflare worker credentials and endpoint in settings to enable temp emails."})]}),e.jsx(m,{variant:"primary",onClick:()=>A(!0),children:"⚙ Configure Settings"})]}),he&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 backdrop-blur-sm p-4 pt-[6vh] overflow-y-auto",children:e.jsxs("div",{className:"bg-neutral-900 border border-white/10 rounded-2xl w-full max-w-md text-white max-h-[80vh] flex flex-col overflow-hidden shadow-2xl",children:[e.jsxs("div",{className:"flex justify-between items-center p-5 border-b border-white/5 shrink-0",children:[e.jsx("h3",{className:"text-base font-bold",children:"FSMail Settings"}),e.jsx("button",{onClick:()=>A(!1),className:"text-white/60 hover:text-white cursor-pointer flex items-center",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),e.jsxs("div",{className:"p-5 overflow-y-auto custom-scrollbar flex-1 space-y-4",children:[e.jsxs("div",{className:"flex border border-white/10 rounded-lg p-0.5 bg-white/5 text-xs shrink-0",children:[e.jsx("button",{type:"button",onClick:()=>k("manual"),className:`flex-1 py-1.5 rounded-md font-semibold cursor-pointer text-center transition-all ${fe==="manual"?"bg-primary text-white":"text-white/60 hover:text-white"}`,children:"Manual Input"}),e.jsx("button",{type:"button",onClick:()=>k("auto"),className:`flex-1 py-1.5 rounded-md font-semibold cursor-pointer text-center transition-all ${fe==="auto"?"bg-primary text-white":"text-white/60 hover:text-white"}`,children:"⚡ Auto Deploy (Cloudflare)"})]}),fe==="manual"?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-[11px] text-white/60 block mb-1",children:"Base URL Worker"}),e.jsx("input",{type:"text",placeholder:"https://mail.yourdomain.com",value:R,onChange:s=>G(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-white/5 focus:outline-none focus:border-primary text-white"}),S&&R!==S&&e.jsxs("div",{className:"mt-1.5 p-2 bg-primary/10 border border-primary/20 rounded-lg text-[10px] text-primary space-y-1 text-left",children:[e.jsx("div",{children:"💡 Coba gunakan URL workers.dev fallback:"}),e.jsx("div",{className:"font-mono text-[9px] break-all bg-black/40 p-1 rounded select-all",children:S}),e.jsx("button",{type:"button",onClick:()=>G(S),className:"underline hover:no-underline font-semibold block",children:"Klik untuk gunakan URL ini"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[11px] text-white/60 block mb-1",children:"API Key (X-API-Key)"}),e.jsx("input",{type:"password",placeholder:"tm_...",value:be,onChange:s=>O(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-white/5 focus:outline-none focus:border-primary text-white"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[11px] text-white/60 block mb-1",children:"Default Domain"}),e.jsx("input",{type:"text",placeholder:"yourdomain.com",value:U,onChange:s=>Te(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-white/5 focus:outline-none focus:border-primary text-white"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[11px] text-white/60 block mb-1",children:"Webhook Secret"}),e.jsx("input",{type:"password",placeholder:"Leave empty to auto-generate",value:We,onChange:s=>oe(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-white/5 focus:outline-none focus:border-primary text-white"})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(m,{variant:"secondary",size:"sm",fullWidth:!0,onClick:xe,disabled:u,children:u?"Testing...":"⚡ Test Connection"}),L&&e.jsxs("div",{className:`p-2.5 rounded-lg text-xs font-medium flex items-start gap-2 ${L.ok?"bg-green-500/10 border border-green-500/20 text-green-400":"bg-red-500/10 border border-red-500/20 text-red-400"}`,children:[e.jsx("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:L.ok?"check_circle":"error"}),e.jsx("span",{className:"break-all text-left",children:L.message})]}),e.jsxs("div",{className:"flex gap-2 pt-1",children:[e.jsx(m,{variant:"secondary",size:"sm",fullWidth:!0,onClick:()=>A(!1),children:"Cancel"}),e.jsx(m,{variant:"primary",size:"sm",fullWidth:!0,onClick:Ve,children:"Save Settings"})]})]})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center mb-1",children:[e.jsx("label",{className:"text-[11px] text-white/60 block",children:"Cloudflare Account ID"}),e.jsxs("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-primary hover:underline cursor-pointer flex items-center gap-0.5",children:["Temukan disini ",e.jsx("span",{className:"material-symbols-outlined text-[10px]",children:"open_in_new"})]})]}),e.jsx("input",{type:"text",placeholder:"Paste Account ID Anda",value:V,onChange:s=>ze(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-white/5 focus:outline-none focus:border-primary text-white"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center mb-1",children:[e.jsx("label",{className:"text-[11px] text-white/60 block",children:"Cloudflare API Token (Workers & D1)"}),e.jsxs("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-primary hover:underline cursor-pointer flex items-center gap-0.5",children:["Buat disini ",e.jsx("span",{className:"material-symbols-outlined text-[10px]",children:"open_in_new"})]})]}),e.jsx("input",{type:"password",placeholder:"Paste API Token Anda",value:W,onChange:s=>ge(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-white/5 focus:outline-none focus:border-primary text-white"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[11px] text-white/60 block mb-1",children:"Domain Worker (misal: mail.domainanda.com)"}),e.jsx("input",{type:"text",placeholder:"mail.domainanda.com",value:le,onChange:s=>Be(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-white/5 focus:outline-none focus:border-primary text-white"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center mb-1",children:[e.jsx("label",{className:"text-[11px] text-white/60 block",children:"Telegram Bot Token (Opsional)"}),e.jsxs("a",{href:"https://t.me/BotFather",target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-primary hover:underline cursor-pointer flex items-center gap-0.5",children:["Dapatkan di @BotFather ",e.jsx("span",{className:"material-symbols-outlined text-[10px]",children:"open_in_new"})]})]}),e.jsx("input",{type:"password",placeholder:"Token Bot dari @BotFather",value:Ae,onChange:s=>Fe(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-white/5 focus:outline-none focus:border-primary text-white"})]})]}),e.jsxs("div",{className:"space-y-3",children:[L&&e.jsxs("div",{className:`p-2.5 rounded-lg text-xs font-medium flex items-start gap-2 ${L.ok?"bg-green-500/10 border border-green-500/20 text-green-400":"bg-red-500/10 border border-red-500/20 text-red-400"}`,children:[e.jsx("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:L.ok?"check_circle":"error"}),e.jsx("span",{className:"break-all text-left",children:L.message})]}),S&&e.jsxs("div",{className:"p-2.5 bg-white/5 border border-white/10 rounded-lg text-[10px] text-white/70 space-y-1 text-left",children:[e.jsx("span",{className:"font-semibold text-primary block",children:"Workers.dev fallback URL:"}),e.jsx("span",{className:"font-mono text-[9px] break-all block bg-black/40 p-1 rounded select-all",children:S}),e.jsx("span",{className:"block leading-relaxed",children:"Jika custom domain Anda terputus (misal karena DNS belum merambat), Anda dapat menggunakan URL fallback ini di tab Manual Input."})]}),e.jsxs("div",{className:"flex gap-2 pt-1",children:[e.jsx(m,{variant:"secondary",size:"sm",fullWidth:!0,onClick:()=>A(!1),children:"Cancel"}),e.jsx(m,{variant:"primary",size:"sm",fullWidth:!0,onClick:De,disabled:u,children:u?"Deploying...":"⚡ Auto Deploy & Setup"})]})]})]}),e.jsxs("div",{className:"space-y-3 pt-2 border-t border-white/5 shrink-0",children:[e.jsx("a",{href:"/dashboard/automation/fsmail-tutorial",target:"_blank",rel:"noopener noreferrer",className:"w-full py-2 rounded-lg bg-neutral-900 border border-primary/20 hover:border-primary/50 text-primary text-xs font-semibold flex items-center justify-center gap-1.5 transition-colors cursor-pointer",children:"📖 Buka Panduan Lengkap Deploy"}),e.jsxs("details",{className:"group bg-white/5 border border-white/10 rounded-xl overflow-hidden",children:[e.jsxs("summary",{className:"list-none flex items-center justify-between p-3 cursor-pointer select-none text-[11px] font-semibold text-white/80 hover:text-white transition-colors",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"help"}),"Cara Setup Temp Mail (FSMail)"]}),e.jsx("span",{className:"material-symbols-outlined text-[16px] transition-transform group-open:rotate-180",children:"expand_more"})]}),e.jsxs("div",{className:"p-3 pt-0 border-t border-white/5 text-[11px] text-white/70 space-y-2 leading-relaxed max-h-40 overflow-y-auto custom-scrollbar",children:[e.jsxs("p",{className:"mt-2",children:["FSMail adalah sistem email sementara berbasis ",e.jsx("strong",{children:"Cloudflare Worker"}),". Ikuti langkah berikut untuk mengaturnya:"]}),e.jsxs("ol",{className:"list-decimal list-inside space-y-1.5 text-white/60",children:[e.jsxs("li",{children:[e.jsx("strong",{className:"text-white/80",children:"Deploy Worker:"})," Deploy kode worker FSMail di akun Cloudflare Anda."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-white/80",children:"Set API Key:"})," Pada dashboard Worker Anda, tambahkan Environment Variable ",e.jsx("code",{className:"bg-white/10 px-1 py-0.5 rounded font-mono text-amber-300",children:"API_KEY"})," dengan nilai token rahasia Anda."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-white/80",children:"Email Routing:"})," Aktifkan Cloudflare Email Routing pada domain Anda, lalu arahkan semua email masuk ke worker tersebut."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-white/80",children:"Hubungkan:"})," Masukkan ",e.jsx("strong",{className:"text-white",children:"Base URL Worker"})," (misal: ",e.jsx("code",{className:"text-amber-200",children:"https://mail.domain.com"}),") dan ",e.jsx("strong",{className:"text-white",children:"API Key"})," ke form di atas, lalu tekan ",e.jsx("strong",{className:"text-white",children:"Test Connection"}),"."]}),e.jsxs("li",{children:[e.jsx("strong",{className:"text-white/80",children:"Aktifkan Webhook:"})," Setelah koneksi berhasil dan pengaturan disimpan, klik tombol ",e.jsx("strong",{className:"text-white",children:"Register Webhook"})," di bawah untuk mengaktifkan sinkronisasi email secara real-time."]})]})]})]}),X&&e.jsxs("div",{className:"border-t border-white/10 pt-3 mt-2 space-y-2",children:[e.jsx("p",{className:"text-[10px] text-white/40 uppercase font-bold tracking-wider",children:"Worker Integration"}),e.jsx("pre",{className:"text-[10px] bg-white/5 p-2 rounded overflow-x-auto text-amber-300 font-mono",children:Ue}),e.jsx(m,{variant:"primary",size:"sm",fullWidth:!0,onClick:Me,children:"Register Webhook"})]})]})]})]})}),Re&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",children:e.jsxs("div",{className:"bg-neutral-950 border border-white/10 rounded-2xl w-full max-w-2xl text-white max-h-[85vh] flex flex-col overflow-hidden shadow-2xl",children:[e.jsxs("div",{className:"flex justify-between items-center p-5 border-b border-white/5 shrink-0 bg-neutral-900",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-primary text-[22px]",children:"auto_stories"}),e.jsx("h3",{className:"text-base font-bold",children:"Panduan Lengkap Deploy Temp Mail"})]}),e.jsx("button",{onClick:()=>_e(!1),className:"text-white/60 hover:text-white cursor-pointer flex items-center",children:e.jsx("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),e.jsxs("div",{className:"p-6 overflow-y-auto custom-scrollbar flex-1 space-y-6 text-sm leading-relaxed text-white/80",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-white flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"bg-primary/20 text-primary px-2 py-0.5 rounded text-xs",children:"1"}),"Prasyarat & Login Cloudflare"]}),e.jsx("p",{className:"mb-2",children:"Pastikan Node.js sudah terinstal. Login ke akun Cloudflare Anda melalui terminal dengan menjalankan perintah berikut:"}),e.jsxs("div",{className:"flex items-center justify-between bg-white/5 p-3 rounded-lg border border-white/10 font-mono text-xs text-amber-300",children:[e.jsx("span",{children:"npx wrangler login"}),e.jsx(E,{value:"npx wrangler login"})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-white flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"bg-primary/20 text-primary px-2 py-0.5 rounded text-xs",children:"2"}),"Install Dependencies"]}),e.jsx("p",{className:"mb-2",children:"Masuk ke direktori tempmail lokal di sistem Anda dan install dependensi NPM:"}),e.jsxs("div",{className:"flex items-center justify-between bg-white/5 p-3 rounded-lg border border-white/10 font-mono text-xs text-amber-300",children:[e.jsx("span",{children:"cd /home/data/Project/fsrouter/tempmail && npm install"}),e.jsx(E,{value:"cd /home/data/Project/fsrouter/tempmail && npm install"})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-white flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"bg-primary/20 text-primary px-2 py-0.5 rounded text-xs",children:"3"}),"Buat Database D1"]}),e.jsx("p",{className:"mb-2",children:"Buat database SQL D1 baru untuk menyimpan inbox dan pesan email masuk:"}),e.jsxs("div",{className:"flex items-center justify-between bg-white/5 p-3 rounded-lg border border-white/10 font-mono text-xs text-amber-300 mb-3",children:[e.jsx("span",{children:"npx wrangler d1 create tempmail"}),e.jsx(E,{value:"npx wrangler d1 create tempmail"})]}),e.jsxs("div",{className:"bg-blue-500/10 border border-blue-500/20 rounded-lg p-3 text-xs text-blue-300 flex items-start gap-2",children:[e.jsx("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"info"}),e.jsxs("span",{children:["Salin ",e.jsx("strong",{children:"database_id"})," hasil output perintah di atas, lalu buka file ",e.jsx("a",{href:"file:///home/data/Project/fsrouter/tempmail/wrangler.jsonc",className:"underline font-semibold hover:text-blue-200",children:"wrangler.jsonc"})," dan ganti nilai ",e.jsx("code",{children:"database_id"})," di dalamnya."]})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-white flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"bg-primary/20 text-primary px-2 py-0.5 rounded text-xs",children:"4"}),"Jalankan Migrasi Database"]}),e.jsx("p",{className:"mb-2",children:"Inisialisasi tabel database temp mail di lokal dan jarak jauh (remote Cloudflare):"}),e.jsxs("div",{className:"flex items-center justify-between bg-white/5 p-3 rounded-lg border border-white/10 font-mono text-xs text-amber-300",children:[e.jsx("span",{children:"npm run db:migrate:local && npm run db:migrate:remote"}),e.jsx(E,{value:"npm run db:migrate:local && npm run db:migrate:remote"})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-white flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"bg-primary/20 text-primary px-2 py-0.5 rounded text-xs",children:"5"}),"Simpan Secret Bot Telegram"]}),e.jsx("p",{className:"mb-2",children:"Set token Telegram bot Anda dan webhook secret token ke Cloudflare Workers:"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between bg-white/5 p-3 rounded-lg border border-white/10 font-mono text-xs text-amber-300",children:[e.jsx("span",{children:"npx wrangler secret put TELEGRAM_BOT_TOKEN"}),e.jsx(E,{value:"npx wrangler secret put TELEGRAM_BOT_TOKEN"})]}),e.jsxs("div",{className:"flex items-center justify-between bg-white/5 p-3 rounded-lg border border-white/10 font-mono text-xs text-amber-300",children:[e.jsx("span",{children:"npx wrangler secret put TELEGRAM_WEBHOOK_SECRET"}),e.jsx(E,{value:"npx wrangler secret put TELEGRAM_WEBHOOK_SECRET"})]})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-white flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"bg-primary/20 text-primary px-2 py-0.5 rounded text-xs",children:"6"}),"Konfigurasi `wrangler.jsonc` & Deploy"]}),e.jsxs("p",{className:"mb-2",children:["Sesuaikan nilai di bagian ",e.jsx("code",{children:"vars"})," (domain dan base URL) pada file ",e.jsx("a",{href:"file:///home/data/Project/fsrouter/tempmail/wrangler.jsonc",className:"underline font-semibold hover:text-white",children:"wrangler.jsonc"}),", lalu deploy worker:"]}),e.jsxs("div",{className:"flex items-center justify-between bg-white/5 p-3 rounded-lg border border-white/10 font-mono text-xs text-amber-300",children:[e.jsx("span",{children:"npm run deploy"}),e.jsx(E,{value:"npm run deploy"})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-white flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"bg-primary/20 text-primary px-2 py-0.5 rounded text-xs",children:"7"}),"Set Webhook Telegram Bot"]}),e.jsx("p",{className:"mb-2",children:"Daftarkan URL Worker Anda agar bot Telegram dapat memproses command masuk:"}),e.jsxs("div",{className:"flex items-center justify-between bg-white/5 p-3 rounded-lg border border-white/10 font-mono text-xs text-amber-300",children:[e.jsx("span",{className:"truncate mr-2",children:`curl -X POST "https://api.telegram.org/bot<BOT_TOKEN>/setWebhook" -H "Content-Type: application/json" -d '{"url":"https://<worker-host>/telegram/webhook","secret_token":"<WEBHOOK_SECRET>"}'`}),e.jsx(E,{value:`curl -X POST "https://api.telegram.org/bot<BOT_TOKEN>/setWebhook" -H "Content-Type: application/json" -d '{"url":"https://<worker-host>/telegram/webhook","secret_token":"<WEBHOOK_SECRET>"}'`})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-white flex items-center gap-2 mb-2",children:[e.jsx("span",{className:"bg-primary/20 text-primary px-2 py-0.5 rounded text-xs",children:"8"}),"Cloudflare Email Routing"]}),e.jsxs("p",{children:["Masuk ke Cloudflare Dashboard domain Anda, klik menu ",e.jsx("strong",{children:"Email Routing"}),", aktifkan fitur tersebut, lalu buat rule ",e.jsx("strong",{children:"Catch-all"})," dengan aksi ",e.jsx("strong",{children:"Send to a Worker"})," mengarah ke nama Worker Anda."]})]})]}),e.jsx("div",{className:"p-5 border-t border-white/5 shrink-0 bg-neutral-900 flex justify-end",children:e.jsx(m,{variant:"primary",size:"sm",onClick:()=>_e(!1),children:"Selesai Membaca"})})]})}),j&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:e.jsxs("form",{onSubmit:w,className:"bg-neutral-900 border border-white/10 rounded-2xl w-full max-w-sm p-6 space-y-4 text-white",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("h3",{className:"text-base font-bold",children:"New Inbox"}),e.jsx("button",{type:"button",onClick:()=>i(!1),className:"text-white/60 hover:text-white cursor-pointer",children:e.jsx("span",{className:"material-symbols-outlined",children:"close"})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-[11px] text-white/60 block mb-1",children:"Alias (optional, empty = random)"}),e.jsx("input",{type:"text",placeholder:"e.g. business-inbox",value:we,onChange:s=>He(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-white/5 focus:outline-none focus:border-primary text-white"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[11px] text-white/60 block mb-1",children:"Domain"}),se.length>0?e.jsxs("select",{value:ce,onChange:s=>de(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-neutral-900 focus:outline-none focus:border-primary text-white",children:[e.jsxs("option",{value:"",children:["— Default (",U||se[0],") —"]}),se.map(s=>e.jsx("option",{value:s,children:s},s))]}):e.jsx("input",{type:"text",placeholder:U||"yourdomain.com",value:ce,onChange:s=>de(s.target.value),className:"w-full text-xs p-2.5 rounded-lg border border-white/10 bg-white/5 focus:outline-none focus:border-primary text-white"})]}),e.jsxs("div",{className:"flex gap-2 pt-2",children:[e.jsx(m,{type:"button",variant:"secondary",size:"sm",fullWidth:!0,onClick:()=>i(!1),children:"Cancel"}),e.jsx(m,{type:"submit",variant:"primary",size:"sm",fullWidth:!0,children:"Create Inbox"})]})]})]})})]})}export{it as default};
|
package/public/index.html
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
11
11
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
12
12
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
|
|
13
|
-
<script type="module" crossorigin src="/assets/index.
|
|
14
|
-
<link rel="modulepreload" crossorigin href="/assets/router.Cjj1--8t.js?v=
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/assets/zustand.akaTi5uX.js?v=
|
|
16
|
-
<link rel="stylesheet" crossorigin href="/assets/index.C--zNQ3O.css?v=
|
|
13
|
+
<script type="module" crossorigin src="/assets/index.BO_pNnMt.js?v=108"></script>
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/router.Cjj1--8t.js?v=108">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/assets/zustand.akaTi5uX.js?v=108">
|
|
16
|
+
<link rel="stylesheet" crossorigin href="/assets/index.C--zNQ3O.css?v=108">
|
|
17
17
|
</head>
|
|
18
18
|
<body>
|
|
19
19
|
<div id="root"></div>
|