@starasia/admin 14.1.0 → 14.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -5
package/dist/index.cjs.js
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
.sa-table-layout tfoot.sa-tl-sticky-foot > tr:first-child > th {
|
|
55
55
|
box-shadow: 0 -2px 4px -2px var(--sa-border-subtle, #0b120e24);
|
|
56
56
|
}
|
|
57
|
-
`,document.head.appendChild(t)},Et=t=>t==="right"?"right":t==="center"?"center":"left",qi=/^(#|rgb|hsl|var\()/,Nt=t=>t?qi.test(t)?t:`var(--sa-background-${t})`:void 0,Zi=(t,r)=>{if(r)return t[r]},Gi=(t,r)=>t==null&&r==null?0:t==null?-1:r==null?1:typeof t=="number"&&typeof r=="number"?t-r:String(t).localeCompare(String(r)),Qi=({columns:t,data:r,getRowKey:n,rowBg:s,size:o="md",resizable:i=!1,layout:l="auto",widthStorageKey:c,columnState:a,onColumnStateChange:u,columnMenu:f=!1,sort:g,defaultSort:m,onSortChange:p,height:S,mobileLayout:b="cards",mobileBreakpoint:I="md",groupSeparator:B,summary:F,footer:C,stickyFooter:D=!1,emptyState:A,loading:R=!1,loadingRows:w=8,rowActions:O,selectable:L=!1,selectedKeys:U,defaultSelectedKeys:J,onSelectionChange:N,isRowSelectable:_})=>{_i();const te=!ve.useMediaQuery(I)&&b!=="scroll",V=!!(O!=null&&O.length),[z,P]=d.useState(null);d.useEffect(()=>{if(!z)return;const y=()=>P(null),j=setTimeout(()=>document.addEventListener("click",y),0);return()=>{clearTimeout(j),document.removeEventListener("click",y)}},[z]);const[se,ye]=d.useState(()=>new Set),Se=a!==void 0,[xe,pe]=d.useState({}),je=a??xe,be=y=>{u==null||u(y),Se||pe(y)},Te=g!==void 0,[ke,ze]=d.useState(m??null),Y=Te?g??null:ke,he=!p,Oe=y=>{p==null||p(y),Te||ze(y)},{headerGroups:Ne,leafColumns:ae,hasGroups:_e}=d.useMemo(()=>{var le;const y=new Set(je.hidden??[]),j=(ne,me)=>ne.key??(typeof ne.accessor=="string"?ne.accessor:`col-${me}`),M=t.map((ne,me)=>{var Je;if((Je=ne.children)!=null&&Je.length){const Dt=ne.children.map((Ke,St)=>({col:Ke,key:j(Ke,`${me}-${St}`)})).filter(Ke=>!y.has(Ke.key));return{col:ne,key:ne.key??`group-${me}`,isGroup:!0,leaves:Dt}}const ge={col:ne,key:j(ne,`${me}`)};return{col:ne,key:ge.key,isGroup:!1,leaves:y.has(ge.key)?[]:[ge]}}).filter(ne=>ne.leaves.length>0),Z=M.some(ne=>ne.isGroup);let re=M.flatMap(ne=>ne.leaves);if(!Z&&((le=je.order)!=null&&le.length)){const ne=new Map(je.order.map((me,ge)=>[me,ge]));re=[...re].sort((me,ge)=>(ne.get(me.key)??1/0)-(ne.get(ge.key)??1/0))}return{headerGroups:M,leafColumns:re,hasGroups:Z}},[t,je]),tt=d.useMemo(()=>new Map(ae.map((y,j)=>[y.key,j])),[ae]),W=!_e&&ae.some(y=>(y.col.headerColSpan??1)>1),$=ae.map(y=>y.key).join("|"),Q=(y,j)=>{const M=y.sortKey??(typeof y.accessor=="string"?y.accessor:void 0);return M?j[M]:void 0},de=y=>y.sortable??(!!y.sortKey||typeof y.accessor=="string"),ie=d.useMemo(()=>{if(!he||!Y)return r;const y=ae.find(M=>M.key===Y.key);if(!y)return r;const j=Y.direction==="asc"?1:-1;return[...r].sort((M,Z)=>Gi(Q(y.col,M),Q(y.col,Z))*j)},[r,he,Y,ae]),Be=!_e&&!W,Re=!!c&&Be,[$e,qe]=G.useColumnWidths(c??""),Me=Re?$e:void 0,Qe=d.useRef(null),[Ce,Ze]=d.useState();d.useLayoutEffect(()=>{Ze(void 0)},[$]),d.useLayoutEffect(()=>{if(!Be||Ce||!Qe.current)return;const y=Qe.current.querySelectorAll("th.sa-tl-leaf");Ze(Array.from(y).map(j=>j.offsetWidth))},[Ce,Be]);const[rt,ut]=d.useState(),[ct,at]=d.useState(0);d.useLayoutEffect(()=>{if(!_e||!Qe.current)return;const y=Qe.current.querySelector(":scope > tr");y&&at(y.offsetHeight)},[_e,$]);const ft=(y,j)=>{if((Me==null?void 0:Me[j])!=null)return Me[j];if(y.width!=null)return y.width;if((Ce==null?void 0:Ce[j])!=null)return Ce[j]},k=(y,j)=>typeof y.width=="number"?y.width:Ce==null?void 0:Ce[j],q=je.frozenKey&&!_e&&!W?ae.findIndex(y=>y.key===je.frozenKey):-1,K=y=>y<=q,we=L?Bt:0,Ie=y=>{const j=rt??Ce;if(!j)return we;let M=we;for(let Z=0;Z<y;Z++)M+=j[Z]??0;return M};d.useLayoutEffect(()=>{const y=Qe.current;if(!y||q<0){ut(void 0);return}let j=0;const M=()=>{j=0;const re=y.querySelectorAll("th.sa-tl-leaf"),le=Array.from(re).map(ne=>ne.getBoundingClientRect().width);ut(ne=>ne&&ne.length===le.length&&ne.every((me,ge)=>Math.abs(me-le[ge])<.5)?ne:le)},Z=new ResizeObserver(()=>{j||(j=requestAnimationFrame(M))});return Z.observe(y),y.querySelectorAll("th.sa-tl-leaf").forEach(re=>Z.observe(re)),M(),()=>{j&&cancelAnimationFrame(j),Z.disconnect()}},[$,q,L,Ce,Me]);const Ue=d.useRef(null),[Ae,De]=d.useState("100vh");d.useLayoutEffect(()=>{if(S!==void 0)return;const y=()=>{if(Ue.current){const j=Ue.current.getBoundingClientRect().top;De(`calc(100vh - ${j}px - var(--sa-floating-footer-height, 0px) + 12px)`)}};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[S]);const Ee=(y,j)=>n?n(y,j):j,He=U!==void 0,[wt,No]=d.useState(()=>new Set(J??[])),st=d.useMemo(()=>He?new Set(U):wt,[He,U,wt]);d.useEffect(()=>{L&&!n&&process.env.NODE_ENV!=="production"&&console.warn("[@starasia/admin] TableLayout: `selectable` tanpa `getRowKey` — key default (index) membuat seleksi menempel ke POSISI baris, bukan datanya. Beri `getRowKey` yang stabil (mis. r => r.id).")},[L,!n]);const Yr=y=>{if(He||No(y),N){const j=ie.filter((M,Z)=>y.has(Ee(M,Z)));N(Array.from(y),j)}},ir=(y,j)=>L&&(_?_(y,j):!0),lr=y=>{const j=new Set(st);j.has(y)?j.delete(y):j.add(y),Yr(j)},mt=d.useMemo(()=>L?ie.map((y,j)=>({row:y,i:j,key:Ee(y,j)})).filter(({row:y,i:j})=>_?_(y,j):!0).map(({key:y})=>y):[],[L,ie,_,n]),Xr=mt.filter(y=>st.has(y)),cr=mt.length>0&&Xr.length===mt.length,$r=Xr.length>0&&!cr,_o=()=>{const y=new Set(st);cr?mt.forEach(j=>y.delete(j)):mt.forEach(j=>y.add(j)),Yr(y)},ar=(y,j,M)=>y.render?y.render(j,M,ie):Zi(j,y.accessor),dr=ae.length+(L?1:0)+(V?1:0),Kr=["80%","55%","70%","45%","90%","60%"],qo=(y,j)=>Kr[(y*7+j*3)%Kr.length],Zo=(y,j)=>e.jsx(Ye.Skeleton,{height:14,width:qo(y,j),borderRadius:"rounded-sm"}),Go=Array.from({length:w},(y,j)=>e.jsxs(G.Tr,{children:[L&&e.jsx(G.Td,{style:{width:Bt,padding:0},children:e.jsx("div",{style:{display:"flex",justifyContent:"center"},children:e.jsx(Ye.Skeleton,{height:14,width:14,borderRadius:"rounded-sm"})})}),ae.map(({col:M,key:Z},re)=>e.jsx(G.Td,{style:{textAlign:Et(M.align)},children:Zo(j,re)},`sa-tl-sk-${j}-${Z}`)),V&&e.jsx(G.Td,{style:{width:1,padding:0,border:"none"}})]},`sa-tl-sk-${j}`)),Qo=(y,j)=>{j||be({...je,hidden:[...je.hidden??[],y]})},Uo=y=>be({...je,frozenKey:je.frozenKey===y?void 0:y}),Rt=y=>(O??[]).filter(j=>{var M;return!((M=j.hidden)!=null&&M.call(j,y))}),en={position:"absolute",right:0,top:0,bottom:0,display:"flex",alignItems:"center",gap:4,paddingRight:16,paddingLeft:40,background:"linear-gradient(to right, transparent, var(--sa-background-primary-inverse, #f8f8f8) 40px)"},At=(y,j,M,Z)=>{var Je;const re=(Je=y.disabled)==null?void 0:Je.call(y,j),le=(Z==null?void 0:Z.showLabel)??y.showLabel,ne=(Z==null?void 0:Z.size)??"xs",me=e.jsx(H.Button,{size:ne,variant:y.variant??"tertiary",tone:y.tone??"neutral",disabled:re,onClick:()=>y.onClick(j,M),iconLeft:y.icon?e.jsx(E.Icon,{name:y.icon,size:"sm"}):void 0,children:le&&y.label}),ge=y.tooltip;return ge?e.jsx(Fe.Tooltip,{label:ge,position:"top-end",children:me}):me},Jo=(y,j)=>{const M=Rt(y);if(!M.length)return null;if(M.length>5){const re=Ee(y,j),le=(z==null?void 0:z.rowKey)===re;return e.jsx("div",{className:"sa-tl-row-actions",style:en,onClick:ne=>ne.stopPropagation(),children:e.jsx(Fe.Tooltip,{label:"Aksi lainnya",position:"top",children:e.jsx(H.Button,{size:"xs",variant:"tertiary",onClick:ne=>{const me=ne.currentTarget.getBoundingClientRect();P(le?null:{rowKey:re,top:me.bottom+4,right:window.innerWidth-me.right})},children:e.jsx(E.Icon,{name:"MenuVertical",size:"sm"})})})})}return e.jsx("div",{className:"sa-tl-row-actions",style:en,children:M.map(re=>e.jsx(d.Fragment,{children:At(re,y,j)},re.key))})},Yo=(y,j)=>{const M=Rt(y);return M.length?e.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap",paddingTop:8,marginTop:8,borderTop:kt},children:M.map(Z=>e.jsx(d.Fragment,{children:At(Z,y,j,{showLabel:!0,size:"sm"})},Z.key))}):null},Xo=(y,j)=>{const M=Rt(y);return M.length?e.jsx("div",{style:{display:"flex",gap:4,paddingRight:8,flexShrink:0},children:M.map(Z=>e.jsx(d.Fragment,{children:At(Z,y,j,{showLabel:!1})},Z.key))}):null},ur=(y,j)=>{const{col:M,key:Z}=y,re=tt.get(Z)??0,le=K(re),ne=le&&re===q,me=(Y==null?void 0:Y.key)===Z?Y.direction:null,ge=f&&!M.disableMenu?e.jsx(Io,{active:!!me||le,canSort:de(M),canHide:!M.locked,sortDir:me,frozen:le,onSort:St=>Oe({key:Z,direction:St}),onClearSort:()=>Oe(null),onToggleFreeze:()=>Uo(Z),onHide:()=>Qo(Z,M.locked)}):null,Je=M.align==="right",Dt=M.align==="right"?"flex-end":M.align==="center"?"center":"flex-start",Ke=e.jsxs("span",{style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:6,justifyContent:Dt,overflow:"hidden"},children:[M.icon&&e.jsx(E.Icon,{name:M.icon,size:"sm",style:{flexShrink:0}}),e.jsx("span",{style:Vt,children:M.title})]});return e.jsx(G.Th,{className:`sa-tl-leaf${le?" sa-tl-frozen":""}`,rowSpan:j==null?void 0:j.rowSpan,colSpan:j==null?void 0:j.colSpan,minWidth:M.minWidth,resizable:Be?M.resizable:!1,defaultWidth:k(M,re),style:{textAlign:Et(M.align),width:ft(M,re),position:"sticky",top:(j==null?void 0:j.top)??0,left:le?Ie(re):void 0,zIndex:le?3:2,backgroundColor:gt,boxShadow:ne?Pn:void 0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,width:"100%"},children:Je?e.jsxs(e.Fragment,{children:[ge,Ke]}):e.jsxs(e.Fragment,{children:[Ke,ge]})})},`th-${Z}`)},$o=()=>{const y=[];for(let j=0;j<ae.length;){const M=ae[j],Z=M.col.headerColSpan??1,re=Math.max(1,Math.min(Z,ae.length-j));y.push(ur(M,re>1?{colSpan:re}:void 0)),j+=re}return y},tn=y=>e.jsx(G.Th,{rowSpan:y==null?void 0:y.rowSpan,style:{width:Bt,position:"sticky",top:0,left:0,zIndex:4,backgroundColor:gt,padding:0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},onClick:j=>j.stopPropagation(),children:e.jsx(nt.Checkbox,{size:"sm",variant:$r?"indeterminate":"select",checked:cr||$r,disabled:mt.length===0,onChange:_o,"aria-label":"Pilih semua baris di halaman ini"})})},"th-select"),Ko=(y,j,M)=>{const Z=Ee(y,j);return e.jsx(G.Td,{className:"sa-tl-frozen",style:{width:Bt,padding:0,position:"sticky",left:0,zIndex:2,...M?{"--sa-tl-bg":M}:{}},children:ir(y,j)&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},onClick:re=>re.stopPropagation(),children:e.jsx(nt.Checkbox,{size:"sm",checked:st.has(Z),onChange:()=>lr(Z),"aria-label":"Pilih baris"})})},`tl-select-${j}`)},xr=ae.filter(y=>!y.col.hideOnMobile),hr=xr.find(y=>y.col.primary)??xr[0],es=xr.filter(y=>y!==hr),ts=y=>ye(j=>{const M=new Set(j);return M.has(y)?M.delete(y):M.add(y),M}),rn=(y,j)=>es.map(({col:M,key:Z})=>{const re=ar(M,y,j),le=typeof re=="string"||typeof re=="number"?e.jsx(v.Text,{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",textAlign:"right"},children:re}):e.jsx("div",{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",textAlign:"right"},children:re});return e.jsxs("div",{style:{display:"flex",gap:12,justifyContent:"space-between",alignItems:"baseline"},children:[typeof M.title=="string"?e.jsx(v.Text,{color:"subtle",fontWeight:"medium",style:{color:Ni,flexShrink:0},children:M.title}):e.jsx("div",{style:{flexShrink:0},children:M.title}),le]},Z)}),fr=(y,j)=>{const M=hr?ar(hr.col,y,j):null;return typeof M=="string"||typeof M=="number"?e.jsx(v.Text,{as:"span",style:Vt,children:M}):e.jsx("span",{style:Vt,children:M})},rs=e.jsx(x.Box,{style:{display:"flex",flexDirection:"column",gap:8,padding:8},children:Array.from({length:w},(y,j)=>e.jsxs(x.Box,{style:{border:kt,borderRadius:"var(--sa-radii-sm, 6px)",padding:12,display:"flex",flexDirection:"column",gap:8},children:[e.jsx(Ye.Skeleton,{height:16,width:"60%",borderRadius:"rounded-sm"}),e.jsx(Ye.Skeleton,{height:12,width:"85%",borderRadius:"rounded-sm"}),e.jsx(Ye.Skeleton,{height:12,width:"70%",borderRadius:"rounded-sm"})]},`sa-tl-sk-card-${j}`))}),nn=e.jsx(x.Box,{fullWidth:!0,style:{minHeight:(A==null?void 0:A.minHeight)??320,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:A==null?void 0:A.content}),ns=R?rs:ie.length===0?nn:b==="expand"?e.jsx(x.Box,{style:{display:"flex",flexDirection:"column"},children:ie.map((y,j)=>{const M=Ee(y,j),Z=se.has(M),le=L&&st.has(M)?Sr:Nt(s==null?void 0:s(y,j));return e.jsxs("div",{style:{borderBottom:kt,backgroundColor:le},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[ir(y,j)&&e.jsx("div",{style:{display:"flex",alignItems:"center",paddingLeft:12,flexShrink:0},children:e.jsx(nt.Checkbox,{size:"sm",checked:st.has(M),onChange:()=>lr(M),"aria-label":"Pilih baris"})}),e.jsxs("button",{type:"button",onClick:()=>ts(M),style:{flex:1,minWidth:0,display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,padding:"10px 12px",background:"none",border:"none",font:"inherit",color:"inherit",cursor:"pointer",textAlign:"left"},children:[fr(y,j),e.jsx(E.Icon,{name:Z?"ChevronUp":"ChevronDown",size:"sm",style:{flexShrink:0}})]}),V&&Xo(y,j)]}),Z&&e.jsx("div",{style:{padding:"0 12px 12px",display:"flex",flexDirection:"column",gap:6},children:rn(y,j)})]},M)})}):e.jsx(x.Box,{style:{display:"flex",flexDirection:"column",gap:8,padding:8},children:ie.map((y,j)=>{const M=Ee(y,j),Z=L&&st.has(M);return e.jsxs(x.Box,{style:{border:kt,borderRadius:"var(--sa-radii-sm, 6px)",padding:12,display:"flex",flexDirection:"column",gap:6,backgroundColor:Z?Sr:Nt(s==null?void 0:s(y,j))},children:[ir(y,j)?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(nt.Checkbox,{size:"sm",checked:st.has(M),onChange:()=>lr(M),"aria-label":"Pilih baris"}),e.jsx("div",{style:{flex:1,minWidth:0},children:fr(y,j)})]}):fr(y,j),rn(y,j),V&&Yo(y,j)]},M)})}),os=i&&Be&&Ce!==void 0,on=l==="fixed"&&!i&&(Be?Ce!==void 0:!0),ss=on&&!Be,Wt=C&&C.length>0?C.map((y,j)=>e.jsx(G.Tr,{children:y.cells.map((M,Z)=>e.jsx(G.Td,{colSpan:M.colSpan,rowSpan:M.rowSpan,style:{textAlign:Et(M.align)},children:M.content},`tl-foot-${j}-${Z}`))},`tl-foot-${j}`)):null,is=e.jsxs(G.Table,{className:"sa-table-layout",fullWidth:!0,size:o,resizable:os,style:on?{tableLayout:"fixed"}:void 0,onWidthsChange:Re?qe:void 0,children:[ss&&e.jsxs("colgroup",{children:[L&&e.jsx("col",{style:{width:Bt}}),ae.map(({col:y,key:j},M)=>e.jsx("col",{style:{width:ft(y,M)}},`col-${j}`)),V&&e.jsx("col",{style:{width:1}})]}),e.jsx(G.Thead,{ref:Qe,children:_e?e.jsxs(e.Fragment,{children:[e.jsxs(G.Tr,{children:[L&&tn({rowSpan:2}),Ne.map(y=>y.isGroup?e.jsx(G.Th,{colSpan:y.leaves.length,style:{textAlign:"center",position:"sticky",top:0,zIndex:2,backgroundColor:gt},children:e.jsx("span",{style:Vt,children:y.col.title})},`grp-${y.key}`):ur(y.leaves[0],{rowSpan:2})),V&&e.jsx(G.Th,{rowSpan:2,style:{position:"sticky",top:0,right:0,zIndex:3,width:1,padding:0,border:"none",backgroundColor:gt}})]}),e.jsx(G.Tr,{children:Ne.flatMap(y=>y.isGroup?y.leaves.map(j=>ur(j,{top:ct})):[])})]}):e.jsxs(G.Tr,{children:[L&&tn(),$o(),V&&e.jsx(G.Th,{style:{position:"sticky",top:0,right:0,zIndex:3,width:1,padding:0,border:"none",backgroundColor:gt}})]})}),e.jsx(G.Tbody,{children:R?Go:ie.length===0?e.jsx(G.Tr,{children:e.jsx(G.Td,{colSpan:dr,children:nn})}):e.jsxs(e.Fragment,{children:[ie.map((y,j)=>{const M=B==null?void 0:B(y,j,j>0?ie[j-1]:void 0),re=L&&st.has(Ee(y,j))?Sr:Nt(s==null?void 0:s(y,j));return e.jsxs(d.Fragment,{children:[M!=null&&M!==!1&&e.jsx(G.Tr,{children:e.jsx(G.Td,{colSpan:dr,style:{backgroundColor:gt},children:M})}),e.jsxs(G.Tr,{children:[L&&Ko(y,j,re),ae.map(({col:le,key:ne},me)=>{var ln;const ge=(ln=le.cellProps)==null?void 0:ln.call(le,y,j,ie);if(ge!=null&&ge.hidden)return null;const Je=K(me),Dt=Je&&me===q,Ke=ar(le,y,j),St=typeof le.bg=="function"?le.bg(y,j,ie):le.bg,sn=Nt(St)??re;return e.jsx(G.Td,{className:Je?"sa-tl-frozen":void 0,colSpan:ge==null?void 0:ge.colSpan,rowSpan:ge==null?void 0:ge.rowSpan,style:{textAlign:Et(le.align),width:ft(le,me),minWidth:le.minWidth,position:Je?"sticky":void 0,left:Je?Ie(me):void 0,zIndex:Je?1:void 0,boxShadow:Dt?Pn:void 0,...sn?{"--sa-tl-bg":sn}:{}},children:typeof Ke=="string"?e.jsx(v.Text,{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:Et(le.align)},children:Ke}):Ke},`tl-cell-${j}-${ne}`)}),V&&e.jsx(G.Td,{style:{position:"sticky",right:0,width:1,padding:0,overflow:"visible",zIndex:2,border:"none"},children:Jo(y,j)})]})]},Ee(y,j))}),F!=null&&e.jsx(G.Tr,{children:e.jsx(G.Td,{colSpan:dr,children:F})})]})}),Wt&&e.jsx(G.Tfoot,{className:D?"sa-tl-sticky-foot":void 0,children:Wt})]}),mr=z?ie.findIndex((y,j)=>Ee(y,j)===z.rowKey):-1,gr=mr>=0?ie[mr]:null;return e.jsxs(e.Fragment,{children:[e.jsx(x.Box,{ref:Ue,fullWidth:!0,style:{overflow:"auto",height:S??Ae},children:te?e.jsxs(e.Fragment,{children:[ns,Wt&&!R&&ie.length>0&&e.jsx(x.Box,{style:{borderTop:kt},children:e.jsx(G.Table,{fullWidth:!0,size:o,className:"sa-table-layout",children:e.jsx(G.Tbody,{children:Wt})})})]}):is}),z&&gr&&e.jsx("div",{className:"sa-tl-kebab-menu",style:{top:z.top,right:z.right},onClick:y=>y.stopPropagation(),children:Rt(gr).map(y=>e.jsx("div",{style:{padding:"2px 4px"},children:At(y,gr,mr,{showLabel:!0,size:"sm"})},y.key))})]})},kr=t=>t==="asc"||t==="desc",Ui=(t={})=>{const{sortKeyParam:r="sortBy",sortOrderParam:n="sortOrder",pageKey:s="page",defaultSort:o=null,paramKeys:i,scopeId:l,storage:c=Jr}=t,{searchParams:a,setSearchParams:u,searchQueries:f}=Ve(),g=a.toString(),m=l?Ct.tableSort(l):void 0,p=d.useRef(!1);d.useEffect(()=>{if(p.current||(p.current=!0,!m)||a.has(r)||a.has(n))return;const C=c.get(m);!(C!=null&&C.key)||!kr(C.direction)||u({...Object.fromEntries(a.entries()),[r]:C.key,[n]:C.direction},{replace:!0})},[]);const S=d.useMemo(()=>{const C=a.get(r),D=a.get(n);return C&&kr(D)?{key:C,direction:D}:o},[g,r,n,o]);d.useEffect(()=>{if(!m)return;const C=a.get(r),D=a.get(n);C&&kr(D)?c.set(m,{key:C,direction:D}):c.remove(m)},[g,m,r,n,c]);const b=(i==null?void 0:i.sortBy)??"sortBy",I=(i==null?void 0:i.sortOrder)??"sortOrder",B=d.useMemo(()=>S?{[b]:S.key,[I]:S.direction}:{},[S,b,I]),F=d.useCallback(C=>{const D={...f};C?(D[r]=C.key,D[n]=C.direction):(delete D[r],delete D[n]),delete D[s],u(D)},[f,r,n,s,u]);return{sort:S,setSort:F,params:B}},er=({of:t,render:r})=>d.Children.toArray(t==null?void 0:t.map((n,s,o)=>r(n,s,o))),ue=({condition:t,fallback:r,children:n,loading:s,isLoading:o})=>e.jsx(e.Fragment,{children:o?s:t?n:r}),fe=t=>e.jsx(v.Text,{...t,fontSize:t.fontSize||"md",fontWeight:t.fontWeight||"medium",color:t.color||"gray-700",children:t.children}),lt=t=>e.jsx(v.Text,{color:"red-600",fontSize:"sm",children:t.message}),Ji=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var c,a,u;const i=o.hideMessageError||!1,l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=o.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=o.tooltip)==null?void 0:a.label,arrowPosition:(u=o.tooltip)==null?void 0:u.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),e.jsxs(x.Box,{direction:"column",gap:"xs",fullWidth:o.inputProps.fullWidth||!1,children:[e.jsx(dt.Input,{ref:o.inputRef,size:t,...o.inputProps,status:o.errorMessage?"error":"default",fullWidth:!0}),!i&&o.errorMessage&&e.jsx(lt,{message:o.errorMessage}),o.inputProps.extended&&o.inputProps.extended]})]})},Yi=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var c,a,u;const i=o.hideMessageError||!1,l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",onClick:o.onClickContainer,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=o.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=o.tooltip)==null?void 0:a.label,arrowPosition:(u=o.tooltip)==null?void 0:u.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),e.jsxs(x.Box,{direction:"column",gap:"xs",fullWidth:o.inputProps.fullWidth||!1,children:[e.jsx(x.Box,{direction:"column",style:{width:o.inputProps.fullWidth?"100%":r==="horizontal"&&o.customWidth?o.customWidth:r==="horizontal"?"343px":""},children:e.jsx(jt.Dropdown,{size:t,...o.inputProps,error:!!o.errorMessage})}),!i&&o.errorMessage&&e.jsx(lt,{message:o.errorMessage}),o.inputProps.extended&&o.inputProps.extended]})]})},Xi=(t,r)=>typeof t=="string"&&t||r==="error"?"var(--sa-border-danger)":"var(--sa-border-subtle)",$i=t=>{var c;const[r,n]=d.useState(!1),s=a=>{a.preventDefault(),a.stopPropagation()},o=a=>{a.preventDefault(),a.stopPropagation(),a.dataTransfer&&t.handleOnFileChange(a.dataTransfer.files.item(0))},i=a=>{a.preventDefault(),n(!0)},l=a=>{a.preventDefault(),n(!1)};return e.jsxs(x.Box,{width:"width-full",paddingInline:"md",direction:"row",gap:"sm",align:"center",onClick:t.handleOnClick,onDragOver:s,onDrop:o,onDragEnter:i,onDragLeave:l,paddingBlock:"md",borderRadius:"rounded-md",style:{border:r?"1px solid var(--sa-border-info)":`1px solid ${Xi(t.errorMessage,t.status)}`},children:[e.jsx(E.Icon,{name:"Upload",size:"lg",style:{width:30,height:30}}),e.jsxs(ce.Flex,{direction:"column",gap:"xs",children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",children:[e.jsx(v.Text,{fontWeight:"medium",color:"gray-500",style:{textWrap:"nowrap"},fontSize:t.isDesktop?"md":"sm",children:"Click your upload"}),e.jsx(v.Text,{fontWeight:"medium",style:{textWrap:"nowrap"},fontSize:t.isDesktop?"md":"sm",children:"or Drag & Drop"})]}),e.jsx(v.Text,{fontSize:"sm",color:"gray-500",children:(c=t.fileSupports)==null?void 0:c.map(a=>a.toLocaleUpperCase()).join(", ")})]})]})};function Ki(t){return t.split(" ").map(r=>r[0]).join("").slice(0,2).toUpperCase()}const Lo=t=>{const r={day:"2-digit",month:"short",year:"numeric"};return t.toLocaleDateString("id-ID",r)},el=t=>{const r={Jan:0,Feb:1,Mar:2,Apr:3,Mei:4,Jun:5,Jul:6,Agu:7,Sep:8,Okt:9,Nov:10,Des:11},n=t.split(" ");if(n.length!==3)return null;const s=parseInt(n[0],10),o=r[n[1]],i=parseInt(n[2],10);return isNaN(s)||isNaN(o)||isNaN(i)?null:new Date(i,o,s)};function tl(t,r=!0){if(!t)return"Rp 0";const n=typeof t=="number"?t.toString():t;if(isNaN(Number(n)))return"Rp 0";const s=n.split("."),o=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,"."),i=s.length===2?o+"."+s[1]:o;return r?"Rp"+i:i}String.prototype.toTitleCase=function(){return this.toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")};String.prototype.toNumber=function(){return Number(this)};const rl=t=>{const r=t.split(" ");let n=r[0].charAt(0);return r.length>1&&(n+=""+r[1].charAt(0)),n.toUpperCase()};function nl(t){const r=typeof t=="string"?new Date(t):t;if(isNaN(r.getTime()))throw new Error("Invalid date format");const n=r.getFullYear(),s=String(r.getMonth()+1).padStart(2,"0"),o=String(r.getDate()).padStart(2,"0");return`${n}-${s}-${o}`}const ol="sa-admin",et=t=>`var(--${ol}-${t})`,sl={base:{borderColor:et("base-border-color"),textColor:et("base-text-color"),iconColor:et("base-icon-color"),placeholderColor:et("base-placeholder-color")},document:{bgColor:et("document-bg-color")},sidebar:{bgColor:et("sidebar-bg-color"),borderColor:et("sidebar-border-color"),maxWidth:et("sidebar-max-width"),width:et("sidebar-width"),collapseWidth:et("sidebar-collapse-width"),collapseV2Width:et("sidebar-v2-collapse-width")}},il=24*60*60*1e3,ll=t=>{const r="14px poppins",s=document.createElement("canvas").getContext("2d");s.font=r;const o=s.measureText(t).width;return Number(Math.ceil(o))},cl=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,al=/--+/,dl=/-$/;function ul(t,r){return JSON.stringify(t)!==JSON.stringify(r)}function xl(t){return/^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(t)}function hl(t){return/^[A-Za-z\s]+$/.test(t)}const fl=t=>{const r=/^[0-9]$/,n=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(t.ctrlKey||t.metaKey)&&(t.key==="a"||t.key==="c"||t.key==="v")||!r.test(t.key)&&!n.includes(t.key)&&t.preventDefault()},ml=t=>{const r=/^[0-9]$/,n=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(t.ctrlKey||t.metaKey)&&t.key==="v"||r.test(t.key)&&!n.includes(t.key)&&t.preventDefault()},gl=t=>{const r=/^[0-9.]$/,n=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(t.ctrlKey||t.metaKey)&&t.key==="v"||!r.test(t.key)&&!n.includes(t.key)&&t.preventDefault()},yl=t=>cl.test(t);function pl(t){return!(al.test(t)||dl.test(t))}const jl=t=>{const r=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab","Home","End"];if((t.ctrlKey||t.metaKey)&&["a","c","v","x"].includes(t.key.toLowerCase()))return;const n=t.currentTarget.value;/^[0-9]$/.test(t.key)||t.key==="."&&!n.includes(".")||t.key==="-"&&n.length===0&&!n.includes("-")||r.includes(t.key)||t.preventDefault()},bl=t=>{const r=document.getElementById(t);if(r){const n=r.getBoundingClientRect(),s=window.scrollY+n.top-80;window.scrollTo({top:s,behavior:"smooth"})}};function vl(t){const r=t.toLowerCase();if(["kb","mb","gb"].find(i=>r.endsWith(i)))return t;const o=Number(t);if(isNaN(o))throw new Error("Invalid size format");return o>=1e6?`${(o/1e6).toFixed(2)}MB`:o>=1e3?`${(o/1e3).toFixed(2)}KB`:`${o}B`}function Cl(t){const r=t.split("/");return r[r.length-1]}const wl=t=>{var r,n;return e.jsxs(x.Box,{width:"width-full",paddingInline:"md",height:"height-full",direction:"row",justify:"space-between",align:"center",onClick:t.handleOnClickFile,fullHeight:!0,paddingBlock:"md",id:"file-item",borderRadius:"rounded-md",style:{border:"1px solid var(--sa-border-subtle)",cursor:"pointer"},children:[e.jsxs(ce.Flex,{direction:"row",align:"center",gap:"sm",style:{flex:1,minWidth:0},children:[e.jsx(E.Icon,{name:"DocumentFilled",size:"lg",style:{color:"var(--sa-icon-brand)",width:30,height:30,flexShrink:0}}),e.jsxs(ce.Flex,{direction:"column",style:{minWidth:0,flex:1},children:[e.jsx(v.Text,{fontWeight:"bold",style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:t.defaultFile?Cl(t.defaultFile.url):(r=t.fileSelected)==null?void 0:r.name}),t.defaultFile?(t.defaultFile.size||t.defaultFile.date)&&e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[t.defaultFile.size&&e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",children:t.defaultFile.size}),t.defaultFile.size&&t.defaultFile.date&&e.jsx(E.Icon,{name:"Dot",size:"xs"}),t.defaultFile.date&&e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:t.defaultFile.date})]}):e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",children:vl(((n=t.fileSelected)==null?void 0:n.size.toString())||"100000")}),e.jsx(E.Icon,{name:"Dot",size:"xs"}),e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:Lo(new Date)})]})]})]}),e.jsx(H.Button,{size:"xs",variant:"tertiary",tone:"error",type:"button",onClick:s=>{s.stopPropagation(),t.handleOnDeleteFile()},iconLeft:e.jsx(E.Icon,{name:"Trash1"})})]})},To=({status:t="default",labelPosition:r="outside-top",...n})=>{var m;const s=d.useRef(null),o=()=>{if(n.defaultFile){window.open(n.defaultFile.url);return}s.current&&s.current.click()},i=ve.useMediaQuery("md"),l=t==="error"||typeof n.errorMessage=="string"&&!!n.errorMessage,c=n.label?e.jsxs(ce.Flex,{direction:"row",align:"center",gap:"xs",children:[e.jsx(v.Text,{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-primary)"},children:n.label}),n.optional&&e.jsx("span",{style:{background:"var(--sa-background-neutral)",border:"1px solid var(--sa-border-subtle)",borderRadius:"4px",padding:"0 8px",fontSize:"10px",fontWeight:500,lineHeight:"18px",color:"var(--sa-text-primary)",display:"inline-flex",alignItems:"center"},children:"Optional"}),n.required&&e.jsx("span",{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-error)"},children:"*"})]}):null,a=n.description?e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:n.description}):null,u=e.jsxs(e.Fragment,{children:[n.helperText&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:n.helperText}),n.errorText&&t==="error"&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:n.errorText}),n.errorMessage&&!n.errorText&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:n.errorMessage})]}),f=e.jsx("input",{type:"file",style:{display:"none"},ref:s,onChange:p=>{var S;return n.handleOnChangeFile(((S=p.target.files)==null?void 0:S.item(0))||null)},accept:(m=n.fileSupportOption)==null?void 0:m.map(p=>"."+(p==null?void 0:p.toLowerCase())).join(", ")}),g=e.jsxs(x.Box,{direction:"column",fullWidth:!0,style:{minHeight:"69px"},borderRadius:"rounded-md",display:"flex",justify:"center",align:"center",cursor:"pointer",gap:"md",...n.containerProps,children:[f,(n.fileSelected||n.defaultFile)&&e.jsx(wl,{fileSelected:n.fileSelected,defaultFile:n.defaultFile,handleOnDeleteFile:n.handleOnDeleteFile,handleOnClickFile:o}),!n.fileSelected&&!n.defaultFile&&e.jsx($i,{fileSupports:n.fileSupportOption,isDesktop:i,errorMessage:l?n.errorText||n.errorMessage||" ":void 0,status:l?"error":"default",handleOnClick:o,handleOnFileChange:n.handleOnChangeFile})]});return r==="outside-left"?e.jsxs(ce.Flex,{direction:"row",align:"flex-start",gap:"sm",style:{width:"100%"},children:[e.jsxs(ce.Flex,{direction:"column",gap:"xs",style:{width:"40%",minWidth:"120px",paddingTop:"10px"},children:[c,a]}),e.jsxs(ce.Flex,{direction:"column",gap:"sm",style:{flex:1,minWidth:0},children:[g,u]})]}):e.jsxs(ce.Flex,{direction:"column",gap:"sm",style:{width:"100%"},children:[c,a,g,u]})},Dl=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var c,a,u;const i=o.hideMessageError||!1,l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=o.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=o.tooltip)==null?void 0:a.label,arrowPosition:(u=o.tooltip)==null?void 0:u.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),e.jsxs(ce.Flex,{direction:"column",gap:"xs",children:[e.jsx(To,{...o.inputProps,status:o.errorMessage?"error":"default"}),!i&&o.errorMessage&&e.jsx(lt,{message:o.errorMessage})]})]})},Sl=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,required:o=!1,...i})=>{var a,u,f,g;const l=i.hideMessageError||!1,c=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"||r==="horizontal-inline"?"spacing-96":"sm",direction:r==="horizontal"||r==="horizontal-inline"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(ue,{condition:!!o,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:c,fullWidth:s,children:[e.jsx(fe,{children:i.title}),e.jsx(Xe.Body3,{props:{color:"gray-500"},children:i.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:c,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:i.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((a=i.tooltip)!=null&&a.label),children:e.jsx(Fe.Tooltip,{label:(u=i.tooltip)==null?void 0:u.label,arrowPosition:(f=i.tooltip)==null?void 0:f.arrowPosition,...i.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!i.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:i.description})})]})}),e.jsx(x.Box,{gap:r==="horizontal-inline"?"xl":"md",direction:r==="horizontal-inline"?"row":"column",align:"flex-start",children:e.jsx(er,{of:(g=i.checkBoxesList)==null?void 0:g.map(m=>({...m,isChecked:i.checkBoxesAreChecked.includes(m.id)})),render:m=>m.renderBadge?e.jsxs(x.Box,{direction:"row",justify:"space-between",gap:"lg",...i.badgeContainerProps,children:[e.jsx(nt.Checkbox,{name:m.name,value:m.id,checked:m.isChecked,onChange:p=>i.onChecked(p.target.value,m),label:m.name,description:m.description}),m.renderBadge]}):e.jsx(nt.Checkbox,{name:m.name,value:m.id,checked:m.isChecked,onChange:p=>i.onChecked(p.target.value,m),label:m.name,description:m.description})})}),!l&&i.errorMessage&&e.jsx(lt,{message:i.errorMessage})]})},kl=({position:t="vertical",size:r="md",fullWidth:n=!1,...s})=>{var i;const o=t==="horizontal-inline"||t==="horizontal-block"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:t==="horizontal-inline"||t==="horizontal-block"?"spacing-96":"sm",direction:t==="horizontal-inline"||t==="horizontal-block"?"row":"column",children:[e.jsx(ue,{condition:!!s.description||!!s.title,children:e.jsxs(x.Box,{direction:"column",customMaxWidth:o,fullWidth:n,children:[s.title&&e.jsx(fe,{children:s.title}),e.jsx(ue,{condition:!!s.description,children:e.jsx(v.Text,{color:"gray-500",children:s.description})})]})}),e.jsx(x.Box,{gap:"sm",direction:t==="horizontal"||t==="horizontal-inline"?"row":"column",align:"flex-start",flexWrap:"wrap",children:e.jsx(er,{of:(i=s.radioList)==null?void 0:i.map(l=>({...l,isChecked:s.radioIsChecked===l.id})),render:({value:l,id:c,isChecked:a,subInput:u,label:f,description:g})=>e.jsxs(x.Box,{direction:"column",gap:"xs",customMaxWidth:o,children:[e.jsx(Ir.Radio,{id:`${c.toString()}-${l}`,name:s.groupName||f,label:f,value:l,checked:a,onChange:m=>s.onChecked({id:c,label:m.target.name,value:m.target.value}),disabled:s.disableAll},c),g&&e.jsx(v.Text,{color:"gray-500",style:{marginLeft:28},children:g}),u]})})}),s.errorMessage&&e.jsx(lt,{message:s.errorMessage})]})},Bl=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var c,a,u;const i=o.hideMessageError||!1,l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=o.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=o.tooltip)==null?void 0:a.label,arrowPosition:(u=o.tooltip)==null?void 0:u.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),e.jsxs(ce.Flex,{direction:"column",gap:"xs",children:[e.jsx(Mr.Textarea,{ref:o.inputRef,size:t,...o.inputProps,status:o.errorMessage?"error":"default"}),!i&&o.errorMessage&&e.jsx(lt,{message:o.errorMessage})]})]})},El=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",required:s=!1,fullWidth:o=!1,...i})=>{var c,a,u;const l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(ue,{condition:s,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:o,children:[e.jsx(fe,{children:i.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:i.titleDescription})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:o,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:i.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=i.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=i.tooltip)==null?void 0:a.label,arrowPosition:(u=i.tooltip)==null?void 0:u.arrowPosition,...i.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!i.titleDescription,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:i.titleDescription})})]})}),e.jsx(vt.Toggle,{checked:i.checked,onChange:i.onChange,label:i.label,description:i.description}),i.errorMessage&&e.jsx(lt,{message:i.errorMessage})]})},Fl=({variant:t="primary",size:r="md",...n})=>{const s=pt.useColor(),o=l=>{var a,u,f,g,m,p;if(!l)return;const c=n.disabled?"var(--sa-text-disable, #181a198f)":t==="secondary"?"var(--sa-text-subtle, #8c8f97)":t==="secondary-danger"?(u=(a=s==null?void 0:s.computed)==null?void 0:a.red)==null?void 0:u[600]:t==="secondary-primary"?(g=(f=s==null?void 0:s.computed)==null?void 0:f.blue)==null?void 0:g[700]:(p=(m=s==null?void 0:s.computed)==null?void 0:m.gray)==null?void 0:p[50];return e.jsx(E.Icon,{name:l,size:r,style:{color:c}})},i=()=>{var c,a,u,f;if(t!=="secondary-danger"&&t!=="secondary-primary")return n.title;const l={color:n.disabled?"var(--sa-text-disable, #181a198f)":t==="secondary-danger"?(a=(c=s==null?void 0:s.computed)==null?void 0:c.red)==null?void 0:a[600]:(f=(u=s==null?void 0:s.computed)==null?void 0:u.blue)==null?void 0:f[700]};switch(r){case"xs":return e.jsx(Xe.Body2,{props:{style:l},children:n.title});case"sm":case"md":return e.jsx(Xe.SubH3,{props:{style:l},children:n.title});case"lg":return e.jsx(Xe.SubH2,{props:{style:l},children:n.title});default:return n.title}};return e.jsx(H.Button,{fullWidth:!0,disabled:n.disabled,primary:t==="primary",secondary:t==="secondary"||t==="secondary-danger"||t==="secondary-primary",success:t==="success",onClick:n.onClick,type:n.type,iconLeft:o(n.iconLeft),iconRight:o(n.iconRight),size:r,children:i()})},Ml=t=>e.jsx(Xe.H5,{props:{...t},children:t.title}),Il=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var c,a,u;const i=o.hideMessageError||!1,l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",onClick:o.onClickContainer,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=o.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=o.tooltip)==null?void 0:a.label,arrowPosition:(u=o.tooltip)==null?void 0:u.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),e.jsxs(ce.Flex,{direction:"column",gap:"xs",children:[e.jsx(x.Box,{direction:"column",style:{width:r==="horizontal"&&o.customWidth?o.customWidth:r==="horizontal"?"343px":""},children:e.jsx(ht.StarasiaDate,{size:t,...o.inputProps,status:o.errorMessage?"error":void 0})}),!i&&o.errorMessage&&e.jsx(lt,{message:o.errorMessage})]})]})};async function Ll(t,r){const n=new Image;n.src=t,await new Promise((i,l)=>{n.onload=i,n.onerror=l});const s=document.createElement("canvas");s.width=r.width,s.height=r.height;const o=s.getContext("2d",{alpha:!0});if(!o)throw new Error("No 2D context");return o.drawImage(n,r.x,r.y,r.width,r.height,0,0,r.width,r.height),new Promise((i,l)=>{s.toBlob(c=>{if(!c)return l("Canvas is empty");const a=new File([c],"cropped.png",{type:"image/png"});i(a)},"image/png")})}const Nn={"1:1":1,"4:3":4/3,"16:9":16/9,"3:4":3/4,"9:16":9/16,"2:3":2/3,"3:2":3/2,"32:9":32/9},Oo=d.forwardRef(({handleUpload:t,urlImage:r,isUploading:n,croppedImage:s,setCroppedImage:o,size:i="96",aspect:l="1:1",containerProps:c,maxFileSize:a=2,onError:u},f)=>{const g=ve.useMediaQuery("md"),[m,p]=d.useState(!1),[S,b]=d.useState(null),[I,B]=d.useState(!1),[F,C]=d.useState({x:0,y:0}),[D,A]=d.useState(1),[R,w]=d.useState(null);d.useEffect(()=>{r===null&&o(null)},[r]);const O=d.useCallback((z,P)=>{w(P)},[]),L=z=>{var ye;const P=(ye=z.target.files)==null?void 0:ye[0];if(!P)return;const se=new FileReader;se.onload=()=>{b(se.result),B(!0)},se.readAsDataURL(P)},U=async()=>{if(!(!S||!R))try{const z=await Ll(S,R);if(a&&z.size>a*1024*1024){u==null||u(`Ukuran file maksimal ${a}MB`);return}t==null||t(z);const P=URL.createObjectURL(z);o(P,z),B(!1)}catch{u==null||u("Gagal memproses gambar")}},J=d.useRef(null),N=()=>{J.current&&J.current.click()};d.useImperativeHandle(f,()=>({openFileDialog:()=>{var z;(z=J.current)==null||z.click()}}));const _=parseInt(i,10),X=Nn[l];let te,V;return X>=1?(V=_,te=_*X):(te=_,V=_/X),e.jsxs(x.Box,{direction:"column",display:"flex",position:"relative",bg:(c==null?void 0:c.bg)||"gray-200",borderStyle:(c==null?void 0:c.borderStyle)||"border-none",borderColor:(c==null?void 0:c.borderColor)||"gray-200",borderWidth:(c==null?void 0:c.borderWidth)||"border-2",borderRadius:(c==null?void 0:c.borderRadius)||"rounded-md",overflow:"overflow-hidden",align:"center",justify:"center",style:{width:c!=null&&c.fullWidth?"100%":`${te}px`,height:c!=null&&c.fullWidth?"auto":`${V}px`,aspectRatio:X,flexShrink:0},onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[s||r?e.jsx("img",{src:s||r||void 0,alt:"Profile",style:{objectFit:"cover",width:"100%",height:"100%"}}):e.jsx(x.Box,{display:"flex",direction:"column",align:"center",justify:"center",padding:"spacing-4",children:e.jsx(E.Icon,{name:"Image",style:{color:"var(--sa-text-subtle, #8c8f97)",width:Number(i)/2<40?Number(i)/2:40,height:Number(i)/2<40?Number(i)/2:40}})}),e.jsxs(x.Box,{direction:"column",position:"absolute",display:"flex",align:"center",justify:"center",cursor:"pointer",style:{inset:0,backgroundColor:"var(--sa-color-black-alpha-a30, #080f214a)",opacity:m?1:0,transition:"opacity 0.3s ease-in-out"},onClick:N,children:[e.jsx("input",{ref:J,type:"file",accept:"image/*",onChange:L,disabled:n,style:{display:"none"}}),e.jsxs(x.Box,{display:"flex",align:"center",gap:"spacing-2",direction:"row",children:[e.jsx(E.Icon,{name:"Edit3",style:{color:"var(--sa-background-primary, #ffffff)"}}),e.jsx(ue,{condition:i.toNumber()>80,children:e.jsx(v.Text,{color:"gray-50",fontSize:i.toNumber()>80?"sm":"md",fontWeight:"medium",children:"Edit Image"})})]})]}),n&&e.jsx(x.Box,{direction:"column",position:"absolute",display:"flex",align:"center",justify:"center",style:{inset:0,zIndex:20,backgroundColor:"var(--sa-color-white-alpha-a80, #e5e9f640)"},children:e.jsx(x.Box,{direction:"column",borderRadius:"rounded-full",style:{animation:"spin 1s linear infinite",border:"2px solid transparent",height:"2rem",width:"2rem"},borderColor:"info-600"})}),I&&Xt.createPortal(e.jsx("div",{style:{position:"fixed",inset:0,zIndex:19999,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.6)"},onClick:()=>B(!1),children:e.jsxs("div",{style:{backgroundColor:"var(--sa-background-primary)",borderRadius:"var(--sa-radii-md)",boxShadow:"0 20px 60px rgba(0,0,0,0.3)",overflow:"hidden",width:g?l==="1:1"?"min(90vw, 480px)":`min(90vw, ${te*2}px)`:"calc(100vw - 2rem)",display:"flex",flexDirection:"column"},onClick:z=>z.stopPropagation(),children:[e.jsx("div",{style:{position:"relative",width:"100%",height:"20rem",backgroundColor:"var(--sa-color-gray-100)"},children:S&&e.jsx(ls,{image:S,crop:F,zoom:D,aspect:l?Nn[l]:void 0,onCropChange:C,onZoomChange:A,onCropComplete:O,objectFit:"contain",minZoom:.5,restrictPosition:!1})}),e.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",padding:"0.75rem 1rem",borderTop:"1px solid var(--sa-border-subtle)"},children:[e.jsx(H.Button,{size:"sm",secondary:!0,onClick:()=>B(!1),children:"Cancel"}),e.jsx(H.Button,{size:"sm",primary:!0,onClick:U,children:"Crop"})]})]})}),document.body)]})}),Tl=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,required:o=!1,...i})=>{var a,u,f;const l=i.hideMessageError||!1,c=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(ue,{condition:!!o,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:c,fullWidth:s,children:[e.jsx(fe,{children:i.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:i.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:c,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:i.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((a=i.tooltip)!=null&&a.label),children:e.jsx(Fe.Tooltip,{label:(u=i.tooltip)==null?void 0:u.label,arrowPosition:(f=i.tooltip)==null?void 0:f.arrowPosition,...i.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!i.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:i.description})})]})}),e.jsxs(ce.Flex,{direction:"column",gap:"xs",children:[e.jsx(Oo,{...i.inputProps}),!l&&i.errorMessage&&e.jsx(lt,{message:i.errorMessage})]})]})},Ol=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var l,c,a;const i=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:i,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:i,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((l=o.tooltip)!=null&&l.label),children:e.jsx(Fe.Tooltip,{label:(c=o.tooltip)==null?void 0:c.label,arrowPosition:(a=o.tooltip)==null?void 0:a.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),o.inputProps.extended&&o.inputProps.extended]})},Rl=({items:t,id:r,handleOnUpdate:n,width:s,toggleShow:o=!0,disabled:i=!1})=>{var f;const[l,c]=d.useState([]);d.useEffect(()=>{t&&c([...t.map(g=>({id:g.id,isActive:g.isActive}))])},[t]);const a=(f=l.find(g=>g.id===r))==null?void 0:f.isActive,u=d.useCallback(()=>{c(g=>g.map(m=>m.id===r?{...m,isActive:!m.isActive}:m)),n&&n(!a)},[r,n,a]);return e.jsx(x.Box,{direction:"row",gap:"md",style:{width:s},children:o&&e.jsx(vt.Toggle,{disabled:i,checked:a,onChange:u,label:a?"Active":"Inactive"})})},Al={InputText:Ji,InputDropdown:Yi,InputSingleFile:Dl,CheckBoxOptions:Sl,RadioOptions:kl,InputTextArea:Bl,ToggleForm:El,ActionButton:Fl,FormTitle:Ml,InputDate:Il,InputImgFile:Tl,Custom:Ol},Ro=({customBottom:t})=>{const[r,n]=d.useState(!1),s=()=>{window.scrollY>window.screenY?n(!0):n(!1)},o=()=>{window.scrollTo({top:0,behavior:"smooth"})};return d.useEffect(()=>(window.addEventListener("scroll",s),()=>{window.removeEventListener("scroll",s)}),[]),e.jsx(x.Box,{direction:"column",style:{position:"fixed",bottom:0,right:0},children:e.jsx(x.Box,{direction:"column",position:"absolute",style:{bottom:t||"1.6rem",right:"2rem",transform:r?"scale(1)":"scale(0)",transition:"transform 0.2s ease-in-out"},children:e.jsx(H.Button,{secondary:!0,size:"xs",onClick:o,type:"button",iconLeft:e.jsx(E.Icon,{width:16,size:"xs",name:"ArrowPullUp",style:{color:"var(--sa-background-brand, #04254f)"}})})})})},Ge="sa-sidepanel-item",_n="sa-sidepanel-item-styles",Wl="inset 3.5px 0 0 0 var(--sa-border-focused, #1a4fa0)",zl="inset -3.5px 0 0 0 var(--sa-border-focused, #1a4fa0)",Hl=`
|
|
57
|
+
`,document.head.appendChild(t)},Et=t=>t==="right"?"right":t==="center"?"center":"left",qi=/^(#|rgb|hsl|var\()/,Nt=t=>t?qi.test(t)?t:`var(--sa-background-${t})`:void 0,Zi=(t,r)=>{if(r)return t[r]},Gi=(t,r)=>t==null&&r==null?0:t==null?-1:r==null?1:typeof t=="number"&&typeof r=="number"?t-r:String(t).localeCompare(String(r)),Qi=({columns:t,data:r,getRowKey:n,rowBg:s,size:o="md",resizable:i=!1,layout:l="auto",widthStorageKey:c,columnState:a,onColumnStateChange:u,columnMenu:f=!1,sort:g,defaultSort:m,onSortChange:p,height:S,mobileLayout:b="cards",mobileBreakpoint:I="md",groupSeparator:B,summary:F,footer:C,stickyFooter:D=!1,emptyState:A,loading:R=!1,loadingRows:w=8,rowActions:O,selectable:L=!1,selectedKeys:U,defaultSelectedKeys:J,onSelectionChange:N,isRowSelectable:_})=>{_i();const te=!ve.useMediaQuery(I)&&b!=="scroll",V=!!(O!=null&&O.length),[z,P]=d.useState(null);d.useEffect(()=>{if(!z)return;const y=()=>P(null),j=setTimeout(()=>document.addEventListener("click",y),0);return()=>{clearTimeout(j),document.removeEventListener("click",y)}},[z]);const[se,ye]=d.useState(()=>new Set),Se=a!==void 0,[xe,pe]=d.useState({}),je=a??xe,be=y=>{u==null||u(y),Se||pe(y)},Te=g!==void 0,[ke,ze]=d.useState(m??null),Y=Te?g??null:ke,he=!p,Oe=y=>{p==null||p(y),Te||ze(y)},{headerGroups:Ne,leafColumns:ae,hasGroups:_e}=d.useMemo(()=>{var le;const y=new Set(je.hidden??[]),j=(ne,me)=>ne.key??(typeof ne.accessor=="string"?ne.accessor:`col-${me}`),M=t.map((ne,me)=>{var Je;if((Je=ne.children)!=null&&Je.length){const Dt=ne.children.map((Ke,St)=>({col:Ke,key:j(Ke,`${me}-${St}`)})).filter(Ke=>!y.has(Ke.key));return{col:ne,key:ne.key??`group-${me}`,isGroup:!0,leaves:Dt}}const ge={col:ne,key:j(ne,`${me}`)};return{col:ne,key:ge.key,isGroup:!1,leaves:y.has(ge.key)?[]:[ge]}}).filter(ne=>ne.leaves.length>0),Z=M.some(ne=>ne.isGroup);let re=M.flatMap(ne=>ne.leaves);if(!Z&&((le=je.order)!=null&&le.length)){const ne=new Map(je.order.map((me,ge)=>[me,ge]));re=[...re].sort((me,ge)=>(ne.get(me.key)??1/0)-(ne.get(ge.key)??1/0))}return{headerGroups:M,leafColumns:re,hasGroups:Z}},[t,je]),tt=d.useMemo(()=>new Map(ae.map((y,j)=>[y.key,j])),[ae]),W=!_e&&ae.some(y=>(y.col.headerColSpan??1)>1),$=ae.map(y=>y.key).join("|"),Q=(y,j)=>{const M=y.sortKey??(typeof y.accessor=="string"?y.accessor:void 0);return M?j[M]:void 0},de=y=>y.sortable??(!!y.sortKey||typeof y.accessor=="string"),ie=d.useMemo(()=>{if(!he||!Y)return r;const y=ae.find(M=>M.key===Y.key);if(!y)return r;const j=Y.direction==="asc"?1:-1;return[...r].sort((M,Z)=>Gi(Q(y.col,M),Q(y.col,Z))*j)},[r,he,Y,ae]),Be=!_e&&!W,Re=!!c&&Be,[$e,qe]=G.useColumnWidths(c??""),Me=Re?$e:void 0,Qe=d.useRef(null),[Ce,Ze]=d.useState();d.useLayoutEffect(()=>{Ze(void 0)},[$]),d.useLayoutEffect(()=>{if(!Be||Ce||!Qe.current)return;const y=Qe.current.querySelectorAll("th.sa-tl-leaf");Ze(Array.from(y).map(j=>j.offsetWidth))},[Ce,Be]);const[rt,ut]=d.useState(),[ct,at]=d.useState(0);d.useLayoutEffect(()=>{if(!_e||!Qe.current)return;const y=Qe.current.querySelector(":scope > tr");y&&at(y.offsetHeight)},[_e,$]);const ft=(y,j)=>{if((Me==null?void 0:Me[j])!=null)return Me[j];if(y.width!=null)return y.width;if((Ce==null?void 0:Ce[j])!=null)return Ce[j]},k=(y,j)=>typeof y.width=="number"?y.width:Ce==null?void 0:Ce[j],q=je.frozenKey&&!_e&&!W?ae.findIndex(y=>y.key===je.frozenKey):-1,K=y=>y<=q,we=L?Bt:0,Ie=y=>{const j=rt??Ce;if(!j)return we;let M=we;for(let Z=0;Z<y;Z++)M+=j[Z]??0;return M};d.useLayoutEffect(()=>{const y=Qe.current;if(!y||q<0){ut(void 0);return}let j=0;const M=()=>{j=0;const re=y.querySelectorAll("th.sa-tl-leaf"),le=Array.from(re).map(ne=>ne.getBoundingClientRect().width);ut(ne=>ne&&ne.length===le.length&&ne.every((me,ge)=>Math.abs(me-le[ge])<.5)?ne:le)},Z=new ResizeObserver(()=>{j||(j=requestAnimationFrame(M))});return Z.observe(y),y.querySelectorAll("th.sa-tl-leaf").forEach(re=>Z.observe(re)),M(),()=>{j&&cancelAnimationFrame(j),Z.disconnect()}},[$,q,L,Ce,Me]);const Ue=d.useRef(null),[Ae,De]=d.useState("100vh");d.useLayoutEffect(()=>{if(S!==void 0)return;const y=()=>{if(Ue.current){const j=Ue.current.getBoundingClientRect().top;De(`calc(100vh - ${j}px - var(--sa-floating-footer-height, 0px) + 12px)`)}};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[S]);const Ee=(y,j)=>n?n(y,j):j,He=U!==void 0,[wt,No]=d.useState(()=>new Set(J??[])),st=d.useMemo(()=>He?new Set(U):wt,[He,U,wt]);d.useEffect(()=>{L&&!n&&process.env.NODE_ENV!=="production"&&console.warn("[@starasia/admin] TableLayout: `selectable` tanpa `getRowKey` — key default (index) membuat seleksi menempel ke POSISI baris, bukan datanya. Beri `getRowKey` yang stabil (mis. r => r.id).")},[L,!n]);const Yr=y=>{if(He||No(y),N){const j=ie.filter((M,Z)=>y.has(Ee(M,Z)));N(Array.from(y),j)}},ir=(y,j)=>L&&(_?_(y,j):!0),lr=y=>{const j=new Set(st);j.has(y)?j.delete(y):j.add(y),Yr(j)},mt=d.useMemo(()=>L?ie.map((y,j)=>({row:y,i:j,key:Ee(y,j)})).filter(({row:y,i:j})=>_?_(y,j):!0).map(({key:y})=>y):[],[L,ie,_,n]),Xr=mt.filter(y=>st.has(y)),cr=mt.length>0&&Xr.length===mt.length,$r=Xr.length>0&&!cr,_o=()=>{const y=new Set(st);cr?mt.forEach(j=>y.delete(j)):mt.forEach(j=>y.add(j)),Yr(y)},ar=(y,j,M)=>y.render?y.render(j,M,ie):Zi(j,y.accessor),dr=ae.length+(L?1:0)+(V?1:0),Kr=["80%","55%","70%","45%","90%","60%"],qo=(y,j)=>Kr[(y*7+j*3)%Kr.length],Zo=(y,j)=>e.jsx(Ye.Skeleton,{height:14,width:qo(y,j),borderRadius:"rounded-sm"}),Go=Array.from({length:w},(y,j)=>e.jsxs(G.Tr,{children:[L&&e.jsx(G.Td,{style:{width:Bt,padding:0},children:e.jsx("div",{style:{display:"flex",justifyContent:"center"},children:e.jsx(Ye.Skeleton,{height:14,width:14,borderRadius:"rounded-sm"})})}),ae.map(({col:M,key:Z},re)=>e.jsx(G.Td,{style:{textAlign:Et(M.align)},children:Zo(j,re)},`sa-tl-sk-${j}-${Z}`)),V&&e.jsx(G.Td,{style:{width:1,padding:0,border:"none"}})]},`sa-tl-sk-${j}`)),Qo=(y,j)=>{j||be({...je,hidden:[...je.hidden??[],y]})},Uo=y=>be({...je,frozenKey:je.frozenKey===y?void 0:y}),Rt=y=>(O??[]).filter(j=>{var M;return!((M=j.hidden)!=null&&M.call(j,y))}),en={position:"absolute",right:0,top:0,bottom:0,display:"flex",alignItems:"center",gap:4,paddingRight:16,paddingLeft:40,background:"linear-gradient(to right, transparent, var(--sa-background-primary-inverse, #f8f8f8) 40px)"},At=(y,j,M,Z)=>{var Je;const re=(Je=y.disabled)==null?void 0:Je.call(y,j),le=(Z==null?void 0:Z.showLabel)??y.showLabel,ne=(Z==null?void 0:Z.size)??"xs",me=e.jsx(H.Button,{size:ne,variant:y.variant??"tertiary",tone:y.tone??"neutral",disabled:re,onClick:()=>y.onClick(j,M),iconLeft:y.icon?e.jsx(E.Icon,{name:y.icon,size:"sm"}):void 0,children:le&&y.label}),ge=y.tooltip;return ge?e.jsx(Fe.Tooltip,{label:ge,position:"top-end",children:me}):me},Jo=(y,j)=>{const M=Rt(y);if(!M.length)return null;if(M.length>5){const re=Ee(y,j),le=(z==null?void 0:z.rowKey)===re;return e.jsx("div",{className:"sa-tl-row-actions",style:en,onClick:ne=>ne.stopPropagation(),children:e.jsx(Fe.Tooltip,{label:"Aksi lainnya",position:"top",children:e.jsx(H.Button,{size:"xs",variant:"tertiary",onClick:ne=>{const me=ne.currentTarget.getBoundingClientRect();P(le?null:{rowKey:re,top:me.bottom+4,right:window.innerWidth-me.right})},children:e.jsx(E.Icon,{name:"MenuVertical",size:"sm"})})})})}return e.jsx("div",{className:"sa-tl-row-actions",style:en,children:M.map(re=>e.jsx(d.Fragment,{children:At(re,y,j)},re.key))})},Yo=(y,j)=>{const M=Rt(y);return M.length?e.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap",paddingTop:8,marginTop:8,borderTop:kt},children:M.map(Z=>e.jsx(d.Fragment,{children:At(Z,y,j,{showLabel:!0,size:"sm"})},Z.key))}):null},Xo=(y,j)=>{const M=Rt(y);return M.length?e.jsx("div",{style:{display:"flex",gap:4,paddingRight:8,flexShrink:0},children:M.map(Z=>e.jsx(d.Fragment,{children:At(Z,y,j,{showLabel:!1})},Z.key))}):null},ur=(y,j)=>{const{col:M,key:Z}=y,re=tt.get(Z)??0,le=K(re),ne=le&&re===q,me=(Y==null?void 0:Y.key)===Z?Y.direction:null,ge=f&&!M.disableMenu?e.jsx(Io,{active:!!me||le,canSort:de(M),canHide:!M.locked,sortDir:me,frozen:le,onSort:St=>Oe({key:Z,direction:St}),onClearSort:()=>Oe(null),onToggleFreeze:()=>Uo(Z),onHide:()=>Qo(Z,M.locked)}):null,Je=M.align==="right",Dt=M.align==="right"?"flex-end":M.align==="center"?"center":"flex-start",Ke=e.jsxs("span",{style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:6,justifyContent:Dt,overflow:"hidden"},children:[M.icon&&e.jsx(E.Icon,{name:M.icon,size:"sm",style:{flexShrink:0}}),e.jsx("span",{style:Vt,children:M.title})]});return e.jsx(G.Th,{className:`sa-tl-leaf${le?" sa-tl-frozen":""}`,rowSpan:j==null?void 0:j.rowSpan,colSpan:j==null?void 0:j.colSpan,minWidth:M.minWidth,resizable:Be?M.resizable:!1,defaultWidth:k(M,re),style:{textAlign:Et(M.align),width:ft(M,re),position:"sticky",top:(j==null?void 0:j.top)??0,left:le?Ie(re):void 0,zIndex:le?3:2,backgroundColor:gt,boxShadow:ne?Pn:void 0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,width:"100%"},children:Je?e.jsxs(e.Fragment,{children:[ge,Ke]}):e.jsxs(e.Fragment,{children:[Ke,ge]})})},`th-${Z}`)},$o=()=>{const y=[];for(let j=0;j<ae.length;){const M=ae[j],Z=M.col.headerColSpan??1,re=Math.max(1,Math.min(Z,ae.length-j));y.push(ur(M,re>1?{colSpan:re}:void 0)),j+=re}return y},tn=y=>e.jsx(G.Th,{rowSpan:y==null?void 0:y.rowSpan,style:{width:Bt,position:"sticky",top:0,left:0,zIndex:4,backgroundColor:gt,padding:0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},onClick:j=>j.stopPropagation(),children:e.jsx(nt.Checkbox,{size:"sm",variant:$r?"indeterminate":"select",checked:cr||$r,disabled:mt.length===0,onChange:_o,"aria-label":"Pilih semua baris di halaman ini"})})},"th-select"),Ko=(y,j,M)=>{const Z=Ee(y,j);return e.jsx(G.Td,{className:"sa-tl-frozen",style:{width:Bt,padding:0,position:"sticky",left:0,zIndex:2,...M?{"--sa-tl-bg":M}:{}},children:ir(y,j)&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},onClick:re=>re.stopPropagation(),children:e.jsx(nt.Checkbox,{size:"sm",checked:st.has(Z),onChange:()=>lr(Z),"aria-label":"Pilih baris"})})},`tl-select-${j}`)},xr=ae.filter(y=>!y.col.hideOnMobile),hr=xr.find(y=>y.col.primary)??xr[0],es=xr.filter(y=>y!==hr),ts=y=>ye(j=>{const M=new Set(j);return M.has(y)?M.delete(y):M.add(y),M}),rn=(y,j)=>es.map(({col:M,key:Z})=>{const re=ar(M,y,j),le=typeof re=="string"||typeof re=="number"?e.jsx(v.Text,{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",textAlign:"right"},children:re}):e.jsx("div",{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",textAlign:"right"},children:re});return e.jsxs("div",{style:{display:"flex",gap:12,justifyContent:"space-between",alignItems:"baseline"},children:[typeof M.title=="string"?e.jsx(v.Text,{color:"subtle",fontWeight:"medium",style:{color:Ni,flexShrink:0},children:M.title}):e.jsx("div",{style:{flexShrink:0},children:M.title}),le]},Z)}),fr=(y,j)=>{const M=hr?ar(hr.col,y,j):null;return typeof M=="string"||typeof M=="number"?e.jsx(v.Text,{as:"span",style:Vt,children:M}):e.jsx("span",{style:Vt,children:M})},rs=e.jsx(x.Box,{style:{display:"flex",flexDirection:"column",gap:8,padding:8},children:Array.from({length:w},(y,j)=>e.jsxs(x.Box,{style:{border:kt,borderRadius:"var(--sa-radii-sm, 6px)",padding:12,display:"flex",flexDirection:"column",gap:8},children:[e.jsx(Ye.Skeleton,{height:16,width:"60%",borderRadius:"rounded-sm"}),e.jsx(Ye.Skeleton,{height:12,width:"85%",borderRadius:"rounded-sm"}),e.jsx(Ye.Skeleton,{height:12,width:"70%",borderRadius:"rounded-sm"})]},`sa-tl-sk-card-${j}`))}),nn=e.jsx(x.Box,{fullWidth:!0,style:{minHeight:(A==null?void 0:A.minHeight)??320,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:A==null?void 0:A.content}),ns=R?rs:ie.length===0?nn:b==="expand"?e.jsx(x.Box,{style:{display:"flex",flexDirection:"column"},children:ie.map((y,j)=>{const M=Ee(y,j),Z=se.has(M),le=L&&st.has(M)?Sr:Nt(s==null?void 0:s(y,j));return e.jsxs("div",{style:{borderBottom:kt,backgroundColor:le},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[ir(y,j)&&e.jsx("div",{style:{display:"flex",alignItems:"center",paddingLeft:12,flexShrink:0},children:e.jsx(nt.Checkbox,{size:"sm",checked:st.has(M),onChange:()=>lr(M),"aria-label":"Pilih baris"})}),e.jsxs("button",{type:"button",onClick:()=>ts(M),style:{flex:1,minWidth:0,display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,padding:"10px 12px",background:"none",border:"none",font:"inherit",color:"inherit",cursor:"pointer",textAlign:"left"},children:[fr(y,j),e.jsx(E.Icon,{name:Z?"ChevronUp":"ChevronDown",size:"sm",style:{flexShrink:0}})]}),V&&Xo(y,j)]}),Z&&e.jsx("div",{style:{padding:"0 12px 12px",display:"flex",flexDirection:"column",gap:6},children:rn(y,j)})]},M)})}):e.jsx(x.Box,{style:{display:"flex",flexDirection:"column",gap:8,padding:8},children:ie.map((y,j)=>{const M=Ee(y,j),Z=L&&st.has(M);return e.jsxs(x.Box,{style:{border:kt,borderRadius:"var(--sa-radii-sm, 6px)",padding:12,display:"flex",flexDirection:"column",gap:6,backgroundColor:Z?Sr:Nt(s==null?void 0:s(y,j))},children:[ir(y,j)?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(nt.Checkbox,{size:"sm",checked:st.has(M),onChange:()=>lr(M),"aria-label":"Pilih baris"}),e.jsx("div",{style:{flex:1,minWidth:0},children:fr(y,j)})]}):fr(y,j),rn(y,j),V&&Yo(y,j)]},M)})}),os=i&&Be&&Ce!==void 0,on=l==="fixed"&&!i&&(Be?Ce!==void 0:!0),ss=on&&!Be,Wt=C&&C.length>0?C.map((y,j)=>e.jsx(G.Tr,{children:y.cells.map((M,Z)=>e.jsx(G.Td,{colSpan:M.colSpan,rowSpan:M.rowSpan,style:{textAlign:Et(M.align)},children:M.content},`tl-foot-${j}-${Z}`))},`tl-foot-${j}`)):null,is=e.jsxs(G.Table,{className:"sa-table-layout",fullWidth:!0,size:o,resizable:os,style:on?{tableLayout:"fixed"}:void 0,onWidthsChange:Re?qe:void 0,children:[ss&&e.jsxs("colgroup",{children:[L&&e.jsx("col",{style:{width:Bt}}),ae.map(({col:y,key:j},M)=>e.jsx("col",{style:{width:ft(y,M)}},`col-${j}`)),V&&e.jsx("col",{style:{width:1}})]}),e.jsx(G.Thead,{ref:Qe,children:_e?e.jsxs(e.Fragment,{children:[e.jsxs(G.Tr,{children:[L&&tn({rowSpan:2}),Ne.map(y=>y.isGroup?e.jsx(G.Th,{colSpan:y.leaves.length,style:{textAlign:"center",position:"sticky",top:0,zIndex:2,backgroundColor:gt},children:e.jsx("span",{style:Vt,children:y.col.title})},`grp-${y.key}`):ur(y.leaves[0],{rowSpan:2})),V&&e.jsx(G.Th,{rowSpan:2,style:{position:"sticky",top:0,right:0,zIndex:3,width:1,padding:0,border:"none",backgroundColor:gt}})]}),e.jsx(G.Tr,{children:Ne.flatMap(y=>y.isGroup?y.leaves.map(j=>ur(j,{top:ct})):[])})]}):e.jsxs(G.Tr,{children:[L&&tn(),$o(),V&&e.jsx(G.Th,{style:{position:"sticky",top:0,right:0,zIndex:3,width:1,padding:0,border:"none",backgroundColor:gt}})]})}),e.jsx(G.Tbody,{children:R?Go:ie.length===0?e.jsx(G.Tr,{children:e.jsx(G.Td,{colSpan:dr,children:nn})}):e.jsxs(e.Fragment,{children:[ie.map((y,j)=>{const M=B==null?void 0:B(y,j,j>0?ie[j-1]:void 0),re=L&&st.has(Ee(y,j))?Sr:Nt(s==null?void 0:s(y,j));return e.jsxs(d.Fragment,{children:[M!=null&&M!==!1&&e.jsx(G.Tr,{children:e.jsx(G.Td,{colSpan:dr,style:{backgroundColor:gt},children:M})}),e.jsxs(G.Tr,{children:[L&&Ko(y,j,re),ae.map(({col:le,key:ne},me)=>{var ln;const ge=(ln=le.cellProps)==null?void 0:ln.call(le,y,j,ie);if(ge!=null&&ge.hidden)return null;const Je=K(me),Dt=Je&&me===q,Ke=ar(le,y,j),St=typeof le.bg=="function"?le.bg(y,j,ie):le.bg,sn=Nt(St)??re;return e.jsx(G.Td,{className:Je?"sa-tl-frozen":void 0,colSpan:ge==null?void 0:ge.colSpan,rowSpan:ge==null?void 0:ge.rowSpan,style:{textAlign:Et(le.align),width:ft(le,me),minWidth:le.minWidth,position:Je?"sticky":void 0,left:Je?Ie(me):void 0,zIndex:Je?1:void 0,boxShadow:Dt?Pn:void 0,...sn?{"--sa-tl-bg":sn}:{}},children:typeof Ke=="string"?e.jsx(v.Text,{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:Et(le.align)},children:Ke}):Ke},`tl-cell-${j}-${ne}`)}),V&&e.jsx(G.Td,{style:{position:"sticky",right:0,width:1,padding:0,overflow:"visible",zIndex:2,border:"none"},children:Jo(y,j)})]})]},Ee(y,j))}),F!=null&&e.jsx(G.Tr,{children:e.jsx(G.Td,{colSpan:dr,children:F})})]})}),Wt&&e.jsx(G.Tfoot,{className:D?"sa-tl-sticky-foot":void 0,children:Wt})]}),mr=z?ie.findIndex((y,j)=>Ee(y,j)===z.rowKey):-1,gr=mr>=0?ie[mr]:null;return e.jsxs(e.Fragment,{children:[e.jsx(x.Box,{ref:Ue,fullWidth:!0,style:{overflow:"auto",height:S??Ae},children:te?e.jsxs(e.Fragment,{children:[ns,Wt&&!R&&ie.length>0&&e.jsx(x.Box,{style:{borderTop:kt},children:e.jsx(G.Table,{fullWidth:!0,size:o,className:"sa-table-layout",children:e.jsx(G.Tbody,{children:Wt})})})]}):is}),z&&gr&&e.jsx("div",{className:"sa-tl-kebab-menu",style:{top:z.top,right:z.right},onClick:y=>y.stopPropagation(),children:Rt(gr).map(y=>e.jsx("div",{style:{padding:"2px 4px"},children:At(y,gr,mr,{showLabel:!0,size:"sm"})},y.key))})]})},kr=t=>t==="asc"||t==="desc",Ui=(t={})=>{const{sortKeyParam:r="sortBy",sortOrderParam:n="sortOrder",pageKey:s="page",defaultSort:o=null,paramKeys:i,scopeId:l,storage:c=Jr}=t,{searchParams:a,setSearchParams:u,searchQueries:f}=Ve(),g=a.toString(),m=l?Ct.tableSort(l):void 0,p=d.useRef(!1);d.useEffect(()=>{if(p.current||(p.current=!0,!m)||a.has(r)||a.has(n))return;const C=c.get(m);!(C!=null&&C.key)||!kr(C.direction)||u({...Object.fromEntries(a.entries()),[r]:C.key,[n]:C.direction},{replace:!0})},[]);const S=d.useMemo(()=>{const C=a.get(r),D=a.get(n);return C&&kr(D)?{key:C,direction:D}:o},[g,r,n,o]);d.useEffect(()=>{if(!m)return;const C=a.get(r),D=a.get(n);C&&kr(D)?c.set(m,{key:C,direction:D}):c.remove(m)},[g,m,r,n,c]);const b=(i==null?void 0:i.sortBy)??"sortBy",I=(i==null?void 0:i.sortOrder)??"sortOrder",B=d.useMemo(()=>S?{[b]:S.key,[I]:S.direction}:{},[S,b,I]),F=d.useCallback(C=>{const D={...f};C?(D[r]=C.key,D[n]=C.direction):(delete D[r],delete D[n]),delete D[s],u(D)},[f,r,n,s,u]);return{sort:S,setSort:F,params:B}},er=({of:t,render:r})=>d.Children.toArray(t==null?void 0:t.map((n,s,o)=>r(n,s,o))),ue=({condition:t,fallback:r,children:n,loading:s,isLoading:o})=>e.jsx(e.Fragment,{children:o?s:t?n:r}),fe=t=>e.jsx(v.Text,{...t,fontSize:t.fontSize||"md",fontWeight:t.fontWeight||"medium",color:t.color||"gray-700",children:t.children}),lt=t=>e.jsx(v.Text,{color:"red-600",fontSize:"sm",children:t.message}),Ji=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var c,a,u;const i=o.hideMessageError||!1,l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=o.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=o.tooltip)==null?void 0:a.label,arrowPosition:(u=o.tooltip)==null?void 0:u.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),e.jsxs(x.Box,{direction:"column",gap:"xs",fullWidth:o.inputProps.fullWidth||!1,children:[e.jsx(dt.Input,{ref:o.inputRef,size:t,...o.inputProps,status:o.errorMessage?"error":"default",fullWidth:!0}),!i&&o.errorMessage&&e.jsx(lt,{message:o.errorMessage}),o.inputProps.extended&&o.inputProps.extended]})]})},Yi=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var c,a,u;const i=o.hideMessageError||!1,l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",onClick:o.onClickContainer,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=o.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=o.tooltip)==null?void 0:a.label,arrowPosition:(u=o.tooltip)==null?void 0:u.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),e.jsxs(x.Box,{direction:"column",gap:"xs",fullWidth:o.inputProps.fullWidth||!1,children:[e.jsx(x.Box,{direction:"column",style:{width:o.inputProps.fullWidth?"100%":r==="horizontal"&&o.customWidth?o.customWidth:r==="horizontal"?"343px":""},children:e.jsx(jt.Dropdown,{size:t,...o.inputProps,error:!!o.errorMessage})}),!i&&o.errorMessage&&e.jsx(lt,{message:o.errorMessage}),o.inputProps.extended&&o.inputProps.extended]})]})},Xi=(t,r)=>typeof t=="string"&&t||r==="error"?"var(--sa-border-danger)":"var(--sa-border-subtle)",$i=t=>{var c;const[r,n]=d.useState(!1),s=a=>{a.preventDefault(),a.stopPropagation()},o=a=>{a.preventDefault(),a.stopPropagation(),a.dataTransfer&&t.handleOnFileChange(a.dataTransfer.files.item(0))},i=a=>{a.preventDefault(),n(!0)},l=a=>{a.preventDefault(),n(!1)};return e.jsxs(x.Box,{width:"width-full",paddingInline:"md",direction:"row",gap:"sm",align:"center",onClick:t.handleOnClick,onDragOver:s,onDrop:o,onDragEnter:i,onDragLeave:l,paddingBlock:"md",borderRadius:"rounded-md",style:{border:r?"1px solid var(--sa-border-info)":`1px solid ${Xi(t.errorMessage,t.status)}`},children:[e.jsx(E.Icon,{name:"Upload",size:"lg",style:{width:30,height:30}}),e.jsxs(ce.Flex,{direction:"column",gap:"xs",children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",children:[e.jsx(v.Text,{fontWeight:"medium",color:"gray-500",style:{textWrap:"nowrap"},fontSize:t.isDesktop?"md":"sm",children:"Click your upload"}),e.jsx(v.Text,{fontWeight:"medium",style:{textWrap:"nowrap"},fontSize:t.isDesktop?"md":"sm",children:"or Drag & Drop"})]}),e.jsx(v.Text,{fontSize:"sm",color:"gray-500",children:(c=t.fileSupports)==null?void 0:c.map(a=>a.toLocaleUpperCase()).join(", ")})]})]})};function Ki(t){return t.split(" ").map(r=>r[0]).join("").slice(0,2).toUpperCase()}const Lo=t=>{const r={day:"2-digit",month:"short",year:"numeric"};return t.toLocaleDateString("id-ID",r)},el=t=>{const r={Jan:0,Feb:1,Mar:2,Apr:3,Mei:4,Jun:5,Jul:6,Agu:7,Sep:8,Okt:9,Nov:10,Des:11},n=t.split(" ");if(n.length!==3)return null;const s=parseInt(n[0],10),o=r[n[1]],i=parseInt(n[2],10);return isNaN(s)||isNaN(o)||isNaN(i)?null:new Date(i,o,s)};function tl(t,r=!0){if(!t)return"Rp 0";const n=typeof t=="number"?t.toString():t;if(isNaN(Number(n)))return"Rp 0";const s=n.split("."),o=s[0].replace(/\B(?=(\d{3})+(?!\d))/g,"."),i=s.length===2?o+"."+s[1]:o;return r?"Rp"+i:i}String.prototype.toTitleCase=function(){return this.toLowerCase().split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")};String.prototype.toNumber=function(){return Number(this)};const rl=t=>{const r=t.split(" ");let n=r[0].charAt(0);return r.length>1&&(n+=""+r[1].charAt(0)),n.toUpperCase()};function nl(t){const r=typeof t=="string"?new Date(t):t;if(isNaN(r.getTime()))throw new Error("Invalid date format");const n=r.getFullYear(),s=String(r.getMonth()+1).padStart(2,"0"),o=String(r.getDate()).padStart(2,"0");return`${n}-${s}-${o}`}const ol="sa-admin",et=t=>`var(--${ol}-${t})`,sl={base:{borderColor:et("base-border-color"),textColor:et("base-text-color"),iconColor:et("base-icon-color"),placeholderColor:et("base-placeholder-color")},document:{bgColor:et("document-bg-color")},sidebar:{bgColor:et("sidebar-bg-color"),borderColor:et("sidebar-border-color"),maxWidth:et("sidebar-max-width"),width:et("sidebar-width"),collapseWidth:et("sidebar-collapse-width"),collapseV2Width:et("sidebar-v2-collapse-width")}},il=24*60*60*1e3,ll=t=>{const r="14px poppins",s=document.createElement("canvas").getContext("2d");s.font=r;const o=s.measureText(t).width;return Number(Math.ceil(o))},cl=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,al=/--+/,dl=/-$/;function ul(t,r){return JSON.stringify(t)!==JSON.stringify(r)}function xl(t){return/^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(t)}function hl(t){return/^[A-Za-z\s]+$/.test(t)}const fl=t=>{const r=/^[0-9]$/,n=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(t.ctrlKey||t.metaKey)&&(t.key==="a"||t.key==="c"||t.key==="v")||!r.test(t.key)&&!n.includes(t.key)&&t.preventDefault()},ml=t=>{const r=/^[0-9]$/,n=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(t.ctrlKey||t.metaKey)&&t.key==="v"||r.test(t.key)&&!n.includes(t.key)&&t.preventDefault()},gl=t=>{const r=/^[0-9.]$/,n=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(t.ctrlKey||t.metaKey)&&t.key==="v"||!r.test(t.key)&&!n.includes(t.key)&&t.preventDefault()},yl=t=>cl.test(t);function pl(t){return!(al.test(t)||dl.test(t))}const jl=t=>{const r=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab","Home","End"];if((t.ctrlKey||t.metaKey)&&["a","c","v","x"].includes(t.key.toLowerCase()))return;const n=t.currentTarget.value;/^[0-9]$/.test(t.key)||t.key==="."&&!n.includes(".")||t.key==="-"&&n.length===0&&!n.includes("-")||r.includes(t.key)||t.preventDefault()},bl=t=>{const r=document.getElementById(t);if(r){const n=r.getBoundingClientRect(),s=window.scrollY+n.top-80;window.scrollTo({top:s,behavior:"smooth"})}};function vl(t){const r=t.toLowerCase();if(["kb","mb","gb"].find(i=>r.endsWith(i)))return t;const o=Number(t);if(isNaN(o))throw new Error("Invalid size format");return o>=1e6?`${(o/1e6).toFixed(2)}MB`:o>=1e3?`${(o/1e3).toFixed(2)}KB`:`${o}B`}function Cl(t){const r=t.split("/");return r[r.length-1]}const wl=t=>{var r,n;return e.jsxs(x.Box,{width:"width-full",paddingInline:"md",height:"height-full",direction:"row",justify:"space-between",align:"center",onClick:t.handleOnClickFile,fullHeight:!0,paddingBlock:"md",id:"file-item",borderRadius:"rounded-md",style:{border:"1px solid var(--sa-border-subtle)",cursor:"pointer"},children:[e.jsxs(ce.Flex,{direction:"row",align:"center",gap:"sm",style:{flex:1,minWidth:0},children:[e.jsx(E.Icon,{name:"DocumentFilled",size:"lg",style:{color:"var(--sa-icon-brand)",width:30,height:30,flexShrink:0}}),e.jsxs(ce.Flex,{direction:"column",style:{minWidth:0,flex:1},children:[e.jsx(v.Text,{fontWeight:"bold",style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:t.defaultFile?Cl(t.defaultFile.url):(r=t.fileSelected)==null?void 0:r.name}),t.defaultFile?(t.defaultFile.size||t.defaultFile.date)&&e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[t.defaultFile.size&&e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",children:t.defaultFile.size}),t.defaultFile.size&&t.defaultFile.date&&e.jsx(E.Icon,{name:"Dot",size:"xs"}),t.defaultFile.date&&e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:t.defaultFile.date})]}):e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",children:vl(((n=t.fileSelected)==null?void 0:n.size.toString())||"100000")}),e.jsx(E.Icon,{name:"Dot",size:"xs"}),e.jsx(v.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:Lo(new Date)})]})]})]}),e.jsx(H.Button,{size:"xs",variant:"tertiary",tone:"error",type:"button",onClick:s=>{s.stopPropagation(),t.handleOnDeleteFile()},iconLeft:e.jsx(E.Icon,{name:"Trash1"})})]})},To=({status:t="default",labelPosition:r="outside-top",...n})=>{var m;const s=d.useRef(null),o=()=>{if(n.defaultFile){window.open(n.defaultFile.url);return}s.current&&s.current.click()},i=ve.useMediaQuery("md"),l=t==="error"||typeof n.errorMessage=="string"&&!!n.errorMessage,c=n.label?e.jsxs(ce.Flex,{direction:"row",align:"center",gap:"xs",children:[e.jsx(v.Text,{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-primary)"},children:n.label}),n.optional&&e.jsx("span",{style:{background:"var(--sa-background-neutral)",border:"1px solid var(--sa-border-subtle)",borderRadius:"4px",padding:"0 8px",fontSize:"10px",fontWeight:500,lineHeight:"18px",color:"var(--sa-text-primary)",display:"inline-flex",alignItems:"center"},children:"Optional"}),n.required&&e.jsx("span",{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-error)"},children:"*"})]}):null,a=n.description?e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:n.description}):null,u=e.jsxs(e.Fragment,{children:[n.helperText&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:n.helperText}),n.errorText&&t==="error"&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:n.errorText}),n.errorMessage&&!n.errorText&&e.jsx(v.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:n.errorMessage})]}),f=e.jsx("input",{type:"file",style:{display:"none"},ref:s,onChange:p=>{var S;return n.handleOnChangeFile(((S=p.target.files)==null?void 0:S.item(0))||null)},accept:(m=n.fileSupportOption)==null?void 0:m.map(p=>"."+(p==null?void 0:p.toLowerCase())).join(", ")}),g=e.jsxs(x.Box,{direction:"column",fullWidth:!0,style:{minHeight:"69px"},borderRadius:"rounded-md",display:"flex",justify:"center",align:"center",cursor:"pointer",gap:"md",...n.containerProps,children:[f,(n.fileSelected||n.defaultFile)&&e.jsx(wl,{fileSelected:n.fileSelected,defaultFile:n.defaultFile,handleOnDeleteFile:n.handleOnDeleteFile,handleOnClickFile:o}),!n.fileSelected&&!n.defaultFile&&e.jsx($i,{fileSupports:n.fileSupportOption,isDesktop:i,errorMessage:l?n.errorText||n.errorMessage||" ":void 0,status:l?"error":"default",handleOnClick:o,handleOnFileChange:n.handleOnChangeFile})]});return r==="outside-left"?e.jsxs(ce.Flex,{direction:"row",align:"flex-start",gap:"sm",style:{width:"100%"},children:[e.jsxs(ce.Flex,{direction:"column",gap:"xs",style:{width:"40%",minWidth:"120px",paddingTop:"10px"},children:[c,a]}),e.jsxs(ce.Flex,{direction:"column",gap:"sm",style:{flex:1,minWidth:0},children:[g,u]})]}):e.jsxs(ce.Flex,{direction:"column",gap:"sm",style:{width:"100%"},children:[c,a,g,u]})},Dl=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var c,a,u;const i=o.hideMessageError||!1,l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=o.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=o.tooltip)==null?void 0:a.label,arrowPosition:(u=o.tooltip)==null?void 0:u.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),e.jsxs(ce.Flex,{direction:"column",gap:"xs",children:[e.jsx(To,{...o.inputProps,status:o.errorMessage?"error":"default"}),!i&&o.errorMessage&&e.jsx(lt,{message:o.errorMessage})]})]})},Sl=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,required:o=!1,...i})=>{var a,u,f,g;const l=i.hideMessageError||!1,c=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"||r==="horizontal-inline"?"spacing-96":"sm",direction:r==="horizontal"||r==="horizontal-inline"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(ue,{condition:!!o,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:c,fullWidth:s,children:[e.jsx(fe,{children:i.title}),e.jsx(Xe.Body3,{props:{color:"gray-500"},children:i.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:c,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:i.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((a=i.tooltip)!=null&&a.label),children:e.jsx(Fe.Tooltip,{label:(u=i.tooltip)==null?void 0:u.label,arrowPosition:(f=i.tooltip)==null?void 0:f.arrowPosition,...i.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!i.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:i.description})})]})}),e.jsx(x.Box,{gap:r==="horizontal-inline"?"xl":"md",direction:r==="horizontal-inline"?"row":"column",align:"flex-start",children:e.jsx(er,{of:(g=i.checkBoxesList)==null?void 0:g.map(m=>({...m,isChecked:i.checkBoxesAreChecked.includes(m.id)})),render:m=>m.renderBadge?e.jsxs(x.Box,{direction:"row",justify:"space-between",gap:"lg",...i.badgeContainerProps,children:[e.jsx(nt.Checkbox,{name:m.name,value:m.id,checked:m.isChecked,onChange:p=>i.onChecked(p.target.value,m),label:m.name,description:m.description}),m.renderBadge]}):e.jsx(nt.Checkbox,{name:m.name,value:m.id,checked:m.isChecked,onChange:p=>i.onChecked(p.target.value,m),label:m.name,description:m.description})})}),!l&&i.errorMessage&&e.jsx(lt,{message:i.errorMessage})]})},kl=({position:t="vertical",size:r="md",fullWidth:n=!1,...s})=>{var i;const o=t==="horizontal-inline"||t==="horizontal-block"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:t==="horizontal-inline"||t==="horizontal-block"?"spacing-96":"sm",direction:t==="horizontal-inline"||t==="horizontal-block"?"row":"column",children:[e.jsx(ue,{condition:!!s.description||!!s.title,children:e.jsxs(x.Box,{direction:"column",customMaxWidth:o,fullWidth:n,children:[s.title&&e.jsx(fe,{children:s.title}),e.jsx(ue,{condition:!!s.description,children:e.jsx(v.Text,{color:"gray-500",children:s.description})})]})}),e.jsx(x.Box,{gap:"sm",direction:t==="horizontal"||t==="horizontal-inline"?"row":"column",align:"flex-start",flexWrap:"wrap",children:e.jsx(er,{of:(i=s.radioList)==null?void 0:i.map(l=>({...l,isChecked:s.radioIsChecked===l.id})),render:({value:l,id:c,isChecked:a,subInput:u,label:f,description:g})=>e.jsxs(x.Box,{direction:"column",gap:"xs",customMaxWidth:o,children:[e.jsx(Ir.Radio,{id:`${c.toString()}-${l}`,name:s.groupName||f,label:f,value:l,checked:a,onChange:m=>s.onChecked({id:c,label:m.target.name,value:m.target.value}),disabled:s.disableAll},c),g&&e.jsx(v.Text,{color:"gray-500",style:{marginLeft:28},children:g}),u]})})}),s.errorMessage&&e.jsx(lt,{message:s.errorMessage})]})},Bl=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var c,a,u;const i=o.hideMessageError||!1,l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=o.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=o.tooltip)==null?void 0:a.label,arrowPosition:(u=o.tooltip)==null?void 0:u.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),e.jsxs(ce.Flex,{direction:"column",gap:"xs",children:[e.jsx(Mr.Textarea,{ref:o.inputRef,size:t,...o.inputProps,status:o.errorMessage?"error":"default"}),!i&&o.errorMessage&&e.jsx(lt,{message:o.errorMessage})]})]})},El=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",required:s=!1,fullWidth:o=!1,...i})=>{var c,a,u;const l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(ue,{condition:s,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:o,children:[e.jsx(fe,{children:i.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:i.titleDescription})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:o,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:i.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=i.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=i.tooltip)==null?void 0:a.label,arrowPosition:(u=i.tooltip)==null?void 0:u.arrowPosition,...i.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!i.titleDescription,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:i.titleDescription})})]})}),e.jsx(vt.Toggle,{checked:i.checked,onChange:i.onChange,label:i.label,description:i.description}),i.errorMessage&&e.jsx(lt,{message:i.errorMessage})]})},Fl=({variant:t="primary",size:r="md",...n})=>{const s=pt.useColor(),o=l=>{var a,u,f,g,m,p;if(!l)return;const c=n.disabled?"var(--sa-text-disable, #181a198f)":t==="secondary"?"var(--sa-text-subtle, #8c8f97)":t==="secondary-danger"?(u=(a=s==null?void 0:s.computed)==null?void 0:a.red)==null?void 0:u[600]:t==="secondary-primary"?(g=(f=s==null?void 0:s.computed)==null?void 0:f.blue)==null?void 0:g[700]:(p=(m=s==null?void 0:s.computed)==null?void 0:m.gray)==null?void 0:p[50];return e.jsx(E.Icon,{name:l,size:r,style:{color:c}})},i=()=>{var c,a,u,f;if(t!=="secondary-danger"&&t!=="secondary-primary")return n.title;const l={color:n.disabled?"var(--sa-text-disable, #181a198f)":t==="secondary-danger"?(a=(c=s==null?void 0:s.computed)==null?void 0:c.red)==null?void 0:a[600]:(f=(u=s==null?void 0:s.computed)==null?void 0:u.blue)==null?void 0:f[700]};switch(r){case"xs":return e.jsx(Xe.Body2,{props:{style:l},children:n.title});case"sm":case"md":return e.jsx(Xe.SubH3,{props:{style:l},children:n.title});case"lg":return e.jsx(Xe.SubH2,{props:{style:l},children:n.title});default:return n.title}};return e.jsx(H.Button,{fullWidth:!0,disabled:n.disabled,primary:t==="primary",secondary:t==="secondary"||t==="secondary-danger"||t==="secondary-primary",success:t==="success",onClick:n.onClick,type:n.type,iconLeft:o(n.iconLeft),iconRight:o(n.iconRight),size:r,children:i()})},Ml=t=>e.jsx(Xe.H5,{props:{...t},children:t.title}),Il=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var c,a,u;const i=o.hideMessageError||!1,l=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",onClick:o.onClickContainer,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:l,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((c=o.tooltip)!=null&&c.label),children:e.jsx(Fe.Tooltip,{label:(a=o.tooltip)==null?void 0:a.label,arrowPosition:(u=o.tooltip)==null?void 0:u.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),e.jsxs(ce.Flex,{direction:"column",gap:"xs",children:[e.jsx(x.Box,{direction:"column",style:{width:r==="horizontal"&&o.customWidth?o.customWidth:r==="horizontal"?"343px":""},children:e.jsx(ht.StarasiaDate,{size:t,...o.inputProps,status:o.errorMessage?"error":void 0})}),!i&&o.errorMessage&&e.jsx(lt,{message:o.errorMessage})]})]})};async function Ll(t,r){const n=new Image;n.src=t,await new Promise((i,l)=>{n.onload=i,n.onerror=l});const s=document.createElement("canvas");s.width=r.width,s.height=r.height;const o=s.getContext("2d",{alpha:!0});if(!o)throw new Error("No 2D context");return o.drawImage(n,r.x,r.y,r.width,r.height,0,0,r.width,r.height),new Promise((i,l)=>{s.toBlob(c=>{if(!c)return l("Canvas is empty");const a=new File([c],"cropped.png",{type:"image/png"});i(a)},"image/png")})}const Nn={"1:1":1,"4:3":4/3,"16:9":16/9,"3:4":3/4,"9:16":9/16,"2:3":2/3,"3:2":3/2,"32:9":32/9},Oo=d.forwardRef(({handleUpload:t,urlImage:r,isUploading:n,croppedImage:s,setCroppedImage:o,size:i="96",aspect:l="1:1",containerProps:c,maxFileSize:a=2,onError:u},f)=>{const g=ve.useMediaQuery("md"),[m,p]=d.useState(!1),[S,b]=d.useState(null),[I,B]=d.useState(!1),[F,C]=d.useState({x:0,y:0}),[D,A]=d.useState(1),[R,w]=d.useState(null);d.useEffect(()=>{r===null&&o(null)},[r]);const O=d.useCallback((z,P)=>{w(P)},[]),L=z=>{var ye;const P=(ye=z.target.files)==null?void 0:ye[0];if(!P)return;const se=new FileReader;se.onload=()=>{b(se.result),B(!0)},se.readAsDataURL(P)},U=async()=>{if(!(!S||!R))try{const z=await Ll(S,R);if(a&&z.size>a*1024*1024){u==null||u(`Ukuran file maksimal ${a}MB`);return}t==null||t(z);const P=URL.createObjectURL(z);o(P,z),B(!1)}catch{u==null||u("Gagal memproses gambar")}},J=d.useRef(null),N=()=>{J.current&&J.current.click()};d.useImperativeHandle(f,()=>({openFileDialog:()=>{var z;(z=J.current)==null||z.click()}}));const _=parseInt(i,10),X=Nn[l];let te,V;return X>=1?(V=_,te=_*X):(te=_,V=_/X),e.jsxs(x.Box,{direction:"column",display:"flex",position:"relative",bg:(c==null?void 0:c.bg)||"gray-200",borderStyle:(c==null?void 0:c.borderStyle)||"border-none",borderColor:(c==null?void 0:c.borderColor)||"gray-200",borderWidth:(c==null?void 0:c.borderWidth)||"border-2",borderRadius:(c==null?void 0:c.borderRadius)||"rounded-md",overflow:"overflow-hidden",align:"center",justify:"center",style:{width:c!=null&&c.fullWidth?"100%":`${te}px`,height:c!=null&&c.fullWidth?"auto":`${V}px`,aspectRatio:X,flexShrink:0},onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[s||r?e.jsx("img",{src:s||r||void 0,alt:"Profile",style:{objectFit:"cover",width:"100%",height:"100%"}}):e.jsx(x.Box,{display:"flex",direction:"column",align:"center",justify:"center",padding:"spacing-4",children:e.jsx(E.Icon,{name:"Image",style:{color:"var(--sa-text-subtle, #8c8f97)",width:Number(i)/2<40?Number(i)/2:40,height:Number(i)/2<40?Number(i)/2:40}})}),e.jsxs(x.Box,{direction:"column",position:"absolute",display:"flex",align:"center",justify:"center",cursor:"pointer",style:{inset:0,backgroundColor:"var(--sa-color-black-alpha-a30, #080f214c)",opacity:m?1:0,transition:"opacity 0.3s ease-in-out"},onClick:N,children:[e.jsx("input",{ref:J,type:"file",accept:"image/*",onChange:L,disabled:n,style:{display:"none"}}),e.jsxs(x.Box,{display:"flex",align:"center",gap:"spacing-2",direction:"row",children:[e.jsx(E.Icon,{name:"Edit3",style:{color:"var(--sa-background-primary, #ffffff)"}}),e.jsx(ue,{condition:i.toNumber()>80,children:e.jsx(v.Text,{color:"gray-50",fontSize:i.toNumber()>80?"sm":"md",fontWeight:"medium",children:"Edit Image"})})]})]}),n&&e.jsx(x.Box,{direction:"column",position:"absolute",display:"flex",align:"center",justify:"center",style:{inset:0,zIndex:20,backgroundColor:"var(--sa-color-white-alpha-a80, #e5e9f6cc)"},children:e.jsx(x.Box,{direction:"column",borderRadius:"rounded-full",style:{animation:"spin 1s linear infinite",border:"2px solid transparent",height:"2rem",width:"2rem"},borderColor:"info-600"})}),I&&Xt.createPortal(e.jsx("div",{style:{position:"fixed",inset:0,zIndex:19999,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.6)"},onClick:()=>B(!1),children:e.jsxs("div",{style:{backgroundColor:"var(--sa-background-primary)",borderRadius:"var(--sa-radii-md)",boxShadow:"0 20px 60px rgba(0,0,0,0.3)",overflow:"hidden",width:g?l==="1:1"?"min(90vw, 480px)":`min(90vw, ${te*2}px)`:"calc(100vw - 2rem)",display:"flex",flexDirection:"column"},onClick:z=>z.stopPropagation(),children:[e.jsx("div",{style:{position:"relative",width:"100%",height:"20rem",backgroundColor:"var(--sa-color-gray-100)"},children:S&&e.jsx(ls,{image:S,crop:F,zoom:D,aspect:l?Nn[l]:void 0,onCropChange:C,onZoomChange:A,onCropComplete:O,objectFit:"contain",minZoom:.5,restrictPosition:!1})}),e.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",padding:"0.75rem 1rem",borderTop:"1px solid var(--sa-border-subtle)"},children:[e.jsx(H.Button,{size:"sm",secondary:!0,onClick:()=>B(!1),children:"Cancel"}),e.jsx(H.Button,{size:"sm",primary:!0,onClick:U,children:"Crop"})]})]})}),document.body)]})}),Tl=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,required:o=!1,...i})=>{var a,u,f;const l=i.hideMessageError||!1,c=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...i.containerProps,children:[i.title&&e.jsx(ue,{condition:!!o,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:c,fullWidth:s,children:[e.jsx(fe,{children:i.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:i.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:c,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:i.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((a=i.tooltip)!=null&&a.label),children:e.jsx(Fe.Tooltip,{label:(u=i.tooltip)==null?void 0:u.label,arrowPosition:(f=i.tooltip)==null?void 0:f.arrowPosition,...i.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!i.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:i.description})})]})}),e.jsxs(ce.Flex,{direction:"column",gap:"xs",children:[e.jsx(Oo,{...i.inputProps}),!l&&i.errorMessage&&e.jsx(lt,{message:i.errorMessage})]})]})},Ol=({size:t="md",direction:r="vertical",requiredTitle:n="(Required)",fullWidth:s=!1,...o})=>{var l,c,a;const i=r==="horizontal"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(x.Box,{gap:r==="horizontal"?"spacing-96":"sm",direction:r==="horizontal"?"row":"column",...o.containerProps,children:[o.title&&e.jsx(ue,{condition:!!o.inputProps.required,fallback:e.jsxs(x.Box,{direction:"column",customMaxWidth:i,fullWidth:s,children:[e.jsx(fe,{children:o.title}),e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})]}),children:e.jsxs(x.Box,{direction:"column",customMaxWidth:i,fullWidth:s,children:[e.jsxs(ce.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(fe,{fontSize:t,children:o.title}),e.jsx(fe,{color:"error",fontSize:t,children:n}),e.jsx(ue,{condition:!!((l=o.tooltip)!=null&&l.label),children:e.jsx(Fe.Tooltip,{label:(c=o.tooltip)==null?void 0:c.label,arrowPosition:(a=o.tooltip)==null?void 0:a.arrowPosition,...o.tooltip,children:e.jsx(E.Icon,{name:"InfoCircle",size:t==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(ue,{condition:!!o.description,children:e.jsx(v.Text,{fontSize:t,color:"gray-500",children:o.description})})]})}),o.inputProps.extended&&o.inputProps.extended]})},Rl=({items:t,id:r,handleOnUpdate:n,width:s,toggleShow:o=!0,disabled:i=!1})=>{var f;const[l,c]=d.useState([]);d.useEffect(()=>{t&&c([...t.map(g=>({id:g.id,isActive:g.isActive}))])},[t]);const a=(f=l.find(g=>g.id===r))==null?void 0:f.isActive,u=d.useCallback(()=>{c(g=>g.map(m=>m.id===r?{...m,isActive:!m.isActive}:m)),n&&n(!a)},[r,n,a]);return e.jsx(x.Box,{direction:"row",gap:"md",style:{width:s},children:o&&e.jsx(vt.Toggle,{disabled:i,checked:a,onChange:u,label:a?"Active":"Inactive"})})},Al={InputText:Ji,InputDropdown:Yi,InputSingleFile:Dl,CheckBoxOptions:Sl,RadioOptions:kl,InputTextArea:Bl,ToggleForm:El,ActionButton:Fl,FormTitle:Ml,InputDate:Il,InputImgFile:Tl,Custom:Ol},Ro=({customBottom:t})=>{const[r,n]=d.useState(!1),s=()=>{window.scrollY>window.screenY?n(!0):n(!1)},o=()=>{window.scrollTo({top:0,behavior:"smooth"})};return d.useEffect(()=>(window.addEventListener("scroll",s),()=>{window.removeEventListener("scroll",s)}),[]),e.jsx(x.Box,{direction:"column",style:{position:"fixed",bottom:0,right:0},children:e.jsx(x.Box,{direction:"column",position:"absolute",style:{bottom:t||"1.6rem",right:"2rem",transform:r?"scale(1)":"scale(0)",transition:"transform 0.2s ease-in-out"},children:e.jsx(H.Button,{secondary:!0,size:"xs",onClick:o,type:"button",iconLeft:e.jsx(E.Icon,{width:16,size:"xs",name:"ArrowPullUp",style:{color:"var(--sa-background-brand, #04254f)"}})})})})},Ge="sa-sidepanel-item",_n="sa-sidepanel-item-styles",Wl="inset 3.5px 0 0 0 var(--sa-border-focused, #1a4fa0)",zl="inset -3.5px 0 0 0 var(--sa-border-focused, #1a4fa0)",Hl=`
|
|
58
58
|
.${Ge} {
|
|
59
59
|
display: block;
|
|
60
60
|
box-sizing: border-box;
|
package/dist/index.es.js
CHANGED
|
@@ -8668,7 +8668,7 @@ const $n = {
|
|
|
8668
8668
|
cursor: "pointer",
|
|
8669
8669
|
style: {
|
|
8670
8670
|
inset: 0,
|
|
8671
|
-
backgroundColor: "var(--sa-color-black-alpha-a30, #
|
|
8671
|
+
backgroundColor: "var(--sa-color-black-alpha-a30, #080f214c)",
|
|
8672
8672
|
opacity: g ? 1 : 0,
|
|
8673
8673
|
transition: "opacity 0.3s ease-in-out"
|
|
8674
8674
|
},
|
|
@@ -8717,7 +8717,7 @@ const $n = {
|
|
|
8717
8717
|
style: {
|
|
8718
8718
|
inset: 0,
|
|
8719
8719
|
zIndex: 20,
|
|
8720
|
-
backgroundColor: "var(--sa-color-white-alpha-a80, #
|
|
8720
|
+
backgroundColor: "var(--sa-color-white-alpha-a80, #e5e9f6cc)"
|
|
8721
8721
|
},
|
|
8722
8722
|
children: /* @__PURE__ */ e(
|
|
8723
8723
|
h,
|
package/dist/index.umd.js
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
.sa-table-layout tfoot.sa-tl-sticky-foot > tr:first-child > th {
|
|
55
55
|
box-shadow: 0 -2px 4px -2px var(--sa-border-subtle, #0b120e24);
|
|
56
56
|
}
|
|
57
|
-
`,document.head.appendChild(r)},Lr=r=>r==="right"?"right":r==="center"?"center":"left",gs=/^(#|rgb|hsl|var\()/,Xr=r=>r?gs.test(r)?r:`var(--sa-background-${r})`:void 0,ys=(r,t)=>{if(t)return r[t]},ps=(r,t)=>r==null&&t==null?0:r==null?-1:t==null?1:typeof r=="number"&&typeof t=="number"?r-t:String(r).localeCompare(String(t)),bs=({columns:r,data:t,getRowKey:o,rowBg:n,size:l="md",resizable:s=!1,layout:c="auto",widthStorageKey:i,columnState:a,onColumnStateChange:h,columnMenu:y=!1,sort:b,defaultSort:p,onSortChange:C,height:E,mobileLayout:w="cards",mobileBreakpoint:L="md",groupSeparator:F,summary:I,footer:S,stickyFooter:k=!1,emptyState:H,loading:z=!1,loadingRows:B=8,rowActions:W,selectable:O=!1,selectedKeys:Y,defaultSelectedKeys:X,onSelectionChange:q,isRowSelectable:Z})=>{us();const te=!De.useMediaQuery(L)&&w!=="scroll",_=!!(W!=null&&W.length),[V,N]=d.useState(null);d.useEffect(()=>{if(!V)return;const v=()=>N(null),x=setTimeout(()=>document.addEventListener("click",v),0);return()=>{clearTimeout(x),document.removeEventListener("click",v)}},[V]);const[se,ve]=d.useState(()=>new Set),Ee=a!==void 0,[ue,Ce]=d.useState({}),xe=a??ue,we=v=>{h==null||h(v),Ee||Ce(v)},Ae=b!==void 0,[Fe,Ne]=d.useState(p??null),$=Ae?b??null:Fe,ge=!C,We=v=>{C==null||C(v),Ae||Ne(v)},{headerGroups:Ze,leafColumns:de,hasGroups:Ge}=d.useMemo(()=>{var ae;const v=new Set(xe.hidden??[]),x=(le,pe)=>le.key??(typeof le.accessor=="string"?le.accessor:`col-${pe}`),T=r.map((le,pe)=>{var Xe;if((Xe=le.children)!=null&&Xe.length){const Wr=le.children.map((rr,zr)=>({col:rr,key:x(rr,`${pe}-${zr}`)})).filter(rr=>!v.has(rr.key));return{col:le,key:le.key??`group-${pe}`,isGroup:!0,leaves:Wr}}const be={col:le,key:x(le,`${pe}`)};return{col:le,key:be.key,isGroup:!1,leaves:v.has(be.key)?[]:[be]}}).filter(le=>le.leaves.length>0),Q=T.some(le=>le.isGroup);let oe=T.flatMap(le=>le.leaves);if(!Q&&((ae=xe.order)!=null&&ae.length)){const le=new Map(xe.order.map((pe,be)=>[pe,be]));oe=[...oe].sort((pe,be)=>(le.get(pe.key)??1/0)-(le.get(be.key)??1/0))}return{headerGroups:T,leafColumns:oe,hasGroups:Q}},[r,xe]),lr=d.useMemo(()=>new Map(de.map((v,x)=>[v.key,x])),[de]),P=!Ge&&de.some(v=>(v.col.headerColSpan??1)>1),R=de.map(v=>v.key).join("|"),J=(v,x)=>{const T=v.sortKey??(typeof v.accessor=="string"?v.accessor:void 0);return T?x[T]:void 0},he=v=>v.sortable??(!!v.sortKey||typeof v.accessor=="string"),ce=d.useMemo(()=>{if(!ge||!$)return t;const v=de.find(T=>T.key===$.key);if(!v)return t;const x=$.direction==="asc"?1:-1;return[...t].sort((T,Q)=>ps(J(v.col,T),J(v.col,Q))*x)},[t,ge,$,de]),Me=!Ge&&!P,ze=!!i&&Me,[er,Qe]=U.useColumnWidths(i??""),Le=ze?er:void 0,Je=d.useRef(null),[Se,Ue]=d.useState();d.useLayoutEffect(()=>{Ue(void 0)},[R]),d.useLayoutEffect(()=>{if(!Me||Se||!Je.current)return;const v=Je.current.querySelectorAll("th.sa-tl-leaf");Ue(Array.from(v).map(x=>x.offsetWidth))},[Se,Me]);const[nr,gr]=d.useState(),[dr,hr]=d.useState(0);d.useLayoutEffect(()=>{if(!Ge||!Je.current)return;const v=Je.current.querySelector(":scope > tr");v&&hr(v.offsetHeight)},[Ge,R]);const Sr=(v,x)=>{if((Le==null?void 0:Le[x])!=null)return Le[x];if(v.width!=null)return v.width;if((Se==null?void 0:Se[x])!=null)return Se[x]},m=(v,x)=>typeof v.width=="number"?v.width:Se==null?void 0:Se[x],G=xe.frozenKey&&!Ge&&!P?de.findIndex(v=>v.key===xe.frozenKey):-1,re=v=>v<=G,Be=O?Tr:0,Oe=v=>{const x=nr??Se;if(!x)return Be;let T=Be;for(let Q=0;Q<v;Q++)T+=x[Q]??0;return T};d.useLayoutEffect(()=>{const v=Je.current;if(!v||G<0){gr(void 0);return}let x=0;const T=()=>{x=0;const oe=v.querySelectorAll("th.sa-tl-leaf"),ae=Array.from(oe).map(le=>le.getBoundingClientRect().width);gr(le=>le&&le.length===ae.length&&le.every((pe,be)=>Math.abs(pe-ae[be])<.5)?le:ae)},Q=new ResizeObserver(()=>{x||(x=requestAnimationFrame(T))});return Q.observe(v),v.querySelectorAll("th.sa-tl-leaf").forEach(oe=>Q.observe(oe)),T(),()=>{x&&cancelAnimationFrame(x),Q.disconnect()}},[R,G,O,Se,Le]);const Ye=d.useRef(null),[He,ke]=d.useState("100vh");d.useLayoutEffect(()=>{if(E!==void 0)return;const v=()=>{if(Ye.current){const x=Ye.current.getBoundingClientRect().top;ke(`calc(100vh - ${x}px - var(--sa-floating-footer-height, 0px) + 12px)`)}};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[E]);const Ie=(v,x)=>o?o(v,x):x,_e=Y!==void 0,[Ar,_c]=d.useState(()=>new Set(X??[])),ir=d.useMemo(()=>_e?new Set(Y):Ar,[_e,Y,Ar]);d.useEffect(()=>{O&&!o&&process.env.NODE_ENV!=="production"&&console.warn("[@starasia/admin] TableLayout: `selectable` tanpa `getRowKey` — key default (index) membuat seleksi menempel ke POSISI baris, bukan datanya. Beri `getRowKey` yang stabil (mis. r => r.id).")},[O,!o]);const Tl=v=>{if(_e||_c(v),q){const x=ce.filter((T,Q)=>v.has(Ie(T,Q)));q(Array.from(v),x)}},Nt=(v,x)=>O&&(Z?Z(v,x):!0),_t=v=>{const x=new Set(ir);x.has(v)?x.delete(v):x.add(v),Tl(x)},Br=d.useMemo(()=>O?ce.map((v,x)=>({row:v,i:x,key:Ie(v,x)})).filter(({row:v,i:x})=>Z?Z(v,x):!0).map(({key:v})=>v):[],[O,ce,Z,o]),Ll=Br.filter(v=>ir.has(v)),qt=Br.length>0&&Ll.length===Br.length,Ol=Ll.length>0&&!qt,qc=()=>{const v=new Set(ir);qt?Br.forEach(x=>v.delete(x)):Br.forEach(x=>v.add(x)),Tl(v)},Zt=(v,x,T)=>v.render?v.render(x,T,ce):ys(x,v.accessor),Gt=de.length+(O?1:0)+(_?1:0),Al=["80%","55%","70%","45%","90%","60%"],Zc=(v,x)=>Al[(v*7+x*3)%Al.length],Gc=(v,x)=>e.jsx($e.Skeleton,{height:14,width:Zc(v,x),borderRadius:"rounded-sm"}),Qc=Array.from({length:B},(v,x)=>e.jsxs(U.Tr,{children:[O&&e.jsx(U.Td,{style:{width:Tr,padding:0},children:e.jsx("div",{style:{display:"flex",justifyContent:"center"},children:e.jsx($e.Skeleton,{height:14,width:14,borderRadius:"rounded-sm"})})}),de.map(({col:T,key:Q},oe)=>e.jsx(U.Td,{style:{textAlign:Lr(T.align)},children:Gc(x,oe)},`sa-tl-sk-${x}-${Q}`)),_&&e.jsx(U.Td,{style:{width:1,padding:0,border:"none"}})]},`sa-tl-sk-${x}`)),Uc=(v,x)=>{x||we({...xe,hidden:[...xe.hidden??[],v]})},Jc=v=>we({...xe,frozenKey:xe.frozenKey===v?void 0:v}),nt=v=>(W??[]).filter(x=>{var T;return!((T=x.hidden)!=null&&T.call(x,v))}),Wl={position:"absolute",right:0,top:0,bottom:0,display:"flex",alignItems:"center",gap:4,paddingRight:16,paddingLeft:40,background:"linear-gradient(to right, transparent, var(--sa-background-primary-inverse, #f8f8f8) 40px)"},st=(v,x,T,Q)=>{var Xe;const oe=(Xe=v.disabled)==null?void 0:Xe.call(v,x),ae=(Q==null?void 0:Q.showLabel)??v.showLabel,le=(Q==null?void 0:Q.size)??"xs",pe=e.jsx(j.Button,{size:le,variant:v.variant??"tertiary",tone:v.tone??"neutral",disabled:oe,onClick:()=>v.onClick(x,T),iconLeft:v.icon?e.jsx(M.Icon,{name:v.icon,size:"sm"}):void 0,children:ae&&v.label}),be=v.tooltip;return be?e.jsx(me.Tooltip,{label:be,position:"top-end",children:pe}):pe},Yc=(v,x)=>{const T=nt(v);if(!T.length)return null;if(T.length>5){const oe=Ie(v,x),ae=(V==null?void 0:V.rowKey)===oe;return e.jsx("div",{className:"sa-tl-row-actions",style:Wl,onClick:le=>le.stopPropagation(),children:e.jsx(me.Tooltip,{label:"Aksi lainnya",position:"top",children:e.jsx(j.Button,{size:"xs",variant:"tertiary",onClick:le=>{const pe=le.currentTarget.getBoundingClientRect();N(ae?null:{rowKey:oe,top:pe.bottom+4,right:window.innerWidth-pe.right})},children:e.jsx(M.Icon,{name:"MenuVertical",size:"sm"})})})})}return e.jsx("div",{className:"sa-tl-row-actions",style:Wl,children:T.map(oe=>e.jsx(d.Fragment,{children:st(oe,v,x)},oe.key))})},Xc=(v,x)=>{const T=nt(v);return T.length?e.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap",paddingTop:8,marginTop:8,borderTop:Ir},children:T.map(Q=>e.jsx(d.Fragment,{children:st(Q,v,x,{showLabel:!0,size:"sm"})},Q.key))}):null},$c=(v,x)=>{const T=nt(v);return T.length?e.jsx("div",{style:{display:"flex",gap:4,paddingRight:8,flexShrink:0},children:T.map(Q=>e.jsx(d.Fragment,{children:st(Q,v,x,{showLabel:!1})},Q.key))}):null},Qt=(v,x)=>{const{col:T,key:Q}=v,oe=lr.get(Q)??0,ae=re(oe),le=ae&&oe===G,pe=($==null?void 0:$.key)===Q?$.direction:null,be=y&&!T.disableMenu?e.jsx(gl,{active:!!pe||ae,canSort:he(T),canHide:!T.locked,sortDir:pe,frozen:ae,onSort:zr=>We({key:Q,direction:zr}),onClearSort:()=>We(null),onToggleFreeze:()=>Jc(Q),onHide:()=>Uc(Q,T.locked)}):null,Xe=T.align==="right",Wr=T.align==="right"?"flex-end":T.align==="center"?"center":"flex-start",rr=e.jsxs("span",{style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:6,justifyContent:Wr,overflow:"hidden"},children:[T.icon&&e.jsx(M.Icon,{name:T.icon,size:"sm",style:{flexShrink:0}}),e.jsx("span",{style:Yr,children:T.title})]});return e.jsx(U.Th,{className:`sa-tl-leaf${ae?" sa-tl-frozen":""}`,rowSpan:x==null?void 0:x.rowSpan,colSpan:x==null?void 0:x.colSpan,minWidth:T.minWidth,resizable:Me?T.resizable:!1,defaultWidth:m(T,oe),style:{textAlign:Lr(T.align),width:Sr(T,oe),position:"sticky",top:(x==null?void 0:x.top)??0,left:ae?Oe(oe):void 0,zIndex:ae?3:2,backgroundColor:Dr,boxShadow:le?yl:void 0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,width:"100%"},children:Xe?e.jsxs(e.Fragment,{children:[be,rr]}):e.jsxs(e.Fragment,{children:[rr,be]})})},`th-${Q}`)},Kc=()=>{const v=[];for(let x=0;x<de.length;){const T=de[x],Q=T.col.headerColSpan??1,oe=Math.max(1,Math.min(Q,de.length-x));v.push(Qt(T,oe>1?{colSpan:oe}:void 0)),x+=oe}return v},zl=v=>e.jsx(U.Th,{rowSpan:v==null?void 0:v.rowSpan,style:{width:Tr,position:"sticky",top:0,left:0,zIndex:4,backgroundColor:Dr,padding:0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},onClick:x=>x.stopPropagation(),children:e.jsx(tr.Checkbox,{size:"sm",variant:Ol?"indeterminate":"select",checked:qt||Ol,disabled:Br.length===0,onChange:qc,"aria-label":"Pilih semua baris di halaman ini"})})},"th-select"),Rc=(v,x,T)=>{const Q=Ie(v,x);return e.jsx(U.Td,{className:"sa-tl-frozen",style:{width:Tr,padding:0,position:"sticky",left:0,zIndex:2,...T?{"--sa-tl-bg":T}:{}},children:Nt(v,x)&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},onClick:oe=>oe.stopPropagation(),children:e.jsx(tr.Checkbox,{size:"sm",checked:ir.has(Q),onChange:()=>_t(Q),"aria-label":"Pilih baris"})})},`tl-select-${x}`)},Ut=de.filter(v=>!v.col.hideOnMobile),Jt=Ut.find(v=>v.col.primary)??Ut[0],ei=Ut.filter(v=>v!==Jt),ri=v=>ve(x=>{const T=new Set(x);return T.has(v)?T.delete(v):T.add(v),T}),Hl=(v,x)=>ei.map(({col:T,key:Q})=>{const oe=Zt(T,v,x),ae=typeof oe=="string"||typeof oe=="number"?e.jsx(D.Text,{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",textAlign:"right"},children:oe}):e.jsx("div",{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",textAlign:"right"},children:oe});return e.jsxs("div",{style:{display:"flex",gap:12,justifyContent:"space-between",alignItems:"baseline"},children:[typeof T.title=="string"?e.jsx(D.Text,{color:"subtle",fontWeight:"medium",style:{color:fs,flexShrink:0},children:T.title}):e.jsx("div",{style:{flexShrink:0},children:T.title}),ae]},Q)}),Yt=(v,x)=>{const T=Jt?Zt(Jt.col,v,x):null;return typeof T=="string"||typeof T=="number"?e.jsx(D.Text,{as:"span",style:Yr,children:T}):e.jsx("span",{style:Yr,children:T})},ti=e.jsx(f.Box,{style:{display:"flex",flexDirection:"column",gap:8,padding:8},children:Array.from({length:B},(v,x)=>e.jsxs(f.Box,{style:{border:Ir,borderRadius:"var(--sa-radii-sm, 6px)",padding:12,display:"flex",flexDirection:"column",gap:8},children:[e.jsx($e.Skeleton,{height:16,width:"60%",borderRadius:"rounded-sm"}),e.jsx($e.Skeleton,{height:12,width:"85%",borderRadius:"rounded-sm"}),e.jsx($e.Skeleton,{height:12,width:"70%",borderRadius:"rounded-sm"})]},`sa-tl-sk-card-${x}`))}),Pl=e.jsx(f.Box,{fullWidth:!0,style:{minHeight:(H==null?void 0:H.minHeight)??320,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:H==null?void 0:H.content}),oi=z?ti:ce.length===0?Pl:w==="expand"?e.jsx(f.Box,{style:{display:"flex",flexDirection:"column"},children:ce.map((v,x)=>{const T=Ie(v,x),Q=se.has(T),ae=O&&ir.has(T)?Wt:Xr(n==null?void 0:n(v,x));return e.jsxs("div",{style:{borderBottom:Ir,backgroundColor:ae},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[Nt(v,x)&&e.jsx("div",{style:{display:"flex",alignItems:"center",paddingLeft:12,flexShrink:0},children:e.jsx(tr.Checkbox,{size:"sm",checked:ir.has(T),onChange:()=>_t(T),"aria-label":"Pilih baris"})}),e.jsxs("button",{type:"button",onClick:()=>ri(T),style:{flex:1,minWidth:0,display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,padding:"10px 12px",background:"none",border:"none",font:"inherit",color:"inherit",cursor:"pointer",textAlign:"left"},children:[Yt(v,x),e.jsx(M.Icon,{name:Q?"ChevronUp":"ChevronDown",size:"sm",style:{flexShrink:0}})]}),_&&$c(v,x)]}),Q&&e.jsx("div",{style:{padding:"0 12px 12px",display:"flex",flexDirection:"column",gap:6},children:Hl(v,x)})]},T)})}):e.jsx(f.Box,{style:{display:"flex",flexDirection:"column",gap:8,padding:8},children:ce.map((v,x)=>{const T=Ie(v,x),Q=O&&ir.has(T);return e.jsxs(f.Box,{style:{border:Ir,borderRadius:"var(--sa-radii-sm, 6px)",padding:12,display:"flex",flexDirection:"column",gap:6,backgroundColor:Q?Wt:Xr(n==null?void 0:n(v,x))},children:[Nt(v,x)?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(tr.Checkbox,{size:"sm",checked:ir.has(T),onChange:()=>_t(T),"aria-label":"Pilih baris"}),e.jsx("div",{style:{flex:1,minWidth:0},children:Yt(v,x)})]}):Yt(v,x),Hl(v,x),_&&Xc(v,x)]},T)})}),li=s&&Me&&Se!==void 0,Vl=c==="fixed"&&!s&&(Me?Se!==void 0:!0),ni=Vl&&!Me,ct=S&&S.length>0?S.map((v,x)=>e.jsx(U.Tr,{children:v.cells.map((T,Q)=>e.jsx(U.Td,{colSpan:T.colSpan,rowSpan:T.rowSpan,style:{textAlign:Lr(T.align)},children:T.content},`tl-foot-${x}-${Q}`))},`tl-foot-${x}`)):null,si=e.jsxs(U.Table,{className:"sa-table-layout",fullWidth:!0,size:l,resizable:li,style:Vl?{tableLayout:"fixed"}:void 0,onWidthsChange:ze?Qe:void 0,children:[ni&&e.jsxs("colgroup",{children:[O&&e.jsx("col",{style:{width:Tr}}),de.map(({col:v,key:x},T)=>e.jsx("col",{style:{width:Sr(v,T)}},`col-${x}`)),_&&e.jsx("col",{style:{width:1}})]}),e.jsx(U.Thead,{ref:Je,children:Ge?e.jsxs(e.Fragment,{children:[e.jsxs(U.Tr,{children:[O&&zl({rowSpan:2}),Ze.map(v=>v.isGroup?e.jsx(U.Th,{colSpan:v.leaves.length,style:{textAlign:"center",position:"sticky",top:0,zIndex:2,backgroundColor:Dr},children:e.jsx("span",{style:Yr,children:v.col.title})},`grp-${v.key}`):Qt(v.leaves[0],{rowSpan:2})),_&&e.jsx(U.Th,{rowSpan:2,style:{position:"sticky",top:0,right:0,zIndex:3,width:1,padding:0,border:"none",backgroundColor:Dr}})]}),e.jsx(U.Tr,{children:Ze.flatMap(v=>v.isGroup?v.leaves.map(x=>Qt(x,{top:dr})):[])})]}):e.jsxs(U.Tr,{children:[O&&zl(),Kc(),_&&e.jsx(U.Th,{style:{position:"sticky",top:0,right:0,zIndex:3,width:1,padding:0,border:"none",backgroundColor:Dr}})]})}),e.jsx(U.Tbody,{children:z?Qc:ce.length===0?e.jsx(U.Tr,{children:e.jsx(U.Td,{colSpan:Gt,children:Pl})}):e.jsxs(e.Fragment,{children:[ce.map((v,x)=>{const T=F==null?void 0:F(v,x,x>0?ce[x-1]:void 0),oe=O&&ir.has(Ie(v,x))?Wt:Xr(n==null?void 0:n(v,x));return e.jsxs(d.Fragment,{children:[T!=null&&T!==!1&&e.jsx(U.Tr,{children:e.jsx(U.Td,{colSpan:Gt,style:{backgroundColor:Dr},children:T})}),e.jsxs(U.Tr,{children:[O&&Rc(v,x,oe),de.map(({col:ae,key:le},pe)=>{var Nl;const be=(Nl=ae.cellProps)==null?void 0:Nl.call(ae,v,x,ce);if(be!=null&&be.hidden)return null;const Xe=re(pe),Wr=Xe&&pe===G,rr=Zt(ae,v,x),zr=typeof ae.bg=="function"?ae.bg(v,x,ce):ae.bg,jl=Xr(zr)??oe;return e.jsx(U.Td,{className:Xe?"sa-tl-frozen":void 0,colSpan:be==null?void 0:be.colSpan,rowSpan:be==null?void 0:be.rowSpan,style:{textAlign:Lr(ae.align),width:Sr(ae,pe),minWidth:ae.minWidth,position:Xe?"sticky":void 0,left:Xe?Oe(pe):void 0,zIndex:Xe?1:void 0,boxShadow:Wr?yl:void 0,...jl?{"--sa-tl-bg":jl}:{}},children:typeof rr=="string"?e.jsx(D.Text,{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:Lr(ae.align)},children:rr}):rr},`tl-cell-${x}-${le}`)}),_&&e.jsx(U.Td,{style:{position:"sticky",right:0,width:1,padding:0,overflow:"visible",zIndex:2,border:"none"},children:Yc(v,x)})]})]},Ie(v,x))}),I!=null&&e.jsx(U.Tr,{children:e.jsx(U.Td,{colSpan:Gt,children:I})})]})}),ct&&e.jsx(U.Tfoot,{className:k?"sa-tl-sticky-foot":void 0,children:ct})]}),Xt=V?ce.findIndex((v,x)=>Ie(v,x)===V.rowKey):-1,$t=Xt>=0?ce[Xt]:null;return e.jsxs(e.Fragment,{children:[e.jsx(f.Box,{ref:Ye,fullWidth:!0,style:{overflow:"auto",height:E??He},children:te?e.jsxs(e.Fragment,{children:[oi,ct&&!z&&ce.length>0&&e.jsx(f.Box,{style:{borderTop:Ir},children:e.jsx(U.Table,{fullWidth:!0,size:l,className:"sa-table-layout",children:e.jsx(U.Tbody,{children:ct})})})]}):si}),V&&$t&&e.jsx("div",{className:"sa-tl-kebab-menu",style:{top:V.top,right:V.right},onClick:v=>v.stopPropagation(),children:nt($t).map(v=>e.jsx("div",{style:{padding:"2px 4px"},children:st(v,$t,Xt,{showLabel:!0,size:"sm"})},v.key))})]})},zt=r=>r==="asc"||r==="desc",vs=(r={})=>{const{sortKeyParam:t="sortBy",sortOrderParam:o="sortOrder",pageKey:n="page",defaultSort:l=null,paramKeys:s,scopeId:c,storage:i=mt}=r,{searchParams:a,setSearchParams:h,searchQueries:y}=je(),b=a.toString(),p=c?wr.tableSort(c):void 0,C=d.useRef(!1);d.useEffect(()=>{if(C.current||(C.current=!0,!p)||a.has(t)||a.has(o))return;const S=i.get(p);!(S!=null&&S.key)||!zt(S.direction)||h({...Object.fromEntries(a.entries()),[t]:S.key,[o]:S.direction},{replace:!0})},[]);const E=d.useMemo(()=>{const S=a.get(t),k=a.get(o);return S&&zt(k)?{key:S,direction:k}:l},[b,t,o,l]);d.useEffect(()=>{if(!p)return;const S=a.get(t),k=a.get(o);S&&zt(k)?i.set(p,{key:S,direction:k}):i.remove(p)},[b,p,t,o,i]);const w=(s==null?void 0:s.sortBy)??"sortBy",L=(s==null?void 0:s.sortOrder)??"sortOrder",F=d.useMemo(()=>E?{[w]:E.key,[L]:E.direction}:{},[E,w,L]),I=d.useCallback(S=>{const k={...y};S?(k[t]=S.key,k[o]=S.direction):(delete k[t],delete k[o]),delete k[n],h(k)},[y,t,o,n,h]);return{sort:E,setSort:I,params:F}},$r=({of:r,render:t})=>d.Children.toArray(r==null?void 0:r.map((o,n,l)=>t(o,n,l))),fe=({condition:r,fallback:t,children:o,loading:n,isLoading:l})=>e.jsx(e.Fragment,{children:l?n:r?o:t}),ye=r=>e.jsx(D.Text,{...r,fontSize:r.fontSize||"md",fontWeight:r.fontWeight||"medium",color:r.color||"gray-700",children:r.children}),cr=r=>e.jsx(D.Text,{color:"red-600",fontSize:"sm",children:r.message}),Cs=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var i,a,h;const s=l.hideMessageError||!1,c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...l.containerProps,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=l.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=l.tooltip)==null?void 0:a.label,arrowPosition:(h=l.tooltip)==null?void 0:h.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),e.jsxs(f.Box,{direction:"column",gap:"xs",fullWidth:l.inputProps.fullWidth||!1,children:[e.jsx(ar.Input,{ref:l.inputRef,size:r,...l.inputProps,status:l.errorMessage?"error":"default",fullWidth:!0}),!s&&l.errorMessage&&e.jsx(cr,{message:l.errorMessage}),l.inputProps.extended&&l.inputProps.extended]})]})},xs=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var i,a,h;const s=l.hideMessageError||!1,c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",onClick:l.onClickContainer,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=l.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=l.tooltip)==null?void 0:a.label,arrowPosition:(h=l.tooltip)==null?void 0:h.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),e.jsxs(f.Box,{direction:"column",gap:"xs",fullWidth:l.inputProps.fullWidth||!1,children:[e.jsx(f.Box,{direction:"column",style:{width:l.inputProps.fullWidth?"100%":t==="horizontal"&&l.customWidth?l.customWidth:t==="horizontal"?"343px":""},children:e.jsx(br.Dropdown,{size:r,...l.inputProps,error:!!l.errorMessage})}),!s&&l.errorMessage&&e.jsx(cr,{message:l.errorMessage}),l.inputProps.extended&&l.inputProps.extended]})]})},ws=(r,t)=>typeof r=="string"&&r||t==="error"?"var(--sa-border-danger)":"var(--sa-border-subtle)",Ds=r=>{var i;const[t,o]=d.useState(!1),n=a=>{a.preventDefault(),a.stopPropagation()},l=a=>{a.preventDefault(),a.stopPropagation(),a.dataTransfer&&r.handleOnFileChange(a.dataTransfer.files.item(0))},s=a=>{a.preventDefault(),o(!0)},c=a=>{a.preventDefault(),o(!1)};return e.jsxs(f.Box,{width:"width-full",paddingInline:"md",direction:"row",gap:"sm",align:"center",onClick:r.handleOnClick,onDragOver:n,onDrop:l,onDragEnter:s,onDragLeave:c,paddingBlock:"md",borderRadius:"rounded-md",style:{border:t?"1px solid var(--sa-border-info)":`1px solid ${ws(r.errorMessage,r.status)}`},children:[e.jsx(M.Icon,{name:"Upload",size:"lg",style:{width:30,height:30}}),e.jsxs(ie.Flex,{direction:"column",gap:"xs",children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",children:[e.jsx(D.Text,{fontWeight:"medium",color:"gray-500",style:{textWrap:"nowrap"},fontSize:r.isDesktop?"md":"sm",children:"Click your upload"}),e.jsx(D.Text,{fontWeight:"medium",style:{textWrap:"nowrap"},fontSize:r.isDesktop?"md":"sm",children:"or Drag & Drop"})]}),e.jsx(D.Text,{fontSize:"sm",color:"gray-500",children:(i=r.fileSupports)==null?void 0:i.map(a=>a.toLocaleUpperCase()).join(", ")})]})]})};function Ss(r){return r.split(" ").map(t=>t[0]).join("").slice(0,2).toUpperCase()}const bl=r=>{const t={day:"2-digit",month:"short",year:"numeric"};return r.toLocaleDateString("id-ID",t)},Bs=r=>{const t={Jan:0,Feb:1,Mar:2,Apr:3,Mei:4,Jun:5,Jul:6,Agu:7,Sep:8,Okt:9,Nov:10,Des:11},o=r.split(" ");if(o.length!==3)return null;const n=parseInt(o[0],10),l=t[o[1]],s=parseInt(o[2],10);return isNaN(n)||isNaN(l)||isNaN(s)?null:new Date(s,l,n)};function ks(r,t=!0){if(!r)return"Rp 0";const o=typeof r=="number"?r.toString():r;if(isNaN(Number(o)))return"Rp 0";const n=o.split("."),l=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,"."),s=n.length===2?l+"."+n[1]:l;return t?"Rp"+s:s}String.prototype.toTitleCase=function(){return this.toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")},String.prototype.toNumber=function(){return Number(this)};const Es=r=>{const t=r.split(" ");let o=t[0].charAt(0);return t.length>1&&(o+=""+t[1].charAt(0)),o.toUpperCase()};function ms(r){const t=typeof r=="string"?new Date(r):r;if(isNaN(t.getTime()))throw new Error("Invalid date format");const o=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),l=String(t.getDate()).padStart(2,"0");return`${o}-${n}-${l}`}const Fs="sa-admin",Re=r=>`var(--${Fs}-${r})`,Ms={base:{borderColor:Re("base-border-color"),textColor:Re("base-text-color"),iconColor:Re("base-icon-color"),placeholderColor:Re("base-placeholder-color")},document:{bgColor:Re("document-bg-color")},sidebar:{bgColor:Re("sidebar-bg-color"),borderColor:Re("sidebar-border-color"),maxWidth:Re("sidebar-max-width"),width:Re("sidebar-width"),collapseWidth:Re("sidebar-collapse-width"),collapseV2Width:Re("sidebar-v2-collapse-width")}},Is=24*60*60*1e3,Ts=r=>{const t="14px poppins",n=document.createElement("canvas").getContext("2d");n.font=t;const l=n.measureText(r).width;return Number(Math.ceil(l))},Ls=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Os=/--+/,As=/-$/;function Ws(r,t){return JSON.stringify(r)!==JSON.stringify(t)}function zs(r){return/^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(r)}function Hs(r){return/^[A-Za-z\s]+$/.test(r)}const Ps=r=>{const t=/^[0-9]$/,o=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&(r.key==="a"||r.key==="c"||r.key==="v")||!t.test(r.key)&&!o.includes(r.key)&&r.preventDefault()},Vs=r=>{const t=/^[0-9]$/,o=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&r.key==="v"||t.test(r.key)&&!o.includes(r.key)&&r.preventDefault()},js=r=>{const t=/^[0-9.]$/,o=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&r.key==="v"||!t.test(r.key)&&!o.includes(r.key)&&r.preventDefault()},Ns=r=>Ls.test(r);function _s(r){return!(Os.test(r)||As.test(r))}const qs=r=>{const t=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab","Home","End"];if((r.ctrlKey||r.metaKey)&&["a","c","v","x"].includes(r.key.toLowerCase()))return;const o=r.currentTarget.value;/^[0-9]$/.test(r.key)||r.key==="."&&!o.includes(".")||r.key==="-"&&o.length===0&&!o.includes("-")||t.includes(r.key)||r.preventDefault()},Zs=r=>{const t=document.getElementById(r);if(t){const o=t.getBoundingClientRect(),n=window.scrollY+o.top-80;window.scrollTo({top:n,behavior:"smooth"})}};function Gs(r){const t=r.toLowerCase();if(["kb","mb","gb"].find(s=>t.endsWith(s)))return r;const l=Number(r);if(isNaN(l))throw new Error("Invalid size format");return l>=1e6?`${(l/1e6).toFixed(2)}MB`:l>=1e3?`${(l/1e3).toFixed(2)}KB`:`${l}B`}function Qs(r){const t=r.split("/");return t[t.length-1]}const Us=r=>{var t,o;return e.jsxs(f.Box,{width:"width-full",paddingInline:"md",height:"height-full",direction:"row",justify:"space-between",align:"center",onClick:r.handleOnClickFile,fullHeight:!0,paddingBlock:"md",id:"file-item",borderRadius:"rounded-md",style:{border:"1px solid var(--sa-border-subtle)",cursor:"pointer"},children:[e.jsxs(ie.Flex,{direction:"row",align:"center",gap:"sm",style:{flex:1,minWidth:0},children:[e.jsx(M.Icon,{name:"DocumentFilled",size:"lg",style:{color:"var(--sa-icon-brand)",width:30,height:30,flexShrink:0}}),e.jsxs(ie.Flex,{direction:"column",style:{minWidth:0,flex:1},children:[e.jsx(D.Text,{fontWeight:"bold",style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:r.defaultFile?Qs(r.defaultFile.url):(t=r.fileSelected)==null?void 0:t.name}),r.defaultFile?(r.defaultFile.size||r.defaultFile.date)&&e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[r.defaultFile.size&&e.jsx(D.Text,{fontSize:"sm",fontWeight:"medium",children:r.defaultFile.size}),r.defaultFile.size&&r.defaultFile.date&&e.jsx(M.Icon,{name:"Dot",size:"xs"}),r.defaultFile.date&&e.jsx(D.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:r.defaultFile.date})]}):e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(D.Text,{fontSize:"sm",fontWeight:"medium",children:Gs(((o=r.fileSelected)==null?void 0:o.size.toString())||"100000")}),e.jsx(M.Icon,{name:"Dot",size:"xs"}),e.jsx(D.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:bl(new Date)})]})]})]}),e.jsx(j.Button,{size:"xs",variant:"tertiary",tone:"error",type:"button",onClick:n=>{n.stopPropagation(),r.handleOnDeleteFile()},iconLeft:e.jsx(M.Icon,{name:"Trash1"})})]})},vl=({status:r="default",labelPosition:t="outside-top",...o})=>{var p;const n=d.useRef(null),l=()=>{if(o.defaultFile){window.open(o.defaultFile.url);return}n.current&&n.current.click()},s=De.useMediaQuery("md"),c=r==="error"||typeof o.errorMessage=="string"&&!!o.errorMessage,i=o.label?e.jsxs(ie.Flex,{direction:"row",align:"center",gap:"xs",children:[e.jsx(D.Text,{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-primary)"},children:o.label}),o.optional&&e.jsx("span",{style:{background:"var(--sa-background-neutral)",border:"1px solid var(--sa-border-subtle)",borderRadius:"4px",padding:"0 8px",fontSize:"10px",fontWeight:500,lineHeight:"18px",color:"var(--sa-text-primary)",display:"inline-flex",alignItems:"center"},children:"Optional"}),o.required&&e.jsx("span",{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-error)"},children:"*"})]}):null,a=o.description?e.jsx(D.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:o.description}):null,h=e.jsxs(e.Fragment,{children:[o.helperText&&e.jsx(D.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:o.helperText}),o.errorText&&r==="error"&&e.jsx(D.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:o.errorText}),o.errorMessage&&!o.errorText&&e.jsx(D.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:o.errorMessage})]}),y=e.jsx("input",{type:"file",style:{display:"none"},ref:n,onChange:C=>{var E;return o.handleOnChangeFile(((E=C.target.files)==null?void 0:E.item(0))||null)},accept:(p=o.fileSupportOption)==null?void 0:p.map(C=>"."+(C==null?void 0:C.toLowerCase())).join(", ")}),b=e.jsxs(f.Box,{direction:"column",fullWidth:!0,style:{minHeight:"69px"},borderRadius:"rounded-md",display:"flex",justify:"center",align:"center",cursor:"pointer",gap:"md",...o.containerProps,children:[y,(o.fileSelected||o.defaultFile)&&e.jsx(Us,{fileSelected:o.fileSelected,defaultFile:o.defaultFile,handleOnDeleteFile:o.handleOnDeleteFile,handleOnClickFile:l}),!o.fileSelected&&!o.defaultFile&&e.jsx(Ds,{fileSupports:o.fileSupportOption,isDesktop:s,errorMessage:c?o.errorText||o.errorMessage||" ":void 0,status:c?"error":"default",handleOnClick:l,handleOnFileChange:o.handleOnChangeFile})]});return t==="outside-left"?e.jsxs(ie.Flex,{direction:"row",align:"flex-start",gap:"sm",style:{width:"100%"},children:[e.jsxs(ie.Flex,{direction:"column",gap:"xs",style:{width:"40%",minWidth:"120px",paddingTop:"10px"},children:[i,a]}),e.jsxs(ie.Flex,{direction:"column",gap:"sm",style:{flex:1,minWidth:0},children:[b,h]})]}):e.jsxs(ie.Flex,{direction:"column",gap:"sm",style:{width:"100%"},children:[i,a,b,h]})},Js=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var i,a,h;const s=l.hideMessageError||!1,c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...l.containerProps,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=l.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=l.tooltip)==null?void 0:a.label,arrowPosition:(h=l.tooltip)==null?void 0:h.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),e.jsxs(ie.Flex,{direction:"column",gap:"xs",children:[e.jsx(vl,{...l.inputProps,status:l.errorMessage?"error":"default"}),!s&&l.errorMessage&&e.jsx(cr,{message:l.errorMessage})]})]})},Ys=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,required:l=!1,...s})=>{var a,h,y,b;const c=s.hideMessageError||!1,i=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"||t==="horizontal-inline"?"spacing-96":"sm",direction:t==="horizontal"||t==="horizontal-inline"?"row":"column",...s.containerProps,children:[s.title&&e.jsx(fe,{condition:!!l,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:i,fullWidth:n,children:[e.jsx(ye,{children:s.title}),e.jsx(Ke.Body3,{props:{color:"gray-500"},children:s.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:i,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:s.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((a=s.tooltip)!=null&&a.label),children:e.jsx(me.Tooltip,{label:(h=s.tooltip)==null?void 0:h.label,arrowPosition:(y=s.tooltip)==null?void 0:y.arrowPosition,...s.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!s.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:s.description})})]})}),e.jsx(f.Box,{gap:t==="horizontal-inline"?"xl":"md",direction:t==="horizontal-inline"?"row":"column",align:"flex-start",children:e.jsx($r,{of:(b=s.checkBoxesList)==null?void 0:b.map(p=>({...p,isChecked:s.checkBoxesAreChecked.includes(p.id)})),render:p=>p.renderBadge?e.jsxs(f.Box,{direction:"row",justify:"space-between",gap:"lg",...s.badgeContainerProps,children:[e.jsx(tr.Checkbox,{name:p.name,value:p.id,checked:p.isChecked,onChange:C=>s.onChecked(C.target.value,p),label:p.name,description:p.description}),p.renderBadge]}):e.jsx(tr.Checkbox,{name:p.name,value:p.id,checked:p.isChecked,onChange:C=>s.onChecked(C.target.value,p),label:p.name,description:p.description})})}),!c&&s.errorMessage&&e.jsx(cr,{message:s.errorMessage})]})},Xs=({position:r="vertical",size:t="md",fullWidth:o=!1,...n})=>{var s;const l=r==="horizontal-inline"||r==="horizontal-block"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:r==="horizontal-inline"||r==="horizontal-block"?"spacing-96":"sm",direction:r==="horizontal-inline"||r==="horizontal-block"?"row":"column",children:[e.jsx(fe,{condition:!!n.description||!!n.title,children:e.jsxs(f.Box,{direction:"column",customMaxWidth:l,fullWidth:o,children:[n.title&&e.jsx(ye,{children:n.title}),e.jsx(fe,{condition:!!n.description,children:e.jsx(D.Text,{color:"gray-500",children:n.description})})]})}),e.jsx(f.Box,{gap:"sm",direction:r==="horizontal"||r==="horizontal-inline"?"row":"column",align:"flex-start",flexWrap:"wrap",children:e.jsx($r,{of:(s=n.radioList)==null?void 0:s.map(c=>({...c,isChecked:n.radioIsChecked===c.id})),render:({value:c,id:i,isChecked:a,subInput:h,label:y,description:b})=>e.jsxs(f.Box,{direction:"column",gap:"xs",customMaxWidth:l,children:[e.jsx(dt.Radio,{id:`${i.toString()}-${c}`,name:n.groupName||y,label:y,value:c,checked:a,onChange:p=>n.onChecked({id:i,label:p.target.name,value:p.target.value}),disabled:n.disableAll},i),b&&e.jsx(D.Text,{color:"gray-500",style:{marginLeft:28},children:b}),h]})})}),n.errorMessage&&e.jsx(cr,{message:n.errorMessage})]})},$s=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var i,a,h;const s=l.hideMessageError||!1,c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...l.containerProps,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=l.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=l.tooltip)==null?void 0:a.label,arrowPosition:(h=l.tooltip)==null?void 0:h.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),e.jsxs(ie.Flex,{direction:"column",gap:"xs",children:[e.jsx(at.Textarea,{ref:l.inputRef,size:r,...l.inputProps,status:l.errorMessage?"error":"default"}),!s&&l.errorMessage&&e.jsx(cr,{message:l.errorMessage})]})]})},Ks=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",required:n=!1,fullWidth:l=!1,...s})=>{var i,a,h;const c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...s.containerProps,children:[s.title&&e.jsx(fe,{condition:n,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:l,children:[e.jsx(ye,{children:s.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:s.titleDescription})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:l,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:s.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=s.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=s.tooltip)==null?void 0:a.label,arrowPosition:(h=s.tooltip)==null?void 0:h.arrowPosition,...s.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!s.titleDescription,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:s.titleDescription})})]})}),e.jsx(xr.Toggle,{checked:s.checked,onChange:s.onChange,label:s.label,description:s.description}),s.errorMessage&&e.jsx(cr,{message:s.errorMessage})]})},Rs=({variant:r="primary",size:t="md",...o})=>{const n=Cr.useColor(),l=c=>{var a,h,y,b,p,C;if(!c)return;const i=o.disabled?"var(--sa-text-disable, #181a198f)":r==="secondary"?"var(--sa-text-subtle, #8c8f97)":r==="secondary-danger"?(h=(a=n==null?void 0:n.computed)==null?void 0:a.red)==null?void 0:h[600]:r==="secondary-primary"?(b=(y=n==null?void 0:n.computed)==null?void 0:y.blue)==null?void 0:b[700]:(C=(p=n==null?void 0:n.computed)==null?void 0:p.gray)==null?void 0:C[50];return e.jsx(M.Icon,{name:c,size:t,style:{color:i}})},s=()=>{var i,a,h,y;if(r!=="secondary-danger"&&r!=="secondary-primary")return o.title;const c={color:o.disabled?"var(--sa-text-disable, #181a198f)":r==="secondary-danger"?(a=(i=n==null?void 0:n.computed)==null?void 0:i.red)==null?void 0:a[600]:(y=(h=n==null?void 0:n.computed)==null?void 0:h.blue)==null?void 0:y[700]};switch(t){case"xs":return e.jsx(Ke.Body2,{props:{style:c},children:o.title});case"sm":case"md":return e.jsx(Ke.SubH3,{props:{style:c},children:o.title});case"lg":return e.jsx(Ke.SubH2,{props:{style:c},children:o.title});default:return o.title}};return e.jsx(j.Button,{fullWidth:!0,disabled:o.disabled,primary:r==="primary",secondary:r==="secondary"||r==="secondary-danger"||r==="secondary-primary",success:r==="success",onClick:o.onClick,type:o.type,iconLeft:l(o.iconLeft),iconRight:l(o.iconRight),size:t,children:s()})},ec=r=>e.jsx(Ke.H5,{props:{...r},children:r.title}),rc=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var i,a,h;const s=l.hideMessageError||!1,c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",onClick:l.onClickContainer,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=l.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=l.tooltip)==null?void 0:a.label,arrowPosition:(h=l.tooltip)==null?void 0:h.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),e.jsxs(ie.Flex,{direction:"column",gap:"xs",children:[e.jsx(f.Box,{direction:"column",style:{width:t==="horizontal"&&l.customWidth?l.customWidth:t==="horizontal"?"343px":""},children:e.jsx(fr.StarasiaDate,{size:r,...l.inputProps,status:l.errorMessage?"error":void 0})}),!s&&l.errorMessage&&e.jsx(cr,{message:l.errorMessage})]})]})};async function tc(r,t){const o=new Image;o.src=r,await new Promise((s,c)=>{o.onload=s,o.onerror=c});const n=document.createElement("canvas");n.width=t.width,n.height=t.height;const l=n.getContext("2d",{alpha:!0});if(!l)throw new Error("No 2D context");return l.drawImage(o,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise((s,c)=>{n.toBlob(i=>{if(!i)return c("Canvas is empty");const a=new File([i],"cropped.png",{type:"image/png"});s(a)},"image/png")})}const Cl={"1:1":1,"4:3":4/3,"16:9":16/9,"3:4":3/4,"9:16":9/16,"2:3":2/3,"3:2":3/2,"32:9":32/9},xl=d.forwardRef(({handleUpload:r,urlImage:t,isUploading:o,croppedImage:n,setCroppedImage:l,size:s="96",aspect:c="1:1",containerProps:i,maxFileSize:a=2,onError:h},y)=>{const b=De.useMediaQuery("md"),[p,C]=d.useState(!1),[E,w]=d.useState(null),[L,F]=d.useState(!1),[I,S]=d.useState({x:0,y:0}),[k,H]=d.useState(1),[z,B]=d.useState(null);d.useEffect(()=>{t===null&&l(null)},[t]);const W=d.useCallback((V,N)=>{B(N)},[]),O=V=>{var ve;const N=(ve=V.target.files)==null?void 0:ve[0];if(!N)return;const se=new FileReader;se.onload=()=>{w(se.result),F(!0)},se.readAsDataURL(N)},Y=async()=>{if(!(!E||!z))try{const V=await tc(E,z);if(a&&V.size>a*1024*1024){h==null||h(`Ukuran file maksimal ${a}MB`);return}r==null||r(V);const N=URL.createObjectURL(V);l(N,V),F(!1)}catch{h==null||h("Gagal memproses gambar")}},X=d.useRef(null),q=()=>{X.current&&X.current.click()};d.useImperativeHandle(y,()=>({openFileDialog:()=>{var V;(V=X.current)==null||V.click()}}));const Z=parseInt(s,10),K=Cl[c];let te,_;return K>=1?(_=Z,te=Z*K):(te=Z,_=Z/K),e.jsxs(f.Box,{direction:"column",display:"flex",position:"relative",bg:(i==null?void 0:i.bg)||"gray-200",borderStyle:(i==null?void 0:i.borderStyle)||"border-none",borderColor:(i==null?void 0:i.borderColor)||"gray-200",borderWidth:(i==null?void 0:i.borderWidth)||"border-2",borderRadius:(i==null?void 0:i.borderRadius)||"rounded-md",overflow:"overflow-hidden",align:"center",justify:"center",style:{width:i!=null&&i.fullWidth?"100%":`${te}px`,height:i!=null&&i.fullWidth?"auto":`${_}px`,aspectRatio:K,flexShrink:0},onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),children:[n||t?e.jsx("img",{src:n||t||void 0,alt:"Profile",style:{objectFit:"cover",width:"100%",height:"100%"}}):e.jsx(f.Box,{display:"flex",direction:"column",align:"center",justify:"center",padding:"spacing-4",children:e.jsx(M.Icon,{name:"Image",style:{color:"var(--sa-text-subtle, #8c8f97)",width:Number(s)/2<40?Number(s)/2:40,height:Number(s)/2<40?Number(s)/2:40}})}),e.jsxs(f.Box,{direction:"column",position:"absolute",display:"flex",align:"center",justify:"center",cursor:"pointer",style:{inset:0,backgroundColor:"var(--sa-color-black-alpha-a30, #080f214a)",opacity:p?1:0,transition:"opacity 0.3s ease-in-out"},onClick:q,children:[e.jsx("input",{ref:X,type:"file",accept:"image/*",onChange:O,disabled:o,style:{display:"none"}}),e.jsxs(f.Box,{display:"flex",align:"center",gap:"spacing-2",direction:"row",children:[e.jsx(M.Icon,{name:"Edit3",style:{color:"var(--sa-background-primary, #ffffff)"}}),e.jsx(fe,{condition:s.toNumber()>80,children:e.jsx(D.Text,{color:"gray-50",fontSize:s.toNumber()>80?"sm":"md",fontWeight:"medium",children:"Edit Image"})})]})]}),o&&e.jsx(f.Box,{direction:"column",position:"absolute",display:"flex",align:"center",justify:"center",style:{inset:0,zIndex:20,backgroundColor:"var(--sa-color-white-alpha-a80, #e5e9f640)"},children:e.jsx(f.Box,{direction:"column",borderRadius:"rounded-full",style:{animation:"spin 1s linear infinite",border:"2px solid transparent",height:"2rem",width:"2rem"},borderColor:"info-600"})}),L&&Vr.createPortal(e.jsx("div",{style:{position:"fixed",inset:0,zIndex:19999,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.6)"},onClick:()=>F(!1),children:e.jsxs("div",{style:{backgroundColor:"var(--sa-background-primary)",borderRadius:"var(--sa-radii-md)",boxShadow:"0 20px 60px rgba(0,0,0,0.3)",overflow:"hidden",width:b?c==="1:1"?"min(90vw, 480px)":`min(90vw, ${te*2}px)`:"calc(100vw - 2rem)",display:"flex",flexDirection:"column"},onClick:V=>V.stopPropagation(),children:[e.jsx("div",{style:{position:"relative",width:"100%",height:"20rem",backgroundColor:"var(--sa-color-gray-100)"},children:E&&e.jsx(_l,{image:E,crop:I,zoom:k,aspect:c?Cl[c]:void 0,onCropChange:S,onZoomChange:H,onCropComplete:W,objectFit:"contain",minZoom:.5,restrictPosition:!1})}),e.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",padding:"0.75rem 1rem",borderTop:"1px solid var(--sa-border-subtle)"},children:[e.jsx(j.Button,{size:"sm",secondary:!0,onClick:()=>F(!1),children:"Cancel"}),e.jsx(j.Button,{size:"sm",primary:!0,onClick:Y,children:"Crop"})]})]})}),document.body)]})}),oc=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,required:l=!1,...s})=>{var a,h,y;const c=s.hideMessageError||!1,i=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...s.containerProps,children:[s.title&&e.jsx(fe,{condition:!!l,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:i,fullWidth:n,children:[e.jsx(ye,{children:s.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:s.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:i,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:s.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((a=s.tooltip)!=null&&a.label),children:e.jsx(me.Tooltip,{label:(h=s.tooltip)==null?void 0:h.label,arrowPosition:(y=s.tooltip)==null?void 0:y.arrowPosition,...s.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!s.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:s.description})})]})}),e.jsxs(ie.Flex,{direction:"column",gap:"xs",children:[e.jsx(xl,{...s.inputProps}),!c&&s.errorMessage&&e.jsx(cr,{message:s.errorMessage})]})]})},lc=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var c,i,a;const s=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...l.containerProps,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:s,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:s,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((c=l.tooltip)!=null&&c.label),children:e.jsx(me.Tooltip,{label:(i=l.tooltip)==null?void 0:i.label,arrowPosition:(a=l.tooltip)==null?void 0:a.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),l.inputProps.extended&&l.inputProps.extended]})},nc=({items:r,id:t,handleOnUpdate:o,width:n,toggleShow:l=!0,disabled:s=!1})=>{var y;const[c,i]=d.useState([]);d.useEffect(()=>{r&&i([...r.map(b=>({id:b.id,isActive:b.isActive}))])},[r]);const a=(y=c.find(b=>b.id===t))==null?void 0:y.isActive,h=d.useCallback(()=>{i(b=>b.map(p=>p.id===t?{...p,isActive:!p.isActive}:p)),o&&o(!a)},[t,o,a]);return e.jsx(f.Box,{direction:"row",gap:"md",style:{width:n},children:l&&e.jsx(xr.Toggle,{disabled:s,checked:a,onChange:h,label:a?"Active":"Inactive"})})},sc={InputText:Cs,InputDropdown:xs,InputSingleFile:Js,CheckBoxOptions:Ys,RadioOptions:Xs,InputTextArea:$s,ToggleForm:Ks,ActionButton:Rs,FormTitle:ec,InputDate:rc,InputImgFile:oc,Custom:lc},wl=({customBottom:r})=>{const[t,o]=d.useState(!1),n=()=>{window.scrollY>window.screenY?o(!0):o(!1)},l=()=>{window.scrollTo({top:0,behavior:"smooth"})};return d.useEffect(()=>(window.addEventListener("scroll",n),()=>{window.removeEventListener("scroll",n)}),[]),e.jsx(f.Box,{direction:"column",style:{position:"fixed",bottom:0,right:0},children:e.jsx(f.Box,{direction:"column",position:"absolute",style:{bottom:r||"1.6rem",right:"2rem",transform:t?"scale(1)":"scale(0)",transition:"transform 0.2s ease-in-out"},children:e.jsx(j.Button,{secondary:!0,size:"xs",onClick:l,type:"button",iconLeft:e.jsx(M.Icon,{width:16,size:"xs",name:"ArrowPullUp",style:{color:"var(--sa-background-brand, #04254f)"}})})})})},qe="sa-sidepanel-item",Dl="sa-sidepanel-item-styles",cc=`
|
|
57
|
+
`,document.head.appendChild(r)},Lr=r=>r==="right"?"right":r==="center"?"center":"left",gs=/^(#|rgb|hsl|var\()/,Xr=r=>r?gs.test(r)?r:`var(--sa-background-${r})`:void 0,ys=(r,t)=>{if(t)return r[t]},ps=(r,t)=>r==null&&t==null?0:r==null?-1:t==null?1:typeof r=="number"&&typeof t=="number"?r-t:String(r).localeCompare(String(t)),bs=({columns:r,data:t,getRowKey:o,rowBg:n,size:l="md",resizable:s=!1,layout:c="auto",widthStorageKey:i,columnState:a,onColumnStateChange:h,columnMenu:y=!1,sort:b,defaultSort:p,onSortChange:C,height:E,mobileLayout:w="cards",mobileBreakpoint:L="md",groupSeparator:F,summary:I,footer:S,stickyFooter:k=!1,emptyState:H,loading:z=!1,loadingRows:B=8,rowActions:W,selectable:O=!1,selectedKeys:Y,defaultSelectedKeys:X,onSelectionChange:q,isRowSelectable:Z})=>{us();const te=!De.useMediaQuery(L)&&w!=="scroll",_=!!(W!=null&&W.length),[V,N]=d.useState(null);d.useEffect(()=>{if(!V)return;const v=()=>N(null),x=setTimeout(()=>document.addEventListener("click",v),0);return()=>{clearTimeout(x),document.removeEventListener("click",v)}},[V]);const[se,ve]=d.useState(()=>new Set),Ee=a!==void 0,[ue,Ce]=d.useState({}),xe=a??ue,we=v=>{h==null||h(v),Ee||Ce(v)},Ae=b!==void 0,[Fe,Ne]=d.useState(p??null),$=Ae?b??null:Fe,ge=!C,We=v=>{C==null||C(v),Ae||Ne(v)},{headerGroups:Ze,leafColumns:de,hasGroups:Ge}=d.useMemo(()=>{var ae;const v=new Set(xe.hidden??[]),x=(le,pe)=>le.key??(typeof le.accessor=="string"?le.accessor:`col-${pe}`),T=r.map((le,pe)=>{var Xe;if((Xe=le.children)!=null&&Xe.length){const Wr=le.children.map((rr,zr)=>({col:rr,key:x(rr,`${pe}-${zr}`)})).filter(rr=>!v.has(rr.key));return{col:le,key:le.key??`group-${pe}`,isGroup:!0,leaves:Wr}}const be={col:le,key:x(le,`${pe}`)};return{col:le,key:be.key,isGroup:!1,leaves:v.has(be.key)?[]:[be]}}).filter(le=>le.leaves.length>0),Q=T.some(le=>le.isGroup);let oe=T.flatMap(le=>le.leaves);if(!Q&&((ae=xe.order)!=null&&ae.length)){const le=new Map(xe.order.map((pe,be)=>[pe,be]));oe=[...oe].sort((pe,be)=>(le.get(pe.key)??1/0)-(le.get(be.key)??1/0))}return{headerGroups:T,leafColumns:oe,hasGroups:Q}},[r,xe]),lr=d.useMemo(()=>new Map(de.map((v,x)=>[v.key,x])),[de]),P=!Ge&&de.some(v=>(v.col.headerColSpan??1)>1),R=de.map(v=>v.key).join("|"),J=(v,x)=>{const T=v.sortKey??(typeof v.accessor=="string"?v.accessor:void 0);return T?x[T]:void 0},he=v=>v.sortable??(!!v.sortKey||typeof v.accessor=="string"),ce=d.useMemo(()=>{if(!ge||!$)return t;const v=de.find(T=>T.key===$.key);if(!v)return t;const x=$.direction==="asc"?1:-1;return[...t].sort((T,Q)=>ps(J(v.col,T),J(v.col,Q))*x)},[t,ge,$,de]),Me=!Ge&&!P,ze=!!i&&Me,[er,Qe]=U.useColumnWidths(i??""),Le=ze?er:void 0,Je=d.useRef(null),[Se,Ue]=d.useState();d.useLayoutEffect(()=>{Ue(void 0)},[R]),d.useLayoutEffect(()=>{if(!Me||Se||!Je.current)return;const v=Je.current.querySelectorAll("th.sa-tl-leaf");Ue(Array.from(v).map(x=>x.offsetWidth))},[Se,Me]);const[nr,gr]=d.useState(),[dr,hr]=d.useState(0);d.useLayoutEffect(()=>{if(!Ge||!Je.current)return;const v=Je.current.querySelector(":scope > tr");v&&hr(v.offsetHeight)},[Ge,R]);const Sr=(v,x)=>{if((Le==null?void 0:Le[x])!=null)return Le[x];if(v.width!=null)return v.width;if((Se==null?void 0:Se[x])!=null)return Se[x]},m=(v,x)=>typeof v.width=="number"?v.width:Se==null?void 0:Se[x],G=xe.frozenKey&&!Ge&&!P?de.findIndex(v=>v.key===xe.frozenKey):-1,re=v=>v<=G,Be=O?Tr:0,Oe=v=>{const x=nr??Se;if(!x)return Be;let T=Be;for(let Q=0;Q<v;Q++)T+=x[Q]??0;return T};d.useLayoutEffect(()=>{const v=Je.current;if(!v||G<0){gr(void 0);return}let x=0;const T=()=>{x=0;const oe=v.querySelectorAll("th.sa-tl-leaf"),ae=Array.from(oe).map(le=>le.getBoundingClientRect().width);gr(le=>le&&le.length===ae.length&&le.every((pe,be)=>Math.abs(pe-ae[be])<.5)?le:ae)},Q=new ResizeObserver(()=>{x||(x=requestAnimationFrame(T))});return Q.observe(v),v.querySelectorAll("th.sa-tl-leaf").forEach(oe=>Q.observe(oe)),T(),()=>{x&&cancelAnimationFrame(x),Q.disconnect()}},[R,G,O,Se,Le]);const Ye=d.useRef(null),[He,ke]=d.useState("100vh");d.useLayoutEffect(()=>{if(E!==void 0)return;const v=()=>{if(Ye.current){const x=Ye.current.getBoundingClientRect().top;ke(`calc(100vh - ${x}px - var(--sa-floating-footer-height, 0px) + 12px)`)}};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[E]);const Ie=(v,x)=>o?o(v,x):x,_e=Y!==void 0,[Ar,_c]=d.useState(()=>new Set(X??[])),ir=d.useMemo(()=>_e?new Set(Y):Ar,[_e,Y,Ar]);d.useEffect(()=>{O&&!o&&process.env.NODE_ENV!=="production"&&console.warn("[@starasia/admin] TableLayout: `selectable` tanpa `getRowKey` — key default (index) membuat seleksi menempel ke POSISI baris, bukan datanya. Beri `getRowKey` yang stabil (mis. r => r.id).")},[O,!o]);const Tl=v=>{if(_e||_c(v),q){const x=ce.filter((T,Q)=>v.has(Ie(T,Q)));q(Array.from(v),x)}},Nt=(v,x)=>O&&(Z?Z(v,x):!0),_t=v=>{const x=new Set(ir);x.has(v)?x.delete(v):x.add(v),Tl(x)},Br=d.useMemo(()=>O?ce.map((v,x)=>({row:v,i:x,key:Ie(v,x)})).filter(({row:v,i:x})=>Z?Z(v,x):!0).map(({key:v})=>v):[],[O,ce,Z,o]),Ll=Br.filter(v=>ir.has(v)),qt=Br.length>0&&Ll.length===Br.length,Ol=Ll.length>0&&!qt,qc=()=>{const v=new Set(ir);qt?Br.forEach(x=>v.delete(x)):Br.forEach(x=>v.add(x)),Tl(v)},Zt=(v,x,T)=>v.render?v.render(x,T,ce):ys(x,v.accessor),Gt=de.length+(O?1:0)+(_?1:0),Al=["80%","55%","70%","45%","90%","60%"],Zc=(v,x)=>Al[(v*7+x*3)%Al.length],Gc=(v,x)=>e.jsx($e.Skeleton,{height:14,width:Zc(v,x),borderRadius:"rounded-sm"}),Qc=Array.from({length:B},(v,x)=>e.jsxs(U.Tr,{children:[O&&e.jsx(U.Td,{style:{width:Tr,padding:0},children:e.jsx("div",{style:{display:"flex",justifyContent:"center"},children:e.jsx($e.Skeleton,{height:14,width:14,borderRadius:"rounded-sm"})})}),de.map(({col:T,key:Q},oe)=>e.jsx(U.Td,{style:{textAlign:Lr(T.align)},children:Gc(x,oe)},`sa-tl-sk-${x}-${Q}`)),_&&e.jsx(U.Td,{style:{width:1,padding:0,border:"none"}})]},`sa-tl-sk-${x}`)),Uc=(v,x)=>{x||we({...xe,hidden:[...xe.hidden??[],v]})},Jc=v=>we({...xe,frozenKey:xe.frozenKey===v?void 0:v}),nt=v=>(W??[]).filter(x=>{var T;return!((T=x.hidden)!=null&&T.call(x,v))}),Wl={position:"absolute",right:0,top:0,bottom:0,display:"flex",alignItems:"center",gap:4,paddingRight:16,paddingLeft:40,background:"linear-gradient(to right, transparent, var(--sa-background-primary-inverse, #f8f8f8) 40px)"},st=(v,x,T,Q)=>{var Xe;const oe=(Xe=v.disabled)==null?void 0:Xe.call(v,x),ae=(Q==null?void 0:Q.showLabel)??v.showLabel,le=(Q==null?void 0:Q.size)??"xs",pe=e.jsx(j.Button,{size:le,variant:v.variant??"tertiary",tone:v.tone??"neutral",disabled:oe,onClick:()=>v.onClick(x,T),iconLeft:v.icon?e.jsx(M.Icon,{name:v.icon,size:"sm"}):void 0,children:ae&&v.label}),be=v.tooltip;return be?e.jsx(me.Tooltip,{label:be,position:"top-end",children:pe}):pe},Yc=(v,x)=>{const T=nt(v);if(!T.length)return null;if(T.length>5){const oe=Ie(v,x),ae=(V==null?void 0:V.rowKey)===oe;return e.jsx("div",{className:"sa-tl-row-actions",style:Wl,onClick:le=>le.stopPropagation(),children:e.jsx(me.Tooltip,{label:"Aksi lainnya",position:"top",children:e.jsx(j.Button,{size:"xs",variant:"tertiary",onClick:le=>{const pe=le.currentTarget.getBoundingClientRect();N(ae?null:{rowKey:oe,top:pe.bottom+4,right:window.innerWidth-pe.right})},children:e.jsx(M.Icon,{name:"MenuVertical",size:"sm"})})})})}return e.jsx("div",{className:"sa-tl-row-actions",style:Wl,children:T.map(oe=>e.jsx(d.Fragment,{children:st(oe,v,x)},oe.key))})},Xc=(v,x)=>{const T=nt(v);return T.length?e.jsx("div",{style:{display:"flex",gap:6,flexWrap:"wrap",paddingTop:8,marginTop:8,borderTop:Ir},children:T.map(Q=>e.jsx(d.Fragment,{children:st(Q,v,x,{showLabel:!0,size:"sm"})},Q.key))}):null},$c=(v,x)=>{const T=nt(v);return T.length?e.jsx("div",{style:{display:"flex",gap:4,paddingRight:8,flexShrink:0},children:T.map(Q=>e.jsx(d.Fragment,{children:st(Q,v,x,{showLabel:!1})},Q.key))}):null},Qt=(v,x)=>{const{col:T,key:Q}=v,oe=lr.get(Q)??0,ae=re(oe),le=ae&&oe===G,pe=($==null?void 0:$.key)===Q?$.direction:null,be=y&&!T.disableMenu?e.jsx(gl,{active:!!pe||ae,canSort:he(T),canHide:!T.locked,sortDir:pe,frozen:ae,onSort:zr=>We({key:Q,direction:zr}),onClearSort:()=>We(null),onToggleFreeze:()=>Jc(Q),onHide:()=>Uc(Q,T.locked)}):null,Xe=T.align==="right",Wr=T.align==="right"?"flex-end":T.align==="center"?"center":"flex-start",rr=e.jsxs("span",{style:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:6,justifyContent:Wr,overflow:"hidden"},children:[T.icon&&e.jsx(M.Icon,{name:T.icon,size:"sm",style:{flexShrink:0}}),e.jsx("span",{style:Yr,children:T.title})]});return e.jsx(U.Th,{className:`sa-tl-leaf${ae?" sa-tl-frozen":""}`,rowSpan:x==null?void 0:x.rowSpan,colSpan:x==null?void 0:x.colSpan,minWidth:T.minWidth,resizable:Me?T.resizable:!1,defaultWidth:m(T,oe),style:{textAlign:Lr(T.align),width:Sr(T,oe),position:"sticky",top:(x==null?void 0:x.top)??0,left:ae?Oe(oe):void 0,zIndex:ae?3:2,backgroundColor:Dr,boxShadow:le?yl:void 0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,width:"100%"},children:Xe?e.jsxs(e.Fragment,{children:[be,rr]}):e.jsxs(e.Fragment,{children:[rr,be]})})},`th-${Q}`)},Kc=()=>{const v=[];for(let x=0;x<de.length;){const T=de[x],Q=T.col.headerColSpan??1,oe=Math.max(1,Math.min(Q,de.length-x));v.push(Qt(T,oe>1?{colSpan:oe}:void 0)),x+=oe}return v},zl=v=>e.jsx(U.Th,{rowSpan:v==null?void 0:v.rowSpan,style:{width:Tr,position:"sticky",top:0,left:0,zIndex:4,backgroundColor:Dr,padding:0},children:e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},onClick:x=>x.stopPropagation(),children:e.jsx(tr.Checkbox,{size:"sm",variant:Ol?"indeterminate":"select",checked:qt||Ol,disabled:Br.length===0,onChange:qc,"aria-label":"Pilih semua baris di halaman ini"})})},"th-select"),Rc=(v,x,T)=>{const Q=Ie(v,x);return e.jsx(U.Td,{className:"sa-tl-frozen",style:{width:Tr,padding:0,position:"sticky",left:0,zIndex:2,...T?{"--sa-tl-bg":T}:{}},children:Nt(v,x)&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},onClick:oe=>oe.stopPropagation(),children:e.jsx(tr.Checkbox,{size:"sm",checked:ir.has(Q),onChange:()=>_t(Q),"aria-label":"Pilih baris"})})},`tl-select-${x}`)},Ut=de.filter(v=>!v.col.hideOnMobile),Jt=Ut.find(v=>v.col.primary)??Ut[0],ei=Ut.filter(v=>v!==Jt),ri=v=>ve(x=>{const T=new Set(x);return T.has(v)?T.delete(v):T.add(v),T}),Hl=(v,x)=>ei.map(({col:T,key:Q})=>{const oe=Zt(T,v,x),ae=typeof oe=="string"||typeof oe=="number"?e.jsx(D.Text,{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",textAlign:"right"},children:oe}):e.jsx("div",{style:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis",textAlign:"right"},children:oe});return e.jsxs("div",{style:{display:"flex",gap:12,justifyContent:"space-between",alignItems:"baseline"},children:[typeof T.title=="string"?e.jsx(D.Text,{color:"subtle",fontWeight:"medium",style:{color:fs,flexShrink:0},children:T.title}):e.jsx("div",{style:{flexShrink:0},children:T.title}),ae]},Q)}),Yt=(v,x)=>{const T=Jt?Zt(Jt.col,v,x):null;return typeof T=="string"||typeof T=="number"?e.jsx(D.Text,{as:"span",style:Yr,children:T}):e.jsx("span",{style:Yr,children:T})},ti=e.jsx(f.Box,{style:{display:"flex",flexDirection:"column",gap:8,padding:8},children:Array.from({length:B},(v,x)=>e.jsxs(f.Box,{style:{border:Ir,borderRadius:"var(--sa-radii-sm, 6px)",padding:12,display:"flex",flexDirection:"column",gap:8},children:[e.jsx($e.Skeleton,{height:16,width:"60%",borderRadius:"rounded-sm"}),e.jsx($e.Skeleton,{height:12,width:"85%",borderRadius:"rounded-sm"}),e.jsx($e.Skeleton,{height:12,width:"70%",borderRadius:"rounded-sm"})]},`sa-tl-sk-card-${x}`))}),Pl=e.jsx(f.Box,{fullWidth:!0,style:{minHeight:(H==null?void 0:H.minHeight)??320,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:H==null?void 0:H.content}),oi=z?ti:ce.length===0?Pl:w==="expand"?e.jsx(f.Box,{style:{display:"flex",flexDirection:"column"},children:ce.map((v,x)=>{const T=Ie(v,x),Q=se.has(T),ae=O&&ir.has(T)?Wt:Xr(n==null?void 0:n(v,x));return e.jsxs("div",{style:{borderBottom:Ir,backgroundColor:ae},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[Nt(v,x)&&e.jsx("div",{style:{display:"flex",alignItems:"center",paddingLeft:12,flexShrink:0},children:e.jsx(tr.Checkbox,{size:"sm",checked:ir.has(T),onChange:()=>_t(T),"aria-label":"Pilih baris"})}),e.jsxs("button",{type:"button",onClick:()=>ri(T),style:{flex:1,minWidth:0,display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,padding:"10px 12px",background:"none",border:"none",font:"inherit",color:"inherit",cursor:"pointer",textAlign:"left"},children:[Yt(v,x),e.jsx(M.Icon,{name:Q?"ChevronUp":"ChevronDown",size:"sm",style:{flexShrink:0}})]}),_&&$c(v,x)]}),Q&&e.jsx("div",{style:{padding:"0 12px 12px",display:"flex",flexDirection:"column",gap:6},children:Hl(v,x)})]},T)})}):e.jsx(f.Box,{style:{display:"flex",flexDirection:"column",gap:8,padding:8},children:ce.map((v,x)=>{const T=Ie(v,x),Q=O&&ir.has(T);return e.jsxs(f.Box,{style:{border:Ir,borderRadius:"var(--sa-radii-sm, 6px)",padding:12,display:"flex",flexDirection:"column",gap:6,backgroundColor:Q?Wt:Xr(n==null?void 0:n(v,x))},children:[Nt(v,x)?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(tr.Checkbox,{size:"sm",checked:ir.has(T),onChange:()=>_t(T),"aria-label":"Pilih baris"}),e.jsx("div",{style:{flex:1,minWidth:0},children:Yt(v,x)})]}):Yt(v,x),Hl(v,x),_&&Xc(v,x)]},T)})}),li=s&&Me&&Se!==void 0,Vl=c==="fixed"&&!s&&(Me?Se!==void 0:!0),ni=Vl&&!Me,ct=S&&S.length>0?S.map((v,x)=>e.jsx(U.Tr,{children:v.cells.map((T,Q)=>e.jsx(U.Td,{colSpan:T.colSpan,rowSpan:T.rowSpan,style:{textAlign:Lr(T.align)},children:T.content},`tl-foot-${x}-${Q}`))},`tl-foot-${x}`)):null,si=e.jsxs(U.Table,{className:"sa-table-layout",fullWidth:!0,size:l,resizable:li,style:Vl?{tableLayout:"fixed"}:void 0,onWidthsChange:ze?Qe:void 0,children:[ni&&e.jsxs("colgroup",{children:[O&&e.jsx("col",{style:{width:Tr}}),de.map(({col:v,key:x},T)=>e.jsx("col",{style:{width:Sr(v,T)}},`col-${x}`)),_&&e.jsx("col",{style:{width:1}})]}),e.jsx(U.Thead,{ref:Je,children:Ge?e.jsxs(e.Fragment,{children:[e.jsxs(U.Tr,{children:[O&&zl({rowSpan:2}),Ze.map(v=>v.isGroup?e.jsx(U.Th,{colSpan:v.leaves.length,style:{textAlign:"center",position:"sticky",top:0,zIndex:2,backgroundColor:Dr},children:e.jsx("span",{style:Yr,children:v.col.title})},`grp-${v.key}`):Qt(v.leaves[0],{rowSpan:2})),_&&e.jsx(U.Th,{rowSpan:2,style:{position:"sticky",top:0,right:0,zIndex:3,width:1,padding:0,border:"none",backgroundColor:Dr}})]}),e.jsx(U.Tr,{children:Ze.flatMap(v=>v.isGroup?v.leaves.map(x=>Qt(x,{top:dr})):[])})]}):e.jsxs(U.Tr,{children:[O&&zl(),Kc(),_&&e.jsx(U.Th,{style:{position:"sticky",top:0,right:0,zIndex:3,width:1,padding:0,border:"none",backgroundColor:Dr}})]})}),e.jsx(U.Tbody,{children:z?Qc:ce.length===0?e.jsx(U.Tr,{children:e.jsx(U.Td,{colSpan:Gt,children:Pl})}):e.jsxs(e.Fragment,{children:[ce.map((v,x)=>{const T=F==null?void 0:F(v,x,x>0?ce[x-1]:void 0),oe=O&&ir.has(Ie(v,x))?Wt:Xr(n==null?void 0:n(v,x));return e.jsxs(d.Fragment,{children:[T!=null&&T!==!1&&e.jsx(U.Tr,{children:e.jsx(U.Td,{colSpan:Gt,style:{backgroundColor:Dr},children:T})}),e.jsxs(U.Tr,{children:[O&&Rc(v,x,oe),de.map(({col:ae,key:le},pe)=>{var Nl;const be=(Nl=ae.cellProps)==null?void 0:Nl.call(ae,v,x,ce);if(be!=null&&be.hidden)return null;const Xe=re(pe),Wr=Xe&&pe===G,rr=Zt(ae,v,x),zr=typeof ae.bg=="function"?ae.bg(v,x,ce):ae.bg,jl=Xr(zr)??oe;return e.jsx(U.Td,{className:Xe?"sa-tl-frozen":void 0,colSpan:be==null?void 0:be.colSpan,rowSpan:be==null?void 0:be.rowSpan,style:{textAlign:Lr(ae.align),width:Sr(ae,pe),minWidth:ae.minWidth,position:Xe?"sticky":void 0,left:Xe?Oe(pe):void 0,zIndex:Xe?1:void 0,boxShadow:Wr?yl:void 0,...jl?{"--sa-tl-bg":jl}:{}},children:typeof rr=="string"?e.jsx(D.Text,{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:Lr(ae.align)},children:rr}):rr},`tl-cell-${x}-${le}`)}),_&&e.jsx(U.Td,{style:{position:"sticky",right:0,width:1,padding:0,overflow:"visible",zIndex:2,border:"none"},children:Yc(v,x)})]})]},Ie(v,x))}),I!=null&&e.jsx(U.Tr,{children:e.jsx(U.Td,{colSpan:Gt,children:I})})]})}),ct&&e.jsx(U.Tfoot,{className:k?"sa-tl-sticky-foot":void 0,children:ct})]}),Xt=V?ce.findIndex((v,x)=>Ie(v,x)===V.rowKey):-1,$t=Xt>=0?ce[Xt]:null;return e.jsxs(e.Fragment,{children:[e.jsx(f.Box,{ref:Ye,fullWidth:!0,style:{overflow:"auto",height:E??He},children:te?e.jsxs(e.Fragment,{children:[oi,ct&&!z&&ce.length>0&&e.jsx(f.Box,{style:{borderTop:Ir},children:e.jsx(U.Table,{fullWidth:!0,size:l,className:"sa-table-layout",children:e.jsx(U.Tbody,{children:ct})})})]}):si}),V&&$t&&e.jsx("div",{className:"sa-tl-kebab-menu",style:{top:V.top,right:V.right},onClick:v=>v.stopPropagation(),children:nt($t).map(v=>e.jsx("div",{style:{padding:"2px 4px"},children:st(v,$t,Xt,{showLabel:!0,size:"sm"})},v.key))})]})},zt=r=>r==="asc"||r==="desc",vs=(r={})=>{const{sortKeyParam:t="sortBy",sortOrderParam:o="sortOrder",pageKey:n="page",defaultSort:l=null,paramKeys:s,scopeId:c,storage:i=mt}=r,{searchParams:a,setSearchParams:h,searchQueries:y}=je(),b=a.toString(),p=c?wr.tableSort(c):void 0,C=d.useRef(!1);d.useEffect(()=>{if(C.current||(C.current=!0,!p)||a.has(t)||a.has(o))return;const S=i.get(p);!(S!=null&&S.key)||!zt(S.direction)||h({...Object.fromEntries(a.entries()),[t]:S.key,[o]:S.direction},{replace:!0})},[]);const E=d.useMemo(()=>{const S=a.get(t),k=a.get(o);return S&&zt(k)?{key:S,direction:k}:l},[b,t,o,l]);d.useEffect(()=>{if(!p)return;const S=a.get(t),k=a.get(o);S&&zt(k)?i.set(p,{key:S,direction:k}):i.remove(p)},[b,p,t,o,i]);const w=(s==null?void 0:s.sortBy)??"sortBy",L=(s==null?void 0:s.sortOrder)??"sortOrder",F=d.useMemo(()=>E?{[w]:E.key,[L]:E.direction}:{},[E,w,L]),I=d.useCallback(S=>{const k={...y};S?(k[t]=S.key,k[o]=S.direction):(delete k[t],delete k[o]),delete k[n],h(k)},[y,t,o,n,h]);return{sort:E,setSort:I,params:F}},$r=({of:r,render:t})=>d.Children.toArray(r==null?void 0:r.map((o,n,l)=>t(o,n,l))),fe=({condition:r,fallback:t,children:o,loading:n,isLoading:l})=>e.jsx(e.Fragment,{children:l?n:r?o:t}),ye=r=>e.jsx(D.Text,{...r,fontSize:r.fontSize||"md",fontWeight:r.fontWeight||"medium",color:r.color||"gray-700",children:r.children}),cr=r=>e.jsx(D.Text,{color:"red-600",fontSize:"sm",children:r.message}),Cs=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var i,a,h;const s=l.hideMessageError||!1,c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...l.containerProps,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=l.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=l.tooltip)==null?void 0:a.label,arrowPosition:(h=l.tooltip)==null?void 0:h.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),e.jsxs(f.Box,{direction:"column",gap:"xs",fullWidth:l.inputProps.fullWidth||!1,children:[e.jsx(ar.Input,{ref:l.inputRef,size:r,...l.inputProps,status:l.errorMessage?"error":"default",fullWidth:!0}),!s&&l.errorMessage&&e.jsx(cr,{message:l.errorMessage}),l.inputProps.extended&&l.inputProps.extended]})]})},xs=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var i,a,h;const s=l.hideMessageError||!1,c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",onClick:l.onClickContainer,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=l.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=l.tooltip)==null?void 0:a.label,arrowPosition:(h=l.tooltip)==null?void 0:h.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),e.jsxs(f.Box,{direction:"column",gap:"xs",fullWidth:l.inputProps.fullWidth||!1,children:[e.jsx(f.Box,{direction:"column",style:{width:l.inputProps.fullWidth?"100%":t==="horizontal"&&l.customWidth?l.customWidth:t==="horizontal"?"343px":""},children:e.jsx(br.Dropdown,{size:r,...l.inputProps,error:!!l.errorMessage})}),!s&&l.errorMessage&&e.jsx(cr,{message:l.errorMessage}),l.inputProps.extended&&l.inputProps.extended]})]})},ws=(r,t)=>typeof r=="string"&&r||t==="error"?"var(--sa-border-danger)":"var(--sa-border-subtle)",Ds=r=>{var i;const[t,o]=d.useState(!1),n=a=>{a.preventDefault(),a.stopPropagation()},l=a=>{a.preventDefault(),a.stopPropagation(),a.dataTransfer&&r.handleOnFileChange(a.dataTransfer.files.item(0))},s=a=>{a.preventDefault(),o(!0)},c=a=>{a.preventDefault(),o(!1)};return e.jsxs(f.Box,{width:"width-full",paddingInline:"md",direction:"row",gap:"sm",align:"center",onClick:r.handleOnClick,onDragOver:n,onDrop:l,onDragEnter:s,onDragLeave:c,paddingBlock:"md",borderRadius:"rounded-md",style:{border:t?"1px solid var(--sa-border-info)":`1px solid ${ws(r.errorMessage,r.status)}`},children:[e.jsx(M.Icon,{name:"Upload",size:"lg",style:{width:30,height:30}}),e.jsxs(ie.Flex,{direction:"column",gap:"xs",children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",children:[e.jsx(D.Text,{fontWeight:"medium",color:"gray-500",style:{textWrap:"nowrap"},fontSize:r.isDesktop?"md":"sm",children:"Click your upload"}),e.jsx(D.Text,{fontWeight:"medium",style:{textWrap:"nowrap"},fontSize:r.isDesktop?"md":"sm",children:"or Drag & Drop"})]}),e.jsx(D.Text,{fontSize:"sm",color:"gray-500",children:(i=r.fileSupports)==null?void 0:i.map(a=>a.toLocaleUpperCase()).join(", ")})]})]})};function Ss(r){return r.split(" ").map(t=>t[0]).join("").slice(0,2).toUpperCase()}const bl=r=>{const t={day:"2-digit",month:"short",year:"numeric"};return r.toLocaleDateString("id-ID",t)},Bs=r=>{const t={Jan:0,Feb:1,Mar:2,Apr:3,Mei:4,Jun:5,Jul:6,Agu:7,Sep:8,Okt:9,Nov:10,Des:11},o=r.split(" ");if(o.length!==3)return null;const n=parseInt(o[0],10),l=t[o[1]],s=parseInt(o[2],10);return isNaN(n)||isNaN(l)||isNaN(s)?null:new Date(s,l,n)};function ks(r,t=!0){if(!r)return"Rp 0";const o=typeof r=="number"?r.toString():r;if(isNaN(Number(o)))return"Rp 0";const n=o.split("."),l=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,"."),s=n.length===2?l+"."+n[1]:l;return t?"Rp"+s:s}String.prototype.toTitleCase=function(){return this.toLowerCase().split(" ").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" ")},String.prototype.toNumber=function(){return Number(this)};const Es=r=>{const t=r.split(" ");let o=t[0].charAt(0);return t.length>1&&(o+=""+t[1].charAt(0)),o.toUpperCase()};function ms(r){const t=typeof r=="string"?new Date(r):r;if(isNaN(t.getTime()))throw new Error("Invalid date format");const o=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),l=String(t.getDate()).padStart(2,"0");return`${o}-${n}-${l}`}const Fs="sa-admin",Re=r=>`var(--${Fs}-${r})`,Ms={base:{borderColor:Re("base-border-color"),textColor:Re("base-text-color"),iconColor:Re("base-icon-color"),placeholderColor:Re("base-placeholder-color")},document:{bgColor:Re("document-bg-color")},sidebar:{bgColor:Re("sidebar-bg-color"),borderColor:Re("sidebar-border-color"),maxWidth:Re("sidebar-max-width"),width:Re("sidebar-width"),collapseWidth:Re("sidebar-collapse-width"),collapseV2Width:Re("sidebar-v2-collapse-width")}},Is=24*60*60*1e3,Ts=r=>{const t="14px poppins",n=document.createElement("canvas").getContext("2d");n.font=t;const l=n.measureText(r).width;return Number(Math.ceil(l))},Ls=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,Os=/--+/,As=/-$/;function Ws(r,t){return JSON.stringify(r)!==JSON.stringify(t)}function zs(r){return/^(?:\+62|62|0)8[1-9][0-9]{7,10}$/.test(r)}function Hs(r){return/^[A-Za-z\s]+$/.test(r)}const Ps=r=>{const t=/^[0-9]$/,o=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&(r.key==="a"||r.key==="c"||r.key==="v")||!t.test(r.key)&&!o.includes(r.key)&&r.preventDefault()},Vs=r=>{const t=/^[0-9]$/,o=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&r.key==="v"||t.test(r.key)&&!o.includes(r.key)&&r.preventDefault()},js=r=>{const t=/^[0-9.]$/,o=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab"];(r.ctrlKey||r.metaKey)&&r.key==="v"||!t.test(r.key)&&!o.includes(r.key)&&r.preventDefault()},Ns=r=>Ls.test(r);function _s(r){return!(Os.test(r)||As.test(r))}const qs=r=>{const t=["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Backspace","Delete","Enter","Tab","Home","End"];if((r.ctrlKey||r.metaKey)&&["a","c","v","x"].includes(r.key.toLowerCase()))return;const o=r.currentTarget.value;/^[0-9]$/.test(r.key)||r.key==="."&&!o.includes(".")||r.key==="-"&&o.length===0&&!o.includes("-")||t.includes(r.key)||r.preventDefault()},Zs=r=>{const t=document.getElementById(r);if(t){const o=t.getBoundingClientRect(),n=window.scrollY+o.top-80;window.scrollTo({top:n,behavior:"smooth"})}};function Gs(r){const t=r.toLowerCase();if(["kb","mb","gb"].find(s=>t.endsWith(s)))return r;const l=Number(r);if(isNaN(l))throw new Error("Invalid size format");return l>=1e6?`${(l/1e6).toFixed(2)}MB`:l>=1e3?`${(l/1e3).toFixed(2)}KB`:`${l}B`}function Qs(r){const t=r.split("/");return t[t.length-1]}const Us=r=>{var t,o;return e.jsxs(f.Box,{width:"width-full",paddingInline:"md",height:"height-full",direction:"row",justify:"space-between",align:"center",onClick:r.handleOnClickFile,fullHeight:!0,paddingBlock:"md",id:"file-item",borderRadius:"rounded-md",style:{border:"1px solid var(--sa-border-subtle)",cursor:"pointer"},children:[e.jsxs(ie.Flex,{direction:"row",align:"center",gap:"sm",style:{flex:1,minWidth:0},children:[e.jsx(M.Icon,{name:"DocumentFilled",size:"lg",style:{color:"var(--sa-icon-brand)",width:30,height:30,flexShrink:0}}),e.jsxs(ie.Flex,{direction:"column",style:{minWidth:0,flex:1},children:[e.jsx(D.Text,{fontWeight:"bold",style:{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:r.defaultFile?Qs(r.defaultFile.url):(t=r.fileSelected)==null?void 0:t.name}),r.defaultFile?(r.defaultFile.size||r.defaultFile.date)&&e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[r.defaultFile.size&&e.jsx(D.Text,{fontSize:"sm",fontWeight:"medium",children:r.defaultFile.size}),r.defaultFile.size&&r.defaultFile.date&&e.jsx(M.Icon,{name:"Dot",size:"xs"}),r.defaultFile.date&&e.jsx(D.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:r.defaultFile.date})]}):e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(D.Text,{fontSize:"sm",fontWeight:"medium",children:Gs(((o=r.fileSelected)==null?void 0:o.size.toString())||"100000")}),e.jsx(M.Icon,{name:"Dot",size:"xs"}),e.jsx(D.Text,{fontSize:"sm",fontWeight:"medium",style:{textWrap:"nowrap"},children:bl(new Date)})]})]})]}),e.jsx(j.Button,{size:"xs",variant:"tertiary",tone:"error",type:"button",onClick:n=>{n.stopPropagation(),r.handleOnDeleteFile()},iconLeft:e.jsx(M.Icon,{name:"Trash1"})})]})},vl=({status:r="default",labelPosition:t="outside-top",...o})=>{var p;const n=d.useRef(null),l=()=>{if(o.defaultFile){window.open(o.defaultFile.url);return}n.current&&n.current.click()},s=De.useMediaQuery("md"),c=r==="error"||typeof o.errorMessage=="string"&&!!o.errorMessage,i=o.label?e.jsxs(ie.Flex,{direction:"row",align:"center",gap:"xs",children:[e.jsx(D.Text,{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-primary)"},children:o.label}),o.optional&&e.jsx("span",{style:{background:"var(--sa-background-neutral)",border:"1px solid var(--sa-border-subtle)",borderRadius:"4px",padding:"0 8px",fontSize:"10px",fontWeight:500,lineHeight:"18px",color:"var(--sa-text-primary)",display:"inline-flex",alignItems:"center"},children:"Optional"}),o.required&&e.jsx("span",{style:{fontSize:"14px",fontWeight:500,color:"var(--sa-text-error)"},children:"*"})]}):null,a=o.description?e.jsx(D.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:o.description}):null,h=e.jsxs(e.Fragment,{children:[o.helperText&&e.jsx(D.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-subtlest, #6b6e76)",lineHeight:"18px"},children:o.helperText}),o.errorText&&r==="error"&&e.jsx(D.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:o.errorText}),o.errorMessage&&!o.errorText&&e.jsx(D.Text,{style:{fontSize:"12px",fontWeight:400,color:"var(--sa-text-error, #a4133c)",lineHeight:"18px"},children:o.errorMessage})]}),y=e.jsx("input",{type:"file",style:{display:"none"},ref:n,onChange:C=>{var E;return o.handleOnChangeFile(((E=C.target.files)==null?void 0:E.item(0))||null)},accept:(p=o.fileSupportOption)==null?void 0:p.map(C=>"."+(C==null?void 0:C.toLowerCase())).join(", ")}),b=e.jsxs(f.Box,{direction:"column",fullWidth:!0,style:{minHeight:"69px"},borderRadius:"rounded-md",display:"flex",justify:"center",align:"center",cursor:"pointer",gap:"md",...o.containerProps,children:[y,(o.fileSelected||o.defaultFile)&&e.jsx(Us,{fileSelected:o.fileSelected,defaultFile:o.defaultFile,handleOnDeleteFile:o.handleOnDeleteFile,handleOnClickFile:l}),!o.fileSelected&&!o.defaultFile&&e.jsx(Ds,{fileSupports:o.fileSupportOption,isDesktop:s,errorMessage:c?o.errorText||o.errorMessage||" ":void 0,status:c?"error":"default",handleOnClick:l,handleOnFileChange:o.handleOnChangeFile})]});return t==="outside-left"?e.jsxs(ie.Flex,{direction:"row",align:"flex-start",gap:"sm",style:{width:"100%"},children:[e.jsxs(ie.Flex,{direction:"column",gap:"xs",style:{width:"40%",minWidth:"120px",paddingTop:"10px"},children:[i,a]}),e.jsxs(ie.Flex,{direction:"column",gap:"sm",style:{flex:1,minWidth:0},children:[b,h]})]}):e.jsxs(ie.Flex,{direction:"column",gap:"sm",style:{width:"100%"},children:[i,a,b,h]})},Js=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var i,a,h;const s=l.hideMessageError||!1,c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...l.containerProps,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=l.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=l.tooltip)==null?void 0:a.label,arrowPosition:(h=l.tooltip)==null?void 0:h.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),e.jsxs(ie.Flex,{direction:"column",gap:"xs",children:[e.jsx(vl,{...l.inputProps,status:l.errorMessage?"error":"default"}),!s&&l.errorMessage&&e.jsx(cr,{message:l.errorMessage})]})]})},Ys=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,required:l=!1,...s})=>{var a,h,y,b;const c=s.hideMessageError||!1,i=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"||t==="horizontal-inline"?"spacing-96":"sm",direction:t==="horizontal"||t==="horizontal-inline"?"row":"column",...s.containerProps,children:[s.title&&e.jsx(fe,{condition:!!l,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:i,fullWidth:n,children:[e.jsx(ye,{children:s.title}),e.jsx(Ke.Body3,{props:{color:"gray-500"},children:s.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:i,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:s.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((a=s.tooltip)!=null&&a.label),children:e.jsx(me.Tooltip,{label:(h=s.tooltip)==null?void 0:h.label,arrowPosition:(y=s.tooltip)==null?void 0:y.arrowPosition,...s.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!s.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:s.description})})]})}),e.jsx(f.Box,{gap:t==="horizontal-inline"?"xl":"md",direction:t==="horizontal-inline"?"row":"column",align:"flex-start",children:e.jsx($r,{of:(b=s.checkBoxesList)==null?void 0:b.map(p=>({...p,isChecked:s.checkBoxesAreChecked.includes(p.id)})),render:p=>p.renderBadge?e.jsxs(f.Box,{direction:"row",justify:"space-between",gap:"lg",...s.badgeContainerProps,children:[e.jsx(tr.Checkbox,{name:p.name,value:p.id,checked:p.isChecked,onChange:C=>s.onChecked(C.target.value,p),label:p.name,description:p.description}),p.renderBadge]}):e.jsx(tr.Checkbox,{name:p.name,value:p.id,checked:p.isChecked,onChange:C=>s.onChecked(C.target.value,p),label:p.name,description:p.description})})}),!c&&s.errorMessage&&e.jsx(cr,{message:s.errorMessage})]})},Xs=({position:r="vertical",size:t="md",fullWidth:o=!1,...n})=>{var s;const l=r==="horizontal-inline"||r==="horizontal-block"?t==="sm"?342:t==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:r==="horizontal-inline"||r==="horizontal-block"?"spacing-96":"sm",direction:r==="horizontal-inline"||r==="horizontal-block"?"row":"column",children:[e.jsx(fe,{condition:!!n.description||!!n.title,children:e.jsxs(f.Box,{direction:"column",customMaxWidth:l,fullWidth:o,children:[n.title&&e.jsx(ye,{children:n.title}),e.jsx(fe,{condition:!!n.description,children:e.jsx(D.Text,{color:"gray-500",children:n.description})})]})}),e.jsx(f.Box,{gap:"sm",direction:r==="horizontal"||r==="horizontal-inline"?"row":"column",align:"flex-start",flexWrap:"wrap",children:e.jsx($r,{of:(s=n.radioList)==null?void 0:s.map(c=>({...c,isChecked:n.radioIsChecked===c.id})),render:({value:c,id:i,isChecked:a,subInput:h,label:y,description:b})=>e.jsxs(f.Box,{direction:"column",gap:"xs",customMaxWidth:l,children:[e.jsx(dt.Radio,{id:`${i.toString()}-${c}`,name:n.groupName||y,label:y,value:c,checked:a,onChange:p=>n.onChecked({id:i,label:p.target.name,value:p.target.value}),disabled:n.disableAll},i),b&&e.jsx(D.Text,{color:"gray-500",style:{marginLeft:28},children:b}),h]})})}),n.errorMessage&&e.jsx(cr,{message:n.errorMessage})]})},$s=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var i,a,h;const s=l.hideMessageError||!1,c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...l.containerProps,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=l.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=l.tooltip)==null?void 0:a.label,arrowPosition:(h=l.tooltip)==null?void 0:h.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),e.jsxs(ie.Flex,{direction:"column",gap:"xs",children:[e.jsx(at.Textarea,{ref:l.inputRef,size:r,...l.inputProps,status:l.errorMessage?"error":"default"}),!s&&l.errorMessage&&e.jsx(cr,{message:l.errorMessage})]})]})},Ks=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",required:n=!1,fullWidth:l=!1,...s})=>{var i,a,h;const c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...s.containerProps,children:[s.title&&e.jsx(fe,{condition:n,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:l,children:[e.jsx(ye,{children:s.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:s.titleDescription})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:l,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:s.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=s.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=s.tooltip)==null?void 0:a.label,arrowPosition:(h=s.tooltip)==null?void 0:h.arrowPosition,...s.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!s.titleDescription,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:s.titleDescription})})]})}),e.jsx(xr.Toggle,{checked:s.checked,onChange:s.onChange,label:s.label,description:s.description}),s.errorMessage&&e.jsx(cr,{message:s.errorMessage})]})},Rs=({variant:r="primary",size:t="md",...o})=>{const n=Cr.useColor(),l=c=>{var a,h,y,b,p,C;if(!c)return;const i=o.disabled?"var(--sa-text-disable, #181a198f)":r==="secondary"?"var(--sa-text-subtle, #8c8f97)":r==="secondary-danger"?(h=(a=n==null?void 0:n.computed)==null?void 0:a.red)==null?void 0:h[600]:r==="secondary-primary"?(b=(y=n==null?void 0:n.computed)==null?void 0:y.blue)==null?void 0:b[700]:(C=(p=n==null?void 0:n.computed)==null?void 0:p.gray)==null?void 0:C[50];return e.jsx(M.Icon,{name:c,size:t,style:{color:i}})},s=()=>{var i,a,h,y;if(r!=="secondary-danger"&&r!=="secondary-primary")return o.title;const c={color:o.disabled?"var(--sa-text-disable, #181a198f)":r==="secondary-danger"?(a=(i=n==null?void 0:n.computed)==null?void 0:i.red)==null?void 0:a[600]:(y=(h=n==null?void 0:n.computed)==null?void 0:h.blue)==null?void 0:y[700]};switch(t){case"xs":return e.jsx(Ke.Body2,{props:{style:c},children:o.title});case"sm":case"md":return e.jsx(Ke.SubH3,{props:{style:c},children:o.title});case"lg":return e.jsx(Ke.SubH2,{props:{style:c},children:o.title});default:return o.title}};return e.jsx(j.Button,{fullWidth:!0,disabled:o.disabled,primary:r==="primary",secondary:r==="secondary"||r==="secondary-danger"||r==="secondary-primary",success:r==="success",onClick:o.onClick,type:o.type,iconLeft:l(o.iconLeft),iconRight:l(o.iconRight),size:t,children:s()})},ec=r=>e.jsx(Ke.H5,{props:{...r},children:r.title}),rc=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var i,a,h;const s=l.hideMessageError||!1,c=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",onClick:l.onClickContainer,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:c,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((i=l.tooltip)!=null&&i.label),children:e.jsx(me.Tooltip,{label:(a=l.tooltip)==null?void 0:a.label,arrowPosition:(h=l.tooltip)==null?void 0:h.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),e.jsxs(ie.Flex,{direction:"column",gap:"xs",children:[e.jsx(f.Box,{direction:"column",style:{width:t==="horizontal"&&l.customWidth?l.customWidth:t==="horizontal"?"343px":""},children:e.jsx(fr.StarasiaDate,{size:r,...l.inputProps,status:l.errorMessage?"error":void 0})}),!s&&l.errorMessage&&e.jsx(cr,{message:l.errorMessage})]})]})};async function tc(r,t){const o=new Image;o.src=r,await new Promise((s,c)=>{o.onload=s,o.onerror=c});const n=document.createElement("canvas");n.width=t.width,n.height=t.height;const l=n.getContext("2d",{alpha:!0});if(!l)throw new Error("No 2D context");return l.drawImage(o,t.x,t.y,t.width,t.height,0,0,t.width,t.height),new Promise((s,c)=>{n.toBlob(i=>{if(!i)return c("Canvas is empty");const a=new File([i],"cropped.png",{type:"image/png"});s(a)},"image/png")})}const Cl={"1:1":1,"4:3":4/3,"16:9":16/9,"3:4":3/4,"9:16":9/16,"2:3":2/3,"3:2":3/2,"32:9":32/9},xl=d.forwardRef(({handleUpload:r,urlImage:t,isUploading:o,croppedImage:n,setCroppedImage:l,size:s="96",aspect:c="1:1",containerProps:i,maxFileSize:a=2,onError:h},y)=>{const b=De.useMediaQuery("md"),[p,C]=d.useState(!1),[E,w]=d.useState(null),[L,F]=d.useState(!1),[I,S]=d.useState({x:0,y:0}),[k,H]=d.useState(1),[z,B]=d.useState(null);d.useEffect(()=>{t===null&&l(null)},[t]);const W=d.useCallback((V,N)=>{B(N)},[]),O=V=>{var ve;const N=(ve=V.target.files)==null?void 0:ve[0];if(!N)return;const se=new FileReader;se.onload=()=>{w(se.result),F(!0)},se.readAsDataURL(N)},Y=async()=>{if(!(!E||!z))try{const V=await tc(E,z);if(a&&V.size>a*1024*1024){h==null||h(`Ukuran file maksimal ${a}MB`);return}r==null||r(V);const N=URL.createObjectURL(V);l(N,V),F(!1)}catch{h==null||h("Gagal memproses gambar")}},X=d.useRef(null),q=()=>{X.current&&X.current.click()};d.useImperativeHandle(y,()=>({openFileDialog:()=>{var V;(V=X.current)==null||V.click()}}));const Z=parseInt(s,10),K=Cl[c];let te,_;return K>=1?(_=Z,te=Z*K):(te=Z,_=Z/K),e.jsxs(f.Box,{direction:"column",display:"flex",position:"relative",bg:(i==null?void 0:i.bg)||"gray-200",borderStyle:(i==null?void 0:i.borderStyle)||"border-none",borderColor:(i==null?void 0:i.borderColor)||"gray-200",borderWidth:(i==null?void 0:i.borderWidth)||"border-2",borderRadius:(i==null?void 0:i.borderRadius)||"rounded-md",overflow:"overflow-hidden",align:"center",justify:"center",style:{width:i!=null&&i.fullWidth?"100%":`${te}px`,height:i!=null&&i.fullWidth?"auto":`${_}px`,aspectRatio:K,flexShrink:0},onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),children:[n||t?e.jsx("img",{src:n||t||void 0,alt:"Profile",style:{objectFit:"cover",width:"100%",height:"100%"}}):e.jsx(f.Box,{display:"flex",direction:"column",align:"center",justify:"center",padding:"spacing-4",children:e.jsx(M.Icon,{name:"Image",style:{color:"var(--sa-text-subtle, #8c8f97)",width:Number(s)/2<40?Number(s)/2:40,height:Number(s)/2<40?Number(s)/2:40}})}),e.jsxs(f.Box,{direction:"column",position:"absolute",display:"flex",align:"center",justify:"center",cursor:"pointer",style:{inset:0,backgroundColor:"var(--sa-color-black-alpha-a30, #080f214c)",opacity:p?1:0,transition:"opacity 0.3s ease-in-out"},onClick:q,children:[e.jsx("input",{ref:X,type:"file",accept:"image/*",onChange:O,disabled:o,style:{display:"none"}}),e.jsxs(f.Box,{display:"flex",align:"center",gap:"spacing-2",direction:"row",children:[e.jsx(M.Icon,{name:"Edit3",style:{color:"var(--sa-background-primary, #ffffff)"}}),e.jsx(fe,{condition:s.toNumber()>80,children:e.jsx(D.Text,{color:"gray-50",fontSize:s.toNumber()>80?"sm":"md",fontWeight:"medium",children:"Edit Image"})})]})]}),o&&e.jsx(f.Box,{direction:"column",position:"absolute",display:"flex",align:"center",justify:"center",style:{inset:0,zIndex:20,backgroundColor:"var(--sa-color-white-alpha-a80, #e5e9f6cc)"},children:e.jsx(f.Box,{direction:"column",borderRadius:"rounded-full",style:{animation:"spin 1s linear infinite",border:"2px solid transparent",height:"2rem",width:"2rem"},borderColor:"info-600"})}),L&&Vr.createPortal(e.jsx("div",{style:{position:"fixed",inset:0,zIndex:19999,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(0,0,0,0.6)"},onClick:()=>F(!1),children:e.jsxs("div",{style:{backgroundColor:"var(--sa-background-primary)",borderRadius:"var(--sa-radii-md)",boxShadow:"0 20px 60px rgba(0,0,0,0.3)",overflow:"hidden",width:b?c==="1:1"?"min(90vw, 480px)":`min(90vw, ${te*2}px)`:"calc(100vw - 2rem)",display:"flex",flexDirection:"column"},onClick:V=>V.stopPropagation(),children:[e.jsx("div",{style:{position:"relative",width:"100%",height:"20rem",backgroundColor:"var(--sa-color-gray-100)"},children:E&&e.jsx(_l,{image:E,crop:I,zoom:k,aspect:c?Cl[c]:void 0,onCropChange:S,onZoomChange:H,onCropComplete:W,objectFit:"contain",minZoom:.5,restrictPosition:!1})}),e.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.5rem",padding:"0.75rem 1rem",borderTop:"1px solid var(--sa-border-subtle)"},children:[e.jsx(j.Button,{size:"sm",secondary:!0,onClick:()=>F(!1),children:"Cancel"}),e.jsx(j.Button,{size:"sm",primary:!0,onClick:Y,children:"Crop"})]})]})}),document.body)]})}),oc=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,required:l=!1,...s})=>{var a,h,y;const c=s.hideMessageError||!1,i=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...s.containerProps,children:[s.title&&e.jsx(fe,{condition:!!l,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:i,fullWidth:n,children:[e.jsx(ye,{children:s.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:s.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:i,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:s.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((a=s.tooltip)!=null&&a.label),children:e.jsx(me.Tooltip,{label:(h=s.tooltip)==null?void 0:h.label,arrowPosition:(y=s.tooltip)==null?void 0:y.arrowPosition,...s.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!s.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:s.description})})]})}),e.jsxs(ie.Flex,{direction:"column",gap:"xs",children:[e.jsx(xl,{...s.inputProps}),!c&&s.errorMessage&&e.jsx(cr,{message:s.errorMessage})]})]})},lc=({size:r="md",direction:t="vertical",requiredTitle:o="(Required)",fullWidth:n=!1,...l})=>{var c,i,a;const s=t==="horizontal"?r==="sm"?342:r==="lg"?400:342:void 0;return e.jsxs(f.Box,{gap:t==="horizontal"?"spacing-96":"sm",direction:t==="horizontal"?"row":"column",...l.containerProps,children:[l.title&&e.jsx(fe,{condition:!!l.inputProps.required,fallback:e.jsxs(f.Box,{direction:"column",customMaxWidth:s,fullWidth:n,children:[e.jsx(ye,{children:l.title}),e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})]}),children:e.jsxs(f.Box,{direction:"column",customMaxWidth:s,fullWidth:n,children:[e.jsxs(ie.Flex,{direction:"row",gap:"xs",align:"center",children:[e.jsx(ye,{fontSize:r,children:l.title}),e.jsx(ye,{color:"error",fontSize:r,children:o}),e.jsx(fe,{condition:!!((c=l.tooltip)!=null&&c.label),children:e.jsx(me.Tooltip,{label:(i=l.tooltip)==null?void 0:i.label,arrowPosition:(a=l.tooltip)==null?void 0:a.arrowPosition,...l.tooltip,children:e.jsx(M.Icon,{name:"InfoCircle",size:r==="lg"?"sm":"xs",style:{color:"var(--sa-color-info-500, #00abeb)",marginTop:"6px"}})})})]}),e.jsx(fe,{condition:!!l.description,children:e.jsx(D.Text,{fontSize:r,color:"gray-500",children:l.description})})]})}),l.inputProps.extended&&l.inputProps.extended]})},nc=({items:r,id:t,handleOnUpdate:o,width:n,toggleShow:l=!0,disabled:s=!1})=>{var y;const[c,i]=d.useState([]);d.useEffect(()=>{r&&i([...r.map(b=>({id:b.id,isActive:b.isActive}))])},[r]);const a=(y=c.find(b=>b.id===t))==null?void 0:y.isActive,h=d.useCallback(()=>{i(b=>b.map(p=>p.id===t?{...p,isActive:!p.isActive}:p)),o&&o(!a)},[t,o,a]);return e.jsx(f.Box,{direction:"row",gap:"md",style:{width:n},children:l&&e.jsx(xr.Toggle,{disabled:s,checked:a,onChange:h,label:a?"Active":"Inactive"})})},sc={InputText:Cs,InputDropdown:xs,InputSingleFile:Js,CheckBoxOptions:Ys,RadioOptions:Xs,InputTextArea:$s,ToggleForm:Ks,ActionButton:Rs,FormTitle:ec,InputDate:rc,InputImgFile:oc,Custom:lc},wl=({customBottom:r})=>{const[t,o]=d.useState(!1),n=()=>{window.scrollY>window.screenY?o(!0):o(!1)},l=()=>{window.scrollTo({top:0,behavior:"smooth"})};return d.useEffect(()=>(window.addEventListener("scroll",n),()=>{window.removeEventListener("scroll",n)}),[]),e.jsx(f.Box,{direction:"column",style:{position:"fixed",bottom:0,right:0},children:e.jsx(f.Box,{direction:"column",position:"absolute",style:{bottom:r||"1.6rem",right:"2rem",transform:t?"scale(1)":"scale(0)",transition:"transform 0.2s ease-in-out"},children:e.jsx(j.Button,{secondary:!0,size:"xs",onClick:l,type:"button",iconLeft:e.jsx(M.Icon,{width:16,size:"xs",name:"ArrowPullUp",style:{color:"var(--sa-background-brand, #04254f)"}})})})})},qe="sa-sidepanel-item",Dl="sa-sidepanel-item-styles",cc=`
|
|
58
58
|
.${qe} {
|
|
59
59
|
display: block;
|
|
60
60
|
box-sizing: border-box;
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";:root{--sa-color-brand-50: #e6edf6;--sa-color-brand-100: #ccd9ed;--sa-color-brand-200: #99b3db;--sa-color-brand-300: #668cc9;--sa-color-brand-400: #3366b7;--sa-color-brand-500: #1a4fa0;--sa-color-brand-600: #04254f;--sa-color-brand-700: #031f43;--sa-color-brand-800: #021937;--sa-color-brand-900: #02132b;--sa-color-secondary-50: #e6e9fb;--sa-color-secondary-100: #b0b9f1;--sa-color-secondary-200: #8a98ea;--sa-color-secondary-300: #5468e1;--sa-color-secondary-400: #334bdb;--sa-color-secondary-500: #001ed2;--sa-color-secondary-600: #001bbf;--sa-color-secondary-700: #001595;--sa-color-secondary-800: #001174;--sa-color-secondary-900: #00003c;--sa-color-error-50: #fff0f3;--sa-color-error-100: #ffccd5;--sa-color-error-200: #ffb3c1;--sa-color-error-300: #ff8fa3;--sa-color-error-400: #ff758f;--sa-color-error-500: #ff4d6d;--sa-color-error-600: #c9184a;--sa-color-error-700: #a4133c;--sa-color-error-800: #800f2f;--sa-color-error-900: #590d22;--sa-color-success-50: #ecfff6;--sa-color-success-100: #baeed6;--sa-color-success-200: #97e6c1;--sa-color-success-300: #75dead;--sa-color-success-400: #52d698;--sa-color-success-500: #30ce84;--sa-color-success-600: #28ac6e;--sa-color-success-700: #208958;--sa-color-success-800: #186742;--sa-color-success-900: #10442c;--sa-color-info-50: #effaff;--sa-color-info-100: #def3ff;--sa-color-info-200: #b6eaff;--sa-color-info-300: #75dbff;--sa-color-info-400: #2ccaff;--sa-color-info-500: #00abeb;--sa-color-info-600: #0090d4;--sa-color-info-700: #0073ab;--sa-color-info-800: #00608d;--sa-color-info-900: #04334d;--sa-color-warning-50: #fef2e6;--sa-color-warning-100: #f8d9ac;--sa-color-warning-200: #f4c583;--sa-color-warning-300: #f1b259;--sa-color-warning-400: #ed9f30;--sa-color-warning-500: #d18d2c;--sa-color-warning-600: #8e5f1d;--sa-color-warning-700: #5f4013;--sa-color-warning-800: #2f200a;--sa-color-warning-900: #241808;--sa-color-gray-50: #ffffff;--sa-color-gray-100: #f8f8f8;--sa-color-gray-200: #f0f1f2;--sa-color-gray-300: #dddee1;--sa-color-gray-400: #b7b9be;--sa-color-gray-500: #8c8f97;--sa-color-gray-600: #7d818a;--sa-color-gray-700: #6b6e76;--sa-color-gray-800: #505258;--sa-color-gray-900: #3b3d42;--sa-color-gray-1000: #292a2e;--sa-color-gray-1100: #1e1f21;--sa-color-dark-50: #18191a;--sa-color-dark-100: #1f1f21;--sa-color-dark-200: #303134;--sa-color-dark-300: #3d3f43;--sa-color-dark-400: #4b4d51;--sa-color-dark-500: #63666b;--sa-color-dark-600: #7e8188;--sa-color-dark-700: #96999e;--sa-color-dark-800: #a9abaf;--sa-color-dark-900: #bfc1c4;--sa-color-dark-1000: #cecfd2;--sa-color-dark-1100: #e2e3e4;--sa-color-black-alpha-a5: #17171708;--sa-color-black-alpha-a10: #0515240e;--sa-color-black-alpha-a20: #0b120e24;--sa-color-black-alpha-a30: #080f214a;--sa-color-black-alpha-a50: #181a198f;--sa-color-black-alpha-a70: #181a19b8;--sa-color-white-alpha-a5: #01040474;--sa-color-white-alpha-a10: #bdbdbd09;--sa-color-white-alpha-a20: #ceced912;--sa-color-white-alpha-a30: #d9dae71a;--sa-color-white-alpha-a50: #e3e4f21f;--sa-color-white-alpha-a70: #e8edfd2e;--sa-color-white-alpha-a80: #e5e9f640;--sa-color-white-alpha-a90: #e5e9f66b;--sa-color-gray-alpha-a10: #78867f1a;--sa-color-gray-alpha-a16: #78867f29;--sa-color-gray-alpha-a20: #78867f33;--sa-color-gray-alpha-a28: #c9cecc47;--sa-color-gray-alpha-a62: #78867f9e;--sa-color-black-alpha-a7: #00000012;--sa-color-black-alpha-a8: #00000014;--sa-color-black-alpha-a45: #00000073;--sa-color-white-alpha-half: #ffffff80;--sa-color-info-alpha-a10: #64b5f61a}:root{--sa-text-primary: var(--sa-color-gray-1000, #292a2e);--sa-text-primary-inverse: var(--sa-color-gray-50, #ffffff);--sa-text-brand: var(--sa-color-brand-700, #031f43);--sa-text-brand-bolder: var(--sa-color-brand-900, #02132b);--sa-text-brand-hover: var(--sa-color-brand-900, #02132b);--sa-text-brand-pressed: var(--sa-color-brand-800, #021937);--sa-text-brand-disable: var(--sa-color-brand-300, #668cc9);--sa-text-error: var(--sa-color-error-700, #a4133c);--sa-text-error-bolder: var(--sa-color-error-900, #590d22);--sa-text-error-hover: var(--sa-color-error-900, #590d22);--sa-text-error-pressed: var(--sa-color-error-800, #800f2f);--sa-text-error-disable: var(--sa-color-error-300, #ff8fa3);--sa-text-success: var(--sa-color-success-700, #208958);--sa-text-success-bolder: var(--sa-color-success-900, #10442c);--sa-text-success-hover: var(--sa-color-success-900, #10442c);--sa-text-success-pressed: var(--sa-color-success-800, #186742);--sa-text-success-disable: var(--sa-color-success-300, #75dead);--sa-text-info: var(--sa-color-info-700, #0073ab);--sa-text-info-bolder: var(--sa-color-info-900, #04334d);--sa-text-info-hover: var(--sa-color-info-900, #04334d);--sa-text-info-pressed: var(--sa-color-info-800, #00608d);--sa-text-info-disable: var(--sa-color-info-300, #75dbff);--sa-text-subtle: var(--sa-color-gray-800, #505258);--sa-text-subtlest: var(--sa-color-gray-700, #6b6e76);--sa-text-hover: var(--sa-color-gray-800, #505258);--sa-text-pressed: var(--sa-color-gray-900, #3b3d42);--sa-text-disable: var(--sa-color-black-alpha-a50, #181a198f);--sa-text-bolder: var(--sa-color-gray-1100, #1e1f21);--sa-text-warning: var(--sa-color-warning-700, #5f4013);--sa-text-warning-bolder: var(--sa-color-warning-800, #2f200a);--sa-text-warning-hover: var(--sa-color-warning-900, #241808);--sa-text-warning-pressed: var(--sa-color-warning-800, #2f200a);--sa-text-warning-disable: var(--sa-color-warning-300, #f1b259);--sa-text-secondary: var(--sa-color-secondary-700, #001595);--sa-text-secondary-bolder: var(--sa-color-secondary-900, #00003c);--sa-text-secondary-hover: var(--sa-color-secondary-900, #00003c);--sa-text-secondary-pressed: var(--sa-color-secondary-800, #001174);--sa-text-secondary-disable: var(--sa-color-secondary-300, #5468e1);--sa-icon-primary: var(--sa-color-gray-1000, #292a2e);--sa-icon-primary-inverse: var(--sa-color-gray-50, #ffffff);--sa-icon-subtle: var(--sa-color-gray-800, #505258);--sa-icon-subtlest: var(--sa-color-gray-700, #6b6e76);--sa-icon-hover: var(--sa-color-gray-800, #505258);--sa-icon-pressed: var(--sa-color-gray-900, #3b3d42);--sa-icon-disable: var(--sa-color-black-alpha-a50, #181a198f);--sa-icon-bolder: var(--sa-color-gray-1100, #1e1f21);--sa-icon-brand: var(--sa-color-brand-700, #031f43);--sa-icon-brand-bolder: var(--sa-color-brand-900, #02132b);--sa-icon-brand-hover: var(--sa-color-brand-900, #02132b);--sa-icon-brand-pressed: var(--sa-color-brand-800, #021937);--sa-icon-brand-disable: var(--sa-color-brand-300, #668cc9);--sa-icon-error: var(--sa-color-error-700, #a4133c);--sa-icon-error-bolder: var(--sa-color-error-900, #590d22);--sa-icon-error-hover: var(--sa-color-error-900, #590d22);--sa-icon-error-pressed: var(--sa-color-error-800, #800f2f);--sa-icon-error-disable: var(--sa-color-error-300, #ff8fa3);--sa-icon-success: var(--sa-color-success-700, #208958);--sa-icon-success-bolder: var(--sa-color-success-900, #10442c);--sa-icon-success-hover: var(--sa-color-success-900, #10442c);--sa-icon-success-pressed: var(--sa-color-success-800, #186742);--sa-icon-success-disable: var(--sa-color-success-300, #75dead);--sa-icon-info: var(--sa-color-info-700, #0073ab);--sa-icon-info-bolder: var(--sa-color-info-900, #04334d);--sa-icon-info-hover: var(--sa-color-info-900, #04334d);--sa-icon-info-pressed: var(--sa-color-info-800, #00608d);--sa-icon-info-disable: var(--sa-color-info-300, #75dbff);--sa-icon-warning: var(--sa-color-warning-700, #5f4013);--sa-icon-warning-bolder: var(--sa-color-warning-800, #2f200a);--sa-icon-warning-hover: var(--sa-color-warning-900, #241808);--sa-icon-warning-pressed: var(--sa-color-warning-800, #2f200a);--sa-icon-warning-disable: var(--sa-color-warning-300, #f1b259);--sa-icon-secondary: var(--sa-color-secondary-700, #001595);--sa-icon-secondary-bolder: var(--sa-color-secondary-900, #00003c);--sa-icon-secondary-hover: var(--sa-color-secondary-900, #00003c);--sa-icon-secondary-pressed: var(--sa-color-secondary-800, #001174);--sa-icon-secondary-disable: var(--sa-color-secondary-300, #5468e1);--sa-icon-brand-selected: var(--sa-color-brand-600, #04254f);--sa-icon-error-selected: var(--sa-color-error-600, #c9184a);--sa-icon-success-selected: var(--sa-color-success-600, #28ac6e);--sa-icon-info-selected: var(--sa-color-info-600, #0090d4);--sa-icon-warning-selected: var(--sa-color-warning-600, #8e5f1d);--sa-background-primary: var(--sa-color-gray-50, #ffffff);--sa-background-primary-inverse: var(--sa-color-gray-100, #f8f8f8);--sa-background-subtle: var(--sa-color-gray-300, #dddee1);--sa-background-hover: var(--sa-color-gray-500, #8c8f97);--sa-background-pressed: var(--sa-color-gray-800, #505258);--sa-background-disable: var(--sa-color-black-alpha-a5, #17171708);--sa-background-overlay: var(--sa-color-black-alpha-a45, #00000073);--sa-background-brand: var(--sa-color-brand-600, #04254f);--sa-background-brand-hover: var(--sa-color-brand-800, #021937);--sa-background-brand-pressed: var(--sa-color-brand-900, #02132b);--sa-background-brand-disable: var(--sa-color-brand-100, #ccd9ed);--sa-background-brand-subtle: var(--sa-color-brand-200, #99b3db);--sa-background-brand-subtle-hover: var(--sa-color-brand-300, #668cc9);--sa-background-brand-subtle-pressed: var(--sa-color-brand-400, #3366b7);--sa-background-brand-subtlest: var(--sa-color-brand-50, #e6edf6);--sa-background-error: var(--sa-color-error-600, #c9184a);--sa-background-error-hover: var(--sa-color-error-500, #ff4d6d);--sa-background-error-pressed: var(--sa-color-error-600, #c9184a);--sa-background-error-disable: var(--sa-color-error-100, #ffccd5);--sa-background-error-subtle: var(--sa-color-error-100, #ffccd5);--sa-background-error-subtlest: var(--sa-color-error-50, #fff0f3);--sa-background-error-subtlest-hover: var(--sa-color-error-100, #ffccd5);--sa-background-error-subtlest-pressed: var(--sa-color-error-300, #ff8fa3);--sa-background-success: var(--sa-color-success-600, #28ac6e);--sa-background-success-hover: var(--sa-color-success-500, #30ce84);--sa-background-success-pressed: var(--sa-color-success-600, #28ac6e);--sa-background-success-disable: var(--sa-color-success-100, #baeed6);--sa-background-success-subtle: var(--sa-color-success-200, #97e6c1);--sa-background-success-subtlest: var(--sa-color-success-50, #ecfff6);--sa-background-success-subtlest-hover: var(--sa-color-success-100, #baeed6);--sa-background-success-subtlest-pressed: var(--sa-color-success-300, #75dead);--sa-background-info: var(--sa-color-info-600, #0090d4);--sa-background-info-hover: var(--sa-color-info-500, #00abeb);--sa-background-info-pressed: var(--sa-color-info-600, #0090d4);--sa-background-info-disable: var(--sa-color-info-100, #def3ff);--sa-background-info-subtle: var(--sa-color-info-200, #b6eaff);--sa-background-info-subtlest: var(--sa-color-info-50, #effaff);--sa-background-info-subtlest-hover: var(--sa-color-info-100, #def3ff);--sa-background-info-subtlest-pressed: var(--sa-color-info-300, #75dbff);--sa-background-warning: var(--sa-color-warning-600, #8e5f1d);--sa-background-warning-hover: var(--sa-color-warning-500, #d18d2c);--sa-background-warning-pressed: var(--sa-color-warning-600, #8e5f1d);--sa-background-warning-disable: var(--sa-color-warning-100, #f8d9ac);--sa-background-warning-subtle: var(--sa-color-warning-200, #f4c583);--sa-background-warning-subtlest: var(--sa-color-warning-50, #fef2e6);--sa-background-warning-subtlest-hover: var(--sa-color-warning-100, #f8d9ac);--sa-background-warning-subtlest-pressed: var(--sa-color-warning-300, #f1b259);--sa-background-neutral: var(--sa-color-gray-200, #f0f1f2);--sa-background-neutral-hover: var(--sa-color-gray-300, #dddee1);--sa-background-neutral-pressed: var(--sa-color-gray-400, #b7b9be);--sa-background-secondary: var(--sa-color-secondary-500, #001ed2);--sa-background-secondary-hover: var(--sa-color-secondary-600, #001bbf);--sa-background-secondary-pressed: var(--sa-color-secondary-700, #001595);--sa-background-secondary-disable: var(--sa-color-secondary-100, #b0b9f1);--sa-background-secondary-subtle: var(--sa-color-secondary-100, #b0b9f1);--sa-border-primary: var(--sa-color-gray-1000, #292a2e);--sa-border-primary-inverse: var(--sa-color-gray-50, #ffffff);--sa-border-subtle: var(--sa-color-black-alpha-a20, #0b120e24);--sa-border-bold: var(--sa-color-gray-600, #7d818a);--sa-border-disabled: var(--sa-color-black-alpha-a10, #0515240e);--sa-border-focused: var(--sa-color-brand-500, #1a4fa0);--sa-border-input: var(--sa-color-gray-500, #8c8f97);--sa-border-selected: var(--sa-color-brand-700, #031f43);--sa-border-brand: var(--sa-color-brand-700, #031f43);--sa-border-brand-disable: var(--sa-color-brand-200, #99b3db);--sa-border-danger: var(--sa-color-error-600, #c9184a);--sa-border-danger-subtle: var(--sa-color-error-200, #ffb3c1);--sa-border-danger-disable: var(--sa-color-error-200, #ffb3c1);--sa-border-success: var(--sa-color-success-600, #28ac6e);--sa-border-success-subtle: var(--sa-color-success-200, #97e6c1);--sa-border-success-disable: var(--sa-color-success-200, #97e6c1);--sa-border-info: var(--sa-color-info-600, #0090d4);--sa-border-info-subtle: var(--sa-color-info-200, #b6eaff);--sa-border-warning: var(--sa-color-warning-700, #5f4013);--sa-border-warning-subtle: var(--sa-color-warning-200, #f4c583);--sa-accent-primary: var(--sa-color-gray-1100, #1f1f21);--sa-accent-subtle: var(--sa-color-gray-200, #f0f1f2);--sa-accent-success: var(--sa-color-success-700, #208958);--sa-accent-success-subtle: var(--sa-color-success-50, #ecfff6);--sa-accent-danger: var(--sa-color-error-700, #a4133c);--sa-accent-danger-subtle: var(--sa-color-error-50, #fff0f3);--sa-accent-info: var(--sa-color-info-700, #0073ab);--sa-accent-info-subtle: var(--sa-color-info-50, #effaff);--sa-accent-warning: var(--sa-color-warning-400, #ed9f30);--sa-accent-warning-subtle: var(--sa-color-warning-50, #fef2e6)}[data-theme=dark]{--sa-text-primary: var(--sa-color-gray-50, #ffffff);--sa-text-primary-inverse: var(--sa-color-gray-1100, #1e1f21);--sa-text-brand: var(--sa-color-brand-300, #668cc9);--sa-text-brand-bolder: var(--sa-color-brand-50, #e6edf6);--sa-text-brand-hover: var(--sa-color-brand-100, #ccd9ed);--sa-text-brand-pressed: var(--sa-color-brand-200, #99b3db);--sa-text-brand-disable: var(--sa-color-brand-600, #04254f);--sa-text-error: var(--sa-color-error-300, #ff8fa3);--sa-text-error-bolder: var(--sa-color-error-50, #fff0f3);--sa-text-error-hover: var(--sa-color-error-100, #ffccd5);--sa-text-error-pressed: var(--sa-color-error-200, #ffb3c1);--sa-text-error-disable: var(--sa-color-error-600, #c9184a);--sa-text-success: var(--sa-color-success-500, #30ce84);--sa-text-success-bolder: var(--sa-color-success-50, #ecfff6);--sa-text-success-hover: var(--sa-color-success-100, #baeed6);--sa-text-success-pressed: var(--sa-color-success-200, #97e6c1);--sa-text-success-disable: var(--sa-color-success-600, #28ac6e);--sa-text-info: var(--sa-color-info-300, #75dbff);--sa-text-info-bolder: var(--sa-color-info-50, #effaff);--sa-text-info-hover: var(--sa-color-info-100, #def3ff);--sa-text-info-pressed: var(--sa-color-info-200, #b6eaff);--sa-text-info-disable: var(--sa-color-info-600, #0090d4);--sa-text-subtle: var(--sa-color-gray-500, #8c8f97);--sa-text-subtlest: var(--sa-color-gray-600, #7d818a);--sa-text-hover: var(--sa-color-dark-400, #4b4d51);--sa-text-pressed: var(--sa-color-dark-200, #303134);--sa-text-disable: var(--sa-color-white-alpha-a70, #e8edfd2e);--sa-text-bolder: var(--sa-color-gray-50, #ffffff);--sa-text-warning: var(--sa-color-warning-300, #f1b259);--sa-text-warning-bolder: var(--sa-color-warning-50, #fef2e6);--sa-text-warning-hover: var(--sa-color-warning-100, #f8d9ac);--sa-text-warning-pressed: var(--sa-color-warning-200, #f4c583);--sa-text-warning-disable: var(--sa-color-warning-600, #8e5f1d);--sa-text-secondary: var(--sa-color-secondary-300, #5468e1);--sa-text-secondary-bolder: var(--sa-color-secondary-50, #e6e9fb);--sa-text-secondary-hover: var(--sa-color-secondary-100, #b0b9f1);--sa-text-secondary-pressed: var(--sa-color-secondary-200, #8a98ea);--sa-text-secondary-disable: var(--sa-color-secondary-600, #001bbf);--sa-icon-primary: var(--sa-color-dark-1100, #e2e3e4);--sa-icon-primary-inverse: var(--sa-color-gray-1100, #1e1f21);--sa-icon-subtle: var(--sa-color-gray-500, #8c8f97);--sa-icon-subtlest: var(--sa-color-gray-600, #7d818a);--sa-icon-hover: var(--sa-color-gray-1100, #1e1f21);--sa-icon-pressed: var(--sa-color-gray-1100, #1e1f21);--sa-icon-disable: var(--sa-color-gray-1100, #1e1f21);--sa-icon-bolder: var(--sa-color-gray-50, #ffffff);--sa-icon-brand: var(--sa-color-brand-300, #668cc9);--sa-icon-brand-bolder: var(--sa-color-brand-50, #e6edf6);--sa-icon-brand-hover: var(--sa-color-brand-100, #ccd9ed);--sa-icon-brand-pressed: var(--sa-color-brand-200, #99b3db);--sa-icon-brand-disable: var(--sa-color-brand-600, #04254f);--sa-icon-error: var(--sa-color-error-300, #ff8fa3);--sa-icon-error-bolder: var(--sa-color-error-50, #fff0f3);--sa-icon-error-hover: var(--sa-color-error-100, #ffccd5);--sa-icon-error-pressed: var(--sa-color-error-200, #ffb3c1);--sa-icon-error-disable: var(--sa-color-error-600, #c9184a);--sa-icon-success: var(--sa-color-success-500, #30ce84);--sa-icon-success-bolder: var(--sa-color-success-50, #ecfff6);--sa-icon-success-hover: var(--sa-color-success-100, #baeed6);--sa-icon-success-pressed: var(--sa-color-success-200, #97e6c1);--sa-icon-success-disable: var(--sa-color-success-600, #28ac6e);--sa-icon-info: var(--sa-color-info-300, #75dbff);--sa-icon-info-bolder: var(--sa-color-info-50, #effaff);--sa-icon-info-hover: var(--sa-color-info-100, #def3ff);--sa-icon-info-pressed: var(--sa-color-info-200, #b6eaff);--sa-icon-info-disable: var(--sa-color-info-600, #0090d4);--sa-icon-warning: var(--sa-color-warning-300, #f1b259);--sa-icon-warning-bolder: var(--sa-color-warning-50, #fef2e6);--sa-icon-warning-hover: var(--sa-color-warning-100, #f8d9ac);--sa-icon-warning-pressed: var(--sa-color-warning-200, #f4c583);--sa-icon-warning-disable: var(--sa-color-warning-600, #8e5f1d);--sa-icon-secondary: var(--sa-color-secondary-300, #5468e1);--sa-icon-secondary-bolder: var(--sa-color-secondary-50, #e6e9fb);--sa-icon-secondary-hover: var(--sa-color-secondary-100, #b0b9f1);--sa-icon-secondary-pressed: var(--sa-color-secondary-200, #8a98ea);--sa-icon-secondary-disable: var(--sa-color-secondary-600, #001bbf);--sa-icon-brand-selected: var(--sa-color-brand-400, #3366b7);--sa-icon-error-selected: var(--sa-color-error-400, #ff758f);--sa-icon-success-selected: var(--sa-color-success-400, #52d698);--sa-icon-info-selected: var(--sa-color-info-400, #2ccaff);--sa-icon-warning-selected: var(--sa-color-warning-400, #ed9f30);--sa-background-primary: var(--sa-color-gray-1100, #1e1f21);--sa-background-primary-inverse: var(--sa-color-gray-1000, #292a2e);--sa-background-subtle: var(--sa-color-gray-800, #505258);--sa-background-hover: var(--sa-color-gray-600, #7d818a);--sa-background-pressed: var(--sa-color-gray-700, #6b6e76);--sa-background-disable: var(--sa-color-white-alpha-a20, #ceced912);--sa-background-overlay: var(--sa-color-black-alpha-a45, #00000073);--sa-background-brand: var(--sa-color-brand-300, #668cc9);--sa-background-brand-hover: var(--sa-color-brand-100, #ccd9ed);--sa-background-brand-pressed: var(--sa-color-brand-200, #99b3db);--sa-background-brand-disable: var(--sa-color-brand-600, #04254f);--sa-background-brand-subtle: var(--sa-color-brand-400, #3366b7);--sa-background-brand-subtle-hover: var(--sa-color-brand-300, #668cc9);--sa-background-brand-subtle-pressed: var(--sa-color-brand-200, #99b3db);--sa-background-brand-subtlest: var(--sa-color-brand-900, #02132b);--sa-background-error: var(--sa-color-error-500, #ff4d6d);--sa-background-error-hover: var(--sa-color-error-100, #ffccd5);--sa-background-error-pressed: var(--sa-color-error-300, #ff8fa3);--sa-background-error-disable: var(--sa-color-error-800, #800f2f);--sa-background-error-subtle: var(--sa-color-error-50, #fff0f3);--sa-background-error-subtlest: var(--sa-color-error-900, #590d22);--sa-background-error-subtlest-hover: var(--sa-color-error-600, #c9184a);--sa-background-error-subtlest-pressed: var(--sa-color-error-500, #ff4d6d);--sa-background-success: var(--sa-color-success-500, #30ce84);--sa-background-success-hover: var(--sa-color-success-100, #baeed6);--sa-background-success-pressed: var(--sa-color-success-200, #97e6c1);--sa-background-success-disable: var(--sa-color-success-600, #28ac6e);--sa-background-success-subtle: var(--sa-color-success-400, #52d698);--sa-background-success-subtlest: var(--sa-color-success-900, #10442c);--sa-background-success-subtlest-hover: var(--sa-color-success-600, #28ac6e);--sa-background-success-subtlest-pressed: var(--sa-color-success-500, #30ce84);--sa-background-info: var(--sa-color-info-500, #00abeb);--sa-background-info-hover: var(--sa-color-info-100, #def3ff);--sa-background-info-pressed: var(--sa-color-info-200, #b6eaff);--sa-background-info-disable: var(--sa-color-info-600, #0090d4);--sa-background-info-subtle: var(--sa-color-info-400, #2ccaff);--sa-background-info-subtlest: var(--sa-color-info-900, #04334d);--sa-background-info-subtlest-hover: var(--sa-color-info-600, #0090d4);--sa-background-info-subtlest-pressed: var(--sa-color-info-500, #00abeb);--sa-background-warning: var(--sa-color-warning-300, #f1b259);--sa-background-warning-hover: var(--sa-color-warning-100, #f8d9ac);--sa-background-warning-pressed: var(--sa-color-warning-200, #f4c583);--sa-background-warning-disable: var(--sa-color-warning-600, #8e5f1d);--sa-background-warning-subtle: var(--sa-color-warning-400, #ed9f30);--sa-background-warning-subtlest: var(--sa-color-warning-900, #241808);--sa-background-warning-subtlest-hover: var(--sa-color-warning-600, #8e5f1d);--sa-background-warning-subtlest-pressed: var(--sa-color-warning-500, #d18d2c);--sa-background-neutral: var(--sa-color-gray-900, #3b3d42);--sa-background-neutral-hover: var(--sa-color-gray-800, #505258);--sa-background-neutral-pressed: var(--sa-color-gray-700, #6b6e76);--sa-background-secondary: var(--sa-color-secondary-600, #001bbf);--sa-background-secondary-hover: var(--sa-color-secondary-300, #5468e1);--sa-background-secondary-pressed: var(--sa-color-secondary-200, #8a98ea);--sa-background-secondary-disable: var(--sa-color-secondary-600, #001bbf);--sa-background-secondary-subtle: var(--sa-color-secondary-800, #001174);--sa-border-primary: var(--sa-color-dark-1000, #cecfd2);--sa-border-primary-inverse: var(--sa-color-dark-400, #4b4d51);--sa-border-subtle: var(--sa-color-white-alpha-a30, #d9dae71a);--sa-border-bold: var(--sa-color-dark-500, #63666b);--sa-border-disabled: var(--sa-color-white-alpha-a10, #bdbdbd09);--sa-border-focused: var(--sa-color-brand-300, #668cc9);--sa-border-input: var(--sa-color-dark-500, #63666b);--sa-border-selected: var(--sa-color-brand-400, #3366b7);--sa-border-brand: var(--sa-color-brand-400, #3366b7);--sa-border-brand-disable: var(--sa-color-brand-600, #04254f);--sa-border-danger: var(--sa-color-error-500, #ff4d6d);--sa-border-danger-subtle: var(--sa-color-error-700, #a4133c);--sa-border-danger-disable: var(--sa-color-error-600, #c9184a);--sa-border-success: var(--sa-color-success-500, #30ce84);--sa-border-success-subtle: var(--sa-color-success-700, #208958);--sa-border-success-disable: var(--sa-color-success-600, #28ac6e);--sa-border-info: var(--sa-color-info-500, #00abeb);--sa-border-info-subtle: var(--sa-color-info-700, #0073ab);--sa-border-warning: var(--sa-color-warning-200, #f4c583);--sa-border-warning-subtle: var(--sa-color-warning-700, #5f4013);--sa-accent-primary: var(--sa-color-gray-100, #f8f8f8);--sa-accent-subtle: var(--sa-color-dark-200, #303134);--sa-accent-success: var(--sa-color-success-200, #97e6c1);--sa-accent-success-subtle: var(--sa-color-success-800, #186742);--sa-accent-danger: var(--sa-color-error-200, #ffb3c1);--sa-accent-danger-subtle: var(--sa-color-error-800, #800f2f);--sa-accent-info: var(--sa-color-brand-200, #99b3db);--sa-accent-info-subtle: var(--sa-color-info-800, #00608d);--sa-accent-warning: var(--sa-color-warning-200, #f4c583);--sa-accent-warning-subtle: var(--sa-color-warning-500, #d18d2c)}:root{--sa-radii-none: 0;--sa-radii-xs: .25rem;--sa-radii-sm: .375rem;--sa-radii-md: .5rem;--sa-radii-lg: .75rem;--sa-radii-xl: .875rem;--sa-radii-2xl: 1rem;--sa-radii-full: 12rem;--sa-radii-rounded: 8px;--sa-radii-circular: 192px;--sa-spacing-0: 0rem;--sa-spacing-1: .063rem;--sa-spacing-2: .125rem;--sa-spacing-4: .25rem;--sa-spacing-6: .375rem;--sa-spacing-8: .5rem;--sa-spacing-10: .625rem;--sa-spacing-12: .75rem;--sa-spacing-14: .875rem;--sa-spacing-16: 1rem;--sa-spacing-18: 1.125rem;--sa-spacing-20: 1.25rem;--sa-spacing-24: 1.5rem;--sa-spacing-28: 1.75rem;--sa-spacing-32: 2rem;--sa-spacing-36: 2.25rem;--sa-spacing-40: 2.5rem;--sa-spacing-48: 3rem;--sa-spacing-64: 4rem;--sa-spacing-80: 5rem;--sa-spacing-96: 6rem;--sa-spacing-128: 8rem;--sa-spacing-160: 10rem;--sa-spacing-192: 12rem;--sa-spacing-224: 14rem;--sa-spacing-256: 16rem;--sa-spacing-xs: .25rem;--sa-spacing-sm: .5rem;--sa-spacing-md: .75rem;--sa-spacing-lg: 1rem;--sa-spacing-xl: 1.5rem;--sa-spacing-2xl: 2rem;--sa-spacing-3xl: 4rem;--sa-font-family: "Inter", -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";--sa-font-size-xs: .625rem;--sa-font-size-sm: .75rem;--sa-font-size-md: .875rem;--sa-font-size-lg: 1rem;--sa-font-size-xl: 1.125rem;--sa-font-size-2xl: 1.25rem;--sa-font-size-3xl: 1.5rem;--sa-font-size-4xl: 2rem;--sa-font-size-5xl: 2.25rem;--sa-font-size-6xl: 3rem;--sa-font-weight-hairline: 100;--sa-font-weight-thin: 100;--sa-font-weight-light: 200;--sa-font-weight-normal: 300;--sa-font-weight-medium: 400;--sa-font-weight-semibold: 500;--sa-font-weight-bold: 600;--sa-font-weight-extrabold: 700;--sa-font-weight-black: 800;--sa-line-height-3: .75rem;--sa-line-height-4: 1rem;--sa-line-height-5: 1.25rem;--sa-line-height-6: 1.5rem;--sa-line-height-7: 1.75rem;--sa-line-height-8: 1.875rem;--sa-line-height-9: 2.25rem;--sa-line-height-10: 2.5rem;--sa-line-height-none: 1;--sa-line-height-tight: 1.25;--sa-line-height-snug: 1.375;--sa-line-height-normal: 1.5;--sa-line-height-relaxed: 1.625;--sa-line-height-loose: 2;--sa-border: 1px;--sa-border-0: 0px;--sa-border-2: 2px;--sa-border-4: 4px;--sa-border-8: 8px;--sa-shadow-sm: 0 1px 2px 0 #0000000d;--sa-shadow-md: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--sa-shadow-lg: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--sa-shadow-xl: 0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a;--sa-shadow-2xl: 0 25px 50px -12px #00000040;--sa-shadow-inner: inset 0 2px 4px 0 #0000000d;--sa-shadow-card: 0px 4px 35px 0px #7090b040;--sa-h-0: 0px;--sa-h-0-5: .125rem;--sa-h-1: .25rem;--sa-h-1-5: .375rem;--sa-h-2: .5rem;--sa-h-2-5: .625rem;--sa-h-3: .75rem;--sa-h-3-5: .875rem;--sa-h-4: 1rem;--sa-h-5: 1.25rem;--sa-h-6: 1.5rem;--sa-h-7: 1.75rem;--sa-h-8: 2rem;--sa-h-9: 2.25rem;--sa-h-10: 2.5rem;--sa-h-11: 2.75rem;--sa-h-12: 3rem;--sa-h-14: 3.5rem;--sa-h-16: 4rem;--sa-h-20: 5rem;--sa-h-24: 6rem;--sa-h-28: 7rem;--sa-h-32: 8rem;--sa-h-36: 9rem;--sa-h-40: 10rem;--sa-h-44: 11rem;--sa-h-48: 12rem;--sa-h-52: 13rem;--sa-h-56: 14rem;--sa-h-60: 15rem;--sa-h-64: 16rem;--sa-h-72: 18rem;--sa-h-80: 20rem;--sa-h-96: 24rem;--sa-h-auto: auto;--sa-h-px: 1px;--sa-h-full: 100%;--sa-h-screen: 100vh;--sa-h-min: min-content;--sa-h-max: max-content;--sa-w-0: 0px;--sa-w-0-5: .125rem;--sa-w-1: .25rem;--sa-w-1-5: .375rem;--sa-w-2: .5rem;--sa-w-2-5: .625rem;--sa-w-3: .75rem;--sa-w-3-5: .875rem;--sa-w-4: 1rem;--sa-w-5: 1.25rem;--sa-w-6: 1.5rem;--sa-w-7: 1.75rem;--sa-w-8: 2rem;--sa-w-9: 2.25rem;--sa-w-10: 2.5rem;--sa-w-11: 2.75rem;--sa-w-12: 3rem;--sa-w-14: 3.5rem;--sa-w-16: 4rem;--sa-w-20: 5rem;--sa-w-24: 6rem;--sa-w-28: 7rem;--sa-w-32: 8rem;--sa-w-36: 9rem;--sa-w-40: 10rem;--sa-w-44: 11rem;--sa-w-48: 12rem;--sa-w-52: 13rem;--sa-w-56: 14rem;--sa-w-60: 15rem;--sa-w-64: 16rem;--sa-w-72: 18rem;--sa-w-80: 20rem;--sa-w-96: 24rem;--sa-w-auto: auto;--sa-w-px: 1px;--sa-w-full: 100%;--sa-w-screen: 100vw;--sa-w-min: min-content;--sa-w-max: max-content;--sa-z-sticky: 100;--sa-z-drawer: 1000;--sa-z-modal: 1100;--sa-z-popover: 1200;--sa-z-toast: 1300;--sa-z-tooltip: 1400}[data-theme=dark]{--sa-shadow-sm: 0 1px 2px 0 #00000040;--sa-shadow-md: 0 4px 6px -1px #0000004d, 0 2px 4px -2px #0000004d;--sa-shadow-lg: 0 10px 15px -3px #0000004d, 0 4px 6px -4px #0000004d;--sa-shadow-xl: 0 20px 25px -5px #0000005c, 0 8px 10px -6px #0000005c;--sa-shadow-2xl: 0 25px 50px -12px #00000080;--sa-shadow-inner: inset 0 2px 4px 0 #00000040;--sa-shadow-card: 0px 4px 35px 0px #00000066}body{color:var(--sa-text-primary, #292a2e)}:root{--sa-admin-base-icon-color: var(--sa-color-gray-600, #7d818a)}*::-webkit-scrollbar{display:none}html{scrollbar-width:none}body{-ms-overflow-style:none;background-color:var(--sa-background-primary, #ffffff)}body{font-family:var(--sa-font-family, "Inter", sans-serif)}button,input,optgroup,select,textarea{font-family:inherit}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}[data-class=otp-input] .sa-input{text-align:center}[data-class=otp-input] .sa-input-placeholder{width:100%;text-align:center;flex:1;left:0}@keyframes pageLayoutEnter{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion: reduce){@keyframes pageLayoutEnter{0%{opacity:1;transform:none}to{opacity:1;transform:none}}}@keyframes fadeInDropdown{0%{opacity:0;transform:translateY(-8px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ts-filter-dropdown-options::-webkit-scrollbar{width:6px}.ts-filter-dropdown-options::-webkit-scrollbar-track{background:transparent}.ts-filter-dropdown-options::-webkit-scrollbar-thumb{background:var(--sa-border-bold, #7d818a);border-radius:3px}.ts-filter-dropdown-options::-webkit-scrollbar-thumb:hover{background:var(--sa-text-subtle, #8c8f97)}._lyd-root_1g78i_1{--lyd-edge: var(--sa-spacing-lg, 1rem);--lyd-max-w: 1200px;--lyd-max-h: 90dvh;--lyd-bg: var(--sa-background-primary, #ffffff);--lyd-overlay: var(--sa-background-overlay, rgba(0, 0, 0, .45));--lyd-border: var(--sa-border-subtle, rgba(0, 0, 0, .08));--lyd-radius: var(--sa-radii-sm, .375rem);--lyd-shadow: var( --sa-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1) );--lyd-duration: .2s;--lyd-easing: cubic-bezier(.32, .72, 0, 1);position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--sa-z-modal, 1100);display:flex;align-items:center;justify-content:center}@media (max-width: 480px){._lyd-root_1g78i_1{--lyd-edge: .5rem}}._lyd-backdrop_1g78i_38{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--lyd-overlay);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);animation:_lyd-fade-in_1g78i_1 var(--lyd-duration) var(--lyd-easing)}._lyd-panel_1g78i_47{position:absolute;background:var(--lyd-bg);box-shadow:var(--lyd-shadow);display:flex;flex-direction:column;overflow:hidden}._lyd-modal_1g78i_58{position:relative;width:min(var(--lyd-max-w),calc(100vw - (var(--lyd-edge) * 2)));height:min(var(--lyd-max-h),calc(100dvh - (var(--lyd-edge) * 2)));border-radius:var(--lyd-radius);animation:_lyd-fade-in_1g78i_1 var(--lyd-duration) var(--lyd-easing)}._lyd-fullscreen_1g78i_72{top:0;right:0;bottom:0;left:0;width:100vw;height:100dvh;border-radius:0;animation:_lyd-fade-in_1g78i_1 var(--lyd-duration) var(--lyd-easing)}._lyd-sidebar_1g78i_80{top:0;right:0;width:min(var(--lyd-max-w),100vw);height:100dvh;border-top-left-radius:var(--lyd-radius);border-bottom-left-radius:var(--lyd-radius);animation:_lyd-fade-in_1g78i_1 var(--lyd-duration) var(--lyd-easing)}@media (max-width: 767px){._lyd-modal_1g78i_58,._lyd-sidebar_1g78i_80{bottom:0;top:0;left:0;right:0;transform:none;width:100vw;height:100dvh;border-radius:0;animation:_lyd-fade-in_1g78i_1 var(--lyd-duration) var(--lyd-easing)}}._lyd-header_1g78i_110{flex-shrink:0;display:flex;align-items:center;gap:var(--sa-spacing-md, .75rem);padding:var(--sa-spacing-md, .75rem) var(--sa-spacing-lg, 1rem);border-bottom:1px solid var(--lyd-border);background:var(--lyd-bg);min-height:56px}._lyd-header-content_1g78i_121{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:var(--sa-spacing-sm, .5rem)}._lyd-header-actions_1g78i_129{flex-shrink:0;display:flex;align-items:center;gap:var(--sa-spacing-xs, .25rem)}._lyd-main_1g78i_136{flex:1 1 auto;min-height:0;display:flex;overflow:hidden}._lyd-body_1g78i_143{flex:1 1 auto;min-width:0;overflow:auto}._lyd-aside_1g78i_149{flex:0 0 var(--lyd-aside-w, 360px);max-width:var(--lyd-aside-w, 360px);min-width:0;border-left:1px solid var(--lyd-border);overflow:auto;background:var(--lyd-bg);transition:flex-basis .2s ease,max-width .2s ease}@media (max-width: 767px){._lyd-aside_1g78i_149{display:none}}._lyd-footer_1g78i_165{flex-shrink:0;display:flex;align-items:center;justify-content:flex-end;gap:var(--sa-spacing-sm, .5rem);padding:var(--sa-spacing-md, .75rem) var(--sa-spacing-lg, 1rem);border-top:1px solid var(--lyd-border);background:var(--lyd-bg)}._lyd-vm-group_1g78i_178{display:inline-flex;align-items:center;border:1px solid var(--lyd-border);border-radius:var(--lyd-radius);overflow:hidden}._lyd-vm-btn_1g78i_186{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;cursor:pointer;color:var(--sa-text-subtle, #6b7280);transition:background-color .15s ease,color .15s ease}._lyd-vm-btn_1g78i_186:hover{background:var(--sa-background-surface-hover, rgba(0, 0, 0, .04));color:var(--sa-text-primary, #292a2e)}._lyd-vm-btn_1g78i_186[data-active=true]{background:var(--sa-background-brand-subtlest, rgba(51, 102, 183, .08));color:var(--sa-text-brand, #3366b7)}._lyd-close-btn_1g78i_209{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:var(--lyd-radius);cursor:pointer;color:var(--sa-text-subtle, #6b7280);transition:background-color .15s ease,color .15s ease}._lyd-close-btn_1g78i_209:hover{background:var(--sa-background-surface-hover, rgba(0, 0, 0, .04));color:var(--sa-text-primary, #292a2e)}@media (max-width: 767px){._lyd-vm-group_1g78i_178{display:none}}@keyframes _lyd-fade-in_1g78i_1{0%{opacity:0}to{opacity:1}}@keyframes _lyd-scale-in_1g78i_1{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes _lyd-slide-in-right_1g78i_1{0%{transform:translate(100%)}to{transform:translate(0)}}
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";:root{--sa-color-brand-50: #e6edf6;--sa-color-brand-100: #ccd9ed;--sa-color-brand-200: #99b3db;--sa-color-brand-300: #668cc9;--sa-color-brand-400: #3366b7;--sa-color-brand-500: #1a4fa0;--sa-color-brand-600: #04254f;--sa-color-brand-700: #031f43;--sa-color-brand-800: #021937;--sa-color-brand-900: #02132b;--sa-color-secondary-50: #e6e9fb;--sa-color-secondary-100: #b0b9f1;--sa-color-secondary-200: #8a98ea;--sa-color-secondary-300: #5468e1;--sa-color-secondary-400: #334bdb;--sa-color-secondary-500: #001ed2;--sa-color-secondary-600: #001bbf;--sa-color-secondary-700: #001595;--sa-color-secondary-800: #001174;--sa-color-secondary-900: #00003c;--sa-color-error-50: #fff0f3;--sa-color-error-100: #ffccd5;--sa-color-error-200: #ffb3c1;--sa-color-error-300: #ff8fa3;--sa-color-error-400: #ff758f;--sa-color-error-500: #ff4d6d;--sa-color-error-600: #c9184a;--sa-color-error-700: #a4133c;--sa-color-error-800: #800f2f;--sa-color-error-900: #590d22;--sa-color-success-50: #ecfff6;--sa-color-success-100: #baeed6;--sa-color-success-200: #97e6c1;--sa-color-success-300: #75dead;--sa-color-success-400: #52d698;--sa-color-success-500: #30ce84;--sa-color-success-600: #28ac6e;--sa-color-success-700: #208958;--sa-color-success-800: #186742;--sa-color-success-900: #10442c;--sa-color-info-50: #effaff;--sa-color-info-100: #def3ff;--sa-color-info-200: #b6eaff;--sa-color-info-300: #75dbff;--sa-color-info-400: #2ccaff;--sa-color-info-500: #00abeb;--sa-color-info-600: #0090d4;--sa-color-info-700: #0073ab;--sa-color-info-800: #00608d;--sa-color-info-900: #04334d;--sa-color-warning-50: #fef2e6;--sa-color-warning-100: #f8d9ac;--sa-color-warning-200: #f4c583;--sa-color-warning-300: #f1b259;--sa-color-warning-400: #ed9f30;--sa-color-warning-500: #d18d2c;--sa-color-warning-600: #8e5f1d;--sa-color-warning-700: #5f4013;--sa-color-warning-800: #2f200a;--sa-color-warning-900: #241808;--sa-color-gray-50: #ffffff;--sa-color-gray-100: #f8f8f8;--sa-color-gray-200: #f0f1f2;--sa-color-gray-300: #dddee1;--sa-color-gray-400: #b7b9be;--sa-color-gray-500: #8c8f97;--sa-color-gray-600: #7d818a;--sa-color-gray-700: #6b6e76;--sa-color-gray-800: #505258;--sa-color-gray-900: #3b3d42;--sa-color-gray-1000: #292a2e;--sa-color-gray-1100: #1e1f21;--sa-color-dark-50: #18191a;--sa-color-dark-100: #1f1f21;--sa-color-dark-200: #303134;--sa-color-dark-300: #3d3f43;--sa-color-dark-400: #4b4d51;--sa-color-dark-500: #63666b;--sa-color-dark-600: #7e8188;--sa-color-dark-700: #96999e;--sa-color-dark-800: #a9abaf;--sa-color-dark-900: #bfc1c4;--sa-color-dark-1000: #cecfd2;--sa-color-dark-1100: #e2e3e4;--sa-color-black-alpha-a5: #1717170d;--sa-color-black-alpha-a10: #0515241a;--sa-color-black-alpha-a20: #0b120e33;--sa-color-black-alpha-a30: #080f214c;--sa-color-black-alpha-a50: #181a1980;--sa-color-black-alpha-a70: #181a19b2;--sa-color-white-alpha-a5: #bdbdbd0d;--sa-color-white-alpha-a10: #bdbdbd1a;--sa-color-white-alpha-a20: #ceced933;--sa-color-white-alpha-a30: #d9dae74c;--sa-color-white-alpha-a50: #e3e4f280;--sa-color-white-alpha-a70: #e8edfdb2;--sa-color-white-alpha-a80: #e5e9f6cc;--sa-color-white-alpha-a90: #e5e9f6e6;--sa-color-gray-alpha-a10: #78867f1a;--sa-color-gray-alpha-a16: #78867f29;--sa-color-gray-alpha-a20: #78867f33;--sa-color-gray-alpha-a28: #78867f47;--sa-color-gray-alpha-a62: #78867f9e;--sa-color-black-alpha-a7: #00000012;--sa-color-black-alpha-a8: #00000014;--sa-color-black-alpha-a45: #00000073;--sa-color-white-alpha-half: #ffffff80;--sa-color-info-alpha-a10: #64b5f61a}:root{--sa-text-primary: var(--sa-color-gray-1000, #292a2e);--sa-text-primary-inverse: var(--sa-color-gray-50, #ffffff);--sa-text-brand: var(--sa-color-brand-700, #031f43);--sa-text-brand-bolder: var(--sa-color-brand-900, #02132b);--sa-text-brand-hover: var(--sa-color-brand-900, #02132b);--sa-text-brand-pressed: var(--sa-color-brand-800, #021937);--sa-text-brand-disable: var(--sa-color-brand-300, #668cc9);--sa-text-error: var(--sa-color-error-700, #a4133c);--sa-text-error-bolder: var(--sa-color-error-900, #590d22);--sa-text-error-hover: var(--sa-color-error-900, #590d22);--sa-text-error-pressed: var(--sa-color-error-800, #800f2f);--sa-text-error-disable: var(--sa-color-error-300, #ff8fa3);--sa-text-success: var(--sa-color-success-700, #208958);--sa-text-success-bolder: var(--sa-color-success-900, #10442c);--sa-text-success-hover: var(--sa-color-success-900, #10442c);--sa-text-success-pressed: var(--sa-color-success-800, #186742);--sa-text-success-disable: var(--sa-color-success-300, #75dead);--sa-text-info: var(--sa-color-info-700, #0073ab);--sa-text-info-bolder: var(--sa-color-info-900, #04334d);--sa-text-info-hover: var(--sa-color-info-900, #04334d);--sa-text-info-pressed: var(--sa-color-info-800, #00608d);--sa-text-info-disable: var(--sa-color-info-300, #75dbff);--sa-text-subtle: var(--sa-color-gray-800, #505258);--sa-text-subtlest: var(--sa-color-gray-700, #6b6e76);--sa-text-hover: var(--sa-color-gray-800, #505258);--sa-text-pressed: var(--sa-color-gray-900, #3b3d42);--sa-text-disable: var(--sa-color-black-alpha-a50, #181a1980);--sa-text-bolder: var(--sa-color-gray-1100, #1e1f21);--sa-text-warning: var(--sa-color-warning-700, #5f4013);--sa-text-warning-bolder: var(--sa-color-warning-800, #2f200a);--sa-text-warning-hover: var(--sa-color-warning-900, #241808);--sa-text-warning-pressed: var(--sa-color-warning-800, #2f200a);--sa-text-warning-disable: var(--sa-color-warning-300, #f1b259);--sa-text-secondary: var(--sa-color-secondary-700, #001595);--sa-text-secondary-bolder: var(--sa-color-secondary-900, #00003c);--sa-text-secondary-hover: var(--sa-color-secondary-900, #00003c);--sa-text-secondary-pressed: var(--sa-color-secondary-800, #001174);--sa-text-secondary-disable: var(--sa-color-secondary-300, #5468e1);--sa-icon-primary: var(--sa-color-gray-1000, #292a2e);--sa-icon-primary-inverse: var(--sa-color-gray-50, #ffffff);--sa-icon-subtle: var(--sa-color-gray-800, #505258);--sa-icon-subtlest: var(--sa-color-gray-700, #6b6e76);--sa-icon-hover: var(--sa-color-gray-800, #505258);--sa-icon-pressed: var(--sa-color-gray-900, #3b3d42);--sa-icon-disable: var(--sa-color-black-alpha-a50, #181a1980);--sa-icon-bolder: var(--sa-color-gray-1100, #1e1f21);--sa-icon-brand: var(--sa-color-brand-700, #031f43);--sa-icon-brand-bolder: var(--sa-color-brand-900, #02132b);--sa-icon-brand-hover: var(--sa-color-brand-900, #02132b);--sa-icon-brand-pressed: var(--sa-color-brand-800, #021937);--sa-icon-brand-disable: var(--sa-color-brand-300, #668cc9);--sa-icon-error: var(--sa-color-error-700, #a4133c);--sa-icon-error-bolder: var(--sa-color-error-900, #590d22);--sa-icon-error-hover: var(--sa-color-error-900, #590d22);--sa-icon-error-pressed: var(--sa-color-error-800, #800f2f);--sa-icon-error-disable: var(--sa-color-error-300, #ff8fa3);--sa-icon-success: var(--sa-color-success-700, #208958);--sa-icon-success-bolder: var(--sa-color-success-900, #10442c);--sa-icon-success-hover: var(--sa-color-success-900, #10442c);--sa-icon-success-pressed: var(--sa-color-success-800, #186742);--sa-icon-success-disable: var(--sa-color-success-300, #75dead);--sa-icon-info: var(--sa-color-info-700, #0073ab);--sa-icon-info-bolder: var(--sa-color-info-900, #04334d);--sa-icon-info-hover: var(--sa-color-info-900, #04334d);--sa-icon-info-pressed: var(--sa-color-info-800, #00608d);--sa-icon-info-disable: var(--sa-color-info-300, #75dbff);--sa-icon-warning: var(--sa-color-warning-700, #5f4013);--sa-icon-warning-bolder: var(--sa-color-warning-800, #2f200a);--sa-icon-warning-hover: var(--sa-color-warning-900, #241808);--sa-icon-warning-pressed: var(--sa-color-warning-800, #2f200a);--sa-icon-warning-disable: var(--sa-color-warning-300, #f1b259);--sa-icon-secondary: var(--sa-color-secondary-700, #001595);--sa-icon-secondary-bolder: var(--sa-color-secondary-900, #00003c);--sa-icon-secondary-hover: var(--sa-color-secondary-900, #00003c);--sa-icon-secondary-pressed: var(--sa-color-secondary-800, #001174);--sa-icon-secondary-disable: var(--sa-color-secondary-300, #5468e1);--sa-icon-brand-selected: var(--sa-color-brand-600, #04254f);--sa-icon-error-selected: var(--sa-color-error-600, #c9184a);--sa-icon-success-selected: var(--sa-color-success-600, #28ac6e);--sa-icon-info-selected: var(--sa-color-info-600, #0090d4);--sa-icon-warning-selected: var(--sa-color-warning-600, #8e5f1d);--sa-background-primary: var(--sa-color-gray-50, #ffffff);--sa-background-primary-inverse: var(--sa-color-gray-100, #f8f8f8);--sa-background-subtle: var(--sa-color-gray-300, #dddee1);--sa-background-hover: var(--sa-color-gray-200, #f0f1f2);--sa-background-pressed: var(--sa-color-gray-300, #dddee1);--sa-background-disable: var(--sa-color-black-alpha-a5, #1717170d);--sa-background-overlay: var(--sa-color-black-alpha-a45, #00000073);--sa-background-brand: var(--sa-color-brand-600, #04254f);--sa-background-brand-hover: var(--sa-color-brand-800, #021937);--sa-background-brand-pressed: var(--sa-color-brand-900, #02132b);--sa-background-brand-disable: var(--sa-color-brand-100, #ccd9ed);--sa-background-brand-subtle: var(--sa-color-brand-200, #99b3db);--sa-background-brand-subtle-hover: var(--sa-color-brand-300, #668cc9);--sa-background-brand-subtle-pressed: var(--sa-color-brand-400, #3366b7);--sa-background-brand-subtlest: var(--sa-color-brand-50, #e6edf6);--sa-background-error: var(--sa-color-error-600, #c9184a);--sa-background-error-hover: var(--sa-color-error-500, #ff4d6d);--sa-background-error-pressed: var(--sa-color-error-600, #c9184a);--sa-background-error-disable: var(--sa-color-error-100, #ffccd5);--sa-background-error-subtle: var(--sa-color-error-100, #ffccd5);--sa-background-error-subtlest: var(--sa-color-error-50, #fff0f3);--sa-background-error-subtlest-hover: var(--sa-color-error-100, #ffccd5);--sa-background-error-subtlest-pressed: var(--sa-color-error-300, #ff8fa3);--sa-background-success: var(--sa-color-success-800, #186742);--sa-background-success-hover: var(--sa-color-success-500, #30ce84);--sa-background-success-pressed: var(--sa-color-success-600, #28ac6e);--sa-background-success-disable: var(--sa-color-success-100, #baeed6);--sa-background-success-subtle: var(--sa-color-success-200, #97e6c1);--sa-background-success-subtlest: var(--sa-color-success-50, #ecfff6);--sa-background-success-subtlest-hover: var(--sa-color-success-100, #baeed6);--sa-background-success-subtlest-pressed: var(--sa-color-success-300, #75dead);--sa-background-info: var(--sa-color-info-700, #0073ab);--sa-background-info-hover: var(--sa-color-info-500, #00abeb);--sa-background-info-pressed: var(--sa-color-info-600, #0090d4);--sa-background-info-disable: var(--sa-color-info-100, #def3ff);--sa-background-info-subtle: var(--sa-color-info-200, #b6eaff);--sa-background-info-subtlest: var(--sa-color-info-50, #effaff);--sa-background-info-subtlest-hover: var(--sa-color-info-100, #def3ff);--sa-background-info-subtlest-pressed: var(--sa-color-info-300, #75dbff);--sa-background-warning: var(--sa-color-warning-600, #8e5f1d);--sa-background-warning-hover: var(--sa-color-warning-500, #d18d2c);--sa-background-warning-pressed: var(--sa-color-warning-600, #8e5f1d);--sa-background-warning-disable: var(--sa-color-warning-100, #f8d9ac);--sa-background-warning-subtle: var(--sa-color-warning-200, #f4c583);--sa-background-warning-subtlest: var(--sa-color-warning-50, #fef2e6);--sa-background-warning-subtlest-hover: var(--sa-color-warning-100, #f8d9ac);--sa-background-warning-subtlest-pressed: var(--sa-color-warning-300, #f1b259);--sa-background-neutral: var(--sa-color-gray-200, #f0f1f2);--sa-background-neutral-hover: var(--sa-color-gray-300, #dddee1);--sa-background-neutral-pressed: var(--sa-color-gray-400, #b7b9be);--sa-background-secondary: var(--sa-color-secondary-500, #001ed2);--sa-background-secondary-hover: var(--sa-color-secondary-600, #001bbf);--sa-background-secondary-pressed: var(--sa-color-secondary-700, #001595);--sa-background-secondary-disable: var(--sa-color-secondary-100, #b0b9f1);--sa-background-secondary-subtle: var(--sa-color-secondary-100, #b0b9f1);--sa-border-primary: var(--sa-color-gray-1000, #292a2e);--sa-border-primary-inverse: var(--sa-color-gray-50, #ffffff);--sa-border-subtle: var(--sa-color-black-alpha-a10, #0515241a);--sa-border-bold: var(--sa-color-gray-600, #7d818a);--sa-border-disabled: var(--sa-color-black-alpha-a5, #1717170d);--sa-border-focused: var(--sa-color-brand-500, #1a4fa0);--sa-border-input: var(--sa-color-gray-500, #8c8f97);--sa-border-selected: var(--sa-color-brand-700, #031f43);--sa-border-brand: var(--sa-color-brand-700, #031f43);--sa-border-brand-disable: var(--sa-color-brand-200, #99b3db);--sa-border-danger: var(--sa-color-error-600, #c9184a);--sa-border-danger-subtle: var(--sa-color-error-200, #ffb3c1);--sa-border-danger-disable: var(--sa-color-error-200, #ffb3c1);--sa-border-success: var(--sa-color-success-600, #28ac6e);--sa-border-success-subtle: var(--sa-color-success-200, #97e6c1);--sa-border-success-disable: var(--sa-color-success-200, #97e6c1);--sa-border-info: var(--sa-color-info-600, #0090d4);--sa-border-info-subtle: var(--sa-color-info-200, #b6eaff);--sa-border-warning: var(--sa-color-warning-700, #5f4013);--sa-border-warning-subtle: var(--sa-color-warning-200, #f4c583);--sa-accent-primary: var(--sa-color-gray-1100, #1e1f21);--sa-accent-subtle: var(--sa-color-gray-200, #f0f1f2);--sa-accent-success: var(--sa-color-success-700, #208958);--sa-accent-success-subtle: var(--sa-color-success-50, #ecfff6);--sa-accent-danger: var(--sa-color-error-700, #a4133c);--sa-accent-danger-subtle: var(--sa-color-error-50, #fff0f3);--sa-accent-info: var(--sa-color-info-700, #0073ab);--sa-accent-info-subtle: var(--sa-color-info-50, #effaff);--sa-accent-warning: var(--sa-color-warning-400, #ed9f30);--sa-accent-warning-subtle: var(--sa-color-warning-50, #fef2e6)}[data-theme=dark]{--sa-text-primary: var(--sa-color-gray-50, #ffffff);--sa-text-primary-inverse: var(--sa-color-gray-1100, #1e1f21);--sa-text-brand: var(--sa-color-brand-300, #668cc9);--sa-text-brand-bolder: var(--sa-color-brand-50, #e6edf6);--sa-text-brand-hover: var(--sa-color-brand-100, #ccd9ed);--sa-text-brand-pressed: var(--sa-color-brand-200, #99b3db);--sa-text-brand-disable: var(--sa-color-brand-600, #04254f);--sa-text-error: var(--sa-color-error-300, #ff8fa3);--sa-text-error-bolder: var(--sa-color-error-50, #fff0f3);--sa-text-error-hover: var(--sa-color-error-100, #ffccd5);--sa-text-error-pressed: var(--sa-color-error-200, #ffb3c1);--sa-text-error-disable: var(--sa-color-error-600, #c9184a);--sa-text-success: var(--sa-color-success-500, #30ce84);--sa-text-success-bolder: var(--sa-color-success-50, #ecfff6);--sa-text-success-hover: var(--sa-color-success-100, #baeed6);--sa-text-success-pressed: var(--sa-color-success-200, #97e6c1);--sa-text-success-disable: var(--sa-color-success-600, #28ac6e);--sa-text-info: var(--sa-color-info-300, #75dbff);--sa-text-info-bolder: var(--sa-color-info-50, #effaff);--sa-text-info-hover: var(--sa-color-info-100, #def3ff);--sa-text-info-pressed: var(--sa-color-info-200, #b6eaff);--sa-text-info-disable: var(--sa-color-info-600, #0090d4);--sa-text-subtle: var(--sa-color-gray-500, #8c8f97);--sa-text-subtlest: var(--sa-color-gray-600, #7d818a);--sa-text-hover: var(--sa-color-dark-400, #4b4d51);--sa-text-pressed: var(--sa-color-dark-200, #303134);--sa-text-disable: var(--sa-color-white-alpha-a20, #ceced933);--sa-text-bolder: var(--sa-color-gray-50, #ffffff);--sa-text-warning: var(--sa-color-warning-300, #f1b259);--sa-text-warning-bolder: var(--sa-color-warning-50, #fef2e6);--sa-text-warning-hover: var(--sa-color-warning-100, #f8d9ac);--sa-text-warning-pressed: var(--sa-color-warning-200, #f4c583);--sa-text-warning-disable: var(--sa-color-warning-600, #8e5f1d);--sa-text-secondary: var(--sa-color-secondary-300, #5468e1);--sa-text-secondary-bolder: var(--sa-color-secondary-50, #e6e9fb);--sa-text-secondary-hover: var(--sa-color-secondary-100, #b0b9f1);--sa-text-secondary-pressed: var(--sa-color-secondary-200, #8a98ea);--sa-text-secondary-disable: var(--sa-color-secondary-600, #001bbf);--sa-icon-primary: var(--sa-color-dark-1100, #e2e3e4);--sa-icon-primary-inverse: var(--sa-color-gray-1100, #1e1f21);--sa-icon-subtle: var(--sa-color-gray-500, #8c8f97);--sa-icon-subtlest: var(--sa-color-gray-600, #7d818a);--sa-icon-hover: var(--sa-color-gray-1100, #1e1f21);--sa-icon-pressed: var(--sa-color-gray-1100, #1e1f21);--sa-icon-disable: var(--sa-color-gray-1100, #1e1f21);--sa-icon-bolder: var(--sa-color-gray-50, #ffffff);--sa-icon-brand: var(--sa-color-brand-300, #668cc9);--sa-icon-brand-bolder: var(--sa-color-brand-50, #e6edf6);--sa-icon-brand-hover: var(--sa-color-brand-100, #ccd9ed);--sa-icon-brand-pressed: var(--sa-color-brand-200, #99b3db);--sa-icon-brand-disable: var(--sa-color-brand-600, #04254f);--sa-icon-error: var(--sa-color-error-300, #ff8fa3);--sa-icon-error-bolder: var(--sa-color-error-50, #fff0f3);--sa-icon-error-hover: var(--sa-color-error-100, #ffccd5);--sa-icon-error-pressed: var(--sa-color-error-200, #ffb3c1);--sa-icon-error-disable: var(--sa-color-error-600, #c9184a);--sa-icon-success: var(--sa-color-success-500, #30ce84);--sa-icon-success-bolder: var(--sa-color-success-50, #ecfff6);--sa-icon-success-hover: var(--sa-color-success-100, #baeed6);--sa-icon-success-pressed: var(--sa-color-success-200, #97e6c1);--sa-icon-success-disable: var(--sa-color-success-600, #28ac6e);--sa-icon-info: var(--sa-color-info-300, #75dbff);--sa-icon-info-bolder: var(--sa-color-info-50, #effaff);--sa-icon-info-hover: var(--sa-color-info-100, #def3ff);--sa-icon-info-pressed: var(--sa-color-info-200, #b6eaff);--sa-icon-info-disable: var(--sa-color-info-600, #0090d4);--sa-icon-warning: var(--sa-color-warning-300, #f1b259);--sa-icon-warning-bolder: var(--sa-color-warning-50, #fef2e6);--sa-icon-warning-hover: var(--sa-color-warning-100, #f8d9ac);--sa-icon-warning-pressed: var(--sa-color-warning-200, #f4c583);--sa-icon-warning-disable: var(--sa-color-warning-600, #8e5f1d);--sa-icon-secondary: var(--sa-color-secondary-300, #5468e1);--sa-icon-secondary-bolder: var(--sa-color-secondary-50, #e6e9fb);--sa-icon-secondary-hover: var(--sa-color-secondary-100, #b0b9f1);--sa-icon-secondary-pressed: var(--sa-color-secondary-200, #8a98ea);--sa-icon-secondary-disable: var(--sa-color-secondary-600, #001bbf);--sa-icon-brand-selected: var(--sa-color-brand-400, #3366b7);--sa-icon-error-selected: var(--sa-color-error-400, #ff758f);--sa-icon-success-selected: var(--sa-color-success-400, #52d698);--sa-icon-info-selected: var(--sa-color-info-400, #2ccaff);--sa-icon-warning-selected: var(--sa-color-warning-400, #ed9f30);--sa-background-primary: var(--sa-color-gray-1100, #1e1f21);--sa-background-primary-inverse: var(--sa-color-gray-1000, #292a2e);--sa-background-subtle: var(--sa-color-gray-800, #505258);--sa-background-hover: var(--sa-color-gray-1000, #292a2e);--sa-background-pressed: var(--sa-color-gray-900, #3b3d42);--sa-background-disable: var(--sa-color-white-alpha-a5, #bdbdbd0d);--sa-background-overlay: var(--sa-color-black-alpha-a45, #00000073);--sa-background-brand: var(--sa-color-brand-300, #668cc9);--sa-background-brand-hover: var(--sa-color-brand-100, #ccd9ed);--sa-background-brand-pressed: var(--sa-color-brand-200, #99b3db);--sa-background-brand-disable: var(--sa-color-brand-600, #04254f);--sa-background-brand-subtle: var(--sa-color-brand-400, #3366b7);--sa-background-brand-subtle-hover: var(--sa-color-brand-300, #668cc9);--sa-background-brand-subtle-pressed: var(--sa-color-brand-200, #99b3db);--sa-background-brand-subtlest: var(--sa-color-brand-900, #02132b);--sa-background-error: var(--sa-color-error-500, #ff4d6d);--sa-background-error-hover: var(--sa-color-error-100, #ffccd5);--sa-background-error-pressed: var(--sa-color-error-300, #ff8fa3);--sa-background-error-disable: var(--sa-color-error-800, #800f2f);--sa-background-error-subtle: var(--sa-color-error-50, #fff0f3);--sa-background-error-subtlest: var(--sa-color-error-900, #590d22);--sa-background-error-subtlest-hover: var(--sa-color-error-600, #c9184a);--sa-background-error-subtlest-pressed: var(--sa-color-error-500, #ff4d6d);--sa-background-success: var(--sa-color-success-500, #30ce84);--sa-background-success-hover: var(--sa-color-success-100, #baeed6);--sa-background-success-pressed: var(--sa-color-success-200, #97e6c1);--sa-background-success-disable: var(--sa-color-success-600, #28ac6e);--sa-background-success-subtle: var(--sa-color-success-400, #52d698);--sa-background-success-subtlest: var(--sa-color-success-900, #10442c);--sa-background-success-subtlest-hover: var(--sa-color-success-600, #28ac6e);--sa-background-success-subtlest-pressed: var(--sa-color-success-500, #30ce84);--sa-background-info: var(--sa-color-info-500, #00abeb);--sa-background-info-hover: var(--sa-color-info-100, #def3ff);--sa-background-info-pressed: var(--sa-color-info-200, #b6eaff);--sa-background-info-disable: var(--sa-color-info-600, #0090d4);--sa-background-info-subtle: var(--sa-color-info-400, #2ccaff);--sa-background-info-subtlest: var(--sa-color-info-900, #04334d);--sa-background-info-subtlest-hover: var(--sa-color-info-600, #0090d4);--sa-background-info-subtlest-pressed: var(--sa-color-info-500, #00abeb);--sa-background-warning: var(--sa-color-warning-300, #f1b259);--sa-background-warning-hover: var(--sa-color-warning-100, #f8d9ac);--sa-background-warning-pressed: var(--sa-color-warning-200, #f4c583);--sa-background-warning-disable: var(--sa-color-warning-600, #8e5f1d);--sa-background-warning-subtle: var(--sa-color-warning-400, #ed9f30);--sa-background-warning-subtlest: var(--sa-color-warning-900, #241808);--sa-background-warning-subtlest-hover: var(--sa-color-warning-600, #8e5f1d);--sa-background-warning-subtlest-pressed: var(--sa-color-warning-500, #d18d2c);--sa-background-neutral: var(--sa-color-gray-900, #3b3d42);--sa-background-neutral-hover: var(--sa-color-gray-800, #505258);--sa-background-neutral-pressed: var(--sa-color-gray-700, #6b6e76);--sa-background-secondary: var(--sa-color-secondary-600, #001bbf);--sa-background-secondary-hover: var(--sa-color-secondary-300, #5468e1);--sa-background-secondary-pressed: var(--sa-color-secondary-200, #8a98ea);--sa-background-secondary-disable: var(--sa-color-secondary-600, #001bbf);--sa-background-secondary-subtle: var(--sa-color-secondary-800, #001174);--sa-border-primary: var(--sa-color-dark-1000, #cecfd2);--sa-border-primary-inverse: var(--sa-color-dark-400, #4b4d51);--sa-border-subtle: var(--sa-color-white-alpha-a10, #bdbdbd1a);--sa-border-bold: var(--sa-color-dark-500, #63666b);--sa-border-disabled: var(--sa-color-white-alpha-a5, #bdbdbd0d);--sa-border-focused: var(--sa-color-brand-300, #668cc9);--sa-border-input: var(--sa-color-dark-500, #63666b);--sa-border-selected: var(--sa-color-brand-400, #3366b7);--sa-border-brand: var(--sa-color-brand-400, #3366b7);--sa-border-brand-disable: var(--sa-color-brand-600, #04254f);--sa-border-danger: var(--sa-color-error-500, #ff4d6d);--sa-border-danger-subtle: var(--sa-color-error-700, #a4133c);--sa-border-danger-disable: var(--sa-color-error-600, #c9184a);--sa-border-success: var(--sa-color-success-500, #30ce84);--sa-border-success-subtle: var(--sa-color-success-700, #208958);--sa-border-success-disable: var(--sa-color-success-600, #28ac6e);--sa-border-info: var(--sa-color-info-500, #00abeb);--sa-border-info-subtle: var(--sa-color-info-700, #0073ab);--sa-border-warning: var(--sa-color-warning-200, #f4c583);--sa-border-warning-subtle: var(--sa-color-warning-700, #5f4013);--sa-accent-primary: var(--sa-color-gray-100, #f8f8f8);--sa-accent-subtle: var(--sa-color-dark-200, #303134);--sa-accent-success: var(--sa-color-success-200, #97e6c1);--sa-accent-success-subtle: var(--sa-color-success-800, #186742);--sa-accent-danger: var(--sa-color-error-200, #ffb3c1);--sa-accent-danger-subtle: var(--sa-color-error-800, #800f2f);--sa-accent-info: var(--sa-color-brand-200, #99b3db);--sa-accent-info-subtle: var(--sa-color-info-800, #00608d);--sa-accent-warning: var(--sa-color-warning-200, #f4c583);--sa-accent-warning-subtle: var(--sa-color-warning-500, #d18d2c)}:root{--sa-radii-none: 0;--sa-radii-xs: .25rem;--sa-radii-sm: .375rem;--sa-radii-md: .5rem;--sa-radii-lg: .75rem;--sa-radii-xl: .875rem;--sa-radii-2xl: 1rem;--sa-radii-full: 12rem;--sa-radii-rounded: 8px;--sa-radii-circular: 192px;--sa-spacing-0: 0rem;--sa-spacing-1: .063rem;--sa-spacing-2: .125rem;--sa-spacing-4: .25rem;--sa-spacing-6: .375rem;--sa-spacing-8: .5rem;--sa-spacing-10: .625rem;--sa-spacing-12: .75rem;--sa-spacing-14: .875rem;--sa-spacing-16: 1rem;--sa-spacing-18: 1.125rem;--sa-spacing-20: 1.25rem;--sa-spacing-24: 1.5rem;--sa-spacing-28: 1.75rem;--sa-spacing-32: 2rem;--sa-spacing-36: 2.25rem;--sa-spacing-40: 2.5rem;--sa-spacing-48: 3rem;--sa-spacing-64: 4rem;--sa-spacing-80: 5rem;--sa-spacing-96: 6rem;--sa-spacing-128: 8rem;--sa-spacing-160: 10rem;--sa-spacing-192: 12rem;--sa-spacing-224: 14rem;--sa-spacing-256: 16rem;--sa-spacing-xs: .25rem;--sa-spacing-sm: .5rem;--sa-spacing-md: .75rem;--sa-spacing-lg: 1rem;--sa-spacing-xl: 1.5rem;--sa-spacing-2xl: 2rem;--sa-spacing-3xl: 4rem;--sa-font-family: "Inter", -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";--sa-font-size-xs: .625rem;--sa-font-size-sm: .75rem;--sa-font-size-md: .875rem;--sa-font-size-lg: 1rem;--sa-font-size-xl: 1.125rem;--sa-font-size-2xl: 1.25rem;--sa-font-size-3xl: 1.5rem;--sa-font-size-4xl: 2rem;--sa-font-size-5xl: 2.25rem;--sa-font-size-6xl: 3rem;--sa-font-weight-hairline: 100;--sa-font-weight-thin: 100;--sa-font-weight-light: 300;--sa-font-weight-normal: 400;--sa-font-weight-medium: 500;--sa-font-weight-semibold: 600;--sa-font-weight-bold: 700;--sa-font-weight-extrabold: 800;--sa-font-weight-black: 900;--sa-line-height-3: .75rem;--sa-line-height-4: 1rem;--sa-line-height-5: 1.25rem;--sa-line-height-6: 1.5rem;--sa-line-height-7: 1.75rem;--sa-line-height-8: 1.875rem;--sa-line-height-9: 2.25rem;--sa-line-height-10: 2.5rem;--sa-line-height-none: 1;--sa-line-height-tight: 1.25;--sa-line-height-snug: 1.375;--sa-line-height-normal: 1.5;--sa-line-height-relaxed: 1.625;--sa-line-height-loose: 2;--sa-border: 1px;--sa-border-0: 0px;--sa-border-2: 2px;--sa-border-4: 4px;--sa-border-8: 8px;--sa-shadow-sm: 0 1px 2px 0 #0000000d;--sa-shadow-md: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--sa-shadow-lg: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--sa-shadow-xl: 0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a;--sa-shadow-2xl: 0 25px 50px -12px #00000040;--sa-shadow-inner: inset 0 2px 4px 0 #0000000d;--sa-shadow-card: 0px 4px 35px 0px #7090b040;--sa-h-0: 0px;--sa-h-0-5: .125rem;--sa-h-1: .25rem;--sa-h-1-5: .375rem;--sa-h-2: .5rem;--sa-h-2-5: .625rem;--sa-h-3: .75rem;--sa-h-3-5: .875rem;--sa-h-4: 1rem;--sa-h-5: 1.25rem;--sa-h-6: 1.5rem;--sa-h-7: 1.75rem;--sa-h-8: 2rem;--sa-h-9: 2.25rem;--sa-h-10: 2.5rem;--sa-h-11: 2.75rem;--sa-h-12: 3rem;--sa-h-14: 3.5rem;--sa-h-16: 4rem;--sa-h-20: 5rem;--sa-h-24: 6rem;--sa-h-28: 7rem;--sa-h-32: 8rem;--sa-h-36: 9rem;--sa-h-40: 10rem;--sa-h-44: 11rem;--sa-h-48: 12rem;--sa-h-52: 13rem;--sa-h-56: 14rem;--sa-h-60: 15rem;--sa-h-64: 16rem;--sa-h-72: 18rem;--sa-h-80: 20rem;--sa-h-96: 24rem;--sa-h-auto: auto;--sa-h-px: 1px;--sa-h-full: 100%;--sa-h-screen: 100vh;--sa-h-min: min-content;--sa-h-max: max-content;--sa-w-0: 0px;--sa-w-0-5: .125rem;--sa-w-1: .25rem;--sa-w-1-5: .375rem;--sa-w-2: .5rem;--sa-w-2-5: .625rem;--sa-w-3: .75rem;--sa-w-3-5: .875rem;--sa-w-4: 1rem;--sa-w-5: 1.25rem;--sa-w-6: 1.5rem;--sa-w-7: 1.75rem;--sa-w-8: 2rem;--sa-w-9: 2.25rem;--sa-w-10: 2.5rem;--sa-w-11: 2.75rem;--sa-w-12: 3rem;--sa-w-14: 3.5rem;--sa-w-16: 4rem;--sa-w-20: 5rem;--sa-w-24: 6rem;--sa-w-28: 7rem;--sa-w-32: 8rem;--sa-w-36: 9rem;--sa-w-40: 10rem;--sa-w-44: 11rem;--sa-w-48: 12rem;--sa-w-52: 13rem;--sa-w-56: 14rem;--sa-w-60: 15rem;--sa-w-64: 16rem;--sa-w-72: 18rem;--sa-w-80: 20rem;--sa-w-96: 24rem;--sa-w-auto: auto;--sa-w-px: 1px;--sa-w-full: 100%;--sa-w-screen: 100vw;--sa-w-min: min-content;--sa-w-max: max-content;--sa-z-sticky: 100;--sa-z-drawer: 1000;--sa-z-modal: 1100;--sa-z-popover: 1200;--sa-z-toast: 1300;--sa-z-tooltip: 1400}[data-theme=dark]{--sa-shadow-sm: 0 1px 2px 0 #00000040;--sa-shadow-md: 0 4px 6px -1px #0000004d, 0 2px 4px -2px #0000004d;--sa-shadow-lg: 0 10px 15px -3px #0000004d, 0 4px 6px -4px #0000004d;--sa-shadow-xl: 0 20px 25px -5px #0000005c, 0 8px 10px -6px #0000005c;--sa-shadow-2xl: 0 25px 50px -12px #00000080;--sa-shadow-inner: inset 0 2px 4px 0 #00000040;--sa-shadow-card: 0px 4px 35px 0px #00000066}body{color:var(--sa-text-primary, #292a2e)}:root{--sa-admin-base-icon-color: var(--sa-color-gray-600, #7d818a)}*::-webkit-scrollbar{display:none}html{scrollbar-width:none}body{-ms-overflow-style:none;background-color:var(--sa-background-primary, #ffffff)}body{font-family:var(--sa-font-family, "Inter", sans-serif)}button,input,optgroup,select,textarea{font-family:inherit}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}[data-class=otp-input] .sa-input{text-align:center}[data-class=otp-input] .sa-input-placeholder{width:100%;text-align:center;flex:1;left:0}@keyframes pageLayoutEnter{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion: reduce){@keyframes pageLayoutEnter{0%{opacity:1;transform:none}to{opacity:1;transform:none}}}@keyframes fadeInDropdown{0%{opacity:0;transform:translateY(-8px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ts-filter-dropdown-options::-webkit-scrollbar{width:6px}.ts-filter-dropdown-options::-webkit-scrollbar-track{background:transparent}.ts-filter-dropdown-options::-webkit-scrollbar-thumb{background:var(--sa-border-bold, #7d818a);border-radius:3px}.ts-filter-dropdown-options::-webkit-scrollbar-thumb:hover{background:var(--sa-text-subtle, #8c8f97)}._lyd-root_1g78i_1{--lyd-edge: var(--sa-spacing-lg, 1rem);--lyd-max-w: 1200px;--lyd-max-h: 90dvh;--lyd-bg: var(--sa-background-primary, #ffffff);--lyd-overlay: var(--sa-background-overlay, rgba(0, 0, 0, .45));--lyd-border: var(--sa-border-subtle, rgba(0, 0, 0, .08));--lyd-radius: var(--sa-radii-sm, .375rem);--lyd-shadow: var( --sa-shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1) );--lyd-duration: .2s;--lyd-easing: cubic-bezier(.32, .72, 0, 1);position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--sa-z-modal, 1100);display:flex;align-items:center;justify-content:center}@media (max-width: 480px){._lyd-root_1g78i_1{--lyd-edge: .5rem}}._lyd-backdrop_1g78i_38{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--lyd-overlay);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px);animation:_lyd-fade-in_1g78i_1 var(--lyd-duration) var(--lyd-easing)}._lyd-panel_1g78i_47{position:absolute;background:var(--lyd-bg);box-shadow:var(--lyd-shadow);display:flex;flex-direction:column;overflow:hidden}._lyd-modal_1g78i_58{position:relative;width:min(var(--lyd-max-w),calc(100vw - (var(--lyd-edge) * 2)));height:min(var(--lyd-max-h),calc(100dvh - (var(--lyd-edge) * 2)));border-radius:var(--lyd-radius);animation:_lyd-fade-in_1g78i_1 var(--lyd-duration) var(--lyd-easing)}._lyd-fullscreen_1g78i_72{top:0;right:0;bottom:0;left:0;width:100vw;height:100dvh;border-radius:0;animation:_lyd-fade-in_1g78i_1 var(--lyd-duration) var(--lyd-easing)}._lyd-sidebar_1g78i_80{top:0;right:0;width:min(var(--lyd-max-w),100vw);height:100dvh;border-top-left-radius:var(--lyd-radius);border-bottom-left-radius:var(--lyd-radius);animation:_lyd-fade-in_1g78i_1 var(--lyd-duration) var(--lyd-easing)}@media (max-width: 767px){._lyd-modal_1g78i_58,._lyd-sidebar_1g78i_80{bottom:0;top:0;left:0;right:0;transform:none;width:100vw;height:100dvh;border-radius:0;animation:_lyd-fade-in_1g78i_1 var(--lyd-duration) var(--lyd-easing)}}._lyd-header_1g78i_110{flex-shrink:0;display:flex;align-items:center;gap:var(--sa-spacing-md, .75rem);padding:var(--sa-spacing-md, .75rem) var(--sa-spacing-lg, 1rem);border-bottom:1px solid var(--lyd-border);background:var(--lyd-bg);min-height:56px}._lyd-header-content_1g78i_121{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:var(--sa-spacing-sm, .5rem)}._lyd-header-actions_1g78i_129{flex-shrink:0;display:flex;align-items:center;gap:var(--sa-spacing-xs, .25rem)}._lyd-main_1g78i_136{flex:1 1 auto;min-height:0;display:flex;overflow:hidden}._lyd-body_1g78i_143{flex:1 1 auto;min-width:0;overflow:auto}._lyd-aside_1g78i_149{flex:0 0 var(--lyd-aside-w, 360px);max-width:var(--lyd-aside-w, 360px);min-width:0;border-left:1px solid var(--lyd-border);overflow:auto;background:var(--lyd-bg);transition:flex-basis .2s ease,max-width .2s ease}@media (max-width: 767px){._lyd-aside_1g78i_149{display:none}}._lyd-footer_1g78i_165{flex-shrink:0;display:flex;align-items:center;justify-content:flex-end;gap:var(--sa-spacing-sm, .5rem);padding:var(--sa-spacing-md, .75rem) var(--sa-spacing-lg, 1rem);border-top:1px solid var(--lyd-border);background:var(--lyd-bg)}._lyd-vm-group_1g78i_178{display:inline-flex;align-items:center;border:1px solid var(--lyd-border);border-radius:var(--lyd-radius);overflow:hidden}._lyd-vm-btn_1g78i_186{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;cursor:pointer;color:var(--sa-text-subtle, #6b7280);transition:background-color .15s ease,color .15s ease}._lyd-vm-btn_1g78i_186:hover{background:var(--sa-background-surface-hover, rgba(0, 0, 0, .04));color:var(--sa-text-primary, #292a2e)}._lyd-vm-btn_1g78i_186[data-active=true]{background:var(--sa-background-brand-subtlest, rgba(51, 102, 183, .08));color:var(--sa-text-brand, #3366b7)}._lyd-close-btn_1g78i_209{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:var(--lyd-radius);cursor:pointer;color:var(--sa-text-subtle, #6b7280);transition:background-color .15s ease,color .15s ease}._lyd-close-btn_1g78i_209:hover{background:var(--sa-background-surface-hover, rgba(0, 0, 0, .04));color:var(--sa-text-primary, #292a2e)}@media (max-width: 767px){._lyd-vm-group_1g78i_178{display:none}}@keyframes _lyd-fade-in_1g78i_1{0%{opacity:0}to{opacity:1}}@keyframes _lyd-scale-in_1g78i_1{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes _lyd-slide-in-right_1g78i_1{0%{transform:translate(100%)}to{transform:translate(0)}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starasia/admin",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.0",
|
|
4
4
|
"description": "Core Admin Dashboard for starasia UI",
|
|
5
5
|
"author": "Rizki Izzul Haq",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@starasia/accordion": "3.1.2",
|
|
53
|
-
"@starasia/alert": "5.0.
|
|
53
|
+
"@starasia/alert": "5.0.1",
|
|
54
54
|
"@starasia/avatar": "1.0.0",
|
|
55
55
|
"@starasia/badges": "4.0.0",
|
|
56
|
-
"@starasia/box": "7.3.
|
|
56
|
+
"@starasia/box": "7.3.2",
|
|
57
57
|
"@starasia/breadcrumb": "6.0.0",
|
|
58
58
|
"@starasia/button": "5.0.0",
|
|
59
59
|
"@starasia/card": "5.3.0",
|
|
60
60
|
"@starasia/checkbox": "5.0.0",
|
|
61
|
-
"@starasia/css": "5.
|
|
61
|
+
"@starasia/css": "5.1.0",
|
|
62
62
|
"@starasia/date": "7.0.0",
|
|
63
63
|
"@starasia/dialog": "5.0.0",
|
|
64
64
|
"@starasia/drawer": "3.3.1",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@starasia/pagination": "3.3.1",
|
|
74
74
|
"@starasia/progress": "4.3.0",
|
|
75
75
|
"@starasia/progress-stepper": "4.0.0",
|
|
76
|
-
"@starasia/radio": "5.0.
|
|
76
|
+
"@starasia/radio": "5.0.1",
|
|
77
77
|
"@starasia/skeleton": "3.1.1",
|
|
78
78
|
"@starasia/stepper": "4.0.0",
|
|
79
79
|
"@starasia/storage": "1.0.1",
|