import{j as o,Q as He,a as De}from"./query-CTmUNpMf.js";import{a as Qe,r as c,N as Je,R as Ye,u as je,L as re,O as Ke,b as Ne,c as M,d as Ze,e as Xe}from"./react-B_u3rLcX.js";import{B as et,R as tt,S as rt,A as ot,I as nt,a as st,b as at,c as it,M as lt,d as ct,C as dt,L as ut,u as pe,$ as pt}from"./ui-X1rpq_CV.js";(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function t(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(s){if(s.ep)return;s.ep=!0;const a=t(s);fetch(s.href,a)}})();var ke,me=Qe;ke=me.createRoot,me.hydrateRoot;function Ce(e){var r,t,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(r=0;r{const r=ht(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(oe);return l[0]===""&&l.length!==1&&l.shift(),Re(l,r)||ft(i)},getConflictingClassGroupIds:(i,l)=>{const d=t[i]||[];return l&&n[i]?[...d,...n[i]]:d}}},Re=(e,r)=>{if(e.length===0)return r.classGroupId;const t=e[0],n=r.nextPart.get(t),s=n?Re(e.slice(1),n):void 0;if(s)return s;if(r.validators.length===0)return;const a=e.join(oe);return r.validators.find(({validator:i})=>i(a))?.classGroupId},fe=/^\[(.+)\]$/,ft=e=>{if(fe.test(e)){const r=fe.exec(e)[1],t=r?.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},ht=e=>{const{theme:r,prefix:t}=e,n={nextPart:new Map,validators:[]};return bt(Object.entries(e.classGroups),t).forEach(([a,i])=>{Y(i,n,a,r)}),n},Y=(e,r,t,n)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?r:he(r,s);a.classGroupId=t;return}if(typeof s=="function"){if(gt(s)){Y(s(n),r,t,n);return}r.validators.push({validator:s,classGroupId:t});return}Object.entries(s).forEach(([a,i])=>{Y(i,he(r,a),t,n)})})},he=(e,r)=>{let t=e;return r.split(oe).forEach(n=>{t.nextPart.has(n)||t.nextPart.set(n,{nextPart:new Map,validators:[]}),t=t.nextPart.get(n)}),t},gt=e=>e.isThemeGetter,bt=(e,r)=>r?e.map(([t,n])=>{const s=n.map(a=>typeof a=="string"?r+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,l])=>[r+i,l])):a);return[t,s]}):e,xt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,n=new Map;const s=(a,i)=>{t.set(a,i),r++,r>e&&(r=0,n=t,t=new Map)};return{get(a){let i=t.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return s(a,i),i},set(a,i){t.has(a)?t.set(a,i):s(a,i)}}},Ee="!",yt=e=>{const{separator:r,experimentalParseClassName:t}=e,n=r.length===1,s=r[0],a=r.length,i=l=>{const d=[];let f=0,h=0,y;for(let g=0;gh?y-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:x,maybePostfixModifierPosition:m}};return t?l=>t({className:l,parseClassName:i}):i},vt=e=>{if(e.length<=1)return e;const r=[];let t=[];return e.forEach(n=>{n[0]==="["?(r.push(...t.sort(),n),t=[]):t.push(n)}),r.push(...t.sort()),r},wt=e=>({cache:xt(e.cacheSize),parseClassName:yt(e),...mt(e)}),jt=/\s+/,Nt=(e,r)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:s}=r,a=[],i=e.trim().split(jt);let l="";for(let d=i.length-1;d>=0;d-=1){const f=i[d],{modifiers:h,hasImportantModifier:y,baseClassName:p,maybePostfixModifierPosition:b}=t(f);let x=!!b,m=n(x?p.substring(0,b):p);if(!m){if(!x){l=f+(l.length>0?" "+l:l);continue}if(m=n(p),!m){l=f+(l.length>0?" "+l:l);continue}x=!1}const g=vt(h).join(":"),j=y?g+Ee:g,N=j+m;if(a.includes(N))continue;a.push(N);const _=s(m,x);for(let A=0;A<_.length;++A){const W=_[A];a.push(j+W)}l=f+(l.length>0?" "+l:l)}return l};function kt(){let e=0,r,t,n="";for(;e{if(typeof e=="string")return e;let r,t="";for(let n=0;ny(h),e());return t=wt(f),n=t.cache.get,s=t.cache.set,a=l,l(d)}function l(d){const f=n(d);if(f)return f;const h=Nt(d,t);return s(d,h),h}return function(){return a(kt.apply(null,arguments))}}const v=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},Me=/^\[(?:([a-z-]+):)?(.+)\]$/i,St=/^\d+\/\d+$/,Rt=new Set(["px","full","screen"]),Et=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,At=/\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$/,Mt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Pt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,S=e=>P(e)||Rt.has(e)||St.test(e),R=e=>T(e,"length",$t),P=e=>!!e&&!Number.isNaN(Number(e)),J=e=>T(e,"number",P),O=e=>!!e&&Number.isInteger(Number(e)),Tt=e=>e.endsWith("%")&&P(e.slice(0,-1)),u=e=>Me.test(e),E=e=>Et.test(e),Lt=new Set(["length","size","percentage"]),_t=e=>T(e,Lt,Pe),It=e=>T(e,"position",Pe),Ot=new Set(["image","url"]),Gt=e=>T(e,Ot,Ft),Vt=e=>T(e,"",Wt),G=()=>!0,T=(e,r,t)=>{const n=Me.exec(e);return n?n[1]?typeof r=="string"?n[1]===r:r.has(n[1]):t(n[2]):!1},$t=e=>At.test(e)&&!Mt.test(e),Pe=()=>!1,Wt=e=>Pt.test(e),Ft=e=>zt.test(e),Bt=()=>{const e=v("colors"),r=v("spacing"),t=v("blur"),n=v("brightness"),s=v("borderColor"),a=v("borderRadius"),i=v("borderSpacing"),l=v("borderWidth"),d=v("contrast"),f=v("grayscale"),h=v("hueRotate"),y=v("invert"),p=v("gap"),b=v("gradientColorStops"),x=v("gradientColorStopPositions"),m=v("inset"),g=v("margin"),j=v("opacity"),N=v("padding"),_=v("saturate"),A=v("scale"),W=v("sepia"),se=v("skew"),ae=v("space"),ie=v("translate"),U=()=>["auto","contain","none"],H=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",u,r],w=()=>[u,r],le=()=>["",S,R],F=()=>["auto",P,u],ce=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",u],ue=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>[P,u];return{cacheSize:500,separator:":",theme:{colors:[G],spacing:[S,R],blur:["none","",E,u],brightness:C(),borderColor:[e],borderRadius:["none","","full",E,u],borderSpacing:w(),borderWidth:le(),contrast:C(),grayscale:I(),hueRotate:C(),invert:I(),gap:w(),gradientColorStops:[e],gradientColorStopPositions:[Tt,R],inset:D(),margin:D(),opacity:C(),padding:w(),saturate:C(),scale:C(),sepia:I(),skew:C(),space:w(),translate:w()},classGroups:{aspect:[{aspect:["auto","square","video",u]}],container:["container"],columns:[{columns:[E]}],"break-after":[{"break-after":ue()}],"break-before":[{"break-before":ue()}],"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"],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:[...ce(),u]}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",O,u]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",u]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",O,u]}],"grid-cols":[{"grid-cols":[G]}],"col-start-end":[{col:["auto",{span:["full",O,u]},u]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[G]}],"row-start-end":[{row:["auto",{span:[O,u]},u]}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",u]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",u]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...Q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[ae]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ae]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",u,r]}],"min-w":[{"min-w":[u,r,"min","max","fit"]}],"max-w":[{"max-w":[u,r,"none","full","min","max","fit","prose",{screen:[E]},E]}],h:[{h:[u,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[u,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[u,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[u,r,"auto","min","max","fit"]}],"font-size":[{text:["base",E,R]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",J]}],"font-family":[{font:[G]}],"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:["tighter","tight","normal","wide","wider","widest",u]}],"line-clamp":[{"line-clamp":["none",P,J]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",S,u]}],"list-image":[{"list-image":["none",u]}],"list-style-type":[{list:["none","disc","decimal",u]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[j]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[j]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",S,R]}],"underline-offset":[{"underline-offset":["auto",S,u]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",u]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",u]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[j]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ce(),It]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_t]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Gt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[j]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[j]}],"divide-style":[{divide:B()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[S,u]}],"outline-w":[{outline:[S,R]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:le()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[j]}],"ring-offset-w":[{"ring-offset":[S,R]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",E,Vt]}],"shadow-color":[{shadow:[G]}],opacity:[{opacity:[j]}],"mix-blend":[{"mix-blend":[...de(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":de()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[n]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",E,u]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[y]}],saturate:[{saturate:[_]}],sepia:[{sepia:[W]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[y]}],"backdrop-opacity":[{"backdrop-opacity":[j]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",u]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",u]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",u]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[O,u]}],"translate-x":[{"translate-x":[ie]}],"translate-y":[{"translate-y":[ie]}],"skew-x":[{"skew-x":[se]}],"skew-y":[{"skew-y":[se]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",u]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",u]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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",u]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[S,R,J]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},qt=Ct(Bt);function k(...e){return qt(Se(e))}let ne=null,ze=null;function K(e){ne=e.access,e.refresh}function Te(){ne=null}function ge(){return ne}function Ut(e){ze=e}function Ht(){return ze}let V=null;async function Dt(){return V||(V=(async()=>{try{const e=await fetch("/v1/auth/refresh",{method:"POST",credentials:"include"});if(!e.ok)return!1;const r=await e.json();return!r.access_token||!r.refresh_token?!1:(K({access:r.access_token,refresh:r.refresh_token}),!0)}catch{return!1}finally{V=null}})(),V)}class Le extends Error{status;body;constructor(r,t,n){super(n),this.status=r,this.body=t}}async function Qt(e,r={}){const t=new Headers(r.headers),n=ge();n&&!t.has("Authorization")&&t.set("Authorization",`Bearer ${n}`);const s=await fetch(e,{...r,headers:t,credentials:"include"});if(s.status!==401||r.skipRefresh)return s;if(!await Dt()){Te();const d=Ht();return d&&typeof window<"u"&&(window.location.href=d),s}const i=new Headers(r.headers),l=ge();return l&&!i.has("Authorization")&&i.set("Authorization",`Bearer ${l}`),fetch(e,{...r,headers:i,credentials:"include"})}async function Jt(e){const r=await Qt(e);if(!r.ok){const t=await Yt(r);throw new Le(r.status,t,`${r.status} ${r.statusText}`)}return r.json()}async function Yt(e){try{return await e.json()}catch{return null}}const _e=c.createContext(null);function $(){const e=c.useContext(_e);if(!e)throw new Error("useAuth must be used inside ");return e}function Kt({children:e}){const[r,t]=c.useState(null),[n,s]=c.useState(!0),[a,i]=c.useState(null),l=c.useCallback(async()=>{try{return await Jt("/v1/auth/me")}catch(p){if(p instanceof Le&&p.status===401)return null;throw p}},[]);c.useEffect(()=>{let p=!1;return(async()=>{try{const b=await fetch("/v1/auth/refresh",{method:"POST",credentials:"include"});if(b.ok){const m=await b.json();m.access_token&&m.refresh_token&&K({access:m.access_token,refresh:m.refresh_token})}const x=await l();p||(t(x),i(null))}catch(b){p||(i(b instanceof Error?b.message:"unknown"),t(null))}finally{p||s(!1)}})(),()=>{p=!0}},[l]);const d=c.useCallback(async(p,b)=>{Ut(window.location.pathname+window.location.search);const x=await fetch("/v1/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({email:p,password:b})});if(!x.ok){const j=(await x.json().catch(()=>null))?.message??`${x.status} ${x.statusText}`;throw new Error(j)}const m=await x.json();K({access:m.access_token,refresh:m.refresh_token}),t(m.user),i(null)},[]),f=c.useCallback(async()=>{try{await fetch("/v1/auth/logout",{method:"POST",credentials:"include"})}catch{}Te(),t(null)},[]),h=c.useCallback(async()=>{const p=await l();t(p)},[l]),y=c.useMemo(()=>({user:r,loading:n,bootError:a,login:d,logout:f,refresh:h}),[r,n,a,d,f,h]);return o.jsx(_e.Provider,{value:y,children:e})}function Zt(e){return e==="super_admin"}function Xt(e){return e==="super_admin"}function be(e){return e==="super_admin"||e==="tenant_admin"}function er(e){return e==="super_admin"||e==="tenant_admin"||e==="viewer"}const tr=[{to:"/companies",label:"Companies",icon:et,show:e=>Xt(e?.role)},{to:"/sources",label:"Sources",icon:tt,show:e=>be(e?.role)},{to:"/telegram",label:"Telegram",icon:rt,show:e=>be(e?.role)},{to:"/tail",label:"Live tail",icon:ot},{to:"/dlq",label:"DLQ",icon:nt,show:e=>er(e?.role),badge:"M13c"},{to:"/audit",label:"Audit log",icon:st,badge:"M13c"}];function rr(){const{user:e}=$(),r=tr.filter(t=>!t.show||t.show(e));return o.jsxs("aside",{className:"hidden w-56 shrink-0 border-r bg-card md:block",children:[o.jsx("nav",{className:"flex flex-col gap-0.5 p-3",children:r.map(t=>o.jsxs(Je,{to:t.to,className:({isActive:n})=>k("flex items-center justify-between rounded-md px-3 py-2 text-sm transition-colors",n?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(t.icon,{className:"h-4 w-4","aria-hidden":!0}),t.label]}),t.badge?o.jsx("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:t.badge}):null]},t.to))}),o.jsx("div",{className:"border-t p-3 text-xs text-muted-foreground",children:o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(at,{className:"h-3.5 w-3.5"}),o.jsx("span",{children:"M13b W0 · SPA shell"})]})})]})}function xe(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function or(...e){return r=>{let t=!1;const n=e.map(s=>{const a=xe(s,r);return!t&&typeof a=="function"&&(t=!0),a});if(t)return()=>{for(let s=0;s{let{children:s,...a}=t,i=null,l=!1;const d=[];ye(s)&&typeof q=="function"&&(s=q(s._payload)),c.Children.forEach(s,p=>{if(dr(p)){l=!0;const b=p;let x="child"in b.props?b.props.child:b.props.children;ye(x)&&typeof q=="function"&&(x=q(x._payload)),i=ir(b,x),d.push(i?.props?.children)}else d.push(p)}),i?i=c.cloneElement(i,void 0,d):!l&&c.Children.count(s)===1&&c.isValidElement(s)&&(i=s);const f=i?cr(i):void 0,h=nr(n,f);if(!i){if(s||s===0)throw new Error(l?fr(e):mr(e));return s}const y=lr(a,i.props??{});return i.type!==c.Fragment&&(y.ref=n?h:f),c.cloneElement(i,y)});return r.displayName=`${e}.Slot`,r}var sr=Ie("Slot"),ar=Symbol.for("radix.slottable"),ir=(e,r)=>{if("child"in e.props){const t=e.props.child;return c.isValidElement(t)?c.cloneElement(t,void 0,e.props.children(t.props.children)):null}return c.isValidElement(r)?r:null};function lr(e,r){const t={...r};for(const n in r){const s=e[n],a=r[n];/^on[A-Z]/.test(n)?s&&a?t[n]=(...l)=>{const d=a(...l);return s(...l),d}:s&&(t[n]=s):n==="style"?t[n]={...s,...a}:n==="className"&&(t[n]=[s,a].filter(Boolean).join(" "))}return{...e,...t}}function cr(e){let r=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}function dr(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ar}var ur=Symbol.for("react.lazy");function ye(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===ur&&"_payload"in e&&pr(e._payload)}function pr(e){return typeof e=="object"&&e!==null&&"then"in e}var mr=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,fr=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,q=Ye[" use ".trim().toString()];const ve=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,we=Se,hr=(e,r)=>t=>{var n;if(r?.variants==null)return we(e,t?.class,t?.className);const{variants:s,defaultVariants:a}=r,i=Object.keys(s).map(f=>{const h=t?.[f],y=a?.[f];if(h===null)return null;const p=ve(h)||ve(y);return s[f][p]}),l=t&&Object.entries(t).reduce((f,h)=>{let[y,p]=h;return p===void 0||(f[y]=p),f},{}),d=r==null||(n=r.compoundVariants)===null||n===void 0?void 0:n.reduce((f,h)=>{let{class:y,className:p,...b}=h;return Object.entries(b).every(x=>{let[m,g]=x;return Array.isArray(g)?g.includes({...a,...l}[m]):{...a,...l}[m]===g})?[...f,y,p]:f},[]);return we(e,i,d,t?.class,t?.className)},gr=hr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium 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",{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-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),z=c.forwardRef(({className:e,variant:r,size:t,asChild:n=!1,...s},a)=>{const i=n?sr:"button";return o.jsx(i,{ref:a,className:k(gr({variant:r,size:t,className:e})),...s})});z.displayName="Button";const Oe="ba.theme";function Z(){if(typeof window>"u")return"system";const e=window.localStorage.getItem(Oe);return e==="light"||e==="dark"||e==="system"?e:"system"}function X(e){const r=document.documentElement,t=e==="dark"||e==="system"&&window.matchMedia?.("(prefers-color-scheme: dark)").matches;r.classList.toggle("dark",t),r.style.colorScheme=t?"dark":"light"}function br(){X(Z()),Z()==="system"&&window.matchMedia?.("(prefers-color-scheme: dark)").addEventListener("change",()=>{X("system")})}function xr(e){window.localStorage.setItem(Oe,e),X(e)}function yr(){const[e,r]=c.useState(Z),t=c.useCallback(n=>{xr(n),r(n)},[]);return c.useEffect(()=>{if(e!=="system")return;const n=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>r("system");return n.addEventListener("change",s),()=>n.removeEventListener("change",s)},[e]),{theme:e,setTheme:t}}function vr(){const{user:e,logout:r}=$(),{theme:t,setTheme:n}=yr(),s=je(),[a,i]=c.useState(!1);if(!e)return null;const l=async()=>{await r(),s("/login",{replace:!0})};return o.jsxs("header",{className:"flex h-14 items-center justify-between border-b bg-card px-4",children:[o.jsxs(re,{to:"/",className:"flex items-center gap-2",children:[o.jsx("span",{className:"inline-block h-6 w-6 rounded bg-primary","aria-hidden":!0}),o.jsx("span",{className:"text-sm font-semibold",children:"broad-announce"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[Zt(e.role)?o.jsx("span",{className:"hidden text-xs text-muted-foreground sm:inline",children:"all companies"}):e.tenant_slug?o.jsx("span",{className:"hidden rounded-md bg-muted px-2 py-1 text-xs sm:inline",children:e.tenant_slug}):null,o.jsxs(z,{variant:"ghost",size:"icon","aria-label":"Toggle theme",onClick:()=>{n(t==="light"?"dark":t==="dark"?"system":"light")},children:[t==="light"&&o.jsx(it,{className:"h-4 w-4"}),t==="dark"&&o.jsx(lt,{className:"h-4 w-4"}),t==="system"&&o.jsx(ct,{className:"h-4 w-4"})]}),o.jsxs("div",{className:"relative",children:[o.jsxs(z,{variant:"ghost",size:"sm",onClick:()=>i(d=>!d),"aria-haspopup":"menu","aria-expanded":a,children:[o.jsxs("span",{className:"hidden text-right sm:block",children:[o.jsx("span",{className:"block text-xs font-medium",children:e.email}),o.jsx("span",{className:"block text-[10px] uppercase tracking-wider text-muted-foreground",children:e.role.replace("_"," ")})]}),o.jsx(dt,{className:"h-4 w-4 opacity-60"})]}),a?o.jsx("div",{role:"menu",className:k("absolute right-0 top-full z-50 mt-1 w-48 rounded-md border bg-card p-1 shadow-md"),onMouseLeave:()=>i(!1),children:o.jsxs("button",{type:"button",onClick:l,className:"flex w-full items-center gap-2 rounded px-3 py-2 text-left text-sm hover:bg-accent",children:[o.jsx(ut,{className:"h-4 w-4"}),"Sign out"]})}):null]})]})]})}function wr(){return o.jsxs("div",{className:"flex h-full flex-col",children:[o.jsx(vr,{}),o.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[o.jsx(rr,{}),o.jsx("main",{className:"flex-1 overflow-auto bg-background p-6",children:o.jsx(Ke,{})})]})]})}function jr({children:e}){const{user:r,loading:t}=$(),n=Ne();return t?o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-primary border-t-transparent"})}):r?o.jsx(o.Fragment,{children:e}):o.jsx(M,{to:"/login",state:{from:n.pathname+n.search},replace:!0})}const ee=c.forwardRef(({className:e,type:r,...t},n)=>o.jsx("input",{type:r,className:k("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","placeholder:text-muted-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));ee.displayName="Input";var Nr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],kr=Nr.reduce((e,r)=>{const t=Ie(`Primitive.${r}`),n=c.forwardRef((s,a)=>{const{asChild:i,...l}=s,d=i?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(d,{...l,ref:a})});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{}),Cr="Label",Ge=c.forwardRef((e,r)=>o.jsx(kr.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));Ge.displayName=Cr;var Ve=Ge;const te=c.forwardRef(({className:e,...r},t)=>o.jsx(Ve,{ref:t,className:k("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...r}));te.displayName=Ve.displayName;const $e=c.forwardRef(({className:e,...r},t)=>o.jsx("div",{ref:t,className:k("rounded-lg border bg-card text-card-foreground shadow-sm",e),...r}));$e.displayName="Card";const We=c.forwardRef(({className:e,...r},t)=>o.jsx("div",{ref:t,className:k("flex flex-col space-y-1.5 p-6",e),...r}));We.displayName="CardHeader";const Fe=c.forwardRef(({className:e,...r},t)=>o.jsx("h3",{ref:t,className:k("text-lg font-semibold leading-none tracking-tight",e),...r}));Fe.displayName="CardTitle";const Be=c.forwardRef(({className:e,...r},t)=>o.jsx("p",{ref:t,className:k("text-sm text-muted-foreground",e),...r}));Be.displayName="CardDescription";const qe=c.forwardRef(({className:e,...r},t)=>o.jsx("div",{ref:t,className:k("p-6 pt-0",e),...r}));qe.displayName="CardContent";const Sr=c.forwardRef(({className:e,...r},t)=>o.jsx("div",{ref:t,className:k("flex items-center p-6 pt-0",e),...r}));Sr.displayName="CardFooter";function Rr(){const{user:e,login:r,loading:t}=$(),n=je(),a=Ne().state,[i,l]=c.useState(""),[d,f]=c.useState(""),[h,y]=c.useState(!1),[p,b]=c.useState(null);if(t)return null;if(e){const m=a?.from??"/";return o.jsx(M,{to:m,replace:!0})}const x=async m=>{m.preventDefault(),b(null),y(!0);try{await r(i,d),pe.success("Signed in");const g=a?.from??"/";n(g,{replace:!0})}catch(g){const j=g instanceof Error?g.message:"Sign-in failed";b(j),pe.error(j)}finally{y(!1)}};return o.jsx("div",{className:"flex h-full items-center justify-center bg-muted/30 p-4",children:o.jsxs($e,{className:"w-full max-w-sm",children:[o.jsxs(We,{children:[o.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[o.jsx("span",{className:"inline-block h-6 w-6 rounded bg-primary","aria-hidden":!0}),o.jsx("span",{className:"text-sm font-semibold",children:"broad-announce"})]}),o.jsx(Fe,{children:"Sign in"}),o.jsx(Be,{children:"Operator console for the notification router."})]}),o.jsxs(qe,{children:[o.jsxs("form",{onSubmit:x,className:"space-y-4",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{htmlFor:"email",children:"Email"}),o.jsx(ee,{id:"email",type:"email",autoComplete:"email",required:!0,value:i,onChange:m=>l(m.target.value),placeholder:"super@broad-announce.test",disabled:h})]}),o.jsxs("div",{className:"space-y-2",children:[o.jsx(te,{htmlFor:"password",children:"Password"}),o.jsx(ee,{id:"password",type:"password",autoComplete:"current-password",required:!0,value:d,onChange:m=>f(m.target.value),disabled:h})]}),p?o.jsx("p",{role:"alert",className:"text-sm text-destructive",children:p}):null,o.jsx(z,{type:"submit",className:"w-full",disabled:h,children:h?"Signing in…":"Sign in"})]}),o.jsxs("p",{className:"mt-4 text-center text-xs text-muted-foreground",children:["Bootstrap the first super-admin with"," ",o.jsx("code",{className:"rounded bg-muted px-1",children:"scripts/bootstrap-super-admin.sh"}),"."]})]})]})})}function Er(){const{user:e}=$();if(!e)return o.jsx(M,{to:"/login",replace:!0});switch(e.role){case"super_admin":return o.jsx(M,{to:"/companies",replace:!0});case"tenant_admin":return o.jsx(M,{to:"/sources",replace:!0});case"viewer":return o.jsx(M,{to:"/dlq",replace:!0});default:return o.jsx(M,{to:"/login",replace:!0})}}function L({title:e,description:r,badge:t,children:n,className:s}){return o.jsx("div",{className:k("mx-auto max-w-2xl py-12",s),children:o.jsxs("div",{className:"rounded-lg border bg-card p-8 shadow-sm",children:[o.jsx("div",{className:"mb-4 flex items-center gap-2",children:o.jsx("span",{className:"rounded-md bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground",children:t??"coming soon"})}),o.jsx("h2",{className:"mb-2 text-2xl font-semibold tracking-tight",children:e}),r?o.jsx("p",{className:"mb-6 text-sm text-muted-foreground",children:r}):null,n]})})}function Ar(){return o.jsx(L,{title:"Companies",badge:"M13b W1",description:"Super-admin can create, list, edit, suspend, activate companies. Tenant-admin sees only their own (read-only).",children:o.jsxs("ul",{className:"ml-5 list-disc space-y-1 text-sm text-muted-foreground",children:[o.jsx("li",{children:"List with search, status filter, pagination"}),o.jsx("li",{children:"Create form: name, slug, rate_limit_per_sec, fcm_shared"}),o.jsx("li",{children:"Detail view with suspend / activate (typed confirmation)"}),o.jsx("li",{children:"Tenant-admin: read-only view of own company"})]})})}function Mr(){return o.jsx(L,{title:"Sources",badge:"M13b W2",description:"Per-company sources with HMAC + API key, rate limits, allowed IPs, quarantine badge, one-time secrets modal.",children:o.jsxs("ul",{className:"ml-5 list-disc space-y-1 text-sm text-muted-foreground",children:[o.jsx("li",{children:"List + filter by company / type / status"}),o.jsx("li",{children:"Create form with auto-generated HMAC + API key"}),o.jsx("li",{children:`One-time secrets modal (forces "I've saved them")`}),o.jsx("li",{children:"Cert lifecycle (mTLS) — folded in from M14-ui"})]})})}function Pr(){return o.jsx(L,{title:"Telegram bots",badge:"M13b W3",description:"Per-company bot config, invite codes, bindings table. Bot token is never displayed after save.",children:o.jsxs("ul",{className:"ml-5 list-disc space-y-1 text-sm text-muted-foreground",children:[o.jsx("li",{children:"Set / rotate bot token (encrypted at rest in admind)"}),o.jsx("li",{children:"Generate invite codes with magic link"}),o.jsx("li",{children:"List bindings: chat_id → individual_id mapping"})]})})}function zr(){return o.jsx(L,{title:"Live tail",badge:"M13c",description:"SSE feed of incoming alerts, filterable by company / severity / source / text. Replaces the per-company dump that lives on /v1/tail today.",children:o.jsxs("ul",{className:"ml-5 list-disc space-y-1 text-sm text-muted-foreground",children:[o.jsx("li",{children:"EventSource('/v1/tail/stream') with auth via short-lived SSE token"}),o.jsx("li",{children:"Filter bar (severity, source, search) + pause-on-scroll-up"}),o.jsx("li",{children:"Click row → modal with full payload + dedupe history"})]})})}function Tr(){return o.jsxs(L,{title:"DLQ",badge:"M13c",description:"React replacement for cmd/admind/ui/dlq.html. Same list/replay/discard flow plus filters and audit hooks.",children:[o.jsxs("p",{className:"mb-4 text-sm text-muted-foreground",children:["Until the React surface ships, the M8 HTML UI is still served at"," ",o.jsx("code",{className:"rounded bg-muted px-1",children:"/dlq"})," by the admind binary."]}),o.jsxs("p",{className:"text-xs text-muted-foreground",children:["Per-channel admin endpoints (",o.jsx("code",{children:"/v1/admin/dlq"})," on deliverd-fcm and deliverd-telegram, JWT-gated) are also available for ops who want to inspect a single channel."]})]})}function Lr(){return o.jsx(L,{title:"Audit log",badge:"M13c",description:"Read-only table of audit_log rows, filterable by actor / action / entity / time.",children:o.jsxs("ul",{className:"ml-5 list-disc space-y-1 text-sm text-muted-foreground",children:[o.jsx("li",{children:"Filter bar: actor (user_id), action, entity_type, time range"}),o.jsx("li",{children:"Row expand: full JSON payload"}),o.jsx("li",{children:"Export to CSV (super-admin only)"})]})})}function _r(){return o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"404"}),o.jsx("h1",{className:"mt-2 text-2xl font-semibold tracking-tight",children:"Page not found"}),o.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"The route you followed isn't part of the admin console."}),o.jsx(z,{asChild:!0,className:"mt-6",children:o.jsx(re,{to:"/",children:"Back to dashboard"})})]})})}function Ir(){return o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"text-center",children:[o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"403"}),o.jsx("h1",{className:"mt-2 text-2xl font-semibold tracking-tight",children:"Forbidden"}),o.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Your role doesn't grant access to this page."}),o.jsx(z,{asChild:!0,className:"mt-6",children:o.jsx(re,{to:"/",children:"Back to dashboard"})})]})})}const Or=Ze([{path:"/login",element:o.jsx(Rr,{})},{path:"/forbidden",element:o.jsx(Ir,{})},{element:o.jsx(jr,{children:o.jsx(wr,{})}),children:[{path:"/",element:o.jsx(Er,{})},{path:"/companies/*",element:o.jsx(Ar,{})},{path:"/sources/*",element:o.jsx(Mr,{})},{path:"/telegram/*",element:o.jsx(Pr,{})},{path:"/tail",element:o.jsx(zr,{})},{path:"/dlq",element:o.jsx(Tr,{})},{path:"/audit",element:o.jsx(Lr,{})}]},{path:"*",element:o.jsx(_r,{})}]);br();const Gr=new He({defaultOptions:{queries:{staleTime:3e4,retry:1,refetchOnWindowFocus:!0}}}),Ue=document.getElementById("root");if(!Ue)throw new Error("#root element not found in index.html");ke(Ue).render(o.jsx(c.StrictMode,{children:o.jsx(De,{client:Gr,children:o.jsxs(Kt,{children:[o.jsx(Xe,{router:Or}),o.jsx(pt,{position:"top-right",richColors:!0})]})})}));