1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/exceljs.min-Dn6cTOTw.js","assets/react-ofKBwqgL.js","assets/_commonjs-dynamic-modules-TDtrdbi3.js"])))=>i.map(i=>d[i]); 2import{_ as A,a as T,b as I,c as P,d as q,e as O,f as V,g as U,h as W,i as N,j as H,k as G,l as D,m as J,n as K,o as X,p as Y,q as Z,r as Q,s as ee,t as te,u as ae,v as se,w as re,x as ne,y as ie,z as oe,A as le,B as ce,C as de,D as pe,E as _e}from"./melaya_zen-CNC3RHuz.js";import{r as j}from"./resolveConnectorLogo--w6iodMP.js";import{r as S}from"./logoRegistry-KEjm_T6r.js";import{_ as be}from"./index-DaLR4AYZ.js";import{r as g,j as s}from"./react-ofKBwqgL.js";import{f as y,l as k,Z as fe,ai as ge}from"./PromoBanner-gdNZTrUZ.js";import{T as E}from"./triangle-alert-CHbL9aBG.js";import{E as ue}from"./eye-off-Cn5BdbK2.js";import{E as me}from"./eye-D5Of6TKQ.js";import{L as z}from"./loader-circle-C2BEvveP.js";import{D as xe}from"./download-BYyZaxX7.js";import{F as he}from"./file-88wH0imJ.js";import{P as ye}from"./presentation-Becq-Sne.js";import{F as $}from"./file-text-nNTNmcUr.js";import{I as we}from"./image-bQMQuAp-.js";import{F as ve}from"./file-code-2-DjuVxa8Y.js";/** 3 * @license lucide-react v0.484.0 - ISC 4 * 5 * This source code is licensed under the ISC license. 6 * See the LICENSE file in the root directory of this source tree. 7 */const je=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Se=y("archive",je);/** 8 * @license lucide-react v0.484.0 - ISC 9 * 10 * This source code is licensed under the ISC license. 11 * See the LICENSE file in the root directory of this source tree. 12 */const ke=[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 13v-1h6v1",key:"1dh9dg"}],["path",{d:"M5 12v6",key:"150t9c"}],["path",{d:"M4 18h2",key:"1xrofg"}]],Be=y("file-type-2",ke);/** 13 * @license lucide-react v0.484.0 - ISC 14 * 15 * This source code is licensed under the ISC license. 16 * See the LICENSE file in the root directory of this source tree. 17 */const Ee=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],ze=y("film",Ee);/** 18 * @license lucide-react v0.484.0 - ISC 19 * 20 * This source code is licensed under the ISC license. 21 * See the LICENSE file in the root directory of this source tree. 22 */const $e=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],Fe=y("music",$e);/** 23 * @license lucide-react v0.484.0 - ISC 24 * 25 * This source code is licensed under the ISC license. 26 * See the LICENSE file in the root directory of this source tree. 27 */const Le=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]],F=y("sheet",Le),L={},f=(e,t)=>e.forEach(a=>{L[a]=t});f(["pptx","ppt","key","odp"],{icon:ye,accent:"#D24726",kind:"slides"});f(["docx","doc","rtf","odt"],{icon:$,accent:"#2B579A",kind:"doc"});f(["xlsx","xls","ods"],{icon:F,accent:"#217346",kind:"sheet"});f(["csv","tsv"],{icon:F,accent:"#217346",kind:"csv"});f(["pdf"],{icon:Be,accent:"#E11D48",kind:"pdf"});f(["png","jpg","jpeg","webp","gif","svg","bmp","heic","avif","ico"],{icon:we,accent:"#7C3AED",kind:"image"});f(["mp4","webm","mov","mkv","avi","m4v"],{icon:ze,accent:"#DB2777",kind:"video"});f(["mp3","wav","ogg","m4a","flac","aac","opus"],{icon:Fe,accent:"#0D9488",kind:"audio"});f(["zip","tar","gz","tgz","rar","7z","bz2"],{icon:Se,accent:"#B45309",kind:"archive"});f(["json","xml","yaml","yml","html","css","js","ts","py","sql","sh","toml","ini"],{icon:ve,accent:"#6366F1",kind:"code"});f(["txt","md","log","text"],{icon:$,accent:"#475569",kind:"text"});function Me(e){return L[(e||"").toLowerCase()]||{icon:he,accent:"#64748B",kind:"file"}}function Re(e){return e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`}const Ce=new Set(["image","video","audio","pdf","sheet","csv","text","code"]),B=2e5;async function M(e){const t=localStorage.getItem("mel_auth_token")||"",a=await fetch(`${ge.replace(/\/+$/,"")}/api/ai/assistant/outputs/${encodeURIComponent(e)}`,{headers:{authorization:`Bearer ${t}`}});return a.ok?a.blob():null}async function Ae(e){const t=await M(e.token);if(!t)return!1;const a=URL.createObjectURL(t),r=document.createElement("a");return r.href=a,r.download=e.name||`download.${e.ext||"bin"}`,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(a),5e3),!0}async function Te(e){const t=await be(()=>import("./exceljs.min-Dn6cTOTw.js").then(n=>n.e),__vite__mapDeps([0,1,2])),a=t.default??t,r=new a.Workbook;await r.xlsx.load(await e.arrayBuffer());const o=r.worksheets[0];if(!o)return[];const i=[];return o.eachRow({includeEmpty:!1},(n,p)=>{if(p>60)return;const m=[];n.eachCell({includeEmpty:!0},(d,h)=>{if(h>20)return;const b=d.value;m.push(b==null?"":typeof b=="object"&&"text"in b?String(b.text):String(b))}),i.push(m)}),i}function Ie(e){const t=e.includes(" ")&&!e.includes(",")?" ":",";return e.split(/\r?\n/).slice(0,60).filter(a=>a.length).map(a=>{const r=[];let o="",i=!1;for(let n=0;n<a.length;n++){const p=a[n];p==='"'?i&&a[n+1]==='"'?(o+='"',n++):i=!i:p===t&&!i?(r.push(o),o=""):o+=p}return r.push(o),r.slice(0,20)})}function Pe({f:e,kind:t,dark:a}){const{t:r}=k(),[o,i]=g.useState("loading"),[n,p]=g.useState(""),[m,d]=g.useState(""),[h,b]=g.useState(null),x=g.useRef("");g.useEffect(()=>{let l=!0;return(async()=>{try{const u=await M(e.token);if(!u){l&&i("error");return}if(t==="image"||t==="video"||t==="audio"||t==="pdf"){const _=URL.createObjectURL(u);x.current=_,l&&(p(_),i("ready"))}else if(t==="sheet"){const _=await Te(u);l&&(b(_),i("ready"))}else if(t==="csv"){const _=(await u.text()).slice(0,B);l&&(b(Ie(_)),i("ready"))}else{const _=await u.text();l&&(d(_.slice(0,B)),i("ready"))}}catch{l&&i("error")}})(),()=>{l=!1,x.current&&(URL.revokeObjectURL(x.current),x.current="")}},[e.token,t]);const w=a?"rgba(148,163,184,0.16)":"rgba(15,23,42,0.10)",v=a?"rgba(2,6,23,0.55)":"rgba(248,250,252,0.9)",c={marginTop:10,borderRadius:12,border:`1px solid ${w}`,background:v,overflow:"hidden"};if(o==="loading")return s.jsxs("div",{style:{...c,padding:24,display:"flex",alignItems:"center",justifyContent:"center",gap:8,color:a?"#94A3B8"
27:"#64748B",fontSize:12},children:[s.jsx(z,{size:15,className:"animate-spin"})," ",r("assistant.genfile.previewLoading",{defaultValue:"Loading previewâ¦"})]});if(o==="error")return s.jsxs("div",{style:{...c,padding:18,display:"flex",alignItems:"center",gap:8,color:a?"#94A3B8":"#64748B",fontSize:12},children:[s.jsx(E,{size:15})," ",r("assistant.genfile.previewError",{defaultValue:"Preview unavailable â the file may have expired. Try Download."})]});if(t==="image")return s.jsx("div",{style:{...c,padding:10,textAlign:"center"},children:s.jsx("img",{src:n,alt:e.name,style:{maxWidth:"100%",maxHeight:380,borderRadius:8,objectFit:"contain"}})});if(t==="video")return s.jsx("div",{style:{...c,padding:8,background:"#000"},children:s.jsx("video",{src:n,controls:!0,style:{width:"100%",maxHeight:380,borderRadius:8,display:"block"}})});if(t==="audio")return s.jsx("div",{style:{...c,padding:14},children:s.jsx("audio",{src:n,controls:!0,style:{width:"100%"}})});if(t==="pdf")return s.jsx("div",{style:c,children:s.jsx("iframe",{src:n,title:e.name,style:{width:"100%",height:460,border:0,display:"block"}})});if(t==="sheet"||t==="csv"){const l=h||[];return l.length?s.jsx("div",{style:{...c,maxHeight:380,overflow:"auto"},children:s.jsx("table",{style:{borderCollapse:"collapse",fontSize:12,width:"100%",color:a?"#E2E8F0":"#0F172A"},children:s.jsx("tbody",{children:l.map((u,_)=>s.jsx("tr",{style:{background:_===0?a?"rgba(148,163,184,0.12)":"rgba(15,23,42,0.05)":"transparent"},children:u.map((R,C)=>s.jsx("td",{style:{border:`1px solid ${w}`,padding:"4px 8px",fontWeight:_===0?700:400,whiteSpace:"nowrap",maxWidth:220,overflow:"hidden",textOverflow:"ellipsis"},children:R},C))},_))})})}):s.jsx("div",{style:{...c,padding:18,fontSize:12,color:a?"#94A3B8"
27:"#64748B"},children:r("assistant.genfile.previewEmpty",{defaultValue:"Nothing to preview."})})}return s.jsx("pre",{style:{...c,margin:0,padding:14,maxHeight:380,overflow:"auto",fontSize:12,lineHeight:1.55,fontFamily:"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",color:a?"#E2E8F0":"#1E293B",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:m})}function qe({f:e,dark:t}){const{t:a}=k(),[r,o]=g.useState(!1),[i,n]=g.useState(!1),[p,m]=g.useState(!1),d=Me(e.ext),h=d.icon,b=Ce.has(d.kind),x=fe(t),w=async()=>{o(!0);try{await Ae(e)}catch{}o(!1)},v=(c,l)=>({display:"inline-flex",alignItems:"center",gap:6,flexShrink:0,padding:"7px 13px",borderRadius:10,cursor:"pointer",fontSize:12,fontWeight:700,fontFamily:"'Poppins', system-ui, sans-serif",lineHeight:1,border:`1px solid ${l}${c?"":"40"}`,color:c?"#fff":l,background:c?l:`${l}${t?"22":"14"}`,boxShadow:c?t?`0 0 16px ${l}55`:`0 4px 12px ${l}30`:"none",transition:"background .15s ease, color .15s ease, box-shadow .15s ease"});return s.jsxs("div",{style:{...x,padding:12,display:"flex",flexDirection:"column",gap:0},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12}
27,children:[s.jsx("div",{"aria-hidden":!0,style:{width:42,height:42,borderRadius:11,flexShrink:0,display:"grid",placeItems:"center",color:d.accent,background:`${d.accent}${t?"26":"18"}`,boxShadow:t?`inset 0 0 0 1px ${d.accent}33, 0 0 14px ${d.accent}1f`:`inset 0 0 0 1px ${d.accent}26`},children:s.jsx(h,{size:21,strokeWidth:2})}),s.jsxs("div",{style:{flex:1,minWidth:0},children:[s.jsx("div",{title:e.name,style:{fontSize:13,fontWeight:600,color:t?"#F1F5F9":"#0F172A",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:4},children:[s.jsx("span",{style:{fontSize:10,fontWeight:700,letterSpacing:"0.05em",color:d.accent,background:`${d.accent}${t?"24":"16"}`,padding:"2px 7px",borderRadius:6},children:(e.ext||"file").toUpperCase()}),s.jsx("span",{style:{fontSize:11,color:t?"#9CA3AF":"#6B7280"},children:Re(e.size)})]})]}),b&&s.jsxs("button",{type:"button",onClick:()=>m(c=>!c),style:v(p,t?"#94A3B8":"#64748B"),"aria-expanded":p,"aria-label":a("assistant.genfile.preview",{defaultValue:"Preview"}),children:[p?s.jsx(ue,{size:14}):s.jsx(me,{size:14}),a("assistant.genfile.preview",{defaultValue:"Preview"})]}),s.jsxs("button",{type:"button",onClick:w,disabled:r,onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),style:{...v(i&&!r,d.accent),opacity:r?.7:1,cursor:r?"default":"pointer"},children:[r?s.jsx(z,{size:14,className:"animate-spin"}):s.jsx(xe,{size:14}),r?a("assistant.genfile.downloading",{defaultValue:"Downloading"}):a("assistant.genfile.download",{defaultValue:"Download"})]})]}),p&&b&&s.jsx(Pe,{f:e,kind:d.kind,dark:t})]})}function Oe({files:e,dark:t}){const{t:a}=k();return e!=null&&e.length?s.jsxs("div",{style:{marginTop:10,display:"flex",flexDirection:"column",gap:8},children:[e.map(r=>s.jsx(qe,{f:r,dark:t},r.token)),s.jsxs("div",{style:{fontSize:11,color:t?"#9CA3AF":"#6B7280",lineHeight:1.4,display:"flex",gap:6,alignItems:"flex-start"},children:[s.jsx(E,{size:13,style:{flexShrink:0,marginTop:1}}),s.jsx("span",{children:a("assistant.genfile.ephemeral",{defaultValue:"This file isn't stored on Melaya's servers. Download it now: it will disappear when your session ends."})})]})]}):null}const it=g.memo(Oe),Ve=Object.assign({"/src/assets/brand/melaya_ambassador_logo.webp":_e,"/src/assets/brand/melaya_blink.webp":pe,"/src/assets/brand/melaya_clown.webp":de,"/src/assets/brand/melaya_compacted.webp":ce,"/src/assets/brand/melaya_compacting.webp":le,"/src/assets/brand/melaya_dark.webp":oe,"/src/assets/brand/melaya_doubtful.webp":ie,"/src/assets/brand/melaya_fight.webp":ne,"/src/assets/brand/melaya_fire.webp":re,"/src/assets/brand/melaya_got_an_idea.webp":se,"/src/assets/brand/melaya_happy.webp":ae,"/src/assets/brand/melaya_horizontal_dark.webp":te,"/src/assets/brand/melaya_horizontal_light.webp":ee,"/src/assets/brand/melaya_integrator_logo.webp":Q,"/src/assets/brand/melaya_kawai.webp":Z,"/src/assets/brand/melaya_logo.webp":Y,"/src/assets/brand/melaya_lost.webp":X,"/src/assets/brand/melaya_love.webp":K,"/src/assets/brand/melaya_mark_dark_1024.webp":J,"/src/assets/brand/melaya_mark_transparent_1024.webp":D,"/src/assets/brand/melaya_party.webp":G,"/src/assets/brand/melaya_question.webp":H,"/src/assets/brand/melaya_sad.webp":N,"/src/assets/brand/melaya_shy.webp":W,"/src/assets/brand/melaya_sleepy.webp":U,"/src/assets/brand/melaya_sneaky.webp":V,"/src/assets/brand/melaya_studying.webp":O,"/src/assets/brand/melaya_sunglasses.webp":q,"/src/assets/brand/melaya_surprise.webp":P,"/src/assets/brand/melaya_thumbs_up.webp":I,"/src/assets/brand/melaya_wondering.webp":T,"/src/assets/brand/melaya_zen.webp":A}),Ue={};for(const[e,t]of Object.entries(Ve)){const a=e.match(/melaya_([a-z0-9_]+)\.(?:png|webp)$/i);a&&!/logo|horizontal|mark|animated/i.test(a[1])&&(Ue[a[1]]=t)}const We=new Set(["kalshi","polymarket","drift_pm","sxbet","overtime","azuro","predictive_markets"]);function ot(e){const t=e.toLowerCase();return t.startsWith("cex_")?S(t.slice(4))||j(t.slice(4))||null:We.has(t)?S(t)||j(t)||null:j(t)||j(t.replace(/_user$/,""))||S(t)||null}function lt(e){return{pageBg:e?"radial-gradient(ellipse 80% 55% at 85% -5%, rgba(0,229,255,0.10) 0%, rgba(124,111,240,0.12) 35%, transparent 65%), radial-gradient(ellipse 65% 55% at -5% 105%, rgba(30,64,175,0.14) 0%, transparent 60%), #050711":"radial-gradient(ellipse 70% 45% at 50% -6%, #ffffff 0%, transparent 60%), linear-gradient(180deg, #fbfdff
270%, #eef2f7 55%, #e3e9f1 100%)",panel:e?"rgba(13,17,28,0.72)":"rgba(255,255,255,0.86)",panelBorder:e?"1px solid rgba(124,140,180,0.16)":"1px solid rgba(15,23,42,0.10)",melBubble:e?"linear-gradient(160deg, rgba(124,111,240,0.22) 0%, rgba(124,111,240,0.08) 55%, rgba(0,229,255,0.05) 100%)":"#ffffff",melBorder:e?"1px solid rgba(124,111,240,0.35)":"1px solid rgba(15,23,42,0.05)",melShadow:e?"0 10px 28px -10px rgba(124,111,240,0.35), inset 0 1px 0 rgba(255,255,255,0.07)":"0 10px 30px -12px rgba(109,40,217,0.24), 0 3px 10px -4px rgba(15,23,42,0.07), inset 0 1px 0 rgba(255,255,255,0.9)",userBubble:e?"linear-gradient(160deg, rgba(34,211,238,0.20) 0%, rgba(14,165,233,0.08) 60%)":"#ffffff",userBorder:e?"1px solid rgba(34,211,238,0.40)":"1px solid rgba(15,23,42,0.05)",userShadow:e?"0 10px 28px -10px rgba(34,211,238,0.35), inset 0 1px 0 rgba(255,255,255,0.07)":"0 10px 30px -12px rgba(8,145,178,0.26), 0 3px 10px -4px rgba(15,23,42,0.07), inset 0 1px 0 rgba(255,255,255,0.9)",cyan:e?"#22d3ee":"#0891b2",chipBg:e?"rgba(255,255,255,0.045)":"#ffffff",chipBorder:e?"1px solid rgba(255,255,255,0.13)":"1px solid rgba(15,23,42,0.14)",chipShadow:e?"0 2px 10px -4px rgba(0,0,0,0.6)":"0 2px 8px -4px rgba(15,23,42,0.18)",text:"var(--foreground)",sub:"var(--mel-text-secondary)",faint:"var(--mel-text-tertiary)",accent:"#10b981",accentInk:"#04110b",cta:"linear-gradient(135deg, #7C6FF0 0%, #22D3EE 100%)",ctaInk:"#ffffff",ctaShadow:e?"0 10px 26px -8px rgba(124,111,240,0.65), 0 4px 18px -6px rgba(34,211,238,0.45)":"0 10px 24px -10px rgba(124,111,240,0.55), 0 4px 16px -8px rgba(34,211,238,0.4)",violet:e?"#a98bff":"#6d28d9",font:"Poppins, sans-serif",wTitle:e?600:500,wLabel:e?500:400,inputBg:e?"rgba(10,14,24,0.85)":"#ffffff",cardSel:e?"rgba(16,185,129,0.10)":"rgba(5,150,105,0.06)"}}function ct(e){const t=String(e||""),a={requestTooLarge:!1},r=t.match(/on\s+((?:input\s+|output\s+)?(?:tokens|requests)\s+per\s+(?:minute|day))/i);r&&(a.window=r[1].toLowerCase());const o=t.match(/Limit\s+([\d,]+)/i),i=t.match(/Requested\s+([\d,]+)/i);o&&(a.limit=Number(o[1].replace(/,/g,""))),i&&(a.requested=Number(i[1].replace(/,/g,"")));const n=t.match(/"?retry_after_s"?\s*[:=]\s*(\d+)/i)||t.match(/retry[- ]after[^0-9]{0,8}(\d+)/i);return n&&(a.retryAfterS=Number(n[1])),a.limit!=null&&a.requested!=null&&a.requested>a.limit&&(a.requestTooLarge=!0),a}function dt(e){if(!e||e<=0)return null;if(e<90)return`${Math.round(e)}s`;const t=Math.round(e/60);return t<90?`${t} min`:`${Math.floor(t/60)}h ${t%60}m`}export{ze as F,it as G,lt as a,ot as c,dt as h,ct as p};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.