Files
jiang13-forum/embed_static/static/spa/assets/index-474mTIgd.js
freefire e1c1708715 初始提交:姜十三论坛 Jiang13 Forum
轻量自用论坛,Go 单二进制 + React SPA 内嵌 + SQLite。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 21:08:52 +08:00

3 lines
83 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomePage-D-Yzai0_.js","assets/react-vendor-CgzNJrV9.js","assets/notify-Zesh5czd.js","assets/virtual-vendor-05wd80F5.js","assets/spinner-DH1syOsQ.js","assets/ui-vendor-CdH1UOKW.js","assets/badge-CsEfIQQ2.js","assets/content-CKr4Ur51.js","assets/PostDetailPage-D4qGd4ZA.js","assets/postContent-CNPsgNvN.js","assets/markdown-vendor-DxR1h-Bq.js","assets/LoginPage-XRVgE8q8.js","assets/form-BzHbu9bJ.js","assets/RegisterPage-C4KCPGxX.js","assets/ComposePage-Dv2Wt-UO.js","assets/BoardsManagePage-DC-_uHJb.js","assets/ProfilePage-nO8fm023.js","assets/FavoritesPage-Dvc9bR9_.js"])))=>i.map(i=>d[i]);
var wo=Object.defineProperty;var ko=(e,o,t)=>o in e?wo(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t;var nt=(e,o,t)=>ko(e,typeof o!="symbol"?o+"":o,t);import{r as y,j as a,e as wt,g as kt,i as jo,O as So,k as u,m as No,B as Eo,n as Co,p as ue,q as To}from"./react-vendor-CgzNJrV9.js";import{S as jt,C as _o,a as St,P as Ro,b as Nt,I as Et,c as Ct,d as Tt,e as zo,R as _t,f as Po,L as Rt,g as zt,h as Ao,T as Io,H as Mo,i as Do,j as Oo,k as Lo,l as Bo,m as $o,M as Fo,n as Vo,o as Go,p as Wo}from"./ui-vendor-CdH1UOKW.js";(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))s(c);new MutationObserver(c=>{for(const l of c)if(l.type==="childList")for(const n of l.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&s(n)}).observe(document,{childList:!0,subtree:!0});function t(c){const l={};return c.integrity&&(l.integrity=c.integrity),c.referrerPolicy&&(l.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?l.credentials="include":c.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(c){if(c.ep)return;c.ep=!0;const l=t(c);fetch(c.href,l)}})();const Pt="j13-theme";function At(){return localStorage.getItem(Pt)==="dark"?"dark":"light"}function It(e){const o=document.documentElement;o.classList.toggle("dark",e==="dark"),o.style.colorScheme=e,localStorage.setItem(Pt,e)}const Ho="modulepreload",Yo=function(e){return"/"+e},it={},we=function(o,t,s){let c=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),d=(n==null?void 0:n.nonce)||(n==null?void 0:n.getAttribute("nonce"));c=Promise.allSettled(t.map(m=>{if(m=Yo(m),m in it)return;it[m]=!0;const i=m.endsWith(".css"),v=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${v}`))return;const r=document.createElement("link");if(r.rel=i?"stylesheet":Ho,i||(r.as="script"),r.crossOrigin="",r.href=m,d&&r.setAttribute("nonce",d),document.head.appendChild(r),i)return new Promise((S,_)=>{r.addEventListener("load",S),r.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${m}`)))})}))}function l(n){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=n,window.dispatchEvent(d),!d.defaultPrevented)throw n}return c.then(n=>{for(const d of n||[])d.status==="rejected"&&l(d.reason);return o().catch(l)})},Uo="";async function R(e,o={}){const t=await fetch(Uo+e,{credentials:"same-origin",...o,headers:{...o.body instanceof FormData?{}:{"Content-Type":"application/json"},...o.headers}});let s;try{s=await t.json()}catch{throw new Error("服务器响应异常")}if(!t.ok)throw new Error(s.error||"请求失败");return s}const be={me:()=>R("/api/me"),stats:()=>R("/api/stats"),boards:()=>R("/api/boards"),posts:e=>{const o=new URLSearchParams(e).toString();return R(`/api/posts?${o}`)},hotPosts:()=>R("/api/posts/hot"),post:e=>R(`/api/posts/${e}`),comments:(e,o)=>{const t=o!=null&&o.length?`?my_ids=${o.join(",")}`:"";return R(`/api/posts/${e}/comments${t}`)},notifications:()=>R("/api/notifications"),online:()=>R("/api/online"),presence:()=>R("/api/presence",{method:"POST"}),favorites:()=>R("/api/favorites"),createBoard:e=>R("/api/admin/boards",{method:"POST",body:JSON.stringify(e)}),updateBoard:(e,o)=>R(`/api/admin/boards/${e}`,{method:"PUT",body:JSON.stringify(o)}),deleteBoard:e=>R(`/api/admin/boards/${e}`,{method:"DELETE"}),updateNickname:e=>{const o=new FormData;return o.append("nickname",e),R("/api/profile/nickname",{method:"POST",body:o,headers:{}})},updatePassword:(e,o)=>{const t=new FormData;return t.append("old_password",e),t.append("new_password",o),R("/api/profile/password",{method:"POST",body:t,headers:{}})},uploadAvatar:e=>{const o=new FormData;return o.append("avatar",e),R("/api/profile/avatar",{method:"POST",body:o,headers:{}})},createPost:e=>{const o=new FormData;return o.append("board_id",e.board_id),o.append("title",e.title),o.append("content",e.content),o.append("tags",e.tags||""),R("/api/posts",{method:"POST",body:o,headers:{}})},updatePost:(e,o)=>{const t=new FormData;return t.append("title",o.title),t.append("content",o.content),t.append("tags",o.tags||""),R(`/api/posts/${e}`,{method:"PUT",body:t,headers:{}})},login:(e,o)=>{const t=new FormData;return t.append("username",e),t.append("password",o),R("/api/login",{method:"POST",body:t,headers:{}})},register:(e,o,t)=>{const s=new FormData;return s.append("username",e),s.append("password",o),s.append("nickname",t),R("/api/register",{method:"POST",body:s,headers:{}})},logout:()=>R("/api/logout",{method:"POST"}),like:e=>R(`/api/posts/${e}/like`,{method:"POST"}),favorite:e=>R(`/api/posts/${e}/favorite`,{method:"POST"}),addComment:(e,o)=>{const t=new FormData;return t.append("content",o.content),o.replyTo&&t.append("reply_to",String(o.replyTo)),o.guestNick&&t.append("guest_nick",o.guestNick),o.guestEmail&&t.append("guest_email",o.guestEmail),o.guestUrl&&t.append("guest_url",o.guestUrl),o.isPrivate&&t.append("is_private","1"),R(`/api/posts/${e}/comments`,{method:"POST",body:t,headers:{}})},ping:()=>R("/api/ping",{method:"POST"})},Mt=y.createContext({user:null,loading:!0,refresh:async()=>{},logout:async()=>{}});function Ko({children:e}){const[o,t]=y.useState(null),[s,c]=y.useState(!0),l=y.useCallback(async()=>{try{const d=await be.me();t(d.user??null)}catch{t(null)}finally{c(!1)}},[]);y.useEffect(()=>{l()},[l]);const n=async()=>{await be.logout(),t(null)};return a.jsx(Mt.Provider,{value:{user:o,loading:s,refresh:l,logout:n},children:e})}const Dt=()=>y.useContext(Mt),Ot=y.createContext({theme:"light",toggle:()=>{}});function Xo({children:e}){const[o,t]=y.useState(At);y.useLayoutEffect(()=>{It(o)},[o]);const s=()=>t(c=>c==="light"?"dark":"light");return a.jsx(Ot.Provider,{value:{theme:o,toggle:s},children:e})}const Lt=()=>y.useContext(Ot);function qo(e){const[o,t]=y.useState(()=>window.matchMedia(e).matches);return y.useLayoutEffect(()=>{const s=window.matchMedia(e),c=()=>t(s.matches);return s.addEventListener("change",c),()=>s.removeEventListener("change",c)},[e]),o}function He(){return a.jsxs("div",{className:"page-loader",role:"status","aria-live":"polite",children:[a.jsx("span",{className:"page-loader__dot"}),"加载中…"]})}function Bt(e){var o,t,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var c=e.length;for(o=0;o<c;o++)e[o]&&(t=Bt(e[o]))&&(s&&(s+=" "),s+=t)}else for(t in e)e[t]&&(s&&(s+=" "),s+=t);return s}function $t(){for(var e,o,t=0,s="",c=arguments.length;t<c;t++)(e=arguments[t])&&(o=Bt(e))&&(s&&(s+=" "),s+=o);return s}const Jo=(e,o)=>{const t=new Array(e.length+o.length);for(let s=0;s<e.length;s++)t[s]=e[s];for(let s=0;s<o.length;s++)t[e.length+s]=o[s];return t},Qo=(e,o)=>({classGroupId:e,validator:o}),Ft=(e=new Map,o=null,t)=>({nextPart:e,validators:o,classGroupId:t}),Fe="-",lt=[],Zo="arbitrary..",es=e=>{const o=os(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:n=>{if(n.startsWith("[")&&n.endsWith("]"))return ts(n);const d=n.split(Fe),m=d[0]===""&&d.length>1?1:0;return Vt(d,m,o)},getConflictingClassGroupIds:(n,d)=>{if(d){const m=s[n],i=t[n];return m?i?Jo(i,m):m:i||lt}return t[n]||lt}}},Vt=(e,o,t)=>{if(e.length-o===0)return t.classGroupId;const c=e[o],l=t.nextPart.get(c);if(l){const i=Vt(e,o+1,l);if(i)return i}const n=t.validators;if(n===null)return;const d=o===0?e.join(Fe):e.slice(o).join(Fe),m=n.length;for(let i=0;i<m;i++){const v=n[i];if(v.validator(d))return v.classGroupId}},ts=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=e.slice(1,-1),t=o.indexOf(":"),s=o.slice(0,t);return s?Zo+s:void 0})(),os=e=>{const{theme:o,classGroups:t}=e;return ss(t,o)},ss=(e,o)=>{const t=Ft();for(const s in e){const c=e[s];Xe(c,t,s,o)}return t},Xe=(e,o,t,s)=>{const c=e.length;for(let l=0;l<c;l++){const n=e[l];rs(n,o,t,s)}},rs=(e,o,t,s)=>{if(typeof e=="string"){as(e,o,t);return}if(typeof e=="function"){ns(e,o,t,s);return}is(e,o,t,s)},as=(e,o,t)=>{const s=e===""?o:Gt(o,e);s.classGroupId=t},ns=(e,o,t,s)=>{if(ls(e)){Xe(e(s),o,t,s);return}o.validators===null&&(o.validators=[]),o.validators.push(Qo(t,e))},is=(e,o,t,s)=>{const c=Object.entries(e),l=c.length;for(let n=0;n<l;n++){const[d,m]=c[n];Xe(m,Gt(o,d),t,s)}},Gt=(e,o)=>{let t=e;const s=o.split(Fe),c=s.length;for(let l=0;l<c;l++){const n=s[l];let d=t.nextPart.get(n);d||(d=Ft(),t.nextPart.set(n,d)),t=d}return t},ls=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,cs=e=>{if(e<1)return{get:()=>{},set:()=>{}};let o=0,t=Object.create(null),s=Object.create(null);const c=(l,n)=>{t[l]=n,o++,o>e&&(o=0,s=t,t=Object.create(null))};return{get(l){let n=t[l];if(n!==void 0)return n;if((n=s[l])!==void 0)return c(l,n),n},set(l,n){l in t?t[l]=n:c(l,n)}}},Ye="!",ct=":",ds=[],dt=(e,o,t,s,c)=>({modifiers:e,hasImportantModifier:o,baseClassName:t,maybePostfixModifierPosition:s,isExternal:c}),us=e=>{const{prefix:o,experimentalParseClassName:t}=e;let s=c=>{const l=[];let n=0,d=0,m=0,i;const v=c.length;for(let M=0;M<v;M++){const I=c[M];if(n===0&&d===0){if(I===ct){l.push(c.slice(m,M)),m=M+1;continue}if(I==="/"){i=M;continue}}I==="["?n++:I==="]"?n--:I==="("?d++:I===")"&&d--}const r=l.length===0?c:c.slice(m);let S=r,_=!1;r.endsWith(Ye)?(S=r.slice(0,-1),_=!0):r.startsWith(Ye)&&(S=r.slice(1),_=!0);const z=i&&i>m?i-m:void 0;return dt(l,_,S,z)};if(o){const c=o+ct,l=s;s=n=>n.startsWith(c)?l(n.slice(c.length)):dt(ds,!1,n,void 0,!0)}if(t){const c=s;s=l=>t({className:l,parseClassName:c})}return s},ms=e=>{const o=new Map;return e.orderSensitiveModifiers.forEach((t,s)=>{o.set(t,1e6+s)}),t=>{const s=[];let c=[];for(let l=0;l<t.length;l++){const n=t[l],d=n[0]==="[",m=o.has(n);d||m?(c.length>0&&(c.sort(),s.push(...c),c=[]),s.push(n)):c.push(n)}return c.length>0&&(c.sort(),s.push(...c)),s}},ps=e=>({cache:cs(e.cacheSize),parseClassName:us(e),sortModifiers:ms(e),postfixLookupClassGroupIds:fs(e),...es(e)}),fs=e=>{const o=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let s=0;s<t.length;s++)o[t[s]]=!0;return o},hs=/\s+/,gs=(e,o)=>{const{parseClassName:t,getClassGroupId:s,getConflictingClassGroupIds:c,sortModifiers:l,postfixLookupClassGroupIds:n}=o,d=[],m=e.trim().split(hs);let i="";for(let v=m.length-1;v>=0;v-=1){const r=m[v],{isExternal:S,modifiers:_,hasImportantModifier:z,baseClassName:M,maybePostfixModifierPosition:I}=t(r);if(S){i=r+(i.length>0?" "+i:i);continue}let j=!!I,L;if(j){const D=M.substring(0,I);L=s(D);const p=L&&n[L]?s(M):void 0;p&&p!==L&&(L=p,j=!1)}else L=s(M);if(!L){if(!j){i=r+(i.length>0?" "+i:i);continue}if(L=s(M),!L){i=r+(i.length>0?" "+i:i);continue}j=!1}const K=_.length===0?"":_.length===1?_[0]:l(_).join(":"),q=z?K+Ye:K,Z=q+L;if(d.indexOf(Z)>-1)continue;d.push(Z);const B=c(L,j);for(let D=0;D<B.length;++D){const p=B[D];d.push(q+p)}i=r+(i.length>0?" "+i:i)}return i},bs=(...e)=>{let o=0,t,s,c="";for(;o<e.length;)(t=e[o++])&&(s=Wt(t))&&(c&&(c+=" "),c+=s);return c},Wt=e=>{if(typeof e=="string")return e;let o,t="";for(let s=0;s<e.length;s++)e[s]&&(o=Wt(e[s]))&&(t&&(t+=" "),t+=o);return t},ys=(e,...o)=>{let t,s,c,l;const n=m=>{const i=o.reduce((v,r)=>r(v),e());return t=ps(i),s=t.cache.get,c=t.cache.set,l=d,d(m)},d=m=>{const i=s(m);if(i)return i;const v=gs(m,t);return c(m,v),v};return l=n,(...m)=>l(bs(...m))},vs=[],$=e=>{const o=t=>t[e]||vs;return o.isThemeGetter=!0,o},Ht=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xs=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ws=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ks=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,js=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ss=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ns=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xe=e=>xs.test(e),w=e=>!!e&&!Number.isNaN(Number(e)),me=e=>!!e&&Number.isInteger(Number(e)),We=e=>e.endsWith("%")&&w(e.slice(0,-1)),ge=e=>ws.test(e),Ut=()=>!0,Es=e=>ks.test(e)&&!js.test(e),qe=()=>!1,Cs=e=>Ss.test(e),Ts=e=>Ns.test(e),_s=e=>!f(e)&&!h(e),Rs=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),zs=e=>ke(e,qt,qe),f=e=>Ht.test(e),Ee=e=>ke(e,Jt,Es),ut=e=>ke(e,Bs,w),Ps=e=>ke(e,Zt,Ut),As=e=>ke(e,Qt,qe),mt=e=>ke(e,Kt,qe),Is=e=>ke(e,Xt,Ts),Le=e=>ke(e,eo,Cs),h=e=>Yt.test(e),Ie=e=>Ce(e,Jt),Ms=e=>Ce(e,Qt),pt=e=>Ce(e,Kt),Ds=e=>Ce(e,qt),Os=e=>Ce(e,Xt),Be=e=>Ce(e,eo,!0),Ls=e=>Ce(e,Zt,!0),ke=(e,o,t)=>{const s=Ht.exec(e);return s?s[1]?o(s[1]):t(s[2]):!1},Ce=(e,o,t=!1)=>{const s=Yt.exec(e);return s?s[1]?o(s[1]):t:!1},Kt=e=>e==="position"||e==="percentage",Xt=e=>e==="image"||e==="url",qt=e=>e==="length"||e==="size"||e==="bg-size",Jt=e=>e==="length",Bs=e=>e==="number",Qt=e=>e==="family-name",Zt=e=>e==="number"||e==="weight",eo=e=>e==="shadow",$s=()=>{const e=$("color"),o=$("font"),t=$("text"),s=$("font-weight"),c=$("tracking"),l=$("leading"),n=$("breakpoint"),d=$("container"),m=$("spacing"),i=$("radius"),v=$("shadow"),r=$("inset-shadow"),S=$("text-shadow"),_=$("drop-shadow"),z=$("blur"),M=$("perspective"),I=$("aspect"),j=$("ease"),L=$("animate"),K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Z=()=>[...q(),h,f],B=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],p=()=>[h,f,m],O=()=>[xe,"full","auto",...p()],ee=()=>[me,"none","subgrid",h,f],ce=()=>["auto",{span:["full",me,h,f]},me,h,f],te=()=>[me,"auto",h,f],H=()=>["auto","min","max","fr",h,f],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],g=()=>["auto",...p()],E=()=>[xe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...p()],U=()=>[xe,"screen","full","dvw","lvw","svw","min","max","fit",...p()],V=()=>[xe,"screen","full","lh","dvh","lvh","svh","min","max","fit",...p()],b=()=>[e,h,f],de=()=>[...q(),pt,mt,{position:[h,f]}],je=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",Ds,zs,{size:[h,f]}],P=()=>[We,Ie,Ee],k=()=>["","none","full",i,h,f],C=()=>["",w,Ie,Ee],re=()=>["solid","dashed","dotted","double"],T=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>[w,We,pt,mt],Se=()=>["","none",z,h,f],fe=()=>["none",w,h,f],ae=()=>["none",w,h,f],Pe=()=>[w,h,f],ye=()=>[xe,"full",...p()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ge],breakpoint:[ge],color:[Ut],container:[ge],"drop-shadow":[ge],ease:["in","out","in-out"],font:[_s],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ge],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ge],shadow:[ge],spacing:["px",w],text:[ge],"text-shadow":[ge],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xe,f,h,I]}],container:["container"],"container-type":[{"@container":["","normal","size",h,f]}],"container-named":[Rs],columns:[{columns:[w,f,h,d]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Z()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{"inset-s":O(),start:O()}],end:[{"inset-e":O(),end:O()}],"inset-bs":[{"inset-bs":O()}],"inset-be":[{"inset-be":O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[me,"auto",h,f]}],basis:[{basis:[xe,"full","auto",d,...p()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[w,xe,"auto","initial","none",f]}],grow:[{grow:["",w,h,f]}],shrink:[{shrink:["",w,h,f]}],order:[{order:[me,"first","last","none",h,f]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:ce()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:ce()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:p()}],"gap-x":[{"gap-x":p()}],"gap-y":[{"gap-y":p()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:p()}],px:[{px:p()}],py:[{py:p()}],ps:[{ps:p()}],pe:[{pe:p()}],pbs:[{pbs:p()}],pbe:[{pbe:p()}],pt:[{pt:p()}],pr:[{pr:p()}],pb:[{pb:p()}],pl:[{pl:p()}],m:[{m:g()}],mx:[{mx:g()}],my:[{my:g()}],ms:[{ms:g()}],me:[{me:g()}],mbs:[{mbs:g()}],mbe:[{mbe:g()}],mt:[{mt:g()}],mr:[{mr:g()}],mb:[{mb:g()}],ml:[{ml:g()}],"space-x":[{"space-x":p()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":p()}],"space-y-reverse":["space-y-reverse"],size:[{size:E()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...V()]}],"min-block-size":[{"min-block":["auto",...V()]}],"max-block-size":[{"max-block":["none",...V()]}],w:[{w:[d,"screen",...E()]}],"min-w":[{"min-w":[d,"screen","none",...E()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[n]},...E()]}],h:[{h:["screen","lh",...E()]}],"min-h":[{"min-h":["screen","lh","none",...E()]}],"max-h":[{"max-h":["screen","lh",...E()]}],"font-size":[{text:["base",t,Ie,Ee]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,Ls,Ps]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",We,f]}],"font-family":[{font:[Ms,As,o]}],"font-features":[{"font-features":[f]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,h,f]}],"line-clamp":[{"line-clamp":[w,"none",h,ut]}],leading:[{leading:[l,...p()]}],"list-image":[{"list-image":["none",h,f]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",h,f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:b()}],"text-color":[{text:b()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[w,"from-font","auto",h,Ee]}],"text-decoration-color":[{decoration:b()}],"underline-offset":[{"underline-offset":[w,"auto",h,f]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:p()}],"tab-size":[{tab:[me,h,f]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",h,f]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",h,f]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:de()}],"bg-repeat":[{bg:je()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},me,h,f],radial:["",h,f],conic:[me,h,f]},Os,Is]}],"bg-color":[{bg:b()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:b()}],"gradient-via":[{via:b()}],"gradient-to":[{to:b()}],rounded:[{rounded:k()}],"rounded-s":[{"rounded-s":k()}],"rounded-e":[{"rounded-e":k()}],"rounded-t":[{"rounded-t":k()}],"rounded-r":[{"rounded-r":k()}],"rounded-b":[{"rounded-b":k()}],"rounded-l":[{"rounded-l":k()}],"rounded-ss":[{"rounded-ss":k()}],"rounded-se":[{"rounded-se":k()}],"rounded-ee":[{"rounded-ee":k()}],"rounded-es":[{"rounded-es":k()}],"rounded-tl":[{"rounded-tl":k()}],"rounded-tr":[{"rounded-tr":k()}],"rounded-br":[{"rounded-br":k()}],"rounded-bl":[{"rounded-bl":k()}],"border-w":[{border:C()}],"border-w-x":[{"border-x":C()}],"border-w-y":[{"border-y":C()}],"border-w-s":[{"border-s":C()}],"border-w-e":[{"border-e":C()}],"border-w-bs":[{"border-bs":C()}],"border-w-be":[{"border-be":C()}],"border-w-t":[{"border-t":C()}],"border-w-r":[{"border-r":C()}],"border-w-b":[{"border-b":C()}],"border-w-l":[{"border-l":C()}],"divide-x":[{"divide-x":C()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":C()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:b()}],"border-color-x":[{"border-x":b()}],"border-color-y":[{"border-y":b()}],"border-color-s":[{"border-s":b()}],"border-color-e":[{"border-e":b()}],"border-color-bs":[{"border-bs":b()}],"border-color-be":[{"border-be":b()}],"border-color-t":[{"border-t":b()}],"border-color-r":[{"border-r":b()}],"border-color-b":[{"border-b":b()}],"border-color-l":[{"border-l":b()}],"divide-color":[{divide:b()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[w,h,f]}],"outline-w":[{outline:["",w,Ie,Ee]}],"outline-color":[{outline:b()}],shadow:[{shadow:["","none",v,Be,Le]}],"shadow-color":[{shadow:b()}],"inset-shadow":[{"inset-shadow":["none",r,Be,Le]}],"inset-shadow-color":[{"inset-shadow":b()}],"ring-w":[{ring:C()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:b()}],"ring-offset-w":[{"ring-offset":[w,Ee]}],"ring-offset-color":[{"ring-offset":b()}],"inset-ring-w":[{"inset-ring":C()}],"inset-ring-color":[{"inset-ring":b()}],"text-shadow":[{"text-shadow":["none",S,Be,Le]}],"text-shadow-color":[{"text-shadow":b()}],opacity:[{opacity:[w,h,f]}],"mix-blend":[{"mix-blend":[...T(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":T()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[w]}],"mask-image-linear-from-pos":[{"mask-linear-from":A()}],"mask-image-linear-to-pos":[{"mask-linear-to":A()}],"mask-image-linear-from-color":[{"mask-linear-from":b()}],"mask-image-linear-to-color":[{"mask-linear-to":b()}],"mask-image-t-from-pos":[{"mask-t-from":A()}],"mask-image-t-to-pos":[{"mask-t-to":A()}],"mask-image-t-from-color":[{"mask-t-from":b()}],"mask-image-t-to-color":[{"mask-t-to":b()}],"mask-image-r-from-pos":[{"mask-r-from":A()}],"mask-image-r-to-pos":[{"mask-r-to":A()}],"mask-image-r-from-color":[{"mask-r-from":b()}],"mask-image-r-to-color":[{"mask-r-to":b()}],"mask-image-b-from-pos":[{"mask-b-from":A()}],"mask-image-b-to-pos":[{"mask-b-to":A()}],"mask-image-b-from-color":[{"mask-b-from":b()}],"mask-image-b-to-color":[{"mask-b-to":b()}],"mask-image-l-from-pos":[{"mask-l-from":A()}],"mask-image-l-to-pos":[{"mask-l-to":A()}],"mask-image-l-from-color":[{"mask-l-from":b()}],"mask-image-l-to-color":[{"mask-l-to":b()}],"mask-image-x-from-pos":[{"mask-x-from":A()}],"mask-image-x-to-pos":[{"mask-x-to":A()}],"mask-image-x-from-color":[{"mask-x-from":b()}],"mask-image-x-to-color":[{"mask-x-to":b()}],"mask-image-y-from-pos":[{"mask-y-from":A()}],"mask-image-y-to-pos":[{"mask-y-to":A()}],"mask-image-y-from-color":[{"mask-y-from":b()}],"mask-image-y-to-color":[{"mask-y-to":b()}],"mask-image-radial":[{"mask-radial":[h,f]}],"mask-image-radial-from-pos":[{"mask-radial-from":A()}],"mask-image-radial-to-pos":[{"mask-radial-to":A()}],"mask-image-radial-from-color":[{"mask-radial-from":b()}],"mask-image-radial-to-color":[{"mask-radial-to":b()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":q()}],"mask-image-conic-pos":[{"mask-conic":[w]}],"mask-image-conic-from-pos":[{"mask-conic-from":A()}],"mask-image-conic-to-pos":[{"mask-conic-to":A()}],"mask-image-conic-from-color":[{"mask-conic-from":b()}],"mask-image-conic-to-color":[{"mask-conic-to":b()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:de()}],"mask-repeat":[{mask:je()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",h,f]}],filter:[{filter:["","none",h,f]}],blur:[{blur:Se()}],brightness:[{brightness:[w,h,f]}],contrast:[{contrast:[w,h,f]}],"drop-shadow":[{"drop-shadow":["","none",_,Be,Le]}],"drop-shadow-color":[{"drop-shadow":b()}],grayscale:[{grayscale:["",w,h,f]}],"hue-rotate":[{"hue-rotate":[w,h,f]}],invert:[{invert:["",w,h,f]}],saturate:[{saturate:[w,h,f]}],sepia:[{sepia:["",w,h,f]}],"backdrop-filter":[{"backdrop-filter":["","none",h,f]}],"backdrop-blur":[{"backdrop-blur":Se()}],"backdrop-brightness":[{"backdrop-brightness":[w,h,f]}],"backdrop-contrast":[{"backdrop-contrast":[w,h,f]}],"backdrop-grayscale":[{"backdrop-grayscale":["",w,h,f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w,h,f]}],"backdrop-invert":[{"backdrop-invert":["",w,h,f]}],"backdrop-opacity":[{"backdrop-opacity":[w,h,f]}],"backdrop-saturate":[{"backdrop-saturate":[w,h,f]}],"backdrop-sepia":[{"backdrop-sepia":["",w,h,f]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":p()}],"border-spacing-x":[{"border-spacing-x":p()}],"border-spacing-y":[{"border-spacing-y":p()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",h,f]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[w,"initial",h,f]}],ease:[{ease:["linear","initial",j,h,f]}],delay:[{delay:[w,h,f]}],animate:[{animate:["none",L,h,f]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,h,f]}],"perspective-origin":[{"perspective-origin":Z()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:Pe()}],"skew-x":[{"skew-x":Pe()}],"skew-y":[{"skew-y":Pe()}],transform:[{transform:[h,f,"","none","gpu","cpu"]}],"transform-origin":[{origin:Z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],zoom:[{zoom:[me,h,f]}],accent:[{accent:b()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:b()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",h,f]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":b()}],"scrollbar-track-color":[{"scrollbar-track":b()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":p()}],"scroll-mx":[{"scroll-mx":p()}],"scroll-my":[{"scroll-my":p()}],"scroll-ms":[{"scroll-ms":p()}],"scroll-me":[{"scroll-me":p()}],"scroll-mbs":[{"scroll-mbs":p()}],"scroll-mbe":[{"scroll-mbe":p()}],"scroll-mt":[{"scroll-mt":p()}],"scroll-mr":[{"scroll-mr":p()}],"scroll-mb":[{"scroll-mb":p()}],"scroll-ml":[{"scroll-ml":p()}],"scroll-p":[{"scroll-p":p()}],"scroll-px":[{"scroll-px":p()}],"scroll-py":[{"scroll-py":p()}],"scroll-ps":[{"scroll-ps":p()}],"scroll-pe":[{"scroll-pe":p()}],"scroll-pbs":[{"scroll-pbs":p()}],"scroll-pbe":[{"scroll-pbe":p()}],"scroll-pt":[{"scroll-pt":p()}],"scroll-pr":[{"scroll-pr":p()}],"scroll-pb":[{"scroll-pb":p()}],"scroll-pl":[{"scroll-pl":p()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",h,f]}],fill:[{fill:["none",...b()]}],"stroke-w":[{stroke:[w,Ie,Ee,ut]}],stroke:[{stroke:["none",...b()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Fs=ys($s);function le(...e){return Fs($t(e))}const Vs=Ao,Gs=Io,Ws=y.forwardRef(({className:e,inset:o,children:t,...s},c)=>a.jsxs(jt,{ref:c,className:le("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",o&&"pl-8",e),...s,children:[t,a.jsx(_o,{className:"ml-auto"})]}));Ws.displayName=jt.displayName;const Hs=y.forwardRef(({className:e,...o},t)=>a.jsx(St,{ref:t,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o}));Hs.displayName=St.displayName;const to=y.forwardRef(({className:e,sideOffset:o=4,...t},s)=>a.jsx(Ro,{children:a.jsx(Nt,{ref:s,sideOffset:o,className:le("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));to.displayName=Nt.displayName;const ze=y.forwardRef(({className:e,inset:o,...t},s)=>a.jsx(Et,{ref:s,className:le("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",o&&"pl-8",e),...t}));ze.displayName=Et.displayName;const Ys=y.forwardRef(({className:e,children:o,checked:t,...s},c)=>a.jsxs(Ct,{ref:c,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:t,...s,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Tt,{children:a.jsx(zo,{className:"h-4 w-4"})})}),o]}));Ys.displayName=Ct.displayName;const Us=y.forwardRef(({className:e,children:o,...t},s)=>a.jsxs(_t,{ref:s,className:le("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t,children:[a.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsx(Tt,{children:a.jsx(Po,{className:"h-2 w-2 fill-current"})})}),o]}));Us.displayName=_t.displayName;const Ks=y.forwardRef(({className:e,inset:o,...t},s)=>a.jsx(Rt,{ref:s,className:le("px-2 py-1.5 text-sm font-semibold",o&&"pl-8",e),...t}));Ks.displayName=Rt.displayName;const Ue=y.forwardRef(({className:e,...o},t)=>a.jsx(zt,{ref:t,className:le("-mx-1 my-1 h-px bg-muted",e),...o}));Ue.displayName=zt.displayName;const Xs="/admin/dashboard";function oo(){window.location.href=Xs}const so="j13-cache-boards",ro="j13-cache-stats";function ao(e){try{const o=sessionStorage.getItem(e);return o?JSON.parse(o):null}catch{return null}}function no(e,o){try{sessionStorage.setItem(e,JSON.stringify(o))}catch{}}function ft(){return ao(so)??[]}function ht(){return ao(ro)}function qs(e){no(so,e)}function Js(e){no(ro,e)}const Qs=["/post/","/profile"];function io(e){return Qs.some(o=>e.startsWith(o))}function Zs(e,o){return io(e)?null:e.startsWith("/favorites")?"favorites":e.startsWith("/boards")?"boards":o===0?"all":String(o)}function er({boards:e,activeBoard:o,onSelectBoard:t}){const s=wt(),c=kt(),{user:l}=Dt(),n=(l==null?void 0:l.role)==="admin",d=Zs(c.pathname,o),m=(i,v,r,S)=>a.jsxs("button",{type:"button",className:le("sidebar-nav-item",d!=null&&d===i&&"active"),onClick:S,children:[r,a.jsx("span",{className:"flex-1 truncate",children:v})]},i);return a.jsxs("aside",{className:"sidebar",children:[a.jsx("div",{className:"sidebar-section",children:"浏览"}),a.jsxs("nav",{className:"sidebar-nav",children:[m("all","全部帖子",a.jsx(Mo,{}),()=>{t(0),s("/")}),l&&m("favorites","我的收藏",a.jsx(Do,{}),()=>s("/favorites"))]}),e.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"sidebar-section",style:{marginTop:8},children:"板块"}),a.jsx("nav",{className:"sidebar-nav",children:e.map(i=>a.jsx("button",{type:"button",className:le("sidebar-nav-item",d!=null&&d===String(i.id)&&"active"),onClick:()=>{t(i.id),s(`/?board=${i.id}`)},children:a.jsx("span",{className:"flex-1 truncate",children:i.name})},i.id))})]}),n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"sidebar-section",style:{marginTop:8},children:"管理"}),a.jsxs("nav",{className:"sidebar-nav",children:[m("boards","管理板块",a.jsx(Oo,{}),()=>s("/boards")),m("admin","系统后台",a.jsx(Lo,{}),oo)]})]})]})}function tr({hot:e,notifications:o,online:t,onPostClick:s}){const c=(e==null?void 0:e.slice(0,8))??[],l=(o==null?void 0:o.slice(0,6))??[],n=(t==null?void 0:t.users)??[];return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"widget-card",children:[a.jsx("div",{className:"widget-card-head",children:"🔥 热门帖子"}),a.jsx("div",{className:"widget-card-body",children:c.length===0?a.jsx("div",{style:{fontSize:13,color:"var(--color-text-3)",padding:"8px 0"},children:"暂无数据"}):c.map((d,m)=>a.jsxs("div",{className:"widget-item",onClick:()=>s(d.id),children:[a.jsx("span",{style:{color:m<3?"#e74c3c":"var(--color-text-3)",fontWeight:600,minWidth:18},children:m+1}),a.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.title})]},d.id))})]}),a.jsxs("div",{className:"widget-card",children:[a.jsx("div",{className:"widget-card-head",children:"📢 最新动态"}),a.jsx("div",{className:"widget-card-body",children:l.length===0?a.jsx("div",{style:{fontSize:13,color:"var(--color-text-3)",padding:"8px 0"},children:"暂无动态"}):l.map(d=>a.jsxs("div",{className:"widget-item",onClick:()=>s(d.id),children:[a.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.title}),a.jsx("span",{style:{fontSize:11,color:"var(--color-text-4)",flexShrink:0},children:d.created_at})]},d.id))})]}),a.jsxs("div",{className:"widget-card",children:[a.jsxs("div",{className:"widget-card-head",children:["👀 当前浏览 ",(t==null?void 0:t.count)??"—"," 人"]}),a.jsxs("div",{className:"widget-card-body",children:[a.jsxs("div",{style:{fontSize:12,color:"var(--color-text-3)",marginBottom:8},children:["会员 ",(t==null?void 0:t.members)??0," · 游客 ",(t==null?void 0:t.guests)??0]}),a.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:[n.map(d=>{var m;return a.jsx("span",{title:d.nickname,style:{width:28,height:28,borderRadius:"50%",background:"var(--j13-green)",color:"#fff",fontSize:12,display:"inline-flex",alignItems:"center",justifyContent:"center"},children:((m=d.nickname)==null?void 0:m[0])||"?"},d.id)}),n.length===0&&a.jsx("span",{style:{fontSize:13,color:"var(--color-text-3)"},children:"暂无会员在线"})]})]})]}),a.jsx("div",{className:"widget-card widget-card--about",children:a.jsx("div",{className:"widget-card-body",children:a.jsxs("p",{className:"widget-about-text",children:[a.jsx("strong",{children:"姜十三论坛"}),"拾三一隅,自在交流。轻量社区,专为小圈子打造。"]})})})]})}function or(){var Y;const{user:e,loading:o,logout:t}=Dt(),{theme:s,toggle:c}=Lt(),l=qo("(max-width: 768px)"),n=wt(),d=kt(),[m]=jo(),i=d.pathname.startsWith("/compose")||/\/post\/\d+\/edit$/.test(d.pathname),[v,r]=y.useState(()=>ft()),[S,_]=y.useState(()=>ht()),[z,M]=y.useState(()=>ft().length>0||!!ht()),[I,j]=y.useState([]),[L,K]=y.useState([]),[q,Z]=y.useState(null),[B,D]=y.useState(Number(m.get("board"))||0),[p,O]=y.useState(m.get("keyword")||"");y.useEffect(()=>{D(Number(m.get("board"))||0)},[m]),y.useEffect(()=>{O(m.get("keyword")||"")},[m]);const ee=y.useCallback(()=>{Promise.all([be.boards().then(g=>{const E=g.boards??[];return r(E),qs(E),E}).catch(()=>[]),be.stats().then(g=>(_(g),Js(g),g)).catch(()=>null)]).finally(()=>M(!0))},[]),ce=y.useCallback(()=>{be.online().then(g=>{Z({count:g.count??0,members:g.members??0,guests:g.guests??0,users:Array.isArray(g.users)?g.users:[]})}).catch(()=>{})},[]);y.useEffect(()=>{ee(),be.hotPosts().then(V=>j(Array.isArray(V.posts)?V.posts:[])).catch(()=>{}),be.notifications().then(V=>K(Array.isArray(V.notifications)?V.notifications:[])).catch(()=>{}),ce(),be.presence().catch(()=>{});const g=setInterval(ce,3e4),E=setInterval(()=>be.presence().catch(()=>{}),6e4),U=()=>ee();return window.addEventListener("boards-refresh",U),()=>{clearInterval(g),clearInterval(E),window.removeEventListener("boards-refresh",U)}},[ee,ce]);const te=()=>{p.trim()?n(`/?keyword=${encodeURIComponent(p.trim())}`):n("/")},H=((Y=e==null?void 0:e.nickname)==null?void 0:Y.charAt(0))||"?",se=io(d.pathname)?-1:B;return a.jsx("div",{className:"app-shell",children:a.jsxs("div",{className:"app-frame",children:[a.jsx("header",{className:"app-header",children:a.jsxs("div",{className:"header-inner",children:[a.jsxs("button",{type:"button",className:"header-brand",onClick:()=>n("/"),children:[a.jsx("span",{className:"header-logo-mark",children:"姜"}),!l&&a.jsx("span",{className:"header-logo-text",children:"姜十三论坛"})]}),!i&&a.jsxs("div",{className:"header-search-wrap",children:[a.jsx(Bo,{className:"header-search-icon",size:16}),a.jsx("input",{className:"header-search-input",type:"search",placeholder:"搜索帖子...",value:p,onChange:g=>O(g.target.value),onKeyDown:g=>g.key==="Enter"&&te()}),p&&a.jsx("button",{type:"button",className:"header-search-clear",onClick:()=>{O(""),n("/")},"aria-label":"清除搜索",children:"×"})]}),a.jsxs("div",{className:"header-actions",children:[!i&&a.jsxs("button",{type:"button",className:"header-compose-btn",onClick:()=>n(e?"/compose":"/login"),children:[a.jsx($o,{size:16}),!l&&a.jsx("span",{children:"发帖"})]}),a.jsxs("div",{className:"header-action-group",children:[a.jsx("button",{type:"button",className:"header-icon-btn",onClick:c,title:s==="light"?"切换暗色模式":"切换亮色模式",children:s==="light"?a.jsx(Fo,{size:18}):a.jsx(Vo,{size:18})}),o?a.jsx("span",{className:"header-auth-slot header-auth-slot--loading","aria-hidden":!0}):e?a.jsxs(Vs,{children:[a.jsx(Gs,{asChild:!0,children:a.jsx("button",{type:"button",className:"header-user-btn",title:e.nickname,children:e.avatar?a.jsx("img",{src:e.avatar,alt:"",className:"header-user-avatar"}):a.jsx("span",{className:"header-user-initial",children:H})})}),a.jsxs(to,{align:"end",className:"w-40",children:[a.jsx(ze,{onClick:()=>n("/profile"),children:"个人中心"}),a.jsx(ze,{onClick:()=>n("/favorites"),children:"我的收藏"}),e.role==="admin"&&a.jsxs(a.Fragment,{children:[a.jsx(Ue,{}),a.jsx(ze,{onClick:()=>n("/boards"),children:"管理板块"}),a.jsx(ze,{onClick:oo,children:"系统后台"})]}),a.jsx(Ue,{}),a.jsx(ze,{onClick:()=>t().then(()=>n("/login")),children:"退出登录"})]})]}):a.jsx("button",{type:"button",className:"header-login-btn",onClick:()=>n("/login"),children:"登录"})]})]})]})}),a.jsxs("div",{className:`app-body${i?" app-body--compose":""}`,children:[!i&&a.jsx(er,{boards:v,activeBoard:B,onSelectBoard:D}),a.jsxs("div",{className:`content-workspace${i?" content-workspace--compose":""}`,children:[a.jsxs("main",{className:`main-content${i?" main-content--compose":""}`,children:[l&&!i&&a.jsxs("div",{className:"mobile-board-bar",children:[a.jsx("span",{className:`board-chip ${se===0?"active":""}`,onClick:()=>{D(0),n("/")},children:"全部"}),v.map(g=>a.jsx("span",{className:`board-chip ${se===g.id?"active":""}`,onClick:()=>{D(g.id),n(`/?board=${g.id}`)},children:g.name},g.id))]}),a.jsx(y.Suspense,{fallback:a.jsx(He,{}),children:a.jsx(So,{context:{boardId:B,keyword:m.get("keyword")||"",setBoardId:D,boards:v,stats:S,layoutReady:z,refreshBoards:ee,isMobile:l}})})]}),!i&&a.jsx("aside",{className:"aside-panel",children:a.jsx(tr,{hot:I,notifications:L,online:q,onPostClick:g=>n(`/post/${g}`)})})]})]})]})})}const gt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,bt=$t,sr=(e,o)=>t=>{var s;if((o==null?void 0:o.variants)==null)return bt(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:c,defaultVariants:l}=o,n=Object.keys(c).map(i=>{const v=t==null?void 0:t[i],r=l==null?void 0:l[i];if(v===null)return null;const S=gt(v)||gt(r);return c[i][S]}),d=t&&Object.entries(t).reduce((i,v)=>{let[r,S]=v;return S===void 0||(i[r]=S),i},{}),m=o==null||(s=o.compoundVariants)===null||s===void 0?void 0:s.reduce((i,v)=>{let{class:r,className:S,..._}=v;return Object.entries(_).every(z=>{let[M,I]=z;return Array.isArray(I)?I.includes({...l,...d}[M]):{...l,...d}[M]===I})?[...i,r,S]:i},[]);return bt(e,n,m,t==null?void 0:t.class,t==null?void 0:t.className)},rr=sr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),lo=y.forwardRef(({className:e,variant:o,size:t,asChild:s=!1,loading:c,children:l,disabled:n,...d},m)=>{const i=s?Go:"button";return a.jsxs(i,{className:le(rr({variant:o,size:t,className:e})),ref:m,disabled:n||c,...d,children:[c?a.jsx(Wo,{className:"animate-spin"}):null,l]})});lo.displayName="Button";class ar extends y.Component{constructor(){super(...arguments);nt(this,"state",{error:null})}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,s){console.error("[Jiang13Forum]",t,s.componentStack)}render(){return this.state.error?a.jsxs("div",{style:{padding:24,textAlign:"center"},children:[a.jsx("h3",{children:"页面渲染出错"}),a.jsx("p",{style:{color:"var(--color-text-3)",fontSize:13},children:this.state.error.message}),a.jsx(lo,{size:"sm",onClick:()=>{this.setState({error:null}),window.location.reload()},children:"刷新页面"})]}):this.props.children}}function nr(e){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",o.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const ir=e=>{switch(e){case"success":return dr;case"info":return mr;case"warning":return ur;case"error":return pr;default:return null}},lr=Array(12).fill(0),cr=({visible:e,className:o})=>u.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":e},u.createElement("div",{className:"sonner-spinner"},lr.map((t,s)=>u.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),dr=u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},u.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ur=u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},u.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mr=u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},u.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),pr=u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},u.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fr=u.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},u.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),u.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hr=()=>{const[e,o]=u.useState(document.hidden);return u.useEffect(()=>{const t=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),e};let Ke=1;class gr{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const t=this.subscribers.indexOf(o);this.subscribers.splice(t,1)}),this.publish=o=>{this.subscribers.forEach(t=>t(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var t;const{message:s,...c}=o,l=typeof(o==null?void 0:o.id)=="number"||((t=o.id)==null?void 0:t.length)>0?o.id:Ke++,n=this.toasts.find(m=>m.id===l),d=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(l)&&this.dismissedToasts.delete(l),n?this.toasts=this.toasts.map(m=>m.id===l?(this.publish({...m,...o,id:l,title:s}),{...m,...o,id:l,dismissible:d,title:s}):m):this.addToast({title:s,...c,dismissible:d,id:l}),l},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:o,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(s=>s({id:t.id,dismiss:!0}))}),o),this.message=(o,t)=>this.create({...t,message:o}),this.error=(o,t)=>this.create({...t,message:o,type:"error"}),this.success=(o,t)=>this.create({...t,type:"success",message:o}),this.info=(o,t)=>this.create({...t,type:"info",message:o}),this.warning=(o,t)=>this.create({...t,type:"warning",message:o}),this.loading=(o,t)=>this.create({...t,type:"loading",message:o}),this.promise=(o,t)=>{if(!t)return;let s;t.loading!==void 0&&(s=this.create({...t,promise:o,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const c=Promise.resolve(o instanceof Function?o():o);let l=s!==void 0,n;const d=c.then(async i=>{if(n=["resolve",i],u.isValidElement(i))l=!1,this.create({id:s,type:"default",message:i});else if(yr(i)&&!i.ok){l=!1;const r=typeof t.error=="function"?await t.error(`HTTP error! status: ${i.status}`):t.error,S=typeof t.description=="function"?await t.description(`HTTP error! status: ${i.status}`):t.description,z=typeof r=="object"&&!u.isValidElement(r)?r:{message:r};this.create({id:s,type:"error",description:S,...z})}else if(i instanceof Error){l=!1;const r=typeof t.error=="function"?await t.error(i):t.error,S=typeof t.description=="function"?await t.description(i):t.description,z=typeof r=="object"&&!u.isValidElement(r)?r:{message:r};this.create({id:s,type:"error",description:S,...z})}else if(t.success!==void 0){l=!1;const r=typeof t.success=="function"?await t.success(i):t.success,S=typeof t.description=="function"?await t.description(i):t.description,z=typeof r=="object"&&!u.isValidElement(r)?r:{message:r};this.create({id:s,type:"success",description:S,...z})}}).catch(async i=>{if(n=["reject",i],t.error!==void 0){l=!1;const v=typeof t.error=="function"?await t.error(i):t.error,r=typeof t.description=="function"?await t.description(i):t.description,_=typeof v=="object"&&!u.isValidElement(v)?v:{message:v};this.create({id:s,type:"error",description:r,..._})}}).finally(()=>{l&&(this.dismiss(s),s=void 0),t.finally==null||t.finally.call(t)}),m=()=>new Promise((i,v)=>d.then(()=>n[0]==="reject"?v(n[1]):i(n[1])).catch(v));return typeof s!="string"&&typeof s!="number"?{unwrap:m}:Object.assign(s,{unwrap:m})},this.custom=(o,t)=>{const s=(t==null?void 0:t.id)||Ke++;return this.create({jsx:o(s),id:s,...t}),s},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const X=new gr,br=(e,o)=>{const t=(o==null?void 0:o.id)||Ke++;return X.addToast({title:e,...o,id:t}),t},yr=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",vr=br,xr=()=>X.toasts,wr=()=>X.getActiveToasts(),Yr=Object.assign(vr,{success:X.success,info:X.info,warning:X.warning,error:X.error,custom:X.custom,message:X.message,promise:X.promise,dismiss:X.dismiss,loading:X.loading},{getHistory:xr,getToasts:wr});nr("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function $e(e){return e.label!==void 0}const kr=3,jr="24px",Sr="16px",yt=4e3,Nr=356,Er=14,Cr=45,Tr=200;function pe(...e){return e.filter(Boolean).join(" ")}function _r(e){const[o,t]=e.split("-"),s=[];return o&&s.push(o),t&&s.push(t),s}const Rr=e=>{var o,t,s,c,l,n,d,m,i;const{invert:v,toast:r,unstyled:S,interacting:_,setHeights:z,visibleToasts:M,heights:I,index:j,toasts:L,expanded:K,removeToast:q,defaultRichColors:Z,closeButton:B,style:D,cancelButtonStyle:p,actionButtonStyle:O,className:ee="",descriptionClassName:ce="",duration:te,position:H,gap:se,expandByDefault:Y,classNames:g,icons:E,closeButtonAriaLabel:U="Close toast"}=e,[V,b]=u.useState(null),[de,je]=u.useState(null),[N,P]=u.useState(!1),[k,C]=u.useState(!1),[re,T]=u.useState(!1),[A,Se]=u.useState(!1),[fe,ae]=u.useState(!1),[Pe,ye]=u.useState(0),[co,Je]=u.useState(0),Ae=u.useRef(r.duration||te||yt),Qe=u.useRef(null),he=u.useRef(null),uo=j===0,mo=j+1<=M,J=r.type,Te=r.dismissible!==!1,po=r.className||"",fo=r.descriptionClassName||"",Me=u.useMemo(()=>I.findIndex(x=>x.toastId===r.id)||0,[I,r.id]),ho=u.useMemo(()=>{var x;return(x=r.closeButton)!=null?x:B},[r.closeButton,B]),Ze=u.useMemo(()=>r.duration||te||yt,[r.duration,te]),Ve=u.useRef(0),_e=u.useRef(0),et=u.useRef(0),Re=u.useRef(null),[go,bo]=H.split("-"),tt=u.useMemo(()=>I.reduce((x,F,W)=>W>=Me?x:x+F.height,0),[I,Me]),ot=hr(),yo=r.invert||v,Ge=J==="loading";_e.current=u.useMemo(()=>Me*se+tt,[Me,tt]),u.useEffect(()=>{Ae.current=Ze},[Ze]),u.useEffect(()=>{P(!0)},[]),u.useEffect(()=>{const x=he.current;if(x){const F=x.getBoundingClientRect().height;return Je(F),z(W=>[{toastId:r.id,height:F,position:r.position},...W]),()=>z(W=>W.filter(Q=>Q.toastId!==r.id))}},[z,r.id]),u.useLayoutEffect(()=>{if(!N)return;const x=he.current,F=x.style.height;x.style.height="auto";const W=x.getBoundingClientRect().height;x.style.height=F,Je(W),z(Q=>Q.find(G=>G.toastId===r.id)?Q.map(G=>G.toastId===r.id?{...G,height:W}:G):[{toastId:r.id,height:W,position:r.position},...Q])},[N,r.title,r.description,z,r.id,r.jsx,r.action,r.cancel]);const ve=u.useCallback(()=>{C(!0),ye(_e.current),z(x=>x.filter(F=>F.toastId!==r.id)),setTimeout(()=>{q(r)},Tr)},[r,q,z,_e]);u.useEffect(()=>{if(r.promise&&J==="loading"||r.duration===1/0||r.type==="loading")return;let x;return K||_||ot?(()=>{if(et.current<Ve.current){const Q=new Date().getTime()-Ve.current;Ae.current=Ae.current-Q}et.current=new Date().getTime()})():(()=>{Ae.current!==1/0&&(Ve.current=new Date().getTime(),x=setTimeout(()=>{r.onAutoClose==null||r.onAutoClose.call(r,r),ve()},Ae.current))})(),()=>clearTimeout(x)},[K,_,r,J,ot,ve]),u.useEffect(()=>{r.delete&&(ve(),r.onDismiss==null||r.onDismiss.call(r,r))},[ve,r.delete]);function vo(){var x;if(E!=null&&E.loading){var F;return u.createElement("div",{className:pe(g==null?void 0:g.loader,r==null||(F=r.classNames)==null?void 0:F.loader,"sonner-loader"),"data-visible":J==="loading"},E.loading)}return u.createElement(cr,{className:pe(g==null?void 0:g.loader,r==null||(x=r.classNames)==null?void 0:x.loader),visible:J==="loading"})}const xo=r.icon||(E==null?void 0:E[J])||ir(J);var st,rt;return u.createElement("li",{tabIndex:0,ref:he,className:pe(ee,po,g==null?void 0:g.toast,r==null||(o=r.classNames)==null?void 0:o.toast,g==null?void 0:g.default,g==null?void 0:g[J],r==null||(t=r.classNames)==null?void 0:t[J]),"data-sonner-toast":"","data-rich-colors":(st=r.richColors)!=null?st:Z,"data-styled":!(r.jsx||r.unstyled||S),"data-mounted":N,"data-promise":!!r.promise,"data-swiped":fe,"data-removed":k,"data-visible":mo,"data-y-position":go,"data-x-position":bo,"data-index":j,"data-front":uo,"data-swiping":re,"data-dismissible":Te,"data-type":J,"data-invert":yo,"data-swipe-out":A,"data-swipe-direction":de,"data-expanded":!!(K||Y&&N),"data-testid":r.testId,style:{"--index":j,"--toasts-before":j,"--z-index":L.length-j,"--offset":`${k?Pe:_e.current}px`,"--initial-height":Y?"auto":`${co}px`,...D,...r.style},onDragEnd:()=>{T(!1),b(null),Re.current=null},onPointerDown:x=>{x.button!==2&&(Ge||!Te||(Qe.current=new Date,ye(_e.current),x.target.setPointerCapture(x.pointerId),x.target.tagName!=="BUTTON"&&(T(!0),Re.current={x:x.clientX,y:x.clientY})))},onPointerUp:()=>{var x,F,W;if(A||!Te)return;Re.current=null;const Q=Number(((x=he.current)==null?void 0:x.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),De=Number(((F=he.current)==null?void 0:F.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),G=new Date().getTime()-((W=Qe.current)==null?void 0:W.getTime()),oe=V==="x"?Q:De,Oe=Math.abs(oe)/G;if(Math.abs(oe)>=Cr||Oe>.11){ye(_e.current),r.onDismiss==null||r.onDismiss.call(r,r),je(V==="x"?Q>0?"right":"left":De>0?"down":"up"),ve(),Se(!0);return}else{var ne,ie;(ne=he.current)==null||ne.style.setProperty("--swipe-amount-x","0px"),(ie=he.current)==null||ie.style.setProperty("--swipe-amount-y","0px")}ae(!1),T(!1),b(null)},onPointerMove:x=>{var F,W,Q;if(!Re.current||!Te||((F=window.getSelection())==null?void 0:F.toString().length)>0)return;const G=x.clientY-Re.current.y,oe=x.clientX-Re.current.x;var Oe;const ne=(Oe=e.swipeDirections)!=null?Oe:_r(H);!V&&(Math.abs(oe)>1||Math.abs(G)>1)&&b(Math.abs(oe)>Math.abs(G)?"x":"y");let ie={x:0,y:0};const at=Ne=>1/(1.5+Math.abs(Ne)/20);if(V==="y"){if(ne.includes("top")||ne.includes("bottom"))if(ne.includes("top")&&G<0||ne.includes("bottom")&&G>0)ie.y=G;else{const Ne=G*at(G);ie.y=Math.abs(Ne)<Math.abs(G)?Ne:G}}else if(V==="x"&&(ne.includes("left")||ne.includes("right")))if(ne.includes("left")&&oe<0||ne.includes("right")&&oe>0)ie.x=oe;else{const Ne=oe*at(oe);ie.x=Math.abs(Ne)<Math.abs(oe)?Ne:oe}(Math.abs(ie.x)>0||Math.abs(ie.y)>0)&&ae(!0),(W=he.current)==null||W.style.setProperty("--swipe-amount-x",`${ie.x}px`),(Q=he.current)==null||Q.style.setProperty("--swipe-amount-y",`${ie.y}px`)}},ho&&!r.jsx&&J!=="loading"?u.createElement("button",{"aria-label":U,"data-disabled":Ge,"data-close-button":!0,onClick:Ge||!Te?()=>{}:()=>{ve(),r.onDismiss==null||r.onDismiss.call(r,r)},className:pe(g==null?void 0:g.closeButton,r==null||(s=r.classNames)==null?void 0:s.closeButton)},(rt=E==null?void 0:E.close)!=null?rt:fr):null,(J||r.icon||r.promise)&&r.icon!==null&&((E==null?void 0:E[J])!==null||r.icon)?u.createElement("div",{"data-icon":"",className:pe(g==null?void 0:g.icon,r==null||(c=r.classNames)==null?void 0:c.icon)},r.promise||r.type==="loading"&&!r.icon?r.icon||vo():null,r.type!=="loading"?xo:null):null,u.createElement("div",{"data-content":"",className:pe(g==null?void 0:g.content,r==null||(l=r.classNames)==null?void 0:l.content)},u.createElement("div",{"data-title":"",className:pe(g==null?void 0:g.title,r==null||(n=r.classNames)==null?void 0:n.title)},r.jsx?r.jsx:typeof r.title=="function"?r.title():r.title),r.description?u.createElement("div",{"data-description":"",className:pe(ce,fo,g==null?void 0:g.description,r==null||(d=r.classNames)==null?void 0:d.description)},typeof r.description=="function"?r.description():r.description):null),u.isValidElement(r.cancel)?r.cancel:r.cancel&&$e(r.cancel)?u.createElement("button",{"data-button":!0,"data-cancel":!0,style:r.cancelButtonStyle||p,onClick:x=>{$e(r.cancel)&&Te&&(r.cancel.onClick==null||r.cancel.onClick.call(r.cancel,x),ve())},className:pe(g==null?void 0:g.cancelButton,r==null||(m=r.classNames)==null?void 0:m.cancelButton)},r.cancel.label):null,u.isValidElement(r.action)?r.action:r.action&&$e(r.action)?u.createElement("button",{"data-button":!0,"data-action":!0,style:r.actionButtonStyle||O,onClick:x=>{$e(r.action)&&(r.action.onClick==null||r.action.onClick.call(r.action,x),!x.defaultPrevented&&ve())},className:pe(g==null?void 0:g.actionButton,r==null||(i=r.classNames)==null?void 0:i.actionButton)},r.action.label):null)};function vt(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function zr(e,o){const t={};return[e,o].forEach((s,c)=>{const l=c===1,n=l?"--mobile-offset":"--offset",d=l?Sr:jr;function m(i){["top","right","bottom","left"].forEach(v=>{t[`${n}-${v}`]=typeof i=="number"?`${i}px`:i})}typeof s=="number"||typeof s=="string"?m(s):typeof s=="object"?["top","right","bottom","left"].forEach(i=>{s[i]===void 0?t[`${n}-${i}`]=d:t[`${n}-${i}`]=typeof s[i]=="number"?`${s[i]}px`:s[i]}):m(d)}),t}const Pr=u.forwardRef(function(o,t){const{id:s,invert:c,position:l="bottom-right",hotkey:n=["altKey","KeyT"],expand:d,closeButton:m,className:i,offset:v,mobileOffset:r,theme:S="light",richColors:_,duration:z,style:M,visibleToasts:I=kr,toastOptions:j,dir:L=vt(),gap:K=Er,icons:q,containerAriaLabel:Z="Notifications"}=o,[B,D]=u.useState([]),p=u.useMemo(()=>s?B.filter(N=>N.toasterId===s):B.filter(N=>!N.toasterId),[B,s]),O=u.useMemo(()=>Array.from(new Set([l].concat(p.filter(N=>N.position).map(N=>N.position)))),[p,l]),[ee,ce]=u.useState([]),[te,H]=u.useState(!1),[se,Y]=u.useState(!1),[g,E]=u.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=u.useRef(null),V=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=u.useRef(null),de=u.useRef(!1),je=u.useCallback(N=>{D(P=>{var k;return(k=P.find(C=>C.id===N.id))!=null&&k.delete||X.dismiss(N.id),P.filter(({id:C})=>C!==N.id)})},[]);return u.useEffect(()=>X.subscribe(N=>{if(N.dismiss){requestAnimationFrame(()=>{D(P=>P.map(k=>k.id===N.id?{...k,delete:!0}:k))});return}setTimeout(()=>{No.flushSync(()=>{D(P=>{const k=P.findIndex(C=>C.id===N.id);return k!==-1?[...P.slice(0,k),{...P[k],...N},...P.slice(k+1)]:[N,...P]})})})}),[B]),u.useEffect(()=>{if(S!=="system"){E(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?E("dark"):E("light")),typeof window>"u")return;const N=window.matchMedia("(prefers-color-scheme: dark)");try{N.addEventListener("change",({matches:P})=>{E(P?"dark":"light")})}catch{N.addListener(({matches:k})=>{try{E(k?"dark":"light")}catch(C){console.error(C)}})}},[S]),u.useEffect(()=>{B.length<=1&&H(!1)},[B]),u.useEffect(()=>{const N=P=>{var k;if(n.every(T=>P[T]||P.code===T)){var re;H(!0),(re=U.current)==null||re.focus()}P.code==="Escape"&&(document.activeElement===U.current||(k=U.current)!=null&&k.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[n]),u.useEffect(()=>{if(U.current)return()=>{b.current&&(b.current.focus({preventScroll:!0}),b.current=null,de.current=!1)}},[U.current]),u.createElement("section",{ref:t,"aria-label":`${Z} ${V}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},O.map((N,P)=>{var k;const[C,re]=N.split("-");return p.length?u.createElement("ol",{key:N,dir:L==="auto"?vt():L,tabIndex:-1,ref:U,className:i,"data-sonner-toaster":!0,"data-sonner-theme":g,"data-y-position":C,"data-x-position":re,style:{"--front-toast-height":`${((k=ee[0])==null?void 0:k.height)||0}px`,"--width":`${Nr}px`,"--gap":`${K}px`,...M,...zr(v,r)},onBlur:T=>{de.current&&!T.currentTarget.contains(T.relatedTarget)&&(de.current=!1,b.current&&(b.current.focus({preventScroll:!0}),b.current=null))},onFocus:T=>{T.target instanceof HTMLElement&&T.target.dataset.dismissible==="false"||de.current||(de.current=!0,b.current=T.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{se||H(!1)},onDragEnd:()=>H(!1),onPointerDown:T=>{T.target instanceof HTMLElement&&T.target.dataset.dismissible==="false"||Y(!0)},onPointerUp:()=>Y(!1)},p.filter(T=>!T.position&&P===0||T.position===N).map((T,A)=>{var Se,fe;return u.createElement(Rr,{key:T.id,icons:q,index:A,toast:T,defaultRichColors:_,duration:(Se=j==null?void 0:j.duration)!=null?Se:z,className:j==null?void 0:j.className,descriptionClassName:j==null?void 0:j.descriptionClassName,invert:c,visibleToasts:I,closeButton:(fe=j==null?void 0:j.closeButton)!=null?fe:m,interacting:se,position:N,style:j==null?void 0:j.style,unstyled:j==null?void 0:j.unstyled,classNames:j==null?void 0:j.classNames,cancelButtonStyle:j==null?void 0:j.cancelButtonStyle,actionButtonStyle:j==null?void 0:j.actionButtonStyle,closeButtonAriaLabel:j==null?void 0:j.closeButtonAriaLabel,removeToast:je,toasts:p.filter(ae=>ae.position==T.position),heights:ee.filter(ae=>ae.position==T.position),setHeights:ce,expandByDefault:d,gap:K,expanded:te,swipeDirections:o.swipeDirections})})):null}))});function Ar(){const{theme:e}=Lt();return a.jsx(Pr,{theme:e,position:"top-center",richColors:!0,closeButton:!0,toastOptions:{classNames:{toast:"font-sans"}}})}const Ir=y.lazy(()=>we(()=>import("./HomePage-D-Yzai0_.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Mr=y.lazy(()=>we(()=>import("./PostDetailPage-D4qGd4ZA.js"),__vite__mapDeps([8,1,6,4,5,2,7,9,10]))),Dr=y.lazy(()=>we(()=>import("./LoginPage-XRVgE8q8.js"),__vite__mapDeps([11,1,12,5,2]))),Or=y.lazy(()=>we(()=>import("./RegisterPage-C4KCPGxX.js"),__vite__mapDeps([13,1,12,5,2]))),xt=y.lazy(()=>we(()=>import("./ComposePage-Dv2Wt-UO.js"),__vite__mapDeps([14,1,2,10,9,5,4]))),Lr=y.lazy(()=>we(()=>import("./BoardsManagePage-DC-_uHJb.js"),__vite__mapDeps([15,1,12,5,6,4,2]))),Br=y.lazy(()=>we(()=>import("./ProfilePage-nO8fm023.js"),__vite__mapDeps([16,1,12,5,6,4,2]))),$r=y.lazy(()=>we(()=>import("./FavoritesPage-Dvc9bR9_.js"),__vite__mapDeps([17,1,4,5,2,7])));function Fr(){return a.jsx(Xo,{children:a.jsx(Ko,{children:a.jsxs(ar,{children:[a.jsx(Eo,{children:a.jsxs(Co,{children:[a.jsx(ue,{path:"/login",element:a.jsx(y.Suspense,{fallback:a.jsx(He,{}),children:a.jsx(Dr,{})})}),a.jsx(ue,{path:"/register",element:a.jsx(y.Suspense,{fallback:a.jsx(He,{}),children:a.jsx(Or,{})})}),a.jsxs(ue,{element:a.jsx(or,{}),children:[a.jsx(ue,{path:"/",element:a.jsx(Ir,{})}),a.jsx(ue,{path:"/post/:id",element:a.jsx(Mr,{})}),a.jsx(ue,{path:"/post/:id/edit",element:a.jsx(xt,{})}),a.jsx(ue,{path:"/compose",element:a.jsx(xt,{})}),a.jsx(ue,{path:"/boards",element:a.jsx(Lr,{})}),a.jsx(ue,{path:"/profile",element:a.jsx(Br,{})}),a.jsx(ue,{path:"/favorites",element:a.jsx($r,{})})]})]})}),a.jsx(Ar,{})]})})})}It(At());To.createRoot(document.getElementById("root")).render(a.jsx(u.StrictMode,{children:a.jsx(Fr,{})}));export{lo as B,be as a,rr as b,le as c,sr as d,oo as o,Yr as t,Dt as u};