PageSourceSearch

https://veeso.ai/_nuxt/Bmsasg-p.js

js veeso.ai collected 2026-09-25 21:03:07 UTC 142,492 bytes, 2 lines download raw bytes

1import{a4 as ut,o as t,g as l,e,N as be,d as Ne,r as y,w as ee,F as W,a5 as ie,c as R,Z as Ce,K as te,L as B,u as r,h as A,t as v,j as J,v as de,a6 as Ue,f as q,l as I,J as he,b as x,a as j,T as Oe,C as ze,a7 as qe,_ as je,a8 as z,P as Be,a9 as pt,S as ke,aa as xe,p as oe,$ as se,R as ft,ab as mt,M as He,n as _e,W as fe,ac as ce,y as xt,Q as Ie,i as bt,ad as ht,ae as vt,af as kt}from"#entry";import{_ as gt}from"./C7TeBoI0.js";import{u as ue}from"./Ds_I3cU9.js";import{g as ye,_ as yt,a as wt,b as ve,c as Ct}from"./CBXL8AG7.js";import{c as Ge}from"./CxaXaSD0.js";import{O as _t,b as $t,h as Lt}from"./Bc5Znn20.js";import{u as pe}from"./B5WxzZSt.js";import{a as Ye}from"./DrL1NOEH.js";import{_ as Mt,a as Pt,b as St,c as jt,d as Dt}from"./Dp9yocqG.js";import{b as At,S as Ut}from"./DX6GWw_6.js";import{r as Q}from"./BqUEdAed.js";import{s as X,C as Bt}from"./vL7MPGf6.js";import{_ as We,a as Ke,b as Je}from"./bMo0fdm_.js";import{_ as Qe}from"./DJTEmr5r.js";import{a as Xe,_ as $e}from"./DbgNoqlZ.js";import{_ as et}from"./6Xev_boh.js";import{u as It}from"./DxkHqloX.js";import{c as K}from"./Bq7X3pZ-.js";import{d as tt}from"./BSqbKfrp.js";import{_ as ge}from"./D6OHUE0t.js";import{_ as we,S as Ft,I as Et}from"./BM1OEoid.js";import{_ as Rt,A as Zt}from"./BG1tK7V0.js";import{L as me}from"./Dr27PAHd.js";import{C as Tt}from"./BSBRDFHK.js";import{F as Fe}from"./DuKBntGY.js";import{C as Se}from"./ChFWZtqV.js";import{S as Vt}from"./BVbVvNLS.js";import{X as Nt}from"./B1rDLfiH.js";import{Toaster as Ot}from"./C9ayPSZe.js";import"./VWaDGczM.js";import"./BNe0Xlio.js";import"./C606gEwv.js";import"./cYNEGR2R.js";import"./Cr_4rPmQ.js";const zt=K("badge-percent",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 15h.01",key:"lqbp3k"}]]);const qt=K("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);const Ht=K("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const Ee=K("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const Gt=K("circle-user",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);const Yt=K("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const Wt=K("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const Kt=K("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);const at=K("gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);const Jt=K("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);const Qt=K("receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);const Xt=K("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const ea=K("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const ta=K("shopping-bag",[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7
1a2 2 0 0 0-1.6.8z",key:"o988cm"}]]);const aa=K("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]);const la=K("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]);const sa=K("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),lt=ut("/images/redeem.svg"),na={name:"SFAppGift"},oa={class:"sf-seede-icon"};function ra(c,s,p,h,k,b){return t(),l("i",oa,[...s[0]||(s[0]=[e("svg",{width:"1em",height:"1.0168em",viewBox:"0 0 21.9609 21.5977",fill:"currentColor","aria-label":"app gift"},[e("g",null,[e("rect",{height:"21.5977",opacity:"0",width:"21.9609",x:"0",y:"0"}),e("path",{d:"M0.679688 10.5234L0.679688 11.8242L8.96484 11.8242C8.27344 13.2422 6.02344 15.3516 4.39453 15.5273C3.79688 15.5859 3.45703 15.9609 3.45703 16.5352C3.45703 17.0391 3.86719 17.5195 4.52344 17.4258C6.33984 17.1445 9.22266 15.0586 10.0078 12.6328L10.0898 12.6328L10.0898 21.0234L11.5078 21.0234L11.5078 12.6328L11.6016 12.6328C12.375 15.0586 15.2695 17.1445 17.0742 17.4258C17.7422 17.5195 18.1523 17.0391 18.1523 16.5352C18.1523 15.9609 17.8125 15.5859 17.2031 15.5273C15.5859 15.3516 13.3242 13.2422 12.6445 11.8242L20.918 11.8242L20.918 10.5234L15.4922 10.5234C16.9805 9.85547 18.0117 8.64844 18.0117 7.17188C18.0117 5.44922 16.7578 4.19531 15.0703 4.19531C13.6055 4.19531 12.2812 5.12109 11.5078 6.63281L11.5078 1.08984L10.0898 1.08984L10.0898 6.63281C9.31641 5.12109 7.99219 4.19531 6.52734 4.19531C4.83984 4.19531 3.58594 5.44922 3.58594 7.17188C3.58594 8.64844 4.62891 9.85547 6.10547 10.5234ZM9.52734 10.3242C7.21875 10.3242 5.23828 8.74219 5.23828 7.26562C5.23828 6.38672 5.77734 5.83594 6.62109 5.83594C8.35547 5.83594 9.87891 7.76953 9.87891 9.99609L9.87891 10.3242ZM12.0703 10.3242L11.7188 10.3242L11.7188 9.99609C11.7188 7.76953 13.2422 5.83594 14.9766 5.83594C15.832 5.83594 16.3594 6.38672 16.3594 7.26562C16.3594 8.74219 14.3906 10.3242 12.0703 10.3242ZM6.375 21.5977L15.2227 21.5977C17.2852 21.5977 18.8906 21 19.9453 19.9453C21.0352 18.8672 21.6094 17.2617 21.6094 15.2109L21.6094 6.38672C21.6094 4.33594 21.0352 2.73047 19.9453 1.65234C18.8789 0.585938 17.2852 0 15.2227 0L6.375 0C4.32422 0 2.70703 0.597656 1.65234 1.65234C0.574219 2.73047 0 4.33594 0 6.38672L0 15.2109C0 17.2617 0.5625 18.8672 1.65234 19.9453C2.71875 21.0117 4.32422 21.5977 6.375 21.5977ZM6.375 19.7109C4.92188 19.7109 3.78516 19.3008 3.04688 18.5625C2.28516 17.8125 1.88672 16.6875 1.88672 15.2109L1.88672 6.38672C1.88672 4.91016 2.28516 3.78516 3.04688 3.03516C3.77344 2.30859 4.92188 1.88672 6.375 1.88672L15.2227 1.88672C16.6875 1.88672 17.8125 2.29688 18.5625 3.03516C19.3242 3.78516 19.7227 4.91016 19.7227 6.38672L19.7227 15.2109C19.7227 16.6875 19.3242 17.8125 18.5625 18.5625C17.8242 19.2891 16.6875 19.7109 15.2227 19.7109Z",fill:"currentColor","fill-opacity":"0.85"})])],-1)])])}const ia=X(na,[["render",ra]]),ca={name:"SFEnvelopeFront"},da={class:"sf-seede-icon"};function ua(c,s,p,h,k,b){return t(),l("i",da,[...s[0]||(s[0]=[be('<svg width="1em" height="1.4162em" viewBox="0 0 28.6289 20.2148" fill="currentColor" aria-label="envelope front"><g><rect height="20.2148" opacity="0" width="28.6289" x="0" y="0"></rect><path d="M3.67969 20.2148L24.9492 20.2148C27.0469 20.2148 28.2773 18.9961 28.2773 16.582L28.2773 3.64453C28.2773 1.23047 27.0352 0.0117188 24.5977 0.0117188L3.32812 0.0117188C1.23047 0.0117188 0 1.23047 0 3.64453L0 16.582C0 18.9961 1.24219 20.2148 3.67969 20.2148ZM3.60938 18.4219C2.44922 18.4219 1.79297 17.7773 1.79297 16.5703L1.79297 3.63281C1.79297 2.4375 2.44922 1.80469 3.60938 1.80469L24.6562 1.80469C25.8164 1.80469 26.4844 2.4375 26.4844 3.64453L26.4844 16.582C26.4844 17.7773 25.8164 18.4219 24.6562 18.4219Z" fill="currentColor" fill-opacity="0.85"></path><path d="M20.6953 7.6875L23.6719 7.6875C24.1992 7.6875 24.5859 7.30078 24.5859 6.78516L24.5859 4.60547C24.5859 4.08984 24.1992 3.70312 23.6719 3.70312L20.6953 3.70312C20.1797 3.70312 19.793 4.08984 19.793 4.60547L19.793 6.78516C19.793 7.30078 20.1797 7.687
15 20.6953 7.6875Z" fill="currentColor" fill-opacity="0.85"></path><path d="M9.63281 12.1289L18.6328 12.1289C19.043 12.1289 19.3711 11.8125 19.3711 11.4023C19.3711 11.0039 19.043 10.6758 18.6328 10.6758L9.63281 10.6758C9.23438 10.6758 8.90625 11.0039 8.90625 11.4023C8.90625 11.8125 9.23438 12.1289 9.63281 12.1289Z" fill="currentColor" fill-opacity="0.85"></path><path d="M9.63281 15.2227L16.4414 15.2227C16.8516 15.2227 17.168 14.8945 17.168 14.4844C17.168 14.0859 16.8516 13.7695 16.4414 13.7695L9.63281 13.7695C9.23438 13.7695 8.90625 14.0859 8.90625 14.4844C8.90625 14.8945 9.23438 15.2227 9.63281 15.2227Z" fill="currentColor" fill-opacity="0.85"></path></g></svg>',1)])])}const pa=X(ca,[["render",ua]]),fa={name:"SFGear"},ma={class:"sf-seede-icon"};function xa(c,s,p,h,k,b){return t(),l("i",ma,[...s[0]||(s[0]=[e("svg",{width:"1em",height:"1.0274em",viewBox:"0 0 26.2617 25.5613",fill:"currentColor","aria-label":"gear"},[e("g",null,[e("rect",{height:"25.5613",opacity:"0",width:"26.2617",x:"0",y:"0"}),e("path",{d:"M12.9492 23.9779C13.2422 23.9779 13.5234 23.9662 13.8047 23.9428L14.4492 25.1498C14.6016 25.4545 14.8711 25.5717 15.1992 25.5365C15.5391 25.4779 15.7383 25.2553 15.7734 24.9271L15.9727 23.5678C16.5352 23.4154 17.0625 23.2162 17.5781 22.9818L18.5859 23.8959C18.832 24.1303 19.1367 24.142 19.4297 23.9896C19.7227 23.8256 19.8398 23.5443 19.7695 23.2162L19.4766 21.8803C19.9453 21.5521 20.3789 21.1771 20.7891 20.7904L22.043 21.306C22.3594 21.4232 22.6523 21.3529 22.875 21.0951C23.0977 20.8373 23.1211 20.5443 22.9336 20.2514L22.207 19.1029C22.5234 18.6225 22.8047 18.1303 23.0625 17.6264L24.4102 17.6732C24.75 17.685 25.0078 17.5209 25.125 17.1928C25.2422 16.8881 25.1602 16.5951 24.8906 16.3959L23.8008 15.5639C23.9531 15.0131 24.0469 14.4506 24.1055 13.8646L25.3945 13.4545C25.7227 13.349 25.9102 13.1146 25.9102 12.7748C25.9102 12.435 25.7227 12.1889 25.3945 12.0951L24.1055 11.685C24.0469 11.099 23.9531 10.5365 23.8008 9.98573L24.8789 9.1537C25.1602 8.95448 25.2305 8.66152 25.125 8.34511C25.0078 8.01698 24.75 7.86464 24.4102 7.87636L23.0625 7.91152C22.8047 7.40761 22.5234 6.9037 22.207 6.43495L22.9219 5.29823C23.1094 5.00527 23.0859 4.70058 22.8867 4.44277C22.6523 4.18495 22.3594 4.12636 22.0547 4.24355L20.7891 4.75917C20.3789 4.34902 19.9336 3.98573 19.4766 3.65761L19.7695 2.33339C19.8398 1.99355 19.7227 1.72402 19.4414 1.55995C19.1367 1.38417 18.832 1.43105 18.5859 1.6537L17.5664 2.55605C17.0625 2.32167 16.5234 2.13417 15.9609 1.97011L15.7734 0.622453C15.7383 0.294328 15.5273 0.0833907 15.2109 0.0130782C14.8711-0.0455156 14.6016 0.0951094 14.4492 0.388078L13.8047 1.59511C13.5234 1.58339 13.2422 1.57167 12.9492 1.57167C12.668 1.57167 12.3867 1.58339 12.0938 1.59511L11.4609 0.399797C11.2969 0.0951094 11.0273-0.0337968 10.7109 0.0130782C10.3711 0.0716719 10.1719 0.294328 10.125 0.622453L9.92578 1.97011C9.375 2.13417 8.83594 2.33339 8.32031 2.56777L7.32422 1.6537C7.07812 1.41933 6.77344 1.39589 6.46875 1.55995C6.17578 1.72402 6.07031 2.00527 6.14062 2.33339L6.42188 3.66933C5.95312 3.99745 5.51953 4.36073 5.10938 4.75917L3.85547 4.24355C3.55078 4.11464 3.24609 4.19667 3.02344 4.45448C2.80078 4.70058 2.78906 5.00527 2.97656 5.29823L3.70312 6.44667C3.375 6.91542 3.09375 7.41933 2.84766 7.92323L1.5 7.87636C1.14844 7.85292 0.902344 8.0287 0.785156 8.34511C0.65625 8.66152 0.75 8.95448 1.01953 9.1537L2.09766 9.98573C1.95703 10.5365 1.85156 11.099 1.80469 11.685L0.503906 12.0951C0.175781 12.1889 0 12.435 0 12.7748C0 13.1146 0.175781 13.349 0.503906 13.4545L1.80469 13.8646C1.85156 14.4506 1.95703 15.0131 2.09766 15.5639L1.01953 16.3959C0.75 16.5951 0.679688 16.8881 0.773438 17.2045C0.902344 17.5326 1.14844 17.685 1.48828 17.6732L2.84766 17.6264C3.09375 18.142 3.375 18.6342 3.70312 19.1146L2.97656 20.2514C2.78906 20.5443 2.82422 20.849 3.02344 21.0951C3.25781 21.3646 3.55078 21.4232 3.85547 21.306L5.10938 20.7787C5.51953 21.1889 5.96484 21.5521 6.42188 21.892L6.14062 23.2162C6.07031 23.5443 6.1875 23.8256 6.46875 23.9896C6.77344 24.1654 7.07812 24.1303 7.3125 23.8959L8.33203 22.9818C8.84766 23.2279 9.38672 23.4154 9.9375 23.5678L10.125 24.9154C10.1719 25.2553 10.3828 25.4662 10.6992 25.5365C11.0391 25.5951 11.2969 25.4545 11.4609 25.1498L12.0938 23.9428C12.3867 23.9662 12.668 23.9779 12.9492 23.9779ZM12.9492 22.0326C7.83984 22.0326 3.69141 17.8842 3.69141 12.7748C3.69141 7.6537 7.83984 3.51698 12.9492 3.51698C18.0703 3.51698 22.207 7.6537 22.207 12.7748C22.207 17.8842 18.0703 22.0326 12.9492 22.0326ZM10.9102 10.9818L12.293 10.1029L8.37891 3.38808L6.9375 4.19667ZM15.5625 13.5717L23.3555 13.571
17L23.3555 11.9545L15.5625 11.9545ZM12.3164 15.4818L10.9453 14.5912L6.82031 21.3178L8.25 22.1615ZM12.9609 15.8451C14.6602 15.8451 16.0312 14.474 16.0312 12.7748C16.0312 11.0756 14.6602 9.70448 12.9609 9.70448C11.2617 9.70448 9.89062 11.0756 9.89062 12.7748C9.89062 14.474 11.2617 15.8451 12.9609 15.8451ZM12.9609 14.0873C12.2344 14.0873 11.6484 13.5014 11.6484 12.7748C11.6484 12.0482 12.2344 11.4623 12.9609 11.4623C13.6875 11.4623 14.2734 12.0482 14.2734 12.7748C14.2734 13.5014 13.6875 14.0873 12.9609 14.0873Z",fill:"currentColor","fill-opacity":"0.85"})])],-1)])])}const st=X(fa,[["render",xa]]),ba={name:"SFGift"},ha={class:"sf-seede-icon"};function va(c,s,p,h,k,b){return t(),l("i",ha,[...s[0]||(s[0]=[e("svg",{width:"0.8841em",height:"1em",viewBox:"0 0 22.8867 25.8867",fill:"currentColor","aria-label":"gift"},[e("g",null,[e("rect",{height:"25.8867",opacity:"0",width:"22.8867",x:"0",y:"0"}),e("path",{d:"M5.10938 24.5625L17.4258 24.5625C19.6289 24.5625 20.8477 23.4023 20.8477 21.1875L20.8477 13.9922L20.9297 13.9922C21.9609 13.7695 22.5352 12.9375 22.5352 11.7422L22.5352 8.66016C22.5352 7.23047 21.7383 6.32812 20.3086 6.32812L17.9414 6.32812C18.5625 5.70703 18.9258 4.86328 18.9258 3.89062C18.9258 1.61719 17.1328 0 14.8594 0C13.2188 0 11.8594 0.902344 11.2617 2.47266C10.6641 0.902344 9.31641 0 7.66406 0C5.40234 0 3.59766 1.61719 3.59766 3.89062C3.59766 4.86328 3.96094 5.70703 4.59375 6.32812L2.22656 6.32812C0.855469 6.32812 0 7.23047 0 8.66016L0 11.7422C0 12.9375 0.5625 13.7695 1.59375 13.9922L1.67578 13.9922L1.67578 21.1875C1.67578 23.4023 2.89453 24.5625 5.10938 24.5625ZM10.2188 22.8047L5.08594 22.8047C4.11328 22.8047 3.5625 22.2539 3.5625 21.2812L3.5625 14.0742L10.2188 14.0742ZM12.3047 22.8047L12.3047 14.0742L18.9609 14.0742L18.9609 21.2812C18.9609 22.2539 18.4102 22.8047 17.4375 22.8047ZM10.2188 12.3047L2.70703 12.3047C2.12109 12.3047 1.88672 12.0586 1.88672 11.4727L1.88672 8.91797C1.88672 8.33203 2.12109 8.09766 2.70703 8.09766L10.2188 8.09766ZM12.3047 12.3047L12.3047 8.09766L19.8398 8.09766C20.4258 8.09766 20.6484 8.33203 20.6484 8.91797L20.6484 11.4727C20.6484 12.0586 20.4258 12.3047 19.8398 12.3047ZM10.3008 6.32812L8.47266 6.32812C6.63281 6.32812 5.55469 5.28516 5.55469 3.99609C5.55469 2.70703 6.49219 1.95703 7.78125 1.95703C9.17578 1.95703 10.3008 3.01172 10.3008 4.74609ZM12.2227 6.32812L12.2227 4.74609C12.2227 3.01172 13.3477 1.95703 14.7422 1.95703C16.0312 1.95703 16.9688 2.70703 16.9688 3.99609C16.9688 5.28516 15.9023 6.32812 14.0508 6.32812Z",fill:"currentColor","fill-opacity":"0.85"})])],-1)])])}const ka=X(ba,[["render",va]]),ga={name:"SFHeartTextSquare"},ya={class:"sf-seede-icon"};function wa(c,s,p,h,k,b){return t(),l("i",ya,[...s[0]||(s[0]=[be('<svg width="1em" height="1.0163em" viewBox="0 0 21.9258 21.5742" fill="currentColor" aria-label="heart text square"><g><rect height="21.5742" opacity="0" width="21.9258" x="0" y="0"></rect><path d="M3.67969 21.5742L17.8945 21.5742C20.3555 21.5742 21.5742 20.3672 21.5742 17.9531L21.5742 3.63281C21.5742 1.21875 20.3555 0 17.8945 0L3.67969 0C1.23047 0 0 1.21875 0 3.63281L0 17.9531C0 20.3672 1.23047 21.5742 3.67969 21.5742ZM3.70312 19.6875C2.53125 19.6875 1.88672 19.0664 1.88672 17.8477L1.88672 3.73828C1.88672 2.51953 2.53125 1.88672 3.70312 1.88672L17.8711 1.88672C19.0312 1.88672 19.6875 2.51953 19.6875 3.73828L19.6875 17.8477C19.6875 19.0664 19.0312 19.6875 17.8711 19.6875Z" fill="currentColor" fill-opacity="0.85"></path><path d="M5.89453 3.86719C4.93359 3.86719 4.21875 4.61719 4.21875 5.64844C4.21875 7.17188 5.85938 8.50781 7.01953 9.31641C7.13672 9.39844 7.25391 9.45703 7.32422 9.45703C7.40625 9.45703 7.5 9.38672 7.60547 9.31641C8.78906 8.58984 10.3945 7.17188 10.3945 5.64844C10.3945 4.61719 9.67969 3.86719 8.69531 3.86719C8.09766 3.86719 7.59375 4.23047 7.3125 4.76953C7.01953 4.23047 6.53906 3.86719 5.89453 3.86719Z" fill="currentColor" fill-opacity="0.85"></path><path d="M4.95703 13.125L16.5 13.125C16.9102 13.125 17.2266 12.8086 17.2266 12.3984C17.2266 12 16.9102 11.6836 16.5 11.6836L4.95703 11.6836C4.53516 11.6836 4.21875 12 4.21875 12.3984C4.21875 12.8086 4.53516 13.125 4.95703 13.125Z" fill="currentColor" fill-opacity="0.85"></path><path d="M4.95703 17.1328L13.418 17.1328C13.8281 17.1328 14.1445 16.8164 14.1445 16.418C14.1445 16.0078 13.8281 15.6914 13.418 15.6914L4.95703 15.6914C4.53516 15.6914 4.21875 16.0078 4.21875 16.418C4.21875 16.8164 4.53516 17.1328 4.95703 17.1328Z" fill="currentColor" fill-opacity="0.85"></path></g></svg>',1)])])}const Ca=X(ga,[["render",wa]]),_a={name:"SFHouse"},$a={class:"sf-seede-icon"};function La(c,s,p,h,k,b){return t(),l("i",$a,[...s[0]||(s[0]=[e("svg",{width:"1em",height:"1.1487em",viewBox:"0 0 28.3359 24.668",fill:"
1currentColor","aria-label":"house"},[e("g",null,[e("rect",{height:"24.668",opacity:"0",width:"28.3359",x:"0",y:"0"}),e("path",{d:"M10.5938 23.4375L17.3906 23.4375L17.3906 15.8672C17.3906 15.3281 17.0391 14.9766 16.5 14.9766L11.4961 14.9766C10.957 14.9766 10.5938 15.3281 10.5938 15.8672ZM1.00781 12.5156C1.33594 12.5156 1.60547 12.3398 1.85156 12.1406L13.582 2.28516C13.7109 2.17969 13.8633 2.12109 13.9922 2.12109C14.1328 2.12109 14.2734 2.17969 14.4023 2.28516L26.1445 12.1406C26.3789 12.3398 26.6484 12.5156 26.9766 12.5156C27.6094 12.5156 27.9844 12.0586 27.9844 11.5781C27.9844 11.3086 27.8789 11.0273 27.6094 10.8164L15.3984 0.5625C14.9531 0.1875 14.4727 0 13.9922 0C13.5117 0 13.0312 0.1875 12.5859 0.5625L0.375 10.8164C0.117188 11.0273 0 11.3086 0 11.5781C0 12.0586 0.375 12.5156 1.00781 12.5156ZM21.6211 6.29297L24.5625 8.77734L24.5625 3.49219C24.5625 2.97656 24.2344 2.64844 23.7188 2.64844L22.4648 2.64844C21.9609 2.64844 21.6211 2.97656 21.6211 3.49219ZM6.07031 24.6445L21.9258 24.6445C23.5898 24.6445 24.5625 23.6953 24.5625 22.0547L24.5625 9.07031L22.6758 7.79297L22.6758 21.5859C22.6758 22.3477 22.2656 22.7578 21.5273 22.7578L6.46875 22.7578C5.71875 22.7578 5.30859 22.3477 5.30859 21.5859L5.30859 7.80469L3.42188 9.07031L3.42188 22.0547C3.42188 23.707 4.39453 24.6445 6.07031 24.6445Z",fill:"currentColor","fill-opacity":"0.85"})])],-1)])])}const Ma=X(_a,[["render",La]]),Pa={name:"SFLink"},Sa={class:"sf-seede-icon"};function ja(c,s,p,h,k,b){return t(),l("i",Sa,[...s[0]||(s[0]=[e("svg",{width:"1em",height:"1.0040em",viewBox:"0 0 25.2041 25.1045",fill:"currentColor","aria-label":"link"},[e("g",null,[e("rect",{height:"25.1045",opacity:"0",width:"25.2041",x:"0",y:"0"}),e("path",{d:"M12.5728 7.62451L11.0142 9.20655C12.561 9.33545 13.5688 9.79248 14.3306 10.5542C16.3813 12.605 16.3696 15.5112 14.3423 17.5386L10.5103 21.3589C8.47119 23.398 5.58838 23.4097 3.5376 21.3706C1.48682 19.3081 1.49854 16.4253 3.5376 14.3862L5.83447 12.0894C5.50635 11.3511 5.42432 10.4722 5.55322 9.71045L2.10791 13.144C-0.692869 15.9565-0.716306 19.9409 2.11963 22.7769C4.96729 25.6245 8.95166 25.6011 11.7524 22.8003L15.7603 18.7808C18.5728 15.9683 18.5962 11.9839 15.7485 9.14795C15.0103 8.40967 14.0728 7.88233 12.5728 7.62451ZM12.2798 17.2808L13.8384 15.6987C12.2915 15.5815 11.2837 15.1128 10.522 14.3511C8.47119 12.3003 8.48291 9.39405 10.5103 7.3667L14.3306 3.54639C16.3813 1.50733 19.2642 1.49561 21.3149 3.54639C23.3657 5.59717 23.3423 8.4917 21.3149 10.519L19.0181 12.8159C19.3462 13.5659 19.4165 14.4331 19.2993 15.1948L22.7446 11.7612C25.5454 8.94873 25.5688 4.97608 22.7329 2.12842C19.8853-0.719236 15.9009-0.695799 13.0884 2.1167L9.09229 6.12451C6.27979 8.93701 6.25635 12.9214 9.10401 15.7573C9.84229 16.4956 10.7798 17.023 12.2798 17.2808Z",fill:"currentColor","fill-opacity":"0.85"})])],-1)])])}const Da=X(Pa,[["render",ja]]),Aa={name:"SFPhotoStack"},Ua={class:"sf-seede-icon"};function Ba(c,s,p,h,k,b){return t(),l("i",Ua,[...s[0]||(s[0]=[be('<svg width="0.9660em" height="1em" viewBox="0 0 28.6758 29.6836" fill="currentColor" aria-label="photo stack"><g><rect height="29.6836" opacity="0" width="28.6758" x="0" y="0"></rect><path d="M21.5576 3.35156L6.76658 3.35156C6.81468 2.39915 7.41573 1.85156 8.41406 1.85156L19.9102 1.85156C20.9085 1.85156 21.5095 2.39915 21.5576 3.35156Z" fill="currentColor" fill-opacity="0.85"></path><path d="M23.9548 6.699C23.5779 6.63908 23.1781 6.60938 22.7578 6.60938L5.56641 6.60938C5.14621 6.60938 4.74653 6.63907 4.36974 6.69896C4.49733 5.57312 5.25916 4.94531 6.50391 4.94531L21.832 4.94531C23.0768 4.94531 23.829 5.57313 23.9548 6.699Z" fill="currentColor" fill-opacity="0.85"></path><path d="M5.73047 27.4688L22.6172 27.4688C24.8203 27.4688 25.9805 26.3438 25.9805 24.1406L25.9805 23.332L20.1328 17.8008C19.6523 17.3438 19.043 17.1211 18.4336 17.1211C17.8008 17.1211 17.25 17.3203 16.7344 17.7891L11.625 22.2891L9.59766 20.4727C9.11719 20.0391 8.61328 19.8164 8.0625 19.8164C7.55859 19.8164 7.10156 20.0508 6.62109 20.4609L2.36719 24.1406C2.36719 26.3438 3.52734 27.4688 5.73047 27.4688ZM5.56641 27.7969L22.7578 27.7969C25.207 27.7969 26.4375 26.5781 26.4375 24.1641L26.4375 12.1289C26.4375 9.71484 25.207 8.49609 22.7578 8.49609L5.56641 8.49609C3.11719 8.49609 1.88672 9.71484 1.88672 12.1289L1.88672 24.1641C1.88672 26.5781 3.11719 27.7969 5.56641 27.7969ZM5.60156 25.9102C4.42969 25.9102 3.77344 25.2773 3.77344 24.0586L3.77344 12.2344C3.77344 11.0156 4.42969 10.3828 5.60156 10.3828L22.7344 10.3828C23.8828 10.3828 24.5508 11.0156 24.5508 12.2344L24.5508 24.0586C24.5508 25.2773 23.8828 25.9102 22.7344 25.9102Z" fill="currentColor" fill-opacity="0.85"></path><path d="M10.7227 18.082C12.1992 18.082 13.3945 16.8516 13.3945 15.3867C13.3945 13.9219 12.1992 12.7148 10.7227 12.7148C9.23438 12.7148 8.03906 13.9219 8.03906 15.3867C8.03906 16.8516 9.23438 18.082 10.7227 18.082Z" fill="currentColor" fill-opacity="0.85"></path></g></svg>',1)])])}const Ia=X(Aa,[["render",Ba]]),Fa={name:"SFPlus"},Ea={class:"sf-seede-icon"};function Ra(c,s,p,h,k,b){return t(),l("i",Ea,[...s[0]||(s[0]=[e("svg",{width:"1em",height:"1.0176em",viewBox:"0 0 19.6875 19.3477",fill:"currentColor","aria-label":"plus"}
1,[e("g",null,[e("rect",{height:"19.3477",opacity:"0",width:"19.6875",x:"0",y:"0"}),e("path",{d:"M10.7227 18.293L10.7227 1.04297C10.7227 0.480469 10.2422 0 9.66797 0C9.09375 0 8.625 0.480469 8.625 1.04297L8.625 18.293C8.625 18.8555 9.09375 19.3359 9.66797 19.3359C10.2422 19.3359 10.7227 18.8555 10.7227 18.293ZM1.04297 10.7109L18.293 10.7109C18.8555 10.7109 19.3359 10.2422 19.3359 9.66797C19.3359 9.09375 18.8555 8.61328 18.293 8.61328L1.04297 8.61328C0.480469 8.61328 0 9.09375 0 9.66797C0 10.2422 0.480469 10.7109 1.04297 10.7109Z",fill:"currentColor","fill-opacity":"0.85"})])],-1)])])}const Za=X(Fa,[["render",Ra]]),Ta={name:"SFPower"},Va={class:"sf-seede-icon"};function Na(c,s,p,h,k,b){return t(),l("i",Va,[...s[0]||(s[0]=[e("svg",{width:"0.9597em",height:"1em",viewBox:"0 0 24.2578 25.2773",fill:"currentColor","aria-label":"power"},[e("g",null,[e("rect",{height:"25.2773",opacity:"0",width:"24.2578",x:"0",y:"0"}),e("path",{d:"M11.9531 24.5859C18.5508 24.5859 23.9062 19.2305 23.9062 12.6328C23.9062 8.92969 22.2891 5.89453 20.0273 3.84375C18.9961 2.89453 17.6602 4.32422 18.6914 5.28516C20.6836 7.11328 21.9141 9.71484 21.9141 12.6328C21.9141 18.1406 17.4609 22.5938 11.9531 22.5938C6.44531 22.5938 1.99219 18.1406 1.99219 12.6328C1.99219 9.69141 3.23438 7.10156 5.21484 5.27344C6.25781 4.30078 4.93359 2.92969 3.89062 3.85547C1.60547 5.85938 0 9.03516 0 12.6328C0 19.2305 5.35547 24.5859 11.9531 24.5859ZM11.9531 12.5156C12.5156 12.5156 12.9023 12.1055 12.9023 11.5195L12.9023 0.996094C12.9023 0.398438 12.5156 0 11.9531 0C11.3906 0 11.0156 0.398438 11.0156 0.996094L11.0156 11.5195C11.0156 12.1055 11.3906 12.5156 11.9531 12.5156Z",fill:"currentColor","fill-opacity":"0.85"})])],-1)])])}const Oa=X(Ta,[["render",Na]]),za={name:"SFStar"},qa={class:"sf-seede-icon"};function Ha(c,s,p,h,k,b){return t(),l("i",qa,[...s[0]||(s[0]=[e("svg",{width:"0.9939em",height:"1em",viewBox:"0 0 26.3812 26.543",fill:"
1currentColor","aria-label":"star"},[e("g",null,[e("rect",{height:"26.543",opacity:"0",width:"26.3812",x:"0",y:"0"}),e("path",{d:"M4.99331 24.6562C5.47378 25.0312 6.08316 24.9023 6.80972 24.375L13.0089 19.8164L19.2199 24.375C19.9464 24.9023 20.5441 25.0312 21.0363 24.6562C21.5168 24.293 21.6222 23.6953 21.3293 22.8398L18.88 15.5508L25.1378 11.0508C25.8644 10.5352 26.1574 9.99609 25.9699 9.41016C25.7824 8.84766 25.2316 8.56641 24.3293 8.57812L16.6535 8.625L14.3214 1.30078C14.0402 0.433594 13.6183 0 13.0089 0C12.4113 0 11.9894 0.433594 11.7082 1.30078L9.37613 8.625L1.70035 8.57812C0.798001 8.56641 0.24722 8.84766 0.0597201 9.41016C-0.139499 9.99609 0.165189 10.5352 0.891751 11.0508L7.14956 15.5508L4.70035 22.8398C4.40738 23.6953 4.51285 24.293 4.99331 24.6562ZM6.68081 22.3359C6.65738 22.3125 6.6691 22.3008 6.68081 22.2305L9.01285 15.5273C9.17691 15.0703 9.08316 14.707 8.673 14.4258L2.83706 10.3945C2.77847 10.3594 2.76675 10.3359 2.77847 10.3008C2.79019 10.2656 2.81363 10.2656 2.88394 10.2656L9.97378 10.3945C10.4543 10.4062 10.7589 10.207 10.9113 9.72656L12.9503 2.94141C12.9621 2.87109 12.9855 2.84766 13.0089 2.84766C13.0441 2.84766 13.0675 2.87109 13.0793 2.94141L15.1183 9.72656C15.2707 10.207 15.5753 10.4062 16.0558 10.3945L23.1457 10.2656C23.216 10.2656 23.2394 10.2656 23.2511 10.3008C23.2628 10.3359 23.2394 10.3594 23.1925 10.3945L17.3566 14.4258C16.9464 14.707 16.8527 15.0703 17.0168 15.5273L19.3488 22.2305C19.3605 22.3008 19.3722 22.3125 19.3488 22.3359C19.3253 22.3711 19.2902 22.3477 19.2433 22.3125L13.6066 18.0117C13.2316 17.7188 12.798 17.7188 12.423 18.0117L6.78628 22.3125C6.73941 22.3477 6.70425 22.3711 6.68081 22.3359Z",fill:"currentColor","fill-opacity":"0.85"})])],-1)])])}const Ga=X(za,[["render",Ha]]),Ya={name:"SFWandAndRays"},Wa={class:"sf-seede-icon"};function Ka(c,s,p,h,k,b){return t(),l("i",Wa,[...s[0]||(s[0]=[be('<svg width="1em" height="1.0103em" viewBox="0 0 25.3242 25.0664" fill="currentColor" aria-label="wand and rays"><g><rect height="25.0664" opacity="0" width="25.3242" x="0" y="0"></rect><path d="M21.9492 23.918C22.4883 24.4453 23.332 24.4453 23.8125 23.918C24.3164 23.3906 24.3398 22.5938 23.8008 22.0664L12.6328 10.8867C12.1055 10.3711 11.2617 10.3711 10.7695 10.8867C10.2656 11.4141 10.2539 12.2227 10.7812 12.75ZM15.0117 15.7031L11.5195 12.1992C11.3555 12.0352 11.3555 11.7891 11.5195 11.625C11.6719 11.4727 11.9297 11.4609 12.0938 11.625L15.5977 15.1289Z" fill="currentColor" fill-opacity="0.85"></path><path d="M23.9414 13.5C24.5039 13.5 24.9727 13.0312 24.9727 12.4805C24.9727 11.9297 24.5039 11.4609 23.9414 11.4609L20.332 11.4609C19.7812 11.4609 19.3125 11.9297 19.3125 12.4805C19.3125 13.0312 19.7812 13.5 20.332 13.5Z" fill="currentColor" fill-opacity="0.85"></path><path d="M17.2852 6.24609C16.8867 6.63281 16.8867 7.28906 17.2852 7.6875C17.6719 8.07422 18.3398 8.07422 18.7383 7.6875L21.2812 5.13281C21.6797 4.73438 21.6797 4.07812 21.2812 3.67969C20.8945 3.29297 20.2383 3.29297 19.8516 3.67969Z" fill="currentColor" fill-opacity="0.85"></path><path d="M13.5117 1.01953C13.5117 0.46875 13.043 0 12.4805 0C11.9297 0 11.4609 0.46875 11.4609 1.01953L11.4609 4.62891C11.4609 5.19141 11.9297 5.66016 12.4805 5.66016C13.043 5.66016 13.5117 5.19141 13.5117 4.62891Z" fill="currentColor" fill-opacity="0.85"></path><path d="M6.23438 7.6875C6.62109 8.07422 7.27734 8.07422 7.67578 7.6875C8.0625 7.28906 8.0625 6.63281 7.67578 6.24609L5.13281 3.69141C4.74609 3.30469 4.08984 3.29297 3.69141 3.67969C3.30469 4.06641 3.30469 4.72266 3.69141 5.12109Z" fill="currentColor" fill-opacity="0.85"></path><path d="M1.01953 11.4609C0.46875 11.4609 0 11.9297 0 12.4805C0 13.0312 0.46875 13.5 1.01953 13.5L4.65234 13.5C5.20312 13.5 5.67188 13.0312 5.67188 12.4805C5.67188 11.9297 5.20312 11.4609 4.65234 11.4609Z" fill="currentColor" fill-opacity="0.85"></path><path d="M3.67969 19.8281C3.29297 20.2148 3.29297 20.8828 3.66797 21.2695C4.05469 21.6562 4.72266 21.668 5.12109 21.2812L7.67578 18.7266C8.0625 18.3398 8.0625 17.6836 7.67578 17.2969C7.30078 16.8984 6.62109 16.8984 6.23438 17.2969Z" fill="currentColor" fill-opacity="0.85"></path><path d="M13.5117 20.3438C13.5117 19.7812 13.043 19.3125 12.4805 19.3125C11.9297 19.3125 11.4609 19.7812 11.4609 20.3438L11.4609 23.9531C11.4609 24.5039 11.9297 24.9727 12.4805 24.9727C13.043 24.9727 13.5117 24.5039 13.5117 23.9531Z" fill="currentColor" fill-opacity="0.85"></path></g></svg>',1)])])}const Ja=X(Ya,[["render",Ka]]),Qa={name:"SFWandAndSparkles"},Xa={class:"sf-seede-icon"};function el(c,s,p,h,k,b){return t(),l("i",Xa,[...s[0]||(s[0]=[e("svg",{width:"0.9972em",he
1ight:"1em",viewBox:"0 0 24.6914 24.7617",fill:"currentColor","aria-label":"wand and sparkles"},[e("g",null,[e("rect",{height:"24.7617",opacity:"0",width:"24.6914",x:"0",y:"0"}),e("path",{d:"M16.3945 8.48438C16.5586 8.48438 16.6875 8.36719 16.7227 8.19141C17.2383 5.55469 17.5898 4.98047 20.3203 4.58203C20.5078 4.55859 20.625 4.41797 20.625 4.25391C20.625 4.06641 20.5078 3.92578 20.3203 3.90234C17.5898 3.50391 17.1211 2.87109 16.7227 0.316406C16.6875 0.117188 16.5586 0 16.3945 0C16.207 0 16.0781 0.117188 16.043 0.304688C15.5273 2.91797 15.1758 3.50391 12.457 3.90234C12.2578 3.92578 12.1406 4.06641 12.1406 4.25391C12.1406 4.41797 12.2578 4.54688 12.457 4.58203C15.1758 4.98047 15.6328 5.55469 16.043 8.17969C16.0664 8.36719 16.1836 8.48438 16.3945 8.48438ZM3.32812 18.0938C3.50391 18.0938 3.62109 17.9766 3.64453 17.8125C3.99609 15.6094 3.99609 15.4453 6.38672 15.0703C6.55078 15.0469 6.66797 14.9414 6.66797 14.7656C6.66797 14.5898 6.55078 14.4844 6.38672 14.4609C3.99609 14.0859 3.99609 13.9219 3.64453 11.7188C3.62109 11.5547 3.50391 11.4375 3.32812 11.4375C3.16406 11.4375 3.04688 11.5547 3.02344 11.7188C2.67188 13.9219 2.67188 14.0859 0.28125 14.4609C0.117188 14.4844 0 14.5898 0 14.7656C0 14.9414 0.117188 15.0469 0.28125 15.0703C2.67188 15.4453 2.67188 15.6094 3.02344 17.8125C3.04688 17.9766 3.16406 18.0938 3.32812 18.0938ZM7.24219 21.3984C7.38281 21.3984 7.47656 21.293 7.51172 21.1523C7.72266 19.8516 7.66406 19.793 9.15234 19.5234C9.29297 19.4883 9.38672 19.3828 9.38672 19.2539C9.38672 19.125 9.29297 19.0078 9.15234 18.9844C7.67578 18.7148 7.74609 18.6797 7.51172 17.3438C7.47656 17.2148 7.37109 17.1094 7.24219 17.1094C7.10156 17.1094 7.00781 17.2148 6.97266 17.3672C6.69141 18.6797 6.80859 18.75 5.34375 18.9844C5.19141 19.0078 5.09766 19.1133 5.09766 19.2539C5.09766 19.3828 5.19141 19.4883 5.33203 19.5234C6.80859 19.793 6.69141 19.8516 6.97266 21.1523C7.00781 21.293 7.10156 21.3984 7.24219 21.3984Z",fill:"currentColor","fill-opacity":"0.85"}),e("path",{d:"M20.7422 22.7109C21.2578 23.2383 22.1133 23.2266 22.6055 22.7109C23.1094 22.1836 23.1094 21.3867 22.5938 20.8477L7.61719 5.87109C7.10156 5.34375 6.24609 5.34375 5.75391 5.87109C5.25 6.39844 5.25 7.19531 5.76562 7.72266ZM10.5938 11.2852L6.5625 7.24219C6.39844 7.07812 6.39844 6.83203 6.5625 6.66797C6.71484 6.51562 6.97266 6.50391 7.13672 6.66797L11.1797 10.7227Z",fill:"currentColor","fill-opacity":"0.85"})])],-1)])])}const Re=X(Qa,[["render",el]]),tl={key:0,class:"fixed inset-0 z-50 flex items-center justify-center"},al={class:"relative p-0 gap-0 bg-white/95 backdrop-blur-[60px] overflow-hidden w-[calc(100%-2rem)] max-w-[1280px] h-[80vh] rounded-[24px]"},ll={class:"flex h-full min-h-0"},sl={class:"w-56 shrink-0 p-2"},nl={class:"space-y-1"},ol=["onClick"],rl={class:"flex-1 h-full min-h-0 overflow-y-auto settings-scrollbar"},il={key:0,class:"p-8 w-full max-w-[720px] mx-auto"},cl={class:"space-y-8"},dl={class:"rounded-2xl overflow-hidden bg-black/[0.03]"},ul={class:"px-4 py-4 flex items-center justify-between hover:bg-black/5 transition-colors"},pl={class:"flex items-center gap-4"},fl={class:"relative group"},ml={class:"w-12 h-12 rounded-full bg-[#3C31FF] flex items-center justify-center text-white text-base font-normal overflow-hidden"},xl=["src"],bl={for:"avatar-upload-modal",class:"absolute inset-0 flex items-center justify-center bg-black/40 rounded-full opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer"},hl={key:0},vl={key:1},kl=["disabled"],gl={class:"px-4 py-4 flex items-center justify-between border-t border-black/5 hover:bg-black/5 transition-colors"},yl={class:"flex-1 min-w-0 mr-4"},wl=["disabled"],Cl={key:0},_l={key:1},$l={class:"px-4 py-4 flex items-center justify-between border-t border-black/5"},Ll={class:"flex-1 min-w-0"},Ml={class:"text-sm text-black/30"},Pl={key:0,class:"px-4 py-4 flex items-center justify-between border-t border-black/5 hover:bg-black/5 transition-colors"},Sl={class:"flex-1 min-w-0"},jl={class:"text-sm text-black/30"},Dl={key:1,class:"text-sm text-black/30"},Al={class:"rounded-2xl overflow-hidden bg-black/[0.03]"},Ul={class:"px-4 py-4 flex items-center justify-between hover:bg-black/5 transition-colors"},Bl={key:0},Il={class:"rounded-2xl overflow-hidden bg-black/[0.03]"},Fl={class:"px-4 py-4 flex items-center justify-between gap-4 hover:bg-black/5 transition-colors"},El={class:"flex-1 min-w-0 flex justify-end"},Rl=["value"],Zl={key:1,class:"p-8 w-full max-w-[800px] mx-auto"},Tl={class:"rounded-[24px] p-6 mb-4",style:{background:"rgba(255, 255, 255, 0.6)","box-shadow":"inset 0px 1px 1px rgba(255, 255, 255, 0.3)"}},Vl={class:"flex flex-col md:flex-row items-center gap-12"},Nl={class:"flex-shrink-0 flex items-center justify-center"},Ol={class:"flex-1 space-y-3 w-full"},zl=["disabled"],ql=["disabled"],Hl={key:0,class:"w-4 h-4 mr-2 animate-spin inline-block",fill:"none",viewBox:"0 0 24 24"},Gl={class:"rounded-xl p-3 flex items-center justify-between",style:{background:"rgba(0, 0, 0, 0.03)"}},Yl={class:"text-2xl font-light text-black/80 tracking-tight"},Wl={key:0,class:"fixed inset-0 z-[60] flex items-center justify-center"},Kl={class:"relative bg-white rounded-[24px] p-6 w-full max-w-md mx-4"},Jl={class:"space-y-2 py-4"},Ql=["disabled"],Xl={key:0},es={key:1},ts={key:2},as={class:"flex justify-end gap-2 mt-4"},ls=["disabled"],ss={key:0},ns={key:1},Le="border border-solid border-black/[0.02] dark:border-white/[0.02] bg-black/5 dark:bg-white/5 rounded-lg shadow-none placeholder:text-black/30 dark:placeholder:text-white/30 focus:ring-0 focus-visible:ring-0 focus:outline-none focus-visible:outline-none",os=Ne({__name:"SettingsModalBase",props:{open:{type:Boolean},user:{},usage:{},savingProfile:{type:Boolean,default:!1},uploadingAvatar:{type:Boolean,default:!1},redeemLoading:{type:Boolean,default:!1},showPhoneBinding:{type:Boolean,default:!0},sendingCode:{type:Boolean,default:!1},bindingPhone:{type:Boolean,default:!1},codeCountdown:{default:0},codeSent:{type:Boolean,default:!1},languages:{},currentLanguage:{}},emits:["update:open","save-profile","upload-avatar","redeem-code","go-reset-password","change-language","send-phone-code","bind-phone","close-phone-dialog","open-phone-dialog"],setup(c,{emit:s}){const p=c,h=s,k=I({get:()=>
1p.open,set:M=>h("update:open",M)}),b=y("account"),g=[{id:"account",label:"Account Settings",icon:"gear"},{id:"redeem",label:"Redeem Code",icon:"gift"}],_=y({name:"",email:"",phone:"",avatar:""}),w=y(null),S=I(()=>w.value?w.value:ye(p.user)),L=I(()=>p.usage?.remaining??0),d=y(p.currentLanguage||"en");ee(()=>p.currentLanguage,M=>{M&&(d.value=M)},{immediate:!0}),ee(d,M=>{h("change-language",M)});const u=y(!1),$=y({phone:"",country_code:"+86",code:""}),F=y("");function N(M){_.value={name:M?.name||"",email:M?.email||"",avatar:M?.avatar||"",phone:M?.phone||""},w.value=null}ee(()=>p.user,N,{immediate:!0}),ee(()=>p.open,M=>{M&&N(p.user)});function H(M){const n=M.target.files?.[0];if(!n||n.size>5*1024*1024)return;const i=new FileReader;i.onload=G=>{w.value=G.target?.result},i.readAsDataURL(n),h("upload-avatar",n)}function C(){h("save-profile",{name:_.value.name})}function D(){$.value={phone:"",country_code:"+86",code:""},u.value=!0,h("open-phone-dialog")}function m(){u.value=!1,h("close-phone-dialog")}function P(){h("send-phone-code",{phone:$.value.phone,country_code:$.value.country_code})}function Z(){h("bind-phone",{phone:$.value.phone,country_code:$.value.country_code,code:$.value.code})}ee(()=>p.user?.phone,(M,a)=>{M&&!a&&(u.value=!1)});function f(){F.value.trim()&&h("redeem-code",F.value.trim())}function o(M){M.key==="Enter"&&f()}ee(()=>p.redeemLoading,(M,a)=>{a&&!M&&(F.value="")});function U(){h("go-reset-password")}return(M,a)=>(t(),l(W,null,[ie(M.$slots,"dialog",{isOpen:k.value,onClose:()=>k.value=!1},()=>[(t(),R(Ce,{to:"body"},[k.value?(t(),l("div",tl,[e("div",{class:"fixed inset-0 bg-black/50",onClick:a[0]||(a[0]=n=>k.value=!1)}),e("div",al,[e("div",ll,[e("div",sl,[a[8]||(a[8]=e("div",{class:"mb-2"},[e("h2",{class:"text-lg font-normal text-black/80 px-4 py-2"},"Settings")],-1)),e("nav",nl,[(t(),l(W,null,te(g,n=>e("button",{key:n.id,onClick:i=>b.value=n.id,class:B(["w-full flex items-center gap-3 px-3 py-2.5 rounded-xl text-sm font-normal transition-all duration-200",b.value===n.id?"bg-black/5 text-black":"text-black/60 hover:bg-black/[0.03] hover:text-black/80"])},[ie(M.$slots,`tab-icon-${n.icon}`,{},()=>[n.icon==="gear"?(t(),R(r(st),{key:0,class:"shrink-0 text-[18px]"})):A("",!0),n.icon==="gift"?(t(),R(r(ka),{key:1,class:"shrink-0 text-[18px]"})):A("",!0)],!0),e("span",null,v(n.label),1)],10,ol)),64))])]),e("div",rl,[b.value==="account"?(t(),l("div",il,[a[20]||(a[20]=e("h3",{class:"text-xl font-normal text-black/80 mb-8 px-4"},"Account Settings",-1)),e("div",cl,[e("section",null,[a[15]||(a[15]=e("h4",{class:"text-sm font-normal text-black/50 mb-4 px-4"},"Profile",-1)),e("div",dl,[e("div",ul,[e("div",pl,[e("div",fl,[e("div",ml,[e("img",{src:S.value,alt:"Avatar",class:"w-full h-full object-cover"},null,8,xl)]),e("label",bl,[a[9]||(a[9]=e("svg",{class:"w-5 h-5 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})],-1)),e("input",{id:"avatar-upload-modal",type:"file",accept:".jpg,.jpeg,.png,.webp",class:"hidden",onChange:H},null,32)])]),a[10]||(a[10]=e("div",null,[e("div",{class:"text-sm font-normal text-black/90"},"Avatar"),e("div",{class:"text-xs text-black/50 mt-0.5"}," JPG, PNG or WebP. Max 5MB. ")],-1))]),e("label",{for:"avatar-upload-btn-modal",class:B(["inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-black/70 bg-transparent border border-black/10 rounded-full hover:bg-black/5 transition-colors cursor-pointer",{"opacity-50 cursor-not-allowed":c.uploadingAvatar}])},[c.uploadingAvatar?(t(),l("span",hl,"Uploading...")):(t(),l("span",vl,"Change")),e("input",{id:"avatar-upload-btn-modal",type:"file",accept:".jpg,.jpeg,.png,.webp",class:"hidden",disabled:c.uploadingAvatar,onChange:H},null,40,kl)],2)]),e("div",gl,[e("div",yl,[a[11]||(a[11]=e("label",{class:"text-sm font-normal text-black/90 block mb-1"},"Name",-1)),J(e("input",{"onUpdate:modelValue":a[1]||(a[1]=n=>_.value.name=n),type:"text",class:B([Le,"w-full px-3 py-2 text-sm text-black/70"]),placeholder:"Enter your name"},null,2),[[de,_.value.name]])]),e("button",{onClick:C,disabled:c.savingProfile,class:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-black/70 bg-transparent border border-black/10 rounded-full hover:bg-black/5 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"},[c.savingProfile?(t(),l("span",Cl,"Saving...")):(t(),l("span",_l,"Save"))],8,wl)]),e("div",$l,[e("div",Ll,[a[12]||(a[12]=e("label",{class:"text-sm font-normal text-black/90 block mb-1"},"Email",-1)),e("div",Ml,v(_.value.email||"Not set"),1)]),a[13]||(a[13]=e("div",{class:"text-sm text-black/30"},"Cannot change",-1))]),c.showPhoneBinding?(t(),l("div",Pl,[e("div",Sl,[a[14]||(a[14]=e("label",{class:"text-sm font-normal text-black/90 block mb-1"},"Phone",-1)),e("div",jl,v(_.value.phone||"Not set"),1)]),_.value.phone?(t(),l("div",Dl,"Verified")):(t(),l("button",{key:0,onClick:D,class:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-black/70 bg-transparent border border-black/10 rounded-full hover:bg-black/5 transition-colors"}," Bind "))])):A("",!0)])]),e("section",null,[a[17]||(a[17]=e("h4",{class:"text-sm font-normal text-black/50 mb-4 px-4"},"Security",-1)),e("div",Al,[e("div",Ul,[a[16]||(a[16]=e("div",{class:"flex-1 min-w-0"},[e("label",{class:"text-sm font-normal text-black/90 block mb-1"},"Password"),e("div",{class:"text-sm text-black/70"},"••••••••")],-1)),ie(M.$slots,"reset-password-link",{onClick:U},()=>[e("button",{onClick:U,class:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-black/70 bg-transparent border border-black/10 rounded-full hover:bg-black/5 transition-colors"}," Change ")],!0)])])]),c.languages&&c.languages.length>0?(t(),l("section",Bl,[a[19]||(a[19]=e("h4",{class:"text-sm font-normal text-black/50 mb-4 px-4"}
1,"Preferences",-1)),e("div",Il,[e("div",Fl,[a[18]||(a[18]=e("label",{class:"text-sm font-normal text-black/90 shrink-0"},"Language",-1)),e("div",El,[ie(M.$slots,"language-select",{selected:d.value,languages:c.languages||[],onChange:n=>d.value=n},()=>[J(e("select",{"onUpdate:modelValue":a[2]||(a[2]=n=>d.value=n),class:"w-auto min-w-[100px] h-8 text-sm rounded-full border-black/5 bg-transparent px-3"},[(t(!0),l(W,null,te(c.languages||[],n=>(t(),l("option",{key:n.code,value:n.code},v(n.label),9,Rl))),128))],512),[[Ue,d.value]])],!0)])])])])):A("",!0)])])):A("",!0),b.value==="redeem"?(t(),l("div",Zl,[a[26]||(a[26]=e("h3",{class:"text-xl font-normal text-black/80 mb-8 px-4"},"Redeem Your Code",-1)),e("div",Tl,[e("div",Vl,[e("div",Nl,[ie(M.$slots,"redeem-illustration",{},()=>[a[21]||(a[21]=e("img",{src:lt,alt:"Redeem illustration",class:"w-[220px] h-[220px] object-contain"},null,-1))],!0)]),e("div",Ol,[a[25]||(a[25]=e("label",{for:"redemption-code-modal",class:"text-base px-3 font-normal text-black"}," Enter code to redeem credits ",-1)),J(e("input",{id:"redemption-code-modal","onUpdate:modelValue":a[3]||(a[3]=n=>F.value=n),placeholder:"Enter redemption code",class:"w-full px-3 py-3 text-base font-medium border border-solid border-black/[0.02] dark:border-white/[0.02] bg-black/5 dark:bg-white/5 rounded-lg shadow-none placeholder:text-black/30 dark:placeholder:text-white/30 focus:ring-0 focus-visible:ring-0 focus:outline-none focus-visible:outline-none",disabled:c.redeemLoading,onKeypress:o},null,40,zl),[[de,F.value]]),e("button",{onClick:f,disabled:c.redeemLoading||!F.value.trim(),class:"w-full h-12 text-white font-medium rounded-xl transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed hover:bg-black/80 active:scale-[0.98]",style:{background:"rgba(0, 0, 0, 0.9)"}},[c.redeemLoading?(t(),l("svg",Hl,[...a[22]||(a[22]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):A("",!0),a[23]||(a[23]=q(" Redeem ",-1))],8,ql),e("div",Gl,[a[24]||(a[24]=e("div",{class:"flex items-center gap-2"},[e("span",{class:"text-sm font-normal text-black/60"},"Current Credits")],-1)),e("div",Yl,v(L.value),1)])])])]),a[27]||(a[27]=e("div",{class:"rounded-[24px] px-6 py-4",style:{background:"rgba(0, 0, 0, 0.03)"}},[e("h4",{class:"text-sm font-normal text-black mb-4"},"How to use redemption codes?"),e("ul",{class:"space-y-3"},[e("li",{class:"flex items-start gap-2 text-sm text-black/60"},[e("svg",{class:"w-4 h-4 text-black/60 mt-0.5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})]),q(" Enter your redemption code in the field above ")]),e("li",{class:"flex items-start gap-2 text-sm text-black/60"},[e("svg",{class:"w-4 h-4 text-black/60 mt-0.5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})]),q(' Click the "Redeem" button to add credits to your account ')]),e("li",{class:"flex items-start gap-2 text-sm text-black/60"},[e("svg",{class:"w-4 h-4 text-black/60 mt-0.5 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})]),q(" Use your credits to generate amazing AI designs ")])])],-1))])):A("",!0)])]),e("button",{onClick:a[4]||(a[4]=n=>k.value=!1),class:"absolute top-4 right-4 p-2 rounded-full hover:bg-black/5 transition-colors"},[...a[28]||(a[28]=[e("svg",{class:"w-5 h-5 text-black/60",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])])])):A("",!0)]))],!0),c.showPhoneBinding?ie(M.$slots,"phone-dialog",{key:0,show:u.value,phoneForm:$.value,sendingCode:c.sendingCode,bindingPhone:c.bindingPhone,countdown:c.codeCountdown,codeSent:c.codeSent,onClose:m,onSendCode:P,onBind:Z},()=>[(t(),R(Ce,{to:"body"},[u.value?(t(),l("div",Wl,[e("div",{class:"fixed inset-0 bg-black/50",onClick:m}),e("div",Kl,[a[32]||(a[32]=e("h3",{class:"text-lg font-normal mb-4"},"Bind Mobile Number",-1)),e("div",Jl,[e("div",{class:B([Le,"relative flex h-10 items-center gap-2"])},[a[30]||(a[30]=e("span",{class:"pl-3 text-sm font-normal text-black/60 whitespace-nowrap"},"Mobile Number",-1)),J(e("select",{"onUpdate:modelValue":a[5]||(a[5]=n=>$.value.country_code=n),class:"h-8 text-sm border-0 bg-transparent px-1"},[...a[29]||(a[29]=[e("option",{value:"+86"},"+86 (China)",-1),e("option",{value:"+1"},"+1 (USA)",-1),e("option",{value:"+44"},"+44 (UK)",-1),e("option",{value:"+81"},"+81 (Japan)",-1),e("option",{value:"+82"},"+82 (Korea)",-1)])],512),[[Ue,$.value.country_code]]),J(e("input",{"onUpdate:modelValue":a[6]||(a[6]=n=>$.value.phone=n),type:"tel",class:"flex-1 h-full pr-4 bg-transparent text-sm text-black focus:outline-none",placeholder:"Enter mobile number"},null,512),[[de,$.value.phone]])],2),e("div",{class:B([Le,"relative flex h-10 items-center gap-2"])},[a[31]||(a[31]=e("span",{class:"pl-3 text-sm font-normal text-black/60 whitespace-nowrap"},"Verification Code",-1)),J(e("input",{"onUpdate:modelValue":a[7]||(a[7]=n=>$.value.code=n),type:"text",maxlength:"6",class:"flex-1 h-full pr-24 bg-transparent text-sm text-black placeholder-black/20 focus:outline-none",placeholder:"Enter code"},null,512),[[de,$.value.code]]),e("button",{type:"button",onClick:P,disabled:c.sendingCode||c.codeCountdown>0||!$.value.phone,class:"absolute right-1 px-3 py-1.5 bg-black/90 hover:bg-black text-white text-sm rounded-[8px] transition-all disabled:opacity-50 disabled:cursor-not-allowed"},[c.codeCountdown>0?(t(),l("span",Xl,v(c.codeCountdown)+"s",1)):c.sendingCode?(t(),l("span",es,"Sending...")):(t(),l("span",ts,v(c.codeSent?"Resend":"Send"),1))],8,Ql)],2)]),e("div",as,[e("button",{onClick:m,class:"px-4 py-2 text-sm font-normal text-black/90 bg-transparent border border-black/5 rounded-[12px] hover:bg-black/5 transition-colors"}," Cancel "),e("button",{onClick:Z,disabled:c.bindingPhone||!$.value.phone||!$.value.code,class:"px-4 py-2 text-sm font-normal text-white bg-black/90 rounded-[12px] hover:bg-black/80 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"},[c.bindingPhone?(t(),l("span",ss,"Binding...")):(t(),l("span",ns,"Confirm"))],8,ls)])])])):A("",!0)]))],!0):A("",!0)],64))}}),rs=he(os,[["__scopeId","data-v-21076677"]]);async function is(c={}){return Q("/billing/usage/records",{query:c})}async function cs(c={}){return Q("/billing/usage/daily",{query:c})}async function ds(c={}){return Q("/credits",{query:c})}async function us(){return Q("/subscription/current")}async function ps(){return Q("/subscription/cancel",{method:"POST"})}async function nt(){return Q("/pricing/plans")}async function fs(c={}){return Q("/v1/checkout",{query:c})}async function ms(c){return Q("/api/invoice",{method:"POST",body:JSON.stringify(c)})}async function xs(c){return Q(`/api/invoice/${c}`,{method:"DELETE"})}async function bs(c){return Q("/redemption/redeem",{method:"POST",body:JSON.stringify({code:c})})}async function hs(c={}){return Q("/project/trash",{query:c})}async function vs(c){return Q(`/project/${c}/restore`,{method:"PUT"})}async function ks(c,s={}){return Q(`/project/${c}`,{method:"DELETE",body:JSON.stringify(s)})}const gs={key:0,class:"fixed inset-0 z-[200] flex items-center justify-center p-4"},ys={class:"relative w-full max-w-[860px] bg-[#f5f5f5] backdrop-blur-xl rounded-[32px] shadow-2xl border border-black/5 overflow-hidden"},ws={class:"flex items-center justify-center pt-7 pb-5"},Cs={class:"inline-flex items-center gap-1 bg-black/5 p-1 rounded-full"},_s={key:0,class:"text-sm bg-black/5 text-black/90 px-2 py-1 rounded-full font-medium"},$s={key:0,class:"flex justify-center items-center py-24"},Ls={key:1,class:"grid grid-cols-1 md:grid-cols-2 gap-4 px-6 pb-6"},Ms={class:"rounded-3xl bg-white flex flex-col"},Ps={class:"px-6 pb-6 pt-4 flex-1 flex flex-col"},Ss={class:"flex items-center justify-between min-h-[3rem]"},js={class:"flex items-baseline gap-1.5"},Ds={class:"text-3xl font-semibold text-black/90"},As={key:0,class:"text-base font-semibold bg-[#3589ff]/10 text-[#3589ff] px-2.5 py-1 rounded-xl whitespace-nowrap"},Us=["disabled"],Bs={key:0,class:"absolute"},Is={class:"relative"},Fs=["value"],Es=["value"],Rs={class:"space-y-2 flex-1"},Zs={class:"text-sm font-normal text-black/90 flex items-center"},Ts={class:"rounded-3xl bg-white flex flex-col"},Vs={class:"px-6 pb-6 pt-4 flex-1 flex flex-col"},Ns={class:"flex items-center justify-between min-h-[3rem]"},Os={class:"flex items-baseline gap-1.5"},zs={class:"text-3xl font-semibold text-black/90"},qs={key:0,class:"text-base font-semibold bg-[#3589ff]/10 text-[#3589ff] px-2.5 py-1 rounded-xl whitespace-nowrap"},Hs=["disabled"],Gs={key:0,class:"absolute"},Ys={class:"space-y-2 flex-1"},Ws={class:"text-sm font-normal text-black/90 flex items-center"},Ks={__name:"PricingDialog",props:{isOpen:{type:Boolean,default:!1}},emits:["update:isOpen"],setup(c,{emit:s}){function p(f){if(!f)return"";try{return new URL(f).host}catch{return""}}const h=c,k=s,{toast:b}=pe(),g=()=>k("update:isOpen",!1),_=y(!0),w=y("yearly"),S=y(6e3),L=y(null),d=y([{credits:6e3,monthlyPrice:20,yearlyPrice:200},{credits:12e3,monthlyPrice:40,yearlyPrice:400},{credits:18e3,monthlyPrice:60,yearlyPrice:600}]),u=y({credits:4e4,monthlyPrice:120,yearlyPrice:1200}),$=async()=>{_.value=!0;try{const f=await nt();if(!f)return;f.pro_l1_monthly&&f.pro_l2_monthly&&f.pro_l3_monthly&&(d.value=[{credits:f.pro_l1_monthly.credits,monthlyPrice:f.pro_l1_monthly.price,yearlyPrice:f.pro_l1_yearly.price},{credits:f.pro_l2_monthly.credits,monthlyPrice:f.pro_l2_monthly.price,yearlyPrice:f.pro_l2_yearly.price},{credits:f.pro_l3_monthly.credits,monthlyPrice:f.pro_l3_monthly.price,yearlyPrice:f.pro_l3_yearly.price}],d.value.find(o=>o.credits===S.value)||(S.value=d.value[0].credits)),f.ultra_monthly&&f.ultra_yearly&&(u.value={credits:f.ultra_monthly.credits,monthlyPrice:f.ultra_monthly.price,yearlyPrice:f.ultra_yearly.price})}catch(f){console.error("Failed to fetch plans:",f)}finally{_.value=!1}};ee(()=>h.isOpen,f=>{f&&$()});const F=I(()=>d.value.find(f=>f.credits===S.value)||d.value[0]),N=I(()=>{const f=F.value;return f?w.value==="yearly"?Math.round(f.yearlyPrice/12*100)/100:f.monthlyPrice:0}),H=I(()=>w.value==="yearly"?Math.round(u.value.yearlyPrice/12*100)/100:u.value.monthlyPrice),C=I(()=>{const f=F.value;return!f||f.monthlyPrice<=0?0:Math.max(0,f.monthlyPrice*12-f.yearlyPrice)}),D=I(()=>{const f=u.value;return f.monthlyPrice<=0?0:Math.max(0,f.monthlyPrice*12-f.yearlyPrice)}),m=I(()=>{let f=0;for(const U of d.value)if(U.monthlyPrice>0){const M=(U.monthlyPrice*12-U.yearlyPrice)/(U.monthlyPrice*12)*100;M>f&&(f=M)}const o=u.value;if(o.monthlyPrice>0){const U=(o.monthlyPrice*12-o.yearlyPrice)/(o.monthlyPrice*12)*100;U>f&&(f=U)}return Math.round(f)}),P=f=>
1f===0?"$0":Number.isInteger(f)?`$${f.toLocaleString()}`:`$${f.toFixed(2)}`,Z=async f=>{L.value=f;try{let o="";if(f==="pro"){const a=d.value.findIndex(n=>n.credits===S.value);if(a===-1)throw new Error("Invalid credit tier");o=`pro_l${a+1}_${w.value}`}else f==="ultra"&&(o=`ultra_${w.value}`);const U=At(),M=await Q("/checkout",{method:"POST",body:JSON.stringify({provider:"stripe",plan:o,return:"json",successUrl:U})});if(M?.url){const a=f==="pro"?S.value:u.value?.credits??0,n=f==="pro"?N.value:H.value;ze.event("checkout_initiated",{source:"pricing_dialog",provider:"stripe",plan_id:f,plan_key:o,billing_period:w.value,monthly_credits:a,display_price:n,checkout_host:p(M.url),success_host:p(U),page_path:window.location.pathname}),window.location.href=M.url}else throw new Error("No checkout URL returned")}catch(o){console.error("Checkout error:",o),b({title:"Error",description:o?.data?.error||o?.message||"Failed to start checkout",variant:"destructive"})}finally{L.value=null}};return(f,o)=>(t(),R(Ce,{to:"body"},[x(Oe,{name:"pricing-dialog"},{default:j(()=>[c.isOpen?(t(),l("div",gs,[e("div",{class:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:g}),e("div",ys,[e("button",{onClick:g,class:"absolute top-4 right-4 z-10 w-8 h-8 flex items-center justify-center rounded-full hover:bg-black/5 transition-colors text-black/40 hover:text-black/70"},[...o[5]||(o[5]=[e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[e("path",{d:"M12 4L4 12M4 4l8 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})],-1)])]),e("div",ws,[e("div",Cs,[e("button",{onClick:o[0]||(o[0]=U=>w.value="monthly"),class:B(["relative px-5 py-2 text-sm font-medium rounded-full transition-all duration-200 focus:outline-none",w.value==="monthly"?"bg-white text-black/90 shadow-sm":"text-black/50 hover:text-black/70"])}," Monthly ",2),e("button",{onClick:o[1]||(o[1]=U=>w.value="yearly"),class:B(["relative pl-5 pr-1 py-1 text-sm font-medium rounded-full transition-all duration-200 focus:outline-none flex items-center gap-2",w.value==="yearly"?"bg-white text-black/90 shadow-sm":"text-black/50 hover:text-black/70"])},[o[6]||(o[6]=q(" Yearly ",-1)),m.value>0?(t(),l("span",_s," Save up to "+v(m.value)+"% ",1)):A("",!0)],2)])]),_.value?(t(),l("div",$s,[...o[7]||(o[7]=[e("div",{class:"w-6 h-6 border-2 border-black/10 border-t-black/50 rounded-full animate-spin"},null,-1)])])):(t(),l("div",Ls,[e("div",Ms,[e("div",Ps,[e("div",null,[o[9]||(o[9]=e("h2",{class:"text-2xl text-black/80 flex items-center gap-1.5"},[q(" Pro "),e("span",{class:"text-black/20"},"·"),e("span",{class:"popular-badge text-2xl font-normal"},"Popular")],-1)),o[10]||(o[10]=e("p",{class:"text-lg text-black/50 mb-12 text-left"},"Design like a pro",-1)),e("div",Ss,[e("div",js,[e("span",Ds,v(P(N.value)),1),o[8]||(o[8]=e("span",{class:"text-sm text-black/40"},[e("span",{class:"text-[10px] leading-none font-bold px-0.5"},"/"),q("mo. ")],-1))]),w.value==="yearly"&&C.value>0?(t(),l("span",As," Save $"+v(C.value)+" yearly ",1)):A("",!0)])]),e("button",{type:"button",disabled:L.value==="pro",onClick:o[2]||(o[2]=U=>Z("pro")),class:B(["w-full py-2.5 rounded-xl font-normal transition-all duration-200 mb-2 text-center relative flex items-center justify-center","text-white/90 bg-black/85 hover:bg-black",L.value==="pro"?"opacity-70 cursor-not-allowed":""])},[L.value==="pro"?(t(),l("span",Bs,[...o[11]||(o[11]=[e("div",{class:"w-5 h-5 border-2 border-white/30 border-t-white rounded-full animate-spin"},null,-1)])])):A("",!0),e("span",{class:B({"opacity-0":L.value==="pro"})},"Get Started",2)],10,Us),e("div",Is,[e("select",{value:S.value,onChange:o[3]||(o[3]=U=>S.value=Number(U.target.value)),class:"w-full py-3 px-4 border-0 bg-black/5 hover:bg-black/10 rounded-xl text-sm font-normal text-black/90 focus:outline-none transition-all duration-200 appearance-none cursor-pointer"},[(t(!0),l(W,null,te(d.value,U=>(t(),l("option",{key:U.credits,value:U.credits},v(U.credits.toLocaleString())+" credits/month ",9,Es))),128))],40,Fs),o[12]||(o[12]=e("svg",{class:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-black/40 pointer-events-none",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19 9l-7 7-7-7"})],-1))]),o[23]||(o[23]=e("p",{class:"text-sm font-medium text-black/70 mt-4 mb-3"},"Everything in Free, plus:",-1)),e("ul",Rs,[o[14]||(o[14]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"100 refresh credits everyday")],-1)),e("li",Zs,[o[13]||(o[13]=e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"}
1)],-1)),e("span",null,v(S.value.toLocaleString())+" monthly credits",1)]),o[15]||(o[15]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Remove Veeso badge")],-1)),o[16]||(o[16]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Commercial license")],-1)),o[17]||(o[17]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Advanced export")],-1)),o[18]||(o[18]=e("li",{class:"text-sm text-black/50 pl-5 flex items-start"},[e("span",{class:"text-black/30 mr-2 ml-2"},"•"),e("span",null,"PSD / PPT / SVG / HTML")],-1)),o[19]||(o[19]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Higher-quality AI-generated asset images")],-1)),o[20]||(o[20]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Upload up to 20 asset images per generation")],-1)),o[21]||(o[21]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Multi-page generation (up to 20 pages)")],-1)),o[22]||(o[22]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Priority support")],-1))])])]),e("div",Ts,[e("div",Vs,[e("div",null,[o[25]||(o[25]=e("h2",{class:"text-2xl text-black/80"},"Ultra",-1)),o[26]||(o[26]=e("p",{class:"text-lg text-black/50 mb-12 text-left"}," Bring your design to world at scale ",-1)),e("div",Ns,[e("div",Os,[e("span",zs,v(P(H.value)),1),o[24]||(o[24]=e("span",{class:"text-sm text-black/40"},[e("span",{class:"text-[10px] leading-none font-bold px-0.5"},"/"),q("mo. ")],-1))]),w.value==="yearly"&&D.value>0?(t(),l("span",qs," Save $"+v(D.value)+" yearly ",1)):A("",!0)])]),e("button",{type:"button",disabled:L.value==="ultra",onClick:o[4]||(o[4]=U=>Z("ultra")),class:B(["w-full py-2.5 rounded-xl font-normal transition-all duration-200 mb-2 text-center relative flex items-center justify-center","text-black/90 bg-black/5 hover:bg-black/10",L.value==="ultra"?"opacity-70 cursor-not-allowed":""])},[L.value==="ultra"?(t(),l("span",Gs,[...o[27]||(o[27]=[e("div",{class:"w-5 h-5 border-2 border-black/30 border-t-black rounded-full animate-spin"},null,-1)])])):A("",!0),e("span",{class:B({"opacity-0":L.value==="ultra"})},"Get Started",2)],10,Hs),o[36]||(o[36]=e("p",{class:"text-sm font-medium text-black/70 mt-4 mb-3"},"Everything in Pro, plus:",-1)),e("ul",Ys,[o[29]||(o[29]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"100 refresh credits everyday")],-1)),e("li",Ws,[o[28]||(o[28]=e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"}
1)],-1)),e("span",null,v(u.value.credits.toLocaleString())+" monthly credits",1)]),o[30]||(o[30]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Brand Kit")],-1)),o[31]||(o[31]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"API access")],-1)),o[32]||(o[32]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Unlimited storage")],-1)),o[33]||(o[33]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Custom contracts")],-1)),o[34]||(o[34]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Early access to new features")],-1)),o[35]||(o[35]=e("li",{class:"text-sm font-normal text-black/90 flex items-center"},[e("svg",{class:"w-4 h-4 text-black/60 mr-3 shrink-0",fill:"none",stroke:"currentColor","stroke-width":"2",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M5 13l4 4L19 7"})]),e("span",null,"Priority support")],-1))])])])]))])])):A("",!0)]),_:1})]))}},Js=he(Ks,[["__scopeId","data-v-ec6717e0"]]),Ze={__name:"UiDropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1},class:{type:null,required:!1},inset:{type:Boolean,required:!1}},setup(c){const s=c,p=I(()=>{const{class:k,...b}=s;return b}),h=_t(p);return(k,b)=>(t(),R(r($t),qe(r(h),{class:r(Ge)("px-2 py-1 text-sm font-semibold",c.inset&&"pl-8",s.class)}),{default:j(()=>[ie(k.$slots,"default")]),_:3},16,["class"]))}},Qs={__name:"UiDropdownMenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1},class:{type:null,required:!1}},setup(c){const s=c,p=I(()=>{const{class:h,...k}=s;return k});return(h,k)=>(t(),R(r(Lt),qe(p.value,{class:r(Ge)("-mx-1 my-1 h-px bg-muted",s.class)}),null,16,["class"]))}},Xs={class:"font-normal text-sm text-black/80"},en=Ne({__name:"SettingsModal",props:{open:{type:Boolean,default:!1}},emits:["update:open"],setup(c,{emit:s}){const{user:p,usage:h,updateUser:k,fetchUsage:b,fetchUserInfo:g}=ue(),_=c,w=s,{toast:S}=pe(),L=y(!1),d=y(!1),u=y(!1),$=I(()=>({remaining:h.value?.remaining||0}));async function F(m){if(!L.value){L.value=!0;try{await k({name:m.name}),g(),S({title:z("settings.profile.profileUpdated"),description:z("settings.profile.profileUpdatedDesc"),variant:"success"})}catch{S({title:z("settings.profile.saveFailed"),description:z("settings.profile.saveFailedDesc"),variant:"destructive"})}finally{L.value=!1}}}async function N(m){if(m.size>5*1024*1024){S({title:z("settings.profile.avatarError"),description:z("settings.profile.avatarSizeError","Avatar image must be less than 5MB"),variant:"destructive"});return}d.value=!0;try{const P=new FileReader,Z=await new Promise((o,U)=>{P.onload=M=>{M.target?.result&&typeof M.target.result=="string"?o(M.target.result):U(new Error("Failed to read file"))},P.onerror=U,P.readAsDataURL(m)}),f=await Ye(Z,{filename:m.name,type:"avatar"});await k({avatar:f.url}),g(),S({title:z("settings.profile.avatarUpdated","Avatar Updated")})}catch(P){console.error("Failed to upload avatar:",P),S({title:z("settings.profile.uploadFailed"),description:z("settings.profile.uploadFailedDesc","Failed to upload avatar. Please try again."),variant:"destructive"})}finally{d.value=!1}}async function H(m){try{u.value=!0;const P=await Q("/redemption/redeem",{method:"POST",body:JSON.stringify({code:m})});S({title:z("redemption.success","Redemption Successful!"),description:P.message||z("redemption.successDescription","Your benefits have been added to your account.")}),await b()}catch(P){console.error("Failed to redeem code:",P);let Z=z("redemption.errorDescription","Invalid or expired redemption code.");P instanceof Error&&P.message&&(P.message.includes("already redeemed")?Z=z("redemption.alreadyRedeemed","You have already redeemed this code."):P.message.includes("expired")||P.message.includes("usage limit")?Z=z("redemption.expiredOrLimit","This redemption code has expired or reached its usage limit."):P.message.includes("Invalid or inactive")?Z=z("redemption.invalidCode","Invalid or inactive redemption code."):Z=P.message),S({title:z("redemption.error","Redemption Failed"),description:Z,variant:"destructive"})}finally{u.value=!1}}function C(){w("update:open",!1),ke("/accounts/reset")}function D(m){Be.setLocale(m)}return ee(()=>_.open,m=>{m&&b()},{immediate:!0}),(m,P)=>
1{const Z=je;return t(),R(r(rs),{open:c.open,user:r(p),usage:$.value,"saving-profile":L.value,"uploading-avatar":d.value,"redeem-loading":u.value,languages:r(pt),"current-language":r(Be).locale,"onUpdate:open":P[1]||(P[1]=f=>w("update:open",f)),onSaveProfile:F,onUploadAvatar:N,onRedeemCode:H,onGoResetPassword:C,onChangeLanguage:D},{"language-select":j(({selected:f,languages:o,onChange:U})=>[x(r(Mt),{"model-value":f,"onUpdate:modelValue":M=>{U(M),D(M)}},{default:j(()=>[x(r(Pt),{class:"w-auto min-w-[100px] h-8 text-sm rounded-full border-black/5 bg-transparent"},{default:j(()=>[x(r(Ut),null,{default:j(()=>[q(v(o.find(M=>M.code===f)?.label||f),1)]),_:2},1024)]),_:2},1024),x(r(St),{class:"z-[9999] min-w-[200px]"},{default:j(()=>[x(r(jt),null,{default:j(()=>[(t(!0),l(W,null,te(o,M=>(t(),R(r(Dt),{key:M.code,value:M.code,class:"cursor-pointer hover:bg-black/5 transition-colors duration-200 rounded-full px-3 py-2 focus:bg-black/5"},{default:j(()=>[e("span",Xs,v(M.label),1)]),_:2},1032,["value"]))),128))]),_:2},1024)]),_:2},1024)]),_:2},1032,["model-value","onUpdate:modelValue"])]),"reset-password-link":j(()=>[x(Z,{to:"/accounts/reset",onClick:P[0]||(P[0]=f=>w("update:open",!1)),class:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-black/70 bg-transparent border border-black/10 rounded-full hover:bg-black/5 transition-colors"},{default:j(()=>[q(v(r(z)("settings.security.changePassword","Change")),1)]),_:1})]),_:1},8,["open","user","usage","saving-profile","uploading-avatar","redeem-loading","languages","current-language"])}}}),tn=Object.assign(en,{__name:"AuthSettingsModal"}),an={class:"flex gap-1 items-center"},ln={class:"h-5 w-5 rounded-full overflow-hidden flex-shrink-0 bg-black/5"},sn=["src","alt","referrerpolicy"],nn={key:1,class:"w-full h-full bg-black/5 flex items-center justify-center text-xs text-black/30"},on={key:0,class:"flex items-center gap-1.5 flex-1 min-w-0"},rn={class:"shrink-0 w-4 h-4 flex items-center justify-center text-black/50 text-sm"},cn={class:"text-sm text-black/60 font-normal truncate"},dn={key:1,class:"text-sm font-medium text-black/80 truncate"},un={class:"flex flex-col items-center gap-2"},pn={class:"h-[60px] w-[60px] rounded-full overflow-hidden bg-black/5"},fn=["src","alt","referrerpolicy"],mn={key:1,class:"w-full h-full bg-black/5"},xn={class:"flex flex-col gap-0.5 items-center"},bn={class:"text-sm font-normal text-black/80"},hn={class:"text-sm font-normal text-black/60"},vn={class:"flex items-center gap-2"},kn={class:"shrink-0 flex items-center justify-center text-black/80 text-xs"},gn={class:"text-sm font-normal text-black/60"},yn={class:"flex flex-col items-center gap-1"},wn={class:"h-[60px] w-[60px] rounded-full overflow-hidden bg-black/5"},Cn=["src","alt","referrerpolicy"],_n={key:1,class:"w-full h-full bg-black/5"},$n={class:"flex flex-col items-center gap-1"},Ln={class:"text-sm font-normal text-black/80"},Mn={class:"text-sm font-normal text-black/60"},Pn={class:"flex items-center gap-2 w-full pt-2"},Sn={key:3,class:"space-y-0.5"},jn={class:"shrink-0 w-8 h-8 flex items-center justify-center text-sm"},Dn={class:"font-normal text-black/80 text-sm"},An={class:"shrink-0 w-8 h-8 flex items-center justify-center text-sm"},Un={class:"font-normal text-black/80 text-sm"},Bn={class:"flex w-full items-center gap-1 text-black/80"},In={class:"shrink-0 w-8 h-8 flex items-center justify-center text-sm"},Fn={class:"font-normal text-black/80 text-sm"},En={class:"flex w-full items-center gap-1 text-black/80"},Rn={class:"shrink-0 w-8 h-8 flex items-center justify-center text-sm"},Zn={class:"flex w-full items-center gap-1 text-black/80"},Tn={class:"shrink-0 w-8 h-8 flex items-center justify-center text-sm"},Vn={__name:"AuthUserMenu",props:{showCredits:{type:Boolean,default:!0},collapsed:{type:Boolean,default:!1}},setup(c){const s=xe("openSettingsDialog",null),p=xe("openPricingDialog",null),h=c,{showCredits:k=!0,collapsed:b=!1}=h,{user:g,isAuthenticated:_,signOut:w,fetchUserInfo:S,usage:L,fetchUsage:d}=ue(),u=I(()=>_.value),$=y(!1),F=y(!1),N=Y=>Y?Y.startsWith("http://")||Y.startsWith("https://"):!1,H=I(()=>
1{if(!g.value)return ye(null);const Y=g.value.email||g.value.id||g.value.name||"guest";return ye({email:Y})}),C=I(()=>F.value?"":$.value?H.value:ye(g.value));ee(()=>g.value?.avatar,(Y,T)=>{Y!==T&&($.value=!1,F.value=!1)});function D(){const Y=C.value;N(Y)&&($.value=!1,F.value=!1)}function m(Y){if(!$.value&&g.value?.avatar){$.value=!0;return}F.value=!0}const P=I(()=>u.value&&g.value?.name?g.value.name:z("common.guest","Guest")),Z=y(!1),f=I(()=>Math.max(0,L.value.balance));oe(async()=>{if(u.value){try{await S()}catch{}d()}}),ee(()=>g.value?.id,Y=>{Y&&d()});function o(){w(),ke("/login")}function U(){ke("/login")}function M(){ke("/signup")}const a=y(!1);function n(){Z.value=!1,s?s("general"):a.value=!0}function i(){Z.value=!1,s&&s("invite")}function G(){Z.value=!1,s&&s("redeem")}function ne(){Z.value=!1,p&&p()}return(Y,T)=>{const ae=je;return t(),l("div",an,[x(r(Ct),{open:Z.value,"onUpdate:open":T[2]||(T[2]=le=>Z.value=le)},{default:j(()=>[x(r(yt),{class:"focus:outline-none w-full"},{default:j(()=>[e("div",{class:B(["flex items-center gap-2 h-10 rounded-lg hover:bg-black/[0.03] transition-all duration-200 cursor-pointer group relative",r(b)?"justify-center px-1":"px-2 w-full"])},[e("div",ln,[C.value?(t(),l("img",{key:0,src:C.value,alt:P.value,class:"w-full h-full object-cover",referrerpolicy:N(C.value)?"no-referrer":void 0,loading:"lazy",onLoad:D,onError:m},null,40,sn)):(t(),l("div",nn," ? "))]),u.value&&r(k)&&!r(b)?(t(),l("div",on,[e("span",rn,[x(r(Re))]),e("span",cn,v(f.value),1)])):A("",!0),u.value&&!r(k)&&!r(b)?(t(),l("span",dn,v(P.value),1)):A("",!0)],2)]),_:1}),x(r(wt),{class:"w-72 p-2 bg-white/90 backdrop-blur-[60px] rounded-2xl shadow-2xl border-[0.5px] border-black/15 z-[1000] ml-1",align:"start",sideOffset:8},{default:j(()=>[u.value?(t(),R(r(Ze),{key:0,class:"px-0 py-1"},{default:j(()=>[e("div",un,[e("div",pn,[C.value?(t(),l("img",{key:0,src:C.value,alt:P.value,class:"w-full h-full object-cover",referrerpolicy:N(C.value)?"no-referrer":void 0,loading:"lazy",onLoad:D,onError:m},null,40,fn)):(t(),l("div",mn))]),e("div",xn,[e("span",bn,v(r(g)?.name),1),e("span",hn,v(r(g)?.email),1)]),e("button",{type:"button",onClick:ne,class:"group w-full rounded-xl flex items-center justify-between pl-3 pr-1 py-1 mt-1 transition-all duration-200 ease-out font-normal text-black/80 bg-black/[0.03] hover:bg-black/5 hover:border-black/[0.03]"},[e("div",vn,[e("span",kn,[x(r(Re))]),e("span",gn,v(f.value),1)]),T[4]||(T[4]=e("span",{class:"text-sm font-normal px-2 py-1.5 rounded-lg group-hover:bg-black/10 transition-colors"}," Upgrade ",-1))])])]),_:1})):(t(),R(r(Ze),{key:1,class:"font-normal px-2"},{default:j(()=>[e("div",yn,[e("div",wn,[C.value?(t(),l("img",{key:0,src:C.value,alt:r(z)("common.guest","Guest"),class:"w-full h-full object-cover",referrerpolicy:N(C.value)?"no-referrer":void 0,loading:"lazy",onLoad:D,onError:m},null,40,Cn)):(t(),l("div",_n))]),e("div",$n,[e("span",Ln,v(r(z)("common.loginRequired","Login Required")),1),e("span",Mn,v(r(z)("common.loginRequiredDesc","Please sign in to continue")),1)]),e("div",Pn,[e("button",{class:"flex-1 h-10 bg-black text-white text-sm font-normal hover:bg-black/90 transition-colors",onClick:U},v(r(z)("common.signIn","Sign In")),1),e("button",{class:"flex-1 h-10 bg-black/5 text-black/80 text-sm font-normal hover:bg-black/10 transition-colors",onClick:M},v(r(z)("common.signUp","Sign Up")),1)])])]),_:1})),u.value?(t(),R(r(Qs),{key:2,class:"-mx-2 bg-black/[0.03] my-2"})):A("",!0),u.value?(t(),l("div",Sn,[x(r(ve),{class:"px-1 py-1 hover:bg-black/[0.03] transition-all duration-200 cursor-pointer focus:bg-black/5"},{default:j(()=>[x(ae,{to:"/workspace/create",class:"flex w-full items-center gap-1 text-black/80"},{default:j(()=>[e("span",jn,[x(r(Ma))]),e("span",Dn,v(r(z)("app.Workspace","Workspace")),1)]),_:1})]),_:1}),x(r(ve),{class:"px-1 py-1 hover:bg-black/5 transition-all duration-200 cursor-pointer focus:bg-black/5",onClick:i,onSelect:T[0]||(T[0]=le=>le.preventDefault())},{default:j(()=>[(t(),R(se(r(s)?"div":"NuxtLink"),{to:r(s)?void 0:"/invite",class:"flex w-full items-center gap-1 text-black/80"},{default:j(()=>[e("span",An,[x(r(Da))]),e("span",Un,v(r(z)("app.inviteFriends","Invite Friends")),1)]),_:1},8,["to"]))]),_:1}),x(r(ve),{class:"px-1 py-1 hover:bg-black/[0.03] transition-all duration-200 cursor-pointer focus:bg-black/5",onClick:G,onSelect:T[1]||(T[1]=le=>le.preventDefault())},{default:j(()=>[e("div",Bn,[e("span",In,[x(r(pa))]),e("span",Fn,v(r(z)("app.RedemptionCode","Redeem code")),1)])]),_:1}),x(r(ve),{class:"px-1 py-1 hover:bg-black/[0.03] transition-all duration-200 cursor-pointer focus:bg-black/5",onClick:n},{default:j(()=>[e("div",En,[e("span",Rn,[x(r(st))]),T[5]||(T[5]=e("span",{class:"font-normal text-black/80 text-sm"},"Settings",-1))])]),_:1})])):A("",!0),u.value?(t(),R(r(ve),{key:4,class:"px-1 py-1 hover:bg-black/[0.03] transition-all duration-200 cursor-pointer focus:bg-black/5",onClick:o},{default:j(()=>[e("div",Zn,[e("span",Tn,[x(r(Oa))]),T[6]||(T[6]=e("span",{class:"font-normal text-black/80 text-sm"},"Sign Out",-1))])]),_:1})):A("",!0)]),_:1})]),_:1},8,["open"]),x(tn,{open:a.value,"onUpdate:open":T[3]||(T[3]=le=>a.value=le)},null,8,["open"])])}}},Nn={},On={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zn(c,s){return t(),l("svg",On,[...s[0]||(s[0]=[e("path",{d:"M9.43923 16.4972C9.4779 16.8066 9.67127 17 10.0193 17C10.2901 17 10.5028 16.8066 10.5608 16.5166C11.4116 12.1657 11.9917 11.2182 16.4972 10.5608C16.8066 10.5221 17 10.2901 17 10.0193C1
17 9.70995 16.8066 9.4779 16.4972 9.43923C11.9917 8.78177 11.2182 7.73757 10.5608 3.5221C10.5028 3.19337 10.2901 3 10.0193 3C9.70995 3 9.49724 3.19337 9.43923 3.50276C8.5884 7.81492 8.00829 8.78177 3.5221 9.43923C3.19337 9.4779 3 9.70995 3 10.0193C3 10.2901 3.19337 10.5028 3.5221 10.5608C8.00829 11.2182 8.76243 12.1657 9.43923 16.4972Z",fill:"currentColor"},null,-1)])])}const ot=Object.assign(he(Nn,[["render",zn]]),{__name:"IconsCredit"}),qn={class:"shrink-0 w-5 h-5 flex items-center justify-center text-base"},Hn={class:"font-medium"},Gn={__name:"WorkspaceCredit",props:{collapsed:{type:Boolean,default:!1}},setup(c){const s=xe("openPricingDialog",null),{usage:p}=ue(),h=I(()=>Math.max(0,p.value.balance));return(k,b)=>(t(),l("button",{type:"button",onClick:b[0]||(b[0]=g=>r(s)?.()),class:"w-full h-10 flex items-center gap-2 px-2 text-sm font-medium transition-all duration-200 rounded-lg text-black/80 hover:bg-black/[0.03] hover:text-black border border-black/[0.03]"},[e("span",qn,[x(ot,{class:"w-4 h-4"})]),e("span",{class:B(["flex-1 flex items-center justify-between overflow-hidden transition-all duration-300 h-10",c.collapsed?"w-0 opacity-0":""])},[e("span",Hn,v(h.value),1),b[1]||(b[1]=e("span",{class:"text-xs font-medium text-black/50 pr-1"},"Upgrade",-1))],2)]))}},Yn={},Wn={width:"22",height:"22",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Kn(c,s){return t(),l("svg",Wn,[...s[0]||(s[0]=[e("circle",{cx:"4",cy:"10",r:"1.5",fill:"currentColor"},null,-1),e("circle",{cx:"10",cy:"10",r:"1.5",fill:"currentColor"},null,-1),e("circle",{cx:"16",cy:"10",r:"1.5",fill:"currentColor"},null,-1)])])}const Jn=Object.assign(he(Yn,[["render",Kn]]),{__name:"IconsMore"}),Te={__name:"IconsSidebarIcon",props:{class:String},setup(c){const s=c;return(p,h)=>(t(),l("svg",{class:B(s.class),viewBox:"0 0 28 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[...h[0]||(h[0]=[e("path",{d:"M3.67969 21.5742L23.9531 21.5742C26.4141 21.5742 27.6328 20.3672 27.6328 17.9531L27.6328 3.63281C27.6328 1.21875 26.4141 0 23.9531 0L3.67969 0C1.23047 0 0 1.21875 0 3.63281L0 17.9531C0 20.3672 1.23047 21.5742 3.67969 21.5742ZM3.70312 19.6875C2.53125 19.6875 1.88672 19.0664 1.88672 17.8477L1.88672 3.73828C1.88672 2.51953 2.53125 1.88672 3.70312 1.88672L23.9297 1.88672C25.0898 1.88672 25.7461 2.51953 25.7461 3.73828L25.7461 17.8477C25.7461 19.0664 25.0898 19.6875 23.9297 19.6875Z",fill:"currentColor"},null,-1),e("path",{d:"M4.51172 18.0938L7.82812 18.0938C8.55469 18.0938 8.84766 17.7891 8.84766 17.0391L8.84766 4.54688C8.84766 3.79688 8.55469 3.49219 7.82812 3.49219L4.51172 3.49219C3.78516 3.49219 3.49219 3.79688 3.49219 4.54688L3.49219 17.0391C3.49219 17.7891 3.78516 18.0938 4.51172 18.0938Z",fill:"currentColor"},null,-1)])],2))}},Qn={class:"h-full bg-transparent overflow-y-auto"},Xn={class:"h-full custom-scrollbar"},eo={class:"max-w-[800px] mx-auto pt-0 py-12 px-6"},to={class:"rounded-2xl overflow-hidden bg-[rgba(0,0,0,0.03)] dark:bg-[rgba(255,255,255,0.03)]"},ao={class:"px-4 py-4 flex items-center justify-between hover:bg-black/5 dark:hover:bg-white/5 transition-colors"},lo={class:"flex items-center gap-4"},so={class:"relative group"},no={class:"w-12 h-12 rounded-full bg-[#3C31FF] flex items-center justify-center text-white text-base font-normal overflow-hidden"},oo=["src"],ro={key:1},io={for:"avatar-upload-overlay",class:"absolute inset-0 flex items-center justify-center bg-black/40 rounded-xl opacity-0 group-hover:opacity-100 transition-opacity cursor-pointer"},co={class:"flex items-center gap-2"},uo={key:0,class:"animate-spin h-3 w-3",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},po={key:1},fo={key:2},mo=["disabled"],xo={key:0,class:"text-xs text-black/70 dark:text-white/70"},bo={class:"px-4 py-4 flex items-center justify-between border-t border-black/5 dark:border-white/5 hover:bg-black/5 dark:hover:bg-white/5 transition-colors"},ho={class:"flex-1 min-w-0 mr-4"},vo=["disabled"],ko={key:0,class:"animate-spin h-3 w-3",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},go={key:1},yo={key:2},wo={class:"px-4 py-4 flex items-center justify-between border-t border-black/5 dark:border-white/5"},Co={class:"flex-1 min-w-0"},_o={class:"text-sm text-black/30 dark:text-white/30"},$o={class:"mt-8"},Lo={class:"rounded-2xl overflow-hidden bg-[rgba(0,0,0,0.03)] dark:bg-[rgba(255,255,255,0.03)]"},Mo={class:"space-y-4 py-4"},Po={class:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800/30 rounded-md p-4"},So={class:"text-sm font-normal text-black/90 dark:text-white/90 mt-1"},jo=["disabled"],Do={key:0},Ao={key:1},Me="border border-solid border-black/[0.02] dark:border-white/[0.02] bg-black/5 dark:bg-white/5 rounded-lg shadow-none placeholder:text-black/30 dark:placeholder:text-white/30 focus:ring-0 focus-visible:ring-0 focus:outline-none focus-visible:outline-none",Uo={__name:"GeneralSettings",setup(c){const s=xe("refreshProfile",null),{fetchUserInfo:p,user:h,updateUser:k}=ue(),{openPreferences:b}=It(),{toast:g}=pe(),_=y({name:"",email:"",avatar:""}),w=y(null),S=y(!1),L=mt({email:"",password:""}),d=y(!1),u=y(!1),$=y(!1),F=y(!1);async function N(){await p(),h.value&&(_.value={name:h.value.name||"",email:h.value.email||"",avatar:h.value.avatar||""},w.value=h.value.avatar||null)}async function H(D){const m=D.target.files[0];if(!m)return;if(m.size>5*1024*1024){g({title:"Avatar Error",description:"Avatar image must be less than 5MB",variant:"destructive"});return}F.value=!1;const P=new FileReader;P.onload=async Z=>{const f=Z.target.result;w.value=f,$.value=!0,F.value=!1;try{const o=await Ye(f,{filename:m.name,type:"avatar"});_.value.avatar=o.url,await k(_.value),await N(),$.value=!1,g({title:"Avatar Updated"})}catch(o){console.error("Failed to upload avatar:",o),$.value=!1,F.value=!0,g({title:"Upload Failed",description:"Failed to upload avatar. Please try again.",variant:"destructive"}),w.value=h.value.avatar||null}}
1,P.readAsDataURL(m)}const C=async()=>{if(!u.value){u.value=!0;try{await k(_.value),await N(),g({title:"Profile Updated",description:"Your profile information has been updated successfully.",variant:"success"})}catch{g({title:"Save Failed",description:"Failed to save profile. Please try again.",variant:"destructive"})}finally{u.value=!1}}};return oe(()=>{s&&(s.value=N),N()}),(D,m)=>(t(),l("div",Qn,[e("div",Xn,[e("div",eo,[e("section",null,[m[13]||(m[13]=e("h2",{class:"text-sm font-normal px-4 text-black/50 dark:text-white/50 mb-4"},"Profile",-1)),e("div",to,[e("div",ao,[e("div",lo,[e("div",so,[e("div",no,[w.value?(t(),l("img",{key:0,src:w.value,alt:"Avatar",class:"w-full h-full object-cover"},null,8,oo)):(t(),l("span",ro,v((_.value.name||r(h).value?.username||"U").charAt(0).toUpperCase()),1))]),e("label",io,[x(r(Gt),{class:"w-5 h-5 text-white"}),e("input",{id:"avatar-upload-overlay",type:"file",accept:".jpg,.jpeg,.png,.webp",class:"hidden",onChange:H},null,32)])]),m[7]||(m[7]=e("div",null,[e("div",{class:"text-sm font-normal text-black/90 dark:text-white/90"},"Avatar"),e("div",{class:"text-xs text-black/50 dark:text-white/50 mt-0.5"}," JPG, PNG or WebP. Max 5MB. ")],-1))]),e("div",co,[e("label",{for:"avatar-upload-btn",class:B(["inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-black/70 dark:text-white/70 bg-transparent border border-black/10 dark:border-white/10 rounded-full hover:bg-black/5 dark:hover:bg-white/5 transition-colors cursor-pointer",{"opacity-50 cursor-not-allowed":$.value}])},[$.value?(t(),l("svg",uo,[...m[8]||(m[8]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):A("",!0),$.value?(t(),l("span",po,"Uploading...")):(t(),l("span",fo,"Change")),e("input",{id:"avatar-upload-btn",type:"file",accept:".jpg,.jpeg,.png,.webp",class:"hidden",disabled:$.value,onChange:H},null,40,mo)],2),F.value?(t(),l("span",xo," Failed to upload ")):A("",!0)])]),e("div",bo,[e("div",ho,[m[9]||(m[9]=e("label",{class:"text-sm font-normal text-black/90 dark:text-white/90 block mb-1"}," Name ",-1)),J(e("input",{"onUpdate:modelValue":m[0]||(m[0]=P=>_.value.name=P),type:"text",class:B([Me,"w-full px-3 py-2 text-sm text-black/70 dark:text-white/70"]),placeholder:"Enter your name",onKeydown:ft(C,["enter"])},null,34),[[de,_.value.name]])]),e("button",{onClick:C,disabled:u.value,class:"inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-black/70 dark:text-white/70 bg-transparent border border-black/10 dark:border-white/10 rounded-full hover:bg-black/5 dark:hover:bg-white/5 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"},[u.value?(t(),l("svg",ko,[...m[10]||(m[10]=[e("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):A("",!0),u.value?(t(),l("span",go,"Saving...")):(t(),l("span",yo,"Save"))],8,vo)]),e("div",wo,[e("div",Co,[m[11]||(m[11]=e("label",{class:"text-sm font-normal text-black/90 dark:text-white/90 block mb-1"}," Email ",-1)),e("div",_o,v(_.value.email||"Not set"),1)]),m[12]||(m[12]=e("div",{class:"text-sm text-black/30 dark:text-white/30"},"Cannot change",-1))])])]),e("section",$o,[m[15]||(m[15]=e("h2",{class:"text-sm font-normal px-4 text-black/50 dark:text-white/50 mb-4"}," Cookie Preferences ",-1)),e("div",Lo,[e("div",{class:"px-4 py-4 flex items-center justify-between hover:bg-black/5 dark:hover:bg-white/5 transition-colors cursor-pointer",onClick:m[1]||(m[1]=(...P)=>r(b)&&r(b)(...P))},[m[14]||(m[14]=e("div",{class:"flex items-center gap-4"},[e("div",null,[e("div",{class:"text-sm font-normal text-black/90 dark:text-white/90"}," Cookie Preferences "),e("div",{class:"text-xs text-black/50 dark:text-white/50 mt-0.5"}," Manage your cookie settings and preferences ")])],-1)),x(r(Bt),{class:"w-5 h-5 text-black/30 dark:text-white/30"})])])])])]),x(r(Je),{open:S.value,"onUpdate:open":m[6]||(m[6]=P=>S.value=P)},{default:j(()=>[x(r(We),{class:"sm:max-w-md rounded-lg dark:bg-[#292927]/85 dar
1k:border-white/10"},{default:j(()=>[x(r(et),null,{default:j(()=>[x(r(Ke),{class:"text-lg font-normal text-red-600 dark:text-red-400"},{default:j(()=>[...m[16]||(m[16]=[q("Delete Account",-1)])]),_:1}),x(r(Qe),{class:"text-sm text-black/90 dark:text-white/90"},{default:j(()=>[...m[17]||(m[17]=[q(" This action cannot be undone. All your data will be permanently deleted. ",-1)])]),_:1})]),_:1}),e("div",Mo,[e("div",Po,[m[18]||(m[18]=e("p",{class:"text-sm text-black/90 dark:text-white/90"}," Please type your email to confirm: ",-1)),e("p",So,v(_.value.email),1)]),e("div",null,[m[19]||(m[19]=e("label",{class:"block text-sm font-normal text-black/90 dark:text-white/90 mb-2"}," Email Confirmation ",-1)),J(e("input",{"onUpdate:modelValue":m[2]||(m[2]=P=>L.email=P),type:"email",class:B([Me,"w-full px-3 py-2 text-sm dark:text-white"]),placeholder:"Enter your email"},null,2),[[de,L.email]])]),e("div",null,[m[20]||(m[20]=e("label",{class:"block text-sm font-normal text-black/90 dark:text-white/90 mb-2"}," Password ",-1)),J(e("input",{"onUpdate:modelValue":m[3]||(m[3]=P=>L.password=P),type:"password",class:B([Me,"w-full px-3 py-2 text-sm dark:text-white"]),placeholder:"Enter your password"},null,2),[[de,L.password]])])]),x(r(Xe),{class:"gap-2"},{default:j(()=>[e("button",{onClick:m[4]||(m[4]=P=>S.value=!1),class:"px-4 py-2 text-sm font-normal text-black/90 dark:text-white/90 bg-transparent border border-black/5 dark:border-white/10 rounded-xl hover:bg-black/5 dark:hover:bg-white/5 transition-colors"}," Cancel "),e("button",{onClick:m[5]||(m[5]=(...P)=>D.deleteAccount&&D.deleteAccount(...P)),disabled:d.value||L.email!==_.value.email||!L.password,class:"px-4 py-2 text-sm font-normal text-white dark:text-black bg-black/90 dark:bg-white/90 rounded-xl hover:bg-black/80 dark:hover:bg-white/80 transition-colors disabled:bg-black/5 dark:disabled:bg-white/5 disabled:cursor-not-allowed dark:disabled:text-white/50"},[d.value?(t(),l("span",Do,"Deleting...")):(t(),l("span",Ao,"Delete Account"))],8,jo)]),_:1})]),_:1})]),_:1},8,["open"])]))}},Bo={class:"min-h-0 min-w-0 custom-scrollbar"},Io={class:"w-full max-w-full py-2"},Fo={key:0,class:"flex flex-col items-center justify-center py-24 text-black/40 dark:text-white/40"},Eo={key:1,class:"bg-red-50 dark:bg-red-900/20 border border-red-100 dark:border-red-800/30 text-black/60 dark:text-white/60 p-4 rounded-xl flex items-center gap-3"},Ro={key:2,class:"flex flex-col items-center justify-center py-24 text-black/40 dark:text-white/40 bg-white/50 dark:bg-white/5 rounded-2xl border border-dashed border-black/10 dark:border-white/10"},Zo={key:3,class:"space-y-4"},To={class:"rounded-2xl overflow-hidden min-w-0"},Vo={class:"overflow-x-auto min-w-0"},No={class:"w-full min-w-[720px] text-left text-sm"},Oo={class:"divide-y divide-black/5 dark:divide-white/10 border-b border-black/5 dark:border-white/10"},zo={class:"py-4 px-2"},qo=["onClick"],Ho=["title"],Go={class:"py-4 px-2"},Yo={class:"text-black/70 dark:text-white/70 text-sm"},Wo={class:"text-black/40 dark:text-white/40 text-xs"},Ko={class:"py-4 px-2"},Jo={class:"text-black/70 dark:text-white/70 text-sm font-medium"},Qo={class:"flex items-center gap-1.5 text-black/40 dark:text-white/40 text-xs"},Xo=["src","alt"],er={class:"py-4 px-2"},tr={key:0,class:"inline-flex items-center gap-1.5 text-emerald-600 dark:text-emerald-500"},ar={class:"text-xs font-normal"},lr={key:1,class:"inline-flex items-center px-3 py-1 rounded-full text-xs font-normal border capitalize text-black/60 dark:text-white/60 border-black/10 dark:border-white/10 bg-white dark:bg-[#292927]/85"},sr={class:"py-4 px-2"},nr={key:1,class:"text-black/30 text-xs"},or={class:"py-4 px-2 text-right"},rr={class:"flex items-center justify-end gap-2"},ir=["onClick"],cr=["onClick"],dr=["href"],ur={key:0,class:"flex justify-center py-4"},pr={key:1,class:"text-center py-4 text-black/20 dark:text-white/20 text-xs"},fr={class:"space-y-5 py-4"},mr={key:0,class:"flex items-center justify-between px-2 py-3 bg-black/[0.02] dark:bg-white/[0.02] rounded-xl border border-black/5 dark:border-white/5"},xr={class:"flex items-center gap-3"},br={class:"w-10 h-10 rounded-xl bg-gradient-to-br from-black/5 to-black/10 dark:from-white/5 dark:to-white/10 flex items-center justify-center"},hr={class:"text-sm font-medium text-black/80 dark:text-white/80"},vr={class:"text-xs text-black/40 dark:text-white/40"},kr={class:"text-right"},gr={class:"text-lg font-semibold text-black/90 dark:text-white/90"},yr={class:"space-y-2"},wr={class:"space-y-2"},Cr={class:"space-y-2"},Pe=20,_r={__name:"BillingSettings",setup(c){const{toast:s}=pe(),p=y([]),h=y(!0),k=y(null),b=y(null),g=y(!0),_=y(!1),w=y(0),S=y(!1),L=y(!1),d=y(null),u=y({title:"",tax_number:"",email:"",remark:""}),$=a=>{if(!a)return{date:"-",time:""};const n=new Date(a),i=n.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),G=n.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"});return{date:i,time:G}},F=a=>a==null?"-":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(a/100),N=a=>{switch(a){case"succeeded":case"paid":case"complete":return"bg-[rgba(0,0,0,0.02)] text-black/70 border-[rgba(0,0,0,0.05)]";
1case"pending":case"processing":return"bg-[rgba(0,0,0,0.02)] text-black/60 border-[rgba(0,0,0,0.05)]";case"failed":case"cancelled":return"bg-[rgba(0,0,0,0.02)] text-black/50 border-[rgba(0,0,0,0.05)]";default:return"bg-[rgba(0,0,0,0.02)] text-black/60 border-[rgba(0,0,0,0.05)]"}},H=a=>({pending:{label:"Pending",color:"bg-[rgba(0,0,0,0.02)] text-black/60 border-[rgba(0,0,0,0.05)]",icon:Wt},issued:{label:"Issued",color:"bg-[rgba(0,0,0,0.02)] text-black/70 border-[rgba(0,0,0,0.05)]",icon:Ee},cancelled:{label:"Cancelled",color:"bg-[rgba(0,0,0,0.02)] text-black/40 border-[rgba(0,0,0,0.05)]",icon:Yt}})[a]||{label:a,color:"bg-[rgba(0,0,0,0.02)] text-black/50 border-[rgba(0,0,0,0.05)]",icon:Fe},C=a=>({alipay:{type:"img",src:"/images/platform/alipay.svg",label:"Alipay",bgClass:"bg-[#1677FF]"},wxpay:{type:"img",src:"/images/platform/wechat-pay.svg",label:"WeChat Pay"},gift:{type:"icon",component:at,label:"Gift",class:"text-pink-500"},polay:{type:"icon",component:Se,label:"Credit Card",class:"text-blue-500"}})[a]||{type:"icon",component:Se,label:a||"Payment",class:"text-black/40"},D=a=>({succeeded:"Succeeded",paid:"Paid",complete:"Complete",pending:"Pending",processing:"Processing",failed:"Failed",cancelled:"Cancelled"})[a]||a,m=a=>a.status==="succeeded"&&!a.invoice_status,P=a=>a.invoice_status==="pending",Z=a=>{d.value=a,u.value={title:"",tax_number:"",email:a.customer_email||"",remark:""},S.value=!0},f=async()=>{if(!u.value.title){s({title:"Invoice title is required",variant:"destructive"});return}L.value=!0;try{await ms({checkout_id:d.value.id,title:u.value.title,tax_number:u.value.tax_number||void 0,email:u.value.email||void 0,remark:u.value.remark||void 0});const a=p.value.findIndex(n=>n.id===d.value.id);a!==-1&&(p.value[a].invoice_status="pending"),s({title:"Invoice applied successfully",variant:"success"}),S.value=!1}catch(a){console.error("Failed to apply invoice:",a),s({title:a.message||"Failed to apply invoice",variant:"destructive"})}finally{L.value=!1}},o=async a=>{if(a.invoice_id)try{await xs(a.invoice_id);const n=p.value.findIndex(i=>i.id===a.id);n!==-1&&(p.value[n].invoice_status=null,p.value[n].invoice_id=null),s({title:"Invoice cancelled successfully",variant:"success"})}catch(n){console.error("Failed to cancel invoice:",n),s({title:n.message||"Failed to cancel invoice",variant:"destructive"})}};tt(b,async()=>{if(!(_.value||!g.value)){_.value=!0;try{const a=await fs({limit:Pe,skip:w.value});a.length<Pe&&(g.value=!1),p.value.push(...a),w.value+=Pe}catch(a){console.error("Failed to fetch orders:",a),p.value.length===0&&(k.value=a.message||"Failed to load orders")}finally{h.value=!1,_.value=!1}}},{distance:100});const M=async a=>{try{await navigator.clipboard.writeText(String(a)),s({title:"Copied",description:`#${a}`,variant:"success"})}catch(n){console.error("Failed to copy:",n),s({title:"Copy failed",variant:"destructive"})}};return(a,n)=>(t(),l("div",{ref_key:"containerRef",ref:b,class:"flex-1 min-h-0 min-w-0 h-full overflow-y-auto bg-transparent"},[e("div",Bo,[e("div",Io,[h.value&&p.value.length===0?(t(),l("div",Fo,[x(r(me),{class:"w-8 h-8 animate-spin mb-2 text-black/40 dark:text-white/40","stroke-width":1}),n[5]||(n[5]=e("span",{class:"text-sm"},"Loading orders...",-1))])):k.value?(t(),l("div",Eo,[x(r(Ht),{class:"w-5 h-5"}),q(" "+v(k.value),1)])):p.value.length===0?(t(),l("div",Ro,[x(r(ta),{class:"w-12 h-12 mb-3 opacity-20"}),n[6]||(n[6]=e("p",null,"No orders found",-1))])):(t(),l("div",Zo,[e("div",To,[e("div",Vo,[e("table",No,[n[7]||(n[7]=e("thead",{class:"bg-transparent border-b border-black/5 dark:border-white/10"},[e("tr",null,[e("th",{class:"py-4 px-2 font-medium text-black/50 dark:text-white/50"},"Order ID"),e("th",{class:"py-4 px-2 font-medium text-black/50 dark:text-white/50"},"Date"),e("th",{class:"py-4 px-2 font-medium text-black/50 dark:text-white/50"},"Payment"),e("th",{class:"py-4 px-2 font-medium text-black/50 dark:text-white/50"},"Status"),e("th",{class:"py-4 px-2 font-medium text-black/50 dark:text-white/50"}," Invoice Title "),e("th",{class:"py-4 px-2 font-medium text-black/50 dark:text-white/50 text-right"}," Actions ")])],-1)),e("tbody",Oo,[(t(!0),l(W,null,te(p.value,i=>(t(),l("tr",{key:i.id,class:"group hover:bg-black/5 dark:hover:bg-white/5 transition-colors"},[e("td",zo,[e("div",{class:"flex items-center gap-1 cursor-pointer group/id",onClick:G=>M(i.id)},[e("span",{class:"font-mono text-xs text-black/40 dark:text-white/40 group-hover:text-black/60 dark:group-hover:text-white/60 transition-colors truncate max-w-[80px]",title:`#${i.id}`}," #"+v(i.id),9,Ho),x(r(Tt),{class:"w-3 h-3 text-black/30 dark:text-white/30 opacity-0 group-hover/id:opacity-100 transition-opacity shrink-0"})],8,qo)]),e("td",Go,[e("div",Yo,v($(i.created_at).date),1),e("div",Wo,v($(i.created_at).time),1)]),e("td",Ko,[e("div",Jo,v(F(i.amount,i.currency)),1),e("div",Qo,[C(i.payment_method).type==="img"?(t(),l("img",{key:0,src:C(i.payment_method).src,class:"w-3 h-3 object-contain",alt:C(i.payment_method).label},null,8,Xo)):(t(),R(se(C(i.payment_method).component),{key:1,class:B(["w-3 h-3",C(i.payment_method).class])},null,8,["class"])),e("span",null,v(C(i.payment_method).label),1)])]),e("td",er,[i.status==="succeeded"||i.status==="paid"||i.status==="complete"?(t(),l("div",tr,[x(r(Ee),{class:"w-4 h-4"}),e("span",ar,v(D(i.status)),1)])):i.status==="pending"||i.status==="processing"?(t(),l("span",lr,v(D(i.status)),1)):(t(),l("span",{key:2,class:B(["inline-flex items-center px-3 py-1 rounded-full text-xs font-normal border capitalize",N(i.status)])},v(D(i.status)),3))]),e("td",sr,[i.invoice_status?(t(),R(Rt,{key:0,text:H(i.invoice_status).label},{default:j(()=>[e("div",{class:B(["inline-flex items-center justify-center w-7 h-7 rounded-full border cursor-default transition-colors",H(i.invoice_status).color])},[(t(),R(se(H(i.invoice_status).icon),{class:"w-3.5 h-3.5"}))],2)]),_:2},1032,["text"])):(t(),l("span",nr,"-"))]),e("td",or,[e("div",rr,[m(i)?(t(),l("button",{key:0,onClick:G=>Z(i),class:"text-xs text-black/50 dark:text-white/50 hover:text-black/70 dark:hover:text-white/70 transition-colors"}," Apply Invoice ",8,ir)):A("",!0),P(i)?(t(),l("button",{key:1,onClick:G=>o(i),class:"text-xs text-black/50 dark:text-white/50 hover:text-black/70 dark:hover:text-white/70 transition-colors"}," Cancel Invoice ",8,cr)):A("",!0),i.invoice_status==="issued"&&i.invoice_url?(t(),l("a",{key:2,href:i.invoice_url,target:"_blank",rel:"noopener noreferrer",class:"text-xs text-black/50 dark:text-white/50 hover:text-black/70 dark:hover:text-white/70 transition-colors"}," Download Invoice ",8,dr)):A("",!0)])])]))),128))])])])]),_.value?(t(),l("div",ur,[x(r(me),{class:"w-5 h-5 animate-spin text-black/40 dark:text-white/40","stroke-width":1})])):A("",!0),!g.value&&p.value.length>0?(t(),l("div",pr," No more orders ")):A("",!0)]))])]),x(r(Je),{open:S.value,"onUpdate:open":n[4]||(n[4]=i=>S.value=i)},{default:j(()=>[x(r(We),{class:"sm:max-w-[480px] bg-white dark:bg-[#292927]/85 border-black/10 dark:border-white/10"},{default:j(()=>[x(r(et),null,{default:j(()=>[x(r(Ke),{class:"flex items-center gap-2 text-lg text-black dark:text-white"},{default:j(()=>[x(r(Qt),{class:"w-5 h-5 text-black/70 dark:text-white/70"}),n[8]||(n[8]=q(" Apply for Invoice ",-1))]),_:1}),x(r(Qe),{class:"text-black/50 dark:text-white/50 text-sm"},{default:j(()=>[...n[9]||(n[9]=[q(" Please fill in the invoice details below. The invoice will be sent to your email. ",-1)])]),_:1})]),_:1}),e("div",fr,[d.value?(t(),l("div",mr,[e("div",xr,[e("div",br,[x(r(Fe),{class:"w-5 h-5 text-black/40 dark:text-white/40"})]),e("div",null,[e("div",hr," Order Number: #"+v(d.value.id),1),e("div",vr,v($(d.value.created_at).date)+" "+v($(d.value.created_at).time),1)])]),e("div",kr,[e("div",gr,v(F(d.value.amount,d.value.currency)),1)])])):A("",!0),e("div",yr,[x(r($e),{class:"text-sm font-medium text-black/70 dark:text-white/70"},{default:j(()=>[...n[10]||(n[10]=[q(" Invoice Title ",-1),e("span",{class:"text-red-500 dark:text-red-400"},"*",-1)])]),_:1}),x(r(we),{modelValue:u.value.title,"onUpdate:modelValue":n[0]||(n[0]=i=>u.value.title=i),placeholder:"Enter company or personal name",class:"h-10 text-black dark:text-white"},null,8,["modelValue"])]),e("div",wr,[x(r($e),{class:"text-sm font-medium text-black/70 dark:text-white/70"},{default:j(()=>[...n[11]||(n[11]=[q(" Tax Number ",-1),e("span",{class:"text-black/30 dark:text-white/30 text-xs ml-1"},"(Optional)",-1)])]),_:1}),x(r(we),{modelValue:u.value.tax_number,"onUpdate:modelValue":n[1]||(n[1]=i=>u.value.tax_number=i),placeholder:"Enter tax identification number",class:"h-10 text-black dark:text-white"},null,8,["modelValue"])]),e("div",Cr,[x(r($e),{class:"text-sm font-medium text-black/70 dark:text-white/70"},{default:j(()=>[...n[12]||(n[12]=[q(" Remark ",-1),e("span",{class:"text-black/30 dark:text-white/30 text-xs ml-1"},"(Optional)",-1)])]),_:1}),x(r(we),{modelValue:u.value.remark,"onUpdate:modelValue":n[2]||(n[2]=i=>u.value.remark=i),placeholder:"Enter any additional information",class:"h-10 text-black dark:text-white"},null,8,["modelValue"])])]),x(r(Xe),{class:"gap-2 sm:gap-2"},{default:j(()=>[x(r(ge),{variant:"outline",onClick:n[3]||(n[3]=i=>S.value=!1),class:"flex-1 sm:flex-none h-10 border-black/10 dark:border-white/10 text-black/80 dark:text-white/80 hover:bg-black/5 dark:hover:bg-white/5 bg-transparent"},{default:j(()=>[...n[13]||(n[13]=[q(" Cancel ",-1)])]),_:1}),x(r(ge),{onClick:f,disabled:L.value||!u.value.title,class:"flex-1 sm:flex-none h-10 bg-black dark:bg-white hover:bg-black/90 dark:hover:bg-white/90 text-white dark:text-black disabled:bg-black/5 dark:disabled:bg-white/5 disabled:text-black/30 dark:disabled:text-white/30"},{default:j(()=>[L.value?(t(),R(r(me),{key:0,class:"w-4 h-4 animate-spin mr-2","stroke-width":1})):A("",!0),n[14]||(n[14]=q(" Submit Application ",-1))]),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"])],512))}},$r={class:"space-y-6"},Lr={key:0,class:"flex justify-center items-center min-h-[200px]"},Mr={class:"rounded-2xl p-6 bg-[rgba(0,0,0,0.03)] dark:bg-[rgba(255,255,255,0.03)]"},Pr={class:"grid grid-cols-1 md:grid-cols-3 gap-3"},Sr={class:"text-2xl text-black dark:text-white tracking-tight mt-0.5"},jr={class:"text-2xl text-black dark:text-white tracking-tight mt-0.5"},Dr={class:"text-xs font-normal text-black/30 dark:text-white/30 mt-0.5"},Ar={class:"text-2xl text-black dark:text-white tracking-tight mt-0.5"},Ur={class:"text-xs font-normal text-black/30 dark:text-white/30 mt-0.5"},Br={class:"mt-4"},Ir={key:0,class:"rounded-2xl p-6 bg-[rgba(0,0,0,0.03)] dark:bg-[rgba(255,255,255,0.03)]"},Fr={key:2,class:"rounded-2xl p-6 bg-[rgba(0,0,0,0.03)] dark:bg-[rgba(255,255,255,0.03)] flex flex-col items-center justify-center gap-3 min-h-[160px]"},Er={__name:"SubscriptionContent",setup(c){const s=xe("closeSettingsDialog",null),p=xe("openPricingDialog",null),{user:h}=ue();function k(){if(s&&s(),typeof p=="function"){p();return}typeof window<"u"&&typeof window.dispatchEvent=="function"&&window.dispatchEvent(new CustomEvent("open-pricing-dialog")),typeof window<"u"&&(typeof window.open=="function"?window.open("/pricing","_blank","noopener,noreferrer"):window.location&&typeof window.location.assign=="function"&&window.location.assign("/pricing"))}const{toast:b}=pe(),g=y(!0),_=y(null),w=y({}),S=async()=>{g.value=!0;
1try{const[C,D]=await Promise.all([us(),nt().catch(m=>(console.error("Failed to fetch pricing plans:",m),{}))]);_.value=C,w.value=D||{}}catch(C){console.error(C),b({title:"Failed to load subscription",description:C.message||"Unknown error",variant:"destructive"})}finally{g.value=!1}},L=async()=>{if(confirm("Are you sure you want to cancel your subscription?"))try{if(await ps(),typeof window<"u"&&window.Brevo){const C=h.value?.email;window.Brevo.push(function(){window.Brevo.track("subscription_cancelled")}),C&&window.Brevo.push(function(){window.Brevo.identify({identifiers:{email_id:C},attributes:{CURRENT_PLAN:"free"}})})}b({title:"Subscription cancelled",description:"Your subscription has been cancelled successfully."}),S()}catch(C){b({title:"Failed to cancel subscription",description:C.message||"Unknown error",variant:"destructive"})}};oe(()=>{S()});const d=I(()=>{const C=_.value?.status,D=_.value?.plan;return!D||D==="free"?!1:["active","trialing"].includes(C)}),u=I(()=>d.value&&_.value?.plan||"free"),$=C=>C?new Date(C).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"}):"",F=I(()=>{const C=u.value;if(!C||C==="free")return"$0.00";const D=w.value[C];return D?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(D.price):"Custom"}),N=I(()=>{const C=u.value;return!C||C==="free"?"month":C.endsWith("_yearly")?"year":"month"}),H=C=>({free:"Free Plan",pro_l1_monthly:"Pro Plan",pro_l1_yearly:"Pro Plan",pro_l2_monthly:"Pro Plan Level 2",pro_l2_yearly:"Pro Plan Level 2",pro_l3_monthly:"Pro Plan Level 3",pro_l3_yearly:"Pro Plan Level 3",ultra_monthly:"Ultra Plan",ultra_yearly:"Ultra Plan"})[C]||C;return(C,D)=>(t(),l("div",$r,[g.value?(t(),l("div",Lr,[x(Ft,{class:"w-6 h-6 animate-spin text-black/30 dark:text-white/30"})])):_.value?(t(),l(W,{key:1},[e("div",Mr,[e("div",Pr,[e("div",null,[D[0]||(D[0]=e("p",{class:"text-sm text-black/60 dark:text-white/60"},"Current plan",-1)),e("h3",Sr,v(H(u.value)),1)]),e("div",null,[D[1]||(D[1]=e("p",{class:"text-sm text-black/60 dark:text-white/60"},"Billing Period",-1)),e("p",jr,v(d.value&&_.value.until?$(_.value.until):"Forever"),1),e("p",Dr,v(d.value&&_.value.until?"Next renewal / Expiry":"Free plan never expires"),1)]),e("div",null,[D[2]||(D[2]=e("p",{class:"text-sm text-black/60 dark:text-white/60"},"Plan Cost",-1)),e("p",Ar,v(F.value),1),e("p",Ur," per "+v(N.value),1)])]),e("div",Br,[e("button",{class:"shrink-0 px-5 py-2 rounded-full text-sm font-normal transition-all duration-200 active:scale-[0.98] bg-black dark:bg-white text-white dark:text-black hover:opacity-80",onClick:k},v(d.value?"Change Plan":"Upgrade Plan"),1)])]),d.value?(t(),l("div",Ir,[e("div",{class:"flex items-center justify-between"},[D[3]||(D[3]=e("div",null,[e("h3",{class:"text-sm font-normal text-black/60 dark:text-white/60"}," Cancel Subscription "),e("p",{class:"text-xs font-normal text-black/40 dark:text-white/40 mt-0.5"}," Downgrades to Free at end of billing period. ")],-1)),e("button",{class:"text-sm font-normal text-black/40 dark:text-white/40 hover:text-red-500 dark:hover:text-red-400 transition-colors duration-200",onClick:L}," Cancel ")])])):A("",!0)],64)):(t(),l("div",Fr,[D[4]||(D[4]=e("p",{class:"text-sm font-normal text-black/60 dark:text-white/60"}," Unable to load subscription ",-1)),e("button",{onClick:S,class:"px-4 py-1.5 rounded-full text-sm font-normal bg-black/5 dark:bg-white/5 text-black/60 dark:text-white/60 hover:bg-black/10 dark:hover:bg-white/10 transition-all duration-200"}," Retry ")]))]))}},Rr={class:"space-y-6"},Zr={class:"rounded-2xl p-6 bg-[rgba(0,0,0,0.03)] dark:bg-[rgba(255,255,255,0.03)]"},Tr={class:"flex flex-col md:flex-row items-center gap-8"},Vr={class:"flex-1 space-y-3 w-full"},Nr={class:"relative flex items-center"},Or={class:"rounded-lg p-3 flex items-center justify-between bg-black/5 dark:bg-white/5"},zr={class:"text-xl font-light text-black/80 dark:text-white/80 tracking-tight"},qr="border border-solid border-black/[0.02] dark:border-white/[0.02] bg-black/5 dark:bg-white/5 rounded-lg shadow-none placeholder:text-black/30 dark:placeholder:text-white/30 focus:ring-0 focus-visible:ring-0 focus:outline-none focus-visible:outline-none",Hr={__name:"RedeemContent",setup(c){const{toast:s}=pe(),{usage:p,fetchUsage:h,isAuthenticated:k}=ue(),b=y(""),g=y(!1),_=I(()=>p.value),w=async()=>
1{if(!k.value){ke("/login");return}if(!b.value.trim()){s({title:"Please enter a redemption code",variant:"destructive"});return}try{g.value=!0;const L=await bs(b.value.trim());s({title:"Redemption Successful!",description:L.message||"Your benefits have been added to your account."}),b.value="",await h()}catch(L){console.error("Error redeeming code:",L);let d="Invalid or expired redemption code.";L.message&&(L.message.includes("already redeemed")?d="You have already redeemed this code.":L.message.includes("expired")||L.message.includes("usage limit")?d="This redemption code has expired or reached its usage limit.":L.message.includes("Invalid or inactive")?d="Invalid or inactive redemption code.":L.message.includes("required")?d="Please enter a redemption code.":d=L.message),s({title:"Redemption Failed",description:d,variant:"destructive"})}finally{g.value=!1}},S=L=>{L.key==="Enter"&&w()};return(L,d)=>(t(),l("div",Rr,[e("div",Zr,[e("div",Tr,[d[4]||(d[4]=e("div",{class:"flex-shrink-0 flex items-center justify-center"},[e("img",{src:lt,alt:"Redeem illustration",class:"w-[160px] h-[160px] object-contain"})],-1)),e("div",Vr,[d[3]||(d[3]=e("label",{for:"redemption-code",class:"text-sm px-1 font-normal text-black/60 dark:text-white/60"}," Enter code to redeem credits ",-1)),e("div",Nr,[x(r(we),{id:"redemption-code",modelValue:b.value,"onUpdate:modelValue":d[0]||(d[0]=u=>b.value=u),placeholder:"Enter redemption code",class:B([qr,"w-full pl-4 pr-28 py-6 text-base font-medium text-black dark:text-white"]),disabled:g.value,onKeypress:S},null,8,["modelValue","class","disabled"]),x(r(ge),{onClick:w,disabled:g.value||!b.value.trim(),class:"absolute right-2 px-6 text-base text-white dark:text-black font-normal transition-all duration-200 bg-black/90 dark:bg-white/90 hover:bg-black/80 dark:hover:bg-white/80 disabled:opacity-40"},{default:j(()=>[g.value?(t(),R(r(me),{key:0,class:"w-3.5 h-3.5 mr-1.5 animate-spin"})):A("",!0),d[1]||(d[1]=q(" Redeem ",-1))]),_:1},8,["disabled"])]),e("div",Or,[d[2]||(d[2]=e("div",{class:"flex items-center gap-2"},[e("span",{class:"text-sm font-normal text-black/60 dark:text-white/60"}," Current Credits ")],-1)),e("div",zr,v(_.value?.remaining||0),1)])])])]),d[5]||(d[5]=be('<div class="rounded-2xl px-5 py-4 bg-[rgba(0,0,0,0.03)] dark:bg-[rgba(255,255,255,0.03)]"><h3 class="text-sm font-normal text-black/60 dark:text-white/60 mb-4"> How to use redemption codes? </h3><ul class="space-y-3"><li class="flex items-start gap-2 text-sm text-black/50 dark:text-white/50"><svg class="w-4 h-4 text-black/40 dark:text-white/40 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> Enter your redemption code in the field above </li><li class="flex items-start gap-2 text-sm text-black/50 dark:text-white/50"><svg class="w-4 h-4 text-black/40 dark:text-white/40 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> Click the &quot;Redeem&quot; button to add credits to your account </li><li class="flex items-start gap-2 text-sm text-black/50 dark:text-white/50"><svg class="w-4 h-4 text-black/40 dark:text-white/40 mt-0.5 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg> Use your credits to generate amazing AI designs </li></ul></div>',1))]))}},Gr={class:"mb-6"},Yr={key:0,class:"h-32 flex items-center justify-center bg-black/5 dark:bg-white/5 rounded-xl"},Wr={key:1,class:"h-32 flex items-center justify-center bg-black/5 dark:bg-white/5 rounded-xl text-xs text-black/40 dark:text-white/40"},Kr={key:2,class:"h-32 flex items-end justify-between gap-1 pt-4 px-2"},Jr={class:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 opacity-0 group-hover:opacity-100 transition-opacity bg-black dark:bg-white text-white dark:text-black text-[10px] px-2 py-1 rounded pointer-events-none whitespace-nowrap z-10 shadow-lg"},Qr={class:"font-bold"},Xr={class:"opacity-60"},ei={class:"mt-2 text-[10px] text-black/40 dark:text-white/40 truncate w-full text-center"},ti={__name:"CreditsBarChart",props:{data:{type:Array,default:()=>[]},loading:Boolean},setup(c){const s=c,p=I(()=>s.data.length?Math.max(...s.data.map(k=>k.amount)):0),h=I(()=>s.data.map(k=>{const b=p.value?k.amount/p.value*100:0,[g,_,w]=k.date.split("-").map(Number),S=new Date(g,_-1,w);return{...k,height:b,label:S.toLocaleDateString(void 0,{month:"numeric",day:"numeric"})}}));return(k,b)=>(t(),l("div",Gr,[b[1]||(b[1]=e("div",{class:"text-sm font-medium mb-4 text-black/80 dark:text-white/80"},"Daily Usage",-1)),c.loading?(t(),l("div",Yr,[...b[0]||(b[0]=[e("div",{class:"w-5 h-5 border-2 border-black/20 dark:border-white/20 border-t-black/60 dark:border-t-white/60 rounded-full animate-spin"},null,-1)])])):c.data.length?(t(),l("div",Kr,[(t(!0),l(W,null,te(h.value,g=>(t(),l("div",{key:g.date,class:"flex flex-col items-center flex-1 h-full justify-end group relative"},[e("div",{class:"w-full max-w-[24px] bg-black/10 dark:bg-white/10 rounded-t-sm hover:bg-black/80 dark:hover:bg-white/80 transition-colors duration-200 relative min-h-[4px]",style:He({height:`${g.height}%`})},[e("div",Jr,[e("span",Qr,v(g.amount),1),e("div",Xr,v(g.date),1)])],4),e("div",ei,v(g.label),1)]))),128))])):(t(),l("div",Wr," No chart data "))]))}},ai={class:"space-y-4"},li={key:0,class:"flex flex-col items-center justify-center py-24 text-black/40 dark:text-white/40"},si={key:1,class:"bg-red-50 dark:bg-red-950/20 border border-red-100 dark:border-red-800/30 text-black/60 dark:text-white/60 p-4 rounded-xl flex items-center gap-3"},ni={key:2,class:"flex flex-col items-center justify-center py-24 text-black/40 dark:text-white/40 bg-white/50 dark:bg-white/5 rounded-2xl border border-dashed border-black/10 dark:border-white/10"},oi={class:"divide-y divide-black/5 dark:divide-white/5"},ri={class:"w-8 h-8 flex items-center justify-center shrink-0"},ii={class:"text-xs text-black/40 dark:text-white/40 min-w-[140px]"},ci={class:"text-xs text-black/40 dark:text-white/40 flex-1 min-w-[100px]"},di={key:0},ui={key:1}
1,pi={key:0},fi={key:1,class:"text-black/30 dark:text-white/30"},mi={key:0,class:"flex justify-center py-4"},xi={key:1,class:"text-center py-4 text-black/20 dark:text-white/20 text-xs"},Ve=20,bi={__name:"CreditsHistory",setup(c){const s=y(null),p=y(!0),h=y(null),k=y([]),b=y(!0),g=y([]),_=y(0),w=y(-1),S=y(!0),L=y(!1),d=y([]),u=y(!1),$=a=>a._kind==="spent"?new Date(a.request_time):new Date(a.created_at),F=I(()=>{const a=g.value.map(i=>({...i,_kind:"spent"})),n=d.value.map(i=>({...i,_kind:"earned"}));return[...a,...n].sort((i,G)=>$(G)-$(i))}),N=I(()=>L.value),H=I(()=>S.value),C=a=>{if(!a)return{date:"-",time:""};const n=new Date(a),i=n.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),G=n.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"});return{date:i,time:G}},D=a=>({llm:{icon:Jt,label:"AI Generation"},image:{icon:Et,label:"Image Generation"}})[a]||{icon:aa,label:"Usage"},m=a=>({SYSTEM:{icon:ea,label:"System"},DAILY_FREE:{icon:qt,label:"Daily Free"},PURCHASE:{icon:Se,label:"Purchase"},ADMIN_GRANT:{icon:Vt,label:"Admin Grant"},MIGRATION_LEGACY:{icon:Zt,label:"Legacy Migration"},GIFT:{icon:at,label:"Gift"},REFERRAL:{icon:sa,label:"Referral"},PROMOTION:{icon:zt,label:"Promotion"}})[a]||{icon:la,label:"Earned"},P=a=>{if(!a)return"";const n=a.split("/");return n[n.length-1]},Z=a=>a?new Date(a)<new Date:!1,f=async()=>{if(!(L.value||!S.value||_.value===w.value)){w.value=_.value,L.value=!0,h.value=null;try{const a=await is({limit:Ve,skip:_.value});if((!Array.isArray(a)||a.length<Ve)&&(S.value=!1),Array.isArray(a)&&a.length>0){const n=new Set(g.value.map(G=>G.id)),i=a.filter(G=>G.id&&!n.has(G.id));i.length>0?(g.value.push(...i),_.value+=a.length):a.length>0&&(S.value=!1)}else S.value=!1}catch(a){console.error("Failed to fetch spent records:",a),S.value=!1,g.value.length===0&&(h.value=a.message||"Failed to load records")}finally{L.value=!1}}},o=async()=>{if(!u.value)try{const a=await ds({});a.details&&Array.isArray(a.details)&&(d.value=a.details)}catch(a){console.error("Failed to fetch earned records:",a)}finally{u.value=!0}},U=async()=>{b.value=!0;try{const a=new Date;a.setHours(23,59,59,999);const n=new Date;n.setDate(a.getDate()-14),n.setHours(0,0,0,0);const i=Intl.DateTimeFormat().resolvedOptions().timeZone,G=await cs({startDate:n.toISOString(),endDate:a.toISOString(),timezone:i}),ne=new Map,Y=new Date(n);for(;Y<=a;){const T=`${Y.getFullYear()}-${String(Y.getMonth()+1).padStart(2,"0")}-${String(Y.getDate()).padStart(2,"0")}`;ne.set(T,0),Y.setDate(Y.getDate()+1)}G.forEach(T=>{ne.has(T.date)&&ne.set(T.date,Number(T.amount||0))}),k.value=Array.from(ne.entries()).map(([T,ae])=>({date:T,amount:ae})).sort((T,ae)=>new Date(T.date)-new Date(ae.date))}catch(a){console.error("Failed to load chart data:",a)}finally{b.value=!1}},M=async()=>{p.value||await f()};return tt(s,()=>M(),{distance:20,canLoadMore:()=>s.value&&s.value.offsetParent!==null&&!p.value&&!N.value&&H.value}),oe(async()=>{await Promise.all([f(),o(),U()]),p.value=!1}),(a,n)=>(t(),l("div",{ref_key:"containerRef",ref:s,class:"h-full overflow-y-auto"},[e("div",ai,[p.value?(t(),l("div",li,[x(r(me),{class:"w-8 h-8 animate-spin mb-2 text-black/40 dark:text-white/40","stroke-width":1}),n[0]||(n[0]=e("span",{class:"text-sm"},"Loading records...",-1))])):h.value?(t(),l("div",si,v(h.value),1)):F.value.length===0?(t(),l("div",ni,[x(r(Kt),{class:"w-12 h-12 mb-3 opacity-20"}),n[1]||(n[1]=e("p",null,"No records found",-1))])):(t(),l(W,{key:3},[x(ti,{data:k.value,loading:b.value},null,8,["data","loading"]),e("div",oi,[(t(!0),l(W,null,te(F.value,i=>(t(),l("div",{key:`${i._kind}-${i.id}`,class:"group flex items-center gap-4 py-2.5 transition-colors duration-200"},[e("div",ri,[(t(),R(se(i._kind==="spent"?D(i.type).icon:m(i.source).icon),{class:B(["w-4 h-4",i._kind==="spent"?"text-black/50 dark:text-white/50":"text-emerald-500"])},null,8,["class"]))]),e("div",{class:B(["text-xs font-normal min-w-[110px]",i._kind==="spent"?"text-black/80 dark:text-white/80":"text-emerald-600 dark:text-emerald-400"])},v(i._kind==="spent"?D(i.type).label:m(i.source).label),3),e("div",ii,[q(v(C(i._kind==="spent"?i.request_time:i.created_at).date)+" ",1),n[2]||(n[2]=e("span",{class:"mx-1"},"·",-1)),q(" "+v(C(i._kind==="spent"?i.request_time:i.created_at).time),1)]),e("div",ci,[i._kind==="spent"?(t(),l(W,{key:0},[q(v(i.model_name?P(i.model_name):"-"),1)],64)):(t(),l(W,{key:1},[i.expired_at?(t(),l("span",di," Expires: "+v(C(i.expired_at).date),1)):(t(),l("span",ui,"-"))],64))]),e("div",{class:B(["text-xs font-medium tabular-nums text-right min-w-[60px]",i._kind==="spent"?i.credit>0?"text-black/80 dark:text-white/80":"text-black/30 dark:text-white/30":"text-emerald-500"])},[i._kind==="spent"?(t(),l(W,{key:0},[i.credit>0?(t(),l("span",pi,"-"+v(i.credit),1)):(t(),l("span",fi,"Free"))],64)):(t(),l("span",{key:1,class:B([Z(i.expired_at)?"line-through opacity-50":""])}," +"+v(i.amount),3))],2)]))),128))]),N.value?(t(),l("div",mi,[x(r(me),{class:"w-5 h-5 animate-spin text-black/40 dark:text-white/40","stroke-width":1})])):A("",!0),!H.value&&F.value.length>0?(t(),l("div",xi," No more records ")):A("",!0)],64))])],512))}},hi={class:"h-full bg-transparent relative"},vi={key:0,class:"absolute inset-0 flex items-center justify-center"},ki={key:1,class:"absolute inset-0 flex items-center justify-center"},gi={key:2,class:"h-full overflow-y-auto custom-scrollbar"},yi={class:"max-w-5xl mx-auto py-12 px-8"},wi={class:"bg-transparent"},Ci={class:"space-y-1"},_i={class:"flex items-center space-x-4 flex-1 min-w-0"},$i={class:"relative flex-shrink-0"},Li={class:"w-14 h-14 bg-black/5 dark:bg-white/5 rounded-lg flex items-center justify-center overflow-hidden"},Mi=["src","alt"],Pi={key:1,class:"w-7 h-7 bg-black/10 dark:bg-white/10 rounded"},Si={class:"flex-1 min-w-0"},ji={class:"text-sm font-medium text-black/90 dark:text-white/90 mb-0.5 truncate"},Di={class:"flex items-center text-xs text-black/50 dark:text-white/50"},Ai={class:"flex items-center space-x-2 ml-4 opacity-0 group-hover:opacity-100 transition-opacity duration-150"},Ui={key:0,class:"mt-8 pt-6 border-t border-black/5 dark:border-white/5"},Bi={__name:"TrashSettings",props:{debug:Boolean,publicPath:String},setup(c){function s(d){return d.toString().padStart(2,"0")}function p(d,u="-"){return d=new Date(d),[d.getFullYear(),s(d.getMonth()+1),s(d.getDate())].join(u)+" "+[s(d.getHours()),s(d.getMinutes()),s(d.getSeconds())].join(":")}const{toast:h}=pe(),k=y([]),b=y(!1),g=y(""),_=I(()=>{let d=k.value;return g.value&&(d=d.filter(u=>u.name.toLowerCase().includes(g.value.toLowerCase()))),d.sort((u,$)=>$.deletedAt-u.deletedAt)});async function w(){b.value=!0;try{const d=await hs({limit:100});k.value=d.map(u=>({...u,deletedAt:u.deleted_at||Date.now()}))}finally{b.value=!1}}async function S(d){try{await vs(d.id),k.value=k.value.filter(u=>u.id!==d.id),h({title:"Project restored successfully",variant:"success"})}catch(u){console.error("Failed to restore project:",u),h({title:"Failed to restore project",variant:"destructive"})}}async function L(d){if(confirm("Are you sure you want to permanently delete this project? This action cannot be undone."))try{await ks(d.id,{
1confirmed:!0}),k.value=k.value.filter(u=>u.id!==d.id),h({title:"Project permanently deleted",variant:"success"})}catch(u){console.error("Failed to permanently delete project:",u),h({title:"Failed to delete project",variant:"destructive"})}}return oe(()=>{w()}),(d,u)=>(t(),l("div",hi,[b.value?(t(),l("div",vi,[...u[0]||(u[0]=[e("div",{class:"flex flex-col items-center gap-4"},[e("div",{class:"w-6 h-6 border-2 border-black/10 border-t-black/90 dark:border-white/10 dark:border-t-white/90 rounded-full animate-spin"}),e("div",{class:"text-sm text-black/50 dark:text-white/50"},"Loading projects...")],-1)])])):_.value.length===0?(t(),l("div",ki,[...u[1]||(u[1]=[be('<div class="max-w-md w-full bg-transparent p-8 text-center"><div class="mx-auto mb-4 flex items-center justify-center"><svg width="60" height="60" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" class="text-black/20 dark:text-white/20"><path d="M6.53223 17.0713C5.54102 17.0713 4.89844 16.4424 4.85059 15.4648L4.37207 5.51855H3.55859C3.28516 5.51855 3.0459 5.28613 3.0459 4.99902C3.0459 4.71875 3.28516 4.48633 3.55859 4.48633H6.66211V3.44043C6.66211 2.44922 7.30469 1.84766 8.35742 1.84766H10.9551C12.0078 1.84766 12.6504 2.44922 12.6504 3.44043V4.48633H15.7744C16.0547 4.48633 16.2803 4.71875 16.2803 4.99902C16.2803 5.2793 16.0547 5.51855 15.7744 5.51855H14.9541L14.4824 15.458C14.4346 16.4355 13.7783 17.0713 12.8008 17.0713H6.53223ZM7.74902 3.50879V4.48633H11.5635V3.50879C11.5635 3.11914 11.29 2.86621 10.8799 2.86621H8.43262C8.02246 2.86621 7.74902 3.11914 7.74902 3.50879ZM6.62793 16.0391H12.6914C13.0947 16.0391 13.3887 15.752 13.4023 15.3418L13.8535 5.51855H5.44531L5.92383 15.3418C5.94434 15.7451 6.23828 16.0391 6.62793 16.0391ZM7.63965 14.8701C7.38672 14.8701 7.21582 14.7129 7.20898 14.4668L7.00391 7.15918C6.99707 6.91992 7.16797 6.75586 7.42773 6.75586C7.67383 6.75586 7.84473 6.91309 7.85156 7.15234L8.06348 14.4668C8.07031 14.7061 7.89941 14.8701 7.63965 14.8701ZM9.66309 14.8701C9.40332 14.8701 9.22559 14.7061 9.22559 14.4668V7.15918C9.22559 6.91992 9.40332 6.75586 9.66309 6.75586C9.92285 6.75586 10.1074 6.91992 10.1074 7.15918V14.4668C10.1074 14.7061 9.92285 14.8701 9.66309 14.8701ZM11.6934 14.8701C11.4336 14.8701 11.2627 14.7061 11.2695 14.4668L11.4746 7.15918C11.4814 6.91309 11.6523 6.75586 11.8984 6.75586C12.1582 6.75586 12.3291 6.91992 12.3223 7.15918L12.1172 14.4668C12.1104 14.7129 11.9395 14.8701 11.6934 14.8701Z" fill="currentColor"></path></svg></div><h3 class="text-base font-normal text-black/30 dark:text-white/30">Trash is empty</h3></div>',1)])])):(t(),l("div",gi,[e("div",yi,[e("div",wi,[e("div",Ci,[(t(!0),l(W,null,te(_.value,$=>(t(),l("div",{key:$.id,class:"group flex items-center justify-between py-4 px-5 hover:bg-black/5 dark:hover:bg-white/5 rounded-lg transition-colors duration-150"},[e("div",_i,[e("div",$i,[e("div",Li,[$.thumbnail?(t(),l("img",{key:0,src:$.thumbnail,alt:$.name,class:"w-full h-full object-cover"},null,8,Mi)):(t(),l("div",Pi))])]),e("div",Si,[e("h3",ji,v($.name),1),e("div",Di,[u[2]||(u[2]=e("span",null,"Deleted at",-1)),u[3]||(u[3]=e("span",{class:"mx-1.5"},"·",-1)),e("time",null,v(p($.deletedAt)),1)])])]),e("div",Ai,[x(r(ge),{onClick:F=>S($),variant:"ghost",size:"sm",class:"text-black/70 dark:text-white/70 hover:bg-black/5 dark:hover:bg-white/5 hover:text-black/90 dark:hover:text-white/90 h-8 px-3"},{default:j(()=>[x(r(Xt),{class:"w-3.5 h-3.5 mr-1.5"}),u[4]||(u[4]=q(" Restore ",-1))]),_:1},8,["onClick"]),x(r(ge),{onClick:F=>L($),variant:"ghost",size:"sm",class:"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 hover:text-red-700 dark:hover:text-red-300 h-8 px-3"},{default:j(()=>[x(r(Nt),{class:"w-3.5 h-3.5 mr-1.5"}),u[5]||(u[5]=q(" Delete Permanently ",-1))]),_:1},8,["onClick"])])]))),128))])]),!b.value&&_.value.length>0?(t(),l("div",Ui,[...u[6]||(u[6]=[e("p",{class:"text-xs text-black/40 dark:text-white/40 text-center"}," Items in trash are automatically deleted after 30 days ",-1)])])):A("",!0)])]))]))}},Ii={class:"flex flex-col md:flex-row h-full"},Fi={class:"w-full md:w-[228px] shrink-0 p-5 md:p-4 border-r border-black/5 dark:border-white/5"},Ei={class:"flex md:flex-col gap-1 overflow-x-auto md:overflow-x-visible"},Ri=["onClick"],Zi={class:"flex-1 min-h-0"},Ti={class:"h-full overflow-y-auto"},Vi={class:"max-w-[800px] mx-auto px-9 pt-6 pb-12"},Ni={class:"text-xl font-normal text-black/80 dark:text-white/80"},Oi={class:"h-full flex flex-col"},zi={class:"max-w-[800px] w-full mx-auto px-8 pt-6 shrink-0"},qi={class:"text-xl font-normal text-black/80 dark:text-white/80"},Hi={class:"max-w-[800px] w-full mx-auto px-6 py-2 flex-1 min-h-0 flex flex-col"},Gi={class:"h-full flex flex-col"},Yi={class:"max-w-[800px] w-full mx-auto px-8 pt-6 shrink-0"},Wi={class:"text-xl font-normal text-black/80 dark:text-white/80"},Ki={class:"max-w-[800px] w-full mx-auto px-6 py-2 flex-1 min-h-0 flex flex-col"},Ji={class:"h-full overflow-y-auto"},Qi={class:"max-w-[800px] mx-auto px-8 pt-6 pb-12"},Xi={class:"text-xl font-normal text-black/80 dark:text-white/80"},e1={class:"max-w-[800px] mx-auto p-6 pt-2"},t1={class:"h-full overflow-y-auto"},a1={class:"max-w-[800px] mx-auto px-8 pt-6 pb-12"},l1={class:"text-xl font-normal text-black/80 dark:text-white/80"},s1={class:"max-w-[800px] mx-auto p-6 pt-2"},n1={class:"h-full flex flex-col"},o1={class:"max-w-[800px] w-full mx-auto px-8 pt-6 shrink-0"},r1={class:"text-xl font-normal text-black/80 dark:text-white/80"},i1={class:"max-w-[800px] w-full mx-auto px-6 py-2 flex-1 min-h-0 flex flex-col"},c1={__name:"SettingsCenter",props:{initialTab:{type:String,default:"general"}},setup(c){const s=c,p=y(s.initialTab==="credits"?"usage":s.initialTab),h=y(()=>{});ce("refreshProfile",h),ee(()=>s.initialTab,g=>{g&&(g==="credits"?p.value="usage":p.value=g,g==="general"&&_e(()=>{h.value&&typeof h.value=="function"&&h.value()}))}),ee(p,(g,_)=>{g==="general"&&h.value&&h.value()}),oe(()=>{s.initialTab==="general"&&_e(()=>{_e(()=>{h.value&&typeof h.value=="function"&&h.value()})})});const k=[{id:"general",label:"General"},{id:"usage",label:"Credits Usage"},{id:"billing",label:"Billing & Invoices"},{id:"subscription",label:"Subscription"},{id:"redeem",label:"Redeem"},{id:"trash",label:"Trash"}];function b(g){p.value=g}return(g,_)=>(t(),l("div",Ii,[e("div",Fi,[e("nav",Ei,[(t(),l(W,null,te(k,w=>e("button",{key:w.id,onClick:S=>b(w.id),class:B(["flex items-center gap-2 md:gap-3 px-3 py-2 md:py-2.5 rounded-xl text-sm font-normal transition-all duration-200 whitespace-nowrap md:w-full border-0 outline-none shadow-none ring-0 appearance-none",p.value===w.id?"bg-black/5 text-black dark:bg-white/5 dark:text-white":"bg-transparent text-black/60 dark:text-white/60 hover:bg-black/5 dark:hover:bg-white/5 hover:text-black dark:hover:text-white"])},[e("span",null,v(w.label),1)],10,Ri)),64))])]),e("div",Zi,[J(e("div",Ti,[e("div",Vi,[e("h2",Ni,v(k.find(w=>w.id==="general")?.label||""),1)]),x(Uo)],512),[[fe,p.value==="general"]]),J(e("div",Oi,[e("div",zi,[e("h2",qi,v(k.find(w=>w.id==="usage")?.label||""),1)]),e("div",Hi,[x(bi)])],512),[[fe,p.value==="usage"]]),J(e("div",Gi,[e("div",Yi,[e("h2",Wi,v(k.find(w=>w.id==="billing")?.label||""),1)]),e("div",Ki,[x(_r)])],512),[[fe,p.value==="billing"]]),J(e("div",Ji,[e("div",Qi,[e("h2",Xi,v(k.find(w=>w.id==="subscription")?.label||""),1)]),e("div",e1,[x(Er)])],512),[[fe,p.value==="subscription"]]),J(e("div",t1,[e("div",a1,[e("h2",l1,v(k.find(w=>w.id==="redeem")?.label||""),1)]),e("div",s1,[x(Hr)])],512),[[fe,p.value==="redeem"]]),J(e("div",n1,[e("div",o1,[e("h2",r1,v(k.find(w=>w.id==="trash")?.label||""),1)]),e("div",i1,[x(Bi)])],512),[[fe,p.value==="trash"]])])]))}},d1={key:0,class:"fixed inset-0 z-[100] flex items-center justify-center p-4"},u1={class:"relative w-full max-w-[1120px] h-[70vh] bg-white/90 dark:bg-[#292927]/85 backdrop-blur-xl rounded-[24px] shadow-2xl border border-black/5 dark:border-white/5 overflow-hidden flex flex-col"},p1={class:"flex-1 overflow-hidden"},f1={__name:"SettingsDialog",props:{isOpen:{type:Boolean,default:!1},initialTab:{type:String,default:"general"},settingsKey:{type:[String,Number],default:0}},emits:["update:isOpen","close"],setup(c,{emit:s}){const p=s,h=()=>{p("update:isOpen",!1),p("close")};
1return ce("closeSettingsDialog",h),(k,b)=>(t(),R(Ce,{to:"body"},[x(Oe,{name:"settings-dialog"},{default:j(()=>[c.isOpen?(t(),l("div",d1,[e("div",{class:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:h}),e("div",u1,[e("div",p1,[(t(),R(c1,{key:c.settingsKey,"initial-tab":c.initialTab},null,8,["initial-tab"]))])])])):A("",!0)]),_:1})]))}},m1=he(f1,[["__scopeId","data-v-7893c14d"]]),x1={class:"w-8 h-8 shrink-0 flex items-center justify-center relative"},b1={class:"flex-1 overflow-hidden min-h-0 flex flex-col px-2"},h1={class:"space-y-0.5 pt-[22px]"},v1={class:"shrink-0 w-5 h-5 flex items-center justify-center text-base"},k1={class:"space-y-0.5"},g1=["onClick"],y1={class:"shrink-0 w-5 h-5 flex items-center justify-center text-base"},w1={class:"shrink-0 w-5 h-5 flex items-center justify-center text-base"},C1={class:"mt-auto pb-3 space-y-0.5"},_1={href:"https://discord.gg/twbZEHkuWx",target:"_blank",rel:"noopener noreferrer",class:"w-full h-10 flex items-center gap-2 px-2 text-sm font-medium transition-all duration-200 rounded-lg text-black/80 hover:bg-black/[0.03] hover:text-black border border-black/[0.03]"},$1={class:"main-content flex-1 h-screen min-w-0 relative z-10 overflow-y-auto overflow-x-hidden"},L1={class:"main-content-inner h-full flex flex-col pb-20 lg:pb-0"},M1={key:0,class:"bg-transparent px-4 md:px-6 lg:px-8 py-3 pb-6 relative shrink-0"},P1={class:"flex items-center justify-between gap-4"},S1={class:"flex items-center space-x-3 sm:space-x-4 min-w-0 flex-1 px-1 md:px-2"},j1={key:2,class:"text-xl font-medium text-black/80 tracking-tight truncate"},D1={key:0,class:"shrink-0"},A1={class:"flex-1 min-h-0 h-full"},U1={class:"lg:hidden fixed bottom-0 left-0 right-0 z-50 pointer-events-none"},B1={key:1,class:"absolute bottom-full left-6 right-6 mb-2 pointer-events-auto"},I1={class:"bg-white/90 backdrop-blur-[60px] rounded-[24px] shadow-[0_4px_24px_rgba(0,0,0,0.12)] p-3 mx-auto max-w-sm flex flex-col gap-2"},F1={class:"flex items-center gap-3"},E1={class:"w-5 h-5 flex items-center justify-center flex-shrink-0"},R1={class:"text-base font-normal text-black/90"},Z1={class:"text-sm font-normal px-4 py-2 bg-black/5 rounded-full"},T1={class:"px-6 pb-3 pointer-events-none",style:{"padding-bottom":"max(12px, env(safe-area-inset-bottom))"}},V1={class:"flex items-center justify-around bg-white/90 backdrop-blur-[60px] rounded-full shadow-[0_4px_24px_rgba(0,0,0,0.1)] border border-black/5 px-2 py-2 pointer-events-auto mx-auto max-w-xs"},N1={class:"text-xl flex items-center justify-center"},O1={__name:"workspace",setup(c){xt({title:"Workspace - Veeso AI",meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{name:"robots",content:"noindex, nofollow"},{name:"description",content:"Your Veeso AI workspace. Create, manage, and organize your AI-generated designs all in one place."},{property:"og:title",content:"Workspace - Veeso AI"},{property:"og:type",content:"website"},{property:"og:url",content:"https://veeso.ai/workspace"},{property:"og:description",content:"Your Veeso AI workspace. Create and manage your designs."},{name:"twitter:card",content:"summary_large_image"},{name:"twitter:title",content:"Workspace - Veeso AI"}],link:[{rel:"canonical",href:"https://veeso.ai/workspace"}]});let s=!1,p=null;oe(()=>{s=document.documentElement.classList.contains("dark"),document.documentElement.classList.remove("dark"),p=new MutationObserver(V=>{V.forEach(O=>{O.attributeName==="class"&&document.documentElement.classList.contains("dark")&&document.documentElement.classList.remove("dark")})}),p.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}),Ie(()=>{p&&(p.disconnect(),p=null),s&&document.documentElement.classList.add("dark")});const h=ht(),k=y(null);
1ce("updateBackgroundImage",V=>{k.value=V});const b=y(!1),g=y(!1),_=y(!1);function w(){b.value=!b.value,_.value=!1}const S=[{id:"create",label:"Create",icon:Za,to:"/workspace/create"},{id:"magic-templates",label:"Magic templates",icon:Ja,to:"/workspace/magic-templates"}],L=[{id:"designs",label:"Your designs",icon:Ca,to:"/workspace/designs"},{id:"favorites",label:"Favorites",icon:Ga,to:"/workspace/favorites"},{id:"assets",label:"Assets",icon:Ia,to:"/workspace/assets"},{id:"earn-credits",label:"Earn credits",icon:ia,action:"openInvite"}],d=[...S,...L],u=[],$=[],F=[...d,...u,...$].filter(V=>typeof V.to=="string"&&V.to.startsWith("/workspace/")),N=I(()=>h.path==="/workspace/create"),H=I(()=>{const V=h.path;return V==="/workspace/create"?"":F.find(re=>re.to===V)?.label||""}),C=y(null);ce("setPageAction",V=>{C.value=V});const D=y(null);ce("setPageTitle",V=>{D.value=V});const m=V=>typeof V.to=="string"?h.path===V.to:!1,P=V=>{f(V),V.action==="openInvite"&&T("invite")},Z=new Set(["create","magic-templates","designs","favorites","assets","earn-credits"]),f=V=>{!V?.id||!Z.has(V.id)||ze.event("veeso_workspace_sidebar_click",{page_name:"workspace_create",sidebar_item:V.id,sidebar_label:V.label})},o=I(()=>d.slice(0,4)),U=y(!1),M=I(()=>[...d.slice(4),...$]),a=I(()=>M.value.some(V=>m(V)));function n(){U.value=!U.value}function i(){U.value=!1}const G=y(!1),ne=y("general"),Y=y(0);function T(V="general"){ne.value=V,Y.value+=1,G.value=!0,i()}ce("openSettingsDialog",T);const ae=y(!1);function le(){ae.value=!0}ce("openPricingDialog",le);const De=()=>{ae.value=!0};oe(()=>window.addEventListener("open-pricing-dialog",De)),Ie(()=>window.removeEventListener("open-pricing-dialog",De));const{usage:rt,fetchUsage:it}=ue(),ct=I(()=>Math.max(0,rt.value.balance));return oe(()=>{it()}),(V,O)=>{const re=je,dt=kt;return t(),l("div",{class:B(["min-h-screen w-full flex relative overflow-hidden",N.value?"":"bg-white"]),style:He(N.value?"background: linear-gradient(180deg, #e2e8ff 0%, #f2f5ff 12.47%, #fffbf9 79.25%, #fffdec 100%)":"")},[e("div",{class:B(["hidden lg:flex flex-col shrink-0 border-r border-black/5 h-screen bg-transparent min-w-0 transition-all duration-300 ease-out",b.value?"w-14":"w-56"]),onMouseenter:O[2]||(O[2]=E=>g.value=!0),onMouseleave:O[3]||(O[3]=E=>g.value=!1)},[e("div",{class:"h-14 flex items-center shrink-0 pl-2.5",onMouseenter:O[0]||(O[0]=E=>_.value=!0),onMouseleave:O[1]||(O[1]=E=>_.value=!1)},[e("div",x1,[x(re,{to:"/",class:B(["transition-opacity duration-200",_.value&&b.value?"opacity-0":"opacity-100"])},{default:j(()=>[...O[7]||(O[7]=[e("img",{src:gt,alt:"Veeso Logo",class:"h-8"},null,-1)])]),_:1},8,["class"]),b.value&&_.value?(t(),l("button",{key:0,onClick:bt(w,["prevent"]),class:"absolute inset-0 flex items-center justify-center"},[x(Te,{class:"w-5 h-5 text-black/40 hover:text-black transition-colors"})])):A("",!0)]),!b.value&&g.value?(t(),l("button",{key:0,onClick:w,class:"ml-auto mr-2 p-1.5 rounded-lg hover:bg-black/5 transition-all duration-200"},[x(Te,{class:"w-5 h-5 text-black/40"})])):A("",!0)],32),e("nav",b1,[e("div",h1,[(t(),l(W,null,te(S,E=>x(re,{key:E.id,to:E.to,onClick:Ae=>f(E),class:B(["w-full h-10 flex items-center gap-2 px-2 text-sm font-medium transition-all duration-200 rounded-lg",m(E)?"bg-black/[0.03] text-black":"text-black/80 hover:bg-black/[0.03] hover:text-black"])},{default:j(()=>[e("span",v1,[(t(),R(se(E.icon)))]),e("span",{class:B(["whitespace-nowrap font-medium overflow-hidden transition-all duration-300 h-10 flex items-center",b.value?"w-0 opacity-0":""])},v(E.label),3)]),_:2},1032,["to","onClick","class"])),64))]),O[10]||(O[10]=e("div",{class:"mx-0 my-3 border-t border-black/5"},null,-1)),e("div",k1,[(t(),l(W,null,te(L,E=>(t(),l(W,{key:E.id},[E.action?(t(),l("button",{key:0,type:"button",onClick:Ae=>P(E),class:B(["w-full h-10 flex items-center gap-2 px-2 text-sm font-medium transition-all duration-200 rounded-lg",m(E)?"bg-black/[0.03] text-black":"text-black/80 hover:bg-black/[0.03] hover:text-black"])},[e("span",y1,[(t(),R(se(E.icon)))]),e("span",{class:B(["whitespace-nowrap font-medium overflow-hidden transition-all duration-300 h-10 flex items-center",b.value?"w-0 opacity-0":""])},v(E.label),3)],10,g1)):(t(),R(re,{key:1,to:E.to,onClick:Ae=>f(E),class:B(["w-full h-10 flex items-center gap-2 px-2 text-sm font-medium transition-all duration-200 rounded-lg",m(E)?"bg-black/[0.03] text-black":"text-black/80 hover:bg-black/[0.03] hover:text-black"])},{default:j(()=>[e("span",w1,[(t(),R(se(E.icon)))]),e("span",{class:B(["whitespace-nowrap font-medium overflow-hidden transition-all duration-300 h-10 flex items-center",b.value?"w-0 opacity-0":""])},v(E.label),3)]),_:2},1032,["to","onClick","class"]))],64))),64))]),e("div",C1,[e("a",_1,[O[9]||(O[9]=e("span",{class:"shrink-0 w-5 h-5 flex items-center justify-center text-base"}
1,[e("svg",{class:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor"},[e("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515a.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0a12.64 12.64 0 0 0-.617-1.25a.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057a19.9 19.9 0 0 0 5.993 3.03a.078.078 0 0 0 .084-.028a14.09 14.09 0 0 0 1.226-1.994a.076.076 0 0 0-.041-.106a13.107 13.107 0 0 1-1.872-.892a.077.077 0 0 1-.008-.128a10.2 10.2 0 0 0 .372-.292a.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127a12.299 12.299 0 0 1-1.873.892a.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028a19.839 19.839 0 0 0 6.002-3.03a.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.956-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419c0-1.333.955-2.419 2.157-2.419c1.21 0 2.176 1.096 2.157 2.42c0 1.333-.946 2.418-2.157 2.418z"})])],-1)),e("span",{class:B(["flex-1 flex items-center justify-between overflow-hidden transition-all duration-300 h-10",b.value?"w-0 opacity-0":""])},[...O[8]||(O[8]=[e("span",null,null,-1),e("span",{class:"text-xs font-medium text-black/50 pr-1"},"Join Discord",-1)])],2)]),x(Gn,{collapsed:b.value},null,8,["collapsed"]),x(Vn,{showCredits:!1,collapsed:b.value},null,8,["collapsed"])])])],34),e("div",$1,[e("div",L1,[N.value?A("",!0):(t(),l("header",M1,[e("div",P1,[e("div",S1,[!H.value&&!D.value?(t(),R(re,{key:0,to:"/",class:"lg:hidden shrink-0"},{default:j(()=>[...O[11]||(O[11]=[e("img",{src:vt,alt:"Veeso Logo",class:"h-6 w-28"},null,-1)])]),_:1})):A("",!0),D.value?(t(),R(se(D.value),{key:1})):H.value?(t(),l("h2",j1,v(H.value),1)):A("",!0)]),C.value?(t(),l("div",D1,[(t(),R(se(C.value)))])):A("",!0)])])),e("div",A1,[x(dt,{class:"h-full"})])])]),e("div",U1,[U.value?(t(),l("div",{key:0,class:"fixed inset-0 bg-black/20 backdrop-blur-sm pointer-events-auto",onClick:i})):A("",!0),U.value?(t(),l("div",B1,[e("div",I1,[e("button",{onClick:O[4]||(O[4]=E=>{i(),le()}),class:"w-full flex items-center justify-between gap-4 p-3 rounded-2xl transition-all duration-200 text-black/70 hover:bg-black/5 active:scale-[0.98]"},[e("div",F1,[e("div",E1,[x(ot)]),e("span",R1,v(ct.value),1)]),e("span",Z1,v(V.$t("app.upgrade")),1)])])])):A("",!0),e("nav",T1,[e("div",V1,[(t(!0),l(W,null,te(o.value,E=>(t(),R(re,{key:E.id,to:E.to,class:B(["flex items-center justify-center p-2 rounded-full transition-all duration-200",m(E)?"text-black":"text-black/60 hover:text-black"])},{default:j(()=>[e("span",N1,[(t(),R(se(E.icon)))])]),_:2},1032,["to","class"]))),128)),e("button",{onClick:n,class:B(["flex items-center justify-center p-2 rounded-full transition-all duration-200",U.value||a.value?"text-black":"text-black/60 hover:text-black"])},[x(Jn,{class:"text-xl"})],2)])])]),x(r(Ot)),x(r(m1),{"is-open":G.value,"onUpdate:isOpen":O[5]||(O[5]=E=>G.value=E),"initial-tab":ne.value,"settings-key":Y.value},null,8,["is-open","initial-tab","settings-key"]),x(r(Js),{"is-open":ae.value,"onUpdate:isOpen":O[6]||(O[6]=E=>ae.value=E)},null,8,["is-open"])],6)}}},_2=he(O1,[["__scopeId","data-v-d4ed58a8"]]);export{_2 as default};
2//# sourceMappingURL=Bmsasg-p.js.map

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.