@rue-js/design 0.0.39 → 0.1.1
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/rue-design.cjs.js +36466 -15981
- package/dist/rue-design.cjs.prod.js +1 -1
- package/dist/rue-design.d.ts +2482 -112
- package/dist/rue-design.esm-browser.js +38861 -17397
- package/dist/rue-design.esm-browser.prod.js +3 -1
- package/dist/rue-design.esm-bundler.js +36432 -15982
- package/dist/rue-design.global.js +38896 -17397
- package/dist/rue-design.global.prod.js +3 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let e=require("@rue-js/rue"),t=require("@rue-js/router");function n(eb,ey,ex){let eN=void 0===ex?ey||null:(()=>{let eb={};if(ey)for(let ex in ey)eb[ex]=ey[ex];return eb.key=ex,eb})(),ew=ey?ey.children:void 0;return Array.isArray(ew)?(0,e.h)(eb,eN,...ew):void 0===ew?(0,e.h)(eb,eN):(0,e.h)(eb,eN,ew)}var r=n,i=({type:eb,variant:ey,color:ex,banner:eN})=>eb||ey||(ex&&"default"!==ex?ex:eN?"warning":void 0),a=({type:eb,variant:ey,color:ex,outline:eN,dash:ew,soft:ek,direction:eC,title:e$,message:eS,description:ej,showIcon:eA,icon:ez,banner:eM,closable:eL,closeText:eT,closeIcon:eI,action:eO,onClose:eE,afterClose:eP,role:eR="alert",className:eF,children:eD,...eB})=>{let eq=i({type:eb,variant:ey,color:ex,banner:eM}),eW=e$??eS,eH=null!=ej,eV=null!=eW||eH,eK=eL??(null!=eT||null!=eI),eZ=eA??!!(eM||eV),eY="alert";eq&&(eY+=` alert-${eq}`),eN&&(eY+=" alert-outline"),ew&&(eY+=" alert-dash"),ek&&(eY+=" alert-soft"),eC&&(eY+=` alert-${eC}`),(eV||eZ)&&(eY+=` ${eV?"items-start":"items-center"} gap-3`),eM&&(eY+=" rounded-box border border-current/10"),eF&&(eY+=` ${eF}`);let eU=null!=eO||eK;return r("div",{role:eR??"alert",className:eY,...eB,children:[eZ?n("span",{className:"inline-flex size-5 shrink-0 self-center items-center justify-center rounded-full border border-current/15 text-[0.7rem] font-semibold","aria-hidden":"true",children:ez??("success"===eq?"✓":"warning"===eq?"!":"error"===eq?"\xd7":"i")}):null,eV?r("div",{className:"min-w-0 flex-1",children:[null==eW?null:n("div",{className:"font-semibold leading-6",children:eW}),eH?n("div",{className:"mt-1 text-sm leading-6 opacity-80",children:ej}):null,null==eD?null:n("div",{className:eH||null!=eW?"mt-3":"",children:eD})]}):n("div",{className:eV?"min-w-0 flex-1":"min-w-0 flex flex-1 items-center gap-2",children:eD}),eU?r("div",{className:`flex shrink-0 ${eV?"items-start":"items-center"} gap-2${"vertical"===eC?" w-full justify-end sm:w-auto":""}`,children:[eO,eK?n("button",{type:"button",className:`btn btn-ghost btn-xs shrink-0 text-current/70 hover:text-current${null==eT?" btn-circle":" px-2"}`,"aria-label":"Close alert",onClick:eb=>{let ey=eb.currentTarget?.closest('[role="alert"]');ey&&(ey.setAttribute("hidden","true"),ey.remove()),eE&&eE(eb),eP&&eP()},children:eT??eI??"\xd7"}):null]}):null]})},o=0,s=(eb,ey)=>eb?ey?`${eb} ${ey}`:eb:ey??"",c=eb=>{let ey=[];return eb.forEach(eb=>{ey.some(ey=>ey===eb)||ey.push(eb)}),ey},l=(eb,ey)=>{let ex=c(Array.isArray(eb)?eb:[]);return ey?ex:ex.slice(0,1)},u=eb=>null==eb?[]:[eb],d=(eb,ey,ex,eN,ew,ek)=>l(void 0===eN?void 0===ey?void 0===ew?void 0===ex?eb.filter(eb=>eb.open).map(eb=>eb.key):u(ex):ew:u(ey):eN,ek),f=(eb,ey,ex)=>"open"===ex||"close"!==ex&&("boolean"==typeof eb?eb:"boolean"==typeof ey&&ey),p=(eb,ey)=>"open"===ey?"collapse-open":"close"===ey?"collapse-close":eb?"collapse-open":"collapse-close",m=(eb,ey)=>{let ex=ey?.getRootNode?.(),eN=ex&&"function"==typeof ex.querySelectorAll?ex:"u">typeof document?document:null;return eN?Array.from(eN.querySelectorAll("[data-rue-accordion-group]")).filter(ey=>ey.dataset.rueAccordionGroup===eb):[]},h=eb=>Array.from(eb.children).find(eb=>eb instanceof HTMLInputElement&&("checkbox"===eb.type||"radio"===eb.type)),g=eb=>Array.from(eb.children).find(eb=>eb instanceof HTMLElement&&eb.classList.contains("collapse-title")),_=(eb,ey,ex)=>{if(!(eb instanceof HTMLElement))return;eb.classList.remove("collapse-open","collapse-close"),eb.classList.add(p(ey,ex));let eN=h(eb);eN&&eN.checked!==ey&&(eN.checked=ey),eb instanceof HTMLDetailsElement&&eb.open!==ey&&(eb.open=ey);let ew=g(eb);ew&&ew.setAttribute("aria-expanded",ey?"true":"false")},v=(eb,ey,ex,eN,ew)=>eN?ex?c([...eb,ey]):eb.filter(eb=>eb!==ey):ex?[ey]:ew?[]:eb.some(eb=>eb===ey)?[...eb]:[ey],y=eb=>eb?.type==="radio",b=eb=>null==eb.description&&null==eb.extra?eb.title:r("div",{className:"flex w-full items-start justify-between gap-3",children:[r("div",{className:"min-w-0 flex-1",children:[n("div",{children:eb.title}),null==eb.description?null:n("div",{className:s("mt-1 text-xs opacity-70",eb.descriptionClassName),children:eb.description})]}),null==eb.extra?null:n("div",{className:s("shrink-0 text-xs opacity-70",eb.extraClassName),children:eb.extra})]}),x=Object.assign(({icon:eb,force:ey,use:ex="radio",name:eN,open:ew,defaultOpen:ek,activeKey:eC,defaultActiveKey:e$,openKeys:eS,defaultOpenKeys:ej,multiple:eA,collapsible:ez,disabled:eM,className:eL,titleClassName:eT,contentClassName:eI,children:eO,items:eE,onChange:eP,onToggle:eR})=>{let eF=eE?.map((eb,ey)=>({...eb,key:eb.key??ey,index:ey}))??[],eD=(0,e.ref)(`rue-accordion-${o++}`),eB=(0,e.ref)(f(ew,ek,ey)),eq=(0,e.ref)(d(eF,eC,e$,eS,ej,eA)),eW=eN??eD.value,eH=eF.length>0,eV=void 0!==eS||void 0!==eC,eK="open"===ey||"close"!==ey&&(void 0===ew?eB.value:!!ew),eZ=()=>void 0===eS?void 0===eC?eq.value:l(u(eC),eA):l(eS,eA),eY=(eb,ex,eN)=>{let ew=eb.force??ey;if(eM||eb.disabled||ew)return;let ek=v(eZ(),eb.key,ex,eA,ez),eC=ek.some(ey=>ey===eb.key);eV||(eq.value=ek,m(eW,eN).forEach(eb=>{let ex=eF[Number(eb.dataset.rueAccordionIndex??-1)];if(!ex)return;let eN=ex.force??ey;_(eb,"open"===eN||"close"!==eN&&ek.some(eb=>eb===ex.key),eN)})),eP&&eP(eA?ek:ek[0]??null,{key:eb.key,index:eb.index,open:eC,item:eb})},eU=(eb,ex)=>{eM||ey||(void 0===ew&&(eB.value=eb,m(eW,ex).forEach(eb=>{let ex=eb.dataset.rueAccordionForce??ey,eN=h(eb);_(eb,"open"===ex||"close"!==ex&&(eb instanceof HTMLDetailsElement?eb.open:eN?.checked===!0),ex)})),eR&&eR(eb,{key:eW,index:0,open:eb}))};if(eH)return n(e.Fragment,{children:eF.map(eN=>{let ew=eN.use??ex,ek=eN.icon??eb,eC=eN.force??ey,e$="open"===eC||"close"!==eC&&eZ().some(eb=>eb===eN.key),eS=s("collapse",p(e$,eC));"arrow"===ek&&(eS+=" collapse-arrow"),"plus"===ek&&(eS+=" collapse-plus"),eL&&(eS+=` ${eL}`),eN.className&&(eS+=` ${eN.className}`),(eM||eN.disabled)&&(eS+=" opacity-70");let ej="arrow"===ek&&(null!=eN.description||null!=eN.extra)?"after:top-6":void 0,eO=s(s("collapse-title",eT),s(eN.titleClassName,ej)),eE=s(s("collapse-content",eI),eN.contentClassName);if("details"===ew)return r("details",{className:eS,name:eW,open:e$,"data-rue-accordion-group":eW,"data-rue-accordion-index":String(eN.index),"data-rue-accordion-force":eC,children:[n("summary",{className:eO,"aria-expanded":e$?"true":"false",onClick:eb=>{eb.preventDefault(),eY(eN,!e$,eb.currentTarget)},children:b(eN)}),n("div",{className:eE,children:eN.content})]},eN.key);let eP=eA?"checkbox":"radio";return r("div",{className:eS,"data-rue-accordion-group":eW,"data-rue-accordion-index":String(eN.index),"data-rue-accordion-force":eC,children:[n("input",{type:eP,name:"radio"===eP?eW:void 0,checked:e$,disabled:eM||eN.disabled||!!eC,onClick:eb=>{let ey=eb.currentTarget;ez&&e$&&y(ey)&&(eb.preventDefault(),ey.checked=!1,eY(eN,!1,ey))},onChange:eb=>{eY(eN,eb.target.checked,eb.currentTarget)}}),n("div",{className:eO,"aria-expanded":e$?"true":"false",children:b(eN)}),n("div",{className:eE,children:eN.content})]},eN.key)})});let eQ=s("collapse",p(eK,ey));return("arrow"===eb&&(eQ+=" collapse-arrow"),"plus"===eb&&(eQ+=" collapse-plus"),eL&&(eQ+=` ${eL}`),eM&&(eQ+=" opacity-70"),"details"===ex)?n("details",{className:eQ,name:eW,open:eK,"data-rue-accordion-group":eW,"data-rue-accordion-force":ey,onToggle:eb=>{let ex=eb.currentTarget.open;if(eM||ey){eb.currentTarget.open!==eK&&(eb.currentTarget.open=eK);return}eU(ex,eb.currentTarget)},children:eO}):r("div",{className:eQ,"data-rue-accordion-group":eW,"data-rue-accordion-force":ey,children:[n("input",{type:"radio",name:eW,checked:eK,disabled:eM||!!ey,onClick:eb=>{let ey=eb.currentTarget;ez&&eK&&y(ey)&&(eb.preventDefault(),ey.checked=!1,eU(!1,ey))},onChange:eb=>{eU(eb.target.checked,eb.currentTarget)}}),eO]})},{Title:({className:eb,children:ey,as:ex="div"})=>{let eN=s("collapse-title",eb);return"summary"===ex?n("summary",{className:eN,children:ey}):"button"===ex?n("button",{type:"button",className:eN,children:ey}):n("div",{className:eN,children:ey})},Content:({className:eb,children:ey})=>n("div",{className:s("collapse-content",eb),children:ey})}),S=(eb,ey)=>ey?`${eb} ${ey}`:eb,C=eb=>null!=eb&&!1!==eb&&""!==eb&&(!Array.isArray(eb)||eb.some(eb=>C(eb))),w=eb=>{switch(eb){case"small":return"sm";case"medium":case"middle":return"md";case"large":return"lg";default:return eb}},T=eb=>{switch(w(eb)){case"xs":case"sm":return"loading-xs";case"lg":return"loading-md";case"xl":return"loading-lg";default:return"loading-sm"}},E=eb=>{switch(eb){case"outlined":return{outline:!0,dash:!1,soft:!1,ghost:!1,link:!1};case"dashed":return{outline:!1,dash:!0,soft:!1,ghost:!1,link:!1};case"filled":return{outline:!1,dash:!1,soft:!0,ghost:!1,link:!1};case"text":return{outline:!1,dash:!1,soft:!1,ghost:!0,link:!1};case"link":return{outline:!1,dash:!1,soft:!1,ghost:!1,link:!0};default:return{outline:!1,dash:!1,soft:!1,ghost:!1,link:!1}}},D=eb=>eb?"object"==typeof eb?{active:!0,delay:"number"==typeof eb.delay&&eb.delay>0?eb.delay:0,icon:eb.icon}:{active:!0,delay:0}:{active:!1,delay:0},O=({size:eb})=>n("span",{className:`loading loading-spinner ${T(eb)}`.trim()}),k=({as:eb,type:ey,htmlType:ex,color:eN,shape:ew="default",size:ek,icon:eC,iconPlacement:e$="start",loading:eS,disabled:ej,danger:eA,active:ez,block:eM,wide:eL,className:eT,href:eI,target:eO,rel:eE,onClick:eP,children:eR,...eF})=>{let eD=E(ey),eB=eN??(eA?"danger":"default"),eq=w(ek),eW=D(eS),eH=!!ej||eW.active,eV=eb??(eI?"a":"button"),eK=eW.active,eZ=eK?eW.icon??n(O,{size:ek}):eC,eY=null!=eZ,eU=C(eR),eQ="btn";"default"!==eB&&(eQ+=` btn-${"danger"===eB?"error":eB}`),eq&&(eQ+=` btn-${eq}`),eD.outline&&(eQ+=" btn-outline"),eD.dash&&(eQ+=" btn-dash"),eD.soft&&(eQ+=" btn-soft"),eD.ghost&&(eQ+=" btn-ghost"),eD.link&&(eQ+=" btn-link"),ez&&(eQ+=" btn-active"),eM&&(eQ+=" btn-block"),eL&&(eQ+=" btn-wide"),"square"===ew&&(eQ+=" btn-square"),"circle"===ew&&(eQ+=" btn-circle"),"round"===ew&&(eQ+=" rounded-full"),eH&&"button"!==eV&&(eQ+=" btn-disabled"),eT&&(eQ+=` ${eT}`);let eG=S(eQ,eY&&eU?"gap-2":void 0),eJ=eb=>{if(eH){"function"==typeof eb.preventDefault&&eb.preventDefault(),"function"==typeof eb.stopPropagation&&eb.stopPropagation();return}eP&&eP(eb)};return"a"===eV?n("a",{...eF,href:eH?void 0:eI,target:eO,rel:"_blank"!==eO||eE?eE:"noreferrer",role:eI?eF.role:eF.role??"button",className:eG,"aria-disabled":eH?"true":void 0,"aria-busy":eK?"true":void 0,onClick:eJ,children:"end"===e$?r(e.Fragment,{children:[eU?n("span",{children:eR}):null,eY?n("span",{className:"inline-flex items-center justify-center","aria-hidden":eU?"true":void 0,children:eZ}):null]}):r(e.Fragment,{children:[eY?n("span",{className:"inline-flex items-center justify-center","aria-hidden":eU?"true":void 0,children:eZ}):null,eU?n("span",{children:eR}):null]})}):"div"===eV?n("div",{...eF,role:eF.role??"button",tabIndex:eF.tabIndex??(eH?-1:0),className:eG,"aria-disabled":eH?"true":void 0,"aria-busy":eK?"true":void 0,onClick:eJ,children:"end"===e$?r(e.Fragment,{children:[eU?n("span",{children:eR}):null,eY?n("span",{className:"inline-flex items-center justify-center","aria-hidden":eU?"true":void 0,children:eZ}):null]}):r(e.Fragment,{children:[eY?n("span",{className:"inline-flex items-center justify-center","aria-hidden":eU?"true":void 0,children:eZ}):null,eU?n("span",{children:eR}):null]})}):n("button",{...eF,className:eG,disabled:eH,type:ex??"button","aria-busy":eK?"true":void 0,onClick:eJ,children:"end"===e$?r(e.Fragment,{children:[eU?n("span",{children:eR}):null,eY?n("span",{className:"inline-flex items-center justify-center","aria-hidden":eU?"true":void 0,children:eZ}):null]}):r(e.Fragment,{children:[eY?n("span",{className:"inline-flex items-center justify-center","aria-hidden":eU?"true":void 0,children:eZ}):null,eU?n("span",{children:eR}):null]})})},A=(eb,ey)=>ey?`${eb} ${ey}`:eb,j=eb=>{switch(eb){case"small":return"sm";case"medium":case"middle":return"md";case"large":return"lg";default:return eb}},M=eb=>{switch(eb){case"outlined":return"card-border";case"dashed":return"card-dash";default:return""}},N=eb=>{let ey=j(eb);switch(ey){case"xs":case"sm":case"md":case"lg":case"xl":return ey;default:return}},P=(eb,ey,ex,eN)=>{let ew="tabs";return"box"===eb&&(ew+=" tabs-box"),"border"===eb&&(ew+=" tabs-border"),"lift"===eb&&(ew+=" tabs-lift"),"bottom"===ey&&(ew+=" tabs-bottom"),ex&&(ew+=` tabs-${ex}`),eN&&(ew+=` ${eN}`),ew},F=eb=>{if(!eb)return;let ey=eb.closest("[data-rue-card-tabs]");ey&&(ey.querySelectorAll("button.tab").forEach(eb=>{eb.classList.remove("tab-active")}),eb.classList.add("tab-active"))},I=({size:eb})=>{let ey=j(eb),ex=["w-4/5","w-full","w-3/4","w-2/3"];return r("div",{className:"space-y-3","aria-busy":"true","aria-live":"polite",children:[n("div",{className:"skeleton h-5 w-2/5 rounded-full"}),Array.from({length:"xs"===ey?2:"xl"===ey?4:3}).map((eb,ey)=>n("div",{className:`skeleton h-4 rounded-full ${ex[ey%ex.length]}`.trim()},`line-${ey}`))]})},L=Object.assign(({size:eb,border:ey,bordered:ex,dash:eN,side:ew,imageFull:ek,variant:eC,type:e$="default",hoverable:eS,loading:ej,title:eA,extra:ez,cover:eM,actions:eL,tabList:eT,activeTabKey:eI,defaultActiveTabKey:eO,tabBarExtraContent:eE,tabProps:eP,onTabChange:eR,className:eF,style:eD,headerClassName:eB,headerStyle:eq,bodyClassName:eW,bodyStyle:eH,coverClassName:eV,coverStyle:eK,actionsClassName:eZ,actionsStyle:eY,titleClassName:eU,titleStyle:eQ,extraClassName:eG,extraStyle:eJ,children:eX,...e0})=>{let e1=j(eb),e2=eT?.map(eb=>({key:eb.key,label:eb.label??eb.tab??eb.key,disabled:eb.disabled,className:eb.className}))??[],e5=eL??[],e3=(0,e.ref)(eO??e2[0]?.key??""),e4=eI??e3.value??e2[0]?.key??"",e6=null!=eA||null!=ez||null!=eM||!!ej||e5.length>0||e2.length>0||null!=eE,e7="card";e1&&(e7+=` card-${e1}`),(ey||ex)&&(e7+=" card-border"),eN&&(e7+=" card-dash"),ew&&(e7+=" card-side"),ek&&(e7+=" image-full"),eC&&M(eC)&&(e7+=` ${M(eC)}`),"inner"===e$&&(e7+=" border border-base-300 bg-base-200/60 shadow-none"),eS&&(e7+=" transition duration-200 ease-out hover:-translate-y-1 hover:shadow-[0_22px_60px_-36px_rgba(15,23,42,0.55)]"),eF&&(e7+=` ${eF}`);let e8=e2.length?n("div",{role:"tablist","data-rue-card-tabs":!0,className:P(eP?.style??"border",eP?.placement,eP?.size??N(eb),eP?.className),children:e2.map(eb=>n("button",{type:"button",role:"tab",className:`tab ${e4===eb.key?"tab-active":""} ${eb.disabled?"tab-disabled":""} ${eb.className??""}`.trim(),disabled:eb.disabled,onClick:ey=>{var ex;eb.disabled||(ex=eb.key,void 0===eI&&(e3.value=ex,F(ey?.currentTarget??ey?.target)),eR&&eR(ex))},children:eb.label},eb.key))}):null;return n("div",{...e0,className:e7,style:eD,children:e6?r(e.Fragment,{children:[null!=eA||null!=ez||null!=e8||null!=eE?r("div",{className:A("rue-card-header border-base-300/80 border-b px-6 py-4",eB),style:eq,children:[null!=eA||null!=ez?r("div",{className:"flex flex-wrap items-center gap-3",children:[null==eA?null:n("div",{className:A("min-w-0 flex-1 text-base font-semibold leading-6",eU),style:eQ,children:eA}),null==ez?null:n("div",{className:A("shrink-0 text-sm opacity-80",eG),style:eJ,children:ez})]}):null,null!=e8||null!=eE?r("div",{className:`flex flex-wrap items-center gap-3 ${null!=eA||null!=ez?"mt-4":""}`.trim(),children:[null==e8?n("div",{className:"flex-1"}):n("div",{className:"min-w-0 flex-1",children:e8}),null==eE?null:n("div",{className:"shrink-0",children:eE})]}):null]}):null,null==eM?null:n("figure",{className:A("rue-card-cover overflow-hidden",eV),style:eK,children:eM}),ej||null!=eX?n("div",{className:A("card-body",eW),style:eH,children:ej?n(I,{size:eb}):eX}):null,e5.length?n("ul",{className:A("rue-card-actions border-base-300/80 flex divide-x divide-base-300/80 border-t bg-base-200/40",eZ),style:eY,children:e5.map((eb,ey)=>n("li",{className:"flex-1",children:n("div",{className:"flex h-full items-center justify-center px-4 py-3 text-sm",children:eb})},`action-${ey}`))}):null]}):eX})},{Body:({className:eb,style:ey,children:ex,...eN})=>n("div",{...eN,className:A("card-body",eb),style:ey,children:ex}),Title:({className:eb,style:ey,children:ex,...eN})=>n("h2",{...eN,className:A("card-title",eb),style:ey,children:ex}),Actions:({className:eb,style:ey,children:ex,...eN})=>n("div",{...eN,className:A("card-actions",eb),style:ey,children:ex}),Figure:({className:eb,style:ey,children:ex,...eN})=>n("figure",{...eN,className:A("figure",eb),style:ey,children:ex}),Grid:({className:eb,style:ey,hoverable:ex=!0,children:eN,...ew})=>{let ek="rue-card-grid block bg-base-100/70 p-5";return ex&&(ek+=" transition duration-200 ease-out hover:bg-base-100 hover:shadow-[0_18px_40px_-28px_rgba(15,23,42,0.45)]"),eb&&(ek+=` ${eb}`),n("div",{...ew,className:ek,style:ey,children:eN})},Meta:({className:eb,style:ey,avatar:ex,avatarClassName:eN,avatarStyle:ew,title:ek,titleClassName:eC,titleStyle:e$,description:eS,descriptionClassName:ej,descriptionStyle:eA,children:ez,...eM})=>r("div",{...eM,className:A("rue-card-meta flex items-start gap-4",eb),style:ey,children:[null==ex?null:n("div",{className:A("rue-card-meta-avatar shrink-0",eN),style:ew,children:ex}),null!=ek||null!=eS||null!=ez?r("div",{className:"min-w-0 flex-1 space-y-1",children:[null==ek?null:n("div",{className:A("rue-card-meta-title truncate text-base font-semibold leading-6",eC),style:e$,children:ek}),null==eS?null:n("div",{className:A("rue-card-meta-description text-sm leading-6 opacity-75",ej),style:eA,children:eS}),ez]}):null]})}),R=(eb,ey)=>ey?`${eb} ${ey}`:eb,z=eb=>"number"==typeof eb&&eb>=0&&eb<=6?eb:1,B=eb=>new Date(eb.getTime()),V=(eb,ey,ex)=>{let eN=new Date(eb,ey,ex);return eN.setHours(12,0,0,0),eN},H=eb=>{let ey=B(eb);return ey.setHours(0,0,0,0),ey},U=eb=>V(eb.getFullYear(),eb.getMonth(),1),W=eb=>V(eb.getFullYear(),eb.getMonth()+1,0),G=eb=>V(eb.getFullYear(),0,1),K=eb=>V(eb.getFullYear(),11,31),q=(eb,ey)=>V(eb.getFullYear(),eb.getMonth(),eb.getDate()+ey),J=eb=>eb instanceof Date&&!Number.isNaN(eb.getTime()),Y=(eb,ey=new Date)=>{if(J(eb))return B(eb);if("string"==typeof eb||"number"==typeof eb){let ey=new Date(eb);if(J(ey))return ey}return B(ey)},X=eb=>{if(!eb)return null;let ey=H(Y(eb[0])),ex=H(Y(eb[1]));return ey.getTime()<=ex.getTime()?{start:ey,end:ex}:{start:ex,end:ey}},ee=(eb,ey)=>eb.getFullYear()===ey.getFullYear(),Z=(eb,ey)=>ee(eb,ey)&&eb.getMonth()===ey.getMonth(),te=(eb,ey)=>Z(eb,ey)&&eb.getDate()===ey.getDate(),ne=(eb,ey)=>{let ex=V(eb.getFullYear(),eb.getMonth()+ey,1),eN=W(ex).getDate();return V(ex.getFullYear(),ex.getMonth(),Math.min(eb.getDate(),eN))},Q=(eb,ey)=>{let ex=V(eb.getFullYear()+ey,eb.getMonth(),1),eN=W(ex).getDate();return V(ex.getFullYear(),ex.getMonth(),Math.min(eb.getDate(),eN))},re=(eb,ey)=>Q(eb,ey-eb.getFullYear()),$=(eb,ey)=>ne(eb,ey-eb.getMonth()),ie=eb=>`${eb.getFullYear()}-${`${eb.getMonth()+1}`.padStart(2,"0")}-${`${eb.getDate()}`.padStart(2,"0")}`,ae=(eb,ey,ex)=>{let eN=H(eb);return!(ey&&(eN.getTime()<ey.start.getTime()||eN.getTime()>ey.end.getTime()))&&!ex?.(B(eN))},oe=(eb,ey,ex)=>{let eN=U(eb),ew=W(eb);if(ey&&(ew.getTime()<ey.start.getTime()||eN.getTime()>ey.end.getTime()))return!1;let ek=eN;for(;ek.getTime()<=ew.getTime();){if(ae(ek,ey,ex))return!0;ek=q(ek,1)}return!1},se=(eb,ey,ex)=>{let eN=G(eb),ew=K(eb);return!(ey&&(ew.getTime()<ey.start.getTime()||eN.getTime()>ey.end.getTime()))&&Array.from({length:12},(ey,ex)=>V(eb.getFullYear(),ex,1)).some(eb=>oe(eb,ey,ex))},ce=eb=>{let ey=H(eb),ex=V(q(ey,3-(ey.getDay()+6)%7).getFullYear(),0,4),eN=q(ex,-((ex.getDay()+6)%7));return 1+Math.round((ey.getTime()-eN.getTime())/6048e5)},le=(eb,ey)=>{let ex=new Intl.DateTimeFormat(eb,{weekday:"short"}),eN=V(2026,2,1);return Array.from({length:7},(eb,ew)=>ex.format(q(eN,(ey+ew)%7)))},ue=(eb,ey)=>{let ex=eb.getFullYear();if(!ey)return Array.from({length:13},(eb,ey)=>ex-6+ey);let eN=ey.start.getFullYear(),ew=ey.end.getFullYear();if(ew-eN<=24)return Array.from({length:ew-eN+1},(eb,ey)=>eN+ey);let ek=Math.max(eN,ex-6);return Array.from({length:Math.min(ew,ex+6)-ek+1},(eb,ey)=>ek+ey)},de=(eb,ey,ex,eN)=>{let ew=new Intl.DateTimeFormat(eb,{month:"short"});return Array.from({length:12},(eb,ek)=>{let eC=V(ey.getFullYear(),ek,1);return{value:ek,label:ew.format(eC),disabled:!oe(eC,ex,eN)}})},fe=(eb,ey)=>{let ex=U(eb),eN=q(ex,-((ex.getDay()-ey+7)%7));return Array.from({length:6},(ey,ex)=>{let ew=q(eN,7*ex);return{key:`${eb.getFullYear()}-${eb.getMonth()}-${ex}`,week:ce(ew),cells:Array.from({length:7},(ey,ex)=>{let eN=q(ew,ex);return{key:ie(eN),date:eN,inView:eN.getMonth()===eb.getMonth()}})}})},pe=Object.assign(({value:eb,defaultValue:ey,mode:ex,fullscreen:eN=!0,showWeek:ew,locale:ek,weekStartsOn:eC,validRange:e$,disabledDate:eS,dateFullCellRender:ej,dateCellRender:eA,monthFullCellRender:ez,monthCellRender:eM,cellRender:eL,fullCellRender:eT,headerRender:eI,className:eO,onChange:eE,onPanelChange:eP,onSelect:eR,...eF})=>{let eD=(0,e.ref)(Y(eb??ey??new Date)),eB=(0,e.ref)(ex??"month"),eq=void 0===eb?eD.value:Y(eb,eD.value),eW=ex??eB.value,eH=H(new Date),eV=X(e$),eK=ek??("u">typeof navigator&&navigator.language?navigator.language:"zh-CN"),eZ=z(eC),eY=eK.toLowerCase().startsWith("zh"),eU=le(eK,eZ),eQ=fe(eq,eZ),eG=ue(eq,eV),eJ=de(eK,eq,eV,eS),eX=R(`overflow-hidden border border-base-300 bg-gradient-to-b from-base-100 via-base-100 to-base-200/70 text-base-content shadow-sm ${eN?"rounded-[1.75rem]":"max-w-[24rem] rounded-[1.5rem]"}`,eO),e0=ew?"grid grid-cols-[3.25rem_repeat(7,minmax(0,1fr))] gap-2":"grid grid-cols-7 gap-2",e1="month"===eW?new Intl.DateTimeFormat(eK,{year:"numeric",month:"long"}).format(eq):new Intl.DateTimeFormat(eK,{year:"numeric"}).format(eq),e2=new Intl.DateTimeFormat(eK,{weekday:"long",month:"long",day:"numeric"}).format(eH),e5=eY?"周":"Week",e3=eY?"今":"Today",e4="month"===eW?eY?"月视图":"Month view":eY?"年视图":"Year view",e6="month"===eW?!oe(ne(eq,-1),eV,eS):!se(Q(eq,-1),eV,eS),e7="month"===eW?!oe(ne(eq,1),eV,eS):!se(Q(eq,1),eV,eS),e8=!ae(eH,eV,eS),e9=(ey,ex)=>{let eN=H(Y(ey,eq)),ew=!te(eN,eq),ek="month"===eW?!Z(eN,eq):!ee(eN,eq);void 0===eb&&(eD.value=eN),ew&&eE?.(B(eN)),ek&&eP?.(B(eN),eW),eR?.(B(eN),{source:ex})},tb=eb=>{eb!==eW&&(void 0===ex&&(eB.value=eb),eP?.(B(eq),eb))},ty={value:B(eq),type:eW,yearOptions:eG,monthOptions:eJ,onChange:eb=>e9(eb,"customize"),onTypeChange:tb,onYearChange:eb=>e9(re(eq,eb),"customize"),onMonthChange:eb=>e9($(eq,eb),"customize")};return r("div",{...eF,"data-rue-calendar-root":"true","data-rue-calendar-mode":eW,className:eX,children:[eI?eI(ty):r("div",{className:`border-b border-base-300/70 ${eN?"flex flex-col gap-3 px-4 py-4 lg:flex-row lg:items-center lg:justify-between":"flex flex-col gap-3 px-3 py-3"}`,children:[r("div",{children:[n("div",{className:"text-xs font-semibold uppercase tracking-[0.24em] text-base-content/55",children:"Rue Calendar"}),n("div",{className:"mt-1 text-xl font-semibold leading-tight",children:e1}),n("div",{className:"mt-1 text-xs text-base-content/60",children:e2})]}),r("div",{className:"flex flex-wrap items-center gap-2 lg:justify-end",children:[r("div",{className:"join",children:[n("button",{type:"button",className:"btn btn-sm join-item","aria-label":eY?"上一页":"Previous",disabled:e6,onClick:()=>e9("month"===eW?ne(eq,-1):Q(eq,-1),"customize"),children:n("span",{"aria-hidden":"true",children:"<"})}),n("button",{type:"button",className:"btn btn-sm join-item btn-ghost",disabled:e8,onClick:()=>e9(eH,"customize"),children:eY?"今天":"Today"}),n("button",{type:"button",className:"btn btn-sm join-item","aria-label":eY?"下一页":"Next",disabled:e7,onClick:()=>e9("month"===eW?ne(eq,1):Q(eq,1),"customize"),children:n("span",{"aria-hidden":"true",children:">"})})]}),n("select",{className:"select select-sm min-w-24",value:eq.getFullYear(),onChange:eb=>ty.onYearChange(Number(eb.currentTarget.value)),children:eG.map(eb=>n("option",{value:eb,disabled:!se(V(eb,eq.getMonth(),1),eV,eS),children:eb},eb))}),n("select",{className:"select select-sm min-w-24",value:eq.getMonth(),disabled:"year"===eW,onChange:eb=>ty.onMonthChange(Number(eb.currentTarget.value)),children:eJ.map(eb=>n("option",{value:eb.value,disabled:eb.disabled,children:eb.label},eb.value))}),r("div",{className:"join",children:[n("button",{type:"button",className:`btn btn-sm join-item ${"month"===eW?"btn-primary":"btn-ghost"}`,onClick:()=>tb("month"),children:eY?"月":"Month"}),n("button",{type:"button",className:`btn btn-sm join-item ${"year"===eW?"btn-primary":"btn-ghost"}`,onClick:()=>tb("year"),children:eY?"年":"Year"})]})]})]}),r("div",{className:eN?"space-y-3 px-4 py-4":"space-y-3 px-3 py-3",children:[r("div",{className:"flex items-center justify-between gap-3 px-1",children:[n("div",{className:"badge badge-outline badge-sm",children:e4}),ew&&"month"===eW?n("div",{className:"badge badge-soft badge-sm",children:e5}):null]}),"month"===eW?r("div",{className:"space-y-2",children:[r("div",{className:e0,children:[ew?n("div",{className:"px-2 py-1 text-center text-[0.68rem] font-semibold uppercase tracking-[0.24em] text-base-content/45",children:e5}):null,eU.map(eb=>n("div",{className:"px-2 py-1 text-center text-[0.68rem] font-semibold uppercase tracking-[0.24em] text-base-content/45",children:eb},eb))]}),n("div",{role:"grid",className:"space-y-2",children:eQ.map((eb,ey)=>r("div",{role:"row",className:e0,children:[ew?n("div",{className:"flex items-center justify-center rounded-[1rem] border border-base-300/70 bg-base-200/60 text-sm font-semibold text-base-content/60","data-rue-calendar-week":eb.week,children:eb.week}):null,eb.cells.map((ex,ew)=>{let ek,eC,e$,ez,eM,eI,eO,eE;return ek=te(ex.date,eq),eC=te(ex.date,eH),e$=!ae(ex.date,eV,eS),ez=n("div",{className:"flex h-full flex-col gap-2",children:r("div",{className:"flex items-start justify-between gap-2",children:[n("span",{className:`text-sm font-semibold ${ex.inView?"":"opacity-60"}`,children:ex.date.getDate()}),eC?n("span",{className:`badge badge-xs ${ek?"badge-neutral text-neutral-content":"badge-primary badge-outline"}`,children:e3}):null]})}),eM=eL?.(B(ex.date),{type:"date",originNode:ez,today:B(eH),selected:ek,isToday:eC,inView:ex.inView,disabled:e$,row:ey,column:ew,week:eb.week})??eA?.(B(ex.date)),eI=r("div",{className:"flex h-full flex-col gap-2",children:[r("div",{className:"flex items-start justify-between gap-2",children:[n("span",{className:`text-sm font-semibold ${ex.inView?"":"opacity-60"}`,children:ex.date.getDate()}),eC?n("span",{className:`badge badge-xs ${ek?"badge-neutral text-neutral-content":"badge-primary badge-outline"}`,children:e3}):null]}),n("div",{className:`min-h-[1.85rem] text-[0.68rem] leading-4 ${ek?"opacity-90":"opacity-75"}`,children:eM})]}),eO=eT?.(B(ex.date),{type:"date",originNode:eI,today:B(eH),selected:ek,isToday:eC,inView:ex.inView,disabled:e$,row:ey,column:ew,week:eb.week})??ej?.(B(ex.date))??eI,eE=`group relative flex min-h-[5.35rem] w-full flex-col rounded-[1.2rem] border px-2.5 py-2.5 text-left transition duration-150 ${eN?"":"min-h-[4.7rem] rounded-[1rem] px-2 py-2"}`,ek?eE+=" border-primary bg-primary text-primary-content shadow-md shadow-primary/15":e$?eE+=" border-base-300/70 bg-base-200/50 text-base-content/35":ex.inView?eE+=" border-base-300/80 bg-base-100 hover:-translate-y-0.5 hover:border-primary/35 hover:shadow-sm":eE+=" border-base-300/60 bg-base-200/60 text-base-content/55 hover:border-primary/20",eC&&!ek&&(eE+=" ring-1 ring-primary/20"),n("button",{type:"button",role:"gridcell","data-rue-calendar-cell":ex.key,"data-rue-calendar-in-view":ex.inView?"true":"false","aria-pressed":ek?"true":"false","aria-current":eC?"date":void 0,disabled:e$,className:eE,onClick:()=>e9(ex.date,"date"),children:eO},ex.key)})]},eb.key))})]}):n("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-4",children:eJ.map((eb,ey)=>{let ex,ew,ek,eC,e$,eS,ej,eA,eI;return ew=Z(ex=V(eq.getFullYear(),eb.value,1),eq),ek=Z(ex,eH),eC=!0===eb.disabled,e$=n("div",{className:"flex h-full flex-col gap-2",children:r("div",{className:"flex items-center justify-between gap-2",children:[n("span",{className:"text-sm font-semibold",children:eb.label}),ek?n("span",{className:`badge badge-xs ${ew?"badge-neutral text-neutral-content":"badge-primary badge-outline"}`,children:e3}):null]})}),eS=eL?.(B(ex),{type:"month",originNode:e$,today:B(eH),selected:ew,isToday:ek,inView:!0,disabled:eC,row:Math.floor(ey/4),column:ey%4})??eM?.(B(ex)),ej=r("div",{className:"flex h-full flex-col gap-2",children:[r("div",{className:"flex items-center justify-between gap-2",children:[n("span",{className:"text-sm font-semibold",children:eb.label}),ek?n("span",{className:`badge badge-xs ${ew?"badge-neutral text-neutral-content":"badge-primary badge-outline"}`,children:e3}):null]}),n("div",{className:`min-h-[2.1rem] text-xs leading-5 ${ew?"opacity-90":"opacity-75"}`,children:eS})]}),eA=eT?.(B(ex),{type:"month",originNode:ej,today:B(eH),selected:ew,isToday:ek,inView:!0,disabled:eC,row:Math.floor(ey/4),column:ey%4})??ez?.(B(ex))??ej,eI=`group relative flex min-h-[6.1rem] w-full flex-col rounded-[1.2rem] border px-3 py-3 text-left transition duration-150 ${eN?"":"min-h-[5.5rem] rounded-[1rem] px-2.5 py-2.5"}`,ew?eI+=" border-primary bg-primary text-primary-content shadow-md shadow-primary/15":eC?eI+=" border-base-300/70 bg-base-200/50 text-base-content/35":eI+=" border-base-300/80 bg-base-100 hover:-translate-y-0.5 hover:border-primary/35 hover:shadow-sm",ek&&!ew&&(eI+=" ring-1 ring-primary/20"),n("button",{type:"button","data-rue-calendar-month":`${eq.getFullYear()}-${`${eb.value+1}`.padStart(2,"0")}`,"aria-pressed":ew?"true":"false",disabled:eC,className:eI,onClick:()=>e9(ex,"month"),children:eA},`${eq.getFullYear()}-${eb.value}`)})})]})]})},{Cally:({className:eb,children:ey,...ex})=>n("calendar-date",{...ex,className:R("cally",eb),children:ey}),Month:({className:eb,children:ey,...ex})=>n("calendar-month",{...ex,className:eb,children:ey}),PikaSingle:({type:eb="text",className:ey,...ex})=>n("input",{...ex,type:eb,className:R("pika-single",ey)})}),me=(eb,ey)=>ey?`${eb} ${ey}`:eb,he=eb=>{switch(eb){case"small":return"sm";case"default":case"medium":case"middle":return"md";case"large":return"lg";default:return eb??"md"}},ge=eb=>{let ey=he(eb);if("number"==typeof ey)return{pixels:ey,style:{width:`${ey}px`,height:`${ey}px`}};switch(ey){case"xs":return{className:"h-6 w-6 text-[10px]",pixels:24};case"sm":return{className:"h-8 w-8 text-xs",pixels:32};case"lg":return{className:"h-12 w-12 text-base",pixels:48};case"xl":return{className:"h-16 w-16 text-lg",pixels:64};default:return{className:"h-10 w-10 text-sm",pixels:40}}},_e=eb=>"square"===eb?"rounded-2xl":"rounded-full",ve=eb=>"contain"===eb?"object-contain":"object-cover",ye=(eb,ey)=>{switch(eb){case"base":return"bg-base-200 text-base-content";case"neutral":return"bg-neutral text-neutral-content";case"primary":return"bg-primary text-primary-content";case"secondary":return"bg-secondary text-secondary-content";case"accent":return"bg-accent text-accent-content";case"info":return"bg-info text-info-content";case"success":return"bg-success text-success-content";case"warning":return"bg-warning text-warning-content";case"error":return"bg-error text-error-content";default:return ey?"bg-neutral text-neutral-content":"bg-base-300 text-base-content"}},be=eb=>{if("string"==typeof eb||"number"==typeof eb)return String(eb)},xe=(eb,ey,ex)=>{let eN=(ey-2*Math.max(ex,0))/Math.max(.62*eb.length,1);return Math.max(10,Math.min(.42*ey,eN))},Se=eb=>{let ey=[],ex=eb=>{Array.isArray(eb)?eb.forEach(ex):null==eb||!1===eb||ey.push(eb)};return ex(eb),ey},Ce=eb=>"number"==typeof eb?{count:eb}:eb,we=()=>r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"h-[55%] w-[55%]",children:[n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"}),n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 20a7.5 7.5 0 0 1 15 0"})]}),Te=({status:eb,className:ey,bodyClassName:ex,imgClassName:eN,children:ew,src:ek,srcSet:eC,alt:e$,icon:eS,text:ej,shape:eA,size:ez,gap:eM=4,color:eL,fit:eT,draggable:eI,crossOrigin:eO,onError:eE,...eP})=>{let eR=be(ew),eF=null==ek&&null==eS&&null==ej&&null==eA&&null==ez&&null==ex&&null==eN&&null==e$&&null==eC&&null==eL&&null==eT&&void 0===eI&&void 0===eO&&null==eE&&null==eR&&null!=ew,eD=ge(ez),eB=ej??eR,eq=eS??(eB?null:ew)??n(we,{}),eW=me(eb?`avatar not-prose avatar-${eb}`:"avatar not-prose",ey);if(eF)return n("div",{...eP,className:eW,"data-rue-avatar-root":"true",children:ew});let eH="string"==typeof ek&&ek.length>0,eV=!eH&&null!=ek,eK=me(me(`relative inline-flex shrink-0 items-center justify-center overflow-hidden ${_e(eA)} ${ye(eL,"placeholder"===eb)}`,eD.className),ex),eZ=null==eB?void 0:{fontSize:`${xe(eB,eD.pixels,eM)}px`,lineHeight:"1"};return n("div",{...eP,className:eW,"data-rue-avatar-root":"true",children:r("div",{className:eK,"data-rue-avatar-body":"true",style:eD.style,children:[eH?n("img",{"data-rue-avatar-image":"true",className:me(`h-full w-full ${ve(eT)}`,eN),src:ek,srcSet:eC,alt:e$??eB??"Avatar",draggable:eI??!0,crossOrigin:eO,onError:eb=>{if((eE?eE(eb):void 0)===!1)return;let ey=eb.currentTarget??eb.target;if(!ey)return;ey.classList.add("hidden");let ex=ey.parentElement?.querySelector('[data-rue-avatar-fallback="true"]');ex&&(ex.classList.remove("hidden"),ex.classList.add("flex"))}}):null,eV?ek:null,n("span",{className:eH||eV?"hidden h-full w-full items-center justify-center":"flex h-full w-full items-center justify-center","data-rue-avatar-fallback":"true",children:eB?n("span",{className:"inline-flex max-w-full items-center justify-center px-[0.08em] font-semibold uppercase tracking-[0.02em]",style:eZ,children:eB}):eq})]})})},Ee=Object.assign(Te,{Group:({className:eb,children:ey,items:ex,size:eN,shape:ew,max:ek})=>{let eC=Ce(ek),e$=eC&&"number"==typeof eC.count&&eC.count>=0?Math.floor(eC.count):void 0,eS=me("avatar-group",eb);if(ex&&ex.length){let eb=void 0!==e$&&ex.length>e$?ex.length-e$:0;return r("div",{className:eS,"data-rue-avatar-group":"true",children:[(eb>0&&void 0!==e$?ex.slice(0,e$):ex).map((eb,ey)=>{let{key:ex,...ek}=eb;return n(Te,{size:eb.size??eN,shape:eb.shape??ew,...ek},ex??ey)}),eb>0?n(Te,{status:"placeholder",size:eN,shape:ew,className:eC?.className,bodyClassName:eC?.bodyClassName,children:eC?.placeholder??`+${eb}`}):null]})}let ej=Se(ey),eA=void 0!==e$&&ej.length>e$?ej.length-e$:0;return r("div",{className:eS,"data-rue-avatar-group":"true",children:[eA>0&&void 0!==e$?ej.slice(0,e$):ej,eA>0?n(Te,{status:"placeholder",size:eN,shape:ew,className:eC?.className,bodyClassName:eC?.bodyClassName,children:eC?.placeholder??`+${eA}`}):null]})}}),De=["neutral","primary","secondary","accent","success","warning","info","error"],Oe=["solid","dashed","dotted"],ke=eb=>!!eb&&De.includes(eb),Ae=eb=>!!eb&&Oe.includes(eb),je=(...eb)=>eb.filter(Boolean).join(" "),Me=eb=>"number"==typeof eb?eb:"string"==typeof eb?/^\d+(\.\d+)?$/.test(eb)?Number(eb):eb:void 0,Ne=eb=>{if(!(!eb||"vertical"===eb))return"divider-horizontal"},Pe=(eb,ey,ex)=>(eb??ex??(ey?"vertical":"horizontal"))==="vertical"?"divider-horizontal":void 0,Fe=({color:eb,variant:ey,lineVariant:ex,direction:eN,orientation:ew,type:ek,vertical:eC,placement:e$,titlePlacement:eS,orientationMargin:ej,dashed:eA,plain:ez,className:eM,contentClassName:eL,style:eT,contentStyle:eI,children:eO,...eE})=>{let eP=eb??(ke(ey)?ey:void 0),eR=ex??(Ae(ey)?ey:void 0)??(eA?"dashed":"solid"),eF=eS??e$,eD=ew||ek||eC?Pe(ew,eC,ek):Ne(eN),eB=(ew??ek??(eC?"vertical":"horizontal"))==="vertical",eq=Me(ej),eW=je("divider",eD,eP?`divider-${eP}`:void 0,eF&&"center"!==eF?`divider-${eF}`:void 0,"dashed"===eR?"before:border-dashed after:border-dashed":void 0,"dotted"===eR?"before:border-dotted after:border-dotted":void 0,eM),eH=je("whitespace-nowrap",ez?"font-normal opacity-80":void 0,eL),eV="start"===eF?{marginInlineStart:eq,...eI}:"end"===eF?{marginInlineEnd:eq,...eI}:eI;return n("div",{className:eW,style:eT,role:"separator","aria-orientation":eB?"vertical":"horizontal",...eE,children:eB||null==eO?null:n("span",{className:eH,style:eV,children:eO})})},Ie=(...eb)=>eb.filter(Boolean).join(" "),Le=eb=>null!=eb&&(!Array.isArray(eb)||eb.some(eb=>Le(eb))),Re=({as:eb="h6",className:ey,children:ex,content:eN,...ew})=>n(eb,{...ew,className:Ie("footer-title",ey),children:eN??ex}),ze=({as:eb,className:ey,children:ex,content:eN,href:ew,target:ek,rel:eC,hover:e$=!0,...eS})=>{let ej=eb??(ew?"a":"button");return"a"===ej?n("a",{...eS,href:ew,target:ek,rel:"_blank"!==ek||eC?eC:"noreferrer",className:Ie("link",e$&&"link-hover",ey),children:eN??ex}):"button"===ej?n("button",{...eS,type:eS.type??"button",className:Ie("link",e$&&"link-hover",ey),children:eN??ex}):n(ej,{...eS,className:Ie("link",e$&&"link-hover",ey),children:eN??ex})},Be=eb=>!(!eb||"object"!=typeof eb||Array.isArray(eb))&&("label"in eb||"content"in eb||"children"in eb||"href"in eb||"target"in eb||"rel"in eb||"as"in eb||"className"in eb||"hover"in eb),Ve=(eb,ey)=>{if(!Le(eb))return null;if(Be(eb)){let{key:ex,label:eN,content:ew,children:ek,...eC}=eb;return n(ze,{...eC,children:ew??ek??eN},ex??`item-${ey}`)}return n(ze,{children:eb},`item-${ey}`)},He=({as:eb="aside",className:ey,children:ex,content:eN,...ew})=>n(eb,{...ew,className:ey,children:eN??ex}),Ue=({as:eb="nav",className:ey,children:ex,title:eN,titleClassName:ew,content:ek,items:eC,inline:e$,contentClassName:eS,...ej})=>{let eA=(eC??[]).map((eb,ey)=>Ve(eb,ey)).filter(Boolean),ez=Le(ek)||Le(ex)?ek??ex:e$?n("div",{className:Ie("grid grid-flow-col auto-cols-max gap-4",eS),children:eA}):eA;return r(eb,{...ej,className:ey,children:[Le(eN)?n(Re,{className:ew,children:eN}):null,ez]})},We=Object.assign(({as:eb="footer",direction:ey,center:ex,className:eN,children:ew,brand:ek,sections:eC,wrap:e$,bordered:eS,...ej})=>{let eA=Le(ew),ez=Le(ek)||(eC?.length??0)>0;return n(eb,{...ej,className:Ie("footer",ey&&`footer-${ey}`,ex&&"footer-center",e$&&"gap-y-6",eS&&"border-t border-base-300",eN),children:eA||!ez?ew:r(e.Fragment,{children:[Le(ek)?n(He,{children:ek}):null,(eC??[]).map((eb,ey)=>{let{key:ex,...eN}=eb;return n(Ue,{...eN},ex??`section-${ey}`)})]})})},{Brand:He,Section:Ue,Title:Re,Link:ze}),Ge=0,Ke="",qe=(...eb)=>eb.filter(Boolean).join(" "),Je=eb=>eb.replace(/-([a-z])/g,(eb,ey)=>ey.toUpperCase()),Ye=eb=>eb.startsWith("--")?eb:eb.includes("-")?Je(eb):eb,Xe=eb=>{if(!eb)return;let ey={};return"string"==typeof eb?eb.split(";").map(eb=>eb.trim()).filter(Boolean).forEach(eb=>{let ex=eb.indexOf(":");if(-1===ex)return;let eN=eb.slice(0,ex).trim(),ew=eb.slice(ex+1).trim();eN&&ew&&(ey[Ye(eN)]=ew)}):Object.entries(eb).forEach(([eb,ex])=>{null!=ex&&(ey[Ye(eb)]=ex)}),Object.keys(ey).length>0?ey:void 0},Ze=(...eb)=>{let ey={};return eb.forEach(eb=>{let ex=Xe(eb);ex&&Object.assign(ey,ex)}),Object.keys(ey).length>0?ey:void 0},Qe=eb=>{if(null!=eb)return"number"==typeof eb?`${eb}px`:eb},$e=()=>r("div",{className:"space-y-3","data-rue-modal-loading":"true",children:[n("div",{className:"skeleton h-4 w-2/5"}),n("div",{className:"skeleton h-4 w-full"}),n("div",{className:"skeleton h-4 w-5/6"}),n("div",{className:"skeleton h-24 w-full"})]}),et=()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-4","aria-hidden":"true",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})}),tt=()=>{typeof document>"u"||(0===Ge&&(Ke=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden"),Ge+=1)},nt=()=>{typeof document>"u"||0===Ge||0==--Ge&&(document.documentElement.style.overflow=Ke)},rt=({open:eb,defaultOpen:ey=!1,title:ex,children:eN,actions:ew,footer:ek,className:eC,rootClassName:e$,rootStyle:eS,wrapClassName:ej,wrapProps:eA,bodyClassName:ez,headerClassName:eM,footerClassName:eL,maskClassName:eT,classNames:eI,styles:eO,width:eE,style:eP,bodyStyle:eR,maskStyle:eF,centered:eD=!1,closable:eB=!0,closeIcon:eq,keyboard:eW=!0,mask:eH=!0,maskClosable:eV=!0,forceRender:eK=!1,destroyOnClose:eZ,destroyOnHidden:eY=!0,confirmLoading:eU=!1,okText:eQ="确定",cancelText:eG,okType:eJ="primary",okButtonProps:eX,cancelButtonProps:e0,zIndex:e1,getContainer:e2,loading:e5=!1,onOk:e3,onCancel:e4,onClose:e6,onOpenChange:e7,afterClose:e8,afterOpenChange:e9,modalRender:tb,...ty})=>{let tx=(0,e.ref)(ey),tN=(0,e.ref)(ey),tw=(0,e.ref)(!1),tk="boolean"==typeof eb,tC="boolean"==typeof eb?eb:tx.value,t$=(0,e.ref)(tC),tS=(0,e.ref)(eW),tj=eb=>{eb&&"function"==typeof eb.preventDefault&&eb.preventDefault(),e4&&eb&&e4(eb),e6&&e6(eb),tk||(tx.value=!1),e7&&e7(!1)};if((0,e.onMounted)(()=>{if(tC&&(tt(),tw.value=!0),typeof window>"u")return;let eb=eb=>{t$.value&&tS.value&&"Escape"===eb.key&&tj(eb)};window.addEventListener("keydown",eb),(0,e.onUnmounted)(()=>{window.removeEventListener("keydown",eb)})}),(0,e.watch)(()=>tC,eb=>{t$.value=eb,eb?(tN.value=!0,tw.value||(tt(),tw.value=!0)):tw.value&&(nt(),tw.value=!1,e8&&e8()),e9&&e9(eb)}),(0,e.watch)(()=>eW,eb=>{tS.value=eb},{immediate:!0}),(0,e.watch)(()=>ey,eb=>{tk||(tx.value=!!eb)},{immediate:!0}),(0,e.onUnmounted)(()=>{tw.value&&(nt(),tw.value=!1)}),!(tC||eK||!(eY??eZ??!0)&&tN.value))return null;let{className:tA,style:tz,onClick:tM,...tL}=eA??{},tT=eG??(e3||eX?"取消":"关闭"),tI=void 0===ek&&null!=ew,tO=!tI&&(null!=e3||null!=eX),tE=eb=>{let{children:ey,onClick:ex,...eN}=eb??{};return(0,e.h)(k,{...e0,...eN,onClick:eb=>{ex&&ex(eb),eb.defaultPrevented||tj(eb)},disabled:eN.disabled??e0?.disabled},ey??e0?.children??tT)},tP=eb=>{let{children:ey,onClick:ex,...eN}=eb??{};return(0,e.h)(k,{...eX,...eN,type:eN.type??eX?.type??eJ,loading:eN.loading??eX?.loading??eU,onClick:eb=>{ex&&ex(eb),eb.defaultPrevented||eU||e3&&e3(eb)}},ey??eX?.children??eQ)},tR=r(e.Fragment,{children:[tI?ew:null,tI||null!=e4||null!=e6||tO?tE():null,tO?tP():null]}),tF=e5||null===ek||!1===ek?null:"function"==typeof ek?ek(tR,{OkBtn:eb=>tP(eb),CancelBtn:eb=>tE(eb)}):ek??tR,tD=r("div",{...ty,"aria-hidden":tC?void 0:"true",className:qe(`modal ${tC?"modal-open":""} bg-transparent`.trim(),qe(e$,qe(eI?.root,tC?void 0:"pointer-events-none"))),style:Ze(eO?.root,eS,null==e1?void 0:{zIndex:e1}),"data-rue-modal-root":"true",children:[eH?n("div",{"aria-hidden":"true",className:qe("absolute inset-0 bg-base-content/40",qe(eT,eI?.mask)),style:Ze(eO?.mask,eF),"data-rue-modal-mask":"true"}):null,n("div",{...tL,className:qe(qe(`absolute inset-0 overflow-y-auto px-4 py-6 sm:px-6 ${eD?"flex items-center justify-center":"flex items-start justify-center sm:items-center"}`,ej),qe(tA,eI?.wrapper)),style:Ze(eO?.wrapper,tz),onClick:eb=>{tM&&tM(eb),!eb.defaultPrevented&&eH&&eV&&eb.target===eb.currentTarget&&tj(eb)},"data-rue-modal-wrapper":"true",children:n("div",{className:qe("relative flex w-full justify-center",eI?.container),style:Ze(eO?.container),"data-rue-modal-container":"true",children:r("div",{role:"dialog","aria-modal":tC?"true":"false","aria-hidden":tC?void 0:"true",className:qe(qe("modal-box relative",eC),qe(eI?.box,tC?void 0:"pointer-events-none")),style:Ze(eO?.box,eP,null==eE?void 0:{width:Qe(eE)}),onClick:eb=>{eb.stopPropagation()},"data-rue-modal-box":"true",children:[eB?n("button",{type:"button","aria-label":"关闭",className:qe("btn btn-sm btn-circle btn-ghost absolute right-4 top-4 z-10",eI?.close),style:Ze(eO?.close),onClick:eb=>tj(eb),children:eq??n(et,{})}):null,ex?n("div",{className:qe("mb-4 pr-10",qe(eM,eI?.header)),style:Ze(eO?.header),children:n("div",{className:qe("text-lg font-semibold leading-6",eI?.title),style:Ze(eO?.title),children:ex})}):null,n("div",{className:qe("space-y-4",qe(ez,eI?.body)),style:Ze(eO?.body,eR),"aria-busy":e5?"true":void 0,children:e5?$e():eN}),tF?n("div",{className:qe("modal-action mt-6 flex flex-wrap items-center justify-end gap-2",qe(eL,eI?.footer)),style:Ze(eO?.footer),children:tF}):null]})})})]}),tB=tb?tb(tD):tD,tq="function"==typeof e2?e2():e2;return!1===tq||null==tq?tB:n(e.Teleport,{to:tq,children:tB})},it=0,at=(eb,ey)=>eb?ey?`${eb} ${ey}`:eb:ey??"",ot=(eb,ey)=>eb||("card"===ey||"editable-card"===ey?"box":"line"===ey?"border":void 0),st=eb=>{switch(eb){case"small":return"sm";case"middle":return"md";case"large":return"lg";default:return eb}},ct=(eb,ey)=>void 0!==ey&&eb.some(eb=>eb.key===ey)?ey:eb.find(eb=>!eb.disabled)?.key??eb[0]?.key??"",lt=eb=>eb&&"object"==typeof eb&&!Array.isArray(eb)&&("left"in eb||"right"in eb)?eb:{right:eb},ut=(eb,ey,ex,eN,ew)=>{let ek="tabs";return"box"===eb&&(ek+=" tabs-box"),"border"===eb&&(ek+=" tabs-border"),"lift"===eb&&(ek+=" tabs-lift"),"bottom"===ey&&(ek+=" tabs-bottom"),("start"===ey||"end"===ey)&&(ek+=" flex-col items-stretch"),st(ex)&&(ek+=` tabs-${st(ex)}`),eN&&"start"!==ey&&"end"!==ey&&(ek+=" justify-center"),ew&&(ek+=` ${ew}`),ek},dt=eb=>"number"==typeof eb?`${eb}px`:eb??"100%",ft=eb=>{switch(eb){case"start":return"self-start";case"end":return"self-end";default:return"self-center"}},pt=(eb,ey=!0)=>at(at("tab-content rounded-box border border-base-300 bg-base-100 p-5",ey?"block":"hidden"),eb),mt=({items:eb,activeKey:ey,defaultActiveKey:ex,onChange:eN,onEdit:ew,style:ek,type:eC,placement:e$,tabPlacement:eS,size:ej,centered:eA,destroyOnHidden:ez,hideAdd:eM,addIcon:eL,removeIcon:eT,indicator:eI,tabBarExtraContent:eO,className:eE,tabBarClassName:eP,contentClassName:eR})=>{let eF=eb??[],eD=eS??e$??"top",eB=ot(ek,eC),eq=(0,e.useRef)();eq.current||(eq.current=`rue-tabs-${it++}`);let eW=eq.current,eH=(0,e.ref)(ct(eF,ex??ey)),eV=(0,e.useRef)(),eK=(0,e.useRef)(),eZ=(0,e.useRef)(),eY=(0,e.useRef)(),eU=(0,e.useRef)();eZ.current||(eZ.current=new Map);let eQ=eF.some(eb=>null!=eb.children),eG=lt(eO),eJ="start"===eD||"end"===eD,eX=!!eI&&"border"===eB,e0=()=>{let eb=ey??eH.value??ct(eF);return eF.some(ey=>ey.key===eb)?eb:ct(eF,ex??ey)},e1=at(at(at("rue-tabs","block"),eE),eQ?"w-full":void 0),e2=ut(eB,eD,ej,eA,at(eP,eJ?"w-full":void 0)),e5="editable-card"===eC&&!0!==eM&&ew?n("button",{type:"button",className:"btn btn-ghost btn-sm shrink-0","aria-label":"新增标签",onClick:eb=>{ew&&ew(eb,"add")},children:eL??"+"}):null,e3=(eb,ey)=>{eb.setAttribute("role","tabpanel"),eb.id=`${eW}-panel-${ey.key}`,eb.setAttribute("aria-labelledby",`${eW}-tab-${ey.key}`),eb.setAttribute("aria-hidden","false"),eb.className=pt(ey.contentClassName)},e4=()=>{for(let eb of eZ.current.values())(0,e.render)([],eb),eb.remove();eZ.current.clear(),eY.current=null,eU.current=null},e6=()=>{eV.current&&(0,e.render)(n("div",{role:"tablist","aria-orientation":eJ?"vertical":"horizontal",className:e2,children:eF.map(eb=>{let ex=e0()===eb.key,ek="editable-card"===eC&&!!ew&&(eb.closable??!eb.disabled),e$=`${eW}-tab-${eb.key}`,eS=`${eW}-panel-${eb.key}`;return r("button",{type:"button",role:"tab",id:e$,"aria-selected":ex?"true":"false","aria-controls":null==eb.children?void 0:eS,className:at(at(at(at(at("tab",ex?at("tab-active",eX?"rue-tabs-indicator-active before:hidden":void 0):void 0),eb.disabled?"tab-disabled":void 0),eJ?"justify-start":void 0),ek?"gap-2 pr-2":void 0),eb.className),disabled:eb.disabled,onClick:()=>{var ex;eb.disabled||(ex=eb.key)!==e0()&&(void 0===ey&&(eH.value=ex),eN&&eN(ex))},children:[null==eb.icon?null:n("span",{className:"inline-flex shrink-0 items-center justify-center","aria-hidden":null==eb.label?void 0:"true",children:eb.icon}),r("span",{className:"relative inline-flex min-w-0 flex-col",children:[n("span",{className:"truncate",children:eb.label}),ex&&eI?n("span",{className:at("mt-1 inline-flex h-0.5 rounded-full bg-current opacity-70",at(ft(eI.align),eI.className)),style:{width:dt(eI.size),...eI.style}}):null]}),ek?n("span",{role:"button",tabindex:eb.disabled?-1:0,className:"inline-flex size-5 shrink-0 items-center justify-center rounded-full opacity-60 transition-opacity hover:opacity-100","aria-label":`移除 ${eb.key}`,onClick:ey=>{ey.preventDefault(),ey.stopPropagation(),eb.disabled||!ew||ew(eb.key,"remove")},onKeyDown:ey=>{"Enter"!==ey.key&&" "!==ey.key||(ey.preventDefault(),ey.stopPropagation(),eb.disabled||!ew||ew(eb.key,"remove"))},children:eb.closeIcon??eT??"\xd7"}):null]},eb.key)})}),eV.current),eK.current&&(ez?(()=>{let eb=eK.current;if(!eb)return;eU.current&&eU.current!==eF&&e4(),eU.current=eF;let ey=eF.find(eb=>eb.key===e0()),ex=ey?.key??null,eN=eY.current??null;if(eN&&eN!==ex){let ey=eZ.current.get(eN);ey&&ey.parentNode===eb&&eb.removeChild(ey)}if(!ey||null==ey.children){eb.replaceChildren(),eY.current=ex;return}let ew=eZ.current.get(ey.key);ew?eN===ex?(e3(ew,ey),(0,e.render)(ey.children,ew)):e3(ew,ey):(e3(ew=document.createElement("div"),ey),(0,e.render)(ey.children,ew),eZ.current.set(ey.key,ew)),(ew.parentNode!==eb||1!==eb.childNodes.length||eb.firstChild!==ew)&&eb.replaceChildren(ew),eY.current=ey.key})():(e4(),(0,e.render)((()=>{if(!eQ)return null;if(ez){let eb=eF.find(eb=>eb.key===e0());return eb&&null!=eb.children?n("div",{role:"tabpanel",id:`${eW}-panel-${eb.key}`,"aria-labelledby":`${eW}-tab-${eb.key}`,"aria-hidden":"false",className:pt(eb.contentClassName),children:eb.children},`${eb.key}-panel`):null}return n(e.Fragment,{children:eF.map(eb=>{let ey=eb.key===e0();return n("div",{role:"tabpanel",id:`${eW}-panel-${eb.key}`,"aria-labelledby":`${eW}-tab-${eb.key}`,"aria-hidden":ey?"false":"true",className:pt(eb.contentClassName,ey),children:eb.children},`${eb.key}-panel`)})})})(),eK.current)))};return(0,e.onMounted)(()=>{e6()}),(0,e.watch)(()=>[ey,ex,eH.value,eb,ez,eD,eB,ej,eA,eI?.align,eI?.size,eI?.className,eP,eR],()=>{e6()},{immediate:!0}),eJ?n("div",{className:e1,children:r("div",{className:at("flex items-start gap-4","end"===eD?"flex-row-reverse":void 0),children:[r("div",{className:"flex w-full max-w-xs shrink-0 flex-col gap-3",children:[null==eG.left?null:n("div",{className:"shrink-0",children:eG.left}),n("div",{ref:eb=>eV.current=eb??void 0}),null!=e5||null!=eG.right?r("div",{className:"flex flex-wrap items-center gap-2",children:[e5,null==eG.right?null:n("div",{className:"shrink-0",children:eG.right})]}):null]}),eQ?n("div",{ref:eb=>eK.current=eb??void 0,className:at("min-w-0 flex-1",eR)}):null]})}):n("div",{className:e1,children:r("div",{className:at("flex gap-4","bottom"===eD?"flex-col-reverse":"flex-col"),children:[r("div",{className:"flex flex-wrap items-center gap-3",children:[null==eG.left?null:n("div",{className:"shrink-0",children:eG.left}),n("div",{className:at("min-w-0 flex-1",eA?"flex justify-center":void 0),children:n("div",{ref:eb=>eV.current=eb??void 0})}),e5,null==eG.right?null:n("div",{className:"shrink-0",children:eG.right})]}),eQ?n("div",{ref:eb=>eK.current=eb??void 0,className:at("min-w-0 flex-1",eR)}):null]})})},ht=["neutral","primary","secondary","accent","info","success","warning","error"],gt=eb=>!!eb&&ht.includes(eb),_t=(...eb)=>eb.filter(Boolean).join(" "),vt=eb=>{switch(eb){case"small":return"sm";case"medium":return"md";default:return eb}},yt=eb=>{switch(eb){case"default":return"neutral";case"processing":return"info";default:return eb}},bt=eb=>{if("number"==typeof eb&&Number.isFinite(eb))return eb;if("string"==typeof eb){let ey=eb.trim();if(!ey)return null;let ex=Number(ey);if(!Number.isNaN(ex))return ex}return null},xt=eb=>null==eb||!1===eb||""===eb,St=eb=>Array.isArray(eb)?eb.some(eb=>St(eb)):!xt(eb),Ct=eb=>"number"==typeof eb?`${-eb}px`:eb.startsWith("-")?eb.slice(1):`-${eb}`,wt=eb=>"number"==typeof eb?`${eb}px`:eb,Tt=({variant:eb,size:ey,outline:ex,dash:eN,soft:ew,ghost:ek,className:eC})=>{let e$=vt(ey),eS="badge";return eb&&(eS+=` badge-${eb}`),e$&&(eS+=` badge-${e$}`),ex&&(eS+=" badge-outline"),eN&&(eS+=" badge-dash"),ew&&(eS+=" badge-soft"),ek&&(eS+=" badge-ghost"),eC&&(eS+=` ${eC}`),eS},Et=(eb,ey)=>{let ex=bt(eb);return null!==ex&&ex>ey?`${ey}+`:eb},Dt=eb=>null!=eb&&!1!==eb&&""!==eb,Ot=({variant:eb,status:ey,color:ex})=>gt(ex)?ex:yt(ey)??eb??"error",kt=eb=>{if(eb)return{insetInlineEnd:Ct(eb[0]),marginTop:wt(eb[1])}},At=({color:eb,offset:ey,indicatorStyle:ex})=>{let eN=kt(ey);return eb&&!gt(eb)?{...eN,backgroundColor:eb,borderColor:eb,color:"#fff",...ex}:{...eN,...ex}},jt=({color:eb,offset:ey,indicatorStyle:ex})=>{let eN=kt(ey);return eb&&!gt(eb)?{...eN,backgroundColor:eb,color:eb,...ex}:{...eN,...ex}},Mt=eb=>{switch(vt(eb)){case"xs":return"status-xs";case"sm":return"status-sm";case"lg":return"status-lg";case"xl":return"status-xl";default:return"status-md"}},Nt=({dot:eb,displayCount:ey})=>{if(eb)return"pe-3.5";let ex=`${ey??""}`;return ex.length>=3?"pe-8":2===ex.length?"pe-7":"pe-6"},Pt=({className:eb,style:ey,indicatorNode:ex,content:eN})=>r("span",{className:_t("indicator inline-flex align-middle",eb),style:ey,children:[ex,n("span",{className:"inline-flex align-middle",children:eN})]}),Ft=({variant:eb,size:ey,outline:ex,dash:eN,soft:ew,ghost:ek,count:eC,overflowCount:e$=99,showZero:eS,dot:ej,status:eA,color:ez,text:eM,offset:eL,title:eT,style:eI,indicatorClassName:eO,indicatorStyle:eE,className:eP,children:eR})=>{let eF=bt(eC),eD=Et(eC,e$),eB=0===eF,eq=!xt(eC)&&!(eB&&!eS),eW=!!ej&&!eB,eH=!eW&&!eq&&(!!eA||!!ez),eV=eW||eq||eH,eK=void 0!==eC||!!ej||!!eA||!!ez||!!eM||!!eL||!!eO||!!eE,eZ=Ot({variant:eb,status:eA,color:ez}),eY=Dt(eM),eU=St(eR),eQ=eT??("string"==typeof eD||"number"==typeof eD?`${eD}`:void 0),eG=n("span",{className:_t("status ring-2 ring-base-100 shadow-sm",`status-${eZ}`,Mt(ey),"processing"===eA&&"animate-pulse",eO),style:jt({color:ez,offset:eL,indicatorStyle:eE}),title:eT});if(!eU&&eK&&eH)return r("span",{className:_t("inline-flex items-center gap-2 align-middle",eP),style:eI,children:[eG,eY?n("span",{children:eM}):null]});if(!eU&&eK&&(eW||eq)){let eb=eW?eG:n("span",{className:Tt({variant:eZ,size:ey,outline:ex,dash:eN,soft:ew,ghost:ek,className:_t("border-none shadow-sm",eO)}),style:At({color:ez,offset:eL,indicatorStyle:eE}),title:eQ,children:eD});if(eY){let eb=eW?n("span",{className:_t("indicator-item indicator-top indicator-end status ring-2 ring-base-100 shadow-sm",`status-${eZ}`,Mt(ey),"processing"===eA&&"animate-pulse",eO),style:jt({color:ez,offset:eL,indicatorStyle:eE}),title:eT}):n("span",{className:_t("indicator-item indicator-top indicator-end border-none shadow-sm ring-2 ring-base-100",Tt({variant:eZ,size:ey,outline:ex,dash:eN,soft:ew,ghost:ek,className:eO})),style:At({color:ez,offset:eL,indicatorStyle:eE}),title:eQ,children:eD});return r("span",{className:_t("indicator inline-flex align-middle",eP),style:eI,children:[eb,n("span",{className:_t("inline-flex align-middle",Nt({dot:eW,displayCount:eD})),children:eM})]})}return n("span",{className:_t("inline-flex align-middle",eP),style:eI,children:eb})}if(!eU&&eK)return eY?n("span",{className:_t("inline-flex items-center gap-2 align-middle",eP),style:eI,children:n("span",{children:eM})}):null;if(eU&&eK){let eb=Pt({className:eP,style:eI,indicatorNode:eV?eW||eH?n("span",{className:_t("indicator-item indicator-top indicator-end status ring-2 ring-base-100 shadow-sm",`status-${eZ}`,Mt(ey),"processing"===eA&&"animate-pulse",eO),style:jt({color:ez,offset:eL,indicatorStyle:eE}),title:eT}):n("span",{className:_t("indicator-item indicator-top indicator-end border-none shadow-sm ring-2 ring-base-100",Tt({variant:eZ,size:ey,outline:ex,dash:eN,soft:ew,ghost:ek,className:eO})),style:At({color:ez,offset:eL,indicatorStyle:eE}),title:eQ,children:eD}):null,content:eR});return eY?r("span",{className:"inline-flex items-center gap-2 align-middle",children:[eb,n("span",{children:eM})]}):eb}return n("span",{className:Tt({variant:eb,size:ey,outline:ex,dash:eN,soft:ew,ghost:ek,className:eP}),style:eI,title:eT,children:eR})},It=({text:eb,color:ey,placement:ex="end",className:eN,style:ew,children:ek})=>{let eC=gt(ey)?ey:"primary";return r("div",{className:"relative inline-block overflow-hidden align-middle",children:[n("span",{className:_t("badge badge-sm pointer-events-none absolute top-4 z-10 min-w-[9rem] justify-center rounded-none px-6 py-3 text-xs font-semibold uppercase tracking-[0.18em] shadow-lg",!ey||gt(ey)?`badge-${eC}`:"text-white","start"===ex?"left-[-3.25rem] -rotate-45":"right-[-3.25rem] rotate-45",eN),style:ey&&!gt(ey)?{backgroundColor:ey,borderColor:ey,color:"#fff",...ew}:ew,children:eb}),ek]})},Lt=Ft;Lt.Ribbon=It;var Rt=eb=>eb.replace(/[A-Z]/g,eb=>`-${eb.toLowerCase()}`),zt=eb=>eb?"string"==typeof eb?eb.trim():Object.entries(eb).filter(([,eb])=>null!=eb).map(([eb,ey])=>`${eb.startsWith("--")?eb:Rt(eb)}:${String(ey)}`).join("; "):"",Bt=(...eb)=>eb.map(eb=>zt(eb)).filter(Boolean).join("; "),Vt={display:"grid",justifyContent:"normal",alignItems:"stretch"},Ht=(eb,ey,ex)=>eb<ey?ey:eb>ex?ex:eb,Ut=(eb,ey)=>{let ex=Number(eb);return Number.isFinite(ex)?ex:ey},Wt=(eb,ey)=>{let ex=Ut(eb,0),eN=Ut(ey,100);return eN<=ex?{min:ex,max:ex+1}:{min:ex,max:eN}},Gt=eb=>{let ey=Ut(eb,1);return ey>0?ey:1},Kt=(eb,ey,ex,eN)=>Ht(Ut(eb,eN),ey,ex),qt=(eb,ey,ex)=>(eb-ey)/(ex-ey)*100,Jt=(eb,ey)=>ey?`${eb} ${ey}`:eb,Yt=eb=>n("div",{className:"relative h-full [&>*]:h-full [&>*]:w-full [&>*]:max-w-none",children:eb}),Xt=eb=>null!=eb&&(!Array.isArray(eb)||eb.length>0),Zt=(eb,ey)=>{"function"==typeof eb?eb(ey):eb&&"object"==typeof eb&&"current"in eb&&(eb.current=ey??void 0)},Qt=({className:eb,style:ey,role:ex,tabIndex:eN,label:ew,labelClassName:ek,children:eC,...e$})=>{let eS=e$.ref;"ref"in e$&&delete e$.ref;let ej=zt(ey);return r("div",{...e$,ref:eb=>{eb&&(ej?eb.setAttribute("style",ej):eb.removeAttribute("style")),Zt(eS,eb)},className:Jt("diff-item-1 relative",eb),role:ex,tabIndex:eN,children:[null==ew?null:n("span",{className:Jt("pointer-events-none absolute left-4 top-4 z-10 rounded-full bg-base-100/80 px-3 py-1 text-xs font-medium text-base-content shadow-sm backdrop-blur",ek),children:ew}),eC]})},$t=({className:eb,style:ey,role:ex,tabIndex:eN,label:ew,labelClassName:ek,children:eC,...e$})=>{let eS=e$.ref;"ref"in e$&&delete e$.ref;let ej=zt(ey);return r("div",{...e$,ref:eb=>{eb&&(ej?eb.setAttribute("style",ej):eb.removeAttribute("style")),Zt(eS,eb)},className:Jt("diff-item-2 relative",eb),role:ex,tabIndex:eN,children:[null==ew?null:n("span",{className:Jt("pointer-events-none absolute right-4 top-4 z-10 rounded-full bg-base-100/80 px-3 py-1 text-xs font-medium text-base-content shadow-sm backdrop-blur",ek),children:ew}),eC]})},en=({className:eb,style:ey,children:ex,...eN})=>{let ew=eN.ref;"ref"in eN&&delete eN.ref;let ek=zt(ey);return n("div",{...eN,ref:eb=>{eb&&(ek?eb.setAttribute("style",ek):eb.removeAttribute("style")),Zt(ew,eb)},className:Jt("diff-resizer",eb),children:ex})},tn=Object.assign(({className:eb,style:ey,tabIndex:ex,value:eN,defaultValue:ew,min:ek,max:eC,step:e$,disabled:eS,item1:ej,item2:eA,item1Label:ez,item2Label:eM,resizerContent:eL,children:eT,onChange:eI,...eO})=>{let eE=eO.ref;"ref"in eO&&delete eO.ref;let eP=Wt(ek,eC),eR=Gt(e$),eF=(0,e.ref)(Kt(ew??eN??50,eP.min,eP.max,50)),eD=void 0!==eN,eB=eD?Kt(eN,eP.min,eP.max,eF.value):Kt(eF.value,eP.min,eP.max,50),eq=qt(eB,eP.min,eP.max),eW=!Xt(eT)&&(void 0!==ej||void 0!==eA),eH=Jt(eW?"diff relative isolate overflow-hidden select-none":"diff",eb),eV=Bt(ey,Vt),eK=null,eZ=null,eY=null,eU=null,eQ=null,eG=eb=>{eb&&(eV?eb.setAttribute("style",eV):eb.removeAttribute("style")),Zt(eE,eb)},eJ=eb=>{let ey=qt(eb,eP.min,eP.max);eK&&eK.setAttribute("style",zt({clipPath:`inset(0 ${100-ey}% 0 0)`})),eZ&&eZ.setAttribute("style",zt({clipPath:`inset(0 0 0 ${ey}%)`})),eY&&eY.setAttribute("style",zt({left:`${ey}%`,width:0,minWidth:0,maxWidth:0,clipPath:"none",overflow:"visible",opacity:1,resize:"none",transform:"translateX(-50%)"})),eU&&(eU.style.left=`${ey}%`),eQ&&(eQ.setAttribute("aria-valuenow",String(eb)),eQ.value=String(eb))},eX=eb=>{let ey=eb.target,ex=Kt(ey?.value,eP.min,eP.max,eB);eD||(eF.value=ex),eJ(ex),eI&&eI(ex,eb)};if(!eW)return n("figure",{...eO,ref:eG,className:eH,tabIndex:ex,"aria-disabled":eS?"true":void 0,children:eT});let e0=eO["aria-label"]??"Diff position";return r("figure",{...eO,ref:eG,className:eH,tabIndex:void 0,"aria-disabled":eS?"true":void 0,children:[n(Qt,{className:"absolute inset-0 z-10 overflow-hidden",role:"img",ref:eb=>{eK=eb,eJ(eB)},children:Yt(ej)}),n($t,{className:"absolute inset-0 overflow-hidden after:hidden",role:"img",ref:eb=>{eZ=eb,eJ(eB)},children:Yt(eA)}),null==ez?null:n("span",{className:"pointer-events-none absolute left-4 top-4 z-30 rounded-full bg-base-100/80 px-3 py-1 text-xs font-medium text-base-content shadow-sm backdrop-blur",children:ez}),null==eM?null:n("span",{className:"pointer-events-none absolute right-4 top-4 z-30 rounded-full bg-base-100/80 px-3 py-1 text-xs font-medium text-base-content shadow-sm backdrop-blur",children:eM}),n(en,{className:"pointer-events-none absolute inset-y-0 z-20",ref:eb=>{eY=eb,eJ(eB)},style:{left:`${eq}%`,width:0,minWidth:0,maxWidth:0,clipPath:"none",overflow:"visible",opacity:1,resize:"none",transform:"translateX(-50%)"},children:n("span",{className:"absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-base-100 shadow-sm"})}),null==eL?null:n("span",{ref:eb=>{eU=eb,eJ(eB)},className:"pointer-events-none absolute top-1/2 z-30 inline-flex -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border border-base-300 bg-base-100/85 px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.2em] text-base-content shadow-sm backdrop-blur",style:{left:`${eq}%`},children:eL}),n("input",{type:"range",className:"absolute inset-0 z-30 h-full w-full cursor-col-resize opacity-0 disabled:cursor-not-allowed",ref:eb=>{eQ=eb,eJ(eB)},min:String(eP.min),max:String(eP.max),step:String(eR),value:String(eB),disabled:eS,tabIndex:ex,"aria-label":e0,"aria-valuemin":String(eP.min),"aria-valuemax":String(eP.max),"aria-valuenow":String(eB),onInput:eX,onChange:eX})]})},{Item1:Qt,Item2:$t,Resizer:en}),nn=(...eb)=>eb.filter(Boolean).join(" "),rn=({className:eb})=>r(e.Fragment,{children:[n("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:eb}),n("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:eb}),n("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:eb}),n("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:eb}),n("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:eb}),n("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:eb}),n("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:eb}),n("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:eb})]}),an=(eb,ey,ex,eN)=>{if(!ey&&!ex&&!eN)return eb;let{className:ew,children:ek,...eC}=eN??{},e$=nn(ew,ex);return n(ey??"div",{...eC,"data-hover3d-surface":"",className:e$||void 0,children:eb})},on=({as:eb,href:ey,target:ex,rel:eN,className:ew,surfaceAs:ek,surfaceClassName:eC,surfaceProps:e$,overlays:eS=!0,overlayClassName:ej,children:eA,...ez})=>{let eM=eb??(ey?"a":"div");return r(eM,{...ez,..."a"===eM&&null!=ey?{href:ey}:{},target:"a"===eM?ex:void 0,rel:"a"===eM?"_blank"!==ex||eN?eN:"noreferrer":void 0,className:nn("hover-3d",ew),children:[an(eA,ek,eC,e$),eS?n(rn,{className:ej}):null]})},sn={neutral:"text-neutral",primary:"text-primary",secondary:"text-secondary",accent:"text-accent",info:"text-info",success:"text-success",warning:"text-warning",error:"text-error"},cn={neutral:"bg-neutral border-neutral",primary:"bg-primary border-primary",secondary:"bg-secondary border-secondary",accent:"bg-accent border-accent",info:"bg-info border-info",success:"bg-success border-success",warning:"bg-warning border-warning",error:"bg-error border-error"},ln=(...eb)=>eb.filter(Boolean).join(" "),un=eb=>Array.isArray(eb)?eb.flatMap(eb=>un(eb)):dn(eb)?[eb]:[],dn=eb=>null!=eb,fn=(eb,ey)=>eb??ey,pn=eb=>{if(eb)return"left"===eb?"start":"right"===eb?"end":eb},mn=(eb,ey,ex)=>(eb.placement??pn(eb.position))||("alternate"===ex?ey%2==0?"start":"end":"start"===ex?"start":"end"),hn=({className:eb})=>n("span",{className:ln("inline-block size-3 rounded-full border-2 border-current bg-base-100 align-middle",eb)}),gn=({className:eb})=>n("span",{className:ln("loading loading-spinner loading-xs",eb)}),_n=eb=>ln(eb.lineClassName,eb.color?cn[eb.color]:void 0),vn=eb=>{if(!(!eb.color||cn[eb.color]))return{backgroundColor:eb.color,borderColor:eb.color}},yn=(eb,ey)=>{let ex=eb.color?sn[eb.color]:void 0,eN=ln(eb.iconClassName,ex);return eb.middle?{className:ln(eb.middle.className,ex),content:eb.middle.content}:dn(eb.icon)?{className:eN,content:eb.icon}:dn(eb.dot)?{className:eN,content:eb.dot}:eb.loading?{className:eN,content:n(gn,{})}:eb.color&&!sn[eb.color]?{className:eb.iconClassName,content:n("span",{style:{color:eb.color},children:n(hn,{})})}:ey?{className:eN,content:n(hn,{})}:void 0},bn=(eb,ey)=>{let ex=eb.title??eb.label,eN=eb.content??eb.children??eb.title??eb.label,ew=dn(ex)&&eN!==ex;if(!dn(eN))return{start:eb.start,end:eb.end,autoMode:!1};let ek={box:eb.contentBox??eb.box,className:eb.contentClassName,content:eN},eC=ew?{box:eb.titleBox,className:eb.titleClassName,content:ex}:void 0;return"start"===ey?{start:eb.start??ek,end:eb.end??eC,autoMode:!0}:{start:eb.start??eC,end:eb.end??ek,autoMode:!0}},xn=(eb,ey)=>eb?{key:"__timeline_pending__",content:!0===eb?"Pending":eb,dot:ey,loading:!dn(ey),contentBox:!0,liClassName:"opacity-80"}:null,Sn=(eb,ey,ex,eN,ew)=>{let ek=eb.slice(),eC=xn(eN,ew);return eC&&ek.push(eC),ex&&ek.reverse(),ek.map((eb,ex)=>{let eN=mn(eb,ex,ey),{start:ew,end:eC,autoMode:e$}=eb.start||eb.end?{start:eb.start,end:eb.end,autoMode:!1}:bn(eb,eN);return{key:eb.key,beforeLine:eb.beforeLine??ex>0,afterLine:eb.afterLine??ex<ek.length-1,start:ew,middle:yn(eb,e$),end:eC,liClassName:ln(eb.liClassName,eb.className),lineClassName:_n(eb),lineStyle:vn(eb)}})},Cn=({box:eb,className:ey,children:ex})=>n("div",{className:ln("timeline-start",eb&&"timeline-box",ey),children:ex}),wn=({className:eb,children:ey})=>n("div",{className:ln("timeline-middle",eb),children:ey}),Tn=({box:eb,className:ey,children:ex})=>n("div",{className:ln("timeline-end",eb&&"timeline-box",ey),children:ex}),En=(eb,ey)=>r("li",{className:eb.liClassName,children:[eb.beforeLine?n("hr",{className:eb.lineClassName,style:eb.lineStyle}):null,eb.start?n(Cn,{box:eb.start.box,className:eb.start.className,children:eb.start.content}):null,eb.middle?n(wn,{className:eb.middle.className,children:eb.middle.content}):null,eb.end?n(Tn,{box:eb.end.box,className:eb.end.className,children:eb.end.content}):null,eb.afterLine?n("hr",{className:eb.lineClassName,style:eb.lineStyle}):null]},eb.key??ey),Dn=Object.assign(({direction:eb,orientation:ey,mode:ex,snapIcon:eN,compact:ew,reverse:ek,pending:eC,pendingDot:e$,className:eS,children:ej,items:eA})=>{let ez=fn(eb,ey),eM=ln("timeline",ez&&`timeline-${ez}`,eN&&"timeline-snap-icon",ew&&"timeline-compact",eS);if(eA&&eA.length){let eb=Sn(eA,ex,ek,eC,e$);return(0,e.h)("ul",{className:eM},...eb.map(En))}if(eC){let eb=Sn([],ex,ek,eC,e$);return(0,e.h)("ul",{className:eM},...eb.map(En))}return(0,e.h)("ul",{className:eM},...un(ej))},{Start:Cn,Middle:wn,End:Tn}),On=(...eb)=>eb.filter(Boolean).join(" "),kn=eb=>{switch(eb){case"secondary":return"text-base-content/65";case"success":return"text-success";case"warning":return"text-warning";case"danger":return"text-error";default:return}},An=({type:eb,disabled:ey,underline:ex,deleted:eN,strong:ew,italic:ek,className:eC,display:e$,link:eS})=>On(e$,eS?"link link-hover decoration-current underline-offset-4":void 0,kn(eb),ey?"cursor-not-allowed opacity-45":void 0,ex?"underline decoration-current underline-offset-4":void 0,eN?"line-through":void 0,ew?"font-semibold":void 0,ek?"italic":void 0,eC),jn=(eb,{mark:ey,code:ex,keyboard:eN})=>{let ew=eb;return eN&&(ew=n("kbd",{className:"kbd kbd-sm align-middle",children:ew})),ex&&(ew=n("code",{className:"rounded bg-base-200 px-1.5 py-0.5 text-[0.9em]",children:ew})),ey&&(ew=n("mark",{className:"rounded bg-warning/20 px-1 py-0.5 text-inherit",children:ew})),ew},Mn=({as:eb="div",className:ey,style:ex,children:eN,...ew})=>n("article"===eb?"article":"section"===eb?"section":"div",{...{...ew,className:On("rue-typography text-base-content",ey),style:ex},children:eN}),Nn=({as:eb="span",type:ey,disabled:ex,mark:eN,code:ew,keyboard:ek,underline:eC,delete:e$,strong:eS,italic:ej,className:eA,style:ez,children:eM,...eL})=>{let eT=jn(eM,{mark:eN,code:ew,keyboard:ek}),eI={...eL,className:An({type:ey,disabled:ex,underline:eC,deleted:e$,strong:eS,italic:ej,className:eA,display:"span"===eb?"inline":"block"}),style:ez,"aria-disabled":ex?"true":void 0};return n("div"===eb?"div":"p"===eb?"p":"span",{...eI,children:eT})},Pn=({href:eb,target:ey,rel:ex,type:eN,disabled:ew,mark:ek,code:eC,keyboard:e$,underline:eS,delete:ej,strong:eA,italic:ez,className:eM,style:eL,children:eT,tabIndex:eI,...eO})=>{let eE=jn(eT,{mark:ek,code:eC,keyboard:e$});return n("a",{...eO,href:ew?void 0:eb,target:ey,rel:"_blank"!==ey||ex?ex:"noreferrer",className:An({type:eN,disabled:ew,underline:eS??!0,deleted:ej,strong:eA,italic:ez,className:eM,display:"inline",link:!0}),style:eL,"aria-disabled":ew?"true":void 0,tabindex:ew?"-1":void 0===eI?void 0:String(eI),children:eE})},Fn=eb=>{switch(eb){case 1:return"block text-4xl font-semibold tracking-tight text-balance md:text-5xl";case 2:return"block text-3xl font-semibold tracking-tight text-balance md:text-4xl";case 3:return"block text-2xl font-semibold tracking-tight text-balance md:text-3xl";case 4:return"block text-xl font-semibold tracking-tight text-balance md:text-2xl";default:return"block text-lg font-semibold tracking-tight text-balance md:text-xl"}},In=Object.assign(Mn,{Text:Nn,Link:Pn,Title:({level:eb=1,type:ey,disabled:ex,mark:eN,code:ew,keyboard:ek,underline:eC,delete:e$,strong:eS,italic:ej,className:eA,style:ez,children:eM,...eL})=>{let eT={...eL,className:On(Fn(eb),An({type:ey,disabled:ex,underline:eC,deleted:e$,strong:eS,italic:ej,className:eA})),style:ez,"aria-disabled":ex?"true":void 0},eI=jn(eM,{mark:eN,code:ew,keyboard:ek});return n(1===eb?"h1":2===eb?"h2":3===eb?"h3":4===eb?"h4":"h5",{...eT,children:eI})},Paragraph:({type:eb,disabled:ey,mark:ex,code:eN,keyboard:ew,underline:ek,delete:eC,strong:e$,italic:eS,className:ej,style:eA,children:ez,...eM})=>n("p",{...eM,className:On("block leading-7 text-base-content/80",An({type:eb,disabled:ey,underline:ek,deleted:eC,strong:e$,italic:eS,className:ej})),style:eA,"aria-disabled":ey?"true":void 0,children:jn(ez,{mark:ex,code:eN,keyboard:ew})})}),Ln=(eb,ey)=>ey?`${eb} ${ey}`:eb,Rn=(eb,ey)=>eb&&ey?{...eb,...ey}:ey??eb,zn=(eb,ey,ex,eN)=>{let ew=eb.key??ey,ek=eb.children??eb.text,eC=Ln(ex??"",eb.className).trim()||void 0,e$=Rn(eN,eb.style);return eb.href?n(In.Link,{href:eb.href,target:eb.target,rel:eb.rel,type:eb.type,disabled:eb.disabled,mark:eb.mark,code:eb.code,keyboard:eb.keyboard,underline:eb.underline,delete:eb.delete,strong:eb.strong,italic:eb.italic,className:eC,style:e$,children:ek},ew):n(In.Text,{as:eb.as,type:eb.type,disabled:eb.disabled,mark:eb.mark,code:eb.code,keyboard:eb.keyboard,underline:eb.underline,delete:eb.delete,strong:eb.strong,italic:eb.italic,className:eC,style:e$,children:ek},ew)},Bn=Object.assign(({as:eb="span",className:ey,style:ex,children:eN,items:ew,innerClassName:ek,innerStyle:eC,itemClassName:e$,itemStyle:eS,...ej})=>{let eA=Ln("text-rotate",ey),ez=ew&&ew.length?n("span",{className:ek,style:eC,children:ew.map((eb,ey)=>zn(eb,ey,e$,eS))}):eN;return n("div"===eb?"div":"span",{...ej,className:eA,style:ex,children:ez})},{Text:In.Text,Link:In.Link,Title:In.Title,Paragraph:In.Paragraph}),Vn=["neutral","primary","secondary","accent","info","success","warning","error"],Hn=(...eb)=>eb.filter(Boolean).join(" "),Un=eb=>null!=eb&&!1!==eb&&""!==eb&&(!Array.isArray(eb)||eb.some(eb=>Un(eb))),Wn=eb=>!!eb&&Vn.includes(eb),Gn=eb=>{switch(eb){case"default":return"neutral";case"processing":return"info";case"success":case"warning":case"error":return eb;default:return Wn(eb)?eb:void 0}},Kn=eb=>{switch(eb){case"small":return"sm";case"default":case"medium":return"md";case"large":return"lg";default:return eb}},qn=eb=>{switch(Kn(eb)??"md"){case"xs":return"min-h-4 min-w-4 px-1 text-[10px]";case"sm":return"min-h-5 min-w-5 px-1 text-[10px]";case"lg":return"min-h-6 min-w-6 px-2 text-sm";case"xl":return"min-h-7 min-w-7 px-2.5 text-sm";default:return"min-h-5 min-w-5 px-1.5 text-[11px]"}},Jn=eb=>{switch(eb){case"primary":return{dotClass:"status-primary",badgeClass:"bg-primary text-primary-content",textClass:"text-primary"};case"secondary":return{dotClass:"status-secondary",badgeClass:"bg-secondary text-secondary-content",textClass:"text-secondary"};case"accent":return{dotClass:"status-accent",badgeClass:"bg-accent text-accent-content",textClass:"text-accent"};case"info":return{dotClass:"status-info",badgeClass:"bg-info text-info-content",textClass:"text-info"};case"success":return{dotClass:"status-success",badgeClass:"bg-success text-success-content",textClass:"text-success"};case"warning":return{dotClass:"status-warning",badgeClass:"bg-warning text-warning-content",textClass:"text-warning"};case"error":return{dotClass:"status-error",badgeClass:"bg-error text-error-content",textClass:"text-error"};case"neutral":return{dotClass:"status-neutral",badgeClass:"bg-neutral text-neutral-content",textClass:"text-neutral"};default:return{dotClass:"",badgeClass:"bg-neutral text-neutral-content",textClass:"text-base-content"}}},Yn=eb=>"number"==typeof eb?`${Math.abs(eb)}px`:String(eb).trim().replace(/^-/,""),Xn=eb=>{if("number"==typeof eb)return`${-1*eb}px`;let ey=String(eb).trim();return ey.startsWith("-")?ey.slice(1):`-${ey}`},Zn=eb=>{if(eb)return{insetInlineEnd:Xn(eb[0]),marginTop:Yn(eb[1])}},Qn=({dot:eb,displayCount:ey})=>{if(eb)return"pe-3.5";let ex=`${ey??""}`;return ex.length>=3?"pe-8":2===ex.length?"pe-7":"pe-6"},$n=(eb,ey)=>"number"==typeof eb&&eb>ey?`${ey}+`:eb,er=({as:eb="span",ariaLabel:ey,size:ex,color:eN,status:ew,text:ek,count:eC=null,showZero:e$=!1,overflowCount:eS=99,dot:ej=!1,offset:eA,title:ez,className:eM,style:eL,children:eT,...eI})=>{let eO=Kn(ex),eE=Un(eT),eP=null!=eC,eR=Gn(ew),eF=eN??eR??(eE||eP||ej?"error":void 0),eD=Wn(eF)?eF:void 0,eB="string"!=typeof eF||eD?void 0:eF,eq=Jn(eD),eW=ej?"":$n(eC,eS),eH=0===eW||"0"===eW,eV=!eP||eH&&!e$,eK=ej&&!eH,eZ=0===ek||!!ek&&!0!==ek,eY=eZ&&(!eP||eK||!eV),eU=!eP&&!ej,eQ=!eE&&eZ&&eP&&!eK&&!eV&&(void 0!==ew||void 0!==eN),eG=!eE&&eZ&&(eK||!eV),eJ="processing"===ew?"animate-pulse":void 0,eX=ez??("number"==typeof eW||"string"==typeof eW?`${eW}`:void 0),e0=(ex,eN,ew)=>{let ek={...eI,className:Hn(eN,eM),style:eL||ew?{...eL,...ew}:void 0};return void 0!==ey&&(ek["aria-label"]=ey),n("div"===eb?"div":"span",{...ek,children:ex})},e1=(eb,ey,ex)=>n("span",{className:Hn("status",eO?`status-${eO}`:void 0,eq.dotClass,eJ,eb),style:eB?{backgroundColor:eB,color:eB,...ey}:ey,title:ex}),e2=(eb,ey)=>n("span",{className:Hn("inline-flex items-center justify-center whitespace-nowrap rounded-full font-medium leading-none shadow-sm",qn(ex),eq.badgeClass,eb),style:eB?{backgroundColor:eB,color:"#fff",...ey}:ey,title:eX,children:eW});if(!eE&&!eY&&(eK||!eP))return e0(null,Hn("status",eO?`status-${eO}`:void 0,eq.dotClass,eJ),eB?{backgroundColor:eB,color:eB}:void 0);let e5=eY?n("span",{className:Hn("text-sm leading-none",eU&&!eB?eq.textClass:void 0),style:eU&&eB?{color:eB}:void 0,children:ek}):null,e3=Zn(eA),e4=eQ?r("span",{className:"inline-flex items-center gap-2",children:[e1("shrink-0"),n("span",{className:"text-sm leading-none",children:ek})]}):ek,e6=eb=>e0(r("span",{className:"indicator inline-flex align-middle",children:[eb,n("span",{className:Hn("inline-flex items-center text-sm leading-none text-base-content",Qn({dot:eK,displayCount:eW})),children:e4})]}));return eE||!eK&&eP?eE?e0(r(e.Fragment,{children:[r("span",{className:"indicator inline-flex w-fit shrink-0 align-middle",children:[eK?e1("indicator-item ring-2 ring-base-100 shadow-sm",e3,eX):eV?null:e2("indicator-item ring-2 ring-base-100",e3),n("span",{className:"inline-flex w-fit shrink-0 align-middle",children:eT})]}),e5]}),"inline-flex items-center gap-2 align-middle"):eV?null:eG?e6(e2("indicator-item",e3)):e0(r(e.Fragment,{children:[e2(),e5]}),"inline-flex items-center gap-2 align-middle"):eG?e6(e1("indicator-item ring-2 ring-base-100 shadow-sm",e3,eX)):e0(r(e.Fragment,{children:[e1(),e5]}),"inline-flex items-center gap-2 align-middle")},tr=".",nr=",",rr="HH:mm:ss",ir=1e3/30,ar=1e3,or=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],sr=(eb,ey)=>ey?`${eb} ${ey}`:eb,cr=eb=>null!=eb&&!1!==eb&&(!Array.isArray(eb)||eb.some(eb=>cr(eb))),lr=eb=>{if(null==eb)return null;let ey=eb instanceof Date?eb.getTime():new Date(eb).getTime();return Number.isFinite(ey)?ey:null},ur=({value:eb,formatter:ey,precision:ex,decimalSeparator:eN=tr,groupSeparator:ew=nr})=>{if("function"==typeof ey)return ey(eb);if(!cr(eb))return null;if("number"!=typeof eb&&"string"!=typeof eb)return eb;let ek=String(eb),eC=ek.match(/^(-?)(\d*)(\.(\d+))?$/);if(!eC||"-"===ek)return ek;let e$=eC[1],eS=eC[2]||"0",ej=eC[4]||"";return eS=eS.replace(/\B(?=(\d{3})+(?!\d))/g,ew),"number"==typeof ex&&ex>=0&&(ej=ej.padEnd(ex,"0").slice(0,ex>0?ex:0)),`${e$}${eS}${ej?`${eN}${ej}`:""}`},dr=({value:eb,children:ey,valueRender:ex,formatter:eN,precision:ew,decimalSeparator:ek,groupSeparator:eC})=>{let e$=cr(eb)?ur({value:eb,formatter:eN,precision:ew,decimalSeparator:ek,groupSeparator:eC}):ey;return"function"==typeof ex?ex(e$):e$},fr=eb=>{let ey=[],ex=0;for(;ex<eb.length;){let eN=eb[ex];if("["===eN){let eN=eb.indexOf("]",ex+1),ew=-1===eN?eb.slice(ex+1):eb.slice(ex+1,eN);if(ew){let eb=ey[ey.length-1];eb?.type==="literal"?eb.content+=ew:ey.push({type:"literal",content:ew})}ex=-1===eN?eb.length:eN+1;continue}if(/[YMDHmsS]/.test(eN)){let ew=ex+1;for(;ew<eb.length&&eb[ew]===eN;)ew+=1;ey.push({type:"unit",unit:eN,digits:ew-ex}),ex=ew;continue}let ew=ex+1;for(;ew<eb.length&&"["!==eb[ew]&&!/[YMDHmsS]/.test(eb[ew]);)ew+=1;let ek=eb.slice(ex,ew);if(ek){let eb=ey[ey.length-1];eb?.type==="literal"?eb.content+=ek:ey.push({type:"literal",content:ek})}ex=ew}return ey},pr=(eb,ey)=>{let ex=new Set;ey.forEach(eb=>{"unit"===eb.type&&ex.add(eb.unit)});let eN=Math.max(eb,0),ew={};return or.forEach(([eb,ey])=>{if(!ex.has(eb))return;let ek=Math.floor(eN/ey);ew[eb]=ek,eN-=ek*ey}),ew},mr=(eb,ey)=>{let ex=fr(ey),eN=pr(eb,ex);return ex.map(eb=>{if("literal"===eb.type)return eb.content;let ey=String(eN[eb.unit]??0);return eb.digits>1?ey.padStart(eb.digits,"0"):ey}).join("")},hr=(eb,ey)=>"number"==typeof ey&&ey>0?ey:eb.includes("S")?ir:ar,gr=({figure:eb,figureClassName:ey,figureStyle:ex,title:eN,titleClassName:ew,titleStyle:ek,value:eC,valueClassName:e$,valueStyle:eS,valueRender:ej,prefix:eA,suffix:ez,loading:eM,formatter:eL,precision:eT,decimalSeparator:eI,groupSeparator:eO,desc:eE,descClassName:eP,descStyle:eR,actions:eF,actionsClassName:eD,actionsStyle:eB})=>r(e.Fragment,{children:[cr(eb)?n(Sr,{className:ey,style:ex,children:eb}):null,cr(eN)?n(yr,{className:ew,style:ek,children:eN}):null,eM||cr(eC)||cr(eA)||cr(ez)||"function"==typeof eL||"function"==typeof ej?n(br,{className:e$,style:eS,value:eC,prefix:eA,suffix:ez,loading:eM,valueRender:ej,formatter:eL,precision:eT,decimalSeparator:eI,groupSeparator:eO}):null,cr(eE)?n(xr,{className:eP,style:eR,children:eE}):null,cr(eF)?n(Cr,{className:eD,style:eB,children:eF}):null]}),_r=({direction:eb,className:ey,children:ex,items:eN})=>{let ew=sr(eb?`stats stats-${eb}`:"stats",ey);return eN&&eN.length?n("div",{className:ew,children:eN.map((eb,ey)=>n(vr,{...eb},eb.key??ey))}):n("div",{className:ew,children:ex})},vr=({center:eb,className:ey,children:ex,figure:eN,figureClassName:ew,figureStyle:ek,title:eC,titleClassName:e$,titleStyle:eS,value:ej,valueClassName:eA,valueStyle:ez,valueRender:eM,prefix:eL,suffix:eT,loading:eI,formatter:eO,precision:eE,decimalSeparator:eP,groupSeparator:eR,desc:eF,descClassName:eD,descStyle:eB,actions:eq,actionsClassName:eW,actionsStyle:eH})=>n("div",{className:sr(eb?"stat place-items-center":"stat",ey),children:cr(ex)?ex:gr({figure:eN,figureClassName:ew,figureStyle:ek,title:eC,titleClassName:e$,titleStyle:eS,value:ej,valueClassName:eA,valueStyle:ez,valueRender:eM,prefix:eL,suffix:eT,loading:eI,formatter:eO,precision:eE,decimalSeparator:eP,groupSeparator:eR,desc:eF,descClassName:eD,descStyle:eB,actions:eq,actionsClassName:eW,actionsStyle:eH})}),yr=({className:eb,style:ey,children:ex})=>n("div",{className:sr("stat-title",eb),style:ey,children:ex}),br=({className:eb,style:ey,children:ex,value:eN,prefix:ew,suffix:ek,loading:eC,valueRender:e$,formatter:eS,precision:ej,decimalSeparator:eA,groupSeparator:ez})=>{let eM=dr({value:eN,children:ex,valueRender:e$,formatter:eS,precision:ej,decimalSeparator:eA,groupSeparator:ez});return r("div",{className:sr("stat-value",eb),style:ey,children:[cr(ew)?n("span",{className:"stat-value-prefix mr-2 text-base-content/70 text-[0.55em]","aria-hidden":"true",children:ew}):null,eC?n("span",{className:"skeleton inline-block h-[1.15em] w-24 max-w-full align-middle","data-stat-loading":"true","aria-hidden":"true"}):cr(eM)?n("span",{className:"stat-value-text","data-stat-value":"true",children:eM}):null,cr(ek)?n("span",{className:"stat-value-suffix ml-2 text-base-content/70 text-[0.55em]","aria-hidden":"true",children:ek}):null]})},xr=({className:eb,style:ey,children:ex})=>n("div",{className:sr("stat-desc",eb),style:ey,children:ex}),Sr=({className:eb,style:ey,children:ex})=>n("div",{className:sr("stat-figure",eb),style:ey,children:ex}),Cr=({className:eb,style:ey,children:ex})=>n("div",{className:sr("stat-actions",eb),style:ey,children:ex}),wr=({type:eb="countdown",className:ey,center:ex,figure:eN,figureClassName:ew,figureStyle:ek,title:eC,titleClassName:e$,titleStyle:eS,valueClassName:ej,valueStyle:eA,prefix:ez,suffix:eM,loading:eL,desc:eT,descClassName:eI,descStyle:eO,actions:eE,actionsClassName:eP,actionsStyle:eR,value:eF,format:eD=rr,interval:eB,ariaLive:eq,onChange:eW,onFinish:eH})=>{let eV=(0,e.ref)(0),eK=(0,e.useRef)(null),eZ=(0,e.useRef)(!1),eY=()=>{null!=eK.current&&(clearInterval(eK.current),eK.current=null)},eU=()=>{let ey=lr(eF);if(null==ey)return eV.value=0,eW&&eW(void 0),eY(),!1;let ex=Date.now(),eN=Math.max("countup"===eb?ex-ey:ey-ex,0);return eV.value=eN,eW&&eW(eN),"countdown"===eb&&eN<=0?(eY(),eZ.current||(eZ.current=!0,eH&&eH()),!1):(eZ.current=!1,!0)};return(0,e.watch)(()=>`${eb}|${lr(eF)??"invalid"}|${eD}|${eB??""}`,()=>{eZ.current=!1,eY(),eU()&&(eK.current=setInterval(eU,hr(eD,eB)))},{immediate:!0}),(0,e.onUnmounted)(eY),n(vr,{center:ex,className:ey,figure:eN,figureClassName:ew,figureStyle:ek,title:eC,titleClassName:e$,titleStyle:eS,value:n("span",{"data-stat-timer":eb,"aria-live":eq??(eD.includes("S")?"off":"polite"),"aria-label":mr(eV.value,eD),children:mr(eV.value,eD)}),valueClassName:ej,valueStyle:eA,prefix:ez,suffix:eM,loading:eL,desc:eT,descClassName:eI,descStyle:eO,actions:eE,actionsClassName:eP,actionsStyle:eR})},Tr=Object.assign(_r,{Item:vr,Title:yr,Value:br,Desc:xr,Figure:Sr,Actions:Cr,Timer:wr,Countdown:eb=>n(wr,{...eb,type:"countdown"})}),Er=eb=>eb.replace(/[A-Z]/g,eb=>`-${eb.toLowerCase()}`),Dr=eb=>{if(eb)return"string"==typeof eb?eb.trim()||void 0:Object.entries(eb).filter(([,eb])=>null!=eb).map(([eb,ey])=>`${eb.startsWith("--")?eb:Er(eb)}:${String(ey)}`).join("; ")||void 0},Or=(eb,ey)=>ey?`${eb} ${ey}`:eb,kr=eb=>null==eb||!1===eb?[]:Array.isArray(eb)?eb.flatMap(eb=>kr(eb)):[eb],Ar=(eb,ey,ex)=>Math.min(ex,Math.max(ey,eb)),jr=(eb,ey,ex)=>{if(ey<=0)return 0;if(ex){let ex=eb%ey;return ex>=0?ex:ex+ey}return Ar(eb,0,ey-1)},Mr=eb=>{switch(eb){case"left":return"start";case"right":return"end";default:return eb??"bottom"}},Nr=(eb,ey)=>{"function"==typeof eb?eb(ey):eb&&"object"==typeof eb&&(eb.current=ey??void 0)},Pr=(eb,ey,ex)=>"function"==typeof eb?eb(ey):eb??ex,Fr=(eb,ey,ex,eN,ew)=>{let ek=ex;return"center"===eb?ek=ex-(ey-eN)/2:"end"===eb&&(ek=ex-(ey-eN)),Ar(ek,0,Math.max(ew-ey,0))},Ir=eb=>{eb.style.transitionProperty="",eb.style.transitionDuration="",eb.style.transitionTimingFunction=""},Lr=eb=>{eb.style.position="",eb.style.inset="",eb.style.opacity="",eb.style.pointerEvents="",eb.style.zIndex="",eb.style.transitionProperty="",eb.style.transitionDuration="",eb.style.transitionTimingFunction="",eb.style.transform=""},Rr=Object.assign(({align:eb="start",direction:ey="horizontal",effect:ex="scrollx",fade:eN=!1,auto:ew=!1,autoplay:ek=!1,interval:eC=3e3,autoplaySpeed:e$,loop:eS=!0,infinite:ej,autoDirection:eA="forward",activeIndex:ez,defaultActiveIndex:eM,initialSlide:eL,slickGoTo:eT,dots:eI=!1,arrows:eO=!1,prevArrow:eE,nextArrow:eP,dotPlacement:eR,dotPosition:eF,draggable:eD=!1,waitForAnimate:eB=!1,speed:eq=500,easing:eW="ease",pauseOnHover:eH,adaptiveHeight:eV=!1,onIndexChange:eK,beforeChange:eZ,afterChange:eY,apiRef:eU,className:eQ,style:eG,children:eJ,items:eX,...e0})=>{let e1,e2=e0.ref,e5=e0.onMouseEnter,e3=e0.onMouseLeave,e4=e0.onPointerDown,e6=e0.onPointerUp,e7=e0.onPointerCancel,e8=e0.onPointerLeave;"ref"in e0&&delete e0.ref,"onMouseEnter"in e0&&delete e0.onMouseEnter,"onMouseLeave"in e0&&delete e0.onMouseLeave,"onPointerDown"in e0&&delete e0.onPointerDown,"onPointerUp"in e0&&delete e0.onPointerUp,"onPointerCancel"in e0&&delete e0.onPointerCancel,"onPointerLeave"in e0&&delete e0.onPointerLeave;let e9=eN?"fade":ex,tb=ej??eS,ty="object"==typeof ek||ek||ew,tx=e$??eC,tN=eH??ty,tw=Mr(eR??eF),tk=ty&&"object"==typeof ek&&!!ek.dotDuration,tC=Dr(eG),t$=kr(eJ),tS=eX??[],tj=tS.length>0?tS.length:t$.length,tA=eT??ez,tz=jr("number"==typeof tA?tA:eM??eL??0,tj||1,tb),tM=(0,e.useRef)(),tL=(0,e.useRef)(),tT=(0,e.useRef)(null),tI=(0,e.useRef)(null),tO=(0,e.useRef)(null),tE=(0,e.useRef)(null),tP=(0,e.useRef)(null),tR=(0,e.useRef)(!1),tF=(0,e.useRef)(null),tD=(0,e.ref)(0),tB=(0,e.ref)(!1),tq=(0,e.ref)(tz),tW=()=>{let eb=tL.current;return eb?Array.from(eb.children).filter(eb=>eb instanceof HTMLElement):[]},tH=()=>{null!=tI.current&&(clearTimeout(tI.current),tI.current=null),tR.current=!1},tV=()=>{null!=tT.current&&(clearInterval(tT.current),tT.current=null)},tK=()=>{tV(),!(!ty||1>=(tW().length||tj))&&(tN&&tB.value||(tT.current=setInterval(()=>{tQ(tq.value+("backward"===eA?-1:1),{source:"autoplay"})},tx)))},tZ={nativeElement:void 0,goTo:(eb,ey=!1)=>{tQ(eb,{source:"api",dontAnimate:ey})},next:()=>{tQ(tq.value+1,{source:"api"})},prev:()=>{tQ(tq.value-1,{source:"api"})},autoPlay:eb=>{"leave"===eb||"blur"===eb?tV():tK()},stop:()=>{tV()}},tY=()=>{tZ.nativeElement=tM.current,Nr(e2,tM.current?tZ:null),Nr(eU,tM.current?tZ:null)},tU=(ex=!1)=>{tY(),"fade"===e9?(eb=>{let ey=tM.current,ex=tL.current;if(!ey||!ex)return;let eN=tW();if(ey.style.position="relative",ey.style.overflow="hidden",ey.style.transition=`height ${eq}ms ${eW}`,ex.style.display="block",ex.style.width="100%",ex.style.height="100%",ex.style.position="relative",ex.style.transform="",Ir(ex),!eN.length)return;let ew=jr(tq.value,eN.length,tb);if(ew!==tq.value){tq.value=ew;return}let ek=eN[ew],eC=eN.reduce((eb,ey)=>Math.max(eb,ey.offsetHeight),0),e$=eV?ek.offsetHeight:eC;e$>0&&(ey.style.height=`${e$}px`,ex.style.minHeight=`${e$}px`),eN.forEach((ey,ex)=>{ey.style.position="absolute",ey.style.inset="0",ey.style.width="100%",ey.style.height="100%",ey.style.opacity=ex===ew?"1":"0",ey.style.pointerEvents=ex===ew?"auto":"none",ey.style.zIndex=ex===ew?"1":"0",ey.style.transitionProperty="opacity",ey.style.transitionDuration=eb?"0ms":`${eq}ms`,ey.style.transitionTimingFunction=eW,ey.style.transform="translate3d(0, 0, 0)"})})(ex):(ex=>{let eN=tM.current,ew=tL.current;if(!eN||!ew)return;let ek=tW();if(eN.style.position="relative",eN.style.overflow="hidden",eN.style.transition=eV?`height ${eq}ms ${eW}`:"",ew.style.display="flex",ew.style.flexDirection="vertical"===ey?"column":"row",ew.style.width="vertical"===ey?"100%":"",ew.style.height="vertical"===ey?"100%":"",ew.style.position="",ew.style.minHeight="",ew.style.transitionProperty="transform",ew.style.transitionDuration=ex?"0ms":`${eq}ms`,ew.style.transitionTimingFunction=eW,ek.forEach(Lr),!ek.length){ew.style.transform="";return}let eC=jr(tq.value,ek.length,tb);if(eC!==tq.value){tq.value=eC;return}let e$=ek[eC],eS=Fr(eb,"vertical"===ey?eN.clientHeight:eN.clientWidth,"vertical"===ey?e$.offsetTop:e$.offsetLeft,"vertical"===ey?e$.offsetHeight:e$.offsetWidth,"vertical"===ey?ew.scrollHeight:ew.scrollWidth);ew.style.transform="vertical"===ey?`translate3d(0, -${eS}px, 0)`:`translate3d(-${eS}px, 0, 0)`,eV&&"horizontal"===ey?eN.style.height=`${e$.offsetHeight}px`:eV||(eN.style.height="")})(ex),(()=>{let eb=tM.current;if(!eb)return;let ey=jr(tq.value,Math.max(tJ,1),tb);eb.setAttribute("data-rue-carousel-current",String(ey));let ex=eb.querySelector('[data-rue-carousel-prev="true"]'),eN=eb.querySelector('[data-rue-carousel-next="true"]');ex&&(ex.disabled=!tb&&ey<=0),eN&&(eN.disabled=!tb&&ey>=Math.max(0,tJ-1)),Array.from(eb.querySelectorAll("[data-rue-carousel-dot]")).forEach((eb,ex)=>{let eN=ex===ey;eN?eb.setAttribute("aria-current","true"):eb.removeAttribute("aria-current"),eb.classList.toggle("w-9",eN),eb.classList.toggle("bg-primary/30",eN),eb.classList.toggle("w-2.5",!eN);let ew=eb.querySelector("[data-rue-carousel-dot-fill]");ew&&(ew.classList.toggle("scale-100",eN),ew.classList.toggle("scale-0",!eN))})})(),requestAnimationFrame(()=>{(()=>{if(!tk)return;let eb=tM.current;if(!eb)return;let ey=eb.querySelector('[data-rue-carousel-dot-progress="active"]');ey&&(ey.style.transition="none",ey.style.transform="scaleX(0)",requestAnimationFrame(()=>{ey.style.transition=`transform ${tx}ms linear`,ey.style.transform="scaleX(1)"}))})()})},tQ=(eb,ey={})=>{let ex=tW().length||tj;if(ex<=0)return;let eN=jr(eb,ex,tb),ew=jr(tq.value,ex,tb);if(!(eB&&tR.current&&!ey.dontAnimate)){var ek;if(eN===ew)return void tU(!!ey.dontAnimate);eZ&&eZ(ew,eN),tq.value=eN,"prop"!==ey.source&&(tP.current=eN),eK&&eK(eN),tD.value+=1,tU(!!ey.dontAnimate),ek=!!ey.dontAnimate,tH(),!ek&&eq>0&&(tR.current=!0),tI.current=setTimeout(()=>{tR.current=!1,eY&&eY(eN)},ek||eq<=0?0:eq),tK()}},tG=eb=>{if(!eD||null==tF.current)return;let ex=eb instanceof PointerEvent?eb:null,eN=(ex?"vertical"===ey?ex.clientY:ex.clientX:tF.current)-tF.current;if(tF.current=null,!(40>Math.abs(eN))){if(eN<0)return void tQ(tq.value+1,{source:"user"});tQ(tq.value-1,{source:"user"})}},tJ=tS.length>0?tS.length:t$.length,tX=tJ>1,t0="carousel relative overflow-hidden";"center"===eb&&(t0+=" carousel-center"),"end"===eb&&(t0+=" carousel-end"),"vertical"===ey?t0+=" carousel-vertical":t0+=" carousel-horizontal",eQ&&(t0+=` ${eQ}`);let t1=(e1="pointer-events-auto z-20 gap-2","top"===tw?`${e1} absolute left-1/2 top-4 flex -translate-x-1/2`:"bottom"===tw?`${e1} absolute bottom-4 left-1/2 flex -translate-x-1/2`:"vertical"===ey?"start"===tw?`${e1} absolute left-1/2 top-4 flex -translate-x-1/2`:`${e1} absolute bottom-4 left-1/2 flex -translate-x-1/2`:"start"===tw?`${e1} absolute left-4 top-1/2 flex -translate-y-1/2 flex-col`:`${e1} absolute right-4 top-1/2 flex -translate-y-1/2 flex-col`);return(0,e.onMounted)(()=>{tY(),tU(!0),tK(),tO.current=()=>{tU(!0)},tE.current=()=>{tU(!0)},"u">typeof window&&tO.current&&window.addEventListener("resize",tO.current),tM.current&&tE.current&&tM.current.addEventListener("load",tE.current,!0)}),(0,e.onUnmounted)(()=>{tV(),tH(),"u">typeof window&&tO.current&&window.removeEventListener("resize",tO.current),tM.current&&tE.current&&tM.current.removeEventListener("load",tE.current,!0),Nr(e2,null),Nr(eU,null)}),(0,e.watch)(()=>eT??ez,eb=>{if("number"!=typeof eb)return;let ey=jr(eb,tW().length||tj||1,tb);if(tP.current===ey){tP.current=null,tq.value=ey,tU(!1);return}tQ(ey,{source:"prop"})},{immediate:!1}),(0,e.watch)(()=>tj,eb=>{eb&&(tq.value=jr(tq.value,eb,tb),tU(!0),tK())},{immediate:!1}),r("div",{...e0,ref:eb=>{tM.current=eb??void 0,tY()},className:t0,style:tC,"data-rue-carousel-current":String(tq.value),role:e0.role??"region","aria-roledescription":e0["aria-roledescription"]??"carousel",onMouseEnter:eb=>{tB.value=!0,tN&&tV(),"function"==typeof e5&&e5(eb)},onMouseLeave:eb=>{tB.value=!1,tN&&tK(),"function"==typeof e3&&e3(eb)},onPointerDown:eb=>{let ex;"function"==typeof e4&&e4(eb),!eD||(ex=eb.target)instanceof HTMLElement&&ex.closest("button, a, input, select, textarea, label")||(tF.current="vertical"===ey?eb.clientY:eb.clientX)},onPointerUp:eb=>{"function"==typeof e6&&e6(eb),tG(eb)},onPointerCancel:eb=>{"function"==typeof e7&&e7(eb),tF.current=null},onPointerLeave:eb=>{"function"==typeof e8&&e8(eb),eD&&tG(eb)},children:[n("div",{ref:eb=>{tL.current=eb??void 0},className:Or("fade"===e9?"relative w-full h-full":"will-change-transform","scrollx"===e9&&"vertical"===ey?"flex flex-col":"scrollx"===e9?"flex":void 0),"data-rue-carousel-track":"true",children:"fade"===e9?tS.length>0?tS.map((eb,ey)=>n("div",{className:`carousel-item${eb.className?` ${eb.className}`:""}`,"data-rue-carousel-slide":String(ey),children:eb.content},eb.key??ey)):t$.map((eb,ey)=>n("div",{className:"w-full h-full","data-rue-carousel-slide":String(ey),children:eb},ey)):tS.length>0?tS.map((eb,ey)=>n("div",{className:`carousel-item${eb.className?` ${eb.className}`:""}`,"data-rue-carousel-slide":String(ey),children:eb.content},eb.key??ey)):eJ}),eO&&tX?r(e.Fragment,{children:[n("button",{type:"button","data-rue-carousel-prev":"true",className:"btn btn-circle btn-sm sm:btn-md absolute left-3 top-1/2 z-20 -translate-y-1/2 bg-base-100/80 backdrop-blur disabled:opacity-40",disabled:!tb&&tq.value<=0,"aria-label":"Previous slide",onClick:()=>{tQ(tq.value-1,{source:"user"})},children:Pr(eE,{disabled:!tb&&tq.value<=0,onClick:()=>tQ(tq.value-1,{source:"user"}),direction:"prev"},"‹")}),n("button",{type:"button","data-rue-carousel-next":"true",className:"btn btn-circle btn-sm sm:btn-md absolute right-3 top-1/2 z-20 -translate-y-1/2 bg-base-100/80 backdrop-blur disabled:opacity-40",disabled:!tb&&tq.value>=Math.max(0,tJ-1),"aria-label":"Next slide",onClick:()=>{tQ(tq.value+1,{source:"user"})},children:Pr(eP,{disabled:!tb&&tq.value>=Math.max(0,tJ-1),onClick:()=>tQ(tq.value+1,{source:"user"}),direction:"next"},"›")})]}):null,eI&&tX?n("div",{className:Or(t1,"boolean"==typeof eI?void 0:eI.className),children:Array.from({length:tJ}).map((eb,ey)=>{let ex=ey===jr(tq.value,tJ||1,tb);return r("button",{type:"button","data-rue-carousel-dot":String(ey),className:Or("relative h-2.5 overflow-hidden rounded-full bg-base-100/60 transition-all duration-300",ex?"w-9 bg-primary/30":"w-2.5 hover:bg-base-100/80"),"aria-label":`Go to slide ${ey+1}`,"aria-current":ex?"true":void 0,onClick:()=>{tQ(ey,{source:"user"})},children:[n("span",{"data-rue-carousel-dot-fill":"true",className:Or("absolute inset-0 rounded-full bg-primary transition-transform duration-300",ex?"scale-100":"scale-0")}),tk&&ex?n("span",{"data-rue-carousel-dot-progress":"active",className:"absolute inset-0 origin-left rounded-full bg-primary/35",style:{transform:"scaleX(0)"}},`${ey}-${tD.value}`):null]},ey)})}):null]})},{Item:({className:eb,children:ey,...ex})=>n("div",{...ex,className:Or("carousel-item",eb),children:ey})}),zr=(eb,ey)=>ey?`${eb} ${ey}`:eb,Br=eb=>Array.isArray(eb)?eb.some(eb=>Br(eb)):null!=eb&&!1!==eb,Vr=eb=>eb??"start",Hr=eb=>!(!eb||"object"!=typeof eb||Array.isArray(eb))&&("src"in eb||"alt"in eb||"className"in eb||"bodyClassName"in eb||"imgClassName"in eb||"content"in eb||"children"in eb),Ur=eb=>null!=eb.message||null!=eb.text||null!=eb.color||null!=eb.bubbleClassName||null!=eb.avatar||null!=eb.avatarSrc||null!=eb.imageSrc||null!=eb.header||null!=eb.author||null!=eb.headerName||null!=eb.timestamp||null!=eb.headerTime||null!=eb.headerClassName||null!=eb.footer||null!=eb.footerClassName||!0===eb.typing||null!=eb.typingIndicator,Wr=eb=>eb.message??eb.text,Gr=({color:eb,className:ey,children:ex,typing:eN,typingIndicator:ew})=>n("div",{className:zr(eb?`chat-bubble chat-bubble-${eb}`:"chat-bubble",ey),children:eN?ew??n("span",{className:"loading loading-dots loading-xs","aria-label":"Typing"}):ex}),Kr=({className:eb,children:ey,author:ex,time:eN,timeClassName:ew})=>{let ek=zr("chat-header",eb);return Br(ey)?n("div",{className:ek,children:ey}):null==ex&&null==eN?null:r("div",{className:ek,children:[ex,null==eN?null:n("time",{className:zr("text-xs opacity-50",ew),children:eN})]})},qr=({className:eb,children:ey})=>Br(ey)?n("div",{className:zr("chat-footer",eb),children:ey}):null,Jr=({className:eb,children:ey,src:ex,alt:eN,bodyClassName:ew,imgClassName:ek})=>{let eC=zr(null!=ex||null!=ew||null!=ek?"chat-image avatar":"chat-image",eb);return Br(ey)?n("div",{className:eC,children:ey}):null==ex?null:n("div",{className:eC,children:n("div",{className:ew??"w-10 rounded-full",children:n("img",{alt:eN??"chat image",className:ek,src:ex})})})},Yr=eb=>{let ey=eb.avatarSrc??eb.imageSrc,ex=eb.avatarAlt??eb.imageAlt,eN=eb.avatarClassName??eb.imageClassName;return null==eb.avatar?null==ey?null:n(Jr,{className:eN,src:ey,alt:ex,bodyClassName:eb.avatarBodyClassName,imgClassName:eb.avatarImgClassName}):Hr(eb.avatar)?n(Jr,{className:zr(eN??"",eb.avatar.className),src:eb.avatar.src??ey,alt:eb.avatar.alt??ex,bodyClassName:eb.avatar.bodyClassName??eb.avatarBodyClassName,imgClassName:eb.avatar.imgClassName??eb.avatarImgClassName,children:eb.avatar.content??eb.avatar.children}):n(Jr,{className:eN,children:eb.avatar})},Xr=eb=>{if(null!=eb.header)return n(Kr,{className:eb.headerClassName,children:eb.header});let ey=eb.author??eb.headerName,ex=eb.timestamp??eb.headerTime;return null==ey&&null==ex?null:n(Kr,{className:eb.headerClassName,author:ey,time:ex})},Zr=(eb,ey)=>{let ex=Wr(eb);return r("div",{className:zr(`chat chat-${Vr(eb.placement)}`,eb.className),children:[Yr(eb),Xr(eb),null!=ex||eb.typing?n(Gr,{className:eb.bubbleClassName,color:eb.color,typing:eb.typing,typingIndicator:eb.typingIndicator,children:ex}):null,n(qr,{className:eb.footerClassName,children:eb.footer})]},ey)},Qr=Object.assign(({placement:eb,className:ey,children:ex,items:eN,message:ew,text:ek,color:eC,bubbleClassName:e$,avatar:eS,avatarSrc:ej,avatarAlt:eA,avatarClassName:ez,avatarBodyClassName:eM,avatarImgClassName:eL,imageSrc:eT,imageAlt:eI,imageClassName:eO,header:eE,author:eP,headerName:eR,timestamp:eF,headerTime:eD,headerClassName:eB,footer:eq,footerClassName:eW,typing:eH,typingIndicator:eV})=>eN&&eN.length?n(e.Fragment,{children:eN.map((eb,ex)=>Zr({...eb,placement:Vr(eb.placement),className:zr(ey??"",eb.className)},eb.key??ex))}):!Br(ex)&&Ur({placement:eb,className:ey,message:ew,text:ek,color:eC,bubbleClassName:e$,avatar:eS,avatarSrc:ej,avatarAlt:eA,avatarClassName:ez,avatarBodyClassName:eM,avatarImgClassName:eL,imageSrc:eT,imageAlt:eI,imageClassName:eO,header:eE,author:eP,headerName:eR,timestamp:eF,headerTime:eD,headerClassName:eB,footer:eq,footerClassName:eW,typing:eH,typingIndicator:eV})?Zr({placement:eb,className:ey,message:ew,text:ek,color:eC,bubbleClassName:e$,avatar:eS,avatarSrc:ej,avatarAlt:eA,avatarClassName:ez,avatarBodyClassName:eM,avatarImgClassName:eL,imageSrc:eT,imageAlt:eI,imageClassName:eO,header:eE,author:eP,headerName:eR,timestamp:eF,headerTime:eD,headerClassName:eB,footer:eq,footerClassName:eW,typing:eH,typingIndicator:eV}):n("div",{className:zr(`chat chat-${Vr(eb)}`,ey),children:ex}),{Bubble:Gr,Header:Kr,Footer:qr,Image:Jr}),$r=Symbol("RUE_FILE_INPUT_LIST_IGNORE"),ei=0,ti=(...eb)=>eb.filter(Boolean).join(" "),ni=eb=>!!eb&&"object"==typeof eb&&"function"==typeof eb.then,ri=eb=>{switch(eb){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return eb}},ii=({variant:eb,size:ey,ghost:ex,className:eN})=>{let ew="file-input",ek=ri(ey);return eb&&(ew+=` file-input-${eb}`),ek&&(ew+=` file-input-${ek}`),ex&&(ew+=" file-input-ghost"),eN&&(ew+=` ${eN}`),ew},ai=({variant:eb,size:ey,ghost:ex,className:eN})=>{let ew="btn",ek=ri(ey);return eb&&(ew+=` btn-${eb}`),ek&&(ew+=` btn-${ek}`),ex&&(ew+=" btn-ghost"),eN&&(ew+=` ${eN}`),ew},oi=({variant:eb,disabled:ey,dragging:ex,className:eN})=>ti("rounded-box border-2 border-dashed bg-base-100 p-5 transition",ex?"border-primary bg-primary/5":"border-base-300",eb?`text-${eb}`:void 0,ey?"cursor-not-allowed opacity-60":"cursor-pointer hover:border-primary/40 hover:bg-base-200/40",eN),si=eb=>{switch(eb){case"done":return"badge-success";case"error":return"badge-error";case"uploading":return"badge-info";default:return"badge-ghost"}},ci=eb=>"picture"===eb||"picture-card"===eb,li=eb=>{if(eb.type?.startsWith("image/"))return!0;let ey=eb.thumbUrl??eb.url??eb.preview??"";return/\.(png|jpe?g|gif|webp|svg|bmp|avif)$/i.test(ey)},ui=eb=>new Promise((ey,ex)=>{let eN=new FileReader;eN.onload=()=>ey(eN.result??""),eN.onerror=eb=>ex(eb),eN.readAsDataURL(eb)}),di=eb=>ui(eb),fi=()=>(ei+=1,`rue-file-${ei}`),pi=eb=>({...eb}),mi=(eb,ey)=>{let ex="name"in eb&&"string"==typeof eb.name?eb.name:ey??"file",eN="lastModified"in eb&&"number"==typeof eb.lastModified?eb.lastModified:void 0;return{uid:fi(),name:ex,status:"ready",size:"number"==typeof eb.size?eb.size:void 0,type:eb.type||void 0,lastModified:eN,originFileObj:eb}},hi=(eb,ey)=>({status:"done",...eb,uid:eb.uid??`preset-file-${ey}-${fi()}`,name:eb.name??`file-${ey+1}`}),gi=eb=>(eb??[]).map((eb,ey)=>hi(pi(eb),ey)),_i=(eb,ey)=>!ey||ey<=0?eb:1===ey?eb.slice(-1):eb.slice(-ey),vi=eb=>"number"==typeof eb&&Number.isFinite(eb)?eb<1024?`${eb} B`:eb<1048576?`${(eb/1024).toFixed(eb>=102400?0:1)} KB`:`${(eb/1048576).toFixed(eb>=0xa00000?0:1)} MB`:"",yi=eb=>{let ey=void 0!==eb.children&&null!==eb.children&&(!Array.isArray(eb.children)||eb.children.length>0);return!0===eb.drag||ey||void 0!==eb.fileList||void 0!==eb.defaultFileList||void 0!==eb.listType&&"text"!==eb.listType||void 0!==eb.showUploadList&&!0!==eb.showUploadList||void 0!==eb.maxCount||void 0!==eb.beforeUpload||void 0!==eb.onPreview||void 0!==eb.onRemove||void 0!==eb.rootClassName||void 0!==eb.triggerClassName||void 0!==eb.listClassName||void 0!==eb.itemClassName||void 0!==eb.title||void 0!==eb.description||void 0!==eb.hint||void 0!==eb.buttonText||void 0!==eb.empty||!0===eb.directory||!1===eb.openFileDialogOnClick},bi=({className:eb})=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:ti("size-5",eb),"aria-hidden":"true",children:[n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16V5m0 0-4 4m4-4 4 4"}),n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 16.5V18a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1.5"})]}),xi=()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-5","aria-hidden":"true",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v14M5 12h14"})}),Si=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-5","aria-hidden":"true",children:[n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 3h6l5 5v11a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z"}),n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 3v5h5"})]}),Ci=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-5","aria-hidden":"true",children:[n("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),n("circle",{cx:"9",cy:"10",r:"1.5"}),n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 16-5.5-5.5L7 19"})]}),wi=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:[n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"}),n("circle",{cx:"12",cy:"12",r:"3"})]}),Ti=()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 7 10 10M17 7 7 17"})}),Ei=({variant:eb,size:ey,ghost:ex,className:eN,rootClassName:ew,triggerClassName:ek,listClassName:eC,itemClassName:e$,drag:eS,listType:ej,showUploadList:eA,fileList:ez,defaultFileList:eM,maxCount:eL,title:eT,description:eI,hint:eO,buttonText:eE,empty:eP,multiple:eR,directory:eF,disabled:eD,openFileDialogOnClick:eB,children:eq,beforeUpload:eW,onPreview:eH,onRemove:eV,previewFile:eK,onChange:eZ,...eY})=>{let eU=yi({variant:eb,size:ey,ghost:ex,className:eN,rootClassName:ew,triggerClassName:ek,listClassName:eC,itemClassName:e$,drag:eS,listType:ej,showUploadList:eA,fileList:ez,defaultFileList:eM,maxCount:eL,title:eT,description:eI,hint:eO,buttonText:eE,empty:eP,multiple:eR,directory:eF,disabled:eD,openFileDialogOnClick:eB,children:eq,beforeUpload:eW,onPreview:eH,onRemove:eV,previewFile:eK,onChange:eZ}),eQ=ej??"text",eG=eA??!0,eJ=eB??!0,eX=eK??di;if(!eU)return n("input",{...eY,type:"file",multiple:eR,disabled:eD,className:ii({variant:eb,size:ey,ghost:ex,className:eN})});let e0=(0,e.useRef)(),e1=(0,e.useRef)(),e2=eY.ref,e5=(0,e.ref)(!1),e3=void 0!==ez,e4=(0,e.ref)(gi(e3?ez:eM)),e6=(0,e.ref)(0),e7=eG&&"object"==typeof eG?eG:void 0,e8=!1!==eG,e9=e7?.showPreviewIcon??!0,tb=e7?.showRemoveIcon??!0,ty=eR||"number"==typeof eL&&eL>1;"ref"in eY&&delete eY.ref;let tx=()=>{e3&&(e4.value=gi(ez),e6.value+=1)},tN=eb=>{e3||(e4.value=eb,e6.value+=1)},tw=eb=>{"function"==typeof eZ&&eZ(eb)},tk=()=>{eD||!eJ||e0.current?.click()},tC=()=>{e0.current&&(e0.current.value="")},t$=async eb=>{if(eb.thumbUrl)return eb.thumbUrl;if(eb.url)return eb.url;if(eb.preview)return eb.preview;let ey=eb.originFileObj;if(!ey)return"";let ex=await eX(ey);return eb.preview=ex,ex},tS=async eb=>{if(eH)return void await eH(eb);let ey=await t$(eb);ey&&"u">typeof window&&window.open(ey,"_blank","noopener,noreferrer")},tj=eb=>{let ey=e4.value.filter(ey=>ey.uid!==eb.uid);tN(ey),tw({file:{...eb,status:"removed"},fileList:ey,source:"remove"})},tA=eb=>{if(eD)return;if(!eV)return void tj(eb);let ey=eV(eb);ni(ey)?ey.then(ey=>{!1!==ey&&tj(eb)}):!1!==ey&&tj(eb)},tz=(eb,ey)=>ey===$r?null:ey instanceof Blob?mi(ey instanceof File?ey:new File([ey],eb.name,{type:ey.type||eb.type,lastModified:eb.lastModified}),eb.name):mi(eb,eb.name),tM=(eb,ey,ex)=>{let eN=[],ew=ek=>{if(ek>=eb.length)return void((eb,ey,ex)=>{if(eb.length<=0)return tC();let eN=_i([...e4.value.map(pi),...eb],eL);tN(eN),tw({file:eN[eN.length-1],fileList:eN,source:ey,nativeEvent:ex}),tC()})(eN,ey,ex);let eC=eb[ek];if(!eW){eN.push(mi(eC,eC.name)),ew(ek+1);return}let e$=eW(eC,eb);if(ni(e$))return void e$.then(eb=>{let ey=tz(eC,eb);ey&&eN.push(ey),ew(ek+1)});let eS=tz(eC,e$);eS&&eN.push(eS),ew(ek+1)};ew(0)},tL=eb=>{eD||("function"==typeof eb.preventDefault&&eb.preventDefault(),e5.value=!0)},tT=eb=>{"function"==typeof eb.preventDefault&&eb.preventDefault();let ey=eb.currentTarget,ex=eb.relatedTarget;ey&&ex&&ey.contains(ex)||(e5.value=!1)},tI=eb=>{eD||("function"==typeof eb.preventDefault&&eb.preventDefault(),e5.value=!1,tM(Array.from(eb.dataTransfer?.files??[]),"drop",eb))},tO=eb=>{let ey=eb.thumbUrl??eb.url??eb.preview;return ey&&li(eb)?n("img",{src:ey,alt:eb.name,className:"size-full object-cover"}):n("div",{className:"flex size-full items-center justify-center rounded-box bg-base-200 text-base-content/60",children:li(eb)?n(Ci,{}):n(Si,{})})},tE=eb=>{let ey="function"==typeof e7?.extra?e7.extra(eb):e7?.extra,ex="picture-card"===eQ?r("div",{className:ti("group relative flex aspect-square flex-col overflow-hidden rounded-box border border-base-300 bg-base-100 shadow-sm",e$),children:[n("button",{type:"button",className:"relative flex flex-1 items-center justify-center overflow-hidden bg-base-200/60 text-base-content",onClick:()=>void tS(eb),disabled:eD,children:tO(eb)}),r("div",{className:"border-t border-base-300 px-3 py-2",children:[n("div",{className:"truncate text-sm font-medium",children:eb.name}),void 0===ey?null:n("div",{className:"mt-1 text-xs text-base-content/60",children:ey})]}),(e9||tb)&&!eD?r("div",{className:"absolute top-2 right-2 flex gap-1 opacity-100 md:opacity-0 md:transition md:group-hover:opacity-100",children:[e9?n("button",{type:"button",className:"btn btn-circle btn-xs border-none bg-base-100/90 shadow-sm","aria-label":`Preview ${eb.name}`,onClick:ey=>{"function"==typeof ey.stopPropagation&&ey.stopPropagation(),tS(eb)},children:n(wi,{})}):null,tb?n("button",{type:"button",className:"btn btn-circle btn-xs border-none bg-base-100/90 shadow-sm","aria-label":`Remove ${eb.name}`,onClick:ey=>{"function"==typeof ey.stopPropagation&&ey.stopPropagation(),tA(eb)},children:n(Ti,{})}):null]}):null]}):r("div",{className:ti("flex items-center gap-3 rounded-box border border-base-300 bg-base-100 px-3 py-3 shadow-sm",e$),children:[ci(eQ)?n("button",{type:"button",className:"h-14 w-14 shrink-0 overflow-hidden rounded-box",onClick:()=>void tS(eb),disabled:eD,children:tO(eb)}):n("span",{className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/65",children:li(eb)?n(Ci,{}):n(Si,{})}),r("div",{className:"min-w-0 flex-1",children:[r("div",{className:"flex flex-wrap items-center gap-2",children:[n("span",{className:"truncate font-medium",children:eb.name}),n("span",{className:ti("badge badge-sm",si(eb.status)),children:eb.status??"ready"})]}),r("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1 text-xs text-base-content/60",children:[eb.type?n("span",{children:eb.type}):null,vi(eb.size)?n("span",{children:vi(eb.size)}):null,void 0===ey?null:n("span",{children:ey})]})]}),(e9||tb)&&!eD?r("div",{className:"flex shrink-0 items-center gap-1",children:[e9?n("button",{type:"button",className:"btn btn-ghost btn-sm btn-square","aria-label":`Preview ${eb.name}`,onClick:()=>void tS(eb),children:n(wi,{})}):null,tb?n("button",{type:"button",className:"btn btn-ghost btn-sm btn-square","aria-label":`Remove ${eb.name}`,onClick:()=>void tA(eb),children:n(Ti,{})}):null]}):null]});return e7?.itemRender?e7.itemRender(eb,ex,{preview:()=>void tS(eb),remove:()=>void tA(eb)}):ex};(0,e.onMounted)(()=>{tx(),tF()});let tP=n("input",{...eY,ref:eb=>{(e0.current=eb??void 0,"function"==typeof e2)?e2(eb):e2&&"object"==typeof e2&&(e2.current=eb??void 0)},type:"file",className:ti("sr-only pointer-events-none absolute h-0 w-0 opacity-0",eN),disabled:eD,multiple:ty,onChange:eb=>{let ey=eb.target;tM(Array.from(ey?.files??[]),"select",eb)},directory:eF?"":void 0,webkitdirectory:eF?"":void 0}),tR=()=>eS?n("div",{className:oi({variant:eb,disabled:eD,dragging:e5.value,className:ek}),children:r("div",{className:"flex flex-col items-center text-center",children:[n("span",{className:"mb-3 inline-flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:n(bi,{className:"size-6"})}),n("div",{className:"text-sm font-semibold text-base-content",children:eT??"拖拽文件到这里,或点击选择文件"}),n("div",{className:"mt-2 max-w-md text-sm text-base-content/65",children:eI??"适合资料、图片和批量附件收集;列表仍交给业务侧决定上传时机。"}),n("div",{className:"mt-3 text-xs text-base-content/50",children:eO??(ty?"支持多文件选择":"单次选择一个文件")})]})}):"picture-card"===eQ?r("div",{className:ti("flex aspect-square flex-col items-center justify-center rounded-box border border-dashed border-base-300 bg-base-100 p-4 text-center shadow-sm transition",eD?"cursor-not-allowed opacity-60":"cursor-pointer hover:border-primary/40 hover:bg-base-200/40",ek),children:[n("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-base-200 text-base-content/70",children:n(xi,{})}),n("div",{className:"mt-3 text-sm font-medium text-base-content",children:eE??"添加文件"}),n("div",{className:"mt-1 text-xs text-base-content/60",children:eO??(eL?`最多 ${eL} 个`:"支持图片或附件卡片展示")})]}):r("div",{className:ti("flex flex-wrap items-center gap-3 rounded-box border border-base-300 bg-base-100 p-3 shadow-sm",ek),children:[r("button",{type:"button",className:ai({variant:eb,size:ey,ghost:ex,className:eD?"btn-disabled":void 0}),onClick:tk,disabled:eD,children:[n(bi,{}),n("span",{children:eE??"选择文件"})]}),r("div",{className:"text-sm text-base-content/65",children:[n("div",{children:eT??"保持 Rue 的轻量输入风格,同时拥有 Upload 式文件编排能力。"}),n("div",{className:"text-xs text-base-content/50",children:eO??(ty?"可多选、可移除、可受控管理列表":"可受控管理列表并自定义预览与删除")})]})]}),tF=()=>{if(!e1.current)return;let eb=tR(),ey=!eL||e4.value.length<eL;(0,e.render)(r(e.Fragment,{children:[n("div",{role:eS?"button":void 0,tabIndex:eS&&!eD?0:void 0,onClick:eq||eS||"picture-card"===eQ?tk:void 0,onKeyDown:eb=>{let ey=eb.key;"Enter"!==ey&&" "!==ey||eD||("function"==typeof eb.preventDefault&&eb.preventDefault(),tk())},onDragOver:eS?tL:void 0,onDragLeave:eS?tT:void 0,onDrop:eS?tI:void 0,children:eq??eb}),e8?e4.value.length>0?"picture-card"===eQ?r("div",{className:ti("grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",eC),children:[e4.value.map(eb=>n("div",{children:tE(eb)},eb.uid)),ey&&!eD?n("div",{onClick:tk,onKeyDown:eb=>{let ey=eb.key;("Enter"===ey||" "===ey)&&("function"==typeof eb.preventDefault&&eb.preventDefault(),tk())},role:"button",tabIndex:0,children:void 0===eq?tR():r("div",{className:ti("flex aspect-square flex-col items-center justify-center rounded-box border border-dashed border-base-300 bg-base-100 p-4 text-center shadow-sm transition hover:border-primary/40 hover:bg-base-200/40",ek),children:[n("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-base-200 text-base-content/70",children:n(xi,{})}),n("div",{className:"mt-3 text-sm font-medium text-base-content",children:eE??"继续添加"})]})}):null]}):n("div",{className:ti("space-y-3",eC),children:e4.value.map(eb=>n("div",{children:tE(eb)},eb.uid))}):n("div",{className:ti("rounded-box border border-dashed border-base-300 p-4 text-sm text-base-content/55",eC),children:eP??"还没有文件,先选择一个文件开始。"}):null]}),e1.current)};return(0,e.watch)(()=>[e6.value,e5.value],()=>{tF()}),(0,e.watch)(()=>ez,tx),r("div",{className:ti("space-y-4",ew),"data-rue-file-input-root":"true","data-rue-file-input-version":String(e6.value),children:[tP,n("div",{ref:e1})]})},Di=Object.assign(Ei,{Dragger:eb=>n(Ei,{...eb,drag:!0}),LIST_IGNORE:$r}),Oi=0,ki=(eb,ey)=>eb?ey?`${eb} ${ey}`:eb:ey??"",Ai=(eb,ey)=>{let ex=ey?.getRootNode?.(),eN=ex&&"function"==typeof ex.querySelectorAll?ex:"u">typeof document?document:null;return eN?Array.from(eN.querySelectorAll("[data-rue-collapse-group]")).filter(ey=>ey.dataset.rueCollapseGroup===eb):[]},ji=eb=>Array.from(eb.children).find(eb=>eb instanceof HTMLElement&&eb.classList.contains("collapse-title")),Mi=(eb,ey)=>ey instanceof Node&&!!ji(eb)?.contains(ey),Ni=eb=>Array.from(eb.children).find(eb=>eb instanceof HTMLInputElement&&("checkbox"===eb.type||"radio"===eb.type)),Pi=(eb,ey)=>{if(!(eb instanceof HTMLElement))return;eb.classList.remove("collapse-open","collapse-close"),eb.classList.add(ey?"collapse-open":"collapse-close");let ex=ji(eb);ex&&ex.setAttribute("aria-expanded",ey?"true":"false");let eN=eb.querySelector("[data-rue-collapse-arrow-icon]");eN&&eN.classList.toggle("rotate-90",ey);let ew=eb.querySelector("[data-rue-collapse-plus-vertical]");ew&&(ew.classList.remove("opacity-0","opacity-100"),ew.classList.add(ey?"opacity-0":"opacity-100"));let ek=eb.querySelector("[data-rue-collapse-icon-trigger]");ek&&ek.setAttribute("aria-label",ey?"收起":"展开")},Fi=(eb,ey)=>{eb.classList.remove("collapse-open","collapse-close"),eb.classList.add(ey?"collapse-open":"collapse-close");let ex=ji(eb);ex&&ex.setAttribute("aria-expanded",ey?"true":"false")},Ii=eb=>{let ey=[];return eb.forEach(eb=>{ey.some(ey=>ey===eb)||ey.push(eb)}),ey},Li=eb=>{switch(eb){case"small":return"sm";case"middle":return"md";case"large":return"lg";default:return eb}},Ri=(eb,ey,ex)=>eb||(ex?"plus":ey?"arrow":void 0),zi=eb=>Array.isArray(eb)?eb:null==eb?[]:[eb],Bi=(eb,ey)=>{let ex=Ii(zi(eb));return ey?ex.slice(0,1):ex},Vi=eb=>{switch(Li(eb)){case"sm":return"min-h-0 py-3 text-sm";case"lg":return"min-h-0 py-5 text-lg";default:return""}},Hi=eb=>{switch(Li(eb)){case"sm":return"pt-0 pb-3 text-sm";case"lg":return"pt-0 pb-5 text-base";default:return""}},Ui=(eb,ey,ex)=>Bi(void 0===ey?eb.filter(eb=>eb.open).map(eb=>eb.key):ey,ex),Wi=(eb,ey,ex,eN)=>eN?ex?[ey]:[]:ex?Ii([...eb,ey]):eb.filter(eb=>eb!==ey),Gi=(eb,ey,ex)=>{let eN=eb?"overflow-hidden rounded-box border border-base-300 bg-base-100 divide-y divide-base-300":"space-y-3";return ey&&(eN+=" bg-transparent"),ki(eN,ex)},Ki=(eb,ey)=>eb?"":ey?"bg-transparent":"rounded-box border border-base-300 bg-base-100",qi=({open:eb})=>n("span",{"data-rue-collapse-arrow-icon":"true","aria-hidden":"true",className:`inline-flex size-5 items-center justify-center transition-transform duration-200 ${eb?"rotate-90":""}`.trim(),children:n("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 4 6 6-6 6"})})}),Ji=({open:eb})=>r("span",{"aria-hidden":"true",className:"relative inline-flex size-5 items-center justify-center",children:[n("span",{className:"absolute h-0.5 w-3 rounded-full bg-current"}),n("span",{"data-rue-collapse-plus-vertical":"true",className:`absolute h-3 w-0.5 rounded-full bg-current transition-opacity duration-200 ${eb?"opacity-0":"opacity-100"}`.trim()})]}),Yi=(eb,ey)=>n("plus"===eb?Ji:qi,{open:ey}),Xi=(eb,ey,ex,eN,ew)=>null==ey&&null==ex?eb:r("div",{className:"flex w-full items-start justify-between gap-3",children:[r("div",{className:"min-w-0 flex-1",children:[n("div",{children:eb}),null==ey?null:n("div",{className:ki("mt-1 text-xs opacity-70",eN),children:ey})]}),null==ex?null:n("div",{className:ki("shrink-0 text-xs opacity-70",ew),onClick:eb=>eb.stopPropagation(),onKeyDown:eb=>eb.stopPropagation(),children:ex})]}),Zi=Object.assign(({icon:eb,arrow:ey,plus:ex,showArrow:eN,open:ew,close:ek,defaultOpen:eC,activeKey:e$,defaultActiveKey:eS,accordion:ej,bordered:eA,ghost:ez,disabled:eM,collapsible:eL,size:eT,expandIconPlacement:eI="end",tabIndex:eO,tag:eE="div",className:eP,titleClassName:eR,contentClassName:eF,items:eD,children:eB,onChange:eq})=>{let eW=eD?.map((eb,ey)=>({...eb,key:eb.key??ey,index:ey,label:eb.label??eb.title,content:eb.children??eb.content}))??[],eH=eW.length>0,eV=eA??eH,eK=Ri(eb,ey,ex),eZ=!1!==eN&&!!eK,eY=(0,e.ref)(`rue-collapse-${Oi++}`),eU=(0,e.ref)(Ui(eW,eS,ej)),eQ=()=>void 0===e$?eU.value:Bi(e$,ej),eG=eQ();if(eH){let eb=eY.value;return n("div",{className:Gi(eV,ez,eP),children:eW.map(ey=>{let ex=ey.icon??eK,eN=ey.showArrow??eZ,ew=eM||ey.disabled?"disabled":ey.collapsible??eL??"header",ek=eG.some(eb=>eb===ey.key),eC=null!=ey.description||null!=ey.extra?"pt-1":"mt-0.5",eS=Ki(eV,ez),eA=ki(ki(ki("collapse",ek?"collapse-open":"collapse-close"),eS),ey.className),eO=ki(ki("collapse-title",Vi(eT)),ki(eR,ey.titleClassName)),eE=ki(ki("collapse-content",Hi(eT)),ki(eF,ey.contentClassName)),eP=Xi(ey.label,ey.description,ey.extra,ey.descriptionClassName,ey.extraClassName),eD=ex=>{var eN;let ek,eC;"disabled"!==ew&&(eN=!eQ().some(eb=>eb===ey.key),eC=(ek=Wi(eQ(),ey.key,eN,ej)).some(eb=>eb===ey.key),void 0===e$&&(eU.value=ek,Ai(eb,ex).forEach(eb=>{let ey=eW[Number(eb.dataset.rueCollapseIndex)];ey&&Pi(eb,ek.some(eb=>eb===ey.key))})),eq&&eq(ej?ek[0]??null:ek,{key:ey.key,index:ey.index,open:eC,item:ey}))},eB="header"===ew?{role:"button",tabIndex:0,onClick:eb=>eD(eb.currentTarget),onKeyDown:eb=>{("Enter"===eb.key||" "===eb.key)&&(eb.preventDefault(),eD(eb.currentTarget))}}:{};return r("div",{className:eA,"data-rue-collapse-group":eb,"data-rue-collapse-index":String(ey.index),children:[n("div",{className:ki(eO,"header"===ew?"cursor-pointer select-none":""),"aria-expanded":ek?"true":"false",...eB,children:r("div",{className:"flex w-full items-start gap-3",children:[eN&&ex&&"start"===eI?"icon"===ew?n("button",{"data-rue-collapse-icon-trigger":"true",type:"button",className:ki("inline-flex size-7 shrink-0 self-start items-center justify-center rounded-full border border-transparent transition-colors hover:bg-base-200/70",eC),"aria-label":ek?"收起":"展开",onClick:eb=>{eb.stopPropagation(),eD(eb.currentTarget)},children:Yi(ex,ek)}):n("span",{className:ki("inline-flex size-7 shrink-0 self-start items-center justify-center",eC),children:Yi(ex,ek)}):null,n("div",{className:"min-w-0 flex-1",children:eP}),eN&&ex&&"end"===eI?"icon"===ew?n("button",{"data-rue-collapse-icon-trigger":"true",type:"button",className:ki("inline-flex size-7 shrink-0 self-start items-center justify-center rounded-full border border-transparent transition-colors hover:bg-base-200/70",eC),"aria-label":ek?"收起":"展开",onClick:eb=>{eb.stopPropagation(),eD(eb.currentTarget)},children:Yi(ex,ek)}):n("span",{className:ki("inline-flex size-7 shrink-0 self-start items-center justify-center",eC),children:Yi(ex,ek)}):null]})}),n("div",{className:eE,children:ey.content})]},ey.key)})})}let eJ="collapse";!1!==eN&&(ey||"arrow"===eK)&&(eJ+=" collapse-arrow"),!1!==eN&&(ex||"plus"===eK)&&(eJ+=" collapse-plus"),ew&&(eJ+=" collapse-open"),ek&&(eJ+=" collapse-close"),ew||ek||!eC||(eJ+=" collapse-open"),eM&&(eJ+=" opacity-70");let eX=Ki(!!eV,ez);if(eX&&(eJ+=` ${eX}`),eP&&(eJ+=` ${eP}`),"details"===eE)return n("details",{className:eJ,open:!!ew||!ek&&!!eC||void 0,children:eB});let e0="number"==typeof eO?eO:void 0,e1=!!ew||!!ek||!!eC;return n("div",{className:eJ,tabindex:void 0===e0?void 0:String(e0),onMouseDown:eb=>{eb.currentTarget.dataset.rueCollapsePointerDown="true"},onClick:eb=>{let ey=eb.currentTarget,ex=eb.target,eN=Ni(ey),ew=Mi(ey,ex),ek=ex instanceof HTMLInputElement&&ex===eN;(ew||ek)&&(void 0!==e0&&(ey.tabIndex=e0,ey.setAttribute("tabindex",String(e0)),ey.focus()),e1||(eN?(ek||("checkbox"===eN.type?eN.checked=!eN.checked:"radio"===eN.type&&(eN.checked=!0)),Fi(ey,eN.checked)):Fi(ey,!ey.classList.contains("collapse-open")))),delete ey.dataset.rueCollapsePointerDown},onFocus:eb=>{if(void 0===e0||e1)return;let ey=eb.currentTarget;"true"!==ey.dataset.rueCollapsePointerDown&&Fi(ey,!0)},onBlur:eb=>{delete eb.currentTarget.dataset.rueCollapsePointerDown,void 0===e0||e1||Fi(eb.currentTarget,!1)},onKeyDown:eb=>{if(void 0===e0||e1||"Enter"!==eb.key&&" "!==eb.key||!Mi(eb.currentTarget,eb.target))return;eb.preventDefault();let ey=eb.currentTarget;Fi(ey,!ey.classList.contains("collapse-open"))},onChange:eb=>{if(e1)return;let ey=eb.target;ey&&("checkbox"===ey.type||"radio"===ey.type)&&Fi(eb.currentTarget,ey.checked)},children:eB})},{Title:({as:eb="div",className:ey,description:ex,extra:eN,descriptionClassName:ew,extraClassName:ek,children:eC})=>n("summary"===eb?"summary":"div",{className:ki("collapse-title",ey),children:Xi(eC,ex,eN,ew,ek)}),Content:({className:eb,children:ey})=>n("div",{className:ki("collapse-content",eb),children:ey})}),Qi="HH:mm:ss",$i=1e3/30,ea=1e3,ta=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],na=(eb,ey)=>ey?`${eb} ${ey}`:eb,ra=eb=>{if(null==eb)return null;let ey=eb instanceof Date?eb.getTime():new Date(eb).getTime();return Number.isFinite(ey)?ey:null},ia=eb=>{let ey=[],ex=0;for(;ex<eb.length;){let eN=eb[ex];if("["===eN){let eN=eb.indexOf("]",ex+1),ew=-1===eN?eb.slice(ex+1):eb.slice(ex+1,eN);if(ew){let eb=ey[ey.length-1];eb?.type==="literal"?eb.content+=ew:ey.push({type:"literal",content:ew})}ex=-1===eN?eb.length:eN+1;continue}if(/[YMDHmsS]/.test(eN)){let ew=ex+1;for(;ew<eb.length&&eb[ew]===eN;)ew+=1;ey.push({type:"unit",unit:eN,digits:ew-ex}),ex=ew;continue}let ew=ex+1;for(;ew<eb.length&&"["!==eb[ew]&&!/[YMDHmsS]/.test(eb[ew]);)ew+=1;let ek=eb.slice(ex,ew);if(ek){let eb=ey[ey.length-1];eb?.type==="literal"?eb.content+=ek:ey.push({type:"literal",content:ek})}ex=ew}return ey},aa=(eb,ey)=>{let ex=new Set;ey.forEach(eb=>{"unit"===eb.type&&ex.add(eb.unit)});let eN=Math.max(eb,0),ew={};return ta.forEach(([eb,ey])=>{if(!ex.has(eb))return;let ek=Math.floor(eN/ey);ew[eb]=ek,eN-=ek*ey}),ew},oa=(eb,ey,ex)=>{let eN=ia(ey),ew=aa(eb,eN);return eN.flatMap(eb=>{if("literal"===eb.type)return eb.content?[{content:eb.content}]:[];let ey=ew[eb.unit]??0;return[{value:ey,digits:eb.digits>1?eb.digits:void 0,ariaLive:ex,ariaLabel:String(ey)}]})},sa=(eb,ey)=>"number"==typeof ey&&ey>0?ey:eb.includes("S")?$i:ea,ca=eb=>eb.map((eb,ey)=>{if("value"in eb){let{value:ex,digits:eN,className:ew,ariaLive:ek,ariaLabel:eC,children:e$}=eb;return n(ua,{value:ex,digits:eN,className:ew,ariaLive:ek,ariaLabel:eC,children:e$},`${ey}:${ex}:${eN??""}:${eC??""}`)}return eb.content}),la=({className:eb,children:ey,items:ex,value:eN,format:ew=Qi,interval:ek,ariaLive:eC,onChange:e$,onFinish:eS})=>{let ej=(0,e.ref)(0),eA=(0,e.useRef)(null),ez=(0,e.useRef)(!1),eM=()=>{null!=eA.current&&(clearInterval(eA.current),eA.current=null)},eL=()=>{let eb=ra(eN);if(null==eb)return ej.value=0,e$&&e$(void 0),eM(),!1;let ey=Math.max(eb-Date.now(),0);return ej.value=ey,e$&&e$(ey),ey<=0?(eM(),ez.current||(ez.current=!0,eS&&eS()),!1):(ez.current=!1,!0)};(0,e.watch)(()=>`${ra(eN)??"invalid"}|${ew}|${ek??""}`,()=>{ez.current=!1,eM(),null!=eN&&eL()&&(eA.current=setInterval(eL,sa(ew,ek)))},{immediate:!0}),(0,e.onUnmounted)(eM);let eT=na("countdown",eb),eI=!!(ex&&ex.length),eO=!eI&&null!=eN,eE=eC??(ew.includes("S")?"off":"polite");return eI?n("span",{className:eT,children:ca(ex)}):eO?n("span",{className:eT,children:ca(oa(ej.value,ew,eE))}):n("span",{className:eT,children:ey})},ua=({value:eb,digits:ey,className:ex,ariaLive:eN="polite",ariaLabel:ew,children:ek})=>n("span",{ref:ex=>{ex&&(ex.style.setProperty("--value",String(eb)),null==ey?ex.style.removeProperty("--digits"):ex.style.setProperty("--digits",String(ey)))},"aria-live":eN,"aria-label":ew??String(eb),"data-countdown-value":String(eb),"data-countdown-digits":null==ey?void 0:String(ey),className:ex?.trim(),children:ek??String(eb)}),da=Object.assign(la,{Value:ua}),fa=(eb,ey)=>ey?`${eb} ${ey}`:eb,pa=eb=>{switch(eb){case"contain":return"object-contain";case"fill":return"object-fill";case"none":return"object-none";case"scale-down":return"object-scale-down";default:return eb?"object-cover":void 0}},ma=eb=>{if(null==eb||!1===eb)return[];if(!Array.isArray(eb))return[eb];let ey=[];return eb.forEach(eb=>{ey.push(...ma(eb))}),ey},ha=(eb,ey,ex,eN)=>{if("string"==typeof eb)return{key:ey,node:n("img",{src:eb,alt:"",className:fa("",fa(ex??"",eN)).trim()||void 0},ey)};if(eb&&"object"==typeof eb){if(null!=eb.node)return{key:eb.key??ey,node:eb.node,label:eb.label};if(eb.src)return{key:eb.key??ey,label:eb.label,node:n("img",{src:eb.src,alt:eb.alt??"",className:fa(fa(ex??"",eN),fa(eb.className??"",eb.imageClassName)).trim()||void 0},eb.key??ey)}}return{key:ey,node:eb}},ga=(eb,ey,ex,eN)=>eb&&eb.length>0?eb.map((eb,ey)=>ha(eb,ey,ex,eN)):ma(ey).map((eb,ey)=>({key:ey,node:eb})),_a=eb=>{let ey=eb.as??"figure",ex=eb.className,eN=eb.wrapperClassName,ew=eb.children,ek=eb.items,eC=eb.imageClassName,e$=eb.fit,eS=eb.showGuide,ej=eb.guideLabels,eA=eb.guideClassName,ez=eb.guideItemClassName,eM=ga(ek,ew,pa(e$),eC),eL=eM.map(eb=>eb.node),eT=eM.length>1?eM.length-1:0,eI=fa("hover-gallery",ex),eO=Object.assign({},eb);delete eO.as,delete eO.className,delete eO.wrapperClassName,delete eO.children,delete eO.items,delete eO.imageClassName,delete eO.fit,delete eO.showGuide,delete eO.guideLabels,delete eO.guideClassName,delete eO.guideItemClassName;let eE=n(ey,{...eO,className:eI,children:eL});return eS&&0!==eT?r("div",{className:fa("grid *:[grid-area:1/1]",eN),children:[eE,n("div",{className:fa("pointer-events-none grid font-mono text-white text-shadow-lg",eA),style:{gridTemplateColumns:`repeat(${eT}, minmax(0, 1fr))`},"aria-hidden":"true",children:eM.slice(1).map((eb,ey)=>n("div",{className:fa("from-white/10 via-transparent to-black/10 bg-linear-80 grid place-content-center",ez),children:ej?.[ey]??eb.label??ey+2},eb.key))})]}):eE},va=(eb,ey)=>ey?`${eb} ${ey}`:eb,ya=eb=>null!=eb&&!1!==eb&&(!Array.isArray(eb)||eb.some(eb=>ya(eb))),ba=eb=>{switch(eb){case"small":return"sm";case"medium":case"middle":return"md";case"large":return"lg";default:return eb}},xa=(eb="sm")=>{switch(eb){case"xs":return"gap-1";case"md":return"gap-3";case"lg":return"gap-4";default:return"gap-2"}},Sa=(eb,ey)=>{let ex="kbd",eN=ba(eb);return eN&&(ex+=` kbd-${eN}`),ey&&(ex+=` ${ey}`),ex},Ca=eb=>"object"==typeof eb&&!!eb&&!Array.isArray(eb)&&("label"in eb||"children"in eb||"size"in eb||"className"in eb||"key"in eb),wa=(eb,ey)=>Ca(eb)?eb:{key:ey,label:eb},Ta=eb=>ya(eb.children)?eb.children:eb.label,Ea=(...eb)=>eb.filter(Boolean).join(" "),Da=({as:eb="kbd",size:ey,className:ex,children:eN,...ew})=>n(eb,{...ew,className:Sa(ey,ex),children:eN}),Oa=({as:eb="span",className:ey,children:ex="+",...eN})=>n(eb,{...eN,className:va("inline-flex items-center justify-center px-1 text-sm opacity-60",ey),children:ex}),ka=({items:eb,size:ey,itemClassName:ex,separator:eN,separatorClassName:ew})=>(eb?.map((eb,ey)=>wa(eb,ey))??[]).flatMap((eb,ek)=>{let eC=eb.key??ek,e$=[];ek>0&&e$.push(n(Oa,{className:ew,children:ya(eN)?eN:"+"},`separator-${eC}`));let{key:eS,size:ej,className:eA,...ez}=eb;return e$.push(n(Da,{size:ej??ey,className:Ea(ex,eA),...ez,children:Ta(eb)},`key-${eC}`)),e$}),Aa=({as:eb="span",size:ey,items:ex,separator:eN,itemClassName:ew,separatorClassName:ek,direction:eC="horizontal",wrap:e$,gap:eS="sm",className:ej,children:eA,...ez})=>{let eM=va(`${"vertical"===eC?"inline-flex flex-col":"inline-flex items-center"}${"vertical"!==eC&&e$?" flex-wrap":""} ${xa(eS)}`,ej);return n(eb,{...ez,className:eM,children:ya(eA)?eA:ka({items:ex,size:ey,itemClassName:ew,separator:eN,separatorClassName:ek})})},ja=({as:eb="span",size:ey,className:ex,children:eN,items:ew,separator:ek,itemClassName:eC,separatorClassName:e$,wrap:eS,gap:ej="sm",...eA})=>n(Aa,{as:eb,size:ey,items:ew,separator:ek,itemClassName:eC,separatorClassName:e$,wrap:eS,gap:ej,className:ex,...eA,children:eN}),Ma=Object.assign(({items:eb,separator:ey,itemClassName:ex,separatorClassName:eN,wrap:ew,gap:ek,...eC})=>Array.isArray(eb)?n(ja,{items:eb,separator:ey,itemClassName:ex,separatorClassName:eN,wrap:ew,gap:ek,...eC}):n(Da,{...eC}),{Group:Aa,Combo:ja,Separator:Oa}),Na=(...eb)=>eb.filter(Boolean).join(" ").trim()||void 0,Pa=eb=>"number"==typeof eb?`${eb}px`:eb,Fa=(eb,ey)=>eb<=1?1:eb>=ey?ey:eb,Ia=eb=>!!(eb&&"object"==typeof eb&&("item"===eb.type||"row"===eb.type||eb.cols||void 0!==eb.content||void 0!==eb.normal||void 0!==eb.title||void 0!==eb.description||void 0!==eb.avatar||void 0!==eb.actions||void 0!==eb.extra)),La=eb=>{if(null==eb||"boolean"==typeof eb||Array.isArray(eb)||"object"!=typeof eb)return eb;for(let ey of["content","children","title","label","text","name","description"]){let ex=eb[ey];if(null!=ex)return ex}try{return JSON.stringify(eb)}catch{return String(eb)}},Ra=eb=>null==eb||Array.isArray(eb)&&0===eb.length,za=eb=>{switch(eb){case"small":case"sm":return"text-sm";case"large":case"lg":return"text-lg";default:return}},Ba=eb=>"object"==typeof eb?{spinning:!1!==eb.spinning,tip:eb.tip,indicator:eb.indicator}:{spinning:!!eb},Va=(eb,ey,ex)=>"function"==typeof ex?ex(eb,ey):ex&&eb&&"object"==typeof eb?eb[ex]:eb&&"object"==typeof eb&&null!=eb.key?eb.key:`list-item-${ey}`,Ha=eb=>{if(eb)return eb.xxxl??eb.xxl??eb.xl??eb.lg??eb.md??eb.sm??eb.xs??eb.column},Ua=(eb,ey)=>{if(!eb)return ey;let ex=Ha(eb);return{...ey,display:"grid",gridTemplateColumns:ex?`repeat(${ex}, minmax(0, 1fr))`:void 0,gap:Pa(eb.gutter)}},Wa=(eb,ey,ex,eN)=>{if(!eb)return null;let ew="object"==typeof eb?eb:{},ek=Math.max(1,ew.pageSize??eN??ew.defaultPageSize??10),eC=Math.max(1,Math.ceil((ew.total??ey)/ek)),e$=Fa(ew.current??ex??ew.defaultCurrent??1,eC);return{...ew,current:e$,pageSize:ek,total:ew.total??ey,position:ew.position??"bottom",align:ew.align??"end"}},Ga=eb=>eb?eb.map((eb,ey)=>"grow"===eb.type?n($a,{as:eb.as,className:eb.className,children:eb.content},ey):n(eo,{as:eb.as,className:eb.className,children:eb.content},ey)):null,Ka=(eb,ey)=>{let ex=eb.key??ey;return(eb.type??(eb.cols||void 0!==eb.title||void 0!==eb.description||void 0!==eb.avatar||void 0!==eb.actions||void 0!==eb.extra?"row":"item"))==="item"?n(no,{className:eb.className,children:eb.content},ex):eb.title||eb.description||eb.avatar||eb.actions||eb.extra?r(no,{actions:eb.actions,className:eb.className,extra:eb.extra,children:[n(to,{avatar:eb.avatar,title:eb.title,description:eb.description,children:eb.content}),Ga(eb.cols)]},ex):r(Qa,{normal:eb.normal,className:eb.className,children:[eb.content,Ga(eb.cols)]},ex)},qa=eb=>eb.spinning?r("li",{className:"flex min-h-24 items-center justify-center gap-3 p-6 text-sm opacity-70",children:[eb.indicator??n("span",{className:"loading loading-spinner loading-sm"}),eb.tip?n("span",{children:eb.tip}):null]}):null,Ja=eb=>n("li",{className:"p-8 text-center text-sm opacity-60",children:eb??"No data"}),Ya=(eb,ey)=>Ra(eb)?null:n("li",{className:ey,children:eb}),Xa=(eb,ey,ex="li")=>{if(!eb)return null;let eN=Math.max(1,Math.ceil(eb.total/eb.pageSize));if(eb.hideOnSinglePage&&eN<=1)return null;let ew=Array.from({length:eN},(eb,ey)=>ey+1),ek=0===eb.total?0:(eb.current-1)*eb.pageSize+1,eC=Math.min(eb.current*eb.pageSize,eb.total);return r(ex,{className:Na("flex flex-wrap items-center gap-3 p-3","start"===eb.align?"justify-start":"center"===eb.align?"justify-center":"justify-end"),children:[eb.showTotal?n("span",{className:"mr-auto text-xs opacity-60",children:eb.showTotal(eb.total,[ek,eC])}):null,r("div",{className:"join",children:[n("button",{className:Na("join-item btn btn-sm",eb.current<=1&&"btn-disabled"),disabled:eb.current<=1,onClick:()=>ey(eb.current-1),type:"button",children:"Prev"}),ew.map(ex=>n("button",{className:Na("join-item btn btn-sm",ex===eb.current&&"btn-active"),onClick:()=>ey(ex),type:"button",children:ex},ex)),n("button",{className:Na("join-item btn btn-sm",eb.current>=eN&&"btn-disabled"),disabled:eb.current>=eN,onClick:()=>ey(eb.current+1),type:"button",children:"Next"})]})]})},Za=({bordered:eb,className:ey,children:ex,dataSource:eN,emptyText:ew,footer:ek,grid:eC,header:e$,itemLayout:eS="horizontal",items:ej,loading:eA,loadMore:ez,locale:eM,pagination:eL,renderItem:eT,rowKey:eI,size:eO,split:eE=!0,style:eP,...eR})=>{let eF=Ba(eA),eD=(0,e.ref)("object"==typeof eL?eL.defaultCurrent??eL.current??1:1),eB=(0,e.ref)("object"==typeof eL?eL.defaultPageSize??eL.pageSize??10:10),eq=(0,e.useRef)(),eW=(0,e.useRef)(),eH=(0,e.useRef)(),eV=Array.isArray(eN),eK=eV?eN:ej,eZ=!!eL,eY="list";eb&&(eY+=" border border-base-300 rounded-box overflow-hidden"),eC&&(eY+=" grid"),eE||(eY+=" list-no-split"),"vertical"===eS&&(eY+=" list-vertical"),eY=Na(eY,za(eO),ey)??"list";let eU=(eb,ey)=>eb?.map((eb,ex)=>{let eN=ey?(ey.current-1)*ey.pageSize+ex:ex,ew=Va(eb,eN,eI);return eV&&eT?eT(eb,eN):Ia(eb)?Ka(eb,eN):n(no,{itemLayout:eS,children:La(eb)},ew)}),eQ=()=>Wa(eL,eK?.length??0,eD.value,eB.value),eG=()=>{if(!eZ)return;let eb=eQ(),ey=eF.spinning?qa(eF):eK&&0===eK.length?Ja(eM?.emptyText??ew):eU(eK&&eb?eK.slice((eb.current-1)*eb.pageSize,eb.current*eb.pageSize):eK,eb);eq.current&&(0,e.render)(ey??null,eq.current),eW.current&&(0,e.render)(eb&&("top"===eb.position||"both"===eb.position)?Xa(eb,eJ,"div"):null,eW.current),eH.current&&(0,e.render)(eb&&("bottom"===eb.position||"both"===eb.position)?Xa(eb,eJ,"div"):null,eH.current)},eJ=eb=>{let ey=eQ();if(!ey)return;let ex=Fa(eb,Math.max(1,Math.ceil(ey.total/ey.pageSize)));"object"==typeof eL&&void 0===eL.current&&(eD.value=ex),eB.value=ey.pageSize,ey.onChange&&ey.onChange(ex,ey.pageSize),eG()};if((0,e.onMounted)(eG),(0,e.watch)(()=>[eD.value,eB.value,eK?.length,eF.spinning],eG),eZ){let ex=Na("rue-list",eb&&"border border-base-300 rounded-box overflow-hidden",ey),eN=Na("list",eC&&"grid",!eE&&"list-no-split","vertical"===eS&&"list-vertical",za(eO));return r("div",{...eR,className:ex,style:eC?void 0:eP,children:[n("div",{ref:eW}),Ra(e$)?null:n("div",{className:"p-4 pb-2 text-sm font-medium opacity-70",children:e$}),n("ul",{ref:eq,className:eN,style:Ua(eC,eC?eP:void 0)}),Ra(ek)?null:n("div",{className:"p-4 pt-2 text-sm opacity-70",children:ek}),Ra(ez)?null:n("div",{className:"p-3 text-center",children:ez}),n("div",{ref:eH})]})}return r("ul",{...eR,className:eY,style:Ua(eC,eP),children:[Ya(e$,"p-4 pb-2 text-sm font-medium opacity-70"),eF.spinning?qa(eF):null,!eF.spinning&&eK&&0===eK.length?Ja(eM?.emptyText??ew):null,!eF.spinning&&eK&&eK.length>0&&eU(eK,null),eV||ej?null:ex,Ya(ek,"p-4 pt-2 text-sm opacity-70"),Ya(ez,"p-3 text-center")]})},Qa=({normal:eb,className:ey,children:ex,...eN})=>eb?n("li",{...eN,className:ey||void 0,children:ex}):n("li",{...eN,className:Na("list-row",ey),children:ex}),$a=({as:eb="div",className:ey,children:ex,...eN})=>n(eb,{...eN,className:Na("list-col-grow",ey),children:ex}),eo=({as:eb="div",className:ey,children:ex,...eN})=>n(eb,{...eN,className:Na("list-col-wrap",ey),children:ex}),to=({avatar:eb,className:ey,description:ex,title:eN,children:ew,...ek})=>r("div",{...ek,className:Na("flex min-w-0 flex-1 items-start gap-3",ey),children:[eb?n("div",{className:"shrink-0",children:eb}):null,r("div",{className:"min-w-0 flex-1",children:[eN?n("div",{className:"font-medium",children:eN}):null,ex?n("div",{className:"text-sm opacity-70",children:ex}):null,ew]})]}),no=({actions:eb,className:ey,classNames:ex,extra:eN,itemLayout:ew="horizontal",styles:ek,children:eC,...e$})=>{let eS=!!eb&&eb.length>0,ej=!Ra(eN);if(!eS&&!ej)return n("li",{...e$,className:ey||void 0,children:eC});let eA="vertical"===ew;return r("li",{...e$,className:Na("list-row",eA&&"items-start",ej&&!eA&&"grid-cols-[1fr_auto]",ey),children:[r("div",{className:"min-w-0 flex-1",children:[eC,eS?n("ul",{className:Na("mt-3 flex flex-wrap items-center gap-2 text-sm opacity-80",ex?.actions),style:ek?.actions,children:eb.map((eb,ey)=>n("li",{children:eb},ey))}):null]}),ej?n("div",{className:Na("list-col-wrap",ex?.extra),style:ek?.extra,children:eN}):null]})},ro=Object.assign(no,{Meta:to}),io=Object.assign(Za,{Row:Qa,ColGrow:$a,ColWrap:eo,Item:ro}),ao="__rue_component_type",oo="__menuContext",so=(eb,ey)=>ey?`${eb} ${ey}`:eb,co=eb=>{switch(eb){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return eb}},lo=eb=>Array.isArray(eb)?[...eb]:[],uo=(eb,ey)=>void 0!==ey&&eb.some(eb=>eb===ey),fo=eb=>!!eb&&"object"==typeof eb,po=(eb,ey)=>{if(Array.isArray(eb))return eb.map(eb=>po(eb,ey));if(!fo(eb))return eb;let ex=eb.props;if(!ex||"object"!=typeof ex)return eb;let eN={...ex};"children"in eN&&(eN.children=po(eN.children,ey));let ew=eb[ao];return(ew===wo||ew===Do)&&(eN[oo]=ey),eb.props=eN,eb},mo=(eb,ey)=>uo(eb,ey)?eb.filter(eb=>eb!==ey):[...eb,ey],ho=(eb,ey)=>eb||("horizontal"===ey?"horizontal":"vertical"),go=(eb,ey)=>"_blank"!==eb||ey?ey:"noreferrer",_o=({disabled:eb,selected:ey,focus:ex,danger:eN,className:ew})=>{let ek="";return eb&&(ek+=" menu-disabled"),ey&&(ek+=" menu-active"),ex&&(ek+=" menu-focus"),eN&&(ek+=" text-error"),ew&&(ek+=` ${ew}`),ek.trim()||void 0},vo=({icon:eb,content:ey,extra:ex,suffix:eN})=>{let ew=null!=eb;return r(e.Fragment,{children:[ew?n("span",{className:"inline-flex shrink-0 items-center justify-center",children:eb}):null,null==ey?null:n("span",{className:so(null!=ex||null!=eN?"min-w-0 flex-1":"",ew?"":void 0),children:ey}),null==ex?null:n("span",{className:"ml-auto shrink-0 pl-3 text-xs opacity-70",children:ex}),null==eN?null:n("span",{className:"ml-2 shrink-0 opacity-60",children:eN})]})},yo=(eb,ey,ex,eN)=>{let{eventKey:ew,as:ek="a",href:eC,to:e$,target:eS,rel:ej,title:eA,icon:ez,extra:eM,onClick:eL,disabled:eT,active:eI,selected:eO,focus:eE,danger:eP,className:eR,children:eF,...eD}=eb,eB=ey?.isSelected(ew,eO??eI)??!!(eO??eI),eq=_o({disabled:eT,selected:eB,focus:eE,danger:eP,className:eR}),eW=eb=>{if(eT){"function"==typeof eb.preventDefault&&eb.preventDefault(),"function"==typeof eb.stopPropagation&&eb.stopPropagation();return}eL&&eL(eb),ey&&ey.onItemClick(eb,{key:ew,label:eF,icon:ez,extra:eM,title:eA,danger:eP,disabled:eT,active:eI,selected:eO,focus:eE,className:eR,...ex},eN)},eH=vo({icon:ez,content:eF,extra:eM});return"button"===ek?n("button",{...eD,type:eD.type??"button",className:eq,title:eA,disabled:eT,"aria-current":eB?"page":void 0,onClick:eW,children:eH}):"span"===ek?n("span",{...eD,className:eq,title:eA,role:eD.role??"menuitem",tabIndex:eT?-1:eD.tabIndex??0,"aria-current":eB?"page":void 0,"aria-disabled":eT?"true":void 0,onClick:eW,children:eH}):e$?eT?n("span",{...eD,className:eq,title:eA,role:eD.role??"menuitem",tabIndex:-1,"aria-current":eB?"page":void 0,"aria-disabled":"true",onClick:eW,children:eH}):n(t.RouterLink,{className:eq,to:e$,title:eA,"aria-current":eB?"page":void 0,"aria-disabled":eT?"true":void 0,onClick:eW,children:eH}):eC?n("a",{...eD,className:eq,href:eT?void 0:eC,target:eS,rel:go(eS,ej),title:eA,"aria-current":eB?"page":void 0,"aria-disabled":eT?"true":void 0,onClick:eW,children:eH}):n("a",{...eD,className:eq,title:eA,"aria-current":eB?"page":void 0,"aria-disabled":eT?"true":void 0,onClick:eW,children:eH})},bo=({as:eb="li",className:ey,children:ex})=>n("h2"===eb?"h2":"li",{className:so("menu-title",ey),children:ex}),xo=({show:eb,visible:ey,className:ex,children:eN})=>{let ew="menu-dropdown";return(ey??eb)&&(ew+=" menu-dropdown-show"),ex&&(ew+=` ${ex}`),n("ul",{className:ew,children:eN})},So=({show:eb,visible:ey,className:ex,onClick:eN,children:ew})=>{let ek=ey??eb,eC="menu-dropdown-toggle";return ek&&(eC+=" menu-dropdown-show"),ex&&(eC+=` ${ex}`),n("span",{className:eC,role:eN?"button":void 0,tabIndex:eN?0:void 0,"aria-expanded":eN?ek?"true":"false":void 0,onClick:eN,onKeyDown:eb=>{eN&&("Enter"!==eb.key&&" "!==eb.key||("function"==typeof eb.preventDefault&&eb.preventDefault(),eN(eb)))},children:ew})},Co=({className:eb,children:ey})=>n("ul",{className:eb,children:ey}),wo=({liClassName:eb,__menuContext:ey=null,...ex})=>n("li",{className:eb,children:yo(ex,ey)}),To=({className:eb,dashed:ey})=>n("li",{role:"separator",className:so(so("mx-2 my-1 h-px list-none bg-base-300/80",ey?"border-t border-dashed border-base-300 bg-transparent":void 0),eb)}),Eo=({title:eb,className:ey,children:ex})=>r("li",{className:ey,children:[n("div",{className:"menu-title",children:eb}),n("ul",{children:ex})]}),Do=({eventKey:eb,title:ey,icon:ex,extra:eN,disabled:ew,className:ek,popupClassName:eC,open:e$,defaultOpen:eS,onTitleClick:ej,onOpenChange:eA,children:ez,__menuContext:eM=null})=>{let eL=(0,e.ref)(!!eS),eT=void 0!==eb&&eM?eM.isOpen(eb,e$):e$??eL.value,eI=eM?.mode==="inline"?"click":eM?.triggerSubMenuAction??"click",eO=(eS,ez)=>{ew||(ej&&ej({key:eb,domEvent:ez}),void 0!==eb&&eM?eM.onSubMenuToggle(eb,eS,ez,{key:eb,label:ey,icon:ex,extra:eN,disabled:ew,className:ek,popupClassName:eC}):void 0===e$&&(eL.value=eS),eA&&eA(eS))};return r("li",{className:ek,onMouseEnter:eb=>{"hover"===eI&&eO(!0,eb)},onMouseLeave:eb=>{"hover"===eI&&eO(!1,eb)},children:[n("button",{type:"button",className:_o({disabled:ew,selected:eT}),"aria-expanded":eT?"true":"false","aria-disabled":ew?"true":void 0,onClick:eb=>{"click"===eI&&eO(!eT,eb)},children:vo({icon:ex,content:ey,extra:eN,suffix:n("span",{children:eT?"▾":"▸"})})}),n("ul",{className:so(eT?"":"hidden",eC),style:eM?.mode==="inline"?{paddingInlineStart:`${eM.inlineIndent}px`}:void 0,children:ez})]})},Oo=(eb,ey,ex,eN=[])=>{let ew=eb.key??`${eN.join("-")||"root"}-${ey}`;if("title"===eb.kind)return n(bo,{as:eb.as,className:eb.className,children:eb.children},ew);if("divider"===eb.type)return n(To,{className:eb.className,dashed:eb.dashed},ew);if("group"===eb.type)return n(Eo,{title:eb.label,className:eb.className,children:eb.children?.map((ey,ew)=>Oo(ey,ew,ex,void 0===eb.key?eN:[...eN,eb.key]))},ew);if("submenu"===eb.type){let ey=void 0===eb.key?eN:[...eN,eb.key];return n(Do,{eventKey:eb.key,title:eb.label,icon:eb.icon,extra:eb.extra,disabled:eb.disabled,className:eb.className,popupClassName:eb.popupClassName,onTitleClick:eb.onTitleClick,children:eb.children?.map((eb,eN)=>Oo(eb,eN,ex,ey))},ew)}let ek=eb.label??eb.children,eC=void 0===eb.key?eN:[...eN,eb.key];return eb.dropdown||eb.submenu||eb.dropdownToggle?r("li",{className:eb.liClassName,children:[yo({eventKey:eb.key,as:eb.as,href:eb.href,to:eb.to,target:eb.target,rel:eb.rel,title:eb.title,icon:eb.icon,extra:eb.extra,danger:eb.danger,onClick:eb.onClick,disabled:eb.disabled,active:eb.active,selected:eb.selected,focus:eb.focus,className:eb.className,children:ek},ex,eb,eC),eb.dropdownToggle?n(So,{show:eb.dropdownToggle.show,visible:eb.dropdownToggle.visible,className:eb.dropdownToggle.className,onClick:eb.dropdownToggle.onClick,children:eb.dropdownToggle.children}):null,eb.dropdown?n(xo,{show:eb.dropdown.show,visible:eb.dropdown.visible,className:eb.dropdown.className,children:eb.dropdown.items?.map((eb,ey)=>Oo(eb,ey,ex,eC))}):null,eb.submenu?n(Co,{className:eb.submenu.className,children:eb.submenu.items?.map((eb,ey)=>Oo(eb,ey,ex,eC))}):null]},ew):n(wo,{eventKey:eb.key,as:eb.as,href:eb.href,to:eb.to,target:eb.target,rel:eb.rel,title:eb.title,icon:eb.icon,extra:eb.extra,danger:eb.danger,onClick:eb.onClick,disabled:eb.disabled,active:eb.active,selected:eb.selected,focus:eb.focus,liClassName:eb.liClassName,className:eb.className,children:ek},ew)},ko=Object.assign(({size:eb,direction:ey="vertical",mode:ex,className:eN,style:ew,selectable:ek=!0,multiple:eC=!1,inlineIndent:e$=24,triggerSubMenuAction:eS="hover",selectedKeys:ej,defaultSelectedKeys:eA,openKeys:ez,defaultOpenKeys:eM,onClick:eL,onSelect:eT,onDeselect:eI,onOpenChange:eO,children:eE,items:eP})=>{let eR=ho(ex,ey),eF=(0,e.ref)(lo(eA??ej)),eD=(0,e.ref)(lo(eM??ez)),eB=void 0===ej?eF.value:lo(ej),eq=void 0===ez?eD.value:lo(ez),eW={mode:eR,inlineIndent:e$,selectable:ek,multiple:eC,triggerSubMenuAction:eS,selectedKeys:eB,openKeys:eq,isSelected:(eb,ey)=>ey??uo(eB,eb),isOpen:(eb,ey)=>ey??uo(eq,eb),onItemClick:(eb,ey,ex=void 0===ey.key?[]:[ey.key])=>{let eN={key:ey.key,keyPath:ex,item:ey,domEvent:eb};if(eL&&eL(eN),!ek||void 0===ey.key)return;let ew=eC?mo(eB,ey.key):[ey.key],e$=uo(eB,ey.key);void 0===ej&&(eF.value=ew);let eS={...eN,key:ey.key,selectedKeys:ew};if(eC&&e$){eI&&eI(eS);return}!eC&&e$&&1===eB.length||eT&&eT(eS)},onSubMenuToggle:(eb,ey,ex,eN)=>{var ew;ew=ey?uo(eq,eb)?eq:[...eq,eb]:eq.filter(ey=>ey!==eb),void 0===ez&&(eD.value=ew),eO&&eO(ew)}},eH="menu";"horizontal"===eR?eH+=" menu-horizontal":eH+=" menu-vertical";let eV=co(eb);return eV&&(eH+=` menu-${eV}`),eN&&(eH+=` ${eN}`),n("ul",{className:eH,style:ew,role:"horizontal"===eR?"menubar":"menu","aria-orientation":"horizontal"===eR?"horizontal":"vertical",children:eP&&eP.length?eP.map((eb,ey)=>Oo(eb,ey,eW)):po(eE,eW)})},{Item:wo,Title:bo,Dropdown:xo,DropdownToggle:So,Submenu:Co,SubMenu:Do,ItemGroup:Eo,Divider:To}),Ao="__rue_component_type",jo=(...eb)=>eb.filter(Boolean).join(" "),Mo=(...eb)=>{let ey={};return eb.forEach(eb=>{eb&&Object.assign(ey,eb)}),ey},No=eb=>eb.replace(/[A-Z]/g,eb=>`-${eb.toLowerCase()}`),Po=eb=>eb?"string"==typeof eb?eb.trim():Object.entries(eb).filter(([,eb])=>null!=eb).map(([eb,ey])=>`${eb.startsWith("--")?eb:No(eb)}:${String(ey)}`).join("; "):"",Fo=(eb,ey)=>[Po(eb),Po(ey)].filter(Boolean).join("; "),Io=eb=>Array.isArray(eb)?eb.flatMap(eb=>Io(eb)):null==eb||"boolean"==typeof eb?[]:[eb],Lo=eb=>!!eb&&"object"==typeof eb,Ro=eb=>Array.from(new Set(Array.isArray(eb)?eb:eb?[eb]:["hover"])),zo=eb=>{switch(eb){case"top":return{direction:"top",align:"center"};case"topLeft":return{direction:"top",align:"start"};case"topRight":return{direction:"top",align:"end"};case"bottom":return{direction:"bottom",align:"center"};case"bottomRight":return{direction:"bottom",align:"end"};case"left":return{direction:"left",align:"center"};case"leftTop":return{direction:"left",align:"start"};case"leftBottom":return{direction:"left",align:"end"};case"right":return{direction:"right",align:"center"};case"rightTop":return{direction:"right",align:"start"};case"rightBottom":return{direction:"right",align:"end"};default:return{direction:"bottom",align:"start"}}},Bo=eb=>{switch(eb){case"top":return"mb-2";case"left":return"me-2";case"right":return"ms-2";default:return"mt-2"}},Vo=(eb,ey)=>{switch(eb){case"top":return jo("bottom-[-5px]","start"===ey?"left-4":"end"===ey?"right-4":"left-1/2 -translate-x-1/2");case"left":return jo("right-[-5px]","start"===ey?"top-4":"end"===ey?"bottom-4":"top-1/2 -translate-y-1/2");case"right":return jo("left-[-5px]","start"===ey?"top-4":"end"===ey?"bottom-4":"top-1/2 -translate-y-1/2");default:return jo("top-[-5px]","start"===ey?"left-4":"end"===ey?"right-4":"left-1/2 -translate-x-1/2")}},Ho=(eb,ey)=>{if(!Lo(eb)||!eb.props||"object"!=typeof eb.props)return eb;let ex=eb.props,eN={...ex,...ey};return eN.className=jo(ex.className,ey.className),eN.style=Fo(ex.style,ey.style)||void 0,void 0!==ey.children&&(eN.children=ey.children),eb.props=eN,eb},Uo=eb=>{let ey=null,ex=[];return Io(eb).forEach(eb=>{if(Lo(eb)&&eb[Ao]===Ko){ey=eb;return}ex.push(eb)}),{contentNode:ey,triggerNodes:ex}},Wo=({placement:eb,trigger:ey,disabled:ex,arrow:eN,triggerClassName:ew,overlay:ek,content:eC,popupRender:e$,menu:eS,items:ej,overlayClassName:eA,overlayStyle:ez,classNames:eM,styles:eL,onOpenChange:eT})=>void 0!==eb||void 0!==ey||void 0!==ex||void 0!==ew||void 0!==ek||void 0!==eC||void 0!==e$||void 0!==eS||void 0!==ej||void 0!==eA||void 0!==ez||void 0!==eM||void 0!==eL||void 0!==eT,Go=(eb,ey,ex)=>"div"===eb?n("div",{...ey,children:ex}):"span"===eb?n("span",{...ey,children:ex}):"section"===eb?n("section",{...ey,children:ex}):"article"===eb?n("article",{...ey,children:ex}):"details"===eb?n("details",{...ey,children:ex}):"ul"===eb?n("ul",{...ey,children:ex}):(0,e.h)(eb,ey,...ex),Ko=({as:eb="div",className:ey,style:ex,children:eN,...ew})=>Go(eb,{...ew,className:jo("dropdown-content",ey),style:ex?Po(ex):void 0},Io(eN)),qo=Object.assign(({as:eb="div",align:ey,direction:ex,placement:eN,trigger:ew,hover:ek,open:eC,defaultOpen:e$,disabled:eS,arrow:ej,closeOnClick:eA,forceOpen:ez,forceClose:eM,className:eL,style:eT,triggerClassName:eI,overlay:eO,content:eE,popupRender:eP,menu:eR,items:eF,overlayClassName:eD,overlayStyle:eB,classNames:eq,styles:eW,onOpenChange:eH,children:eV,...eK})=>{let eZ=(0,e.getCurrentInstance)()?.propsRO??{children:eV},eY=ej??!1,eU=eA??!0,eQ=zo(eN),eG=ey??eQ.align,eJ=ex??eQ.direction;if(!Wo({as:eb,align:ey,direction:ex,placement:eN,trigger:ew,hover:ek,open:eC,defaultOpen:e$,disabled:eS,arrow:ej,closeOnClick:eA,forceOpen:ez,forceClose:eM,className:eL,style:eT,triggerClassName:eI,overlay:eO,content:eE,popupRender:eP,menu:eR,items:eF,overlayClassName:eD,overlayStyle:eB,classNames:eq,styles:eW,onOpenChange:eH,children:eV})){let ey="dropdown";return eG&&(ey+=` dropdown-${eG}`),eJ&&(ey+=` dropdown-${eJ}`),ek&&(ey+=" dropdown-hover"),ez&&(ey+=" dropdown-open"),eM&&(ey+=" dropdown-close"),eL&&(ey+=` ${eL}`),Go(eb,{...eK,className:ey,open:!0===eC||void 0,style:eT?Po(eT):void 0},Io(eV))}let eX=Uo(eV),e0=(0,e.ref)(e$??!1),e1=(0,e.ref)(eC??e$??!1),e2=(0,e.ref)(Ro(ew)),e5=(0,e.ref)(null),e3=eR||eF?{...eR,items:eF??eR?.items}:void 0,e4=null,e6=null,e7=null,e8=void 0!==eC,e9=()=>{if(e7){if(e5.value){e7.style.position="fixed",e7.style.inset="auto auto auto auto",e7.style.left=`${e5.value.x}px`,e7.style.top=`${e5.value.y}px`;return}e7.style.position="",e7.style.inset="",e7.style.left="",e7.style.top=""}},tb=eb=>{e4&&e4.classList.toggle("dropdown-open",!!ez||eb),e6&&e6.setAttribute("aria-expanded",eb?"true":"false"),e9()},ty=(eb,ey)=>{if(!eS){if(e1.value===eb){"contextMenu"===ey&&eb&&(tb(eb),eH&&eH(eb,{source:ey}));return}e8||(e0.value=eb),e1.value=eb,eb||(e5.value=null),tb(eb),eH&&eH(eb,{source:ey})}};(0,e.watch)(()=>eC,eb=>{"boolean"==typeof eb?(e1.value=eb,eb||(e5.value=null),tb(eb)):(e1.value=e0.value,tb(e0.value))},{immediate:!0}),(0,e.watch)(()=>e$,eb=>{e8||(e0.value=!!eb,e1.value=!!eb,tb(!!eb))},{immediate:!0}),(0,e.watch)(()=>ew,eb=>{e2.value=Ro(eb)},{immediate:!0}),(0,e.onMounted)(()=>{if(typeof window>"u")return;let eb=eb=>{e1.value&&(e2.value.includes("click")||e2.value.includes("contextMenu"))&&(e4?.contains(eb.target)||ty(!1,"outside"))},ey=eb=>{e1.value&&"Escape"===eb.key&&ty(!1,"escape")};window.addEventListener("click",eb,!0),window.addEventListener("keydown",ey),(0,e.onUnmounted)(()=>{window.removeEventListener("click",eb,!0),window.removeEventListener("keydown",ey)})});let tx=e2.value.includes("hover"),tN=e2.value.includes("click"),tw=e2.value.includes("contextMenu"),tk=e3?.items&&e3.items.length>0?n(ko,{...e3,items:e3.items,selectable:e3.selectable??!1,className:jo("w-full min-w-56 rounded-box bg-transparent p-0",eq?.menu,e3.className),style:Fo(e3.style,eW?.menu)||void 0,onClick:eb=>{e3.onClick&&e3.onClick(eb),eU&&ty(!1,"menu")}}):void 0===eO?eE:eO,tC=eP?eP(tk):tk,t$=eX.contentNode||null!=tC&&!1!==tC,tS="dropdown";eG&&(tS+=` dropdown-${eG}`),eJ&&(tS+=` dropdown-${eJ}`),ek&&(tS+=" dropdown-hover"),(e1.value||ez)&&(tS+=" dropdown-open"),eM&&(tS+=" dropdown-close"),eq?.root&&(tS+=` ${eq.root}`),eL&&(tS+=` ${eL}`);let tj=Fo(eT,eW?.root)||void 0,tA=Fo(eX.contentNode?void 0:Mo(eW?.overlay,eB,e5.value?{position:"fixed",inset:"auto auto auto auto",left:`${e5.value.x}px`,top:`${e5.value.y}px`}:void 0),void 0)||void 0,tz=jo(eX.contentNode?Bo(eJ):jo("z-30 min-w-56 rounded-box border border-base-300/60 bg-base-100 shadow-lg",Bo(eJ),e3?.items&&e3.items.length>0?"p-1":"p-0"),eq?.overlay,eD),tM=eX.contentNode?Ho(eX.contentNode,{key:"overlay",className:tz,ref:eb=>{e7=eb,e9()},style:Mo(eB,eW?.overlay,e5.value?{position:"fixed",inset:"auto auto auto auto",left:`${e5.value.x}px`,top:`${e5.value.y}px`}:void 0)}):r(Ko,{className:tz,style:tA,ref:eb=>{e7=eb,e9()},onClick:eb=>{if(!e3?.items?.length||!eU)return;let ey=eb.target?.closest?.('a,button,[role="menuitem"]');if(!ey)return;let ex=ey.closest("li");ex&&Array.from(ex.children).some(eb=>"UL"===eb.tagName)||ty(!1,"menu")},children:[eY?n("span",{"aria-hidden":"true",className:jo("pointer-events-none absolute z-[-1] h-2.5 w-2.5 rotate-45 border border-base-300/60 bg-base-100",Vo(eJ,eG))}):null,tC]},"overlay"),{onMouseEnter:tL,onMouseLeave:tT,onKeyDown:tI,...tO}=eK;return Go(eb,{...tO,ref:eb=>{e4=eb,tb(e1.value)},className:tS,style:tj,onMouseEnter:eb=>{tx&&ty(!0,"trigger"),tL&&tL(eb)},onMouseLeave:eb=>{tx&&ty(!1,"outside"),tT&&tT(eb)},onKeyDown:eb=>{tI&&tI(eb),!eb.defaultPrevented&&"Escape"===eb.key&&e1.value&&ty(!1,"escape")}},[n("div",{ref:eb=>{e6=eb,eb&&eb.setAttribute("aria-expanded",e1.value?"true":"false")},className:jo("inline-flex",eq?.trigger,eI),"aria-haspopup":e3?.items?.length?"menu":"dialog","aria-expanded":e1.value?"true":"false","aria-disabled":eS?"true":void 0,onClick:eb=>{tN&&ty(!e1.value,"trigger")},onContextMenu:eb=>{tw&&("function"==typeof eb.preventDefault&&eb.preventDefault(),e5.value={x:eb.clientX??0,y:eb.clientY??0},ty(!0,"contextMenu"))},children:eX.contentNode?eX.triggerNodes:n(e.Slot,{source:eZ})},"trigger"),t$?tM:null])},{Trigger:({as:eb="div",className:ey,style:ex,children:eN,...ew})=>{let ek={...ew,className:ey,style:ex?Po(ex):void 0};if("div"===eb){"number"!=typeof ek.tabIndex&&(ek.tabIndex=0),ek.role||(ek.role="button");let eb=ek.onKeyDown;ek.onKeyDown=ey=>{eb&&eb(ey),!ey.defaultPrevented&&("Enter"===ey.key||" "===ey.key)&&ey.currentTarget instanceof HTMLElement&&("function"==typeof ey.preventDefault&&ey.preventDefault(),ey.currentTarget.click())}}return Go(eb,ek,Io(eN))},Content:Ko}),Jo=0,Yo={emptyText:"No Data",filterConfirm:"应用",filterReset:"重置",triggerAsc:"切换为升序",triggerDesc:"切换为降序",cancelSort:"取消排序"},Xo=(eb,ey)=>{if(ey){if(Array.isArray(ey)){let ex=eb;for(let eb of ey){if(null==ex)return;ex=ex[eb]}return ex}return eb?.[ey]}},Zo=eb=>"right"===eb?"text-right":"center"===eb?"text-center":"text-left",Qo=(...eb)=>eb.filter(Boolean).join(" ").trim()||void 0,$o=(...eb)=>{let ey;return eb.forEach(eb=>{eb&&(ey=ey?{...ey,...eb}:{...eb})}),ey},es=eb=>null==eb||!1===eb?[]:Array.isArray(eb)?[...eb]:"string"!=typeof eb&&"function"==typeof eb?.[Symbol.iterator]?Array.from(eb):[eb],ts=(eb,ey)=>eb.key?eb.key:"string"==typeof eb.dataIndex?eb.dataIndex:Array.isArray(eb.dataIndex)&&eb.dataIndex.length>0?eb.dataIndex.join("."):`column-${ey.join("-")}`,ns=eb=>(eb.children??[]).filter(eb=>!eb.hidden),rs=eb=>eb.reduce((eb,ey)=>{if(ey.hidden)return eb;let ex=ns(ey);return 0===ex.length?eb+1:eb+rs(ex)},0),is=eb=>{let ey=1;return eb.forEach(eb=>{if(eb.hidden)return;let ex=ns(eb);ex.length>0&&(ey=Math.max(ey,1+is(ex)))}),ey},as=(eb,ey=[])=>{let ex=[];return eb.forEach((eb,eN)=>{if(eb.hidden)return;let ew=[...ey,eN],ek=ns(eb);ek.length>0?ex.push(...as(ek,ew)):ex.push({column:eb,indexPath:ew,key:ts(eb,ew)})}),ex},os=eb=>{let ey=eb.filter(eb=>!eb.hidden),ex=is(ey),eN=Array.from({length:ex},()=>[]),ew=(eb,ey,ek=[])=>{eb.forEach((eb,eC)=>{if(eb.hidden)return;let e$=[...ek,eC],eS=ns(eb),ej=eS.length>0?rs(eS):1,eA=eb.colSpan??ej;if(0===eA)return;let ez=eb.rowSpan??(eS.length>0?1:ex-ey);eN[ey].push({column:eb,index:eC,key:ts(eb,e$),colSpan:eA,rowSpan:ez}),eS.length>0&&ew(eS,ey+1,e$)})};return ew(ey,0),eN},ss=eb=>!!(eb.fixedCol||!0===eb.fixed||"left"===eb.fixed||"start"===eb.fixed),cs=eb=>"object"==typeof eb&&!!eb,ls=eb=>{if(cs(eb.sorter))return eb.sorter.multiple},us=eb=>eb.filter(eb=>!!eb?.order).sort((eb,ey)=>{let ex=eb.multiple??0,eN=ey.multiple??0;return ex===eN?0:eN-ex}),ds=eb=>{let ey=us(eb.filter(eb=>void 0!==eb.column.sortOrder).map(eb=>({key:eb.key,order:eb.column.sortOrder,multiple:ls(eb.column)})));return ey.length>0?ey:us(eb.filter(eb=>!!eb.column.defaultSortOrder).map(eb=>({key:eb.key,order:eb.column.defaultSortOrder,multiple:ls(eb.column)})))},fs=eb=>{let ey={};return eb.forEach(({column:eb,key:ex})=>{if(void 0!==eb.filteredValue){ey[ex]=es(eb.filteredValue);return}void 0!==eb.defaultFilteredValue&&(ey[ex]=es(eb.defaultFilteredValue))}),ey},ps=(eb,ey)=>eb<=1?1:eb>=ey?ey:eb,ms=eb=>"number"==typeof eb?`${eb}px`:eb,hs=eb=>{switch(eb){case"small":return"table-sm";case"middle":return"table-md";case"large":return"table-lg";case"xs":case"sm":case"md":case"lg":case"xl":return`table-${eb}`;default:return}},gs=eb=>({...Yo,...eb}),_s=(eb,ey)=>"function"==typeof eb?eb({props:ey})??{}:eb??{},vs=eb=>!!eb&&(!0===eb||!1!==eb.showTitle),ys=eb=>{switch(eb){case"topLeft":return"topStart";case"topCenter":return"topCenter";case"topRight":return"topEnd";case"bottomLeft":return"bottomStart";case"bottomCenter":return"bottomCenter";case"bottomRight":return"bottomEnd";default:return"none"}},bs=eb=>null==eb||!1===eb?[]:(eb.placement?.length?eb.placement:eb.position?.length?eb.position.map(ys):["bottomEnd"]).filter((eb,ey,ex)=>"none"===eb?1===ex.length:ex.indexOf(eb)===ey),xs=eb=>{switch(eb){case"topStart":case"bottomStart":return"justify-start";case"topCenter":case"bottomCenter":return"justify-center";default:return"justify-end"}},Ss=(eb,ey)=>{let ex=eb?.[ey];return Array.isArray(ex)?ex:[]},Cs=({render:eb,data:ey})=>"function"==typeof eb?eb(ey):null,ws=eb=>{let ey=typeof eb;return"string"===ey||"number"===ey},Ts=Object.assign(eb=>{let{size:ey,zebra:ex,pinRows:eN,pinCols:ew,bordered:ek,className:eC,classNames:e$,styles:eS,children:ej,dataSource:eA,columns:ez,rowKey:eM="key",showHeader:eL=!0,onRow:eT,onHeaderRow:eI,onChange:eO,rowSelection:eE,pagination:eP,expandable:eR,rowClassName:eF,summary:eD,emptyText:eB,locale:eq,title:eW,footer:eH,loading:eV,rowHoverable:eK=!1,rowHoverClass:eZ,tableLayout:eY,sortDirections:eU,showSorterTooltip:eQ,scroll:eG,sticky:eJ,height:eX,onScroll:e0}=eb,e1=gs(eq),e2=_s(e$,eb),e5=_s(eS,eb),e3="object"==typeof eV?{spinning:!1!==eV.spinning,tip:eV.tip}:{spinning:!!eV,tip:void 0},e4=eR?.childrenColumnName??"children",e6=eR?.indentSize??15,e7=(eb,ey)=>("function"==typeof eM?eM(eb):eb?.[eM])??ey,e8=(eb,ey=[])=>eb.flatMap((eb,ex)=>{let eN=[...ey,ex],ew=e7(eb,`row-${eN.join("-")}`),ek=Ss(eb,e4);return 0===ek.length?[]:[ew,...e8(ek,eN)]}),e9="table",tb=hs(ey);if(tb&&(e9+=` ${tb}`),ex&&(e9+=" table-zebra"),(eN||eJ)&&(e9+=" table-pin-rows"),ew&&(e9+=" table-pin-cols"),ek&&(e9+=" border-separate border-spacing-0"),e2.table&&(e9+=` ${e2.table}`),eC&&(e9+=` ${eC}`),!(null==ej||Array.isArray(ej)&&0===ej.length))return n("table",{className:e9,style:e5.table,children:ej});let ty=Array.isArray(ez)?as(ez):[],[tx]=(0,e.useState)(`rue-table-${Jo++}`),[tN,tw]=(0,e.useState)(ds(ty),{kind:"ref"}),[tk,tC]=(0,e.useState)(fs(ty),{kind:"ref"}),[t$,tS]=(0,e.useState)({},{kind:"ref"}),[tj,tA]=(0,e.useState)({},{kind:"ref"}),[tz,tM]=(0,e.useState)(null),[tL,tT]=(0,e.useState)(0),[tI,tO]=(0,e.useState)(eE?.defaultSelectedRowKeys?[...eE.defaultSelectedRowKeys]:[],{kind:"ref"}),tE=null!=eP&&!1!==eP?eP:void 0,[tP,tR]=(0,e.useState)(tE?tE.current??tE.defaultCurrent??1:1),[tF]=(0,e.useState)(tE?tE.pageSize??tE.defaultPageSize??10:Math.max(eA?.length??0,1)),[tD,tB]=(0,e.useState)(eR?.defaultExpandedRowKeys?[...eR.defaultExpandedRowKeys]:eR?.defaultExpandAllRows&&Array.isArray(eA)?eA.flatMap((eb,ey)=>{let ex=e7(eb,`row-${ey}`),eN=Ss(eb,e4);return eR?.expandedRowRender||eN.length>0?[ex,...e8(eN,[ey])]:[]}):[],{kind:"ref"});if(Array.isArray(ez)&&Array.isArray(eA)){let eb=os(ez),ey=as(ez),ex=new Map(ey.map(eb=>[eb.key,eb])),eN=()=>{tT(tL.value+1)},eC=ey.some(eb=>void 0!==eb.column.sortOrder),e$=us(eC?ey.filter(eb=>void 0!==eb.column.sortOrder).map(eb=>({key:eb.key,order:eb.column.sortOrder,multiple:ls(eb.column)})):tN.value),eS=new Map(e$.map(eb=>[eb.key,eb])),ej=ey.reduce((eb,ey)=>{let ex=ey.column.filteredValue;return void 0===ex?eb[ey.key]=es(tk.value[ey.key]):eb[ey.key]=es(ex),eb},{}),eM=eb=>{let ey={};return Object.keys(eb).forEach(ex=>{Array.isArray(eb[ex])&&eb[ex].length>0&&(ey[ex]=[...eb[ex]])}),ey},eP=eM(ej),eq=eb=>"function"==typeof eb.sorter?eb.sorter:cs(eb.sorter)&&"function"==typeof eb.sorter.compare?eb.sorter.compare:(ey,ex)=>{let eN=Xo(ey,eb.dataIndex),ew=Xo(ex,eb.dataIndex);return null==eN&&null==ew?0:null==eN?-1:null==ew||eN>ew?1:eN<ew?-1:0},eV=(eb,eN)=>{let ew=ek=>{let eC=ek.flatMap(ex=>{let eN=Ss(ex,e4),ek=eN.length>0?ew(eN):[];return ey.every(ey=>{let eN=eb[ey.key]??[];if(!Array.isArray(eN)||0===eN.length)return!0;let ew=ey.column.filterCombine??"or";if(ey.column.onFilter)return"and"===ew?eN.every(eb=>ey.column.onFilter(eb,ex)):eN.some(eb=>ey.column.onFilter(eb,ex));let ek=Xo(ex,ey.column.dataIndex);return"and"===ew?eN.every(eb=>eb===ek):eN.includes(ek)})||0!==ek.length?eN.length>0?[{...ex,[e4]:ek}]:[ex]:[]});return us(eN).length>0&&(eC=eC.slice().sort((eb,ey)=>((eb,ey,eN)=>{for(let ew of us(eN)){let eN=ex.get(ew.key);if(!eN?.column.sorter)continue;let ek=eq(eN.column),eC="ascend"===ew.order?ek(eb,ey):-ek(eb,ey);if(0!==eC)return eC}return 0})(eb,ey,eN))),eC};return ew(eA)},e8=eR?.expandedRowKeys?[...eR.expandedRowKeys]:[...tD.value],tb=new Set(e8),ty=(eb,ey=0,ex=[],eN=!1)=>eb.flatMap((eb,ew)=>{let ek=[...ex,ew],eC=e7(eb,`row-${ek.join("-")}`),e$=Ss(eb,e4),eS={key:eC,record:eb,indent:ey,hasTreeChildren:e$.length>0};return e$.length>0&&(eN||tb.has(eC))?[eS,...ty(e$,ey+1,ek,eN)]:[eS]}),tq=ty(eA,0,[],!0),tW=tq.some(eb=>eb.hasTreeChildren),tH=ty(eV(ej,e$)),tV=tH.length,tK=null!=tE,tZ=tK?Math.max(1,tE.pageSize??tF.value):Math.max(tV,1),tY=tK?Math.max(1,Math.ceil(tV/tZ)):1,tU=tK?ps(tE.current??tP.value,tY):1,tQ=tK?tH.slice((tU-1)*tZ,tU*tZ):tH,tG=tQ.map(eb=>eb.record),tJ=new Set(eE?.selectedRowKeys?[...eE.selectedRowKeys]:[...tI.value]),tX=eE?.align??"center",t0=!!eE,t1=!!eR?.expandedRowRender,t2=(t1||tW)&&eR?.showExpandColumn!==!1,t5=ey.length+(+!!t0+ +!!t2),t3=$o(e5.wrapper,eG?.y===void 0?void 0:{maxHeight:ms(eG.y)},void 0===eX?void 0:{height:ms(eX)},eJ&&"object"==typeof eJ&&void 0!==eJ.offsetScroll?{top:ms(eJ.offsetScroll)}:void 0),t4=Qo(eG?.x?"overflow-x-auto":void 0,eG?.y||void 0!==eX?"overflow-y-auto":void 0,e2.wrapper),t6=$o(e5.table)??{},t7=ey.some(({column:eb})=>!!eb.ellipsis);eY?t6.tableLayout=eY:(t7||eG?.x)&&(t6.tableLayout="fixed"),eG?.x===!0?(t6.width="max-content",t6.minWidth="100%"):eG?.x!==void 0&&(t6.width=ms(eG.x),t6.minWidth="100%"),(()=>{let eb=globalThis,ey=`__rue_table_outside_close_${tx.value}`;if(eb[ey])return;let ex=eb=>{let ey=eb?.target;ey&&(ey.closest(`[data-rue-table-root="${tx.value}"]`)||(tM(null),eN()))};eb?.addEventListener&&eb.addEventListener("pointerdown",ex),eb[ey]=ex})();let t8=()=>{if(!eG?.scrollToFirstRowOnChange)return;let eb=document.querySelector(`[data-rue-table-scroll="${tx.value}"]`);eb&&(eb.scrollTop=0)},t9=us(e$).map(eb=>{let ey=ex.get(eb.key);return ey?{column:ey.column,columnKey:eb.key,order:eb.order}:null}).filter(Boolean),rb=(eb,ey)=>{let ex=eb.title;return"function"==typeof ex?ex({sortOrder:eS.get(ey)?.order??null,filteredValue:ej[ey]??[],sortColumns:t9,filters:eP}):ex},ry=(eb,ey,eN,ew,ek)=>{let eC;if(!eO)return;let e$=ty(eV(ew,ek)),eS=tK?Math.max(1,Math.ceil(e$.length/eN)):1,ej=tK?ps(ey,eS):1,eA=tK?e$.slice((ej-1)*eN,ej*eN).map(eb=>eb.record):e$.map(eb=>eb.record);eO(!!tK&&{current:ej,pageSize:eN},eM(ew),0===(eC=us(ek).map(eb=>{let ey=ex.get(eb.key);return ey?{column:ey.column,order:eb.order,columnKey:eb.key,field:ey.column.dataIndex,multiple:eb.multiple}:null}).filter(Boolean)).length?{column:null,order:null}:1===eC.length?eC[0]:eC,{action:eb,currentDataSource:eA})},rx=(eb,ex,ew)=>{let ek=es(ex),eC={...ej,[eb]:ek};ey.find(ey=>ey.key===eb)?.column?.filteredValue===void 0&&tC(eC),tS({...t$.value,[eb]:ek}),eN(),tK&&void 0===tE.current&&tR(1),ew&&tM(null),t8(),ry("filter",tK?1:tU,tZ,eC,e$)},rN=eb=>{let ey=ps(eb,tY);tK&&void 0===tE.current&&tR(ey),eN(),tK&&tE.onChange&&tE.onChange(ey,tZ),t8(),ry("paginate",ey,tZ,ej,e$)},rw=tQ.filter(eb=>!eE?.disabled&&!(eE?.getCheckboxProps?eE.getCheckboxProps(eb.record):{})?.disabled).map(eb=>eb.key),rk=rw.length>0&&rw.every(eb=>tJ.has(eb)),rC=rw.some(eb=>tJ.has(eb))&&!rk,r$=(eb,ey,ex,ew,ek)=>{eE?.selectedRowKeys===void 0&&tO([...eb]),eN();let eC=tq.filter(ey=>eb.includes(ey.key)).map(eb=>eb.record);void 0!==ex&&eE?.onSelect&&"boolean"==typeof ew&&eE.onSelect(ex,ew,eC,ek),eE?.onChange&&eE.onChange([...eb],eC,ey)},rS=(eb,ey)=>{let ex=!!eR?.expandedRowRender&&(!eR?.rowExpandable||eR.rowExpandable(eb.record)),eN=eb.hasTreeChildren||ex;return{key:eb.key,enabled:eN,expanded:tb.has(eb.key),hasExpandedRowRender:ex,indent:eb.indent,rowIndex:ey}},rj=(eb,ey)=>{let ex=rS(eb,ey);if(!ex.enabled)return;let ew=new Set(e8);ex.expanded?ew.delete(ex.key):ew.add(ex.key);let ek=Array.from(ew);eR?.expandedRowKeys===void 0&&tB(ek),eN(),eR?.onExpand&&eR.onExpand(!ex.expanded,eb.record),eR?.onExpandedRowsChange&&eR.onExpandedRowsChange(ek)},rA=(eb,ey)=>{let ex=[...ey.sortDirections??eU??["ascend","descend"],null],eN=eS.get(eb)?.order??null;return ex[(ex.findIndex(eb=>eb===eN)+1+ex.length)%ex.length]},rz=(eb,ey)=>{let ex=eb.filterDropdownProps?.open??eb.filterDropdownOpen;return void 0===ex?tz.value===ey:!!ex},rM=(eb,ey)=>(ey?rz(ey,eb):tz.value===eb)?es(t$.value[eb]??ej[eb]):es(ej[eb]),rL=(eb,ey)=>{tS({...t$.value,[eb]:es(ey)}),eN()},rT=(eb,ey,ex)=>{let ew=rz(ey,eb);ex&&tS({...t$.value,[eb]:es(ej[eb])}),ey.filterDropdownProps?.open===void 0&&void 0===ey.filterDropdownOpen&&tM(ex?eb:tz.value===eb?null:tz.value),(ew!==ex||ex)&&eN(),ey.filterDropdownProps?.onOpenChange?.(ex),ey.onFilterDropdownOpenChange?.(ex)},rI=(eb,ey)=>{rT(eb,ey,!1)},rO=(eb,ey,ex)=>{rx(eb,rM(eb,ey),ex?.closeDropdown??!0)},rE=(eb,ey,ex)=>{let eN=ey.filterResetToDefaultFilteredValue?es(ey.defaultFilteredValue):[];(rL(eb,eN),ex?.confirm)?rx(eb,eN,ex.closeDropdown??!0):ex?.closeDropdown&&rI(eb,ey)},rP=(eb,ey,ex)=>ey?eb.map(eb=>{let eN="function"==typeof ex.filterSearch?ex.filterSearch(ey,eb):String(eb.text).toLowerCase().includes(ey.toLowerCase()),ew=Array.isArray(eb.children)?rP(eb.children,ey,ex):void 0;return eN||ew&&ew.length>0?ew&&ew.length>0?{...eb,children:ew}:eb:null}).filter(Boolean):eb,rR=(eb,ey,ex,eN,ew=0)=>eb.flatMap(eb=>{let ek=eN.includes(eb.value),eC=Array.isArray(eb.children)&&eb.children.length>0?rR(eb.children,ey,ex,eN,ew+1):[],e$=r("label",{className:"flex items-center gap-2 text-sm",style:ew>0?{paddingLeft:`${12*ew}px`}:void 0,children:[n("input",{type:!1===ey.filterMultiple?"radio":"checkbox",name:`rue-table-filter-${tx.value}-${ex}`,className:!1===ey.filterMultiple?"radio radio-xs":"checkbox checkbox-xs",checked:ek,onChange:ew=>{let ek=ew.target,eC;if(!1===ey.filterMultiple)eC=ek.checked?[eb.value]:[];else{let ey=new Set(eN);ek.checked?ey.add(eb.value):ey.delete(eb.value),eC=Array.from(ey)}rL(ex,eC),!1===ey.filterOnClose&&rx(ex,eC,!1)}}),n("span",{children:eb.text})]},`${String(eb.value)}-${ew}`);return eC.length>0?[e$,...eC]:[e$]}),rF=(eb,ey,ex)=>ex.enabled?eR?.expandIcon?eR.expandIcon({expanded:ex.expanded,expandable:ex.enabled,record:eb.record,onExpand:(ex,eN)=>{eN?.stopPropagation?.(),rj(eb,ey)}}):n("button",{className:"btn btn-ghost btn-xs",onClick:ex=>{ex.stopPropagation(),rj(eb,ey)},children:ex.expanded?"-":"+"}):null,rD=tG.slice();rD.total=tV;let rB="function"==typeof eD?eD(rD,{total:tV,page:tU,pageSize:tZ}):null,rq=eW?n(Cs,{render:eW,data:tG}):null,rW=eH?n(Cs,{render:eH,data:tG}):null,rH=bs(tE),rV=tK&&!(tE?.hideOnSinglePage&&tY<=1)&&(1!==rH.length||"none"!==rH[0]),rK=eb=>r("div",{"data-rue-table-pager":eb,className:Qo("flex items-center gap-2 p-2",xs(eb),e2.pager),style:e5.pager,children:[n("button",{className:"btn btn-ghost btn-xs",disabled:tU<=1,onClick:()=>rN(tU-1),children:"Prev"}),Array.from({length:tY}).map((ey,ex)=>n("button",{className:`btn btn-ghost btn-xs${tU===ex+1?" btn-active":""}`,onClick:()=>rN(ex+1),children:ex+1},`page-${eb}-${ex+1}`)),n("button",{className:"btn btn-ghost btn-xs",disabled:tU>=tY,onClick:()=>rN(tU+1),children:"Next"})]},`pager-${eb}`),rZ=eE?.getTitleCheckboxProps?.()??{},rY=eE?.type==="radio"||eE?.hideSelectAll?null:n("label",{children:n("input",{type:"checkbox",className:"checkbox",checked:rk,"aria-checked":rC?"mixed":rk?"true":"false",disabled:eE?.disabled||0===rw.length,onChange:eb=>(eb=>{if(!eE||"radio"===eE.type)return;let ey=new Set(rw),ex=new Set(eE.selectedRowKeys??tI.value);ey.forEach(ey=>{eb?ex.add(ey):ex.delete(ey)});let eN=Array.from(ex);if(r$(eN,{type:"checkbox"}),eE.onSelectAll){let ey=tq.filter(eb=>eN.includes(eb.key)).map(eb=>eb.record);eE.onSelectAll(eb,ey)}})(eb.target.checked),...rZ})}),rU=eE?.columnTitle===void 0?rY:"function"==typeof eE.columnTitle?eE.columnTitle(rY):eE.columnTitle;return r("div",{"data-rue-table-root":tx.value,"data-rue-table-scroll":tx.value,"data-rue-table-version":tL.value,className:Qo("relative",ek?"rounded-box border border-base-300 bg-base-100":void 0,e2.root,t4),style:$o(e5.root,t3),onScroll:e0,children:[rV?rH.filter(eb=>eb.startsWith("top")).map(rK):null,rq?n("div",{className:Qo("p-2",e2.title),style:e5.title,children:rq}):null,r("table",{className:e9,style:t6,"data-rue-table-id":tx.value,children:[eL?n("thead",{className:e2.thead,style:e5.thead,children:eb.map((ey,ew)=>{let{className:ek,style:eA,...ez}=eI&&eI(ey.map(eb=>eb.column),ew)||{};return r("tr",{className:Qo(e2.headerRow,ek),style:$o(e5.headerRow,eA),...ez,children:[0===ew&&t2?n("th",{rowSpan:eb.length,className:Qo(e2.headerCell,Zo("center")),style:$o(e5.headerCell,eR?.columnWidth?{width:eR.columnWidth}:void 0),children:eR?.columnTitle}):null,0===ew&&t0?n("th",{rowSpan:eb.length,className:Qo(e2.headerCell,Zo(tX)),style:$o(e5.headerCell,eE?.columnWidth?{width:eE.columnWidth}:void 0),children:rU}):null,ey.map(eb=>((eb,ey)=>{let ew=eb.column.onHeaderCell&&eb.column.onHeaderCell(eb.column,eb.index)||{},ek=0===ns(eb.column).length?ex.get(eb.key)??null:null,eA=ek?.key??eb.key,ez=ew.colSpan??eb.colSpan,eM=ew.rowSpan??eb.rowSpan;if(0===ez||0===eM)return null;let{className:eL,style:eT,...eI}=ew,eO=Qo(e2.headerCell,Zo(eb.column.align),eb.column.className,eL),eE=$o(e5.headerCell,eb.column.width||eb.column.minWidth?{...eb.column.width?{width:eb.column.width}:{},...eb.column.minWidth?{minWidth:eb.column.minWidth}:{}}:void 0,eT),eP=ek?((eb,ey)=>{let ew=rb(ey,eb),ek=ey.filtered??(ej[eb]??[]).length>0,eA=eS.get(eb)?.order??null,ez=rM(eb,ey),eM=tj.value[eb]??"",eL=rz(ey,eb),eT=rP(ey.filters??[],eM,ey),eI=((eb,ey)=>{let ex=eb.showSorterTooltip??eQ;if(!1===ex)return;if("object"==typeof ex&&ex?.title!==void 0)return ex.title;let eN=rA(ey,eb);return"ascend"===eN?e1.triggerAsc:"descend"===eN?e1.triggerDesc:e1.cancelSort})(ey,eb),{open:eO,onOpenChange:eE,children:eP,content:eR,overlay:eF,items:eD,menu:eB,popupRender:eq,...eW}=ey.filterDropdownProps??{};return r("div",{className:"relative flex items-center gap-2",children:[n("span",{children:ew}),ey.sorter?n("button",{type:"button","aria-label":`sort-${eb}`,title:eI,className:"btn btn-ghost btn-xs h-auto min-h-0 px-1 py-0.5",onClick:ew=>{ew.stopPropagation(),((eb,ey)=>{let ew=ex.get(eb)?.column;if(!ew?.sorter)return;let ek=ls(ew),eS=(()=>{if(null!=ek){let eN=e$.filter(ey=>null!=ls(ex.get(ey.key)?.column??{})&&ey.key!==eb).map(eb=>({...eb}));return ey&&eN.push({key:eb,order:ey,multiple:ek}),us(eN)}return ey?[{key:eb,order:ey,multiple:ek}]:[]})();eC||tw(eS),eN(),tK&&void 0===tE.current&&tR(1),t8(),ry("sort",tK?1:tU,tZ,ej,eS)})(eb,rA(eb,ey))},children:"function"==typeof ey.sortIcon?ey.sortIcon({sortOrder:eA}):r("span",{className:Qo("inline-flex flex-col leading-none",eA?"text-base-content":"opacity-60"),children:[n("span",{className:Qo("ascend"===eA?"text-base-content":"opacity-40"),children:"▲"}),n("span",{className:Qo("-mt-0.5","descend"===eA?"text-base-content":"opacity-40"),children:"▼"})]})}):null,Array.isArray(ey.filters)&&ey.filters.length>0||void 0!==ey.filterDropdown?r(qo,{trigger:"click",open:eL,closeOnClick:!1,align:"start",...eW,onOpenChange:ex=>rT(eb,ey,ex),children:[n(qo.Trigger,{as:"button",type:"button","aria-label":`filter-${eb}`,className:Qo("btn btn-ghost btn-xs h-auto min-h-0 px-1 py-0.5 select-none",ek?"text-base-content":"opacity-40"),children:"function"==typeof ey.filterIcon?ey.filterIcon(ek):void 0===ey.filterIcon?"☰":ey.filterIcon}),n(qo.Content,{className:"dropdown-content z-50 mt-2 p-0",onClick:eb=>eb.stopPropagation(),children:"function"==typeof ey.filterDropdown?ey.filterDropdown({setSelectedKeys:ey=>rL(eb,ey),selectedKeys:ez,confirm:ex=>rO(eb,ey,ex),clearFilters:ex=>rE(eb,ey,ex),filters:ey.filters,close:()=>rI(eb,ey),visible:eL}):void 0===ey.filterDropdown?r("div",{className:"w-56 rounded-box border border-base-content/10 bg-base-100 p-3 shadow-xl",children:[ey.filterSearch?n("input",{type:"text",className:"input input-bordered input-xs mb-2 w-full",placeholder:"搜索筛选项",value:tj.value[eb]??"",onInput:ey=>{tA({...tj.value,[eb]:ey.target.value}),eN()}}):null,r("div",{className:"max-h-56 space-y-2 overflow-auto",children:[rR(eT,ey,eb,ez),0===eT.length?n("div",{className:"text-sm opacity-60",children:"暂无匹配项"}):null]}),!1===ey.filterOnClose?null:r("div",{className:"mt-3 flex justify-end gap-2",children:[n("button",{className:"btn btn-ghost btn-xs",onClick:()=>rE(eb,ey,{confirm:!0}),children:e1.filterReset}),n("button",{className:"btn btn-primary btn-xs",onClick:()=>rO(eb,ey),children:e1.filterConfirm})]})]}):ey.filterDropdown})]}):null]})})(eA,eb.column):rb(eb.column,eb.key);return n("th",{colSpan:ez,rowSpan:eM,className:eO,style:eE,...eI,children:eP},`${ey}-${eb.key}`)})(eb,ew))]},`header-row-${ew}`)})}):null,r("tbody",{className:e2.tbody,style:e5.tbody,children:[tQ.flatMap((eb,ex)=>{let eN=rS(eb,ex),{className:ek,style:eC,onClick:e$,...eS}=eT&&eT(eb.record,ex)||{},ej="function"==typeof eF?eF(eb.record,ex):"",eA=[r("tr",{...eS,onClick:ey=>{e$&&e$(ey),!(!eR?.expandRowByClick||!eN.enabled)&&(ey?.target?.closest("button, input, a, label")||rj(eb,ex))},className:Qo(e2.bodyRow,ek,ej,eK?eZ||"hover:bg-base-200":""),style:$o(e5.bodyRow,eC),children:[t2?n("td",{className:Qo(e2.cell,Zo("center")),style:$o(e5.cell,eR?.columnWidth?{width:eR.columnWidth}:void 0,eb.indent>0?{paddingLeft:`${eb.indent*e6}px`}:void 0),children:rF(eb,ex,eN)}):null,t0?((eb,ey)=>{if(!eE)return null;let ex=eE.getCheckboxProps?{...eE.getCheckboxProps(eb.record)}:{};eE.disabled&&(ex.disabled=!0);let eN=tJ.has(eb.key),ek="radio"===eE.type?"radio":"checkbox",eC=n("label",{onClick:eb=>eb.stopPropagation(),children:n("input",{type:"radio"===eE.type?"radio":"checkbox",className:ek,checked:eN,onChange:ey=>{let ex=ey.target;if("radio"===eE.type)return void r$([eb.key],{type:"radio"},eb.record,!0,ey);let eN=new Set(eE.selectedRowKeys??tI.value);ex.checked?eN.add(eb.key):eN.delete(eb.key),r$(Array.from(eN),{type:"checkbox"},eb.record,ex.checked,ey)},...ex})}),e$=eE.renderCell?eE.renderCell(eN,eb.record,ey,eC):eC;return n(ew&&eE.fixed?"th":"td",{className:Qo(e2.cell,Zo(tX)),style:$o(e5.cell,eE.columnWidth?{width:eE.columnWidth}:void 0),children:e$})})(eb,ex):null,ey.map((ey,ek)=>{let eC=Xo(eb.record,ey.column.dataIndex),e$=ey.column.render?ey.column.render(eC,eb.record,ex):eC,eS=ey.column.onCell&&ey.column.onCell(eb.record,ex)||{},{className:ej,style:eA,...ez}=eS,eM=eS.colSpan??1,eL=eS.rowSpan??1;if(0===eM||0===eL)return null;let eT=!t2&&0===ek,eI=ey.column.rowScope||ew&&ss(ey.column)?"th":"td",eO=Qo(e2.cell,Zo(ey.column.align),ey.column.className,ey.column.ellipsis?"truncate":void 0,ej),eE=$o(e5.cell,ey.column.width||ey.column.minWidth?{...ey.column.width?{width:ey.column.width}:{},...ey.column.minWidth?{minWidth:ey.column.minWidth}:{}}:void 0,eT&&eb.indent>0?{paddingLeft:`${eb.indent*e6}px`}:void 0,eA),eP=ey.column.ellipsis&&vs(ey.column.ellipsis)&&ws(e$)?String(e$):void 0,eR=eT?r("div",{className:"flex items-center gap-2",children:[rF(eb,ex,eN),n("span",{className:ey.column.ellipsis?"truncate":void 0,children:e$})]}):e$;return n(eI,{className:eO,style:eE,title:eP,colSpan:eM,rowSpan:eL,scope:ey.column.rowScope,"data-rue-table-indent":eT&&eb.indent>0?String(eb.indent):void 0,...ez,children:eR},`cell-${String(eb.key)}-${ey.key}-${ek}`)})]},`row-${String(eb.key)}`)];if(t1&&eN.hasExpandedRowRender&&eN.expanded){let ey="function"==typeof eR?.expandedRowClassName?eR.expandedRowClassName(eb.record,ex,eb.indent):eR?.expandedRowClassName;eA.push(n("tr",{className:ey,children:n("td",{colSpan:t5,children:eR.expandedRowRender(eb.record,ex,eb.indent,!0)})},`expanded-${String(eb.key)}`))}return eA}),0===tQ.length?n("tr",{children:n("td",{colSpan:t5,className:Qo(e2.empty,Zo("center")),style:e5.empty,children:void 0===eB?e1.emptyText:eB})}):null]},`body-${tL.value}`),rB||rV&&rH.some(eb=>eb.startsWith("bottom"))?r("tfoot",{className:e2.tfoot,style:e5.tfoot,children:[rB?n("tr",{className:e2.summary,style:e5.summary,children:n("td",{colSpan:t5,children:rB})}):null,rV?rH.filter(eb=>eb.startsWith("bottom")).map(eb=>n("tr",{children:n("td",{colSpan:t5,children:rK(eb)})},`pager-row-${eb}`)):null]}):null]}),rW?n("div",{className:Qo("p-2",e2.footer),style:e5.footer,children:rW}):null,e3.spinning?r("div",{className:Qo("absolute inset-0 z-20 flex flex-col items-center justify-center gap-2 rounded-box bg-base-100/70",e2.loading),style:e5.loading,children:[n("span",{className:"loading loading-spinner loading-md"}),e3.tip?n("div",{className:"text-sm opacity-70",children:e3.tip}):null]}):null]})}return n("table",{className:e9,style:e5.table})},{Head:({className:eb,children:ey})=>n("thead",{className:eb||void 0,children:ey}),Body:({className:eb,children:ey})=>n("tbody",{className:eb||void 0,children:ey}),Foot:({className:eb,children:ey})=>n("tfoot",{className:eb||void 0,children:ey}),TR:({className:eb,children:ey})=>n("tr",{className:eb||void 0,children:ey}),TH:({className:eb,children:ey})=>n("th",{className:eb||void 0,children:ey}),TD:({className:eb,children:ey})=>n("td",{className:eb||void 0,children:ey})}),Es=(eb,ey)=>eb&&ey?`${eb} ${ey}`:eb??ey??"",Ds=eb=>!!eb&&"object"==typeof eb&&"type"in eb&&"separator"===eb.type,Os=(eb,ey)=>eb.title??eb.label??ey,ks=(eb,ey)=>{if(void 0===ey)return;let ex=ey.replace(/^\//,"").replace(/\/$/,"");return Object.keys(eb).forEach(ey=>{let eN=eb[ey];null!=eN&&(ex=ex.replace(`:${ey}`,String(eN)))}),ex},As=(eb,ey,ex)=>{if(eb)return eb;if(!ex)return;let eN=ey.filter(Boolean).join("/");return eN?`/${eN}`:"/"},js=(eb,ey)=>"_blank"!==eb||ey?ey:"noreferrer",Ms=(eb,ey)=>ex=>{if(eb){"function"==typeof ex.preventDefault&&ex.preventDefault(),"function"==typeof ex.stopPropagation&&ex.stopPropagation();return}ey&&ey(ex)},Ns=()=>n("span",{className:"inline-block h-1.5 w-1.5 rotate-45 border-t border-r border-current"}),Ps=()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-3.5 w-3.5","aria-hidden":"true",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 9 6 6 6-6"})}),Fs=(eb,ey,ex)=>{if(!eb?.items||0===eb.items.length)return null;let eN="string"==typeof ex&&ex?`打开 ${ex} 菜单`:"打开路径菜单";return r(qo,{align:eb.align,direction:eb.direction,className:Es("ms-1",eb.className),children:[n(qo.Trigger,{className:"inline-flex items-center justify-center rounded-full text-base-content/60 outline-none transition-colors hover:text-base-content","aria-label":eN,children:ey??n(Ps,{})}),n(qo.Content,{as:"ul",tabIndex:-1,className:Es("menu z-1 mt-2 min-w-40 rounded-box border border-base-300/60 bg-base-100 p-2 shadow-sm",eb.contentClassName),children:eb.items.map((eb,ey)=>{let ex=Os(eb),eN=Ms(eb.disabled,eb.onClick),ew=eb.className??void 0;return eb.href&&!eb.disabled?n("li",{children:n("a",{className:ew,href:eb.href,target:eb.target,rel:js(eb.target,eb.rel),onClick:eb.onClick?eN:void 0,children:ex})},eb.key??ey):!eb.disabled&&eb.onClick?n("li",{children:n("button",{className:ew,type:"button",onClick:eN,children:ex})},eb.key??ey):n("li",{children:n("span",{className:Es(eb.disabled?"cursor-not-allowed opacity-50":void 0,ew),children:ex})},eb.key??ey)})})]})},Is=({item:eb,href:ey,isLast:ex,allowAutoCurrent:eN,params:ew,routes:ek,paths:eC,dropdownIcon:e$,itemRender:eS,fallbackChildren:ej})=>{let eA=Os(eb,ej),ez=eb.current??(eN&&ex&&!ey),eM=Ms(eb.disabled,eb.onClick);if(eS)return r(e.Fragment,{children:[eS(eb,ew,ek,eC,ey),Fs(eb.menu,e$,eA)]});let eL=r(e.Fragment,{children:[eb.icon?n("span",{className:"inline-flex shrink-0 items-center justify-center","aria-hidden":null==eA?void 0:"true",children:eb.icon}):null,eA]}),eT=Es(ez?"cursor-default font-medium text-base-content no-underline":eb.disabled?"cursor-not-allowed opacity-50 no-underline":void 0,eb.linkClassName)||void 0;return!ey||eb.disabled||ez?eb.disabled||ez||!eb.onClick?r(e.Fragment,{children:[n("span",{className:eT,"aria-current":ez?"page":void 0,children:eL}),Fs(eb.menu,e$,eA)]}):r(e.Fragment,{children:[n("button",{className:eT,type:"button",onClick:eM,children:eL}),Fs(eb.menu,e$,eA)]}):r(e.Fragment,{children:[n("a",{className:eT,href:ey,target:eb.target,rel:js(eb.target,eb.rel),onClick:eb.onClick?eM:void 0,children:eL}),Fs(eb.menu,e$,eA)]})},Ls=Object.assign(({className:eb,children:ey,items:ex,routes:eN,separator:ew,params:ek={},dropdownIcon:eC,itemRender:e$})=>{let eS=ex&&ex.length?ex:eN,ej="breadcrumbs";if(eS&&eS.length&&(ej+=" [&>ul>li+li]:before:hidden"),eb&&(ej+=` ${eb}`),eS&&eS.length){let eb=eS.filter(eb=>!Ds(eb)),ey=ew??n(Ns,{}),ex=[],eN=-1,eA=!1,ez=ey;return n("div",{className:ej,children:n("ul",{children:eS.map((ew,eS)=>{if(Ds(ew))return ez=ew.separator??ey,null;eN+=1;let ej=ks(ek,ew.path),eM=void 0!==ej&&""!==ej?[...ex,ej]:[...ex],eL=As(ew.href,eM,void 0!==ej);void 0!==ej&&""!==ej&&ex.push(ej);let eT=r("li",{className:ew.className??void 0,children:[eA?n("span",{className:"pointer-events-none inline-flex shrink-0 items-center justify-center ms-2 me-3 text-base-content/40","aria-hidden":"true",children:ez}):null,Is({item:ew,href:eL,isLast:eN===eb.length-1,allowAutoCurrent:!0,params:ek,routes:eb,paths:eM,dropdownIcon:eC,itemRender:e$})]},ew.key??eS);return eA=!0,ez=ey,eT})})})}return n("div",{className:ej,children:n("ul",{children:ey})})},{Item:({className:eb,children:ey,...ex})=>n("li",{className:eb??void 0,children:Is({item:ex,href:ex.href,isLast:!1,allowAutoCurrent:!1,params:{},routes:[ex],paths:[],fallbackChildren:ey})})}),Rs=(eb,ey)=>ey?`${eb} ${ey}`:eb,zs=eb=>{switch(eb){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return eb}},Bs=(eb,ey)=>"_blank"!==eb||ey?ey:"noreferrer",Vs=(eb,ey,ex,eN,ew)=>void 0===ey?void 0===ex?void 0===eN?void 0===ew?null:eb[ew]?.key??null:eN:eb[ex]?.key??null:ey,Hs=({as:eb,active:ey,disabled:ex,className:eN,href:ew,target:ek,rel:eC,htmlType:e$,ariaLabel:eS,onClick:ej,children:eA})=>{let ez=eb??(ew?"a":"button"),eM="";ey&&(eM+=" dock-active"),ex&&(eM+=" opacity-50"),eN&&(eM+=` ${eN}`);let eL=eM.trim()||void 0,eT=eb=>{if(ex){"function"==typeof eb.preventDefault&&eb.preventDefault(),"function"==typeof eb.stopPropagation&&eb.stopPropagation();return}ej&&ej(eb)};return"a"===ez?n("a",{href:ex?void 0:ew,target:ek,rel:Bs(ek,eC),className:eL,"aria-label":eS,"aria-current":ey?"page":void 0,"aria-disabled":ex?"true":void 0,onClick:eT,children:eA}):"div"===ez?n("div",{role:"button",tabIndex:ex?-1:0,className:eL,"aria-label":eS,"aria-current":ey?"page":void 0,"aria-disabled":ex?"true":void 0,onClick:eT,children:eA}):n("button",{className:eL,type:e$??"button",disabled:ex,"aria-label":eS,"aria-current":ey?"page":void 0,onClick:eT,children:eA})},Us=({as:eb="div",size:ey,className:ex,ariaLabel:eN,items:ew,activeIndex:ek,defaultActiveIndex:eC,activeKey:e$,defaultActiveKey:eS,onChange:ej,onSelect:eA,children:ez})=>{let eM="dock",eL=zs(ey);if(eL&&(eM+=` dock-${eL}`),ex&&(eM+=` ${ex}`),ew&&ew.length){let ey=ew.map((eb,ey)=>({...eb,key:eb.key??ey,index:ey})),ex=Vs(ey,e$,ek,eS,eC),ez=ey.map(eb=>{let ey={key:eb.key,index:eb.index,item:eb},eN=null==ex?null==ek?!!eb.active:ek===eb.index:ex===eb.key;return r(Hs,{as:eb.as??(eb.href?"a":"button"),className:eb.className,active:eN,disabled:eb.disabled,href:eb.href,target:eb.target,rel:eb.rel,htmlType:eb.htmlType,ariaLabel:eb.ariaLabel,onClick:ex=>{eb.onClick&&eb.onClick(ex,ey),ej&&ej(eb.index,ey),eA&&eA(eb.key,ey)},children:[null==eb.icon?null:n("span",{className:Rs("inline-flex items-center justify-center",eb.iconClassName),children:eb.icon}),null==eb.label?null:n(Ws,{className:eb.labelClassName,children:eb.label})]},eb.key)});return n("nav"===eb?"nav":"div",{className:eM,"aria-label":eN,children:ez})}return n("nav"===eb?"nav":"div",{className:eM,"aria-label":eN,children:ez})},Ws=({className:eb,children:ey})=>n("span",{className:Rs("dock-label",eb),children:ey}),Gs=Object.assign(Us,{Item:Hs,Label:Ws}),Ks=(...eb)=>eb.filter(Boolean).join(" "),qs=(...eb)=>{let ey={};return eb.forEach(eb=>{eb&&Object.assign(ey,eb)}),Object.keys(ey).length>0?ey:void 0},Js=eb=>{if(null==eb||!1===eb||!0===eb)return"";if("string"==typeof eb||"number"==typeof eb)return String(eb);if(Array.isArray(eb))return eb.map(eb=>Js(eb)).join("");if("object"==typeof eb){if("props"in eb&&eb.props?.children!==void 0)return Js(eb.props.children);if("children"in eb)return Js(eb.children)}return""},Ys=eb=>{eb&&("function"==typeof eb.preventDefault&&eb.preventDefault(),"function"==typeof eb.stopPropagation&&eb.stopPropagation())},Xs=eb=>eb?"object"==typeof eb?{...eb,enabled:!0}:{enabled:!0}:{enabled:!1},Zs=eb=>{if(!eb)return{enabled:!1,triggerType:["icon"]};let ey="object"==typeof eb?eb:{};return{...ey,enabled:!0,triggerType:ey.triggerType??["icon"]}},Qs=eb=>{if(eb)return`link-${"danger"===eb?"error":eb}`},$s=eb=>{switch(eb){case"secondary":return"text-base-content/65";case"success":return"link-success";case"warning":return"link-warning";case"danger":return"link-error";default:return}},ec=eb=>eb?"object"==typeof eb?{...eb,enabled:!0,rows:Math.max(1,eb.rows??1),tooltip:eb.tooltip??!0,expandable:eb.expandable??!1}:{enabled:!0,rows:1,tooltip:!0,expandable:!1}:{enabled:!1,rows:1,tooltip:!1,expandable:!1},tc=({variant:eb,color:ey,type:ex,hover:eN,disabled:ew,underline:ek,deleted:eC,strong:e$,italic:eS,block:ej,hasIcon:eA,ellipsis:ez,className:eM})=>{let eL=ey??eb,eT=eA||ez?.enabled;return Ks("link",eL?Qs(eL):$s(ex),eN?"link-hover":void 0,ew?"cursor-not-allowed opacity-45 no-underline hover:no-underline":void 0,ek?"underline decoration-current underline-offset-4":void 0,eC?"line-through":void 0,e$?"font-semibold":void 0,eS?"italic":void 0,ej?"flex w-full items-center gap-1.5":eT?"inline-flex max-w-full items-center gap-1.5 align-baseline":void 0,eM)},nc=eb=>{if(!(eb<=1))return{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:eb}},rc=(eb,ey,ex)=>void 0!==eb?eb:ey.enabled&&!1!==ey.tooltip?"string"==typeof ey.tooltip?ey.tooltip:ex:void 0,ic=(eb,ey)=>"function"==typeof eb.symbol?eb.symbol(ey):null==eb.symbol?ey?"收起":"展开":eb.symbol,ac=eb=>{if(!eb)return;let ey="object"==typeof eb?eb:void 0;return String("number"==typeof ey?.minRows&&ey.minRows>0?ey.minRows:2)},oc=(eb,ey)=>{if(!eb)return;if(!ey){eb.style.height="",eb.style.overflowY="";return}let ex="object"==typeof ey?ey:void 0,eN=window.getComputedStyle(eb),ew=Number.parseFloat(eN.lineHeight),ek=Number.parseFloat(eN.fontSize),eC=Number.isFinite(ew)?ew:Number.isFinite(ek)?1.5*ek:24,e$=Number.parseFloat(eN.borderTopWidth||"0")+Number.parseFloat(eN.borderBottomWidth||"0"),eS=Number.parseFloat(eN.paddingTop||"0")+Number.parseFloat(eN.paddingBottom||"0"),ej="number"==typeof ex?.minRows&&ex.minRows>0?ex.minRows:2,eA="number"==typeof ex?.maxRows&&ex.maxRows>0?Math.max(ex.maxRows,ej):void 0;eb.style.height="auto";let ez=eb.scrollHeight;if("number"==typeof ej&&(ez=Math.max(ez,ej*eC+e$+eS)),"number"==typeof eA){let ey=eA*eC+e$+eS;eb.style.overflowY=ez>ey?"auto":"hidden",ez=Math.min(ez,ey)}else eb.style.overflowY="hidden";eb.style.height=`${ez}px`},sc=async(eb,ey)=>{let ex=eb.text;return("function"==typeof ex?await ex():ex)??Js(ey)},cc=eb=>{if(typeof document>"u")return;let ey=document.createElement("textarea");ey.value=eb,ey.setAttribute("readonly","true"),ey.style.position="fixed",ey.style.opacity="0",document.body.appendChild(ey),ey.select(),document.execCommand?.("copy"),document.body.removeChild(ey)},lc=async(eb,ey)=>{let ex=globalThis.navigator?.clipboard;if("text/html"===ey&&ex?.write&&globalThis.ClipboardItem){let ey=new globalThis.ClipboardItem({"text/html":new Blob([eb],{type:"text/html"}),"text/plain":new Blob([eb],{type:"text/plain"})});await ex.write([ey]);return}ex?.writeText?await ex.writeText(eb):cc(eb)},uc=(eb,{mark:ey,code:ex,keyboard:eN})=>{let ew=eb;return eN&&(ew=n("kbd",{className:"kbd kbd-sm align-middle",children:ew})),ex&&(ew=n("code",{className:"rounded bg-base-200 px-1.5 py-0.5 text-[0.9em]",children:ew})),ey&&(ew=n("mark",{className:"rounded bg-warning/20 px-1 py-0.5 text-inherit",children:ew})),ew},dc=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-[1em]","aria-hidden":"true",children:[n("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"}),n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),fc=()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-[1em]","aria-hidden":"true",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m5 13 4 4L19 7"})}),pc=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-[1em]","aria-hidden":"true",children:[n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 20h9"}),n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),mc=()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-[1em]","aria-hidden":"true",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 6 6 18M6 6l12 12"})}),hc=({href:eb="#",target:ey,rel:ex,to:eN,replace:ew,onClick:ek,variant:eC,color:e$,type:eS,hover:ej,disabled:eA,ellipsis:ez,copyable:eM,editable:eL,mark:eT,code:eI,keyboard:eO,underline:eE,delete:eP,strong:eR,italic:eF,icon:eD,iconPlacement:eB="start",block:eq,className:eW,style:eH,title:eV,children:eK,...eZ})=>{let eY=Xs(eM),eU=Zs(eL),eQ=ec(ez),eG=(0,e.ref)(!1),eJ=(0,e.ref)(!!eU.editing),eX=(0,e.ref)(!!eQ.defaultExpanded),e0=(0,e.ref)(!1),e1=(0,e.ref)(eU.text??Js(eK)),e2=(0,e.useRef)(),e5=(0,e.useRef)(),e3=(0,e.useRef)(),e4=(0,e.useRef)(),e6=0,e7=0,e8=null!=eD,e9=Js(eK),tb=`${e9}${eQ.suffix??""}`,ty="_blank"!==ey||ex?ex:"noopener noreferrer",tx=!!eQ.expandable||eY.enabled||eU.enabled&&eU.triggerType.includes("icon"),tN=tc({variant:eC,color:e$,type:eS,hover:ej,disabled:eA,underline:eE,deleted:eP,strong:eR,italic:eF,block:eq,hasIcon:e8,ellipsis:eQ,className:eW}),tw=rc(eV,eQ,tb),tk=eb=>{e5.current=eb??void 0},tC=()=>{eU.autoSize&&e5.current instanceof HTMLTextAreaElement&&oc(e5.current,eU.autoSize)},t$=()=>{typeof window>"u"||window.setTimeout(tC,0)},tS=eb=>{e0.value!==eb&&(e0.value=eb,eQ.onEllipsis&&eQ.onEllipsis(eb))},tj=()=>{if(!(eQ.enabled&&!(eQ.expanded??eX.value)))return void tS(!1);let eb=e2.current;eb?tS(eQ.rows>1?eb.scrollHeight-eb.clientHeight>1:eb.scrollWidth-eb.clientWidth>1):tS(!1)},tA=()=>{typeof window>"u"||(window.clearTimeout(e6),e6=window.setTimeout(tj,0))},tz=()=>{e4.current&&(0,e.render)(eU.enabled&&(eU.editing??eJ.value)?tF():tD(),e4.current)},tM=eb=>{if(e2.current=eb??void 0,e3.current&&(e3.current.disconnect(),e3.current=void 0),eb&&"u">typeof ResizeObserver){let ey=new ResizeObserver(()=>{tA()});ey.observe(eb),e3.current=ey}tA()},tL=eb=>{eA||(Ys(eb),e1.value=eU.text??e9,eU.onStart&&eU.onStart(),void 0===eU.editing&&(eJ.value=!0),tz(),t$())},tT=eb=>{Ys(eb),eU.onCancel&&eU.onCancel(),void 0===eU.editing&&(eJ.value=!1),tz()},tI=eb=>{Ys(eb),eU.onChange&&eU.onChange(e1.value),eU.onEnd&&eU.onEnd(),void 0===eU.editing&&(eJ.value=!1),tz()},tO=eb=>{Ys(eb);let ey="collapsible"===eQ.expandable,ex=eQ.expanded??eX.value,eN=!ex||!ey;eN!==ex&&(eQ.onExpand&&eQ.onExpand(eb,{expanded:eN}),void 0===eQ.expanded&&(eX.value=eN),tz(),tA())},tE=eb=>{eA?Ys(eb):eU.enabled&&eU.triggerType.includes("text")?tL(eb):ek&&ek(eb)},tP=eb=>{tE(eb),eA||eb.defaultPrevented||"_blank"===ey||eU.triggerType.includes("text")||t.RouterLink.__rueOnClick(eb,eN,ew)},tR=eb=>{eA?Ys(eb):(Ys(eb),sc(eY,eK).then(eb=>lc(String(eb),eY.format)).then(()=>{eG.value=!0,eY.onCopy&&eY.onCopy(eb),tz(),"u">typeof window&&(window.clearTimeout(e7),e7=window.setTimeout(()=>{eG.value=!1,tz()},1500))}))};(0,e.onMounted)(()=>{tz(),tA(),t$(),"u">typeof window&&window.addEventListener("resize",tA)}),(0,e.onUnmounted)(()=>{"u">typeof window&&(window.clearTimeout(e6),window.clearTimeout(e7),window.removeEventListener("resize",tA)),e3.current&&(e3.current.disconnect(),e3.current=void 0)}),(0,e.watch)(()=>[e9,eQ.rows,eQ.expandable,eQ.expanded,eX.value,eU.editing??eJ.value],()=>{tA(),t$()},{immediate:!0}),(0,e.watch)(()=>[e1.value,eU.autoSize],()=>{t$()},{immediate:!0});let tF=()=>{let eb=eU.autoSize?"textarea textarea-bordered textarea-sm min-h-24 min-w-56 leading-6":"input input-bordered input-xs min-w-36";return r("span",{className:Ks(eq?"flex w-full items-start gap-1 align-middle":"inline-flex max-w-full items-start gap-1 align-middle"),children:[eU.autoSize?n("textarea",{ref:tk,"data-rue-link-editor":"true",className:eb,value:e1.value,rows:ac(eU.autoSize),maxLength:eU.maxLength,autoFocus:!0,onInput:eb=>{e1.value=eb.target?.value??"",tC()},onKeyDown:eb=>{(eb.metaKey||eb.ctrlKey)&&"Enter"===eb.key&&tI(eb),"Escape"===eb.key&&tT(eb)}}):n("input",{ref:tk,"data-rue-link-editor":"true",className:eb,value:e1.value,maxLength:eU.maxLength,autoFocus:!0,onInput:eb=>{e1.value=eb.target?.value??""},onKeyDown:eb=>{"Enter"===eb.key&&tI(eb),"Escape"===eb.key&&tT(eb)}}),n("button",{type:"button","data-rue-link-edit-confirm":"true",className:"btn btn-ghost btn-xs","aria-label":"确认编辑",onClick:eb=>tI(eb),children:eU.enterIcon??n(fc,{})}),n("button",{type:"button","data-rue-link-edit-cancel":"true",className:"btn btn-ghost btn-xs","aria-label":"取消编辑",onClick:eb=>tT(eb),children:n(mc,{})})]})},tD=()=>{let ex,ew,ek,eC,e$=(ex=(()=>{let eb=uc(eK,{mark:eT,code:eI,keyboard:eO});if(!eQ.enabled)return n("span",{className:"min-w-0",children:eb});let ey=eQ.rows>1?"min-w-0 max-w-full overflow-hidden align-bottom":"min-w-0 max-w-full truncate align-bottom",ex=nc(eQ.rows);return 1===eQ.rows&&eQ.suffix?r("span",{className:"inline-flex min-w-0 max-w-full items-baseline align-bottom",children:[n("span",{ref:tM,className:ey,style:qs(ex,{minWidth:0}),title:tw,children:eb}),n("span",{className:"shrink-0",children:eQ.suffix})]}):r("span",{ref:tM,className:ey,style:ex,title:tw,children:[eb,eQ.suffix?n("span",{children:eQ.suffix}):null]})})(),ew=e8?n("span",{className:"inline-flex shrink-0 items-center","aria-hidden":"true",children:eD}):null,ek="end"===eB?r(e.Fragment,{children:[ex,ew]}):r(e.Fragment,{children:[ew,ex]}),eC=eQ.enabled?qs(eH,{minWidth:0}):eH,eA?n("span",{...eZ,role:eZ.role??"link",className:tN,style:eC,title:eQ.enabled?void 0:tw,"aria-disabled":"true",onClick:tE,children:ek}):eN?n("a",{...eZ,href:t.RouterLink.__rueHref(eN),target:ey,rel:ty,className:tN,style:eC,title:eQ.enabled?void 0:tw,tabIndex:eZ.tabIndex,tabindex:eZ.tabIndex,onClick:tP,children:ek}):n("a",{...eZ,href:eb,target:ey,rel:ty,className:tN,style:eC,title:eQ.enabled?void 0:tw,tabIndex:eZ.tabIndex,tabindex:eZ.tabIndex,onClick:tE,children:ek})),eS=!!eQ.expandable&&(!(eQ.expanded??eX.value)||"collapsible"===eQ.expandable);return tx||eS?r("span",{className:Ks(eq?"flex w-full flex-wrap items-start gap-1 align-baseline":"inline-flex max-w-full flex-wrap items-start gap-1 align-baseline"),children:[e$,eS?n("button",{type:"button","data-rue-link-expand":"true",className:"link link-hover text-xs no-underline opacity-70","aria-label":eQ.expanded??eX.value?"收起全文":"展开全文",onClick:tO,children:ic(eQ,eQ.expanded??eX.value)}):null,eY.enabled?n("button",{type:"button","data-rue-link-copy":"true",className:"btn btn-ghost btn-xs","aria-label":eG.value?"已复制":"复制链接文本",title:eY.tooltips??(eG.value?"已复制":"复制"),tabIndex:eY.tabIndex,disabled:eA,onClick:tR,children:eG.value?"✓":eY.icon??n(dc,{})}):null,eU.enabled&&eU.triggerType.includes("icon")?n("button",{type:"button","data-rue-link-edit":"true",className:"btn btn-ghost btn-xs","aria-label":"编辑链接文本",title:eU.tooltip??"编辑",tabIndex:eU.tabIndex,disabled:eA,onClick:eb=>tL(eb),children:eU.icon??n(pc,{})}):null]}):e$};return n("span",{className:"contents",ref:eb=>{e4.current=eb??void 0,eb&&tz()}})},gc=(...eb)=>eb.filter(Boolean).join(" "),_c=eb=>"string"==typeof eb&&["button","input","select","textarea","option","optgroup","fieldset"].includes(eb),vc=eb=>!!eb&&/\bbtn\b/.test(eb),yc=eb=>!(null==eb||Array.isArray(eb)&&0===eb.length),bc=({as:eb,tag:ey="button",className:ex,active:eN,disabled:ew,href:ek,onClick:eC,children:e$,...eS})=>{let ej=eb??ey,eA=_c(ej),ez=gc("join-item",eN&&"btn-active",!!ew&&("a"===ej||vc(ex))&&"btn-disabled",ex),eM=eb=>{if(ew){"function"==typeof eb.preventDefault&&eb.preventDefault(),"function"==typeof eb.stopPropagation&&eb.stopPropagation();return}eC&&eC(eb)};return"a"===ej?n("a",{...eS,...ew||null==ek?{}:{href:ek},className:ez,"aria-disabled":ew?"true":void 0,onClick:eM,children:e$}):"button"===ej?n("button",{...eS,type:eS.type??"button",disabled:ew,className:ez,onClick:eM,children:e$}):n(ej,{...eS,..."a"===ej&&!ew&&null!=ek?{href:ek}:{},disabled:eA?ew:void 0,className:ez,"aria-disabled":!eA&&ew?"true":void 0,onClick:eM,children:e$})},xc=(eb,ey)=>eb.map((eb,ex)=>{let{key:eN,label:ew,children:ek,className:eC,...e$}=eb,eS=Object.prototype.hasOwnProperty.call(eb,"children")?ek:ew;return n(bc,{...e$,className:gc(ey,eC),children:eS},eN??ex)}),Sc=Object.assign(({as:eb,direction:ey,items:ex,itemClassName:eN,wrap:ew,block:ek,className:eC,children:e$,...eS})=>{let ej=gc("join",ey&&`join-${ey}`,ew&&"flex flex-wrap",ek&&"w-full",eC);return n(eb??"div",{...eS,className:ej,children:yc(e$)?e$:ex?xc(ex,eN):null})},{Item:bc}),Cc=0,wc=(eb,ey)=>ey?`${eb} ${ey}`:eb,Tc=(eb,ey,ex)=>{let eN="checkbox";return eb&&(eN+=` checkbox-${eb}`),ey&&(eN+=` checkbox-${ey}`),ex&&(eN+=` ${ex}`),eN},Ec=(eb,ey)=>{let ex="inline-flex items-start gap-3 text-sm leading-5 text-base-content";return eb?ex+=" cursor-not-allowed opacity-60":ex+=" cursor-pointer",ey&&(ex+=` ${ey}`),ex},Dc=eb=>wc("min-w-0 flex-1",eb),Oc=eb=>Array.isArray(eb)?eb.flatMap(eb=>Oc(eb)):null==eb||"boolean"==typeof eb?[]:[eb],kc=eb=>{switch(typeof eb){case"number":return`number:${eb}`;case"boolean":return`boolean:${eb?"true":"false"}`;default:return`string:${eb}`}},Ac=eb=>{if(!eb)return;let ey=eb.indexOf(":");if(-1===ey)return eb;let ex=eb.slice(0,ey),eN=eb.slice(ey+1);return"number"===ex?Number(eN):"boolean"===ex?"true"===eN:eN},jc=eb=>{let ey=[];return(eb??[]).forEach(eb=>{ey.some(ey=>ey===eb)||ey.push(eb)}),ey},Mc=eb=>(eb??[]).map(eb=>"string"==typeof eb||"number"==typeof eb||"boolean"==typeof eb?{label:String(eb),value:eb}:eb),Nc=({color:eb,size:ey,checked:ex,defaultChecked:eN,disabled:ew,indeterminate:ek,value:eC,className:e$,rootClassName:eS,contentClassName:ej,style:eA,rootStyle:ez,children:eM,onChange:eL,onCheckedChange:eT,...eI})=>{let eO=(0,e.useRef)(),eE=(0,e.useRef)();eE.current||(eE.current=`rue-checkbox-content-${Cc++}`);let eP=null==eM?void 0:eI["aria-labelledby"]??eE.current,eR=()=>{eO.current&&(eO.current.indeterminate=!!ek)};(0,e.onMounted)(()=>{eR()}),(0,e.watch)(()=>ek,()=>{eR()},{immediate:!0}),(0,e.watch)(()=>ex,()=>{"boolean"==typeof ex&&eO.current&&(eO.current.checked=ex),ek&&eR()},{immediate:!0});let eF=n("input",{...eI,ref:eO,type:"checkbox",value:eC,checked:ex,defaultChecked:eN,disabled:ew,style:eA,className:Tc(eb,ey,e$),"aria-labelledby":eP,"aria-checked":ek?"mixed":eI["aria-checked"],"data-rue-checkbox-input":"true","data-rue-checkbox-disabled":ew?"true":"false","data-rue-checkbox-value":void 0===eC?void 0:kc(eC),onChange:eb=>{let ey=eb.target?.checked===!0;"boolean"==typeof ex&&eO.current&&(eO.current.checked=ex),ek&&eR(),eL&&eL(eb,{checked:ey,indeterminate:!!ek,value:eC}),eT&&eT(ey,eb)}});if(null==eM&&!eS&&!ez&&!ej)return eF;let eD=null==eM?null:(0,e.h)("span",{id:eP,className:Dc(ej),"data-rue-checkbox-content":"true"},...Oc(eM));return r("div",{className:Ec(ew,eS),style:ez,"data-rue-checkbox-root":"true",onClick:eb=>{let ey=eb.target;if(!eO.current||ew||ey===eO.current)return;eb.preventDefault();let eN=eO.current,e$=!eN.checked;if(void 0===ex&&!eL&&!eT&&eN.closest('[data-rue-checkbox-group="true"]')){eN.checked=e$,eN.dispatchEvent(new Event("change",{bubbles:!0}));return}"boolean"!=typeof ex&&eO.current&&(eO.current.checked=e$),ek&&eR(),eL&&eL(eb,{checked:e$,indeterminate:!!ek,value:eC}),eT&&eT(e$,eb)},children:[n("span",{className:"shrink-0 pt-0.5",children:eF}),eD]})},Pc=Object.assign(Nc,{Group:({value:eb,defaultValue:ey,options:ex,disabled:eN,name:ew,className:ek,style:eC,children:e$,onChange:eS,...ej})=>{let eA=(0,e.useRef)(),ez=Mc(ex),eM=(0,e.ref)(jc(eb??ey)),eL=()=>{let eb=eA.current;if(!eb)return;let ey=new Set(eM.value.map(kc));Array.from(eb.querySelectorAll('input[type="checkbox"][data-rue-checkbox-input="true"]')).forEach(eb=>{let ex=eb.dataset.rueCheckboxValue;ex&&(eb.checked=ey.has(ex)),ew&&(eb.name=ew),eN?eb.disabled=!0:eb.disabled="true"===eb.dataset.rueCheckboxDisabled})},eT=(ey,ex,eN)=>{var ew;let ek,eC=eN?jc(eb):eM.value,e$=eC.some(eb=>eb===ey);return ew=ex&&e$||!ex&&!e$?eC:ex?[...eC,ey]:eC.filter(eb=>eb!==ey),ek=(eb=>{let ey=eA.current;if(!ey)return jc(eb);let ex=Array.from(ey.querySelectorAll('input[type="checkbox"][data-rue-checkbox-input="true"]')).map(eb=>eb.dataset.rueCheckboxValue).filter(eb=>!!eb);if(!ex.length)return jc(eb);let eN=new Map(ex.map((eb,ey)=>[eb,ey]));return jc(eb).sort((eb,ey)=>(eN.get(kc(eb))??0x20000000000000-1)-(eN.get(kc(ey))??0x20000000000000-1))})(ew),eN||(eM.value=ek),eS&&eS(ek),ek};(0,e.onMounted)(()=>{eL(),Promise.resolve().then(()=>{eL()})}),(0,e.watch)(()=>eb,eb=>{void 0!==eb&&(eM.value=jc(eb)),eL()},{immediate:!0}),(0,e.watch)(()=>eM.value,()=>{eL()},{immediate:!0}),(0,e.watch)(()=>eN,()=>{eL()},{immediate:!0}),(0,e.watch)(()=>ew,()=>{eL()},{immediate:!0});let eI=void 0===eb?eM.value:jc(eb),eO=wc("flex flex-col gap-3",ek);return n("div",{...ej,ref:eA,role:ej.role??"group",className:eO,style:eC,"data-rue-checkbox-group":"true",onChange:ez.length?ej.onChange:ey=>{let ex=ey.target;if(!ex||"checkbox"!==ex.type||"true"!==ex.dataset.rueCheckboxInput)return;let eN=Ac(ex.dataset.rueCheckboxValue);if(void 0===eN)return;let ew=void 0!==eb;eT(eN,ex.checked,ew),ew&&eL()},children:ez.length?ez.map(ey=>n(Nc,{value:ey.value,checked:eI.some(eb=>eb===ey.value),disabled:eN||ey.disabled,name:ew,title:ey.title,id:ey.id,indeterminate:ey.indeterminate,rootClassName:ey.className,rootStyle:ey.style,onChange:(ex,eN)=>{eT(ey.value,eN.checked,void 0!==eb),void 0!==eb&&eL()},children:ey.label},kc(ey.value))):e$})}}),Fc=(...eb)=>eb.filter(Boolean).join(" "),Ic=eb=>null!=eb&&!1!==eb&&(!Array.isArray(eb)||eb.some(eb=>Ic(eb))),Lc=eb=>{switch(eb){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return eb??"md"}},Rc=eb=>{switch(Lc(eb)){case"sm":return"gap-2";case"lg":return"gap-4";default:return"gap-3"}},zc=({variant:eb,tone:ey,bordered:ex,invalid:eN})=>{if(eN)return"rounded-box border border-error/30 bg-error/5 p-4";if("soft"===eb)switch(ey){case"neutral":return"rounded-box bg-neutral/5 p-4";case"primary":return"rounded-box bg-primary/5 p-4";case"secondary":return"rounded-box bg-secondary/5 p-4";case"accent":return"rounded-box bg-accent/5 p-4";case"info":return"rounded-box bg-info/8 p-4";case"success":return"rounded-box bg-success/8 p-4";case"warning":return"rounded-box bg-warning/10 p-4";case"error":return"rounded-box bg-error/8 p-4";default:return"rounded-box bg-base-200 p-4"}if("outlined"===eb||ex)switch(ey){case"neutral":return"rounded-box border border-neutral/20 bg-neutral/5 p-4";case"primary":return"rounded-box border border-primary/25 bg-primary/5 p-4";case"secondary":return"rounded-box border border-secondary/25 bg-secondary/5 p-4";case"accent":return"rounded-box border border-accent/25 bg-accent/5 p-4";case"info":return"rounded-box border border-info/30 bg-info/8 p-4";case"success":return"rounded-box border border-success/30 bg-success/8 p-4";case"warning":return"rounded-box border border-warning/35 bg-warning/10 p-4";case"error":return"rounded-box border border-error/30 bg-error/8 p-4";default:return"rounded-box border border-base-300 bg-base-100 p-4"}},Bc=eb=>{switch(eb){case"muted":return"opacity-70";case"neutral":return"text-neutral";case"primary":return"text-primary";case"secondary":return"text-secondary";case"accent":return"text-accent";case"info":return"text-info";case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return}},Vc=eb=>"sm"===Lc(eb)?"text-xs":"text-sm",Hc=eb=>"lg"===Lc(eb)?"text-sm":"text-xs",Uc=({className:eb,children:ey,aside:ex,...eN})=>{let ew=Ic(ex);return n("legend",{...eN,className:Fc("fieldset-legend",eb),children:ew?r("span",{className:"flex w-full items-center gap-2",children:[n("span",{children:ey}),n("span",{className:"ml-auto text-xs font-normal opacity-65",children:ex})]}):ey})},Wc=({as:eb="label",className:ey,children:ex,tone:eN,...ew})=>{let ek=Fc("label",Bc(eN),ey);return n("p"===eb?"p":"span"===eb?"span":"div"===eb?"div":"label",{...ew,className:ek,children:ex})},Gc=({className:eb,children:ey,label:ex,description:eN,hint:ew,control:ek,required:eC,optional:e$,horizontal:eS,size:ej,tone:eA,invalid:ez,labelClassName:eM,descriptionClassName:eL,hintClassName:eT,contentClassName:eI,labelProps:eO,descriptionProps:eE,hintProps:eP,...eR})=>{let eF=Ic(ex)?r(Wc,{...eO,className:Fc("justify-start gap-2 font-medium",Vc(ej),eM),tone:ez?"error":eA,children:[n("span",{children:ex}),eC?n("span",{className:"text-error text-xs font-medium",children:"必填"}):null,!eC&&e$?n("span",{className:"text-xs opacity-60",children:"可选"}):null]}):null,eD=Ic(eN)?n(Wc,{...eE,as:"p",className:Fc("mt-0 min-h-0 px-0 pb-0",Hc(ej),eL),tone:ez?"error":eE?.tone??"muted",children:eN}):null,eB=Ic(ew)?n(Wc,{...eP,as:"p",className:Fc("mt-0 min-h-0 px-0 pt-1",Hc(ej),eT),tone:ez?"error":eP?.tone??"muted",children:ew}):null,eq=ek??ey,eW=!!eF||!!eD,eH=Ic(eq)||!!eB;return r("div",{...eR,className:Fc(eS?"grid gap-3 md:grid-cols-[minmax(0,12rem)_1fr] md:items-start":"grid gap-2",eb),children:[eW?r("div",{className:"min-w-0",children:[eF,eD]}):null,eH?r("div",{className:Fc("min-w-0",eI),children:[eq,eB]}):null]})},Kc=Object.assign(({className:eb,children:ey,legend:ex,description:eN,hint:ew,actions:ek,content:eC,items:e$,size:eS,tone:ej,variant:eA,bordered:ez,invalid:eM,legendClassName:eL,descriptionClassName:eT,hintClassName:eI,contentClassName:eO,actionsClassName:eE,...eP})=>{let eR=Ic(ey),eF=Ic(eC)?eC:(e$??[]).map((eb,ey)=>{let{key:ex,...eN}=eb;return n(Gc,{...eN,size:eb.size??eS,invalid:eb.invalid??eM},ex??ey)});return n("fieldset",{...eP,"aria-invalid":eM?"true":eP["aria-invalid"],className:Fc("fieldset",Rc(eS),zc({variant:eA,tone:ej,bordered:ez,invalid:eM}),eb),children:eR?ey:r(e.Fragment,{children:[Ic(ex)?n(Uc,{className:Fc(eM&&"text-error",eL),children:ex}):null,Ic(eN)?n(Wc,{as:"p",tone:eM?"error":"muted",className:Fc("mt-0 min-h-0 px-0",Vc(eS),eT),children:eN}):null,Ic(eF)?n("div",{className:Fc("grid min-w-0",Rc(eS),eO),children:eF}):null,Ic(ew)?n(Wc,{as:"p",tone:eM?"error":"muted",className:Fc("mt-0 min-h-0 px-0",Hc(eS),eI),children:ew}):null,Ic(ek)?n("div",{className:Fc("mt-1 flex flex-wrap justify-end gap-2",eE),children:ek}):null]})})},{Legend:Uc,Label:Wc,Item:Gc}),qc="__rueDrawerSidebarPart",Jc=378,Yc=736,Xc=1e3,Zc=0,Qc="",$c=(...eb)=>eb.filter(Boolean).join(" "),el=(eb,ey=[])=>(null==eb||!1===eb||(Array.isArray(eb)?eb.forEach(eb=>el(eb,ey)):ey.push(eb)),ey),tl=eb=>el(eb).some(eb=>!!eb&&"object"==typeof eb&&!!eb.type?.[qc]),nl=eb=>eb.startsWith("--")?eb:eb.includes("-")?eb.replace(/-([a-z])/g,(eb,ey)=>ey.toUpperCase()):eb,rl=eb=>{if(!eb)return;let ey={};return"string"==typeof eb?eb.split(";").map(eb=>eb.trim()).filter(Boolean).forEach(eb=>{let ex=eb.indexOf(":");if(-1===ex)return;let eN=eb.slice(0,ex).trim(),ew=eb.slice(ex+1).trim();eN&&ew&&(ey[nl(eN)]=ew)}):Object.entries(eb).forEach(([eb,ex])=>{null!=ex&&(ey[nl(eb)]=ex)}),Object.keys(ey).length>0?ey:void 0},il=(...eb)=>{let ey={};return eb.forEach(eb=>{let ex=rl(eb);ex&&Object.assign(ey,ex)}),Object.keys(ey).length>0?ey:void 0},al=eb=>{if(null!=eb)return"number"==typeof eb||/^\d+(\.\d+)?$/.test(eb)?`${eb}px`:eb},ol=(eb,ey,ex,eN)=>"large"===eb?`${Yc}px`:"default"===eb?`${Jc}px`:null==eb?"left"===ey||"right"===ey?al(ex)??`${Jc}px`:al(eN)??`${Jc}px`:al(eb),sl=(eb,ey)=>!1===eb?{enabled:!1,closable:!1,blur:!1}:eb&&"object"==typeof eb?{enabled:eb.enabled??!0,closable:eb.closable??ey??!0,blur:eb.blur??!1}:{enabled:!0,closable:ey??!0,blur:!1},cl=(eb,ey)=>!1===eb?{enabled:!1,placement:"end",disabled:!1,icon:ey}:eb&&"object"==typeof eb?{enabled:!0,placement:eb.placement??"end",disabled:eb.disabled??!1,icon:eb.closeIcon??ey}:{enabled:!0,placement:"end",disabled:!1,icon:ey},ll=eb=>{switch(eb){case"left":return"items-stretch justify-start";case"right":default:return"items-stretch justify-end";case"top":return"items-start justify-stretch";case"bottom":return"items-end justify-stretch"}},ul=eb=>{switch(eb){case"left":return"h-full max-h-full border-r border-base-300 rounded-r-3xl";case"right":default:return"h-full max-h-full border-l border-base-300 rounded-l-3xl";case"top":return"w-full border-b border-base-300 rounded-b-3xl";case"bottom":return"w-full border-t border-base-300 rounded-t-3xl"}},dl=(eb,ey)=>{switch(eb){case"left":return ey?"translate-x-0":"-translate-x-full";case"right":default:return ey?"translate-x-0":"translate-x-full";case"top":return ey?"translate-y-0":"-translate-y-full";case"bottom":return ey?"translate-y-0":"translate-y-full"}},fl=(eb,ey)=>{if(ey)return"left"===eb||"right"===eb?{width:ey}:{height:ey}},pl=eb=>[eb.defaultOpen,eb.placement,eb.size,eb.width,eb.height,eb.title,eb.extra,eb.footer,eb.loading,eb.closable,eb.closeIcon,eb.keyboard,eb.mask,eb.maskClosable,eb.inline,eb.forceRender,eb.destroyOnClose,eb.destroyOnHidden,eb.rootClassName,eb.panelClassName,eb.bodyClassName,eb.headerClassName,eb.footerClassName,eb.maskClassName,eb.classNames,eb.styles,eb.style,eb.rootStyle,eb.panelStyle,eb.bodyStyle,eb.headerStyle,eb.footerStyle,eb.maskStyle,eb.getContainer,eb.drawerRender,eb.onClose,eb.onOpenChange,eb.afterOpenChange,eb.zIndex].some(eb=>void 0!==eb),ml=()=>{typeof document>"u"||(0===Zc&&(Qc=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden"),Zc+=1)},hl=()=>{typeof document>"u"||0===Zc||0==--Zc&&(document.documentElement.style.overflow=Qc)},gl=()=>r("div",{className:"space-y-3","data-rue-drawer-sidebar-loading":"true",children:[n("div",{className:"skeleton h-4 w-1/3"}),n("div",{className:"skeleton h-4 w-full"}),n("div",{className:"skeleton h-4 w-5/6"}),n("div",{className:"skeleton h-24 w-full"})]}),_l=()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-4","aria-hidden":"true",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})}),vl=({end:eb,open:ey,className:ex,children:eN,...ew})=>{if(!(!tl(eN)&&pl({end:eb,open:ey,className:ex,children:eN,...ew}))){let ek="drawer";return eb&&(ek+=" drawer-end"),ey&&(ek+=" drawer-open"),n("div",{...ew,className:$c(ek,ex),"data-rue-drawer-sidebar-mode":"compound",children:eN})}let{defaultOpen:ek=!1,placement:eC="right",size:e$,width:eS,height:ej,title:eA,extra:ez,footer:eM,loading:eL=!1,closable:eT=!0,closeIcon:eI,keyboard:eO=!0,mask:eE=!0,maskClosable:eP,inline:eR=!1,forceRender:eF=!1,destroyOnClose:eD,destroyOnHidden:eB=!0,zIndex:eq,rootClassName:eW,panelClassName:eH,bodyClassName:eV,headerClassName:eK,footerClassName:eZ,maskClassName:eY,classNames:eU,styles:eQ,style:eG,rootStyle:eJ,panelStyle:eX,bodyStyle:e0,headerStyle:e1,footerStyle:e2,maskStyle:e5,getContainer:e3,drawerRender:e4,onClose:e6,onOpenChange:e7,afterOpenChange:e8,...e9}=ew,tb=(0,e.ref)(ek),ty=(0,e.ref)(!!ek),tx=(0,e.ref)(ek),tN=(0,e.ref)(!1),tw=(0,e.ref)("boolean"==typeof ey?ey:tb.value),tk=(0,e.ref)(eO),tC="boolean"==typeof ey,t$=tw.value,tS=eB??eD??!0,tj=sl(eE,eP),tA=cl(eT,eI??n(_l,{})),tz=ol(e$,eC,eS,ej),tM=null,tL=null,tT=null,tI=eb=>{if(tM&&(tM.setAttribute("data-rue-drawer-sidebar-open",eb?"true":"false"),tM.classList.toggle("pointer-events-auto",eb),tM.classList.toggle("pointer-events-none",!eb),tM.style.display=tS&&!eb?"none":""),tL&&(tL.classList.toggle("opacity-100",eb),tL.classList.toggle("opacity-0",!eb)),tT){let ey=dl(eC,!0),ex=dl(eC,!1);tT.setAttribute("aria-hidden",eb?"false":"true"),tT.setAttribute("aria-modal",eb&&!eR?"true":"false"),tT.classList.toggle(ey,eb),tT.classList.toggle(ex,!eb)}},tO=eb=>{e6&&e6(eb),eb&&eb.defaultPrevented||!1!==tw.value&&(tw.value=!1,tC||(tb.value=!1),e7&&e7(!1))};if((0,e.onMounted)(()=>{if(t$&&!eR&&(ml(),tN.value=!0),typeof window>"u")return;let eb=eb=>{tw.value&&tk.value&&"Escape"===eb.key&&tO(eb)};window.addEventListener("keydown",eb),(0,e.onUnmounted)(()=>{window.removeEventListener("keydown",eb)})}),(0,e.watch)(()=>tw.value,eb=>{tI(eb),eb?(tx.value=!0,eR||tN.value||(ml(),tN.value=!0)):tN.value&&(hl(),tN.value=!1),e8&&e8(eb)}),(0,e.watch)(()=>ey,eb=>{"boolean"==typeof eb&&(tw.value=eb)},{immediate:!0}),(0,e.watch)(()=>eO,eb=>{tk.value=eb},{immediate:!0}),(0,e.watch)(()=>ek,eb=>{let ey=!!eb;tC||ey===ty.value||(ty.value=ey,tb.value=ey,tw.value=ey)}),(0,e.onUnmounted)(()=>{tN.value&&(hl(),tN.value=!1)}),!(t$||eF||!tS&&tx.value))return null;let tE=null!=eA||null!=ez||tA.enabled,tP=tA.enabled?n("button",{type:"button","aria-label":"关闭",disabled:tA.disabled,className:$c("btn btn-sm btn-circle btn-ghost shrink-0",tA.disabled?"btn-disabled pointer-events-none opacity-50":void 0,eU?.close),style:il(eQ?.close),onClick:eb=>{eb.stopPropagation(),tA.disabled||tO(eb)},"data-rue-drawer-sidebar-close":"true",children:tA.icon}):null,tR=n("div",{className:$c("flex-1 overflow-y-auto px-5 py-5",eV,eU?.body),style:il(eQ?.body,e0),"aria-busy":eL?"true":void 0,"data-rue-drawer-sidebar-body":"true",children:eL?gl():eN}),tF=r("div",{...e9,role:"dialog","aria-modal":t$&&!eR?"true":"false","aria-hidden":t$?void 0:"true",className:$c("bg-base-100 text-base-content relative flex max-w-full max-h-full flex-col shadow-2xl transition-transform duration-300 ease-out",ul(eC),dl(eC,t$),ex,eH,eU?.panel),style:il(eQ?.panel,eG,eX,fl(eC,tz)),onClick:eb=>eb.stopPropagation(),ref:eb=>{tT=eb,tI(tw.value)},"data-rue-drawer-sidebar-panel":"true","data-rue-drawer-sidebar-placement":eC,children:[tE?r("div",{className:$c("flex items-start gap-3 border-b border-base-300 px-5 py-4",eK,eU?.header),style:il(eQ?.header,e1),"data-rue-drawer-sidebar-header":"true",children:["start"===tA.placement?tP:null,n("div",{className:$c("min-w-0 flex-1",eU?.title),style:il(eQ?.title),children:eA?n("div",{className:"text-lg font-semibold leading-6",children:eA}):null}),ez?n("div",{className:"shrink-0",children:ez}):null,"end"===tA.placement?tP:null]}):null,tR,null!=eM&&!1!==eM?n("div",{className:$c("border-t border-base-300 px-5 py-4",eZ,eU?.footer),style:il(eQ?.footer,e2),"data-rue-drawer-sidebar-footer":"true",children:eM}):null]});e4&&(tF=e4(tF));let tD=r("div",{className:$c(eR?"absolute inset-0 overflow-hidden":"fixed inset-0 overflow-hidden",t$?"pointer-events-auto":"pointer-events-none",eW,eU?.root),style:il(eQ?.root,eJ,{zIndex:eq??Xc}),ref:eb=>{tM=eb,tI(tw.value)},"data-rue-drawer-sidebar-root":"true","data-rue-drawer-sidebar-mode":"panel","data-rue-drawer-sidebar-open":t$?"true":"false",children:[tj.enabled?n("div",{"aria-hidden":"true",className:$c("absolute inset-0 bg-base-content/35 transition-opacity duration-300",tj.blur?"backdrop-blur-sm":void 0,t$?"opacity-100":"opacity-0",eY,eU?.mask),style:il(eQ?.mask,e5),ref:eb=>{tL=eb,tI(tw.value)},"data-rue-drawer-sidebar-mask":"true"}):null,n("div",{className:$c("absolute inset-0 flex",ll(eC),eU?.wrapper),style:il(eQ?.wrapper),onClick:eb=>{tj.enabled&&tj.closable&&eb.target===eb.currentTarget&&tO(eb)},"data-rue-drawer-sidebar-wrapper":"true",children:tF})]}),tB="function"==typeof e3?e3():e3;return eR||!1===tB||null==tB?tD:n(e.Teleport,{to:tB,children:tD})},yl=({className:eb,...ey})=>n("input",{...ey,type:"checkbox",autoComplete:ey.autoComplete??"off",className:$c("drawer-toggle",eb)});yl[qc]="Toggle";var bl=({className:eb,children:ey,...ex})=>n("div",{...ex,className:$c("drawer-content",eb),children:ey});bl[qc]="Content";var xl=({className:eb,children:ey,...ex})=>n("div",{...ex,className:$c("drawer-side",eb),children:ey});xl[qc]="Side";var Sl=({className:eb,children:ey,...ex})=>n("label",{...ex,className:$c("drawer-overlay",eb),children:ey});Sl[qc]="Overlay";var Zd,Cl=Object.assign(vl,{Toggle:yl,Content:bl,Side:xl,Overlay:Sl}),wl=eb=>eb.replace(/[A-Z]/g,eb=>`-${eb.toLowerCase()}`),Tl=["neutral","primary","secondary","accent","info","success","warning","error"],El={top:"top",bottom:"bottom",left:"left",right:"right",topLeft:"top",topRight:"top",bottomLeft:"bottom",bottomRight:"bottom",leftTop:"left",leftBottom:"left",rightTop:"right",rightBottom:"right"},Dl=0,Ol=(...eb)=>eb.filter(Boolean).join(" "),kl=(...eb)=>{let ey={};return eb.forEach(eb=>{eb&&Object.assign(ey,eb)}),ey},Al=eb=>eb?"string"==typeof eb?eb.trim():Object.entries(eb).filter(([,eb])=>null!=eb).map(([eb,ey])=>`${eb.startsWith("--")?eb:wl(eb)}:${String(ey)}`).join("; "):"",jl=eb=>Array.isArray(eb)?eb.flatMap(eb=>jl(eb)):null==eb||"boolean"==typeof eb?[]:[eb],Ml=(eb,ey,ex)=>{ey&&ey.split(/\s+/).map(eb=>eb.trim()).filter(Boolean).forEach(ey=>eb.classList.toggle(ey,ex))},Nl=(eb,ey,ex,eN)=>{eb instanceof HTMLElement&&(eb.classList.toggle("tooltip-open",ey),Ml(eb,eN,ey),eb.classList.toggle("before:!opacity-0",ex&&!ey),eb.classList.toggle("after:!opacity-0",ex&&!ey),eb.classList.toggle("[&>.tooltip-content]:!opacity-0",ex&&!ey))},Pl=eb=>Array.from(new Set(Array.isArray(eb)?eb:eb?[eb]:["hover","focus"])),Fl=eb=>"string"==typeof eb&&Tl.includes(eb),Il=eb=>"string"==typeof eb||"number"==typeof eb,Ll=(eb,ey,ex,eN)=>{let ew=void 0===eb?void 0===ey?void 0===ex?eN:ex:ey:eb;return"function"==typeof ew?ew():ew},Rl=eb=>Number.parseInt(eb,16),zl=eb=>{let ey=eb/255;return ey<=.03928?ey/12.92:((ey+.055)/1.055)**2.4},Bl=eb=>{let ey=eb.trim(),ex=NaN,eN=NaN,ew=NaN;if(/^#([\da-f]{3}|[\da-f]{6})$/i.test(ey)){let eb=ey.slice(1);3===eb.length?(ex=Rl(`${eb[0]}${eb[0]}`),eN=Rl(`${eb[1]}${eb[1]}`),ew=Rl(`${eb[2]}${eb[2]}`)):(ex=Rl(eb.slice(0,2)),eN=Rl(eb.slice(2,4)),ew=Rl(eb.slice(4,6)))}else{let eb=ey.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)/i);eb&&(ex=Number(eb[1]),eN=Number(eb[2]),ew=Number(eb[3]))}return[ex,eN,ew].some(eb=>Number.isNaN(eb))?"var(--color-neutral-content)":.2126*zl(ex)+.7152*zl(eN)+.0722*zl(ew)>.45?"#111827":"#f8fafc"},Vl=(eb,ey)=>{"function"==typeof eb&&eb(ey)},Hl=({as:eb="div",className:ey,style:ex,children:eN,...ew})=>{let ek={...ew,className:Ol("tooltip-content",ey),style:ex},eC=jl(eN);return"span"===eb?(0,e.h)("span",ek,...eC):"p"===eb?(0,e.h)("p",ek,...eC):"section"===eb?(0,e.h)("section",ek,...eC):"div"===eb?(0,e.h)("div",ek,...eC):(0,e.h)(eb,ek,...eC)},Ul=Object.assign(({as:eb="div",tip:ey,title:ex,content:eN,overlay:ew,placement:ek="top",color:eC,open:e$,defaultOpen:eS,disabled:ej,arrow:eA=!0,trigger:ez,openClassName:eM,overlayClassName:eL,overlayStyle:eT,classNames:eI,styles:eO,className:eE,style:eP,onOpenChange:eR,children:eF,...eD})=>{let eB=(0,e.ref)(`rue-tooltip-${Dl++}`),eq=(0,e.ref)(eS??!1),eW=Ll(ew,ex,eN,ey),eH=null!=eW&&!1!==eW,eV=Pl(ez),eK=eV.includes("hover"),eZ=eV.includes("focus"),eY=eV.includes("click"),eU=eV.includes("contextMenu"),eQ=e$??eq.value,eG=!!eC&&!Fl(eC),eJ=Ol(eI?.body,eL),eX=kl(eO?.body,eT),e0=eH&&(eG||!Il(eW)||!!eJ||Object.keys(eX).length>0),e1=eH&&!e0&&Il(eW),e2=!eK&&!eZ,e5=!ej&&(!1===e$||!eQ&&e2),e3=eb=>{let ey=e$??eq.value;ej||eb===ey||(void 0===e$&&(eq.value=eb),eR&&eR(eb))},e4=kl("string"==typeof eP?void 0:eP,eO?.root),e6=eG?kl(eX,{backgroundColor:eC,color:Bl(String(eC))}):kl(eX),e7=ej?"":"tooltip";ej||(e7=Ol(e7,`tooltip-${El[ek]}`),eC&&Fl(eC)&&(e7=Ol(e7,`tooltip-${eC}`)),eQ&&(e7=Ol(e7,"tooltip-open",eM)),(!eA||eG)&&(e7=Ol(e7,"after:!hidden")),e5&&(e7=Ol(e7,"before:!opacity-0","after:!opacity-0","[&>.tooltip-content]:!opacity-0"))),e7=Ol(e7,eI?.root,eE);let{onMouseEnter:e8,onMouseLeave:e9,onFocus:tb,onBlur:ty,onClick:tx,onContextMenu:tN,...tw}=eD,tk={...tw,className:e7||void 0,style:Al(e4),onMouseEnter:eb=>{Vl(e8,eb),!eb?.defaultPrevented&&eK&&e3(!0)},onMouseLeave:eb=>{Vl(e9,eb),!eb?.defaultPrevented&&eK&&e3(!1)},onFocus:eb=>{Vl(tb,eb),!eb?.defaultPrevented&&eZ&&e3(!0)},onBlur:eb=>{Vl(ty,eb),!eb?.defaultPrevented&&eZ&&e3(!1)},onClick:eb=>{if(Vl(tx,eb),!eb?.defaultPrevented&&eY){let ey=!(e$??eq.value);e3(ey),void 0===e$&&Nl(eb?.currentTarget,ey,e2,eM)}},onContextMenu:eb=>{if(Vl(tN,eb),!eb?.defaultPrevented&&eU){"function"==typeof eb?.preventDefault&&eb.preventDefault();let ey=!(e$??eq.value);e3(ey),void 0===e$&&Nl(eb?.currentTarget,ey,e2,eM)}}};ej||!e1?delete tk["data-tip"]:void 0===tk["data-tip"]&&(tk["data-tip"]=String(eW)),e0&&!ej&&(tk["aria-describedby"]=eB.value);let tC=e0&&!ej?(0,e.h)(Hl,{id:eB.value,className:eJ,style:Object.keys(e6).length>0?e6:void 0},eW):null,t$=[...tC?[tC]:[],...jl(eF)];return"span"===eb?(0,e.h)("span",tk,...t$):"label"===eb?(0,e.h)("label",tk,...t$):"button"===eb?(0,e.h)("button",tk,...t$):"section"===eb?(0,e.h)("section",tk,...t$):"article"===eb?(0,e.h)("article",tk,...t$):"div"===eb?(0,e.h)("div",tk,...t$):(0,e.h)(eb,tk,...t$)},{Content:Hl}),Wl=(...eb)=>eb.filter(Boolean).join(" "),Gl=eb=>Array.isArray(eb)?eb.flatMap(eb=>Gl(eb)):null==eb||"boolean"==typeof eb?[]:[eb],Kl=eb=>null!=eb&&!1!==eb&&""!==eb&&(!Array.isArray(eb)||eb.some(eb=>Kl(eb))),ql=eb=>void 0!==eb.items||void 0!==eb.trigger||void 0!==eb.open||void 0!==eb.defaultOpen||void 0!==eb.icon||void 0!==eb.content||void 0!==eb.description||void 0!==eb.tooltip||void 0!==eb.badge||void 0!==eb.type||void 0!==eb.color||void 0!==eb.shape||void 0!==eb.href||void 0!==eb.target||void 0!==eb.htmlType||void 0!==eb.closeIcon||void 0!==eb.menuIcon||void 0!==eb.panelClassName||void 0!==eb.onOpenChange,Jl=(eb,ey)=>ey||("primary"===eb?"primary":"default"),Yl=(eb,ey)=>eb||(Kl(ey)?"square":"circle"),Xl=eb=>!(!eb||"object"!=typeof eb||Array.isArray(eb))&&["title","content","overlay","tip","placement","color","trigger","open","defaultOpen","disabled"].some(ey=>ey in eb),Zl=(eb,ey,ex)=>null==ey||!1===ey?eb:Xl(ey)?n(Ul,{placement:ey.placement??ex,...ey,children:eb}):n(Ul,{title:ey,placement:ex,children:eb}),Ql=(eb,ey)=>ey?n(Lt,{...ey,children:eb}):eb,$l=()=>n("span",{"aria-hidden":"true",className:"text-xl leading-none",children:"+"}),eu=()=>n("span",{"aria-hidden":"true",className:"text-lg leading-none",children:"x"}),tu=({icon:eb,content:ey,description:ex,tooltip:eN,badge:ew,type:ek,color:eC,shape:e$,href:eS,target:ej,htmlType:eA,disabled:ez,className:eM,children:eL,closeOnClick:eT,onClick:eI,tooltipPlacement:eO="left",menuAction:eE,open:eP,closeIcon:eR,menuIcon:eF,onActionClick:eD,...eB})=>{let eq=Kl(eL)?eL:ey??ex,eW=Yl(e$,eq),eH=eE?r("span",{"data-rue-fab-toggle-icon":"true",className:"inline-flex items-center justify-center",children:[n("span",{"data-rue-fab-open-icon":"true",className:eP?"hidden":void 0,children:eF??eb??n($l,{})}),n("span",{"data-rue-fab-close-icon":"true",className:eP?void 0:"hidden",children:eR??n(eu,{})})]}):eb,eV=Wl("shadow-lg transition-all duration-200","circle"===eW?"size-14 p-0":"h-auto min-h-20 w-20 rounded-3xl px-3 py-3 text-center text-xs leading-tight",eM),eK=n(k,{...eB,href:eS,target:ej,htmlType:eA,size:"large",color:Jl(ek,eC),shape:"circle"===eW?"circle":void 0,icon:eH,iconPlacement:"start",disabled:ez,className:eV,"aria-label":eB["aria-label"]??("string"==typeof eq?eq:void 0),onClick:eO=>{eI&&eI(eO),eD&&eD(eO,{...eB,icon:eb,content:ey,description:ex,tooltip:eN,badge:ew,type:ek,color:eC,shape:e$,href:eS,target:ej,htmlType:eA,disabled:ez,className:eM,children:eL,closeOnClick:eT,onClick:eI})},children:"circle"===eW?null:eq});return Zl(eK=Ql(eK,ew),eN,eO)},nu=eb=>{switch(eb){case"bottom":return{wrapper:"top-full pt-3 right-0",list:"flex-col",tooltipPlacement:"leftTop"};case"left":return{wrapper:"right-full pr-3 top-1/2 -translate-y-1/2",list:"flex-row-reverse",tooltipPlacement:"top"};case"right":return{wrapper:"left-full pl-3 top-1/2 -translate-y-1/2",list:"flex-row",tooltipPlacement:"top"};default:return{wrapper:"bottom-full pb-3 right-0",list:"flex-col-reverse",tooltipPlacement:"leftTop"}}},ru=(eb,ey)=>{let ex=Math.max(Math.min(ey,4),1)-1,eN=(0===ex?225:180+90/ex*eb)*Math.PI/180;return{x:Math.round(84*Math.cos(eN)),y:Math.round(84*Math.sin(eN))}},iu=Object.assign(eb=>{if(!ql(eb)){let{flower:ey,className:ex,children:eN,...ew}=eb,ek="fab";return ey&&(ek+=" fab-flower"),ex&&(ek+=` ${ex}`),(0,e.h)("div",{...ew,className:ek},...Gl(eN))}let{flower:ey,items:ex=[],trigger:eN,open:ew,defaultOpen:ek=!1,placement:eC="top",closeIcon:e$,menuIcon:eS,panelClassName:ej,onOpenChange:eA,className:ez,children:eM,onClick:eL,onMouseEnter:eT,onMouseLeave:eI,...eO}=eb,eE=eN??(ex.length?"click":void 0),eP={...eO};delete eP.icon,delete eP.content,delete eP.description,delete eP.tooltip,delete eP.badge,delete eP.type,delete eP.color,delete eP.shape,delete eP.href,delete eP.target,delete eP.htmlType,delete eP.disabled,delete eP.closeOnClick;let eR="boolean"==typeof ew,eF=(0,e.ref)(ek),eD=(0,e.ref)(eR?!!ew:eF.value),eB=(0,e.ref)(eE),eq=eD.value,eW=null,eH=eb=>{if(!eW||!eK)return;let ey=eW.querySelector("[aria-expanded]"),ex=eW.querySelector('[data-rue-fab-panel="true"]');if(ey){ey.setAttribute("aria-expanded",eb?"true":"false");let ex=ey.querySelector('[data-rue-fab-open-icon="true"]'),eN=ey.querySelector('[data-rue-fab-close-icon="true"]');ex?.classList.toggle("hidden",eb),eN?.classList.toggle("hidden",!eb)}ex&&(ex.setAttribute("aria-hidden",eb?"false":"true"),ex.classList.toggle("pointer-events-auto",eb),ex.classList.toggle("opacity-100",eb),ex.classList.toggle("scale-100",eb),ex.classList.toggle("pointer-events-none",!eb),ex.classList.toggle("opacity-0",!eb),ex.classList.toggle("scale-95",!eb))},eV=eb=>{eD.value!==eb&&(eD.value=eb,eR||(eF.value=eb),eH(eb),eA&&eA(eb))};(0,e.watch)(()=>ew,eb=>{"boolean"==typeof eb&&(eD.value=eb,eH(eb))},{immediate:!0}),(0,e.watch)(()=>eE,eb=>{eB.value=eb},{immediate:!0}),(0,e.watch)(()=>ek,eb=>{if(!eR){let ey=!!eb;eF.value=ey,eD.value=ey,eH(ey)}},{immediate:!0}),(0,e.onMounted)(()=>{if(typeof window>"u")return;let eb=eb=>{!eD.value||"click"!==eB.value||eW?.contains(eb.target)||eV(!1)},ey=eb=>{eD.value&&"click"===eB.value&&"Escape"===eb.key&&eV(!1)};window.addEventListener("click",eb,!0),window.addEventListener("keydown",ey),(0,e.onUnmounted)(()=>{window.removeEventListener("click",eb,!0),window.removeEventListener("keydown",ey)})});let eK=!!ex.length||!!eN,eZ=eq?"pointer-events-auto opacity-100 scale-100":"pointer-events-none opacity-0 scale-95",eY=nu(eC),eU=(eb,ey)=>{"click"===eE&&!1!==ey.closeOnClick&&eV(!1)},eQ=ex.map((eb,eN)=>{let ew=eb.key??`${eC}-${eN}`;if(ey){let ey=ru(eN,ex.length);return n("div",{className:Wl("absolute right-0 top-0 transition-all duration-200",eq?"pointer-events-auto opacity-100 scale-100":"pointer-events-none opacity-0 scale-75"),style:{transform:eq?`translate(${ey.x}px, ${ey.y}px)`:"translate(0px, 0px)"},children:n(tu,{...eb,tooltipPlacement:eb.tooltip&&"square"!==eb.shape?"left":eY.tooltipPlacement,onActionClick:eU})},String(ew))}return n(tu,{...eb,tooltipPlacement:eb.tooltip&&"square"!==eb.shape?"left":eY.tooltipPlacement,onActionClick:eU},String(ew))}),eG=n(tu,{...eO,children:eM,icon:eO.icon,onClick:eK?void 0:eb=>{eL&&eL(eb)},tooltipPlacement:eY.tooltipPlacement,menuAction:eK,open:eq,closeIcon:e$,menuIcon:eS,"aria-expanded":eK?eq?"true":"false":void 0});return r("div",{...eP,ref:eb=>{eW=eb,eH(eq)},className:Wl("rue-fab pointer-events-none relative inline-flex items-end justify-end",ey?"min-h-[14rem] min-w-[14rem]":void 0,ez),onMouseEnter:eb=>{"hover"===eE&&eV(!0),eT&&eT(eb)},onMouseLeave:eb=>{"hover"===eE&&eV(!1),eI&&eI(eb)},"data-rue-fab-root":"true",children:[eK?ey?n("div",{className:Wl("pointer-events-none absolute inset-0",ej),"aria-hidden":eq?"false":"true",children:eQ}):n("div",{"data-rue-fab-panel":"true",className:Wl("absolute transition-all duration-200",eY.wrapper,eZ,ej),"aria-hidden":eq?"false":"true",children:n("div",{className:Wl("flex gap-3",eY.list),children:eQ})}):null,n("div",{className:"pointer-events-auto relative z-1",onClick:eb=>{eK&&("click"===eE&&eV(!eD.value),eL&&eL(eb))},children:eG})]})},{Trigger:({as:eb="div",className:ey,children:ex,...eN})=>{let ew={...eN};if("div"===eb){if("string"!=typeof ew.tabindex){let eb=ew.tabIndex;ew.tabindex="number"==typeof eb?String(eb):"0"}delete ew.tabIndex,ew.role||(ew.role="button")}return(0,e.h)(eb,{...ew,className:ey},...Gl(ex))},Close:({as:eb="div",className:ey,children:ex,...eN})=>(0,e.h)(eb,{...eN,className:Wl("fab-close",ey)},...Gl(ex)),MainAction:({as:eb="div",className:ey,children:ex,...eN})=>(0,e.h)(eb,{...eN,className:Wl("fab-main-action",ey)},...Gl(ex)),Item:eb=>n(tu,{...eb})}),au=0,ou=(...eb)=>eb.filter(Boolean).join(" ").trim(),su=eb=>Object.fromEntries(Object.entries(eb).filter(([,eb])=>null!=eb)),cu=eb=>{switch(eb){case"small":return"sm";case"medium":case"middle":return"md";case"large":return"lg";default:return eb}},lu=eb=>{switch(typeof eb){case"number":return`number:${eb}`;case"boolean":return`boolean:${eb?"true":"false"}`;default:return`string:${eb}`}},uu=eb=>{if(!eb)return;let ey=eb.indexOf(":");if(-1===ey)return eb;let ex=eb.slice(0,ey),eN=eb.slice(ey+1);return"number"===ex?Number(eN):"boolean"===ex?"true"===eN:eN},du=eb=>"string"==typeof eb||"number"==typeof eb||"boolean"==typeof eb,fu=eb=>{let ey=[];return eb.forEach(eb=>{ey.some(ey=>lu(ey)===lu(eb))||ey.push(eb)}),ey},pu=(eb,ey)=>void 0===eb?[]:Array.isArray(eb)?"checkbox"===ey?fu(eb):eb.length?[eb[0]]:[]:[eb],mu=eb=>(eb??[]).map((eb,ey)=>{if(du(eb))return{key:`${lu(eb)}-${ey}`,label:String(eb),value:eb};let ex=eb.label??eb["aria-label"],eN=eb.key??(void 0===eb.value?"string"==typeof ex||"number"==typeof ex||"boolean"==typeof ex?String(ex):`item-${ey}`:lu(eb.value));return{...eb,key:eN}}),hu=eb=>{switch(eb){case"outlined":return"btn-outline";case"dashed":return"btn-dash";case"filled":return"btn-soft";case"text":return"btn-ghost";default:return}},gu=({color:eb,size:ey,variant:ex,active:eN,className:ew})=>{let ek="btn",eC=cu(ey),e$=hu(ex);return eb&&"default"!==eb&&(ek+=` btn-${"danger"===eb?"error":eb}`),eC&&(ek+=` btn-${eC}`),e$&&(ek+=` ${e$}`),eN&&(ek+=" btn-active"),ew&&(ek+=` ${ew}`),ek},_u=(eb,ey)=>void 0===eb?ey:eb,vu=eb=>{if(void 0!==eb.value)return eb.value;let ey=_u(eb.label??eb["aria-label"],eb.children);return du(ey)?ey:void 0},yu=(eb,ey)=>{let ex=eb.dataset[ey];if(!(!ex||!ex.length||"undefined"===ex||"null"===ex))return ex},bu=eb=>({role:yu(eb,"rueFilterRole"),mode:yu(eb,"rueFilterMode"),type:yu(eb,"rueFilterType"),name:yu(eb,"rueFilterName"),size:yu(eb,"rueFilterSize"),color:yu(eb,"rueFilterColor"),variant:yu(eb,"rueFilterVariant"),className:yu(eb,"rueFilterClassName"),active:"true"===eb.dataset.rueFilterActive,disabled:"true"===eb.dataset.rueFilterDisabled,value:uu(yu(eb,"rueFilterValue"))}),xu=({as:eb="form",className:ey,style:ex,children:eN,items:ew,name:ek,type:eC,multiple:e$,value:eS,defaultValue:ej,onChange:eA,size:ez,color:eM,variant:eL,disabled:eT,itemClassName:eI,reset:eO,onReset:eE,...eP})=>{let eR=(0,e.useRef)(),eF=(0,e.useRef)(),eD=mu(ew),eB=e$?"checkbox":eC??"radio",eq=(0,e.ref)(`rue-filter-${++au}`),eW=ek??("radio"===eB?eq.value:void 0),eH=pu(ej,eB),eV=(0,e.ref)(pu(eS,eB)),eK=(0,e.ref)(eH),eZ=void 0!==eS,eY=eZ||void 0!==ej||!!eA||eD.length>0,eU=()=>eZ?eV.value:eK.value,eQ=()=>{let eb=eR.current,ey=eF.current;eb&&ey&&ey.observe(eb,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","type","name","checked","value"]})},eG=()=>{queueMicrotask(()=>{eJ()}),setTimeout(()=>{eJ()},0)},eJ=()=>{let ey=eR.current;if(!ey)return;eF.current?.disconnect();let ex=eU();Array.from(ey.querySelectorAll("input[data-rue-filter-role]")).forEach(ey=>{let eN=bu(ey);if("reset"===eN.role){let ew=eN.mode??eb,ek="div"===ew&&eY?0===ex.length:!0===ey.checked,eC=gu({color:eN.color??eM,size:eN.size??ez,variant:eN.variant??eL,active:eN.active||ek,className:ou(eI,eN.className)});ey.type="form"===ew?"reset":"radio",ey.disabled=!!eT||eN.disabled,ey.className=ou(eC,"form"===ew?"btn-square":"filter-reset"),"div"===ew&&("radio"===eB&&(eN.name??eW)?ey.name=eN.name??eW??"":ey.removeAttribute("name"),eY&&(ey.checked=0===ex.length));return}let ew=eY&&void 0!==eN.value?ex.some(eb=>lu(eb)===lu(eN.value)):!0===ey.checked,ek=gu({color:eN.color??eM,size:eN.size??ez,variant:eN.variant??eL,active:eN.active||ew,className:ou(eI,eN.className)});ey.type=eN.type??eB,"radio"===ey.type&&(eN.name??eW)&&(ey.name=eN.name??eW??""),ey.disabled=!!eT||eN.disabled,ey.className=ek,eY&&void 0!==eN.value&&(ey.checked=ew)}),eQ()},eX=(eb,ey,ex,eN=!1)=>{let ew=pu(eb,eB);eY&&(eZ?eA&&(eV.value=ew):eK.value=ew),eA&&eA("checkbox"===eB?ew:ew[0],ey,{checked:eN,value:ex?vu(ex):void 0,item:ex,values:ew})},e0="object"==typeof eO?eO:void 0,e1=e0?.mode??eb,e2=eO?n(Cu,{...e0,mode:e1}):null,e5="checkbox"===eB&&"form"===e1,e3=eD.length>0?r(e.Fragment,{children:[e5?null:e2,eD.map((eb,ey)=>n(Su,{...eb},eb.key??`filter-item-${ey}`)),e5?e2:null]}):eN;return(0,e.onMounted)(()=>{"function"==typeof MutationObserver&&(eF.current=new MutationObserver(()=>{eJ()}),eQ()),eJ()}),(0,e.onUnmounted)(()=>{eF.current?.disconnect(),eF.current=void 0}),(0,e.watch)(()=>eS,eb=>{eV.value=pu(eb,eB),eJ()},{immediate:!0}),(0,e.watch)(()=>eK.value,()=>{eJ()},{immediate:!0}),(0,e.watch)(()=>eT,()=>{eJ()},{immediate:!0}),(0,e.watch)(()=>eW,()=>{eJ()},{immediate:!0}),(0,e.watch)(()=>`${eb}|${eB}|${eM??""}|${eL??""}|${ez??""}|${eI??""}|${eD.length}`,()=>{eJ()},{immediate:!0}),n(eb,{...eP,ref:eR,style:ex,onChange:ey=>{let ex=ey.target;if(!ex||"input"!==ex.tagName.toLowerCase()||!ex.dataset.rueFilterRole)return;let eN=bu(ex);if("reset"===eN.role){(eN.mode??eb)!=="form"&&(eX([],ey,void 0,!1),eJ(),eG());return}((eb,ey,ex)=>{let eN=eU();if(void 0===eb)return eX(eN,ex,void 0,ey);if("checkbox"===eB){let ew=eN.some(ey=>lu(ey)===lu(eb));eX(ey?ew?eN:[...eN,eb]:eN.filter(ey=>lu(ey)!==lu(eb)),ex,void 0,ey);return}eX(ey?[eb]:[],ex,void 0,ey)})(eN.value,!0===ex.checked,ey),eJ(),eG()},onReset:eb=>{eX(eH,eb,void 0,!1),eJ(),eG(),eE&&eE(eb)},className:ou("radio"===eB?"filter":"flex flex-wrap gap-1",ey),"data-rue-filter-group":"true","data-rue-filter-mode":eb,"data-rue-filter-type":eB,children:e3})},Su=({label:eb,children:ey,checked:ex,defaultChecked:eN,disabled:ew,className:ek,color:eC,size:e$,variant:eS,active:ej,name:eA,type:ez,onChange:eM,...eL})=>{let eT=(0,e.useRef)(),eI=ez??"radio",eO=!!ew,eE=vu({value:eL.value,label:eb??eL["aria-label"],children:ey}),eP=_u(eb??eL["aria-label"],ey),eR=gu({color:eC,size:e$,variant:eS,active:ej,className:ek}),eF={...eL};void 0!==eP&&void 0===eF["aria-label"]&&du(eP)&&(eF["aria-label"]=String(eP)),void 0!==eE&&void 0===eF.value&&(eF.value=String(eE));let eD=su({"data-rue-filter-role":"item","data-rue-filter-name":eA,"data-rue-filter-type":ez,"data-rue-filter-size":e$,"data-rue-filter-color":eC,"data-rue-filter-variant":eS,"data-rue-filter-class-name":ek,"data-rue-filter-active":ej?"true":"false","data-rue-filter-disabled":eO?"true":"false","data-rue-filter-value":void 0===eE?void 0:lu(eE)}),eB=su({...eF,name:eA,type:eI,checked:ex,defaultChecked:eN,className:eR,disabled:eO,...eD});return(0,e.onMounted)(()=>{eT.current&&(eT.current.className=eR,eT.current.disabled=eO,eA&&(eT.current.name=eA),eT.current.type=eI)}),n("input",{...eB,ref:eT,onChange:eb=>{let ey=eb.target?.checked===!0;eM&&eM(eb,{checked:ey,value:eE,item:{...eL,label:eP,value:eE,checked:ex,defaultChecked:eN,disabled:eO,className:ek,color:eC,size:e$,variant:eS,active:ej,name:eA,type:eI}})}})},Cu=({mode:eb,label:ey,checked:ex,defaultChecked:eN,disabled:ew,className:ek,color:eC,size:e$,variant:eS,onChange:ej,...eA})=>{let ez=(0,e.useRef)(),eM=eb??"div",eL=!!ew,eT=_u(ey??eA["aria-label"]??eA.value,"\xd7"),eI=gu({color:eC,size:e$,variant:eS,className:ek}),eO={...eA};"form"===eM?(eI+=" btn-square",void 0===eO.value&&du(eT)&&(eO.value=String(eT))):(eI+=" filter-reset",void 0===eO["aria-label"]&&du(eT)&&(eO["aria-label"]=String(eT))),(0,e.onMounted)(()=>{ez.current&&(ez.current.className=eI,ez.current.disabled=eL,ez.current.type=eO.type??("form"===eM?"reset":"radio"))});let eE=su({"data-rue-filter-role":"reset","data-rue-filter-mode":eM,"data-rue-filter-name":eO.name,"data-rue-filter-size":e$,"data-rue-filter-color":eC,"data-rue-filter-variant":eS,"data-rue-filter-class-name":ek,"data-rue-filter-disabled":eL?"true":"false"});return n("input",{...su({...eO,name:eO.name,type:eO.type??("form"===eM?"reset":"radio"),checked:ex,defaultChecked:eN,className:eI,disabled:eL,...eE}),ref:ez,onChange:eb=>{ej&&ej(eb)}})},wu=Object.assign(xu,{Item:Su,Reset:Cu}),Tu={"base-100":"bg-base-100 text-base-content","base-200":"bg-base-200 text-base-content","base-300":"bg-base-300 text-base-content",neutral:"bg-neutral text-neutral-content",primary:"bg-primary text-primary-content",secondary:"bg-secondary text-secondary-content",accent:"bg-accent text-accent-content",info:"bg-info text-info-content",success:"bg-success text-success-content",warning:"bg-warning text-warning-content",error:"bg-error text-error-content"},Eu={sm:"min-h-80",md:"min-h-96",lg:"min-h-[30rem]",xl:"min-h-[36rem]",screen:"min-h-screen"},Du={center:"text-center",split:"flex-col gap-10 lg:flex-row","split-reverse":"flex-col gap-10 lg:flex-row-reverse"},Ou={start:"items-start",center:"items-center",end:"items-end"},ku={start:"text-left",center:"text-center",end:"text-right"},Au={sm:"gap-4",md:"gap-6",lg:"gap-10",xl:"gap-14"},ju={"base-content":"bg-base-content",neutral:"bg-neutral",primary:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"},Mu={sm:"text-3xl md:text-4xl",md:"text-4xl md:text-5xl",lg:"text-5xl md:text-6xl",xl:"text-6xl md:text-7xl"},Nu={sm:"text-sm md:text-base",md:"text-base md:text-lg",lg:"text-lg md:text-xl"},Pu=(...eb)=>eb.filter(Boolean).join(" "),Fu=(eb,ey)=>{if(!(!eb&&!ey))return{...eb,...ey}},Iu=eb=>{if(eb)return!0===eb?{}:eb},Lu=eb=>{if(null!=eb){if("number"==typeof eb)return{opacity:eb};switch(eb){case"soft":return{opacity:.25};case"strong":return{opacity:.7};default:return{opacity:.45}}}},Ru=({backgroundImage:eb,backgroundPosition:ey,backgroundSize:ex,backgroundRepeat:eN})=>{if(eb)return{backgroundImage:`url(${eb})`,backgroundPosition:ey??"center",backgroundSize:ex??"cover",backgroundRepeat:eN??"no-repeat"}},zu=(eb,ey,ex)=>{if(eb){if(ex)switch(eb){case"center":return"items-center sm:justify-center";case"end":return"items-end sm:justify-end";default:return"items-start sm:justify-start"}if("column"===ey)switch(eb){case"center":return"items-center";case"end":return"items-end";default:return"items-start"}switch(eb){case"center":return"justify-center";case"end":return"justify-end";default:return"justify-start"}}},Bu=({as:eb="div",className:ey,children:ex,style:eN,tone:ew="default",size:ek,fullHeight:eC,backgroundImage:e$,backgroundPosition:eS,backgroundSize:ej,backgroundRepeat:eA,overlay:ez,...eM})=>{let eL=Ru({backgroundImage:e$,backgroundPosition:eS,backgroundSize:ej,backgroundRepeat:eA}),eT=Iu(ez);return r(eb,{...eM,style:Fu(eN,eL),className:Pu("hero","default"===ew?void 0:Tu[ew],eC?Eu.screen:ek?Eu[ek]:void 0,ey),children:[eT?n(Hu,{...eT}):null,ex]})},Vu=({as:eb="div",className:ey,children:ex,layout:eN="inherit",align:ew,textAlign:ek,gap:eC,...e$})=>n(eb,{...e$,className:Pu("hero-content","inherit"===eN?void 0:Du[eN],ew?Ou[ew]:void 0,ek?ku[ek]:void 0,eC?Au[eC]:void 0,ey),children:ex}),Hu=({as:eb="div",className:ey,children:ex,tone:eN="default",opacity:ew,blur:ek,style:eC,...e$})=>n(eb,{...e$,style:Fu(eC,Lu(ew)),className:Pu("hero-overlay","default"===eN?void 0:ju[eN],ek?"backdrop-blur-sm":void 0,ey),children:ex}),Uu=Object.assign(Bu,{Content:Vu,Overlay:Hu,Title:({as:eb="h1",className:ey,children:ex,size:eN="lg",balanced:ew=!0,...ek})=>n(eb,{...ek,className:Pu("font-bold tracking-tight",Mu[eN],ew?"text-balance":void 0,ey),children:ex}),Description:({as:eb="p",className:ey,children:ex,size:eN="md",muted:ew=!0,...ek})=>n(eb,{...ek,className:Pu("max-w-2xl leading-relaxed",Nu[eN],ew?"opacity-80":void 0,ey),children:ex}),Actions:({as:eb="div",className:ey,children:ex,align:eN,direction:ew="row",stackOnMobile:ek=!1,...eC})=>n(eb,{...eC,className:Pu("flex gap-3",ek?"flex-col sm:flex-row sm:flex-wrap":"column"===ew?"flex-col":"flex-row flex-wrap",zu(eN,ew,ek),ey),children:ex})}),Wu={start:{horizontal:"start"},center:{horizontal:"center"},end:{horizontal:"end"},top:{vertical:"top"},middle:{vertical:"middle"},bottom:{vertical:"bottom"},"top-start":{horizontal:"start",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-end":{horizontal:"end",vertical:"top"},"middle-start":{horizontal:"start",vertical:"middle"},"middle-center":{horizontal:"center",vertical:"middle"},"middle-end":{horizontal:"end",vertical:"middle"},"bottom-start":{horizontal:"start",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"bottom-end":{horizontal:"end",vertical:"bottom"}},Gu=(eb,ey)=>ey?`${eb} ${ey}`:eb,Ku=eb=>"number"==typeof eb?`${Math.abs(eb)}px`:String(eb).trim().replace(/^-/,""),qu=eb=>"number"==typeof eb?eb<0:String(eb).trim().startsWith("-"),Ju=(eb,ey,ex=!1)=>`calc(${eb} ${(ex?!qu(ey):qu(ey))?"-":"+"} ${Ku(ey)})`,Yu=eb=>eb?Wu[eb]:{},Xu=(eb,ey,ex,eN)=>{if(!eb)return;let ew={"--indicator-s":void 0,"--indicator-e":void 0,"--indicator-t":void 0,"--indicator-b":void 0};if(eN){let[eb,ek]=eN;"start"===ey?(ew["--indicator-s"]=Ju("0px",eb),ew["--indicator-e"]="auto"):"center"===ey?(ew["--indicator-s"]=Ju("50%",eb),ew["--indicator-e"]=Ju("50%",eb,!0)):"end"===ey&&(ew["--indicator-s"]="auto",ew["--indicator-e"]=Ju("0px",eb,!0)),"top"===ex?(ew["--indicator-t"]=Ju("0px",ek),ew["--indicator-b"]="auto"):"middle"===ex?(ew["--indicator-t"]=Ju("50%",ek),ew["--indicator-b"]=Ju("50%",ek,!0)):"bottom"===ex&&(ew["--indicator-t"]="auto",ew["--indicator-b"]=Ju("0px",ek,!0))}Object.entries(ew).forEach(([ey,ex])=>{void 0===ex?eb.style.removeProperty(ey):eb.style.setProperty(ey,ex)})},Zu=({as:eb="div",className:ey,style:ex,item:eN,itemProps:ew,items:ek,children:eC,...e$})=>{let eS=Array.isArray(ek)&&ek.length>0?ek.map((eb,ey)=>n(Qu,{...eb,children:eb.children},eb.key??ey)):null==eN?[]:[n(Qu,{...ew,children:eN},"__indicator_item__")];return r(eb,{...e$,className:Gu("indicator",ey),style:ex,children:[eS,eC]})},Qu=({as:eb="span",placement:ey,horizontal:ex,vertical:eN,offset:ew,className:ek,style:eC,children:e$,...eS})=>{let ej=Yu(ey),eA=ex??ej.horizontal,ez=eN??ej.vertical,eM=eS.ref;"ref"in eS&&delete eS.ref;let eL="indicator-item";return eA&&(eL+=` indicator-${eA}`),ez&&(eL+=` indicator-${ez}`),ek&&(eL+=` ${ek}`),n(eb,{...eS,ref:eb=>{"function"==typeof eM?eM(eb):eM&&"object"==typeof eM&&(eM.current=eb??void 0),Xu(eb,eA,ez,ew)},className:eL,style:eC,children:e$})},$u=Object.assign(Zu,{Item:Qu}),ed=(eb,ey)=>ey?`${eb} ${ey}`:eb,td=eb=>null==eb?"":String(eb),nd=eb=>{switch(eb){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return eb}},rd=eb=>{switch(eb){case"warning":return"warning";case"error":return"error";default:return}},id=eb=>{switch(eb){case"none":return"resize-none";case"vertical":return"resize-y";case"horizontal":return"resize-x";case"both":return"resize";default:return""}},ad=({color:eb,status:ey,size:ex,variant:eN,ghost:ew,className:ek,allowClear:eC})=>{let e$="textarea",eS=eb&&"default"!==eb?eb:rd(ey),ej=nd(ex);return eS&&(e$+=` textarea-${eS}`),ej&&(e$+=` textarea-${ej}`),(ew||"ghost"===eN)&&(e$+=" textarea-ghost"),"filled"===eN&&(e$+=" border-transparent bg-base-200/70 focus:bg-base-100"),eC&&(e$+=" pr-10"),ek&&(e$+=` ${ek}`),e$},od=(eb,ey)=>eb&&"object"==typeof eb&&"function"==typeof eb.formatter?eb.formatter(ey):"number"==typeof ey.maxLength?`${ey.count} / ${ey.maxLength}`:String(ey.count),sd=eb=>null==eb?"":"string"==typeof eb?eb:String(eb),cd=()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 7 10 10M17 7 7 17"})}),ld=({color:eb,size:ey,status:ex,variant:eN,resize:ew,ghost:ek,showCount:eC,allowClear:e$,autoSize:eS,rootClassName:ej,countClassName:eA,clearButtonClassName:ez,className:eM,disabled:eL,value:eT,defaultValue:eI,onClear:eO,onInput:eE,onChange:eP,...eR})=>{let eF=(0,e.useRef)(),eD=null,eB=null,eq=eR.ref,eW=void 0!==eT,eH=(0,e.ref)(td(eW?eT:eI)),eV=!!eC,eK=!!e$,eZ="number"==typeof eR.maxLength?eR.maxLength:"number"==typeof eR.maxlength?eR.maxlength:void 0;"ref"in eR&&delete eR.ref;let eY=()=>{eH.value=td(eW?eT:eF.current?.value??eI)},eU=()=>{eD&&eV&&(0,e.render)(sd(od(eC,{count:eH.value.length,maxLength:eZ})),eD)},eQ=()=>{eB&&eB.classList.toggle("hidden",0>=eH.value.length||!!eL)},eG=()=>{eU(),eQ()},eJ=()=>{let eb=eF.current;if(!eb)return;if(!eS){eb.style.height="",eb.style.overflowY="";return}let ey="object"==typeof eS?eS:void 0,ex=window.getComputedStyle(eb),eN=Number.parseFloat(ex.lineHeight),ew=Number.parseFloat(ex.fontSize),ek=Number.isFinite(eN)?eN:Number.isFinite(ew)?1.5*ew:24,eC=Number.parseFloat(ex.borderTopWidth||"0")+Number.parseFloat(ex.borderBottomWidth||"0"),e$=Number.parseFloat(ex.paddingTop||"0")+Number.parseFloat(ex.paddingBottom||"0"),ej="number"==typeof ey?.minRows&&ey.minRows>0?ey.minRows:"number"==typeof eR.rows?eR.rows:void 0,eA="number"==typeof ey?.maxRows&&ey.maxRows>0?Math.max(ey.maxRows,ej??1):void 0;eb.style.height="auto";let ez=eb.scrollHeight;if("number"==typeof ej&&(ez=Math.max(ez,ej*ek+eC+e$)),"number"==typeof eA){let ey=eA*ek+eC+e$;eb.style.overflowY=ez>ey?"auto":"hidden",ez=Math.min(ez,ey)}else eb.style.overflowY="hidden";eb.style.height=`${ez}px`};if((0,e.onMounted)(()=>{eY(),eJ(),eG()}),(0,e.watch)(()=>eT,()=>{eW&&eF.current&&(eF.current.value=td(eT)),eY(),eJ(),eG()},{immediate:!0}),(0,e.watch)(()=>eS,()=>{eJ(),eG()},{immediate:!0}),void 0!==eR.rows&&null!==eR.rows&&(eR.rows=String(eR.rows)),eS&&(void 0===eR.rows||null===eR.rows)){let eb="object"==typeof eS&&"number"==typeof eS.minRows?eS.minRows:void 0;eb&&(eR.rows=String(eb))}let eX={};void 0!==eT&&(eX.value=eT),void 0!==eI&&(eX.defaultValue=eI);let e0=n("textarea",{...eR,...eX,ref:eb=>{(eF.current=eb??void 0,"function"==typeof eq)?eq(eb):eq&&"object"==typeof eq&&(eq.current=eb??void 0)},disabled:eL,"aria-invalid":"error"===ex?"true":eR["aria-invalid"],"data-rue-textarea-input":"true",className:ed(ad({color:eb,status:ex,size:ey,variant:eN,ghost:ek,className:eM,allowClear:eK}),id(ew)),onInput:eb=>{eH.value=eb.target?.value??"",eJ(),eG(),eE&&eE(eb)},onChange:eb=>{eH.value=eb.target?.value??"",eJ(),eG(),eP&&eP(eb)}});if(!eK&&!eV&&!ej)return e0;let e1=r("div",{className:ed("relative",eK?"w-full":void 0),children:[e0,eK&&!eL?n("button",{ref:eb=>{eB=eb,eQ()},type:"button",tabIndex:-1,"aria-label":"Clear text",className:ed(ed("btn btn-ghost btn-xs absolute right-2 top-2 h-7 min-h-0 w-7 rounded-full p-0 text-base-content/55 hover:text-base-content",eH.value.length>0?void 0:"hidden"),ez),onClick:eb=>{let ey=eF.current;!ey||eL||("function"==typeof eb.preventDefault&&eb.preventDefault(),"function"==typeof eb.stopPropagation&&eb.stopPropagation(),ey.value="",eH.value="",eJ(),eG(),ey.focus(),ey.dispatchEvent(new Event("input",{bubbles:!0})),ey.dispatchEvent(new Event("change",{bubbles:!0})),eO&&eO(eb))},children:(e$&&"object"==typeof e$?e$:void 0)?.clearIcon??n(cd,{})}):null]});return r("div",{className:ed("flex flex-col gap-2",ej),"data-rue-textarea-root":"true",children:[e1,eV?n("div",{ref:eb=>{eD=eb,eU()},className:ed("flex justify-end text-xs leading-5 text-base-content/60",eA),"data-rue-textarea-count":"true"}):null]})},ud=(...eb)=>eb.filter(Boolean).join(" "),dd=eb=>null==eb?"":String(eb),fd=eb=>{switch(eb){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return eb}},pd=eb=>{switch(eb){case"warning":return"warning";case"error":return"error";default:return}},md=(eb,ey)=>{switch(ey?"ghost":eb){case"filled":return"border-transparent bg-base-200/70 shadow-none focus-within:bg-base-100";case"borderless":return"input-ghost bg-transparent border-transparent shadow-none";case"ghost":return"input-ghost";default:return}},hd=({color:eb,status:ey,size:ex,variant:eN,ghost:ew,className:ek,shell:eC})=>{let e$="input",eS=eb&&"default"!==eb?eb:pd(ey),ej=fd(ex),eA=md(eN,ew);return eS&&(e$+=` input-${eS}`),ej&&(e$+=` input-${ej}`),eA&&(e$+=` ${eA}`),eC&&(e$+=" flex items-center gap-2"),ek&&(e$+=` ${ek}`),e$},gd=(eb,ey)=>eb&&"object"==typeof eb&&"function"==typeof eb.formatter?eb.formatter(ey):"number"==typeof ey.maxLength?`${ey.count} / ${ey.maxLength}`:String(ey.count),_d=eb=>null==eb?"":"string"==typeof eb?eb:String(eb),vd=eb=>"number"==typeof eb.maxLength?eb.maxLength:"number"==typeof eb.maxlength?eb.maxlength:void 0,yd=({children:eb,className:ey})=>n("span",{className:ud("join-item inline-flex items-center border border-base-300 bg-base-200 px-3 text-sm text-base-content/65",ey),children:eb}),bd=()=>n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 7 10 10M17 7 7 17"})}),xd=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-4","aria-hidden":"true",children:[n("circle",{cx:"11",cy:"11",r:"7"}),n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20 20-3.5-3.5"})]}),Sd=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:[n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"}),n("circle",{cx:"12",cy:"12",r:"3"})]}),Cd=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:[n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3 3 18 18"}),n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.6 5.3A10.2 10.2 0 0 1 12 5.2c6 0 9.5 6 9.5 6a18.2 18.2 0 0 1-3.1 3.9"}),n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.7 6.8C4.1 8.4 2.5 11.2 2.5 11.2s3.5 6 9.5 6c1.8 0 3.4-.5 4.8-1.2"}),n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.9 9.8A3 3 0 0 0 14.2 14"})]}),wd=({color:eb,size:ey,status:ex,variant:eN,ghost:ew,type:ek="text",prefix:eC,suffix:e$,addonBefore:eS,addonAfter:ej,addonBeforeBare:eA,addonAfterBare:ez,showCount:eM,allowClear:eL,rootClassName:eT,inputClassName:eI,countClassName:eO,clearButtonClassName:eE,className:eP,disabled:eR,value:eF,defaultValue:eD,onClear:eB,onInput:eq,onChange:eW,onKeyDown:eH,onPressEnter:eV,...eK})=>{let eZ=(0,e.useRef)(),eY=null,eU=null,eQ=eK.ref,eG=void 0!==eF,eJ=!!eM,eX=!!eL,e0=void 0!==eC||void 0!==e$||eX,e1=void 0!==eS||void 0!==ej,e2=(0,e.ref)(dd(eG?eF:eD));"ref"in eK&&delete eK.ref;let e5=()=>{e2.value=dd(eG?eF:eZ.current?.value??eD)},e3=()=>{eY&&eJ&&(eY.textContent=_d(gd(eM,{value:e2.value,count:e2.value.length,maxLength:vd(eK)})))},e4=()=>{eU&&eU.classList.toggle("hidden",e2.value.length<=0||!!eR)},e6=()=>{e3(),e4()},e7=eb=>{(eZ.current=eb??void 0,"function"==typeof eQ)?eQ(eb):eQ&&"object"==typeof eQ&&(eQ.current=eb??void 0)},e8=eb=>{e2.value=eb.target?.value??"",e6(),eq&&eq(eb)},e9=eb=>{e2.value=eb.target?.value??"",e6(),eW&&eW(eb)},tb=eb=>{eH&&eH(eb),"Enter"===eb.key&&eV&&eV(eb)};(0,e.onMounted)(()=>{eG||void 0===eD||!eZ.current||""===eZ.current.value&&(eZ.current.value=dd(eD)),e5(),e6()}),(0,e.watch)(()=>eF,()=>{eG&&eZ.current&&(eZ.current.value=dd(eF)),e5(),e6()},{immediate:!0});let ty={};void 0!==eF&&(ty.value=eF),void 0!==eD&&(ty.defaultValue=eD);let tx=n("input",{...eK,...ty,ref:e7,type:ek,disabled:eR,"aria-invalid":"error"===ex?"true":eK["aria-invalid"],className:hd({color:eb,status:ex,size:ey,variant:eN,ghost:ew,className:ud(eP,e1?"join-item min-w-0 flex-1":void 0)}),onInput:e8,onChange:e9,onKeyDown:tb}),tN=(e0?r("label",{className:hd({color:eb,status:ex,size:ey,variant:eN,ghost:ew,shell:!0,className:ud(eP,e1?"join-item min-w-0 flex-1":void 0)}),"aria-disabled":eR?"true":void 0,"data-rue-input-shell":"true",children:[void 0===eC?null:n("span",{className:"shrink-0 text-sm text-base-content/60",children:eC}),n("input",{...eK,...ty,ref:e7,type:ek,disabled:eR,"aria-invalid":"error"===ex?"true":eK["aria-invalid"],className:ud("min-w-0 grow border-0 bg-transparent p-0 text-inherit outline-none placeholder:text-base-content/40",eI),onInput:e8,onChange:e9,onKeyDown:tb}),eX&&!eR?n("button",{ref:eb=>{eU=eb,e4()},type:"button",tabIndex:-1,"aria-label":"Clear text",className:ud("btn btn-ghost btn-xs btn-circle h-7 min-h-0 w-7 shrink-0 p-0 text-base-content/55 hover:text-base-content",e2.value.length>0?void 0:"hidden",eE),onClick:eb=>{let ey=eZ.current;!ey||eR||("function"==typeof eb.preventDefault&&eb.preventDefault(),"function"==typeof eb.stopPropagation&&eb.stopPropagation(),ey.value="",e2.value="",e6(),ey.focus(),ey.dispatchEvent(new Event("input",{bubbles:!0})),ey.dispatchEvent(new Event("change",{bubbles:!0})),eB&&eB(eb))},children:(eL&&"object"==typeof eL?eL:void 0)?.clearIcon??n(bd,{})}):null,void 0===e$?null:n("span",{className:"shrink-0 text-sm text-base-content/60",children:e$})]}):null)??tx,tw=e1?r("div",{className:"join w-full items-stretch",children:[void 0===eS?null:eA?eS:n(yd,{children:eS}),tN,void 0===ej?null:ez?ej:n(yd,{children:ej})]}):tN;return eJ||eT?r("div",{className:ud(eJ?"flex flex-col gap-2":void 0,eT),"data-rue-input-root":"true",children:[tw,eJ?n("div",{ref:eb=>{eY=eb,e3()},className:ud("flex justify-end text-xs leading-5 text-base-content/60",eO),"data-rue-input-count":"true",children:_d(gd(eM,{value:e2.value,count:e2.value.length,maxLength:vd(eK)}))}):null]}):tw},Td=Object.assign(wd,{Shell:({as:eb="label",color:ey,status:ex,size:eN,variant:ew,ghost:ek,className:eC,children:e$,...eS})=>n(eb,{...eS,className:hd({color:ey,status:ex,size:eN,variant:ew,ghost:ek,shell:!0,className:eC}),children:e$}),Search:({enterButton:eb,loading:ey,buttonClassName:ex,onSearch:eN,onPressEnter:ew,onClear:ek,suffix:eC,addonAfter:e$,disabled:eS,...ej})=>{let eA=(0,e.useRef)(),ez=!0===eb?"搜索":eb??e$,eM=(eb,ex)=>{eS||ey||eN&&eN(eA.current?.value??"",eb,{source:ex})},eL=n("button",{type:"button","aria-label":"Search",className:ud("btn btn-ghost join-item",ex),onClick:eb=>eM(eb,"input"),disabled:eS||ey,children:ey?n("span",{className:"loading loading-spinner loading-xs","aria-hidden":"true"}):n(xd,{})}),eT=void 0===ez?null:n("button",{type:"button",className:ud("btn btn-primary join-item",ex),onClick:eb=>eM(eb,"input"),disabled:eS||ey,"aria-busy":ey?"true":void 0,children:ey?n("span",{className:"loading loading-spinner loading-sm","aria-hidden":"true"}):ez});return n(wd,{...ej,ref:eA,type:"text",disabled:eS,suffix:eC,addonAfter:void 0===ez?eL:eT,addonAfterBare:!0,onClear:eb=>{ek&&ek(eb),eN&&eN("",eb,{source:"clear"})},onPressEnter:eb=>{ew&&ew(eb),eM(eb,"input")}})},Password:({iconRender:eb,visibilityToggle:ey=!0,suffix:ex,...eN})=>{let ew=(0,e.useRef)(),ek=(0,e.ref)(!1),eC=ey&&"object"==typeof ey?ey:void 0,e$=eC?.visible!==void 0,eS=e$?!!eC?.visible:ek.value,ej=!1!==ey?n("button",{type:"button","aria-label":eS?"Hide password":"Show password",className:"btn btn-ghost btn-xs btn-circle h-7 min-h-0 w-7 shrink-0 p-0",onClick:eb=>{var ey;"function"==typeof eb.preventDefault&&eb.preventDefault(),ey=!eS,ew.current&&(ew.current.type=ey?"text":"password"),e$||(ek.value=ey),eC?.onVisibleChange&&eC.onVisibleChange(ey)},children:eb?eb(eS):n(eS?Cd:Sd,{})}):null,eA=ej?r("span",{className:"inline-flex items-center gap-1",children:[ex,ej]}):ex;return n(wd,{...eN,ref:ew,type:eS?"text":"password",suffix:eA})},TextArea:ld}),Ed={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",small:"sm",middle:"md",medium:"md",large:"lg"},Dd=(...eb)=>eb.filter(Boolean).join(" "),Od=eb=>null!=eb&&!1!==eb,kd=eb=>eb?Ed[eb]:void 0,Ad=eb=>{switch(eb){case"success":case"warning":case"error":return eb;default:return}},jd=eb=>"none"===eb?"label":eb,Md=(eb,ey,ex)=>{switch(ex?"ghost":ey){case"filled":return"bg-base-200/70 border-base-300 shadow-none focus-within:bg-base-100";case"ghost":return`${eb}-ghost`;case"borderless":return`${eb}-ghost bg-transparent border-transparent shadow-none`;default:return}},Nd=({control:eb="input",color:ey,status:ex,size:eN,variant:ew,ghost:ek,disabled:eC,block:e$,className:eS})=>{let ej=jd(eb),eA=kd(eN),ez=ey&&"default"!==ey?ey:Ad(ex),eM="none"===eb?void 0:Md(ej,ew,ek),eL=ej;return"none"!==eb&&ez&&(eL+=` ${ej}-${ez}`),"none"!==eb&&eA&&(eL+=` ${ej}-${eA}`),eM&&(eL+=` ${eM}`),eC&&(eL+=" opacity-60 cursor-not-allowed"),e$&&(eL+=" w-full"),eS&&(eL+=` ${eS}`),eL},Pd=(eb,ey)=>{if(ey||"muted"===eb)return"opacity-60";switch(eb){case"neutral":return"text-neutral";case"primary":return"text-primary";case"secondary":return"text-secondary";case"accent":return"text-accent";case"info":return"text-info";case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return}},Fd=(eb,ey,ex)=>Dd("inline"===eb?"grid gap-2 sm:grid-cols-[var(--label-inline-width, minmax(8rem,12rem))_1fr]":"grid gap-1",ey&&"w-full",ex),Id=eb=>{switch(eb){case"center":return"sm:items-center";case"end":return"sm:items-end";default:return"sm:items-start"}},Ld=(eb,ey)=>{if("inline"===eb&&null!=ey&&""!==ey)return{"--label-inline-width":"number"==typeof ey?`${ey}px`:ey}},Rd=(eb,ey)=>{let ex=Ad(eb);return Dd("text-xs leading-relaxed","success"===ex&&"text-success","warning"===ex&&"text-warning","error"===ex&&"text-error",!ex&&"opacity-70",ey)},zd=()=>n("span",{className:"text-error","aria-hidden":"true",children:"*"}),Bd=({tone:eb,muted:ey,strong:ex,required:eN,className:ew,children:ek,...eC})=>r("span",{...eC,className:Dd("label",Pd(eb,ey),ex&&"font-semibold",ew),children:[ek,eN?n(zd,{}):null]}),Vd=({required:eb,optional:ey,extra:ex,className:eN,textClassName:ew,extraClassName:ek,children:eC,...e$})=>r("div",{...e$,className:Dd("label px-0 pb-1",eN),children:[r("span",{className:Dd("inline-flex items-center gap-1 font-medium",ew),children:[eC,eb?n(zd,{}):null]}),Od(ex)||Od(ey)?n("span",{className:Dd("text-xs opacity-60",ek),children:Od(ex)?ex:ey}):null]}),Hd=({status:eb,className:ey,children:ex,...eN})=>n("div",{...eN,className:Rd(eb,ey),children:ex}),Ud=({label:eb,required:ey,optional:ex,extra:eN,labelClassName:ew,extraClassName:ek})=>Od(eb)||ey||Od(ex)||Od(eN)?n(Vd,{required:ey,optional:ex,extra:eN,textClassName:ew,extraClassName:ek,children:eb}):null,Wd=(eb,ey)=>Od(eb)?n("div",{className:Dd("text-xs leading-relaxed opacity-70",ey),children:eb}):null,Gd=(eb,ey,ex,eN)=>{let ew=Od(ey)?ey:eb;return Od(ew)?n(Hd,{status:Od(ey)?"error":ex,className:eN,children:ew}):null},Kd=({as:eb,control:ey="input",label:ex,description:eN,help:ew,error:ek,extra:eC,optional:e$,required:eS,color:ej,status:eA,size:ez,variant:eM,ghost:eL,disabled:eT,block:eI,layout:eO="stacked",align:eE,labelWidth:eP,prefix:eR,suffix:eF,rootClassName:eD,labelClassName:eB,descriptionClassName:eq,helpClassName:eW,extraClassName:eH,affixClassName:eV,className:eK,children:eZ,...eY})=>{let eU=eA??(Od(ek)?"error":void 0),eQ=Nd({control:ey,color:ej,status:eU,size:ez,variant:eM,ghost:eL,disabled:eT,block:eI,className:eK}),eG=Od(ex)||Od(eN)||Od(ew)||Od(ek)||Od(eC)||Od(e$)||!!eD||"inline"===eO,eJ=Ud({label:ex,required:eS,optional:e$,extra:eC,labelClassName:eB,extraClassName:eH}),eX=Wd(eN,eq),e0=Gd(ew,ek,eU,eW),e1=Fd(eO,eI,eD),e2=Ld(eO,eP),e5=r(eb??"label",{...eY,className:eQ,"aria-required":eS?"true":void 0,"aria-invalid":"error"===eU?"true":void 0,"aria-disabled":eT?"true":void 0,children:[Od(eR)?n("span",{className:Dd("label",eV),children:eR}):null,eZ,Od(eF)?n("span",{className:Dd("label",eV),children:eF}):null]});return eG?"inline"===eO?r("div",{className:Dd(e1,Id(eE)),style:e2,children:[r("div",{children:[eJ,eX]}),r("div",{className:"grid gap-1",children:[e5,e0]})]}):r("div",{className:e1,children:[eJ,eX,e5,e0]}):e5},qd=({tone:eb,muted:ey,strong:ex,required:eN,className:ew,children:ek,...eC})=>r("span",{...eC,className:Dd(Pd(eb,ey),ex&&"font-semibold",ew),children:[ek,eN?n(zd,{}):null]}),Jd=Object.assign(Kd,{Text:Bd,Caption:Vd,Help:Hd,Floating:({caption:eb,text:ey,description:ex,help:eN,error:ew,extra:ek,optional:eC,required:e$,status:eS,disabled:ej,block:eA,layout:ez="stacked",align:eM,labelWidth:eL,rootClassName:eT,captionClassName:eI,textClassName:eO,descriptionClassName:eE,helpClassName:eP,extraClassName:eR,className:eF,children:eD,...eB})=>{let eq=eS??(Od(ew)?"error":void 0),eW=Od(eb)||Od(ex)||Od(eN)||Od(ew)||Od(ek)||Od(eC)||!!eT||"inline"===ez,eH=Ud({label:eb,required:e$,optional:eC,extra:ek,labelClassName:eI,extraClassName:eR}),eV=Wd(ex,eE),eK=Gd(eN,ew,eq,eP),eZ=Fd(ez,eA,eT),eY=Ld(ez,eL),eU=r("label",{...eB,className:Dd("floating-label",ej&&"opacity-60 cursor-not-allowed",eA&&"w-full",eF),"aria-required":e$?"true":void 0,"aria-invalid":"error"===eq?"true":void 0,"aria-disabled":ej?"true":void 0,children:[eD,Od(ey)?n(qd,{required:e$,className:eO,children:ey}):null]});return eW?"inline"===ez?r("div",{className:Dd(eZ,Id(eM)),style:eY,children:[r("div",{children:[eH,eV]}),r("div",{className:"grid gap-1",children:[eU,eK]})]}):r("div",{className:eZ,children:[eH,eV,eU,eK]}):eU},FloatingText:qd}),Yd=["spinner","dots","ring","ball","bars","infinity"],Xd="Loading",Qd=(...eb)=>eb.filter(Boolean).join(" "),$d=(...eb)=>{let ey={};return eb.forEach(eb=>{eb&&Object.assign(ey,eb)}),Object.keys(ey).length>0?ey:void 0},ef=eb=>"string"==typeof eb&&Yd.includes(eb),tf=(eb,ey,ex,eN)=>ey||ex||eN||(ef(eb)?eb:"spinner"),nf=eb=>{if(!ef(eb))return eb},rf=eb=>{switch(eb){case"small":return"sm";case"default":case"medium":case"middle":return"md";case"large":return"lg";default:return eb??"md"}},af=eb=>Number.isFinite(eb)?Math.min(100,Math.max(0,eb)):0,of=(eb,ey)=>eb&&"number"==typeof ey&&ey>0&&Number.isFinite(ey),sf=eb=>Array.isArray(eb)?eb.flatMap(eb=>sf(eb)):null==eb||"boolean"==typeof eb?[]:[eb],cf=(eb,ey,ex)=>{let eN=sf(ex);switch(eb){case"span":return n("span",{...ey,children:eN});case"section":return n("section",{...ey,children:eN});case"article":return n("article",{...ey,children:eN});case"main":return n("main",{...ey,children:eN});case"div":return n("div",{...ey,children:eN});default:return(0,e.h)(eb,ey,...eN)}},lf=(eb,ey,ex)=>Qd("loading",`loading-${eb}`,`loading-${ey}`,ex),uf=(eb,ey,ex)=>n("span",{className:eb,style:ey,"aria-hidden":null==ex?void 0:"true"}),df=({as:eb,style:ey,indicatorStyle:ex,variant:eN,type:ew,size:ek,spinning:eC=!0,delay:e$=0,indicator:eS,description:ej,tip:eA,fullscreen:ez=!1,percent:eM,rootClassName:eL,wrapperClassName:eT,classNames:eI,styles:eO,className:eE,children:eP,...eR})=>{let eF=tf(ey,ex,eN,ew),eD=rf(ek),eB=nf(ey),eq=ej??eA,eW=sf(eP),eH=eW.length>0,eV=null!=eq,eK=void 0!==eM,eZ=null!=eS||null!=Zd,eY=eV||eK||eZ,eU=eH||ez,eQ=(0,e.ref)(eC),eG=(0,e.useRef)(null),eJ=(0,e.useRef)(),eX=()=>{null!=eG.current&&(clearTimeout(eG.current),eG.current=null)},e0=()=>{if(eX(),!eC){eQ.value=!1;return}if(eQ.value=!0,of(eC,e$)){eG.current=setTimeout(()=>{eJ.current&&eJ.current.classList.remove("opacity-0")},e$);return}eJ.current&&eJ.current.classList.remove("opacity-0")};(0,e.onMounted)(()=>{e0()}),(0,e.onUnmounted)(()=>{eX()}),(0,e.watch)(()=>eC,e0,{immediate:!0}),(0,e.watch)(()=>e$,e0);let e1=void 0===eM||"auto"===eM?void 0:af(eM),e2="number"==typeof e1?Math.round(e1):void 0,e5=of(eC,e$)?"opacity-0 transition-opacity duration-200":void 0,e3=lf(eF,eD,Qd(eI?.indicator,eO?.indicator?"inline-flex":void 0)),e4=eZ?"function"==typeof(eS??Zd)?(eS??Zd)({percent:e1,size:eD,style:eF,spinning:eQ.value}):eS??Zd:uf(e3,eO?.indicator,eV||eK),e6=eK?r("div",{className:"flex w-full min-w-24 flex-col items-center gap-1.5","data-rue-loading-percent":"true",children:[n("progress",{className:"progress progress-primary h-1 w-24",max:"100",value:e2}),n("span",{className:"text-[0.68rem] leading-none tabular-nums opacity-70",children:"auto"===eM?Xd:`${e2??0}%`})]}):null,e7=Qd(ez?"pointer-events-auto flex min-w-36 flex-col items-center justify-center gap-3 rounded-box border border-base-300 bg-base-100/95 p-6 text-center text-base-content shadow-2xl":eU?"pointer-events-none absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 rounded-box bg-base-100/70 text-center text-base-content backdrop-blur-[1px]":"inline-flex flex-col items-center justify-center gap-2 text-center align-middle",e5,eI?.section),e8=Qd("text-sm leading-5 opacity-80",eI?.description),e9=Qd("transition duration-200",eQ.value&&"opacity-40 saturate-75",eI?.container),tb=Qd(ez?"fixed inset-0 z-50 grid place-items-center bg-base-100/55 p-6 text-base-content backdrop-blur-sm":eU?"relative block text-base-content":"inline-flex items-center text-base-content",eQ.value&&"rue-loading-spinning",eL,eT,eI?.root,eE),ty=$d("string"==typeof eB?void 0:eB,eO?.root),tx="string"==typeof eB?eB:ty,tN=eQ.value?cf(ez||eU?"div":"span",{ref:eJ,className:e7,style:eO?.section,"data-rue-loading-section":"true"},r(e.Fragment,{children:[eZ?n("span",{className:Qd("inline-flex items-center justify-center",eI?.indicator),style:eO?.indicator,children:e4}):e4,eV?n("div",{className:e8,style:eO?.description,children:eq}):null,e6]})):null;if(ez)return eQ.value?n("div",{...eR,className:tb,style:tx,role:eR.role??"status","aria-live":eR["aria-live"]??"polite","aria-busy":"true",children:tN}):null;if(eH)return cf(eb??"div",{...eR,className:tb,style:tx,role:eR.role??"status","aria-live":eR["aria-live"]??"polite","aria-busy":eQ.value?"true":"false"},r(e.Fragment,{children:[tN,n("div",{className:e9,style:eO?.container,"data-rue-loading-container":"true",children:eW})]}));if(!eQ.value)return null;if(!eY){let ey=eb??"span",ex="string"==typeof tx?tx:$d(tx,eO?.indicator);return cf(ey,{...eR,ref:eJ,className:Qd(e3,e5,eL,eI?.root,eE),style:ex,role:eR.role??"status","aria-live":eR["aria-live"]??"polite","aria-busy":"true"})}return cf(eb??"span",{...eR,className:tb,style:tx,role:eR.role??"status","aria-live":eR["aria-live"]??"polite","aria-busy":"true"},tN)};df.setDefaultIndicator=eb=>{Zd=eb};var ff=(eb,ey)=>ey?`${eb} ${ey}`:eb,pf=eb=>Array.isArray(eb)?eb.some(eb=>pf(eb)):null!=eb&&!1!==eb,mf=eb=>{if(eb)return"start"===eb?"1":"end"===eb?"2":eb},hf=eb=>{switch(eb){case"xs":return"size-12";case"sm":case"small":return"size-16";case"md":case"middle":case"medium":return"size-24";case"lg":case"large":return"size-32";case"xl":return"size-40";case"2xl":return"size-52";case"3xl":return"size-64";default:return}},gf=eb=>{switch(eb){case"top":return"object-top";case"bottom":return"object-bottom";case"left":return"object-left";case"right":return"object-right";case"top-left":return"object-left-top";case"top-right":return"object-right-top";case"bottom-left":return"object-left-bottom";case"bottom-right":return"object-right-bottom";default:return eb?"object-center":void 0}},_f=eb=>{switch(eb){case"contain":return"object-contain";case"fill":return"object-fill";case"none":return"object-none";case"scale-down":return"object-scale-down";default:return eb?"object-cover":void 0}},vf=eb=>{switch(eb){case"neutral":return"bg-neutral text-neutral-content";case"primary":return"bg-primary text-primary-content";case"secondary":return"bg-secondary text-secondary-content";case"accent":return"bg-accent text-accent-content";case"info":return"bg-info text-info-content";case"success":return"bg-success text-success-content";case"warning":return"bg-warning text-warning-content";case"error":return"bg-error text-error-content";case"base":return"bg-base-200 text-base-content";default:return}},yf=eb=>{switch(eb){case"neutral":return"ring-neutral/35";case"primary":return"ring-primary/35";case"secondary":return"ring-secondary/35";case"accent":return"ring-accent/35";case"info":return"ring-info/35";case"success":return"ring-success/35";case"warning":return"ring-warning/35";case"error":return"ring-error/35";default:return"ring-base-300"}},bf=({shape:eb,half:ey,size:ex,fit:eN,position:ew,tone:ek,bordered:eC,ring:e$,shadow:eS,interactive:ej})=>{let eA=`mask mask-${eb??"squircle"}`,ez=mf(ey),eM=hf(ex),eL=_f(eN),eT=gf(ew),eI=vf(ek);return ez&&(eA+=` mask-half-${ez}`),eM&&(eA+=` ${eM}`),eL&&(eA+=` ${eL}`),eT&&(eA+=` ${eT}`),eI&&(eA+=` ${eI}`),eC&&(eA+=" ring-1 ring-inset ring-base-300/80"),e$&&(eA+=` ring-2 ring-offset-2 ring-offset-base-100 ${yf(ek)}`),eS&&(eA+=" shadow-xl shadow-base-content/10"),ej&&(eA+=" transition duration-200 ease-out hover:-translate-y-1 hover:shadow-2xl"),eA},xf=({as:eb="img",shape:ey="squircle",half:ex,size:eN,fit:ew="cover",position:ek,tone:eC,bordered:e$,ring:eS,shadow:ej,interactive:eA,src:ez,alt:eM,imageProps:eL,wrapperClassName:eT,imageClassName:eI,content:eO,contentClassName:eE,caption:eP,captionClassName:eR,className:eF,children:eD,...eB})=>{let eq=bf({shape:ey,half:ex,size:eN,fit:ew,position:ek,tone:eC,bordered:e$,ring:eS,shadow:ej,interactive:eA}),eW=eO??eD;if(ez&&(pf(eW)||null!=eP||null!=eT||null!=eI||null!=eE||null!=eR||"figure"===eb)){let ey="img"===eb?"figure":eb;return r(ey,{...eB,className:ff("relative inline-flex flex-col items-center gap-3",eT),children:[r("div",{className:"relative inline-flex",children:[n("img",{...eL,src:ez,alt:eM,className:ff(ff(eq,eF),eI)}),pf(eW)?n("div",{className:ff("absolute inset-0 grid place-items-center p-4 text-center",eE),children:eW}):null]}),null==eP?null:n("figure"===ey?"figcaption":"div",{className:ff("text-center text-sm opacity-70",eR),children:eP})]})}return n(eb,{...eB,src:ez,alt:eM,className:ff(eq,eF),children:eD})},Sf=(...eb)=>eb.filter(Boolean).join(" "),Cf=(eb="default")=>{switch(eb){case"success":return"border-success/30 bg-success/10 text-success";case"warning":return"border-warning/30 bg-warning/10 text-warning";case"error":return"border-error/30 bg-error/10 text-error";default:return"border-base-300 bg-base-200/60"}},wf=(eb="none")=>{switch(eb){case"sm":return"p-3";case"md":return"p-4";case"lg":return"p-6";default:return""}},Tf=({href:eb,prefix:ey,suffix:ex,interactive:eN,status:ew="default",className:ek,children:eC,...e$})=>{let eS=Sf("input input-sm flex h-8 w-full min-w-0 items-center gap-2 text-sm",Cf(ew),ek),ej=r(e.Fragment,{children:[null==ey?null:n("span",{className:"shrink-0 opacity-55",children:ey}),n("span",{className:"min-w-0 flex-1 truncate",children:eC??eb}),null==ex?null:n("span",{className:"shrink-0 opacity-55",children:ex})]});return(eN||eb)&&"string"==typeof eb?n("a",{...e$,href:eb,className:eS,children:ej}):n("div",{...e$,className:eS,children:ej})},Ef=({bordered:eb=!0,background:ey,padding:ex="none",className:eN,children:ew,...ek})=>n("div",{...ek,className:Sf(eb&&"border-t border-base-300",ey&&"bg-base-100",wf(ex),eN),children:ew}),Df=({start:eb,end:ey,className:ex,children:eN,...ew})=>r("div",{...ew,className:Sf("mockup-browser-toolbar gap-3",ex),children:[null==eb?null:n("div",{className:"flex shrink-0 items-center gap-2",children:eb}),null==eN?null:n("div",{className:"flex min-w-0 flex-1 items-center",children:eN}),null==ey?null:n("div",{className:"flex shrink-0 items-center gap-2",children:ey})]}),Of=Object.assign(({bordered:eb,background:ey,showToolbar:ex,url:eN,toolbar:ew,toolbarStart:ek,toolbarEnd:eC,toolbarClassName:e$,contentClassName:eS,contentBordered:ej,contentBackground:eA,contentPadding:ez,className:eM,children:eL,...eT})=>{let eI=ew??(null==eN?null:n(Tf,{href:"string"==typeof eN?eN:void 0,children:eN})),eO=!1!==ex&&(null!=ew||null!=eN||null!=ek||null!=eC||null!=e$),eE=eO||null!=eS||null!=ej||null!=eA||null!=ez;return r("div",{...eT,className:Sf("mockup-browser",eb&&"border border-base-300",ey&&"bg-base-100",eM),children:[eO?n(Df,{className:e$,start:ek,end:eC,children:eI}):null,eE?n(Ef,{className:eS,bordered:ej,background:eA,padding:ez,children:eL}):eL]})},{Toolbar:Df,AddressBar:Tf,Content:Ef}),kf=(...eb)=>eb.filter(Boolean).join(" "),Af=(eb,ey)=>ey?`${eb} ${ey}`:eb,jf=eb=>Array.isArray(eb)?eb.some(eb=>jf(eb)):null!=eb&&!1!==eb,Mf=(eb,ey)=>{if(!(!eb&&!ey)){if(ey)switch(eb){case"neutral":return"bg-neutral text-neutral-content";case"primary":return"bg-primary text-primary-content";case"secondary":return"bg-secondary text-secondary-content";case"accent":return"bg-accent text-accent-content";case"info":return"bg-info text-info-content";case"success":return"bg-success text-success-content";case"warning":return"bg-warning text-warning-content";case"error":return"bg-error text-error-content";default:return"bg-base-200"}switch(eb){case"neutral":return"text-neutral";case"primary":return"text-primary";case"secondary":return"text-secondary";case"accent":return"text-accent";case"info":return"text-info";case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return}}},Nf=({as:eb="pre",prefix:ey,lineNumber:ex,code:eN,children:ew,className:ek,codeClassName:eC,highlight:e$,tone:eS,...ej})=>{let eA=jf(ey)?ey:ex;return n(eb,{...ej,"data-prefix":null==eA?void 0:String(eA),className:kf(Mf(eS,e$),ek),children:jf(ew)?ew:jf(eN)?n("code",{className:eC,children:eN}):null})},Pf=Object.assign(({as:eb="div",className:ey,children:ex,items:eN,prefix:ew,lineNumbers:ek,start:eC=1,codeClassName:e$,...eS})=>{let ej=eN?.map((eb,ey)=>{let ex=jf(eb.prefix)?eb.prefix:ew;return n(Nf,{...eb,prefix:ex,lineNumber:ek?eC+ey:void 0,codeClassName:eb.codeClassName??e$},eb.key??ey)});return r(eb,{...eS,className:Af("mockup-code",ey),children:[ej,ex]})},{Line:Nf}),Ff=(eb,ey)=>ey?`${eb} ${ey}`:eb,If=eb=>{switch(eb){case"xs":return"w-52";case"sm":case"small":return"w-60";case"md":case"medium":case"middle":return"w-72";case"lg":case"large":return"w-80";case"xl":return"w-96";default:return}},Lf=eb=>{if(!(!eb||"default"===eb))return`border-${eb}`},Rf=({className:eb,children:ey,...ex})=>n("div",{...ex,className:Ff("mockup-phone-camera",eb),children:ey}),zf=({className:eb,children:ey,...ex})=>n("div",{...ex,className:Ff("mockup-phone-display",eb),children:ey}),Bf=eb=>{let{src:ey,alt:ex="mockup phone wallpaper",imgClassName:eN,children:ew,contentClassName:ek}=eb;return r(e.Fragment,{children:[ey?n("img",{alt:ex,src:ey,className:eN}):null,null==ew?null:ek?n("div",{className:ek,children:ew}):ew]})},Vf=Object.assign(({className:eb,size:ey,color:ex,camera:eN,display:ew,children:ek,...eC})=>{let e$="mockup-phone",eS=If(ey),ej=Lf(ex);if(eS&&(e$+=` ${eS}`),ej&&(e$+=` ${ej}`),eb&&(e$+=` ${eb}`),!ew)return n("div",{...eC,className:e$,children:ek});let eA=!1!==eN;return r("div",{...eC,className:e$,children:[eA?n(Rf,{..."object"==typeof eN?eN:void 0}):null,n(zf,{className:ew.className,children:Bf(ew)})]})},{Camera:Rf,Display:zf}),Hf=(eb,ey)=>eb&&ey?`${eb} ${ey}`:eb??ey??"",Uf=eb=>{switch(eb){case"none":return"";case"sm":return"p-3";case"lg":return"p-6";default:return"p-4"}},Wf=eb=>Array.isArray(eb)?eb.length>0:null!=eb,Gf=({title:eb,description:ey,extra:ex,className:eN,style:ew,children:ek,...eC})=>{let e$=Wf(ek);return n("div",{...eC,className:Hf("rue-mockup-window-header flex items-start justify-between gap-3 border-b border-base-300/80 px-4 py-3",eN),style:ew,children:e$?ek:r(e.Fragment,{children:[r("div",{className:"min-w-0 flex-1",children:[null==eb?null:n("div",{className:"truncate text-sm font-semibold",children:eb}),null==ey?null:n("div",{className:"mt-1 text-xs opacity-70",children:ey})]}),null==ex?null:n("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:ex})]})})},Kf=({padding:eb="none",className:ey,style:ex,children:eN,...ew})=>{let ek=Uf(eb);return n("div",{...ew,className:Hf(Hf("rue-mockup-window-body",ek),ey),style:ex,children:eN})},qf=({className:eb,style:ey,children:ex,...eN})=>n("div",{...eN,className:Hf("rue-mockup-window-toolbar flex flex-wrap items-center gap-2",eb),style:ey,children:ex}),Jf=({className:eb,style:ey,children:ex,...eN})=>n("div",{...eN,className:Hf("rue-mockup-window-actions flex flex-wrap items-center justify-end gap-2 border-t border-base-300/80 px-4 py-3",eb),style:ey,children:ex}),Yf=Object.assign(({bordered:eb,background:ey,title:ex,description:eN,toolbar:ew,actions:ek,padding:eC,bodyClassName:e$,headerClassName:eS,actionsClassName:ej,className:eA,style:ez,children:eM,...eL})=>{let eT=null!=ex||null!=eN||null!=ew,eI=null!=ek,eO=eT||eI||null!=eC||null!=e$||null!=eS||null!=ej,eE="mockup-window";return eb&&(eE+=" border border-base-300"),ey&&(eE+=" bg-base-100"),eA&&(eE+=` ${eA}`),eO?r("div",{...eL,className:eE,style:ez,children:[eT?n(Gf,{title:ex,description:eN,extra:ew,className:eS}):null,n(Kf,{padding:eC??"md",className:e$,children:eM}),eI?n(Jf,{className:ej,children:ek}):null]}):n("div",{...eL,className:eE,style:ez,children:eM})},{Header:Gf,Body:Kf,Toolbar:qf,Actions:Jf}),Xf=(...eb)=>eb.filter(Boolean).join(" "),Zf=eb=>null!=eb&&(!Array.isArray(eb)||eb.some(eb=>Zf(eb))),Qf=(eb,ey)=>"between"===eb?"justify-between":"center"===eb?"justify-center":"end"===eb?"justify-end":"start"===eb?"justify-start":"center"===ey?"justify-center":"end"===ey?"justify-end":void 0,$f=(eb,ey,ex,eN,ew)=>Xf(`navbar-${eb}`,Qf(ey,eb),ex&&"flex-1",eN&&"flex-wrap",ew),ep=({as:eb="div",className:ey,children:ex,align:eN,grow:ew,wrap:ek,placement:eC="start",...e$})=>n(eb,{...e$,className:$f(eC,eN,ew,ek,ey),children:ex}),tp=({as:eb="div",className:ey,children:ex,content:eN,grow:ew,...ek})=>n(eb,{...ek,className:Xf("inline-flex min-w-0 items-center",ew&&"flex-1",ey),children:eN??ex}),np=eb=>n(ep,{...eb,placement:"start"}),rp=eb=>n(ep,{...eb,placement:"center"}),ip=eb=>n(ep,{...eb,placement:"end"}),ap=(eb,ey)=>Zf(eb)?n(tp,{children:eb},ey):null,op=(eb,ey)=>(eb??[]).filter(eb=>(eb.placement??"start")===ey).map((eb,ex)=>{let{key:eN,placement:ew,content:ek,children:eC,...e$}=eb;return n(tp,{...e$,content:ek??eC},eN??`${ey}-${ex}`)}),sp=Object.assign(({as:eb="div",className:ey,children:ex,brand:eN,start:ew,center:ek,end:eC,actions:e$,items:eS,startProps:ej,centerProps:eA,endProps:ez,wrap:eM,sticky:eL,bordered:eT,...eI})=>{let eO=Zf(ex),eE=[ap(eN,"brand"),ap(ew,"start"),...op(eS,"start")],eP=[ap(ek,"center"),...op(eS,"center")],eR=[...op(eS,"end"),ap(eC,"end"),ap(e$,"actions")],eF=eE.some(Boolean)||eP.some(Boolean)||eR.some(Boolean);return n(eb,{...eI,className:Xf("navbar",eM&&"flex-wrap gap-y-2",eL&&"sticky top-0 z-30",eT&&"border-b border-base-300",ey),children:eO?ex:r(e.Fragment,{children:[eF&&eE.some(Boolean)?n(np,{...ej,children:eE}):null,eF&&eP.some(Boolean)?n(rp,{...eA,children:eP}):null,eF&&eR.some(Boolean)?n(ip,{...ez,children:eR}):null]})})},{Start:np,Center:rp,End:ip,Section:ep,Item:tp}),cp=(eb,ey)=>ey?`${eb} ${ey}`:eb,lp=(...eb)=>eb.filter(Boolean).join(" "),up=(eb,ey,ex)=>Math.min(Math.max(eb,ey),ex),dp=(eb,ey)=>{let ex=Number(eb);return!Number.isFinite(ex)||ex<=0?ey:Math.floor(ex)},fp=eb=>{switch(eb){case"small":return"sm";case"middle":return"md";case"large":return"lg";default:return eb}},pp=eb=>{switch(eb){case"center":return"justify-center";case"end":return"justify-end";default:return"justify-start"}},mp=eb=>{let ey="join";return eb&&(ey+=` join-${eb}`),ey},hp=(eb,ey,ex,eN)=>{let ew=fp(eb),ek="join-item btn";return ew&&(ek+=` btn-${ew}`),ey&&(ek+=" btn-active"),ex&&(ek+=" btn-disabled"),eN&&(ek+=` ${eN}`),ek},gp=(eb,ey)=>{let ex=fp(eb),eN="select select-bordered";return ex&&(eN+=` select-${ex}`),ey&&(eN+=` ${ey}`),eN},_p=(eb,ey)=>{let ex=fp(eb),eN="input input-bordered";return ex&&(eN+=` input-${ex}`),ey&&(eN+=` ${ey}`),eN},vp=(eb,ey)=>lp(_p(eb),"appearance-none [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",ey),yp=(eb,ey)=>{let ex=String(Math.max(1,eb)).length;return"simple"===ey?ex<=2?"w-10":3===ex?"w-12":"w-14":ex<=2?"w-14":3===ex?"w-16":"w-20"},bp=eb=>{let ey=eb.reduce((eb,ey)=>Math.max(eb,String(ey).length),2);return ey<=2?"w-16":3===ey?"w-18":"w-20"},xp=eb=>void 0!==eb.current||void 0!==eb.defaultCurrent||void 0!==eb.total||void 0!==eb.pageSize||void 0!==eb.defaultPageSize||void 0!==eb.simple||void 0!==eb.showSizeChanger||void 0!==eb.showQuickJumper||void 0!==eb.showLessItems||void 0!==eb.hideOnSinglePage||void 0!==eb.showTotal||void 0!==eb.itemRender||void 0!==eb.align||void 0!==eb.size||void 0!==eb.disabled||void 0!==eb.onChange||void 0!==eb.onShowSizeChange||void 0!==eb.pageSizeOptions||void 0!==eb.locale,Sp=(eb,ey,ex)=>ex<=0?[0,0]:[(eb-1)*ey+1,Math.min(ex,eb*ey)],Cp=(eb,ey,ex)=>{if(ey<=0)return[];let eN=[],ew=ex?1:2,ek=ex?3:5;if(ey<=5+2*ew){for(let eb=1;eb<=ey;eb+=1)eN.push({type:"page",page:eb,label:String(eb)});return eN}let eC=Math.max(1,eb-ew),e$=Math.min(ey,eb+ew);if(eN.push({type:"page",page:1,label:"1"}),eC>2)eN.push({type:"jump-prev",page:Math.max(1,eb-ek),label:"•••"});else for(let eb=2;eb<eC;eb+=1)eN.push({type:"page",page:eb,label:String(eb)});for(let eb=Math.max(2,eC);eb<=Math.min(ey-1,e$);eb+=1)eN.push({type:"page",page:eb,label:String(eb)});if(e$<ey-1)eN.push({type:"jump-next",page:Math.min(ey,eb+ek),label:"•••"});else for(let eb=e$+1;eb<ey;eb+=1)eN.push({type:"page",page:eb,label:String(eb)});return eN.push({type:"page",page:ey,label:String(ey)}),eN},wp=Object.assign(({direction:eb,align:ey,size:ex,className:eN,children:ew,current:ek,defaultCurrent:eC,total:e$,pageSize:eS,defaultPageSize:ej,disabled:eA,simple:ez,showSizeChanger:eM,pageSizeOptions:eL,showQuickJumper:eT,showLessItems:eI,hideOnSinglePage:eO,showTitle:eE=!0,showTotal:eP,itemRender:eR,onChange:eF,onShowSizeChange:eD,locale:eB,...eq})=>{if(!xp({direction:eb,align:ey,size:ex,className:eN,children:ew,current:ek,defaultCurrent:eC,total:e$,pageSize:eS,defaultPageSize:ej,disabled:eA,simple:ez,showSizeChanger:eM,pageSizeOptions:eL,showQuickJumper:eT,showLessItems:eI,hideOnSinglePage:eO,showTotal:eP,itemRender:eR,onChange:eF,onShowSizeChange:eD,locale:eB}))return n("div",{...eq,className:cp(mp(eb),eN),children:ew});let eW=(0,e.ref)(dp(eC??ek??1,1)),eH=(0,e.ref)(dp(ej??eS??10,10)),eV=dp(eS??eH.value,10),eK=Math.max(0,Number(e$)||0),eZ=Math.max(1,Math.ceil(eK/eV)),eY=up(dp(ek??eW.value,1),1,eZ),eU=Sp(eY,eV,eK),eQ=eL&&eL.length>0?eL.map(eb=>dp(eb,eV)):[10,20,50,100],eG="object"==typeof ez?ez:ez?{}:void 0,eJ="object"==typeof eT&&eT?eT:eT?{}:void 0,eX=Cp(eY,eZ,eI),e0=(0,e.useRef)();if(e0.current){if(e0.current.page!==eY){let eb=String(eY);e0.current.page=eY,e0.current.simple=eb,e0.current.quick=eb}}else{let eb=String(eY);e0.current={page:eY,simple:eb,quick:eb}}let e1=e0.current,e2={prev:eB?.prev??"‹",next:eB?.next??"›",jumpPrev:eB?.jumpPrev??"•••",jumpNext:eB?.jumpNext??"•••",pageSuffix:eB?.pageSuffix??"/ page",itemsPerPage:eB?.itemsPerPage??"items / page",pageTitle:eB?.pageTitle??(eb=>`Page ${eb}`),jumpTo:eB?.jumpTo??"Go to",previousPage:eB?.previousPage??"Previous Page",nextPage:eB?.nextPage??"Next Page",jumpPrevTitle:eB?.jumpPrevTitle??"Jump Previous Pages",jumpNextTitle:eB?.jumpNextTitle??"Jump Next Pages"};if(eO&&eZ<=1)return null;let e5=(eb,ey=eV)=>{let ex=Math.max(1,Math.ceil(eK/ey)),eN=up(dp(eb,1),1,ex);void 0===ek&&(eW.value=eN),void 0===eS&&ey!==eV&&(eH.value=ey),eF&&eF(eN,ey)},e3=(eb,ey,eN,ew)=>{let ek=!!eA||!!ew?.disabled,eC=eR?eR(eb,ey,eN):eN;return n(wp.Item,{size:ex,active:ew?.active,disabled:ek,"aria-label":"page"===ey?e2.pageTitle(eb):void 0,title:eE?ew?.title??("page"===ey?e2.pageTitle(eb):void 0):void 0,onClick:()=>{ek||ew?.active||e5(eb)},children:eC})},e4=eG?r("div",{className:mp(),children:[e3(Math.max(1,eY-1),"prev",e2.prev,{disabled:eY<=1,title:e2.previousPage}),r("div",{className:_p(ex,"join-item inline-flex shrink-0 items-center gap-1 px-2 text-sm"),children:[eG.readOnly?n("span",{className:"tabular-nums",children:eY}):n("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",min:"1",max:String(eZ),value:e1.simple,disabled:eA,className:lp("border-0 bg-transparent p-0 text-right outline-none appearance-none [appearance:textfield] tabular-nums [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",yp(eZ,"simple")),onInput:eb=>{e1.simple=eb.currentTarget.value},onKeyDown:eb=>{"Enter"!==eb.key||e5(Number(eb.currentTarget.value))},onBlur:eb=>{if(eA)return;let ey=eb.currentTarget;if(""===ey.value){ey.value=String(eY),e1.simple=ey.value;return}e5(Number(ey.value))}},`simple-${eY}-${eZ}`),n("span",{className:"inline-flex items-center opacity-60",children:"/ page"===e2.pageSuffix?`/ ${eZ}`:`${e2.pageSuffix} ${eZ}`})]}),e3(Math.min(eZ,eY+1),"next",e2.next,{disabled:eY>=eZ,title:e2.nextPage})]}):r("div",{className:mp(eb),children:[e3(Math.max(1,eY-1),"prev",e2.prev,{disabled:eY<=1,title:e2.previousPage}),eX.map(eb=>{let ey="jump-prev"===eb.type?e2.jumpPrev:"jump-next"===eb.type?e2.jumpNext:eb.label;return e3(eb.page,eb.type,ey,{active:"page"===eb.type&&eb.page===eY,disabled:"page"!==eb.type&&!!eA,title:"page"===eb.type?e2.pageTitle(eb.page):"jump-prev"===eb.type?e2.jumpPrevTitle:e2.jumpNextTitle})}),e3(Math.min(eZ,eY+1),"next",e2.next,{disabled:eY>=eZ,title:e2.nextPage})]});return r("div",{...eq,className:lp("flex flex-wrap items-center gap-3",pp(ey),eN),children:[eP?n("div",{className:"text-sm opacity-70","aria-live":"polite",children:eP(eK,eU)}):null,e4,eM?r("label",{className:"flex items-center gap-2 text-sm opacity-80",children:[n("select",{value:String(eV),disabled:eA,className:gp(ex,`${bp(eQ)} text-center tabular-nums`),onChange:eb=>{let ey,ex;return ex=up(eY,1,Math.max(1,Math.ceil(eK/(ey=dp(Number(eb.currentTarget.value),eV))))),void(void 0===eS&&(eH.value=ey),void 0===ek&&(eW.value=ex),eD&&eD(ex,ey),eF&&eF(ex,ey))},children:eQ.map(eb=>n("option",{value:String(eb),children:eb},eb))}),n("span",{children:e2.itemsPerPage})]}):null,eJ?r("div",{className:"flex items-center gap-2 text-sm",children:[n("span",{className:"opacity-70",children:e2.jumpTo}),n("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",min:"1",max:String(eZ),value:e1.quick,disabled:eA,className:vp(ex,`${yp(eZ,"quick")} text-center tabular-nums`),onInput:eb=>{e1.quick=eb.currentTarget.value},onKeyDown:eb=>{"Enter"!==eb.key||e5(Number(eb.currentTarget.value))}},`quick-${eY}-${eZ}`),null==eJ.goButton?null:n("button",{type:"button",disabled:eA,className:lp("btn",fp(ex)?`btn-${fp(ex)}`:void 0),onClick:eb=>{let ey=eb.currentTarget.parentElement?.querySelector("input");ey&&e5(Number(ey.value))},children:eJ.goButton})]}):null]})},{Item:({tag:eb="button",active:ey,disabled:ex,size:eN,className:ew,children:ek,...eC})=>{let e$={...eC,className:hp(eN,ey,ex,ew)};return ey&&(e$["aria-current"]=eC["aria-current"]??"page"),ex&&(e$["aria-disabled"]=eC["aria-disabled"]??!0,"button"===eb||"input"===eb?e$.disabled=eC.disabled??!0:(e$.role=eC.role??"button",e$.tabIndex=eC.tabIndex??-1)),n(eb,{...e$,children:ek})}}),Tp={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",small:"sm",medium:"md",middle:"md",large:"lg"},Ep={label:"label",value:"value",options:"options",disabled:"disabled",title:"title",className:"className",groupLabel:"label"},Dp=(eb,ey)=>ey?`${eb} ${ey}`:eb,Op=eb=>"string"==typeof eb&&eb in Tp,kp=(eb,ey)=>ey&&Op(ey)?Tp[ey]:Op(eb)?Tp[eb]:void 0,Ap=(eb,ey)=>null!=ey?String(ey):"number"==typeof eb?String(eb):"string"!=typeof eb||""===eb||Op(eb)?void 0:eb,jp=(eb,ey)=>{switch(ey?"ghost":eb){case"filled":return"bg-base-200 border-base-300 shadow-none";case"borderless":return"select-ghost bg-transparent border-transparent shadow-none";case"ghost":return"select-ghost";default:return}},Mp=(eb,ey)=>{switch(ey?"ghost":eb){case"filled":return"bg-base-200 border-base-300 shadow-none";case"borderless":return"bg-transparent border-transparent shadow-none px-0";case"ghost":return"input-ghost";default:return}},Np=(eb,ey,ex,eN,ew,ek,eC)=>{let e$="select",eS=ey??eb,ej=kp(eN,ew),eA=jp(ex,ek);return eS&&(e$+=` select-${eS}`),ej&&(e$+=` select-${ej}`),eA&&(e$+=` ${eA}`),eC&&(e$+=` ${eC}`),e$},Pp=(eb,ey,ex,eN,ew,ek,eC)=>{let e$="input",eS=ey??eb,ej=kp(eN,ew),eA=Mp(ex,ek);return eS&&(e$+=` input-${eS}`),ej&&(e$+=` input-${ej}`),eA&&(e$+=` ${eA}`),e$+=" flex items-center gap-2",eC&&(e$+=` ${eC}`),e$},Fp=(eb,ey,ex)=>eb[ex?.[ey]??Ep[ey]],Ip=(eb,ey,ex="option",eN)=>eb.flatMap((eb,ew)=>{let ek=`${ex}-${ew}`,eC=Fp(eb,"options",ey),e$=eN??Fp(eb,"groupLabel",ey);return Array.isArray(eC)?Ip(eC,ey,ek,Fp(eb,"groupLabel",ey)??Fp(eb,"label",ey)):[{key:ek,value:Fp(eb,"value",ey),label:Fp(eb,"label",ey)??eb.children,disabled:Fp(eb,"disabled",ey),title:Fp(eb,"title",ey),className:Fp(eb,"className",ey),groupLabel:e$,raw:eb}]}),Lp=(eb,ey)=>{let ex={};return Array.isArray(eb)&&Ip(eb,ey).forEach(eb=>{void 0===eb.value||null===eb.value||(ex[String(eb.value)]=eb)}),ex},Rp=(eb,ey,ex="option")=>eb.map((eb,eN)=>{let ew=`${ex}-${eN}`,ek=Fp(eb,"options",ey),eC=Fp(eb,"className",ey),e$=Fp(eb,"title",ey),eS=Fp(eb,"disabled",ey);if(Array.isArray(ek))return n("optgroup",{label:String(Fp(eb,"groupLabel",ey)??Fp(eb,"label",ey)??""),className:eC,title:e$,children:Rp(ek,ey,ew)},ew);let ej=Fp(eb,"label",ey)??eb.children,eA=Fp(eb,"value",ey);return n("option",{value:eA,disabled:eS,title:e$,className:eC,children:ej??eA},null==eA?ew:String(eA))}),zp=eb=>{if(!eb)return!1;let ey=Number(eb);return Number.isFinite(ey)&&ey>1},Bp=null,Vp=null,Hp=160,Up=()=>{Vp&&(clearTimeout(Vp),Vp=null),Bp=null},Wp=eb=>{if(!eb||typeof document>"u")return null;let ey=[],ex=eb;for(;ex&&ex!==document.body;){let eb=ex.parentElement;if(!eb)return null;ey.push(Array.from(eb.children).indexOf(ex)),ex=eb}return ex===document.body?ey.reverse().join("."):null},Gp=(eb,ey,ex,eN,ew,ek)=>{let eC=eb.id??eb.name??eb["data-testid"]??eb["aria-label"]??eb.title;if(null!=eC&&""!==eC)return`prop:${String(eC)}`;if(!Array.isArray(ey)||!ey.length)return null;let e$=Ip(ey,ex).map(eb=>`${String(eb.groupLabel??"")}>${String(eb.value??eb.label??"")}`).join("|");return`options:${null==eN?"":String(eN)}:${[ew,ek].filter(Boolean).join("|")}:${e$}`},Kp=eb=>{eb&&(Up(),Bp=eb,Vp=setTimeout(()=>{Bp===eb&&(Bp=null),Vp=null},Hp))},qp=eb=>{if(!eb||!Bp)return!1;let ey=Bp===eb;return ey&&Up(),ey},Jp=(eb,ey,ex)=>{if(ex){let eN=ey?.raw?.[ex];if(void 0!==eN)return eN;let ew=eb.getAttribute(ex);if(null!==ew)return ew;let ek=eb[ex];if(null!=ek&&""!==ek)return ek}return ey?.label===void 0?eb.textContent??eb.label??eb.value:ey.label},Yp=(eb,ey)=>ey?.value!==void 0&&null!==ey.value?ey.value:eb.value,Xp=(eb,ey,ex)=>{let eN=Yp(eb,ey);return{value:eN,key:eN,label:Jp(eb,ey,ex),disabled:ey?.disabled??eb.disabled,title:ey?.title??eb.title}},Zp=(eb,ey,ex)=>{let eN=Xp(eb,ey,ex);return{key:eb.value,value:eN.value,label:eN.label,disabled:eN.disabled,title:eN.title,className:ey?.className,groupLabel:ey?.groupLabel,raw:ey?.raw}},Qp=(eb,ey,ex,eN)=>{let ew=Array.from(eb.selectedOptions),ek=ew.map(eb=>Zp(eb,ey[eb.value],ex)),eC=ek.map(eb=>eb.value),e$=ek.map(eb=>eb.label),eS=eN?ew.map(eb=>Xp(eb,ey[eb.value],ex)):eC;return{values:eC,labels:e$,options:ek,payload:eb.multiple?eS:eS[0]??null}},$p=(eb,ey,ex)=>{if(!eb.multiple||!ex||ex<=0)return Array.from(eb.selectedOptions).map(eb=>eb.value);let eN=Array.from(eb.selectedOptions).map(eb=>eb.value);if(eN.length<=ex)return eN;let ew=[];eN.forEach(eb=>{ey.includes(eb)&&!ew.includes(eb)&&ew.length<ex&&ew.push(eb)}),eN.forEach(eb=>{!ew.includes(eb)&&ew.length<ex&&ew.push(eb)});let ek=new Set(ew);return Array.from(eb.options).forEach(eb=>{eb.selected=ek.has(eb.value)}),Array.from(eb.selectedOptions).map(eb=>eb.value)},em=(eb,ey)=>Array.from(eb.options).find(eb=>eb.value===ey),tm=eb=>null==eb?[]:Array.isArray(eb)?eb.map(eb=>String(eb)):[String(eb)],nm=eb=>{let ey=[],ex=new Map,eN=[];return eb.forEach(eb=>{if(void 0===eb.groupLabel||null===eb.groupLabel||""===eb.groupLabel)return void eN.push(eb);let ew=String(eb.groupLabel),ek=ex.get(ew);ek||(ek={key:ew,label:eb.groupLabel,options:[]},ex.set(ew,ek),ey.push(ek)),ek.options.push(eb)}),eN.length&&ey.unshift({key:"__ungrouped__",options:eN}),ey},rm=eb=>{let ey=eb.value??eb.key;return{key:String(ey),value:ey,label:eb.label??ey,disabled:eb.disabled,title:eb.title,className:eb.className,groupLabel:eb.groupLabel,raw:eb.raw}},im=()=>n("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",className:"h-4 w-4 shrink-0 opacity-60",children:n("path",{d:"M6 8.5L10 12.5L14 8.5",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"})}),am=Object.assign(({value:eb,defaultValue:ey,color:ex,status:eN,variant:ew,size:ek,uiSize:eC,nativeSize:e$,ghost:eS,loading:ej,loadingText:eA,options:ez,fieldNames:eM,placeholder:eL,placeholderValue:eT="",placeholderDisabled:eI=!0,notFoundContent:eO,allowClear:eE,clearLabel:eP="清空选择",onClear:eR,prefix:eF,suffix:eD,addonBefore:eB,addonAfter:eq,suffixIcon:eW,showArrow:eH=!0,mode:eV,labelInValue:eK,optionLabelProp:eZ,maxCount:eY,onChange:eU,onValueChange:eQ,onSelect:eG,onDeselect:eJ,rootClassName:eX,selectClassName:e0,className:e1,children:e2,multiple:e5,disabled:e3,...e4})=>{let e6=(0,e.useRef)(),e7=(0,e.useRef)(),e8=(0,e.useRef)(),e9=(0,e.useRef)(),tb=(0,e.useRef)(),ty=(0,e.useRef)([]),tx=Array.isArray(ez)&&ez.length>0,tN=null!=e2,tw=tx?Ip(ez,eM).map(eb=>rm(eb)):[],tk=(0,e.ref)(0),tC=(0,e.ref)(tm(void 0===eb?ey:eb)),t$=(0,e.ref)(tw),tS=!!e3||!!ej,tj=!!e5,tA="multiple"===eV,tz=tj||tA,tM=Ap(ek,e$),tL=tj||zp(tM),tT=tA&&!tL,tI=tT?Gp(e4,ez,eM,eL,e1,e0):null,tO=(0,e.useRef)(null!==tI&&Bp===tI),tE=tT||(void 0!==eF||void 0!==eD||void 0!==eB||void 0!==eq||!!eE||!!ej||void 0!==eW)&&!tL,tP=Lp(ez,eM),tR=tx?Rp(ez,eM):e2,tF=eL??"Select options",tD=eb=>{eb||Up(),tO.current!==eb&&(tO.current=eb,tH())},tB=()=>{tT&&!0===tO.current&&Kp(tI??Wp(e6.current))},tq=()=>{tT&&qp(tI??Wp(e6.current))&&(tO.current=!0,tH())},tW=()=>tC.value.map(eb=>t$.value.find(ey=>String(ey.value)===eb)).filter(Boolean),tH=()=>{let eb=!0===tO.current,ey=e8.current;ey&&(ey.setAttribute("aria-expanded",eb?"true":"false"),ey.classList.toggle("ring",eb),ey.classList.toggle("ring-primary/15",eb));let ex=tb.current;ex&&(ex.hidden=!eb,ex.setAttribute("aria-hidden",eb?"false":"true"))},tV=()=>{let eb=e7.current;eb&&(tC.value=Array.from(eb.selectedOptions).map(eb=>eb.value),t$.value=Array.from(eb.options).map(eb=>Zp(eb,tP[eb.value],eZ)),tk.value+=1,tH(),(()=>{let eb=e9.current;if(!eb||typeof document>"u")return;let ey=tW();if(eb.replaceChildren(),!ey.length){let ey=document.createElement("span");ey.className="truncate text-sm text-base-content/40",ey.textContent=String(tF),eb.appendChild(ey);return}ey.forEach(ey=>{let ex=String(ey.value),eN=document.createElement("span");eN.className="inline-flex max-w-full items-center gap-1 rounded-md bg-base-200 px-2 py-1 text-xs text-base-content";let ew=document.createElement("span");if(ew.className="truncate",ew.textContent=String(ey.label??ey.value),eN.appendChild(ew),!tS){let eb=document.createElement("button");eb.type="button",eb.className="btn btn-ghost btn-xs h-4 min-h-0 w-4 rounded-full p-0 text-[10px]",eb.setAttribute("aria-label",`移除 ${String(ey.label??ey.value)}`),eb.textContent="\xd7",eb.addEventListener("click",eb=>{tU(ex,eb)}),eN.appendChild(eb)}eb.appendChild(eN)})})(),(()=>{let eb=tb.current;if(!eb)return;let ey=new Set(tC.value);Array.from(eb.querySelectorAll("[data-rue-select-option]")).forEach(eb=>{let ex=eb.getAttribute("data-rue-select-option")??"",eN=ey.has(ex);eb.setAttribute("aria-selected",eN?"true":"false"),eb.classList.toggle("bg-primary/10",eN),eb.classList.toggle("text-primary",eN),eb.classList.toggle("hover:bg-base-200",!eN&&!eb.disabled);let ew=eb.querySelector('[data-rue-select-check="true"]');ew&&(ew.classList.toggle("opacity-100",eN),ew.classList.toggle("opacity-0",!eN))})})())},tK=()=>{let ex=void 0===eb?ey:eb;void 0===ex||(eb=>{let ey=e7.current;if(ey){if(ey.multiple){let ex=new Set(eb);Array.from(ey.options).forEach(eb=>{eb.selected=ex.has(eb.value)});return}ey.value=eb[0]??""}})(tm(ex)),tV()},tZ=()=>{e7.current&&(ty.current=Array.from(e7.current.selectedOptions).map(eb=>eb.value))},tY=()=>{let eb=e7.current;eb&&(eb.dispatchEvent(new Event("input",{bubbles:!0})),eb.dispatchEvent(new Event("change",{bubbles:!0})))},tU=(eb,ey)=>{ey.preventDefault(),ey.stopPropagation();let ex=e7.current;if(!ex||tS)return;let eN=em(ex,eb);eN&&!eN.disabled&&eN.selected&&(eN.selected=!1,tV(),tB(),tY())},tQ=eb=>{let ey=e7.current;!ey||tS||(ey.multiple?Array.from(ey.options).forEach(eb=>{eb.selected=!1}):null==eL?(ey.selectedIndex=-1,ey.value=""):ey.value=String(eT),tV(),tB(),tY(),eR&&eR(eb))};(0,e.onMounted)(()=>{if(tK(),tZ(),tV(),tq(),typeof window>"u")return;let eb=eb=>{if(!0!==tO.current)return;let ey=eb.target;ey&&(e6.current?.contains(ey)||tD(!1))},ey=eb=>{!0===tO.current&&"Escape"===eb.key&&tD(!1)};window.addEventListener("pointerdown",eb,!0),window.addEventListener("keydown",ey),(0,e.onUnmounted)(()=>{window.removeEventListener("pointerdown",eb,!0),window.removeEventListener("keydown",ey)})}),(0,e.watch)(()=>eb,()=>{tK(),tZ(),tV(),tq()},{immediate:!0}),(0,e.watch)(()=>ey,()=>{tK(),tZ(),tV(),tq()}),(0,e.watch)(()=>ez,()=>{tK(),tZ(),tV(),tq()}),(0,e.watch)(()=>e2,()=>{tK(),tZ(),tV(),tq()});let tG=Np(ex,eN,ew,ek,eC,eS,e1),tJ=Pp(ex,eN,ew,ek,eC,eS,e1),tX=eH?eW??n(im,{}):eW,t0=tW(),t1=nm(t$.value),t2=r("select",{...e4,...void 0===tM?{}:{size:tM},...tz?{multiple:!0}:{},...tS?{disabled:!0}:{},...void 0===ey?{}:{defaultValue:ey},...void 0===eb?{}:{value:eb},ref:e7,tabIndex:tT?-1:e4.tabIndex,"aria-hidden":tT?"true":void 0,"aria-busy":ej?"true":void 0,className:Dp(tT?"pointer-events-none absolute h-0 w-0 overflow-hidden opacity-0":tE?"min-w-0 grow appearance-none border-none bg-transparent pr-1 text-base-content outline-none":tG,e0),onChange:eb=>{(eb=>{let ey=e7.current;if(!ey)return;let ex=(ty.current??[]).slice(),eN=$p(ey,ex,eY),ew=Qp(ey,tP,eZ,eK),ek=eN.map(eb=>String(eb)),eC=ek.filter(eb=>!ex.includes(eb)),e$=ex.filter(eb=>!ek.includes(eb));eQ&&eQ(ew.payload,{values:ew.values,labels:ew.labels,options:ew.options,nativeEvent:eb}),eG&&eC.forEach(ex=>{let eN=em(ey,ex);if(!eN)return;let ew=Zp(eN,tP[ex],eZ);eG(eK?Xp(eN,tP[ex],eZ):ew.value,ew,eb)}),eJ&&e$.forEach(ex=>{let eN=em(ey,ex);if(!eN)return;let ew=Zp(eN,tP[ex],eZ);eJ(eK?Xp(eN,tP[ex],eZ):ew.value,ew,eb)}),ty.current=ek})(eb),tV(),eU&&eU(eb)},children:[tz||null==eL?null:n("option",{value:eT,disabled:eI,children:eL}),tR,!ej||tx||tN?null:n("option",{disabled:!0,children:eA??"正在加载..."}),ej||tx||tN?null:n("option",{disabled:!0,children:eO??"暂无可选项"})]});return tE?tT?r("div",{ref:e6,className:Dp("relative",eX),"data-rue-select-root":"true","aria-disabled":tS?"true":void 0,children:[t2,r("div",{ref:e8,className:Dp(Dp(tJ,"flex min-h-12 items-center gap-2 py-2"),!0===tO.current?"ring ring-primary/15":void 0),role:"button",tabIndex:tS?-1:0,"aria-haspopup":"listbox","aria-expanded":!0===tO.current?"true":"false","data-rue-select-trigger":"true","data-rue-select-version":String(tk.value),onClick:eb=>{eb.preventDefault(),tS||!0===tO.current||tD(!0)},onKeyDown:eb=>{if(!tS){if("Escape"===eb.key)return void tD(!1);("Enter"===eb.key||" "===eb.key||"ArrowDown"===eb.key)&&(eb.preventDefault(),tD(!0))}},children:[void 0===eB?null:n("span",{className:"shrink-0 text-sm text-base-content/60",children:eB}),void 0===eF?null:n("span",{className:"shrink-0 text-sm text-base-content/60",children:eF}),n("div",{ref:e9,className:"flex min-w-0 flex-1 flex-wrap items-center gap-1"}),!ej&&eE&&t0.length?n("button",{type:"button",className:"btn btn-ghost btn-xs btn-circle shrink-0","aria-label":eP,onClick:eb=>{eb.preventDefault(),eb.stopPropagation(),tQ(eb)},disabled:tS,children:"\xd7"}):null,ej?n("span",{className:"loading loading-spinner loading-xs shrink-0","aria-hidden":"true"}):null,void 0===eD?null:n("span",{className:"shrink-0 text-sm text-base-content/60",children:eD}),null==tX?null:n("span",{className:"pointer-events-none flex shrink-0 items-center text-base-content/70",children:tX}),void 0===eq?null:n("span",{className:"shrink-0 text-sm text-base-content/60",children:eq})]}),n("div",{ref:tb,className:"absolute z-30 mt-2 w-full rounded-box border border-base-300 bg-base-100 p-2 shadow-xl","data-rue-select-popup":"true","aria-hidden":!0===tO.current?"false":"true",hidden:!0!==tO.current,children:n("div",{role:"listbox","aria-multiselectable":"true",className:"max-h-72 space-y-2 overflow-auto",children:t1.map(eb=>r("div",{className:"space-y-1",children:[void 0===eb.label?null:n("div",{className:"px-3 pt-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-base-content/45",children:eb.label}),eb.options.map(eb=>{let ey=String(eb.value),ex=tC.value.includes(ey);return r("button",{type:"button",className:Dp("flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-sm transition",eb.disabled?"cursor-not-allowed opacity-50":ex?"bg-primary/10 text-primary":"hover:bg-base-200"),"data-rue-select-option":ey,"aria-selected":ex?"true":"false",disabled:eb.disabled,onClick:eb=>{((eb,ey)=>{ey.preventDefault(),ey.stopPropagation();let ex=e7.current;if(!ex||tS)return;let eN=em(ex,eb);!eN||eN.disabled||(eN.selected=!eN.selected,tV(),tB(),tY())})(ey,eb)},children:[n("span",{className:"truncate",children:eb.label??eb.value}),n("span",{"data-rue-select-check":"true",className:ex?"opacity-100":"opacity-0",children:"✓"})]},ey)})]},eb.key))})})]}):r("div",{ref:e6,className:Dp(tJ,eX),"data-rue-select-root":"true","aria-disabled":tS?"true":void 0,children:[void 0===eB?null:n("span",{className:"shrink-0 text-sm text-base-content/60",children:eB}),void 0===eF?null:n("span",{className:"shrink-0 text-sm text-base-content/60",children:eF}),t2,!ej&&eE?n("button",{type:"button",className:"btn btn-ghost btn-xs btn-circle inline-flex shrink-0 items-center justify-center self-center","aria-label":eP,onClick:tQ,disabled:tS,children:"\xd7"}):null,ej?n("span",{className:"loading loading-spinner loading-xs shrink-0 self-center","aria-hidden":"true"}):null,void 0===eD?null:n("span",{className:"inline-flex shrink-0 items-center self-center text-sm text-base-content/60",children:eD}),null==tX?null:n("span",{className:"pointer-events-none inline-flex shrink-0 items-center self-center text-base-content/70",children:tX}),void 0===eq?null:n("span",{className:"shrink-0 text-sm text-base-content/60",children:eq})]}):t2},{Option:({className:eb,children:ey,...ex})=>n("option",{...ex,className:eb,children:ey}),OptGroup:({label:eb,className:ey,children:ex,...eN})=>n("optgroup",{...eN,label:eb,className:ey,children:ex}),Shell:({className:eb,children:ey,...ex})=>n("label",{...ex,className:Dp("input",eb),children:ey})}),om=(eb,ey,ex)=>Math.min(ex,Math.max(ey,eb)),sm=(eb,ey)=>ey?`${eb} ${ey}`:eb,cm=(eb,ey,ex,eN)=>{let ew=(eN-90)*Math.PI/180;return{x:eb+ex*Math.cos(ew),y:ey+ex*Math.sin(ew)}},lm=(eb,ey,ex,eN,ew)=>{let ek=cm(eb,ey,ex,eN),eC=cm(eb,ey,ex,ew),e$=+(ew-eN>180);return`M ${ek.x} ${ek.y} A ${ex} ${ex} 0 ${e$} 1 ${eC.x} ${eC.y}`},um=(eb,ey)=>{switch(eb??("success"===ey?"success":"exception"===ey?"error":void 0)??"primary"){case"neutral":return"text-neutral";case"secondary":return"text-secondary";case"accent":return"text-accent";case"info":return"text-info";case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return"text-primary"}},dm=(eb,ey)=>eb||((ey??0)>=100?"success":"normal"),fm=(eb,ey,ex)=>"number"==typeof eb?om(eb,0,100):"number"==typeof ey?om("number"==typeof ex&&ex>0?ey/ex*100:ey,0,100):void 0,pm=eb=>"number"==typeof eb?.percent?om(eb.percent,0,100):0,mm=(eb,ey)=>Array.isArray(eb)?{width:eb[0],height:"number"==typeof eb[1]?eb[1]:10}:"object"==typeof eb&&eb?{width:eb.width,height:"number"==typeof eb.height?eb.height:10}:"number"==typeof eb?{width:void 0,height:eb}:"number"==typeof ey&&ey>0?{width:void 0,height:ey}:"small"===eb?{width:void 0,height:6}:{width:void 0,height:10},hm=eb=>"number"==typeof eb?eb:"string"==typeof eb&&"small"===eb?84:120,gm=eb=>"number"==typeof eb&&eb>0?{count:Math.floor(eb),gap:4}:"object"==typeof eb&&eb&&eb.count>0?{count:Math.floor(eb.count),gap:eb.gap>=0?eb.gap:4}:null,_m=eb=>{switch(eb){case"butt":return"rounded-none";case"square":return"rounded-sm";default:return"rounded-full"}},vm=eb=>{if(!(!eb||Array.isArray(eb)))return"string"==typeof eb?{backgroundColor:eb}:{backgroundImage:`linear-gradient(${eb.direction??"to right"}, ${eb.from}, ${eb.to})`}},ym=eb=>{if(eb)return"string"==typeof eb?eb:Array.isArray(eb)?eb[0]:eb.from},bm=(eb,ey)=>{if(!(!Array.isArray(eb)||!eb.length))return{backgroundColor:eb[Math.min(ey,eb.length-1)]}},xm=(eb,ey)=>{if(eb)return eb;switch(ey){case"left":return"start";case"right":return"end";default:return ey??"bottom"}},Sm=eb=>{switch(eb){case"top":return 0;case"start":return 270;case"end":return 90;default:return 180}},Cm=eb=>null!=eb&&(!Array.isArray(eb)||eb.length>0),wm=({status:eb})=>"success"===eb?n("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-success/15 text-success",children:n("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-3.5 w-3.5",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m5 10 3 3 7-7"})})}):"exception"===eb?n("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-error/15 text-error",children:n("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-3.5 w-3.5",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 6 8 8M14 6l-8 8"})})}):null,Tm=({children:eb,showInfo:ey,format:ex,percent:eN,successPercent:ew,status:ek,type:eC,inner:e$})=>Cm(eb)?eb:!1===ey?null:ex?ex(eN,ew):e$||"success"!==ek&&"exception"!==ek?null==eN?"line"===eC?"加载中":"--":`${Math.round(eN)}%`:n(wm,{status:ek}),Em=({color:eb,className:ey,type:ex="line",percent:eN,max:ew,value:ek,status:eC,showInfo:e$=!0,format:eS,size:ej,strokeWidth:eA,strokeLinecap:ez="round",strokeColor:eM,trailColor:eL,railColor:eT,success:eI,steps:eO,gapDegree:eE,gapPlacement:eP,gapPosition:eR,percentPosition:eF,rounding:eD=Math.round,children:eB,...eq})=>{let eW=Cm(eB);if(!(void 0!==eN||"line"!==ex||void 0!==eC||!0!==e$||void 0!==eS||void 0!==ej||void 0!==eA||"round"!==ez||void 0!==eM||void 0!==eL||void 0!==eT||void 0!==eI||void 0!==eO||void 0!==eE||void 0!==eP||void 0!==eR||void 0!==eF||eW)){let ex="progress";return eb&&(ex+=` progress-${eb}`),ey&&(ex+=` ${ey}`),n("progress",{...eq,...void 0===ew?{}:{max:String(ew)},...void 0===ek?{}:{value:ek},className:ex})}let eH=fm(eN,ek,ew),eV=Math.min(pm(eI),eH??100),eK=dm(eC,eH),eZ=eT??eL,eY=um(eb,eK),eU=eF?.type??"outer",eQ=eF?.align??"end",eG=Tm({children:eB,showInfo:e$,format:eS,percent:eH,successPercent:eV,status:eK,type:ex,inner:"line"===ex&&"inner"===eU&&!eO});if("line"===ex){let eb=mm(ej,eA),ex=_m(ez),eN=eb.width?{width:"number"==typeof eb.width?`${eb.width}px`:eb.width}:void 0,ew=gm(eO),ek="outer"===eU&&null!=eG?n("div",{className:`text-sm ${"center"===eQ?"text-center":"start"===eQ?"text-left":"text-right"}`,children:eG}):null,eC=r("div",{className:sm(`relative w-full overflow-hidden bg-base-300/70 ${ex}`,void 0),style:{...eN,...eZ?{backgroundColor:eZ}:{},height:`${eb.height}px`},children:[ew?n("div",{className:"flex h-full w-full",style:{gap:`${ew.gap}px`},children:Array.from({length:ew.count},(eb,ey)=>{let eN=null==eH?0:om(eD(eH/100*ew.count),0,ew.count),ek=om(eD(eV/100*ew.count),0,ew.count),eC=ey<ek,e$=ey>=ek&&ey<eN,eS=e$?bm(eM,ey):void 0;return n("span",{className:sm(`block h-full flex-1 ${ex}`,eC?"bg-success":e$?sm("bg-current",eY):"bg-base-300/70"),style:eC?eI?.strokeColor?{backgroundColor:eI.strokeColor}:void 0:e$?eS:eZ?{backgroundColor:eZ}:void 0},ey)})}):null==eH?n("span",{className:sm(`absolute inset-y-0 left-0 animate-pulse bg-current ${ex}`,eY),style:{width:"38%",...vm(eM)}}):r(e.Fragment,{children:[eV>0?n("span",{className:sm(`absolute inset-y-0 left-0 ${ex}`,eI?.strokeColor?void 0:"bg-success"),style:{width:`${eV}%`,...eI?.strokeColor?{backgroundColor:eI.strokeColor}:{}}}):null,(eH??0)>eV?n("span",{className:sm(`absolute inset-y-0 ${ex} bg-current`,eY),style:{left:`${eV}%`,width:`${Math.max((eH??0)-eV,0)}%`,...vm(eM)}}):null,"active"===eK?n("span",{className:sm(`absolute inset-y-0 left-0 animate-pulse bg-white/20 ${ex}`,void 0),style:{width:`${eH??0}%`,backgroundImage:"repeating-linear-gradient(120deg, rgba(255,255,255,0.15) 0 10px, rgba(255,255,255,0.32) 10px 20px)"}}):null]}),"inner"!==eU||null==eG||ew?null:n("span",{className:`absolute inset-0 flex items-center px-3 text-xs font-medium ${"center"===eQ?"justify-center text-white":"start"===eQ?"justify-start text-white":"justify-end text-white"}`,children:eG})]}),e$=ek&&"end"===eQ?r("div",{className:"flex items-center gap-3",children:[n("div",{className:sm("min-w-0 flex-1",eY),children:eC}),n("div",{className:"shrink-0 text-sm",children:eG})]}):r("div",{className:sm("space-y-2",eY),children:[eC,ek]});return n("div",{...eq,className:sm("rue-progress w-full",ey),"data-progress-type":"line",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":null==eH?void 0:String(Math.round(eH)),children:e$})}let eJ=hm(ej),eX=om(eA??8,2,20),e0=50-eX/2,e1=om("dashboard"===ex?eE??75:eE??0,0,295),e2=Sm(xm(eP,eR))+e1/2,e5=360-e1,e3=e2+("circle"===ex&&0===e1?359.999:e5),e4=e2+(eH??0)/100*e5,e6=e2+eV/100*e5,e7=ym(eM),e8=gm(eO),e9="square"===ez?"square":"butt"===ez?"butt":"round",tb=lm(50,50,e0,e2,e3);return n("div",{...eq,className:sm(`rue-progress inline-flex flex-col items-center gap-3 ${eY}`,ey),"data-progress-type":ex,role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":null==eH?void 0:String(Math.round(eH)),children:r("div",{className:"relative",style:{width:`${eJ}px`,height:`${eJ}px`},children:[r("svg",{viewBox:"0 0 100 100",className:"h-full w-full -rotate-90 overflow-visible",children:[n("path",{d:tb,fill:"none",stroke:eZ??"currentColor",strokeWidth:eX,strokeLinecap:e9,className:eZ?void 0:"text-base-300/70"}),e8?Array.from({length:e8.count},(eb,ey)=>{let ex=om(e8.gap,0,e5/Math.max(2*e8.count,1)),eN=Math.max((e5-ex*(e8.count-1))/e8.count,.01),ew=e2+ey*(eN+ex),ek=null==eH?0:om(eD(eH/100*e8.count),0,e8.count),eC=om(eD(eV/100*e8.count),0,e8.count),e$=ey<eC,eS=ey>=eC&&ey<ek;return n("path",{d:lm(50,50,e0,ew,ew+eN),fill:"none",stroke:e$?eI?.strokeColor??"#22c55e":eS?ym(eM)??"currentColor":eZ??"currentColor",strokeWidth:eX,strokeLinecap:e9,className:e$||eS||eZ?void 0:"text-base-300/70"},ey)}):null,!e8&&eV>0?n("path",{d:lm(50,50,e0,e2,e6),fill:"none",stroke:eI?.strokeColor??"#22c55e",strokeWidth:eX,strokeLinecap:e9}):null,!e8&&(eH??0)>eV?n("path",{d:lm(50,50,e0,e6,e4),fill:"none",stroke:e7??"currentColor",strokeWidth:eX,strokeLinecap:e9}):null]}),null==eG?null:n("div",{className:"absolute inset-0 flex items-center justify-center px-4 text-center text-sm font-medium text-base-content",children:eG})]})})},Dm=eb=>eb.replace(/[A-Z]/g,eb=>`-${eb.toLowerCase()}`),Om=(eb,ey,ex)=>Math.min(ex,Math.max(ey,eb)),km=(eb,ey)=>ey?`${eb} ${ey}`:eb,Am=(eb,ey)=>{"function"==typeof eb?eb(ey):eb&&"object"==typeof eb&&"current"in eb&&(eb.current=ey??void 0)},jm=eb=>{if("number"==typeof eb)return Number.isFinite(eb)?eb:void 0;if("string"==typeof eb&&eb.trim()){let ey=Number(eb);return Number.isFinite(ey)?ey:void 0}},Mm=eb=>{if(null!=eb)return"number"==typeof eb?`${eb}px`:String(eb)},Nm=eb=>"small"===eb?"4rem":"medium"===eb?"6rem":"default"===eb||null==eb?"5rem":Mm(eb)??"5rem",Pm=(eb,ey,ex)=>Mm(eb??ey)??`calc(${ex??"5rem"} / 10)`,Fm=(eb,ey,ex)=>{if("number"==typeof eb)return Om(eb,0,100);let eN=jm(ey);if(null==eN)return;let ew=jm(ex);return Om(null!=ew&&ew>0?eN/ew*100:eN,0,100)},Im=(eb,ey)=>eb?"number"==typeof eb.percent?Om(eb.percent,0,100):Fm(void 0,eb.value,ey)??0:0,Lm=(eb,ey)=>eb||(ey>=100?"success":"normal"),Rm=eb=>"success"===eb?"text-success":"exception"===eb?"text-error":void 0,zm=(eb,ey)=>{if(eb)return eb;switch(ey){case"left":return"start";case"right":return"end";default:return ey??"bottom"}},Bm=eb=>{switch(eb){case"top":return 0;case"start":return 270;case"end":return 90;default:return 180}},Vm=eb=>"number"==typeof eb&&eb>0?{count:Math.floor(eb),gap:2}:"object"==typeof eb&&eb&&eb.count>0?{count:Math.floor(eb.count),gap:eb.gap>=0?eb.gap:2}:null,Hm=(eb,ey,ex,eN)=>{let ew=(eN-90)*Math.PI/180;return{x:eb+ex*Math.cos(ew),y:ey+ex*Math.sin(ew)}},Um=(eb,ey,ex,eN,ew)=>{let ek=Hm(eb,ey,ex,eN),eC=Hm(eb,ey,ex,ew),e$=+(ew-eN>180);return`M ${ek.x} ${ek.y} A ${ex} ${ex} 0 ${e$} 1 ${eC.x} ${eC.y}`},Wm=eb=>null!=eb&&(!Array.isArray(eb)||eb.length>0),Gm=({status:eb})=>"success"===eb?n("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-success/15 text-success",children:n("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-3.5 w-3.5",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m5 10 3 3 7-7"})})}):"exception"===eb?n("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-error/15 text-error",children:n("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-3.5 w-3.5",children:n("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 6 8 8M14 6l-8 8"})})}):null,Km=({children:eb,showInfo:ey,format:ex,percent:eN,successPercent:ew,status:ek})=>Wm(eb)?eb:!1===ey?null:ex?ex(eN,ew):"success"===ek||"exception"===ek?n(Gm,{status:ek}):`${Math.round(eN)}%`,qm=eb=>eb?"string"==typeof eb?eb.trim():Object.entries(eb).filter(([,eb])=>null!=eb).map(([eb,ey])=>`${eb.startsWith("--")?eb:Dm(eb)}:${String(ey)}`).join("; "):"",Jm=({value:eb,percent:ey,max:ex,type:eN="circle",status:ew,showInfo:ek=!0,format:eC,size:e$,thickness:eS,strokeWidth:ej,strokeLinecap:eA="round",strokeColor:ez,railColor:eM,trailColor:eL,success:eT,steps:eI,gapDegree:eO,gapPlacement:eE,gapPosition:eP,style:eR,className:eF,children:eD,role:eB,...eq})=>{let eW=eq["aria-valuenow"],eH=eq["aria-valuemin"],eV=eq["aria-valuemax"],eK=eq.ref;"aria-valuenow"in eq&&delete eq["aria-valuenow"],"aria-valuemin"in eq&&delete eq["aria-valuemin"],"aria-valuemax"in eq&&delete eq["aria-valuemax"],"ref"in eq&&delete eq.ref;let eZ=Fm(ey,eb,ex)??0,eY=Math.min(Im(eT,ex),eZ),eU=Lm(ew,eZ),eQ=Nm(e$),eG=Pm(eS,ej,eQ),eJ=eM??eL,eX=Vm(eI),e0=Om("dashboard"===eN?eO??75:eO??0,0,295),e1=Bm(zm(eE,eP))+e0/2,e2=360-e0,e5=e1+("circle"===eN&&0===e0?359.999:e2),e3=e1+eZ/100*e2,e4=e1+eY/100*e2,e6=Rm(eU),e7=Km({children:eD,showInfo:ek,format:eC,percent:eZ,successPercent:eY,status:eU}),e8=Array.isArray(ez)?ez[0]:ez,e9=qm(eR),tb=Um(50,50,42,e1,e5),ty=`clamp(0.75rem, calc(${eQ} / 4.5), 1.75rem)`;return r("div",{...eq,ref:eb=>{eb&&(e9?eb.setAttribute("style",e9):eb.removeAttribute("style"),eb.style.setProperty("--value",String(eZ)),eb.style.setProperty("--size",eQ),eb.style.setProperty("--thickness",eG),eb.style.width=eQ,eb.style.height=eQ),Am(eK,eb)},role:eB??"progressbar","aria-valuemin":eH??"0","aria-valuemax":eV??"100","aria-valuenow":String(eW??Math.round(eZ)),className:km("rue-radial-progress relative inline-grid shrink-0 place-items-center align-middle",eF),"data-progress-type":eN,children:[n("div",{className:"radial-progress invisible pointer-events-none absolute inset-0","aria-hidden":"true"}),r("svg",{viewBox:"0 0 100 100",className:"pointer-events-none absolute inset-0 h-full w-full -rotate-90 overflow-visible","aria-hidden":"true",children:[n("path",{d:tb,fill:"none",stroke:eJ??"currentColor",strokeLinecap:eA,vectorEffect:"non-scaling-stroke",style:{strokeWidth:"var(--thickness)"},className:eJ?void 0:"text-base-300/70"}),eX?Array.from({length:eX.count},(eb,ey)=>{let ex=Om(eX.gap,0,e2/Math.max(2*eX.count,1)),eN=Math.max((e2-ex*(eX.count-1))/eX.count,.01),ew=e1+ey*(eN+ex),ek=Om(Math.round(eZ/100*eX.count),0,eX.count),eC=Om(Math.round(eY/100*eX.count),0,eX.count),e$=ey<eC,eS=ey>=eC&&ey<ek,ej=e$?eT?.strokeColor:Array.isArray(ez)?ez[Math.min(ey,ez.length-1)]:e8;return n("path",{d:Um(50,50,42,ew,ew+eN),fill:"none",stroke:ej??"currentColor",strokeLinecap:eA,vectorEffect:"non-scaling-stroke",style:{strokeWidth:"var(--thickness)"},className:e$?eT?.strokeColor?void 0:"text-success":eS?ej?void 0:e6:eJ?void 0:"text-base-300/70"},ey)}):null,!eX&&eY>0?n("path",{d:Um(50,50,42,e1,e4),fill:"none",stroke:eT?.strokeColor??"currentColor",strokeLinecap:eA,vectorEffect:"non-scaling-stroke",style:{strokeWidth:"var(--thickness)"},className:eT?.strokeColor?void 0:"text-success"}):null,!eX&&eZ>eY?n("path",{d:Um(50,50,42,e4,e3),fill:"none",stroke:e8??"currentColor",strokeLinecap:eA,vectorEffect:"non-scaling-stroke",style:{strokeWidth:"var(--thickness)"},className:e8?void 0:e6}):null]}),null==e7?null:n("div",{className:"relative z-10 flex h-full w-full items-center justify-center px-[18%] text-center font-medium leading-tight",style:{fontSize:ty},children:e7})]})},Ym=(eb,ey)=>ey?`${eb} ${ey}`:eb,Xm=eb=>{switch(eb){case"small":return"sm";case"medium":case"middle":return"md";case"large":return"lg";default:return eb}},Zm=(eb,ey,ex)=>{let eN="radio",ew=Xm(ey);return eb&&(eN+=` radio-${eb}`),ew&&(eN+=` radio-${ew}`),ex&&(eN+=` ${ex}`),eN},Qm=(eb,ey,ex)=>{let eN="inline-flex items-start gap-3 text-sm leading-5 text-base-content";return ex&&(eN+=" w-full"),eb?eN+=" cursor-not-allowed opacity-60":eN+=" cursor-pointer",ey&&(eN+=` ${ey}`),eN},$m=(eb,ey,ex)=>{let eN="inline-flex";return ex&&(eN+=" w-full"),eb?eN+=" cursor-not-allowed opacity-60":eN+=" cursor-pointer",ey&&(eN+=` ${ey}`),eN},eh=eb=>Ym("min-w-0 flex-1",eb),th=eb=>{switch(Xm(eb)){case"xs":return"btn-xs";case"sm":return"btn-sm";case"lg":return"btn-lg";case"xl":return"btn-xl";default:return"btn-md"}},nh=eb=>{switch(eb??"primary"){case"neutral":return"peer-checked:border-neutral peer-checked:bg-neutral/10 peer-checked:text-neutral";case"secondary":return"peer-checked:border-secondary peer-checked:bg-secondary/10 peer-checked:text-secondary";case"accent":return"peer-checked:border-accent peer-checked:bg-accent/10 peer-checked:text-accent";case"success":return"peer-checked:border-success peer-checked:bg-success/10 peer-checked:text-success";case"warning":return"peer-checked:border-warning peer-checked:bg-warning/10 peer-checked:text-warning";case"info":return"peer-checked:border-info peer-checked:bg-info/10 peer-checked:text-info";case"error":return"peer-checked:border-error peer-checked:bg-error/10 peer-checked:text-error";default:return"peer-checked:border-primary peer-checked:bg-primary/10 peer-checked:text-primary"}},rh=eb=>{switch(eb??"primary"){case"neutral":return"peer-checked:border-neutral peer-checked:bg-neutral peer-checked:text-neutral-content";case"secondary":return"peer-checked:border-secondary peer-checked:bg-secondary peer-checked:text-secondary-content";case"accent":return"peer-checked:border-accent peer-checked:bg-accent peer-checked:text-accent-content";case"success":return"peer-checked:border-success peer-checked:bg-success peer-checked:text-success-content";case"warning":return"peer-checked:border-warning peer-checked:bg-warning peer-checked:text-warning-content";case"info":return"peer-checked:border-info peer-checked:bg-info peer-checked:text-info-content";case"error":return"peer-checked:border-error peer-checked:bg-error peer-checked:text-error-content";default:return"peer-checked:border-primary peer-checked:bg-primary peer-checked:text-primary-content"}},ih=({color:eb,size:ey,buttonStyle:ex,className:eN,block:ew})=>{let ek="btn min-h-0 border-base-300 bg-base-100 text-base-content shadow-none transition-colors duration-200 peer-disabled:pointer-events-none peer-disabled:opacity-60 peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary/20 peer-checked:shadow-sm";return ek+=` ${th(ey)}`+(ew?" w-full justify-center":" justify-center"),"solid"===ex?ek+=` hover:bg-base-200 ${rh(eb)}`:ek+=` btn-outline hover:bg-base-200 ${nh(eb)}`,eN&&(ek+=` ${eN}`),ek},ah=({optionType:eb,orientation:ey,className:ex,block:eN})=>{let ew="button"===eb?"vertical"===ey?"flex flex-col gap-2":"flex flex-wrap items-start gap-2":"vertical"===ey?"flex flex-col gap-3":"flex flex-wrap items-center gap-4";return eN&&(ew+=" w-full"),ex&&(ew+=` ${ex}`),ew},oh=eb=>{switch(typeof eb){case"number":return`number:${eb}`;case"boolean":return`boolean:${eb?"true":"false"}`;default:return`string:${eb}`}},sh=eb=>{if(!eb)return;let ey=eb.indexOf(":");if(-1===ey)return eb;let ex=eb.slice(0,ey),eN=eb.slice(ey+1);return"number"===ex?Number(eN):"boolean"===ex?"true"===eN:eN},ch=eb=>(eb??[]).map(eb=>"string"==typeof eb||"number"==typeof eb||"boolean"==typeof eb?{label:String(eb),value:eb}:eb),lh=(eb,ey)=>eb??(ey?"vertical":"horizontal"),uh=eb=>{let ey=eb?.closest('[data-rue-radio-group="true"]');return ey?{optionType:ey.dataset.rueRadioGroupOptionType,buttonStyle:ey.dataset.rueRadioGroupButtonStyle,size:ey.dataset.rueRadioGroupSize,color:ey.dataset.rueRadioGroupColor,block:"true"===ey.dataset.rueRadioGroupBlock}:{optionType:void 0,buttonStyle:void 0,size:void 0,color:void 0,block:void 0}},dh=({color:eb,size:ey,checked:ex,defaultChecked:eN,disabled:ew,value:ek,className:eC,rootClassName:e$,contentClassName:eS,style:ej,rootStyle:eA,children:ez,title:eM,id:eL,name:eT,optionType:eI,buttonStyle:eO,block:eE,onChange:eP,onCheckedChange:eR,...eF})=>{let eD=(0,e.useRef)(),eB=(0,e.useRef)(),eq=(0,e.useRef)(),eW=(0,e.ref)(void 0),eH=(0,e.ref)(void 0),eV=(0,e.ref)(void 0),eK=(0,e.ref)(void 0),eZ=(0,e.ref)(void 0),eY=()=>{"boolean"==typeof ex&&eD.current&&(eD.current.checked=ex)},eU=()=>{let ex=uh(eD.current);eW.value=ex.optionType,eH.value=ex.buttonStyle,eV.value=ex.size,eK.value=ex.color,eZ.value=ex.block,eB.current&&(eB.current.className=$m(ew,e$,eE??ex.block??!1)),eq.current&&(eq.current.className=ih({color:eb??ex.color,size:ey??ex.size,buttonStyle:eO??ex.buttonStyle??"outline",className:eC,block:eE??ex.block??!1}))};(0,e.onMounted)(()=>{eY(),eU()}),(0,e.watch)(()=>ex,()=>{eY()},{immediate:!0});let eQ=eI??eW.value??"default",eG=eO??eH.value??"outline",eJ=ey??eV.value,eX=eb??eK.value,e0=eE??eZ.value??!1,e1="button"===eQ,e2=n("input",{...eF,ref:eD,id:eL,name:eT,title:eM,type:"radio",value:ek,checked:ex,defaultChecked:eN,disabled:ew,style:e1?void 0:ej,className:e1?"peer sr-only":Zm(eb,ey,eC),"data-rue-radio-input":"true","data-rue-radio-disabled":ew?"true":"false","data-rue-radio-option-type":eQ,"data-rue-radio-value":void 0===ek?void 0:oh(ek),onChange:eb=>{let ey=eb.target?.checked===!0;eU(),"boolean"==typeof ex&&eD.current&&(eD.current.checked=ex);let eN=eI??eW.value??"default";eP&&eP(eb,{checked:ey,value:ek,optionType:eN}),eR&&eR(ey,eb)}});if(e1){let eb=ez??(void 0===ek?null:String(ek));return r("label",{ref:eB,className:$m(ew,e$,e0),style:eA,title:eM,"data-rue-radio-root":"true","data-rue-radio-option-type":"button",children:[e2,n("span",{ref:eq,className:ih({color:eX,size:eJ,buttonStyle:eG,className:eC,block:e0}),style:ej,children:eb})]})}return null!=ez||e$||eA||eS?r("label",{className:Qm(ew,e$,e0),style:eA,title:eM,"data-rue-radio-root":"true","data-rue-radio-option-type":"default",children:[n("span",{className:"shrink-0 pt-0.5",children:e2}),null==ez?null:n("span",{className:eh(eS),children:ez})]}):e2},fh=Object.assign(dh,{Group:({value:eb,defaultValue:ey,options:ex,disabled:eN,name:ew,className:ek,style:eC,children:e$,optionType:eS="default",buttonStyle:ej="outline",size:eA,color:ez,block:eM,orientation:eL,vertical:eT,onChange:eI,...eO})=>{let eE=(0,e.useRef)(),eP=(0,e.ref)(void 0),eR=(0,e.ref)(eb??ey),eF=ch(ex);eP.value||(eP.value=`rue-radio-group-${Math.random().toString(36).slice(2,10)}`);let eD=ew??eP.value,eB=lh(eL,eT),eq=()=>{let eb=eE.current;if(!eb)return;let ey=void 0===eR.value?void 0:oh(eR.value);Array.from(eb.querySelectorAll('input[type="radio"][data-rue-radio-input="true"]')).forEach(eb=>{let ex=eb.dataset.rueRadioValue;ex&&(eb.checked=void 0!==ey&&ex===ey),eb.name=eD,eb.disabled=!!eN||"true"===eb.dataset.rueRadioDisabled})};(0,e.onMounted)(()=>{eq()}),(0,e.watch)(()=>eb,eb=>{void 0!==eb&&(eR.value=eb),eq()},{immediate:!0}),(0,e.watch)(()=>eR.value,()=>{eq()},{immediate:!0}),(0,e.watch)(()=>eN,()=>{eq()},{immediate:!0}),(0,e.watch)(()=>eD,()=>{eq()},{immediate:!0});let eW=void 0===eb?eR.value:eb;return n("div",{...eO,ref:eE,role:eO.role??"radiogroup",className:ah({optionType:eS,orientation:eB,className:ek,block:eM}),style:eC,"data-rue-radio-group":"true","data-rue-radio-group-block":eM?"true":"false","data-rue-radio-group-button-style":ej,"data-rue-radio-group-color":ez,"data-rue-radio-group-option-type":eS,"data-rue-radio-group-size":Xm(eA),onChange:ey=>{let ex,eN=ey.target;if(!eN||"radio"!==eN.type||"true"!==eN.dataset.rueRadioInput)return;let ew=eN.dataset.rueRadioValue,ek=sh(ew),eC=eF.find(eb=>oh(eb.value)===ew),e$=void 0!==eb;if(void 0===ek){e$&&eq();return}ex=e$?eb:eR.value,e$||(eR.value=ek),ek!==ex&&eI&&eI(ek,ey,{checked:!0,value:ek,previousValue:ex,optionType:eS,option:eC}),ek!==ex&&eC?.onChange&&eC.onChange(ey,{checked:!0,value:ek,optionType:eS}),eq()},children:eF.length?eF.map(eb=>n(dh,{value:eb.value,checked:eW===eb.value,disabled:eN||eb.disabled,name:eD,title:eb.title,id:eb.id,required:eb.required,optionType:eS,buttonStyle:ej,size:eb.size??eA,color:eb.color??ez,block:eM,rootClassName:eb.className,rootStyle:eb.style,children:eb.label},oh(eb.value))):e$})},Button:eb=>n(dh,{...eb,optionType:"button"})}),ph=0,mh=(eb,ey)=>ey?`${eb} ${ey}`:eb,hh=(eb,ey)=>{let ex=Number(eb);return Number.isFinite(ex)?ex:ey},gh=(eb,ey,ex)=>eb<ey?ey:eb>ex?ex:eb,_h=(eb,ey)=>{let ex=hh(eb,0),eN=hh(ey,100);return eN<=ex?{min:ex,max:ex+1}:{min:ex,max:eN}},vh=eb=>{let ey=hh(eb,1);return ey>0?ey:1},yh=eb=>{switch(eb){case"small":return"sm";case"default":case"medium":return"md";case"large":return"lg";default:return eb}},bh=(eb,ey,ex,eN)=>gh(hh(eb,eN),ey,ex),xh=(eb,ey,ex)=>(eb-ey)/(ex-ey)*100,Sh=eb=>eb?!0===eb?{visible:!0,placement:"inline"}:{visible:!0,placement:eb.placement??"inline",className:eb.className,formatter:eb.formatter}:{visible:!1,placement:"inline"},Ch=eb=>"object"==typeof eb&&!!eb&&"value"in eb,wh=(eb,ey,ex)=>eb?.length?eb.map((eb,eN)=>{let ew=Ch(eb)?eb.value:eb,ek=bh(ew,ey,ex,ey),eC=Ch(eb)&&"label"in eb?eb.label:String(ew);return{key:`${eN}-${String(ew)}`,value:ek,label:eC,percent:xh(ek,ey,ex)}}).sort((eb,ey)=>eb.value-ey.value):[],Th=(eb,ey,ex)=>"function"==typeof ey?ey(eb,ex):String(eb),Eh=(eb,ey,ex)=>{let eN="range";eb&&(eN+=` range-${eb}`);let ew=yh(ey);return ew&&(eN+=` range-${ew}`),ex&&(eN+=` ${ex}`),eN},Dh=({id:eb,color:ey,size:ex,className:eN,rootClassName:ew,label:ek,hint:eC,helper:e$,labelClassName:eS,hintClassName:ej,helperClassName:eA,valueClassName:ez,marksClassName:eM,style:eL,rootStyle:eT,min:eI,max:eO,step:eE,value:eP,defaultValue:eR,showValue:eF,formatter:eD,marks:eB,disabled:eq,onInput:eW,onChange:eH,onValueChange:eV,onValueCommit:eK,...eZ})=>{let eY=(0,e.useRef)(),eU=(0,e.useRef)(),eQ=eZ.ref,eG=(0,e.ref)(`rue-range-${ph++}`),eJ=_h(eI,eO),eX=vh(eE),e0=void 0!==eP,e1=(0,e.ref)(bh(eR??eP??eJ.min,eJ.min,eJ.max,eJ.min)),e2=e0?bh(eP,eJ.min,eJ.max,e1.value):bh(e1.value,eJ.min,eJ.max,eJ.min),e5=Sh(eF),e3=wh(eB,eJ.min,eJ.max),e4=eb??eG.value,e6={min:eJ.min,max:eJ.max,percent:xh(e2,eJ.min,eJ.max)},e7=e5.formatter??eD,e8=Th(e2,e7,e6),e9="string"==typeof e8||"number"==typeof e8?String(e8):void 0,tb=null!=ek||null!=eC||null!=e$||e5.visible||e3.length>0||!!ew||!!eT||!!eS||!!ej||!!eA||!!ez||!!eM;"ref"in eZ&&delete eZ.ref;let ty=eb=>{let ey=Th(eb,e7,{min:eJ.min,max:eJ.max,percent:xh(eb,eJ.min,eJ.max)}),ex="string"==typeof ey||"number"==typeof ey?String(ey):void 0;eY.current&&(eY.current.value=String(eb),eY.current.setAttribute("aria-valuenow",String(eb)),void 0===ex?eY.current.removeAttribute("aria-valuetext"):eY.current.setAttribute("aria-valuetext",ex)),eU.current&&(void 0!==ex&&eU.current.querySelectorAll('[data-rue-range-output="true"]').forEach(eb=>{eb.textContent=ex}),eU.current.querySelectorAll("[data-rue-range-mark]").forEach(ey=>{let ex=eb>=Number(ey.getAttribute("data-rue-range-mark"));ey.className=`absolute top-0 flex -translate-x-1/2 flex-col items-center gap-1 text-[11px] ${ex?"font-medium text-base-content":"text-base-content/55"}`;let eN=ey.firstElementChild;eN&&(eN.className=ex?"h-2 w-px bg-base-content/80":"h-2 w-px bg-base-content/25")}))};(0,e.onMounted)(()=>{ty(e2)}),(0,e.watch)(()=>eP,eb=>{e0&&ty(bh(eb,eJ.min,eJ.max,e1.value))},{immediate:!0});let tx=n("input",{...eZ,ref:eb=>{eY.current=eb??void 0,"function"==typeof eQ?eQ(eb):eQ&&"object"==typeof eQ&&(eQ.current=eb??void 0)},id:e4,type:"range",className:Eh(ey,ex,eN),style:eL,min:String(eJ.min),max:String(eJ.max),step:void 0===eE?void 0:String(eX),value:String(e2),disabled:eq,"aria-valuemin":String(eJ.min),"aria-valuemax":String(eJ.max),"aria-valuenow":String(e2),"aria-valuetext":e9,onInput:eb=>{let ey=eb.target,ex=bh(ey?.value,eJ.min,eJ.max,e2);e0||(e1.value=ex,ty(ex)),eW?.(eb),eV?.(ex,eb)},onChange:eb=>{let ey=eb.target,ex=bh(ey?.value,eJ.min,eJ.max,e2);e0||(e1.value=ex,ty(ex)),eH?.(eb),eK?.(ex,eb)}});return tb?r("div",{ref:eb=>{eU.current=eb??void 0},className:mh("w-full space-y-3",ew),style:eT,"data-rue-range-root":"true",children:[null!=ek||null!=eC||e5.visible&&"inline"===e5.placement?r("div",{className:"flex items-start justify-between gap-4",children:[r("div",{className:"min-w-0 space-y-1",children:[null==ek?null:n("label",{htmlFor:e4,className:mh("block text-sm font-medium text-base-content",eS),children:ek}),null==eC?null:n("p",{className:mh("m-0 text-xs text-base-content/65",ej),children:eC})]}),e5.visible&&"inline"===e5.placement?n("output",{htmlFor:e4,className:mh(mh("shrink-0 rounded-full bg-base-200 px-3 py-1 text-xs font-medium text-base-content",e5.className),ez),"data-rue-range-output":"true",children:e8}):null]}):null,n("div",{className:"w-full",children:tx}),e5.visible&&"below"===e5.placement?n("div",{className:"flex justify-end",children:n("output",{htmlFor:e4,className:mh(mh("rounded-full bg-base-200 px-3 py-1 text-xs font-medium text-base-content",e5.className),ez),"data-rue-range-output":"true",children:e8})}):null,e3.length>0?n("div",{className:mh("relative h-10",eM),"data-rue-range-marks":"true",children:e3.map(eb=>{let ey=e2>=eb.value;return r("span",{className:mh(`absolute top-0 flex -translate-x-1/2 flex-col items-center gap-1 text-[11px] ${ey?"font-medium text-base-content":"text-base-content/55"}`),style:{left:`${eb.percent}%`},"data-rue-range-mark":String(eb.value),children:[n("span",{className:`h-2 w-px ${ey?"bg-base-content/80":"bg-base-content/25"}`}),null==eb.label?null:n("span",{className:"whitespace-nowrap",children:eb.label})]},eb.key)})}):null,null==e$?null:n("p",{className:mh("m-0 text-xs text-base-content/60",eA),children:e$})]}):tx},Oh=0,kh=(eb,ey)=>eb?ey?`${eb} ${ey}`:eb:ey??"",Ah=eb=>Array.isArray(eb)?eb.length>0:null!=eb,jh=(eb,ey,ex)=>Math.min(ex,Math.max(ey,eb)),Mh=eb=>{switch(eb){case"small":return"sm";case"default":case"medium":case"middle":return"md";case"large":return"lg";default:return eb}},Nh=eb=>{switch(Mh(eb)){case"xs":return"text-lg";case"sm":return"text-xl";case"lg":return"text-3xl";case"xl":return"text-4xl";default:return"text-2xl"}},Ph=eb=>"number"!=typeof eb||Number.isNaN(eb)?5:Math.max(1,Math.round(eb)),Fh=(eb,ey,ex)=>{if("number"!=typeof eb||Number.isNaN(eb))return 0;let eN=jh(eb,0,ex);return Number((ey?Math.round(2*eN)/2:Math.round(eN)).toFixed(1))},Ih="0.35",Lh="1",Rh="0.45",zh="bg-orange-400",Bh="bg-base-content",Vh=(eb,ey,ex)=>{let eN="rating",ew=Mh(eb);return ew&&(eN+=` rating-${ew}`),ey&&(eN+=" rating-half"),ex&&(eN+=` ${ex}`),eN},Hh=(eb,ey,ex,eN,ew)=>{let ek=eN?Vh(eb,!1,"rue-rating align-middle select-none"):kh("rue-rating inline-flex flex-wrap items-center gap-1 align-middle select-none",Nh(eb));return ek=ey?kh(ek,"cursor-not-allowed opacity-50"):ex?kh(ek,"cursor-default opacity-85"):kh(ek,"cursor-pointer"),kh(ek,ew)},Uh=(eb,ey,ex)=>{let eN=ey?"group relative inline-flex shrink-0 items-center justify-center border-0 bg-transparent p-0 leading-none opacity-100 transition duration-150":"group relative inline-flex shrink-0 items-center justify-center rounded-full border-0 bg-transparent p-0.5 leading-none transition duration-150";return eN=eb?kh(eN,"hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25"):kh(eN,"focus:outline-none"),kh(eN,ex)},Wh=(eb,ey)=>kh("relative inline-flex items-center justify-center leading-none",kh(Nh(eb),ey)),Gh=(eb,ey,ex)=>{eb.classList.remove(zh,Bh),eb.classList.add(ex||ey<=0?Bh:zh),eb.style.opacity=ex?Rh:ey>0?Lh:Ih},Kh=(eb,ey)=>{let ex=eb?.[ey];if(null!=ex){if("string"==typeof ex||"number"==typeof ex)return String(ex);if("object"==typeof ex&&"title"in ex&&null!=ex.title)return String(ex.title)}},qh=(eb,ey,ex)=>{let eN=ey+1;if(!ex)return eN;let ew=eb.currentTarget?.getBoundingClientRect?.();return ew&&ew.width&&eb.clientX-ew.left<=ew.width/2?ey+.5:eN},Jh=()=>n("span",{"aria-hidden":"true",className:"mask mask-star inline-block size-[1em] bg-current"}),Yh=(eb,ey)=>"function"==typeof eb?eb(ey):eb??n(Jh,{}),Xh=Object.assign(({size:eb,half:ey,allowHalf:ex,count:eN,value:ew,defaultValue:ek,allowClear:eC=!0,disabled:e$,readOnly:eS,name:ej,character:eA,tooltips:ez,className:eM,itemClassName:eL,characterClassName:eT,activeCharacterClassName:eI,inactiveCharacterClassName:eO,clearLabel:eE="clear rating",style:eP,children:eR,onChange:eF,onHoverChange:eD,onBlur:eB,onFocus:eq,onKeyDown:eW,...eH})=>{let eV=ex??ey??!1,eK=Ph(eN),eZ=(0,e.ref)(ej??`rue-rating-${Oh++}`),eY=(0,e.useRef)(),eU=(0,e.ref)(Fh(ek??ew??0,eV,eK)),eQ=(0,e.ref)(null),eG="number"==typeof ew?Fh(ew,eV,eK):void 0;void 0!==eG&&eU.value!==eG&&(eU.value=eG);let eJ=void 0===eG?Fh(eU.value,eV,eK):eG,eX=eQ.value??eJ,e0=!e$&&!eS,e1=null==eA&&!eV,{onMouseLeave:e2,...e5}=eH,e3=eb=>{eD&&eD(eb)},e4=()=>{let eb=eY.current;if(!eb)return;let ey=Fh(eU.value,eV,eK),ex=eQ.value??ey;eb.dataset.ratingValue=String(ey),eb.dataset.ratingHover=null==eQ.value?"":String(eQ.value);let eN=eb.querySelector('input[type="hidden"][data-rating-hidden="true"]');eN&&(eN.value=String(ey)),Array.from(eb.querySelectorAll("button[data-rating-index]")).forEach(eb=>{let eN=Number(eb.dataset.ratingIndex??0),ew=jh(ex-eN,0,1),ek=eb.querySelector('[data-rating-active-layer="true"]'),eC=eb.querySelector('[data-rating-legacy-mask="true"]');eb.dataset.ratingFill=String(ew),ey===eN+1?eb.dataset.ratingCurrent="true":delete eb.dataset.ratingCurrent,eb.setAttribute("aria-pressed",ew>0?"true":"false"),eb.tabIndex=e$?-1:ey>0?Math.ceil(ey)-1===eN?0:-1:0===eN?0:-1,ek&&(ek.style.width=`${100*ew}%`),eC&&Gh(eC,ew,!!e$)})},e6=eb=>{if(!e0)return;let ey=Fh(eb,eV,eK),ex=eC&&eJ===ey?0:ey;eU.value=ex,eQ.value=null,e3(0),e4(),eF&&eF(ex)},e7=eV?.5:1;if((0,e.onMounted)(()=>{e4()}),(0,e.watch)(()=>"number"==typeof ew?Fh(ew,eV,eK):void 0,eb=>{"number"==typeof eb&&(eU.value=eb),e4()},{immediate:!0}),Ah(eR))return n("div",{...e5,style:eP,className:Vh(eb,eV,eM),children:eR});let e8=ej??eZ.value,e9=Array.from({length:eK},(eb,ey)=>ey);return r("div",{...e5,ref:eY,style:eP,className:Hh(eb,!!e$,!!eS,e1,eM),"data-rating-mode":"auto","data-rating-value":String(eJ),"data-rating-hover":null==eQ.value?"":String(eQ.value),"data-rating-name":e8,onMouseLeave:eb=>{null!==eQ.value&&(eQ.value=null,e3(0),e4()),e2&&e2(eb)},children:[ej?n("input",{type:"hidden",name:ej,value:eJ,disabled:e$,"data-rating-hidden":"true"}):null,e9.map(ey=>{let ex=ey+1,eN=jh(eX-ey,0,1),ew=null!==eQ.value&&eX>=ex,ek=Kh(ez,ey),eS={index:ey,value:ex,fill:eN,checked:eJ>=ex,hovered:ew,half:eV},ej=Wh(eb,eT),eM=e$?-1:eJ>0?Math.ceil(eJ)-1===ey?0:-1:0===ey?0:-1;return r("button",{type:"button",role:"button",title:ek,"aria-label":ek??`${ex} star`,"aria-disabled":e$?"true":void 0,"aria-pressed":eN>0?"true":"false",tabIndex:eM,disabled:e$,className:Uh(e0,e1,eL),"data-rating-index":String(ey),"data-rating-fill":String(eN),"data-rating-current":eJ===ex?"true":void 0,onFocus:eb=>{eq&&eq(eb)},onBlur:eb=>{eB&&eB(eb)},onMouseMove:eb=>{if(!e0)return;let ex=qh(eb,ey,eV);eQ.value!==ex&&(eQ.value=ex,e3(ex),e4())},onClick:eb=>{eb.preventDefault?.(),e6(qh(eb,ey,eV))},onKeyDown:eb=>((eb,ey)=>{let ex=eb.key,eN=null;if("ArrowRight"===ex||"ArrowUp"===ex?eN=jh(eJ+e7,eC?0:e7,eK):"ArrowLeft"===ex||"ArrowDown"===ex?eN=jh(eJ-e7,eC?0:e7,eK):"Home"===ex?eN=eC?0:e7:"End"===ex?eN=eK:("Backspace"===ex||"Delete"===ex)&&eC?eN=0:(" "===ex||"Enter"===ex)&&(eN=ey+1),null===eN){eW&&eW(eb);return}eb.preventDefault?.(),0===eN?(eU.value=0,eQ.value=null,e3(0),e4(),e0&&eF&&eF(0)):e6(eN),eW&&eW(eb)})(eb,ey),children:[e1?n("span",{className:kh(kh("mask mask-star inline-block size-[1em] transition-colors duration-150",e$?`${Bh} opacity-45`:eN>0?`${zh} opacity-100`:`${Bh} opacity-[0.35]`),eT),"aria-hidden":"true","data-rating-legacy-mask":"true"}):r("span",{className:"relative inline-flex",children:[n("span",{className:kh(ej,e$?"text-base-content/20":eO??"text-base-content/35"),"aria-hidden":"true",children:Yh(eA,eS)}),n("span",{className:"pointer-events-none absolute inset-y-0 left-0 overflow-hidden",style:{width:`${100*eN}%`},"aria-hidden":"true","data-rating-active-layer":"true",children:n("span",{className:kh(ej,e$?"text-base-content/45":eI??"text-orange-400"),children:Yh(eA,eS)})})]}),eC&&e0&&eJ>0&&eJ===ex?n("span",{className:"sr-only",children:eE}):null]},`${e8}-${ey}`)})]})},{Item:({as:eb="input",hidden:ey,type:ex,className:eN,children:ew,...ek})=>{let eC=kh(ey?"rating-hidden":void 0,eN).trim();return"input"===eb?n("input",{...ek,type:ex??"radio",className:eC||void 0}):n(eb,{...ek,className:eC||void 0,children:ew})}}),Zh=(...eb)=>eb.filter(Boolean).join(" "),Qh=(...eb)=>{let ey={};return eb.forEach(eb=>{eb&&Object.assign(ey,eb)}),Object.keys(ey).length>0?ey:void 0},$h=eb=>{if(null!=eb)return"number"==typeof eb?`${eb}px`:eb},eg=eb=>{switch(eb){case"small":return"sm";case"default":case"medium":case"middle":return"md";case"large":return"lg";default:return eb??"md"}},tg=(eb,ey)=>!1===eb?{enabled:!1,props:{}}:eb&&"object"==typeof eb?{enabled:!0,props:eb}:{enabled:!0===eb||ey,props:{}},ng=eb=>Array.isArray(eb)?eb.flatMap(eb=>ng(eb)):null==eb||"boolean"==typeof eb?[]:[eb],rg=eb=>Array.isArray(eb)?eb.map(eb=>rg(eb)):eb,ig=eb=>({...eb,children:rg(eb.children)}),ag=eb=>{if(null!=eb){if("function"==typeof eb)return eb();if("object"==typeof eb){if("function"==typeof eb.get)return eb.get();if("value"in eb)return eb.value}return eb}},og=(eb,ey,ex)=>(0,e.h)(eb,ey,...ng(ex)),sg=(eb,ey,ex)=>Zh("skeleton",ey&&"skeleton-text",ex&&"animate-pulse",eb),cg=eb=>{let ey=eg(eb);if("number"==typeof ey)return{className:void 0,style:{width:`${ey}px`,height:`${ey}px`}};switch(ey){case"xs":return{className:"h-8 w-8",style:void 0};case"sm":return{className:"h-10 w-10",style:void 0};case"lg":return{className:"h-16 w-16",style:void 0};case"xl":return{className:"h-20 w-20",style:void 0};default:return{className:"h-12 w-12",style:void 0}}},lg=eb=>{let ey=eg(eb);if("number"==typeof ey)return{className:void 0,style:{height:`${ey}px`}};switch(ey){case"xs":return{className:"h-7",style:void 0};case"sm":return{className:"h-8",style:void 0};case"lg":return{className:"h-12",style:void 0};case"xl":return{className:"h-14",style:void 0};default:return{className:"h-10",style:void 0}}},ug=({as:eb="div",active:ey,className:ex,style:eN,children:ew,...ek})=>{let eC=ag(ey);return og(eb,{...ek,className:sg(Zh("flex min-h-24 w-full items-center justify-center rounded-2xl text-base-content/40",ex),!1,eC),style:eN},ew)},dg=(eb,ey)=>sg(Zh("flex min-h-24 w-full items-center justify-center rounded-2xl text-base-content/40",eb),!1,ey),fg=(eb,ey="video",ex)=>dg(Zh("square"===ey?"aspect-square w-32":"aspect-video w-48",eb),ex),pg=(eb,ey)=>eb&&!ey?{size:"lg",shape:"square"}:{size:"lg",shape:"circle"},mg=(eb,ey)=>!eb&&ey?{width:"38%"}:eb&&ey?{width:"50%"}:{},hg=(eb,ey)=>({rows:!eb&&ey?3:2,width:eb&&ey?void 0:"61%"}),gg=({as:eb="div",text:ey,active:ex,className:eN,rootClassName:ew,classNames:ek,style:eC,styles:e$,children:eS,...ej})=>og(eb,{...ej,className:sg(Zh(ek?.root,eN,ew),ey,ex),style:Qh(e$?.root,eC)},eS),_g=({active:eb,className:ey,style:ex,size:eN,shape:ew="circle",...ek})=>{let eC=cg(eN);return n("div",{...ek,className:sg(Zh(eC.className,"square"===ew?"rounded-2xl":"rounded-full",ey),!1,eb),style:{...eC.style,...ex}})},vg=({active:eb,className:ey,style:ex,size:eN,shape:ew="default",block:ek,...eC})=>{let e$=lg(eN),eS="square"===ew||"circle"===ew;return n("div",{...eC,className:sg(Zh(e$.className,ek?"w-full":eS?"w-10":"w-24","circle"===ew||"round"===ew?"rounded-full":"rounded-xl",ey),!1,eb),style:{...e$.style,...eS&&e$.style?.height?{width:e$.style.height}:{},...ex}})},yg=({active:eb,className:ey,style:ex,size:eN,block:ew,...ek})=>{let eC=lg(eN);return n("div",{...ek,className:sg(Zh(eC.className,ew?"w-full":"w-56","rounded-xl",ey),!1,eb),style:{...eC.style,...ex}})},bg=({...eb})=>{let ey=(0,e.useSetup)(()=>({container:null,startEl:null,endEl:null,propsSig:(0,e.signal)(ig(eb),{},!0),started:!1,effect:null})),ex=()=>{if(ey.container||typeof document>"u")return;let eb=document.createElement("span");eb.style.display="contents";let ex=document.createComment("rue-skeleton-node-start"),eN=document.createComment("rue-skeleton-node-end");eb.appendChild(ex),eb.appendChild(eN),ey.container=eb,ey.startEl=ex,ey.endEl=eN};return(0,e.onMounted)(()=>{ey.started||(ey.started=!0,ex(),ey.container&&ey.startEl&&ey.endEl&&(0,e.renderBetween)(ug(ey.propsSig.get()),ey.container,ey.startEl,ey.endEl),ey.effect=(0,e.watchEffect)(()=>{let eb=ey.propsSig.get(),ex=(()=>{if(!ey.startEl||!ey.endEl)return null;let eb=ey.startEl.nextSibling;for(;eb&&eb!==ey.endEl;){if(1===eb.nodeType)return eb;eb=eb.nextSibling}return null})(),eN=ag(eb.active);ex&&(ex.className=dg(eb.className,eN))}))}),(0,e.onUnmounted)(()=>{ey.effect&&(ey.effect.dispose(),ey.effect=null),ey.started=!1,ey.container&&ey.startEl&&ey.endEl&&(0,e.renderBetween)([],ey.container,ey.startEl,ey.endEl)}),(0,e.vapor)(()=>(ex(),ey.container?(ey.propsSig.set(ig(eb)),ey.container):ug(eb)))},xg=()=>(0,e.h)("svg",{viewBox:"0 0 64 64",className:"h-10 w-10 fill-current opacity-60","aria-hidden":"true"},(0,e.h)("path",{d:"M10 14a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v36a4 4 0 0 1-4 4H14a4 4 0 0 1-4-4V14Zm4 0v28.28l9.64-9.63a3 3 0 0 1 4.24 0L36 40.77l6.64-6.63a3 3 0 0 1 4.24 0L50 37.25V14H14Zm36 36V42.9l-5.24-5.23L38.12 44.3a3 3 0 0 1-4.24 0l-8.12-8.11L14 47.97V50h36ZM22 28a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z"})),Sg=({as:eb="div",active:ey,aspect:ex="video",className:eN,children:ew,style:ek,...eC})=>{let e$=ag(ex)??"video",eS=ag(ey),ej=ng(ew).length>0?ew:xg();return og(eb,{...eC,className:fg(eN,e$,eS),style:ek},ej)},Cg=({...eb})=>{let ey=(0,e.useSetup)(()=>({container:null,startEl:null,endEl:null,propsSig:(0,e.signal)(ig(eb),{},!0),started:!1,effect:null})),ex=()=>{if(ey.container||typeof document>"u")return;let eb=document.createElement("span");eb.style.display="contents";let ex=document.createComment("rue-skeleton-image-start"),eN=document.createComment("rue-skeleton-image-end");eb.appendChild(ex),eb.appendChild(eN),ey.container=eb,ey.startEl=ex,ey.endEl=eN};return(0,e.onMounted)(()=>{ey.started||(ey.started=!0,ex(),ey.container&&ey.startEl&&ey.endEl&&(0,e.renderBetween)(Sg(ey.propsSig.get()),ey.container,ey.startEl,ey.endEl),ey.effect=(0,e.watchEffect)(()=>{let eb=ey.propsSig.get(),ex=(()=>{if(!ey.startEl||!ey.endEl)return null;let eb=ey.startEl.nextSibling;for(;eb&&eb!==ey.endEl;){if(1===eb.nodeType)return eb;eb=eb.nextSibling}return null})(),eN=ag(eb.aspect)??"video",ew=ag(eb.active);ex&&(ex.className=fg(eb.className,eN,ew))}))}),(0,e.onUnmounted)(()=>{ey.effect&&(ey.effect.dispose(),ey.effect=null),ey.started=!1,ey.container&&ey.startEl&&ey.endEl&&(0,e.renderBetween)([],ey.container,ey.startEl,ey.endEl)}),(0,e.vapor)(()=>(ex(),ey.container?(ey.propsSig.set(ig(eb)),ey.container):Sg(eb)))},wg=(eb,ey,ex,eN,ew)=>{let{className:ek,style:eC,width:e$,...eS}=eb;return n("div",{...eS,className:sg(Zh("h-4 max-w-full",ex&&"rounded-full",eN,ek),!1,ey),style:Qh({width:$h(e$)},ew,eC)})},Tg=(eb,ey,ex)=>Array.isArray(eb)?eb[ey]??(ey===ex-1&&eb.length>0?eb[eb.length-1]:void 0):ey===ex-1?eb:void 0,Eg=(eb,ey,ex,eN,ew)=>{let{className:ek,style:eC,rows:e$=2,width:eS,rowClassName:ej,...eA}=eb;return n("div",{...eA,className:Zh("flex flex-col gap-3",eN,ek),style:Qh(ew,eC),children:Array.from({length:e$}).map((eb,eN)=>n("div",{className:sg(Zh("h-4 max-w-full",ex&&"rounded-full",ej),!1,ey),style:{width:$h(Tg(eS,eN,e$))}},eN))})},Dg=Object.assign(eb=>{let{loading:ey,active:ex,avatar:eN,title:ew,paragraph:ek,round:eC,className:e$,rootClassName:eS,classNames:ej,style:eA,styles:ez,children:eM,...eL}=eb;if(!(Object.prototype.hasOwnProperty.call(eb,"loading")||void 0!==eN||void 0!==ew||void 0!==ek||eC))return n(gg,{...eb});if(!1===ey)return eM??null;let eT=tg(eN,!1),eI=tg(ew,!0),eO=tg(ek,!0),eE=eT.enabled,eP=eI.enabled,eR=eO.enabled,eF=eE?{...pg(eP,eR),...eT.props}:null,eD=eP?{...mg(eE,eR),...eI.props}:null,eB=eR?{...hg(eE,eP),...eO.props}:null;return r("div",{...eL,className:Zh("flex w-full gap-4",!eE&&"flex-col",ej?.root,e$,eS),style:Qh(ez?.root,eA),children:[eE?n("div",{className:Zh("shrink-0",ej?.header),style:ez?.header,children:n(_g,{active:ex,...eF,className:Zh(ej?.avatar,eF?.className),style:Qh(ez?.avatar,eF?.style)})}):null,eP||eR?r("div",{className:Zh("flex min-w-0 flex-1 flex-col gap-3",ej?.section),style:ez?.section,children:[eP?wg(eD??{},ex,eC,ej?.title,ez?.title):null,eR?Eg(eB??{},ex,eC,ej?.paragraph,ez?.paragraph):null]}):null]})},{Avatar:_g,Button:vg,Input:yg,Image:Cg,Node:bg}),Og=(eb,ey)=>ey?`${eb} ${ey}`:eb,kg=eb=>Array.isArray(eb)?eb.flatMap(eb=>kg(eb)):null==eb?[]:[eb],Ag=eb=>{switch(eb){case"top":return{vertical:"top"};case"bottom":return{vertical:"bottom"};case"start":return{horizontal:"start"};case"end":return{horizontal:"end"};case"top-start":return{vertical:"top",horizontal:"start"};case"top-end":return{vertical:"top",horizontal:"end"};case"bottom-start":return{vertical:"bottom",horizontal:"start"};case"bottom-end":return{vertical:"bottom",horizontal:"end"};default:return{}}},jg=({as:eb="div",vertical:ey,horizontal:ex,placement:eN,reverse:ew,className:ek,children:eC,...e$})=>{let eS=Ag(eN),ej=ey??eS.vertical,eA=ex??eS.horizontal,ez=kg(eC),eM=ew?[...ez].reverse():ez,eL="stack";return ej&&"center"!==ej&&(eL+=` stack-${ej}`),eA&&"center"!==eA&&(eL+=` stack-${eA}`),(0,e.h)(eb,{...e$,className:Og(eL,ek)},...eM)},Mg=(...eb)=>eb.filter(Boolean).join(" "),Ng=(eb,ey)=>ey?`${eb} ${ey}`:eb,Pg=(eb,ey)=>ey??eb,Fg=(eb,ey)=>ey||("error"===eb?"error":"finish"===eb||"process"===eb?"primary":void 0),Ig=(eb,ey)=>{if(!ey){if("finish"===eb)return"✓";if("error"===eb)return"✕"}},Lg=eb=>{"function"==typeof eb.preventDefault&&eb.preventDefault(),"function"==typeof eb.stopPropagation&&eb.stopPropagation()},Rg=({status:eb})=>n("span",{className:"wait"===eb?"inline-block size-2.5 rounded-full border border-base-300 bg-base-100":"inline-block size-2.5 rounded-full bg-current"}),zg=(eb,ey)=>{if(!eb)return;let ex=n(Rg,{status:ey.status});return"function"==typeof eb?eb(ex,ey):ex},Bg=(eb,ey,ex,eN)=>eb.status?eb.status:"number"==typeof ex?ey<ex?"finish":ey===ex?eN??"process":"wait":"wait",Vg=({as:eb="li",color:ey,className:ex,title:eN,description:ew,content:ek,subTitle:eC,icon:e$,status:eS,disabled:ej,clickable:eA,dataContent:ez,children:eM,index:eL,onClick:eT,onKeyDown:eI,...eO})=>{let eE=ek??ew,eP=eN??eM,eR=eA??!!eT,eF=Fg(eS,ey),eD=ez??eO["data-content"]??Ig(eS,null!=e$),eB=null!=eN||null!=eE||null!=eC||null!=e$,eq=eO["aria-current"]??("process"===eS?"step":void 0),eW="step";eF&&(eW+=` step-${eF}`),eR&&!ej&&(eW+=" cursor-pointer"),ej&&(eW+=" opacity-50"),eR&&ej&&(eW+=" cursor-not-allowed");let eH={...eO,className:Ng(eW,ex)};void 0!==eD&&(eH["data-content"]=eD);let eV=eb=>{ej?Lg(eb):eT&&eT(eb,eL)};return eR&&(eH.role=eO.role??"button",eH.tabIndex=eO.tabIndex??(ej?-1:0),eH.onClick=eV,eH.onKeyDown=eb=>{if(eI&&eI(eb),eb.defaultPrevented||ej){ej&&Lg(eb);return}("Enter"===eb.key||" "===eb.key)&&(eb.preventDefault(),eV(eb))}),n(eb,{...eH,"aria-current":eq,"aria-disabled":ej?"true":void 0,children:eB?r(e.Fragment,{children:[null==e$?null:n("span",{className:Ng("step-icon",null==eE?void 0:"mt-0.5"),"aria-hidden":"true",children:e$}),r("span",{className:"inline-flex min-w-0 flex-col gap-1 py-1 text-start",children:[null!=eP||null!=eC?r("span",{className:"flex flex-wrap items-center gap-2 leading-tight",children:[null==eP?null:n("span",{className:"font-medium",children:eP}),null==eC?null:n("span",{className:"text-xs opacity-60",children:eC})]}):null,null==eE?null:n("span",{className:"text-xs leading-snug opacity-70",children:eE})]})]}):eM})},Hg=Object.assign(({as:eb="ul",direction:ey,orientation:ex,className:eN,children:ew,items:ek,current:eC,status:e$,progressDot:eS,onChange:ej,...eA})=>{let ez=Pg(ey,ex),eM=ek&&ek.length>0?ek.map((eb,ey)=>{let ex=Bg(eb,ey,eC,e$),eN=eb.icon??zg(eS,{index:ey,status:ex,title:eb.title,description:eb.description,content:eb.content}),ew=eb.clickable??(!!ej||!!eb.onClick);return n(Vg,{...eb,index:ey,status:ex,color:Fg(ex,eb.color),icon:eN,clickable:ew,onClick:(ey,ex)=>{eb.disabled||(eb.onClick&&"number"==typeof ex&&eb.onClick(ey,ex),ej&&"number"==typeof ex&&ex!==eC&&ej(ex))}},eb.key??ey)}):ew,eL="steps";return ez&&(eL+=` steps-${ez}`),n(eb,{...eA,className:Mg(eL,eN),children:eM})},{Step:Vg,Icon:({as:eb="span",className:ey,children:ex,...eN})=>n(eb,{...eN,className:Ng("step-icon",ey),children:ex})}),Ug=(eb,ey)=>ey?`${eb} ${ey}`:eb,Wg=(eb,ey=[])=>(null==eb||!1===eb||(Array.isArray(eb)?eb.forEach(eb=>Wg(eb,ey)):ey.push(eb)),ey),Gg=eb=>Wg(eb).some(eb=>!!eb&&"object"==typeof eb&&"input"===eb.type&&eb.props?.type==="checkbox"),Kg=(eb,ey,ex,eN,ew,ek)=>{let eC="swap";return eb&&(eC+=" swap-active"),(ey||"rotate"===eN)&&(eC+=" swap-rotate"),(ex||"flip"===eN)&&(eC+=" swap-flip"),ew&&(eC+=" cursor-not-allowed opacity-60"),ek&&(eC+=` ${ek}`),eC},qg=Object.assign(({as:eb="label",active:ey,checked:ex,defaultChecked:eN,disabled:ew,indeterminate:ek,defaultIndeterminate:eC,rotate:e$,flip:eS,effect:ej,className:eA,inputClassName:ez,inputProps:eM,children:eL,onChange:eT,onCheckedChange:eI,...eO})=>{let eE=(0,e.useRef)(),eP=(0,e.ref)(!!eC),eR=Gg(eL),eF=!eR&&("boolean"==typeof ex||"boolean"==typeof eN||"boolean"==typeof ew||"boolean"==typeof ek||"boolean"==typeof eC||!!ez||!!eM||!!eT||!!eI),eD=eR||eF?"input":"class",eB=()=>{eE.current&&("boolean"==typeof ex&&(eE.current.checked=ex),eE.current.indeterminate="boolean"==typeof ek?ek:eP.value)};return(0,e.onMounted)(()=>{eB()}),(0,e.watch)(()=>ex,()=>{eB()},{immediate:!0}),(0,e.watch)(()=>ek,()=>{eB()},{immediate:!0}),(0,e.watch)(()=>eP.value,()=>{eB()}),r(eb,{...eO,className:Kg(ey,e$,eS,ej,ew,eA),"aria-disabled":ew?"true":eO["aria-disabled"],"data-rue-swap-root":"true","data-rue-swap-mode":eD,"data-rue-swap-disabled":ew?"true":"false",children:[eF?n("input",{...eM,ref:eE,type:"checkbox",checked:ex,defaultChecked:eN,disabled:ew,autoComplete:eM?.autoComplete??"off",className:ez,"aria-checked":("boolean"==typeof ek?ek:eP.value)?"mixed":eM?.["aria-checked"],"data-rue-swap-input":"true",onChange:eb=>{let eN=eb.target?.checked===!0,ew="boolean"==typeof ek&&ek;"boolean"!=typeof ek&&(eP.value=!1),"boolean"==typeof ex&&eE.current&&(eE.current.checked=ex),eB(),eT&&eT(eb,{checked:eN,indeterminate:ew,active:!!ey||eN,mode:eD}),eI&&eI(eN,eb)}}):null,eL]})},{On:({as:eb="div",className:ey,children:ex,...eN})=>n(eb,{...eN,className:Ug("swap-on",ey),children:ex}),Off:({as:eb="div",className:ey,children:ex,...eN})=>n(eb,{...eN,className:Ug("swap-off",ey),children:ex}),Indeterminate:({as:eb="div",className:ey,children:ex,...eN})=>n(eb,{...eN,className:Ug("swap-indeterminate",ey),children:ex})}),Jg={themeName:"default",resolvedThemeName:void 0,appearance:"light",density:"default",colorScheme:"light",colors:{primary:"#2563eb",primaryContent:"#eff6ff",secondary:"#0f766e",secondaryContent:"#ecfeff",accent:"#9333ea",accentContent:"#faf5ff",neutral:"#0f172a",neutralContent:"#f8fafc",base100:"#f8fafc",base200:"#eef2ff",base300:"#e2e8f0",baseContent:"#0f172a",info:"#0ea5e9",infoContent:"#082f49",success:"#16a34a",successContent:"#f0fdf4",warning:"#d97706",warningContent:"#451a03",error:"#dc2626",errorContent:"#fef2f2"},radius:{selector:"0.5rem",field:"0.9rem",box:"1.4rem"},size:{selector:"0.25rem",field:"0.25rem"},spacing:{xs:"0.375rem",sm:"0.625rem",md:"1rem",lg:"1.5rem",xl:"2rem"},typography:{family:"ui-sans-serif, system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, monospace",size:"1rem",lineHeight:"1.5"},shadow:{sm:"0 12px 30px rgba(15, 23, 42, 0.08)",md:"0 20px 50px rgba(15, 23, 42, 0.12)",lg:"0 30px 70px rgba(15, 23, 42, 0.18)"},borderWidth:"1px",depth:1,noise:0},Yg={default:{},garden:{colors:{primary:"#2f855a",primaryContent:"#f0fff4",secondary:"#276749",secondaryContent:"#f0fff4",accent:"#2b6cb0",accentContent:"#eff6ff",base100:"#f6fff8",base200:"#e6ffed",base300:"#c6f6d5",baseContent:"#16351f",neutral:"#1f2d22",neutralContent:"#f7fff8",info:"#3182ce",success:"#2f855a",warning:"#b7791f",error:"#c53030"}},retro:{colors:{primary:"#7b4f2a",primaryContent:"#fff7ed",secondary:"#5b6c8c",secondaryContent:"#eff6ff",accent:"#c05621",accentContent:"#fff7ed",base100:"#fff9ed",base200:"#f7ead5",base300:"#e9d8b4",baseContent:"#3f2c1f",neutral:"#6b4f3a",neutralContent:"#fff7ed",info:"#3b82f6",success:"#15803d",warning:"#b45309",error:"#b91c1c"}},synthwave:{appearance:"dark",colorScheme:"dark",colors:{primary:"#e779c1",primaryContent:"#16081b",secondary:"#58c7f3",secondaryContent:"#04131d",accent:"#f3cc30",accentContent:"#241a02",base100:"#221551",base200:"#1a103d",base300:"#140b32",baseContent:"#f7f0ff",neutral:"#0f0b1f",neutralContent:"#f7f0ff",info:"#7dd3fc",success:"#4ade80",warning:"#facc15",error:"#fb7185"},shadow:{sm:"0 12px 30px rgba(20, 11, 50, 0.35)",md:"0 20px 50px rgba(20, 11, 50, 0.45)",lg:"0 30px 80px rgba(20, 11, 50, 0.55)"}},cyberpunk:{appearance:"dark",colorScheme:"dark",colors:{primary:"#ffed00",primaryContent:"#221a00",secondary:"#ff7598",secondaryContent:"#2f0513",accent:"#75d1f0",accentContent:"#04141c",base100:"#0d0d0d",base200:"#171717",base300:"#222222",baseContent:"#fff9d5",neutral:"#050505",neutralContent:"#fff9d5",info:"#38bdf8",success:"#4ade80",warning:"#facc15",error:"#fb7185"}},night:{appearance:"dark",colorScheme:"dark",colors:{primary:"#60a5fa",primaryContent:"#07111f",secondary:"#22d3ee",secondaryContent:"#04161a",accent:"#c084fc",accentContent:"#160a2a",base100:"#0f172a",base200:"#111c34",base300:"#1e293b",baseContent:"#e2e8f0",neutral:"#020617",neutralContent:"#f8fafc",info:"#38bdf8",success:"#4ade80",warning:"#fbbf24",error:"#f87171"},shadow:{sm:"0 14px 34px rgba(2, 6, 23, 0.32)",md:"0 22px 60px rgba(2, 6, 23, 0.42)",lg:"0 36px 90px rgba(2, 6, 23, 0.55)"}},coffee:{appearance:"dark",colorScheme:"dark",colors:{primary:"#c08457",primaryContent:"#2a1409",secondary:"#f5d0a9",secondaryContent:"#2a1409",accent:"#eab308",accentContent:"#271605",base100:"#21130f",base200:"#2e1d17",base300:"#3b261d",baseContent:"#f7e7db",neutral:"#160d0a",neutralContent:"#fff7f2",info:"#7dd3fc",success:"#4ade80",warning:"#fbbf24",error:"#fb7185"}}},Xg={theme:"default"},Zg=eb=>({...eb,colors:{...eb.colors},radius:{...eb.radius},size:{...eb.size},spacing:{...eb.spacing},typography:{...eb.typography},shadow:{...eb.shadow}}),Qg=(eb,ey)=>{let ex=Zg(eb);return ey&&(ey.appearance&&(ex.appearance=ey.appearance),ey.density&&(ex.density=ey.density),ey.colorScheme&&(ex.colorScheme=ey.colorScheme),ey.colors&&(ex.colors={...ex.colors,...ey.colors}),ey.radius&&(ex.radius={...ex.radius,...ey.radius}),ey.size&&(ex.size={...ex.size,...ey.size}),ey.spacing&&(ex.spacing={...ex.spacing,...ey.spacing}),ey.typography&&(ex.typography={...ex.typography,...ey.typography}),ey.shadow&&(ex.shadow={...ex.shadow,...ey.shadow}),ey.borderWidth&&(ex.borderWidth=ey.borderWidth),void 0!==ey.depth&&(ex.depth=ey.depth),void 0!==ey.noise&&(ex.noise=ey.noise)),ex},$g=eb=>eb?Array.isArray(eb)?[...eb]:[eb]:[],e_=eb=>eb?.theme?eb.theme:eb?.baseToken?.themeName?eb.baseToken.themeName:Xg.theme??"default",t_=eb=>{let ey=Zg(Jg),ex=Yg[eb],eN=ex?Qg(ey,ex):ey;return eN.themeName=eb,eN},n_=eb=>{let ey=Zg(eb);return ey.colorScheme=ey.appearance,ey.resolvedThemeName="default"===ey.themeName?void 0:ey.themeName,ey},r_=eb=>{let ey=Zg(eb);return ey.appearance="dark",ey.colorScheme="dark",ey.colors={...ey.colors,base100:"#111827",base200:"#172036",base300:"#243047",baseContent:"#f8fafc",neutral:"#020617",neutralContent:"#f8fafc",infoContent:"#082f49",successContent:"#052e16",warningContent:"#451a03",errorContent:"#450a0a"},ey.shadow={sm:"0 14px 34px rgba(2, 6, 23, 0.32)",md:"0 24px 64px rgba(2, 6, 23, 0.42)",lg:"0 36px 96px rgba(2, 6, 23, 0.54)"},ey},i_=eb=>{let ey=Zg(eb);return ey.density="compact",ey.radius={selector:"0.375rem",field:"0.75rem",box:"1rem"},ey.size={selector:"0.21875rem",field:"0.21875rem"},ey.spacing={xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.5rem"},ey.typography={...ey.typography,size:"0.95rem"},ey},a_=eb=>{let ey=e_(eb),ex=eb?.baseToken?Zg(eb.baseToken):t_(ey);return ex.themeName=ey,n_(Qg($g(eb?.algorithm).reduce((eb,ey)=>ey(eb),ex),eb?.token))},o_=eb=>({"--color-primary":eb.colors.primary,"--color-primary-content":eb.colors.primaryContent,"--color-secondary":eb.colors.secondary,"--color-secondary-content":eb.colors.secondaryContent,"--color-accent":eb.colors.accent,"--color-accent-content":eb.colors.accentContent,"--color-neutral":eb.colors.neutral,"--color-neutral-content":eb.colors.neutralContent,"--color-base-100":eb.colors.base100,"--color-base-200":eb.colors.base200,"--color-base-300":eb.colors.base300,"--color-base-content":eb.colors.baseContent,"--color-info":eb.colors.info,"--color-info-content":eb.colors.infoContent,"--color-success":eb.colors.success,"--color-success-content":eb.colors.successContent,"--color-warning":eb.colors.warning,"--color-warning-content":eb.colors.warningContent,"--color-error":eb.colors.error,"--color-error-content":eb.colors.errorContent,"--radius-selector":eb.radius.selector,"--radius-field":eb.radius.field,"--radius-box":eb.radius.box,"--size-selector":eb.size.selector,"--size-field":eb.size.field,"--border":eb.borderWidth,"--depth":String(eb.depth),"--noise":String(eb.noise),"--rue-theme-space-xs":eb.spacing.xs,"--rue-theme-space-sm":eb.spacing.sm,"--rue-theme-space-md":eb.spacing.md,"--rue-theme-space-lg":eb.spacing.lg,"--rue-theme-space-xl":eb.spacing.xl,"--rue-theme-font-family":eb.typography.family,"--rue-theme-font-mono":eb.typography.monoFamily,"--rue-theme-font-size":eb.typography.size,"--rue-theme-line-height":eb.typography.lineHeight,"--rue-theme-shadow-sm":eb.shadow.sm,"--rue-theme-shadow-md":eb.shadow.md,"--rue-theme-shadow-lg":eb.shadow.lg}),s_=eb=>{let ey=a_(eb);return{theme:ey.themeName,resolvedTheme:ey.resolvedThemeName,token:ey,cssVariables:o_(ey)}},c_=(eb,ey)=>ey?`${eb} ${ey}`:eb,l_=(eb,ey)=>{"function"==typeof eb?eb(ey):eb&&"object"==typeof eb&&"current"in eb&&(eb.current=ey??void 0)},u_=eb=>eb.startsWith("--")?eb:eb.replace(/[A-Z]/g,eb=>`-${eb.toLowerCase()}`),d_=eb=>Object.entries(eb).filter(([,eb])=>void 0!==eb).map(([eb,ey])=>`${u_(eb)}: ${String(ey)}`).join("; "),f_=(eb,ey)=>{let ex=d_(eb);if(!ey)return ex;if("string"==typeof ey)return ex?`${ex}; ${ey}`:ey;let eN=d_(ey);return ex?eN?`${ex}; ${eN}`:ex:eN},p_=Object.assign(({type:eb="checkbox",theme:ey,className:ex,...eN})=>{let ew=ey??eN.value,ek=c_("theme-controller",ex);return n("input",{...eN,type:eb,value:ew,autoComplete:eN.autoComplete??"off",className:ek})},{Provider:({as:eb="div",className:ey,render:ex,style:eN,children:ew,theme:ek,token:eC,algorithm:e$,baseToken:eS,...ej})=>{let eA=ej.ref,ez=(0,e.useRef)(null);"ref"in ej&&delete ej.ref;let eM=s_({theme:ek,token:eC,algorithm:e$,baseToken:eS}),eL=ex?ex(eM):ew,eT=f_({colorScheme:eM.token.colorScheme,...eM.cssVariables},eN),eI=eb=>{let ey=ez.current;ey&&(eb?ey.setAttribute("style",eb):ey.removeAttribute("style"))};return(0,e.onMounted)(()=>{eI(eT)}),(0,e.watch)(()=>eT,eb=>{eI(eb)},{immediate:!0}),n("section"===eb?"section":"article"===eb?"article":"span"===eb?"span":"div",{...{...ej,ref:eb=>{ez.current=eb,eI(eT),l_(eA,eb)},className:c_("rue-theme-scope",ey),"data-theme":eM.resolvedTheme,"data-rue-theme":eM.theme,"data-rue-appearance":eM.token.appearance,"data-rue-density":eM.token.density},children:eL})},compactAlgorithm:i_,darkAlgorithm:r_,defaultAlgorithm:n_,defaultConfig:Xg,defaultSeed:Jg,getDesignToken:a_,presets:Yg,useToken:s_}),m_={"top-start":{horizontal:"start",vertical:"top"},top:{horizontal:"center",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-end":{horizontal:"end",vertical:"top"},"middle-start":{horizontal:"start",vertical:"middle"},middle:{horizontal:"center",vertical:"middle"},"middle-center":{horizontal:"center",vertical:"middle"},"middle-end":{horizontal:"end",vertical:"middle"},"bottom-start":{horizontal:"start",vertical:"bottom"},bottom:{horizontal:"center",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"bottom-end":{horizontal:"end",vertical:"bottom"},start:{horizontal:"start",vertical:"bottom"},center:{horizontal:"center",vertical:"middle"},end:{horizontal:"end",vertical:"bottom"}},h_=eb=>"number"==typeof eb?`${eb}px`:eb,g_=(...eb)=>eb.filter(Boolean).join(" "),__=eb=>Array.isArray(eb)?eb.flatMap(eb=>__(eb)):null==eb?[]:[eb],v_=eb=>__(eb).length>0,y_=eb=>{if(null==eb)return null;if("object"==typeof eb){let ey={},ex=h_(eb.x),eN=h_(eb.y);return null!=ex&&(ey.paddingInline=ex),null!=eN&&(ey.paddingBlock=eN),Object.keys(ey).length?ey:null}let ey=h_(eb);return null==ey?null:{padding:ey}},b_=(eb,ey)=>"horizontal"===eb?ey?"flex-row-reverse":"flex-row":ey?"flex-col-reverse":"",x_="pointer-events-auto w-full max-w-sm rounded-[1.25rem] border px-4 py-3 text-left text-sm backdrop-blur transition",S_={soft:{neutral:"border-base-300 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80",info:"border-info/25 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80",success:"border-success/25 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80",warning:"border-warning/30 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80",error:"border-error/30 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80",loading:"border-primary/25 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80"},solid:{neutral:"border-neutral bg-neutral text-neutral-content shadow-lg",info:"border-info bg-info text-info-content shadow-lg",success:"border-success bg-success text-success-content shadow-lg",warning:"border-warning bg-warning text-warning-content shadow-lg",error:"border-error bg-error text-error-content shadow-lg",loading:"border-primary bg-primary text-primary-content shadow-lg"},outline:{neutral:"border-neutral bg-base-100/90 text-base-content shadow-md",info:"border-info bg-base-100/90 text-base-content shadow-md",success:"border-success bg-base-100/90 text-base-content shadow-md",warning:"border-warning bg-base-100/90 text-base-content shadow-md",error:"border-error bg-base-100/90 text-base-content shadow-md",loading:"border-primary bg-base-100/90 text-base-content shadow-md"}},C_={soft:{neutral:"bg-base-200 text-base-content/70",info:"bg-info/15 text-info",success:"bg-success/15 text-success",warning:"bg-warning/20 text-warning",error:"bg-error/15 text-error",loading:"bg-primary/15 text-primary"},solid:{neutral:"bg-neutral-content/10 text-neutral-content",info:"bg-info-content/10 text-info-content",success:"bg-success-content/10 text-success-content",warning:"bg-warning-content/10 text-warning-content",error:"bg-error-content/10 text-error-content",loading:"bg-primary-content/10 text-primary-content"},outline:{neutral:"bg-base-200 text-base-content/70",info:"bg-info/10 text-info",success:"bg-success/10 text-success",warning:"bg-warning/15 text-warning",error:"bg-error/10 text-error",loading:"bg-primary/10 text-primary"}},w_={soft:{neutral:"text-base-content/50 hover:bg-base-200 hover:text-base-content",info:"text-info/75 hover:bg-info/10 hover:text-info",success:"text-success/75 hover:bg-success/10 hover:text-success",warning:"text-warning/80 hover:bg-warning/15 hover:text-warning",error:"text-error/75 hover:bg-error/10 hover:text-error",loading:"text-primary/75 hover:bg-primary/10 hover:text-primary"},solid:{neutral:"text-neutral-content/75 hover:bg-neutral-content/10 hover:text-neutral-content",info:"text-info-content/75 hover:bg-info-content/10 hover:text-info-content",success:"text-success-content/75 hover:bg-success-content/10 hover:text-success-content",warning:"text-warning-content/75 hover:bg-warning-content/10 hover:text-warning-content",error:"text-error-content/75 hover:bg-error-content/10 hover:text-error-content",loading:"text-primary-content/75 hover:bg-primary-content/10 hover:text-primary-content"},outline:{neutral:"text-base-content/50 hover:bg-base-200 hover:text-base-content",info:"text-info/75 hover:bg-info/10 hover:text-info",success:"text-success/75 hover:bg-success/10 hover:text-success",warning:"text-warning/80 hover:bg-warning/15 hover:text-warning",error:"text-error/75 hover:bg-error/10 hover:text-error",loading:"text-primary/75 hover:bg-primary/10 hover:text-primary"}},T_=3,E_="top",D_=0,O_=(eb,ey)=>"number"!=typeof ey||ey<=0||eb.length<=ey?eb:eb.slice(eb.length-ey),k_=(eb,ey,ex=!1)=>{if(typeof document>"u")return null;let eN="function"==typeof eb?eb():eb;return!1===eN?ey??null:"string"==typeof eN?document.querySelector(eN):eN instanceof HTMLElement?eN:ex?document.body:null},A_=({records:eb,onDestroy:ey,maxCount:ex,duration:eN=T_,closable:ew,pauseOnHover:ek=!0,showIcon:eC=!0,variant:e$,type:eS="neutral",placement:ej=E_,...eA})=>0===eb.length?n("div",{style:{display:"contents"}}):n(Y_,{placement:ej,...eA,children:eb.map(eb=>{let{key:ex,content:ej,children:eA,type:ez=eS,variant:eM=e$,duration:eL=eN,closable:eT=ew,pauseOnHover:eI=ek,showIcon:eO=eC,onClose:eE,onOpenChange:eP,...eR}=eb.config,eF=v_(eA)?eA:ej;return n(J_,{...eR,type:ez,variant:eM,duration:eL,closable:eT,pauseOnHover:eI,showIcon:eO,onClose:eb=>{eE&&eE(eb)},onOpenChange:(ex,eN)=>{ex||ey(eb.key),eP&&eP(ex,eN)},children:eF},eb.key)})}),j_=(eb={})=>{let ey=(0,e.useRef)(),ex=(0,e.useRef)([]),eN=(0,e.useRef)(),ew=(0,e.useRef)(),ek=(0,e.useRef)(eb);ek.current=eb;let eC=()=>{let eb=(()=>{let eb=k_((ek.current??{}).getContainer,eN.current??null,!0);if(!eb)return null;if(null==ew.current){let eb=document.createElement("div");eb.style.display="contents",eb.dataset.rueToastMessageViewport="true",ew.current=eb}return ew.current.parentElement!==eb&&eb.appendChild(ew.current),ew.current})();if(!eb)return;let ey=ek.current??{};(0,e.render)(n(A_,{records:ex.current??[],onDestroy:e$,...ey}),eb)},e$=eb=>{let ey=ex.current??[];if(null==eb){ey.length>0&&(ex.current=[],eC());return}let eN=ey.filter(ey=>ey.key!==eb);eN.length!==ey.length&&(ex.current=eN,eC())},eS=eb=>{let ey=eb.key??`rue-toast-message-${D_++}`,eN={key:ey,config:{...eb,key:ey}},ew=ex.current??[],eS=ew.findIndex(eb=>eb.key===ey),ej=-1===eS?[...ew,eN]:[...ew.slice(0,eS),eN,...ew.slice(eS+1)];return ex.current=ej=O_(ej,(ek.current??{}).maxCount),eC(),()=>{e$(ey)}};if(null==ey.current){let eb=(eb,ey)=>ex=>eS({...ex,type:eb,duration:ex.duration??ey});ey.current={open:eS,info:eb("info"),success:eb("success"),warning:eb("warning"),error:eb("error"),loading:eb("loading",0),destroy:e$}}(0,e.onUnmounted)(()=>{ex.current=[],ew.current&&(ew.current.remove(),ew.current=void 0),eN.current=void 0});let ej=n("div",{style:{display:"contents"},ref:eb=>{eN.current=eb??void 0,ek.current?.getContainer===!1&&eb&&eC()}});return[ey.current,ej]},M_=eb=>"warning"===eb||"error"===eb?"alert":"status",N_=eb=>"warning"===eb||"error"===eb?"assertive":"polite",P_=eb=>"number"!=typeof eb||eb<=0?null:1e3*eb,F_=new WeakMap,I_=({className:eb})=>r("svg",{viewBox:"0 0 24 24",className:eb,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[n("circle",{cx:"12",cy:"12",r:"9"}),n("path",{d:"M12 10v6"}),n("path",{d:"M12 7.5h.01",strokeLinecap:"round",strokeLinejoin:"round"})]}),L_=({className:eb})=>r("svg",{viewBox:"0 0 24 24",className:eb,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[n("circle",{cx:"12",cy:"12",r:"9"}),n("path",{d:"m8.5 12 2.5 2.5 4.5-5",strokeLinecap:"round",strokeLinejoin:"round"})]}),R_=({className:eb})=>r("svg",{viewBox:"0 0 24 24",className:eb,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[n("path",{d:"M12 4 3.8 18.2a1 1 0 0 0 .87 1.5h14.66a1 1 0 0 0 .87-1.5z",strokeLinejoin:"round"}),n("path",{d:"M12 9v4",strokeLinecap:"round"}),n("path",{d:"M12 16.5h.01",strokeLinecap:"round",strokeLinejoin:"round"})]}),z_=({className:eb})=>r("svg",{viewBox:"0 0 24 24",className:eb,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[n("circle",{cx:"12",cy:"12",r:"9"}),n("path",{d:"m9 9 6 6",strokeLinecap:"round"}),n("path",{d:"m15 9-6 6",strokeLinecap:"round"})]}),B_=({className:eb})=>r("svg",{viewBox:"0 0 24 24",className:eb,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[n("path",{d:"m7 7 10 10",strokeLinecap:"round"}),n("path",{d:"M17 7 7 17",strokeLinecap:"round"})]}),V_=eb=>{let ey="h-5 w-5";switch(eb){case"info":return n(I_,{className:ey});case"success":return n(L_,{className:ey});case"warning":return n(R_,{className:ey});case"error":return n(z_,{className:ey});case"loading":return n("span",{className:"loading loading-spinner loading-sm","aria-hidden":"true"});default:return null}},H_=({as:eb="div",className:ey,children:ex,...eN})=>n(eb,{...eN,className:g_("flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl",ey),children:ex}),U_=({as:eb="div",className:ey,children:ex,...eN})=>n(eb,{...eN,className:g_("min-w-0 flex-1",ey),children:ex}),W_=({as:eb="div",className:ey,children:ex,...eN})=>n(eb,{...eN,className:g_("font-semibold leading-5",ey),children:ex}),G_=({as:eb="div",className:ey,children:ex,...eN})=>n(eb,{...eN,className:g_("mt-1 text-xs leading-5 opacity-80",ey),children:ex}),K_=({as:eb="div",className:ey,children:ex,...eN})=>n(eb,{...eN,className:g_("flex shrink-0 items-center gap-2",ey),children:ex}),q_=({as:eb="button",className:ey,icon:ex,label:eN="关闭提示",children:ew,...ek})=>{let eC={...ek},e$=eC.onClick;return("button"===eb||null==eb)&&null==eC.type&&(eC.type="button"),eC["aria-label"]??(eC["aria-label"]=eN),n(eb,{...eC,className:g_("inline-flex h-8 w-8 items-center justify-center rounded-xl transition",ey),onClick:eb=>{if("function"==typeof e$&&e$(eb),eb.defaultPrevented)return;let ey=eb.currentTarget?.closest('[data-rue-toast-item-root="true"]'),ex=ey?F_.get(ey):null;ex&&ex("close",eb)},children:v_(ew)?ew:ex??n(B_,{className:"h-4 w-4"})})},J_=({as:eb="div",open:ey,defaultOpen:ex=!0,type:eN="neutral",variant:ew="soft",icon:ek,showIcon:eC=!0,title:e$,description:eS,action:ej,closable:eA,closeIcon:ez,duration:eM,pauseOnHover:eL=!0,className:eT,style:eI,contentClassName:eO,titleClassName:eE,descriptionClassName:eP,iconClassName:eR,actionClassName:eF,closeClassName:eD,children:eB,onClose:eq,onOpenChange:eW,...eH})=>{let eV=(0,e.ref)(ex),eK=(0,e.ref)(!!ex),eZ="boolean"==typeof ey,[eY,eU]=(0,e.useState)(eZ?!!ey:eV.value,{kind:"ref"}),eQ=(0,e.ref)(!1),eG=(0,e.useRef)(),eJ=(0,e.useRef)(),eX=(0,e.useRef)(P_(eM)),e0={...eH},e1=e0.onMouseEnter,e2=e0.onMouseLeave,e5=null,e3=eZ?!!ey:eY.value;"onMouseEnter"in e0&&delete e0.onMouseEnter,"onMouseLeave"in e0&&delete e0.onMouseLeave,e0.role=e0.role??M_(eN),e0["aria-live"]=e0["aria-live"]??N_(eN),e0["data-rue-toast-item"]=e0["data-rue-toast-item"]??"true",e0["data-rue-toast-type"]=e0["data-rue-toast-type"]??eN,e0["data-rue-toast-item-root"]=e0["data-rue-toast-item-root"]??"true";let e4=e0["data-testid"],e6=e0["data-rue-toast-item"],e7=e0["data-rue-toast-type"];function e8(eb){if(e5){if(e5.style.display=eb?"":"none",eb){e5.removeAttribute("aria-hidden"),e5.setAttribute("data-rue-toast-item",String(e6)),e5.setAttribute("data-rue-toast-type",String(e7)),null!=e4&&e5.setAttribute("data-testid",String(e4));return}e5.setAttribute("aria-hidden","true"),e5.removeAttribute("data-rue-toast-item"),e5.removeAttribute("data-rue-toast-type"),null!=e4&&e5.removeAttribute("data-testid")}}let e9=(eb=!1)=>{if(null!=eG.current){if(eb&&null!=eX.current&&null!=eJ.current){let eb=Date.now()-eJ.current;eX.current=Math.max(0,eX.current-eb)}window.clearTimeout(eG.current),eG.current=void 0,eJ.current=void 0}},tb=()=>{e9(),eY.value&&(eL&&eQ.value||null==eX.current||eX.current<=0||(eJ.current=Date.now(),eG.current=window.setTimeout(()=>{eG.current=void 0,eJ.current=void 0,eX.current=0,tx("timeout")},eX.current)))},ty=(eb=!0)=>{e9(),eb&&(eX.current=P_(eM)),tb()},tx=(eb,ey)=>{if(e9(),eX.current=0,!eY.value)return;eU(!1),e8(!1),eZ||(eV.value=!1);let ex={source:eb,event:ey};eW&&eW(!1,ex),eq&&eq(ex)};if((0,e.onUnmounted)(()=>{e9()}),(0,e.watch)(()=>ey,eb=>{"boolean"==typeof eb&&eU(eb)},{immediate:!0}),(0,e.watch)(()=>ex,eb=>{let ey=!!eb;eZ||ey===eK.value||(eK.value=ey,eV.value=ey,eU(ey))},{immediate:!0}),(0,e.watch)(()=>eZ?!!ey:eY.value,eb=>{if(!eb){e9(),e8(!1);return}e8(!0),ty(!0)},{immediate:!0}),(0,e.watch)(()=>eM,()=>{if(!eY.value){eX.current=P_(eM);return}ty(!0)}),(0,e.watch)(()=>eL,()=>{eY.value&&ty(!1)}),!e3)return null;let tN=S_[ew][eN],tw=C_[ew][eN],tk=w_[ew][eN],tC=!1===eC?null:void 0===ek?V_(eN):ek,t$=v_(e$),tS=v_(eS),tj=v_(eB),tA=v_(ej),tz=v_(tC);return n("div",{style:{display:"contents"},children:e3?n(eb,{...e0,className:g_(x_,tN,eT),style:eI,ref:eb=>{e5=eb,eb&&F_.set(eb,tx),e8(eY.value)},onMouseEnter:eb=>{eQ.value=!0,eL&&e9(!0),"function"==typeof e1&&e1(eb)},onMouseLeave:eb=>{eQ.value=!1,eL&&tb(),"function"==typeof e2&&e2(eb)},children:r("div",{className:"flex items-start gap-3",children:[tz?n(H_,{className:g_(tw,eR),children:tC}):null,r(U_,{className:eO,children:[t$?n(W_,{className:eE,children:e$}):null,tS?n(G_,{className:eP,children:eS}):null,tj?n("div",{className:g_(t$||tS?"mt-2":""),children:eB}):null]}),tA||eA?r(K_,{className:g_("ml-3 items-start self-start",eF),children:[ej,eA?n("button",{type:"button","aria-label":"关闭提示",className:g_("inline-flex h-8 w-8 items-center justify-center rounded-xl transition",tk,eD),onClick:eb=>{tx("close",eb)},children:ez??n(B_,{className:"h-4 w-4"})}):null]}):null]})}):null})},Y_=({as:eb="div",placement:ey,horizontal:ex,vertical:eN,stack:ew,reverse:ek,inset:eC,gap:e$,zIndex:eS,className:ej,style:eA,children:ez,...eM})=>{let eL=ey?m_[ey]:void 0,eT=ex??eL?.horizontal,eI=eN??eL?.vertical,eO=b_(ew,ek),eE=eA?{...eA}:{},eP=y_(eC);null!=e$&&(eE.gap=h_(e$)),null!=eS&&(eE.zIndex=eS),eP&&Object.assign(eE,eP);let eR="toast";return eT&&(eR+=` toast-${eT}`),eI&&(eR+=` toast-${eI}`),eO&&(eR+=` ${eO}`),ej&&(eR+=` ${ej}`),n(eb,{...eM,className:eR,style:Object.keys(eE).length?eE:eA,children:__(ez)})},X_=Object.assign(Y_,{Item:J_,Icon:H_,Content:U_,Title:W_,Description:G_,Action:K_,Close:q_,useMessage:j_}),Z_=(eb,ey)=>ey?`${eb} ${ey}`:eb,Q_=eb=>{switch(eb){case"small":return"sm";case"default":case"medium":return"md";default:return eb}},$_=eb=>{switch(Q_(eb)){case"xs":case"sm":return"loading-xs";case"lg":return"loading-md";case"xl":return"loading-lg";default:return"loading-sm"}},ev=(eb,ey)=>"boolean"==typeof eb?eb:"boolean"==typeof ey?ey:void 0,tv=(eb,ey,ex=!1)=>"boolean"==typeof eb?eb:"boolean"==typeof ey?ey:ex,nv=eb=>"boolean"==typeof eb?void 0:eb,rv=eb=>"boolean"==typeof eb?void 0:eb,iv=(eb,ey,ex)=>{let eN="toggle";eb&&(eN+=` toggle-${eb}`);let ew=Q_(ey);return ew&&(eN+=` toggle-${ew}`),ex&&(eN+=` ${ex}`),eN},av=(eb,ey)=>{let ex="inline-flex max-w-full items-start gap-3 align-top text-base-content";return eb?ex+=" cursor-not-allowed opacity-65":ex+=" cursor-pointer",ey&&(ex+=` ${ey}`),ex},ov=eb=>Z_("flex min-w-0 flex-col gap-1 pt-0.5",eb),sv=eb=>Z_("inline-flex items-center gap-2 text-xs text-base-content/60",eb),cv=({color:eb,size:ey,checked:ex,defaultChecked:eN,value:ew,defaultValue:ek,checkedChildren:eC,unCheckedChildren:e$,loading:eS,disabled:ej,className:eA,rootClassName:ez,contentClassName:eM,stateClassName:eL,style:eT,rootStyle:eI,children:eO,onChange:eE,onCheckedChange:eP,onClick:eR,onNativeChange:eF,...eD})=>{let eB=(0,e.useRef)(),eq=ev(ex,ew),eW=(0,e.ref)(tv(eN,ek,eq??!1)),eH=!!ej||!!eS,eV=null!=eC||null!=e$,eK=eq??eW.value,eZ=!!eS||null!=eO||eV||!!ez||!!eI||!!eM||!!eL,eY=eb=>{eB.current&&(eB.current.checked=eb)},eU=eb=>{let ey=eB.current?.closest('[data-rue-toggle-root="true"]')?.querySelector('[data-rue-toggle-state-input="true"]');ey&&(ey.checked=eb)};(0,e.onMounted)(()=>{eY(eq??eW.value),eU(eq??eW.value)}),(0,e.watch)(()=>ev(ex,ew),eb=>{"boolean"==typeof eb&&(eW.value=eb,eY(eb),eU(eb))},{immediate:!0});let eQ=n("input",{...eD,ref:eB,type:"checkbox",checked:eq,defaultChecked:tv(eN,ek,eK),value:nv(ew),defaultValue:rv(ek),disabled:eH,style:eT,autoComplete:eD.autoComplete??"off",className:iv(eb,ey,eA),"aria-busy":eS?"true":void 0,"data-rue-toggle-input":"true",onClick:eb=>{let ey=eb.target;eR?.(ey?.checked===!0,eb)},onChange:eb=>{let ey=eb.target?.checked===!0,ex=void 0===eq?ey:eq;void 0===eq?eW.value=ey:eY(eq),eU(ex),eF?.(eb),eE?.(ey,eb),eP?.(ey,eb)}});if(!eZ)return eQ;let eG=r("span",{className:"relative inline-flex shrink-0 items-center justify-center",children:[eQ,eS?n("span",{className:"pointer-events-none absolute inset-0 inline-flex items-center justify-center text-base-content/70",children:n("span",{className:`loading loading-spinner ${$_(ey)}`.trim()})}):null]});return null!=eO||eV?r("label",{className:av(eH,ez),style:eI,"data-rue-toggle-root":"true",children:[eG,r("span",{className:ov(eM),children:[null==eO?null:n("span",{className:"text-sm font-medium text-base-content",children:eO}),eV?n("span",{className:sv(eL),children:r("span",{className:"swap pointer-events-none min-h-0 min-w-0",children:[n("input",{type:"checkbox",checked:eK,tabIndex:-1,"aria-hidden":"true",className:"sr-only","data-rue-toggle-state-input":"true"}),n("span",{className:"swap-on inline-flex items-center gap-2",children:eC}),n("span",{className:"swap-off inline-flex items-center gap-2",children:e$})]})}):null]})]}):n("span",{className:Z_("inline-flex align-middle",ez),style:eI,children:eG})},lv=["input","select","textarea","checkbox","toggle"],uv=(...eb)=>eb.filter(Boolean).join(" "),dv=eb=>new Set((eb??"").split(/\s+/).map(eb=>eb.trim()).filter(Boolean)),fv=eb=>{let ey=dv(eb);return lv.find(eb=>ey.has(eb))},pv=(eb,ey,ex)=>{if(ey)return ey;let eN=fv(ex);return eN||("select"===eb?"select":"textarea"===eb?"textarea":void 0)},mv=(eb,ey)=>eb||("select"===ey?"select":"textarea"===ey?"textarea":"input"),hv=(eb,ey,ex,eN)=>{let ew=dv(eN);return uv("validator",eb&&!ew.has(eb)?eb:void 0,eb&&ey&&!ew.has(`${eb}-${ey}`)?`${eb}-${ey}`:void 0,eb&&ex&&!ew.has(`${eb}-${ex}`)?`${eb}-${ex}`:void 0,eN)},gv=eb=>Array.isArray(eb)?eb.map((eb,ey)=>n("span",{className:"block",children:eb},`validator-line-${ey}`)):eb,_v=({as:eb,appearance:ey,size:ex,status:eN,className:ew,children:ek,...eC})=>{let e$=pv(eb,ey,ew),eS=mv(eb,e$),ej=hv(e$,ex,eN,ew);return"select"===eS?n("select",{...eC,className:ej,children:ek}):"textarea"===eS?n("textarea",{...eC,className:ej,children:ek}):n("input",{...eC,className:ej})},vv=({as:eb="p",className:ey,children:ex,hideUntilInvalid:eN,lines:ew,...ek})=>n(eb,{...ek,className:uv("validator-hint",eN?"hidden":void 0,ey),children:ew?.length?gv(ew):ex}),yv=(eb,ey)=>uv("fieldset"===eb?"fieldset gap-2":"grid gap-2",ey),bv=Object.assign(_v,{Hint:vv,Field:({fieldAs:eb="fieldset",className:ey,controlClassName:ex,label:eN,labelClassName:ew,hint:ek,hintAs:eC="p",hintClassName:e$,hideHintWhenValid:eS,extra:ej,extraClassName:eA,requiredMark:ez,id:eM,children:eL,...eT})=>{let eI="string"==typeof eM&&eM.trim()?eM:void 0,eO=eI&&null!=ek&&null==eT["aria-describedby"]?`${eI}-hint`:void 0,eE=eT["aria-describedby"]??eO,eP=ez??!0===eT.required;return r(eb,{className:yv(eb,ey),children:[null==eN?null:r("label",{className:uv("label",ew),for:eI,children:[n("span",{children:eN}),eP?n("span",{className:"text-error","aria-hidden":"true",children:"*"}):null]}),n(_v,{...eT,id:eI,"aria-describedby":eE,className:ex,children:eL}),null==ek?null:n(vv,{id:eO,as:eC,className:e$,hideUntilInvalid:eS,children:gv(ek)}),null==ej?null:n("p",{className:uv("label text-xs opacity-70",eA),children:gv(ej)})]})}});exports.Accordion=x,exports.Alert=a,exports.Avatar=Ee,exports.Badge=Lt,exports.Breadcrumbs=Ls,exports.Button=k,exports.Calendar=pe,exports.Card=L,exports.Carousel=Rr,exports.Chat=Qr,exports.Checkbox=Pc,exports.Collapse=Zi,exports.Countdown=da,exports.Diff=tn,exports.Divider=Fe,exports.Dock=Gs,exports.DrawerSidebar=Cl,exports.Dropdown=qo,exports.Fab=iu,exports.Fieldset=Kc,exports.FileInput=Di,exports.Filter=wu,exports.Footer=We,exports.Hero=Uu,exports.Hover3D=on,exports.HoverGallery=_a,exports.Indicator=$u,exports.Input=Td,exports.Join=Sc,exports.Kbd=Ma,exports.Label=Jd,exports.Link=hc,exports.List=io,exports.Loading=df,exports.Mask=xf,exports.Menu=ko,exports.MockupBrowser=Of,exports.MockupCode=Pf,exports.MockupPhone=Vf,exports.MockupWindow=Yf,exports.Modal=rt,exports.Navbar=sp,exports.Pagination=wp,exports.Progress=Em,exports.RadialProgress=Jm,exports.Radio=fh,exports.Range=Dh,exports.Rating=Xh,exports.Select=am,exports.Skeleton=Dg,exports.Stack=jg,exports.Stat=Tr,exports.Status=er,exports.Steps=Hg,exports.Swap=qg,exports.Table=Ts,exports.Tabs=mt,exports.TextRotate=Bn,exports.Textarea=ld,exports.ThemeController=p_,exports.Timeline=Dn,exports.Toast=X_,exports.Toggle=cv,exports.Tooltip=Ul,exports.Typography=In,exports.Validator=bv;
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let e=require("@rue-js/rue"),t=require("@rue-js/rue/vapor"),n=require("@rue-js/router");function r(e$,eI,eR){let eL=void 0===eR?eI||null:(()=>{let e$={};if(eI)for(let eR in eI)e$[eR]=eI[eR];return e$.key=eR,e$})(),ez=eI?eI.children:void 0;return Array.isArray(ez)?(0,e.h)(e$,eL,...ez):void 0===ez?(0,e.h)(e$,eL):(0,e.h)(e$,eL,ez)}var i=r,a=({type:e$,variant:eI,color:eR,banner:eL})=>e$||eI||(eR&&"default"!==eR?eR:eL?"warning":void 0),o=({type:e$,variant:eI,color:eR,outline:eL,dash:ez,soft:eW,direction:eH,title:eF,message:eP,description:eB,showIcon:eK,icon:eV,banner:eq,closable:eU,closeText:eG,closeIcon:eZ,action:eY,onClose:eX,afterClose:eJ,role:eQ="alert",className:e0,children:e1,...e2})=>{let e5=a({type:e$,variant:eI,color:eR,banner:eq}),e3=eF??eP,e4=null!=eB,e6=null!=e3||e4,e8=eU??(null!=eG||null!=eZ),e7=eK??!!(eq||e6),e9="alert";e5&&(e9+=` alert-${e5}`),eL&&(e9+=" alert-outline"),ez&&(e9+=" alert-dash"),eW&&(e9+=" alert-soft"),eH&&(e9+=` alert-${eH}`),(e6||e7)&&(e9+=` ${e6?"items-start":"items-center"} gap-3`),eq&&(e9+=" rounded-box border border-current/10"),e0&&(e9+=` ${e0}`);let t$=null!=eY||e8;return i("div",{role:eQ??"alert",className:e9,...e2,children:[e7?r("span",{className:"inline-flex size-5 shrink-0 self-center items-center justify-center rounded-full border border-current/15 text-[0.7rem] font-semibold","aria-hidden":"true",children:eV??("success"===e5?"✓":"warning"===e5?"!":"error"===e5?"\xd7":"i")}):null,e6?i("div",{className:"min-w-0 flex-1",children:[null==e3?null:r("div",{className:"font-semibold leading-6",children:e3}),e4?r("div",{className:"mt-1 text-sm leading-6 opacity-80",children:eB}):null,null==e1?null:r("div",{className:e4||null!=e3?"mt-3":"",children:e1})]}):r("div",{className:e6?"min-w-0 flex-1":"min-w-0 flex flex-1 items-center gap-2",children:e1}),t$?i("div",{className:`flex shrink-0 ${e6?"items-start":"items-center"} gap-2${"vertical"===eH?" w-full justify-end sm:w-auto":""}`,children:[eY,e8?r("button",{type:"button",className:`btn btn-ghost btn-xs shrink-0 text-current/70 hover:text-current${null==eG?" btn-circle":" px-2"}`,"aria-label":"Close alert",onClick:e$=>{let eI=e$.currentTarget?.closest('[role="alert"]');eI&&(eI.setAttribute("hidden","true"),eI.remove()),eX&&eX(e$),eJ&&eJ()},children:eG??eZ??"\xd7"}):null]}):null]})},s=0,c=(e$,eI)=>e$?eI?`${e$} ${eI}`:e$:eI??"",l=e$=>{let eI=[];return e$.forEach(e$=>{eI.some(eI=>eI===e$)||eI.push(e$)}),eI},u=(e$,eI)=>{let eR=l(Array.isArray(e$)?e$:[]);return eI?eR:eR.slice(0,1)},d=e$=>null==e$?[]:[e$],f=(e$,eI,eR,eL,ez,eW)=>u(void 0===eL?void 0===eI?void 0===ez?void 0===eR?e$.filter(e$=>e$.open).map(e$=>e$.key):d(eR):ez:d(eI):eL,eW),p=(e$,eI,eR)=>"open"===eR||"close"!==eR&&("boolean"==typeof e$?e$:"boolean"==typeof eI&&eI),m=(e$,eI)=>"open"===eI?"collapse-open":"close"===eI?"collapse-close":e$?"collapse-open":"collapse-close",h=(e$,eI)=>{let eR=eI?.getRootNode?.(),eL=eR&&"function"==typeof eR.querySelectorAll?eR:"u">typeof document?document:null;return eL?Array.from(eL.querySelectorAll("[data-rue-accordion-group]")).filter(eI=>eI.dataset.rueAccordionGroup===e$):[]},g=e$=>Array.from(e$.children).find(e$=>e$ instanceof HTMLInputElement&&("checkbox"===e$.type||"radio"===e$.type)),_=e$=>Array.from(e$.children).find(e$=>e$ instanceof HTMLElement&&e$.classList.contains("collapse-title")),v=(e$,eI,eR)=>{if(!(e$ instanceof HTMLElement))return;e$.classList.remove("collapse-open","collapse-close"),e$.classList.add(m(eI,eR));let eL=g(e$);eL&&eL.checked!==eI&&(eL.checked=eI),e$ instanceof HTMLDetailsElement&&e$.open!==eI&&(e$.open=eI);let ez=_(e$);ez&&ez.setAttribute("aria-expanded",eI?"true":"false")},y=(e$,eI,eR,eL,ez)=>eL?eR?l([...e$,eI]):e$.filter(e$=>e$!==eI):eR?[eI]:ez?[]:e$.some(e$=>e$===eI)?[...e$]:[eI],b=e$=>e$?.type==="radio",x=e$=>null==e$.description&&null==e$.extra?e$.title:i("div",{className:"flex w-full items-start justify-between gap-3",children:[i("div",{className:"min-w-0 flex-1",children:[r("div",{children:e$.title}),null==e$.description?null:r("div",{className:c("mt-1 text-xs opacity-70",e$.descriptionClassName),children:e$.description})]}),null==e$.extra?null:r("div",{className:c("shrink-0 text-xs opacity-70",e$.extraClassName),children:e$.extra})]}),S=Object.assign(({icon:e$,force:eI,use:eR="radio",name:eL,open:ez,defaultOpen:eW,activeKey:eH,defaultActiveKey:eF,openKeys:eP,defaultOpenKeys:eB,multiple:eK,collapsible:eV,disabled:eq,className:eU,titleClassName:eG,contentClassName:eZ,children:eY,items:eX,onChange:eJ,onToggle:eQ})=>{let e0=eX?.map((e$,eI)=>({...e$,key:e$.key??eI,index:eI}))??[],e1=(0,e.ref)(`rue-accordion-${s++}`),e2=(0,e.ref)(p(ez,eW,eI)),e5=(0,e.ref)(f(e0,eH,eF,eP,eB,eK)),e3=eL??e1.value,e4=e0.length>0,e6=void 0!==eP||void 0!==eH,e8="open"===eI||"close"!==eI&&(void 0===ez?e2.value:!!ez),e7=()=>void 0===eP?void 0===eH?e5.value:u(d(eH),eK):u(eP,eK),e9=(e$,eR,eL)=>{let ez=e$.force??eI;if(eq||e$.disabled||ez)return;let eW=y(e7(),e$.key,eR,eK,eV),eH=eW.some(eI=>eI===e$.key);e6||(e5.value=eW,h(e3,eL).forEach(e$=>{let eR=e0[Number(e$.dataset.rueAccordionIndex??-1)];if(!eR)return;let eL=eR.force??eI;v(e$,"open"===eL||"close"!==eL&&eW.some(e$=>e$===eR.key),eL)})),eJ&&eJ(eK?eW:eW[0]??null,{key:e$.key,index:e$.index,open:eH,item:e$})},t$=(e$,eR)=>{eq||eI||(void 0===ez&&(e2.value=e$,h(e3,eR).forEach(e$=>{let eR=e$.dataset.rueAccordionForce??eI,eL=g(e$);v(e$,"open"===eR||"close"!==eR&&(e$ instanceof HTMLDetailsElement?e$.open:eL?.checked===!0),eR)})),eQ&&eQ(e$,{key:e3,index:0,open:e$}))};if(e4)return r(e.Fragment,{children:e0.map(eL=>{let ez=eL.use??eR,eW=eL.icon??e$,eH=eL.force??eI,eF="open"===eH||"close"!==eH&&e7().some(e$=>e$===eL.key),eP=c("collapse",m(eF,eH));"arrow"===eW&&(eP+=" collapse-arrow"),"plus"===eW&&(eP+=" collapse-plus"),eU&&(eP+=` ${eU}`),eL.className&&(eP+=` ${eL.className}`),(eq||eL.disabled)&&(eP+=" opacity-70");let eB="arrow"===eW&&(null!=eL.description||null!=eL.extra)?"after:top-6":void 0,eY=c(c("collapse-title",eG),c(eL.titleClassName,eB)),eX=c(c("collapse-content",eZ),eL.contentClassName);if("details"===ez)return i("details",{className:eP,name:e3,open:eF,"data-rue-accordion-group":e3,"data-rue-accordion-index":String(eL.index),"data-rue-accordion-force":eH,children:[r("summary",{className:eY,"aria-expanded":eF?"true":"false",onClick:e$=>{e$.preventDefault(),e9(eL,!eF,e$.currentTarget)},children:x(eL)}),r("div",{className:eX,children:eL.content})]},eL.key);let eJ=eK?"checkbox":"radio";return i("div",{className:eP,"data-rue-accordion-group":e3,"data-rue-accordion-index":String(eL.index),"data-rue-accordion-force":eH,children:[r("input",{type:eJ,name:"radio"===eJ?e3:void 0,checked:eF,disabled:eq||eL.disabled||!!eH,onClick:e$=>{let eI=e$.currentTarget;eV&&eF&&b(eI)&&(e$.preventDefault(),eI.checked=!1,e9(eL,!1,eI))},onChange:e$=>{e9(eL,e$.target.checked,e$.currentTarget)}}),r("div",{className:eY,"aria-expanded":eF?"true":"false",children:x(eL)}),r("div",{className:eX,children:eL.content})]},eL.key)})});let tI=c("collapse",m(e8,eI));return("arrow"===e$&&(tI+=" collapse-arrow"),"plus"===e$&&(tI+=" collapse-plus"),eU&&(tI+=` ${eU}`),eq&&(tI+=" opacity-70"),"details"===eR)?r("details",{className:tI,name:e3,open:e8,"data-rue-accordion-group":e3,"data-rue-accordion-force":eI,onToggle:e$=>{let eR=e$.currentTarget.open;if(eq||eI){e$.currentTarget.open!==e8&&(e$.currentTarget.open=e8);return}t$(eR,e$.currentTarget)},children:eY}):i("div",{className:tI,"data-rue-accordion-group":e3,"data-rue-accordion-force":eI,children:[r("input",{type:"radio",name:e3,checked:e8,disabled:eq||!!eI,onClick:e$=>{let eI=e$.currentTarget;eV&&e8&&b(eI)&&(e$.preventDefault(),eI.checked=!1,t$(!1,eI))},onChange:e$=>{t$(e$.target.checked,e$.currentTarget)}}),eY]})},{Title:({className:e$,children:eI,as:eR="div"})=>{let eL=c("collapse-title",e$);return"summary"===eR?r("summary",{className:eL,children:eI}):"button"===eR?r("button",{type:"button",className:eL,children:eI}):r("div",{className:eL,children:eI})},Content:({className:e$,children:eI})=>r("div",{className:c("collapse-content",e$),children:eI})}),C={shouldRestore:!1,selectionStart:null,selectionEnd:null},w=0,T={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",small:"sm",middle:"md",medium:"md",large:"lg"},E=(...e$)=>e$.filter(Boolean).join(" "),D=e$=>null==e$?"":String(e$),O=e$=>{if(e$)return T[e$]},k=e$=>{switch(e$){case"filled":return"border-transparent bg-base-200/70 shadow-none focus-within:bg-base-100";case"ghost":return"input-ghost";case"borderless":return"bg-transparent border-transparent shadow-none";case"underlined":return"rounded-none border-x-0 border-t-0 border-b-base-300 bg-transparent px-0 shadow-none focus-within:border-b-primary";default:return}},A=({size:e$,status:eI,variant:eR,className:eL})=>{let ez="input flex w-full items-center gap-2",eW=O(e$),eH=k(eR);return eW&&(ez+=` input-${eW}`),eI&&(ez+=` input-${eI}`),eH&&(ez+=` ${eH}`),eL&&(ez+=` ${eL}`),ez},j=e$=>{if(!e$||"number"!=typeof e$.length)return[];let eI=[],eR=Number(e$.length)||0;for(let eL=0;eL<eR;eL+=1){let eR=e$[eL];void 0!==eR&&eI.push(eR)}return eI},M=e$=>null==e$||"boolean"==typeof e$?"":"string"==typeof e$||"number"==typeof e$?String(e$):Array.isArray(e$)?e$.map(e$=>M(e$)).filter(Boolean).join(" "):"object"==typeof e$?["value","label","title","description","name","text","children"].map(eI=>M(e$[eI])).filter(Boolean).join(" "):"",N=e$=>!!e$&&"object"==typeof e$&&"options"in e$&&Array.isArray(e$.options),P=(e$,eI,eR,eL)=>({key:String(e$.key??`${eI}:${eR}:${eL}:${D(e$.value)}`),value:e$.value,label:e$.label??e$.value,description:e$.description,disabled:!!e$.disabled,className:e$.className,style:e$.style,title:e$.title,searchText:[M(e$.value),M(e$.label),M(e$.description),M(e$.keywords),M(e$.title)].filter(Boolean).join(" "),raw:e$}),F=e$=>{let eI=j(e$),eR=[],eL=[];return eI.forEach((e$,eI)=>{if(N(e$)){let eL=j(e$.options).map((eR,eL)=>P(eR,String(e$.key??e$.label??`group-${eI}`),eI,eL));eR.push({key:String(e$.key??`group-${eI}`),label:e$.label,className:e$.className,style:e$.style,options:eL});return}eL.push(P(e$,"root",0,eL.length))}),eL.length>0&&eR.unshift({key:"__root__",options:eL}),eR},I=(e$,eI,eR)=>{if(!1===eR)return e$;let eL=eI.trim().toLowerCase();return eL?e$.map(e$=>{let ez=e$.options.filter(e$=>"function"==typeof eR?eR(eI,e$.raw):e$.searchText.toLowerCase().includes(eL));return{...e$,options:ez}}).filter(e$=>e$.options.length>0):e$},L=e$=>e$.flatMap(e$=>e$.options),R=e$=>e$.findIndex(e$=>!e$.disabled),z=(e$,eI,eR)=>e$.length?eI>=0&&eI<e$.length&&!e$[eI]?.disabled?eI:!1===eR?-1:R(e$):-1,B=(e$,eI,eR)=>{if(!e$.length)return -1;let eL=eI,ez=e$.length;for(let eI=0;eI<ez;eI+=1)if(eL=(eL+eR+e$.length)%e$.length,!e$[eL]?.disabled)return eL;return -1},V=(e$,eI)=>{if(eI&&"value"!==eI){let eR=e$[eI];if("string"==typeof eR||"number"==typeof eR)return String(eR)}return D(e$.value)},H=(e$,eI)=>{"function"==typeof e$?e$(eI):e$&&"object"==typeof e$&&(e$.current=eI??void 0)},U=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"xmlns","http://www.w3.org/2000/svg"),(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.8"),(0,t._$setClassName)(eI,"size-4"),(0,t._$setAttribute)(eI,"aria-hidden","true");let eR=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","m7 7 10 10M17 7 7 17"),eI}),W=e$=>(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(E("flex items-center gap-2 px-3 py-2 text-sm text-base-content/65",e$.className)))});let eL=(0,t._$createElement)("span",eR);return(0,t._$appendChild)(eR,eL),(0,t._$setClassName)(eL,"loading loading-spinner loading-xs"),(0,t._$setAttribute)(eL,"aria-hidden","true"),(0,t._$appendChild)(eR,(0,t._$createTextNode)("正在检索候选项")),eR}),G=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,__rue_rest_omit_20:e1,__rue_rest_omit_21:e2,__rue_rest_omit_22:e5,__rue_rest_omit_23:e3,__rue_rest_omit_24:e4,__rue_rest_omit_25:e6,__rue_rest_omit_26:e8,__rue_rest_omit_27:e7,__rue_rest_omit_28:e9,__rue_rest_omit_29:t$,__rue_rest_omit_30:tI,__rue_rest_omit_31:tR,__rue_rest_omit_32:tL,__rue_rest_omit_33:tz,__rue_rest_omit_34:tW,__rue_rest_omit_35:tH,__rue_rest_omit_36:tF,__rue_rest_omit_37:tP,__rue_rest_omit_38:tB,__rue_rest_omit_39:tK,__rue_rest_omit_40:tV,__rue_rest_omit_41:tq,__rue_rest_omit_42:tU,__rue_rest_omit_43:tG,rest:tZ,rootRef:tY,inputRef:tX,popupListRef:tJ,inputFocusRestoreSnapshot:tQ,inputFocusRestoreRequestId:t0,componentDisposed:t1,forwardedRef:t2,isControlled:t5,isOpenControlled:t3,getInputFocusRestoreSnapshot:t4,bumpInputFocusRestoreRequestId:t6,valueState:t8,previewValue:t7,popupOpenState:t9,focused:r$,composing:rI,highlightedIndex:rR,instanceId:rL,suppressNextFocusOpen:rz,clearConfig:rW,clearable:rH,dataTestId:rF,normalizedGroupsState:rP,filteredGroupsState:rB,filteredOptionsState:rK,emptyStateVisible:rV,popupVisibleState:rq,lastControlledValue:rU,controlledValueSynced:rG,createApi:rZ,syncForwardedRef:rY,getDisplayedValue:rX,isClearButtonVisible:rJ,syncNativeValue:rQ,syncNativeDataTestId:r0,captureInputFocusSnapshot:r1,clearInputFocusSnapshot:r2,captureInputFocusIntent:r5,queueInputFocusRestore:r3,restoreInputFocusSnapshot:r4,scheduleInputFocusRestore:r6,clearPreview:r8,shouldIgnoreOpenTarget:r7,isInputOpenTarget:r9,isPopupRequestedOpen:a$,syncFilteredState:aI,syncPopupVisibility:aR,findSelectedOptionIndex:aL,resolveNavigableIndex:az,buildOptionButtonClassName:aW,syncPopupOptionState:aH,schedulePopupOptionStateSync:aF,getResolvedActiveIndex:aP,setPopupOpen:aB,applyPreview:aK,requestPopupOpen:aV,commitValue:aq,selectOption:aU,handleDocumentMouseDown:aG,handleInput:aZ,handleFocus:aY,handleControlMouseDown:aX,handleControlClick:aJ,handleClick:aQ,handleBlur:a0,handleKeyDown:a1,handleCompositionStart:a2,handleCompositionEnd:a5,handleClear:a3,resolvedActiveIndex:a4,popupId:a6,controlOptionalProps:a8,inputOptionalProps:a7,popupWidthStyle:a9}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let{value:eI,defaultValue:eR,options:eL,open:ez,defaultOpen:eW,disabled:eH,readOnly:eF,loading:eP,placeholder:eB,allowClear:eK,backfill:eV,defaultActiveFirstOption:eq,filterOption:eU,notFoundContent:eG,popupMatchSelectWidth:eZ,popupRender:eY,optionLabelProp:eX,placement:eJ,size:eQ,status:e0,variant:e1,prefix:e2,suffix:e5,className:e3,style:e4,rootClassName:e6,controlClassName:e8,inputClassName:e7,popupClassName:e9,clearButtonClassName:t$,popupStyle:tI,classNames:tR,styles:tL,onChange:tz,onSearch:tW,onSelect:tH,onOpenChange:tF,onClear:tP,onFocus:tB,onBlur:tK,onKeyDown:tV,onInputKeyDown:tq,onPressEnter:tU,onPopupScroll:tG,...tZ}=e$,tY=(0,t._$vaporWithHookId)("useRef:1:0",()=>(0,t.useRef)()),tX=(0,t._$vaporWithHookId)("useRef:1:1",()=>(0,t.useRef)()),tJ=(0,t._$vaporWithHookId)("useRef:1:2",()=>(0,t.useRef)()),tQ=(0,t._$vaporWithHookId)("useRef:1:3",()=>(0,t.useRef)({...C})),t0=(0,t._$vaporWithHookId)("useRef:1:4",()=>(0,t.useRef)(0)),t1=(0,t._$vaporWithHookId)("useRef:1:5",()=>(0,t.useRef)(!1)),t2=tZ.ref,t5=void 0!==e$.value,t3=(0,t._$vaporWithHookId)("computed:1:6",()=>(0,t.computed)(()=>void 0!==e$.open)),t4=()=>tQ.current??C,t6=()=>(t0.current=(t0.current??0)+1,t0.current),t8=(0,t._$vaporWithHookId)("ref:1:7",()=>(0,t.ref)(D(t5?e$.value:e$.defaultValue))),t7=(0,t._$vaporWithHookId)("ref:1:8",()=>(0,t.ref)(null)),t9=(0,t._$vaporWithHookId)("ref:1:9",()=>(0,t.ref)(!!e$.defaultOpen)),r$=(0,t._$vaporWithHookId)("ref:1:10",()=>(0,t.ref)(!1)),rI=(0,t._$vaporWithHookId)("ref:1:11",()=>(0,t.ref)(!1)),rR=(0,t._$vaporWithHookId)("ref:1:12",()=>(0,t.ref)(-1)),rL=(0,t._$vaporWithHookId)("ref:1:13",()=>(0,t.ref)("")),rz=(0,t._$vaporWithHookId)("useRef:1:14",()=>(0,t.useRef)(!1)),rW=(0,t._$vaporWithHookId)("computed:1:15",()=>(0,t.computed)(()=>e$.allowClear&&"object"==typeof e$.allowClear?e$.allowClear:void 0)),rH=!!e$.allowClear,rF=tZ["data-testid"],rP=(0,t._$vaporWithHookId)("ref:1:16",()=>(0,t.ref)(F(e$.options))),rB=(0,t._$vaporWithHookId)("ref:1:17",()=>(0,t.ref)([])),rK=(0,t._$vaporWithHookId)("ref:1:18",()=>(0,t.ref)([])),rV=(0,t._$vaporWithHookId)("ref:1:19",()=>(0,t.ref)(!1)),rq=(0,t._$vaporWithHookId)("ref:1:20",()=>(0,t.ref)(!1)),rU=(0,t._$vaporWithHookId)("ref:1:21",()=>(0,t.ref)(void 0)),rG=(0,t._$vaporWithHookId)("ref:1:22",()=>(0,t.ref)(!1));"ref"in tZ&&delete tZ.ref;let rZ=()=>({nativeElement:tX.current,focus:()=>{tX.current?.focus()},blur:()=>{tX.current?.blur()}}),rY=()=>{H(t2,tX.current?rZ():null)},rX=()=>t7.value??t8.value,rJ=()=>{let e$=tX.current;if(!e$)return;let eI=rX();e$.value!==eI&&(e$.value=eI)},rQ=()=>{let e$=tX.current;if(e$){if(null==rF)return void e$.removeAttribute("data-testid");e$.setAttribute("data-testid",String(rF))}},r0=e$=>{if(!e$){tQ.current={...C};return}let eI=e$.ownerDocument.activeElement===e$;tQ.current={shouldRestore:eI,selectionStart:e$.selectionStart,selectionEnd:e$.selectionEnd},eI&&t6()},r1=()=>{tQ.current={...C}},r2=e$=>{e$&&(tQ.current={shouldRestore:!0,selectionStart:e$.selectionStart,selectionEnd:e$.selectionEnd},t6())},r5=({selectionStart:e$,selectionEnd:eI,suppressOpen:eR})=>{tQ.current={shouldRestore:!0,selectionStart:e$,selectionEnd:eI},t6(),eR&&(rz.current=!0)},r3=e$=>{let eI=t4();if(!e$||!eI.shouldRestore)return!1;if(e$.ownerDocument.activeElement!==e$&&e$.focus(),null!==eI.selectionStart&&null!==eI.selectionEnd&&"function"==typeof e$.setSelectionRange){let eR=Math.min(eI.selectionStart,e$.value.length),eL=Math.min(eI.selectionEnd,e$.value.length);e$.setSelectionRange(eR,eL)}return e$.ownerDocument.activeElement===e$},r4=(e$=t0.current??0,eI=8)=>{setTimeout(()=>{if(!t1.current&&e$===(t0.current??0)){if(r3(tX.current),eI>1&&t4().shouldRestore)return void r4(e$,eI-1);t4().shouldRestore&&r1()}},16)},r6=()=>{null!=t7.value&&(t7.value=null,rJ())},r8=e$=>e$?.closest('[data-rue-auto-complete-ignore-open="true"]'),r7=e$=>!!e$&&(e$===tX.current||e$.closest('input[role="combobox"]')===tX.current),r9=()=>t3.get()?!!e$.open:t9.value,a$=()=>{rP.value=F(e$.options),rB.value=I(rP.value,t8.value,e$.filterOption),rK.value=L(rB.value);let eI=L(rP.value).length;rV.value=!e$.loading&&(void 0===e$.notFoundContent?"暂无匹配建议":e$.notFoundContent)!==null&&(eI>0&&0===rK.value.length||0===eI&&t8.value.trim().length>0),aW()},aI=(eI=r9())=>{rq.value=!e$.disabled&&!e$.readOnly&&eI&&(e$.loading||rK.value.length>0||rV.value)},aR=eI=>eI.length&&t8.value?eI.findIndex(eI=>!eI.disabled&&V(eI.raw,e$.optionLabelProp)===t8.value):-1,aL=eI=>{if(rR.value>=0&&rR.value<eI.length&&!eI[rR.value]?.disabled)return rR.value;let eR=aR(eI);return eR>=0?eR:z(eI,rR.value,void 0===e$.defaultActiveFirstOption||e$.defaultActiveFirstOption)},az=()=>{let e$=rq.value?aL(rK.value):-1,eI=tX.current;eI&&(rq.value&&e$>=0&&rL.value?eI.setAttribute("aria-activedescendant",`${rL.value}-option-${rK.value[e$]?.key}`):eI.removeAttribute("aria-activedescendant"));let eR=tJ.current;if(!eR)return;let eL=Array.from(eR.querySelectorAll('[role="option"]'));eL.forEach((eI,eR)=>{eI.setAttribute("aria-selected",eR===e$?"true":"false")}),e$>=0&&eL[e$]?.scrollIntoView?.({block:"nearest"})},aW=()=>{setTimeout(()=>{t1.current||az()},0)},aH=()=>aL(rK.value),aF=eI=>{let eR=r9();t3.get()||(t9.value=eI),eR!==eI&&e$.onOpenChange&&e$.onOpenChange(eI),eI||(rR.value=-1,r6()),aI(eI),aW()},aP=eI=>{if(!e$.backfill||!eI||eI.disabled)return void r6();let eR=V(eI.raw,e$.optionLabelProp);t7.value=eR,rJ();let eL=tX.current;if(!eL||document.activeElement!==eL)return;let ez=Math.min(t8.value.length,eR.length);eL.setSelectionRange(ez,eR.length)},aB=()=>{if(r0(tX.current),e$.disabled||e$.readOnly)return void aI(!1);if(a$(),rq.value||r9()){aI(!0),t4().shouldRestore&&r4();return}aF(!0),t4().shouldRestore&&r4()},aK=(eI,eR)=>{t8.value=eI,t7.value=null,rJ(),a$(),aI(),e$.onChange&&e$.onChange(eI),eR?.emitSearch&&e$.onSearch&&!rI.value&&e$.onSearch(eI)},aV=eI=>{if(eI.disabled)return;let eR=V(eI.raw,e$.optionLabelProp);r5({selectionStart:eR.length,selectionEnd:eR.length,suppressOpen:!0}),aK(eR),rR.value=-1,aF(!1),r4(),e$.onSelect&&e$.onSelect(eI.value,eI.raw)},aq=e$=>{let eI=tY.current,eR=e$.target;eI&&eR&&eI.contains(eR)||aF(!1)};(0,t.onMounted)(()=>{t1.current=!1,rL.value||(w+=1,rL.value=`rue-auto-complete-${w}`),a$(),aI(),rY(),rJ(),rQ(),document.addEventListener("mousedown",aq)}),(0,t.onUnmounted)(()=>{t1.current=!0,t6(),document.removeEventListener("mousedown",aq),H(t2,null)}),(0,t._$vaporWithHookId)("watch:1:23",()=>(0,t.watch)(()=>e$.value,()=>{let eI=void 0===e$.value?void 0:D(e$.value),eR=!rG.value||eI!==rU.value;rG.value=!0,rU.value=eI,eR&&(t8.value=void 0===eI?t8.value:eI,t7.value=null,a$()),aI(),rJ(),rQ()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:24",()=>(0,t.watch)(()=>e$.options,()=>{a$(),aI()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:25",()=>(0,t.watch)(()=>e$.filterOption,()=>{a$(),aI()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:26",()=>(0,t.watch)(()=>e$.loading,()=>{a$(),aI()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:27",()=>(0,t.watch)(()=>e$.open,()=>{!1===e$.open&&r6(),aI()},{immediate:!0}));let aU=aH(),aG=rL.value?`${rL.value}-listbox`:void 0,aZ={};e$.disabled&&(aZ["aria-disabled"]="true");let aY={};return e$.disabled&&(aY.disabled=!0),e$.readOnly&&(aY.readOnly=!0),void 0!==e$.placeholder&&(aY.placeholder=e$.placeholder),rq.value&&(aY["aria-controls"]=aG),rq.value&&aU>=0&&rL.value&&(aY["aria-activedescendant"]=`${rL.value}-option-${rK.value[aU]?.key}`),"error"===e$.status?aY["aria-invalid"]="true":void 0!==tZ["aria-invalid"]&&(aY["aria-invalid"]=tZ["aria-invalid"]),{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,__rue_rest_omit_20:e1,__rue_rest_omit_21:e2,__rue_rest_omit_22:e5,__rue_rest_omit_23:e3,__rue_rest_omit_24:e4,__rue_rest_omit_25:e6,__rue_rest_omit_26:e8,__rue_rest_omit_27:e7,__rue_rest_omit_28:e9,__rue_rest_omit_29:t$,__rue_rest_omit_30:tI,__rue_rest_omit_31:tR,__rue_rest_omit_32:tL,__rue_rest_omit_33:tz,__rue_rest_omit_34:tW,__rue_rest_omit_35:tH,__rue_rest_omit_36:tF,__rue_rest_omit_37:tP,__rue_rest_omit_38:tB,__rue_rest_omit_39:tK,__rue_rest_omit_40:tV,__rue_rest_omit_41:tq,__rue_rest_omit_42:tU,__rue_rest_omit_43:tG,rest:tZ,rootRef:tY,inputRef:tX,popupListRef:tJ,inputFocusRestoreSnapshot:tQ,inputFocusRestoreRequestId:t0,componentDisposed:t1,forwardedRef:t2,isControlled:t5,isOpenControlled:t3,getInputFocusRestoreSnapshot:t4,bumpInputFocusRestoreRequestId:t6,valueState:t8,previewValue:t7,popupOpenState:t9,focused:r$,composing:rI,highlightedIndex:rR,instanceId:rL,suppressNextFocusOpen:rz,clearConfig:rW,clearable:rH,dataTestId:rF,normalizedGroupsState:rP,filteredGroupsState:rB,filteredOptionsState:rK,emptyStateVisible:rV,popupVisibleState:rq,lastControlledValue:rU,controlledValueSynced:rG,createApi:rZ,syncForwardedRef:rY,getDisplayedValue:rX,isClearButtonVisible:()=>rH&&!e$.disabled&&!e$.readOnly&&rX().length>0,syncNativeValue:rJ,syncNativeDataTestId:rQ,captureInputFocusSnapshot:r0,clearInputFocusSnapshot:r1,captureInputFocusIntent:r2,queueInputFocusRestore:r5,restoreInputFocusSnapshot:r3,scheduleInputFocusRestore:r4,clearPreview:r6,shouldIgnoreOpenTarget:r8,isInputOpenTarget:r7,isPopupRequestedOpen:r9,syncFilteredState:a$,syncPopupVisibility:aI,findSelectedOptionIndex:aR,resolveNavigableIndex:aL,buildOptionButtonClassName:eI=>E("flex w-full items-start gap-3 rounded-2xl px-3 py-2 text-left transition",eI.disabled?"cursor-not-allowed text-base-content/35":"text-base-content/85 hover:bg-base-200/80 aria-selected:bg-primary/10 aria-selected:text-primary",e$.classNames?.item,eI.className),syncPopupOptionState:az,schedulePopupOptionStateSync:aW,getResolvedActiveIndex:aH,setPopupOpen:aF,applyPreview:aP,requestPopupOpen:aB,commitValue:aK,selectOption:aV,handleDocumentMouseDown:aq,handleInput:eI=>{let eR=eI.target,eL=eR?.value??"";r0(eR),t7.value=null,t8.value=eL,rR.value=-1,a$(),e$.disabled||e$.readOnly?aI(!1):aF(!0),!rI.value&&e$.onSearch&&e$.onSearch(eL),e$.onChange&&e$.onChange(eL),r4()},handleFocus:eI=>{r$.value=!0,rz.current?rz.current=!1:aB(),e$.onFocus&&e$.onFocus(eI)},handleControlMouseDown:eI=>{if(!r8(eI.target)){if(r7(eI.target)){rz.current=!1,r2(tX.current),setTimeout(()=>{t1.current||e$.disabled||e$.readOnly||(aB(),t4().shouldRestore&&r4())},0);return}void 0!==eI.button&&0!==eI.button||aB()}},handleControlClick:e$=>{r8(e$.target)||r7(e$.target)||aB()},handleClick:e$=>{aB(),"function"==typeof tZ.onClick&&tZ.onClick(e$)},handleBlur:eI=>{let eR=eI.relatedTarget;if(!eR&&(t4().shouldRestore||rq.value||r9())){r2(tX.current),r4();return}r$.value=!1,tY.current&&eR&&tY.current.contains(eR)||aF(!1),e$.onBlur&&e$.onBlur(eI)},handleKeyDown:eI=>{e$.onKeyDown&&e$.onKeyDown(eI),e$.onInputKeyDown&&e$.onInputKeyDown(eI);let eR=eI.key,eL=rK.value,ez=aL(eL);if("ArrowDown"===eR||"ArrowUp"===eR){"function"==typeof eI.preventDefault&&eI.preventDefault(),r9()||aF(!0);let e$="ArrowDown"===eR?1:-1,eW=B(eL,ez<0?1===e$?-1:0:ez,e$);rR.value=eW,aP(eL[eW]),aW();return}if("Enter"===eR){let eR=ez>=0?eL[ez]:void 0;if(rq.value&&eR){"function"==typeof eI.preventDefault&&eI.preventDefault(),aV(eR);return}e$.onPressEnter&&e$.onPressEnter(eI);return}if("Escape"===eR||"Tab"===eR){r6(),aF(!1);return}},handleCompositionStart:()=>{rI.value=!0},handleCompositionEnd:eI=>{rI.value=!1;let eR=eI.target,eL=eR?.value??t8.value;r0(eR),t8.value=eL,t7.value=null,a$(),aI(),e$.onSearch&&e$.onSearch(eL),r4()},handleClear:eI=>{"function"==typeof eI.preventDefault&&eI.preventDefault(),"function"==typeof eI.stopPropagation&&eI.stopPropagation(),aK("",{emitSearch:!0}),rR.value=-1,aF(!1),tX.current?.focus(),e$.onClear&&e$.onClear(eI)},resolvedActiveIndex:aU,popupId:aG,controlOptionalProps:aZ,inputOptionalProps:aY,popupWidthStyle:(0,t._$vaporWithHookId)("computed:1:28",()=>(0,t.computed)(()=>(void 0===e$.popupMatchSelectWidth||e$.popupMatchSelectWidth)===!1?void 0:"number"==typeof(void 0===e$.popupMatchSelectWidth||e$.popupMatchSelectWidth)?{width:`${void 0===e$.popupMatchSelectWidth||e$.popupMatchSelectWidth}px`}:{width:"100%"}))}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI),eL=(0,t._$vaporBindUseRef)(eR,()=>e$=>{tY.current=e$??void 0});(0,t.onBeforeUnmount)(()=>{eL()}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(E("relative w-full",e$.className,e$.rootClassName,e$.classNames?.root)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{...e$.style,...e$.styles?.root})}),(0,t._$setAttribute)(eR,"data-rue-auto-complete-root","true");let ez=(0,t._$createElement)("label",eR);(0,t._$appendChild)(eR,ez),(0,t.watchEffect)(()=>{(0,t._$setClassName)(ez,String(A({size:e$.size,status:e$.status,variant:e$.variant,className:E(e$.controlClassName,e$.classNames?.control)})))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.control;(0,t._$setStyle)(ez,eI)}),(0,t._$setAttribute)(ez,"data-rue-auto-complete-control","true"),(0,t._$addEventListener)(ez,"mousedown",aX),(0,t._$addEventListener)(ez,"click",aJ);let eW=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,eW),(0,t.watchEffect)(()=>{let eI=void 0===e$.prefix?"":(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("span",eI);(0,t._$appendChild)(eI,eR),(0,t._$setClassName)(eR,"inline-flex h-5 w-5 shrink-0 items-center justify-center self-center text-sm leading-none text-base-content/60");let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.prefix;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,eW))});let eH=(0,t._$createElement)("input",ez);(0,t._$appendChild)(ez,eH);let eF=(0,t._$vaporBindUseRef)(eH,()=>e$=>{tX.current=e$??void 0,rY(),r0(),r4(e$??void 0)});(0,t.onBeforeUnmount)(()=>{eF()}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eH,"type",String(tZ.type??"text"))}),(0,t.watchEffect)(()=>{(0,t._$setValue)(eH,rX())}),(0,t._$setAttribute)(eH,"role","combobox"),(0,t._$setAttribute)(eH,"aria-autocomplete","list"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eH,"aria-expanded",String(rq.value?"true":"false"))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eH,String(E("min-w-0 w-0 flex-1 border-0 bg-transparent p-0 text-inherit outline-none placeholder:text-base-content/40",e$.inputClassName,e$.classNames?.input)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.input;(0,t._$setStyle)(eH,eI)}),(0,t._$addEventListener)(eH,"input",aZ),(0,t._$addEventListener)(eH,"focus",aY),(0,t._$addEventListener)(eH,"blur",a0),(0,t._$addEventListener)(eH,"click",aQ),(0,t._$addEventListener)(eH,"keydown",a1),(0,t._$addEventListener)(eH,"compositionstart",a2),(0,t._$addEventListener)(eH,"compositionend",a5);let eP=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,eP),(0,t.watchEffect)(()=>{let eI=rH?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("button",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"type","button"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"tabIndex","-1")}),(0,t._$setAttribute)(eR,"aria-label","Clear text"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"aria-hidden",String(rJ()?void 0:"true"))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(E("btn btn-ghost btn-xs btn-circle h-7 min-h-0 w-7 shrink-0 p-0 text-base-content/55 hover:text-base-content",!rJ()&&"pointer-events-none opacity-0",e$.clearButtonClassName,e$.classNames?.clear)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.clear;(0,t._$setStyle)(eR,eI)}),(0,t._$setAttribute)(eR,"data-rue-auto-complete-ignore-open","true"),(0,t._$addEventListener)(eR,"mousedown",e$=>{rJ()&&"function"==typeof e$.preventDefault&&e$.preventDefault()}),(0,t._$addEventListener)(eR,"click",e$=>{rJ()&&a3(e$)});let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let e$=rW.get()?.clearIcon??(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(e$,eI),(0,t.renderAnchor)((0,t._$createComponent)(U,{}),e$,eI),e$});(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eL))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,eP))}),(0,t._$appendChild)(ez,(0,t._$createTextNode)(" "));let eB=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,eB),(0,t.watchEffect)(()=>{let eI=void 0===e$.suffix?"":(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("span",eI);(0,t._$appendChild)(eI,eR),(0,t._$setClassName)(eR,"inline-flex h-5 w-5 shrink-0 items-center justify-center self-center text-sm leading-none text-base-content/60");let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.suffix;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,eB))});let eK=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eK),(0,t.watchEffect)(()=>{let eI=rq.value?e$.popupRender?e$.popupRender(r("div",{className:E("absolute z-30 overflow-hidden rounded-box border border-base-300 bg-base-100 shadow-xl",(void 0===e$.placement?"bottom":e$.placement)==="top"?"bottom-[calc(100%+0.5rem)]":"top-[calc(100%+0.5rem)]",e$.popupClassName,e$.classNames?.popup),style:{...a9.get(),...e$.popupStyle,...e$.styles?.popup},"data-rue-auto-complete-popup":"true",children:r("div",{ref:e$=>{tJ.current=e$??void 0,aF()},id:a6,role:"listbox",className:E("max-h-80 overflow-y-auto py-2",e$.classNames?.list),style:e$.styles?.list,onScroll:eI=>{e$.onPopupScroll&&e$.onPopupScroll(eI)},children:e$.loading?r(W,{className:e$.classNames?.loading}):rK.value.length>0?rB.value.map((eI,eR)=>{let eL=0;return rB.value.slice(0,eR).forEach(e$=>{eL+=e$.options.length}),i("div",{className:E(void 0===eI.label?void 0:"px-2 pb-2 pt-1",e$.classNames?.group,eI.className),style:{...e$.styles?.group,...eI.style},children:[void 0===eI.label?null:r("div",{className:"px-2 pb-2 text-[11px] font-semibold uppercase tracking-[0.18em] text-base-content/40",children:eI.label}),r("div",{className:"space-y-1",children:eI.options.map((eI,eR)=>{let ez=eL+eR;return r("button",{id:rL.value?`${rL.value}-option-${eI.key}`:void 0,type:"button",role:"option","aria-selected":ez===a4?"true":"false",disabled:eI.disabled,title:eI.title,className:aW(eI),style:{...e$.styles?.item,...eI.style},onMouseDown:e$=>{"function"==typeof e$.preventDefault&&e$.preventDefault()},onMouseEnter:()=>{rR.value=ez,aK(eI),aF()},onClick:()=>{aU(eI)},children:i("span",{className:"min-w-0 flex-1",children:[r("span",{className:"block truncate font-medium",children:eI.label}),void 0===eI.description?null:r("span",{className:"mt-1 block truncate text-xs text-base-content/55",children:eI.description})]})},eI.key)})})]},eI.key)}):rV.value?r("div",{className:E("px-3 py-2 text-sm text-base-content/55",e$.classNames?.empty),style:e$.styles?.empty,children:void 0===e$.notFoundContent?"暂无匹配建议":e$.notFoundContent}):null})})):(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(E("absolute z-30 overflow-hidden rounded-box border border-base-300 bg-base-100 shadow-xl",!rq.value&&"hidden",(void 0===e$.placement?"bottom":e$.placement)==="top"?"bottom-[calc(100%+0.5rem)]":"top-[calc(100%+0.5rem)]",e$.popupClassName,e$.classNames?.popup)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{...a9.get(),...e$.popupStyle,...e$.styles?.popup})}),(0,t._$setAttribute)(eR,"data-rue-auto-complete-popup","true");let eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL);let ez=(0,t._$vaporBindUseRef)(eL,()=>e$=>{tJ.current=e$??void 0,aF()});(0,t.onBeforeUnmount)(()=>{ez()}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"id",String(a6))}),(0,t._$setAttribute)(eL,"role","listbox"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(E("max-h-80 overflow-y-auto py-2",e$.classNames?.list)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.list;(0,t._$setStyle)(eL,eI)}),(0,t._$addEventListener)(eL,"scroll",eI=>{e$.onPopupScroll&&e$.onPopupScroll(eI)});let eW=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eL,eW),(0,t.watchEffect)(()=>{let eI=rq.value?e$.loading?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let eL=(0,t._$createComponent)(W,{className:e$.classNames?.loading});(0,t.untrack)(()=>(0,t.renderAnchor)(eL,eI,eR))}),eI}):rK.value.length>0?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createComment)("rue:list:start"),eL=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eI,eR),(0,t._$appendChild)(eI,eL);let ez=new Map;return(0,t.watchEffect)(()=>{ez=(0,t._$vaporKeyedList)({items:rB.value||[],getKey:(e$,eI)=>e$.key,elements:ez,parent:eR.parentNode,before:eL,start:eR,renderItem:(eI,eR,eL,ez,eW)=>{let eH;(0,t.renderBetween)((eH=0,rB.value.slice(0,eW).forEach(e$=>{eH+=e$.options.length}),i("div",{className:E(void 0===eI.label?void 0:"px-2 pb-2 pt-1",e$.classNames?.group,eI.className),style:{...e$.styles?.group,...eI.style},children:[void 0===eI.label?null:r("div",{className:"px-2 pb-2 text-[11px] font-semibold uppercase tracking-[0.18em] text-base-content/40",children:eI.label}),r("div",{className:"space-y-1",children:eI.options.map((eI,eR)=>{let eL=eH+eR;return r("button",{id:rL.value?`${rL.value}-option-${eI.key}`:void 0,type:"button",role:"option","aria-selected":eL===a4?"true":"false",disabled:eI.disabled,title:eI.title,className:aW(eI),style:{...e$.styles?.item,...eI.style},onMouseDown:e$=>{"function"==typeof e$.preventDefault&&e$.preventDefault()},onMouseEnter:()=>{rR.value=eL,aK(eI),aF()},onClick:()=>{aU(eI)},children:i("span",{className:"min-w-0 flex-1",children:[r("span",{className:"block truncate font-medium",children:eI.label}),void 0===eI.description?null:r("span",{className:"mt-1 block truncate text-xs text-base-content/55",children:eI.description})]})},eI.key)})})]},eI.key)),eR,eL,ez)}})}),eI}):rV.value?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(E("px-3 py-2 text-sm text-base-content/55",e$.classNames?.empty)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.empty;(0,t._$setStyle)(eR,eI)});let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=void 0===e$.notFoundContent?"暂无匹配建议":e$.notFoundContent;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eI}):"":"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eL,eW))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eK))}),eR})},K=(e$,eI)=>eI?`${e$} ${eI}`:e$,q=e$=>null!=e$&&!1!==e$&&""!==e$&&(!Array.isArray(e$)||e$.some(e$=>q(e$))),J=e$=>{switch(e$){case"small":return"sm";case"medium":case"middle":return"md";case"large":return"lg";default:return e$}},Y=e$=>{switch(J(e$)){case"xs":case"sm":return"loading-xs";case"lg":return"loading-md";case"xl":return"loading-lg";default:return"loading-sm"}},X=e$=>{switch(J(e$)){case"xs":return"btn-xs";case"sm":return"btn-sm";case"md":return"btn-md";case"lg":return"btn-lg";case"xl":return"btn-xl";default:return}},ee=e$=>{switch(e$){case"square":return"btn-square";case"circle":case"round":return"rounded-full";default:return}},te=e$=>{switch(e$){case"outlined":return{outline:!0,dash:!1,soft:!1,ghost:!1,link:!1};case"dashed":return{outline:!1,dash:!0,soft:!1,ghost:!1,link:!1};case"filled":return{outline:!1,dash:!1,soft:!0,ghost:!1,link:!1};case"text":return{outline:!1,dash:!1,soft:!1,ghost:!0,link:!1};case"link":return{outline:!1,dash:!1,soft:!1,ghost:!1,link:!0};default:return{outline:!1,dash:!1,soft:!1,ghost:!1,link:!1}}},ne=e$=>e$?"object"==typeof e$?{active:!0,delay:"number"==typeof e$.delay&&e$.delay>0?e$.delay:0,icon:e$.icon}:{active:!0,delay:0}:{active:!1,delay:0},Z=({size:e$})=>r("span",{className:`loading loading-spinner ${Y(e$)}`.trim()}),re=(e$,eI,eR)=>{if(!e$)return;let eL=X(eI),ez=ee(eR);e$.querySelectorAll(".btn").forEach(eI=>{if(eI.closest('[data-rue-button-group="true"]')!==e$)return;eI.classList.add("join-item");let eW=eI.dataset.rueButtonGroupSizeClass;eW&&eI.classList.remove(eW),eL?(eI.classList.add(eL),eI.dataset.rueButtonGroupSizeClass=eL):delete eI.dataset.rueButtonGroupSizeClass;let eH=eI.dataset.rueButtonGroupShapeClass;eH&&eI.classList.remove(eH),eR&&"default"!==eR&&ez?(eI.classList.add(ez),eI.dataset.rueButtonGroupShapeClass=ez):delete eI.dataset.rueButtonGroupShapeClass})},ie=Object.assign(({as:e$,type:eI,htmlType:eR,color:eL,shape:ez="default",size:eW,icon:eH,iconPlacement:eF="start",loading:eP,disabled:eB,danger:eK,active:eV,block:eq,wide:eU,className:eG,href:eZ,target:eY,rel:eX,onClick:eJ,children:eQ,...e0})=>{let e1=te(eI),e2=eL??(eK?"danger":"default"),e5=J(eW),e3=ne(eP),e4=!!eB||e3.active,e6=e$??(eZ?"a":"button"),e8=e3.active,e7=e8?e3.icon??r(Z,{size:eW}):eH,e9=null!=e7,t$=q(eQ),tI="btn";"default"!==e2&&(tI+=` btn-${"danger"===e2?"error":e2}`),e5&&(tI+=` btn-${e5}`),e1.outline&&(tI+=" btn-outline"),e1.dash&&(tI+=" btn-dash"),e1.soft&&(tI+=" btn-soft"),e1.ghost&&(tI+=" btn-ghost"),e1.link&&(tI+=" btn-link"),eV&&(tI+=" btn-active"),eq&&(tI+=" btn-block"),eU&&(tI+=" btn-wide"),"square"===ez&&(tI+=" btn-square"),"circle"===ez&&(tI+=" btn-circle"),"round"===ez&&(tI+=" rounded-full"),e4&&"button"!==e6&&(tI+=" btn-disabled"),eG&&(tI+=` ${eG}`);let tR=K(tI,e9&&t$?"gap-2":void 0),tL=e$=>{if(e4){"function"==typeof e$.preventDefault&&e$.preventDefault(),"function"==typeof e$.stopPropagation&&e$.stopPropagation();return}eJ&&eJ(e$)};return"a"===e6?r("a",{...e0,href:e4?void 0:eZ,target:eY,rel:"_blank"!==eY||eX?eX:"noreferrer",role:eZ?e0.role:e0.role??"button",className:tR,"aria-disabled":e4?"true":void 0,"aria-busy":e8?"true":void 0,onClick:tL,children:"end"===eF?i(e.Fragment,{children:[t$?r("span",{children:eQ}):null,e9?r("span",{className:"inline-flex items-center justify-center","aria-hidden":t$?"true":void 0,children:e7}):null]}):i(e.Fragment,{children:[e9?r("span",{className:"inline-flex items-center justify-center","aria-hidden":t$?"true":void 0,children:e7}):null,t$?r("span",{children:eQ}):null]})}):"div"===e6?r("div",{...e0,role:e0.role??"button",tabIndex:e0.tabIndex??(e4?-1:0),className:tR,"aria-disabled":e4?"true":void 0,"aria-busy":e8?"true":void 0,onClick:tL,children:"end"===eF?i(e.Fragment,{children:[t$?r("span",{children:eQ}):null,e9?r("span",{className:"inline-flex items-center justify-center","aria-hidden":t$?"true":void 0,children:e7}):null]}):i(e.Fragment,{children:[e9?r("span",{className:"inline-flex items-center justify-center","aria-hidden":t$?"true":void 0,children:e7}):null,t$?r("span",{children:eQ}):null]})}):r("button",{...e0,className:tR,disabled:e4,type:eR??"button","aria-busy":e8?"true":void 0,onClick:tL,children:"end"===eF?i(e.Fragment,{children:[t$?r("span",{children:eQ}):null,e9?r("span",{className:"inline-flex items-center justify-center","aria-hidden":t$?"true":void 0,children:e7}):null]}):i(e.Fragment,{children:[e9?r("span",{className:"inline-flex items-center justify-center","aria-hidden":t$?"true":void 0,children:e7}):null,t$?r("span",{children:eQ}):null]})})},{Group:({as:e$,size:eI,shape:eR,direction:eL,block:ez,className:eW,style:eH,children:eF,...eP})=>{let eB=(0,e.useRef)(null),eK=(0,e.useRef)(void 0),eV=()=>{re(eB.current,eI,eR)};(0,e.onMounted)(()=>{"function"==typeof MutationObserver&&(eK.current=new MutationObserver(()=>{eV()}),eK.current?.disconnect(),eB.current&&"function"==typeof MutationObserver&&eK.current?.observe(eB.current,{childList:!0,subtree:!0})),eV()}),(0,e.onUnmounted)(()=>{eK.current?.disconnect(),eK.current=void 0}),(0,e.watch)(()=>`${eI??""}|${eR??""}|${eL??""}|${ez?"block":""}`,()=>{eV()},{immediate:!0});let eq="join";return"vertical"===eL&&(eq+=" join-vertical flex-col"),ez&&(eq+=" w-full"),eW&&(eq+=` ${eW}`),r(e$??"div",{...eP,ref:eB,className:eq,style:eH,"data-rue-button-group":"true","data-rue-button-group-direction":eL??"horizontal",children:eF})}}),Q=(e$,eI)=>eI?`${e$} ${eI}`:e$,ae=e$=>{switch(e$){case"small":return"sm";case"medium":case"middle":return"md";case"large":return"lg";default:return e$}},$=e$=>{switch(e$){case"outlined":return"card-border";case"dashed":return"card-dash";default:return""}},oe=e$=>{let eI=ae(e$);switch(eI){case"xs":case"sm":case"md":case"lg":case"xl":return eI;default:return}},se=(e$,eI,eR,eL)=>{let ez="tabs";return"box"===e$&&(ez+=" tabs-box"),"border"===e$&&(ez+=" tabs-border"),"lift"===e$&&(ez+=" tabs-lift"),"bottom"===eI&&(ez+=" tabs-bottom"),eR&&(ez+=` tabs-${eR}`),eL&&(ez+=` ${eL}`),ez},ce=e$=>{if(!e$)return;let eI=e$.closest("[data-rue-card-tabs]");eI&&(eI.querySelectorAll("button.tab").forEach(e$=>{e$.classList.remove("tab-active")}),e$.classList.add("tab-active"))},le=({size:e$})=>{let eI=ae(e$),eR=["w-4/5","w-full","w-3/4","w-2/3"];return i("div",{className:"space-y-3","aria-busy":"true","aria-live":"polite",children:[r("div",{className:"skeleton h-5 w-2/5 rounded-full"}),Array.from({length:"xs"===eI?2:"xl"===eI?4:3}).map((e$,eI)=>r("div",{className:`skeleton h-4 rounded-full ${eR[eI%eR.length]}`.trim()},`line-${eI}`))]})},ue=Object.assign(({size:e$,border:eI,bordered:eR,dash:eL,side:ez,imageFull:eW,variant:eH,type:eF="default",hoverable:eP,loading:eB,title:eK,extra:eV,cover:eq,actions:eU,tabList:eG,activeTabKey:eZ,defaultActiveTabKey:eY,tabBarExtraContent:eX,tabProps:eJ,onTabChange:eQ,className:e0,style:e1,headerClassName:e2,headerStyle:e5,bodyClassName:e3,bodyStyle:e4,coverClassName:e6,coverStyle:e8,actionsClassName:e7,actionsStyle:e9,titleClassName:t$,titleStyle:tI,extraClassName:tR,extraStyle:tL,children:tz,...tW})=>{let tH=ae(e$),tF=eG?.map(e$=>({key:e$.key,label:e$.label??e$.tab??e$.key,disabled:e$.disabled,className:e$.className}))??[],tP=eU??[],tB=(0,e.ref)(eY??tF[0]?.key??""),tK=eZ??tB.value??tF[0]?.key??"",tV=null!=eK||null!=eV||null!=eq||!!eB||tP.length>0||tF.length>0||null!=eX,tq="card";tH&&(tq+=` card-${tH}`),(eI||eR)&&(tq+=" card-border"),eL&&(tq+=" card-dash"),ez&&(tq+=" card-side"),eW&&(tq+=" image-full"),eH&&$(eH)&&(tq+=` ${$(eH)}`),"inner"===eF&&(tq+=" border border-base-300 bg-base-200/60 shadow-none"),eP&&(tq+=" transition duration-200 ease-out hover:-translate-y-1 hover:shadow-[0_22px_60px_-36px_rgba(15,23,42,0.55)]"),e0&&(tq+=` ${e0}`);let tU=tF.length?r("div",{role:"tablist","data-rue-card-tabs":!0,className:se(eJ?.style??"border",eJ?.placement,eJ?.size??oe(e$),eJ?.className),children:tF.map(e$=>r("button",{type:"button",role:"tab",className:`tab ${tK===e$.key?"tab-active":""} ${e$.disabled?"tab-disabled":""} ${e$.className??""}`.trim(),disabled:e$.disabled,onClick:eI=>{var eR;e$.disabled||(eR=e$.key,void 0===eZ&&(tB.value=eR,ce(eI?.currentTarget??eI?.target)),eQ&&eQ(eR))},children:e$.label},e$.key))}):null;return r("div",{...tW,className:tq,style:e1,children:tV?i(e.Fragment,{children:[null!=eK||null!=eV||null!=tU||null!=eX?i("div",{className:Q("rue-card-header border-base-300/80 border-b px-6 py-4",e2),style:e5,children:[null!=eK||null!=eV?i("div",{className:"flex flex-wrap items-center gap-3",children:[null==eK?null:r("div",{className:Q("min-w-0 flex-1 text-base font-semibold leading-6",t$),style:tI,children:eK}),null==eV?null:r("div",{className:Q("shrink-0 text-sm opacity-80",tR),style:tL,children:eV})]}):null,null!=tU||null!=eX?i("div",{className:`flex flex-wrap items-center gap-3 ${null!=eK||null!=eV?"mt-4":""}`.trim(),children:[null==tU?r("div",{className:"flex-1"}):r("div",{className:"min-w-0 flex-1",children:tU}),null==eX?null:r("div",{className:"shrink-0",children:eX})]}):null]}):null,null==eq?null:r("figure",{className:Q("rue-card-cover overflow-hidden",e6),style:e8,children:eq}),eB||null!=tz?r("div",{className:Q("card-body",e3),style:e4,children:eB?r(le,{size:e$}):tz}):null,tP.length?r("ul",{className:Q("rue-card-actions border-base-300/80 flex divide-x divide-base-300/80 border-t bg-base-200/40",e7),style:e9,children:tP.map((e$,eI)=>r("li",{className:"flex-1",children:r("div",{className:"flex h-full items-center justify-center px-4 py-3 text-sm",children:e$})},`action-${eI}`))}):null]}):tz})},{Body:({className:e$,style:eI,children:eR,...eL})=>r("div",{...eL,className:Q("card-body",e$),style:eI,children:eR}),Title:({className:e$,style:eI,children:eR,...eL})=>r("h2",{...eL,className:Q("card-title",e$),style:eI,children:eR}),Actions:({className:e$,style:eI,children:eR,...eL})=>r("div",{...eL,className:Q("card-actions",e$),style:eI,children:eR}),Figure:({className:e$,style:eI,children:eR,...eL})=>r("figure",{...eL,className:Q("figure",e$),style:eI,children:eR}),Grid:({className:e$,style:eI,hoverable:eR=!0,children:eL,...ez})=>{let eW="rue-card-grid block bg-base-100/70 p-5";return eR&&(eW+=" transition duration-200 ease-out hover:bg-base-100 hover:shadow-[0_18px_40px_-28px_rgba(15,23,42,0.45)]"),e$&&(eW+=` ${e$}`),r("div",{...ez,className:eW,style:eI,children:eL})},Meta:({className:e$,style:eI,avatar:eR,avatarClassName:eL,avatarStyle:ez,title:eW,titleClassName:eH,titleStyle:eF,description:eP,descriptionClassName:eB,descriptionStyle:eK,children:eV,...eq})=>i("div",{...eq,className:Q("rue-card-meta flex items-start gap-4",e$),style:eI,children:[null==eR?null:r("div",{className:Q("rue-card-meta-avatar shrink-0",eL),style:ez,children:eR}),null!=eW||null!=eP||null!=eV?i("div",{className:"min-w-0 flex-1 space-y-1",children:[null==eW?null:r("div",{className:Q("rue-card-meta-title truncate text-base font-semibold leading-6",eH),style:eF,children:eW}),null==eP?null:r("div",{className:Q("rue-card-meta-description text-sm leading-6 opacity-75",eB),style:eK,children:eP}),eV]}):null]})}),de=(e$,eI)=>eI?`${e$} ${eI}`:e$,fe=e$=>"number"==typeof e$&&e$>=0&&e$<=6?e$:1,pe=e$=>new Date(e$.getTime()),me=(e$,eI,eR)=>{let eL=new Date(e$,eI,eR);return eL.setHours(12,0,0,0),eL},he=e$=>{let eI=pe(e$);return eI.setHours(0,0,0,0),eI},ge=e$=>me(e$.getFullYear(),e$.getMonth(),1),_e=e$=>me(e$.getFullYear(),e$.getMonth()+1,0),ve=e$=>me(e$.getFullYear(),0,1),ye=e$=>me(e$.getFullYear(),11,31),be=(e$,eI)=>me(e$.getFullYear(),e$.getMonth(),e$.getDate()+eI),xe=e$=>e$ instanceof Date&&!Number.isNaN(e$.getTime()),Se=(e$,eI=new Date)=>{if(xe(e$))return pe(e$);if("string"==typeof e$||"number"==typeof e$){let eI=new Date(e$);if(xe(eI))return eI}return pe(eI)},Ce=e$=>{if(!e$)return null;let eI=he(Se(e$[0])),eR=he(Se(e$[1]));return eI.getTime()<=eR.getTime()?{start:eI,end:eR}:{start:eR,end:eI}},we=(e$,eI)=>e$.getFullYear()===eI.getFullYear(),Te=(e$,eI)=>we(e$,eI)&&e$.getMonth()===eI.getMonth(),Ee=(e$,eI)=>Te(e$,eI)&&e$.getDate()===eI.getDate(),De=(e$,eI)=>{let eR=me(e$.getFullYear(),e$.getMonth()+eI,1),eL=_e(eR).getDate();return me(eR.getFullYear(),eR.getMonth(),Math.min(e$.getDate(),eL))},Oe=(e$,eI)=>{let eR=me(e$.getFullYear()+eI,e$.getMonth(),1),eL=_e(eR).getDate();return me(eR.getFullYear(),eR.getMonth(),Math.min(e$.getDate(),eL))},ke=(e$,eI)=>Oe(e$,eI-e$.getFullYear()),Ae=(e$,eI)=>De(e$,eI-e$.getMonth()),je=e$=>`${e$.getFullYear()}-${`${e$.getMonth()+1}`.padStart(2,"0")}-${`${e$.getDate()}`.padStart(2,"0")}`,Me=(e$,eI,eR)=>{let eL=he(e$);return!(eI&&(eL.getTime()<eI.start.getTime()||eL.getTime()>eI.end.getTime()))&&!eR?.(pe(eL))},Ne=(e$,eI,eR)=>{let eL=ge(e$),ez=_e(e$);if(eI&&(ez.getTime()<eI.start.getTime()||eL.getTime()>eI.end.getTime()))return!1;let eW=eL;for(;eW.getTime()<=ez.getTime();){if(Me(eW,eI,eR))return!0;eW=be(eW,1)}return!1},Pe=(e$,eI,eR)=>{let eL=ve(e$),ez=ye(e$);return!(eI&&(ez.getTime()<eI.start.getTime()||eL.getTime()>eI.end.getTime()))&&Array.from({length:12},(eI,eR)=>me(e$.getFullYear(),eR,1)).some(e$=>Ne(e$,eI,eR))},Fe=e$=>{let eI=he(e$),eR=me(be(eI,3-(eI.getDay()+6)%7).getFullYear(),0,4),eL=be(eR,-((eR.getDay()+6)%7));return 1+Math.round((eI.getTime()-eL.getTime())/6048e5)},Ie=(e$,eI)=>{let eR=new Intl.DateTimeFormat(e$,{weekday:"short"}),eL=me(2026,2,1);return Array.from({length:7},(e$,ez)=>eR.format(be(eL,(eI+ez)%7)))},Le=(e$,eI)=>{let eR=e$.getFullYear();if(!eI)return Array.from({length:13},(e$,eI)=>eR-6+eI);let eL=eI.start.getFullYear(),ez=eI.end.getFullYear();if(ez-eL<=24)return Array.from({length:ez-eL+1},(e$,eI)=>eL+eI);let eW=Math.max(eL,eR-6);return Array.from({length:Math.min(ez,eR+6)-eW+1},(e$,eI)=>eW+eI)},Re=(e$,eI,eR,eL)=>{let ez=new Intl.DateTimeFormat(e$,{month:"short"});return Array.from({length:12},(e$,eW)=>{let eH=me(eI.getFullYear(),eW,1);return{value:eW,label:ez.format(eH),disabled:!Ne(eH,eR,eL)}})},ze=(e$,eI)=>{let eR=ge(e$),eL=be(eR,-((eR.getDay()-eI+7)%7));return Array.from({length:6},(eI,eR)=>{let ez=be(eL,7*eR);return{key:`${e$.getFullYear()}-${e$.getMonth()}-${eR}`,week:Fe(ez),cells:Array.from({length:7},(eI,eR)=>{let eL=be(ez,eR);return{key:je(eL),date:eL,inView:eL.getMonth()===e$.getMonth()}})}})},Be=Object.assign(({value:e$,defaultValue:eI,mode:eR,fullscreen:eL=!0,showWeek:ez,locale:eW,weekStartsOn:eH,validRange:eF,disabledDate:eP,dateFullCellRender:eB,dateCellRender:eK,monthFullCellRender:eV,monthCellRender:eq,cellRender:eU,fullCellRender:eG,headerRender:eZ,className:eY,onChange:eX,onPanelChange:eJ,onSelect:eQ,...e0})=>{let e1=(0,e.ref)(Se(e$??eI??new Date)),e2=(0,e.ref)(eR??"month"),e5=void 0===e$?e1.value:Se(e$,e1.value),e3=eR??e2.value,e4=he(new Date),e6=Ce(eF),e8=eW??("u">typeof navigator&&navigator.language?navigator.language:"zh-CN"),e7=fe(eH),e9=e8.toLowerCase().startsWith("zh"),t$=Ie(e8,e7),tI=ze(e5,e7),tR=Le(e5,e6),tL=Re(e8,e5,e6,eP),tz=de(`overflow-hidden border border-base-300 bg-gradient-to-b from-base-100 via-base-100 to-base-200/70 text-base-content shadow-sm ${eL?"rounded-[1.75rem]":"max-w-[24rem] rounded-[1.5rem]"}`,eY),tW=ez?"grid grid-cols-[3.25rem_repeat(7,minmax(0,1fr))] gap-2":"grid grid-cols-7 gap-2",tH="month"===e3?new Intl.DateTimeFormat(e8,{year:"numeric",month:"long"}).format(e5):new Intl.DateTimeFormat(e8,{year:"numeric"}).format(e5),tF=new Intl.DateTimeFormat(e8,{weekday:"long",month:"long",day:"numeric"}).format(e4),tP=e9?"周":"Week",tB=e9?"今":"Today",tK="month"===e3?e9?"月视图":"Month view":e9?"年视图":"Year view",tV="month"===e3?!Ne(De(e5,-1),e6,eP):!Pe(Oe(e5,-1),e6,eP),tq="month"===e3?!Ne(De(e5,1),e6,eP):!Pe(Oe(e5,1),e6,eP),tU=!Me(e4,e6,eP),tG=(eI,eR)=>{let eL=he(Se(eI,e5)),ez=!Ee(eL,e5),eW="month"===e3?!Te(eL,e5):!we(eL,e5);void 0===e$&&(e1.value=eL),ez&&eX?.(pe(eL)),eW&&eJ?.(pe(eL),e3),eQ?.(pe(eL),{source:eR})},tZ=e$=>{e$!==e3&&(void 0===eR&&(e2.value=e$),eJ?.(pe(e5),e$))},tY={value:pe(e5),type:e3,yearOptions:tR,monthOptions:tL,onChange:e$=>tG(e$,"customize"),onTypeChange:tZ,onYearChange:e$=>tG(ke(e5,e$),"customize"),onMonthChange:e$=>tG(Ae(e5,e$),"customize")};return i("div",{...e0,"data-rue-calendar-root":"true","data-rue-calendar-mode":e3,className:tz,children:[eZ?eZ(tY):i("div",{className:`border-b border-base-300/70 ${eL?"flex flex-col gap-3 px-4 py-4 lg:flex-row lg:items-center lg:justify-between":"flex flex-col gap-3 px-3 py-3"}`,children:[i("div",{children:[r("div",{className:"text-xs font-semibold uppercase tracking-[0.24em] text-base-content/55",children:"Rue Calendar"}),r("div",{className:"mt-1 text-xl font-semibold leading-tight",children:tH}),r("div",{className:"mt-1 text-xs text-base-content/60",children:tF})]}),i("div",{className:"flex flex-wrap items-center gap-2 lg:justify-end",children:[i("div",{className:"join",children:[r("button",{type:"button",className:"btn btn-sm join-item","aria-label":e9?"上一页":"Previous",disabled:tV,onClick:()=>tG("month"===e3?De(e5,-1):Oe(e5,-1),"customize"),children:r("span",{"aria-hidden":"true",children:"<"})}),r("button",{type:"button",className:"btn btn-sm join-item btn-ghost",disabled:tU,onClick:()=>tG(e4,"customize"),children:e9?"今天":"Today"}),r("button",{type:"button",className:"btn btn-sm join-item","aria-label":e9?"下一页":"Next",disabled:tq,onClick:()=>tG("month"===e3?De(e5,1):Oe(e5,1),"customize"),children:r("span",{"aria-hidden":"true",children:">"})})]}),r("select",{className:"select select-sm min-w-24",value:e5.getFullYear(),onChange:e$=>tY.onYearChange(Number(e$.currentTarget.value)),children:tR.map(e$=>r("option",{value:e$,disabled:!Pe(me(e$,e5.getMonth(),1),e6,eP),children:e$},e$))}),r("select",{className:"select select-sm min-w-24",value:e5.getMonth(),disabled:"year"===e3,onChange:e$=>tY.onMonthChange(Number(e$.currentTarget.value)),children:tL.map(e$=>r("option",{value:e$.value,disabled:e$.disabled,children:e$.label},e$.value))}),i("div",{className:"join",children:[r("button",{type:"button",className:`btn btn-sm join-item ${"month"===e3?"btn-primary":"btn-ghost"}`,onClick:()=>tZ("month"),children:e9?"月":"Month"}),r("button",{type:"button",className:`btn btn-sm join-item ${"year"===e3?"btn-primary":"btn-ghost"}`,onClick:()=>tZ("year"),children:e9?"年":"Year"})]})]})]}),i("div",{className:eL?"space-y-3 px-4 py-4":"space-y-3 px-3 py-3",children:[i("div",{className:"flex items-center justify-between gap-3 px-1",children:[r("div",{className:"badge badge-outline badge-sm",children:tK}),ez&&"month"===e3?r("div",{className:"badge badge-soft badge-sm",children:tP}):null]}),"month"===e3?i("div",{className:"space-y-2",children:[i("div",{className:tW,children:[ez?r("div",{className:"px-2 py-1 text-center text-[0.68rem] font-semibold uppercase tracking-[0.24em] text-base-content/45",children:tP}):null,t$.map(e$=>r("div",{className:"px-2 py-1 text-center text-[0.68rem] font-semibold uppercase tracking-[0.24em] text-base-content/45",children:e$},e$))]}),r("div",{role:"grid",className:"space-y-2",children:tI.map((e$,eI)=>i("div",{role:"row",className:tW,children:[ez?r("div",{className:"flex items-center justify-center rounded-[1rem] border border-base-300/70 bg-base-200/60 text-sm font-semibold text-base-content/60","data-rue-calendar-week":e$.week,children:e$.week}):null,e$.cells.map((eR,ez)=>{let eW,eH,eF,eV,eq,eZ,eY,eX;return eW=Ee(eR.date,e5),eH=Ee(eR.date,e4),eF=!Me(eR.date,e6,eP),eV=r("div",{className:"flex h-full flex-col gap-2",children:i("div",{className:"flex items-start justify-between gap-2",children:[r("span",{className:`text-sm font-semibold ${eR.inView?"":"opacity-60"}`,children:eR.date.getDate()}),eH?r("span",{className:`badge badge-xs ${eW?"badge-neutral text-neutral-content":"badge-primary badge-outline"}`,children:tB}):null]})}),eq=eU?.(pe(eR.date),{type:"date",originNode:eV,today:pe(e4),selected:eW,isToday:eH,inView:eR.inView,disabled:eF,row:eI,column:ez,week:e$.week})??eK?.(pe(eR.date)),eZ=i("div",{className:"flex h-full flex-col gap-2",children:[i("div",{className:"flex items-start justify-between gap-2",children:[r("span",{className:`text-sm font-semibold ${eR.inView?"":"opacity-60"}`,children:eR.date.getDate()}),eH?r("span",{className:`badge badge-xs ${eW?"badge-neutral text-neutral-content":"badge-primary badge-outline"}`,children:tB}):null]}),r("div",{className:`min-h-[1.85rem] text-[0.68rem] leading-4 ${eW?"opacity-90":"opacity-75"}`,children:eq})]}),eY=eG?.(pe(eR.date),{type:"date",originNode:eZ,today:pe(e4),selected:eW,isToday:eH,inView:eR.inView,disabled:eF,row:eI,column:ez,week:e$.week})??eB?.(pe(eR.date))??eZ,eX=`group relative flex min-h-[5.35rem] w-full flex-col rounded-[1.2rem] border px-2.5 py-2.5 text-left transition duration-150 ${eL?"":"min-h-[4.7rem] rounded-[1rem] px-2 py-2"}`,eW?eX+=" border-primary bg-primary text-primary-content shadow-md shadow-primary/15":eF?eX+=" border-base-300/70 bg-base-200/50 text-base-content/35":eR.inView?eX+=" border-base-300/80 bg-base-100 hover:-translate-y-0.5 hover:border-primary/35 hover:shadow-sm":eX+=" border-base-300/60 bg-base-200/60 text-base-content/55 hover:border-primary/20",eH&&!eW&&(eX+=" ring-1 ring-primary/20"),r("button",{type:"button",role:"gridcell","data-rue-calendar-cell":eR.key,"data-rue-calendar-in-view":eR.inView?"true":"false","aria-pressed":eW?"true":"false","aria-current":eH?"date":void 0,disabled:eF,className:eX,onClick:()=>tG(eR.date,"date"),children:eY},eR.key)})]},e$.key))})]}):r("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 xl:grid-cols-4",children:tL.map((e$,eI)=>{let eR,ez,eW,eH,eF,eP,eB,eK,eZ;return ez=Te(eR=me(e5.getFullYear(),e$.value,1),e5),eW=Te(eR,e4),eH=!0===e$.disabled,eF=r("div",{className:"flex h-full flex-col gap-2",children:i("div",{className:"flex items-center justify-between gap-2",children:[r("span",{className:"text-sm font-semibold",children:e$.label}),eW?r("span",{className:`badge badge-xs ${ez?"badge-neutral text-neutral-content":"badge-primary badge-outline"}`,children:tB}):null]})}),eP=eU?.(pe(eR),{type:"month",originNode:eF,today:pe(e4),selected:ez,isToday:eW,inView:!0,disabled:eH,row:Math.floor(eI/4),column:eI%4})??eq?.(pe(eR)),eB=i("div",{className:"flex h-full flex-col gap-2",children:[i("div",{className:"flex items-center justify-between gap-2",children:[r("span",{className:"text-sm font-semibold",children:e$.label}),eW?r("span",{className:`badge badge-xs ${ez?"badge-neutral text-neutral-content":"badge-primary badge-outline"}`,children:tB}):null]}),r("div",{className:`min-h-[2.1rem] text-xs leading-5 ${ez?"opacity-90":"opacity-75"}`,children:eP})]}),eK=eG?.(pe(eR),{type:"month",originNode:eB,today:pe(e4),selected:ez,isToday:eW,inView:!0,disabled:eH,row:Math.floor(eI/4),column:eI%4})??eV?.(pe(eR))??eB,eZ=`group relative flex min-h-[6.1rem] w-full flex-col rounded-[1.2rem] border px-3 py-3 text-left transition duration-150 ${eL?"":"min-h-[5.5rem] rounded-[1rem] px-2.5 py-2.5"}`,ez?eZ+=" border-primary bg-primary text-primary-content shadow-md shadow-primary/15":eH?eZ+=" border-base-300/70 bg-base-200/50 text-base-content/35":eZ+=" border-base-300/80 bg-base-100 hover:-translate-y-0.5 hover:border-primary/35 hover:shadow-sm",eW&&!ez&&(eZ+=" ring-1 ring-primary/20"),r("button",{type:"button","data-rue-calendar-month":`${e5.getFullYear()}-${`${e$.value+1}`.padStart(2,"0")}`,"aria-pressed":ez?"true":"false",disabled:eH,className:eZ,onClick:()=>tG(eR,"month"),children:eK},`${e5.getFullYear()}-${e$.value}`)})})]})]})},{Cally:({className:e$,children:eI,...eR})=>r("calendar-date",{...eR,className:de("cally",e$),children:eI}),Month:({className:e$,children:eI,...eR})=>r("calendar-month",{...eR,className:e$,children:eI}),PikaSingle:({type:e$="text",className:eI,...eR})=>r("input",{...eR,type:e$,className:de("pika-single",eI)})});function Ve(e$,eI,eR){return eI in e$?Object.defineProperty(e$,eI,{value:eR,enumerable:!0,configurable:!0,writable:!0}):e$[eI]=eR,e$}var He="hex",Ue="rgb",We="hsb",Ge="single",Ke="gradient",qe="#1677ff",Je="无色",Ye=[{color:"rgb(16, 142, 233)",percent:0},{color:"rgb(135, 208, 104)",percent:100}],Xe=[Ge],Ze=(...e$)=>e$.filter(Boolean).join(" "),Qe=e$=>Array.isArray(e$)?e$.some(e$=>Qe(e$)):null!=e$&&!1!==e$&&""!==e$,$e=(e$,eI,eR)=>Number.isFinite(e$)?Math.min(Math.max(e$,eI),eR):eI,et=(e$,eI=2)=>{let eR=10**eI;return Math.round(e$*eR)/eR},tt=e$=>Math.round($e(e$,0,255)).toString(16).padStart(2,"0"),nt=e$=>$e(et(e$,3),0,1),rt=e$=>{if(!Number.isFinite(e$))return 0;let eI=e$%360;return eI<0?eI+360:eI},it=e$=>{let eI="b"in e$?e$.b:e$.v;return{h:rt(e$.h??0),s:$e(e$.s??0,0,100),b:$e(eI??0,0,100),a:nt(e$.a??1)}},at=e$=>{let eI=rt(e$.h),eR=$e(e$.s,0,100)/100,eL=$e(e$.b,0,100)/100,ez=eL*eR,eW=eI/60,eH=ez*(1-Math.abs(eW%2-1)),eF=0,eP=0,eB=0;eW>=0&&eW<1?(eF=ez,eP=eH):eW<2?(eF=eH,eP=ez):eW<3?(eP=ez,eB=eH):eW<4?(eP=eH,eB=ez):eW<5?(eF=eH,eB=ez):(eF=ez,eB=eH);let eK=eL-ez;return{r:Math.round((eF+eK)*255),g:Math.round((eP+eK)*255),b:Math.round((eB+eK)*255),a:nt(e$.a)}},ot=e$=>{let eI=$e(e$.r??0,0,255)/255,eR=$e(e$.g??0,0,255)/255,eL=$e(e$.b??0,0,255)/255,ez=Math.max(eI,eR,eL),eW=ez-Math.min(eI,eR,eL),eH=0;return 0!==eW&&(eH=ez===eI?(eR-eL)/eW%6*60:ez===eR?60*((eL-eI)/eW+2):60*((eI-eR)/eW+4)),{h:rt(eH),s:et(0===ez?0:eW/ez*100,2),b:et(100*ez,2),a:nt(e$.a??1)}},st=e$=>{let eI=e$.replace(/^#/,"").trim();if(![3,4,6,8].includes(eI.length)||/[^0-9a-f]/i.test(eI))return null;let eR=3===eI.length||4===eI.length?eI.split("").map(e$=>`${e$}${e$}`).join(""):eI;return ot({r:Number.parseInt(eR.slice(0,2),16),g:Number.parseInt(eR.slice(2,4),16),b:Number.parseInt(eR.slice(4,6),16),a:8===eR.length?Number.parseInt(eR.slice(6,8),16)/255:1})},ct=e$=>e$.split(",").map(e$=>e$.trim()).filter(Boolean),lt=e$=>e$?e$.endsWith("%")?nt(Number.parseFloat(e$)/100):nt(Number.parseFloat(e$)):1,ut=e$=>{let eI=e$.trim().match(/^rgba?\((.*)\)$/i);if(!eI)return null;let eR=ct(eI[1]);if(3!==eR.length&&4!==eR.length)return null;let eL=Number.parseFloat(eR[0]),ez=Number.parseFloat(eR[1]),eW=Number.parseFloat(eR[2]),eH=lt(eR[3]);return[eL,ez,eW].every(Number.isFinite)?ot({r:eL,g:ez,b:eW,a:eH}):null},dt=e$=>{let eI=e$.trim().match(/^hs(v|b)a?\((.*)\)$/i);if(!eI)return null;let eR=ct(eI[2]);if(3!==eR.length&&4!==eR.length)return null;let eL=Number.parseFloat(eR[0]),ez=Number.parseFloat(eR[1]),eW=Number.parseFloat(eR[2]),eH=lt(eR[3]);return[eL,ez,eW].every(Number.isFinite)?it({h:eL,s:ez,b:eW,a:eH}):null},ft=e$=>{if(null==e$)return null;if(e$ instanceof pt)return e$.toHsb();if("string"==typeof e$){let eI=e$.trim();return eI?/^#?[0-9a-f]{3,8}$/i.test(eI)?st(eI):/^rgba?\(/i.test(eI)?ut(eI):/^hs(v|b)a?\(/i.test(eI)?dt(eI):null:null}return"h"in e$||"s"in e$||"v"in e$?it(e$):"r"in e$||"g"in e$||"b"in e$?ot(e$):null},pt=class e${clone(){return new e$(this.hsba)}toHex(){let e$=at(this.hsba),eI=this.hsba.a<1?tt(255*this.hsba.a):"";return`${tt(e$.r)}${tt(e$.g)}${tt(e$.b)}${eI}`}toHexString(){return`#${this.toHex()}`}toRgb(){return at(this.hsba)}toRgbString(){let e$=this.toRgb();return e$.a<1?`rgba(${e$.r}, ${e$.g}, ${e$.b}, ${et(e$.a,3)})`:`rgb(${e$.r}, ${e$.g}, ${e$.b})`}toHsb(){return{...this.hsba}}toHsbString(){return this.hsba.a<1?`hsba(${Math.round(this.hsba.h)}, ${et(this.hsba.s,1)}%, ${et(this.hsba.b,1)}%, ${et(this.hsba.a,3)})`:`hsb(${Math.round(this.hsba.h)}, ${et(this.hsba.s,1)}%, ${et(this.hsba.b,1)}%)`}toCssString(){return this.toRgbString()}withAlpha(eI){return new e$({...this.hsba,a:nt(eI)})}withHue(eI){return new e$({...this.hsba,h:rt(eI)})}withSaturationBrightness(eI,eR){return new e$({...this.hsba,s:$e(eI,0,100),b:$e(eR,0,100)})}constructor(e$=qe){Ve(this,"hsba",void 0),this.hsba=it(ft(e$)??ft(qe)??{h:215,s:91,b:100,a:1})}},mt=(e$,eI)=>{let eR=ft(e$);return eR?new pt(eI?{...eR,a:1}:eR):null},ht=(e$,eI)=>e$?eI?e$.withAlpha(1):e$:null,gt=0,_t=e$=>!!e$&&"object"==typeof e$&&"color"in e$&&"percent"in e$,vt=e$=>Array.isArray(e$)&&e$.every(_t),yt=(e$,eI)=>{let eR=e$.map(e$=>{let eR=mt(e$.color,eI);return eR?{id:String(e$.id??`gradient-stop-${++gt}`),color:eR,percent:$e(e$.percent,0,100)}:null}).filter(Boolean);if(!eR.length)return null;if(1===eR.length){let e$=eR[0];eR.push({id:`gradient-stop-${++gt}`,color:e$.color.clone(),percent:100})}return eR.sort((e$,eI)=>e$.percent-eI.percent),eR},bt=class e${clone(){return new e$(this.toStops())}toStops(){return this.stops.map(e$=>({id:e$.id,color:e$.color.clone(),percent:e$.percent}))}toCssString(){return`linear-gradient(90deg, ${this.toStops().sort((e$,eI)=>e$.percent-eI.percent).map(e$=>`${e$.color.toCssString()} ${Math.round(e$.percent)}%`).join(", ")})`}withStopColor(eI,eR){return new e$(this.toStops().map(e$=>({...e$,color:e$.id===eI?eR.clone():e$.color.clone()})))}withStopPercent(eI,eR){return new e$(this.toStops().map(e$=>({...e$,percent:e$.id===eI?$e(eR,0,100):e$.percent})))}addStop(eI,eR){return new e$([...this.toStops(),{id:`gradient-stop-${++gt}`,color:eR.clone(),percent:$e(eI,0,100)}])}removeStop(eI){let eR=this.toStops().filter(e$=>e$.id!==eI);return eR.length<2?this.clone():new e$(eR)}constructor(e$=Ye,eI){Ve(this,"stops",void 0),this.stops=yt(e$,eI)??yt(Ye,eI)??[]}},xt=(e$,eI)=>e$ instanceof bt?new bt(e$.toStops(),eI):vt(e$)?new bt(e$,eI):null,St=e$=>{let eI=(Array.isArray(e$)?e$:e$?[e$]:Xe).filter(e$=>"single"===e$||"gradient"===e$);return eI.length?eI:Xe},Ct=e$=>{let eI=e$??new pt(qe),eR=eI.toRgb(),eL=eI.toHsb();return{hex:eI.toHexString(),r:String(eR.r),g:String(eR.g),b:String(eR.b),h:String(Math.round(eL.h)),s:String(Math.round(eL.s)),v:String(Math.round(eL.b)),a:String(Math.round(100*eL.a))}},wt=e$=>{switch(e$){case"small":case"sm":return{triggerClassName:"min-h-8 px-2 py-1 text-xs",compactTriggerClassName:"h-8 w-8 p-[3px]",swatchSizeClassName:"size-3.5",compactSwatchSizeClassName:"size-[1rem]",popupWidthClassName:"w-[min(94vw,18rem)]"};case"large":case"lg":return{triggerClassName:"min-h-10 px-3 py-2 text-sm",compactTriggerClassName:"h-10 w-10 p-[4px]",swatchSizeClassName:"size-5",compactSwatchSizeClassName:"size-[1.45rem]",popupWidthClassName:"w-[min(94vw,22rem)]"};default:return{triggerClassName:"min-h-8 px-2.5 py-1.5 text-sm",compactTriggerClassName:"h-8 w-8 p-[3px]",swatchSizeClassName:"size-4",compactSwatchSizeClassName:"size-[1.15rem]",popupWidthClassName:"w-[min(94vw,20rem)]"}}},Tt=e$=>{switch(e$){case"top":return{direction:"top",align:"center"};case"topLeft":return{direction:"top",align:"start"};case"topRight":return{direction:"top",align:"end"};case"bottom":return{direction:"bottom",align:"center"};case"bottomRight":return{direction:"bottom",align:"end"};case"left":return{direction:"left",align:"center"};case"leftTop":return{direction:"left",align:"start"};case"leftBottom":return{direction:"left",align:"end"};case"right":return{direction:"right",align:"center"};case"rightTop":return{direction:"right",align:"start"};case"rightBottom":return{direction:"right",align:"end"};default:return{direction:"bottom",align:"start"}}},Et=e$=>!1!==e$,Dt=e$=>"object"==typeof e$&&!!e$.pointAtCenter,Ot=(e$,eI)=>{let eR=Tt(e$);return"top"===eR.direction?Ze("bottom-[-6px] border-r border-b",eI||"center"===eR.align?"left-1/2 -translate-x-1/2":"end"===eR.align?"right-5":"left-5"):"bottom"===eR.direction?Ze("top-[-6px] border-l border-t",eI||"center"===eR.align?"left-1/2 -translate-x-1/2":"end"===eR.align?"right-5":"left-5"):"left"===eR.direction?Ze("right-[-6px] border-r border-t",eI||"center"===eR.align?"top-1/2 -translate-y-1/2":"end"===eR.align?"bottom-5":"top-5"):Ze("left-[-6px] border-l border-b",eI||"center"===eR.align?"top-1/2 -translate-y-1/2":"end"===eR.align?"bottom-5":"top-5")},kt=(e$,eI)=>"function"==typeof e$?e$(eI):e$,At=(e$,eI)=>{if(!e$)return"";switch(eI){case"rgb":return e$.toRgbString();case"hsb":return e$.toHsbString();default:return e$.toHexString()}},jt=(e$,eI)=>!!e$&&!!eI&&e$.toHexString()===eI.toHexString()&&e$.toRgbString()===eI.toRgbString(),Mt=(e$,eI)=>{if(!e$||!eI)return!1;let eR=e$.toStops(),eL=eI.toStops();return eR.length===eL.length&&eR.every((e$,eI)=>{let eR=eL[eI];return!!eR&&Math.round(100*e$.percent)===Math.round(100*eR.percent)&&jt(e$.color,eR.color)})},Nt={backgroundImage:"linear-gradient(45deg, rgb(148 163 184 / 0.22) 25%, transparent 25%), linear-gradient(-45deg, rgb(148 163 184 / 0.22) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgb(148 163 184 / 0.22) 75%), linear-gradient(-45deg, transparent 75%, rgb(148 163 184 / 0.22) 75%)",backgroundSize:"10px 10px",backgroundPosition:"0 0, 0 5px, 5px -5px, -5px 0"},Pt="block h-4 w-full cursor-pointer appearance-none bg-transparent outline-none disabled:cursor-not-allowed disabled:opacity-60 [&::-webkit-slider-runnable-track]:h-2 [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-transparent [&::-webkit-slider-thumb]:mt-[-4px] [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border [&::-webkit-slider-thumb]:border-base-100 [&::-webkit-slider-thumb]:bg-base-100 [&::-webkit-slider-thumb]:shadow-[0_0_0_1px_rgba(15,23,42,0.16),0_3px_10px_rgba(15,23,42,0.2)] [&::-moz-range-track]:h-2 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:border-0 [&::-moz-range-track]:bg-transparent [&::-moz-range-thumb]:h-4 [&::-moz-range-thumb]:w-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-base-100 [&::-moz-range-thumb]:bg-base-100 [&::-moz-range-thumb]:shadow-[0_0_0_1px_rgba(15,23,42,0.16),0_3px_10px_rgba(15,23,42,0.2)]",Ft=e$=>e$ instanceof bt?{...Nt,backgroundImage:`${e$.toCssString()}, ${Nt.backgroundImage}`,backgroundColor:"transparent"}:{...Nt,backgroundColor:e$?.toCssString()??"transparent"},It=e$=>e$ instanceof bt?{backgroundImage:e$.toCssString(),backgroundColor:"transparent"}:Ft(e$),Lt={left:"0px",top:"0px",visibility:"hidden"},Rt=0,zt=(e$,eI)=>{eI(e$.currentTarget.value)},Bt=e$=>(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("svg",eI);(0,t._$setAttribute)(eR,"viewBox","0 0 16 16"),(0,t._$setAttribute)(eR,"fill","none"),(0,t._$setAttribute)(eR,"stroke","currentColor"),(0,t._$setAttribute)(eR,"strokeWidth","1.8"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Ze("size-4 transition-transform duration-200",e$.open?"rotate-180":"")))});let eL=(0,t._$createElement)("path",eR);return(0,t._$appendChild)(eR,eL),(0,t._$setAttribute)(eL,"strokeLinecap","round"),(0,t._$setAttribute)(eL,"strokeLinejoin","round"),(0,t._$setAttribute)(eL,"d","m3.5 6 4.5 5 4.5-5"),eR}),Vt=e$=>{let{resolveHsb:eI,resolveGradientStops:eR,resolveActiveGradientStop:eL,renderDraftInput:ez}=(0,t._$vaporWithHookId)("useSetup:0:0:dup1",()=>(0,t.useSetup)(()=>{let eI=()=>e$.getGradient()?.toStops()??[];return{resolveHsb:()=>e$.getColor().toHsb(),resolveGradientStops:eI,resolveActiveGradientStop:()=>{let eR=eI();return eR.find(eI=>eI.id===e$.activeGradientStopId.value)??eR[0]},renderDraftInput:(eI,eR,eL="numeric")=>{let{focused:ez}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>({focused:!!e$.inputFocusState.value[eI]})));return(0,t.vapor)(eW=>{let eH=(0,t._$createElement)("label",eW);(0,t._$setClassName)(eH,"grid gap-0.5");let eF=(0,t._$createElement)("span",eH);(0,t._$appendChild)(eH,eF),(0,t._$setClassName)(eF,"text-[10px] font-medium uppercase tracking-[0.16em] text-base-content/45");let eP=(0,t._$createTextWrapper)(eF);(0,t._$appendChild)(eF,eP),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eP,eR)});let eB=(0,t._$createElement)("input",eH);return(0,t._$appendChild)(eH,eB),(0,t._$setAttribute)(eB,"type","text"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eB,"inputMode",String(eL))}),(0,t.watchEffect)(()=>{(0,t._$setValue)(eB,e$.inputDrafts.value[eI])}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eB,e$.disabled)}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eB,String(Ze("h-8 w-full rounded-[0.65rem] border bg-base-100 px-2 text-[13px] font-medium text-base-content/85 outline-none transition-[border-color,box-shadow] duration-200 ease-out",ez?"border-primary ring-2 ring-primary/15":"border-base-300 hover:border-primary/55",e$.classNames?.valueInput)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.valueInput;(0,t._$setStyle)(eB,eI)}),(0,t._$addEventListener)(eB,"focus",()=>{e$.inputFocusState.value={...e$.inputFocusState.value,[eI]:!0},e$.requestRender()}),(0,t._$addEventListener)(eB,"input",eR=>{e$.inputDrafts.value={...e$.inputDrafts.value,[eI]:eR.currentTarget.value},e$.requestRender()}),(0,t._$addEventListener)(eB,"blur",()=>{e$.inputFocusState.value={...e$.inputFocusState.value,[eI]:!1},e$.requestRender(),e$.commitDraftInputs()}),(0,t._$addEventListener)(eB,"keydown",eR=>{"Enter"===eR.key&&(eR.preventDefault(),e$.inputFocusState.value={...e$.inputFocusState.value,[eI]:!1},e$.requestRender(),e$.commitDraftInputs())}),eH})}}}));return(0,t.vapor)(eW=>{let eH=(0,t._$createElement)("div",eW);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eH,String(Ze("space-y-3",e$.classNames?.body)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.body;(0,t._$setStyle)(eH,eI)});let eF=(0,t._$createElement)("div",eH);(0,t._$appendChild)(eH,eF),(0,t._$setClassName)(eF,"rounded-[1.1rem] bg-base-100 p-3 text-base-content shadow-[0_16px_36px_rgba(15,23,42,0.12),0_6px_16px_rgba(15,23,42,0.08)]");let eP=(0,t._$createElement)("div",eF);(0,t._$appendChild)(eF,eP),(0,t._$setClassName)(eP,"space-y-3");let eB=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eP,eB),(0,t.watchEffect)(()=>{let eI=e$.availableModes.length>1?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t._$setClassName)(eR,"inline-flex rounded-[0.8rem] border border-base-300 bg-base-200/60 p-1");let eL=(0,t._$createComment)("rue:list:start"),ez=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eR,eL),(0,t._$appendChild)(eR,ez);let eW=new Map;return(0,t.watchEffect)(()=>{eW=(0,t._$vaporKeyedList)({items:e$.availableModes||[],getKey:(e$,eI)=>e$,elements:eW,parent:eR,before:ez,singleRoot:!0,trackIndex:!1,start:eL,renderItem:(eI,eR,eL,ez,eW)=>{(0,t.renderAnchor)((0,t.vapor)(()=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("button",eR);(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"key",String(eI))}),(0,t._$setAttribute)(eL,"type","button"),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eL,e$.disabled)}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(Ze("rounded-[0.6rem] px-3 py-1.5 text-xs font-medium transition",e$.currentMode.value===eI?"bg-base-100 text-base-content shadow-sm":"text-base-content/55 hover:text-base-content")))}),(0,t._$addEventListener)(eL,"click",()=>e$.setModeValue(eI));let ez=(0,t._$createTextWrapper)(eL);return(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{(0,t._$settextContent)(ez,"gradient"===eI?"渐变色":"单色")}),eR}),eR,eL)}})}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eP,eB))}),(0,t._$appendChild)(eP,(0,t._$createTextNode)(" "));let eK=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eP,eK),(0,t.watchEffect)(()=>{let eI="gradient"===e$.currentMode.value&&e$.getGradient()?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),ez=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,ez),(0,t._$setClassName)(ez,"space-y-2 rounded-[0.9rem] border border-base-300 bg-base-200/45 p-2.5");let eW=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,eW),(0,t._$setClassName)(eW,"relative h-4 rounded-full border border-white/70 shadow-[inset_0_1px_2px_rgba(15,23,42,0.08)]"),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eW,Ft(e$.getGradient()))});let eH=(0,t._$createComment)("rue:list:start"),eF=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eW,eH),(0,t._$appendChild)(eW,eF);let eP=new Map;(0,t.watchEffect)(()=>{eP=(0,t._$vaporKeyedList)({items:eR()||[],getKey:(e$,eI)=>e$.id,elements:eP,parent:eW,before:eF,singleRoot:!0,trackIndex:!1,start:eH,renderItem:(eI,eR,eL,ez,eW)=>{(0,t.renderAnchor)((0,t.vapor)(()=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("button",eR);return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"key",String(eI.id))}),(0,t._$setAttribute)(eL,"type","button"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"title",String(`${Math.round(eI.percent)}%`))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(Ze("absolute top-1/2 h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow",e$.activeGradientStopId.value===eI.id?"ring-2 ring-primary/35":"")))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eL,{left:`${eI.percent}%`,background:eI.color.toCssString()})}),(0,t._$addEventListener)(eL,"click",()=>e$.selectGradientStop(eI.id)),eR}),eR,eL)}})});let eB=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,eB),(0,t._$setClassName)(eB,"grid grid-cols-[minmax(0,1fr)_3.5rem] items-center gap-2");let eK=(0,t._$createElement)("input",eB);(0,t._$appendChild)(eB,eK),(0,t._$setAttribute)(eK,"type","range"),(0,t._$setAttribute)(eK,"min","0"),(0,t._$setAttribute)(eK,"max","100"),(0,t.watchEffect)(()=>{(0,t._$setValue)(eK,String(Math.round(eL()?.percent??0)))}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eK,e$.disabled)}),(0,t._$setClassName)(eK,"range range-xs block w-full"),(0,t._$addEventListener)(eK,"input",eI=>{e$.updateGradientStopPercent(Number.parseFloat(eI.currentTarget.value))}),(0,t._$addEventListener)(eK,"change",eI=>{e$.updateGradientStopPercent(Number.parseFloat(eI.currentTarget.value),!0)});let eV=(0,t._$createElement)("span",eB);(0,t._$appendChild)(eB,eV),(0,t._$setClassName)(eV,"rounded-[0.65rem] border border-base-300 bg-base-100 px-2 py-1 text-center text-xs font-medium text-base-content/85");let eq=(0,t._$createTextWrapper)(eV);(0,t._$appendChild)(eV,eq),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eq,Math.round(eL()?.percent??0))}),(0,t._$appendChild)(eV,(0,t._$createTextNode)("%"));let eU=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,eU),(0,t._$setClassName)(eU,"flex items-center justify-between gap-2");let eG=(0,t._$createElement)("span",eU);(0,t._$appendChild)(eU,eG),(0,t._$setClassName)(eG,"text-[10px] uppercase tracking-[0.16em] text-base-content/45"),(0,t._$appendChild)(eG,(0,t._$createTextNode)("色标"));let eZ=(0,t._$createTextWrapper)(eG);(0,t._$appendChild)(eG,eZ),(0,t._$settextContent)(eZ," "),(0,t._$appendChild)(eG,(0,t._$createTextNode)(" "));let eY=(0,t._$createTextWrapper)(eG);(0,t._$appendChild)(eG,eY),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eY,eR().findIndex(eI=>eI.id===e$.activeGradientStopId.value)+1)}),(0,t._$appendChild)(eG,(0,t._$createTextNode)(" /"));let eX=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eG,eX),(0,t.watchEffect)(()=>{let e$=eR().length;(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eG,eX))});let eJ=(0,t._$createElement)("div",eU);(0,t._$appendChild)(eU,eJ),(0,t._$setClassName)(eJ,"flex items-center gap-2");let eQ=(0,t._$createElement)("button",eJ);(0,t._$appendChild)(eJ,eQ),(0,t._$setAttribute)(eQ,"type","button"),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eQ,e$.disabled)}),(0,t._$setClassName)(eQ,"rounded-[0.65rem] border border-base-300 bg-base-100 px-2 py-1 text-xs font-medium text-base-content/85 transition hover:border-primary/55"),(0,t._$addEventListener)(eQ,"click",e$.addGradientStop),(0,t._$appendChild)(eQ,(0,t._$createTextNode)("新增"));let e0=(0,t._$createElement)("button",eJ);return(0,t._$appendChild)(eJ,e0),(0,t._$setAttribute)(e0,"type","button"),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(e0,e$.disabled||eR().length<=2)}),(0,t._$setClassName)(e0,"rounded-[0.65rem] border border-base-300 bg-base-100 px-2 py-1 text-xs font-medium text-base-content/85 transition hover:border-primary/55 disabled:cursor-not-allowed disabled:opacity-45"),(0,t._$addEventListener)(e0,"click",e$.removeGradientStop),(0,t._$appendChild)(e0,(0,t._$createTextNode)("删除")),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eP,eK))});let eV=(0,t._$createElement)("div",eP);(0,t._$appendChild)(eP,eV);let eq=(0,t._$vaporBindUseRef)(eV,()=>eI=>{e$.saturationRef.current=eI??void 0});(0,t.onBeforeUnmount)(()=>{eq()}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eV,String(Ze("relative h-[10rem] cursor-crosshair overflow-hidden rounded-[0.8rem] shadow-[inset_0_1px_2px_rgba(15,23,42,0.08)]",e$.classNames?.saturation)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eV,{backgroundColor:`hsl(${Math.round(eI().h)} 100% 50%)`,...e$.styles?.saturation})}),(0,t._$addEventListener)(eV,"pointerdown",e$.startSaturationDrag);let eU=(0,t._$createElement)("div",eV);(0,t._$appendChild)(eV,eU),(0,t._$setClassName)(eU,"absolute inset-0 bg-gradient-to-r from-white to-transparent");let eG=(0,t._$createElement)("div",eV);(0,t._$appendChild)(eV,eG),(0,t._$setClassName)(eG,"absolute inset-0 bg-gradient-to-t from-[rgba(15,23,42,0.68)] via-[rgba(15,23,42,0.28)] to-transparent");let eZ=(0,t._$createElement)("div",eV);(0,t._$appendChild)(eV,eZ),(0,t._$setClassName)(eZ,"pointer-events-none absolute h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(15,23,42,0.12),0_3px_10px_rgba(15,23,42,0.18)]"),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eZ,{left:`${et(eI().s,2)}%`,top:`${et(100-eI().b,2)}%`})});let eY=(0,t._$createElement)("div",eP);(0,t._$appendChild)(eP,eY),(0,t._$setClassName)(eY,"space-y-3");let eX=(0,t._$createElement)("div",eY);(0,t._$appendChild)(eY,eX),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eX,String(Ze("rounded-full bg-base-100 px-[3px] py-[3px] shadow-[inset_0_1px_2px_rgba(15,23,42,0.08)]",e$.classNames?.sliders)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.sliders;(0,t._$setStyle)(eX,eI)});let eJ=(0,t._$createElement)("input",eX);(0,t._$appendChild)(eX,eJ),(0,t._$setAttribute)(eJ,"type","range"),(0,t._$setAttribute)(eJ,"min","0"),(0,t._$setAttribute)(eJ,"max","360"),(0,t.watchEffect)(()=>{(0,t._$setValue)(eJ,String(et(eI().h,2)))}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eJ,e$.disabled)}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eJ,String(Pt))}),(0,t._$setStyle)(eJ,{background:"linear-gradient(90deg, rgb(255 0 0), rgb(255 255 0), rgb(0 255 0), rgb(0 255 255), rgb(0 0 255), rgb(255 0 255), rgb(255 0 0))"}),(0,t._$addEventListener)(eJ,"input",eI=>{let eR=Number.parseFloat(eI.currentTarget.value);e$.emitColorChange(e$.getColor().withHue(eR))}),(0,t._$addEventListener)(eJ,"change",eI=>{let eR=Number.parseFloat(eI.currentTarget.value);e$.emitColorChange(e$.getColor().withHue(eR),!0)});let eQ=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eY,eQ),(0,t.watchEffect)(()=>{let eR=e$.disabledAlpha?"":(0,t.vapor)(()=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL),(0,t._$setClassName)(eL,"grid grid-cols-[minmax(0,1fr)_1.85rem] items-center gap-2");let ez=(0,t._$createElement)("div",eL);(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{(0,t._$setClassName)(ez,String(Ze("rounded-full px-[3px] py-[3px] shadow-[inset_0_1px_2px_rgba(15,23,42,0.08)]",e$.classNames?.sliders)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(ez,{...Nt,...e$.styles?.sliders})});let eW=(0,t._$createElement)("input",ez);(0,t._$appendChild)(ez,eW),(0,t._$setAttribute)(eW,"type","range"),(0,t._$setAttribute)(eW,"min","0"),(0,t._$setAttribute)(eW,"max","100"),(0,t.watchEffect)(()=>{(0,t._$setValue)(eW,String(Math.round(100*eI().a)))}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eW,e$.disabled)}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eW,String(Pt))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eW,{background:`linear-gradient(90deg, rgba(255,255,255,0) 0%, ${e$.getColor().withAlpha(1).toCssString()} 100%)`})}),(0,t._$addEventListener)(eW,"input",eI=>{let eR=Number.parseFloat(eI.currentTarget.value)/100;e$.emitColorChange(e$.getColor().withAlpha(eR))}),(0,t._$addEventListener)(eW,"change",eI=>{let eR=Number.parseFloat(eI.currentTarget.value)/100;e$.emitColorChange(e$.getColor().withAlpha(eR),!0)});let eH=(0,t._$createElement)("button",eL);return(0,t._$appendChild)(eL,eH),(0,t._$setAttribute)(eH,"type","button"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eH,"tabIndex","-1")}),(0,t._$setAttribute)(eH,"aria-label","当前透明度颜色"),(0,t._$setClassName)(eH,"block h-[1.85rem] w-[1.85rem] rounded-[0.6rem] border border-base-300 shadow-[inset_0_1px_0_rgba(255,255,255,0.75)]"),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eH,Ft(e$.getColor()))}),eR});(0,t.untrack)(()=>(0,t.renderAnchor)(eR,eY,eQ))});let e0=(0,t._$createElement)("div",eY);(0,t._$appendChild)(eY,e0),(0,t._$setClassName)(e0,"grid grid-cols-[3.75rem_minmax(0,1fr)] items-end gap-1.5");let e1=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(e0,e1),(0,t.watchEffect)(()=>{let eI=e$.disabledFormat?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t._$setClassName)(eR,"flex h-8 items-center rounded-[0.65rem] border border-base-300 bg-base-100 px-2.5 text-[13px] font-medium uppercase tracking-[0.05em] text-base-content/85");let eL=(0,t._$createTextWrapper)(eR);return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eL,e$.currentFormat.value)}),eI}):(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("label",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Ze("relative block",e$.classNames?.formatBar)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.formatBar;(0,t._$setStyle)(eR,eI)});let eL=(0,t._$createElement)("select",eR);(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$setValue)(eL,e$.currentFormat.value)}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eL,e$.disabled)}),(0,t._$setClassName)(eL,"h-8 w-full appearance-none rounded-[0.65rem] border border-base-300 bg-base-100 pl-2.5 pr-7 text-[13px] font-medium uppercase tracking-[0.05em] text-base-content/85 outline-none transition-[border-color,box-shadow] duration-200 ease-out hover:border-primary/55 focus:border-primary focus:ring-2 focus:ring-primary/15"),(0,t._$addEventListener)(eL,"input",eI=>{zt(eI,e$.setFormatValue)}),(0,t._$addEventListener)(eL,"change",eI=>{zt(eI,e$.setFormatValue)});let ez=(0,t._$createElement)("option",eL);(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{(0,t._$setValue)(ez,"hex")}),(0,t._$appendChild)(ez,(0,t._$createTextNode)("HEX"));let eW=(0,t._$createElement)("option",eL);(0,t._$appendChild)(eL,eW),(0,t.watchEffect)(()=>{(0,t._$setValue)(eW,"rgb")}),(0,t._$appendChild)(eW,(0,t._$createTextNode)("RGB"));let eH=(0,t._$createElement)("option",eL);(0,t._$appendChild)(eL,eH),(0,t.watchEffect)(()=>{(0,t._$setValue)(eH,"hsb")}),(0,t._$appendChild)(eH,(0,t._$createTextNode)("HSB"));let eF=(0,t._$createElement)("span",eR);(0,t._$appendChild)(eR,eF),(0,t._$setClassName)(eF,"pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-base-content/45");let eP=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eF,eP),(0,t.renderAnchor)((0,t._$createComponent)(Bt,{}),eF,eP),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,e0,e1))}),(0,t._$appendChild)(e0,(0,t._$createTextNode)(" "));let e2=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(e0,e2),(0,t.watchEffect)(()=>{let eI="hex"===e$.currentFormat.value?ez("hex","HEX","text"):"rgb"===e$.currentFormat.value?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Ze("grid gap-1.5",e$.disabledAlpha?"grid-cols-3":"grid-cols-4")))});let eL=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let e$=ez("r","R");(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eL))}),(0,t._$appendChild)(eR,(0,t._$createTextNode)(" "));let eW=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eW),(0,t.watchEffect)(()=>{let e$=ez("g","G");(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eW))}),(0,t._$appendChild)(eR,(0,t._$createTextNode)(" "));let eH=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eH),(0,t.watchEffect)(()=>{let e$=ez("b","B");(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eH))}),(0,t._$appendChild)(eR,(0,t._$createTextNode)(" "));let eF=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eF),(0,t.watchEffect)(()=>{let eI=e$.disabledAlpha?"":ez("a","A");(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eF))}),eI}):(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Ze("grid gap-1.5",e$.disabledAlpha?"grid-cols-3":"grid-cols-4")))});let eL=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let e$=ez("h","H");(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eL))}),(0,t._$appendChild)(eR,(0,t._$createTextNode)(" "));let eW=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eW),(0,t.watchEffect)(()=>{let e$=ez("s","S");(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eW))}),(0,t._$appendChild)(eR,(0,t._$createTextNode)(" "));let eH=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eH),(0,t.watchEffect)(()=>{let e$=ez("v","B");(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eH))}),(0,t._$appendChild)(eR,(0,t._$createTextNode)(" "));let eF=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eF),(0,t.watchEffect)(()=>{let eI=e$.disabledAlpha?"":ez("a","A");(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eF))}),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,e0,e2))});let e5=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eY,e5),(0,t.watchEffect)(()=>{let eI=e$.allowClear?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t._$setClassName)(eR,"flex items-center justify-end");let eL=(0,t._$createElement)("button",eR);return(0,t._$appendChild)(eR,eL),(0,t._$setAttribute)(eL,"type","button"),(0,t._$setAttribute)(eL,"data-rue-color-picker-popup-clear","true"),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eL,e$.disabled)}),(0,t._$setClassName)(eL,"rounded-[0.65rem] border border-base-300 bg-base-100 px-2.5 py-1.5 text-[11px] font-medium text-base-content/72 transition hover:border-error/55 hover:text-error disabled:cursor-not-allowed disabled:opacity-45"),(0,t._$addEventListener)(eL,"click",e$.clearValue),(0,t._$appendChild)(eL,(0,t._$createTextNode)("清空颜色")),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eY,e5))}),eH})},Ht=e$=>{if(!e$.presets.length)return null;let eI=()=>null==e$.presets.find((eI,eR)=>String(eI.key??eR)===e$.activePresetGroupKey.value)?String(e$.presets[0].key??0):e$.activePresetGroupKey.value;return(0,t.vapor)(eR=>{let eL=(0,t._$createElement)("div",eR);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(Ze("space-y-2",e$.classNames?.presets)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.presets;(0,t._$setStyle)(eL,eI)});let ez=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{let eR=e$.presets.length>1?(0,t.vapor)(()=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL),(0,t._$setClassName)(eL,"flex flex-wrap gap-2");let ez=(0,t._$createComment)("rue:list:start"),eW=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eL,ez),(0,t._$appendChild)(eL,eW);let eH=new Map;return(0,t.watchEffect)(()=>{eH=(0,t._$vaporKeyedList)({items:e$.presets||[],getKey:(e$,eI)=>String(e$.key??eI),elements:eH,parent:eL,before:eW,singleRoot:!0,start:ez,renderItem:(eR,eL,ez,eW,eH)=>{(0,t.renderAnchor)((0,t.vapor)(()=>{let eL=(0,t._$createDocumentFragment)(),ez=String(eR.key??eH),eW=(0,t._$createElement)("button",eL);(0,t._$appendChild)(eL,eW),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eW,"key",String(ez))}),(0,t._$setAttribute)(eW,"type","button"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eW,String(Ze("rounded-full border px-2.5 py-1 text-xs font-medium transition",(e$.renderVersion.value,ez===eI()?"border-primary bg-primary/10 text-primary shadow-sm":"border-base-300/80 bg-base-100 text-base-content/68 hover:border-primary/55"))))}),(0,t._$addEventListener)(eW,"click",()=>{e$.activePresetGroupKey.value=ez,e$.requestRender()});let eF=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eW,eF),(0,t.watchEffect)(()=>{let e$=eR.label;(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eW,eF))}),eL}),eL,ez)}})}),eR}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eR,eL,ez))}),(0,t._$appendChild)(eL,(0,t._$createTextNode)(" "));let eW=(0,t._$createComment)("rue:list:start"),eH=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eL,eW),(0,t._$appendChild)(eL,eH);let eF=new Map;return(0,t.watchEffect)(()=>{eF=(0,t._$vaporKeyedList)({items:e$.presets||[],getKey:(e$,eI)=>String(e$.key??eI),elements:eF,parent:eW.parentNode,before:eH,singleRoot:!0,start:eW,renderItem:(eR,eL,ez,eW,eH)=>{(0,t.renderAnchor)((0,t.vapor)(()=>{let eL=(0,t._$createDocumentFragment)(),ez=String(eR.key??eH),eW=(0,t._$createElement)("section",eL);(0,t._$appendChild)(eL,eW),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eW,"key",String(ez))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eW,String(Ze("rounded-[1rem] border border-base-300/75 bg-base-100/80 p-2.5",(e$.renderVersion.value,ez===eI()?"":"hidden"))))});let eF=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eW,eF),(0,t.watchEffect)(()=>{let eI=e$.presets.length<=1?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("div",e$);(0,t._$appendChild)(e$,eI),(0,t._$setClassName)(eI,"mb-2 text-xs font-medium uppercase tracking-[0.16em] text-base-content/45");let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eL),(0,t.watchEffect)(()=>{let e$=eR.label;(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eL))}),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eW,eF))});let eP=(0,t._$createElement)("div",eW);(0,t._$appendChild)(eW,eP),(0,t._$setClassName)(eP,"grid grid-cols-5 gap-1.5 justify-items-start");let eB=(0,t._$createComment)("rue:list:start"),eK=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eP,eB),(0,t._$appendChild)(eP,eK);let eV=new Map;return(0,t.watchEffect)(()=>{eV=(0,t._$vaporKeyedList)({items:eR.colors||[],getKey:(e$,eI)=>`${ez}:${eI}`,elements:eV,parent:eP,before:eK,start:eB,renderItem:(eI,eR,eL,eW,eH)=>{(0,t.renderBetween)((()=>{let eR=xt(eI,e$.disabledAlpha),eL=eR?null:mt(eI,e$.disabledAlpha);if(!eR&&!eL)return null;e$.renderVersion.value;let eW=e$.getActiveColor(),eF=e$.getActiveGradient(),eP=eR??eL,eB=eR?eF?.toCssString()===eR.toCssString()||Mt(eF,eR):jt(eW,eL);return i("button",{type:"button",title:eR?eR.toCssString():At(eL,e$.currentFormat.value),className:Ze("relative flex h-9 w-9 items-center justify-center rounded-[0.85rem] border p-0.5 transition hover:-translate-y-0.5 hover:shadow-sm",eB?"border-primary bg-primary/10 ring-2 ring-primary/15":"border-base-300/80",e$.classNames?.presetItem),onClick:()=>{eR?e$.availableModes.includes("gradient")?(e$.emitGradientChange(eR,!0),e$.setModeValue(Ke)):e$.emitColorChange(eR.toStops()[0]?.color??null,!0):e$.emitColorChange(eL,!0)},children:[r("span",{className:"block h-7 w-7 rounded-[0.55rem]",style:It(eP)}),eB?r("span",{className:"absolute -right-1 -top-1 flex h-4 w-4 items-center justify-center rounded-full bg-primary text-primary-content shadow-[0_4px_10px_rgba(15,23,42,0.18)]",children:r("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2.2",className:"h-2.5 w-2.5",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.5 8 2.4 2.4L12.5 4.6"})})}):null]},`${ez}:${eH}`)})(),eR,eL,eW)}})}),eL}),eL,ez)}})}),eL})},Ut=({value:e$,defaultValue:eI=qe,open:eR,defaultOpen:eL=!1,disabled:ez,placement:eW="bottomLeft",trigger:eH="click",format:eF,defaultFormat:eP="hex",allowClear:eB,presets:eK=[],mode:eV,defaultMode:eq,arrow:eU=!0,showText:eG,size:eZ,disabledAlpha:eY,disabledFormat:eX,getPopupContainer:eJ,autoAdjustOverflow:eQ=!0,destroyTooltipOnHide:e0,destroyOnHidden:e1,panelRender:e2,rootClassName:e5,triggerClassName:e3,popupClassName:e4,panelClassName:e6,className:e8,style:e7,classNames:e9,styles:t$,onOpenChange:tI,onFormatChange:tR,onChange:tL,onClear:tz,onChangeComplete:tW,children:tH,...tF})=>{let tP=void 0!==e$,tB=void 0!==eR,tK=void 0!==eF,tV=wt(eZ),tq=St(eV),tU=tP?e$:eI,tG=xt(tU,eY),tZ=(eq&&tq.includes(eq)?eq:void 0)??(tG&&tq.includes("gradient")?"gradient":tq[0]),tY=(0,t._$vaporWithHookId)("useRef:1:0",()=>(0,t.useRef)()),tX=(0,t._$vaporWithHookId)("useRef:1:1",()=>(0,t.useRef)()),tJ=(0,t._$vaporWithHookId)("useRef:1:2",()=>(0,t.useRef)()),tQ=(0,t._$vaporWithHookId)("useRef:1:3",()=>(0,t.useRef)()),t0=(0,t._$vaporWithHookId)("useRef:1:4",()=>(0,t.useRef)()),t1=(0,t._$vaporWithHookId)("useRef:1:5",()=>(0,t.useRef)()),t2=(0,t._$vaporWithHookId)("useRef:1:6",()=>(0,t.useRef)()),t5=(0,t._$vaporWithHookId)("useRef:1:7",()=>(0,t.useRef)()),t3=(0,t._$vaporWithHookId)("ref:1:8",()=>(0,t.ref)({}));t5.current||(t5.current={Picker:()=>{let e$=t2.current?.picker;return e$?Vt(e$):null},Presets:()=>{let e$=t2.current?.presets;return e$?Ht(e$):null}});let t4=(0,t._$vaporWithHookId)("ref:1:9",()=>(0,t.ref)(tB?!!eR:!!eL)),t6=(0,t._$vaporWithHookId)("ref:1:10",()=>(0,t.ref)(eF??eP)),t8=(0,t._$vaporWithHookId)("ref:1:11",()=>(0,t.ref)(tZ)),t7=Et(eU),t9=Dt(eU),r$=e1??!!e0,rI=(0,t._$vaporWithHookId)("ref:1:12",()=>(0,t.ref)(vt(tU)?mt(qe,eY):mt(tU,eY))),rR=(0,t._$vaporWithHookId)("ref:1:13",()=>(0,t.ref)(tG)),rL=(0,t._$vaporWithHookId)("ref:1:14",()=>(0,t.ref)(Ct(rI.value))),rz=(0,t._$vaporWithHookId)("ref:1:15",()=>(0,t.ref)({})),rW=(0,t._$vaporWithHookId)("ref:1:16",()=>(0,t.ref)("")),rH=(0,t._$vaporWithHookId)("ref:1:17",()=>(0,t.ref)("")),rF=(0,t._$vaporWithHookId)("ref:1:18",()=>(0,t.ref)(Lt)),rP=(0,t._$vaporWithHookId)("ref:1:19",()=>(0,t.ref)(0)),rB=(0,t._$vaporWithHookId)("ref:1:20",()=>(0,t.ref)(`rue-color-picker-popup-${++Rt}`)),rK=()=>{rP.value+=1},rV=()=>{if(!eK.length){rW.value="",rK();return}if(!eK.some((e$,eI)=>String(e$.key??eI)===rW.value)){let e$=Math.max(0,eK.findIndex(e$=>e$.defaultOpen));rW.value=String(eK[e$]?.key??e$)}rK()},rq=()=>{if("gradient"===t8.value){let e$=rR.value?.toStops()??[];return(e$.find(e$=>e$.id===rH.value)??e$[0])?.color?.clone()??null}return rI.value?rI.value.clone():null},rU=()=>rR.value?rR.value.clone():null,rG=()=>{if("gradient"===t8.value){let e$=(rR.value??xt(eI,eY)??new bt(Ye,eY)).toStops();return(e$.find(e$=>e$.id===rH.value)??e$[0])?.color?.clone()??new pt(qe)}let e$=vt(eI)?qe:eI??qe;return rI.value?.clone()??mt(e$,eY)??new pt(qe)},rZ=e$=>{let eI=(e$??rR.value)?.toStops()??[];if(!eI.length){rH.value="";return}eI.find(e$=>e$.id===rH.value)||(rH.value=eI[0].id)},rY=(e$=!1)=>{let eI=Ct(rG()),eR={...rL.value};Object.keys(eI).forEach(eL=>{(e$||!rz.value[eL])&&(eR[eL]=eI[eL])}),rL.value=eR,rK()},rX=()=>{let eR=tP?e$:eI,eL=xt(eR,eY),ez=vt(eR)?rI.value?.clone()??mt(qe,eY):mt(eR,eY);rI.value=ez?ez.clone():null,rR.value=eL?eL.clone():null,eL&&tq.includes("gradient")?t8.value=Ke:tq.includes(t8.value)||(t8.value=tq[0]),rZ(eL),rY(!0)},rJ=e$=>{e$||(rF.value=Lt,r$&&tJ.current&&(tJ.current.remove(),tJ.current=void 0)),tB||(t4.value=e$),rK(),r4(),e$&&r6(),tI&&tI(e$)},rQ=e$=>{tq.includes(e$)&&(t8.value=e$,"gradient"===e$&&(rR.value||(rR.value=xt(eI,eY)??new bt(Ye,eY)),rZ(rR.value)),rY(!0))},r0=(e$,eI)=>{rR.value=e$?e$.clone():null,rZ(e$),rY(!0),tL&&tL(e$?e$.clone():null,e$?.toCssString()??""),eI&&e$&&tW&&tW(e$.clone())},r1=(e$,eR)=>{let eL=ht(e$,eY);if("gradient"===t8.value){let e$=rR.value??xt(eI,eY)??new bt(Ye,eY),ez=rH.value||e$.toStops()[0]?.id||"";return ez&&eL?void r0(e$.withStopColor(ez,eL),eR):void r0(e$,eR)}rI.value=eL?eL.clone():null,rY(!0),tL&&tL(eL?eL.clone():null,eL?.toCssString()??""),eR&&eL&&tW&&tW(eL.clone())},r2=(e$,eI,eR)=>{let eL=tQ.current;if(!eL)return;let ez=eL.getBoundingClientRect();if(!ez.width||!ez.height)return;let eW=$e((e$-ez.left)/ez.width,0,1),eH=$e((eI-ez.top)/ez.height,0,1);r1(new pt({...rG().toHsb(),s:100*eW,b:(1-eH)*100}),eR)},r5=()=>{typeof window>"u"||null!=t1.current&&(window.clearTimeout(t1.current),t1.current=void 0)},r3=()=>{typeof window>"u"||ez||"hover"!==eH||(r5(),t1.current=window.setTimeout(()=>{t1.current=void 0,rJ(!1)},90))},r4=()=>{let e$=tJ.current;if(!e$)return;let eI=t4.value&&!ez;e$.hidden=!eI,e$.setAttribute("aria-hidden",eI?"false":"true"),e$.style.visibility=eI?"visible":"hidden"},r6=()=>{typeof window>"u"||!t4.value||(null!=t0.current&&window.cancelAnimationFrame(t0.current),t0.current=window.requestAnimationFrame(()=>{t0.current=void 0,(()=>{if(typeof window>"u"||!t4.value)return;let e$=tX.current??tY.current,eI=tJ.current;if(!e$||!eI)return;let eR=e$.getBoundingClientRect(),eL=eI.getBoundingClientRect(),ez=window.innerWidth,eH=window.innerHeight,eF=t7?12:8,eP=Tt(eW),eB=eR.left,eK=eR.bottom+eF;"top"===eP.direction||"bottom"===eP.direction?(eK="top"===eP.direction?eR.top-eL.height-eF:eR.bottom+eF,"center"===eP.align?eB=eR.left+(eR.width-eL.width)/2:"end"===eP.align&&(eB=eR.right-eL.width)):(eB="left"===eP.direction?eR.left-eL.width-eF:eR.right+eF,eK="center"===eP.align?eR.top+(eR.height-eL.height)/2:"end"===eP.align?eR.bottom-eL.height:eR.top),!1!==eQ&&(eB=$e(eB,12,Math.max(12,ez-eL.width-12)),eK=$e(eK,12,Math.max(12,eH-eL.height-12))),rF.value={left:`${Math.round(eB)}px`,top:`${Math.round(eK)}px`,visibility:"visible"},eI.style.left=`${Math.round(eB)}px`,eI.style.top=`${Math.round(eK)}px`,eI.style.visibility="visible"})()}))},r8=()=>{ez||("gradient"===t8.value?rR.value=null:rI.value=null,rY(!0),tL&&tL(null,""),tz&&tz())},r7=(rP.value,rq()),r9=(rP.value,rU()),a$="gradient"===t8.value?r9:r7,aI={getColor:rG,getGradient:()=>rR.value?rR.value.clone():null,currentMode:t8,availableModes:tq,activeGradientStopId:rH,currentFormat:t6,allowClear:!!eB,disabled:ez,disabledFormat:eX,disabledAlpha:eY,classNames:e9,styles:t$,saturationRef:tQ,startSaturationDrag:e$=>{if(ez||(e$.preventDefault(),r2(e$.clientX,e$.clientY),typeof window>"u"))return;let eI=e$=>{r2(e$.clientX,e$.clientY)},eR=e$=>{r2(e$.clientX,e$.clientY,!0),window.removeEventListener("pointermove",eI),window.removeEventListener("pointerup",eR),t3.value.stop=void 0};t3.value.stop=()=>{window.removeEventListener("pointermove",eI),window.removeEventListener("pointerup",eR),t3.value.stop=void 0},window.addEventListener("pointermove",eI),window.addEventListener("pointerup",eR)},emitColorChange:r1,setModeValue:rQ,setFormatValue:e$=>{tK||(t6.value=e$),rY(!0),tR&&tR(e$)},inputDrafts:rL,inputFocusState:rz,requestRender:rK,commitDraftInputs:(e$=!0)=>{let eI=eY?1:$e(Number.parseFloat(rL.value.a||"100"),0,100)/100;if("hex"===t6.value){let eR=mt(rL.value.hex.trim().startsWith("#")?rL.value.hex.trim():`#${rL.value.hex.trim()}`,eY);return eR?void r1(eY?eR:eR.withAlpha(eI),e$):void rY(!0)}if("rgb"===t6.value){let eR=Number.parseFloat(rL.value.r),eL=Number.parseFloat(rL.value.g),ez=Number.parseFloat(rL.value.b);return[eR,eL,ez].every(Number.isFinite)?void r1(new pt({r:eR,g:eL,b:ez,a:eI}),e$):void rY(!0)}let eR=Number.parseFloat(rL.value.h),eL=Number.parseFloat(rL.value.s),ez=Number.parseFloat(rL.value.v);[eR,eL,ez].every(Number.isFinite)?r1(new pt({h:eR,s:eL,b:ez,a:eI}),e$):rY(!0)},clearValue:()=>{r8(),rJ(!1)},updateGradientStopPercent:(e$,eR)=>{let eL=rR.value??xt(eI,eY)??new bt(Ye,eY),ez=rH.value||eL.toStops()[0]?.id||"";ez&&r0(eL.withStopPercent(ez,e$),eR)},selectGradientStop:e$=>{rH.value=e$,rY(!0)},addGradientStop:()=>{let e$=rR.value??xt(eI,eY)??new bt(Ye,eY),eR=e$.toStops(),eL=Math.max(0,eR.findIndex(e$=>e$.id===rH.value)),ez=eR[eL]??eR[0],eW=eR[eL+1],eH=eW?(ez.percent+eW.percent)/2:$e(ez.percent+12,0,100),eF=new Set(eR.map(e$=>e$.id)),eP=e$.addStop(eH,ez.color);rH.value=eP.toStops().find(e$=>!eF.has(e$.id))?.id??rH.value,r0(eP,!0)},removeGradientStop:()=>{let e$=rR.value;if(!e$)return;let eI=e$.toStops();if(eI.length<=2)return;let eR=rH.value,eL=Math.max(0,eI.findIndex(e$=>e$.id===eR));rH.value=(eI[eL+1]??eI[Math.max(0,eL-1)])?.id??"",r0(e$.removeStop(eR),!0)}},aR={presets:eK,disabledAlpha:eY,currentMode:t8,availableModes:tq,currentFormat:t6,renderVersion:rP,classNames:e9,styles:t$,activePresetGroupKey:rW,getActiveColor:rq,getActiveGradient:rU,emitColorChange:r1,emitGradientChange:r0,setModeValue:rQ,requestRender:rK};t2.current={picker:aI,presets:aR};let aL=Qe(tH),az=!0===eG||"function"==typeof eG,aW=!aL&&!az,aH=rP.value,aF=kt(eJ,tX.current??tY.current),aP="function"==typeof eG?a$?eG(a$)??Je:Je:eG?a$?a$ instanceof bt?a$.toCssString():At(a$,t6.value):Je:null,aB="string"==typeof aP||"number"==typeof aP?String(aP):a$ instanceof bt?a$.toCssString():At(a$,t6.value)||Je,aK=()=>{let e$=i("div",{className:Ze("space-y-3",e6),children:[Vt(aI),Ht(aR)]});return e2?e2(e$,{components:t5.current,state:{color:a$,format:t6.value,mode:t8.value}}):e$};return(0,t.onMounted)(()=>{if(rV(),rX(),r4(),typeof window>"u")return;let e$=e$=>{if(!t4.value)return;let eI=e$.target;eI&&(tY.current?.contains(eI)||tJ.current?.contains(eI)||rJ(!1))},eI=e$=>{t4.value&&"Escape"===e$.key&&rJ(!1)},eR=()=>{r6()};window.addEventListener("pointerdown",e$,!0),window.addEventListener("keydown",eI),window.addEventListener("resize",eR),window.addEventListener("scroll",eR,!0),(0,t.onUnmounted)(()=>{t3.value.stop?.(),r5(),null!=t0.current&&window.cancelAnimationFrame(t0.current),window.removeEventListener("pointerdown",e$,!0),window.removeEventListener("keydown",eI),window.removeEventListener("resize",eR),window.removeEventListener("scroll",eR,!0)})}),(0,t._$vaporWithHookId)("watch:1:21",()=>(0,t.watch)(()=>e$,()=>{rX()})),(0,t._$vaporWithHookId)("watch:1:22",()=>(0,t.watch)(()=>eI,()=>{tP||rX()})),(0,t._$vaporWithHookId)("watch:1:23",()=>(0,t.watch)(()=>eK,()=>{rV()})),(0,t._$vaporWithHookId)("watch:1:24",()=>(0,t.watch)(()=>eR,()=>{void 0!==eR&&(t4.value=!!eR,rK(),r4(),eR&&r6())})),(0,t._$vaporWithHookId)("watch:1:25",()=>(0,t.watch)(()=>eF,()=>{t6.value=eF??eP,rY(!0)})),(0,t._$vaporWithHookId)("watch:1:26",()=>(0,t.watch)(()=>eY,()=>{rI.value=ht(rI.value,eY),rR.value=rR.value?new bt(rR.value.toStops(),eY):null,rZ(rR.value),rY(!0)})),(0,t._$vaporWithHookId)("watch:1:27",()=>(0,t.watch)(()=>[t4.value,eW,eQ,t7,t8.value,t6.value,rI.value?.toHexString()??"none",rR.value?.toCssString()??"gradient:none",rW.value],()=>{if(!t4.value){rF.value=Lt;return}r6()})),i("div",{...tF,ref:e$=>{tY.current=e$??void 0},className:Ze("relative inline-flex max-w-full align-top",e5,e9?.root,e8),style:{...t$?.root,...e7},"data-rue-color-picker":"true","data-rue-color-picker-version":String(aH),onMouseEnter:()=>{ez||"hover"!==eH||(r5(),rJ(!0))},onMouseLeave:()=>{r3()},children:[i("div",{role:"button",tabIndex:ez?-1:0,ref:e$=>{let eI=tX.current!==(e$??void 0);tX.current=e$??void 0,eI&&e$&&"function"==typeof eJ&&rK(),e$&&t4.value&&r6()},"aria-expanded":t4.value?"true":"false","aria-haspopup":"dialog","aria-controls":rB.value,"aria-disabled":ez?"true":void 0,"data-rue-color-picker-trigger":"true",className:Ze("group relative z-10 flex max-w-full items-center bg-base-100 text-base-content outline-none transition-[border-color,box-shadow,transform] duration-200 ease-out hover:border-primary/60 focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/15",aW?Ze("justify-center rounded-[0.72rem] border border-base-300 shadow-sm",tV.compactTriggerClassName):Ze("gap-2 rounded-[0.72rem] border border-base-300 shadow-sm",tV.triggerClassName),ez?"cursor-not-allowed opacity-55":"cursor-pointer",t4.value?"border-primary ring-2 ring-primary/15":"",e3,e9?.trigger),style:{...t$?.trigger},onClick:()=>{ez||"click"!==eH||rJ(!t4.value)},onKeyDown:e$=>{ez||(("Enter"===e$.key||" "===e$.key)&&(e$.preventDefault(),rJ("click"!==eH||!t4.value)),"Escape"===e$.key&&rJ(!1))},children:[r("span",{className:Ze("relative shrink-0 overflow-hidden border border-base-300/80 shadow-[inset_0_1px_0_rgba(255,255,255,0.65)]",aW?Ze("rounded-[0.45rem]",tV.compactSwatchSizeClassName):Ze("rounded-[0.45rem]",tV.swatchSizeClassName)),style:Ft(a$)}),aW?null:r("span",{className:"min-w-0 flex-1",children:aL?r("span",{className:"block min-w-0 truncate",children:tH}):r("span",{className:"flex min-w-0 items-center text-sm leading-5 text-base-content/85","aria-label":aB,children:"string"==typeof aP||"number"==typeof aP?r("span",{className:"truncate",children:String(aP)}):aP})}),eB&&a$?r("button",{type:"button","aria-label":"清除颜色",className:Ze("btn btn-ghost btn-xs rounded-full p-0 text-base-content/55 hover:text-base-content",e9?.clear),onClick:e$=>{"function"==typeof e$.preventDefault&&e$.preventDefault(),"function"==typeof e$.stopPropagation&&e$.stopPropagation(),r8()},children:("object"==typeof eB?eB:void 0)?.clearIcon??r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})})}):aW||az?null:r("span",{className:"shrink-0 text-base-content/45",children:r(Bt,{open:t4.value})})]}),!1===aF||null==aF?t4.value||!r$?i("div",{ref:e$=>{let eI=tJ.current;tJ.current=e$??void 0,e$&&e$!==eI&&(r4(),t4.value&&!ez&&r6())},id:rB.value,"data-rue-color-picker-popup-host":"true","data-rue-color-picker-popup-version":String(aH),className:Ze("fixed left-0 top-0 z-[1200] pointer-events-auto",tV.popupWidthClassName,e4,e9?.popup),style:{...t$?.popup,...rF.value},onMouseEnter:()=>{r5()},onMouseLeave:()=>{r3()},onPointerDown:e$=>{"function"==typeof e$.stopPropagation&&e$.stopPropagation()},onClick:e$=>{"function"==typeof e$.stopPropagation&&e$.stopPropagation()},children:[t7?r("span",{className:Ze("pointer-events-none absolute h-4 w-4 rotate-45 bg-base-100 shadow-[0_6px_18px_rgba(15,23,42,0.08)]",Ot(eW,t9))}):null,r("div",{className:Ze("relative overflow-hidden rounded-[1.1rem] border border-base-300 bg-base-100 p-3 text-base-content shadow-[0_16px_36px_rgba(15,23,42,0.14),0_6px_16px_rgba(15,23,42,0.08)] pointer-events-auto",e6,e9?.panel),style:{...t$?.panel},"data-rue-color-picker-popup":"true","data-rue-color-picker-panel-version":String(aH),children:aK()})]}):null:r(e.Teleport,{to:t4.value||!r$?aF:void 0,children:i("div",{ref:e$=>{let eI=tJ.current;tJ.current=e$??void 0,e$&&e$!==eI&&(r4(),t4.value&&!ez&&r6())},id:rB.value,"data-rue-color-picker-popup-host":"true","data-rue-color-picker-popup-version":String(aH),className:Ze("fixed left-0 top-0 z-[1200] pointer-events-auto",tV.popupWidthClassName,e4,e9?.popup),style:{...t$?.popup,...rF.value},onMouseEnter:()=>{r5()},onMouseLeave:()=>{r3()},onPointerDown:e$=>{"function"==typeof e$.stopPropagation&&e$.stopPropagation()},onClick:e$=>{"function"==typeof e$.stopPropagation&&e$.stopPropagation()},children:[t7?r("span",{className:Ze("pointer-events-none absolute h-4 w-4 rotate-45 bg-base-100 shadow-[0_6px_18px_rgba(15,23,42,0.08)]",Ot(eW,t9))}):null,r("div",{className:Ze("relative overflow-hidden rounded-[1.1rem] border border-base-300 bg-base-100 p-3 text-base-content shadow-[0_16px_36px_rgba(15,23,42,0.14),0_6px_16px_rgba(15,23,42,0.08)] pointer-events-auto",e6,e9?.panel),style:{...t$?.panel},"data-rue-color-picker-popup":"true","data-rue-color-picker-panel-version":String(aH),children:aK()})]})})]})},Wt=(e$,eI)=>eI?`${e$} ${eI}`:e$,Gt=e$=>{switch(e$){case"small":return"sm";case"default":case"medium":case"middle":return"md";case"large":return"lg";default:return e$??"md"}},Kt=e$=>{let eI=Gt(e$);if("number"==typeof eI)return{pixels:eI,style:{width:`${eI}px`,height:`${eI}px`}};switch(eI){case"xs":return{className:"h-6 w-6 text-[10px]",pixels:24};case"sm":return{className:"h-8 w-8 text-xs",pixels:32};case"lg":return{className:"h-12 w-12 text-base",pixels:48};case"xl":return{className:"h-16 w-16 text-lg",pixels:64};default:return{className:"h-10 w-10 text-sm",pixels:40}}},qt=e$=>"square"===e$?"rounded-2xl":"rounded-full",Jt=e$=>"contain"===e$?"object-contain":"object-cover",Yt=(e$,eI)=>{switch(e$){case"base":return"bg-base-200 text-base-content";case"neutral":return"bg-neutral text-neutral-content";case"primary":return"bg-primary text-primary-content";case"secondary":return"bg-secondary text-secondary-content";case"accent":return"bg-accent text-accent-content";case"info":return"bg-info text-info-content";case"success":return"bg-success text-success-content";case"warning":return"bg-warning text-warning-content";case"error":return"bg-error text-error-content";default:return eI?"bg-neutral text-neutral-content":"bg-base-300 text-base-content"}},Xt=e$=>{if("string"==typeof e$||"number"==typeof e$)return String(e$)},Zt=(e$,eI,eR)=>{let eL=(eI-2*Math.max(eR,0))/Math.max(.62*e$.length,1);return Math.max(10,Math.min(.42*eI,eL))},Qt=e$=>{let eI=[],eR=e$=>{Array.isArray(e$)?e$.forEach(eR):null==e$||!1===e$||eI.push(e$)};return eR(e$),eI},$t=e$=>"number"==typeof e$?{count:e$}:e$,en=()=>i("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"h-[55%] w-[55%]",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8Z"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 20a7.5 7.5 0 0 1 15 0"})]}),tn=({status:e$,className:eI,bodyClassName:eR,imgClassName:eL,children:ez,src:eW,srcSet:eH,alt:eF,icon:eP,text:eB,shape:eK,size:eV,gap:eq=4,color:eU,fit:eG,draggable:eZ,crossOrigin:eY,onError:eX,...eJ})=>{let eQ=Xt(ez),e0=null==eW&&null==eP&&null==eB&&null==eK&&null==eV&&null==eR&&null==eL&&null==eF&&null==eH&&null==eU&&null==eG&&void 0===eZ&&void 0===eY&&null==eX&&null==eQ&&null!=ez,e1=Kt(eV),e2=eB??eQ,e5=eP??(e2?null:ez)??r(en,{}),e3=Wt(e$?`avatar not-prose avatar-${e$}`:"avatar not-prose",eI);if(e0)return r("div",{...eJ,className:e3,"data-rue-avatar-root":"true",children:ez});let e4="string"==typeof eW&&eW.length>0,e6=!e4&&null!=eW,e8=Wt(Wt(`relative inline-flex shrink-0 items-center justify-center overflow-hidden ${qt(eK)} ${Yt(eU,"placeholder"===e$)}`,e1.className),eR),e7=null==e2?void 0:{fontSize:`${Zt(e2,e1.pixels,eq)}px`,lineHeight:"1"};return r("div",{...eJ,className:e3,"data-rue-avatar-root":"true",children:i("div",{className:e8,"data-rue-avatar-body":"true",style:e1.style,children:[e4?r("img",{"data-rue-avatar-image":"true",className:Wt(`h-full w-full ${Jt(eG)}`,eL),src:eW,srcSet:eH,alt:eF??e2??"Avatar",draggable:eZ??!0,crossOrigin:eY,onError:e$=>{if((eX?eX(e$):void 0)===!1)return;let eI=e$.currentTarget??e$.target;if(!eI)return;eI.classList.add("hidden");let eR=eI.parentElement?.querySelector('[data-rue-avatar-fallback="true"]');eR&&(eR.classList.remove("hidden"),eR.classList.add("flex"))}}):null,e6?eW:null,r("span",{className:e4||e6?"hidden h-full w-full items-center justify-center":"flex h-full w-full items-center justify-center","data-rue-avatar-fallback":"true",children:e2?r("span",{className:"inline-flex max-w-full items-center justify-center px-[0.08em] font-semibold uppercase tracking-[0.02em]",style:e7,children:e2}):e5})]})})},nn=Object.assign(tn,{Group:({className:e$,children:eI,items:eR,size:eL,shape:ez,max:eW})=>{let eH=$t(eW),eF=eH&&"number"==typeof eH.count&&eH.count>=0?Math.floor(eH.count):void 0,eP=Wt("avatar-group",e$);if(eR&&eR.length){let e$=void 0!==eF&&eR.length>eF?eR.length-eF:0;return i("div",{className:eP,"data-rue-avatar-group":"true",children:[(e$>0&&void 0!==eF?eR.slice(0,eF):eR).map((e$,eI)=>{let{key:eR,...eW}=e$;return r(tn,{size:e$.size??eL,shape:e$.shape??ez,...eW},eR??eI)}),e$>0?r(tn,{status:"placeholder",size:eL,shape:ez,className:eH?.className,bodyClassName:eH?.bodyClassName,children:eH?.placeholder??`+${e$}`}):null]})}let eB=Qt(eI),eK=void 0!==eF&&eB.length>eF?eB.length-eF:0;return i("div",{className:eP,"data-rue-avatar-group":"true",children:[eK>0&&void 0!==eF?eB.slice(0,eF):eB,eK>0?r(tn,{status:"placeholder",size:eL,shape:ez,className:eH?.className,bodyClassName:eH?.bodyClassName,children:eH?.placeholder??`+${eK}`}):null]})}}),rn=(e$,eI)=>e$&&eI?`${e$} ${eI}`:e$??eI??"",an=e$=>Array.isArray(e$)?e$:null==e$?[]:[e$],on=(e$,eI,eR,eL)=>{let ez=`${eI||"anchor"}:${eR}:${eL}`;return null==e$?ez:`${typeof e$}:${String(e$)}`},sn=e$=>!!e$&&"object"==typeof e$,cn=e$=>!!sn(e$)&&e$.type===Dn,ln=e$=>{if(!e$)return"";let eI=e$.lastIndexOf("#");if(eI<0)return"";let eR=e$.slice(eI+1).trim();if(!eR||eR.startsWith("/"))return"";try{return decodeURIComponent(eR)}catch{return eR}},un=e$=>e$.title??e$.href,dn=(e$,eI=0)=>an(e$).flatMap((e$,eR)=>{if(!cn(e$))return[];let eL=e$.props??{},ez=dn(eL.children,eI+1),eW=ez.length>0&&an(eL.children).every(e$=>cn(e$));return[{key:eL.key,href:eL.href,title:eL.title??(eW?void 0:eL.children),target:eL.target,replace:eL.replace,description:eL.description,className:eL.className,disabled:!!eL.disabled,children:ez}]}),fn=(e$,eI,eR=0)=>(e$??dn(eI)??[]).flatMap((e$,eI)=>e$&&e$.href?[{...e$,title:un(e$),keyText:on(e$.key,e$.href,eR,eI),level:eR,children:e$.children?.length?fn(e$.children,void 0,eR+1):void 0}]:[]),pn=(e$,eI=!0)=>e$.flatMap(e$=>eI&&e$.children?.length?[e$,...pn(e$.children,eI)]:[e$]),mn=()=>typeof window>"u"?void 0:window,hn=e$=>"u">typeof window&&e$===window,gn=e$=>e$?hn(e$)?window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0:e$.scrollTop:0,_n=e$=>e$?hn(e$)?window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0:e$.clientHeight:0,vn=e$=>e$?hn(e$)?Math.max(document.documentElement.scrollHeight,document.body.scrollHeight,document.documentElement.offsetHeight,document.body.offsetHeight):e$.scrollHeight:0,yn=(e$,eI)=>{let eR=Math.max(0,eI);if(e$){if(hn(e$)){try{window.scrollTo({top:eR,behavior:"smooth"})}catch{window.scrollTo(0,eR)}return}try{e$.scrollTo({top:eR,behavior:"smooth"})}catch{e$.scrollTop=eR}e$.scrollTop!==eR&&(e$.scrollTop=eR)}},bn=(e$,eI)=>{let eR=e$.getBoundingClientRect();if(!eI||hn(eI))return eR.top+gn(mn());let eL=eI.getBoundingClientRect();return eR.top-eL.top+eI.scrollTop},xn=(e$,eI)=>{if(eI.id===e$)return eI;if("u">typeof CSS&&"function"==typeof CSS.escape)return eI.querySelector(`#${CSS.escape(e$)}`);for(let eR of Array.from(eI.querySelectorAll("[id]")))if(eR.id===e$)return eR;return null},Sn=(e$,eI)=>{if(typeof document>"u")return null;let eR=ln(e$);return eR?eI&&!hn(eI)?xn(eR,eI):document.getElementById(eR):null},Cn=(e$,eI=1)=>{if(!e$)return!1;let eR=_n(e$),eL=vn(e$);return!(eR<=0)&&!(eL<=eR)&&gn(e$)+eR>=eL-eI},wn=e$=>/^(https?:)?\/\//.test(e$),Tn=(e$,eI)=>{if(typeof window>"u"||!e$.startsWith("#")||(window.location.hash||"").startsWith("#/"))return;let eR=eI?"replaceState":"pushState";"function"==typeof window.history?.[eR]&&window.history[eR](null,"",e$)},En=(e$,eI)=>{if(e$)return{position:"sticky",top:`${Math.max(0,eI??0)}px`}},Dn=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,rest:eB,slotSource:eK,hasNestedSlot:eV}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let{href:eI,title:eR,target:eL,replace:ez,description:eW,className:eH,disabled:eF,children:eP,...eB}=e$;return{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,rest:eB,slotSource:(0,t._$vaporWithHookId)("computed:1:0",()=>(0,t.computed)(()=>(0,t.getCurrentInstance)()?.propsRO??{children:e$.children})),hasNestedSlot:(0,t._$vaporWithHookId)("computed:1:1",()=>(0,t.computed)(()=>null!=e$.title&&null!=e$.children))}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("span",eI);(0,t._$setClassName)(eR,"inline-flex flex-col items-start gap-0.5");let eL=(0,t._$createElement)("a",eR);(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"href",String(e$.disabled?void 0:e$.href))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"target",String(e$.target))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"aria-disabled",String(e$.disabled?"true":void 0))}),(0,t._$setAttribute)(eL,"data-rue-anchor-link-placeholder","true"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"data-rue-anchor-link-replace",String(e$.replace?"true":void 0))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(rn("link inline-flex flex-col items-start gap-0.5",e$.className)))});let ez=(0,t._$createElement)("span",eL);(0,t._$appendChild)(eL,ez);let eW=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,eW),(0,t.watchEffect)(()=>{let eI=e$.title??e$.children??e$.href;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,eW))});let eH=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eL,eH),(0,t.watchEffect)(()=>{let eI=e$.description?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("span",eI);(0,t._$appendChild)(eI,eR),(0,t._$setClassName)(eR,"text-xs opacity-70");let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.description;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eL,eH))});let eF=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eF),(0,t.watchEffect)(()=>{let e$=eV.get()?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("span",e$);(0,t._$appendChild)(e$,eI),(0,t._$setClassName)(eI,"ml-4 flex flex-col items-start gap-1 text-sm opacity-85");let eR=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let e$=(0,t._$createComponent)(e.Slot,{source:eK.get()});(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eR))}),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eF))}),eR})},On=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,rest:eQ,slotSource:e0,normalizedItems:e1,visibleItems:e2,flatItems:e5,shouldRenderChildrenFallback:e3,activeHrefRef:e4,rawActiveHrefRef:e6,scrollContainerRef:e8,cleanupScrollRef:e7,frameRef:e9,activeOffset:t$,itemSignature:tI,showIndicator:tR,resolveContainer:tL,clearFrame:tz,setActiveHref:tW,syncActiveHref:tH,scheduleActiveSync:tF,bindContainerListener:tP,scrollToHref:tB,renderItem:tK,mergedRootClassName:tV}=(0,t._$vaporWithHookId)("useSetup:0:0:dup2",()=>(0,t.useSetup)(()=>{let{className:eI,rootClassName:eR,style:eL,children:ez,offsetTop:eW,bounds:eH,affix:eF,showInkInFixed:eP,getContainer:eB,getCurrentAnchor:eK,onClick:eV,targetOffset:eq,onChange:eU,items:eG,direction:eZ,replace:eY,classNames:eX,styles:eJ,...eQ}=e$,e0=(0,t._$vaporWithHookId)("computed:1:2",()=>(0,t.computed)(()=>(0,t.getCurrentInstance)()?.propsRO??{children:e$.children})),e1=(0,t._$vaporWithHookId)("computed:1:3",()=>(0,t.computed)(()=>fn(e$.items,e$.children))),e2=(0,t._$vaporWithHookId)("computed:1:4",()=>(0,t.computed)(()=>(void 0===e$.direction||e$.direction,e1.get()))),e5=(0,t._$vaporWithHookId)("computed:1:5",()=>(0,t.computed)(()=>pn(e1.get(),(void 0===e$.direction?"vertical":e$.direction)!=="horizontal"))),e3=(0,t._$vaporWithHookId)("computed:1:6",()=>(0,t.computed)(()=>!e$.items&&0===e1.get().length&&null!=e$.children)),e4=(0,t._$vaporWithHookId)("ref:1:7",()=>(0,t.ref)("")),e6=(0,t._$vaporWithHookId)("useRef:1:8",()=>(0,t.useRef)("")),e8=(0,t._$vaporWithHookId)("useRef:1:9",()=>(0,t.useRef)()),e7=(0,t._$vaporWithHookId)("useRef:1:10",()=>(0,t.useRef)(void 0)),e9=(0,t._$vaporWithHookId)("useRef:1:11",()=>(0,t.useRef)(void 0)),t$=(0,t._$vaporWithHookId)("computed:1:12",()=>(0,t.computed)(()=>e$.targetOffset??e$.offsetTop??0)),tI=(0,t._$vaporWithHookId)("computed:1:13",()=>(0,t.computed)(()=>e5.get().map(e$=>e$.href).join("|"))),tR=(0,t._$vaporWithHookId)("computed:1:14",()=>(0,t.computed)(()=>void 0===e$.affix||e$.affix||void 0!==e$.showInkInFixed&&e$.showInkInFixed||(void 0===e$.direction?"vertical":e$.direction)==="horizontal")),tL=()=>e$.getContainer?.()??mn(),tz=()=>{typeof window>"u"||null!=e9.current&&(window.cancelAnimationFrame(e9.current),e9.current=void 0)},tW=(eI,eR=!0)=>{if(e6.current===eI){let eR="function"==typeof e$.getCurrentAnchor?e$.getCurrentAnchor(eI):eI;e4.value!==eR&&(e4.value=eR);return}e6.current=eI,e4.value="function"==typeof e$.getCurrentAnchor?e$.getCurrentAnchor(eI):eI,eR&&e$.onChange&&e$.onChange(eI)},tH=()=>{let eI=tL(),eR=gn(eI),eL="",ez=-1/0;e5.get().forEach(eW=>{let eH=Sn(eW.href,eI);if(!eH)return;let eF=bn(eH,eI);eF<=eR+t$.get()+(void 0===e$.bounds?5:e$.bounds)&&eF>=ez&&(ez=eF,eL=eW.href)});let eW=e5.get()[e5.get().length-1];eW&&eL!==eW.href&&Cn(eI,Math.max(void 0===e$.bounds?5:e$.bounds,1))&&Sn(eW.href,eI)&&(eL=eW.href),!eL&&e5.get().length>0&&(eL=e5.get()[0]?.href??""),tW(eL)},tF=()=>{typeof window>"u"||"function"!=typeof window.requestAnimationFrame?tH():(tz(),e9.current=window.requestAnimationFrame(()=>{e9.current=void 0,tH()}))},tP=()=>{if(typeof window>"u")return;let e$=tL();if(!e$||e8.current===e$&&e7.current)return;e7.current?.();let eI=()=>{tF()};e$.addEventListener("scroll",eI),window.addEventListener("resize",eI),e8.current=e$,e7.current=()=>{e$.removeEventListener("scroll",eI),window.removeEventListener("resize",eI),e8.current=void 0,e7.current=void 0}},tB=e$=>{let eI=tL(),eR=Sn(e$,eI);if(!eR)return;let eL=bn(eR,eI)-t$.get();tW(e$),yn(eI,eL),tF()};(0,t.onMounted)(()=>{tP(),tF()}),(0,t.onUnmounted)(()=>{e7.current?.(),tz()}),(0,t._$vaporWithHookId)("watch:1:15",()=>(0,t.watch)(()=>`${void 0===e$.direction?"vertical":e$.direction}|${tI.get()}|${t$.get()}|${void 0===e$.bounds?5:e$.bounds}`,()=>{tP(),tF()},{immediate:!0}));let tK=eI=>{let{active:eR,nestedVisible:eL,effectiveReplace:ez,effectiveHref:eW}=(0,t._$vaporWithHookId)("useSetup:0:0:dup1",()=>(0,t.useSetup)(()=>({active:(0,t._$vaporWithHookId)("computed:1:16",()=>(0,t.computed)(()=>e4.value===eI.href)),nestedVisible:(void 0===e$.direction?"vertical":e$.direction)!=="horizontal"&&!!eI.children?.length,effectiveReplace:(0,t._$vaporWithHookId)("computed:1:17",()=>(0,t.computed)(()=>eI.replace??e$.replace)),effectiveHref:(0,t._$vaporWithHookId)("computed:1:18",()=>(0,t.computed)(()=>eI.disabled?void 0:eI.href))})));return(0,t.vapor)(eH=>{let eF=(0,t._$createElement)("li",eH);(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eF,"key",String(eI.keyText))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eF,"data-rue-anchor-item",String(eI.keyText))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eF,String(rn(rn("list-none",(void 0===e$.direction?"vertical":e$.direction)==="horizontal"?"shrink-0":eI.level>0?"pl-0":void 0),e$.classNames?.item)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.item;(0,t._$setStyle)(eF,eI)});let eP=(0,t._$createElement)("a",eF);(0,t._$appendChild)(eF,eP),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eP,"href",String(eW.get()))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eP,"target",String(eI.target))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eP,"rel",String("_blank"===eI.target?"noreferrer":void 0))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eP,"aria-disabled",String(eI.disabled?"true":void 0))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eP,"aria-current",String(eR.get()?"location":void 0))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eP,"data-rue-anchor-href",String(eI.href))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eP,"data-active",String(eR.get()?"true":"false"))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eP,String(rn(rn(rn((void 0===e$.direction?"vertical":e$.direction)==="horizontal"?"inline-flex min-w-0 items-center gap-2 rounded-full border px-3 py-2 text-sm transition duration-200 ease-out":"group flex min-w-0 items-start gap-3 rounded-2xl border px-3 py-2.5 transition duration-200 ease-out",eR.get()?"border-primary/35 bg-primary/8 text-primary shadow-[0_12px_30px_-24px_rgba(59,130,246,0.85)]":"border-transparent bg-base-100/65 text-base-content/78 hover:border-base-300 hover:bg-base-100"),eI.disabled?"cursor-not-allowed opacity-45":"cursor-pointer"),rn(e$.classNames?.link,eI.className))))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.link;(0,t._$setStyle)(eP,eI)}),(0,t._$addEventListener)(eP,"click",eR=>{if(eI.disabled){eR.preventDefault(),eR.stopPropagation();return}if(e$.onClick&&e$.onClick(eR,{title:eI.title,href:eI.href}),!eR.defaultPrevented){if(Sn(eI.href,tL())){eR.preventDefault(),tB(eI.href),Tn(eI.href,ez.get());return}ez.get()&&wn(eI.href)&&(eR.preventDefault(),window.location.replace(eI.href))}});let eB=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eP,eB),(0,t.watchEffect)(()=>{let eI=tR.get()?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("span",eI);return(0,t._$appendChild)(eI,eL),(0,t._$setAttribute)(eL,"aria-hidden","true"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(rn(rn((void 0===e$.direction?"vertical":e$.direction)==="horizontal"?"h-2 w-2 rounded-full border transition-colors":"mt-1 h-2.5 w-2.5 shrink-0 rounded-full border transition-colors",eR.get()?"border-primary bg-primary":"border-base-300 bg-base-100"),e$.classNames?.indicator)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.indicator;(0,t._$setStyle)(eL,eI)}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eP,eB))});let eK=(0,t._$createElement)("span",eP);(0,t._$appendChild)(eP,eK),(0,t._$setClassName)(eK,"min-w-0 flex-1");let eV=(0,t._$createElement)("span",eK);(0,t._$appendChild)(eK,eV),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eV,String(rn(rn("block truncate text-sm font-medium leading-6",eR.get()?"text-primary":"text-base-content"),e$.classNames?.title)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.title;(0,t._$setStyle)(eV,eI)});let eq=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eV,eq),(0,t.watchEffect)(()=>{let e$=un(eI);(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eV,eq))});let eU=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eK,eU),(0,t.watchEffect)(()=>{let eR=eI.description&&(void 0===e$.direction?"vertical":e$.direction)!=="horizontal"?(0,t.vapor)(()=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("span",eR);(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(rn("mt-0.5 block text-xs leading-5 text-base-content/58",e$.classNames?.description)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.description;(0,t._$setStyle)(eL,eI)});let ez=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{let e$=eI.description;(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eL,ez))}),eR}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eR,eK,eU))});let eG=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eF,eG),(0,t.watchEffect)(()=>{let e$=eL?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("ul",e$);(0,t._$appendChild)(e$,eR),(0,t._$setClassName)(eR,"mt-2 space-y-1.5 border-l border-base-300/70 pl-4");let eL=(0,t._$createComment)("rue:list:start"),ez=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eR,eL),(0,t._$appendChild)(eR,ez);let eW=new Map;return(0,t.watchEffect)(()=>{eW=(0,t._$vaporKeyedList)({items:eI.children||[],getKey:(e$,eI)=>eI,elements:eW,parent:eR,before:ez,start:eL,renderItem:(e$,eI,eR,eL,ez)=>{(0,t.renderBetween)(tK(e$),eI,eR,eL)}})}),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eF,eG))}),eF})};return{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,rest:eQ,slotSource:e0,normalizedItems:e1,visibleItems:e2,flatItems:e5,shouldRenderChildrenFallback:e3,activeHrefRef:e4,rawActiveHrefRef:e6,scrollContainerRef:e8,cleanupScrollRef:e7,frameRef:e9,activeOffset:t$,itemSignature:tI,showIndicator:tR,resolveContainer:tL,clearFrame:tz,setActiveHref:tW,syncActiveHref:tH,scheduleActiveSync:tF,bindContainerListener:tP,scrollToHref:tB,renderItem:tK,mergedRootClassName:(0,t._$vaporWithHookId)("computed:1:19",()=>(0,t.computed)(()=>rn(rn(rn(rn((void 0===e$.direction?"vertical":e$.direction)==="horizontal"?"rue-anchor overflow-x-auto rounded-[1.5rem] border border-base-300/70 bg-gradient-to-r from-base-100 via-base-100 to-base-200/50 p-3 shadow-[0_20px_45px_-36px_rgba(15,23,42,0.45)]":"rue-anchor rounded-[1.5rem] border border-base-300/70 bg-gradient-to-b from-base-100 via-base-100 to-base-200/40 p-4 shadow-[0_20px_45px_-36px_rgba(15,23,42,0.45)]",void 0===e$.affix||e$.affix?"z-[1]":void 0),e$.classNames?.root),e$.rootClassName),e$.className)))}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("nav",eI);(0,t._$setAttribute)(eR,"aria-label","页内导航"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(tV.get()))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{...En(void 0===e$.affix||e$.affix,e$.offsetTop),...e$.styles?.root,...e$.style})}),(0,t._$setAttribute)(eR,"data-rue-anchor","true"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"data-rue-anchor-direction",String(void 0===e$.direction?"vertical":e$.direction))});let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e3.get()?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(rn((void 0===e$.direction?"vertical":e$.direction)==="horizontal"?"flex flex-wrap items-center gap-2":"flex flex-col items-stretch gap-2",e$.classNames?.list)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.list;(0,t._$setStyle)(eR,eI)}),(0,t._$setAttribute)(eR,"data-rue-anchor-children","true");let eL=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let e$=(0,t._$createComponent)(e.Slot,{source:e0.get()});(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eL))}),eI}):(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("ul",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(rn((void 0===e$.direction?"vertical":e$.direction)==="horizontal"?"flex items-center gap-2":"space-y-1.5",e$.classNames?.list)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.list;(0,t._$setStyle)(eR,eI)});let eL=(0,t._$createComment)("rue:list:start"),ez=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eR,eL),(0,t._$appendChild)(eR,ez);let eW=new Map;return(0,t.watchEffect)(()=>{eW=(0,t._$vaporKeyedList)({items:e2.get()||[],getKey:(e$,eI)=>eI,elements:eW,parent:eR,before:ez,start:eL,renderItem:(e$,eI,eR,eL,ez)=>{(0,t.renderBetween)(tK(e$),eI,eR,eL)}})}),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eR})};On.Link=Dn;var kn=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],An={width:"",height:""},jn={position:"",top:"",bottom:"",left:"",width:"",height:""},Mn=(e$,eI)=>e$&&eI?`${e$} ${eI}`:e$??eI??"",Nn=e$=>{if(!(typeof window>"u"))return e$&&"ownerDocument"in e$?e$.ownerDocument?.defaultView??window:window},Pn=(e$,eI)=>e$===eI,Fn=(e$,eI)=>!!e$&&!Pn(e$,eI)&&"getBoundingClientRect"in e$,In=e$=>{let eI=e$.innerWidth||e$.document.documentElement.clientWidth||e$.document.body.clientWidth||0,eR=e$.innerHeight||e$.document.documentElement.clientHeight||e$.document.body.clientHeight||0;return{x:0,y:0,top:0,left:0,right:eI,bottom:eR,width:eI,height:eR,toJSON:()=>({})}},Ln=(e$,eI)=>Fn(e$,eI)?e$.getBoundingClientRect():In(eI),Rn=(e$,eI,eR)=>{if(void 0!==eR&&Math.round(eI.top)>Math.round(e$.top)-eR)return eR+eI.top},zn=(e$,eI,eR,eL)=>{if(void 0!==eL&&Math.round(eI.bottom)<Math.round(e$.bottom)+eL)return eL+(eR.innerHeight-eI.bottom)},Bn=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,rest:eV,affixed:eq,affixStyle:eU,placeholderStyle:eG,placeholderRef:eZ,targetRef:eY,cleanupRef:eX,frameRef:eJ,mountTimerRef:eQ,resizeObserverRef:e0,resolvedOffsetTop:e1,resolveTarget:e2,clearFrame:e5,clearMountTimer:e3,disconnectResizeObserver:e4,updateState:e6,measure:e8,scheduleMeasure:e7,bindResizeObserver:e9,bindTargetListeners:t$,syncBinding:tI,assignPlaceholderRef:tR,mergedRootClassName:tL,mergedFixedClassName:tz,mergedRootStyle:tW,mergedFixedStyle:tH}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let{offsetTop:eI,offsetBottom:eR,style:eL,onChange:ez,target:eW,className:eH,rootClassName:eF,children:eP,classNames:eB,styles:eK,...eV}=e$,eq=(0,t._$vaporWithHookId)("ref:1:0",()=>(0,t.ref)(!1)),eU=(0,t._$vaporWithHookId)("ref:1:1",()=>(0,t.ref)(void 0)),eG=(0,t._$vaporWithHookId)("ref:1:2",()=>(0,t.ref)(void 0)),eZ=(0,t._$vaporWithHookId)("useRef:1:3",()=>(0,t.useRef)()),eY=(0,t._$vaporWithHookId)("useRef:1:4",()=>(0,t.useRef)()),eX=(0,t._$vaporWithHookId)("useRef:1:5",()=>(0,t.useRef)(void 0)),eJ=(0,t._$vaporWithHookId)("useRef:1:6",()=>(0,t.useRef)(void 0)),eQ=(0,t._$vaporWithHookId)("useRef:1:7",()=>(0,t.useRef)(void 0)),e0=(0,t._$vaporWithHookId)("useRef:1:8",()=>(0,t.useRef)(void 0)),e1=(0,t._$vaporWithHookId)("computed:1:9",()=>(0,t.computed)(()=>void 0===e$.offsetBottom&&void 0===e$.offsetTop?0:e$.offsetTop)),e2=()=>e$.target?.()??Nn(),e5=()=>{let e$=Nn(eY.current);e$&&null!=eJ.current&&(e$.cancelAnimationFrame(eJ.current),eJ.current=void 0)},e3=()=>{let e$=Nn(eY.current);e$&&null!=eQ.current&&(e$.clearTimeout(eQ.current),eQ.current=void 0)},e4=()=>{e0.current?.disconnect(),e0.current=void 0},e6=(eI,eR)=>{let eL=!!eI;eq.value!==eL&&(eq.value=eL,e$.onChange?.(eL)),eU.value=eI,eG.value=eR},e8=()=>{if(typeof window>"u")return;let eI=eZ.current;if(!eI)return;let eR=e2(),eL=Nn(eR);if(!eR||!eL)return void e6(void 0,void 0);let ez=eI.getBoundingClientRect();if(0===ez.top&&0===ez.left&&0===ez.width&&0===ez.height)return void e6(void 0,void 0);let eW=Ln(eR,eL),eH=Rn(ez,eW,e1.get()),eF=void 0===eH?zn(ez,eW,eL,e$.offsetBottom):void 0;void 0===eH&&void 0===eF?e6(void 0,void 0):e6({position:"fixed",top:null==eH?void 0:`${eH}px`,bottom:null==eF?void 0:`${eF}px`,left:`${ez.left}px`,width:`${ez.width}px`,height:`${ez.height}px`},{width:`${ez.width}px`,height:`${ez.height}px`})},e7=()=>{let e$=Nn(e2());e$&&"function"==typeof e$.requestAnimationFrame?(e5(),eJ.current=e$.requestAnimationFrame(()=>{eJ.current=void 0,e8()})):e8()},e9=()=>{if(e4(),typeof ResizeObserver>"u")return;let e$=eZ.current;if(!e$)return;let eI=new ResizeObserver(()=>{e7()});eI.observe(e$);let eR=e2(),eL=Nn(eR);eL&&Fn(eR,eL)&&eI.observe(eR),e0.current=eI},t$=()=>{if(typeof window>"u")return;let e$=e2(),eI=Nn(e$);if(!e$||!eI||eY.current===e$&&eX.current)return;eX.current?.();let eR=()=>{e7()};kn.forEach(eI=>{e$.addEventListener(eI,eR)}),Pn(e$,eI)||(eI.addEventListener("resize",eR),eI.addEventListener("scroll",eR,!0)),eY.current=e$,eX.current=()=>{kn.forEach(eI=>{e$.removeEventListener(eI,eR)}),Pn(e$,eI)||(eI.removeEventListener("resize",eR),eI.removeEventListener("scroll",eR,!0)),eY.current===e$&&(eY.current=void 0),eX.current=void 0}},tI=()=>{t$(),e9(),e7()};return(0,t.onMounted)(()=>{tI();let e$=Nn(e2());e$&&(eQ.current=e$.setTimeout(()=>{eQ.current=void 0,tI()},0))}),(0,t.onUnmounted)(()=>{e5(),e3(),e4(),eX.current?.()}),(0,t._$vaporWithHookId)("watch:1:10",()=>(0,t.watch)(()=>e$.target,()=>{tI()})),(0,t._$vaporWithHookId)("watch:1:11",()=>(0,t.watch)(()=>e$.offsetTop,()=>{e7()})),(0,t._$vaporWithHookId)("watch:1:12",()=>(0,t.watch)(()=>e$.offsetBottom,()=>{e7()})),{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,rest:eV,affixed:eq,affixStyle:eU,placeholderStyle:eG,placeholderRef:eZ,targetRef:eY,cleanupRef:eX,frameRef:eJ,mountTimerRef:eQ,resizeObserverRef:e0,resolvedOffsetTop:e1,resolveTarget:e2,clearFrame:e5,clearMountTimer:e3,disconnectResizeObserver:e4,updateState:e6,measure:e8,scheduleMeasure:e7,bindResizeObserver:e9,bindTargetListeners:t$,syncBinding:tI,assignPlaceholderRef:e$=>{eZ.current=e$??void 0,e$&&tI()},mergedRootClassName:(0,t._$vaporWithHookId)("computed:1:13",()=>(0,t.computed)(()=>Mn(Mn("rue-affix",e$.classNames?.root),e$.rootClassName))),mergedFixedClassName:(0,t._$vaporWithHookId)("computed:1:14",()=>(0,t.computed)(()=>Mn(Mn("rue-affix-node",e$.classNames?.fixed),e$.className))),mergedRootStyle:{...An,...e$.styles?.root,...eG.value},mergedFixedStyle:(0,t._$vaporWithHookId)("computed:1:15",()=>(0,t.computed)(()=>({...jn,...e$.styles?.fixed,...e$.style,...eU.value})))}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI),eL=(0,t._$vaporBindUseRef)(eR,()=>tR);(0,t.onBeforeUnmount)(()=>{eL()}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(tL.get()))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,tW)}),(0,t._$setAttribute)(eR,"data-rue-affix","true"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"data-rue-affixed",String(eq.value?"true":"false"))});let ez=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,ez),(0,t.watchEffect)(()=>{(0,t._$setClassName)(ez,String(tz.get()))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(ez,tH.get())}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(ez,"data-rue-affix-fixed",String(eq.value?"true":"false"))});let eW=(0,t._$createComment)("rue:children:anchor");return(0,t._$appendChild)(ez,eW),(0,t.watchEffect)(()=>{let eI=e$.children;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,eW))}),eR})},Vn=["neutral","primary","secondary","accent","success","warning","info","error"],Hn=["solid","dashed","dotted"],Un=e$=>!!e$&&Vn.includes(e$),Wn=e$=>!!e$&&Hn.includes(e$),Gn=(...e$)=>e$.filter(Boolean).join(" "),Kn=e$=>"number"==typeof e$?e$:"string"==typeof e$?/^\d+(\.\d+)?$/.test(e$)?Number(e$):e$:void 0,qn=e$=>{if(!(!e$||"vertical"===e$))return"divider-horizontal"},Jn=(e$,eI,eR)=>(e$??eR??(eI?"vertical":"horizontal"))==="vertical"?"divider-horizontal":void 0,Yn=({color:e$,variant:eI,lineVariant:eR,direction:eL,orientation:ez,type:eW,vertical:eH,placement:eF,titlePlacement:eP,orientationMargin:eB,dashed:eK,plain:eV,className:eq,contentClassName:eU,style:eG,contentStyle:eZ,children:eY,...eX})=>{let eJ=e$??(Un(eI)?eI:void 0),eQ=eR??(Wn(eI)?eI:void 0)??(eK?"dashed":"solid"),e0=eP??eF,e1=ez||eW||eH?Jn(ez,eH,eW):qn(eL),e2=(ez??eW??(eH?"vertical":"horizontal"))==="vertical",e5=Kn(eB),e3=Gn("divider",e1,eJ?`divider-${eJ}`:void 0,e0&&"center"!==e0?`divider-${e0}`:void 0,"dashed"===eQ?"before:border-dashed after:border-dashed":void 0,"dotted"===eQ?"before:border-dotted after:border-dotted":void 0,eq),e4=Gn("whitespace-nowrap",eV?"font-normal opacity-80":void 0,eU),e6="start"===e0?{marginInlineStart:e5,...eZ}:"end"===e0?{marginInlineEnd:e5,...eZ}:eZ;return r("div",{className:e3,style:eG,role:"separator","aria-orientation":e2?"vertical":"horizontal",...eX,children:e2||null==eY?null:r("span",{className:e4,style:e6,children:eY})})},Xn="__rue_component_type",Zn="__rue_slots",Qn="data-rue-descriptions-proxy",$n="data-rue-descriptions-proxy-label",er="data-rue-descriptions-proxy-content",tr=["xs","sm","md","lg","xl","xxl"],nr={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},rr=new Set,ir=new WeakMap,ar=e$=>{let{slotSource:eI,resolvedContent:eR,applyProxyRef:eL}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let eI=(0,t._$vaporWithHookId)("computed:1:0",()=>(0,t.computed)(()=>(0,t.getCurrentInstance)()?.propsRO??{children:e$.children})),eR=(0,t._$vaporWithHookId)("computed:1:1",()=>(0,t.computed)(()=>void 0===e$.content?yr(eI.get(),e$.children):e$.content));return{slotSource:eI,resolvedContent:eR,applyProxyRef:eI=>{eI&&ir.set(eI,{key:e$.key,label:e$.label,content:eR.get(),span:e$.span,className:e$.className,style:e$.style,labelClassName:e$.labelClassName,labelStyle:e$.labelStyle,contentClassName:e$.contentClassName,contentStyle:e$.contentStyle,classNames:e$.classNames,styles:e$.styles})}}}));return(0,t.vapor)(eR=>{let ez=(0,t._$createElement)("div",eR),eW=(0,t._$vaporBindUseRef)(ez,()=>eL);(0,t.onBeforeUnmount)(()=>{eW()}),(0,t._$setClassName)(ez,"hidden"),(0,t._$setAttribute)(ez,"aria-hidden","true"),(0,t._$setAttribute)(ez,"data-rue-descriptions-proxy","true");let eH=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,eH),(0,t._$setAttribute)(eH,"data-rue-descriptions-proxy-label","true");let eF=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eH,eF),(0,t.watchEffect)(()=>{let eI=e$.label;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eH,eF))});let eP=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,eP),(0,t._$setAttribute)(eP,"data-rue-descriptions-proxy-content","true");let eB=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eP,eB),(0,t.watchEffect)(()=>{let eR=void 0===e$.content?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eR=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(e$,eR),(0,t.watchEffect)(()=>{let eL=(0,t._$createComponent)(e.Slot,{source:eI.get()});(0,t.untrack)(()=>(0,t.renderAnchor)(eL,e$,eR))}),e$}):e$.content;(0,t.untrack)(()=>(0,t.renderAnchor)(eR,eP,eB))}),ez})},or=(...e$)=>e$.filter(Boolean).join(" "),sr=(...e$)=>{let eI=Object.assign({},...e$.filter(e$=>e$&&"object"==typeof e$));return Object.keys(eI).length?eI:void 0},cr=e$=>!!e$&&"object"==typeof e$,lr=(e$,eI=[])=>(null==e$||"boolean"==typeof e$||("function"==typeof e$&&"block-factory"===e$.kind?lr(e$(),eI):Array.isArray(e$)?e$.forEach(e$=>lr(e$,eI)):cr(e$)&&"fragment"===e$.type?lr(e$.props?.children,eI):eI.push(e$)),eI),ur=e$=>!(!e$||"object"!=typeof e$||Array.isArray(e$))&&Object.keys(e$).some(e$=>tr.includes(e$)),dr=(e$,eI)=>{let eR=Number(e$);return Number.isFinite(eR)&&Math.max(1,Math.floor(eR))||eI},fr=()=>typeof window>"u"?nr.xl:window.innerWidth||document.documentElement?.clientWidth||nr.xl,pr=()=>{rr.forEach(e$=>e$())},mr=e$=>typeof window>"u"?()=>{}:(0===rr.size&&window.addEventListener("resize",pr),rr.add(e$),()=>{rr.delete(e$),0===rr.size&&window.removeEventListener("resize",pr)}),hr=(e$,eI)=>{let eR;if(!ur(e$))return e$;for(let eL of tr)eI>=nr[eL]&&void 0!==e$[eL]&&(eR=e$[eL]);return eR},gr=(e$,eI)=>dr(hr(e$,eI)??3,3),_r=(e$,eI)=>null==e$?`index:${eI}`:`${typeof e$}:${String(e$)}`,vr=(e$,eI)=>"filled"===e$?{span:1,filled:!0}:{span:dr(hr(e$,eI)??e$??1,1),filled:!1},yr=(e$,eI)=>{let eR=e$[Zn];return eR&&"object"==typeof eR&&"default"in eR?eR.default:"children"in e$?e$.children:eI},br=e$=>lr(e$).flatMap((e$,eI)=>{if(!cr(e$))return[];let eR=e$.type;if(e$[Xn]!==ar&&eR!==ar&&eR?.[Xn]!==ar)return[];let eL=e$.props??{};return[{...eL,key:e$.key??eL.key??eI}]}),xr=(e$,eI,eR)=>(e$??br(eI)).map((e$,eI)=>{let eL=vr(e$.span,eR);return{...e$,keyText:_r(e$.key,eI),content:void 0===e$.content?e$.children:e$.content,span:eL.span,filled:eL.filled}}),Sr=(e$,eI)=>{let eR=[],eL=[],ez=0;return e$.forEach(e$=>{if(e$.filled){eL.push({...e$,span:1}),eR.push(eL),eL=[],ez=0;return}let eW=Math.min(eI,Math.max(1,e$.span)),eH=Math.max(1,eI-ez);if((ez+=eW)>=eI){eL.push({...e$,span:ez>eI?eH:eW}),eR.push(eL),eL=[],ez=0;return}eL.push({...e$,span:eW})}),eL.length>0&&eR.push(eL),eR=eR.map(e$=>{let eR=e$.map(e$=>({...e$})),eL=eR.reduce((e$,eI)=>e$+eI.span,0);if(eL>=eI||0===eR.length)return eR;let ez=eR[eR.length-1];return ez.span+=eI-eL,eR})},Cr=e$=>{switch(e$){case"small":case"sm":return{titleClassName:"text-base",cellPaddingClassName:"px-4 py-3",verticalLabelPaddingClassName:"px-4 pt-3 pb-1.5",verticalContentPaddingClassName:"px-4 pb-3 pt-0",labelClassName:"text-[0.68rem] font-semibold tracking-[0.02em] text-base-content/50",inlineLabelClassName:"sm:max-w-28",contentClassName:"text-sm leading-6 text-base-content/85",inlineLayoutClassName:"gap-2.5 sm:gap-3"};case"large":case"lg":return{titleClassName:"text-xl",cellPaddingClassName:"px-6 py-5",verticalLabelPaddingClassName:"px-6 pt-5 pb-2",verticalContentPaddingClassName:"px-6 pb-5 pt-0",labelClassName:"text-[0.72rem] font-semibold tracking-[0.02em] text-base-content/48",inlineLabelClassName:"sm:max-w-40",contentClassName:"text-[0.97rem] leading-7 text-base-content/88",inlineLayoutClassName:"gap-3 sm:gap-4"};default:return{titleClassName:"text-lg",cellPaddingClassName:"px-5 py-4",verticalLabelPaddingClassName:"px-5 pt-4 pb-2",verticalContentPaddingClassName:"px-5 pb-4 pt-0",labelClassName:"text-[0.7rem] font-semibold tracking-[0.02em] text-base-content/48",inlineLabelClassName:"sm:max-w-32",contentClassName:"text-sm leading-6 text-base-content/86",inlineLayoutClassName:"gap-3"}}},wr=(e$,eI,eR,eL,ez,eW,eH)=>({labelNode:null==e$.label?null:i("div",{"data-rue-descriptions-node":"label",className:or(eR.labelClassName,eR.inlineLabelClassName,eL?.label,e$.classNames?.label,e$.labelClassName),style:sr(ez?.label,eW,e$.styles?.label,e$.labelStyle),children:[e$.label,eI?r("span",{className:"ml-1.5 opacity-45",children:":"}):null]}),contentNode:r("div",{"data-rue-descriptions-node":"content",className:or("min-w-0 flex-1",eR.contentClassName,eL?.content,e$.classNames?.content,e$.contentClassName),style:sr(ez?.content,eH,e$.styles?.content,e$.contentStyle),children:e$.content})}),Tr=e$=>{if(!e$)return;let eI=Array.from(e$.childNodes).map(e$=>e$.cloneNode(!0)).filter(e$=>8!==e$.nodeType||"rue:slot:anchor"!==e$.data);if(0!==eI.length)return 1===eI.length?eI[0]:eI},Er=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,rest:eY,slotSource:eX,viewportWidth:eJ,unsubscribeRef:eQ,collectedItemsRef:e0,collectorRef:e1,collectorObserverRef:e2,tableHostRef:e5,rawChildren:e3,headerSizeConfig:e4,scheduleCollectedItemsSync:e6,syncCollectedItems:e8,renderTableView:e7,syncTableView:e9,applyTableHostRef:t$}=(0,t._$vaporWithHookId)("useSetup:0:0:dup2",()=>(0,t.useSetup)(()=>{let{title:eI,extra:eR,column:eL,colon:ez,bordered:eW,layout:eH,className:eF,style:eP,size:eB,labelStyle:eK,contentStyle:eV,classNames:eq,styles:eU,items:eG,children:eZ,...eY}=e$,eX=(0,t._$vaporWithHookId)("computed:1:2",()=>(0,t.computed)(()=>(0,t.getCurrentInstance)()?.propsRO??{children:e$.children})),eJ=(0,t._$vaporWithHookId)("ref:1:3",()=>(0,t.ref)(fr())),eQ=(0,t._$vaporWithHookId)("ref:1:4",()=>(0,t.ref)(null)),e0=(0,t._$vaporWithHookId)("ref:1:5",()=>(0,t.ref)([])),e1=(0,t._$vaporWithHookId)("useRef:1:6",()=>(0,t.useRef)(null)),e2=(0,t._$vaporWithHookId)("useRef:1:7",()=>(0,t.useRef)(void 0)),e5=(0,t._$vaporWithHookId)("useRef:1:8",()=>(0,t.useRef)(null)),e3=(0,t._$vaporWithHookId)("computed:1:9",()=>(0,t.computed)(()=>yr(eX.get(),e$.children))),e4=(0,t._$vaporWithHookId)("computed:1:10",()=>(0,t.computed)(()=>Cr(e$.size))),e6=()=>{Promise.resolve().then(()=>{e8()})},e8=()=>{let eI=e1.current;if(!eI){e0.value=[];return}e0.value=Array.from(eI.querySelectorAll(`[${Qn}="true"]`)).map((e$,eI)=>{let eR=ir.get(e$)??{},eL=e$.querySelector(`[${$n}="true"]`),ez=e$.querySelector(`[${er}="true"]`);return{...eR,key:eR.key??eI,label:eR.label??Tr(eL),content:eR.content??Tr(ez)}}),void 0===e$.items&&e9()},e7=()=>{let{mergedColumn:eI,mergedItems:eR,rows:eL,vertical:ez,sizeConfig:eW,tableKey:eH}=(0,t._$vaporWithHookId)("useSetup:0:0:dup1",()=>(0,t.useSetup)(()=>{let eI=gr(e$.column,eJ.value),eR=xr(e$.items??e0.value,e3.get(),eJ.value),eL=Sr(eR,eI),ez=(void 0===e$.layout?"horizontal":e$.layout)==="vertical";return{mergedColumn:eI,mergedItems:eR,rows:eL,vertical:ez,sizeConfig:Cr(e$.size),tableKey:`${ez?"vertical":"horizontal"}:${void 0!==e$.bordered&&e$.bordered?"bordered":"plain"}:${eI}:${eL.length}`}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("table",eI);(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"key",String(eH))}),(0,t._$setClassName)(eR,"w-full table-fixed border-separate border-spacing-0");let eF=(0,t._$createElement)("tbody",eR);(0,t._$appendChild)(eR,eF);let eP=(0,t._$createComment)("rue:list:start"),eB=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eF,eP),(0,t._$appendChild)(eF,eB);let eK=new Map;return(0,t.watchEffect)(()=>{eK=(0,t._$vaporKeyedList)({items:eL||[],getKey:(e$,eI)=>`group-${eI}`,elements:eK,parent:eF,before:eB,start:eP,renderItem:(eI,eR,eH,eF,eP)=>{let eB,eK;(0,t.renderBetween)((eB=eP===eL.length-1,eK=or("align-top",e$.classNames?.row),ez?i(e.Fragment,{children:[r("tr",{"data-rue-descriptions-row":String(eP),"data-rue-descriptions-row-type":"vertical-label",className:eK,style:e$.styles?.row,children:eI.map((eR,eL)=>{let ez=eL===eI.length-1,eH=wr(eR,!1,eW,e$.classNames,e$.styles,e$.labelStyle,e$.contentStyle);return r("th",{colSpan:eR.span,"data-rue-descriptions-item":eR.keyText,"data-rue-descriptions-part":"label",className:or("text-left align-top",void 0!==e$.bordered&&e$.bordered?"bg-base-200/52":"bg-transparent",eW.verticalLabelPaddingClassName,void 0!==e$.bordered&&e$.bordered&&!ez&&"border-r border-base-300/65",void 0!==e$.bordered&&e$.bordered&&"border-b border-base-300/55",e$.classNames?.item,eR.classNames?.item,eR.className),style:sr(e$.styles?.item,eR.styles?.item,eR.style),children:eH.labelNode},`label-${eR.keyText}`)})}),r("tr",{"data-rue-descriptions-row":String(eP),"data-rue-descriptions-row-type":"vertical-content",className:eK,style:e$.styles?.row,children:eI.map((eR,eL)=>{let ez=eL===eI.length-1,eH=wr(eR,!1,eW,e$.classNames,e$.styles,e$.labelStyle,e$.contentStyle);return r("td",{colSpan:eR.span,"data-rue-descriptions-item":eR.keyText,"data-rue-descriptions-part":"content",className:or("align-middle",eW.verticalContentPaddingClassName,!eB&&"border-b border-base-300/45",!(void 0!==e$.bordered&&e$.bordered)&&eI.length>0&&"border-b border-base-300/42",void 0!==e$.bordered&&e$.bordered&&!ez&&"border-r border-base-300/65",e$.classNames?.item,eR.classNames?.item,eR.className),style:sr(e$.styles?.item,eR.styles?.item,eR.style),children:eH.contentNode},`content-${eR.keyText}`)})})]},`group-${eP}`):r("tr",{"data-rue-descriptions-row":String(eP),"data-rue-descriptions-row-type":"horizontal",className:eK,style:e$.styles?.row,children:eI.map((eR,eL)=>{let ez=eL===eI.length-1,eH=wr(eR,void 0===e$.colon||e$.colon,eW,e$.classNames,e$.styles,e$.labelStyle,e$.contentStyle);return void 0!==e$.bordered&&e$.bordered?i(e.Fragment,{children:[r("th",{colSpan:1,"data-rue-descriptions-item":eR.keyText,"data-rue-descriptions-part":"label",className:or("bg-base-200/52 text-left align-top",eW.cellPaddingClassName,"border-r border-base-300/65",!eB&&"border-b border-base-300/55",e$.classNames?.item,eR.classNames?.item,eR.className),style:sr(e$.styles?.item,eR.styles?.item,eR.style),children:eH.labelNode}),r("td",{colSpan:Math.max(1,2*eR.span-1),"data-rue-descriptions-item":eR.keyText,"data-rue-descriptions-part":"content",className:or("align-top",eW.cellPaddingClassName,!eB&&"border-b border-base-300/55",!ez&&"border-r border-base-300/65",e$.classNames?.item,eR.classNames?.item,eR.className),style:sr(e$.styles?.item,eR.styles?.item,eR.style),children:eH.contentNode})]},`item-${eR.keyText}`):r(e.Fragment,{children:r("td",{colSpan:eR.span,"data-rue-descriptions-item":eR.keyText,"data-rue-descriptions-part":"item",className:or("align-top",eW.cellPaddingClassName,!eB&&"border-b border-base-300/42",e$.classNames?.item,eR.classNames?.item,eR.className),style:sr(e$.styles?.item,eR.styles?.item,eR.style),children:i("div",{className:or("flex min-w-0 flex-col sm:flex-row sm:items-start",eW.inlineLayoutClassName),children:[eH.labelNode,eH.contentNode]})})},`item-${eR.keyText}`)})},`group-${eP}`)),eR,eH,eF)}})}),eR})},e9=()=>{e5.current&&((0,e.render)(null,e5.current),(0,e.render)(e7(),e5.current))};return(0,t.onMounted)(()=>{eQ.value=mr(()=>{eJ.value=fr(),e9()}),void 0===e$.items&&"function"==typeof MutationObserver&&e1.current&&(e2.current=new MutationObserver(()=>{e6()}),e2.current.observe(e1.current,{childList:!0,subtree:!0,characterData:!0})),void 0===e$.items&&e6(),e9()}),(0,t.onUnmounted)(()=>{eQ.value?.(),eQ.value=null,e2.current?.disconnect(),e2.current=void 0,e5.current&&((0,e.render)(null,e5.current),e5.current=null)}),(0,t._$vaporWithHookId)("watch:1:11",()=>(0,t.watch)(()=>void 0===e$.items,e$=>{e$?e6():(e0.value=[],e9())},{immediate:!0})),{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,rest:eY,slotSource:eX,viewportWidth:eJ,unsubscribeRef:eQ,collectedItemsRef:e0,collectorRef:e1,collectorObserverRef:e2,tableHostRef:e5,rawChildren:e3,headerSizeConfig:e4,scheduleCollectedItemsSync:e6,syncCollectedItems:e8,renderTableView:e7,syncTableView:e9,applyTableHostRef:e$=>{e5.current=e$,e$&&e9()}}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI);(0,t._$setAttribute)(eR,"data-rue-descriptions","true"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(or("rue-descriptions text-base-content",e$.classNames?.root,e$.className)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,sr(e$.styles?.root,e$.style))});let eL=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=null!=e$.title||null!=e$.extra?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(or("mb-4 flex flex-wrap items-start justify-between gap-3",e$.classNames?.header)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.header;(0,t._$setStyle)(eR,eI)});let eL=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=null==e$.title?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)();return(0,t._$appendChild)(e$,(0,t._$createElement)("div",e$)),e$}):(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(or("font-semibold tracking-[0.01em] text-base-content",e4.get().titleClassName,e$.classNames?.title)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.title;(0,t._$setStyle)(eR,eI)});let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.title;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),(0,t._$appendChild)(eR,(0,t._$createTextNode)(" "));let ez=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,ez),(0,t.watchEffect)(()=>{let eI=null==e$.extra?"":(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(or("shrink-0 text-sm text-base-content/70",e$.classNames?.extra)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.extra;(0,t._$setStyle)(eR,eI)});let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.extra;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,ez))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))});let ez=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,ez),(0,t.watchEffect)(()=>{(0,t._$setClassName)(ez,String(or("rue-descriptions-body overflow-x-auto",void 0!==e$.bordered&&e$.bordered?"border border-base-300/75 bg-base-100 shadow-[0_20px_60px_-46px_rgba(15,23,42,0.35)]":"bg-transparent",e$.classNames?.body)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.body;(0,t._$setStyle)(ez,eI)});let eW=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,eW);let eH=(0,t._$vaporBindUseRef)(eW,()=>t$);(0,t.onBeforeUnmount)(()=>{eH()});let eF=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eF),(0,t.watchEffect)(()=>{let eI=void 0===e$.items?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("div",e$);(0,t._$appendChild)(e$,eI);let eR=(0,t._$vaporBindUseRef)(eI,()=>e1);(0,t.onBeforeUnmount)(()=>{eR()}),(0,t._$setClassName)(eI,"hidden"),(0,t._$setAttribute)(eI,"aria-hidden","true");let eL=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eI,eL),(0,t.watchEffect)(()=>{let e$=(0,t._$createComponent)(e.Slot,{source:eX.get()});(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eL))}),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eF))}),eR})};ar[Xn]=ar;var Dr=Object.assign(Er,{Item:ar}),Or={small:"8px",middle:"16px",medium:"16px",large:"24px"},kr=(e$,eI)=>eI?`${e$} ${eI}`:e$,Ar=e$=>Array.isArray(e$)?e$.flatMap(e$=>Ar(e$)):null==e$?[]:[e$],jr=(e$,eI)=>e$||(eI?"vertical":"horizontal"),Mr=e$=>{if(void 0!==e$)return!0===e$?"wrap":!1===e$?"nowrap":e$},Nr=e$=>{if(null!=e$&&""!==e$)return"number"==typeof e$?`${e$}px`:e$ in Or?Or[e$]:e$},Pr=e$=>{switch(e$){case"start":return"flex-start";case"end":return"flex-end";case"between":return"space-between";case"around":return"space-around";case"evenly":return"space-evenly";default:return e$}},Fr=(e$,eI)=>{if(void 0===e$)return"vertical"===eI?"stretch":"flex-start";switch(e$){case"start":case"top":return"flex-start";case"end":case"bottom":return"flex-end";case"middle":return"center";default:return e$}},Ir=({as:e$,component:eI,vertical:eR,orientation:eL,inline:ez,wrap:eW,justify:eH,align:eF,flex:eP,gap:eB,className:eK,style:eV,children:eq,...eU})=>{let eG=jr(eL,eR),eZ=Mr(eW),eY=Nr(eB),eX=Ar(eq),eJ={...eV,display:ez?"inline-flex":"flex",flexDirection:"vertical"===eG?"column":"row",alignItems:Fr(eF,eG)};return void 0!==eZ&&(eJ.flexWrap=eZ),void 0!==eH&&(eJ.justifyContent=Pr(eH)),null!=eP&&(eJ.flex=eP),void 0!==eY&&(eJ.gap=eY),(0,e.h)(eI??e$??"div",{...eU,className:kr("rue-flex",eK),style:eJ,"data-rue-orientation":eG},...eX)},Lr=(...e$)=>e$.filter(Boolean).join(" "),Rr=e$=>null!=e$&&(!Array.isArray(e$)||e$.some(e$=>Rr(e$))),zr=({as:e$="h6",className:eI,children:eR,content:eL,...ez})=>r(e$,{...ez,className:Lr("footer-title",eI),children:eL??eR}),Br=({as:e$,className:eI,children:eR,content:eL,href:ez,target:eW,rel:eH,hover:eF=!0,...eP})=>{let eB=e$??(ez?"a":"button");return"a"===eB?r("a",{...eP,href:ez,target:eW,rel:"_blank"!==eW||eH?eH:"noreferrer",className:Lr("link",eF&&"link-hover",eI),children:eL??eR}):"button"===eB?r("button",{...eP,type:eP.type??"button",className:Lr("link",eF&&"link-hover",eI),children:eL??eR}):r(eB,{...eP,className:Lr("link",eF&&"link-hover",eI),children:eL??eR})},Vr=e$=>!(!e$||"object"!=typeof e$||Array.isArray(e$))&&("label"in e$||"content"in e$||"children"in e$||"href"in e$||"target"in e$||"rel"in e$||"as"in e$||"className"in e$||"hover"in e$),Hr=(e$,eI)=>{if(!Rr(e$))return null;if(Vr(e$)){let{key:eR,label:eL,content:ez,children:eW,...eH}=e$;return r(Br,{...eH,children:ez??eW??eL},eR??`item-${eI}`)}return r(Br,{children:e$},`item-${eI}`)},Ur=({as:e$="aside",className:eI,children:eR,content:eL,...ez})=>r(e$,{...ez,className:eI,children:eL??eR}),Wr=({as:e$="nav",className:eI,children:eR,title:eL,titleClassName:ez,content:eW,items:eH,inline:eF,contentClassName:eP,...eB})=>{let eK=(eH??[]).map((e$,eI)=>Hr(e$,eI)).filter(Boolean),eV=Rr(eW)||Rr(eR)?eW??eR:eF?r("div",{className:Lr("grid grid-flow-col auto-cols-max gap-4",eP),children:eK}):eK;return i(e$,{...eB,className:eI,children:[Rr(eL)?r(zr,{className:ez,children:eL}):null,eV]})},Gr=Object.assign(({as:e$="footer",direction:eI,center:eR,className:eL,children:ez,brand:eW,sections:eH,wrap:eF,bordered:eP,...eB})=>{let eK=Rr(ez),eV=Rr(eW)||(eH?.length??0)>0;return r(e$,{...eB,className:Lr("footer",eI&&`footer-${eI}`,eR&&"footer-center",eF&&"gap-y-6",eP&&"border-t border-base-300",eL),children:eK||!eV?ez:i(e.Fragment,{children:[Rr(eW)?r(Ur,{children:eW}):null,(eH??[]).map((e$,eI)=>{let{key:eR,...eL}=e$;return r(Wr,{...eL},eR??`section-${eI}`)})]})})},{Brand:Ur,Section:Wr,Title:zr,Link:Br}),Kr="__rueFormContext",qr=0,Jr={required:"${label} 为必填项",whitespace:"${label} 不能只包含空白字符",pattern:"${label} 格式不正确",types:{string:"${label} 不是合法文本",number:"${label} 不是合法数字",boolean:"${label} 不是合法布尔值",array:"${label} 不是合法数组",email:"${label} 不是合法邮箱",url:"${label} 不是合法链接"},string:{len:"${label} 需为 ${len} 个字符",min:"${label} 至少 ${min} 个字符",max:"${label} 最多 ${max} 个字符"},number:{len:"${label} 需等于 ${len}",min:"${label} 不能小于 ${min}",max:"${label} 不能大于 ${max}"},array:{len:"${label} 需包含 ${len} 项",min:"${label} 至少包含 ${min} 项",max:"${label} 最多包含 ${max} 项"}},Yr=(...e$)=>e$.filter(Boolean).join(" "),Xr=e$=>!!e$&&"object"==typeof e$,Zr=e$=>{if(Array.isArray(e$))return e$.map(e$=>Zr(e$));if(Xr(e$)){let eI={};return Object.keys(e$).forEach(eR=>{eI[eR]=Zr(e$[eR])}),eI}return e$},Qr=e$=>null==e$?[]:Array.isArray(e$)?[...e$]:[e$],$r=e$=>e$.map(e$=>`${typeof e$}:${String(e$)}`).join("__rue_form_path__"),ei=(e$,eI)=>e$.length===eI.length&&e$.every((e$,eR)=>e$===eI[eR]),ti=(e$,eI)=>eI.reduce((e$,eI)=>{if(null!=e$)return e$[eI]},e$),ni=(e$,eI)=>{if(0===eI.length)return void 0!==e$;let eR=e$;for(let e$ of eI){if(null==eR||!(e$ in Object(eR)))return!1;eR=eR[e$]}return!0},ri=(e$,eI,eR)=>{if(0===eI.length)return Zr(eR);let[eL,...ez]=eI,eW=e$??("number"==typeof eL?[]:{}),eH=Array.isArray(eW)?[...eW]:{...eW};return eH[eL]=0===ez.length?Zr(eR):ri(eH[eL],ez,eR),eH},ii=(e$,eI)=>{if(0===eI.length)return;if(!Xr(e$)&&!Array.isArray(e$))return e$;let[eR,...eL]=eI,ez=Array.isArray(e$)?[...e$]:{...e$};return 0===eL.length?Array.isArray(ez)&&"number"==typeof eR?ez.splice(eR,1):delete ez[eR]:ez[eR]=ii(ez[eR],eL),ez},ai=(e$,eI)=>{if(!Xr(eI)&&!Array.isArray(eI))return Zr(eI);if(Array.isArray(eI))return eI.map(e$=>Zr(e$));let eR=Xr(e$)?{...e$}:{};return Object.keys(eI).forEach(e$=>{eR[e$]=ai(eR[e$],eI[e$])}),eR},oi=(e$,eI)=>ri({},e$,eI),si=e$=>e$?Array.isArray(e$)?e$:[e$]:["onChange"],ci=(e$,eI)=>"number"===eI?"number":Array.isArray(e$)?"array":"number"==typeof e$?"number":"string",li=(e$,eI)=>{let eR=ci(e$,eI);return"array"===eR?Array.isArray(e$)?e$.length:0:"number"===eR?Number(e$):null==e$?0:String(e$).length},ui=(e$,eI)=>null==e$||("array"===eI?!Array.isArray(e$)||0===e$.length:"string"==typeof e$?""===e$:!!Array.isArray(e$)&&0===e$.length),di=e$=>{try{return new URL(e$),!0}catch{return!1}},fi=(e$,eI)=>{if(!eI)return!0;switch(eI){case"string":return"string"==typeof e$;case"number":return"number"==typeof e$&&!Number.isNaN(e$);case"boolean":return"boolean"==typeof e$;case"array":return Array.isArray(e$);case"email":return"string"==typeof e$&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e$);case"url":return"string"==typeof e$&&di(e$);default:return!0}},pi=(e$,eI,eR,eL,ez)=>{if(e$.message)return e$.message;if("required"===ez)return eL.required??Jr.required??"${label} 为必填项";if("whitespace"===ez)return eL.whitespace??Jr.whitespace??"${label} 不能为空";if("pattern"===ez)return eL.pattern??Jr.pattern??"${label} 格式不正确";if("type"===ez)return eL.types?.[e$.type??"string"]??Jr.types?.[e$.type??"string"]??"${label} 类型不正确";let eW=ci(eI,e$.type);return(eL[eW]??Jr[eW]??{})[ez??"len"]??"${label} 校验失败"},mi=(e$,eI)=>e$.replace(/\$\{(.*?)\}/g,(e$,eR)=>{let eL=String(eR).trim();return null==eI[eL]?"":String(eI[eL])}),hi=(e$,eI)=>{if("string"==typeof e$||"number"==typeof e$)return String(e$);let eR=eI[eI.length-1];return null==eR?"字段":String(eR)},gi=(e$,eI)=>void 0===e$?!!eI?.some(e$=>e$.required&&!e$.warningOnly):e$,_i=async(e$,eI,eR,eL,ez,eW,eH)=>{let eF=[],eP=[],eB=hi(eW?.label??ez,e$);for(let e$ of eR){let eR="function"==typeof e$.transform?e$.transform(eI):eI,ez=null;if(e$.required&&ui(eR,e$.type)?ez=pi(e$,eR,eB,eH,"required"):e$.whitespace&&"string"==typeof eR&&""===eR.trim()?ez=pi(e$,eR,eB,eH,"whitespace"):ui(eR,e$.type)||!e$.type||fi(eR,e$.type)?ui(eR,e$.type)||!e$.pattern||e$.pattern.test(String(eR))?ui(eR,e$.type)||void 0===e$.len?ui(eR,e$.type)||void 0===e$.min?!ui(eR,e$.type)&&void 0!==e$.max&&li(eR,e$.type)>e$.max&&(ez=pi(e$,eR,eB,eH,"max")):li(eR,e$.type)<e$.min&&(ez=pi(e$,eR,eB,eH,"min")):li(eR,e$.type)!==e$.len&&(ez=pi(e$,eR,eB,eH,"len")):ez=pi(e$,eR,eB,eH,"pattern"):ez=pi(e$,eR,eB,eH,"type"),!ez&&"function"==typeof e$.validator)try{let eI=await e$.validator(e$,eR,eL);"string"==typeof eI&&eI.trim()&&(ez=eI)}catch(e$){ez=e$ instanceof Error?e$.message:String(e$)}if(!ez)continue;let eK=mi(ez,{label:eB,name:eB,min:e$.min,max:e$.max,len:e$.len,...eW});e$.warningOnly?eP.push(eK):eF.push(eK)}return{errors:eF,warnings:eP}},vi=(e$,...eI)=>{let[eR,eL]=eI;if("checked"===e$)return Xr(eL)&&"boolean"==typeof eL.checked?eL.checked:Xr(eR)&&Xr(eR.target)&&"boolean"==typeof eR.target.checked?eR.target.checked:"boolean"==typeof eR?eR:!!eR;if(eI.length>1&&void 0!==eR&&!(Xr(eR)&&"target"in eR))return eR;if(Xr(eR)&&Xr(eR.target)){let eI=eR.target;if(e$ in eI)return eI[e$];if("value"in eI)return eI.value}return eR},yi=e$=>e$?"error"===e$?(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("span",e$);return(0,t._$setClassName)(eI,"text-error"),(0,t._$appendChild)(eI,(0,t._$createTextNode)("!")),eI}):"warning"===e$?(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("span",e$);return(0,t._$setClassName)(eI,"text-warning"),(0,t._$appendChild)(eI,(0,t._$createTextNode)("!")),eI}):"success"===e$?(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("span",e$);return(0,t._$setClassName)(eI,"text-success"),(0,t._$appendChild)(eI,(0,t._$createTextNode)("✓")),eI}):(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("span",e$);return(0,t._$setClassName)(eI,"loading loading-spinner loading-xs text-primary"),eI}):null,bi=e$=>{if(e$?.span)return`${e$.span/24*100}%`},xi=(e$,eI)=>void 0===e$.getPreserve()?!1!==eI:!1!==e$.getPreserve(),Si=()=>{let e$=(0,t._$vaporWithHookId)("ref:1:0",()=>(0,t.ref)(0)),eI=new Map,eR=new Map,eL=new Set,ez=!1,eW={},eH={},eF=!1,eP=null,eB={validateTrigger:["onChange"],validateMessages:Jr},eK=()=>{e$.value+=1,eL.forEach(e$=>e$())},eV=()=>{ez||(ez=!0,queueMicrotask(()=>{ez=!1,eK()}))},eq=e$=>{let eI=$r(e$),eL=eR.get(eI);if(eL)return eL;let ez={touched:!1,validating:!1,errors:[],warnings:[]};return eR.set(eI,ez),ez},eU=e$=>{let eI;eB.onFieldsChange?.([(eI=eq(e$),{name:[...e$],errors:[...eI.errors],warnings:[...eI.warnings],touched:eI.touched,validating:eI.validating,value:Zr(ti(eW,e$))})],e1.getFieldsValue(!0))},eG=(e$,eI,eR=!0)=>{Object.assign(eq(e$),eI),eR&&(eU(e$),eK(),eV())},eZ=e$=>{for(let eR of eI.values()){let eI=eR.getNamePath();if(eI&&ei(eI,e$))return eR}return null},eY=async(e$,eI)=>{let eR=e$.getNamePath();if(!eR||0===eR.length)return null;let eL=e$.getValidateTrigger();if(eI&&eL.length>0&&!eL.includes(eI))return null;let ez=e$.getRules();if(!ez.length)return eG(eR,{errors:[],warnings:[],validating:!1}),null;eG(eR,{validating:!0});let eH=await _i(eR,ti(eW,eR),ez,eW,e$.getLabel(),e$.getMessageVariables(),eB.validateMessages);return eG(eR,{validating:!1,errors:eH.errors,warnings:eH.warnings}),eH.errors.length||eH.warnings.length?{name:[...eR],errors:[...eH.errors],warnings:[...eH.warnings]}:null},eX=async e$=>{for(let eR of Array.from(eI.values())){let eI=eR.getNamePath();!eI||ei(eI,e$)||eR.getDependencies().some(eI=>ei(eI,e$))&&await eY(eR)}},eJ=async(e$,eI,eR)=>{eW=ri(eW,e$,eI),eR?.touch&&(eq(e$).touched=!0),eK(),eU(e$),eR?.emitValues!==!1&&eB.onValuesChange?.(oi(e$,eI),e1.getFieldsValue(!0));let eL=eZ(e$);eL&&await eY(eL,eR?.triggerName),await eX(e$),eV()},eQ=async e$=>{let eR=e$?.map(e$=>Qr(e$)),eL=[];for(let e$ of Array.from(eI.values())){let eI=e$.getNamePath();if(!eI||!eI.length||eR&&!eR.some(e$=>ei(eI,e$)))continue;let ez=await eY(e$);ez&&ez.errors.length>0&&eL.push(ez)}if(eL.length>0)throw{values:e1.getFieldsValue(!0),errorFields:eL,outOfDate:!1};return e1.getFieldsValue(!0)},e0=(e$,eI)=>{let eR=Qr(e$),eL=[eB.name?.trim(),...eR].filter(Boolean).join("__"),ez=eP?.querySelector(`#${CSS.escape(eL)}`);ez&&(ez.scrollIntoView(eI),eI?.focus&&"focus"in ez&&"function"==typeof ez.focus&&ez.focus())},e1={getFieldValue:eI=>(e$.value,Zr(ti(eW,Qr(eI)))),getFieldsValue:eI=>(e$.value,!0===eI||null==eI?Zr(eW):eI.reduce((e$,eI)=>{let eR=Qr(eI);return ri(e$,eR,ti(eW,eR))},{})),setFieldValue(e$,eI){eJ(Qr(e$),eI,{emitValues:!1})},setFieldsValue(e$){eW=ai(eW,e$),eK()},resetFields(e$){if(!e$?.length){eW=Zr(eH),eR.forEach(e$=>{e$.touched=!1,e$.validating=!1,e$.errors=[],e$.warnings=[]}),eK();return}e$.forEach(e$=>{let eI=Qr(e$),eR=ti(eH,eI);eW=void 0===eR?ii(eW,eI):ri(eW,eI,eR);let eL=eq(eI);eL.touched=!1,eL.validating=!1,eL.errors=[],eL.warnings=[]}),eK()},validateFields:eQ,submit(){eQ().then(e$=>{eB.onFinish?.(e$)}).catch(e$=>{if(eB.onFinishFailed?.(e$),eB.scrollToFirstError&&e$.errorFields[0]){let eI=!0===eB.scrollToFirstError?{block:"center"}:eB.scrollToFirstError;e0(e$.errorFields[0].name,eI)}})},scrollToField:e0,isFieldTouched:e$=>eq(Qr(e$)).touched,getFieldError:e$=>[...eq(Qr(e$)).errors],getFieldsError:e$=>e$?.length?e$.map(e$=>{let eI=Qr(e$),eR=eq(eI);return{name:[...eI],errors:[...eR.errors],warnings:[...eR.warnings]}}):Array.from(eI.values()).map(e$=>e$.getNamePath()).filter(e$=>!!e$&&e$.length>0).map(e$=>{let eI=eq(e$);return{name:[...e$],errors:[...eI.errors],warnings:[...eI.warnings]}}),__INTERNAL__:{version:e$,setRuntimeOptions(e$){eB=e$},ensureInitialized:e$=>!eF&&(eH=Zr(e$??{}),eW=Zr(e$??{}),eF=!0,!0),registerField:e$=>{eI.set(e$.id,e$);let eL=e$.getNamePath();if(eL&&eL.length){let eI=e$.getInitialValue();ni(eH,eL)||void 0===eI||(eH=ri(eH,eL,eI)),ni(eW,eL)||void 0===eI||(eW=ri(eW,eL,eI)),eq(eL)}return()=>{eI.delete(e$.id);let eL=e$.getNamePath();!eL||!eL.length||xi(e$,eB.preserve)||(eW=ii(eW,eL),eR.delete($r(eL)),eK())}},getMeta:eq,validateFieldByPath(e$,eI){let eR=eZ(e$);return eR?eY(eR,eI):Promise.resolve(null)},updateValueFromControl:(e$,eI,eR)=>eJ(e$,eI,{touch:eR.touch,triggerName:eR.triggerName}),updateListValue:(e$,eI)=>eJ(e$,eI,{touch:!0,emitValues:!1}),getDefaultValidateTrigger:()=>eB.validateTrigger,setRootElement(e$){eP=e$},subscribe:e$=>(eL.add(e$),()=>{eL.delete(e$)}),emitUpdate(){eK()}}};return e1},Ci=(e$,eI,eR)=>"function"==typeof eR?eR(e$,{required:eI}):"optional"!==eR||eI?!1!==eR&&eI?(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("span",e$);return(0,t._$setClassName)(eI,"ml-1 text-error"),(0,t._$setAttribute)(eI,"aria-hidden","true"),(0,t._$appendChild)(eI,(0,t._$createTextNode)("*")),eI}):null:(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("span",e$);return(0,t._$setClassName)(eI,"ml-2 text-xs text-base-content/45"),(0,t._$setAttribute)(eI,"aria-hidden","true"),(0,t._$appendChild)(eI,(0,t._$createTextNode)("optional")),eI}),wi=Object.assign(e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,rest:eQ,slotSource:e0,internalFormRef:e1,rootElementRef:e2,nativeSubmitHandlerRef:e5,subscriptionFormRef:e3,unsubscribeRenderRef:e4,renderVersion:e6,setRenderVersion:e8,resolvedForm:e7,initializedNow:e9,resolveContent:t$,content:tI}=(0,t._$vaporWithHookId)("useSetup:0:0:dup2",()=>(0,t.useSetup)(()=>{let{className:eI,style:eR,children:eL,render:ez,component:eW,layout:eH,initialValues:eF,form:eP,name:eB,preserve:eK,validateMessages:eV,validateTrigger:eq,scrollToFirstError:eU,onValuesChange:eG,onFieldsChange:eZ,onFinish:eY,onFinishFailed:eX,onSubmit:eJ,...eQ}=e$,e0=(0,t._$vaporWithHookId)("computed:1:39",()=>(0,t.computed)(()=>(0,t.getCurrentInstance)()?.propsRO??{children:e$.children})),e1=(0,t._$vaporWithHookId)("useRef:1:40",()=>(0,t.useRef)()),e2=(0,t._$vaporWithHookId)("useRef:1:41",()=>(0,t.useRef)(null)),e5=(0,t._$vaporWithHookId)("useRef:1:42",()=>(0,t.useRef)()),e3=(0,t._$vaporWithHookId)("useRef:1:43",()=>(0,t.useRef)(void 0)),e4=(0,t._$vaporWithHookId)("useRef:1:44",()=>(0,t.useRef)(null)),[e6,e8]=(0,t._$vaporWithHookId)("useState:1:45",()=>(0,t.useState)(0,{kind:"ref"}));e1.current||(e1.current=e$.form??Si());let e7=(0,t._$vaporWithHookId)("computed:1:46",()=>(0,t.computed)(()=>e$.form??e1.current)),e9=(0,t._$vaporWithHookId)("computed:1:47",()=>(0,t.computed)(()=>e7.get().__INTERNAL__.ensureInitialized(e$.initialValues)));e7.get().__INTERNAL__.setRuntimeOptions({name:e$.name,preserve:e$.preserve,validateTrigger:si(e$.validateTrigger),validateMessages:{...Jr,...e$.validateMessages},scrollToFirstError:e$.scrollToFirstError,onValuesChange:e$.onValuesChange,onFieldsChange:e$.onFieldsChange,onFinish:e$.onFinish,onFinishFailed:e$.onFinishFailed}),e3.current!==e7.get()&&(e4.current?.(),e3.current=e7.get(),e4.current=e7.get().__INTERNAL__.subscribe(()=>{e8(e6.value+1)})),e5.current=eI=>{eI.preventDefault(),e$.onSubmit?.(eI),e7.get().submit()},(0,t.onMounted)(()=>{e9.get()&&e7.get().__INTERNAL__.emitUpdate()}),(0,t.onCleanup)(()=>{e4.current?.(),e4.current=null,e3.current=void 0,e2.current&&e5.current&&e2.current.removeEventListener("submit",e5.current)});let t$=()=>"function"==typeof e$.render?r(e.Fragment,{children:e$.render(e7.get())}):"function"==typeof e$.children&&"block-factory"!==e$.children.kind?r(e.Fragment,{children:e$.children(e7.get())}):r(e.Slot,{source:e0.get()});return{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,rest:eQ,slotSource:e0,internalFormRef:e1,rootElementRef:e2,nativeSubmitHandlerRef:e5,subscriptionFormRef:e3,unsubscribeRenderRef:e4,renderVersion:e6,setRenderVersion:e8,resolvedForm:e7,initializedNow:e9,resolveContent:t$,content:t$()}}));if((void 0===e$.component?"form":e$.component)===!1)return tI;let tR={...eQ,ref:eI=>{e2.current&&e5.current&&e2.current.removeEventListener("submit",e5.current),e2.current=eI,e7.get().__INTERNAL__.setRootElement(eI),(void 0===e$.component?"form":e$.component)==="form"&&eI&&e5.current&&eI.addEventListener("submit",e5.current)},className:Yr("rue-form",(void 0===e$.layout?"horizontal":e$.layout)==="inline"?"flex flex-wrap items-start gap-5":"grid gap-6",e$.className),style:e$.style,"data-rue-form":"true"};if((void 0===e$.component?"form":e$.component)==="form")return(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("form",e$),eR=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let e$=(e6.value,t$());(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eR))}),eI});if((void 0===e$.component?"form":e$.component)==="div")return(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("div",e$),eR=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let e$=(e6.value,t$());(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eR))}),eI});if((void 0===e$.component?"form":e$.component)==="section")return(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("section",e$),eR=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let e$=(e6.value,t$());(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eR))}),eI});if("string"==typeof(void 0===e$.component?"form":e$.component))return(0,e.h)(void 0===e$.component?"form":e$.component,tR,(e6.value,t$()));let tL=void 0===e$.component?"form":e$.component;return(0,t.vapor)(e$=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let e$=(0,t._$createComponent)(tL,{...tR,children:(e6.value,t$())});(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eR))}),eI})},{Item:e$=>{let{slotSource:eI,formInstance:eR,entityIdRef:eL,unregisterRef:ez,subscriptionFormRef:eW,unsubscribeRenderRef:eH,renderVersion:eF,setRenderVersion:eP,renderCacheRef:eB,previousValuesRef:eK,lastRegisteredKeyRef:eV,latestPropsRef:eq,noStyleHostRef:eU,controlHostRef:eG,helpHostRef:eZ,feedbackHostRef:eY,namePath:eX,nameKey:eJ,layout:eQ,required:e0,labelAlign:e1,labelWrap:e2,labelCol:e5,wrapperCol:e3,controlId:e4,getRenderState:e6,renderManagedContent:e8,assignControlHost:e7}=(0,t._$vaporWithHookId)("useSetup:0:0:dup1",()=>(0,t.useSetup)(()=>{let eI=(0,t._$vaporWithHookId)("computed:1:2",()=>(0,t.computed)(()=>(0,t.getCurrentInstance)()?.propsRO??{children:e$.children})),eR=(0,t._$vaporWithHookId)("computed:1:3",()=>(0,t.computed)(()=>e$.form)),eL=(0,t._$vaporWithHookId)("useRef:1:4",()=>(0,t.useRef)()),ez=(0,t._$vaporWithHookId)("useRef:1:5",()=>(0,t.useRef)(null)),eW=(0,t._$vaporWithHookId)("useRef:1:6",()=>(0,t.useRef)(void 0)),eH=(0,t._$vaporWithHookId)("useRef:1:7",()=>(0,t.useRef)(null)),[eF,eP]=(0,t._$vaporWithHookId)("useState:1:8",()=>(0,t.useState)(0,{kind:"ref"})),eB=(0,t._$vaporWithHookId)("useRef:1:9",()=>(0,t.useRef)()),eK=(0,t._$vaporWithHookId)("useRef:1:10",()=>(0,t.useRef)()),eV=(0,t._$vaporWithHookId)("useRef:1:11",()=>(0,t.useRef)()),eq=(0,t._$vaporWithHookId)("useRef:1:12",()=>(0,t.useRef)(e$)),eU=(0,t._$vaporWithHookId)("useRef:1:13",()=>(0,t.useRef)(null)),eG=(0,t._$vaporWithHookId)("useRef:1:14",()=>(0,t.useRef)(null)),eZ=(0,t._$vaporWithHookId)("useRef:1:15",()=>(0,t.useRef)(null)),eY=(0,t._$vaporWithHookId)("useRef:1:16",()=>(0,t.useRef)(null));if(eq.current=e$,eL.current||(eL.current=`rue-form-item-${qr++}`),null!=e$.name&&!eR.get())throw Error("Form.Item 绑定字段时需要显式传入 form");let eX=(0,t._$vaporWithHookId)("computed:1:17",()=>(0,t.computed)(()=>null==e$.name?void 0:Qr(e$.name))),eJ=(0,t._$vaporWithHookId)("computed:1:18",()=>(0,t.computed)(()=>eX.get()?$r(eX.get()):void 0)),eQ=(0,t._$vaporWithHookId)("computed:1:19",()=>(0,t.computed)(()=>e$.layout??"horizontal")),e0=(0,t._$vaporWithHookId)("computed:1:20",()=>(0,t.computed)(()=>gi(e$.required,e$.rules))),e1=(0,t._$vaporWithHookId)("computed:1:21",()=>(0,t.computed)(()=>e$.labelAlign??"right")),e2=(0,t._$vaporWithHookId)("computed:1:22",()=>(0,t.computed)(()=>e$.labelCol)),e5=(0,t._$vaporWithHookId)("computed:1:23",()=>(0,t.computed)(()=>e$.wrapperCol)),e3=(0,t._$vaporWithHookId)("computed:1:24",()=>(0,t.computed)(()=>e$.htmlFor??(eX.get()?eX.get().map(e$=>String(e$)).join("__"):void 0)));if(eX.get()&&eR.get()&&eV.current!==eJ.get()){let eI=eq.current??e$;ez.current?.(),ez.current=eR.get().__INTERNAL__.registerField({id:eL.current,kind:"item",getNamePath:()=>eX.get(),getRules:()=>eI.rules??[],getRequired:()=>eI.required,getLabel:()=>eI.label,getMessageVariables:()=>eI.messageVariables,getValidateTrigger:()=>si(eI.validateTrigger),getDependencies:()=>(eI.dependencies??[]).map(e$=>Qr(e$)),getInitialValue:()=>eI.initialValue,getPreserve:()=>eI.preserve}),eV.current=eJ.get()}let e4=()=>{let eI=eR.get()?.getFieldsValue(!0)??{},eL=eX.get()&&eR.get()?eR.get().__INTERNAL__.getMeta(eX.get()):null;return{allValues:eI,meta:eL,currentValue:eX.get()&&eR.get()?eR.get().getFieldValue(eX.get()):void 0,triggerName:e$.trigger??"onChange",validateTrigger:si(e$.validateTrigger),status:e$.validateStatus??(eL?.validating?"validating":eL?.errors.length?"error":eL?.warnings.length?"warning":eL?.touched&&(e$.rules?.length??0)>0?"success":void 0)}},e6=()=>{let{allValues:eL,meta:ez,currentValue:eW,triggerName:eH,validateTrigger:eF,status:eP}=e4(),eV=e$.render??e$.children,eq;if("function"==typeof eV&&"block-factory"!==eV.kind&&eX.get()&&eR.get()&&!e$.shouldUpdate){let eI={...e$.getValueProps?e$.getValueProps(eW):{[e$.valuePropName??"value"]:"checked"===e$.valuePropName?!!eW:eW},id:e3.get()};eI[eH]=(...eI)=>{let eL=e$.getValueFromEvent?e$.getValueFromEvent(...eI):vi(e$.valuePropName??"value",...eI),ez=e$.normalize?e$.normalize(eL,eW,eR.get().getFieldsValue(!0)):eL;eR.get().__INTERNAL__.updateValueFromControl(eX.get(),ez,{touch:!0,triggerName:eH})},eF.filter(e$=>e$!==eH).forEach(e$=>{eI[e$]=(...eI)=>{eR.get().__INTERNAL__.validateFieldByPath(eX.get(),e$)}}),eq=eV(eI,{value:eW,touched:ez?.touched??!1,validating:ez?.validating??!1,errors:ez?.errors??[],warnings:ez?.warnings??[],status:eP},eR.get())}else"function"==typeof eV&&"block-factory"!==eV.kind&&(!eX.get()||e$.shouldUpdate)?((("function"==typeof e$.shouldUpdate?e$.shouldUpdate(eK.current??eL,eL):!0===e$.shouldUpdate||void 0===eB.current)||void 0===eB.current)&&(eB.current=eV(eL,eR.get())),eK.current=Zr(eL),eq=eB.current):eq=r(e.Slot,{source:eI.get()});if(e$.noStyle){eU.current&&(0,e.render)(r(e.Fragment,{children:eq}),eU.current);return}eG.current&&(0,e.render)(r(e.Fragment,{children:eq}),eG.current),eZ.current&&(0,e.render)(void 0===e$.help?ez&&(ez.errors.length>0||ez.warnings.length>0)?i("ul",{className:"mt-2 grid gap-1 text-xs",children:[ez.errors.map((e$,eI)=>(0,t.vapor)(eR=>{let eL=(0,t._$createElement)("li",eR);(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"key",String(`error-${eI}`))}),(0,t._$setClassName)(eL,"text-error");let ez=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eL,ez))}),eL})),ez.warnings.map((e$,eI)=>(0,t.vapor)(eR=>{let eL=(0,t._$createElement)("li",eR);(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"key",String(`warning-${eI}`))}),(0,t._$setClassName)(eL,"text-warning");let ez=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eL,ez))}),eL}))]}):r(e.Fragment,{}):r(e.Fragment,{children:e$.help}),eZ.current),eY.current&&(0,e.render)(e$.hasFeedback?r(e.Fragment,{children:yi(eP)}):r(e.Fragment,{}),eY.current)};return eW.current!==eR.get()&&(eH.current?.(),eW.current=eR.get(),eH.current=eR.get()?eR.get().__INTERNAL__.subscribe(()=>{eP(eF.value+1)}):null),(0,t._$vaporWithHookId)("watch:1:25",()=>(0,t.watch)(()=>eF.value,()=>{e6()},{immediate:!0})),(0,t.onCleanup)(()=>{ez.current?.(),ez.current=null,eH.current?.(),eH.current=null,eW.current=void 0}),(0,t.onMounted)(()=>{e6()}),(0,t.onUpdated)(()=>{e6()}),{slotSource:eI,formInstance:eR,entityIdRef:eL,unregisterRef:ez,subscriptionFormRef:eW,unsubscribeRenderRef:eH,renderVersion:eF,setRenderVersion:eP,renderCacheRef:eB,previousValuesRef:eK,lastRegisteredKeyRef:eV,latestPropsRef:eq,noStyleHostRef:eU,controlHostRef:eG,helpHostRef:eZ,feedbackHostRef:eY,namePath:eX,nameKey:eJ,layout:eQ,required:e0,labelAlign:e1,labelWrap:!1,labelCol:e2,wrapperCol:e5,controlId:e3,getRenderState:e4,renderManagedContent:e6,assignControlHost:e$=>{eG.current=e$,e$&&queueMicrotask(()=>{e6()})}}}));if(e$.noStyle)return(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("div",e$),eR=(0,t._$vaporBindUseRef)(eI,()=>eU);return(0,t.onBeforeUnmount)(()=>{eR()}),(0,t._$setStyle)(eI,{display:"contents"}),eI});let e9=void 0===e$.label?null:i("label",{className:Yr("text-[0.95rem] leading-7 font-medium text-base-content/78","left"===e1.get()?"text-left":"text-right md:text-right",e2?"whitespace-normal":"md:whitespace-nowrap"),style:{width:"horizontal"===eQ.get()?bi(e5.get()):void 0},for:e4.get(),children:[r("span",{children:e$.label}),"horizontal"===eQ.get()&&!1!==e$.colon?r("span",{className:"ml-1 text-base-content/45",children:":"}):null,Ci(e$.label,e0.get(),!0)]}),t$="horizontal"===eQ.get()&&e3.get()?.offset?{marginLeft:`${e3.get().offset/24*100}%`,width:bi(e3.get())}:"horizontal"===eQ.get()?{width:bi(e3.get())}:void 0;return(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Yr("rue-form-item",e$.hidden?"hidden":void 0,"horizontal"===eQ.get()?"flex flex-col gap-3 md:flex-row md:items-start":"grid gap-3",e$.className)))}),(0,t.watchEffect)(()=>{let eI=e$.style;(0,t._$setStyle)(eR,eI)});let eL=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(e9,eR,eL))});let ez=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,ez),(0,t._$setClassName)(ez,"min-w-0 flex-1"),(0,t.watchEffect)(()=>{(0,t._$setStyle)(ez,t$)});let eW=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,eW),(0,t._$setClassName)(eW,"flex items-start gap-3");let eH=(0,t._$createElement)("div",eW);(0,t._$appendChild)(eW,eH),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eH,"key",String(eJ.get()??"__rue_form_item_control__"))}),(0,t._$setClassName)(eH,"min-w-0 flex-1");let eF=(0,t._$vaporBindUseRef)(eH,()=>e7);(0,t.onBeforeUnmount)(()=>{eF()});let eP=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eW,eP),(0,t.watchEffect)(()=>{let eI=e$.hasFeedback?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("span",e$);(0,t._$appendChild)(e$,eI),(0,t._$setClassName)(eI,"mt-3 shrink-0");let eR=(0,t._$vaporBindUseRef)(eI,()=>eY);return(0,t.onBeforeUnmount)(()=>{eR()}),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eW,eP))});let eB=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,eB),(0,t._$setClassName)(eB,"mt-3");let eK=(0,t._$vaporBindUseRef)(eB,()=>eZ);(0,t.onBeforeUnmount)(()=>{eK()});let eV=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(ez,eV),(0,t.watchEffect)(()=>{let eI=null==e$.extra?"":(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t._$setClassName)(eR,"mt-3 text-[0.8rem] leading-6 text-base-content/55");let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.extra;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,eV))}),eR})},List:e$=>{let{form:eI,name:eR,children:eL,render:ez,initialValue:eW,rules:eH}=e$;if(!eI)throw Error("Form.List 需要显式传入 form");let eF=ez??eL;if("function"!=typeof eF)throw Error("Form.List 需要通过 render 提供列表内容");let eP=Qr(eR),eB=(0,t._$vaporWithHookId)("useRef:1:26",()=>(0,t.useRef)()),eK=(0,t._$vaporWithHookId)("useRef:1:27",()=>(0,t.useRef)(null)),eV=(0,t._$vaporWithHookId)("useRef:1:28",()=>(0,t.useRef)(void 0)),eq=(0,t._$vaporWithHookId)("useRef:1:29",()=>(0,t.useRef)(null)),[eU,eG]=(0,t._$vaporWithHookId)("useState:1:30",()=>(0,t.useState)(0,{kind:"ref"})),eZ=(0,t._$vaporWithHookId)("useRef:1:31",()=>(0,t.useRef)(eH)),eY=(0,t._$vaporWithHookId)("useRef:1:32",()=>(0,t.useRef)(eW)),eX=(0,t._$vaporWithHookId)("useRef:1:33",()=>(0,t.useRef)([])),eJ=(0,t._$vaporWithHookId)("useRef:1:34",()=>(0,t.useRef)(0));return eZ.current=eH,eY.current=eW,eB.current||(eB.current=`rue-form-list-${qr++}`),eK.current||(eK.current=eI.__INTERNAL__.registerField({id:eB.current,kind:"list",getNamePath:()=>eP,getRules:()=>eZ.current??[],getRequired:()=>void 0,getLabel:()=>eP[eP.length-1],getMessageVariables:()=>void 0,getValidateTrigger:()=>["onChange"],getDependencies:()=>[],getInitialValue:()=>eY.current,getPreserve:()=>!0})),eV.current!==eI&&(eq.current?.(),eV.current=eI,eq.current=eI.__INTERNAL__.subscribe(()=>{eG(eU.value+1)})),(0,t.onCleanup)(()=>{eK.current?.(),eK.current=null,eq.current?.(),eq.current=null,eV.current=void 0}),(()=>{eU.value;let e$=eI.getFieldValue(eP),eR=Array.isArray(e$)?e$:[],eL=eI.__INTERNAL__.getMeta(eP),ez=eX.current??[],eW=eJ.current??0;eX.current??(eX.current=ez),eJ.current??(eJ.current=eW);let eH=()=>{let e$=eJ.current??0;return eJ.current=e$+1,e$};if(ez.length<eR.length)for(;ez.length<eR.length;)ez.push(eH());ez.length>eR.length&&(eX.current=ez.slice(0,eR.length));let eB=eR.map((e$,eI)=>({key:ez[eI],name:eI,fieldKey:ez[eI]}));return r("div",{"data-rue-form-list-shell":"true",children:eF(eB,{add(e$,eL){let eW=[...eR],eF=null==eL?eW.length:Math.max(0,Math.min(eL,eW.length));eW.splice(eF,0,e$??null),ez.splice(eF,0,eH()),eI.__INTERNAL__.updateListValue(eP,eW)},remove(e$){let eL=(Array.isArray(e$)?e$:[e$]).sort((e$,eI)=>eI-e$),eW=[...eR];eL.forEach(e$=>{e$<0||e$>=eW.length||(eW.splice(e$,1),ez.splice(e$,1))}),eI.__INTERNAL__.updateListValue(eP,eW)},move(e$,eL){if(e$<0||eL<0||e$>=eR.length||eL>=eR.length||e$===eL)return;let eW=[...eR],[eH]=eW.splice(e$,1);eW.splice(eL,0,eH);let[eF]=ez.splice(e$,1);ez.splice(eL,0,eF),eI.__INTERNAL__.updateListValue(eP,eW)}},{errors:eL.errors,warnings:eL.warnings})},eB.map(e$=>`${String(e$.fieldKey)}:${e$.name}`).join("|"))})()},ErrorList:e$=>{let{list:eI}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>({list:(0,t._$vaporWithHookId)("computed:1:1",()=>(0,t.computed)(()=>[...e$.errors??[],...e$.warnings??[]].filter(e$=>null!=e$)))})));return eI.get().length?(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("ul",eI);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Yr("mt-3 grid gap-1.5 text-[0.8rem] leading-6",e$.className)))}),(0,t.watchEffect)(()=>{let eI=e$.style;(0,t._$setStyle)(eR,eI)});let eL=(0,t._$createComment)("rue:list:start"),ez=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eR,eL),(0,t._$appendChild)(eR,ez);let eW=new Map;(0,t.watchEffect)(()=>{eW=(0,t._$vaporKeyedList)({items:(e$.errors??[])||[],getKey:(e$,eI)=>`error-${eI}`,elements:eW,parent:eL.parentNode,before:ez,singleRoot:!0,start:eL,renderItem:(e$,eI,eR,eL,ez)=>{(0,t.renderAnchor)((0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("li",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"key",String(`error-${ez}`))}),(0,t._$setClassName)(eR,"text-error");let eL=(0,t._$createTextWrapper)(eR);return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eL,e$)}),eI}),eI,eR)}})}),(0,t._$appendChild)(eR,(0,t._$createTextNode)(" "));let eH=(0,t._$createComment)("rue:list:start"),eF=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eR,eH),(0,t._$appendChild)(eR,eF);let eP=new Map;return(0,t.watchEffect)(()=>{eP=(0,t._$vaporKeyedList)({items:(e$.warnings??[])||[],getKey:(e$,eI)=>`warning-${eI}`,elements:eP,parent:eH.parentNode,before:eF,singleRoot:!0,start:eH,renderItem:(e$,eI,eR,eL,ez)=>{(0,t.renderAnchor)((0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("li",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"key",String(`warning-${ez}`))}),(0,t._$setClassName)(eR,"text-warning");let eL=(0,t._$createTextWrapper)(eR);return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eL,e$)}),eI}),eI,eR)}})}),eR}):null},useForm:e$=>{let eI=(0,t._$vaporWithHookId)("useRef:1:38",()=>(0,t.useRef)());return eI.current||(eI.current=e$??Si()),[eI.current]},useFormInstance:()=>{throw Error("当前运行时不支持自动解析祖先 Form,请显式持有并传递 form 实例")},useWatch:(e$,eI)=>{let eR=(0,t.getCurrentInstance)()?.propsRO?.[Kr],eL=eI??eR?.form,[ez,eW]=(0,t._$vaporWithHookId)("useState:1:35",()=>(0,t.useState)(0,{kind:"ref"})),eH=(0,t._$vaporWithHookId)("useRef:1:36",()=>(0,t.useRef)(void 0)),eF=(0,t._$vaporWithHookId)("useRef:1:37",()=>(0,t.useRef)(null));if(eH.current!==eL&&(eF.current?.(),eH.current=eL,eF.current=eL?eL.__INTERNAL__.subscribe(()=>{eW(ez.value+1)}):null),(0,t.onCleanup)(()=>{eF.current?.(),eF.current=null,eH.current=void 0}),eL)return ez.value,eL.getFieldValue(e$)}}),Ti=["xs","sm","md","lg","xl","xxl"],Ei={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},Di=new Set,Oi=(e$,eI)=>e$?eI?`${e$} ${eI}`:e$:eI??"",ki=e$=>"number"==typeof e$?`${e$}px`:e$,Ai=e$=>e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),ji=e$=>e$?"string"==typeof e$?e$.trim():Object.entries(e$).filter(([,e$])=>null!=e$).map(([e$,eI])=>`${e$.startsWith("--")?e$:Ai(e$)}:${String(eI)}`).join("; "):"",Mi=(...e$)=>e$.map(e$=>ji(e$)).filter(Boolean).join("; "),Ni=(e$,eI)=>{"function"==typeof e$?e$(eI):e$&&"object"==typeof e$&&"current"in e$&&(e$.current=eI??void 0)},Pi=()=>typeof window>"u"?Ei.xl:window.innerWidth||document.documentElement?.clientWidth||Ei.xl,Fi=()=>{Di.forEach(e$=>e$())},Ii=e$=>typeof window>"u"?()=>{}:(0===Di.size&&window.addEventListener("resize",Fi),Di.add(e$),()=>{Di.delete(e$),0===Di.size&&window.removeEventListener("resize",Fi)}),Li=e$=>!(!e$||"object"!=typeof e$||Array.isArray(e$))&&Object.keys(e$).some(e$=>Ti.includes(e$)),Ri=(e$,eI)=>{let eR;if(!Li(e$))return e$;for(let eL of Ti)eI>=Ei[eL]&&void 0!==e$[eL]&&(eR=e$[eL]);return eR},zi=e$=>!!e$&&(Array.isArray(e$)?e$.some(e$=>Li(e$)):Li(e$)),Bi=e$=>Ti.some(eI=>void 0!==e$[eI]),Vi=(e$,eI=!1)=>{if(null!=e$&&0!==e$&&"0"!==e$){if("number"==typeof e$){let eR=e$/2;return`${eI?-eR:eR}px`}return`calc(${e$} / ${eI?"-2":"2"})`}},Hi=e$=>{switch(e$){case"end":return"flex-end";case"center":return"center";case"space-around":return"space-around";case"space-between":return"space-between";case"space-evenly":return"space-evenly";default:return"flex-start"}},Ui=e$=>{switch(e$){case"middle":return"center";case"bottom":return"flex-end";case"stretch":return"stretch";default:return"flex-start"}},Wi=(e$,eI)=>e$?Array.isArray(e$)?[Ri(e$[0],eI),Ri(e$[1],eI)]:[Ri(e$,eI),void 0]:[void 0,void 0],Gi=e$=>{if(void 0!==e$)return"number"==typeof e$?{span:e$}:e$},Ki=(e$,eI)=>{let eR={span:e$.span,order:e$.order,offset:e$.offset,push:e$.push,pull:e$.pull,flex:e$.flex};for(let eL of Ti){if(eI<Ei[eL])continue;let ez=Gi(e$[eL]);ez&&(void 0!==ez.span&&(eR.span=ez.span),void 0!==ez.order&&(eR.order=ez.order),void 0!==ez.offset&&(eR.offset=ez.offset),void 0!==ez.push&&(eR.push=ez.push),void 0!==ez.pull&&(eR.pull=ez.pull),void 0!==ez.flex&&(eR.flex=ez.flex))}return eR},qi=e$=>{if(void 0!==e$)return`${Math.min(24,Math.max(0,e$))/24*100}%`},Ji=e$=>{if(null==e$)return;if("number"==typeof e$)return`${e$} ${e$} auto`;let eI=e$.trim();if(eI)return"auto"===eI?"1 1 auto":"none"===eI?"0 0 auto":/^\d+(\.\d+)?(px|em|rem|vw|vh|%)$/.test(eI)?`0 0 ${eI}`:eI},Yi=(e$,eI,eR,eL,ez)=>{let eW={display:"flex",flexWrap:!1===ez?"nowrap":"wrap",minWidth:0,justifyContent:Hi(eR),alignItems:Ui(eL),"--rue-grid-gutter-x":ki(e$)??"0px","--rue-grid-gutter-y":ki(eI)??"0px"},eH=Vi(e$,!0),eF=Vi(eI,!0);return eH&&(eW.marginLeft=eH,eW.marginRight=eH),eF&&(eW.marginTop=eF,eW.marginBottom=eF),eW},Xi=e$=>{let eI={boxSizing:"border-box",minWidth:0,paddingLeft:"calc(var(--rue-grid-gutter-x, 0px) / 2)",paddingRight:"calc(var(--rue-grid-gutter-x, 0px) / 2)",paddingTop:"calc(var(--rue-grid-gutter-y, 0px) / 2)",paddingBottom:"calc(var(--rue-grid-gutter-y, 0px) / 2)"};void 0!==e$.order&&(eI.order=e$.order),e$.offset&&(eI.marginLeft=qi(e$.offset)),e$.push&&(eI.position="relative",eI.left=qi(e$.push)),e$.pull&&(eI.position="relative",eI.right=qi(e$.pull)),0===e$.span&&(eI.display="none");let eR=Ji(e$.flex);if(eR)eI.flex=eR;else if(void 0!==e$.span&&e$.span>0){let eR=qi(e$.span);eI.flex=`0 0 ${eR}`,eI.maxWidth=eR}return eI},Zi=({gutter:e$,align:eI,justify:eR,wrap:eL=!0,className:ez,style:eW,children:eH,...eF})=>{let eP=zi(e$),eB=eF.ref,eK=(0,e.useRef)(),eV;"ref"in eF&&delete eF.ref,eP&&((0,e.onMounted)(()=>{eV=Ii(()=>{eq()}),eq()}),(0,e.onUnmounted)(()=>{eV&&eV()}));let eq=()=>{let ez=eK.current;if(!ez)return;let[eH,eF]=Wi(e$,Pi()),eP=Mi(Yi(eH,eF,eR,eI,eL),eW);eP?ez.setAttribute("style",eP):ez.removeAttribute("style")};return r("div",{...eF,ref:e$=>{eK.current=e$??void 0,e$&&eq(),Ni(eB,e$)},"data-rue-grid-row":!0,className:Oi("rue-grid rue-grid-row",ez),children:eH})},Qi=Object.assign(Zi,{Row:Zi,Col:({className:e$,style:eI,children:eR,...eL})=>{let ez=Bi(eL),eW=eL.ref,eH=(0,e.useRef)(),eF;"ref"in eL&&delete eL.ref,ez&&((0,e.onMounted)(()=>{eF=Ii(()=>{eY()}),eY()}),(0,e.onUnmounted)(()=>{eF&&eF()}));let{xs:eP,sm:eB,md:eK,lg:eV,xl:eq,xxl:eU,gutter:eG,...eZ}=eL,eY=()=>{let e$=eH.current;if(!e$)return;let eR=Mi(Xi(Ki(eL,Pi())),eI);eR?e$.setAttribute("style",eR):e$.removeAttribute("style")};return r("div",{...eZ,ref:e$=>{eH.current=e$??void 0,e$&&eY(),Ni(eW,e$)},"data-rue-grid-col":!0,className:Oi("rue-grid-col",e$),children:eR})}}),$i=["xs","sm","md","lg","xl","xxl"],ea={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1600},ta={small:"var(--rue-theme-space-sm, 8px)",middle:"var(--rue-theme-space-md, 16px)",large:"var(--rue-theme-space-lg, 24px)"},na={small:8,middle:16,large:24},ra=new Set,ia=(...e$)=>e$.filter(Boolean).join(" "),aa=e$=>Array.isArray(e$)?e$.flatMap(e$=>aa(e$)):null==e$||"boolean"==typeof e$?[]:[e$],oa=e$=>!(!e$||"object"!=typeof e$||Array.isArray(e$))&&Object.keys(e$).some(e$=>$i.includes(e$)),sa=(e$,eI)=>{let eR;if(!oa(e$))return e$;for(let eL of $i)eI>=ea[eL]&&void 0!==e$[eL]&&(eR=e$[eL]);return eR},ca=e$=>oa(e$),la=e$=>!!e$&&(Array.isArray(e$)?e$.some(e$=>ca(e$)):ca(e$)),ua=e$=>{if(null!=e$)return"number"==typeof e$?`${e$}px`:"small"===e$||"middle"===e$||"large"===e$?ta[e$]:e$},da=e$=>{if(typeof window>"u")return na[e$];let eI=Number.parseFloat(window.getComputedStyle(document.documentElement).getPropertyValue("small"===e$?"--rue-theme-space-sm":"middle"===e$?"--rue-theme-space-md":"--rue-theme-space-lg").trim());return Number.isFinite(eI)?eI:na[e$]},fa=(e$,eI)=>{if(null==e$)return;if("number"==typeof e$)return e$;if("small"===e$||"middle"===e$||"large"===e$)return da(e$);let eR=e$.trim();if(!eR)return;if(/^-?\d+(\.\d+)?$/.test(eR))return Number(eR);let eL=eR.match(/^(-?\d+(?:\.\d+)?)(px|rem|em|%|vw|vh)$/);if(!eL)return;let ez=Number(eL[1]);switch(eL[2]){case"px":return ez;case"rem":{if(typeof window>"u")return 16*ez;let e$=Number.parseFloat(window.getComputedStyle(document.documentElement).fontSize||"16");return ez*(Number.isFinite(e$)?e$:16)}case"em":{if(!eI||typeof window>"u")return 16*ez;let e$=Number.parseFloat(window.getComputedStyle(eI).fontSize||"16");return ez*(Number.isFinite(e$)?e$:16)}case"%":return eI?eI.clientWidth*ez/100:void 0;case"vw":return typeof window>"u"?void 0:window.innerWidth*ez/100;case"vh":return typeof window>"u"?void 0:window.innerHeight*ez/100;default:return}},pa=e$=>e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),ma=e$=>e$?"string"==typeof e$?e$.trim():Object.entries(e$).filter(([,e$])=>null!=e$).map(([e$,eI])=>`${e$.startsWith("--")?e$:pa(e$)}:${String(eI)}`).join("; "):"",ha=(...e$)=>e$.map(e$=>ma(e$)).filter(Boolean).join("; "),ga=(...e$)=>{let eI={};return e$.forEach(e$=>{!e$||"object"!=typeof e$||Array.isArray(e$)||Object.assign(eI,e$)}),Object.keys(eI).length>0?eI:void 0},_a=(e$,eI)=>{"function"==typeof e$?e$(eI):e$&&"object"==typeof e$&&"current"in e$&&(e$.current=eI??void 0)},va=()=>typeof window>"u"?ea.xl:window.innerWidth||document.documentElement?.clientWidth||ea.xl,ya=()=>{ra.forEach(e$=>e$())},ba=e$=>typeof window>"u"?()=>{}:(0===ra.size&&window.addEventListener("resize",ya),ra.add(e$),()=>{ra.delete(e$),0===ra.size&&window.removeEventListener("resize",ya)}),xa=e$=>{if(!(null==e$||!Number.isFinite(e$)))return Math.max(1,Math.floor(e$))},Sa=(e$,eI)=>{if(!e$)return[void 0,void 0];if(Array.isArray(e$))return[sa(e$[0],eI),sa(e$[1],eI)];let eR=sa(e$,eI);return[eR,eR]},Ca=(e$,eI,eR)=>"function"==typeof eR?eR(e$,eI):eR&&e$&&"object"==typeof e$&&eR in e$?e$[eR]:e$?.key??e$?.id??eI,wa=({element:e$,viewportWidth:eI,columns:eR,minColumnWidth:eL,minColumns:ez,maxColumns:eW,columnGap:eH})=>{let eF=xa(sa(ez,eI)),eP=xa(sa(eW,eI)),eB=null!=eP&&null!=eF?Math.max(eP,eF):eP,eK=xa(sa(eR,eI));if(!eK){let eR=fa(sa(eL,eI),e$),ez=fa(eH,e$)??0,eW=e$?.clientWidth||e$?.getBoundingClientRect().width||eI||ea.xl;eR&&eR>0&&eW>0&&(eK=Math.max(1,Math.floor((eW+ez)/(eR+ez))))}return eK&&(eF&&(eK=Math.max(eK,eF)),eB&&(eK=Math.min(eK,eB))),eK||(eF??1)},Ta=({as:e$="div",columns:eI,gap:eR,gutter:eL,columnGap:ez,rowGap:eW,minColumnWidth:eH,minColumns:eF,maxColumns:eP,items:eB,renderItem:eK,itemKey:eV,itemAs:eq="div",itemClassName:eU,itemStyle:eG,empty:eZ,className:eY,style:eX,children:eJ,...eQ})=>{let e0=eQ.ref,e1=(0,e.useRef)(),e2=(0,e.useRef)(),e5;"ref"in eQ&&delete eQ.ref;let e3=oa(eI)||la(eR)||la(eL)||ca(ez)||ca(eW)||ca(eH)||oa(eF)||oa(eP),e4=null!=eH,e6=()=>{let e$=e1.current;if(!e$)return;let eB=va(),[eK,eV]=Sa(eR??eL,eB),eq=sa(ez,eB)??eK??"16px",eU=sa(eW,eB)??eV??eK??"16px",eG=wa({element:e$,viewportWidth:eB,columns:eI,minColumnWidth:eH,minColumns:eF,maxColumns:eP,columnGap:eq}),eZ=ha({display:"block",width:"100%",columnCount:eG,columnGap:ua(eq),"--rue-masonry-columns":eG,"--rue-masonry-column-gap":ua(eq),"--rue-masonry-row-gap":ua(eU)},eX);eZ?e$.setAttribute("style",eZ):e$.removeAttribute("style"),e$.setAttribute("data-rue-masonry-columns",String(eG))};(e3||e4)&&((0,e.onMounted)(()=>{e3&&(e5=ba(()=>{e6()})),e6()}),(0,e.onUnmounted)(()=>{e5&&e5(),e2.current&&(e2.current.disconnect(),e2.current=void 0)}));let e8=eB?eB.map((e$,eI)=>({key:Ca(e$,eI,eV),content:eK?eK(e$,eI):e$,className:"function"==typeof eU?eU(e$,eI):eU,style:"function"==typeof eG?eG(e$,eI):eG})):aa(eJ).map((e$,eI)=>({key:e$?.key??e$?.props?.key??eI,content:e$,className:"function"==typeof eU?eU(e$,eI):eU,style:"function"==typeof eG?eG(e$,eI):eG})),e7=e8.length>0?e8.map((e$,eI)=>r(eq,{"data-rue-masonry-item":!0,"data-rue-masonry-index":eI,className:ia("rue-masonry-item",e$.className),style:ga({display:"inline-block",width:"100%",verticalAlign:"top",breakInside:"avoid",WebkitColumnBreakInside:"avoid",pageBreakInside:"avoid",marginBottom:"var(--rue-masonry-row-gap, 16px)"},e$.style),children:e$.content},e$.key)):null==eZ?[]:[eZ];return(0,e.h)(e$,{...eQ,ref:e$=>{e1.current=e$??void 0,(e$=>{if(e2.current&&(e2.current.disconnect(),e2.current=void 0),!e$||!e4||typeof ResizeObserver>"u")return;let eI=new ResizeObserver(()=>{e6()});eI.observe(e$),e2.current=eI})(e$),e$&&e6(),_a(e0,e$)},className:ia("rue-masonry",eY),"data-rue-masonry":""},...e7)},Ea=0,Da="",Oa=(...e$)=>e$.filter(Boolean).join(" "),ka=e$=>e$.replace(/-([a-z])/g,(e$,eI)=>eI.toUpperCase()),Aa=e$=>e$.startsWith("--")?e$:e$.includes("-")?ka(e$):e$,ja=e$=>{if(!e$)return;let eI={};return"string"==typeof e$?e$.split(";").map(e$=>e$.trim()).filter(Boolean).forEach(e$=>{let eR=e$.indexOf(":");if(-1===eR)return;let eL=e$.slice(0,eR).trim(),ez=e$.slice(eR+1).trim();eL&&ez&&(eI[Aa(eL)]=ez)}):Object.entries(e$).forEach(([e$,eR])=>{null!=eR&&(eI[Aa(e$)]=eR)}),Object.keys(eI).length>0?eI:void 0},Ma=(...e$)=>{let eI={};return e$.forEach(e$=>{let eR=ja(e$);eR&&Object.assign(eI,eR)}),Object.keys(eI).length>0?eI:void 0},Na=e$=>{if(null!=e$)return"number"==typeof e$?`${e$}px`:e$},Pa=()=>i("div",{className:"space-y-3","data-rue-modal-loading":"true",children:[r("div",{className:"skeleton h-4 w-2/5"}),r("div",{className:"skeleton h-4 w-full"}),r("div",{className:"skeleton h-4 w-5/6"}),r("div",{className:"skeleton h-24 w-full"})]}),Fa=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-4","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})}),Ia=()=>{typeof document>"u"||(0===Ea&&(Da=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden"),Ea+=1)},La=()=>{typeof document>"u"||0===Ea||0==--Ea&&(document.documentElement.style.overflow=Da)},Ra=({open:e$,defaultOpen:eI=!1,title:eR,children:eL,actions:ez,footer:eW,className:eH,rootClassName:eF,rootStyle:eP,wrapClassName:eB,wrapProps:eK,bodyClassName:eV,headerClassName:eq,footerClassName:eU,maskClassName:eG,classNames:eZ,styles:eY,width:eX,style:eJ,bodyStyle:eQ,maskStyle:e0,centered:e1=!1,closable:e2=!0,closeIcon:e5,keyboard:e3=!0,mask:e4=!0,maskClosable:e6=!0,forceRender:e8=!1,destroyOnClose:e7,destroyOnHidden:e9=!0,confirmLoading:t$=!1,okText:tI="确定",cancelText:tR,okType:tL="primary",okButtonProps:tz,cancelButtonProps:tW,zIndex:tH,getContainer:tF,loading:tP=!1,onOk:tB,onCancel:tK,onClose:tV,onOpenChange:tq,afterClose:tU,afterOpenChange:tG,modalRender:tZ,...tY})=>{let tX=(0,e.ref)(eI),tJ=(0,e.ref)(eI),tQ=(0,e.ref)(!1),t0="boolean"==typeof e$,t1="boolean"==typeof e$?e$:tX.value,t2=(0,e.ref)(t1),t5=(0,e.ref)(e3),t3=e$=>{e$&&"function"==typeof e$.preventDefault&&e$.preventDefault(),tK&&e$&&tK(e$),tV&&tV(e$),t0||(tX.value=!1),tq&&tq(!1)};if((0,e.onMounted)(()=>{if(t1&&(Ia(),tQ.value=!0),typeof window>"u")return;let e$=e$=>{t2.value&&t5.value&&"Escape"===e$.key&&t3(e$)};window.addEventListener("keydown",e$),(0,e.onUnmounted)(()=>{window.removeEventListener("keydown",e$)})}),(0,e.watch)(()=>t1,e$=>{t2.value=e$,e$?(tJ.value=!0,tQ.value||(Ia(),tQ.value=!0)):tQ.value&&(La(),tQ.value=!1,tU&&tU()),tG&&tG(e$)}),(0,e.watch)(()=>e3,e$=>{t5.value=e$},{immediate:!0}),(0,e.watch)(()=>eI,e$=>{t0||(tX.value=!!e$)},{immediate:!0}),(0,e.onUnmounted)(()=>{tQ.value&&(La(),tQ.value=!1)}),!(t1||e8||!(e9??e7??!0)&&tJ.value))return null;let{className:t4,style:t6,onClick:t8,...t7}=eK??{},t9=tR??(tB||tz?"取消":"关闭"),r$=void 0===eW&&null!=ez,rI=!r$&&(null!=tB||null!=tz),rR=e$=>{let{children:eI,onClick:eR,...eL}=e$??{};return(0,e.h)(ie,{...tW,...eL,onClick:e$=>{eR&&eR(e$),e$.defaultPrevented||t3(e$)},disabled:eL.disabled??tW?.disabled},eI??tW?.children??t9)},rL=e$=>{let{children:eI,onClick:eR,...eL}=e$??{};return(0,e.h)(ie,{...tz,...eL,type:eL.type??tz?.type??tL,loading:eL.loading??tz?.loading??t$,onClick:e$=>{eR&&eR(e$),e$.defaultPrevented||t$||tB&&tB(e$)}},eI??tz?.children??tI)},rz=i(e.Fragment,{children:[r$?ez:null,r$||null!=tK||null!=tV||rI?rR():null,rI?rL():null]}),rW=tP||null===eW||!1===eW?null:"function"==typeof eW?eW(rz,{OkBtn:e$=>rL(e$),CancelBtn:e$=>rR(e$)}):eW??rz,rH=i("div",{...tY,"aria-hidden":t1?void 0:"true",className:Oa(`modal ${t1?"modal-open":""} bg-transparent`.trim(),Oa(eF,Oa(eZ?.root,t1?void 0:"pointer-events-none"))),style:Ma(eY?.root,eP,null==tH?void 0:{zIndex:tH}),"data-rue-modal-root":"true",children:[e4?r("div",{"aria-hidden":"true",className:Oa("absolute inset-0 bg-base-content/40",Oa(eG,eZ?.mask)),style:Ma(eY?.mask,e0),"data-rue-modal-mask":"true"}):null,r("div",{...t7,className:Oa(Oa(`absolute inset-0 overflow-y-auto px-4 py-6 sm:px-6 ${e1?"flex items-center justify-center":"flex items-start justify-center sm:items-center"}`,eB),Oa(t4,eZ?.wrapper)),style:Ma(eY?.wrapper,t6),onClick:e$=>{t8&&t8(e$),!e$.defaultPrevented&&e4&&e6&&e$.target===e$.currentTarget&&t3(e$)},"data-rue-modal-wrapper":"true",children:r("div",{className:Oa("relative flex w-full justify-center",eZ?.container),style:Ma(eY?.container),"data-rue-modal-container":"true",children:i("div",{role:"dialog","aria-modal":t1?"true":"false","aria-hidden":t1?void 0:"true",className:Oa(Oa("modal-box relative",eH),Oa(eZ?.box,t1?void 0:"pointer-events-none")),style:Ma(eY?.box,eJ,null==eX?void 0:{width:Na(eX)}),onClick:e$=>{e$.stopPropagation()},"data-rue-modal-box":"true",children:[e2?r("button",{type:"button","aria-label":"关闭",className:Oa("btn btn-sm btn-circle btn-ghost absolute right-4 top-4 z-10",eZ?.close),style:Ma(eY?.close),onClick:e$=>t3(e$),children:e5??r(Fa,{})}):null,eR?r("div",{className:Oa("mb-4 pr-10",Oa(eq,eZ?.header)),style:Ma(eY?.header),children:r("div",{className:Oa("text-lg font-semibold leading-6",eZ?.title),style:Ma(eY?.title),children:eR})}):null,r("div",{className:Oa("space-y-4",Oa(eV,eZ?.body)),style:Ma(eY?.body,eQ),"aria-busy":tP?"true":void 0,children:tP?Pa():eL}),rW?r("div",{className:Oa("modal-action mt-6 flex flex-wrap items-center justify-end gap-2",Oa(eU,eZ?.footer)),style:Ma(eY?.footer),children:rW}):null]})})})]}),rF=tZ?tZ(rH):rH,rP="function"==typeof tF?tF():tF;return!1===rP||null==rP?rF:r(e.Teleport,{to:rP,children:rF})},za=0,Ba=(e$,eI)=>e$?eI?`${e$} ${eI}`:e$:eI??"",Va=(e$,eI)=>e$||("card"===eI||"editable-card"===eI?"box":"line"===eI?"border":void 0),Ha=e$=>{switch(e$){case"small":return"sm";case"middle":return"md";case"large":return"lg";default:return e$}},Ua=(e$,eI)=>void 0!==eI&&e$.some(e$=>e$.key===eI)?eI:e$.find(e$=>!e$.disabled)?.key??e$[0]?.key??"",Wa=e$=>e$&&"object"==typeof e$&&!Array.isArray(e$)&&("left"in e$||"right"in e$)?e$:{right:e$},Ga=(e$,eI,eR,eL,ez)=>{let eW="tabs";return"box"===e$&&(eW+=" tabs-box"),"border"===e$&&(eW+=" tabs-border"),"lift"===e$&&(eW+=" tabs-lift"),"bottom"===eI&&(eW+=" tabs-bottom"),("start"===eI||"end"===eI)&&(eW+=" flex-col items-stretch"),Ha(eR)&&(eW+=` tabs-${Ha(eR)}`),eL&&"start"!==eI&&"end"!==eI&&(eW+=" justify-center"),ez&&(eW+=` ${ez}`),eW},Ka=e$=>"number"==typeof e$?`${e$}px`:e$??"100%",qa=e$=>{switch(e$){case"start":return"self-start";case"end":return"self-end";default:return"self-center"}},Ja=(e$,eI=!0)=>Ba(Ba("tab-content rounded-box border border-base-300 bg-base-100 p-5",eI?"block":"hidden"),e$),Ya=({items:e$,activeKey:eI,defaultActiveKey:eR,onChange:eL,onEdit:ez,style:eW,type:eH,placement:eF,tabPlacement:eP,size:eB,centered:eK,destroyOnHidden:eV,hideAdd:eq,addIcon:eU,removeIcon:eG,indicator:eZ,tabBarExtraContent:eY,className:eX,tabBarClassName:eJ,contentClassName:eQ})=>{let e0=e$??[],e1=eP??eF??"top",e2=Va(eW,eH),e5=(0,e.useRef)();e5.current||(e5.current=`rue-tabs-${za++}`);let e3=e5.current,e4=(0,e.ref)(Ua(e0,eR??eI)),e6=(0,e.useRef)(),e8=(0,e.useRef)(),e7=(0,e.useRef)(),e9=(0,e.useRef)(),t$=(0,e.useRef)();e7.current||(e7.current=new Map);let tI=e0.some(e$=>null!=e$.children),tR=Wa(eY),tL="start"===e1||"end"===e1,tz=!!eZ&&"border"===e2,tW=()=>{let e$=eI??e4.value??Ua(e0);return e0.some(eI=>eI.key===e$)?e$:Ua(e0,eR??eI)},tH=Ba(Ba(Ba("rue-tabs","block"),eX),tI?"w-full":void 0),tF=Ga(e2,e1,eB,eK,Ba(eJ,tL?"w-full":void 0)),tP="editable-card"===eH&&!0!==eq&&ez?r("button",{type:"button",className:"btn btn-ghost btn-sm shrink-0","aria-label":"新增标签",onClick:e$=>{ez&&ez(e$,"add")},children:eU??"+"}):null,tB=(e$,eI)=>{e$.setAttribute("role","tabpanel"),e$.id=`${e3}-panel-${eI.key}`,e$.setAttribute("aria-labelledby",`${e3}-tab-${eI.key}`),e$.setAttribute("aria-hidden","false"),e$.className=Ja(eI.contentClassName)},tK=()=>{for(let e$ of e7.current.values())(0,e.render)([],e$),e$.remove();e7.current.clear(),e9.current=null,t$.current=null},tV=()=>{e6.current&&(0,e.render)(r("div",{role:"tablist","aria-orientation":tL?"vertical":"horizontal",className:tF,children:e0.map(e$=>{let eR=tW()===e$.key,eW="editable-card"===eH&&!!ez&&(e$.closable??!e$.disabled),eF=`${e3}-tab-${e$.key}`,eP=`${e3}-panel-${e$.key}`;return i("button",{type:"button",role:"tab",id:eF,"aria-selected":eR?"true":"false","aria-controls":null==e$.children?void 0:eP,className:Ba(Ba(Ba(Ba(Ba("tab",eR?Ba("tab-active",tz?"rue-tabs-indicator-active before:hidden":void 0):void 0),e$.disabled?"tab-disabled":void 0),tL?"justify-start":void 0),eW?"gap-2 pr-2":void 0),e$.className),disabled:e$.disabled,onClick:()=>{var eR;e$.disabled||(eR=e$.key)!==tW()&&(void 0===eI&&(e4.value=eR),eL&&eL(eR))},children:[null==e$.icon?null:r("span",{className:"inline-flex shrink-0 items-center justify-center","aria-hidden":null==e$.label?void 0:"true",children:e$.icon}),i("span",{className:"relative inline-flex min-w-0 flex-col",children:[r("span",{className:"truncate",children:e$.label}),eR&&eZ?r("span",{className:Ba("mt-1 inline-flex h-0.5 rounded-full bg-current opacity-70",Ba(qa(eZ.align),eZ.className)),style:{width:Ka(eZ.size),...eZ.style}}):null]}),eW?r("span",{role:"button",tabindex:e$.disabled?-1:0,className:"inline-flex size-5 shrink-0 items-center justify-center rounded-full opacity-60 transition-opacity hover:opacity-100","aria-label":`移除 ${e$.key}`,onClick:eI=>{eI.preventDefault(),eI.stopPropagation(),e$.disabled||!ez||ez(e$.key,"remove")},onKeyDown:eI=>{"Enter"!==eI.key&&" "!==eI.key||(eI.preventDefault(),eI.stopPropagation(),e$.disabled||!ez||ez(e$.key,"remove"))},children:e$.closeIcon??eG??"\xd7"}):null]},e$.key)})}),e6.current),e8.current&&(eV?(()=>{let e$=e8.current;if(!e$)return;t$.current&&t$.current!==e0&&tK(),t$.current=e0;let eI=e0.find(e$=>e$.key===tW()),eR=eI?.key??null,eL=e9.current??null;if(eL&&eL!==eR){let eI=e7.current.get(eL);eI&&eI.parentNode===e$&&e$.removeChild(eI)}if(!eI||null==eI.children){e$.replaceChildren(),e9.current=eR;return}let ez=e7.current.get(eI.key);ez?eL===eR?(tB(ez,eI),(0,e.render)(eI.children,ez)):tB(ez,eI):(tB(ez=document.createElement("div"),eI),(0,e.render)(eI.children,ez),e7.current.set(eI.key,ez)),(ez.parentNode!==e$||1!==e$.childNodes.length||e$.firstChild!==ez)&&e$.replaceChildren(ez),e9.current=eI.key})():(tK(),(0,e.render)((()=>{if(!tI)return null;if(eV){let e$=e0.find(e$=>e$.key===tW());return e$&&null!=e$.children?r("div",{role:"tabpanel",id:`${e3}-panel-${e$.key}`,"aria-labelledby":`${e3}-tab-${e$.key}`,"aria-hidden":"false",className:Ja(e$.contentClassName),children:e$.children},`${e$.key}-panel`):null}return r(e.Fragment,{children:e0.map(e$=>{let eI=e$.key===tW();return r("div",{role:"tabpanel",id:`${e3}-panel-${e$.key}`,"aria-labelledby":`${e3}-tab-${e$.key}`,"aria-hidden":eI?"false":"true",className:Ja(e$.contentClassName,eI),children:e$.children},`${e$.key}-panel`)})})})(),e8.current)))};return(0,e.onMounted)(()=>{tV()}),(0,e.watch)(()=>[eI,eR,e4.value,e$,eV,e1,e2,eB,eK,eZ?.align,eZ?.size,eZ?.className,eJ,eQ],()=>{tV()},{immediate:!0}),tL?r("div",{className:tH,children:i("div",{className:Ba("flex items-start gap-4","end"===e1?"flex-row-reverse":void 0),children:[i("div",{className:"flex w-full max-w-xs shrink-0 flex-col gap-3",children:[null==tR.left?null:r("div",{className:"shrink-0",children:tR.left}),r("div",{ref:e$=>e6.current=e$??void 0}),null!=tP||null!=tR.right?i("div",{className:"flex flex-wrap items-center gap-2",children:[tP,null==tR.right?null:r("div",{className:"shrink-0",children:tR.right})]}):null]}),tI?r("div",{ref:e$=>e8.current=e$??void 0,className:Ba("min-w-0 flex-1",eQ)}):null]})}):r("div",{className:tH,children:i("div",{className:Ba("flex gap-4","bottom"===e1?"flex-col-reverse":"flex-col"),children:[i("div",{className:"flex flex-wrap items-center gap-3",children:[null==tR.left?null:r("div",{className:"shrink-0",children:tR.left}),r("div",{className:Ba("min-w-0 flex-1",eK?"flex justify-center":void 0),children:r("div",{ref:e$=>e6.current=e$??void 0})}),tP,null==tR.right?null:r("div",{className:"shrink-0",children:tR.right})]}),tI?r("div",{ref:e$=>e8.current=e$??void 0,className:Ba("min-w-0 flex-1",eQ)}):null]})})},Xa=["neutral","primary","secondary","accent","info","success","warning","error"],Za=e$=>!!e$&&Xa.includes(e$),Qa=(...e$)=>e$.filter(Boolean).join(" "),$a=e$=>{switch(e$){case"small":return"sm";case"medium":return"md";default:return e$}},eo=e$=>{switch(e$){case"default":return"neutral";case"processing":return"info";default:return e$}},to=e$=>{if("number"==typeof e$&&Number.isFinite(e$))return e$;if("string"==typeof e$){let eI=e$.trim();if(!eI)return null;let eR=Number(eI);if(!Number.isNaN(eR))return eR}return null},no=e$=>null==e$||!1===e$||""===e$,ro=e$=>Array.isArray(e$)?e$.some(e$=>ro(e$)):!no(e$),io=e$=>"number"==typeof e$?`${-e$}px`:e$.startsWith("-")?e$.slice(1):`-${e$}`,ao=e$=>"number"==typeof e$?`${e$}px`:e$,oo=({variant:e$,size:eI,outline:eR,dash:eL,soft:ez,ghost:eW,className:eH})=>{let eF=$a(eI),eP="badge";return e$&&(eP+=` badge-${e$}`),eF&&(eP+=` badge-${eF}`),eR&&(eP+=" badge-outline"),eL&&(eP+=" badge-dash"),ez&&(eP+=" badge-soft"),eW&&(eP+=" badge-ghost"),eH&&(eP+=` ${eH}`),eP},so=(e$,eI)=>{let eR=to(e$);return null!==eR&&eR>eI?`${eI}+`:e$},co=e$=>null!=e$&&!1!==e$&&""!==e$,lo=({variant:e$,status:eI,color:eR})=>Za(eR)?eR:eo(eI)??e$??"error",uo=e$=>{if(e$)return{insetInlineEnd:io(e$[0]),marginTop:ao(e$[1])}},fo=({color:e$,offset:eI,indicatorStyle:eR})=>{let eL=uo(eI);return e$&&!Za(e$)?{...eL,backgroundColor:e$,borderColor:e$,color:"#fff",...eR}:{...eL,...eR}},po=({color:e$,offset:eI,indicatorStyle:eR})=>{let eL=uo(eI);return e$&&!Za(e$)?{...eL,backgroundColor:e$,color:e$,...eR}:{...eL,...eR}},mo=e$=>{switch($a(e$)){case"xs":return"status-xs";case"sm":return"status-sm";case"lg":return"status-lg";case"xl":return"status-xl";default:return"status-md"}},ho=({dot:e$,displayCount:eI})=>{if(e$)return"pe-3.5";let eR=`${eI??""}`;return eR.length>=3?"pe-8":2===eR.length?"pe-7":"pe-6"},go=({className:e$,style:eI,indicatorNode:eR,content:eL})=>i("span",{className:Qa("indicator inline-flex align-middle",e$),style:eI,children:[eR,r("span",{className:"inline-flex align-middle",children:eL})]}),_o=({variant:e$,size:eI,outline:eR,dash:eL,soft:ez,ghost:eW,count:eH,overflowCount:eF=99,showZero:eP,dot:eB,status:eK,color:eV,text:eq,offset:eU,title:eG,style:eZ,indicatorClassName:eY,indicatorStyle:eX,className:eJ,children:eQ})=>{let e0=to(eH),e1=so(eH,eF),e2=0===e0,e5=!no(eH)&&!(e2&&!eP),e3=!!eB&&!e2,e4=!e3&&!e5&&(!!eK||!!eV),e6=e3||e5||e4,e8=void 0!==eH||!!eB||!!eK||!!eV||!!eq||!!eU||!!eY||!!eX,e7=lo({variant:e$,status:eK,color:eV}),e9=co(eq),t$=ro(eQ),tI=eG??("string"==typeof e1||"number"==typeof e1?`${e1}`:void 0),tR=r("span",{className:Qa("status ring-2 ring-base-100 shadow-sm",`status-${e7}`,mo(eI),"processing"===eK&&"animate-pulse",eY),style:po({color:eV,offset:eU,indicatorStyle:eX}),title:eG});if(!t$&&e8&&e4)return i("span",{className:Qa("inline-flex items-center gap-2 align-middle",eJ),style:eZ,children:[tR,e9?r("span",{children:eq}):null]});if(!t$&&e8&&(e3||e5)){let e$=e3?tR:r("span",{className:oo({variant:e7,size:eI,outline:eR,dash:eL,soft:ez,ghost:eW,className:Qa("border-none shadow-sm",eY)}),style:fo({color:eV,offset:eU,indicatorStyle:eX}),title:tI,children:e1});if(e9){let e$=e3?r("span",{className:Qa("indicator-item indicator-top indicator-end status ring-2 ring-base-100 shadow-sm",`status-${e7}`,mo(eI),"processing"===eK&&"animate-pulse",eY),style:po({color:eV,offset:eU,indicatorStyle:eX}),title:eG}):r("span",{className:Qa("indicator-item indicator-top indicator-end border-none shadow-sm ring-2 ring-base-100",oo({variant:e7,size:eI,outline:eR,dash:eL,soft:ez,ghost:eW,className:eY})),style:fo({color:eV,offset:eU,indicatorStyle:eX}),title:tI,children:e1});return i("span",{className:Qa("indicator inline-flex align-middle",eJ),style:eZ,children:[e$,r("span",{className:Qa("inline-flex align-middle",ho({dot:e3,displayCount:e1})),children:eq})]})}return r("span",{className:Qa("inline-flex align-middle",eJ),style:eZ,children:e$})}if(!t$&&e8)return e9?r("span",{className:Qa("inline-flex items-center gap-2 align-middle",eJ),style:eZ,children:r("span",{children:eq})}):null;if(t$&&e8){let e$=go({className:eJ,style:eZ,indicatorNode:e6?e3||e4?r("span",{className:Qa("indicator-item indicator-top indicator-end status ring-2 ring-base-100 shadow-sm",`status-${e7}`,mo(eI),"processing"===eK&&"animate-pulse",eY),style:po({color:eV,offset:eU,indicatorStyle:eX}),title:eG}):r("span",{className:Qa("indicator-item indicator-top indicator-end border-none shadow-sm ring-2 ring-base-100",oo({variant:e7,size:eI,outline:eR,dash:eL,soft:ez,ghost:eW,className:eY})),style:fo({color:eV,offset:eU,indicatorStyle:eX}),title:tI,children:e1}):null,content:eQ});return e9?i("span",{className:"inline-flex items-center gap-2 align-middle",children:[e$,r("span",{children:eq})]}):e$}return r("span",{className:oo({variant:e$,size:eI,outline:eR,dash:eL,soft:ez,ghost:eW,className:eJ}),style:eZ,title:eG,children:eQ})},vo=({text:e$,color:eI,placement:eR="end",className:eL,style:ez,children:eW})=>{let eH=Za(eI)?eI:"primary";return i("div",{className:"relative inline-block overflow-hidden align-middle",children:[r("span",{className:Qa("badge badge-sm pointer-events-none absolute top-4 z-10 min-w-[9rem] justify-center rounded-none px-6 py-3 text-xs font-semibold uppercase tracking-[0.18em] shadow-lg",!eI||Za(eI)?`badge-${eH}`:"text-white","start"===eR?"left-[-3.25rem] -rotate-45":"right-[-3.25rem] rotate-45",eL),style:eI&&!Za(eI)?{backgroundColor:eI,borderColor:eI,color:"#fff",...ez}:ez,children:e$}),eW]})},yo=_o;yo.Ribbon=vo;var bo=e$=>e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),xo=e$=>e$?"string"==typeof e$?e$.trim():Object.entries(e$).filter(([,e$])=>null!=e$).map(([e$,eI])=>`${e$.startsWith("--")?e$:bo(e$)}:${String(eI)}`).join("; "):"",So=(...e$)=>e$.map(e$=>xo(e$)).filter(Boolean).join("; "),Co={display:"grid",justifyContent:"normal",alignItems:"stretch"},wo=(e$,eI,eR)=>e$<eI?eI:e$>eR?eR:e$,To=(e$,eI)=>{let eR=Number(e$);return Number.isFinite(eR)?eR:eI},Eo=(e$,eI)=>{let eR=To(e$,0),eL=To(eI,100);return eL<=eR?{min:eR,max:eR+1}:{min:eR,max:eL}},Do=e$=>{let eI=To(e$,1);return eI>0?eI:1},Oo=(e$,eI,eR,eL)=>wo(To(e$,eL),eI,eR),ko=(e$,eI,eR)=>(e$-eI)/(eR-eI)*100,Ao=(e$,eI)=>eI?`${e$} ${eI}`:e$,jo=e$=>r("div",{className:"relative h-full [&>*]:h-full [&>*]:w-full [&>*]:max-w-none",children:e$}),Mo=e$=>null!=e$&&(!Array.isArray(e$)||e$.length>0),No=(e$,eI)=>{"function"==typeof e$?e$(eI):e$&&"object"==typeof e$&&"current"in e$&&(e$.current=eI??void 0)},Po=({className:e$,style:eI,role:eR,tabIndex:eL,label:ez,labelClassName:eW,children:eH,...eF})=>{let eP=eF.ref;"ref"in eF&&delete eF.ref;let eB=xo(eI);return i("div",{...eF,ref:e$=>{e$&&(eB?e$.setAttribute("style",eB):e$.removeAttribute("style")),No(eP,e$)},className:Ao("diff-item-1 relative",e$),role:eR,tabIndex:eL,children:[null==ez?null:r("span",{className:Ao("pointer-events-none absolute left-4 top-4 z-10 rounded-full bg-base-100/80 px-3 py-1 text-xs font-medium text-base-content shadow-sm backdrop-blur",eW),children:ez}),eH]})},Fo=({className:e$,style:eI,role:eR,tabIndex:eL,label:ez,labelClassName:eW,children:eH,...eF})=>{let eP=eF.ref;"ref"in eF&&delete eF.ref;let eB=xo(eI);return i("div",{...eF,ref:e$=>{e$&&(eB?e$.setAttribute("style",eB):e$.removeAttribute("style")),No(eP,e$)},className:Ao("diff-item-2 relative",e$),role:eR,tabIndex:eL,children:[null==ez?null:r("span",{className:Ao("pointer-events-none absolute right-4 top-4 z-10 rounded-full bg-base-100/80 px-3 py-1 text-xs font-medium text-base-content shadow-sm backdrop-blur",eW),children:ez}),eH]})},Io=({className:e$,style:eI,children:eR,...eL})=>{let ez=eL.ref;"ref"in eL&&delete eL.ref;let eW=xo(eI);return r("div",{...eL,ref:e$=>{e$&&(eW?e$.setAttribute("style",eW):e$.removeAttribute("style")),No(ez,e$)},className:Ao("diff-resizer",e$),children:eR})},Lo=Object.assign(({className:e$,style:eI,tabIndex:eR,value:eL,defaultValue:ez,min:eW,max:eH,step:eF,disabled:eP,item1:eB,item2:eK,item1Label:eV,item2Label:eq,resizerContent:eU,children:eG,onChange:eZ,...eY})=>{let eX=eY.ref;"ref"in eY&&delete eY.ref;let eJ=Eo(eW,eH),eQ=Do(eF),e0=(0,e.ref)(Oo(ez??eL??50,eJ.min,eJ.max,50)),e1=void 0!==eL,e2=e1?Oo(eL,eJ.min,eJ.max,e0.value):Oo(e0.value,eJ.min,eJ.max,50),e5=ko(e2,eJ.min,eJ.max),e3=!Mo(eG)&&(void 0!==eB||void 0!==eK),e4=Ao(e3?"diff relative isolate overflow-hidden select-none":"diff",e$),e6=So(eI,Co),e8=null,e7=null,e9=null,t$=null,tI=null,tR=e$=>{e$&&(e6?e$.setAttribute("style",e6):e$.removeAttribute("style")),No(eX,e$)},tL=e$=>{let eI=ko(e$,eJ.min,eJ.max);e8&&e8.setAttribute("style",xo({clipPath:`inset(0 ${100-eI}% 0 0)`})),e7&&e7.setAttribute("style",xo({clipPath:`inset(0 0 0 ${eI}%)`})),e9&&e9.setAttribute("style",xo({left:`${eI}%`,width:0,minWidth:0,maxWidth:0,clipPath:"none",overflow:"visible",opacity:1,resize:"none",transform:"translateX(-50%)"})),t$&&(t$.style.left=`${eI}%`),tI&&(tI.setAttribute("aria-valuenow",String(e$)),tI.value=String(e$))},tz=e$=>{let eI=e$.target,eR=Oo(eI?.value,eJ.min,eJ.max,e2);e1||(e0.value=eR),tL(eR),eZ&&eZ(eR,e$)};if(!e3)return r("figure",{...eY,ref:tR,className:e4,tabIndex:eR,"aria-disabled":eP?"true":void 0,children:eG});let tW=eY["aria-label"]??"Diff position";return i("figure",{...eY,ref:tR,className:e4,tabIndex:void 0,"aria-disabled":eP?"true":void 0,children:[r(Po,{className:"absolute inset-0 z-10 overflow-hidden",role:"img",ref:e$=>{e8=e$,tL(e2)},children:jo(eB)}),r(Fo,{className:"absolute inset-0 overflow-hidden after:hidden",role:"img",ref:e$=>{e7=e$,tL(e2)},children:jo(eK)}),null==eV?null:r("span",{className:"pointer-events-none absolute left-4 top-4 z-30 rounded-full bg-base-100/80 px-3 py-1 text-xs font-medium text-base-content shadow-sm backdrop-blur",children:eV}),null==eq?null:r("span",{className:"pointer-events-none absolute right-4 top-4 z-30 rounded-full bg-base-100/80 px-3 py-1 text-xs font-medium text-base-content shadow-sm backdrop-blur",children:eq}),r(Io,{className:"pointer-events-none absolute inset-y-0 z-20",ref:e$=>{e9=e$,tL(e2)},style:{left:`${e5}%`,width:0,minWidth:0,maxWidth:0,clipPath:"none",overflow:"visible",opacity:1,resize:"none",transform:"translateX(-50%)"},children:r("span",{className:"absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-base-100 shadow-sm"})}),null==eU?null:r("span",{ref:e$=>{t$=e$,tL(e2)},className:"pointer-events-none absolute top-1/2 z-30 inline-flex -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border border-base-300 bg-base-100/85 px-2 py-1 text-[10px] font-semibold uppercase tracking-[0.2em] text-base-content shadow-sm backdrop-blur",style:{left:`${e5}%`},children:eU}),r("input",{type:"range",className:"absolute inset-0 z-30 h-full w-full cursor-col-resize opacity-0 disabled:cursor-not-allowed",ref:e$=>{tI=e$,tL(e2)},min:String(eJ.min),max:String(eJ.max),step:String(eQ),value:String(e2),disabled:eP,tabIndex:eR,"aria-label":tW,"aria-valuemin":String(eJ.min),"aria-valuemax":String(eJ.max),"aria-valuenow":String(e2),onInput:tz,onChange:tz})]})},{Item1:Po,Item2:Fo,Resizer:Io}),Ro="暂无数据",zo=(e$,eI)=>e$?eI?`${e$} ${eI}`:e$:eI??"",Bo=(...e$)=>Object.assign({},...e$.filter(Boolean)),Vo="text-base-content",Ho="text-primary",Uo=e$=>({fill:`color-mix(in oklab, currentColor ${e$}%, transparent)`}),Wo=e$=>({stroke:`color-mix(in oklab, currentColor ${e$}%, transparent)`}),Go=e$=>null!=e$&&!1!==e$&&""!==e$&&(!Array.isArray(e$)||e$.some(e$=>Go(e$))),Ko=e$=>{switch(e$){case"small":return"sm";case"large":return"lg";case"default":default:return"md";case"sm":case"lg":return e$}},qo=e$=>{switch(e$){case"soft":return"border border-base-300/60 bg-base-200/55 shadow-inner";case"outline":return"border border-dashed border-base-300/75 bg-base-100/45 shadow-none";default:return"border border-base-300/70 bg-base-100 shadow-[0_28px_70px_-48px_hsl(var(--bc)/0.24)]"}},Jo=e$=>{switch(e$){case"sm":return"rounded-[1.5rem] px-4 py-5";case"lg":return"rounded-[2rem] px-8 py-9";default:return"rounded-[1.75rem] px-6 py-7"}},Yo=e$=>{switch(e$){case"sm":return"gap-3";case"lg":return"gap-5";default:return"gap-4"}},Xo=e$=>{switch(e$){case"sm":return"text-sm leading-6";case"lg":return"text-base leading-7";default:return"text-sm leading-6 sm:text-[0.95rem]"}},Zo=e$=>"start"===e$?"flex flex-wrap items-center justify-start gap-3":"flex flex-wrap items-center justify-center gap-3",Qo=e$=>{switch(e$){case"sm":return"w-[9.5rem]";case"lg":return"w-[16rem]";default:return"w-[12rem]"}},$o=(e$,eI)=>{if("simple"===eI)switch(e$){case"sm":return"w-[6.5rem]";case"lg":return"w-[9.5rem]";default:return"w-[8rem]"}switch(e$){case"sm":return"w-[9rem]";case"lg":return"w-[14rem]";default:return"w-[11rem]"}},es=(e$,eI)=>"string"==typeof eI&&eI.trim()?eI:"string"==typeof e$||"number"==typeof e$?String(e$):"empty",ts=e$=>{let{normalizedSize:eI,widthClass:eR}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let eI=(0,t._$vaporWithHookId)("computed:1:0",()=>(0,t.computed)(()=>Ko(e$.size)));return{normalizedSize:eI,widthClass:(0,t._$vaporWithHookId)("computed:1:1",()=>(0,t.computed)(()=>$o(eI.get(),"default")))}}));return(0,t.vapor)(eI=>{let eL=(0,t._$createElement)("svg",eI);(0,t._$setAttribute)(eL,"viewBox","0 0 220 164"),(0,t._$setAttribute)(eL,"fill","none"),(0,t._$setAttribute)(eL,"xmlns","http://www.w3.org/2000/svg"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(zo(`${eR.get()} h-auto`,e$.className)))}),(0,t.watchEffect)(()=>{let eI=e$.style;(0,t._$setStyle)(eL,eI)}),(0,t._$setAttribute)(eL,"data-rue-empty-illustration","default"),(0,t._$setAttribute)(eL,"aria-hidden","true");let ez=(0,t._$createElement)("rect",eL);(0,t._$appendChild)(eL,ez),(0,t._$setAttribute)(ez,"x","18"),(0,t._$setAttribute)(ez,"y","38"),(0,t._$setAttribute)(ez,"width","184"),(0,t._$setAttribute)(ez,"height","98"),(0,t._$setAttribute)(ez,"rx","26"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(ez,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(ez,Uo(6))});let eW=(0,t._$createElement)("rect",eL);(0,t._$appendChild)(eL,eW),(0,t._$setAttribute)(eW,"x","18.75"),(0,t._$setAttribute)(eW,"y","38.75"),(0,t._$setAttribute)(eW,"width","182.5"),(0,t._$setAttribute)(eW,"height","96.5"),(0,t._$setAttribute)(eW,"rx","25.25"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eW,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eW,Wo(14))}),(0,t._$setAttribute)(eW,"strokeWidth","1.5");let eH=(0,t._$createElement)("rect",eL);(0,t._$appendChild)(eL,eH),(0,t._$setAttribute)(eH,"x","49"),(0,t._$setAttribute)(eH,"y","24"),(0,t._$setAttribute)(eH,"width","122"),(0,t._$setAttribute)(eH,"height","18"),(0,t._$setAttribute)(eH,"rx","9"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eH,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eH,Uo(10))});let eF=(0,t._$createElement)("rect",eL);(0,t._$appendChild)(eL,eF),(0,t._$setAttribute)(eF,"x","52"),(0,t._$setAttribute)(eF,"y","63"),(0,t._$setAttribute)(eF,"width","48"),(0,t._$setAttribute)(eF,"height","48"),(0,t._$setAttribute)(eF,"rx","18"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eF,String(Ho))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eF,Uo(14))});let eP=(0,t._$createElement)("circle",eL);(0,t._$appendChild)(eL,eP),(0,t._$setAttribute)(eP,"cx","82"),(0,t._$setAttribute)(eP,"cy","77.5"),(0,t._$setAttribute)(eP,"r","8"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eP,String(Ho))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eP,Uo(36))});let eB=(0,t._$createElement)("path",eL);(0,t._$appendChild)(eL,eB),(0,t._$setAttribute)(eB,"d","M67 96.5c8.4-11.5 15.7-17.2 22-17.2 6.6 0 14.4 6 23.4 18"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eB,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eB,Wo(16))}),(0,t._$setAttribute)(eB,"strokeWidth","6"),(0,t._$setAttribute)(eB,"strokeLinecap","round");let eK=(0,t._$createElement)("rect",eL);(0,t._$appendChild)(eL,eK),(0,t._$setAttribute)(eK,"x","116"),(0,t._$setAttribute)(eK,"y","70"),(0,t._$setAttribute)(eK,"width","56"),(0,t._$setAttribute)(eK,"height","10"),(0,t._$setAttribute)(eK,"rx","5"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eK,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eK,Uo(16))});let eV=(0,t._$createElement)("rect",eL);(0,t._$appendChild)(eL,eV),(0,t._$setAttribute)(eV,"x","116"),(0,t._$setAttribute)(eV,"y","90"),(0,t._$setAttribute)(eV,"width","40"),(0,t._$setAttribute)(eV,"height","10"),(0,t._$setAttribute)(eV,"rx","5"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eV,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eV,Uo(10))});let eq=(0,t._$createElement)("rect",eL);(0,t._$appendChild)(eL,eq),(0,t._$setAttribute)(eq,"x","122"),(0,t._$setAttribute)(eq,"y","116"),(0,t._$setAttribute)(eq,"width","54"),(0,t._$setAttribute)(eq,"height","8"),(0,t._$setAttribute)(eq,"rx","4"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eq,String(Ho))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eq,Uo(14))});let eU=(0,t._$createElement)("circle",eL);(0,t._$appendChild)(eL,eU),(0,t._$setAttribute)(eU,"cx","180"),(0,t._$setAttribute)(eU,"cy","54"),(0,t._$setAttribute)(eU,"r","10"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eU,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eU,Uo(10))});let eG=(0,t._$createElement)("path",eL);(0,t._$appendChild)(eL,eG),(0,t._$setAttribute)(eG,"d","M176 54h8M180 50v8"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eG,String(Ho))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eG,Wo(66))}),(0,t._$setAttribute)(eG,"strokeWidth","3"),(0,t._$setAttribute)(eG,"strokeLinecap","round");let eZ=(0,t._$createElement)("path",eL);return(0,t._$appendChild)(eL,eZ),(0,t._$setAttribute)(eZ,"d","M38 124c12.2-7.3 22.4-11 30.6-11 8.5 0 19.6 4.6 33.4 13.8"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eZ,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eZ,Wo(10))}),(0,t._$setAttribute)(eZ,"strokeWidth","4"),(0,t._$setAttribute)(eZ,"strokeLinecap","round"),eL})},ns=e$=>{let{normalizedSize:eI,widthClass:eR}=(0,t._$vaporWithHookId)("useSetup:0:0:dup1",()=>(0,t.useSetup)(()=>{let eI=(0,t._$vaporWithHookId)("computed:1:2",()=>(0,t.computed)(()=>Ko(e$.size)));return{normalizedSize:eI,widthClass:(0,t._$vaporWithHookId)("computed:1:3",()=>(0,t.computed)(()=>$o(eI.get(),"simple")))}}));return(0,t.vapor)(eI=>{let eL=(0,t._$createElement)("svg",eI);(0,t._$setAttribute)(eL,"viewBox","0 0 120 120"),(0,t._$setAttribute)(eL,"fill","none"),(0,t._$setAttribute)(eL,"xmlns","http://www.w3.org/2000/svg"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(zo(`${eR.get()} h-auto`,e$.className)))}),(0,t.watchEffect)(()=>{let eI=e$.style;(0,t._$setStyle)(eL,eI)}),(0,t._$setAttribute)(eL,"data-rue-empty-illustration","simple"),(0,t._$setAttribute)(eL,"aria-hidden","true");let ez=(0,t._$createElement)("circle",eL);(0,t._$appendChild)(eL,ez),(0,t._$setAttribute)(ez,"cx","60"),(0,t._$setAttribute)(ez,"cy","60"),(0,t._$setAttribute)(ez,"r","34"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(ez,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(ez,Uo(6))});let eW=(0,t._$createElement)("circle",eL);(0,t._$appendChild)(eL,eW),(0,t._$setAttribute)(eW,"cx","60"),(0,t._$setAttribute)(eW,"cy","60"),(0,t._$setAttribute)(eW,"r","34"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eW,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eW,Wo(14))}),(0,t._$setAttribute)(eW,"strokeWidth","1.5");let eH=(0,t._$createElement)("circle",eL);(0,t._$appendChild)(eL,eH),(0,t._$setAttribute)(eH,"cx","60"),(0,t._$setAttribute)(eH,"cy","60"),(0,t._$setAttribute)(eH,"r","23"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eH,String(Ho))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eH,Wo(36))}),(0,t._$setAttribute)(eH,"strokeWidth","8");let eF=(0,t._$createElement)("circle",eL);(0,t._$appendChild)(eL,eF),(0,t._$setAttribute)(eF,"cx","60"),(0,t._$setAttribute)(eF,"cy","60"),(0,t._$setAttribute)(eF,"r","6"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eF,String(Ho))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eF,Uo(66))});let eP=(0,t._$createElement)("path",eL);(0,t._$appendChild)(eL,eP),(0,t._$setAttribute)(eP,"d","M43 60h34"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eP,String(Vo))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eP,Wo(16))}),(0,t._$setAttribute)(eP,"strokeWidth","6"),(0,t._$setAttribute)(eP,"strokeLinecap","round");let eB=(0,t._$createElement)("circle",eL);(0,t._$appendChild)(eL,eB),(0,t._$setAttribute)(eB,"cx","32"),(0,t._$setAttribute)(eB,"cy","45"),(0,t._$setAttribute)(eB,"r","4"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eB,String(Ho))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eB,Uo(36))});let eK=(0,t._$createElement)("circle",eL);return(0,t._$appendChild)(eL,eK),(0,t._$setAttribute)(eK,"cx","90"),(0,t._$setAttribute)(eK,"cy","78"),(0,t._$setAttribute)(eK,"r","4"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eK,String(Ho))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eK,Uo(36))}),eL})},rs=({image:e$,description:eI,imageStyle:eR,imageAlt:eL,children:ez,size:eW,align:eH="center",variant:eF="surface",className:eP,rootClassName:eB,style:eK,classNames:eV,styles:eq,role:eU="status",...eG})=>{let eZ=Ko(eW),eY=void 0===eI?Ro:eI,eX=void 0===e$?ts:e$,eJ=Go(eX),eQ=Go(eY),e0=Go(ez),e1=zo(zo(`rue-empty relative isolate overflow-hidden ${qo(eF)} ${Jo(eZ)}`,"start"===eH?"text-left":"text-center"),zo(zo(eB,eV?.root),eP)),e2=zo(`${Qo(eZ)} max-w-full shrink-0`,eV?.image),e5=zo(`max-w-[34rem] text-base-content/68 ${Xo(eZ)}`,eV?.description),e3=zo(Zo(eH),eV?.footer),e4=Bo(eq?.root,eK),e6=Bo(eq?.image,eR),e8=Bo(eq?.description),e7=Bo(eq?.footer),e9="string"==typeof eX?r("img",{src:eX,alt:es(eY,eL),draggable:!1,className:"block h-auto w-full object-contain"}):eX===ts||eX===ns?(0,e.h)(eX,{size:eZ}):"function"==typeof eX?(0,e.h)(eX,{}):eX;return(0,e.h)("div",{...eG,role:eU,className:e1,style:e4,"data-rue-empty":"true","data-rue-empty-align":eH,"data-rue-empty-size":eZ,"data-rue-empty-variant":eF},i(e.Fragment,{children:[r("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-x-8 top-0 h-20 rounded-full bg-primary/10 blur-3xl"}),i("div",{className:zo(`relative z-[1] flex ${Yo(eZ)} w-full flex-col`,"start"===eH?"items-start":"items-center"),children:[eJ?r("div",{"data-rue-empty-image":"true",className:e2,style:e6,children:r(e.Fragment,{children:e9})}):null,eQ?r("div",{"data-rue-empty-description":"true",className:e5,style:e8,children:r(e.Fragment,{children:eY})}):null,e0?r("div",{"data-rue-empty-footer":"true",className:e3,style:e7,children:r(e.Fragment,{children:ez})}):null]})]}))};rs.PRESENTED_IMAGE_DEFAULT=ts,rs.PRESENTED_IMAGE_SIMPLE=ns;var is=(...e$)=>e$.filter(Boolean).join(" "),as=({className:e$})=>i(e.Fragment,{children:[r("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:e$}),r("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:e$}),r("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:e$}),r("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:e$}),r("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:e$}),r("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:e$}),r("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:e$}),r("div",{"aria-hidden":"true","data-hover3d-overlay":"",className:e$})]}),os=(e$,eI,eR,eL)=>{if(!eI&&!eR&&!eL)return e$;let{className:ez,children:eW,...eH}=eL??{},eF=is(ez,eR);return r(eI??"div",{...eH,"data-hover3d-surface":"",className:eF||void 0,children:e$})},ss=({as:e$,href:eI,target:eR,rel:eL,className:ez,surfaceAs:eW,surfaceClassName:eH,surfaceProps:eF,overlays:eP=!0,overlayClassName:eB,children:eK,...eV})=>{let eq=e$??(eI?"a":"div");return i(eq,{...eV,..."a"===eq&&null!=eI?{href:eI}:{},target:"a"===eq?eR:void 0,rel:"a"===eq?"_blank"!==eR||eL?eL:"noreferrer":void 0,className:is("hover-3d",ez),children:[os(eK,eW,eH,eF),eP?r(as,{className:eB}):null]})},cs={neutral:"text-neutral",primary:"text-primary",secondary:"text-secondary",accent:"text-accent",info:"text-info",success:"text-success",warning:"text-warning",error:"text-error"},ls={neutral:"bg-neutral border-neutral",primary:"bg-primary border-primary",secondary:"bg-secondary border-secondary",accent:"bg-accent border-accent",info:"bg-info border-info",success:"bg-success border-success",warning:"bg-warning border-warning",error:"bg-error border-error"},us=(...e$)=>e$.filter(Boolean).join(" "),ds=e$=>Array.isArray(e$)?e$.flatMap(e$=>ds(e$)):fs(e$)?[e$]:[],fs=e$=>null!=e$,ps=(e$,eI)=>e$??eI,ms=e$=>{if(e$)return"left"===e$?"start":"right"===e$?"end":e$},hs=(e$,eI,eR)=>(e$.placement??ms(e$.position))||("alternate"===eR?eI%2==0?"start":"end":"start"===eR?"start":"end"),gs=({className:e$})=>r("span",{className:us("inline-block size-3 rounded-full border-2 border-current bg-base-100 align-middle",e$)}),_s=({className:e$})=>r("span",{className:us("loading loading-spinner loading-xs",e$)}),vs=e$=>us(e$.lineClassName,e$.color?ls[e$.color]:void 0),ys=e$=>{if(!(!e$.color||ls[e$.color]))return{backgroundColor:e$.color,borderColor:e$.color}},bs=(e$,eI)=>{let eR=e$.color?cs[e$.color]:void 0,eL=us(e$.iconClassName,eR);return e$.middle?{className:us(e$.middle.className,eR),content:e$.middle.content}:fs(e$.icon)?{className:eL,content:e$.icon}:fs(e$.dot)?{className:eL,content:e$.dot}:e$.loading?{className:eL,content:r(_s,{})}:e$.color&&!cs[e$.color]?{className:e$.iconClassName,content:r("span",{style:{color:e$.color},children:r(gs,{})})}:eI?{className:eL,content:r(gs,{})}:void 0},xs=(e$,eI)=>{let eR=e$.title??e$.label,eL=e$.content??e$.children??e$.title??e$.label,ez=fs(eR)&&eL!==eR;if(!fs(eL))return{start:e$.start,end:e$.end,autoMode:!1};let eW={box:e$.contentBox??e$.box,className:e$.contentClassName,content:eL},eH=ez?{box:e$.titleBox,className:e$.titleClassName,content:eR}:void 0;return"start"===eI?{start:e$.start??eW,end:e$.end??eH,autoMode:!0}:{start:e$.start??eH,end:e$.end??eW,autoMode:!0}},Ss=(e$,eI)=>e$?{key:"__timeline_pending__",content:!0===e$?"Pending":e$,dot:eI,loading:!fs(eI),contentBox:!0,liClassName:"opacity-80"}:null,Cs=(e$,eI,eR,eL,ez)=>{let eW=e$.slice(),eH=Ss(eL,ez);return eH&&eW.push(eH),eR&&eW.reverse(),eW.map((e$,eR)=>{let eL=hs(e$,eR,eI),{start:ez,end:eH,autoMode:eF}=e$.start||e$.end?{start:e$.start,end:e$.end,autoMode:!1}:xs(e$,eL);return{key:e$.key,beforeLine:e$.beforeLine??eR>0,afterLine:e$.afterLine??eR<eW.length-1,start:ez,middle:bs(e$,eF),end:eH,liClassName:us(e$.liClassName,e$.className),lineClassName:vs(e$),lineStyle:ys(e$)}})},ws=({box:e$,className:eI,children:eR})=>r("div",{className:us("timeline-start",e$&&"timeline-box",eI),children:eR}),Ts=({className:e$,children:eI})=>r("div",{className:us("timeline-middle",e$),children:eI}),Es=({box:e$,className:eI,children:eR})=>r("div",{className:us("timeline-end",e$&&"timeline-box",eI),children:eR}),Ds=(e$,eI)=>i("li",{className:e$.liClassName,children:[e$.beforeLine?r("hr",{className:e$.lineClassName,style:e$.lineStyle}):null,e$.start?r(ws,{box:e$.start.box,className:e$.start.className,children:e$.start.content}):null,e$.middle?r(Ts,{className:e$.middle.className,children:e$.middle.content}):null,e$.end?r(Es,{box:e$.end.box,className:e$.end.className,children:e$.end.content}):null,e$.afterLine?r("hr",{className:e$.lineClassName,style:e$.lineStyle}):null]},e$.key??eI),Os=Object.assign(({direction:e$,orientation:eI,mode:eR,snapIcon:eL,compact:ez,reverse:eW,pending:eH,pendingDot:eF,className:eP,children:eB,items:eK})=>{let eV=ps(e$,eI),eq=us("timeline",eV&&`timeline-${eV}`,eL&&"timeline-snap-icon",ez&&"timeline-compact",eP);if(eK&&eK.length){let e$=Cs(eK,eR,eW,eH,eF);return(0,e.h)("ul",{className:eq},...e$.map(Ds))}if(eH){let e$=Cs([],eR,eW,eH,eF);return(0,e.h)("ul",{className:eq},...e$.map(Ds))}return(0,e.h)("ul",{className:eq},...ds(eB))},{Start:ws,Middle:Ts,End:Es}),ks=(...e$)=>e$.filter(Boolean).join(" "),As=e$=>{switch(e$){case"secondary":return"text-base-content/65";case"success":return"text-success";case"warning":return"text-warning";case"danger":return"text-error";default:return}},js=({type:e$,disabled:eI,underline:eR,deleted:eL,strong:ez,italic:eW,className:eH,display:eF,link:eP})=>ks(eF,eP?"link link-hover decoration-current underline-offset-4":void 0,As(e$),eI?"cursor-not-allowed opacity-45":void 0,eR?"underline decoration-current underline-offset-4":void 0,eL?"line-through":void 0,ez?"font-semibold":void 0,eW?"italic":void 0,eH),Ms=(e$,{mark:eI,code:eR,keyboard:eL})=>{let ez=e$;return eL&&(ez=r("kbd",{className:"kbd kbd-sm align-middle",children:ez})),eR&&(ez=r("code",{className:"rounded bg-base-200 px-1.5 py-0.5 text-[0.9em]",children:ez})),eI&&(ez=r("mark",{className:"rounded bg-warning/20 px-1 py-0.5 text-inherit",children:ez})),ez},Ns=({as:e$="div",className:eI,style:eR,children:eL,...ez})=>r("article"===e$?"article":"section"===e$?"section":"div",{...{...ez,className:ks("rue-typography text-base-content",eI),style:eR},children:eL}),Ps=({as:e$="span",type:eI,disabled:eR,mark:eL,code:ez,keyboard:eW,underline:eH,delete:eF,strong:eP,italic:eB,className:eK,style:eV,children:eq,...eU})=>{let eG=Ms(eq,{mark:eL,code:ez,keyboard:eW}),eZ={...eU,className:js({type:eI,disabled:eR,underline:eH,deleted:eF,strong:eP,italic:eB,className:eK,display:"span"===e$?"inline":"block"}),style:eV,"aria-disabled":eR?"true":void 0};return r("div"===e$?"div":"p"===e$?"p":"span",{...eZ,children:eG})},Fs=({href:e$,target:eI,rel:eR,type:eL,disabled:ez,mark:eW,code:eH,keyboard:eF,underline:eP,delete:eB,strong:eK,italic:eV,className:eq,style:eU,children:eG,tabIndex:eZ,...eY})=>{let eX=Ms(eG,{mark:eW,code:eH,keyboard:eF});return r("a",{...eY,href:ez?void 0:e$,target:eI,rel:"_blank"!==eI||eR?eR:"noreferrer",className:js({type:eL,disabled:ez,underline:eP??!0,deleted:eB,strong:eK,italic:eV,className:eq,display:"inline",link:!0}),style:eU,"aria-disabled":ez?"true":void 0,tabindex:ez?"-1":void 0===eZ?void 0:String(eZ),children:eX})},Is=e$=>{switch(e$){case 1:return"block text-4xl font-semibold tracking-tight text-balance md:text-5xl";case 2:return"block text-3xl font-semibold tracking-tight text-balance md:text-4xl";case 3:return"block text-2xl font-semibold tracking-tight text-balance md:text-3xl";case 4:return"block text-xl font-semibold tracking-tight text-balance md:text-2xl";default:return"block text-lg font-semibold tracking-tight text-balance md:text-xl"}},Ls=Object.assign(Ns,{Text:Ps,Link:Fs,Title:({level:e$=1,type:eI,disabled:eR,mark:eL,code:ez,keyboard:eW,underline:eH,delete:eF,strong:eP,italic:eB,className:eK,style:eV,children:eq,...eU})=>{let eG={...eU,className:ks(Is(e$),js({type:eI,disabled:eR,underline:eH,deleted:eF,strong:eP,italic:eB,className:eK})),style:eV,"aria-disabled":eR?"true":void 0},eZ=Ms(eq,{mark:eL,code:ez,keyboard:eW});return r(1===e$?"h1":2===e$?"h2":3===e$?"h3":4===e$?"h4":"h5",{...eG,children:eZ})},Paragraph:({type:e$,disabled:eI,mark:eR,code:eL,keyboard:ez,underline:eW,delete:eH,strong:eF,italic:eP,className:eB,style:eK,children:eV,...eq})=>r("p",{...eq,className:ks("block leading-7 text-base-content/80",js({type:e$,disabled:eI,underline:eW,deleted:eH,strong:eF,italic:eP,className:eB})),style:eK,"aria-disabled":eI?"true":void 0,children:Ms(eV,{mark:eR,code:eL,keyboard:ez})})}),Rs=(e$,eI)=>eI?`${e$} ${eI}`:e$,zs=(e$,eI)=>e$&&eI?{...e$,...eI}:eI??e$,Bs=(e$,eI,eR,eL)=>{let ez=e$.key??eI,eW=e$.children??e$.text,eH=Rs(eR??"",e$.className).trim()||void 0,eF=zs(eL,e$.style);return e$.href?r(Ls.Link,{href:e$.href,target:e$.target,rel:e$.rel,type:e$.type,disabled:e$.disabled,mark:e$.mark,code:e$.code,keyboard:e$.keyboard,underline:e$.underline,delete:e$.delete,strong:e$.strong,italic:e$.italic,className:eH,style:eF,children:eW},ez):r(Ls.Text,{as:e$.as,type:e$.type,disabled:e$.disabled,mark:e$.mark,code:e$.code,keyboard:e$.keyboard,underline:e$.underline,delete:e$.delete,strong:e$.strong,italic:e$.italic,className:eH,style:eF,children:eW},ez)},Vs=Object.assign(({as:e$="span",className:eI,style:eR,children:eL,items:ez,innerClassName:eW,innerStyle:eH,itemClassName:eF,itemStyle:eP,...eB})=>{let eK=Rs("text-rotate",eI),eV=ez&&ez.length?r("span",{className:eW,style:eH,children:ez.map((e$,eI)=>Bs(e$,eI,eF,eP))}):eL;return r("div"===e$?"div":"span",{...eB,className:eK,style:eR,children:eV})},{Text:Ls.Text,Link:Ls.Link,Title:Ls.Title,Paragraph:Ls.Paragraph}),Hs=["neutral","primary","secondary","accent","info","success","warning","error"],Us=(...e$)=>e$.filter(Boolean).join(" "),Ws=e$=>null!=e$&&!1!==e$&&""!==e$&&(!Array.isArray(e$)||e$.some(e$=>Ws(e$))),Gs=e$=>!!e$&&Hs.includes(e$),Ks=e$=>{switch(e$){case"default":return"neutral";case"processing":return"info";case"success":case"warning":case"error":return e$;default:return Gs(e$)?e$:void 0}},qs=e$=>{switch(e$){case"small":return"sm";case"default":case"medium":return"md";case"large":return"lg";default:return e$}},Js=e$=>{switch(qs(e$)??"md"){case"xs":return"min-h-4 min-w-4 px-1 text-[10px]";case"sm":return"min-h-5 min-w-5 px-1 text-[10px]";case"lg":return"min-h-6 min-w-6 px-2 text-sm";case"xl":return"min-h-7 min-w-7 px-2.5 text-sm";default:return"min-h-5 min-w-5 px-1.5 text-[11px]"}},Ys=e$=>{switch(e$){case"primary":return{dotClass:"status-primary",badgeClass:"bg-primary text-primary-content",textClass:"text-primary"};case"secondary":return{dotClass:"status-secondary",badgeClass:"bg-secondary text-secondary-content",textClass:"text-secondary"};case"accent":return{dotClass:"status-accent",badgeClass:"bg-accent text-accent-content",textClass:"text-accent"};case"info":return{dotClass:"status-info",badgeClass:"bg-info text-info-content",textClass:"text-info"};case"success":return{dotClass:"status-success",badgeClass:"bg-success text-success-content",textClass:"text-success"};case"warning":return{dotClass:"status-warning",badgeClass:"bg-warning text-warning-content",textClass:"text-warning"};case"error":return{dotClass:"status-error",badgeClass:"bg-error text-error-content",textClass:"text-error"};case"neutral":return{dotClass:"status-neutral",badgeClass:"bg-neutral text-neutral-content",textClass:"text-neutral"};default:return{dotClass:"",badgeClass:"bg-neutral text-neutral-content",textClass:"text-base-content"}}},Xs=e$=>"number"==typeof e$?`${Math.abs(e$)}px`:String(e$).trim().replace(/^-/,""),Zs=e$=>{if("number"==typeof e$)return`${-1*e$}px`;let eI=String(e$).trim();return eI.startsWith("-")?eI.slice(1):`-${eI}`},Qs=e$=>{if(e$)return{insetInlineEnd:Zs(e$[0]),marginTop:Xs(e$[1])}},$s=({dot:e$,displayCount:eI})=>{if(e$)return"pe-3.5";let eR=`${eI??""}`;return eR.length>=3?"pe-8":2===eR.length?"pe-7":"pe-6"},ec=(e$,eI)=>"number"==typeof e$&&e$>eI?`${eI}+`:e$,tc=({as:e$="span",ariaLabel:eI,size:eR,color:eL,status:ez,text:eW,count:eH=null,showZero:eF=!1,overflowCount:eP=99,dot:eB=!1,offset:eK,title:eV,className:eq,style:eU,children:eG,...eZ})=>{let eY=qs(eR),eX=Ws(eG),eJ=null!=eH,eQ=Ks(ez),e0=eL??eQ??(eX||eJ||eB?"error":void 0),e1=Gs(e0)?e0:void 0,e2="string"!=typeof e0||e1?void 0:e0,e5=Ys(e1),e3=eB?"":ec(eH,eP),e4=0===e3||"0"===e3,e6=!eJ||e4&&!eF,e8=eB&&!e4,e7=0===eW||!!eW&&!0!==eW,e9=e7&&(!eJ||e8||!e6),t$=!eJ&&!eB,tI=!eX&&e7&&eJ&&!e8&&!e6&&(void 0!==ez||void 0!==eL),tR=!eX&&e7&&(e8||!e6),tL="processing"===ez?"animate-pulse":void 0,tz=eV??("number"==typeof e3||"string"==typeof e3?`${e3}`:void 0),tW=(eR,eL,ez)=>{let eW={...eZ,className:Us(eL,eq),style:eU||ez?{...eU,...ez}:void 0};return void 0!==eI&&(eW["aria-label"]=eI),r("div"===e$?"div":"span",{...eW,children:eR})},tH=(e$,eI,eR)=>r("span",{className:Us("status",eY?`status-${eY}`:void 0,e5.dotClass,tL,e$),style:e2?{backgroundColor:e2,color:e2,...eI}:eI,title:eR}),tF=(e$,eI)=>r("span",{className:Us("inline-flex items-center justify-center whitespace-nowrap rounded-full font-medium leading-none shadow-sm",Js(eR),e5.badgeClass,e$),style:e2?{backgroundColor:e2,color:"#fff",...eI}:eI,title:tz,children:e3});if(!eX&&!e9&&(e8||!eJ))return tW(null,Us("status",eY?`status-${eY}`:void 0,e5.dotClass,tL),e2?{backgroundColor:e2,color:e2}:void 0);let tP=e9?r("span",{className:Us("text-sm leading-none",t$&&!e2?e5.textClass:void 0),style:t$&&e2?{color:e2}:void 0,children:eW}):null,tB=Qs(eK),tK=tI?i("span",{className:"inline-flex items-center gap-2",children:[tH("shrink-0"),r("span",{className:"text-sm leading-none",children:eW})]}):eW,tV=e$=>tW(i("span",{className:"indicator inline-flex align-middle",children:[e$,r("span",{className:Us("inline-flex items-center text-sm leading-none text-base-content",$s({dot:e8,displayCount:e3})),children:tK})]}));return eX||!e8&&eJ?eX?tW(i(e.Fragment,{children:[i("span",{className:"indicator inline-flex w-fit shrink-0 align-middle",children:[e8?tH("indicator-item ring-2 ring-base-100 shadow-sm",tB,tz):e6?null:tF("indicator-item ring-2 ring-base-100",tB),r("span",{className:"inline-flex w-fit shrink-0 align-middle",children:eG})]}),tP]}),"inline-flex items-center gap-2 align-middle"):e6?null:tR?tV(tF("indicator-item",tB)):tW(i(e.Fragment,{children:[tF(),tP]}),"inline-flex items-center gap-2 align-middle"):tR?tV(tH("indicator-item ring-2 ring-base-100 shadow-sm",tB,tz)):tW(i(e.Fragment,{children:[tH(),tP]}),"inline-flex items-center gap-2 align-middle")},nc=".",rc=",",ic="HH:mm:ss",ac=1e3/30,oc=1e3,sc=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],cc=(e$,eI)=>eI?`${e$} ${eI}`:e$,lc=e$=>null!=e$&&!1!==e$&&(!Array.isArray(e$)||e$.some(e$=>lc(e$))),uc=e$=>{if(null==e$)return null;let eI=e$ instanceof Date?e$.getTime():new Date(e$).getTime();return Number.isFinite(eI)?eI:null},dc=({value:e$,formatter:eI,precision:eR,decimalSeparator:eL=nc,groupSeparator:ez=rc})=>{if("function"==typeof eI)return eI(e$);if(!lc(e$))return null;if("number"!=typeof e$&&"string"!=typeof e$)return e$;let eW=String(e$),eH=eW.match(/^(-?)(\d*)(\.(\d+))?$/);if(!eH||"-"===eW)return eW;let eF=eH[1],eP=eH[2]||"0",eB=eH[4]||"";return eP=eP.replace(/\B(?=(\d{3})+(?!\d))/g,ez),"number"==typeof eR&&eR>=0&&(eB=eB.padEnd(eR,"0").slice(0,eR>0?eR:0)),`${eF}${eP}${eB?`${eL}${eB}`:""}`},fc=({value:e$,children:eI,valueRender:eR,formatter:eL,precision:ez,decimalSeparator:eW,groupSeparator:eH})=>{let eF=lc(e$)?dc({value:e$,formatter:eL,precision:ez,decimalSeparator:eW,groupSeparator:eH}):eI;return"function"==typeof eR?eR(eF):eF},pc=e$=>{let eI=[],eR=0;for(;eR<e$.length;){let eL=e$[eR];if("["===eL){let eL=e$.indexOf("]",eR+1),ez=-1===eL?e$.slice(eR+1):e$.slice(eR+1,eL);if(ez){let e$=eI[eI.length-1];e$?.type==="literal"?e$.content+=ez:eI.push({type:"literal",content:ez})}eR=-1===eL?e$.length:eL+1;continue}if(/[YMDHmsS]/.test(eL)){let ez=eR+1;for(;ez<e$.length&&e$[ez]===eL;)ez+=1;eI.push({type:"unit",unit:eL,digits:ez-eR}),eR=ez;continue}let ez=eR+1;for(;ez<e$.length&&"["!==e$[ez]&&!/[YMDHmsS]/.test(e$[ez]);)ez+=1;let eW=e$.slice(eR,ez);if(eW){let e$=eI[eI.length-1];e$?.type==="literal"?e$.content+=eW:eI.push({type:"literal",content:eW})}eR=ez}return eI},mc=(e$,eI)=>{let eR=new Set;eI.forEach(e$=>{"unit"===e$.type&&eR.add(e$.unit)});let eL=Math.max(e$,0),ez={};return sc.forEach(([e$,eI])=>{if(!eR.has(e$))return;let eW=Math.floor(eL/eI);ez[e$]=eW,eL-=eW*eI}),ez},hc=(e$,eI)=>{let eR=pc(eI),eL=mc(e$,eR);return eR.map(e$=>{if("literal"===e$.type)return e$.content;let eI=String(eL[e$.unit]??0);return e$.digits>1?eI.padStart(e$.digits,"0"):eI}).join("")},gc=(e$,eI)=>"number"==typeof eI&&eI>0?eI:e$.includes("S")?ac:oc,_c=({figure:e$,figureClassName:eI,figureStyle:eR,title:eL,titleClassName:ez,titleStyle:eW,value:eH,valueClassName:eF,valueStyle:eP,valueRender:eB,prefix:eK,suffix:eV,loading:eq,formatter:eU,precision:eG,decimalSeparator:eZ,groupSeparator:eY,desc:eX,descClassName:eJ,descStyle:eQ,actions:e0,actionsClassName:e1,actionsStyle:e2})=>i(e.Fragment,{children:[lc(e$)?r(Cc,{className:eI,style:eR,children:e$}):null,lc(eL)?r(bc,{className:ez,style:eW,children:eL}):null,eq||lc(eH)||lc(eK)||lc(eV)||"function"==typeof eU||"function"==typeof eB?r(xc,{className:eF,style:eP,value:eH,prefix:eK,suffix:eV,loading:eq,valueRender:eB,formatter:eU,precision:eG,decimalSeparator:eZ,groupSeparator:eY}):null,lc(eX)?r(Sc,{className:eJ,style:eQ,children:eX}):null,lc(e0)?r(wc,{className:e1,style:e2,children:e0}):null]}),vc=({direction:e$,className:eI,children:eR,items:eL})=>{let ez=cc(e$?`stats stats-${e$}`:"stats",eI);return eL&&eL.length?r("div",{className:ez,children:eL.map((e$,eI)=>r(yc,{...e$},e$.key??eI))}):r("div",{className:ez,children:eR})},yc=({center:e$,className:eI,children:eR,figure:eL,figureClassName:ez,figureStyle:eW,title:eH,titleClassName:eF,titleStyle:eP,value:eB,valueClassName:eK,valueStyle:eV,valueRender:eq,prefix:eU,suffix:eG,loading:eZ,formatter:eY,precision:eX,decimalSeparator:eJ,groupSeparator:eQ,desc:e0,descClassName:e1,descStyle:e2,actions:e5,actionsClassName:e3,actionsStyle:e4})=>r("div",{className:cc(e$?"stat place-items-center":"stat",eI),children:lc(eR)?eR:_c({figure:eL,figureClassName:ez,figureStyle:eW,title:eH,titleClassName:eF,titleStyle:eP,value:eB,valueClassName:eK,valueStyle:eV,valueRender:eq,prefix:eU,suffix:eG,loading:eZ,formatter:eY,precision:eX,decimalSeparator:eJ,groupSeparator:eQ,desc:e0,descClassName:e1,descStyle:e2,actions:e5,actionsClassName:e3,actionsStyle:e4})}),bc=({className:e$,style:eI,children:eR})=>r("div",{className:cc("stat-title",e$),style:eI,children:eR}),xc=({className:e$,style:eI,children:eR,value:eL,prefix:ez,suffix:eW,loading:eH,valueRender:eF,formatter:eP,precision:eB,decimalSeparator:eK,groupSeparator:eV})=>{let eq=fc({value:eL,children:eR,valueRender:eF,formatter:eP,precision:eB,decimalSeparator:eK,groupSeparator:eV});return i("div",{className:cc("stat-value",e$),style:eI,children:[lc(ez)?r("span",{className:"stat-value-prefix mr-2 text-base-content/70 text-[0.55em]","aria-hidden":"true",children:ez}):null,eH?r("span",{className:"skeleton inline-block h-[1.15em] w-24 max-w-full align-middle","data-stat-loading":"true","aria-hidden":"true"}):lc(eq)?r("span",{className:"stat-value-text","data-stat-value":"true",children:eq}):null,lc(eW)?r("span",{className:"stat-value-suffix ml-2 text-base-content/70 text-[0.55em]","aria-hidden":"true",children:eW}):null]})},Sc=({className:e$,style:eI,children:eR})=>r("div",{className:cc("stat-desc",e$),style:eI,children:eR}),Cc=({className:e$,style:eI,children:eR})=>r("div",{className:cc("stat-figure",e$),style:eI,children:eR}),wc=({className:e$,style:eI,children:eR})=>r("div",{className:cc("stat-actions",e$),style:eI,children:eR}),Tc=({type:e$="countdown",className:eI,center:eR,figure:eL,figureClassName:ez,figureStyle:eW,title:eH,titleClassName:eF,titleStyle:eP,valueClassName:eB,valueStyle:eK,prefix:eV,suffix:eq,loading:eU,desc:eG,descClassName:eZ,descStyle:eY,actions:eX,actionsClassName:eJ,actionsStyle:eQ,value:e0,format:e1=ic,interval:e2,ariaLive:e5,onChange:e3,onFinish:e4})=>{let e6=(0,e.ref)(0),e8=(0,e.useRef)(null),e7=(0,e.useRef)(!1),e9=()=>{null!=e8.current&&(clearInterval(e8.current),e8.current=null)},t$=()=>{let eI=uc(e0);if(null==eI)return e6.value=0,e3&&e3(void 0),e9(),!1;let eR=Date.now(),eL=Math.max("countup"===e$?eR-eI:eI-eR,0);return e6.value=eL,e3&&e3(eL),"countdown"===e$&&eL<=0?(e9(),e7.current||(e7.current=!0,e4&&e4()),!1):(e7.current=!1,!0)};return(0,e.watch)(()=>`${e$}|${uc(e0)??"invalid"}|${e1}|${e2??""}`,()=>{e7.current=!1,e9(),t$()&&(e8.current=setInterval(t$,gc(e1,e2)))},{immediate:!0}),(0,e.onUnmounted)(e9),r(yc,{center:eR,className:eI,figure:eL,figureClassName:ez,figureStyle:eW,title:eH,titleClassName:eF,titleStyle:eP,value:r("span",{"data-stat-timer":e$,"aria-live":e5??(e1.includes("S")?"off":"polite"),"aria-label":hc(e6.value,e1),children:hc(e6.value,e1)}),valueClassName:eB,valueStyle:eK,prefix:eV,suffix:eq,loading:eU,desc:eG,descClassName:eZ,descStyle:eY,actions:eX,actionsClassName:eJ,actionsStyle:eQ})},Ec=Object.assign(vc,{Item:yc,Title:bc,Value:xc,Desc:Sc,Figure:Cc,Actions:wc,Timer:Tc,Countdown:e$=>r(Tc,{...e$,type:"countdown"})}),Dc=e$=>e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),Oc=e$=>{if(e$)return"string"==typeof e$?e$.trim()||void 0:Object.entries(e$).filter(([,e$])=>null!=e$).map(([e$,eI])=>`${e$.startsWith("--")?e$:Dc(e$)}:${String(eI)}`).join("; ")||void 0},kc=(e$,eI)=>eI?`${e$} ${eI}`:e$,Ac=e$=>null==e$||!1===e$?[]:Array.isArray(e$)?e$.flatMap(e$=>Ac(e$)):[e$],jc=(e$,eI,eR)=>Math.min(eR,Math.max(eI,e$)),Mc=(e$,eI,eR)=>{if(eI<=0)return 0;if(eR){let eR=e$%eI;return eR>=0?eR:eR+eI}return jc(e$,0,eI-1)},Nc=e$=>{switch(e$){case"left":return"start";case"right":return"end";default:return e$??"bottom"}},Pc=(e$,eI)=>{"function"==typeof e$?e$(eI):e$&&"object"==typeof e$&&(e$.current=eI??void 0)},Fc=(e$,eI,eR)=>"function"==typeof e$?e$(eI):e$??eR,Ic=(e$,eI,eR,eL,ez)=>{let eW=eR;return"center"===e$?eW=eR-(eI-eL)/2:"end"===e$&&(eW=eR-(eI-eL)),jc(eW,0,Math.max(ez-eI,0))},Lc=e$=>{e$.style.transitionProperty="",e$.style.transitionDuration="",e$.style.transitionTimingFunction=""},Rc=e$=>{e$.style.position="",e$.style.inset="",e$.style.opacity="",e$.style.pointerEvents="",e$.style.zIndex="",e$.style.transitionProperty="",e$.style.transitionDuration="",e$.style.transitionTimingFunction="",e$.style.transform=""},zc=Object.assign(({align:e$="start",direction:eI="horizontal",effect:eR="scrollx",fade:eL=!1,auto:ez=!1,autoplay:eW=!1,interval:eH=3e3,autoplaySpeed:eF,loop:eP=!0,infinite:eB,autoDirection:eK="forward",activeIndex:eV,defaultActiveIndex:eq,initialSlide:eU,slickGoTo:eG,dots:eZ=!1,arrows:eY=!1,prevArrow:eX,nextArrow:eJ,dotPlacement:eQ,dotPosition:e0,draggable:e1=!1,waitForAnimate:e2=!1,speed:e5=500,easing:e3="ease",pauseOnHover:e4,adaptiveHeight:e6=!1,onIndexChange:e8,beforeChange:e7,afterChange:e9,apiRef:t$,className:tI,style:tR,children:tL,items:tz,...tW})=>{let tH,tF=tW.ref,tP=tW.onMouseEnter,tB=tW.onMouseLeave,tK=tW.onPointerDown,tV=tW.onPointerUp,tq=tW.onPointerCancel,tU=tW.onPointerLeave;"ref"in tW&&delete tW.ref,"onMouseEnter"in tW&&delete tW.onMouseEnter,"onMouseLeave"in tW&&delete tW.onMouseLeave,"onPointerDown"in tW&&delete tW.onPointerDown,"onPointerUp"in tW&&delete tW.onPointerUp,"onPointerCancel"in tW&&delete tW.onPointerCancel,"onPointerLeave"in tW&&delete tW.onPointerLeave;let tG=eL?"fade":eR,tZ=eB??eP,tY="object"==typeof eW||eW||ez,tX=eF??eH,tJ=e4??tY,tQ=Nc(eQ??e0),t0=tY&&"object"==typeof eW&&!!eW.dotDuration,t1=Oc(tR),t2=Ac(tL),t5=tz??[],t3=t5.length>0?t5.length:t2.length,t4=eG??eV,t6=Mc("number"==typeof t4?t4:eq??eU??0,t3||1,tZ),t8=(0,e.useRef)(),t7=(0,e.useRef)(),t9=(0,e.useRef)(null),r$=(0,e.useRef)(null),rI=(0,e.useRef)(null),rR=(0,e.useRef)(null),rL=(0,e.useRef)(null),rz=(0,e.useRef)(!1),rW=(0,e.useRef)(null),rH=(0,e.ref)(0),rF=(0,e.ref)(!1),rP=(0,e.ref)(t6),rB=()=>{let e$=t7.current;return e$?Array.from(e$.children).filter(e$=>e$ instanceof HTMLElement):[]},rK=()=>{null!=r$.current&&(clearTimeout(r$.current),r$.current=null),rz.current=!1},rV=()=>{null!=t9.current&&(clearInterval(t9.current),t9.current=null)},rq=()=>{rV(),!(!tY||1>=(rB().length||t3))&&(tJ&&rF.value||(t9.current=setInterval(()=>{rY(rP.value+("backward"===eK?-1:1),{source:"autoplay"})},tX)))},rU={nativeElement:void 0,goTo:(e$,eI=!1)=>{rY(e$,{source:"api",dontAnimate:eI})},next:()=>{rY(rP.value+1,{source:"api"})},prev:()=>{rY(rP.value-1,{source:"api"})},autoPlay:e$=>{"leave"===e$||"blur"===e$?rV():rq()},stop:()=>{rV()}},rG=()=>{rU.nativeElement=t8.current,Pc(tF,t8.current?rU:null),Pc(t$,t8.current?rU:null)},rZ=(eR=!1)=>{rG(),"fade"===tG?(e$=>{let eI=t8.current,eR=t7.current;if(!eI||!eR)return;let eL=rB();if(eI.style.position="relative",eI.style.overflow="hidden",eI.style.transition=`height ${e5}ms ${e3}`,eR.style.display="block",eR.style.width="100%",eR.style.height="100%",eR.style.position="relative",eR.style.transform="",Lc(eR),!eL.length)return;let ez=Mc(rP.value,eL.length,tZ);if(ez!==rP.value){rP.value=ez;return}let eW=eL[ez],eH=eL.reduce((e$,eI)=>Math.max(e$,eI.offsetHeight),0),eF=e6?eW.offsetHeight:eH;eF>0&&(eI.style.height=`${eF}px`,eR.style.minHeight=`${eF}px`),eL.forEach((eI,eR)=>{eI.style.position="absolute",eI.style.inset="0",eI.style.width="100%",eI.style.height="100%",eI.style.opacity=eR===ez?"1":"0",eI.style.pointerEvents=eR===ez?"auto":"none",eI.style.zIndex=eR===ez?"1":"0",eI.style.transitionProperty="opacity",eI.style.transitionDuration=e$?"0ms":`${e5}ms`,eI.style.transitionTimingFunction=e3,eI.style.transform="translate3d(0, 0, 0)"})})(eR):(eR=>{let eL=t8.current,ez=t7.current;if(!eL||!ez)return;let eW=rB();if(eL.style.position="relative",eL.style.overflow="hidden",eL.style.transition=e6?`height ${e5}ms ${e3}`:"",ez.style.display="flex",ez.style.flexDirection="vertical"===eI?"column":"row",ez.style.width="vertical"===eI?"100%":"",ez.style.height="vertical"===eI?"100%":"",ez.style.position="",ez.style.minHeight="",ez.style.transitionProperty="transform",ez.style.transitionDuration=eR?"0ms":`${e5}ms`,ez.style.transitionTimingFunction=e3,eW.forEach(Rc),!eW.length){ez.style.transform="";return}let eH=Mc(rP.value,eW.length,tZ);if(eH!==rP.value){rP.value=eH;return}let eF=eW[eH],eP=Ic(e$,"vertical"===eI?eL.clientHeight:eL.clientWidth,"vertical"===eI?eF.offsetTop:eF.offsetLeft,"vertical"===eI?eF.offsetHeight:eF.offsetWidth,"vertical"===eI?ez.scrollHeight:ez.scrollWidth);ez.style.transform="vertical"===eI?`translate3d(0, -${eP}px, 0)`:`translate3d(-${eP}px, 0, 0)`,e6&&"horizontal"===eI?eL.style.height=`${eF.offsetHeight}px`:e6||(eL.style.height="")})(eR),(()=>{let e$=t8.current;if(!e$)return;let eI=Mc(rP.value,Math.max(rJ,1),tZ);e$.setAttribute("data-rue-carousel-current",String(eI));let eR=e$.querySelector('[data-rue-carousel-prev="true"]'),eL=e$.querySelector('[data-rue-carousel-next="true"]');eR&&(eR.disabled=!tZ&&eI<=0),eL&&(eL.disabled=!tZ&&eI>=Math.max(0,rJ-1)),Array.from(e$.querySelectorAll("[data-rue-carousel-dot]")).forEach((e$,eR)=>{let eL=eR===eI;eL?e$.setAttribute("aria-current","true"):e$.removeAttribute("aria-current"),e$.classList.toggle("w-9",eL),e$.classList.toggle("bg-primary/30",eL),e$.classList.toggle("w-2.5",!eL);let ez=e$.querySelector("[data-rue-carousel-dot-fill]");ez&&(ez.classList.toggle("scale-100",eL),ez.classList.toggle("scale-0",!eL))})})(),requestAnimationFrame(()=>{(()=>{if(!t0)return;let e$=t8.current;if(!e$)return;let eI=e$.querySelector('[data-rue-carousel-dot-progress="active"]');eI&&(eI.style.transition="none",eI.style.transform="scaleX(0)",requestAnimationFrame(()=>{eI.style.transition=`transform ${tX}ms linear`,eI.style.transform="scaleX(1)"}))})()})},rY=(e$,eI={})=>{let eR=rB().length||t3;if(eR<=0)return;let eL=Mc(e$,eR,tZ),ez=Mc(rP.value,eR,tZ);if(!(e2&&rz.current&&!eI.dontAnimate)){var eW;if(eL===ez)return void rZ(!!eI.dontAnimate);e7&&e7(ez,eL),rP.value=eL,"prop"!==eI.source&&(rL.current=eL),e8&&e8(eL),rH.value+=1,rZ(!!eI.dontAnimate),eW=!!eI.dontAnimate,rK(),!eW&&e5>0&&(rz.current=!0),r$.current=setTimeout(()=>{rz.current=!1,e9&&e9(eL)},eW||e5<=0?0:e5),rq()}},rX=e$=>{if(!e1||null==rW.current)return;let eR=e$ instanceof PointerEvent?e$:null,eL=(eR?"vertical"===eI?eR.clientY:eR.clientX:rW.current)-rW.current;if(rW.current=null,!(40>Math.abs(eL))){if(eL<0)return void rY(rP.value+1,{source:"user"});rY(rP.value-1,{source:"user"})}},rJ=t5.length>0?t5.length:t2.length,rQ=rJ>1,r0="carousel relative overflow-hidden";"center"===e$&&(r0+=" carousel-center"),"end"===e$&&(r0+=" carousel-end"),"vertical"===eI?r0+=" carousel-vertical":r0+=" carousel-horizontal",tI&&(r0+=` ${tI}`);let r1=(tH="pointer-events-auto z-20 gap-2","top"===tQ?`${tH} absolute left-1/2 top-4 flex -translate-x-1/2`:"bottom"===tQ?`${tH} absolute bottom-4 left-1/2 flex -translate-x-1/2`:"vertical"===eI?"start"===tQ?`${tH} absolute left-1/2 top-4 flex -translate-x-1/2`:`${tH} absolute bottom-4 left-1/2 flex -translate-x-1/2`:"start"===tQ?`${tH} absolute left-4 top-1/2 flex -translate-y-1/2 flex-col`:`${tH} absolute right-4 top-1/2 flex -translate-y-1/2 flex-col`);return(0,e.onMounted)(()=>{rG(),rZ(!0),rq(),rI.current=()=>{rZ(!0)},rR.current=()=>{rZ(!0)},"u">typeof window&&rI.current&&window.addEventListener("resize",rI.current),t8.current&&rR.current&&t8.current.addEventListener("load",rR.current,!0)}),(0,e.onUnmounted)(()=>{rV(),rK(),"u">typeof window&&rI.current&&window.removeEventListener("resize",rI.current),t8.current&&rR.current&&t8.current.removeEventListener("load",rR.current,!0),Pc(tF,null),Pc(t$,null)}),(0,e.watch)(()=>eG??eV,e$=>{if("number"!=typeof e$)return;let eI=Mc(e$,rB().length||t3||1,tZ);if(rL.current===eI){rL.current=null,rP.value=eI,rZ(!1);return}rY(eI,{source:"prop"})},{immediate:!1}),(0,e.watch)(()=>t3,e$=>{e$&&(rP.value=Mc(rP.value,e$,tZ),rZ(!0),rq())},{immediate:!1}),i("div",{...tW,ref:e$=>{t8.current=e$??void 0,rG()},className:r0,style:t1,"data-rue-carousel-current":String(rP.value),role:tW.role??"region","aria-roledescription":tW["aria-roledescription"]??"carousel",onMouseEnter:e$=>{rF.value=!0,tJ&&rV(),"function"==typeof tP&&tP(e$)},onMouseLeave:e$=>{rF.value=!1,tJ&&rq(),"function"==typeof tB&&tB(e$)},onPointerDown:e$=>{let eR;"function"==typeof tK&&tK(e$),!e1||(eR=e$.target)instanceof HTMLElement&&eR.closest("button, a, input, select, textarea, label")||(rW.current="vertical"===eI?e$.clientY:e$.clientX)},onPointerUp:e$=>{"function"==typeof tV&&tV(e$),rX(e$)},onPointerCancel:e$=>{"function"==typeof tq&&tq(e$),rW.current=null},onPointerLeave:e$=>{"function"==typeof tU&&tU(e$),e1&&rX(e$)},children:[r("div",{ref:e$=>{t7.current=e$??void 0},className:kc("fade"===tG?"relative w-full h-full":"will-change-transform","scrollx"===tG&&"vertical"===eI?"flex flex-col":"scrollx"===tG?"flex":void 0),"data-rue-carousel-track":"true",children:"fade"===tG?t5.length>0?t5.map((e$,eI)=>r("div",{className:`carousel-item${e$.className?` ${e$.className}`:""}`,"data-rue-carousel-slide":String(eI),children:e$.content},e$.key??eI)):t2.map((e$,eI)=>r("div",{className:"w-full h-full","data-rue-carousel-slide":String(eI),children:e$},eI)):t5.length>0?t5.map((e$,eI)=>r("div",{className:`carousel-item${e$.className?` ${e$.className}`:""}`,"data-rue-carousel-slide":String(eI),children:e$.content},e$.key??eI)):tL}),eY&&rQ?i(e.Fragment,{children:[r("button",{type:"button","data-rue-carousel-prev":"true",className:"btn btn-circle btn-sm sm:btn-md absolute left-3 top-1/2 z-20 -translate-y-1/2 bg-base-100/80 backdrop-blur disabled:opacity-40",disabled:!tZ&&rP.value<=0,"aria-label":"Previous slide",onClick:()=>{rY(rP.value-1,{source:"user"})},children:Fc(eX,{disabled:!tZ&&rP.value<=0,onClick:()=>rY(rP.value-1,{source:"user"}),direction:"prev"},"‹")}),r("button",{type:"button","data-rue-carousel-next":"true",className:"btn btn-circle btn-sm sm:btn-md absolute right-3 top-1/2 z-20 -translate-y-1/2 bg-base-100/80 backdrop-blur disabled:opacity-40",disabled:!tZ&&rP.value>=Math.max(0,rJ-1),"aria-label":"Next slide",onClick:()=>{rY(rP.value+1,{source:"user"})},children:Fc(eJ,{disabled:!tZ&&rP.value>=Math.max(0,rJ-1),onClick:()=>rY(rP.value+1,{source:"user"}),direction:"next"},"›")})]}):null,eZ&&rQ?r("div",{className:kc(r1,"boolean"==typeof eZ?void 0:eZ.className),children:Array.from({length:rJ}).map((e$,eI)=>{let eR=eI===Mc(rP.value,rJ||1,tZ);return i("button",{type:"button","data-rue-carousel-dot":String(eI),className:kc("relative h-2.5 overflow-hidden rounded-full bg-base-100/60 transition-all duration-300",eR?"w-9 bg-primary/30":"w-2.5 hover:bg-base-100/80"),"aria-label":`Go to slide ${eI+1}`,"aria-current":eR?"true":void 0,onClick:()=>{rY(eI,{source:"user"})},children:[r("span",{"data-rue-carousel-dot-fill":"true",className:kc("absolute inset-0 rounded-full bg-primary transition-transform duration-300",eR?"scale-100":"scale-0")}),t0&&eR?r("span",{"data-rue-carousel-dot-progress":"active",className:"absolute inset-0 origin-left rounded-full bg-primary/35",style:{transform:"scaleX(0)"}},`${eI}-${rH.value}`):null]},eI)})}):null]})},{Item:({className:e$,children:eI,...eR})=>r("div",{...eR,className:kc("carousel-item",e$),children:eI})}),Bc=(e$,eI)=>eI?`${e$} ${eI}`:e$,Vc=e$=>Array.isArray(e$)?e$.some(e$=>Vc(e$)):null!=e$&&!1!==e$,Hc=e$=>e$??"start",Uc=e$=>!(!e$||"object"!=typeof e$||Array.isArray(e$))&&("src"in e$||"alt"in e$||"className"in e$||"bodyClassName"in e$||"imgClassName"in e$||"content"in e$||"children"in e$),Wc=e$=>null!=e$.message||null!=e$.text||null!=e$.color||null!=e$.bubbleClassName||null!=e$.avatar||null!=e$.avatarSrc||null!=e$.imageSrc||null!=e$.header||null!=e$.author||null!=e$.headerName||null!=e$.timestamp||null!=e$.headerTime||null!=e$.headerClassName||null!=e$.footer||null!=e$.footerClassName||!0===e$.typing||null!=e$.typingIndicator,Gc=e$=>e$.message??e$.text,Kc=({color:e$,className:eI,children:eR,typing:eL,typingIndicator:ez})=>r("div",{className:Bc(e$?`chat-bubble chat-bubble-${e$}`:"chat-bubble",eI),children:eL?ez??r("span",{className:"loading loading-dots loading-xs","aria-label":"Typing"}):eR}),qc=({className:e$,children:eI,author:eR,time:eL,timeClassName:ez})=>{let eW=Bc("chat-header",e$);return Vc(eI)?r("div",{className:eW,children:eI}):null==eR&&null==eL?null:i("div",{className:eW,children:[eR,null==eL?null:r("time",{className:Bc("text-xs opacity-50",ez),children:eL})]})},Jc=({className:e$,children:eI})=>Vc(eI)?r("div",{className:Bc("chat-footer",e$),children:eI}):null,Yc=({className:e$,children:eI,src:eR,alt:eL,bodyClassName:ez,imgClassName:eW})=>{let eH=Bc(null!=eR||null!=ez||null!=eW?"chat-image avatar":"chat-image",e$);return Vc(eI)?r("div",{className:eH,children:eI}):null==eR?null:r("div",{className:eH,children:r("div",{className:ez??"w-10 rounded-full",children:r("img",{alt:eL??"chat image",className:eW,src:eR})})})},Xc=e$=>{let eI=e$.avatarSrc??e$.imageSrc,eR=e$.avatarAlt??e$.imageAlt,eL=e$.avatarClassName??e$.imageClassName;return null==e$.avatar?null==eI?null:r(Yc,{className:eL,src:eI,alt:eR,bodyClassName:e$.avatarBodyClassName,imgClassName:e$.avatarImgClassName}):Uc(e$.avatar)?r(Yc,{className:Bc(eL??"",e$.avatar.className),src:e$.avatar.src??eI,alt:e$.avatar.alt??eR,bodyClassName:e$.avatar.bodyClassName??e$.avatarBodyClassName,imgClassName:e$.avatar.imgClassName??e$.avatarImgClassName,children:e$.avatar.content??e$.avatar.children}):r(Yc,{className:eL,children:e$.avatar})},Zc=e$=>{if(null!=e$.header)return r(qc,{className:e$.headerClassName,children:e$.header});let eI=e$.author??e$.headerName,eR=e$.timestamp??e$.headerTime;return null==eI&&null==eR?null:r(qc,{className:e$.headerClassName,author:eI,time:eR})},Qc=(e$,eI)=>{let eR=Gc(e$);return i("div",{className:Bc(`chat chat-${Hc(e$.placement)}`,e$.className),children:[Xc(e$),Zc(e$),null!=eR||e$.typing?r(Kc,{className:e$.bubbleClassName,color:e$.color,typing:e$.typing,typingIndicator:e$.typingIndicator,children:eR}):null,r(Jc,{className:e$.footerClassName,children:e$.footer})]},eI)},$c=Object.assign(({placement:e$,className:eI,children:eR,items:eL,message:ez,text:eW,color:eH,bubbleClassName:eF,avatar:eP,avatarSrc:eB,avatarAlt:eK,avatarClassName:eV,avatarBodyClassName:eq,avatarImgClassName:eU,imageSrc:eG,imageAlt:eZ,imageClassName:eY,header:eX,author:eJ,headerName:eQ,timestamp:e0,headerTime:e1,headerClassName:e2,footer:e5,footerClassName:e3,typing:e4,typingIndicator:e6})=>eL&&eL.length?r(e.Fragment,{children:eL.map((e$,eR)=>Qc({...e$,placement:Hc(e$.placement),className:Bc(eI??"",e$.className)},e$.key??eR))}):!Vc(eR)&&Wc({placement:e$,className:eI,message:ez,text:eW,color:eH,bubbleClassName:eF,avatar:eP,avatarSrc:eB,avatarAlt:eK,avatarClassName:eV,avatarBodyClassName:eq,avatarImgClassName:eU,imageSrc:eG,imageAlt:eZ,imageClassName:eY,header:eX,author:eJ,headerName:eQ,timestamp:e0,headerTime:e1,headerClassName:e2,footer:e5,footerClassName:e3,typing:e4,typingIndicator:e6})?Qc({placement:e$,className:eI,message:ez,text:eW,color:eH,bubbleClassName:eF,avatar:eP,avatarSrc:eB,avatarAlt:eK,avatarClassName:eV,avatarBodyClassName:eq,avatarImgClassName:eU,imageSrc:eG,imageAlt:eZ,imageClassName:eY,header:eX,author:eJ,headerName:eQ,timestamp:e0,headerTime:e1,headerClassName:e2,footer:e5,footerClassName:e3,typing:e4,typingIndicator:e6}):r("div",{className:Bc(`chat chat-${Hc(e$)}`,eI),children:eR}),{Bubble:Kc,Header:qc,Footer:Jc,Image:Yc}),el=Symbol("RUE_FILE_INPUT_LIST_IGNORE"),tl=0,nl=(...e$)=>e$.filter(Boolean).join(" "),rl=e$=>!!e$&&"object"==typeof e$&&"function"==typeof e$.then,il=e$=>{switch(e$){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return e$}},al=({variant:e$,size:eI,ghost:eR,className:eL})=>{let ez="file-input",eW=il(eI);return e$&&(ez+=` file-input-${e$}`),eW&&(ez+=` file-input-${eW}`),eR&&(ez+=" file-input-ghost"),eL&&(ez+=` ${eL}`),ez},ol=({variant:e$,size:eI,ghost:eR,className:eL})=>{let ez="btn",eW=il(eI);return e$&&(ez+=` btn-${e$}`),eW&&(ez+=` btn-${eW}`),eR&&(ez+=" btn-ghost"),eL&&(ez+=` ${eL}`),ez},sl=({variant:e$,disabled:eI,dragging:eR,className:eL})=>nl("rounded-box border-2 border-dashed bg-base-100 p-5 transition",eR?"border-primary bg-primary/5":"border-base-300",e$?`text-${e$}`:void 0,eI?"cursor-not-allowed opacity-60":"cursor-pointer hover:border-primary/40 hover:bg-base-200/40",eL),cl=e$=>{switch(e$){case"done":return"badge-success";case"error":return"badge-error";case"uploading":return"badge-info";default:return"badge-ghost"}},ll=e$=>"picture"===e$||"picture-card"===e$,ul=e$=>{if(e$.type?.startsWith("image/"))return!0;let eI=e$.thumbUrl??e$.url??e$.preview??"";return/\.(png|jpe?g|gif|webp|svg|bmp|avif)$/i.test(eI)},dl=e$=>new Promise((eI,eR)=>{let eL=new FileReader;eL.onload=()=>eI(eL.result??""),eL.onerror=e$=>eR(e$),eL.readAsDataURL(e$)}),fl=e$=>dl(e$),pl=()=>(tl+=1,`rue-file-${tl}`),ml=e$=>({...e$}),hl=(e$,eI)=>{let eR="name"in e$&&"string"==typeof e$.name?e$.name:eI??"file",eL="lastModified"in e$&&"number"==typeof e$.lastModified?e$.lastModified:void 0;return{uid:pl(),name:eR,status:"ready",size:"number"==typeof e$.size?e$.size:void 0,type:e$.type||void 0,lastModified:eL,originFileObj:e$}},gl=(e$,eI)=>({status:"done",...e$,uid:e$.uid??`preset-file-${eI}-${pl()}`,name:e$.name??`file-${eI+1}`}),_l=e$=>(e$??[]).map((e$,eI)=>gl(ml(e$),eI)),vl=(e$,eI)=>!eI||eI<=0?e$:1===eI?e$.slice(-1):e$.slice(-eI),yl=e$=>"number"==typeof e$&&Number.isFinite(e$)?e$<1024?`${e$} B`:e$<1048576?`${(e$/1024).toFixed(e$>=102400?0:1)} KB`:`${(e$/1048576).toFixed(e$>=0xa00000?0:1)} MB`:"",bl=e$=>{let eI=void 0!==e$.children&&null!==e$.children&&(!Array.isArray(e$.children)||e$.children.length>0);return!0===e$.drag||eI||void 0!==e$.fileList||void 0!==e$.defaultFileList||void 0!==e$.listType&&"text"!==e$.listType||void 0!==e$.showUploadList&&!0!==e$.showUploadList||void 0!==e$.maxCount||void 0!==e$.beforeUpload||void 0!==e$.onPreview||void 0!==e$.onRemove||void 0!==e$.rootClassName||void 0!==e$.triggerClassName||void 0!==e$.listClassName||void 0!==e$.itemClassName||void 0!==e$.title||void 0!==e$.description||void 0!==e$.hint||void 0!==e$.buttonText||void 0!==e$.empty||!0===e$.directory||!1===e$.openFileDialogOnClick},xl=({className:e$})=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:nl("size-5",e$),"aria-hidden":"true",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 16V5m0 0-4 4m4-4 4 4"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 16.5V18a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1.5"})]}),Sl=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-5","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 5v14M5 12h14"})}),Cl=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-5","aria-hidden":"true",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 3h6l5 5v11a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2Z"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14 3v5h5"})]}),wl=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-5","aria-hidden":"true",children:[r("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),r("circle",{cx:"9",cy:"10",r:"1.5"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 16-5.5-5.5L7 19"})]}),Tl=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"}),r("circle",{cx:"12",cy:"12",r:"3"})]}),El=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 7 10 10M17 7 7 17"})}),Dl=({variant:e$,size:eI,ghost:eR,className:eL,rootClassName:ez,triggerClassName:eW,listClassName:eH,itemClassName:eF,drag:eP,listType:eB,showUploadList:eK,fileList:eV,defaultFileList:eq,maxCount:eU,title:eG,description:eZ,hint:eY,buttonText:eX,empty:eJ,multiple:eQ,directory:e0,disabled:e1,openFileDialogOnClick:e2,children:e5,beforeUpload:e3,onPreview:e4,onRemove:e6,previewFile:e8,onChange:e7,...e9})=>{let t$=bl({variant:e$,size:eI,ghost:eR,className:eL,rootClassName:ez,triggerClassName:eW,listClassName:eH,itemClassName:eF,drag:eP,listType:eB,showUploadList:eK,fileList:eV,defaultFileList:eq,maxCount:eU,title:eG,description:eZ,hint:eY,buttonText:eX,empty:eJ,multiple:eQ,directory:e0,disabled:e1,openFileDialogOnClick:e2,children:e5,beforeUpload:e3,onPreview:e4,onRemove:e6,previewFile:e8,onChange:e7}),tI=eB??"text",tR=eK??!0,tL=e2??!0,tz=e8??fl;if(!t$)return r("input",{...e9,type:"file",multiple:eQ,disabled:e1,className:al({variant:e$,size:eI,ghost:eR,className:eL})});let tW=(0,e.useRef)(),tH=(0,e.useRef)(),tF=e9.ref,tP=(0,e.ref)(!1),tB=void 0!==eV,tK=(0,e.ref)(_l(tB?eV:eq)),tV=(0,e.ref)(0),tq=tR&&"object"==typeof tR?tR:void 0,tU=!1!==tR,tG=tq?.showPreviewIcon??!0,tZ=tq?.showRemoveIcon??!0,tY=eQ||"number"==typeof eU&&eU>1;"ref"in e9&&delete e9.ref;let tX=()=>{tB&&(tK.value=_l(eV),tV.value+=1)},tJ=e$=>{tB||(tK.value=e$,tV.value+=1)},tQ=e$=>{"function"==typeof e7&&e7(e$)},t0=()=>{e1||!tL||tW.current?.click()},t1=()=>{tW.current&&(tW.current.value="")},t2=async e$=>{if(e$.thumbUrl)return e$.thumbUrl;if(e$.url)return e$.url;if(e$.preview)return e$.preview;let eI=e$.originFileObj;if(!eI)return"";let eR=await tz(eI);return e$.preview=eR,eR},t5=async e$=>{if(e4)return void await e4(e$);let eI=await t2(e$);eI&&"u">typeof window&&window.open(eI,"_blank","noopener,noreferrer")},t3=e$=>{let eI=tK.value.filter(eI=>eI.uid!==e$.uid&&void 0!==eI.uid);eI.length!==tK.value.length-1&&console.warn("File removal mismatch detected. Ensure file.uid is valid."),tJ(eI),tQ({file:{...e$,status:"removed"},fileList:eI,source:"remove"})},t4=e$=>{if(e1)return;if(!e6)return void t3(e$);let eI=e6(e$);rl(eI)?eI.then(eI=>{!1!==eI&&t3(e$)}):!1!==eI&&t3(e$)},t6=(e$,eI)=>eI===el?null:eI instanceof Blob?hl(eI instanceof File?eI:new File([eI],e$.name,{type:eI.type||e$.type,lastModified:e$.lastModified}),e$.name):hl(e$,e$.name),t8=(e$,eI,eR)=>{let eL=[],ez=eW=>{if(eW>=e$.length)return void((e$,eI,eR)=>{if(e$.length<=0)return t1();let eL=vl([...tK.value.map(ml),...e$],eU);tJ(eL),tQ({file:eL[eL.length-1],fileList:eL,source:eI,nativeEvent:eR}),t1()})(eL,eI,eR);let eH=e$[eW];if(!e3){eL.push(hl(eH,eH.name)),ez(eW+1);return}let eF=e3(eH,e$);if(rl(eF))return void eF.then(e$=>{let eI=t6(eH,e$);eI&&eL.push(eI),ez(eW+1)});let eP=t6(eH,eF);eP&&eL.push(eP),ez(eW+1)};ez(0)},t7=e$=>{e1||("function"==typeof e$.preventDefault&&e$.preventDefault(),tP.value=!0)},t9=e$=>{"function"==typeof e$.preventDefault&&e$.preventDefault();let eI=e$.currentTarget,eR=e$.relatedTarget;eI&&eR&&eI.contains(eR)||(tP.value=!1)},r$=e$=>{e1||("function"==typeof e$.preventDefault&&e$.preventDefault(),tP.value=!1,t8(Array.from(e$.dataTransfer?.files??[]),"drop",e$))},rI=e$=>{let eI=e$.thumbUrl??e$.url??e$.preview;return eI&&ul(e$)?r("img",{src:eI,alt:e$.name,className:"size-full object-cover"}):r("div",{className:"flex size-full items-center justify-center rounded-box bg-base-200 text-base-content/60",children:ul(e$)?r(wl,{}):r(Cl,{})})},rR=e$=>{let eI="function"==typeof tq?.extra?tq.extra(e$):tq?.extra,eR="picture-card"===tI?i("div",{className:nl("group relative flex aspect-square flex-col overflow-hidden rounded-box border border-base-300 bg-base-100 shadow-sm",eF),children:[r("button",{type:"button",className:"relative flex flex-1 items-center justify-center overflow-hidden bg-base-200/60 text-base-content",onClick:()=>void t5(e$),disabled:e1,children:rI(e$)}),i("div",{className:"border-t border-base-300 px-3 py-2",children:[r("div",{className:"truncate text-sm font-medium",children:e$.name}),void 0===eI?null:r("div",{className:"mt-1 text-xs text-base-content/60",children:eI})]}),(tG||tZ)&&!e1?i("div",{className:"absolute top-2 right-2 flex gap-1 opacity-100 md:opacity-0 md:transition md:group-hover:opacity-100",children:[tG?r("button",{type:"button",className:"btn btn-circle btn-xs border-none bg-base-100/90 shadow-sm","aria-label":`Preview ${e$.name}`,onClick:eI=>{"function"==typeof eI.stopPropagation&&eI.stopPropagation(),t5(e$)},children:r(Tl,{})}):null,tZ?r("button",{type:"button",className:"btn btn-circle btn-xs border-none bg-base-100/90 shadow-sm","aria-label":`Remove ${e$.name}`,onClick:eI=>{"function"==typeof eI.stopPropagation&&eI.stopPropagation(),t4(e$)},children:r(El,{})}):null]}):null]}):i("div",{className:nl("flex items-center gap-3 rounded-box border border-base-300 bg-base-100 px-3 py-3 shadow-sm",eF),children:[ll(tI)?r("button",{type:"button",className:"h-14 w-14 shrink-0 overflow-hidden rounded-box",onClick:()=>void t5(e$),disabled:e1,children:rI(e$)}):r("span",{className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-box bg-base-200 text-base-content/65",children:ul(e$)?r(wl,{}):r(Cl,{})}),i("div",{className:"min-w-0 flex-1",children:[i("div",{className:"flex flex-wrap items-center gap-2",children:[r("span",{className:"truncate font-medium",children:e$.name}),r("span",{className:nl("badge badge-sm",cl(e$.status)),children:e$.status??"ready"})]}),i("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1 text-xs text-base-content/60",children:[e$.type?r("span",{children:e$.type}):null,yl(e$.size)?r("span",{children:yl(e$.size)}):null,void 0===eI?null:r("span",{children:eI})]})]}),(tG||tZ)&&!e1?i("div",{className:"flex shrink-0 items-center gap-1",children:[tG?r("button",{type:"button",className:"btn btn-ghost btn-sm btn-square","aria-label":`Preview ${e$.name}`,onClick:()=>void t5(e$),children:r(Tl,{})}):null,tZ?r("button",{type:"button",className:"btn btn-ghost btn-sm btn-square","aria-label":`Remove ${e$.name}`,onClick:()=>void t4(e$),children:r(El,{})}):null]}):null]});return tq?.itemRender?tq.itemRender(e$,eR,{preview:()=>void t5(e$),remove:()=>void t4(e$)}):eR};(0,e.onMounted)(()=>{tX(),rW()});let rL=r("input",{...e9,ref:e$=>{(tW.current=e$??void 0,"function"==typeof tF)?tF(e$):tF&&"object"==typeof tF&&(tF.current=e$??void 0)},type:"file",className:nl("sr-only pointer-events-none absolute h-0 w-0 opacity-0",eL),disabled:e1,multiple:tY,onChange:e$=>{let eI=e$.target;t8(Array.from(eI?.files??[]),"select",e$)},directory:e0?"":void 0,webkitdirectory:e0?"":void 0}),rz=()=>eP?r("div",{className:sl({variant:e$,disabled:e1,dragging:tP.value,className:eW}),children:i("div",{className:"flex flex-col items-center text-center",children:[r("span",{className:"mb-3 inline-flex h-12 w-12 items-center justify-center rounded-full bg-primary/10 text-primary",children:r(xl,{className:"size-6"})}),r("div",{className:"text-sm font-semibold text-base-content",children:eG??"拖拽文件到这里,或点击选择文件"}),r("div",{className:"mt-2 max-w-md text-sm text-base-content/65",children:eZ??"适合资料、图片和批量附件收集;列表仍交给业务侧决定上传时机。"}),r("div",{className:"mt-3 text-xs text-base-content/50",children:eY??(tY?"支持多文件选择":"单次选择一个文件")})]})}):"picture-card"===tI?i("div",{className:nl("flex aspect-square flex-col items-center justify-center rounded-box border border-dashed border-base-300 bg-base-100 p-4 text-center shadow-sm transition",e1?"cursor-not-allowed opacity-60":"cursor-pointer hover:border-primary/40 hover:bg-base-200/40",eW),children:[r("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-base-200 text-base-content/70",children:r(Sl,{})}),r("div",{className:"mt-3 text-sm font-medium text-base-content",children:eX??"添加文件"}),r("div",{className:"mt-1 text-xs text-base-content/60",children:eY??(eU?`最多 ${eU} 个`:"支持图片或附件卡片展示")})]}):i("div",{className:nl("flex flex-wrap items-center gap-3 rounded-box border border-base-300 bg-base-100 p-3 shadow-sm",eW),children:[i("button",{type:"button",className:ol({variant:e$,size:eI,ghost:eR,className:e1?"btn-disabled":void 0}),onClick:t0,disabled:e1,children:[r(xl,{}),r("span",{children:eX??"选择文件"})]}),i("div",{className:"text-sm text-base-content/65",children:[r("div",{children:eG??"保持 Rue 的轻量输入风格,同时拥有 Upload 式文件编排能力。"}),r("div",{className:"text-xs text-base-content/50",children:eY??(tY?"可多选、可移除、可受控管理列表":"可受控管理列表并自定义预览与删除")})]})]}),rW=()=>{if(!tH.current)return;let e$=rz(),eI=!eU||tK.value.length<eU;(0,e.render)(i(e.Fragment,{children:[r("div",{role:eP?"button":void 0,tabIndex:eP&&!e1?0:void 0,onClick:e5||eP||"picture-card"===tI?t0:void 0,onKeyDown:e$=>{let eI=e$.key;"Enter"!==eI&&" "!==eI||e1||("function"==typeof e$.preventDefault&&e$.preventDefault(),t0())},onDragOver:eP?t7:void 0,onDragLeave:eP?t9:void 0,onDrop:eP?r$:void 0,children:e5??e$}),tU?tK.value.length>0?"picture-card"===tI?i("div",{className:nl("grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",eH),children:[tK.value.map((e$,eI)=>r("div",{children:rR(e$)},e$.uid||`fallback-${eI}`)),eI&&!e1?r("div",{onClick:t0,onKeyDown:e$=>{let eI=e$.key;("Enter"===eI||" "===eI)&&("function"==typeof e$.preventDefault&&e$.preventDefault(),t0())},role:"button",tabIndex:0,children:void 0===e5?rz():i("div",{className:nl("flex aspect-square flex-col items-center justify-center rounded-box border border-dashed border-base-300 bg-base-100 p-4 text-center shadow-sm transition hover:border-primary/40 hover:bg-base-200/40",eW),children:[r("span",{className:"inline-flex h-10 w-10 items-center justify-center rounded-full bg-base-200 text-base-content/70",children:r(Sl,{})}),r("div",{className:"mt-3 text-sm font-medium text-base-content",children:eX??"继续添加"})]})}):null]}):r("div",{className:nl("space-y-3",eH),children:tK.value.map((e$,eI)=>r("div",{children:rR(e$)},e$.uid||`fallback-${eI}`))}):r("div",{className:nl("rounded-box border border-dashed border-base-300 p-4 text-sm text-base-content/55",eH),children:eJ??"还没有文件,先选择一个文件开始。"}):null]}),tH.current)};return(0,e.watch)(()=>[tV.value,tP.value],()=>{rW()}),(0,e.watch)(()=>eV,tX),i("div",{className:nl("space-y-4",ez),"data-rue-file-input-root":"true","data-rue-file-input-version":String(tV.value),children:[rL,r("div",{ref:tH})]})},Ol=Object.assign(Dl,{Dragger:e$=>r(Dl,{...e$,drag:!0}),LIST_IGNORE:el}),kl=0,Al=(e$,eI)=>e$?eI?`${e$} ${eI}`:e$:eI??"",jl=(e$,eI)=>{let eR=eI?.getRootNode?.(),eL=eR&&"function"==typeof eR.querySelectorAll?eR:"u">typeof document?document:null;return eL?Array.from(eL.querySelectorAll("[data-rue-collapse-group]")).filter(eI=>eI.dataset.rueCollapseGroup===e$):[]},Ml=e$=>Array.from(e$.children).find(e$=>e$ instanceof HTMLElement&&e$.classList.contains("collapse-title")),Nl=(e$,eI)=>eI instanceof Node&&!!Ml(e$)?.contains(eI),Pl=e$=>Array.from(e$.children).find(e$=>e$ instanceof HTMLInputElement&&("checkbox"===e$.type||"radio"===e$.type)),Fl=(e$,eI)=>{if(!(e$ instanceof HTMLElement))return;e$.classList.remove("collapse-open","collapse-close"),e$.classList.add(eI?"collapse-open":"collapse-close");let eR=Ml(e$);eR&&eR.setAttribute("aria-expanded",eI?"true":"false");let eL=e$.querySelector("[data-rue-collapse-arrow-icon]");eL&&eL.classList.toggle("rotate-90",eI);let ez=e$.querySelector("[data-rue-collapse-plus-vertical]");ez&&(ez.classList.remove("opacity-0","opacity-100"),ez.classList.add(eI?"opacity-0":"opacity-100"));let eW=e$.querySelector("[data-rue-collapse-icon-trigger]");eW&&eW.setAttribute("aria-label",eI?"收起":"展开")},Il=(e$,eI)=>{e$.classList.remove("collapse-open","collapse-close"),e$.classList.add(eI?"collapse-open":"collapse-close");let eR=Ml(e$);eR&&eR.setAttribute("aria-expanded",eI?"true":"false")},Ll=e$=>{let eI=[];return e$.forEach(e$=>{eI.some(eI=>eI===e$)||eI.push(e$)}),eI},Rl=e$=>{switch(e$){case"small":return"sm";case"middle":return"md";case"large":return"lg";default:return e$}},zl=(e$,eI,eR)=>e$||(eR?"plus":eI?"arrow":void 0),Bl=e$=>Array.isArray(e$)?e$:null==e$?[]:[e$],Vl=(e$,eI)=>{let eR=Ll(Bl(e$));return eI?eR.slice(0,1):eR},Hl=e$=>{switch(Rl(e$)){case"sm":return"min-h-0 py-3 text-sm";case"lg":return"min-h-0 py-5 text-lg";default:return""}},Ul=e$=>{switch(Rl(e$)){case"sm":return"pt-0 pb-3 text-sm";case"lg":return"pt-0 pb-5 text-base";default:return""}},Wl=(e$,eI,eR)=>Vl(void 0===eI?e$.filter(e$=>e$.open).map(e$=>e$.key):eI,eR),Gl=(e$,eI,eR,eL)=>eL?eR?[eI]:[]:eR?Ll([...e$,eI]):e$.filter(e$=>e$!==eI),Kl=(e$,eI,eR)=>{let eL=e$?"overflow-hidden rounded-box border border-base-300 bg-base-100 divide-y divide-base-300":"space-y-3";return eI&&(eL+=" bg-transparent"),Al(eL,eR)},ql=(e$,eI)=>e$?"":eI?"bg-transparent":"rounded-box border border-base-300 bg-base-100",Jl=({open:e$})=>r("span",{"data-rue-collapse-arrow-icon":"true","aria-hidden":"true",className:`inline-flex size-5 items-center justify-center transition-transform duration-200 ${e$?"rotate-90":""}`.trim(),children:r("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 4 6 6-6 6"})})}),Yl=({open:e$})=>i("span",{"aria-hidden":"true",className:"relative inline-flex size-5 items-center justify-center",children:[r("span",{className:"absolute h-0.5 w-3 rounded-full bg-current"}),r("span",{"data-rue-collapse-plus-vertical":"true",className:`absolute h-3 w-0.5 rounded-full bg-current transition-opacity duration-200 ${e$?"opacity-0":"opacity-100"}`.trim()})]}),Xl=(e$,eI)=>r("plus"===e$?Yl:Jl,{open:eI}),Zl=(e$,eI,eR,eL,ez)=>null==eI&&null==eR?e$:i("div",{className:"flex w-full items-start justify-between gap-3",children:[i("div",{className:"min-w-0 flex-1",children:[r("div",{children:e$}),null==eI?null:r("div",{className:Al("mt-1 text-xs opacity-70",eL),children:eI})]}),null==eR?null:r("div",{className:Al("shrink-0 text-xs opacity-70",ez),onClick:e$=>e$.stopPropagation(),onKeyDown:e$=>e$.stopPropagation(),children:eR})]}),Ql=Object.assign(({icon:e$,arrow:eI,plus:eR,showArrow:eL,open:ez,close:eW,defaultOpen:eH,activeKey:eF,defaultActiveKey:eP,accordion:eB,bordered:eK,ghost:eV,disabled:eq,collapsible:eU,size:eG,expandIconPlacement:eZ="end",tabIndex:eY,tag:eX="div",className:eJ,titleClassName:eQ,contentClassName:e0,items:e1,children:e2,onChange:e5})=>{let e3=e1?.map((e$,eI)=>({...e$,key:e$.key??eI,index:eI,label:e$.label??e$.title,content:e$.children??e$.content}))??[],e4=e3.length>0,e6=eK??e4,e8=zl(e$,eI,eR),e7=!1!==eL&&!!e8,e9=(0,e.ref)(`rue-collapse-${kl++}`),t$=(0,e.ref)(Wl(e3,eP,eB)),tI=()=>void 0===eF?t$.value:Vl(eF,eB),tR=tI();if(e4){let e$=e9.value;return r("div",{className:Kl(e6,eV,eJ),children:e3.map(eI=>{let eR=eI.icon??e8,eL=eI.showArrow??e7,ez=eq||eI.disabled?"disabled":eI.collapsible??eU??"header",eW=tR.some(e$=>e$===eI.key),eH=null!=eI.description||null!=eI.extra?"pt-1":"mt-0.5",eP=ql(e6,eV),eK=Al(Al(Al("collapse",eW?"collapse-open":"collapse-close"),eP),eI.className),eY=Al(Al("collapse-title",Hl(eG)),Al(eQ,eI.titleClassName)),eX=Al(Al("collapse-content",Ul(eG)),Al(e0,eI.contentClassName)),eJ=Zl(eI.label,eI.description,eI.extra,eI.descriptionClassName,eI.extraClassName),e1=eR=>{var eL;let eW,eH;"disabled"!==ez&&(eL=!tI().some(e$=>e$===eI.key),eH=(eW=Gl(tI(),eI.key,eL,eB)).some(e$=>e$===eI.key),void 0===eF&&(t$.value=eW,jl(e$,eR).forEach(e$=>{let eI=e3[Number(e$.dataset.rueCollapseIndex)];eI&&Fl(e$,eW.some(e$=>e$===eI.key))})),e5&&e5(eB?eW[0]??null:eW,{key:eI.key,index:eI.index,open:eH,item:eI}))},e2="header"===ez?{role:"button",tabIndex:0,onClick:e$=>e1(e$.currentTarget),onKeyDown:e$=>{("Enter"===e$.key||" "===e$.key)&&(e$.preventDefault(),e1(e$.currentTarget))}}:{};return i("div",{className:eK,"data-rue-collapse-group":e$,"data-rue-collapse-index":String(eI.index),children:[r("div",{className:Al(eY,"header"===ez?"cursor-pointer select-none":""),"aria-expanded":eW?"true":"false",...e2,children:i("div",{className:"flex w-full items-start gap-3",children:[eL&&eR&&"start"===eZ?"icon"===ez?r("button",{"data-rue-collapse-icon-trigger":"true",type:"button",className:Al("inline-flex size-7 shrink-0 self-start items-center justify-center rounded-full border border-transparent transition-colors hover:bg-base-200/70",eH),"aria-label":eW?"收起":"展开",onClick:e$=>{e$.stopPropagation(),e1(e$.currentTarget)},children:Xl(eR,eW)}):r("span",{className:Al("inline-flex size-7 shrink-0 self-start items-center justify-center",eH),children:Xl(eR,eW)}):null,r("div",{className:"min-w-0 flex-1",children:eJ}),eL&&eR&&"end"===eZ?"icon"===ez?r("button",{"data-rue-collapse-icon-trigger":"true",type:"button",className:Al("inline-flex size-7 shrink-0 self-start items-center justify-center rounded-full border border-transparent transition-colors hover:bg-base-200/70",eH),"aria-label":eW?"收起":"展开",onClick:e$=>{e$.stopPropagation(),e1(e$.currentTarget)},children:Xl(eR,eW)}):r("span",{className:Al("inline-flex size-7 shrink-0 self-start items-center justify-center",eH),children:Xl(eR,eW)}):null]})}),r("div",{className:eX,children:eI.content})]},eI.key)})})}let tL="collapse";!1!==eL&&(eI||"arrow"===e8)&&(tL+=" collapse-arrow"),!1!==eL&&(eR||"plus"===e8)&&(tL+=" collapse-plus"),ez&&(tL+=" collapse-open"),eW&&(tL+=" collapse-close"),ez||eW||!eH||(tL+=" collapse-open"),eq&&(tL+=" opacity-70");let tz=ql(!!e6,eV);if(tz&&(tL+=` ${tz}`),eJ&&(tL+=` ${eJ}`),"details"===eX)return r("details",{className:tL,open:!!ez||!eW&&!!eH||void 0,children:e2});let tW="number"==typeof eY?eY:void 0,tH=!!ez||!!eW||!!eH;return r("div",{className:tL,tabindex:void 0===tW?void 0:String(tW),onMouseDown:e$=>{e$.currentTarget.dataset.rueCollapsePointerDown="true"},onClick:e$=>{let eI=e$.currentTarget,eR=e$.target,eL=Pl(eI),ez=Nl(eI,eR),eW=eR instanceof HTMLInputElement&&eR===eL;(ez||eW)&&(void 0!==tW&&(eI.tabIndex=tW,eI.setAttribute("tabindex",String(tW)),eI.focus()),tH||(eL?(eW||("checkbox"===eL.type?eL.checked=!eL.checked:"radio"===eL.type&&(eL.checked=!0)),Il(eI,eL.checked)):Il(eI,!eI.classList.contains("collapse-open")))),delete eI.dataset.rueCollapsePointerDown},onFocus:e$=>{if(void 0===tW||tH)return;let eI=e$.currentTarget;"true"!==eI.dataset.rueCollapsePointerDown&&Il(eI,!0)},onBlur:e$=>{delete e$.currentTarget.dataset.rueCollapsePointerDown,void 0===tW||tH||Il(e$.currentTarget,!1)},onKeyDown:e$=>{if(void 0===tW||tH||"Enter"!==e$.key&&" "!==e$.key||!Nl(e$.currentTarget,e$.target))return;e$.preventDefault();let eI=e$.currentTarget;Il(eI,!eI.classList.contains("collapse-open"))},onChange:e$=>{if(tH)return;let eI=e$.target;eI&&("checkbox"===eI.type||"radio"===eI.type)&&Il(e$.currentTarget,eI.checked)},children:e2})},{Title:({as:e$="div",className:eI,description:eR,extra:eL,descriptionClassName:ez,extraClassName:eW,children:eH})=>r("summary"===e$?"summary":"div",{className:Al("collapse-title",eI),children:Zl(eH,eR,eL,ez,eW)}),Content:({className:e$,children:eI})=>r("div",{className:Al("collapse-content",e$),children:eI})}),$l="HH:mm:ss",eu=1e3/30,tu=1e3,nu=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]],ru=(e$,eI)=>eI?`${e$} ${eI}`:e$,iu=e$=>{if(null==e$)return null;let eI=e$ instanceof Date?e$.getTime():new Date(e$).getTime();return Number.isFinite(eI)?eI:null},au=e$=>{let eI=[],eR=0;for(;eR<e$.length;){let eL=e$[eR];if("["===eL){let eL=e$.indexOf("]",eR+1),ez=-1===eL?e$.slice(eR+1):e$.slice(eR+1,eL);if(ez){let e$=eI[eI.length-1];e$?.type==="literal"?e$.content+=ez:eI.push({type:"literal",content:ez})}eR=-1===eL?e$.length:eL+1;continue}if(/[YMDHmsS]/.test(eL)){let ez=eR+1;for(;ez<e$.length&&e$[ez]===eL;)ez+=1;eI.push({type:"unit",unit:eL,digits:ez-eR}),eR=ez;continue}let ez=eR+1;for(;ez<e$.length&&"["!==e$[ez]&&!/[YMDHmsS]/.test(e$[ez]);)ez+=1;let eW=e$.slice(eR,ez);if(eW){let e$=eI[eI.length-1];e$?.type==="literal"?e$.content+=eW:eI.push({type:"literal",content:eW})}eR=ez}return eI},ou=(e$,eI)=>{let eR=new Set;eI.forEach(e$=>{"unit"===e$.type&&eR.add(e$.unit)});let eL=Math.max(e$,0),ez={};return nu.forEach(([e$,eI])=>{if(!eR.has(e$))return;let eW=Math.floor(eL/eI);ez[e$]=eW,eL-=eW*eI}),ez},su=(e$,eI,eR)=>{let eL=au(eI),ez=ou(e$,eL);return eL.flatMap(e$=>{if("literal"===e$.type)return e$.content?[{content:e$.content}]:[];let eI=ez[e$.unit]??0;return[{value:eI,digits:e$.digits>1?e$.digits:void 0,ariaLive:eR,ariaLabel:String(eI)}]})},cu=(e$,eI)=>"number"==typeof eI&&eI>0?eI:e$.includes("S")?eu:tu,lu=e$=>e$.map((e$,eI)=>{if("value"in e$){let{value:eR,digits:eL,className:ez,ariaLive:eW,ariaLabel:eH,children:eF}=e$;return r(du,{value:eR,digits:eL,className:ez,ariaLive:eW,ariaLabel:eH,children:eF},`${eI}:${eR}:${eL??""}:${eH??""}`)}return e$.content}),uu=({className:e$,children:eI,items:eR,value:eL,format:ez=$l,interval:eW,ariaLive:eH,onChange:eF,onFinish:eP})=>{let eB=(0,e.ref)(0),eK=(0,e.useRef)(null),eV=(0,e.useRef)(!1),eq=()=>{null!=eK.current&&(clearInterval(eK.current),eK.current=null)},eU=()=>{let e$=iu(eL);if(null==e$)return eB.value=0,eF&&eF(void 0),eq(),!1;let eI=Math.max(e$-Date.now(),0);return eB.value=eI,eF&&eF(eI),eI<=0?(eq(),eV.current||(eV.current=!0,eP&&eP()),!1):(eV.current=!1,!0)};(0,e.watch)(()=>`${iu(eL)??"invalid"}|${ez}|${eW??""}`,()=>{eV.current=!1,eq(),null!=eL&&eU()&&(eK.current=setInterval(eU,cu(ez,eW)))},{immediate:!0}),(0,e.onUnmounted)(eq);let eG=ru("countdown",e$),eZ=!!(eR&&eR.length),eY=!eZ&&null!=eL,eX=eH??(ez.includes("S")?"off":"polite");return eZ?r("span",{className:eG,children:lu(eR)}):eY?r("span",{className:eG,children:lu(su(eB.value,ez,eX))}):r("span",{className:eG,children:eI})},du=({value:e$,digits:eI,className:eR,ariaLive:eL="polite",ariaLabel:ez,children:eW})=>r("span",{ref:eR=>{eR&&(eR.style.setProperty("--value",String(e$)),null==eI?eR.style.removeProperty("--digits"):eR.style.setProperty("--digits",String(eI)))},"aria-live":eL,"aria-label":ez??String(e$),"data-countdown-value":String(e$),"data-countdown-digits":null==eI?void 0:String(eI),className:eR?.trim(),children:eW??String(e$)}),fu=Object.assign(uu,{Value:du}),pu=(e$,eI)=>eI?`${e$} ${eI}`:e$,mu=e$=>{switch(e$){case"contain":return"object-contain";case"fill":return"object-fill";case"none":return"object-none";case"scale-down":return"object-scale-down";default:return e$?"object-cover":void 0}},hu=e$=>{if(null==e$||!1===e$)return[];if(!Array.isArray(e$))return[e$];let eI=[];return e$.forEach(e$=>{eI.push(...hu(e$))}),eI},gu=(e$,eI,eR,eL)=>{if("string"==typeof e$)return{key:eI,node:r("img",{src:e$,alt:"",className:pu("",pu(eR??"",eL)).trim()||void 0},eI)};if(e$&&"object"==typeof e$){if(null!=e$.node)return{key:e$.key??eI,node:e$.node,label:e$.label};if(e$.src)return{key:e$.key??eI,label:e$.label,node:r("img",{src:e$.src,alt:e$.alt??"",className:pu(pu(eR??"",eL),pu(e$.className??"",e$.imageClassName)).trim()||void 0},e$.key??eI)}}return{key:eI,node:e$}},_u=(e$,eI,eR,eL)=>e$&&e$.length>0?e$.map((e$,eI)=>gu(e$,eI,eR,eL)):hu(eI).map((e$,eI)=>({key:eI,node:e$})),vu=e$=>{let eI=e$.as??"figure",eR=e$.className,eL=e$.wrapperClassName,ez=e$.children,eW=e$.items,eH=e$.imageClassName,eF=e$.fit,eP=e$.showGuide,eB=e$.guideLabels,eK=e$.guideClassName,eV=e$.guideItemClassName,eq=_u(eW,ez,mu(eF),eH),eU=eq.map(e$=>e$.node),eG=eq.length>1?eq.length-1:0,eZ=pu("hover-gallery",eR),eY=Object.assign({},e$);delete eY.as,delete eY.className,delete eY.wrapperClassName,delete eY.children,delete eY.items,delete eY.imageClassName,delete eY.fit,delete eY.showGuide,delete eY.guideLabels,delete eY.guideClassName,delete eY.guideItemClassName;let eX=r(eI,{...eY,className:eZ,children:eU});return eP&&0!==eG?i("div",{className:pu("grid *:[grid-area:1/1]",eL),children:[eX,r("div",{className:pu("pointer-events-none grid font-mono text-white text-shadow-lg",eK),style:{gridTemplateColumns:`repeat(${eG}, minmax(0, 1fr))`},"aria-hidden":"true",children:eq.slice(1).map((e$,eI)=>r("div",{className:pu("from-white/10 via-transparent to-black/10 bg-linear-80 grid place-content-center",eV),children:eB?.[eI]??e$.label??eI+2},e$.key))})]}):eX},yu=(e$,eI)=>eI?`${e$} ${eI}`:e$,bu=e$=>null!=e$&&!1!==e$&&(!Array.isArray(e$)||e$.some(e$=>bu(e$))),xu=e$=>{switch(e$){case"small":return"sm";case"medium":case"middle":return"md";case"large":return"lg";default:return e$}},Su=(e$="sm")=>{switch(e$){case"xs":return"gap-1";case"md":return"gap-3";case"lg":return"gap-4";default:return"gap-2"}},Cu=(e$,eI)=>{let eR="kbd",eL=xu(e$);return eL&&(eR+=` kbd-${eL}`),eI&&(eR+=` ${eI}`),eR},wu=e$=>"object"==typeof e$&&!!e$&&!Array.isArray(e$)&&("label"in e$||"children"in e$||"size"in e$||"className"in e$||"key"in e$),Tu=(e$,eI)=>wu(e$)?e$:{key:eI,label:e$},Eu=e$=>bu(e$.children)?e$.children:e$.label,Du=(...e$)=>e$.filter(Boolean).join(" "),Ou=({as:e$="kbd",size:eI,className:eR,children:eL,...ez})=>r(e$,{...ez,className:Cu(eI,eR),children:eL}),ku=({as:e$="span",className:eI,children:eR="+",...eL})=>r(e$,{...eL,className:yu("inline-flex items-center justify-center px-1 text-sm opacity-60",eI),children:eR}),Au=({items:e$,size:eI,itemClassName:eR,separator:eL,separatorClassName:ez})=>(e$?.map((e$,eI)=>Tu(e$,eI))??[]).flatMap((e$,eW)=>{let eH=e$.key??eW,eF=[];eW>0&&eF.push(r(ku,{className:ez,children:bu(eL)?eL:"+"},`separator-${eH}`));let{key:eP,size:eB,className:eK,...eV}=e$;return eF.push(r(Ou,{size:eB??eI,className:Du(eR,eK),...eV,children:Eu(e$)},`key-${eH}`)),eF}),ju=({as:e$="span",size:eI,items:eR,separator:eL,itemClassName:ez,separatorClassName:eW,direction:eH="horizontal",wrap:eF,gap:eP="sm",className:eB,children:eK,...eV})=>{let eq=yu(`${"vertical"===eH?"inline-flex flex-col":"inline-flex items-center"}${"vertical"!==eH&&eF?" flex-wrap":""} ${Su(eP)}`,eB);return r(e$,{...eV,className:eq,children:bu(eK)?eK:Au({items:eR,size:eI,itemClassName:ez,separator:eL,separatorClassName:eW})})},Mu=({as:e$="span",size:eI,className:eR,children:eL,items:ez,separator:eW,itemClassName:eH,separatorClassName:eF,wrap:eP,gap:eB="sm",...eK})=>r(ju,{as:e$,size:eI,items:ez,separator:eW,itemClassName:eH,separatorClassName:eF,wrap:eP,gap:eB,className:eR,...eK,children:eL}),Nu=Object.assign(({items:e$,separator:eI,itemClassName:eR,separatorClassName:eL,wrap:ez,gap:eW,...eH})=>Array.isArray(e$)?r(Mu,{items:e$,separator:eI,itemClassName:eR,separatorClassName:eL,wrap:ez,gap:eW,...eH}):r(Ou,{...eH}),{Group:ju,Combo:Mu,Separator:ku}),Pu=(...e$)=>e$.filter(Boolean).join(" ").trim()||void 0,Fu=e$=>"number"==typeof e$?`${e$}px`:e$,Iu=(e$,eI)=>e$<=1?1:e$>=eI?eI:e$,Lu=e$=>!!(e$&&"object"==typeof e$&&("item"===e$.type||"row"===e$.type||e$.cols||void 0!==e$.content||void 0!==e$.normal||void 0!==e$.title||void 0!==e$.description||void 0!==e$.avatar||void 0!==e$.actions||void 0!==e$.extra)),Ru=e$=>{if(null==e$||"boolean"==typeof e$||Array.isArray(e$)||"object"!=typeof e$)return e$;for(let eI of["content","children","title","label","text","name","description"]){let eR=e$[eI];if(null!=eR)return eR}try{return JSON.stringify(e$)}catch{return String(e$)}},zu=e$=>null==e$||Array.isArray(e$)&&0===e$.length,Bu=e$=>{switch(e$){case"small":case"sm":return"text-sm";case"large":case"lg":return"text-lg";default:return}},Vu=e$=>"object"==typeof e$?{spinning:!1!==e$.spinning,tip:e$.tip,indicator:e$.indicator}:{spinning:!!e$},Hu=(e$,eI,eR)=>"function"==typeof eR?eR(e$,eI):eR&&e$&&"object"==typeof e$?e$[eR]:e$&&"object"==typeof e$&&null!=e$.key?e$.key:`list-item-${eI}`,Uu=e$=>{if(e$)return e$.xxxl??e$.xxl??e$.xl??e$.lg??e$.md??e$.sm??e$.xs??e$.column},Wu=(e$,eI)=>{if(!e$)return eI;let eR=Uu(e$);return{...eI,display:"grid",gridTemplateColumns:eR?`repeat(${eR}, minmax(0, 1fr))`:void 0,gap:Fu(e$.gutter)}},Gu=(e$,eI,eR,eL)=>{if(!e$)return null;let ez="object"==typeof e$?e$:{},eW=Math.max(1,ez.pageSize??eL??ez.defaultPageSize??10),eH=Math.max(1,Math.ceil((ez.total??eI)/eW)),eF=Iu(ez.current??eR??ez.defaultCurrent??1,eH);return{...ez,current:eF,pageSize:eW,total:ez.total??eI,position:ez.position??"bottom",align:ez.align??"end"}},Ku=e$=>e$?e$.map((e$,eI)=>"grow"===e$.type?r(ed,{as:e$.as,className:e$.className,children:e$.content},eI):r(td,{as:e$.as,className:e$.className,children:e$.content},eI)):null,qu=(e$,eI)=>{let eR=e$.key??eI;return(e$.type??(e$.cols||void 0!==e$.title||void 0!==e$.description||void 0!==e$.avatar||void 0!==e$.actions||void 0!==e$.extra?"row":"item"))==="item"?r(rd,{className:e$.className,children:e$.content},eR):e$.title||e$.description||e$.avatar||e$.actions||e$.extra?i(rd,{actions:e$.actions,className:e$.className,extra:e$.extra,children:[r(nd,{avatar:e$.avatar,title:e$.title,description:e$.description,children:e$.content}),Ku(e$.cols)]},eR):i($u,{normal:e$.normal,className:e$.className,children:[e$.content,Ku(e$.cols)]},eR)},Ju=e$=>e$.spinning?i("li",{className:"flex min-h-24 items-center justify-center gap-3 p-6 text-sm opacity-70",children:[e$.indicator??r("span",{className:"loading loading-spinner loading-sm"}),e$.tip?r("span",{children:e$.tip}):null]}):null,Yu=e$=>r("li",{className:"p-8 text-center text-sm opacity-60",children:e$??"No data"}),Xu=(e$,eI)=>zu(e$)?null:r("li",{className:eI,children:e$}),Zu=(e$,eI,eR="li")=>{if(!e$)return null;let eL=Math.max(1,Math.ceil(e$.total/e$.pageSize));if(e$.hideOnSinglePage&&eL<=1)return null;let ez=Array.from({length:eL},(e$,eI)=>eI+1),eW=0===e$.total?0:(e$.current-1)*e$.pageSize+1,eH=Math.min(e$.current*e$.pageSize,e$.total);return i(eR,{className:Pu("flex flex-wrap items-center gap-3 p-3","start"===e$.align?"justify-start":"center"===e$.align?"justify-center":"justify-end"),children:[e$.showTotal?r("span",{className:"mr-auto text-xs opacity-60",children:e$.showTotal(e$.total,[eW,eH])}):null,i("div",{className:"join",children:[r("button",{className:Pu("join-item btn btn-sm",e$.current<=1&&"btn-disabled"),disabled:e$.current<=1,onClick:()=>eI(e$.current-1),type:"button",children:"Prev"}),ez.map(eR=>r("button",{className:Pu("join-item btn btn-sm",eR===e$.current&&"btn-active"),onClick:()=>eI(eR),type:"button",children:eR},eR)),r("button",{className:Pu("join-item btn btn-sm",e$.current>=eL&&"btn-disabled"),disabled:e$.current>=eL,onClick:()=>eI(e$.current+1),type:"button",children:"Next"})]})]})},Qu=({bordered:e$,className:eI,children:eR,dataSource:eL,emptyText:ez,footer:eW,grid:eH,header:eF,itemLayout:eP="horizontal",items:eB,loading:eK,loadMore:eV,locale:eq,pagination:eU,renderItem:eG,rowKey:eZ,size:eY,split:eX=!0,style:eJ,...eQ})=>{let e0=Vu(eK),e1=(0,e.ref)("object"==typeof eU?eU.defaultCurrent??eU.current??1:1),e2=(0,e.ref)("object"==typeof eU?eU.defaultPageSize??eU.pageSize??10:10),e5=(0,e.useRef)(),e3=(0,e.useRef)(),e4=(0,e.useRef)(),e6=Array.isArray(eL),e8=e6?eL:eB,e7=!!eU,e9="list";e$&&(e9+=" border border-base-300 rounded-box overflow-hidden"),eH&&(e9+=" grid"),eX||(e9+=" list-no-split"),"vertical"===eP&&(e9+=" list-vertical"),e9=Pu(e9,Bu(eY),eI)??"list";let t$=(e$,eI)=>e$?.map((e$,eR)=>{let eL=eI?(eI.current-1)*eI.pageSize+eR:eR,ez=Hu(e$,eL,eZ);return e6&&eG?eG(e$,eL):Lu(e$)?qu(e$,eL):r(rd,{itemLayout:eP,children:Ru(e$)},ez)}),tI=()=>Gu(eU,e8?.length??0,e1.value,e2.value),tR=()=>{if(!e7)return;let e$=tI(),eI=e0.spinning?Ju(e0):e8&&0===e8.length?Yu(eq?.emptyText??ez):t$(e8&&e$?e8.slice((e$.current-1)*e$.pageSize,e$.current*e$.pageSize):e8,e$);e5.current&&(0,e.render)(eI??null,e5.current),e3.current&&(0,e.render)(e$&&("top"===e$.position||"both"===e$.position)?Zu(e$,tL,"div"):null,e3.current),e4.current&&(0,e.render)(e$&&("bottom"===e$.position||"both"===e$.position)?Zu(e$,tL,"div"):null,e4.current)},tL=e$=>{let eI=tI();if(!eI)return;let eR=Iu(e$,Math.max(1,Math.ceil(eI.total/eI.pageSize)));"object"==typeof eU&&void 0===eU.current&&(e1.value=eR),e2.value=eI.pageSize,eI.onChange&&eI.onChange(eR,eI.pageSize),tR()};if((0,e.onMounted)(tR),(0,e.watch)(()=>[e1.value,e2.value,e8?.length,e0.spinning],tR),e7){let eR=Pu("rue-list",e$&&"border border-base-300 rounded-box overflow-hidden",eI),eL=Pu("list",eH&&"grid",!eX&&"list-no-split","vertical"===eP&&"list-vertical",Bu(eY));return i("div",{...eQ,className:eR,style:eH?void 0:eJ,children:[r("div",{ref:e3}),zu(eF)?null:r("div",{className:"p-4 pb-2 text-sm font-medium opacity-70",children:eF}),r("ul",{ref:e5,className:eL,style:Wu(eH,eH?eJ:void 0)}),zu(eW)?null:r("div",{className:"p-4 pt-2 text-sm opacity-70",children:eW}),zu(eV)?null:r("div",{className:"p-3 text-center",children:eV}),r("div",{ref:e4})]})}return i("ul",{...eQ,className:e9,style:Wu(eH,eJ),children:[Xu(eF,"p-4 pb-2 text-sm font-medium opacity-70"),e0.spinning?Ju(e0):null,!e0.spinning&&e8&&0===e8.length?Yu(eq?.emptyText??ez):null,!e0.spinning&&e8&&e8.length>0&&t$(e8,null),e6||eB?null:eR,Xu(eW,"p-4 pt-2 text-sm opacity-70"),Xu(eV,"p-3 text-center")]})},$u=({normal:e$,className:eI,children:eR,...eL})=>e$?r("li",{...eL,className:eI||void 0,children:eR}):r("li",{...eL,className:Pu("list-row",eI),children:eR}),ed=({as:e$="div",className:eI,children:eR,...eL})=>r(e$,{...eL,className:Pu("list-col-grow",eI),children:eR}),td=({as:e$="div",className:eI,children:eR,...eL})=>r(e$,{...eL,className:Pu("list-col-wrap",eI),children:eR}),nd=({avatar:e$,className:eI,description:eR,title:eL,children:ez,...eW})=>i("div",{...eW,className:Pu("flex min-w-0 flex-1 items-start gap-3",eI),children:[e$?r("div",{className:"shrink-0",children:e$}):null,i("div",{className:"min-w-0 flex-1",children:[eL?r("div",{className:"font-medium",children:eL}):null,eR?r("div",{className:"text-sm opacity-70",children:eR}):null,ez]})]}),rd=({actions:e$,className:eI,classNames:eR,extra:eL,itemLayout:ez="horizontal",styles:eW,children:eH,...eF})=>{let eP=!!e$&&e$.length>0,eB=!zu(eL);if(!eP&&!eB)return r("li",{...eF,className:eI||void 0,children:eH});let eK="vertical"===ez;return i("li",{...eF,className:Pu("list-row",eK&&"items-start",eB&&!eK&&"grid-cols-[1fr_auto]",eI),children:[i("div",{className:"min-w-0 flex-1",children:[eH,eP?r("ul",{className:Pu("mt-3 flex flex-wrap items-center gap-2 text-sm opacity-80",eR?.actions),style:eW?.actions,children:e$.map((e$,eI)=>r("li",{children:e$},eI))}):null]}),eB?r("div",{className:Pu("list-col-wrap",eR?.extra),style:eW?.extra,children:eL}):null]})},id=Object.assign(rd,{Meta:nd}),ad=Object.assign(Qu,{Row:$u,ColGrow:ed,ColWrap:td,Item:id}),od="__rue_component_type",sd="__menuContext",cd=(e$,eI)=>eI?`${e$} ${eI}`:e$,ld=e$=>{switch(e$){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return e$}},ud=e$=>Array.isArray(e$)?[...e$]:[],dd=(e$,eI)=>void 0!==eI&&e$.some(e$=>e$===eI),fd=e$=>!!e$&&"object"==typeof e$,pd=(e$,eI)=>{if(Array.isArray(e$))return e$.map(e$=>pd(e$,eI));if(!fd(e$))return e$;let eR=e$.props;if(!eR||"object"!=typeof eR)return e$;let eL={...eR};"children"in eL&&(eL.children=pd(eL.children,eI));let ez=e$[od];return(ez===Td||ez===Od)&&(eL[sd]=eI),e$.props=eL,e$},md=(e$,eI)=>dd(e$,eI)?e$.filter(e$=>e$!==eI):[...e$,eI],hd=(e$,eI)=>e$||("horizontal"===eI?"horizontal":"vertical"),gd=(e$,eI)=>"_blank"!==e$||eI?eI:"noreferrer",_d=e$=>{let eI=n.RouterLink.__rueHref(e$);return eI?eI===e$&&e$&&!e$.startsWith("#")?`#${e$}`:eI:"#/"},vd=({disabled:e$,selected:eI,focus:eR,danger:eL,className:ez})=>{let eW="";return e$&&(eW+=" menu-disabled"),eI&&(eW+=" menu-active"),eR&&(eW+=" menu-focus"),eL&&(eW+=" text-error"),ez&&(eW+=` ${ez}`),eW.trim()||void 0},yd=({icon:e$,content:eI,extra:eR,suffix:eL})=>{let ez=null!=e$;return i(e.Fragment,{children:[ez?r("span",{className:"inline-flex shrink-0 items-center justify-center",children:e$}):null,null==eI?null:r("span",{className:cd(null!=eR||null!=eL?"min-w-0 flex-1":"",ez?"":void 0),children:eI}),null==eR?null:r("span",{className:"ml-auto shrink-0 pl-3 text-xs opacity-70",children:eR}),null==eL?null:r("span",{className:"ml-2 shrink-0 opacity-60",children:eL})]})},bd=(e$,eI,eR,eL)=>{let{eventKey:ez,as:eW="a",href:eH,to:eF,target:eP,rel:eB,title:eK,icon:eV,extra:eq,onClick:eU,disabled:eG,active:eZ,selected:eY,focus:eX,danger:eJ,className:eQ,children:e0,...e1}=e$,e2=eI?.isSelected(ez,eY??eZ)??!!(eY??eZ),e5=vd({disabled:eG,selected:e2,focus:eX,danger:eJ,className:eQ}),e3=e$=>{if(eG){"function"==typeof e$.preventDefault&&e$.preventDefault(),"function"==typeof e$.stopPropagation&&e$.stopPropagation();return}eU&&eU(e$),eI&&eI.onItemClick(e$,{key:ez,label:e0,icon:eV,extra:eq,title:eK,danger:eJ,disabled:eG,active:eZ,selected:eY,focus:eX,className:eQ,...eR},eL)},e4=yd({icon:eV,content:e0,extra:eq});return"button"===eW?r("button",{...e1,type:e1.type??"button",className:e5,title:eK,disabled:eG,"aria-current":e2?"page":void 0,onClick:e3,children:e4}):"span"===eW?r("span",{...e1,className:e5,title:eK,role:e1.role??"menuitem",tabIndex:eG?-1:e1.tabIndex??0,"aria-current":e2?"page":void 0,"aria-disabled":eG?"true":void 0,onClick:e3,children:e4}):eF?eG?r("span",{...e1,className:e5,title:eK,role:e1.role??"menuitem",tabIndex:-1,"aria-current":e2?"page":void 0,"aria-disabled":"true",onClick:e3,children:e4}):r("a",{...e1,className:e5,href:_d(eF),title:eK,"aria-current":e2?"page":void 0,"aria-disabled":eG?"true":void 0,onClick:e$=>{e3(e$),e$.defaultPrevented||n.RouterLink.__rueOnClick(e$,eF,!1)},children:e4}):eH?r("a",{...e1,className:e5,href:eG?void 0:eH,target:eP,rel:gd(eP,eB),title:eK,"aria-current":e2?"page":void 0,"aria-disabled":eG?"true":void 0,onClick:e3,children:e4}):r("a",{...e1,className:e5,title:eK,"aria-current":e2?"page":void 0,"aria-disabled":eG?"true":void 0,onClick:e3,children:e4})},xd=({as:e$="li",className:eI,children:eR})=>r("h2"===e$?"h2":"li",{className:cd("menu-title",eI),children:eR}),Sd=({show:e$,visible:eI,className:eR,children:eL})=>{let ez="menu-dropdown";return(eI??e$)&&(ez+=" menu-dropdown-show"),eR&&(ez+=` ${eR}`),r("ul",{className:ez,children:eL})},Cd=({show:e$,visible:eI,className:eR,onClick:eL,children:ez})=>{let eW=eI??e$,eH="menu-dropdown-toggle";return eW&&(eH+=" menu-dropdown-show"),eR&&(eH+=` ${eR}`),r("span",{className:eH,role:eL?"button":void 0,tabIndex:eL?0:void 0,"aria-expanded":eL?eW?"true":"false":void 0,onClick:eL,onKeyDown:e$=>{eL&&("Enter"!==e$.key&&" "!==e$.key||("function"==typeof e$.preventDefault&&e$.preventDefault(),eL(e$)))},children:ez})},wd=({className:e$,children:eI})=>r("ul",{className:e$,children:eI}),Td=({liClassName:e$,__menuContext:eI=null,...eR})=>r("li",{className:e$,children:bd(eR,eI)}),Ed=({className:e$,dashed:eI})=>r("li",{role:"separator",className:cd(cd("mx-2 my-1 h-px list-none bg-base-300/80",eI?"border-t border-dashed border-base-300 bg-transparent":void 0),e$)}),Dd=({title:e$,className:eI,children:eR})=>i("li",{className:eI,children:[r("div",{className:"menu-title",children:e$}),r("ul",{children:eR})]}),Od=({eventKey:e$,title:eI,icon:eR,extra:eL,disabled:ez,className:eW,popupClassName:eH,open:eF,defaultOpen:eP,onTitleClick:eB,onOpenChange:eK,children:eV,__menuContext:eq=null})=>{let eU=(0,e.ref)(!!eP),eG=void 0!==e$&&eq?eq.isOpen(e$,eF):eF??eU.value,eZ=eq?.mode==="inline"?"click":eq?.triggerSubMenuAction??"click",eY=(eP,eV)=>{ez||(eB&&eB({key:e$,domEvent:eV}),void 0!==e$&&eq?eq.onSubMenuToggle(e$,eP,eV,{key:e$,label:eI,icon:eR,extra:eL,disabled:ez,className:eW,popupClassName:eH}):void 0===eF&&(eU.value=eP),eK&&eK(eP))};return i("li",{className:eW,onMouseEnter:e$=>{"hover"===eZ&&eY(!0,e$)},onMouseLeave:e$=>{"hover"===eZ&&eY(!1,e$)},children:[r("button",{type:"button",className:vd({disabled:ez,selected:eG}),"aria-expanded":eG?"true":"false","aria-disabled":ez?"true":void 0,onClick:e$=>{"click"===eZ&&eY(!eG,e$)},children:yd({icon:eR,content:eI,extra:eL,suffix:r("span",{children:eG?"▾":"▸"})})}),r("ul",{className:cd(eG?"":"hidden",eH),style:eq?.mode==="inline"?{paddingInlineStart:`${eq.inlineIndent}px`}:void 0,children:eV})]})},kd=(e$,eI,eR,eL=[])=>{let ez=e$.key??`${eL.join("-")||"root"}-${eI}`;if("title"===e$.kind)return r(xd,{as:e$.as,className:e$.className,children:e$.children},ez);if("divider"===e$.type)return r(Ed,{className:e$.className,dashed:e$.dashed},ez);if("group"===e$.type)return r(Dd,{title:e$.label,className:e$.className,children:e$.children?.map((eI,ez)=>kd(eI,ez,eR,void 0===e$.key?eL:[...eL,e$.key]))},ez);if("submenu"===e$.type){let eI=void 0===e$.key?eL:[...eL,e$.key];return r(Od,{eventKey:e$.key,title:e$.label,icon:e$.icon,extra:e$.extra,disabled:e$.disabled,className:e$.className,popupClassName:e$.popupClassName,onTitleClick:e$.onTitleClick,children:e$.children?.map((e$,eL)=>kd(e$,eL,eR,eI))},ez)}let eW=e$.label??e$.children,eH=void 0===e$.key?eL:[...eL,e$.key];return e$.dropdown||e$.submenu||e$.dropdownToggle?i("li",{className:e$.liClassName,children:[bd({eventKey:e$.key,as:e$.as,href:e$.href,to:e$.to,target:e$.target,rel:e$.rel,title:e$.title,icon:e$.icon,extra:e$.extra,danger:e$.danger,onClick:e$.onClick,disabled:e$.disabled,active:e$.active,selected:e$.selected,focus:e$.focus,className:e$.className,children:eW},eR,e$,eH),e$.dropdownToggle?r(Cd,{show:e$.dropdownToggle.show,visible:e$.dropdownToggle.visible,className:e$.dropdownToggle.className,onClick:e$.dropdownToggle.onClick,children:e$.dropdownToggle.children}):null,e$.dropdown?r(Sd,{show:e$.dropdown.show,visible:e$.dropdown.visible,className:e$.dropdown.className,children:e$.dropdown.items?.map((e$,eI)=>kd(e$,eI,eR,eH))}):null,e$.submenu?r(wd,{className:e$.submenu.className,children:e$.submenu.items?.map((e$,eI)=>kd(e$,eI,eR,eH))}):null]},ez):r(Td,{eventKey:e$.key,as:e$.as,href:e$.href,to:e$.to,target:e$.target,rel:e$.rel,title:e$.title,icon:e$.icon,extra:e$.extra,danger:e$.danger,onClick:e$.onClick,disabled:e$.disabled,active:e$.active,selected:e$.selected,focus:e$.focus,liClassName:e$.liClassName,className:e$.className,children:eW},ez)},Ad=Object.assign(({size:e$,direction:eI="vertical",mode:eR,className:eL,style:ez,selectable:eW=!0,multiple:eH=!1,inlineIndent:eF=24,triggerSubMenuAction:eP="hover",selectedKeys:eB,defaultSelectedKeys:eK,openKeys:eV,defaultOpenKeys:eq,onClick:eU,onSelect:eG,onDeselect:eZ,onOpenChange:eY,children:eX,items:eJ})=>{let eQ=hd(eR,eI),e0=(0,e.ref)(ud(eK??eB)),e1=(0,e.ref)(ud(eq??eV)),e2=void 0===eB?e0.value:ud(eB),e5=void 0===eV?e1.value:ud(eV),e3={mode:eQ,inlineIndent:eF,selectable:eW,multiple:eH,triggerSubMenuAction:eP,selectedKeys:e2,openKeys:e5,isSelected:(e$,eI)=>eI??dd(e2,e$),isOpen:(e$,eI)=>eI??dd(e5,e$),onItemClick:(e$,eI,eR=void 0===eI.key?[]:[eI.key])=>{let eL={key:eI.key,keyPath:eR,item:eI,domEvent:e$};if(eU&&eU(eL),!eW||void 0===eI.key)return;let ez=eH?md(e2,eI.key):[eI.key],eF=dd(e2,eI.key);void 0===eB&&(e0.value=ez);let eP={...eL,key:eI.key,selectedKeys:ez};if(eH&&eF){eZ&&eZ(eP);return}!eH&&eF&&1===e2.length||eG&&eG(eP)},onSubMenuToggle:(e$,eI,eR,eL)=>{var ez;ez=eI?dd(e5,e$)?e5:[...e5,e$]:e5.filter(eI=>eI!==e$),void 0===eV&&(e1.value=ez),eY&&eY(ez)}},e4="menu";"horizontal"===eQ?e4+=" menu-horizontal":e4+=" menu-vertical";let e6=ld(e$);return e6&&(e4+=` menu-${e6}`),eL&&(e4+=` ${eL}`),r("ul",{className:e4,style:ez,role:"horizontal"===eQ?"menubar":"menu","aria-orientation":"horizontal"===eQ?"horizontal":"vertical",children:eJ&&eJ.length?eJ.map((e$,eI)=>kd(e$,eI,e3)):pd(eX,e3)})},{Item:Td,Title:xd,Dropdown:Sd,DropdownToggle:Cd,Submenu:wd,SubMenu:Od,ItemGroup:Dd,Divider:Ed}),jd="__rue_component_type",Md=(...e$)=>e$.filter(Boolean).join(" "),Nd=(...e$)=>{let eI={};return e$.forEach(e$=>{e$&&Object.assign(eI,e$)}),eI},Pd=e$=>e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),Fd=e$=>e$?"string"==typeof e$?e$.trim():Object.entries(e$).filter(([,e$])=>null!=e$).map(([e$,eI])=>`${e$.startsWith("--")?e$:Pd(e$)}:${String(eI)}`).join("; "):"",Id=(e$,eI)=>[Fd(e$),Fd(eI)].filter(Boolean).join("; "),Ld=e$=>Array.isArray(e$)?e$.flatMap(e$=>Ld(e$)):null==e$||"boolean"==typeof e$?[]:[e$],Rd=e$=>!!e$&&"object"==typeof e$,zd=e$=>Array.from(new Set(Array.isArray(e$)?e$:e$?[e$]:["hover"])),Bd=e$=>{switch(e$){case"top":return{direction:"top",align:"center"};case"topLeft":return{direction:"top",align:"start"};case"topRight":return{direction:"top",align:"end"};case"bottom":return{direction:"bottom",align:"center"};case"bottomRight":return{direction:"bottom",align:"end"};case"left":return{direction:"left",align:"center"};case"leftTop":return{direction:"left",align:"start"};case"leftBottom":return{direction:"left",align:"end"};case"right":return{direction:"right",align:"center"};case"rightTop":return{direction:"right",align:"start"};case"rightBottom":return{direction:"right",align:"end"};default:return{direction:"bottom",align:"start"}}},Vd=e$=>{switch(e$){case"top":return"mb-2";case"left":return"me-2";case"right":return"ms-2";default:return"mt-2"}},Hd=(e$,eI)=>{switch(e$){case"top":return Md("bottom-[-5px]","start"===eI?"left-4":"end"===eI?"right-4":"left-1/2 -translate-x-1/2");case"left":return Md("right-[-5px]","start"===eI?"top-4":"end"===eI?"bottom-4":"top-1/2 -translate-y-1/2");case"right":return Md("left-[-5px]","start"===eI?"top-4":"end"===eI?"bottom-4":"top-1/2 -translate-y-1/2");default:return Md("top-[-5px]","start"===eI?"left-4":"end"===eI?"right-4":"left-1/2 -translate-x-1/2")}},Ud=(e$,eI)=>{if(!Rd(e$)||!e$.props||"object"!=typeof e$.props)return e$;let eR=e$.props,eL={...eR,...eI};return eL.className=Md(eR.className,eI.className),eL.style=Id(eR.style,eI.style)||void 0,void 0!==eI.children&&(eL.children=eI.children),e$.props=eL,e$},Wd=e$=>{let eI=null,eR=[];return Ld(e$).forEach(e$=>{if(Rd(e$)&&e$[jd]===qd){eI=e$;return}eR.push(e$)}),{contentNode:eI,triggerNodes:eR}},Gd=({placement:e$,trigger:eI,disabled:eR,arrow:eL,triggerClassName:ez,overlay:eW,content:eH,popupRender:eF,menu:eP,items:eB,overlayClassName:eK,overlayStyle:eV,classNames:eq,styles:eU,onOpenChange:eG})=>void 0!==e$||void 0!==eI||void 0!==eR||void 0!==ez||void 0!==eW||void 0!==eH||void 0!==eF||void 0!==eP||void 0!==eB||void 0!==eK||void 0!==eV||void 0!==eq||void 0!==eU||void 0!==eG,Kd=(e$,eI,eR)=>"div"===e$?r("div",{...eI,children:eR}):"span"===e$?r("span",{...eI,children:eR}):"section"===e$?r("section",{...eI,children:eR}):"article"===e$?r("article",{...eI,children:eR}):"details"===e$?r("details",{...eI,children:eR}):"ul"===e$?r("ul",{...eI,children:eR}):(0,e.h)(e$,eI,...eR),qd=({as:e$="div",className:eI,style:eR,children:eL,...ez})=>Kd(e$,{...ez,className:Md("dropdown-content",eI),style:eR?Fd(eR):void 0},Ld(eL)),Jd=Object.assign(({as:e$="div",align:eI,direction:eR,placement:eL,trigger:ez,hover:eW,open:eH,defaultOpen:eF,disabled:eP,arrow:eB,closeOnClick:eK,forceOpen:eV,forceClose:eq,className:eU,style:eG,triggerClassName:eZ,overlay:eY,content:eX,popupRender:eJ,menu:eQ,items:e0,overlayClassName:e1,overlayStyle:e2,classNames:e5,styles:e3,onOpenChange:e4,children:e6,...e8})=>{let e7=(0,e.getCurrentInstance)()?.propsRO??{children:e6},e9=eB??!1,t$=eK??!0,tI=Bd(eL),tR=eI??tI.align,tL=eR??tI.direction;if(!Gd({as:e$,align:eI,direction:eR,placement:eL,trigger:ez,hover:eW,open:eH,defaultOpen:eF,disabled:eP,arrow:eB,closeOnClick:eK,forceOpen:eV,forceClose:eq,className:eU,style:eG,triggerClassName:eZ,overlay:eY,content:eX,popupRender:eJ,menu:eQ,items:e0,overlayClassName:e1,overlayStyle:e2,classNames:e5,styles:e3,onOpenChange:e4,children:e6})){let eI="dropdown";return tR&&(eI+=` dropdown-${tR}`),tL&&(eI+=` dropdown-${tL}`),eW&&(eI+=" dropdown-hover"),eV&&(eI+=" dropdown-open"),eq&&(eI+=" dropdown-close"),eU&&(eI+=` ${eU}`),Kd(e$,{...e8,className:eI,open:!0===eH||void 0,style:eG?Fd(eG):void 0},Ld(e6))}let tz=Wd(e6),tW=(0,e.ref)(eF??!1),tH=(0,e.ref)(eH??eF??!1),tF=(0,e.ref)(zd(ez)),tP=(0,e.ref)(null),tB=eQ||e0?{...eQ,items:e0??eQ?.items}:void 0,tK=null,tV=null,tq=null,tU=void 0!==eH,tG=()=>{if(tq){if(tP.value){tq.style.position="fixed",tq.style.inset="auto auto auto auto",tq.style.left=`${tP.value.x}px`,tq.style.top=`${tP.value.y}px`;return}tq.style.position="",tq.style.inset="",tq.style.left="",tq.style.top=""}},tZ=e$=>{tK&&tK.classList.toggle("dropdown-open",!!eV||e$),tV&&tV.setAttribute("aria-expanded",e$?"true":"false"),tG()},tY=(e$,eI)=>{if(!eP){if(tH.value===e$){"contextMenu"===eI&&e$&&(tZ(e$),e4&&e4(e$,{source:eI}));return}tU||(tW.value=e$),tH.value=e$,e$||(tP.value=null),tZ(e$),e4&&e4(e$,{source:eI})}};(0,e.watch)(()=>eH,e$=>{"boolean"==typeof e$?(tH.value=e$,e$||(tP.value=null),tZ(e$)):(tH.value=tW.value,tZ(tW.value))},{immediate:!0}),(0,e.watch)(()=>eF,e$=>{tU||(tW.value=!!e$,tH.value=!!e$,tZ(!!e$))},{immediate:!0}),(0,e.watch)(()=>ez,e$=>{tF.value=zd(e$)},{immediate:!0}),(0,e.onMounted)(()=>{if(typeof window>"u")return;let e$=e$=>{tH.value&&(tF.value.includes("click")||tF.value.includes("contextMenu"))&&(tK?.contains(e$.target)||tY(!1,"outside"))},eI=e$=>{tH.value&&"Escape"===e$.key&&tY(!1,"escape")};window.addEventListener("click",e$,!0),window.addEventListener("keydown",eI),(0,e.onUnmounted)(()=>{window.removeEventListener("click",e$,!0),window.removeEventListener("keydown",eI)})});let tX=tF.value.includes("hover"),tJ=tF.value.includes("click"),tQ=tF.value.includes("contextMenu"),t0=tB?.items&&tB.items.length>0?r(Ad,{...tB,items:tB.items,selectable:tB.selectable??!1,className:Md("w-full min-w-56 rounded-box bg-transparent p-0",e5?.menu,tB.className),style:Id(tB.style,e3?.menu)||void 0,onClick:e$=>{tB.onClick&&tB.onClick(e$),t$&&tY(!1,"menu")}}):void 0===eY?eX:eY,t1=eJ?eJ(t0):t0,t2=tz.contentNode||null!=t1&&!1!==t1,t5="dropdown";tR&&(t5+=` dropdown-${tR}`),tL&&(t5+=` dropdown-${tL}`),eW&&(t5+=" dropdown-hover"),(tH.value||eV)&&(t5+=" dropdown-open"),eq&&(t5+=" dropdown-close"),e5?.root&&(t5+=` ${e5.root}`),eU&&(t5+=` ${eU}`);let t3=Id(eG,e3?.root)||void 0,t4=Id(tz.contentNode?void 0:Nd(e3?.overlay,e2,tP.value?{position:"fixed",inset:"auto auto auto auto",left:`${tP.value.x}px`,top:`${tP.value.y}px`}:void 0),void 0)||void 0,t6=Md(tz.contentNode?Vd(tL):Md("z-30 min-w-56 rounded-box border border-base-300/60 bg-base-100 shadow-lg",Vd(tL),tB?.items&&tB.items.length>0?"p-1":"p-0"),e5?.overlay,e1),t8=tz.contentNode?Ud(tz.contentNode,{key:"overlay",className:t6,ref:e$=>{tq=e$,tG()},style:Nd(e2,e3?.overlay,tP.value?{position:"fixed",inset:"auto auto auto auto",left:`${tP.value.x}px`,top:`${tP.value.y}px`}:void 0)}):i(qd,{className:t6,style:t4,ref:e$=>{tq=e$,tG()},onClick:e$=>{if(!tB?.items?.length||!t$)return;let eI=e$.target?.closest?.('a,button,[role="menuitem"]');if(!eI)return;let eR=eI.closest("li");eR&&Array.from(eR.children).some(e$=>"UL"===e$.tagName)||tY(!1,"menu")},children:[e9?r("span",{"aria-hidden":"true",className:Md("pointer-events-none absolute z-[-1] h-2.5 w-2.5 rotate-45 border border-base-300/60 bg-base-100",Hd(tL,tR))}):null,t1]},"overlay"),{onMouseEnter:t7,onMouseLeave:t9,onKeyDown:r$,...rI}=e8;return Kd(e$,{...rI,ref:e$=>{tK=e$,tZ(tH.value)},className:t5,style:t3,onMouseEnter:e$=>{tX&&tY(!0,"trigger"),t7&&t7(e$)},onMouseLeave:e$=>{tX&&tY(!1,"outside"),t9&&t9(e$)},onKeyDown:e$=>{r$&&r$(e$),!e$.defaultPrevented&&"Escape"===e$.key&&tH.value&&tY(!1,"escape")}},[r("div",{ref:e$=>{tV=e$,e$&&e$.setAttribute("aria-expanded",tH.value?"true":"false")},className:Md("inline-flex",e5?.trigger,eZ),"aria-haspopup":tB?.items?.length?"menu":"dialog","aria-expanded":tH.value?"true":"false","aria-disabled":eP?"true":void 0,onClick:e$=>{tJ&&tY(!tH.value,"trigger")},onContextMenu:e$=>{tQ&&("function"==typeof e$.preventDefault&&e$.preventDefault(),tP.value={x:e$.clientX??0,y:e$.clientY??0},tY(!0,"contextMenu"))},children:tz.contentNode?tz.triggerNodes:r(e.Slot,{source:e7})},"trigger"),t2?t8:null])},{Trigger:({as:e$="div",className:eI,style:eR,children:eL,...ez})=>{let eW={...ez,className:eI,style:eR?Fd(eR):void 0};if("div"===e$){"number"!=typeof eW.tabIndex&&(eW.tabIndex=0),eW.role||(eW.role="button");let e$=eW.onKeyDown;eW.onKeyDown=eI=>{e$&&e$(eI),!eI.defaultPrevented&&("Enter"===eI.key||" "===eI.key)&&eI.currentTarget instanceof HTMLElement&&("function"==typeof eI.preventDefault&&eI.preventDefault(),eI.currentTarget.click())}}return Kd(e$,eW,Ld(eL))},Content:qd}),Yd=0,Xd={emptyText:"No Data",filterConfirm:"应用",filterReset:"重置",triggerAsc:"切换为升序",triggerDesc:"切换为降序",cancelSort:"取消排序"},Zd=(e$,eI)=>{if(eI){if(Array.isArray(eI)){let eR=e$;for(let e$ of eI){if(null==eR)return;eR=eR[e$]}return eR}return e$?.[eI]}},Qd=e$=>"right"===e$?"text-right":"center"===e$?"text-center":"text-left",$d=(...e$)=>e$.filter(Boolean).join(" ").trim()||void 0,ef=(...e$)=>{let eI;return e$.forEach(e$=>{e$&&(eI=eI?{...eI,...e$}:{...e$})}),eI},tf=e$=>null==e$||!1===e$?[]:Array.isArray(e$)?[...e$]:"string"!=typeof e$&&"function"==typeof e$?.[Symbol.iterator]?Array.from(e$):[e$],nf=(e$,eI)=>e$.key?e$.key:"string"==typeof e$.dataIndex?e$.dataIndex:Array.isArray(e$.dataIndex)&&e$.dataIndex.length>0?e$.dataIndex.join("."):`column-${eI.join("-")}`,rf=e$=>(e$.children??[]).filter(e$=>!e$.hidden),af=e$=>e$.reduce((e$,eI)=>{if(eI.hidden)return e$;let eR=rf(eI);return 0===eR.length?e$+1:e$+af(eR)},0),of=e$=>{let eI=1;return e$.forEach(e$=>{if(e$.hidden)return;let eR=rf(e$);eR.length>0&&(eI=Math.max(eI,1+of(eR)))}),eI},sf=(e$,eI=[])=>{let eR=[];return e$.forEach((e$,eL)=>{if(e$.hidden)return;let ez=[...eI,eL],eW=rf(e$);eW.length>0?eR.push(...sf(eW,ez)):eR.push({column:e$,indexPath:ez,key:nf(e$,ez)})}),eR},cf=e$=>{let eI=e$.filter(e$=>!e$.hidden),eR=of(eI),eL=Array.from({length:eR},()=>[]),ez=(e$,eI,eW=[])=>{e$.forEach((e$,eH)=>{if(e$.hidden)return;let eF=[...eW,eH],eP=rf(e$),eB=eP.length>0?af(eP):1,eK=e$.colSpan??eB;if(0===eK)return;let eV=e$.rowSpan??(eP.length>0?1:eR-eI);eL[eI].push({column:e$,index:eH,key:nf(e$,eF),colSpan:eK,rowSpan:eV}),eP.length>0&&ez(eP,eI+1,eF)})};return ez(eI,0),eL},lf=e$=>!!(e$.fixedCol||!0===e$.fixed||"left"===e$.fixed||"start"===e$.fixed),uf=e$=>"object"==typeof e$&&!!e$,df=e$=>{if(uf(e$.sorter))return e$.sorter.multiple},ff=e$=>e$.filter(e$=>!!e$?.order).sort((e$,eI)=>{let eR=e$.multiple??0,eL=eI.multiple??0;return eR===eL?0:eL-eR}),pf=e$=>{let eI=ff(e$.filter(e$=>void 0!==e$.column.sortOrder).map(e$=>({key:e$.key,order:e$.column.sortOrder,multiple:df(e$.column)})));return eI.length>0?eI:ff(e$.filter(e$=>!!e$.column.defaultSortOrder).map(e$=>({key:e$.key,order:e$.column.defaultSortOrder,multiple:df(e$.column)})))},mf=e$=>{let eI={};return e$.forEach(({column:e$,key:eR})=>{if(void 0!==e$.filteredValue){eI[eR]=tf(e$.filteredValue);return}void 0!==e$.defaultFilteredValue&&(eI[eR]=tf(e$.defaultFilteredValue))}),eI},hf=(e$,eI)=>e$<=1?1:e$>=eI?eI:e$,gf=e$=>"number"==typeof e$?`${e$}px`:e$,_f=e$=>{switch(e$){case"small":return"table-sm";case"middle":return"table-md";case"large":return"table-lg";case"xs":case"sm":case"md":case"lg":case"xl":return`table-${e$}`;default:return}},vf=e$=>({...Xd,...e$}),yf=(e$,eI)=>"function"==typeof e$?e$({props:eI})??{}:e$??{},bf=e$=>!!e$&&(!0===e$||!1!==e$.showTitle),xf=e$=>{switch(e$){case"topLeft":return"topStart";case"topCenter":return"topCenter";case"topRight":return"topEnd";case"bottomLeft":return"bottomStart";case"bottomCenter":return"bottomCenter";case"bottomRight":return"bottomEnd";default:return"none"}},Sf=e$=>null==e$||!1===e$?[]:(e$.placement?.length?e$.placement:e$.position?.length?e$.position.map(xf):["bottomEnd"]).filter((e$,eI,eR)=>"none"===e$?1===eR.length:eR.indexOf(e$)===eI),Cf=e$=>{switch(e$){case"topStart":case"bottomStart":return"justify-start";case"topCenter":case"bottomCenter":return"justify-center";default:return"justify-end"}},wf=(e$,eI)=>{let eR=e$?.[eI];return Array.isArray(eR)?eR:[]},Tf=({render:e$,data:eI})=>"function"==typeof e$?e$(eI):null,Ef=e$=>{let eI=typeof e$;return"string"===eI||"number"===eI},Df=Object.assign(e$=>{let{size:eI,zebra:eR,pinRows:eL,pinCols:ez,bordered:eW,className:eH,classNames:eF,styles:eP,children:eB,dataSource:eK,columns:eV,rowKey:eq="key",showHeader:eU=!0,onRow:eG,onHeaderRow:eZ,onChange:eY,rowSelection:eX,pagination:eJ,expandable:eQ,rowClassName:e0,summary:e1,emptyText:e2,locale:e5,title:e3,footer:e4,loading:e6,rowHoverable:e8=!1,rowHoverClass:e7,tableLayout:e9,sortDirections:t$,showSorterTooltip:tI,scroll:tR,sticky:tL,height:tz,onScroll:tW}=e$,tH=vf(e5),tF=yf(eF,e$),tP=yf(eP,e$),tB="object"==typeof e6?{spinning:!1!==e6.spinning,tip:e6.tip}:{spinning:!!e6,tip:void 0},tK=eQ?.childrenColumnName??"children",tV=eQ?.indentSize??15,tq=(e$,eI)=>("function"==typeof eq?eq(e$):e$?.[eq])??eI,tU=(e$,eI=[])=>e$.flatMap((e$,eR)=>{let eL=[...eI,eR],ez=tq(e$,`row-${eL.join("-")}`),eW=wf(e$,tK);return 0===eW.length?[]:[ez,...tU(eW,eL)]}),tG="table",tZ=_f(eI);if(tZ&&(tG+=` ${tZ}`),eR&&(tG+=" table-zebra"),(eL||tL)&&(tG+=" table-pin-rows"),ez&&(tG+=" table-pin-cols"),eW&&(tG+=" border-separate border-spacing-0"),tF.table&&(tG+=` ${tF.table}`),eH&&(tG+=` ${eH}`),!(null==eB||Array.isArray(eB)&&0===eB.length))return r("table",{className:tG,style:tP.table,children:eB});let tY=Array.isArray(eV)?sf(eV):[],[tX]=(0,e.useState)(`rue-table-${Yd++}`),[tJ,tQ]=(0,e.useState)(pf(tY),{kind:"ref"}),[t0,t1]=(0,e.useState)(mf(tY),{kind:"ref"}),[t2,t5]=(0,e.useState)({},{kind:"ref"}),[t3,t4]=(0,e.useState)({},{kind:"ref"}),[t6,t8]=(0,e.useState)(null),[t7,t9]=(0,e.useState)(0),[r$,rI]=(0,e.useState)(eX?.defaultSelectedRowKeys?[...eX.defaultSelectedRowKeys]:[],{kind:"ref"}),rR=null!=eJ&&!1!==eJ?eJ:void 0,[rL,rz]=(0,e.useState)(rR?rR.current??rR.defaultCurrent??1:1),[rW]=(0,e.useState)(rR?rR.pageSize??rR.defaultPageSize??10:Math.max(eK?.length??0,1)),[rH,rF]=(0,e.useState)(eQ?.defaultExpandedRowKeys?[...eQ.defaultExpandedRowKeys]:eQ?.defaultExpandAllRows&&Array.isArray(eK)?eK.flatMap((e$,eI)=>{let eR=tq(e$,`row-${eI}`),eL=wf(e$,tK);return eQ?.expandedRowRender||eL.length>0?[eR,...tU(eL,[eI])]:[]}):[],{kind:"ref"});if(Array.isArray(eV)&&Array.isArray(eK)){let e$=cf(eV),eI=sf(eV),eR=new Map(eI.map(e$=>[e$.key,e$])),eL=()=>{t9(t7.value+1)},eH=eI.some(e$=>void 0!==e$.column.sortOrder),eF=ff(eH?eI.filter(e$=>void 0!==e$.column.sortOrder).map(e$=>({key:e$.key,order:e$.column.sortOrder,multiple:df(e$.column)})):tJ.value),eP=new Map(eF.map(e$=>[e$.key,e$])),eB=eI.reduce((e$,eI)=>{let eR=eI.column.filteredValue;return void 0===eR?e$[eI.key]=tf(t0.value[eI.key]):e$[eI.key]=tf(eR),e$},{}),eq=e$=>{let eI={};return Object.keys(e$).forEach(eR=>{Array.isArray(e$[eR])&&e$[eR].length>0&&(eI[eR]=[...e$[eR]])}),eI},eJ=eq(eB),e5=e$=>"function"==typeof e$.sorter?e$.sorter:uf(e$.sorter)&&"function"==typeof e$.sorter.compare?e$.sorter.compare:(eI,eR)=>{let eL=Zd(eI,e$.dataIndex),ez=Zd(eR,e$.dataIndex);return null==eL&&null==ez?0:null==eL?-1:null==ez||eL>ez?1:eL<ez?-1:0},e6=(e$,eL)=>{let ez=eW=>{let eH=eW.flatMap(eR=>{let eL=wf(eR,tK),eW=eL.length>0?ez(eL):[];return eI.every(eI=>{let eL=e$[eI.key]??[];if(!Array.isArray(eL)||0===eL.length)return!0;let ez=eI.column.filterCombine??"or";if(eI.column.onFilter)return"and"===ez?eL.every(e$=>eI.column.onFilter(e$,eR)):eL.some(e$=>eI.column.onFilter(e$,eR));let eW=Zd(eR,eI.column.dataIndex);return"and"===ez?eL.every(e$=>e$===eW):eL.includes(eW)})||0!==eW.length?eL.length>0?[{...eR,[tK]:eW}]:[eR]:[]});return ff(eL).length>0&&(eH=eH.slice().sort((e$,eI)=>((e$,eI,eL)=>{for(let ez of ff(eL)){let eL=eR.get(ez.key);if(!eL?.column.sorter)continue;let eW=e5(eL.column),eH="ascend"===ez.order?eW(e$,eI):-eW(e$,eI);if(0!==eH)return eH}return 0})(e$,eI,eL))),eH};return ez(eK)},tU=eQ?.expandedRowKeys?[...eQ.expandedRowKeys]:[...rH.value],tZ=new Set(tU),tY=(e$,eI=0,eR=[],eL=!1)=>e$.flatMap((e$,ez)=>{let eW=[...eR,ez],eH=tq(e$,`row-${eW.join("-")}`),eF=wf(e$,tK),eP={key:eH,record:e$,indent:eI,hasTreeChildren:eF.length>0};return eF.length>0&&(eL||tZ.has(eH))?[eP,...tY(eF,eI+1,eW,eL)]:[eP]}),rP=tY(eK,0,[],!0),rB=rP.some(e$=>e$.hasTreeChildren),rK=tY(e6(eB,eF)),rV=rK.length,rq=null!=rR,rU=rq?Math.max(1,rR.pageSize??rW.value):Math.max(rV,1),rG=rq?Math.max(1,Math.ceil(rV/rU)):1,rZ=rq?hf(rR.current??rL.value,rG):1,rY=rq?rK.slice((rZ-1)*rU,rZ*rU):rK,rX=rY.map(e$=>e$.record),rJ=new Set(eX?.selectedRowKeys?[...eX.selectedRowKeys]:[...r$.value]),rQ=eX?.align??"center",r0=!!eX,r1=!!eQ?.expandedRowRender,r2=(r1||rB)&&eQ?.showExpandColumn!==!1,r5=eI.length+(+!!r0+ +!!r2),r3=ef(tP.wrapper,tR?.y===void 0?void 0:{maxHeight:gf(tR.y)},void 0===tz?void 0:{height:gf(tz)},tL&&"object"==typeof tL&&void 0!==tL.offsetScroll?{top:gf(tL.offsetScroll)}:void 0),r4=$d(tR?.x?"overflow-x-auto":void 0,tR?.y||void 0!==tz?"overflow-y-auto":void 0,tF.wrapper),r6=ef(tP.table)??{},r8=eI.some(({column:e$})=>!!e$.ellipsis);e9?r6.tableLayout=e9:(r8||tR?.x)&&(r6.tableLayout="fixed"),tR?.x===!0?(r6.width="max-content",r6.minWidth="100%"):tR?.x!==void 0&&(r6.width=gf(tR.x),r6.minWidth="100%"),(()=>{let e$=globalThis,eI=`__rue_table_outside_close_${tX.value}`;if(e$[eI])return;let eR=e$=>{let eI=e$?.target;eI&&(eI.closest(`[data-rue-table-root="${tX.value}"]`)||(t8(null),eL()))};e$?.addEventListener&&e$.addEventListener("pointerdown",eR),e$[eI]=eR})();let r7=()=>{if(!tR?.scrollToFirstRowOnChange)return;let e$=document.querySelector(`[data-rue-table-scroll="${tX.value}"]`);e$&&(e$.scrollTop=0)},r9=ff(eF).map(e$=>{let eI=eR.get(e$.key);return eI?{column:eI.column,columnKey:e$.key,order:e$.order}:null}).filter(Boolean),a$=(e$,eI)=>{let eR=e$.title;return"function"==typeof eR?eR({sortOrder:eP.get(eI)?.order??null,filteredValue:eB[eI]??[],sortColumns:r9,filters:eJ}):eR},aI=(e$,eI,eL,ez,eW)=>{let eH;if(!eY)return;let eF=tY(e6(ez,eW)),eP=rq?Math.max(1,Math.ceil(eF.length/eL)):1,eB=rq?hf(eI,eP):1,eK=rq?eF.slice((eB-1)*eL,eB*eL).map(e$=>e$.record):eF.map(e$=>e$.record);eY(!!rq&&{current:eB,pageSize:eL},eq(ez),0===(eH=ff(eW).map(e$=>{let eI=eR.get(e$.key);return eI?{column:eI.column,order:e$.order,columnKey:e$.key,field:eI.column.dataIndex,multiple:e$.multiple}:null}).filter(Boolean)).length?{column:null,order:null}:1===eH.length?eH[0]:eH,{action:e$,currentDataSource:eK})},aR=(e$,eR,ez)=>{let eW=tf(eR),eH={...eB,[e$]:eW};eI.find(eI=>eI.key===e$)?.column?.filteredValue===void 0&&t1(eH),t5({...t2.value,[e$]:eW}),eL(),rq&&void 0===rR.current&&rz(1),ez&&t8(null),r7(),aI("filter",rq?1:rZ,rU,eH,eF)},aL=e$=>{let eI=hf(e$,rG);rq&&void 0===rR.current&&rz(eI),eL(),rq&&rR.onChange&&rR.onChange(eI,rU),r7(),aI("paginate",eI,rU,eB,eF)},az=rY.filter(e$=>!eX?.disabled&&!(eX?.getCheckboxProps?eX.getCheckboxProps(e$.record):{})?.disabled).map(e$=>e$.key),aW=az.length>0&&az.every(e$=>rJ.has(e$)),aH=az.some(e$=>rJ.has(e$))&&!aW,aF=(e$,eI,eR,ez,eW)=>{eX?.selectedRowKeys===void 0&&rI([...e$]),eL();let eH=rP.filter(eI=>e$.includes(eI.key)).map(e$=>e$.record);void 0!==eR&&eX?.onSelect&&"boolean"==typeof ez&&eX.onSelect(eR,ez,eH,eW),eX?.onChange&&eX.onChange([...e$],eH,eI)},aP=(e$,eI)=>{let eR=!!eQ?.expandedRowRender&&(!eQ?.rowExpandable||eQ.rowExpandable(e$.record)),eL=e$.hasTreeChildren||eR;return{key:e$.key,enabled:eL,expanded:tZ.has(e$.key),hasExpandedRowRender:eR,indent:e$.indent,rowIndex:eI}},aB=(e$,eI)=>{let eR=aP(e$,eI);if(!eR.enabled)return;let ez=new Set(tU);eR.expanded?ez.delete(eR.key):ez.add(eR.key);let eW=Array.from(ez);eQ?.expandedRowKeys===void 0&&rF(eW),eL(),eQ?.onExpand&&eQ.onExpand(!eR.expanded,e$.record),eQ?.onExpandedRowsChange&&eQ.onExpandedRowsChange(eW)},aK=(e$,eI)=>{let eR=[...eI.sortDirections??t$??["ascend","descend"],null],eL=eP.get(e$)?.order??null;return eR[(eR.findIndex(e$=>e$===eL)+1+eR.length)%eR.length]},aV=(e$,eI)=>{let eR=e$.filterDropdownProps?.open??e$.filterDropdownOpen;return void 0===eR?t6.value===eI:!!eR},aq=(e$,eI)=>(eI?aV(eI,e$):t6.value===e$)?tf(t2.value[e$]??eB[e$]):tf(eB[e$]),aU=(e$,eI)=>{t5({...t2.value,[e$]:tf(eI)}),eL()},aG=(e$,eI,eR)=>{let ez=aV(eI,e$);eR&&t5({...t2.value,[e$]:tf(eB[e$])}),eI.filterDropdownProps?.open===void 0&&void 0===eI.filterDropdownOpen&&t8(eR?e$:t6.value===e$?null:t6.value),(ez!==eR||eR)&&eL(),eI.filterDropdownProps?.onOpenChange?.(eR),eI.onFilterDropdownOpenChange?.(eR)},aZ=(e$,eI)=>{aG(e$,eI,!1)},aY=(e$,eI,eR)=>{aR(e$,aq(e$,eI),eR?.closeDropdown??!0)},aX=(e$,eI,eR)=>{let eL=eI.filterResetToDefaultFilteredValue?tf(eI.defaultFilteredValue):[];(aU(e$,eL),eR?.confirm)?aR(e$,eL,eR.closeDropdown??!0):eR?.closeDropdown&&aZ(e$,eI)},aJ=(e$,eI,eR)=>eI?e$.map(e$=>{let eL="function"==typeof eR.filterSearch?eR.filterSearch(eI,e$):String(e$.text).toLowerCase().includes(eI.toLowerCase()),ez=Array.isArray(e$.children)?aJ(e$.children,eI,eR):void 0;return eL||ez&&ez.length>0?ez&&ez.length>0?{...e$,children:ez}:e$:null}).filter(Boolean):e$,aQ=(e$,eI,eR,eL,ez=0)=>e$.flatMap(e$=>{let eW=eL.includes(e$.value),eH=Array.isArray(e$.children)&&e$.children.length>0?aQ(e$.children,eI,eR,eL,ez+1):[],eF=i("label",{className:"flex items-center gap-2 text-sm",style:ez>0?{paddingLeft:`${12*ez}px`}:void 0,children:[r("input",{type:!1===eI.filterMultiple?"radio":"checkbox",name:`rue-table-filter-${tX.value}-${eR}`,className:!1===eI.filterMultiple?"radio radio-xs":"checkbox checkbox-xs",checked:eW,onChange:ez=>{let eW=ez.target,eH;if(!1===eI.filterMultiple)eH=eW.checked?[e$.value]:[];else{let eI=new Set(eL);eW.checked?eI.add(e$.value):eI.delete(e$.value),eH=Array.from(eI)}aU(eR,eH),!1===eI.filterOnClose&&aR(eR,eH,!1)}}),r("span",{children:e$.text})]},`${String(e$.value)}-${ez}`);return eH.length>0?[eF,...eH]:[eF]}),a0=(e$,eI,eR)=>eR.enabled?eQ?.expandIcon?eQ.expandIcon({expanded:eR.expanded,expandable:eR.enabled,record:e$.record,onExpand:(eR,eL)=>{eL?.stopPropagation?.(),aB(e$,eI)}}):r("button",{className:"btn btn-ghost btn-xs",onClick:eR=>{eR.stopPropagation(),aB(e$,eI)},children:eR.expanded?"-":"+"}):null,a1=rX.slice();a1.total=rV;let a2="function"==typeof e1?e1(a1,{total:rV,page:rZ,pageSize:rU}):null,a5=e3?r(Tf,{render:e3,data:rX}):null,a3=e4?r(Tf,{render:e4,data:rX}):null,a4=Sf(rR),a6=rq&&!(rR?.hideOnSinglePage&&rG<=1)&&(1!==a4.length||"none"!==a4[0]),a8=e$=>i("div",{"data-rue-table-pager":e$,className:$d("flex items-center gap-2 p-2",Cf(e$),tF.pager),style:tP.pager,children:[r("button",{className:"btn btn-ghost btn-xs",disabled:rZ<=1,onClick:()=>aL(rZ-1),children:"Prev"}),Array.from({length:rG}).map((eI,eR)=>r("button",{className:`btn btn-ghost btn-xs${rZ===eR+1?" btn-active":""}`,onClick:()=>aL(eR+1),children:eR+1},`page-${e$}-${eR+1}`)),r("button",{className:"btn btn-ghost btn-xs",disabled:rZ>=rG,onClick:()=>aL(rZ+1),children:"Next"})]},`pager-${e$}`),a7=eX?.getTitleCheckboxProps?.()??{},a9=eX?.type==="radio"||eX?.hideSelectAll?null:r("label",{children:r("input",{type:"checkbox",className:"checkbox",checked:aW,"aria-checked":aH?"mixed":aW?"true":"false",disabled:eX?.disabled||0===az.length,onChange:e$=>(e$=>{if(!eX||"radio"===eX.type)return;let eI=new Set(az),eR=new Set(eX.selectedRowKeys??r$.value);eI.forEach(eI=>{e$?eR.add(eI):eR.delete(eI)});let eL=Array.from(eR);if(aF(eL,{type:"checkbox"}),eX.onSelectAll){let eI=rP.filter(e$=>eL.includes(e$.key)).map(e$=>e$.record);eX.onSelectAll(e$,eI)}})(e$.target.checked),...a7})}),n$=eX?.columnTitle===void 0?a9:"function"==typeof eX.columnTitle?eX.columnTitle(a9):eX.columnTitle;return i("div",{"data-rue-table-root":tX.value,"data-rue-table-scroll":tX.value,"data-rue-table-version":t7.value,className:$d("relative",eW?"rounded-box border border-base-300 bg-base-100":void 0,tF.root,r4),style:ef(tP.root,r3),onScroll:tW,children:[a6?a4.filter(e$=>e$.startsWith("top")).map(a8):null,a5?r("div",{className:$d("p-2",tF.title),style:tP.title,children:a5}):null,i("table",{className:tG,style:r6,"data-rue-table-id":tX.value,children:[eU?r("thead",{className:tF.thead,style:tP.thead,children:e$.map((eI,ez)=>{let{className:eW,style:eK,...eV}=eZ&&eZ(eI.map(e$=>e$.column),ez)||{};return i("tr",{className:$d(tF.headerRow,eW),style:ef(tP.headerRow,eK),...eV,children:[0===ez&&r2?r("th",{rowSpan:e$.length,className:$d(tF.headerCell,Qd("center")),style:ef(tP.headerCell,eQ?.columnWidth?{width:eQ.columnWidth}:void 0),children:eQ?.columnTitle}):null,0===ez&&r0?r("th",{rowSpan:e$.length,className:$d(tF.headerCell,Qd(rQ)),style:ef(tP.headerCell,eX?.columnWidth?{width:eX.columnWidth}:void 0),children:n$}):null,eI.map(e$=>((e$,eI)=>{let ez=e$.column.onHeaderCell&&e$.column.onHeaderCell(e$.column,e$.index)||{},eW=0===rf(e$.column).length?eR.get(e$.key)??null:null,eK=eW?.key??e$.key,eV=ez.colSpan??e$.colSpan,eq=ez.rowSpan??e$.rowSpan;if(0===eV||0===eq)return null;let{className:eU,style:eG,...eZ}=ez,eY=$d(tF.headerCell,Qd(e$.column.align),e$.column.className,eU),eX=ef(tP.headerCell,e$.column.width||e$.column.minWidth?{...e$.column.width?{width:e$.column.width}:{},...e$.column.minWidth?{minWidth:e$.column.minWidth}:{}}:void 0,eG),eJ=eW?((e$,eI)=>{let ez=a$(eI,e$),eW=eI.filtered??(eB[e$]??[]).length>0,eK=eP.get(e$)?.order??null,eV=aq(e$,eI),eq=t3.value[e$]??"",eU=aV(eI,e$),eG=aJ(eI.filters??[],eq,eI),eZ=((e$,eI)=>{let eR=e$.showSorterTooltip??tI;if(!1===eR)return;if("object"==typeof eR&&eR?.title!==void 0)return eR.title;let eL=aK(eI,e$);return"ascend"===eL?tH.triggerAsc:"descend"===eL?tH.triggerDesc:tH.cancelSort})(eI,e$),{open:eY,onOpenChange:eX,children:eJ,content:eQ,overlay:e0,items:e1,menu:e2,popupRender:e5,...e3}=eI.filterDropdownProps??{};return i("div",{className:"relative flex items-center gap-2",children:[r("span",{children:ez}),eI.sorter?r("button",{type:"button","aria-label":`sort-${e$}`,title:eZ,className:"btn btn-ghost btn-xs h-auto min-h-0 px-1 py-0.5",onClick:ez=>{ez.stopPropagation(),((e$,eI)=>{let ez=eR.get(e$)?.column;if(!ez?.sorter)return;let eW=df(ez),eP=(()=>{if(null!=eW){let eL=eF.filter(eI=>null!=df(eR.get(eI.key)?.column??{})&&eI.key!==e$).map(e$=>({...e$}));return eI&&eL.push({key:e$,order:eI,multiple:eW}),ff(eL)}return eI?[{key:e$,order:eI,multiple:eW}]:[]})();eH||tQ(eP),eL(),rq&&void 0===rR.current&&rz(1),r7(),aI("sort",rq?1:rZ,rU,eB,eP)})(e$,aK(e$,eI))},children:"function"==typeof eI.sortIcon?eI.sortIcon({sortOrder:eK}):i("span",{className:$d("inline-flex flex-col leading-none",eK?"text-base-content":"opacity-60"),children:[r("span",{className:$d("ascend"===eK?"text-base-content":"opacity-40"),children:"▲"}),r("span",{className:$d("-mt-0.5","descend"===eK?"text-base-content":"opacity-40"),children:"▼"})]})}):null,Array.isArray(eI.filters)&&eI.filters.length>0||void 0!==eI.filterDropdown?i(Jd,{trigger:"click",open:eU,closeOnClick:!1,align:"start",...e3,onOpenChange:eR=>aG(e$,eI,eR),children:[r(Jd.Trigger,{as:"button",type:"button","aria-label":`filter-${e$}`,className:$d("btn btn-ghost btn-xs h-auto min-h-0 px-1 py-0.5 select-none",eW?"text-base-content":"opacity-40"),children:"function"==typeof eI.filterIcon?eI.filterIcon(eW):void 0===eI.filterIcon?"☰":eI.filterIcon}),r(Jd.Content,{className:"dropdown-content z-50 mt-2 p-0",onClick:e$=>e$.stopPropagation(),children:"function"==typeof eI.filterDropdown?eI.filterDropdown({setSelectedKeys:eI=>aU(e$,eI),selectedKeys:eV,confirm:eR=>aY(e$,eI,eR),clearFilters:eR=>aX(e$,eI,eR),filters:eI.filters,close:()=>aZ(e$,eI),visible:eU}):void 0===eI.filterDropdown?i("div",{className:"w-56 rounded-box border border-base-content/10 bg-base-100 p-3 shadow-xl",children:[eI.filterSearch?r("input",{type:"text",className:"input input-bordered input-xs mb-2 w-full",placeholder:"搜索筛选项",value:t3.value[e$]??"",onInput:eI=>{t4({...t3.value,[e$]:eI.target.value}),eL()}}):null,i("div",{className:"max-h-56 space-y-2 overflow-auto",children:[aQ(eG,eI,e$,eV),0===eG.length?r("div",{className:"text-sm opacity-60",children:"暂无匹配项"}):null]}),!1===eI.filterOnClose?null:i("div",{className:"mt-3 flex justify-end gap-2",children:[r("button",{className:"btn btn-ghost btn-xs",onClick:()=>aX(e$,eI,{confirm:!0}),children:tH.filterReset}),r("button",{className:"btn btn-primary btn-xs",onClick:()=>aY(e$,eI),children:tH.filterConfirm})]})]}):eI.filterDropdown})]}):null]})})(eK,e$.column):a$(e$.column,e$.key);return r("th",{colSpan:eV,rowSpan:eq,className:eY,style:eX,...eZ,children:eJ},`${eI}-${e$.key}`)})(e$,ez))]},`header-row-${ez}`)})}):null,i("tbody",{className:tF.tbody,style:tP.tbody,children:[rY.flatMap((e$,eR)=>{let eL=aP(e$,eR),{className:eW,style:eH,onClick:eF,...eP}=eG&&eG(e$.record,eR)||{},eB="function"==typeof e0?e0(e$.record,eR):"",eK=[i("tr",{...eP,onClick:eI=>{eF&&eF(eI),!(!eQ?.expandRowByClick||!eL.enabled)&&(eI?.target?.closest("button, input, a, label")||aB(e$,eR))},className:$d(tF.bodyRow,eW,eB,e8?e7||"hover:bg-base-200":""),style:ef(tP.bodyRow,eH),children:[r2?r("td",{className:$d(tF.cell,Qd("center")),style:ef(tP.cell,eQ?.columnWidth?{width:eQ.columnWidth}:void 0,e$.indent>0?{paddingLeft:`${e$.indent*tV}px`}:void 0),children:a0(e$,eR,eL)}):null,r0?((e$,eI)=>{if(!eX)return null;let eR=eX.getCheckboxProps?{...eX.getCheckboxProps(e$.record)}:{};eX.disabled&&(eR.disabled=!0);let eL=rJ.has(e$.key),eW="radio"===eX.type?"radio":"checkbox",eH=r("label",{onClick:e$=>e$.stopPropagation(),children:r("input",{type:"radio"===eX.type?"radio":"checkbox",className:eW,checked:eL,onChange:eI=>{let eR=eI.target;if("radio"===eX.type)return void aF([e$.key],{type:"radio"},e$.record,!0,eI);let eL=new Set(eX.selectedRowKeys??r$.value);eR.checked?eL.add(e$.key):eL.delete(e$.key),aF(Array.from(eL),{type:"checkbox"},e$.record,eR.checked,eI)},...eR})}),eF=eX.renderCell?eX.renderCell(eL,e$.record,eI,eH):eH;return r(ez&&eX.fixed?"th":"td",{className:$d(tF.cell,Qd(rQ)),style:ef(tP.cell,eX.columnWidth?{width:eX.columnWidth}:void 0),children:eF})})(e$,eR):null,eI.map((eI,eW)=>{let eH=Zd(e$.record,eI.column.dataIndex),eF=eI.column.render?eI.column.render(eH,e$.record,eR):eH,eP=eI.column.onCell&&eI.column.onCell(e$.record,eR)||{},{className:eB,style:eK,...eV}=eP,eq=eP.colSpan??1,eU=eP.rowSpan??1;if(0===eq||0===eU)return null;let eG=!r2&&0===eW,eZ=eI.column.rowScope||ez&&lf(eI.column)?"th":"td",eY=$d(tF.cell,Qd(eI.column.align),eI.column.className,eI.column.ellipsis?"truncate":void 0,eB),eX=ef(tP.cell,eI.column.width||eI.column.minWidth?{...eI.column.width?{width:eI.column.width}:{},...eI.column.minWidth?{minWidth:eI.column.minWidth}:{}}:void 0,eG&&e$.indent>0?{paddingLeft:`${e$.indent*tV}px`}:void 0,eK),eJ=eI.column.ellipsis&&bf(eI.column.ellipsis)&&Ef(eF)?String(eF):void 0,eQ=eG?i("div",{className:"flex items-center gap-2",children:[a0(e$,eR,eL),r("span",{className:eI.column.ellipsis?"truncate":void 0,children:eF})]}):eF;return r(eZ,{className:eY,style:eX,title:eJ,colSpan:eq,rowSpan:eU,scope:eI.column.rowScope,"data-rue-table-indent":eG&&e$.indent>0?String(e$.indent):void 0,...eV,children:eQ},`cell-${String(e$.key)}-${eI.key}-${eW}`)})]},`row-${String(e$.key)}`)];if(r1&&eL.hasExpandedRowRender&&eL.expanded){let eI="function"==typeof eQ?.expandedRowClassName?eQ.expandedRowClassName(e$.record,eR,e$.indent):eQ?.expandedRowClassName;eK.push(r("tr",{className:eI,children:r("td",{colSpan:r5,children:eQ.expandedRowRender(e$.record,eR,e$.indent,!0)})},`expanded-${String(e$.key)}`))}return eK}),0===rY.length?r("tr",{children:r("td",{colSpan:r5,className:$d(tF.empty,Qd("center")),style:tP.empty,children:void 0===e2?tH.emptyText:e2})}):null]},`body-${t7.value}`),a2||a6&&a4.some(e$=>e$.startsWith("bottom"))?i("tfoot",{className:tF.tfoot,style:tP.tfoot,children:[a2?r("tr",{className:tF.summary,style:tP.summary,children:r("td",{colSpan:r5,children:a2})}):null,a6?a4.filter(e$=>e$.startsWith("bottom")).map(e$=>r("tr",{children:r("td",{colSpan:r5,children:a8(e$)})},`pager-row-${e$}`)):null]}):null]}),a3?r("div",{className:$d("p-2",tF.footer),style:tP.footer,children:a3}):null,tB.spinning?i("div",{className:$d("absolute inset-0 z-20 flex flex-col items-center justify-center gap-2 rounded-box bg-base-100/70",tF.loading),style:tP.loading,children:[r("span",{className:"loading loading-spinner loading-md"}),tB.tip?r("div",{className:"text-sm opacity-70",children:tB.tip}):null]}):null]})}return r("table",{className:tG,style:tP.table})},{Head:({className:e$,children:eI})=>r("thead",{className:e$||void 0,children:eI}),Body:({className:e$,children:eI})=>r("tbody",{className:e$||void 0,children:eI}),Foot:({className:e$,children:eI})=>r("tfoot",{className:e$||void 0,children:eI}),TR:({className:e$,children:eI})=>r("tr",{className:e$||void 0,children:eI}),TH:({className:e$,children:eI})=>r("th",{className:e$||void 0,children:eI}),TD:({className:e$,children:eI})=>r("td",{className:e$||void 0,children:eI})}),Of=(e$,eI)=>e$&&eI?`${e$} ${eI}`:e$??eI??"",kf=e$=>!!e$&&"object"==typeof e$&&"type"in e$&&"separator"===e$.type,Af=(e$,eI)=>e$.title??e$.label??eI,jf=(e$,eI)=>{if(void 0===eI)return;let eR=eI.replace(/^\//,"").replace(/\/$/,"");return Object.keys(e$).forEach(eI=>{let eL=e$[eI];null!=eL&&(eR=eR.replace(`:${eI}`,String(eL)))}),eR},Mf=(e$,eI,eR)=>{if(e$)return e$;if(!eR)return;let eL=eI.filter(Boolean).join("/");return eL?`/${eL}`:"/"},Nf=(e$,eI)=>"_blank"!==e$||eI?eI:"noreferrer",Pf=(e$,eI)=>eR=>{if(e$){"function"==typeof eR.preventDefault&&eR.preventDefault(),"function"==typeof eR.stopPropagation&&eR.stopPropagation();return}eI&&eI(eR)},Ff=()=>r("span",{className:"inline-block h-1.5 w-1.5 rotate-45 border-t border-r border-current"}),If=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-3.5 w-3.5","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 9 6 6 6-6"})}),Lf=(e$,eI,eR)=>{if(!e$?.items||0===e$.items.length)return null;let eL="string"==typeof eR&&eR?`打开 ${eR} 菜单`:"打开路径菜单";return i(Jd,{align:e$.align,direction:e$.direction,className:Of("ms-1",e$.className),children:[r(Jd.Trigger,{className:"inline-flex items-center justify-center rounded-full text-base-content/60 outline-none transition-colors hover:text-base-content","aria-label":eL,children:eI??r(If,{})}),r(Jd.Content,{as:"ul",tabIndex:-1,className:Of("menu z-1 mt-2 min-w-40 rounded-box border border-base-300/60 bg-base-100 p-2 shadow-sm",e$.contentClassName),children:e$.items.map((e$,eI)=>{let eR=Af(e$),eL=Pf(e$.disabled,e$.onClick),ez=e$.className??void 0;return e$.href&&!e$.disabled?r("li",{children:r("a",{className:ez,href:e$.href,target:e$.target,rel:Nf(e$.target,e$.rel),onClick:e$.onClick?eL:void 0,children:eR})},e$.key??eI):!e$.disabled&&e$.onClick?r("li",{children:r("button",{className:ez,type:"button",onClick:eL,children:eR})},e$.key??eI):r("li",{children:r("span",{className:Of(e$.disabled?"cursor-not-allowed opacity-50":void 0,ez),children:eR})},e$.key??eI)})})]})},Rf=({item:e$,href:eI,isLast:eR,allowAutoCurrent:eL,params:ez,routes:eW,paths:eH,dropdownIcon:eF,itemRender:eP,fallbackChildren:eB})=>{let eK=Af(e$,eB),eV=e$.current??(eL&&eR&&!eI),eq=Pf(e$.disabled,e$.onClick);if(eP)return i(e.Fragment,{children:[eP(e$,ez,eW,eH,eI),Lf(e$.menu,eF,eK)]});let eU=i(e.Fragment,{children:[e$.icon?r("span",{className:"inline-flex shrink-0 items-center justify-center","aria-hidden":null==eK?void 0:"true",children:e$.icon}):null,eK]}),eG=Of(eV?"cursor-default font-medium text-base-content no-underline":e$.disabled?"cursor-not-allowed opacity-50 no-underline":void 0,e$.linkClassName)||void 0;return!eI||e$.disabled||eV?e$.disabled||eV||!e$.onClick?i(e.Fragment,{children:[r("span",{className:eG,"aria-current":eV?"page":void 0,children:eU}),Lf(e$.menu,eF,eK)]}):i(e.Fragment,{children:[r("button",{className:eG,type:"button",onClick:eq,children:eU}),Lf(e$.menu,eF,eK)]}):i(e.Fragment,{children:[r("a",{className:eG,href:eI,target:e$.target,rel:Nf(e$.target,e$.rel),onClick:e$.onClick?eq:void 0,children:eU}),Lf(e$.menu,eF,eK)]})},zf=Object.assign(({className:e$,children:eI,items:eR,routes:eL,separator:ez,params:eW={},dropdownIcon:eH,itemRender:eF})=>{let eP=eR&&eR.length?eR:eL,eB="breadcrumbs";if(eP&&eP.length&&(eB+=" [&>ul>li+li]:before:hidden"),e$&&(eB+=` ${e$}`),eP&&eP.length){let e$=eP.filter(e$=>!kf(e$)),eI=ez??r(Ff,{}),eR=[],eL=-1,eK=!1,eV=eI;return r("div",{className:eB,children:r("ul",{children:eP.map((ez,eP)=>{if(kf(ez))return eV=ez.separator??eI,null;eL+=1;let eB=jf(eW,ez.path),eq=void 0!==eB&&""!==eB?[...eR,eB]:[...eR],eU=Mf(ez.href,eq,void 0!==eB);void 0!==eB&&""!==eB&&eR.push(eB);let eG=i("li",{className:ez.className??void 0,children:[eK?r("span",{className:"pointer-events-none inline-flex shrink-0 items-center justify-center ms-2 me-3 text-base-content/40","aria-hidden":"true",children:eV}):null,Rf({item:ez,href:eU,isLast:eL===e$.length-1,allowAutoCurrent:!0,params:eW,routes:e$,paths:eq,dropdownIcon:eH,itemRender:eF})]},ez.key??eP);return eK=!0,eV=eI,eG})})})}return r("div",{className:eB,children:r("ul",{children:eI})})},{Item:({className:e$,children:eI,...eR})=>r("li",{className:e$??void 0,children:Rf({item:eR,href:eR.href,isLast:!1,allowAutoCurrent:!1,params:{},routes:[eR],paths:[],fallbackChildren:eI})})}),Bf=(e$,eI)=>eI?`${e$} ${eI}`:e$,Vf=e$=>{switch(e$){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return e$}},Hf=(e$,eI)=>"_blank"!==e$||eI?eI:"noreferrer",Uf=(e$,eI,eR,eL,ez)=>void 0===eI?void 0===eR?void 0===eL?void 0===ez?null:e$[ez]?.key??null:eL:e$[eR]?.key??null:eI,Wf=({as:e$,active:eI,disabled:eR,className:eL,href:ez,target:eW,rel:eH,htmlType:eF,ariaLabel:eP,onClick:eB,children:eK})=>{let eV=e$??(ez?"a":"button"),eq="";eI&&(eq+=" dock-active"),eR&&(eq+=" opacity-50"),eL&&(eq+=` ${eL}`);let eU=eq.trim()||void 0,eG=e$=>{if(eR){"function"==typeof e$.preventDefault&&e$.preventDefault(),"function"==typeof e$.stopPropagation&&e$.stopPropagation();return}eB&&eB(e$)};return"a"===eV?r("a",{href:eR?void 0:ez,target:eW,rel:Hf(eW,eH),className:eU,"aria-label":eP,"aria-current":eI?"page":void 0,"aria-disabled":eR?"true":void 0,onClick:eG,children:eK}):"div"===eV?r("div",{role:"button",tabIndex:eR?-1:0,className:eU,"aria-label":eP,"aria-current":eI?"page":void 0,"aria-disabled":eR?"true":void 0,onClick:eG,children:eK}):r("button",{className:eU,type:eF??"button",disabled:eR,"aria-label":eP,"aria-current":eI?"page":void 0,onClick:eG,children:eK})},Gf=({as:e$="div",size:eI,className:eR,ariaLabel:eL,items:ez,activeIndex:eW,defaultActiveIndex:eH,activeKey:eF,defaultActiveKey:eP,onChange:eB,onSelect:eK,children:eV})=>{let eq="dock",eU=Vf(eI);if(eU&&(eq+=` dock-${eU}`),eR&&(eq+=` ${eR}`),ez&&ez.length){let eI=ez.map((e$,eI)=>({...e$,key:e$.key??eI,index:eI})),eR=Uf(eI,eF,eW,eP,eH),eV=eI.map(e$=>{let eI={key:e$.key,index:e$.index,item:e$},eL=null==eR?null==eW?!!e$.active:eW===e$.index:eR===e$.key;return i(Wf,{as:e$.as??(e$.href?"a":"button"),className:e$.className,active:eL,disabled:e$.disabled,href:e$.href,target:e$.target,rel:e$.rel,htmlType:e$.htmlType,ariaLabel:e$.ariaLabel,onClick:eR=>{e$.onClick&&e$.onClick(eR,eI),eB&&eB(e$.index,eI),eK&&eK(e$.key,eI)},children:[null==e$.icon?null:r("span",{className:Bf("inline-flex items-center justify-center",e$.iconClassName),children:e$.icon}),null==e$.label?null:r(Kf,{className:e$.labelClassName,children:e$.label})]},e$.key)});return r("nav"===e$?"nav":"div",{className:eq,"aria-label":eL,children:eV})}return r("nav"===e$?"nav":"div",{className:eq,"aria-label":eL,children:eV})},Kf=({className:e$,children:eI})=>r("span",{className:Bf("dock-label",e$),children:eI}),qf=Object.assign(Gf,{Item:Wf,Label:Kf}),Jf=(...e$)=>e$.filter(Boolean).join(" "),Yf=(...e$)=>{let eI={};return e$.forEach(e$=>{e$&&Object.assign(eI,e$)}),Object.keys(eI).length>0?eI:void 0},Xf=e$=>{if(null==e$||!1===e$||!0===e$)return"";if("string"==typeof e$||"number"==typeof e$)return String(e$);if(Array.isArray(e$))return e$.map(e$=>Xf(e$)).join("");if("object"==typeof e$){if("props"in e$&&e$.props?.children!==void 0)return Xf(e$.props.children);if("children"in e$)return Xf(e$.children)}return""},Zf=e$=>{e$&&("function"==typeof e$.preventDefault&&e$.preventDefault(),"function"==typeof e$.stopPropagation&&e$.stopPropagation())},Qf=e$=>e$?"object"==typeof e$?{...e$,enabled:!0}:{enabled:!0}:{enabled:!1},$f=e$=>{if(!e$)return{enabled:!1,triggerType:["icon"]};let eI="object"==typeof e$?e$:{};return{...eI,enabled:!0,triggerType:eI.triggerType??["icon"]}},ep=e$=>{if(e$)return`link-${"danger"===e$?"error":e$}`},tp=e$=>{switch(e$){case"secondary":return"text-base-content/65";case"success":return"link-success";case"warning":return"link-warning";case"danger":return"link-error";default:return}},np=e$=>{let eI=n.RouterLink.__rueHref(e$);return eI?eI===e$&&e$&&!e$.startsWith("#")?`#${e$}`:eI:"#/"},rp=e$=>e$?"object"==typeof e$?{...e$,enabled:!0,rows:Math.max(1,e$.rows??1),tooltip:e$.tooltip??!0,expandable:e$.expandable??!1}:{enabled:!0,rows:1,tooltip:!0,expandable:!1}:{enabled:!1,rows:1,tooltip:!1,expandable:!1},ip=({variant:e$,color:eI,type:eR,hover:eL,disabled:ez,underline:eW,deleted:eH,strong:eF,italic:eP,block:eB,hasIcon:eK,ellipsis:eV,className:eq})=>{let eU=eI??e$,eG=eK||eV?.enabled;return Jf("link",eU?ep(eU):tp(eR),eL?"link-hover":void 0,ez?"cursor-not-allowed opacity-45 no-underline hover:no-underline":void 0,eW?"underline decoration-current underline-offset-4":void 0,eH?"line-through":void 0,eF?"font-semibold":void 0,eP?"italic":void 0,eB?"flex w-full items-center gap-1.5":eG?"inline-flex max-w-full items-center gap-1.5 align-baseline":void 0,eq)},ap=e$=>{if(!(e$<=1))return{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e$}},op=(e$,eI,eR)=>void 0!==e$?e$:eI.enabled&&!1!==eI.tooltip?"string"==typeof eI.tooltip?eI.tooltip:eR:void 0,sp=(e$,eI)=>"function"==typeof e$.symbol?e$.symbol(eI):null==e$.symbol?eI?"收起":"展开":e$.symbol,cp=e$=>{if(!e$)return;let eI="object"==typeof e$?e$:void 0;return String("number"==typeof eI?.minRows&&eI.minRows>0?eI.minRows:2)},lp=(e$,eI)=>{if(!e$)return;if(!eI){e$.style.height="",e$.style.overflowY="";return}let eR="object"==typeof eI?eI:void 0,eL=window.getComputedStyle(e$),ez=Number.parseFloat(eL.lineHeight),eW=Number.parseFloat(eL.fontSize),eH=Number.isFinite(ez)?ez:Number.isFinite(eW)?1.5*eW:24,eF=Number.parseFloat(eL.borderTopWidth||"0")+Number.parseFloat(eL.borderBottomWidth||"0"),eP=Number.parseFloat(eL.paddingTop||"0")+Number.parseFloat(eL.paddingBottom||"0"),eB="number"==typeof eR?.minRows&&eR.minRows>0?eR.minRows:2,eK="number"==typeof eR?.maxRows&&eR.maxRows>0?Math.max(eR.maxRows,eB):void 0;e$.style.height="auto";let eV=e$.scrollHeight;if("number"==typeof eB&&(eV=Math.max(eV,eB*eH+eF+eP)),"number"==typeof eK){let eI=eK*eH+eF+eP;e$.style.overflowY=eV>eI?"auto":"hidden",eV=Math.min(eV,eI)}else e$.style.overflowY="hidden";e$.style.height=`${eV}px`},up=async(e$,eI)=>{let eR=e$.text;return("function"==typeof eR?await eR():eR)??Xf(eI)},dp=e$=>{if(typeof document>"u")return;let eI=document.createElement("textarea");eI.value=e$,eI.setAttribute("readonly","true"),eI.style.position="fixed",eI.style.opacity="0",document.body.appendChild(eI),eI.select(),document.execCommand?.("copy"),document.body.removeChild(eI)},fp=async(e$,eI)=>{let eR=globalThis.navigator?.clipboard;if("text/html"===eI&&eR?.write&&globalThis.ClipboardItem){let eI=new globalThis.ClipboardItem({"text/html":new Blob([e$],{type:"text/html"}),"text/plain":new Blob([e$],{type:"text/plain"})});await eR.write([eI]);return}eR?.writeText?await eR.writeText(e$):dp(e$)},pp=(e$,{mark:eI,code:eR,keyboard:eL})=>{let ez=e$;return eL&&(ez=r("kbd",{className:"kbd kbd-sm align-middle",children:ez})),eR&&(ez=r("code",{className:"rounded bg-base-200 px-1.5 py-0.5 text-[0.9em]",children:ez})),eI&&(ez=r("mark",{className:"rounded bg-warning/20 px-1 py-0.5 text-inherit",children:ez})),ez},mp=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-[1em]","aria-hidden":"true",children:[r("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]}),hp=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-[1em]","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m5 13 4 4L19 7"})}),gp=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-[1em]","aria-hidden":"true",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 20h9"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),_p=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-[1em]","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 6 6 18M6 6l12 12"})}),vp=({href:e$="#",target:eI,rel:eR,to:eL,replace:ez,onClick:eW,variant:eH,color:eF,type:eP,hover:eB,disabled:eK,ellipsis:eV,copyable:eq,editable:eU,mark:eG,code:eZ,keyboard:eY,underline:eX,delete:eJ,strong:eQ,italic:e0,icon:e1,iconPlacement:e2="start",block:e5,className:e3,style:e4,title:e6,children:e8,...e7})=>{let e9=Qf(eq),t$=$f(eU),tI=rp(eV),tR=(0,e.ref)(!1),tL=(0,e.ref)(!!t$.editing),tz=(0,e.ref)(!!tI.defaultExpanded),tW=(0,e.ref)(!1),tH=(0,e.ref)(t$.text??Xf(e8)),tF=(0,e.useRef)(),tP=(0,e.useRef)(),tB=(0,e.useRef)(),tK=(0,e.useRef)(),tV=0,tq=0,tU=null!=e1,tG=Xf(e8),tZ=`${tG}${tI.suffix??""}`,tY="_blank"!==eI||eR?eR:"noopener noreferrer",tX=!!tI.expandable||e9.enabled||t$.enabled&&t$.triggerType.includes("icon"),tJ=ip({variant:eH,color:eF,type:eP,hover:eB,disabled:eK,underline:eX,deleted:eJ,strong:eQ,italic:e0,block:e5,hasIcon:tU,ellipsis:tI,className:e3}),tQ=op(e6,tI,tZ),t0=e$=>{tP.current=e$??void 0},t1=()=>{t$.autoSize&&tP.current instanceof HTMLTextAreaElement&&lp(tP.current,t$.autoSize)},t2=()=>{typeof window>"u"||window.setTimeout(t1,0)},t5=e$=>{tW.value!==e$&&(tW.value=e$,tI.onEllipsis&&tI.onEllipsis(e$))},t3=()=>{if(!(tI.enabled&&!(tI.expanded??tz.value)))return void t5(!1);let e$=tF.current;e$?t5(tI.rows>1?e$.scrollHeight-e$.clientHeight>1:e$.scrollWidth-e$.clientWidth>1):t5(!1)},t4=()=>{typeof window>"u"||(window.clearTimeout(tV),tV=window.setTimeout(t3,0))},t6=()=>{tK.current&&(0,e.render)(t$.enabled&&(t$.editing??tL.value)?rW():rH(),tK.current)},t8=e$=>{if(tF.current=e$??void 0,tB.current&&(tB.current.disconnect(),tB.current=void 0),e$&&"u">typeof ResizeObserver){let eI=new ResizeObserver(()=>{t4()});eI.observe(e$),tB.current=eI}t4()},t7=e$=>{eK||(Zf(e$),tH.value=t$.text??tG,t$.onStart&&t$.onStart(),void 0===t$.editing&&(tL.value=!0),t6(),t2())},t9=e$=>{Zf(e$),t$.onCancel&&t$.onCancel(),void 0===t$.editing&&(tL.value=!1),t6()},r$=e$=>{Zf(e$),t$.onChange&&t$.onChange(tH.value),t$.onEnd&&t$.onEnd(),void 0===t$.editing&&(tL.value=!1),t6()},rI=e$=>{Zf(e$);let eI="collapsible"===tI.expandable,eR=tI.expanded??tz.value,eL=!eR||!eI;eL!==eR&&(tI.onExpand&&tI.onExpand(e$,{expanded:eL}),void 0===tI.expanded&&(tz.value=eL),t6(),t4())},rR=e$=>{eK?Zf(e$):t$.enabled&&t$.triggerType.includes("text")?t7(e$):eW&&eW(e$)},rL=e$=>{rR(e$),eK||e$.defaultPrevented||"_blank"===eI||t$.triggerType.includes("text")||n.RouterLink.__rueOnClick(e$,eL,ez)},rz=e$=>{eK?Zf(e$):(Zf(e$),up(e9,e8).then(e$=>fp(String(e$),e9.format)).then(()=>{tR.value=!0,e9.onCopy&&e9.onCopy(e$),t6(),"u">typeof window&&(window.clearTimeout(tq),tq=window.setTimeout(()=>{tR.value=!1,t6()},1500))}))};(0,e.onMounted)(()=>{t6(),t4(),t2(),"u">typeof window&&window.addEventListener("resize",t4)}),(0,e.onUnmounted)(()=>{"u">typeof window&&(window.clearTimeout(tV),window.clearTimeout(tq),window.removeEventListener("resize",t4)),tB.current&&(tB.current.disconnect(),tB.current=void 0)}),(0,e.watch)(()=>[tG,tI.rows,tI.expandable,tI.expanded,tz.value,t$.editing??tL.value],()=>{t4(),t2()},{immediate:!0}),(0,e.watch)(()=>[tH.value,t$.autoSize],()=>{t2()},{immediate:!0});let rW=()=>{let e$=t$.autoSize?"textarea textarea-bordered textarea-sm min-h-24 min-w-56 leading-6":"input input-bordered input-xs min-w-36";return i("span",{className:Jf(e5?"flex w-full items-start gap-1 align-middle":"inline-flex max-w-full items-start gap-1 align-middle"),children:[t$.autoSize?r("textarea",{ref:t0,"data-rue-link-editor":"true",className:e$,value:tH.value,rows:cp(t$.autoSize),maxLength:t$.maxLength,autoFocus:!0,onInput:e$=>{tH.value=e$.target?.value??"",t1()},onKeyDown:e$=>{(e$.metaKey||e$.ctrlKey)&&"Enter"===e$.key&&r$(e$),"Escape"===e$.key&&t9(e$)}}):r("input",{ref:t0,"data-rue-link-editor":"true",className:e$,value:tH.value,maxLength:t$.maxLength,autoFocus:!0,onInput:e$=>{tH.value=e$.target?.value??""},onKeyDown:e$=>{"Enter"===e$.key&&r$(e$),"Escape"===e$.key&&t9(e$)}}),r("button",{type:"button","data-rue-link-edit-confirm":"true",className:"btn btn-ghost btn-xs","aria-label":"确认编辑",onClick:e$=>r$(e$),children:t$.enterIcon??r(hp,{})}),r("button",{type:"button","data-rue-link-edit-cancel":"true",className:"btn btn-ghost btn-xs","aria-label":"取消编辑",onClick:e$=>t9(e$),children:r(_p,{})})]})},rH=()=>{let eR,ez,eW,eH,eF=(eR=(()=>{let e$=pp(e8,{mark:eG,code:eZ,keyboard:eY});if(!tI.enabled)return r("span",{className:"min-w-0",children:e$});let eI=tI.rows>1?"min-w-0 max-w-full overflow-hidden align-bottom":"min-w-0 max-w-full truncate align-bottom",eR=ap(tI.rows);return 1===tI.rows&&tI.suffix?i("span",{className:"inline-flex min-w-0 max-w-full items-baseline align-bottom",children:[r("span",{ref:t8,className:eI,style:Yf(eR,{minWidth:0}),title:tQ,children:e$}),r("span",{className:"shrink-0",children:tI.suffix})]}):i("span",{ref:t8,className:eI,style:eR,title:tQ,children:[e$,tI.suffix?r("span",{children:tI.suffix}):null]})})(),ez=tU?r("span",{className:"inline-flex shrink-0 items-center","aria-hidden":"true",children:e1}):null,eW="end"===e2?i(e.Fragment,{children:[eR,ez]}):i(e.Fragment,{children:[ez,eR]}),eH=tI.enabled?Yf(e4,{minWidth:0}):e4,eK?r("span",{...e7,role:e7.role??"link",className:tJ,style:eH,title:tI.enabled?void 0:tQ,"aria-disabled":"true",onClick:rR,children:eW}):eL?r("a",{...e7,href:np(eL),target:eI,rel:tY,className:tJ,style:eH,title:tI.enabled?void 0:tQ,tabIndex:e7.tabIndex,tabindex:e7.tabIndex,onClick:rL,children:eW}):r("a",{...e7,href:e$,target:eI,rel:tY,className:tJ,style:eH,title:tI.enabled?void 0:tQ,tabIndex:e7.tabIndex,tabindex:e7.tabIndex,onClick:rR,children:eW})),eP=!!tI.expandable&&(!(tI.expanded??tz.value)||"collapsible"===tI.expandable);return tX||eP?i("span",{className:Jf(e5?"flex w-full flex-wrap items-start gap-1 align-baseline":"inline-flex max-w-full flex-wrap items-start gap-1 align-baseline"),children:[eF,eP?r("button",{type:"button","data-rue-link-expand":"true",className:"link link-hover text-xs no-underline opacity-70","aria-label":tI.expanded??tz.value?"收起全文":"展开全文",onClick:rI,children:sp(tI,tI.expanded??tz.value)}):null,e9.enabled?r("button",{type:"button","data-rue-link-copy":"true",className:"btn btn-ghost btn-xs","aria-label":tR.value?"已复制":"复制链接文本",title:e9.tooltips??(tR.value?"已复制":"复制"),tabIndex:e9.tabIndex,disabled:eK,onClick:rz,children:tR.value?"✓":e9.icon??r(mp,{})}):null,t$.enabled&&t$.triggerType.includes("icon")?r("button",{type:"button","data-rue-link-edit":"true",className:"btn btn-ghost btn-xs","aria-label":"编辑链接文本",title:t$.tooltip??"编辑",tabIndex:t$.tabIndex,disabled:eK,onClick:e$=>t7(e$),children:t$.icon??r(gp,{})}):null]}):eF};return r("span",{className:"contents",ref:e$=>{tK.current=e$??void 0,e$&&t6()}})},yp={xs:479.98,sm:575.98,md:767.98,lg:991.98,xl:1199.98,xxl:1599.98},bp=(...e$)=>e$.filter(Boolean).join(" "),xp=e$=>e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),Sp=e$=>e$?"string"==typeof e$?e$.trim():Object.entries(e$).filter(([,e$])=>null!=e$).map(([e$,eI])=>`${e$.startsWith("--")?e$:xp(e$)}:${String(eI)}`).join("; "):"",Cp=(...e$)=>e$.map(e$=>Sp(e$)).filter(Boolean).join("; "),wp=(e$,eI=[])=>(null==e$||!1===e$||(Array.isArray(e$)?e$.forEach(e$=>wp(e$,eI)):eI.push(e$)),eI),Tp=e$=>null!=e$&&!1!==e$&&(!Array.isArray(e$)||e$.some(e$=>Tp(e$))),Ep=e$=>null!=e$&&""!==e$&&!Number.isNaN(Number.parseFloat(String(e$)))&&Number.isFinite(Number(e$)),Dp=(e$,eI)=>{let eR=e$??eI;return"number"==typeof eR||/^\d+(\.\d+)?$/.test(eR)?`${eR}px`:eR},Op=()=>typeof window>"u"?yp.xl+1:window.innerWidth||document.documentElement?.clientWidth||yp.xl+1,kp=e$=>"dark"===e$?"border-base-content/10 bg-neutral text-neutral-content":"border-base-300 bg-base-100 text-base-content",Ap=e$=>"dark"===e$?"bg-neutral/90 text-neutral-content":"bg-transparent text-base-content",jp=(e$,eI)=>e$?eI?"▶":"◀":eI?"◀":"▶",Mp=e$=>!!e$&&"object"==typeof e$&&e$.type===Bp,Np=(e$,eI)=>"boolean"==typeof eI?eI:wp(e$).some(e$=>Mp(e$)),Pp=(e$,eI,eR,eL)=>({as:ez=eI,className:eW,style:eH,children:eF,...eP})=>r(ez,{...eP,className:bp(`rue-layout-${e$}`,eR,eW),style:Cp(eL,eH),children:eF}),Fp=Pp("header","header","flex min-h-16 items-center gap-3 rounded-[1.5rem] border border-base-300/80 bg-base-100/92 px-5 py-4 shadow-[0_24px_60px_-42px_rgba(15,23,42,0.45)] backdrop-blur"),Ip=Pp("content","main","min-h-0 flex-1 rounded-[1.5rem] border border-base-300/75 bg-base-100/90 p-5 shadow-[0_24px_60px_-42px_rgba(15,23,42,0.35)] backdrop-blur"),Lp=Pp("footer","footer","flex min-h-14 items-center justify-between gap-3 rounded-[1.5rem] border border-base-300/80 bg-base-200/75 px-5 py-4 text-sm text-base-content/75"),Rp=({className:e$,style:eI,children:eR,...eL})=>r("span",{...eL,className:bp("rue-layout-sider-trigger inline-flex items-center gap-2 rounded-full border border-current/15 px-3 py-2 text-xs font-semibold tracking-wide transition duration-200 ease-out hover:bg-current/8",e$),style:Cp(eI),children:eR}),zp=({as:e$="section",hasSider:eI,className:eR,style:eL,children:ez,...eW})=>{let eH=Np(ez,eI);return r(e$,{...eW,className:bp("rue-layout relative flex min-h-0 min-w-0 gap-4",eH?"flex-row items-stretch":"flex-col",eR),style:Cp({width:"100%",minWidth:0,minHeight:0},eL),"data-rue-layout":"true","data-rue-layout-has-sider":eH?"true":"false",children:ez})},Bp=({as:e$="aside",className:eI,style:eR,bodyClassName:eL,bodyStyle:ez,footer:eW,footerClassName:eH,footerStyle:eF,triggerClassName:eP,triggerStyle:eB,theme:eK="light",width:eV=240,collapsedWidth:eq=80,collapsed:eU,defaultCollapsed:eG=!1,collapsible:eZ=!1,breakpoint:eY,reverseArrow:eX=!1,trigger:eJ,zeroWidthTriggerStyle:eQ,triggerPosition:e0="end",onCollapse:e1,onBreakpoint:e2,children:e5,...e3})=>{let e4="boolean"==typeof eU,e6=(0,e.ref)(e4?!!eU:!!eG),e8=(0,e.ref)(!1),e7=(0,e.ref)(Op()),e9=Dp(eq,80),t$=Dp(eV,240),tI=null,tR=null,tL=null,tz=null,tW=(e$,eI)=>{let eR=e$&&(Ep(eq)?0===Number(eq):"0px"===e9||"0"===e9),eL=e$?e9:t$,ez=e$&&!eR;if(tI&&(tI.setAttribute("data-collapsed",e$?"true":"false"),tI.setAttribute("data-below",eI?"true":"false"),tI.setAttribute("data-zero-width",eR?"true":"false"),tI.style.flex=`0 0 ${eL}`,tI.style.width=eL,tI.style.minWidth=eL,tI.style.maxWidth=eL,tI.style.opacity=eR?"0":"1",tI.classList.toggle("pointer-events-none",eR),tI.classList.toggle("border-transparent",eR),tI.classList.toggle("shadow-none",eR)),tR&&(tR.classList.toggle("items-center",e$&&!eR),tR.classList.toggle("px-2",e$&&!eR)),tL&&(tL.setAttribute("aria-hidden",ez?"true":"false"),tL.style.display=ez?"none":"",tL.classList.toggle("px-2",e$&&!eR),tL.classList.toggle("text-center",e$&&!eR)),tz){tz.setAttribute("aria-label",e$?"展开侧边栏":"收起侧边栏"),tz.setAttribute("data-rue-layout-sider-trigger",eR?"zero":"default"),tz.classList.toggle("pointer-events-auto",eR),tz.classList.toggle("right-3",!eR&&"start"!==e0),tz.classList.toggle("left-3",!eR&&"start"===e0),tz.classList.toggle("bottom-3",!eR),tz.classList.toggle("right-0",eR),tz.classList.toggle("top-6",eR),tz.classList.toggle("bottom-auto",eR),tz.classList.toggle("translate-x-1/2",eR),tz.classList.toggle("rounded-full",eR);let eI=Cp(eR?eQ:eB);eI?tz.setAttribute("style",eI):tz.removeAttribute("style");let eL=tz.querySelector('[data-rue-layout-trigger-arrow="true"]'),ez=tz.querySelector('[data-rue-layout-trigger-label="true"]');eL&&(eL.textContent=jp(e$,eX)),ez&&(ez.textContent=e$?"展开":"收起")}},tH=(e$,eI)=>{e4||(e6.value=e$),e1?.(e$,eI)},tF=()=>{if(e7.value=Op(),!eY)return;let e$=e7.value<=yp[eY];e$!==e8.value&&(e8.value=e$,e2?.(e$),tH(e$,"responsive"))},tP=()=>{tH(!e6.value,"clickTrigger")};(0,e.onMounted)(()=>{tF(),tW(e6.value,e8.value),"u">typeof window&&window.addEventListener("resize",tF)}),(0,e.onUnmounted)(()=>{"u">typeof window&&window.removeEventListener("resize",tF)}),(0,e.watch)(()=>eU,e$=>{"boolean"==typeof e$&&(e6.value=e$)},{immediate:!0}),(0,e.watch)(()=>e6.value,e$=>{tW(e$,e8.value)},{immediate:!0}),(0,e.watch)(()=>e8.value,e$=>{tW(e6.value,e$)},{immediate:!0}),(0,e.watch)(()=>eY,()=>{tF()},{immediate:!0});let tB={collapsed:e6.value,below:e8.value,zeroWidth:e6.value&&(Ep(eq)?0===Number(eq):"0px"===e9||"0"===e9),toggle:tP},tK=null===eJ?null:"function"==typeof eJ?eJ(tB):eJ??i(Rp,{children:[r("span",{"data-rue-layout-trigger-arrow":"true",children:jp(e6.value,eX)}),r("span",{"data-rue-layout-trigger-label":"true",children:e6.value?"展开":"收起"})]});return i(e$,{...e3,ref:e$=>{tI=e$,e$&&tW(e6.value,e8.value)},className:bp("rue-layout-sider relative flex min-h-0 shrink-0 flex-col overflow-hidden rounded-[1.75rem] border shadow-[0_28px_70px_-42px_rgba(15,23,42,0.5)] transition-[width,flex-basis,max-width,min-width,transform,opacity] duration-300 ease-out",kp(eK),e6.value&&(Ep(eq)?0===Number(eq):"0px"===e9||"0"===e9)&&"pointer-events-none border-transparent shadow-none",eI),style:Cp({flex:`0 0 ${e6.value?e9:t$}`,width:e6.value?e9:t$,minWidth:e6.value?e9:t$,maxWidth:e6.value?e9:t$,opacity:e6.value&&(Ep(eq)?0===Number(eq):"0px"===e9||"0"===e9)?0:1},eR),"data-rue-layout-sider":"true","data-collapsed":e6.value?"true":"false","data-below":e8.value?"true":"false","data-zero-width":e6.value&&(Ep(eq)?0===Number(eq):"0px"===e9||"0"===e9)?"true":"false","data-theme":eK,children:[r("div",{ref:e$=>{tR=e$,e$&&tW(e6.value,e8.value)},className:bp("rue-layout-sider-body flex min-h-0 flex-1 flex-col gap-4 p-4 transition-[padding] duration-300 ease-out",Ap(eK),e6.value&&!(e6.value&&(Ep(eq)?0===Number(eq):"0px"===e9||"0"===e9))&&"items-center px-2",eL),style:Cp(ez),children:e5}),Tp(eW)?r("div",{ref:e$=>{tL=e$,e$&&tW(e6.value,e8.value)},className:bp("rue-layout-sider-footer border-t border-current/10 px-4 py-3 text-xs opacity-80",e6.value&&!(e6.value&&(Ep(eq)?0===Number(eq):"0px"===e9||"0"===e9))&&"px-2 text-center",eH),style:Cp(eF),children:eW}):null,eZ&&tK?r("button",{ref:e$=>{tz=e$,e$&&tW(e6.value,e8.value)},type:"button",onClick:tP,className:bp("rue-layout-sider-trigger-button absolute z-10 inline-flex items-center","start"===e0?"left-3 bottom-3 justify-start":"right-3 bottom-3 justify-end",e6.value&&(Ep(eq)?0===Number(eq):"0px"===e9||"0"===e9)&&"pointer-events-auto right-0 top-6 bottom-auto translate-x-1/2 rounded-full",eP),style:Cp(e6.value&&(Ep(eq)?0===Number(eq):"0px"===e9||"0"===e9)?eQ:eB),"aria-label":e6.value?"展开侧边栏":"收起侧边栏","data-rue-layout-sider-trigger":e6.value&&(Ep(eq)?0===Number(eq):"0px"===e9||"0"===e9)?"zero":"default",children:tK}):null]})},Vp=Object.assign(zp,{Header:Fp,Content:Ip,Footer:Lp,Sider:Bp,Trigger:Rp}),Hp=0,Up=(e$,eI)=>eI?`${e$} ${eI}`:e$,Wp=e$=>null==e$?"":String(e$),Gp=e$=>(Array.isArray(e$)?e$:[e$??"@"]).filter(e$=>"string"==typeof e$&&e$.length>0).sort((e$,eI)=>eI.length-e$.length),Kp=e$=>{switch(e$){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return e$}},qp=e$=>{switch(e$){case"success":return"success";case"warning":return"warning";case"error":return"error";case"validating":return"info";default:return}},Jp=e$=>{switch(e$){case"filled":return"border-transparent bg-base-200/70 shadow-none focus:bg-base-100";case"ghost":return"textarea-ghost";case"borderless":return"bg-transparent border-transparent shadow-none";case"underlined":return"rounded-none border-x-0 border-t-0 border-b-base-300 bg-transparent px-0 shadow-none focus:border-b-primary";default:return}},Yp=({size:e$,status:eI,variant:eR,allowClear:eL,className:ez})=>{let eW="textarea w-full",eH=Kp(e$),eF=qp(eI),eP=Jp(eR);return eH&&(eW+=` textarea-${eH}`),eF&&(eW+=` textarea-${eF}`),eP&&(eW+=` ${eP}`),eL&&(eW+=" pr-10"),ez&&(eW+=` ${ez}`),eW},Xp=(e$,eI=" ")=>!/\r|\n/.test(e$)&&(!eI||-1===e$.indexOf(eI)),Zp=(e$,eI,eR)=>eI<=0||!!eR&&eI>=eR.length&&e$.slice(eI-eR.length,eI)===eR||/\s/.test(e$[eI-1]??""),Qp=(e$,eI,eR)=>{let eL=eI;for(;eL<e$.length&&!(eR&&e$.slice(eL,eL+eR.length)===eR||/\s/.test(e$[eL]??""));)eL+=1;return eL},$p=(e$,eI,eR)=>eR<=0?-1:e$.lastIndexOf(eI,eR-1),em=(e$,eI,eR,eL,ez)=>{if(eI<0)return null;let eW=null;return eR.forEach(eR=>{let eH=e$.lastIndexOf(eR,Math.max(eI-eR.length,0));for(;eH>=0;){if(eH+eR.length>eI||!Zp(e$,eH,eL)){eH=$p(e$,eR,eH);continue}let eF=e$.slice(eH+eR.length,eI);if(!ez(eF)){eH=$p(e$,eR,eH);continue}let eP={start:eH,end:eI,prefix:eR,search:eF,key:`${eH}:${eI}:${eR}:${eF}`};(!eW||eP.start>eW.start)&&(eW=eP);break}}),eW},tm=e$=>"string"==typeof e$.label||"number"==typeof e$.label?String(e$.label):String(e$.value??""),nm=(e$,eI,eR)=>{if(!1===eR)return e$;let eL=eI.trim().toLowerCase();return e$.filter(e$=>{if("function"==typeof eR)return eR(eI,e$);if(!eL)return!0;let ez=String(e$.value??"").toLowerCase(),eW=tm(e$).toLowerCase();return ez.includes(eL)||eW.includes(eL)})},rm=e$=>{if(!e$||"number"!=typeof e$.length)return[];let eI=[],eR=Number(e$.length)||0;for(let eL=0;eL<eR;eL+=1){let eR=e$[eL];void 0!==eR&&eI.push(eR)}return eI},im=e$=>"number"!=typeof e$||!Number.isFinite(e$)||e$<=0?0:Math.round(e$),am=e$=>e$.findIndex(e$=>!e$.disabled),om=(e$,eI,eR)=>{if(!e$.length)return -1;let eL=e$.length,ez=eI;for(let eI=0;eI<eL;eI+=1)if(ez=(ez+eR+e$.length)%e$.length,!e$[ez]?.disabled)return ez;return -1},sm=(e$,eI)=>{"function"==typeof e$?e$(eI):e$&&"object"==typeof e$&&(e$.current=eI??void 0)},cm=e$=>{e$.dispatchEvent(new Event("input",{bubbles:!0}))},lm=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"xmlns","http://www.w3.org/2000/svg"),(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.8"),(0,t._$setClassName)(eI,"size-4"),(0,t._$setAttribute)(eI,"aria-hidden","true");let eR=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","m7 7 10 10M17 7 7 17"),eI}),um=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("div",e$);(0,t._$setClassName)(eI,"flex items-center gap-2 px-3 py-2 text-sm text-base-content/65");let eR=(0,t._$createElement)("span",eI);return(0,t._$appendChild)(eI,eR),(0,t._$setClassName)(eR,"loading loading-spinner loading-xs"),(0,t._$setAttribute)(eR,"aria-hidden","true"),(0,t._$appendChild)(eI,(0,t._$createTextNode)("正在检索候选项")),eI}),dm=e$=>(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Up("px-3 py-2 text-sm text-base-content/55",e$.className)))});let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.content;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eR}),fm=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,__rue_rest_omit_20:e1,__rue_rest_omit_21:e2,__rue_rest_omit_22:e5,__rue_rest_omit_23:e3,__rue_rest_omit_24:e4,__rue_rest_omit_25:e6,__rue_rest_omit_26:e8,__rue_rest_omit_27:e7,__rue_rest_omit_28:e9,__rue_rest_omit_29:t$,__rue_rest_omit_30:tI,__rue_rest_omit_31:tR,__rue_rest_omit_32:tL,__rue_rest_omit_33:tz,__rue_rest_omit_34:tW,__rue_rest_omit_35:tH,__rue_rest_omit_36:tF,__rue_rest_omit_37:tP,rest:tB,textareaRef:tK,rootRef:tV,resizeObserverRef:tq,triggerSyncTimerRef:tU,lastResizeRef:tG,forwardedRef:tZ,isControlled:tY,currentValue:tX,focused:tJ,composing:tQ,selectionStart:t0,selectionEnd:t1,highlightedIndex:t2,dismissedTriggerKey:t5,activeTrigger:t3,lastSearchKey:t4,optionSource:t6,visibleOptions:t8,lastCompositionCommittedValue:t7,instanceId:t9,didInitOptionsWatch:r$,lastOptionsSourceRef:rI,didInitConfigWatch:rR,lastConfigSignatureRef:rL,clearConfig:rz,clearable:rW,prefixList:rH,searchDebounceMs:rF,triggerConfigSignature:rP,validator:rB,createApi:rK,syncForwardedRef:rV,syncNativeDataTestId:rq,syncValueState:rU,syncSelectionState:rG,isCompositionActive:rZ,getResolvedOptions:rY,syncHighlightState:rX,clearPendingTriggerSync:rJ,syncTriggerStateNow:rQ,syncTriggerState:r0,syncAutoSize:r1,observeResize:r2,assignTextareaRef:r5,setCaretPosition:r3,selectMentionOption:r4,handleInput:r6,handleNativeChange:r8,handleFocus:r7,handleBlur:r9,handleSelectionRefresh:a$,moveHighlight:aI,handleKeyDownInternal:aR,handleKeyUp:aL,handleCompositionStartInternal:az,handleCompositionEndInternal:aW,handleClear:aH,dataTestId:aF,nativeValueProps:aP,nativeTextareaOptionalProps:aB,resolvePopupId:aK,isPopupVisible:aV,resolveActiveOptionId:aq,popupId:aU,activeOptionId:aG,ariaInvalid:aZ}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let{value:eI,defaultValue:eR,options:eL,prefix:ez,split:eW,searchDebounce:eH,placement:eF,size:eP,status:eB,variant:eK,allowClear:eV,autoSize:eq,loading:eU,disabled:eG,readOnly:eZ,notFoundContent:eY,filterOption:eX,validateSearch:eJ,onChange:eQ,onInput:e0,onNativeChange:e1,onSearch:e2,onSelect:e5,onFocus:e3,onBlur:e4,onKeyDown:e6,onCompositionStart:e8,onCompositionEnd:e7,onResize:e9,onPopupScroll:t$,rootClassName:tI,textareaClassName:tR,popupClassName:tL,popupStyle:tz,classNames:tW,styles:tH,className:tF,style:tP,...tB}=e$,tK=(0,t._$vaporWithHookId)("useRef:1:0",()=>(0,t.useRef)()),tV=(0,t._$vaporWithHookId)("useRef:1:1",()=>(0,t.useRef)()),tq=(0,t._$vaporWithHookId)("useRef:1:2",()=>(0,t.useRef)()),tU=(0,t._$vaporWithHookId)("useRef:1:3",()=>(0,t.useRef)()),tG=(0,t._$vaporWithHookId)("useRef:1:4",()=>(0,t.useRef)()),tZ=tB.ref,tY=(0,t._$vaporWithHookId)("computed:1:5",()=>(0,t.computed)(()=>void 0!==e$.value)),tX=(0,t._$vaporWithHookId)("ref:1:6",()=>(0,t.ref)(Wp(tY.get()?e$.value:e$.defaultValue))),tJ=(0,t._$vaporWithHookId)("ref:1:7",()=>(0,t.ref)(!1)),tQ=(0,t._$vaporWithHookId)("ref:1:8",()=>(0,t.ref)(!1)),t0=(0,t._$vaporWithHookId)("ref:1:9",()=>(0,t.ref)(0)),t1=(0,t._$vaporWithHookId)("ref:1:10",()=>(0,t.ref)(0)),t2=(0,t._$vaporWithHookId)("ref:1:11",()=>(0,t.ref)(-1)),t5=(0,t._$vaporWithHookId)("ref:1:12",()=>(0,t.ref)("")),t3=(0,t._$vaporWithHookId)("ref:1:13",()=>(0,t.ref)(null)),t4=(0,t._$vaporWithHookId)("ref:1:14",()=>(0,t.ref)("")),t6=(0,t._$vaporWithHookId)("ref:1:15",()=>(0,t.ref)(rm(e$.options))),t8=(0,t._$vaporWithHookId)("ref:1:16",()=>(0,t.ref)([])),t7=(0,t._$vaporWithHookId)("useRef:1:17",()=>(0,t.useRef)(null)),t9=(0,t._$vaporWithHookId)("ref:1:18",()=>(0,t.ref)("")),r$=(0,t._$vaporWithHookId)("useRef:1:19",()=>(0,t.useRef)(!1)),rI=(0,t._$vaporWithHookId)("useRef:1:20",()=>(0,t.useRef)(void 0)),rR=(0,t._$vaporWithHookId)("useRef:1:21",()=>(0,t.useRef)(!1)),rL=(0,t._$vaporWithHookId)("useRef:1:22",()=>(0,t.useRef)("")),rz=(0,t._$vaporWithHookId)("computed:1:23",()=>(0,t.computed)(()=>e$.allowClear&&"object"==typeof e$.allowClear?e$.allowClear:void 0)),rW=!!e$.allowClear,rH=(0,t._$vaporWithHookId)("computed:1:24",()=>(0,t.computed)(()=>Gp(void 0===e$.prefix?"@":e$.prefix))),rF=(0,t._$vaporWithHookId)("computed:1:25",()=>(0,t.computed)(()=>im(e$.searchDebounce))),rP=(0,t._$vaporWithHookId)("computed:1:26",()=>(0,t.computed)(()=>`${+!!e$.loading}:${Array.isArray(void 0===e$.prefix?"@":e$.prefix)?(void 0===e$.prefix?"@":e$.prefix).join("|"):(void 0===e$.prefix?"@":e$.prefix)??"@"}:${void 0===e$.split?" ":e$.split}:${rF.get()}`)),rB=eI=>"function"==typeof e$.validateSearch?e$.validateSearch(eI,{value:e$.value,defaultValue:e$.defaultValue,options:e$.options,prefix:void 0===e$.prefix?"@":e$.prefix,split:void 0===e$.split?" ":e$.split,searchDebounce:e$.searchDebounce,placement:void 0===e$.placement?"bottom":e$.placement,size:e$.size,status:e$.status,variant:e$.variant,allowClear:e$.allowClear,autoSize:e$.autoSize,loading:e$.loading,disabled:e$.disabled,readOnly:e$.readOnly,notFoundContent:void 0===e$.notFoundContent?"未找到匹配项":e$.notFoundContent,filterOption:e$.filterOption,validateSearch:e$.validateSearch,onChange:e$.onChange,onInput:e$.onInput,onNativeChange:e$.onNativeChange,onSearch:e$.onSearch,onSelect:e$.onSelect,onFocus:e$.onFocus,onBlur:e$.onBlur,onKeyDown:e$.onKeyDown,onResize:e$.onResize,onPopupScroll:e$.onPopupScroll,rootClassName:e$.rootClassName,textareaClassName:e$.textareaClassName,popupClassName:e$.popupClassName,popupStyle:e$.popupStyle,classNames:e$.classNames,styles:e$.styles,className:e$.className,style:e$.style,...tB}):Xp(eI,void 0===e$.split?" ":e$.split);"ref"in tB&&delete tB.ref;let rK=()=>({nativeElement:tK.current,focus:()=>{tK.current?.focus()},blur:()=>{tK.current?.blur()}}),rV=()=>{sm(tZ,tK.current?rK():null)},rq=()=>{let e$=tK.current;if(e$){if(null==r6)return void e$.removeAttribute("data-testid");e$.setAttribute("data-testid",String(r6))}},rU=()=>{let eI=tK.current?.value;tX.value=Wp(tY.get()?tQ.value?eI??tX.value:e$.value:eI??e$.defaultValue)},rG=()=>{let e$=tK.current,eI=e$?.selectionStart??tX.value.length,eR=e$?.selectionEnd??eI;t0.value=eI,t1.value=eR},rZ=e$=>tQ.value||!!e$?.isComposing,rY=(eI=t3.value)=>eI?nm(t6.value,eI.search,e$.filterOption):[],rX=e$=>{if(!e$.length){t2.value=-1;return}if(t2.value<0||t2.value>=e$.length){t2.value=am(e$);return}e$[t2.value]?.disabled&&(t2.value=om(e$,t2.value,1))},rJ=()=>{void 0!==tU.current&&(clearTimeout(tU.current),tU.current=void 0)},rQ=()=>{if(tQ.value){t3.value=null,t8.value=[],t2.value=-1,t4.value="";return}let eI=e$.disabled||e$.readOnly?null:em(tX.value,t0.value,rH.get(),void 0===e$.split?" ":e$.split,rB);if(!eI){t3.value=null,t8.value=[],t2.value=-1,t4.value="",t5.value="";return}t5.value&&t5.value!==eI.key&&(t5.value="");let eR=t3.value?.key;t3.value=eI,t4.value!==`${eI.prefix}:${eI.search}`&&(t4.value=`${eI.prefix}:${eI.search}`,e$.onSearch&&e$.onSearch(eI.search,eI.prefix));let eL=rY(eI);if(t8.value=eL,eR!==eI.key){t2.value=am(eL);return}rX(eL)},r0=(e$=!1)=>{(rJ(),e$||0>=rF.get())?rQ():tU.current=setTimeout(()=>{tU.current=void 0,rQ()},rF.get())},r1=()=>{let eI=tK.current;if(!eI)return;if(!e$.autoSize){eI.style.height="",eI.style.overflowY="";return}let eR="object"==typeof e$.autoSize?e$.autoSize:void 0,eL=window.getComputedStyle(eI),ez=Number.parseFloat(eL.lineHeight),eW=Number.parseFloat(eL.fontSize),eH=Number.isFinite(ez)?ez:Number.isFinite(eW)?1.5*eW:24,eF=Number.parseFloat(eL.borderTopWidth||"0")+Number.parseFloat(eL.borderBottomWidth||"0"),eP=Number.parseFloat(eL.paddingTop||"0")+Number.parseFloat(eL.paddingBottom||"0"),eB="number"==typeof eR?.minRows&&eR.minRows>0?eR.minRows:"number"==typeof tB.rows?tB.rows:void 0,eK="number"==typeof eR?.maxRows&&eR.maxRows>0?Math.max(eR.maxRows,eB??1):void 0;eI.style.height="auto";let eV=eI.scrollHeight;if("number"==typeof eB&&(eV=Math.max(eV,eB*eH+eF+eP)),"number"==typeof eK){let e$=eK*eH+eF+eP;eI.style.overflowY=eV>e$?"auto":"hidden",eV=Math.min(eV,e$)}else eI.style.overflowY="hidden";eI.style.height=`${eV}px`},r2=()=>{let eI=tK.current;if(!eI||typeof ResizeObserver>"u"||!e$.onResize){tG.current=void 0;return}tq.current||(tq.current=new ResizeObserver(eI=>{let eR=eI[0];if(!eR)return;let eL={width:eR.contentRect.width,height:eR.contentRect.height},ez=tG.current;ez&&ez.width===eL.width&&ez.height===eL.height||(tG.current=eL,e$.onResize(eL))})),tq.current.disconnect(),tq.current.observe(eI)},r5=e$=>{let eI=tK.current;eI&&(eI.focus(),"function"==typeof eI.setSelectionRange&&eI.setSelectionRange(e$,e$),rG())},r3=eI=>{let eR=t3.value,eL=tK.current;if(!eR||!eL||eI.disabled)return;let ez=tX.value.slice(0,eR.start),eW=tX.value.slice(eR.end),eH=eR.prefix,eF=""===(void 0===e$.split?" ":e$.split).trim(),eP=!!(void 0===e$.split||e$.split)&&(!eW||!eW.startsWith(void 0===e$.split?" ":e$.split)&&!(eF&&/^\s/.test(eW))),eB=`${eH}${eI.value}${eP?void 0===e$.split?" ":e$.split:""}`,eK=`${ez}${eB}${eW}`,eV=ez.length+eB.length;eL.value=eK,t7.current=null,t5.value="","function"==typeof eL.setSelectionRange&&eL.setSelectionRange(eV,eV),cm(eL),e$.onSelect&&e$.onSelect(eI,eH)},r4=e$=>{let eI=rY();if(eI.length){if(t2.value<0){t2.value=1===e$?am(eI):om(eI,0,-1);return}t2.value=om(eI,t2.value,e$)}};if((0,t.onMounted)(()=>{t9.value||(Hp+=1,t9.value=`rue-mentions-${Hp}`),tK.current&&tK.current.value!==tX.value&&(tK.current.value=tX.value),rU(),rG(),r1(),r0(),r2(),rV()}),(0,t.onUnmounted)(()=>{rJ(),tq.current?.disconnect(),tG.current=void 0,sm(tZ,null)}),(0,t._$vaporWithHookId)("watch:1:27",()=>(0,t.watch)(()=>e$.value,()=>{tY.get()&&tK.current&&!tQ.value&&(tK.current.value=Wp(e$.value)),rU(),rG(),r1(),r0(),r2()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:28",()=>(0,t.watch)(()=>e$.autoSize,()=>{r1(),r2()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:29",()=>(0,t.watch)(()=>e$.options,e$=>{let eI=r$.current&&rI.current===e$;r$.current=!0,rI.current=e$,eI||(t6.value=rm(e$),r0(!0))},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:30",()=>(0,t.watch)(()=>rP.get(),e$=>{let eI=rR.current&&rL.current===e$;rR.current=!0,rL.current=e$,eI||r0(!0)},{immediate:!0})),void 0!==tB.rows&&null!==tB.rows&&(tB.rows=String(tB.rows)),e$.autoSize&&(void 0===tB.rows||null===tB.rows)){let eI="object"==typeof e$.autoSize&&"number"==typeof e$.autoSize.minRows?e$.autoSize.minRows:void 0;eI&&(tB.rows=String(eI))}let r6=tB["data-testid"],r8={};void 0!==e$.value&&(r8.value=tQ.value?tX.value:e$.value),void 0!==e$.defaultValue&&(r8.defaultValue=e$.defaultValue);let r7={};e$.readOnly&&(r7.readOnly=!0);let r9=()=>t9.value?`${t9.value}-popup`:void 0,a$=()=>!tQ.value&&tJ.value&&!!t3.value&&t5.value!==t3.value.key&&(e$.loading||t8.value.length>0||(void 0===e$.notFoundContent?"未找到匹配项":e$.notFoundContent)!==null),aI=()=>{let e$=r9();if(!(!e$||!a$()||t2.value<0))return`${e$}-option-${t2.value}`},aR=a$()?r9():void 0;void 0!==aR&&(r7["aria-controls"]=aR);let aL=aI();void 0!==aL&&(r7["aria-activedescendant"]=aL);let az=(0,t._$vaporWithHookId)("computed:1:31",()=>(0,t.computed)(()=>"error"===e$.status?"true":tB["aria-invalid"]));return void 0!==az.get()&&null!==az.get()&&(r7["aria-invalid"]=az.get()),{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,__rue_rest_omit_20:e1,__rue_rest_omit_21:e2,__rue_rest_omit_22:e5,__rue_rest_omit_23:e3,__rue_rest_omit_24:e4,__rue_rest_omit_25:e6,__rue_rest_omit_26:e8,__rue_rest_omit_27:e7,__rue_rest_omit_28:e9,__rue_rest_omit_29:t$,__rue_rest_omit_30:tI,__rue_rest_omit_31:tR,__rue_rest_omit_32:tL,__rue_rest_omit_33:tz,__rue_rest_omit_34:tW,__rue_rest_omit_35:tH,__rue_rest_omit_36:tF,__rue_rest_omit_37:tP,rest:tB,textareaRef:tK,rootRef:tV,resizeObserverRef:tq,triggerSyncTimerRef:tU,lastResizeRef:tG,forwardedRef:tZ,isControlled:tY,currentValue:tX,focused:tJ,composing:tQ,selectionStart:t0,selectionEnd:t1,highlightedIndex:t2,dismissedTriggerKey:t5,activeTrigger:t3,lastSearchKey:t4,optionSource:t6,visibleOptions:t8,lastCompositionCommittedValue:t7,instanceId:t9,didInitOptionsWatch:r$,lastOptionsSourceRef:rI,didInitConfigWatch:rR,lastConfigSignatureRef:rL,clearConfig:rz,clearable:rW,prefixList:rH,searchDebounceMs:rF,triggerConfigSignature:rP,validator:rB,createApi:rK,syncForwardedRef:rV,syncNativeDataTestId:rq,syncValueState:rU,syncSelectionState:rG,isCompositionActive:rZ,getResolvedOptions:rY,syncHighlightState:rX,clearPendingTriggerSync:rJ,syncTriggerStateNow:rQ,syncTriggerState:r0,syncAutoSize:r1,observeResize:r2,assignTextareaRef:e$=>{tK.current=e$??void 0,e$&&e$.value!==tX.value&&(e$.value=tX.value),rq(),rV()},setCaretPosition:r5,selectMentionOption:r3,handleInput:eI=>{tX.value=eI.target?.value??"",tJ.value=!0,r1();let eR=rZ(eI);if(eR||(rG(),r0()),e$.onInput&&e$.onInput(eI),!eR){if(t7.current===tX.value){t7.current=null;return}t7.current=null,e$.onChange&&e$.onChange(tX.value)}},handleNativeChange:eI=>{t7.current=null,rU(),rG(),r1(),r0(),e$.onNativeChange&&e$.onNativeChange(eI)},handleFocus:eI=>{let eR=tJ.value;tJ.value=!0,rG(),r0(!eR),e$.onFocus&&e$.onFocus(eI)},handleBlur:eI=>{tJ.value=!1,rJ(),e$.onBlur&&e$.onBlur(eI)},handleSelectionRefresh:()=>{tQ.value||(rG(),r0(0>=rF.get()))},moveHighlight:r4,handleKeyDownInternal:eI=>{if(rZ(eI)){e$.onKeyDown&&e$.onKeyDown(eI);return}let eR=rY();if(tJ.value&&t3.value&&t5.value!==t3.value.key&&(e$.loading||eR.length>0||(void 0===e$.notFoundContent?"未找到匹配项":e$.notFoundContent)!==null))if("ArrowDown"===eI.key)eI.preventDefault(),r4(1);else if("ArrowUp"===eI.key)eI.preventDefault(),r4(-1);else if("Enter"===eI.key){let e$=t2.value>=0?eR[t2.value]:void 0;e$&&!e$.disabled&&(eI.preventDefault(),r3(e$))}else"Escape"===eI.key&&(t5.value=t3.value?.key??"",t2.value=-1);e$.onKeyDown&&e$.onKeyDown(eI)},handleKeyUp:e$=>{rZ(e$)||["ArrowDown","ArrowUp","Enter","Escape","Tab"].includes(e$.key)||(rG(),r0())},handleCompositionStartInternal:eI=>{tQ.value=!0,t7.current=null,t3.value=null,t2.value=-1,t4.value="",e$.onCompositionStart&&e$.onCompositionStart(eI)},handleCompositionEndInternal:eI=>{tQ.value=!1;let eR=tK.current?.value??tX.value;tX.value=eR,rG(),r1(),r0(),t7.current=eR,e$.onChange&&e$.onChange(eR),e$.onCompositionEnd&&e$.onCompositionEnd(eI)},handleClear:eI=>{let eR=tK.current;!eR||e$.disabled||e$.readOnly||("function"==typeof eI.preventDefault&&eI.preventDefault(),"function"==typeof eI.stopPropagation&&eI.stopPropagation(),eR.value="",tX.value="",t7.current=null,t5.value="",t2.value=-1,r1(),r5(0),r0(!0),cm(eR),"function"==typeof tB.onClear&&tB.onClear(eI))},dataTestId:r6,nativeValueProps:r8,nativeTextareaOptionalProps:r7,resolvePopupId:r9,isPopupVisible:a$,resolveActiveOptionId:aI,popupId:aR,activeOptionId:aL,ariaInvalid:az}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI),eL=(0,t._$vaporBindUseRef)(eR,()=>e$=>{tV.current=e$??void 0});(0,t.onBeforeUnmount)(()=>{eL()}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Up(Up("rue-mentions relative block w-full",e$.classNames?.root),Up(e$.className??"",e$.rootClassName))))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{...e$.styles?.root,...e$.style})});let ez=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,ez),(0,t._$setClassName)(ez,"relative");let eW=(0,t._$createElement)("textarea",ez);(0,t._$appendChild)(ez,eW);let eH=(0,t._$vaporBindUseRef)(eW,()=>r5);(0,t.onBeforeUnmount)(()=>{eH()}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eW,e$.disabled)}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eW,"aria-expanded",String(aV()?"true":"false"))}),(0,t._$setAttribute)(eW,"aria-autocomplete","list"),(0,t._$setAttribute)(eW,"data-rue-mentions-input","true"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eW,String(Up(Up(Yp({size:e$.size,status:e$.status,variant:e$.variant,allowClear:rW,className:e$.textareaClassName}),e$.classNames?.textarea),void e$.styles?.textarea)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.textarea;(0,t._$setStyle)(eW,eI)}),(0,t._$addEventListener)(eW,"input",r6),(0,t._$addEventListener)(eW,"change",r8),(0,t._$addEventListener)(eW,"focus",r7),(0,t._$addEventListener)(eW,"blur",r9),(0,t._$addEventListener)(eW,"click",a$),(0,t._$addEventListener)(eW,"select",a$),(0,t._$addEventListener)(eW,"keydown",aR),(0,t._$addEventListener)(eW,"keyup",aL),(0,t._$addEventListener)(eW,"compositionstart",az),(0,t._$addEventListener)(eW,"compositionend",aW);let eF=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,eF),(0,t.watchEffect)(()=>{let eI=!rW||e$.disabled||e$.readOnly?"":(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("button",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"type","button"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"tabIndex","-1")}),(0,t._$setAttribute)(eR,"aria-label","Clear mentions"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Up(Up(Up("btn btn-ghost btn-xs absolute right-2 top-2 h-7 min-h-0 w-7 rounded-full p-0 text-base-content/55 hover:text-base-content",tX.value?void 0:"hidden"),e$.classNames?.clear),void tV.current)))}),(0,t._$addEventListener)(eR,"mousedown",e$=>{"function"==typeof e$.preventDefault&&e$.preventDefault()}),(0,t._$addEventListener)(eR,"click",aH);let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let e$=rz.get()?.clearIcon??(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(e$,eI),(0,t.renderAnchor)((0,t._$createComponent)(lm,{}),e$,eI),e$});(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eL))}),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,eF))});let eP=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eP),(0,t.watchEffect)(()=>{let eI=aV()?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"id",String(aK()))}),(0,t._$setAttribute)(eR,"role","listbox"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Up(Up(Up(Up(`absolute left-0 z-20 w-full overflow-hidden rounded-2xl border border-base-300 bg-base-100/95 shadow-[0_24px_60px_-36px_rgba(15,23,42,0.55)] backdrop-blur ${(void 0===e$.placement?"bottom":e$.placement)==="top"?"bottom-full mb-2":"top-full mt-2"}`,e$.popupClassName),e$.classNames?.popup),void e$.rootClassName),void tJ.value)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{...e$.styles?.popup,...e$.popupStyle})}),(0,t._$addEventListener)(eR,"scroll",eI=>{e$.onPopupScroll&&e$.onPopupScroll(eI)});let eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL),(0,t._$setClassName)(eL,"max-h-72 overflow-y-auto py-2");let ez=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{let eI=e$.loading?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(e$,eI),(0,t.renderAnchor)((0,t._$createComponent)(um,{}),e$,eI),e$}):t8.value.length?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createComment)("rue:list:start"),eL=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eI,eR),(0,t._$appendChild)(eI,eL);let ez=new Map;return(0,t.watchEffect)(()=>{ez=(0,t._$vaporKeyedList)({items:t8.value||[],getKey:(e$,eI)=>e$.key??`${e$.value}-${eI}`,elements:ez,parent:eR.parentNode,before:eL,singleRoot:!0,start:eR,renderItem:(eI,eR,eL,ez,eW)=>{(0,t.renderAnchor)((0,t.vapor)(()=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("button",eR);(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"key",String(eI.key??`${eI.value}-${eW}`))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"id",String(aK()?`${aK()}-option-${eW}`:void 0))}),(0,t._$setAttribute)(eL,"type","button"),(0,t._$setAttribute)(eL,"role","option"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"aria-selected",String(eW===t2.value?"true":"false"))}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eL,eI.disabled)}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(Up(Up(Up("mx-2 flex w-[calc(100%-1rem)] items-center justify-between gap-3 rounded-xl px-3 py-2 text-left text-sm transition",eW===t2.value?"bg-primary/10 text-primary ring-1 ring-primary/10":"text-base-content hover:bg-base-200/75"),eI.disabled?"cursor-not-allowed opacity-45 hover:bg-transparent":void 0),Up(e$.classNames?.option??"",eI.className))))}),(0,t.watchEffect)(()=>{let e$=eI.style;(0,t._$setStyle)(eL,e$)}),(0,t._$addEventListener)(eL,"mousedown",e$=>{"function"==typeof e$.preventDefault&&e$.preventDefault()}),(0,t._$addEventListener)(eL,"mouseenter",()=>{t2.value=eI.disabled?t2.value:eW}),(0,t._$addEventListener)(eL,"click",()=>{r4(eI)});let ez=(0,t._$createElement)("span",eL);(0,t._$appendChild)(eL,ez),(0,t._$setClassName)(ez,"min-w-0 flex-1 truncate");let eH=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,eH),(0,t.watchEffect)(()=>{let e$=eI.label??eI.value;(0,t.untrack)(()=>(0,t.renderAnchor)(e$,ez,eH))});let eF=(0,t._$createElement)("span",eL);(0,t._$appendChild)(eL,eF),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eF,String(eW===t2.value?"text-primary/55":"text-base-content/35"))});let eP=(0,t._$createTextWrapper)(eF);return(0,t._$appendChild)(eF,eP),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eP,t3.value?.prefix)}),eR}),eR,eL)}})}),eI}):(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let eL=(0,t._$createComponent)(dm,{className:e$.classNames?.empty,content:void 0===e$.notFoundContent?"未找到匹配项":e$.notFoundContent});(0,t.untrack)(()=>(0,t.renderAnchor)(eL,eI,eR))}),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eL,ez))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eP))}),eR})};fm.getMentions=(e$="",eI={})=>{let{prefix:eR="@",split:eL=" "}=eI,ez=Gp(eR),eW=[],eH=0;for(;eH<e$.length;){let eI=ez.find(eI=>e$.startsWith(eI,eH));if(!eI||!Zp(e$,eH,eL)){eH+=1;continue}let eR=eH+eI.length,eF=Qp(e$,eR,eL),eP=e$.slice(eR,eF);if(eP&&eW.push({prefix:eI,value:eP}),eL&&e$.slice(eF,eF+eL.length)===eL){eH=eF+eL.length;continue}eH=eF>eH?eF:eH+eI.length}return eW};var pm=(...e$)=>e$.filter(Boolean).join(" "),mm=e$=>"string"==typeof e$&&["button","input","select","textarea","option","optgroup","fieldset"].includes(e$),hm=e$=>!!e$&&/\bbtn\b/.test(e$),gm=e$=>!(null==e$||Array.isArray(e$)&&0===e$.length),_m=({as:e$,tag:eI="button",className:eR,active:eL,disabled:ez,href:eW,onClick:eH,children:eF,...eP})=>{let eB=e$??eI,eK=mm(eB),eV=pm("join-item",eL&&"btn-active",!!ez&&("a"===eB||hm(eR))&&"btn-disabled",eR),eq=e$=>{if(ez){"function"==typeof e$.preventDefault&&e$.preventDefault(),"function"==typeof e$.stopPropagation&&e$.stopPropagation();return}eH&&eH(e$)};return"a"===eB?r("a",{...eP,...ez||null==eW?{}:{href:eW},className:eV,"aria-disabled":ez?"true":void 0,onClick:eq,children:eF}):"button"===eB?r("button",{...eP,type:eP.type??"button",disabled:ez,className:eV,onClick:eq,children:eF}):r(eB,{...eP,..."a"===eB&&!ez&&null!=eW?{href:eW}:{},disabled:eK?ez:void 0,className:eV,"aria-disabled":!eK&&ez?"true":void 0,onClick:eq,children:eF})},vm=(e$,eI)=>e$.map((e$,eR)=>{let{key:eL,label:ez,children:eW,className:eH,...eF}=e$,eP=Object.prototype.hasOwnProperty.call(e$,"children")?eW:ez;return r(_m,{...eF,className:pm(eI,eH),children:eP},eL??eR)}),ym=Object.assign(({as:e$,direction:eI,items:eR,itemClassName:eL,wrap:ez,block:eW,className:eH,children:eF,...eP})=>{let eB=pm("join",eI&&`join-${eI}`,ez&&"flex flex-wrap",eW&&"w-full",eH);return r(e$??"div",{...eP,className:eB,children:gm(eF)?eF:eR?vm(eR,eL):null})},{Item:_m}),bm=0,xm=(e$,eI)=>eI?`${e$} ${eI}`:e$,Sm=(e$,eI,eR)=>{let eL="checkbox";return e$&&(eL+=` checkbox-${e$}`),eI&&(eL+=` checkbox-${eI}`),eR&&(eL+=` ${eR}`),eL},Cm=(e$,eI)=>{let eR="inline-flex items-start gap-3 text-sm leading-5 text-base-content";return e$?eR+=" cursor-not-allowed opacity-60":eR+=" cursor-pointer",eI&&(eR+=` ${eI}`),eR},wm=e$=>xm("min-w-0 flex-1",e$),Tm=e$=>Array.isArray(e$)?e$.flatMap(e$=>Tm(e$)):null==e$||"boolean"==typeof e$?[]:[e$],Em=e$=>{switch(typeof e$){case"number":return`number:${e$}`;case"boolean":return`boolean:${e$?"true":"false"}`;default:return`string:${e$}`}},Dm=e$=>{if(!e$)return;let eI=e$.indexOf(":");if(-1===eI)return e$;let eR=e$.slice(0,eI),eL=e$.slice(eI+1);return"number"===eR?Number(eL):"boolean"===eR?"true"===eL:eL},Om=e$=>{let eI=[];return(e$??[]).forEach(e$=>{eI.some(eI=>eI===e$)||eI.push(e$)}),eI},km=e$=>(e$??[]).map(e$=>"string"==typeof e$||"number"==typeof e$||"boolean"==typeof e$?{label:String(e$),value:e$}:e$),Am=({color:e$,size:eI,checked:eR,defaultChecked:eL,disabled:ez,indeterminate:eW,value:eH,className:eF,rootClassName:eP,contentClassName:eB,style:eK,rootStyle:eV,children:eq,onChange:eU,onCheckedChange:eG,...eZ})=>{let eY=(0,e.useRef)(),eX=(0,e.useRef)();eX.current||(eX.current=`rue-checkbox-content-${bm++}`);let eJ=null==eq?void 0:eZ["aria-labelledby"]??eX.current,eQ=()=>{eY.current&&(eY.current.indeterminate=!!eW)};(0,e.onMounted)(()=>{eQ()}),(0,e.watch)(()=>eW,()=>{eQ()},{immediate:!0}),(0,e.watch)(()=>eR,()=>{"boolean"==typeof eR&&eY.current&&(eY.current.checked=eR),eW&&eQ()},{immediate:!0});let e0=r("input",{...eZ,ref:eY,type:"checkbox",value:eH,checked:eR,defaultChecked:eL,disabled:ez,style:eK,className:Sm(e$,eI,eF),"aria-labelledby":eJ,"aria-checked":eW?"mixed":eZ["aria-checked"],"data-rue-checkbox-input":"true","data-rue-checkbox-disabled":ez?"true":"false","data-rue-checkbox-value":void 0===eH?void 0:Em(eH),onChange:e$=>{let eI=e$.target?.checked===!0;"boolean"==typeof eR&&eY.current&&(eY.current.checked=eR),eW&&eQ(),eU&&eU(e$,{checked:eI,indeterminate:!!eW,value:eH}),eG&&eG(eI,e$)}});if(null==eq&&!eP&&!eV&&!eB)return e0;let e1=null==eq?null:(0,e.h)("span",{id:eJ,className:wm(eB),"data-rue-checkbox-content":"true"},...Tm(eq));return i("div",{className:Cm(ez,eP),style:eV,"data-rue-checkbox-root":"true",onClick:e$=>{let eI=e$.target;if(!eY.current||ez||eI===eY.current)return;e$.preventDefault();let eL=eY.current,eF=!eL.checked;if(void 0===eR&&!eU&&!eG&&eL.closest('[data-rue-checkbox-group="true"]')){eL.checked=eF,eL.dispatchEvent(new Event("change",{bubbles:!0}));return}"boolean"!=typeof eR&&eY.current&&(eY.current.checked=eF),eW&&eQ(),eU&&eU(e$,{checked:eF,indeterminate:!!eW,value:eH}),eG&&eG(eF,e$)},children:[r("span",{className:"shrink-0 pt-0.5",children:e0}),e1]})},jm=Object.assign(Am,{Group:({value:e$,defaultValue:eI,options:eR,disabled:eL,name:ez,className:eW,style:eH,children:eF,onChange:eP,...eB})=>{let eK=(0,e.useRef)(),eV=km(eR),eq=(0,e.ref)(Om(e$??eI)),eU=()=>{let e$=eK.current;if(!e$)return;let eI=new Set(eq.value.map(Em));Array.from(e$.querySelectorAll('input[type="checkbox"][data-rue-checkbox-input="true"]')).forEach(e$=>{let eR=e$.dataset.rueCheckboxValue;eR&&(e$.checked=eI.has(eR)),ez&&(e$.name=ez),eL?e$.disabled=!0:e$.disabled="true"===e$.dataset.rueCheckboxDisabled})},eG=(eI,eR,eL)=>{var ez;let eW,eH=eL?Om(e$):eq.value,eF=eH.some(e$=>e$===eI);return ez=eR&&eF||!eR&&!eF?eH:eR?[...eH,eI]:eH.filter(e$=>e$!==eI),eW=(e$=>{let eI=eK.current;if(!eI)return Om(e$);let eR=Array.from(eI.querySelectorAll('input[type="checkbox"][data-rue-checkbox-input="true"]')).map(e$=>e$.dataset.rueCheckboxValue).filter(e$=>!!e$);if(!eR.length)return Om(e$);let eL=new Map(eR.map((e$,eI)=>[e$,eI]));return Om(e$).sort((e$,eI)=>(eL.get(Em(e$))??0x20000000000000-1)-(eL.get(Em(eI))??0x20000000000000-1))})(ez),eL||(eq.value=eW),eP&&eP(eW),eW};(0,e.onMounted)(()=>{eU(),Promise.resolve().then(()=>{eU()})}),(0,e.watch)(()=>e$,e$=>{void 0!==e$&&(eq.value=Om(e$)),eU()},{immediate:!0}),(0,e.watch)(()=>eq.value,()=>{eU()},{immediate:!0}),(0,e.watch)(()=>eL,()=>{eU()},{immediate:!0}),(0,e.watch)(()=>ez,()=>{eU()},{immediate:!0});let eZ=void 0===e$?eq.value:Om(e$),eY=xm("flex flex-col gap-3",eW);return r("div",{...eB,ref:eK,role:eB.role??"group",className:eY,style:eH,"data-rue-checkbox-group":"true",onChange:eV.length?eB.onChange:eI=>{let eR=eI.target;if(!eR||"checkbox"!==eR.type||"true"!==eR.dataset.rueCheckboxInput)return;let eL=Dm(eR.dataset.rueCheckboxValue);if(void 0===eL)return;let ez=void 0!==e$;eG(eL,eR.checked,ez),ez&&eU()},children:eV.length?eV.map(eI=>r(Am,{value:eI.value,checked:eZ.some(e$=>e$===eI.value),disabled:eL||eI.disabled,name:ez,title:eI.title,id:eI.id,indeterminate:eI.indeterminate,rootClassName:eI.className,rootStyle:eI.style,onChange:(eR,eL)=>{eG(eI.value,eL.checked,void 0!==e$),void 0!==e$&&eU()},children:eI.label},Em(eI.value))):eF})}}),Mm=(...e$)=>e$.filter(Boolean).join(" "),Nm=e$=>null!=e$&&!1!==e$&&(!Array.isArray(e$)||e$.some(e$=>Nm(e$))),Pm=e$=>{switch(e$){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return e$??"md"}},Fm=e$=>{switch(Pm(e$)){case"sm":return"gap-2";case"lg":return"gap-4";default:return"gap-3"}},Im=({variant:e$,tone:eI,bordered:eR,invalid:eL})=>{if(eL)return"rounded-box border border-error/30 bg-error/5 p-4";if("soft"===e$)switch(eI){case"neutral":return"rounded-box bg-neutral/5 p-4";case"primary":return"rounded-box bg-primary/5 p-4";case"secondary":return"rounded-box bg-secondary/5 p-4";case"accent":return"rounded-box bg-accent/5 p-4";case"info":return"rounded-box bg-info/8 p-4";case"success":return"rounded-box bg-success/8 p-4";case"warning":return"rounded-box bg-warning/10 p-4";case"error":return"rounded-box bg-error/8 p-4";default:return"rounded-box bg-base-200 p-4"}if("outlined"===e$||eR)switch(eI){case"neutral":return"rounded-box border border-neutral/20 bg-neutral/5 p-4";case"primary":return"rounded-box border border-primary/25 bg-primary/5 p-4";case"secondary":return"rounded-box border border-secondary/25 bg-secondary/5 p-4";case"accent":return"rounded-box border border-accent/25 bg-accent/5 p-4";case"info":return"rounded-box border border-info/30 bg-info/8 p-4";case"success":return"rounded-box border border-success/30 bg-success/8 p-4";case"warning":return"rounded-box border border-warning/35 bg-warning/10 p-4";case"error":return"rounded-box border border-error/30 bg-error/8 p-4";default:return"rounded-box border border-base-300 bg-base-100 p-4"}},Lm=e$=>{switch(e$){case"muted":return"opacity-70";case"neutral":return"text-neutral";case"primary":return"text-primary";case"secondary":return"text-secondary";case"accent":return"text-accent";case"info":return"text-info";case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return}},Rm=e$=>"sm"===Pm(e$)?"text-xs":"text-sm",zm=e$=>"lg"===Pm(e$)?"text-sm":"text-xs",Bm=({className:e$,children:eI,aside:eR,...eL})=>{let ez=Nm(eR);return r("legend",{...eL,className:Mm("fieldset-legend",e$),children:ez?i("span",{className:"flex w-full items-center gap-2",children:[r("span",{children:eI}),r("span",{className:"ml-auto text-xs font-normal opacity-65",children:eR})]}):eI})},Vm=({as:e$="label",className:eI,children:eR,tone:eL,...ez})=>{let eW=Mm("label",Lm(eL),eI);return"p"===e$?r("p",{...ez,className:Mm(eW,"min-w-0 whitespace-normal break-words"),children:eR}):r("span"===e$?"span":"div"===e$?"div":"label",{...ez,className:eW,children:eR})},Hm=({className:e$,children:eI,label:eR,description:eL,hint:ez,control:eW,required:eH,optional:eF,horizontal:eP,size:eB,tone:eK,invalid:eV,labelClassName:eq,descriptionClassName:eU,hintClassName:eG,contentClassName:eZ,labelProps:eY,descriptionProps:eX,hintProps:eJ,...eQ})=>{let e0=Nm(eR)?i(Vm,{...eY,className:Mm("justify-start gap-2 font-medium",Rm(eB),eq),tone:eV?"error":eK,children:[r("span",{children:eR}),eH?r("span",{className:"text-error text-xs font-medium",children:"必填"}):null,!eH&&eF?r("span",{className:"text-xs opacity-60",children:"可选"}):null]}):null,e1=Nm(eL)?r(Vm,{...eX,as:"p",className:Mm("mt-0 min-h-0 px-0 pb-0",zm(eB),eU),tone:eV?"error":eX?.tone??"muted",children:eL}):null,e2=Nm(ez)?r(Vm,{...eJ,as:"p",className:Mm("mt-0 min-h-0 px-0 pt-1",zm(eB),eG),tone:eV?"error":eJ?.tone??"muted",children:ez}):null,e5=eW??eI,e3=!!e0||!!e1,e4=Nm(e5)||!!e2;return i("div",{...eQ,className:Mm(eP?"grid gap-3 md:grid-cols-[minmax(0,12rem)_1fr] md:items-start":"grid gap-2",e$),children:[e3?i("div",{className:"min-w-0",children:[e0,e1]}):null,e4?i("div",{className:Mm("min-w-0",eZ),children:[e5,e2]}):null]})},Um=Object.assign(({className:e$,children:eI,legend:eR,description:eL,hint:ez,actions:eW,content:eH,items:eF,size:eP,tone:eB,variant:eK,bordered:eV,invalid:eq,legendClassName:eU,descriptionClassName:eG,hintClassName:eZ,contentClassName:eY,actionsClassName:eX,...eJ})=>{let eQ=Nm(eI),e0=Nm(eH)?eH:(eF??[]).map((e$,eI)=>{let{key:eR,...eL}=e$;return r(Hm,{...eL,size:e$.size??eP,invalid:e$.invalid??eq},eR??eI)}),e1=eq?"true":eJ["aria-invalid"];"aria-invalid"in eJ&&delete eJ["aria-invalid"];let e2={};return null!=e1&&(e2["aria-invalid"]=e1),r("fieldset",{...eJ,...e2,className:Mm("fieldset",Fm(eP),Im({variant:eK,tone:eB,bordered:eV,invalid:eq}),e$),children:eQ?eI:i(e.Fragment,{children:[Nm(eR)?r(Bm,{className:Mm(eq&&"text-error",eU),children:eR}):null,Nm(eL)?r(Vm,{as:"p",tone:eq?"error":"muted",className:Mm("mt-0 min-h-0 px-0",Rm(eP),eG),children:eL}):null,Nm(e0)?r("div",{className:Mm("grid min-w-0",Fm(eP),eY),children:e0}):null,Nm(ez)?r(Vm,{as:"p",tone:eq?"error":"muted",className:Mm("mt-0 min-h-0 px-0",zm(eP),eZ),children:ez}):null,Nm(eW)?r("div",{className:Mm("mt-1 flex flex-wrap justify-end gap-2",eX),children:eW}):null]})})},{Legend:Bm,Label:Vm,Item:Hm}),Wm="__rueDrawerSidebarPart",Gm=378,Km=736,qm=1e3,Jm=0,Ym="",Xm=(...e$)=>e$.filter(Boolean).join(" "),Zm=(e$,eI=[])=>(null==e$||!1===e$||(Array.isArray(e$)?e$.forEach(e$=>Zm(e$,eI)):eI.push(e$)),eI),Qm=e$=>Zm(e$).some(e$=>!!e$&&"object"==typeof e$&&!!e$.type?.[Wm]),$m=e$=>e$.startsWith("--")?e$:e$.includes("-")?e$.replace(/-([a-z])/g,(e$,eI)=>eI.toUpperCase()):e$,eh=e$=>{if(!e$)return;let eI={};return"string"==typeof e$?e$.split(";").map(e$=>e$.trim()).filter(Boolean).forEach(e$=>{let eR=e$.indexOf(":");if(-1===eR)return;let eL=e$.slice(0,eR).trim(),ez=e$.slice(eR+1).trim();eL&&ez&&(eI[$m(eL)]=ez)}):Object.entries(e$).forEach(([e$,eR])=>{null!=eR&&(eI[$m(e$)]=eR)}),Object.keys(eI).length>0?eI:void 0},th=(...e$)=>{let eI={};return e$.forEach(e$=>{let eR=eh(e$);eR&&Object.assign(eI,eR)}),Object.keys(eI).length>0?eI:void 0},nh=e$=>{if(null!=e$)return"number"==typeof e$||/^\d+(\.\d+)?$/.test(e$)?`${e$}px`:e$},rh=(e$,eI,eR,eL)=>"large"===e$?`${Km}px`:"default"===e$?`${Gm}px`:null==e$?"left"===eI||"right"===eI?nh(eR)??`${Gm}px`:nh(eL)??`${Gm}px`:nh(e$),ih=(e$,eI)=>!1===e$?{enabled:!1,closable:!1,blur:!1}:e$&&"object"==typeof e$?{enabled:e$.enabled??!0,closable:e$.closable??eI??!0,blur:e$.blur??!1}:{enabled:!0,closable:eI??!0,blur:!1},ah=(e$,eI)=>!1===e$?{enabled:!1,placement:"end",disabled:!1,icon:eI}:e$&&"object"==typeof e$?{enabled:!0,placement:e$.placement??"end",disabled:e$.disabled??!1,icon:e$.closeIcon??eI}:{enabled:!0,placement:"end",disabled:!1,icon:eI},oh=e$=>{switch(e$){case"left":return"items-stretch justify-start";case"right":default:return"items-stretch justify-end";case"top":return"items-start justify-stretch";case"bottom":return"items-end justify-stretch"}},sh=e$=>{switch(e$){case"left":return"h-full max-h-full border-r border-base-300 rounded-r-3xl";case"right":default:return"h-full max-h-full border-l border-base-300 rounded-l-3xl";case"top":return"w-full border-b border-base-300 rounded-b-3xl";case"bottom":return"w-full border-t border-base-300 rounded-t-3xl"}},ch=(e$,eI)=>{switch(e$){case"left":return eI?"translate-x-0":"-translate-x-full";case"right":default:return eI?"translate-x-0":"translate-x-full";case"top":return eI?"translate-y-0":"-translate-y-full";case"bottom":return eI?"translate-y-0":"translate-y-full"}},lh=(e$,eI)=>{if(eI)return"left"===e$||"right"===e$?{width:eI}:{height:eI}},uh=e$=>[e$.defaultOpen,e$.placement,e$.size,e$.width,e$.height,e$.title,e$.extra,e$.footer,e$.loading,e$.closable,e$.closeIcon,e$.keyboard,e$.mask,e$.maskClosable,e$.inline,e$.forceRender,e$.destroyOnClose,e$.destroyOnHidden,e$.rootClassName,e$.panelClassName,e$.bodyClassName,e$.headerClassName,e$.footerClassName,e$.maskClassName,e$.classNames,e$.styles,e$.style,e$.rootStyle,e$.panelStyle,e$.bodyStyle,e$.headerStyle,e$.footerStyle,e$.maskStyle,e$.getContainer,e$.drawerRender,e$.onClose,e$.onOpenChange,e$.afterOpenChange,e$.zIndex].some(e$=>void 0!==e$),dh=()=>{typeof document>"u"||(0===Jm&&(Ym=document.documentElement.style.overflow,document.documentElement.style.overflow="hidden"),Jm+=1)},fh=()=>{typeof document>"u"||0===Jm||0==--Jm&&(document.documentElement.style.overflow=Ym)},ph=()=>i("div",{className:"space-y-3","data-rue-drawer-sidebar-loading":"true",children:[r("div",{className:"skeleton h-4 w-1/3"}),r("div",{className:"skeleton h-4 w-full"}),r("div",{className:"skeleton h-4 w-5/6"}),r("div",{className:"skeleton h-24 w-full"})]}),mh=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-4","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M18 6 6 18"})}),hh=({end:e$,open:eI,className:eR,children:eL,...ez})=>{if(!(!Qm(eL)&&uh({end:e$,open:eI,className:eR,children:eL,...ez}))){let eW="drawer";return e$&&(eW+=" drawer-end"),eI&&(eW+=" drawer-open"),r("div",{...ez,className:Xm(eW,eR),"data-rue-drawer-sidebar-mode":"compound",children:eL})}let{defaultOpen:eW=!1,placement:eH="right",size:eF,width:eP,height:eB,title:eK,extra:eV,footer:eq,loading:eU=!1,closable:eG=!0,closeIcon:eZ,keyboard:eY=!0,mask:eX=!0,maskClosable:eJ,inline:eQ=!1,forceRender:e0=!1,destroyOnClose:e1,destroyOnHidden:e2=!0,zIndex:e5,rootClassName:e3,panelClassName:e4,bodyClassName:e6,headerClassName:e8,footerClassName:e7,maskClassName:e9,classNames:t$,styles:tI,style:tR,rootStyle:tL,panelStyle:tz,bodyStyle:tW,headerStyle:tH,footerStyle:tF,maskStyle:tP,getContainer:tB,drawerRender:tK,onClose:tV,onOpenChange:tq,afterOpenChange:tU,...tG}=ez,tZ=(0,e.ref)(eW),tY=(0,e.ref)(!!eW),tX=(0,e.ref)(eW),tJ=(0,e.ref)(!1),tQ=(0,e.ref)("boolean"==typeof eI?eI:tZ.value),t0=(0,e.ref)(eY),t1="boolean"==typeof eI,t2=tQ.value,t5=e2??e1??!0,t3=ih(eX,eJ),t4=ah(eG,eZ??r(mh,{})),t6=rh(eF,eH,eP,eB),t8=null,t7=null,t9=null,r$=e$=>{if(t8&&(t8.setAttribute("data-rue-drawer-sidebar-open",e$?"true":"false"),t8.classList.toggle("pointer-events-auto",e$),t8.classList.toggle("pointer-events-none",!e$),t8.style.display=t5&&!e$?"none":""),t7&&(t7.classList.toggle("opacity-100",e$),t7.classList.toggle("opacity-0",!e$)),t9){let eI=ch(eH,!0),eR=ch(eH,!1);t9.setAttribute("aria-hidden",e$?"false":"true"),t9.setAttribute("aria-modal",e$&&!eQ?"true":"false"),t9.classList.toggle(eI,e$),t9.classList.toggle(eR,!e$)}},rI=e$=>{tV&&tV(e$),e$&&e$.defaultPrevented||!1!==tQ.value&&(tQ.value=!1,t1||(tZ.value=!1),tq&&tq(!1))};if((0,e.onMounted)(()=>{if(t2&&!eQ&&(dh(),tJ.value=!0),typeof window>"u")return;let e$=e$=>{tQ.value&&t0.value&&"Escape"===e$.key&&rI(e$)};window.addEventListener("keydown",e$),(0,e.onUnmounted)(()=>{window.removeEventListener("keydown",e$)})}),(0,e.watch)(()=>tQ.value,e$=>{r$(e$),e$?(tX.value=!0,eQ||tJ.value||(dh(),tJ.value=!0)):tJ.value&&(fh(),tJ.value=!1),tU&&tU(e$)}),(0,e.watch)(()=>eI,e$=>{"boolean"==typeof e$&&(tQ.value=e$)},{immediate:!0}),(0,e.watch)(()=>eY,e$=>{t0.value=e$},{immediate:!0}),(0,e.watch)(()=>eW,e$=>{let eI=!!e$;t1||eI===tY.value||(tY.value=eI,tZ.value=eI,tQ.value=eI)}),(0,e.onUnmounted)(()=>{tJ.value&&(fh(),tJ.value=!1)}),!(t2||e0||!t5&&tX.value))return null;let rR=null!=eK||null!=eV||t4.enabled,rL=t4.enabled?r("button",{type:"button","aria-label":"关闭",disabled:t4.disabled,className:Xm("btn btn-sm btn-circle btn-ghost shrink-0",t4.disabled?"btn-disabled pointer-events-none opacity-50":void 0,t$?.close),style:th(tI?.close),onClick:e$=>{e$.stopPropagation(),t4.disabled||rI(e$)},"data-rue-drawer-sidebar-close":"true",children:t4.icon}):null,rz=r("div",{className:Xm("flex-1 overflow-y-auto px-5 py-5",e6,t$?.body),style:th(tI?.body,tW),"aria-busy":eU?"true":void 0,"data-rue-drawer-sidebar-body":"true",children:eU?ph():eL}),rW=i("div",{...tG,role:"dialog","aria-modal":t2&&!eQ?"true":"false","aria-hidden":t2?void 0:"true",className:Xm("bg-base-100 text-base-content relative flex max-w-full max-h-full flex-col shadow-2xl transition-transform duration-300 ease-out",sh(eH),ch(eH,t2),eR,e4,t$?.panel),style:th(tI?.panel,tR,tz,lh(eH,t6)),onClick:e$=>e$.stopPropagation(),ref:e$=>{t9=e$,r$(tQ.value)},"data-rue-drawer-sidebar-panel":"true","data-rue-drawer-sidebar-placement":eH,children:[rR?i("div",{className:Xm("flex items-start gap-3 border-b border-base-300 px-5 py-4",e8,t$?.header),style:th(tI?.header,tH),"data-rue-drawer-sidebar-header":"true",children:["start"===t4.placement?rL:null,r("div",{className:Xm("min-w-0 flex-1",t$?.title),style:th(tI?.title),children:eK?r("div",{className:"text-lg font-semibold leading-6",children:eK}):null}),eV?r("div",{className:"shrink-0",children:eV}):null,"end"===t4.placement?rL:null]}):null,rz,null!=eq&&!1!==eq?r("div",{className:Xm("border-t border-base-300 px-5 py-4",e7,t$?.footer),style:th(tI?.footer,tF),"data-rue-drawer-sidebar-footer":"true",children:eq}):null]});tK&&(rW=tK(rW));let rH=i("div",{className:Xm(eQ?"absolute inset-0 overflow-hidden":"fixed inset-0 overflow-hidden",t2?"pointer-events-auto":"pointer-events-none",e3,t$?.root),style:th(tI?.root,tL,{zIndex:e5??qm}),ref:e$=>{t8=e$,r$(tQ.value)},"data-rue-drawer-sidebar-root":"true","data-rue-drawer-sidebar-mode":"panel","data-rue-drawer-sidebar-open":t2?"true":"false",children:[t3.enabled?r("div",{"aria-hidden":"true",className:Xm("absolute inset-0 bg-base-content/35 transition-opacity duration-300",t3.blur?"backdrop-blur-sm":void 0,t2?"opacity-100":"opacity-0",e9,t$?.mask),style:th(tI?.mask,tP),ref:e$=>{t7=e$,r$(tQ.value)},"data-rue-drawer-sidebar-mask":"true"}):null,r("div",{className:Xm("absolute inset-0 flex",oh(eH),t$?.wrapper),style:th(tI?.wrapper),onClick:e$=>{t3.enabled&&t3.closable&&e$.target===e$.currentTarget&&rI(e$)},"data-rue-drawer-sidebar-wrapper":"true",children:rW})]}),rF="function"==typeof tB?tB():tB;return eQ||!1===rF||null==rF?rH:r(e.Teleport,{to:rF,children:rH})},gh=({className:e$,...eI})=>r("input",{...eI,type:"checkbox",autoComplete:eI.autoComplete??"off",className:Xm("drawer-toggle",e$)});gh[Wm]="Toggle";var _h=({className:e$,children:eI,...eR})=>r("div",{...eR,className:Xm("drawer-content",e$),children:eI});_h[Wm]="Content";var vh=({className:e$,children:eI,...eR})=>r("div",{...eR,className:Xm("drawer-side",e$),children:eI});vh[Wm]="Side";var yh=({className:e$,children:eI,...eR})=>r("label",{...eR,className:Xm("drawer-overlay",e$),children:eI});yh[Wm]="Overlay";var _v,bh=Object.assign(hh,{Toggle:gh,Content:_h,Side:vh,Overlay:yh}),xh=e$=>e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),Sh=["neutral","primary","secondary","accent","info","success","warning","error"],Ch={top:"top",bottom:"bottom",left:"left",right:"right",topLeft:"top",topRight:"top",bottomLeft:"bottom",bottomRight:"bottom",leftTop:"left",leftBottom:"left",rightTop:"right",rightBottom:"right"},wh=0,Th=(...e$)=>e$.filter(Boolean).join(" "),Eh=(...e$)=>{let eI={};return e$.forEach(e$=>{e$&&Object.assign(eI,e$)}),eI},Dh=e$=>e$?"string"==typeof e$?e$.trim():Object.entries(e$).filter(([,e$])=>null!=e$).map(([e$,eI])=>`${e$.startsWith("--")?e$:xh(e$)}:${String(eI)}`).join("; "):"",Oh=e$=>Array.isArray(e$)?e$.flatMap(e$=>Oh(e$)):null==e$||"boolean"==typeof e$?[]:[e$],kh=(e$,eI,eR)=>{eI&&eI.split(/\s+/).map(e$=>e$.trim()).filter(Boolean).forEach(eI=>e$.classList.toggle(eI,eR))},Ah=(e$,eI,eR,eL)=>{e$ instanceof HTMLElement&&(e$.classList.toggle("tooltip-open",eI),kh(e$,eL,eI),e$.classList.toggle("before:!opacity-0",eR&&!eI),e$.classList.toggle("after:!opacity-0",eR&&!eI),e$.classList.toggle("[&>.tooltip-content]:!opacity-0",eR&&!eI))},jh=e$=>Array.from(new Set(Array.isArray(e$)?e$:e$?[e$]:["hover","focus"])),Mh=e$=>"string"==typeof e$&&Sh.includes(e$),Nh=e$=>"string"==typeof e$||"number"==typeof e$,Ph=(e$,eI,eR,eL)=>{let ez=void 0===e$?void 0===eI?void 0===eR?eL:eR:eI:e$;return"function"==typeof ez?ez():ez},Fh=e$=>Number.parseInt(e$,16),Ih=e$=>{let eI=e$/255;return eI<=.03928?eI/12.92:((eI+.055)/1.055)**2.4},Lh=e$=>{let eI=e$.trim(),eR=NaN,eL=NaN,ez=NaN;if(/^#([\da-f]{3}|[\da-f]{6})$/i.test(eI)){let e$=eI.slice(1);3===e$.length?(eR=Fh(`${e$[0]}${e$[0]}`),eL=Fh(`${e$[1]}${e$[1]}`),ez=Fh(`${e$[2]}${e$[2]}`)):(eR=Fh(e$.slice(0,2)),eL=Fh(e$.slice(2,4)),ez=Fh(e$.slice(4,6)))}else{let e$=eI.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)/i);e$&&(eR=Number(e$[1]),eL=Number(e$[2]),ez=Number(e$[3]))}return[eR,eL,ez].some(e$=>Number.isNaN(e$))?"var(--color-neutral-content)":.2126*Ih(eR)+.7152*Ih(eL)+.0722*Ih(ez)>.45?"#111827":"#f8fafc"},Rh=(e$,eI)=>{"function"==typeof e$&&e$(eI)},zh=({as:e$="div",className:eI,style:eR,children:eL,...ez})=>{let eW={...ez,className:Th("tooltip-content",eI),style:eR},eH=Oh(eL);return"span"===e$?(0,e.h)("span",eW,...eH):"p"===e$?(0,e.h)("p",eW,...eH):"section"===e$?(0,e.h)("section",eW,...eH):"div"===e$?(0,e.h)("div",eW,...eH):(0,e.h)(e$,eW,...eH)},Bh=Object.assign(({as:e$="div",tip:eI,title:eR,content:eL,overlay:ez,placement:eW="top",color:eH,open:eF,defaultOpen:eP,disabled:eB,arrow:eK=!0,trigger:eV,openClassName:eq,overlayClassName:eU,overlayStyle:eG,classNames:eZ,styles:eY,className:eX,style:eJ,onOpenChange:eQ,children:e0,...e1})=>{let e2=(0,e.ref)(`rue-tooltip-${wh++}`),e5=(0,e.ref)(eP??!1),e3=Ph(ez,eR,eL,eI),e4=null!=e3&&!1!==e3,e6=jh(eV),e8=e6.includes("hover"),e7=e6.includes("focus"),e9=e6.includes("click"),t$=e6.includes("contextMenu"),tI=eF??e5.value,tR=!!eH&&!Mh(eH),tL=Th(eZ?.body,eU),tz=Eh(eY?.body,eG),tW=e4&&(tR||!Nh(e3)||!!tL||Object.keys(tz).length>0),tH=e4&&!tW&&Nh(e3),tF=!e8&&!e7,tP=!eB&&(!1===eF||!tI&&tF),tB=e$=>{let eI=eF??e5.value;eB||e$===eI||(void 0===eF&&(e5.value=e$),eQ&&eQ(e$))},tK=Eh("string"==typeof eJ?void 0:eJ,eY?.root),tV=tR?Eh(tz,{backgroundColor:eH,color:Lh(String(eH))}):Eh(tz),tq=eB?"":"tooltip";eB||(tq=Th(tq,`tooltip-${Ch[eW]}`),eH&&Mh(eH)&&(tq=Th(tq,`tooltip-${eH}`)),tI&&(tq=Th(tq,"tooltip-open",eq)),(!eK||tR)&&(tq=Th(tq,"after:!hidden")),tP&&(tq=Th(tq,"before:!opacity-0","after:!opacity-0","[&>.tooltip-content]:!opacity-0"))),tq=Th(tq,eZ?.root,eX);let{onMouseEnter:tU,onMouseLeave:tG,onFocus:tZ,onBlur:tY,onClick:tX,onContextMenu:tJ,...tQ}=e1,t0={...tQ,className:tq||void 0,style:Dh(tK),onMouseEnter:e$=>{Rh(tU,e$),!e$?.defaultPrevented&&e8&&tB(!0)},onMouseLeave:e$=>{Rh(tG,e$),!e$?.defaultPrevented&&e8&&tB(!1)},onFocus:e$=>{Rh(tZ,e$),!e$?.defaultPrevented&&e7&&tB(!0)},onBlur:e$=>{Rh(tY,e$),!e$?.defaultPrevented&&e7&&tB(!1)},onClick:e$=>{if(Rh(tX,e$),!e$?.defaultPrevented&&e9){let eI=!(eF??e5.value);tB(eI),void 0===eF&&Ah(e$?.currentTarget,eI,tF,eq)}},onContextMenu:e$=>{if(Rh(tJ,e$),!e$?.defaultPrevented&&t$){"function"==typeof e$?.preventDefault&&e$.preventDefault();let eI=!(eF??e5.value);tB(eI),void 0===eF&&Ah(e$?.currentTarget,eI,tF,eq)}}};eB||!tH?delete t0["data-tip"]:void 0===t0["data-tip"]&&(t0["data-tip"]=String(e3)),tW&&!eB&&(t0["aria-describedby"]=e2.value);let t1=tW&&!eB?(0,e.h)(zh,{id:e2.value,className:tL,style:Object.keys(tV).length>0?tV:void 0},e3):null,t2=[...t1?[t1]:[],...Oh(e0)];return"span"===e$?(0,e.h)("span",t0,...t2):"label"===e$?(0,e.h)("label",t0,...t2):"button"===e$?(0,e.h)("button",t0,...t2):"section"===e$?(0,e.h)("section",t0,...t2):"article"===e$?(0,e.h)("article",t0,...t2):"div"===e$?(0,e.h)("div",t0,...t2):(0,e.h)(e$,t0,...t2)},{Content:zh}),Vh=(...e$)=>e$.filter(Boolean).join(" "),Hh=e$=>Array.isArray(e$)?e$.flatMap(e$=>Hh(e$)):null==e$||"boolean"==typeof e$?[]:[e$],Uh=e$=>null!=e$&&!1!==e$&&""!==e$&&(!Array.isArray(e$)||e$.some(e$=>Uh(e$))),Wh=e$=>void 0!==e$.items||void 0!==e$.trigger||void 0!==e$.open||void 0!==e$.defaultOpen||void 0!==e$.icon||void 0!==e$.content||void 0!==e$.description||void 0!==e$.tooltip||void 0!==e$.badge||void 0!==e$.type||void 0!==e$.color||void 0!==e$.shape||void 0!==e$.href||void 0!==e$.target||void 0!==e$.htmlType||void 0!==e$.closeIcon||void 0!==e$.menuIcon||void 0!==e$.panelClassName||void 0!==e$.onOpenChange,Gh=(e$,eI)=>eI||("primary"===e$?"primary":"default"),Kh=(e$,eI)=>e$||(Uh(eI)?"square":"circle"),qh=e$=>!(!e$||"object"!=typeof e$||Array.isArray(e$))&&["title","content","overlay","tip","placement","color","trigger","open","defaultOpen","disabled"].some(eI=>eI in e$),Jh=(e$,eI,eR)=>null==eI||!1===eI?e$:qh(eI)?r(Bh,{placement:eI.placement??eR,...eI,children:e$}):r(Bh,{title:eI,placement:eR,children:e$}),Yh=(e$,eI)=>eI?r(yo,{...eI,children:e$}):e$,Xh=()=>r("span",{"aria-hidden":"true",className:"text-xl leading-none",children:"+"}),Zh=()=>r("span",{"aria-hidden":"true",className:"text-lg leading-none",children:"x"}),Qh=({icon:e$,content:eI,description:eR,tooltip:eL,badge:ez,type:eW,color:eH,shape:eF,href:eP,target:eB,htmlType:eK,disabled:eV,className:eq,children:eU,closeOnClick:eG,onClick:eZ,tooltipPlacement:eY="left",menuAction:eX,open:eJ,closeIcon:eQ,menuIcon:e0,onActionClick:e1,...e2})=>{let e5=Uh(eU)?eU:eI??eR,e3=Kh(eF,e5),e4=eX?i("span",{"data-rue-fab-toggle-icon":"true",className:"inline-flex items-center justify-center",children:[r("span",{"data-rue-fab-open-icon":"true",className:eJ?"hidden":void 0,children:e0??e$??r(Xh,{})}),r("span",{"data-rue-fab-close-icon":"true",className:eJ?void 0:"hidden",children:eQ??r(Zh,{})})]}):e$,e6=Vh("shadow-lg transition-all duration-200","circle"===e3?"size-14 p-0":"h-auto min-h-20 w-20 rounded-3xl px-3 py-3 text-center text-xs leading-tight",eq),e8=r(ie,{...e2,href:eP,target:eB,htmlType:eK,size:"large",color:Gh(eW,eH),shape:"circle"===e3?"circle":void 0,icon:e4,iconPlacement:"start",disabled:eV,className:e6,"aria-label":e2["aria-label"]??("string"==typeof e5?e5:void 0),onClick:eY=>{eZ&&eZ(eY),e1&&e1(eY,{...e2,icon:e$,content:eI,description:eR,tooltip:eL,badge:ez,type:eW,color:eH,shape:eF,href:eP,target:eB,htmlType:eK,disabled:eV,className:eq,children:eU,closeOnClick:eG,onClick:eZ})},children:"circle"===e3?null:e5});return Jh(e8=Yh(e8,ez),eL,eY)},$h=e$=>{switch(e$){case"bottom":return{wrapper:"top-full pt-3 right-0",list:"flex-col",tooltipPlacement:"leftTop"};case"left":return{wrapper:"right-full pr-3 top-1/2 -translate-y-1/2",list:"flex-row-reverse",tooltipPlacement:"top"};case"right":return{wrapper:"left-full pl-3 top-1/2 -translate-y-1/2",list:"flex-row",tooltipPlacement:"top"};default:return{wrapper:"bottom-full pb-3 right-0",list:"flex-col-reverse",tooltipPlacement:"leftTop"}}},eg=(e$,eI)=>{let eR=Math.max(Math.min(eI,4),1)-1,eL=(0===eR?225:180+90/eR*e$)*Math.PI/180;return{x:Math.round(84*Math.cos(eL)),y:Math.round(84*Math.sin(eL))}},tg=Object.assign(e$=>{if(!Wh(e$)){let{flower:eI,className:eR,children:eL,...ez}=e$,eW="fab";return eI&&(eW+=" fab-flower"),eR&&(eW+=` ${eR}`),(0,e.h)("div",{...ez,className:eW},...Hh(eL))}let{flower:eI,items:eR=[],trigger:eL,open:ez,defaultOpen:eW=!1,placement:eH="top",closeIcon:eF,menuIcon:eP,panelClassName:eB,onOpenChange:eK,className:eV,children:eq,onClick:eU,onMouseEnter:eG,onMouseLeave:eZ,...eY}=e$,eX=eL??(eR.length?"click":void 0),eJ={...eY};delete eJ.icon,delete eJ.content,delete eJ.description,delete eJ.tooltip,delete eJ.badge,delete eJ.type,delete eJ.color,delete eJ.shape,delete eJ.href,delete eJ.target,delete eJ.htmlType,delete eJ.disabled,delete eJ.closeOnClick;let eQ="boolean"==typeof ez,e0=(0,e.ref)(eW),e1=(0,e.ref)(eQ?!!ez:e0.value),e2=(0,e.ref)(eX),e5=e1.value,e3=null,e4=e$=>{if(!e3||!e8)return;let eI=e3.querySelector("[aria-expanded]"),eR=e3.querySelector('[data-rue-fab-panel="true"]');if(eI){eI.setAttribute("aria-expanded",e$?"true":"false");let eR=eI.querySelector('[data-rue-fab-open-icon="true"]'),eL=eI.querySelector('[data-rue-fab-close-icon="true"]');eR?.classList.toggle("hidden",e$),eL?.classList.toggle("hidden",!e$)}eR&&(eR.setAttribute("aria-hidden",e$?"false":"true"),eR.classList.toggle("pointer-events-auto",e$),eR.classList.toggle("opacity-100",e$),eR.classList.toggle("scale-100",e$),eR.classList.toggle("pointer-events-none",!e$),eR.classList.toggle("opacity-0",!e$),eR.classList.toggle("scale-95",!e$))},e6=e$=>{e1.value!==e$&&(e1.value=e$,eQ||(e0.value=e$),e4(e$),eK&&eK(e$))};(0,e.watch)(()=>ez,e$=>{"boolean"==typeof e$&&(e1.value=e$,e4(e$))},{immediate:!0}),(0,e.watch)(()=>eX,e$=>{e2.value=e$},{immediate:!0}),(0,e.watch)(()=>eW,e$=>{if(!eQ){let eI=!!e$;e0.value=eI,e1.value=eI,e4(eI)}},{immediate:!0}),(0,e.onMounted)(()=>{if(typeof window>"u")return;let e$=e$=>{!e1.value||"click"!==e2.value||e3?.contains(e$.target)||e6(!1)},eI=e$=>{e1.value&&"click"===e2.value&&"Escape"===e$.key&&e6(!1)};window.addEventListener("click",e$,!0),window.addEventListener("keydown",eI),(0,e.onUnmounted)(()=>{window.removeEventListener("click",e$,!0),window.removeEventListener("keydown",eI)})});let e8=!!eR.length||!!eL,e7=e5?"pointer-events-auto opacity-100 scale-100":"pointer-events-none opacity-0 scale-95",e9=$h(eH),t$=(e$,eI)=>{"click"===eX&&!1!==eI.closeOnClick&&e6(!1)},tI=eR.map((e$,eL)=>{let ez=e$.key??`${eH}-${eL}`;if(eI){let eI=eg(eL,eR.length);return r("div",{className:Vh("absolute right-0 top-0 transition-all duration-200",e5?"pointer-events-auto opacity-100 scale-100":"pointer-events-none opacity-0 scale-75"),style:{transform:e5?`translate(${eI.x}px, ${eI.y}px)`:"translate(0px, 0px)"},children:r(Qh,{...e$,tooltipPlacement:e$.tooltip&&"square"!==e$.shape?"left":e9.tooltipPlacement,onActionClick:t$})},String(ez))}return r(Qh,{...e$,tooltipPlacement:e$.tooltip&&"square"!==e$.shape?"left":e9.tooltipPlacement,onActionClick:t$},String(ez))}),tR=r(Qh,{...eY,children:eq,icon:eY.icon,onClick:e8?void 0:e$=>{eU&&eU(e$)},tooltipPlacement:e9.tooltipPlacement,menuAction:e8,open:e5,closeIcon:eF,menuIcon:eP,"aria-expanded":e8?e5?"true":"false":void 0});return i("div",{...eJ,ref:e$=>{e3=e$,e4(e5)},className:Vh("rue-fab pointer-events-none relative inline-flex items-end justify-end",eI?"min-h-[14rem] min-w-[14rem]":void 0,eV),onMouseEnter:e$=>{"hover"===eX&&e6(!0),eG&&eG(e$)},onMouseLeave:e$=>{"hover"===eX&&e6(!1),eZ&&eZ(e$)},"data-rue-fab-root":"true",children:[e8?eI?r("div",{className:Vh("pointer-events-none absolute inset-0",eB),"aria-hidden":e5?"false":"true",children:tI}):r("div",{"data-rue-fab-panel":"true",className:Vh("absolute transition-all duration-200",e9.wrapper,e7,eB),"aria-hidden":e5?"false":"true",children:r("div",{className:Vh("flex gap-3",e9.list),children:tI})}):null,r("div",{className:"pointer-events-auto relative z-1",onClick:e$=>{e8&&("click"===eX&&e6(!e1.value),eU&&eU(e$))},children:tR})]})},{Trigger:({as:e$="div",className:eI,children:eR,...eL})=>{let ez={...eL};if("div"===e$){if("string"!=typeof ez.tabindex){let e$=ez.tabIndex;ez.tabindex="number"==typeof e$?String(e$):"0"}delete ez.tabIndex,ez.role||(ez.role="button")}return(0,e.h)(e$,{...ez,className:eI},...Hh(eR))},Close:({as:e$="div",className:eI,children:eR,...eL})=>(0,e.h)(e$,{...eL,className:Vh("fab-close",eI)},...Hh(eR)),MainAction:({as:e$="div",className:eI,children:eR,...eL})=>(0,e.h)(e$,{...eL,className:Vh("fab-main-action",eI)},...Hh(eR)),Item:e$=>r(Qh,{...e$})}),ng=0,rg=(...e$)=>e$.filter(Boolean).join(" ").trim(),ig=e$=>Object.fromEntries(Object.entries(e$).filter(([,e$])=>null!=e$)),ag=e$=>{switch(e$){case"small":return"sm";case"medium":case"middle":return"md";case"large":return"lg";default:return e$}},og=e$=>{switch(typeof e$){case"number":return`number:${e$}`;case"boolean":return`boolean:${e$?"true":"false"}`;default:return`string:${e$}`}},sg=e$=>{if(!e$)return;let eI=e$.indexOf(":");if(-1===eI)return e$;let eR=e$.slice(0,eI),eL=e$.slice(eI+1);return"number"===eR?Number(eL):"boolean"===eR?"true"===eL:eL},cg=e$=>"string"==typeof e$||"number"==typeof e$||"boolean"==typeof e$,lg=e$=>{let eI=[];return e$.forEach(e$=>{eI.some(eI=>og(eI)===og(e$))||eI.push(e$)}),eI},ug=(e$,eI)=>void 0===e$?[]:Array.isArray(e$)?"checkbox"===eI?lg(e$):e$.length?[e$[0]]:[]:[e$],dg=e$=>(e$??[]).map((e$,eI)=>{if(cg(e$))return{key:`${og(e$)}-${eI}`,label:String(e$),value:e$};let eR=e$.label??e$["aria-label"],eL=e$.key??(void 0===e$.value?"string"==typeof eR||"number"==typeof eR||"boolean"==typeof eR?String(eR):`item-${eI}`:og(e$.value));return{...e$,key:eL}}),fg=e$=>{switch(e$){case"outlined":return"btn-outline";case"dashed":return"btn-dash";case"filled":return"btn-soft";case"text":return"btn-ghost";default:return}},pg=({color:e$,size:eI,variant:eR,active:eL,className:ez})=>{let eW="btn",eH=ag(eI),eF=fg(eR);return e$&&"default"!==e$&&(eW+=` btn-${"danger"===e$?"error":e$}`),eH&&(eW+=` btn-${eH}`),eF&&(eW+=` ${eF}`),eL&&(eW+=" btn-active"),ez&&(eW+=` ${ez}`),eW},mg=(e$,eI)=>void 0===e$?eI:e$,hg=e$=>{if(void 0!==e$.value)return e$.value;let eI=mg(e$.label??e$["aria-label"],e$.children);return cg(eI)?eI:void 0},gg=(e$,eI)=>{let eR=e$.dataset[eI];if(!(!eR||!eR.length||"undefined"===eR||"null"===eR))return eR},_g=e$=>({role:gg(e$,"rueFilterRole"),mode:gg(e$,"rueFilterMode"),type:gg(e$,"rueFilterType"),name:gg(e$,"rueFilterName"),size:gg(e$,"rueFilterSize"),color:gg(e$,"rueFilterColor"),variant:gg(e$,"rueFilterVariant"),className:gg(e$,"rueFilterClassName"),active:"true"===e$.dataset.rueFilterActive,disabled:"true"===e$.dataset.rueFilterDisabled,value:sg(gg(e$,"rueFilterValue"))}),vg=({as:e$="form",className:eI,style:eR,children:eL,items:ez,name:eW,type:eH,multiple:eF,value:eP,defaultValue:eB,onChange:eK,size:eV,color:eq,variant:eU,disabled:eG,itemClassName:eZ,reset:eY,onReset:eX,...eJ})=>{let eQ=(0,e.useRef)(),e0=(0,e.useRef)(),e1=dg(ez),e2=eF?"checkbox":eH??"radio",e5=(0,e.ref)(`rue-filter-${++ng}`),e3=eW??("radio"===e2?e5.value:void 0),e4=ug(eB,e2),e6=(0,e.ref)(ug(eP,e2)),e8=(0,e.ref)(e4),e7=void 0!==eP,e9=e7||void 0!==eB||!!eK||e1.length>0,t$=()=>e7?e6.value:e8.value,tI=()=>{let e$=eQ.current,eI=e0.current;e$&&eI&&eI.observe(e$,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","type","name","checked","value"]})},tR=()=>{queueMicrotask(()=>{tL()}),setTimeout(()=>{tL()},0)},tL=()=>{let eI=eQ.current;if(!eI)return;e0.current?.disconnect();let eR=t$();Array.from(eI.querySelectorAll("input[data-rue-filter-role]")).forEach(eI=>{let eL=_g(eI);if("reset"===eL.role){let ez=eL.mode??e$,eW="div"===ez&&e9?0===eR.length:!0===eI.checked,eH=pg({color:eL.color??eq,size:eL.size??eV,variant:eL.variant??eU,active:eL.active||eW,className:rg(eZ,eL.className)});eI.type="form"===ez?"reset":"radio",eI.disabled=!!eG||eL.disabled,eI.className=rg(eH,"form"===ez?"btn-square":"filter-reset"),"div"===ez&&("radio"===e2&&(eL.name??e3)?eI.name=eL.name??e3??"":eI.removeAttribute("name"),e9&&(eI.checked=0===eR.length));return}let ez=e9&&void 0!==eL.value?eR.some(e$=>og(e$)===og(eL.value)):!0===eI.checked,eW=pg({color:eL.color??eq,size:eL.size??eV,variant:eL.variant??eU,active:eL.active||ez,className:rg(eZ,eL.className)});eI.type=eL.type??e2,"radio"===eI.type&&(eL.name??e3)&&(eI.name=eL.name??e3??""),eI.disabled=!!eG||eL.disabled,eI.className=eW,e9&&void 0!==eL.value&&(eI.checked=ez)}),tI()},tz=(e$,eI,eR,eL=!1)=>{let ez=ug(e$,e2);e9&&(e7?eK&&(e6.value=ez):e8.value=ez),eK&&eK("checkbox"===e2?ez:ez[0],eI,{checked:eL,value:eR?hg(eR):void 0,item:eR,values:ez})},tW="object"==typeof eY?eY:void 0,tH=tW?.mode??e$,tF=eY?r(bg,{...tW,mode:tH}):null,tP="checkbox"===e2&&"form"===tH,tB=e1.length>0?i(e.Fragment,{children:[tP?null:tF,e1.map((e$,eI)=>r(yg,{...e$},e$.key??`filter-item-${eI}`)),tP?tF:null]}):eL;return(0,e.onMounted)(()=>{"function"==typeof MutationObserver&&(e0.current=new MutationObserver(()=>{tL()}),tI()),tL()}),(0,e.onUnmounted)(()=>{e0.current?.disconnect(),e0.current=void 0}),(0,e.watch)(()=>eP,e$=>{e6.value=ug(e$,e2),tL()},{immediate:!0}),(0,e.watch)(()=>e8.value,()=>{tL()},{immediate:!0}),(0,e.watch)(()=>eG,()=>{tL()},{immediate:!0}),(0,e.watch)(()=>e3,()=>{tL()},{immediate:!0}),(0,e.watch)(()=>`${e$}|${e2}|${eq??""}|${eU??""}|${eV??""}|${eZ??""}|${e1.length}`,()=>{tL()},{immediate:!0}),r(e$,{...eJ,ref:eQ,style:eR,onChange:eI=>{let eR=eI.target;if(!eR||"input"!==eR.tagName.toLowerCase()||!eR.dataset.rueFilterRole)return;let eL=_g(eR);if("reset"===eL.role){(eL.mode??e$)!=="form"&&(tz([],eI,void 0,!1),tL(),tR());return}((e$,eI,eR)=>{let eL=t$();if(void 0===e$)return tz(eL,eR,void 0,eI);if("checkbox"===e2){let ez=eL.some(eI=>og(eI)===og(e$));tz(eI?ez?eL:[...eL,e$]:eL.filter(eI=>og(eI)!==og(e$)),eR,void 0,eI);return}tz(eI?[e$]:[],eR,void 0,eI)})(eL.value,!0===eR.checked,eI),tL(),tR()},onReset:e$=>{tz(e4,e$,void 0,!1),tL(),tR(),eX&&eX(e$)},className:rg("radio"===e2?"filter":"flex flex-wrap gap-1",eI),"data-rue-filter-group":"true","data-rue-filter-mode":e$,"data-rue-filter-type":e2,children:tB})},yg=({label:e$,children:eI,checked:eR,defaultChecked:eL,disabled:ez,className:eW,color:eH,size:eF,variant:eP,active:eB,name:eK,type:eV,onChange:eq,...eU})=>{let eG=(0,e.useRef)(),eZ=eV??"radio",eY=!!ez,eX=hg({value:eU.value,label:e$??eU["aria-label"],children:eI}),eJ=mg(e$??eU["aria-label"],eI),eQ=pg({color:eH,size:eF,variant:eP,active:eB,className:eW}),e0={...eU};void 0!==eJ&&void 0===e0["aria-label"]&&cg(eJ)&&(e0["aria-label"]=String(eJ)),void 0!==eX&&void 0===e0.value&&(e0.value=String(eX));let e1=ig({"data-rue-filter-role":"item","data-rue-filter-name":eK,"data-rue-filter-type":eV,"data-rue-filter-size":eF,"data-rue-filter-color":eH,"data-rue-filter-variant":eP,"data-rue-filter-class-name":eW,"data-rue-filter-active":eB?"true":"false","data-rue-filter-disabled":eY?"true":"false","data-rue-filter-value":void 0===eX?void 0:og(eX)}),e2=ig({...e0,name:eK,type:eZ,checked:eR,defaultChecked:eL,className:eQ,disabled:eY,...e1});return(0,e.onMounted)(()=>{eG.current&&(eG.current.className=eQ,eG.current.disabled=eY,eK&&(eG.current.name=eK),eG.current.type=eZ)}),r("input",{...e2,ref:eG,onChange:e$=>{let eI=e$.target?.checked===!0;eq&&eq(e$,{checked:eI,value:eX,item:{...eU,label:eJ,value:eX,checked:eR,defaultChecked:eL,disabled:eY,className:eW,color:eH,size:eF,variant:eP,active:eB,name:eK,type:eZ}})}})},bg=({mode:e$,label:eI,checked:eR,defaultChecked:eL,disabled:ez,className:eW,color:eH,size:eF,variant:eP,onChange:eB,...eK})=>{let eV=(0,e.useRef)(),eq=e$??"div",eU=!!ez,eG=mg(eI??eK["aria-label"]??eK.value,"\xd7"),eZ=pg({color:eH,size:eF,variant:eP,className:eW}),eY={...eK};"form"===eq?(eZ+=" btn-square",void 0===eY.value&&cg(eG)&&(eY.value=String(eG))):(eZ+=" filter-reset",void 0===eY["aria-label"]&&cg(eG)&&(eY["aria-label"]=String(eG))),(0,e.onMounted)(()=>{eV.current&&(eV.current.className=eZ,eV.current.disabled=eU,eV.current.type=eY.type??("form"===eq?"reset":"radio"))});let eX=ig({"data-rue-filter-role":"reset","data-rue-filter-mode":eq,"data-rue-filter-name":eY.name,"data-rue-filter-size":eF,"data-rue-filter-color":eH,"data-rue-filter-variant":eP,"data-rue-filter-class-name":eW,"data-rue-filter-disabled":eU?"true":"false"});return r("input",{...ig({...eY,name:eY.name,type:eY.type??("form"===eq?"reset":"radio"),checked:eR,defaultChecked:eL,className:eZ,disabled:eU,...eX}),ref:eV,onChange:e$=>{eB&&eB(e$)}})},xg=Object.assign(vg,{Item:yg,Reset:bg}),Sg={"base-100":"bg-base-100 text-base-content","base-200":"bg-base-200 text-base-content","base-300":"bg-base-300 text-base-content",neutral:"bg-neutral text-neutral-content",primary:"bg-primary text-primary-content",secondary:"bg-secondary text-secondary-content",accent:"bg-accent text-accent-content",info:"bg-info text-info-content",success:"bg-success text-success-content",warning:"bg-warning text-warning-content",error:"bg-error text-error-content"},Cg={sm:"min-h-80",md:"min-h-96",lg:"min-h-[30rem]",xl:"min-h-[36rem]",screen:"min-h-screen"},wg={center:"text-center",split:"flex-col gap-10 lg:flex-row","split-reverse":"flex-col gap-10 lg:flex-row-reverse"},Tg={start:"items-start",center:"items-center",end:"items-end"},Eg={start:"text-left",center:"text-center",end:"text-right"},Dg={sm:"gap-4",md:"gap-6",lg:"gap-10",xl:"gap-14"},Og={"base-content":"bg-base-content",neutral:"bg-neutral",primary:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"},kg={sm:"text-3xl md:text-4xl",md:"text-4xl md:text-5xl",lg:"text-5xl md:text-6xl",xl:"text-6xl md:text-7xl"},Ag={sm:"text-sm md:text-base",md:"text-base md:text-lg",lg:"text-lg md:text-xl"},jg=(...e$)=>e$.filter(Boolean).join(" "),Mg=(e$,eI)=>{if(!(!e$&&!eI))return{...e$,...eI}},Ng=e$=>{if(e$)return!0===e$?{}:e$},Pg=e$=>{if(null!=e$){if("number"==typeof e$)return{opacity:e$};switch(e$){case"soft":return{opacity:.25};case"strong":return{opacity:.7};default:return{opacity:.45}}}},Fg=({backgroundImage:e$,backgroundPosition:eI,backgroundSize:eR,backgroundRepeat:eL})=>{if(e$)return{backgroundImage:`url(${e$})`,backgroundPosition:eI??"center",backgroundSize:eR??"cover",backgroundRepeat:eL??"no-repeat"}},Ig=(e$,eI,eR)=>{if(e$){if(eR)switch(e$){case"center":return"items-center sm:justify-center";case"end":return"items-end sm:justify-end";default:return"items-start sm:justify-start"}if("column"===eI)switch(e$){case"center":return"items-center";case"end":return"items-end";default:return"items-start"}switch(e$){case"center":return"justify-center";case"end":return"justify-end";default:return"justify-start"}}},Lg=({as:e$="div",className:eI,children:eR,style:eL,tone:ez="default",size:eW,fullHeight:eH,backgroundImage:eF,backgroundPosition:eP,backgroundSize:eB,backgroundRepeat:eK,overlay:eV,...eq})=>{let eU=Fg({backgroundImage:eF,backgroundPosition:eP,backgroundSize:eB,backgroundRepeat:eK}),eG=Ng(eV);return i(e$,{...eq,style:Mg(eL,eU),className:jg("hero","default"===ez?void 0:Sg[ez],eH?Cg.screen:eW?Cg[eW]:void 0,eI),children:[eG?r(zg,{...eG}):null,eR]})},Rg=({as:e$="div",className:eI,children:eR,layout:eL="inherit",align:ez,textAlign:eW,gap:eH,...eF})=>r(e$,{...eF,className:jg("hero-content","inherit"===eL?void 0:wg[eL],ez?Tg[ez]:void 0,eW?Eg[eW]:void 0,eH?Dg[eH]:void 0,eI),children:eR}),zg=({as:e$="div",className:eI,children:eR,tone:eL="default",opacity:ez,blur:eW,style:eH,...eF})=>r(e$,{...eF,style:Mg(eH,Pg(ez)),className:jg("hero-overlay","default"===eL?void 0:Og[eL],eW?"backdrop-blur-sm":void 0,eI),children:eR}),Bg=Object.assign(Lg,{Content:Rg,Overlay:zg,Title:({as:e$="h1",className:eI,children:eR,size:eL="lg",balanced:ez=!0,...eW})=>r(e$,{...eW,className:jg("font-bold tracking-tight",kg[eL],ez?"text-balance":void 0,eI),children:eR}),Description:({as:e$="p",className:eI,children:eR,size:eL="md",muted:ez=!0,...eW})=>r(e$,{...eW,className:jg("max-w-2xl leading-relaxed",Ag[eL],ez?"opacity-80":void 0,eI),children:eR}),Actions:({as:e$="div",className:eI,children:eR,align:eL,direction:ez="row",stackOnMobile:eW=!1,...eH})=>r(e$,{...eH,className:jg("flex gap-3",eW?"flex-col sm:flex-row sm:flex-wrap":"column"===ez?"flex-col":"flex-row flex-wrap",Ig(eL,ez,eW),eI),children:eR})}),Vg={start:{horizontal:"start"},center:{horizontal:"center"},end:{horizontal:"end"},top:{vertical:"top"},middle:{vertical:"middle"},bottom:{vertical:"bottom"},"top-start":{horizontal:"start",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-end":{horizontal:"end",vertical:"top"},"middle-start":{horizontal:"start",vertical:"middle"},"middle-center":{horizontal:"center",vertical:"middle"},"middle-end":{horizontal:"end",vertical:"middle"},"bottom-start":{horizontal:"start",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"bottom-end":{horizontal:"end",vertical:"bottom"}},Hg=(e$,eI)=>eI?`${e$} ${eI}`:e$,Ug=e$=>"number"==typeof e$?`${Math.abs(e$)}px`:String(e$).trim().replace(/^-/,""),Wg=e$=>"number"==typeof e$?e$<0:String(e$).trim().startsWith("-"),Gg=(e$,eI,eR=!1)=>`calc(${e$} ${(eR?!Wg(eI):Wg(eI))?"-":"+"} ${Ug(eI)})`,Kg=e$=>e$?Vg[e$]:{},qg=(e$,eI,eR,eL)=>{if(!e$)return;let ez={"--indicator-s":void 0,"--indicator-e":void 0,"--indicator-t":void 0,"--indicator-b":void 0};if(eL){let[e$,eW]=eL;"start"===eI?(ez["--indicator-s"]=Gg("0px",e$),ez["--indicator-e"]="auto"):"center"===eI?(ez["--indicator-s"]=Gg("50%",e$),ez["--indicator-e"]=Gg("50%",e$,!0)):"end"===eI&&(ez["--indicator-s"]="auto",ez["--indicator-e"]=Gg("0px",e$,!0)),"top"===eR?(ez["--indicator-t"]=Gg("0px",eW),ez["--indicator-b"]="auto"):"middle"===eR?(ez["--indicator-t"]=Gg("50%",eW),ez["--indicator-b"]=Gg("50%",eW,!0)):"bottom"===eR&&(ez["--indicator-t"]="auto",ez["--indicator-b"]=Gg("0px",eW,!0))}Object.entries(ez).forEach(([eI,eR])=>{void 0===eR?e$.style.removeProperty(eI):e$.style.setProperty(eI,eR)})},Jg=({as:e$="div",className:eI,style:eR,item:eL,itemProps:ez,items:eW,children:eH,...eF})=>{let eP=Array.isArray(eW)&&eW.length>0?eW.map((e$,eI)=>r(Yg,{...e$,children:e$.children},e$.key??eI)):null==eL?[]:[r(Yg,{...ez,children:eL},"__indicator_item__")];return i(e$,{...eF,className:Hg("indicator",eI),style:eR,children:[eP,eH]})},Yg=({as:e$="span",placement:eI,horizontal:eR,vertical:eL,offset:ez,className:eW,style:eH,children:eF,...eP})=>{let eB=Kg(eI),eK=eR??eB.horizontal,eV=eL??eB.vertical,eq=eP.ref;"ref"in eP&&delete eP.ref;let eU="indicator-item";return eK&&(eU+=` indicator-${eK}`),eV&&(eU+=` indicator-${eV}`),eW&&(eU+=` ${eW}`),r(e$,{...eP,ref:e$=>{"function"==typeof eq?eq(e$):eq&&"object"==typeof eq&&(eq.current=e$??void 0),qg(e$,eK,eV,ez)},className:eU,style:eH,children:eF})},Xg=Object.assign(Jg,{Item:Yg}),Zg=(e$,eI)=>eI?`${e$} ${eI}`:e$,Qg=e$=>null==e$?"":String(e$),$g=e$=>{switch(e$){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return e$}},e_=e$=>{switch(e$){case"warning":return"warning";case"error":return"error";default:return}},t_=e$=>{switch(e$){case"none":return"resize-none";case"vertical":return"resize-y";case"horizontal":return"resize-x";case"both":return"resize";default:return""}},n_=({color:e$,status:eI,size:eR,variant:eL,ghost:ez,className:eW,allowClear:eH})=>{let eF="textarea",eP=e$&&"default"!==e$?e$:e_(eI),eB=$g(eR);return eP&&(eF+=` textarea-${eP}`),eB&&(eF+=` textarea-${eB}`),(ez||"ghost"===eL)&&(eF+=" textarea-ghost"),"filled"===eL&&(eF+=" border-transparent bg-base-200/70 focus:bg-base-100"),eH&&(eF+=" pr-10"),eW&&(eF+=` ${eW}`),eF},r_=(e$,eI)=>e$&&"object"==typeof e$&&"function"==typeof e$.formatter?e$.formatter(eI):"number"==typeof eI.maxLength?`${eI.count} / ${eI.maxLength}`:String(eI.count),i_=e$=>null==e$?"":"string"==typeof e$?e$:String(e$),a_=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 7 10 10M17 7 7 17"})}),o_=({color:e$,size:eI,status:eR,variant:eL,resize:ez,ghost:eW,showCount:eH,allowClear:eF,autoSize:eP,rootClassName:eB,countClassName:eK,clearButtonClassName:eV,className:eq,disabled:eU,value:eG,defaultValue:eZ,onClear:eY,onInput:eX,onChange:eJ,...eQ})=>{let e0=(0,e.useRef)(),e1=null,e2=null,e5=eQ.ref,e3=void 0!==eG,e4=(0,e.ref)(Qg(e3?eG:eZ)),e6=!!eH,e8=!!eF,e7="number"==typeof eQ.maxLength?eQ.maxLength:"number"==typeof eQ.maxlength?eQ.maxlength:void 0;"ref"in eQ&&delete eQ.ref;let e9=()=>{e4.value=Qg(e3?eG:e0.current?.value??eZ)},t$=()=>{e1&&e6&&(0,e.render)(i_(r_(eH,{count:e4.value.length,maxLength:e7})),e1)},tI=()=>{e2&&e2.classList.toggle("hidden",0>=e4.value.length||!!eU)},tR=()=>{t$(),tI()},tL=()=>{let e$=e0.current;if(!e$)return;if(!eP){e$.style.height="",e$.style.overflowY="";return}let eI="object"==typeof eP?eP:void 0,eR=window.getComputedStyle(e$),eL=Number.parseFloat(eR.lineHeight),ez=Number.parseFloat(eR.fontSize),eW=Number.isFinite(eL)?eL:Number.isFinite(ez)?1.5*ez:24,eH=Number.parseFloat(eR.borderTopWidth||"0")+Number.parseFloat(eR.borderBottomWidth||"0"),eF=Number.parseFloat(eR.paddingTop||"0")+Number.parseFloat(eR.paddingBottom||"0"),eB="number"==typeof eI?.minRows&&eI.minRows>0?eI.minRows:"number"==typeof eQ.rows?eQ.rows:void 0,eK="number"==typeof eI?.maxRows&&eI.maxRows>0?Math.max(eI.maxRows,eB??1):void 0;e$.style.height="auto";let eV=e$.scrollHeight;if("number"==typeof eB&&(eV=Math.max(eV,eB*eW+eH+eF)),"number"==typeof eK){let eI=eK*eW+eH+eF;e$.style.overflowY=eV>eI?"auto":"hidden",eV=Math.min(eV,eI)}else e$.style.overflowY="hidden";e$.style.height=`${eV}px`};if((0,e.onMounted)(()=>{e9(),tL(),tR()}),(0,e.watch)(()=>eG,()=>{e3&&e0.current&&(e0.current.value=Qg(eG)),e9(),tL(),tR()},{immediate:!0}),(0,e.watch)(()=>eP,()=>{tL(),tR()},{immediate:!0}),void 0!==eQ.rows&&null!==eQ.rows&&(eQ.rows=String(eQ.rows)),eP&&(void 0===eQ.rows||null===eQ.rows)){let e$="object"==typeof eP&&"number"==typeof eP.minRows?eP.minRows:void 0;e$&&(eQ.rows=String(e$))}let tz={};void 0!==eG&&(tz.value=eG),void 0!==eZ&&(tz.defaultValue=eZ);let tW=r("textarea",{...eQ,...tz,ref:e$=>{(e0.current=e$??void 0,"function"==typeof e5)?e5(e$):e5&&"object"==typeof e5&&(e5.current=e$??void 0)},disabled:eU,"aria-invalid":"error"===eR?"true":eQ["aria-invalid"],"data-rue-textarea-input":"true",className:Zg(n_({color:e$,status:eR,size:eI,variant:eL,ghost:eW,className:eq,allowClear:e8}),t_(ez)),onInput:e$=>{e4.value=e$.target?.value??"",tL(),tR(),eX&&eX(e$)},onChange:e$=>{e4.value=e$.target?.value??"",tL(),tR(),eJ&&eJ(e$)}});if(!e8&&!e6&&!eB)return tW;let tH=i("div",{className:Zg("relative",e8?"w-full":void 0),children:[tW,e8&&!eU?r("button",{ref:e$=>{e2=e$,tI()},type:"button",tabIndex:-1,"aria-label":"Clear text",className:Zg(Zg("btn btn-ghost btn-xs absolute right-2 top-2 h-7 min-h-0 w-7 rounded-full p-0 text-base-content/55 hover:text-base-content",e4.value.length>0?void 0:"hidden"),eV),onClick:e$=>{let eI=e0.current;!eI||eU||("function"==typeof e$.preventDefault&&e$.preventDefault(),"function"==typeof e$.stopPropagation&&e$.stopPropagation(),eI.value="",e4.value="",tL(),tR(),eI.focus(),eI.dispatchEvent(new Event("input",{bubbles:!0})),eI.dispatchEvent(new Event("change",{bubbles:!0})),eY&&eY(e$))},children:(eF&&"object"==typeof eF?eF:void 0)?.clearIcon??r(a_,{})}):null]});return i("div",{className:Zg("flex flex-col gap-2",eB),"data-rue-textarea-root":"true",children:[tH,e6?r("div",{ref:e$=>{e1=e$,t$()},className:Zg("flex justify-end text-xs leading-5 text-base-content/60",eK),"data-rue-textarea-count":"true"}):null]})},s_=(...e$)=>e$.filter(Boolean).join(" "),c_=e$=>null==e$?"":String(e$),l_=e$=>{switch(e$){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return e$}},u_=e$=>{switch(e$){case"warning":return"warning";case"error":return"error";default:return}},d_=(e$,eI)=>{switch(eI?"ghost":e$){case"filled":return"border-transparent bg-base-200/70 shadow-none focus-within:bg-base-100";case"borderless":return"input-ghost bg-transparent border-transparent shadow-none";case"ghost":return"input-ghost";default:return}},f_=({color:e$,status:eI,size:eR,variant:eL,ghost:ez,className:eW,shell:eH})=>{let eF="input",eP=e$&&"default"!==e$?e$:u_(eI),eB=l_(eR),eK=d_(eL,ez);return eP&&(eF+=` input-${eP}`),eB&&(eF+=` input-${eB}`),eK&&(eF+=` ${eK}`),eH&&(eF+=" flex items-center gap-2"),eW&&(eF+=` ${eW}`),eF},p_=(e$,eI)=>e$&&"object"==typeof e$&&"function"==typeof e$.formatter?e$.formatter(eI):"number"==typeof eI.maxLength?`${eI.count} / ${eI.maxLength}`:String(eI.count),m_=e$=>null==e$?"":"string"==typeof e$?e$:String(e$),h_=e$=>"number"==typeof e$.maxLength?e$.maxLength:"number"==typeof e$.maxlength?e$.maxlength:void 0,g_=({children:e$,className:eI})=>r("span",{className:s_("join-item inline-flex items-center border border-base-300 bg-base-200 px-3 text-sm text-base-content/65",eI),children:e$}),__=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 7 10 10M17 7 7 17"})}),v_=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"size-4","aria-hidden":"true",children:[r("circle",{cx:"11",cy:"11",r:"7"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20 20-3.5-3.5"})]}),y_=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z"}),r("circle",{cx:"12",cy:"12",r:"3"})]}),b_=()=>i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3 3 18 18"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.6 5.3A10.2 10.2 0 0 1 12 5.2c6 0 9.5 6 9.5 6a18.2 18.2 0 0 1-3.1 3.9"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.7 6.8C4.1 8.4 2.5 11.2 2.5 11.2s3.5 6 9.5 6c1.8 0 3.4-.5 4.8-1.2"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.9 9.8A3 3 0 0 0 14.2 14"})]}),x_=({color:e$,size:eI,status:eR,variant:eL,ghost:ez,type:eW="text",prefix:eH,suffix:eF,addonBefore:eP,addonAfter:eB,addonBeforeBare:eK,addonAfterBare:eV,showCount:eq,allowClear:eU,rootClassName:eG,inputClassName:eZ,countClassName:eY,clearButtonClassName:eX,className:eJ,disabled:eQ,readOnly:e0,value:e1,defaultValue:e2,onClear:e5,onInput:e3,onChange:e4,onKeyDown:e6,onPressEnter:e8,...e7})=>{let e9=(0,e.useRef)(),t$=null,tI=null,tR=e7.ref,tL=void 0!==e1,tz=!!eq,tW=!!eU,tH=void 0!==eH||void 0!==eF||tW,tF=void 0!==eP||void 0!==eB,tP=(0,e.ref)(c_(tL?e1:e2));"ref"in e7&&delete e7.ref;let tB=()=>{tP.value=c_(tL?e1:e9.current?.value??e2)},tK=()=>{t$&&tz&&(t$.textContent=m_(p_(eq,{value:tP.value,count:tP.value.length,maxLength:h_(e7)})))},tV=()=>{tI&&tI.classList.toggle("hidden",tP.value.length<=0||!!eQ||!!e0)},tq=()=>{tK(),tV()},tU=e$=>{(e9.current=e$??void 0,"function"==typeof tR)?tR(e$):tR&&"object"==typeof tR&&(tR.current=e$??void 0)},tG=e$=>{tP.value=e$.target?.value??"",tq(),e3&&e3(e$)},tZ=e$=>{tP.value=e$.target?.value??"",tq(),e4&&e4(e$)},tY=e$=>{e6&&e6(e$),"Enter"===e$.key&&e8&&e8(e$)};(0,e.onMounted)(()=>{tL||void 0===e2||!e9.current||""===e9.current.value&&(e9.current.value=c_(e2)),tB(),tq()}),(0,e.watch)(()=>e1,()=>{tL&&e9.current&&(e9.current.value=c_(e1)),tB(),tq()},{immediate:!0});let tX={};void 0!==e1&&(tX.value=e1),void 0!==e2&&(tX.defaultValue=e2);let tJ={};void 0!==e0&&(tJ.readOnly=e0);let tQ="error"===eR?"true":e7["aria-invalid"];"aria-invalid"in e7&&delete e7["aria-invalid"];let t0={};null!=tQ&&(t0["aria-invalid"]=tQ);let t1=r("input",{...e7,...tX,...tJ,...t0,ref:tU,type:eW,disabled:eQ,className:f_({color:e$,status:eR,size:eI,variant:eL,ghost:ez,className:s_(eJ,tF?"join-item min-w-0 flex-1":void 0)}),onInput:tG,onChange:tZ,onKeyDown:tY}),t2=(tH?i("label",{className:f_({color:e$,status:eR,size:eI,variant:eL,ghost:ez,shell:!0,className:s_(eJ,tF?"join-item min-w-0 flex-1":void 0)}),"aria-disabled":eQ?"true":void 0,"data-rue-input-shell":"true",children:[void 0===eH?null:r("span",{className:"shrink-0 text-sm text-base-content/60",children:eH}),r("input",{...e7,...tX,...tJ,...t0,ref:tU,type:eW,disabled:eQ,className:s_("min-w-0 grow border-0 bg-transparent p-0 text-inherit outline-none placeholder:text-base-content/40",eZ),onInput:tG,onChange:tZ,onKeyDown:tY}),!tW||eQ||e0?null:r("button",{ref:e$=>{tI=e$,tV()},type:"button",tabIndex:-1,"aria-label":"Clear text",className:s_("btn btn-ghost btn-xs btn-circle h-7 min-h-0 w-7 shrink-0 p-0 text-base-content/55 hover:text-base-content",tP.value.length>0?void 0:"hidden",eX),onClick:e$=>{let eI=e9.current;!eI||eQ||e0||("function"==typeof e$.preventDefault&&e$.preventDefault(),"function"==typeof e$.stopPropagation&&e$.stopPropagation(),eI.value="",tP.value="",tq(),eI.focus(),eI.dispatchEvent(new Event("input",{bubbles:!0})),eI.dispatchEvent(new Event("change",{bubbles:!0})),e5&&e5(e$))},children:(eU&&"object"==typeof eU?eU:void 0)?.clearIcon??r(__,{})}),void 0===eF?null:r("span",{className:"shrink-0 text-sm text-base-content/60",children:eF})]}):null)??t1,t5=tF?i("div",{className:"join w-full items-stretch",children:[void 0===eP?null:eK?eP:r(g_,{children:eP}),t2,void 0===eB?null:eV?eB:r(g_,{children:eB})]}):t2;return tz||eG?i("div",{className:s_(tz?"flex flex-col gap-2":void 0,eG),"data-rue-input-root":"true",children:[t5,tz?r("div",{ref:e$=>{t$=e$,tK()},className:s_("flex justify-end text-xs leading-5 text-base-content/60",eY),"data-rue-input-count":"true",children:m_(p_(eq,{value:tP.value,count:tP.value.length,maxLength:h_(e7)}))}):null]}):t5},S_=Object.assign(x_,{Shell:({as:e$="label",color:eI,status:eR,size:eL,variant:ez,ghost:eW,className:eH,children:eF,...eP})=>r(e$,{...eP,className:f_({color:eI,status:eR,size:eL,variant:ez,ghost:eW,shell:!0,className:eH}),children:eF}),Search:({enterButton:e$,loading:eI,buttonClassName:eR,onSearch:eL,onPressEnter:ez,onClear:eW,suffix:eH,addonAfter:eF,disabled:eP,...eB})=>{let eK=(0,e.useRef)(),eV=!0===e$?"搜索":e$??eF,eq=(e$,eR)=>{eP||eI||eL&&eL(eK.current?.value??"",e$,{source:eR})},eU=r("button",{type:"button","aria-label":"Search",className:s_("btn btn-ghost join-item",eR),onClick:e$=>eq(e$,"input"),disabled:eP||eI,children:eI?r("span",{className:"loading loading-spinner loading-xs","aria-hidden":"true"}):r(v_,{})}),eG=void 0===eV?null:r("button",{type:"button",className:s_("btn btn-primary join-item",eR),onClick:e$=>eq(e$,"input"),disabled:eP||eI,"aria-busy":eI?"true":void 0,children:eI?r("span",{className:"loading loading-spinner loading-sm","aria-hidden":"true"}):eV});return r(x_,{...eB,ref:eK,type:"text",disabled:eP,suffix:eH,addonAfter:void 0===eV?eU:eG,addonAfterBare:!0,onClear:e$=>{eW&&eW(e$),eL&&eL("",e$,{source:"clear"})},onPressEnter:e$=>{ez&&ez(e$),eq(e$,"input")}})},Password:({iconRender:e$,visibilityToggle:eI=!0,suffix:eR,...eL})=>{let ez=(0,e.useRef)(),eW=(0,e.ref)(!1),eH=eI&&"object"==typeof eI?eI:void 0,eF=eH?.visible!==void 0,eP=eF?!!eH?.visible:eW.value,eB=!1!==eI?r("button",{type:"button","aria-label":eP?"Hide password":"Show password",className:"btn btn-ghost btn-xs btn-circle h-7 min-h-0 w-7 shrink-0 p-0",onClick:e$=>{var eI;"function"==typeof e$.preventDefault&&e$.preventDefault(),eI=!eP,ez.current&&(ez.current.type=eI?"text":"password"),eF||(eW.value=eI),eH?.onVisibleChange&&eH.onVisibleChange(eI)},children:e$?e$(eP):r(eP?b_:y_,{})}):null,eK=eB?i("span",{className:"inline-flex items-center gap-1",children:[eR,eB]}):eR;return r(x_,{...eL,ref:ez,type:eP?"text":"password",suffix:eK})},TextArea:o_}),C_=(...e$)=>e$.filter(Boolean).join(" "),w_=e$=>{switch(e$){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return e$}},T_=e$=>{switch(w_(e$)){case"xs":return{buttonClassName:"btn-xs w-3.5 rounded-[4px] px-0 text-[10px]",iconClassName:"size-2",groupClassName:"gap-0",suffixClassName:"gap-1"};case"sm":return{buttonClassName:"btn-xs w-4.5 rounded",iconClassName:"size-2.5",groupClassName:"gap-px",suffixClassName:"gap-1.5"};case"lg":return{buttonClassName:"btn-sm w-7 rounded-md",iconClassName:"size-3",groupClassName:"gap-px",suffixClassName:"gap-2"};case"xl":return{buttonClassName:"btn-sm w-8 rounded-lg",iconClassName:"size-3",groupClassName:"gap-px",suffixClassName:"gap-2"};default:return{buttonClassName:"btn-xs w-6 rounded-md",iconClassName:"size-3",groupClassName:"gap-px",suffixClassName:"gap-2"}}},E_=e$=>{let eI=Number(e$);return Number.isFinite(eI)?eI:void 0},D_=e$=>Object.is(e$,-0)?0:e$,O_=(e$,eI)=>{if("number"!=typeof eI||eI<0)return D_(e$);let eR=10**eI;return D_(Math.round(e$*eR)/eR)},k_=e$=>{if(null==e$)return 0;let eI=String(e$).toLowerCase();if(eI.includes("e-")){let[e$,eR]=eI.split("e-"),eL=Number(eR);return(e$.includes(".")?e$.length-e$.indexOf(".")-1:0)+eL}return eI.includes(".")?eI.length-eI.indexOf(".")-1:0},A_=(e$,eI)=>{let eR=E_(e$)??-(0x20000000000000-1),eL=E_(eI)??0x20000000000000-1;return eL<eR?{min:eL,max:eR}:{min:eR,max:eL}},j_=e$=>{let eI=E_(e$)??1;return eI>0?eI:1},M_=(e$,eI,eR)=>e$<eI?eI:e$>eR?eR:e$,N_=(e$,eI)=>eI&&"."!==eI?e$.replace(".",eI):e$,P_=(e$,eI)=>{let eR=","===eI?",":".",eL=("function"==typeof e$.normalize?e$.normalize("NFKC"):e$).trim();if(!eL)return"";let ez="",eW=eL;eW.startsWith("-")&&(ez="-",eW=eW.slice(1)),eW=eW.replace(/-/g,"");let eH=(eW=(eW=","===eR?eW.replace(/\./g,""):eW.replace(/,/g,"")).replace(","===eR?/[^0-9,]/g:/[^0-9.]/g,"")).split(eR),eF=eH.shift()??"",eP=eH.join(""),eB=eW.includes(eR);return`${ez}${eF}${eB?`.${eP}`:""}`},F_=e$=>"-"===e$||"."===e$||"-."===e$,I_=(e$,eI,eR)=>{if(null==e$||""===e$)return null;if("number"==typeof e$)return Number.isFinite(e$)?eI?String(D_(e$)):D_(e$):null;let eL=P_(String(e$),eR);if(!eL||F_(eL))return null;let ez=E_(eL);return void 0===ez?null:eI?eL:D_(ez)},L_=(e$,eI,eR,eL)=>{let ez=O_(e$,eR);return eI?"number"==typeof eR&&eR>=0?ez.toFixed(eR):eL&&!F_(eL)&&void 0!==E_(eL)?eL:String(ez):ez},R_=(e$,eI,eR)=>{let eL;if(null==e$)return"";if("string"==typeof e$)if("number"==typeof eI&&eI>=0){let eR=E_(e$);eL=void 0===eR?e$:O_(eR,eI).toFixed(eI)}else eL=e$;else{let eR=O_(e$,eI);eL="number"==typeof eI&&eI>=0?eR.toFixed(eI):String(eR)}return N_(eL,eR)},z_=(e$,eI,eR)=>{let eL=eI?eI(e$):e$;if(null==eL||""===eL)return{display:"",normalized:"",empty:!0,transient:!1};if("number"==typeof eL){if(!Number.isFinite(eL))return{display:"",normalized:"",empty:!0,transient:!1};let e$=String(D_(eL));return{display:N_(e$,eR),normalized:e$,numeric:D_(eL),empty:!1,transient:!1}}let ez=P_(String(eL),eR);if(!ez)return{display:"",normalized:"",empty:!0,transient:!1};if(F_(ez))return{display:N_(ez,eR),normalized:ez,empty:!1,transient:!0};let eW=E_(ez);return{display:N_(ez,eR),normalized:ez,numeric:void 0===eW?void 0:D_(eW),empty:!1,transient:!1}},B_=(e$,eI,eR,eL)=>{if("function"!=typeof e$)return eR;let ez=e$(eI,{userTyping:eL,input:eR});return null==ez?eR:String(ez)},V_=(e$,eI,eR,eL)=>{let ez=10**Math.max(k_(e$),k_(eR),eL??0);return O_((Math.round(e$*ez)+Math.round(eR*ez)*eI)/ez,eL)},H_=(e$,eI,eR)=>{let eL=null==e$?void 0:E_(e$);return void 0===eL?eI>0?eI:eR<0?eR:0:eL},U_=({className:e$})=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:e$??"size-3","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 14 5-5 5 5"})}),W_=({className:e$})=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:e$??"size-3","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 10 5 5 5-5"})}),G_=({value:e$,defaultValue:eI,min:eR,max:eL,step:ez=1,precision:eW,stringMode:eH=!1,keyboard:eF=!0,changeOnWheel:eP,changeOnBlur:eB=!0,controls:eK=!0,decimalSeparator:eV,formatter:eq,parser:eU,readOnly:eG,disabled:eZ,size:eY,suffix:eX,onChange:eJ,onStep:eQ,onInput:e0,onKeyDown:e1,onPressEnter:e2,onBlur:e5,onFocus:e3,onWheel:e4,onCompositionStart:e6,onCompositionEnd:e8,...e7})=>{let e9=(0,e.useRef)(),t$=e7.ref,tI=(0,e.ref)(""),tR=(0,e.ref)(!1),tL=(0,e.ref)(!1),tz=void 0!==e$,tW=A_(eR,eL),tH=j_(ez),tF=(0,e.ref)(I_(e$,eH,eV)),tP=(0,e.ref)(I_(tz?e$:eI,eH,eV)),tB=(0,e.ref)(""),tK=(0,e.ref)(void 0),tV=(0,e.ref)(void 0),tq=(0,e.ref)(!1);"ref"in e7&&delete e7.ref;let tU=()=>tz?tF.value:tP.value,tG=()=>{let e$=tU(),eI=null==e$?void 0:E_(e$),eR=(()=>{let e$=tU();if(tR.value){let eI=z_(tI.value,eU,eV);return B_(eq,void 0===eI.numeric?e$:L_(eI.numeric,eH,void 0,eI.normalized),tI.value,!0)}return B_(eq,e$,R_(e$,eW,eV),!1)})();tB.value=eR,tK.value=null==eI?void 0:String(eI),tV.value=eR||void 0},tZ=(e$=!1)=>{let eI=e9.current;if(!eI)return;let eR=eI.value!==tB.value;eR&&(eI.value=tB.value),void 0===tK.value?eI.removeAttribute("aria-valuenow"):eI.setAttribute("aria-valuenow",tK.value),void 0===tV.value?eI.removeAttribute("aria-valuetext"):eI.setAttribute("aria-valuetext",tV.value),e$&&eR&&(tq.value=!0,eI.dispatchEvent(new Event("input",{bubbles:!0})))},tY=e$=>{tz||(tP.value=e$)},tX=e$=>{eJ&&eJ(e$)},tJ=e$=>{tR.value=!0,tI.value=e$,tB.value=e$,tK.value=void 0,tV.value=e$||void 0},tQ=e$=>{let eI=z_(e$,eU,eV);if(tR.value=!0,tI.value=eI.display,eI.empty)tY(null),tX(null);else if(void 0!==eI.numeric){let e$=L_(eI.numeric,eH,void 0,eI.normalized);tY(e$),tX(e$)}tG(),tZ(!1)},t0=(e$,eI)=>{if(eZ||eG)return;let eR=z_(e9.current?.value??tI.value,eU,eV),eL=tU(),ez=L_(M_(V_(eR.numeric??H_(eL,tW.min,tW.max),"up"===e$?1:-1,tH,eW),tW.min,tW.max),eH,eW);tR.value=!1,tI.value=R_(ez,eW,eV),tY(ez),ez!==eL&&tX(ez),tG(),tZ(!0),eQ?.(ez,{offset:"up"===e$?tH:-tH,type:e$,emitter:eI}),e9.current?.focus()};(0,e.watch)(()=>e$,e$=>{tz&&(tF.value=I_(e$,eH,eV),tR.value=!1,tG(),tZ(!0))},{immediate:!0}),tG(),(0,e.onMounted)(()=>{tZ(!1)});let t1=eK&&"object"==typeof eK?eK:void 0,t2=!1!==eK&&!eZ&&!eG,t5=T_(eY),t3=t2?i("span",{className:C_("inline-flex shrink-0 self-stretch flex-col",t5.groupClassName),"data-rue-input-number-controls":"true",children:[r("button",{type:"button","aria-label":"Increase value",className:C_("btn btn-ghost flex-1 min-h-0 border border-base-300/65 bg-base-100/75 p-0 text-base-content/70 hover:border-base-300 hover:bg-base-100 hover:text-base-content",t5.buttonClassName),onMouseDown:e$=>{"function"==typeof e$.preventDefault&&e$.preventDefault()},onClick:()=>t0("up","handler"),children:t1?.upIcon??r(U_,{className:t5.iconClassName})}),r("button",{type:"button","aria-label":"Decrease value",className:C_("btn btn-ghost flex-1 min-h-0 border border-base-300/65 bg-base-100/75 p-0 text-base-content/70 hover:border-base-300 hover:bg-base-100 hover:text-base-content",t5.buttonClassName),onMouseDown:e$=>{"function"==typeof e$.preventDefault&&e$.preventDefault()},onClick:()=>t0("down","handler"),children:t1?.downIcon??r(W_,{className:t5.iconClassName})})]}):null,t4=void 0!==eX||t3?i("span",{className:C_("inline-flex items-center",t5.suffixClassName),children:[eX,t3]}):void 0;return r(S_,{...e7,ref:e$=>{(e9.current=e$??void 0,"function"==typeof t$)?t$(e$):t$&&"object"==typeof t$&&(t$.current=e$??void 0)},type:"text",inputMode:e7.inputMode??(k_(tH)>0||void 0!==eW?"decimal":"numeric"),disabled:eZ,readOnly:eG,size:eY,suffix:t4,role:"spinbutton","aria-valuemin":String(tW.min),"aria-valuemax":String(tW.max),value:tB.value,"aria-valuenow":tK.value,"aria-valuetext":tV.value,onInput:e$=>{if(tq.value){tq.value=!1;return}let eI=e$.target?.value??"";if(tL.value||e$.isComposing){tJ(eI),e0?.(e$);return}tQ(eI),e0?.(e$)},onKeyDown:e$=>{if(e1?.(e$),!(e$.defaultPrevented||!eF)){if("ArrowUp"===e$.key){e$.preventDefault?.(),t0("up","keydown");return}"ArrowDown"===e$.key&&(e$.preventDefault?.(),t0("down","keydown"))}},onPressEnter:e2,onFocus:e$=>{tG(),tZ(!1),e3?.(e$)},onCompositionStart:e$=>{tL.value=!0,tJ(e$.target?.value??tI.value),e6?.(e$)},onCompositionEnd:e$=>{tL.value=!1,tQ(e$.target?.value??tI.value),e8?.(e$)},onBlur:e$=>{let eI=e$.target,eR=z_(eI?.value??tI.value,eU,eV);tL.value=!1,tR.value=!1,tI.value=eR.display,((e$,eI)=>{if(e$.empty)return tY(null),tX(null),tG(),tZ(!0);if(void 0===e$.numeric)return tG(),tZ(!0),tU();let eR=e$.numeric;eR=O_(eR,eW),eI&&(eR=O_(eR=M_(eR,tW.min,tW.max),eW));let eL=L_(eR,eH,eW,e$.normalized),ez=tU();return tY(eL),eL!==ez&&tX(eL),tG(),tZ(!0)})(eR,eB),tG(),tZ(!0),e5?.(e$)},onWheel:e$=>{e4?.(e$),e$.defaultPrevented||!eP||eZ||eG||document.activeElement!==e9.current||0===e$.deltaY||(e$.preventDefault?.(),t0(e$.deltaY<0?"up":"down","wheel"))}})},K_={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",small:"sm",middle:"md",medium:"md",large:"lg"},q_=(...e$)=>e$.filter(Boolean).join(" "),J_=e$=>null!=e$&&!1!==e$,Y_=e$=>e$?K_[e$]:void 0,X_=e$=>{switch(e$){case"success":case"warning":case"error":return e$;default:return}},Z_=e$=>"none"===e$?"label":e$,Q_=(e$,eI,eR)=>{switch(eR?"ghost":eI){case"filled":return"bg-base-200/70 border-base-300 shadow-none focus-within:bg-base-100";case"ghost":return`${e$}-ghost`;case"borderless":return`${e$}-ghost bg-transparent border-transparent shadow-none`;default:return}},$_=({control:e$="input",color:eI,status:eR,size:eL,variant:ez,ghost:eW,disabled:eH,block:eF,className:eP})=>{let eB=Z_(e$),eK=Y_(eL),eV=eI&&"default"!==eI?eI:X_(eR),eq="none"===e$?void 0:Q_(eB,ez,eW),eU=eB;return"none"!==e$&&eV&&(eU+=` ${eB}-${eV}`),"none"!==e$&&eK&&(eU+=` ${eB}-${eK}`),eq&&(eU+=` ${eq}`),eH&&(eU+=" opacity-60 cursor-not-allowed"),eF&&(eU+=" w-full"),eP&&(eU+=` ${eP}`),eU},ev=(e$,eI)=>{if(eI||"muted"===e$)return"opacity-60";switch(e$){case"neutral":return"text-neutral";case"primary":return"text-primary";case"secondary":return"text-secondary";case"accent":return"text-accent";case"info":return"text-info";case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return}},tv=(e$,eI,eR)=>q_("inline"===e$?"grid gap-2 sm:grid-cols-[var(--label-inline-width, minmax(8rem,12rem))_1fr]":"grid gap-1",eI&&"w-full",eR),nv=e$=>{switch(e$){case"center":return"sm:items-center";case"end":return"sm:items-end";default:return"sm:items-start"}},rv=(e$,eI)=>{if("inline"===e$&&null!=eI&&""!==eI)return{"--label-inline-width":"number"==typeof eI?`${eI}px`:eI}},iv=(e$,eI)=>{let eR=X_(e$);return q_("text-xs leading-relaxed","success"===eR&&"text-success","warning"===eR&&"text-warning","error"===eR&&"text-error",!eR&&"opacity-70",eI)},av=()=>r("span",{className:"text-error","aria-hidden":"true",children:"*"}),ov=({tone:e$,muted:eI,strong:eR,required:eL,className:ez,children:eW,...eH})=>i("span",{...eH,className:q_("label",ev(e$,eI),eR&&"font-semibold",ez),children:[eW,eL?r(av,{}):null]}),sv=({required:e$,optional:eI,extra:eR,className:eL,textClassName:ez,extraClassName:eW,children:eH,...eF})=>i("div",{...eF,className:q_("label px-0 pb-1",eL),children:[i("span",{className:q_("inline-flex items-center gap-1 font-medium",ez),children:[eH,e$?r(av,{}):null]}),J_(eR)||J_(eI)?r("span",{className:q_("text-xs opacity-60",eW),children:J_(eR)?eR:eI}):null]}),cv=({status:e$,className:eI,children:eR,...eL})=>r("div",{...eL,className:iv(e$,eI),children:eR}),lv=({label:e$,required:eI,optional:eR,extra:eL,labelClassName:ez,extraClassName:eW})=>J_(e$)||eI||J_(eR)||J_(eL)?r(sv,{required:eI,optional:eR,extra:eL,textClassName:ez,extraClassName:eW,children:e$}):null,uv=(e$,eI)=>J_(e$)?r("div",{className:q_("text-xs leading-relaxed opacity-70",eI),children:e$}):null,dv=(e$,eI,eR,eL)=>{let ez=J_(eI)?eI:e$;return J_(ez)?r(cv,{status:J_(eI)?"error":eR,className:eL,children:ez}):null},fv=({as:e$,control:eI="input",label:eR,description:eL,help:ez,error:eW,extra:eH,optional:eF,required:eP,color:eB,status:eK,size:eV,variant:eq,ghost:eU,disabled:eG,block:eZ,layout:eY="stacked",align:eX,labelWidth:eJ,prefix:eQ,suffix:e0,rootClassName:e1,labelClassName:e2,descriptionClassName:e5,helpClassName:e3,extraClassName:e4,affixClassName:e6,className:e8,children:e7,...e9})=>{let t$=eK??(J_(eW)?"error":void 0),tI=$_({control:eI,color:eB,status:t$,size:eV,variant:eq,ghost:eU,disabled:eG,block:eZ,className:e8}),tR=J_(eR)||J_(eL)||J_(ez)||J_(eW)||J_(eH)||J_(eF)||!!e1||"inline"===eY,tL=lv({label:eR,required:eP,optional:eF,extra:eH,labelClassName:e2,extraClassName:e4}),tz=uv(eL,e5),tW=dv(ez,eW,t$,e3),tH=tv(eY,eZ,e1),tF=rv(eY,eJ),tP=i(e$??"label",{...e9,className:tI,"aria-required":eP?"true":void 0,"aria-invalid":"error"===t$?"true":void 0,"aria-disabled":eG?"true":void 0,children:[J_(eQ)?r("span",{className:q_("label",e6),children:eQ}):null,e7,J_(e0)?r("span",{className:q_("label",e6),children:e0}):null]});return tR?"inline"===eY?i("div",{className:q_(tH,nv(eX)),style:tF,children:[i("div",{children:[tL,tz]}),i("div",{className:"grid gap-1",children:[tP,tW]})]}):i("div",{className:tH,children:[tL,tz,tP,tW]}):tP},pv=({tone:e$,muted:eI,strong:eR,required:eL,className:ez,children:eW,...eH})=>i("span",{...eH,className:q_(ev(e$,eI),eR&&"font-semibold",ez),children:[eW,eL?r(av,{}):null]}),mv=Object.assign(fv,{Text:ov,Caption:sv,Help:cv,Floating:({caption:e$,text:eI,description:eR,help:eL,error:ez,extra:eW,optional:eH,required:eF,status:eP,disabled:eB,block:eK,layout:eV="stacked",align:eq,labelWidth:eU,rootClassName:eG,captionClassName:eZ,textClassName:eY,descriptionClassName:eX,helpClassName:eJ,extraClassName:eQ,className:e0,children:e1,...e2})=>{let e5=eP??(J_(ez)?"error":void 0),e3=J_(e$)||J_(eR)||J_(eL)||J_(ez)||J_(eW)||J_(eH)||!!eG||"inline"===eV,e4=lv({label:e$,required:eF,optional:eH,extra:eW,labelClassName:eZ,extraClassName:eQ}),e6=uv(eR,eX),e8=dv(eL,ez,e5,eJ),e7=tv(eV,eK,eG),e9=rv(eV,eU),t$=i("label",{...e2,className:q_("floating-label",eB&&"opacity-60 cursor-not-allowed",eK&&"w-full",e0),"aria-required":eF?"true":void 0,"aria-invalid":"error"===e5?"true":void 0,"aria-disabled":eB?"true":void 0,children:[e1,J_(eI)?r(pv,{required:eF,className:eY,children:eI}):null]});return e3?"inline"===eV?i("div",{className:q_(e7,nv(eq)),style:e9,children:[i("div",{children:[e4,e6]}),i("div",{className:"grid gap-1",children:[t$,e8]})]}):i("div",{className:e7,children:[e4,e6,t$,e8]}):t$},FloatingText:pv}),hv=["spinner","dots","ring","ball","bars","infinity"],gv="Loading",vv=(...e$)=>e$.filter(Boolean).join(" "),yv=(...e$)=>{let eI={};return e$.forEach(e$=>{e$&&Object.assign(eI,e$)}),Object.keys(eI).length>0?eI:void 0},bv=e$=>"string"==typeof e$&&hv.includes(e$),xv=(e$,eI,eR,eL)=>eI||eR||eL||(bv(e$)?e$:"spinner"),Sv=e$=>{if(!bv(e$))return e$},Cv=e$=>{switch(e$){case"small":return"sm";case"default":case"medium":case"middle":return"md";case"large":return"lg";default:return e$??"md"}},wv=e$=>Number.isFinite(e$)?Math.min(100,Math.max(0,e$)):0,Tv=(e$,eI)=>e$&&"number"==typeof eI&&eI>0&&Number.isFinite(eI),Ev=e$=>Array.isArray(e$)?e$.flatMap(e$=>Ev(e$)):null==e$||"boolean"==typeof e$?[]:[e$],Dv=(e$,eI,eR)=>{let eL=Ev(eR);switch(e$){case"span":return r("span",{...eI,children:eL});case"section":return r("section",{...eI,children:eL});case"article":return r("article",{...eI,children:eL});case"main":return r("main",{...eI,children:eL});case"div":return r("div",{...eI,children:eL});default:return(0,e.h)(e$,eI,...eL)}},Ov=(e$,eI,eR)=>vv("loading",`loading-${e$}`,`loading-${eI}`,eR),kv=(e$,eI,eR)=>r("span",{className:e$,style:eI,"aria-hidden":null==eR?void 0:"true"}),Av=({as:e$,style:eI,indicatorStyle:eR,variant:eL,type:ez,size:eW,spinning:eH=!0,delay:eF=0,indicator:eP,description:eB,tip:eK,fullscreen:eV=!1,percent:eq,rootClassName:eU,wrapperClassName:eG,classNames:eZ,styles:eY,className:eX,children:eJ,...eQ})=>{let e0=xv(eI,eR,eL,ez),e1=Cv(eW),e2=Sv(eI),e5=eB??eK,e3=Ev(eJ),e4=e3.length>0,e6=null!=e5,e8=void 0!==eq,e7=null!=eP||null!=_v,e9=e6||e8||e7,t$=e4||eV,tI=(0,e.ref)(eH),tR=(0,e.useRef)(null),tL=(0,e.useRef)(),tz=()=>{null!=tR.current&&(clearTimeout(tR.current),tR.current=null)},tW=()=>{if(tz(),!eH){tI.value=!1;return}if(tI.value=!0,Tv(eH,eF)){tR.current=setTimeout(()=>{tL.current&&tL.current.classList.remove("opacity-0")},eF);return}tL.current&&tL.current.classList.remove("opacity-0")};(0,e.onMounted)(()=>{tW()}),(0,e.onUnmounted)(()=>{tz()}),(0,e.watch)(()=>eH,tW,{immediate:!0}),(0,e.watch)(()=>eF,tW);let tH=void 0===eq||"auto"===eq?void 0:wv(eq),tF="number"==typeof tH?Math.round(tH):void 0,tP=Tv(eH,eF)?"opacity-0 transition-opacity duration-200":void 0,tB=Ov(e0,e1,vv(eZ?.indicator,eY?.indicator?"inline-flex":void 0)),tK=e7?"function"==typeof(eP??_v)?(eP??_v)({percent:tH,size:e1,style:e0,spinning:tI.value}):eP??_v:kv(tB,eY?.indicator,e6||e8),tV=e8?i("div",{className:"flex w-full min-w-24 flex-col items-center gap-1.5","data-rue-loading-percent":"true",children:[r("progress",{className:"progress progress-primary h-1 w-24",max:"100",value:tF}),r("span",{className:"text-[0.68rem] leading-none tabular-nums opacity-70",children:"auto"===eq?gv:`${tF??0}%`})]}):null,tq=vv(eV?"pointer-events-auto flex min-w-36 flex-col items-center justify-center gap-3 rounded-box border border-base-300 bg-base-100/95 p-6 text-center text-base-content shadow-2xl":t$?"pointer-events-none absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 rounded-box bg-base-100/70 text-center text-base-content backdrop-blur-[1px]":"inline-flex flex-col items-center justify-center gap-2 text-center align-middle",tP,eZ?.section),tU=vv("text-sm leading-5 opacity-80",eZ?.description),tG=vv("transition duration-200",tI.value&&"opacity-40 saturate-75",eZ?.container),tZ=vv(eV?"fixed inset-0 z-50 grid place-items-center bg-base-100/55 p-6 text-base-content backdrop-blur-sm":t$?"relative block text-base-content":"inline-flex items-center text-base-content",tI.value&&"rue-loading-spinning",eU,eG,eZ?.root,eX),tY=yv("string"==typeof e2?void 0:e2,eY?.root),tX="string"==typeof e2?e2:tY,tJ=tI.value?Dv(eV||t$?"div":"span",{ref:tL,className:tq,style:eY?.section,"data-rue-loading-section":"true"},i(e.Fragment,{children:[e7?r("span",{className:vv("inline-flex items-center justify-center",eZ?.indicator),style:eY?.indicator,children:tK}):tK,e6?r("div",{className:tU,style:eY?.description,children:e5}):null,tV]})):null;if(eV)return tI.value?r("div",{...eQ,className:tZ,style:tX,role:eQ.role??"status","aria-live":eQ["aria-live"]??"polite","aria-busy":"true",children:tJ}):null;if(e4)return Dv(e$??"div",{...eQ,className:tZ,style:tX,role:eQ.role??"status","aria-live":eQ["aria-live"]??"polite","aria-busy":tI.value?"true":"false"},i(e.Fragment,{children:[tJ,r("div",{className:tG,style:eY?.container,"data-rue-loading-container":"true",children:e3})]}));if(!tI.value)return null;if(!e9){let eI=e$??"span",eR="string"==typeof tX?tX:yv(tX,eY?.indicator);return Dv(eI,{...eQ,ref:tL,className:vv(tB,tP,eU,eZ?.root,eX),style:eR,role:eQ.role??"status","aria-live":eQ["aria-live"]??"polite","aria-busy":"true"})}return Dv(e$??"span",{...eQ,className:tZ,style:tX,role:eQ.role??"status","aria-live":eQ["aria-live"]??"polite","aria-busy":"true"},tJ)};Av.setDefaultIndicator=e$=>{_v=e$};var Nk,Pk,pA,jv=(e$,eI)=>eI?`${e$} ${eI}`:e$,Mv=e$=>Array.isArray(e$)?e$.some(e$=>Mv(e$)):null!=e$&&!1!==e$,Nv=e$=>{if(e$)return"start"===e$?"1":"end"===e$?"2":e$},Pv=e$=>{switch(e$){case"xs":return"size-12";case"sm":case"small":return"size-16";case"md":case"middle":case"medium":return"size-24";case"lg":case"large":return"size-32";case"xl":return"size-40";case"2xl":return"size-52";case"3xl":return"size-64";default:return}},Fv=e$=>{switch(e$){case"top":return"object-top";case"bottom":return"object-bottom";case"left":return"object-left";case"right":return"object-right";case"top-left":return"object-left-top";case"top-right":return"object-right-top";case"bottom-left":return"object-left-bottom";case"bottom-right":return"object-right-bottom";default:return e$?"object-center":void 0}},Iv=e$=>{switch(e$){case"contain":return"object-contain";case"fill":return"object-fill";case"none":return"object-none";case"scale-down":return"object-scale-down";default:return e$?"object-cover":void 0}},Lv=e$=>{switch(e$){case"neutral":return"bg-neutral text-neutral-content";case"primary":return"bg-primary text-primary-content";case"secondary":return"bg-secondary text-secondary-content";case"accent":return"bg-accent text-accent-content";case"info":return"bg-info text-info-content";case"success":return"bg-success text-success-content";case"warning":return"bg-warning text-warning-content";case"error":return"bg-error text-error-content";case"base":return"bg-base-200 text-base-content";default:return}},Rv=e$=>{switch(e$){case"neutral":return"ring-neutral/35";case"primary":return"ring-primary/35";case"secondary":return"ring-secondary/35";case"accent":return"ring-accent/35";case"info":return"ring-info/35";case"success":return"ring-success/35";case"warning":return"ring-warning/35";case"error":return"ring-error/35";default:return"ring-base-300"}},zv=({shape:e$,half:eI,size:eR,fit:eL,position:ez,tone:eW,bordered:eH,ring:eF,shadow:eP,interactive:eB})=>{let eK=`mask mask-${e$??"squircle"}`,eV=Nv(eI),eq=Pv(eR),eU=Iv(eL),eG=Fv(ez),eZ=Lv(eW);return eV&&(eK+=` mask-half-${eV}`),eq&&(eK+=` ${eq}`),eU&&(eK+=` ${eU}`),eG&&(eK+=` ${eG}`),eZ&&(eK+=` ${eZ}`),eH&&(eK+=" ring-1 ring-inset ring-base-300/80"),eF&&(eK+=` ring-2 ring-offset-2 ring-offset-base-100 ${Rv(eW)}`),eP&&(eK+=" shadow-xl shadow-base-content/10"),eB&&(eK+=" transition duration-200 ease-out hover:-translate-y-1 hover:shadow-2xl"),eK},Bv=({as:e$="img",shape:eI="squircle",half:eR,size:eL,fit:ez="cover",position:eW,tone:eH,bordered:eF,ring:eP,shadow:eB,interactive:eK,src:eV,alt:eq,imageProps:eU,wrapperClassName:eG,imageClassName:eZ,content:eY,contentClassName:eX,caption:eJ,captionClassName:eQ,className:e0,children:e1,...e2})=>{let e5=zv({shape:eI,half:eR,size:eL,fit:ez,position:eW,tone:eH,bordered:eF,ring:eP,shadow:eB,interactive:eK}),e3=eY??e1;if(eV&&(Mv(e3)||null!=eJ||null!=eG||null!=eZ||null!=eX||null!=eQ||"figure"===e$)){let eI="img"===e$?"figure":e$;return i(eI,{...e2,className:jv("relative inline-flex flex-col items-center gap-3",eG),children:[i("div",{className:"relative inline-flex",children:[r("img",{...eU,src:eV,alt:eq,className:jv(jv(e5,e0),eZ)}),Mv(e3)?r("div",{className:jv("absolute inset-0 grid place-items-center p-4 text-center",eX),children:e3}):null]}),null==eJ?null:r("figure"===eI?"figcaption":"div",{className:jv("text-center text-sm opacity-70",eQ),children:eJ})]})}return r(e$,{...e2,src:eV,alt:eq,className:jv(e5,e0),children:e1})},Vv=(...e$)=>e$.filter(Boolean).join(" "),Hv=(e$="default")=>{switch(e$){case"success":return"border-success/30 bg-success/10 text-success";case"warning":return"border-warning/30 bg-warning/10 text-warning";case"error":return"border-error/30 bg-error/10 text-error";default:return"border-base-300 bg-base-200/60"}},Uv=(e$="none")=>{switch(e$){case"sm":return"p-3";case"md":return"p-4";case"lg":return"p-6";default:return""}},Wv=({href:e$,prefix:eI,suffix:eR,interactive:eL,status:ez="default",className:eW,children:eH,...eF})=>{let eP=Vv("input input-sm flex h-8 w-full min-w-0 items-center gap-2 text-sm",Hv(ez),eW),eB=i(e.Fragment,{children:[null==eI?null:r("span",{className:"shrink-0 opacity-55",children:eI}),r("span",{className:"min-w-0 flex-1 truncate",children:eH??e$}),null==eR?null:r("span",{className:"shrink-0 opacity-55",children:eR})]});return(eL||e$)&&"string"==typeof e$?r("a",{...eF,href:e$,className:eP,children:eB}):r("div",{...eF,className:eP,children:eB})},Gv=({bordered:e$=!0,background:eI,padding:eR="none",className:eL,children:ez,...eW})=>r("div",{...eW,className:Vv(e$&&"border-t border-base-300",eI&&"bg-base-100",Uv(eR),eL),children:ez}),Kv=({start:e$,end:eI,className:eR,children:eL,...ez})=>i("div",{...ez,className:Vv("mockup-browser-toolbar gap-3",eR),children:[null==e$?null:r("div",{className:"flex shrink-0 items-center gap-2",children:e$}),null==eL?null:r("div",{className:"flex min-w-0 flex-1 items-center",children:eL}),null==eI?null:r("div",{className:"flex shrink-0 items-center gap-2",children:eI})]}),qv=Object.assign(({bordered:e$,background:eI,showToolbar:eR,url:eL,toolbar:ez,toolbarStart:eW,toolbarEnd:eH,toolbarClassName:eF,contentClassName:eP,contentBordered:eB,contentBackground:eK,contentPadding:eV,className:eq,children:eU,...eG})=>{let eZ=ez??(null==eL?null:r(Wv,{href:"string"==typeof eL?eL:void 0,children:eL})),eY=!1!==eR&&(null!=ez||null!=eL||null!=eW||null!=eH||null!=eF),eX=eY||null!=eP||null!=eB||null!=eK||null!=eV;return i("div",{...eG,className:Vv("mockup-browser",e$&&"border border-base-300",eI&&"bg-base-100",eq),children:[eY?r(Kv,{className:eF,start:eW,end:eH,children:eZ}):null,eX?r(Gv,{className:eP,bordered:eB,background:eK,padding:eV,children:eU}):eU]})},{Toolbar:Kv,AddressBar:Wv,Content:Gv}),Jv=(...e$)=>e$.filter(Boolean).join(" "),Yv=(e$,eI)=>eI?`${e$} ${eI}`:e$,Xv=e$=>Array.isArray(e$)?e$.some(e$=>Xv(e$)):null!=e$&&!1!==e$,Zv=(e$,eI)=>{if(!(!e$&&!eI)){if(eI)switch(e$){case"neutral":return"bg-neutral text-neutral-content";case"primary":return"bg-primary text-primary-content";case"secondary":return"bg-secondary text-secondary-content";case"accent":return"bg-accent text-accent-content";case"info":return"bg-info text-info-content";case"success":return"bg-success text-success-content";case"warning":return"bg-warning text-warning-content";case"error":return"bg-error text-error-content";default:return"bg-base-200"}switch(e$){case"neutral":return"text-neutral";case"primary":return"text-primary";case"secondary":return"text-secondary";case"accent":return"text-accent";case"info":return"text-info";case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return}}},Qv=({as:e$="pre",prefix:eI,lineNumber:eR,code:eL,children:ez,className:eW,codeClassName:eH,highlight:eF,tone:eP,...eB})=>{let eK=Xv(eI)?eI:eR;return r(e$,{...eB,"data-prefix":null==eK?void 0:String(eK),className:Jv(Zv(eP,eF),eW),children:Xv(ez)?ez:Xv(eL)?r("code",{className:eH,children:eL}):null})},$v=Object.assign(({as:e$="div",className:eI,children:eR,items:eL,prefix:ez,lineNumbers:eW,start:eH=1,codeClassName:eF,...eP})=>{let eB=eL?.map((e$,eI)=>{let eR=Xv(e$.prefix)?e$.prefix:ez;return r(Qv,{...e$,prefix:eR,lineNumber:eW?eH+eI:void 0,codeClassName:e$.codeClassName??eF},e$.key??eI)});return i(e$,{...eP,className:Yv("mockup-code",eI),children:[eB,eR]})},{Line:Qv}),ey=(e$,eI)=>eI?`${e$} ${eI}`:e$,ty=e$=>{switch(e$){case"xs":return"w-52";case"sm":case"small":return"w-60";case"md":case"medium":case"middle":return"w-72";case"lg":case"large":return"w-80";case"xl":return"w-96";default:return}},ny=e$=>{if(!(!e$||"default"===e$))return`border-${e$}`},ry=({className:e$,children:eI,...eR})=>r("div",{...eR,className:ey("mockup-phone-camera",e$),children:eI}),iy=({className:e$,children:eI,...eR})=>r("div",{...eR,className:ey("mockup-phone-display",e$),children:eI}),ay=e$=>{let{src:eI,alt:eR="mockup phone wallpaper",imgClassName:eL,children:ez,contentClassName:eW}=e$;return i(e.Fragment,{children:[eI?r("img",{alt:eR,src:eI,className:eL}):null,null==ez?null:eW?r("div",{className:eW,children:ez}):ez]})},oy=Object.assign(({className:e$,size:eI,color:eR,camera:eL,display:ez,children:eW,...eH})=>{let eF="mockup-phone",eP=ty(eI),eB=ny(eR);if(eP&&(eF+=` ${eP}`),eB&&(eF+=` ${eB}`),e$&&(eF+=` ${e$}`),!ez)return r("div",{...eH,className:eF,children:eW});let eK=!1!==eL;return i("div",{...eH,className:eF,children:[eK?r(ry,{..."object"==typeof eL?eL:void 0}):null,r(iy,{className:ez.className,children:ay(ez)})]})},{Camera:ry,Display:iy}),sy=(e$,eI)=>e$&&eI?`${e$} ${eI}`:e$??eI??"",cy=e$=>{switch(e$){case"none":return"";case"sm":return"p-3";case"lg":return"p-6";default:return"p-4"}},ly=e$=>Array.isArray(e$)?e$.length>0:null!=e$,uy=({title:e$,description:eI,extra:eR,className:eL,style:ez,children:eW,...eH})=>{let eF=ly(eW);return r("div",{...eH,className:sy("rue-mockup-window-header flex items-start justify-between gap-3 border-b border-base-300/80 px-4 py-3",eL),style:ez,children:eF?eW:i(e.Fragment,{children:[i("div",{className:"min-w-0 flex-1",children:[null==e$?null:r("div",{className:"truncate text-sm font-semibold",children:e$}),null==eI?null:r("div",{className:"mt-1 text-xs opacity-70",children:eI})]}),null==eR?null:r("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:eR})]})})},dy=({padding:e$="none",className:eI,style:eR,children:eL,...ez})=>{let eW=cy(e$);return r("div",{...ez,className:sy(sy("rue-mockup-window-body",eW),eI),style:eR,children:eL})},fy=({className:e$,style:eI,children:eR,...eL})=>r("div",{...eL,className:sy("rue-mockup-window-toolbar flex flex-wrap items-center gap-2",e$),style:eI,children:eR}),py=({className:e$,style:eI,children:eR,...eL})=>r("div",{...eL,className:sy("rue-mockup-window-actions flex flex-wrap items-center justify-end gap-2 border-t border-base-300/80 px-4 py-3",e$),style:eI,children:eR}),my=Object.assign(({bordered:e$,background:eI,title:eR,description:eL,toolbar:ez,actions:eW,padding:eH,bodyClassName:eF,headerClassName:eP,actionsClassName:eB,className:eK,style:eV,children:eq,...eU})=>{let eG=null!=eR||null!=eL||null!=ez,eZ=null!=eW,eY=eG||eZ||null!=eH||null!=eF||null!=eP||null!=eB,eX="mockup-window";return e$&&(eX+=" border border-base-300"),eI&&(eX+=" bg-base-100"),eK&&(eX+=` ${eK}`),eY?i("div",{...eU,className:eX,style:eV,children:[eG?r(uy,{title:eR,description:eL,extra:ez,className:eP}):null,r(dy,{padding:eH??"md",className:eF,children:eq}),eZ?r(py,{className:eB,children:eW}):null]}):r("div",{...eU,className:eX,style:eV,children:eq})},{Header:uy,Body:dy,Toolbar:fy,Actions:py}),hy=(...e$)=>e$.filter(Boolean).join(" "),gy=e$=>null!=e$&&(!Array.isArray(e$)||e$.some(e$=>gy(e$))),_y=(e$,eI)=>"between"===e$?"justify-between":"center"===e$?"justify-center":"end"===e$?"justify-end":"start"===e$?"justify-start":"center"===eI?"justify-center":"end"===eI?"justify-end":void 0,vy=(e$,eI,eR,eL,ez)=>hy(`navbar-${e$}`,_y(eI,e$),eR&&"flex-1",eL&&"flex-wrap",ez),yy=({as:e$="div",className:eI,children:eR,align:eL,grow:ez,wrap:eW,placement:eH="start",...eF})=>r(e$,{...eF,className:vy(eH,eL,ez,eW,eI),children:eR}),by=({as:e$="div",className:eI,children:eR,content:eL,grow:ez,...eW})=>r(e$,{...eW,className:hy("inline-flex min-w-0 items-center",ez&&"flex-1",eI),children:eL??eR}),xy=e$=>r(yy,{...e$,placement:"start"}),Sy=e$=>r(yy,{...e$,placement:"center"}),Cy=e$=>r(yy,{...e$,placement:"end"}),wy=(e$,eI)=>gy(e$)?r(by,{children:e$},eI):null,Ty=(e$,eI)=>(e$??[]).filter(e$=>(e$.placement??"start")===eI).map((e$,eR)=>{let{key:eL,placement:ez,content:eW,children:eH,...eF}=e$;return r(by,{...eF,content:eW??eH},eL??`${eI}-${eR}`)}),Ey=Object.assign(({as:e$="div",className:eI,children:eR,brand:eL,start:ez,center:eW,end:eH,actions:eF,items:eP,startProps:eB,centerProps:eK,endProps:eV,wrap:eq,sticky:eU,bordered:eG,...eZ})=>{let eY=gy(eR),eX=[wy(eL,"brand"),wy(ez,"start"),...Ty(eP,"start")],eJ=[wy(eW,"center"),...Ty(eP,"center")],eQ=[...Ty(eP,"end"),wy(eH,"end"),wy(eF,"actions")],e0=eX.some(Boolean)||eJ.some(Boolean)||eQ.some(Boolean);return r(e$,{...eZ,className:hy("navbar",eq&&"flex-wrap gap-y-2",eU&&"sticky top-0 z-30",eG&&"border-b border-base-300",eI),children:eY?eR:i(e.Fragment,{children:[e0&&eX.some(Boolean)?r(xy,{...eB,children:eX}):null,e0&&eJ.some(Boolean)?r(Sy,{...eK,children:eJ}):null,e0&&eQ.some(Boolean)?r(Cy,{...eV,children:eQ}):null]})})},{Start:xy,Center:Sy,End:Cy,Section:yy,Item:by}),Dy=(e$,eI)=>eI?`${e$} ${eI}`:e$,Oy=(...e$)=>e$.filter(Boolean).join(" "),ky=(e$,eI,eR)=>Math.min(Math.max(e$,eI),eR),Ay=(e$,eI)=>{let eR=Number(e$);return!Number.isFinite(eR)||eR<=0?eI:Math.floor(eR)},jy=e$=>{switch(e$){case"small":return"sm";case"middle":return"md";case"large":return"lg";default:return e$}},My=e$=>{switch(e$){case"center":return"justify-center";case"end":return"justify-end";default:return"justify-start"}},Ny=e$=>{let eI="join";return e$&&(eI+=` join-${e$}`),eI},Py=(e$,eI,eR,eL)=>{let ez=jy(e$),eW="join-item btn";return ez&&(eW+=` btn-${ez}`),eI&&(eW+=" btn-active"),eR&&(eW+=" btn-disabled"),eL&&(eW+=` ${eL}`),eW},Fy=(e$,eI)=>{let eR=jy(e$),eL="select select-bordered";return eR&&(eL+=` select-${eR}`),eI&&(eL+=` ${eI}`),eL},Iy=(e$,eI)=>{let eR=jy(e$),eL="input input-bordered";return eR&&(eL+=` input-${eR}`),eI&&(eL+=` ${eI}`),eL},Ly=(e$,eI)=>Oy(Iy(e$),"appearance-none [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",eI),Ry=(e$,eI)=>{let eR=String(Math.max(1,e$)).length;return"simple"===eI?eR<=2?"w-10":3===eR?"w-12":"w-14":eR<=2?"w-14":3===eR?"w-16":"w-20"},zy=e$=>{let eI=e$.reduce((e$,eI)=>Math.max(e$,String(eI).length),2);return eI<=2?"w-16":3===eI?"w-18":"w-20"},By=e$=>void 0!==e$.current||void 0!==e$.defaultCurrent||void 0!==e$.total||void 0!==e$.pageSize||void 0!==e$.defaultPageSize||void 0!==e$.simple||void 0!==e$.showSizeChanger||void 0!==e$.showQuickJumper||void 0!==e$.showLessItems||void 0!==e$.hideOnSinglePage||void 0!==e$.showTotal||void 0!==e$.itemRender||void 0!==e$.align||void 0!==e$.size||void 0!==e$.disabled||void 0!==e$.onChange||void 0!==e$.onShowSizeChange||void 0!==e$.pageSizeOptions||void 0!==e$.locale,Vy=(e$,eI,eR)=>eR<=0?[0,0]:[(e$-1)*eI+1,Math.min(eR,e$*eI)],Hy=(e$,eI,eR)=>{if(eI<=0)return[];let eL=[],ez=eR?1:2,eW=eR?3:5;if(eI<=5+2*ez){for(let e$=1;e$<=eI;e$+=1)eL.push({type:"page",page:e$,label:String(e$)});return eL}let eH=Math.max(1,e$-ez),eF=Math.min(eI,e$+ez);if(eL.push({type:"page",page:1,label:"1"}),eH>2)eL.push({type:"jump-prev",page:Math.max(1,e$-eW),label:"•••"});else for(let e$=2;e$<eH;e$+=1)eL.push({type:"page",page:e$,label:String(e$)});for(let e$=Math.max(2,eH);e$<=Math.min(eI-1,eF);e$+=1)eL.push({type:"page",page:e$,label:String(e$)});if(eF<eI-1)eL.push({type:"jump-next",page:Math.min(eI,e$+eW),label:"•••"});else for(let e$=eF+1;e$<eI;e$+=1)eL.push({type:"page",page:e$,label:String(e$)});return eL.push({type:"page",page:eI,label:String(eI)}),eL},Uy=Object.assign(({direction:e$,align:eI,size:eR,className:eL,children:ez,current:eW,defaultCurrent:eH,total:eF,pageSize:eP,defaultPageSize:eB,disabled:eK,simple:eV,showSizeChanger:eq,pageSizeOptions:eU,showQuickJumper:eG,showLessItems:eZ,hideOnSinglePage:eY,showTitle:eX=!0,showTotal:eJ,itemRender:eQ,onChange:e0,onShowSizeChange:e1,locale:e2,...e5})=>{if(!By({direction:e$,align:eI,size:eR,className:eL,children:ez,current:eW,defaultCurrent:eH,total:eF,pageSize:eP,defaultPageSize:eB,disabled:eK,simple:eV,showSizeChanger:eq,pageSizeOptions:eU,showQuickJumper:eG,showLessItems:eZ,hideOnSinglePage:eY,showTotal:eJ,itemRender:eQ,onChange:e0,onShowSizeChange:e1,locale:e2}))return r("div",{...e5,className:Dy(Ny(e$),eL),children:ez});let e3=(0,e.ref)(Ay(eH??eW??1,1)),e4=(0,e.ref)(Ay(eB??eP??10,10)),e6=Ay(eP??e4.value,10),e8=Math.max(0,Number(eF)||0),e7=Math.max(1,Math.ceil(e8/e6)),e9=ky(Ay(eW??e3.value,1),1,e7),t$=Vy(e9,e6,e8),tI=eU&&eU.length>0?eU.map(e$=>Ay(e$,e6)):[10,20,50,100],tR="object"==typeof eV?eV:eV?{}:void 0,tL="object"==typeof eG&&eG?eG:eG?{}:void 0,tz=Hy(e9,e7,eZ),tW=(0,e.useRef)();if(tW.current){if(tW.current.page!==e9){let e$=String(e9);tW.current.page=e9,tW.current.simple=e$,tW.current.quick=e$}}else{let e$=String(e9);tW.current={page:e9,simple:e$,quick:e$}}let tH=tW.current,tF={prev:e2?.prev??"‹",next:e2?.next??"›",jumpPrev:e2?.jumpPrev??"•••",jumpNext:e2?.jumpNext??"•••",pageSuffix:e2?.pageSuffix??"/ page",itemsPerPage:e2?.itemsPerPage??"items / page",pageTitle:e2?.pageTitle??(e$=>`Page ${e$}`),jumpTo:e2?.jumpTo??"Go to",previousPage:e2?.previousPage??"Previous Page",nextPage:e2?.nextPage??"Next Page",jumpPrevTitle:e2?.jumpPrevTitle??"Jump Previous Pages",jumpNextTitle:e2?.jumpNextTitle??"Jump Next Pages"};if(eY&&e7<=1)return null;let tP=(e$,eI=e6)=>{let eR=Math.max(1,Math.ceil(e8/eI)),eL=ky(Ay(e$,1),1,eR);void 0===eW&&(e3.value=eL),void 0===eP&&eI!==e6&&(e4.value=eI),e0&&e0(eL,eI)},tB=(e$,eI,eL,ez)=>{let eW=!!eK||!!ez?.disabled,eH=eQ?eQ(e$,eI,eL):eL;return r(Uy.Item,{size:eR,active:ez?.active,disabled:eW,"aria-label":"page"===eI?tF.pageTitle(e$):void 0,title:eX?ez?.title??("page"===eI?tF.pageTitle(e$):void 0):void 0,onClick:()=>{eW||ez?.active||tP(e$)},children:eH})},tK=tR?i("div",{className:Ny(),children:[tB(Math.max(1,e9-1),"prev",tF.prev,{disabled:e9<=1,title:tF.previousPage}),i("div",{className:Iy(eR,"join-item inline-flex shrink-0 items-center gap-1 px-2 text-sm"),children:[tR.readOnly?r("span",{className:"tabular-nums",children:e9}):r("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",min:"1",max:String(e7),value:tH.simple,disabled:eK,className:Oy("border-0 bg-transparent p-0 text-right outline-none appearance-none [appearance:textfield] tabular-nums [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",Ry(e7,"simple")),onInput:e$=>{tH.simple=e$.currentTarget.value},onKeyDown:e$=>{"Enter"!==e$.key||tP(Number(e$.currentTarget.value))},onBlur:e$=>{if(eK)return;let eI=e$.currentTarget;if(""===eI.value){eI.value=String(e9),tH.simple=eI.value;return}tP(Number(eI.value))}},`simple-${e9}-${e7}`),r("span",{className:"inline-flex items-center opacity-60",children:"/ page"===tF.pageSuffix?`/ ${e7}`:`${tF.pageSuffix} ${e7}`})]}),tB(Math.min(e7,e9+1),"next",tF.next,{disabled:e9>=e7,title:tF.nextPage})]}):i("div",{className:Ny(e$),children:[tB(Math.max(1,e9-1),"prev",tF.prev,{disabled:e9<=1,title:tF.previousPage}),tz.map(e$=>{let eI="jump-prev"===e$.type?tF.jumpPrev:"jump-next"===e$.type?tF.jumpNext:e$.label;return tB(e$.page,e$.type,eI,{active:"page"===e$.type&&e$.page===e9,disabled:"page"!==e$.type&&!!eK,title:"page"===e$.type?tF.pageTitle(e$.page):"jump-prev"===e$.type?tF.jumpPrevTitle:tF.jumpNextTitle})}),tB(Math.min(e7,e9+1),"next",tF.next,{disabled:e9>=e7,title:tF.nextPage})]});return i("div",{...e5,className:Oy("flex flex-wrap items-center gap-3",My(eI),eL),children:[eJ?r("div",{className:"text-sm opacity-70","aria-live":"polite",children:eJ(e8,t$)}):null,tK,eq?i("label",{className:"flex items-center gap-2 text-sm opacity-80",children:[r("select",{value:String(e6),disabled:eK,className:Fy(eR,`${zy(tI)} text-center tabular-nums`),onChange:e$=>{let eI,eR;return eR=ky(e9,1,Math.max(1,Math.ceil(e8/(eI=Ay(Number(e$.currentTarget.value),e6))))),void(void 0===eP&&(e4.value=eI),void 0===eW&&(e3.value=eR),e1&&e1(eR,eI),e0&&e0(eR,eI))},children:tI.map(e$=>r("option",{value:String(e$),children:e$},e$))}),r("span",{children:tF.itemsPerPage})]}):null,tL?i("div",{className:"flex items-center gap-2 text-sm",children:[r("span",{className:"opacity-70",children:tF.jumpTo}),r("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",min:"1",max:String(e7),value:tH.quick,disabled:eK,className:Ly(eR,`${Ry(e7,"quick")} text-center tabular-nums`),onInput:e$=>{tH.quick=e$.currentTarget.value},onKeyDown:e$=>{"Enter"!==e$.key||tP(Number(e$.currentTarget.value))}},`quick-${e9}-${e7}`),null==tL.goButton?null:r("button",{type:"button",disabled:eK,className:Oy("btn",jy(eR)?`btn-${jy(eR)}`:void 0),onClick:e$=>{let eI=e$.currentTarget.parentElement?.querySelector("input");eI&&tP(Number(eI.value))},children:tL.goButton})]}):null]})},{Item:({tag:e$="button",active:eI,disabled:eR,size:eL,className:ez,children:eW,...eH})=>{let eF={...eH,className:Py(eL,eI,eR,ez)};return eI&&(eF["aria-current"]=eH["aria-current"]??"page"),eR&&(eF["aria-disabled"]=eH["aria-disabled"]??!0,"button"===e$||"input"===e$?eF.disabled=eH.disabled??!0:(eF.role=eH.role??"button",eF.tabIndex=eH.tabIndex??-1)),r(e$,{...eF,children:eW})}}),Wy=(...e$)=>e$.filter(Boolean).join(" "),Gy=(...e$)=>{let eI={};return e$.forEach(e$=>{e$&&Object.assign(eI,e$)}),eI},Ky=e$=>e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),qy=e$=>e$?"string"==typeof e$?e$.trim():Object.entries(e$).filter(([,e$])=>null!=e$).map(([e$,eI])=>`${e$.startsWith("--")?e$:Ky(e$)}:${String(eI)}`).join("; "):"",Jy=(e$,eI)=>[qy(e$),qy(eI)].filter(Boolean).join("; ")||void 0,Yy=e$=>Array.from(new Set(Array.isArray(e$)?e$:e$?[e$]:["hover"])),Xy=(e$,eI)=>{"function"==typeof e$&&e$(eI)},Zy=e$=>"function"==typeof e$?e$():e$,Qy=e$=>null!=e$&&!1!==e$,$y=e$=>{switch(e$){case"top":return{direction:"top",align:"center"};case"topLeft":return{direction:"top",align:"start"};case"topRight":return{direction:"top",align:"end"};case"bottom":return{direction:"bottom",align:"center"};case"bottomRight":return{direction:"bottom",align:"end"};case"left":return{direction:"left",align:"center"};case"leftTop":return{direction:"left",align:"start"};case"leftBottom":return{direction:"left",align:"end"};case"right":return{direction:"right",align:"center"};case"rightTop":return{direction:"right",align:"start"};case"rightBottom":return{direction:"right",align:"end"};default:return{direction:"bottom",align:"start"}}},eb=e$=>{switch(e$){case"top":return"bottom-full left-1/2 mb-3 -translate-x-1/2";case"topLeft":return"bottom-full left-0 mb-3";case"topRight":return"bottom-full right-0 mb-3";case"bottom":return"top-full left-1/2 mt-3 -translate-x-1/2";case"bottomRight":return"top-full right-0 mt-3";case"left":return"right-full top-1/2 me-3 -translate-y-1/2";case"leftTop":return"right-full top-0 me-3";case"leftBottom":return"right-full bottom-0 me-3";case"right":return"left-full top-1/2 ms-3 -translate-y-1/2";case"rightTop":return"left-full top-0 ms-3";case"rightBottom":return"left-full bottom-0 ms-3";default:return"top-full left-0 mt-3"}},tb=e$=>{switch(e$){case"top":case"topLeft":case"topRight":return"origin-bottom";case"left":case"leftTop":case"leftBottom":return"origin-right";case"right":case"rightTop":case"rightBottom":return"origin-left";default:return"origin-top"}},nb=(e$,eI)=>{let eR=$y(e$);return"top"===eR.direction?Wy("bottom-[-6px] border-r border-b",eI||"center"===eR.align?"left-1/2 -translate-x-1/2":"end"===eR.align?"right-5":"left-5"):"bottom"===eR.direction?Wy("top-[-6px] border-l border-t",eI||"center"===eR.align?"left-1/2 -translate-x-1/2":"end"===eR.align?"right-5":"left-5"):"left"===eR.direction?Wy("right-[-6px] border-r border-t",eI||"center"===eR.align?"top-1/2 -translate-y-1/2":"end"===eR.align?"bottom-5":"top-5"):Wy("left-[-6px] border-l border-b",eI||"center"===eR.align?"top-1/2 -translate-y-1/2":"end"===eR.align?"bottom-5":"top-5")},rb=(e$,eI,eR,eL,ez,eW,eH,eF,eP,eB,eK)=>"span"===e$?(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("span",e$);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eI,String(eR))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eI,eL)});let eV=(0,t._$vaporBindUseRef)(eI,()=>ez);(0,t.onBeforeUnmount)(()=>{eV()}),(0,t._$addEventListener)(eI,"mouseenter",eW),(0,t._$addEventListener)(eI,"mouseleave",eH),(0,t._$addEventListener)(eI,"focus",eF),(0,t._$addEventListener)(eI,"blur",eP);let eq=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eI,eq),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(eB,eI,eq))}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let eU=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eU),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(eK,eI,eU))}),eI}):"section"===e$?(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("section",e$);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eI,String(eR))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eI,eL)});let eV=(0,t._$vaporBindUseRef)(eI,()=>ez);(0,t.onBeforeUnmount)(()=>{eV()}),(0,t._$addEventListener)(eI,"mouseenter",eW),(0,t._$addEventListener)(eI,"mouseleave",eH),(0,t._$addEventListener)(eI,"focus",eF),(0,t._$addEventListener)(eI,"blur",eP);let eq=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eI,eq),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(eB,eI,eq))}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let eU=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eU),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(eK,eI,eU))}),eI}):"article"===e$?(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("article",e$);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eI,String(eR))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eI,eL)});let eV=(0,t._$vaporBindUseRef)(eI,()=>ez);(0,t.onBeforeUnmount)(()=>{eV()}),(0,t._$addEventListener)(eI,"mouseenter",eW),(0,t._$addEventListener)(eI,"mouseleave",eH),(0,t._$addEventListener)(eI,"focus",eF),(0,t._$addEventListener)(eI,"blur",eP);let eq=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eI,eq),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(eB,eI,eq))}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let eU=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eU),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(eK,eI,eU))}),eI}):"label"===e$?(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("label",e$);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eI,String(eR))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eI,eL)});let eV=(0,t._$vaporBindUseRef)(eI,()=>ez);(0,t.onBeforeUnmount)(()=>{eV()}),(0,t._$addEventListener)(eI,"mouseenter",eW),(0,t._$addEventListener)(eI,"mouseleave",eH),(0,t._$addEventListener)(eI,"focus",eF),(0,t._$addEventListener)(eI,"blur",eP);let eq=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eI,eq),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(eB,eI,eq))}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let eU=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eU),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(eK,eI,eU))}),eI}):"div"===e$?(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("div",e$);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eI,String(eR))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eI,eL)});let eV=(0,t._$vaporBindUseRef)(eI,()=>ez);(0,t.onBeforeUnmount)(()=>{eV()}),(0,t._$addEventListener)(eI,"mouseenter",eW),(0,t._$addEventListener)(eI,"mouseleave",eH),(0,t._$addEventListener)(eI,"focus",eF),(0,t._$addEventListener)(eI,"blur",eP);let eq=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eI,eq),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(eB,eI,eq))}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let eU=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eU),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(eK,eI,eU))}),eI}):(0,e.h)(e$,{...eI,className:eR,style:eL,ref:ez,onMouseEnter:eW,onMouseLeave:eH,onFocus:eF,onBlur:eP},eB,eK),ib=({as:e$="div",title:eI,content:eR,overlay:eL,placement:ez="top",trigger:eW,open:eH,defaultOpen:eF,disabled:eP,arrow:eB=!0,destroyOnHidden:eK=!1,mouseEnterDelay:eV=.08,mouseLeaveDelay:eq=.12,zIndex:eU,className:eG,style:eZ,triggerClassName:eY,triggerStyle:eX,overlayClassName:eJ,overlayStyle:eQ,classNames:e0,styles:e1,onOpenChange:e2,children:e5,...e3})=>{let e4=(0,t._$vaporWithHookId)("ref:1:0",()=>(0,t.ref)(eF??!1)),e6=(0,t._$vaporWithHookId)("ref:1:1",()=>(0,t.ref)(eH??eF??!1)),e8=(0,t._$vaporWithHookId)("ref:1:2",()=>(0,t.ref)(Yy(eW))),e7=void 0!==eH,e9=null,t$=null,tI=null,tR=null,tL=null,tz=e$=>{t$&&t$.setAttribute("aria-expanded",String(e$)),tI&&(tI.setAttribute("aria-hidden",e$?"false":"true"),tI.classList.toggle("pointer-events-auto",e$),tI.classList.toggle("visible",e$),tI.classList.toggle("opacity-100",e$),tI.classList.toggle("scale-100",e$),tI.classList.toggle("pointer-events-none",!e$),tI.classList.toggle("invisible",!e$),tI.classList.toggle("opacity-0",!e$),tI.classList.toggle("scale-95",!e$))};(0,t._$vaporWithHookId)("watch:1:3",()=>(0,t.watch)(()=>eH,e$=>{e6.value="boolean"==typeof e$?e$:e4.value,tz(e6.value)},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:4",()=>(0,t.watch)(()=>eW,e$=>{e8.value=Yy(e$)},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:5",()=>(0,t.watch)(()=>eF,e$=>{e7||(e4.value=!!e$,e6.value=!!e$,tz(e6.value))},{immediate:!0}));let tW=()=>{tR&&(clearTimeout(tR),tR=null),tL&&(clearTimeout(tL),tL=null)},tH=e$=>{eP||!tZ||e$!==e6.value&&(e7||(e4.value=e$),e6.value=e$,tz(e$),"function"==typeof e2&&e2(e$))},tF=e$=>{e6.value&&(tJ||tQ)&&(e9?.contains(e$.target)||tH(!1))},tP=e$=>{e6.value&&"Escape"===e$.key&&tH(!1)},tB=e$=>{tX&&tH(!0)},tK=e$=>{if(!tX)return;let eI=e$.relatedTarget;eI&&e9?.contains(eI)||tH(!1)};(0,t.onMounted)(()=>{typeof window>"u"||(window.addEventListener("click",tF,!0),window.addEventListener("keydown",tP),e9?.addEventListener("focusin",tB),e9?.addEventListener("focusout",tK),tz(e6.value))}),(0,t.onUnmounted)(()=>{tW(),e9?.removeEventListener("focusin",tB),e9?.removeEventListener("focusout",tK),typeof window>"u"||(window.removeEventListener("click",tF,!0),window.removeEventListener("keydown",tP))});let tV=Zy(eI),tq=Zy(eR),tU=void 0===eL?void 0:Zy(eL),tG=Qy(tV)||Qy(tq),tZ=Qy(tU)||tG,tY=e8.value.includes("hover"),tX=e8.value.includes("focus"),tJ=e8.value.includes("click"),tQ=e8.value.includes("contextMenu"),t0=tZ&&(e6.value||!eK),t1="object"==typeof eB&&!!eB.pointAtCenter,t2=!1!==eB,{onMouseEnter:t5,onMouseLeave:t3,onFocus:t4,onBlur:t6,onClick:t8,onContextMenu:t7,...t9}=e3,r$=Wy("relative inline-flex max-w-full align-top",e0?.root,eG),rI=Wy("inline-flex max-w-full items-stretch",e0?.trigger,eY),rR=Wy("absolute z-50 w-max max-w-[min(24rem,calc(100vw-2rem))] transform-gpu transition duration-150 ease-out",eb(ez),tb(ez),e6.value?"pointer-events-auto visible opacity-100 scale-100":"pointer-events-none invisible opacity-0 scale-95",e0?.overlay,eJ),rL=Wy("relative min-w-64 overflow-hidden rounded-[1.15rem] border border-base-300/80 bg-base-100/95 shadow-[0_20px_48px_-28px_rgba(15,23,42,0.55)] backdrop-blur",e0?.panel),rz=Wy("absolute block h-3 w-3 rotate-45 border-base-300/80 bg-base-100/95",nb(ez,t1),e0?.arrow),rW=Wy("border-b border-base-300/70 px-4 py-3",e0?.header),rH=Wy("text-sm font-semibold tracking-[0.01em] text-base-content",e0?.title),rF=Wy("px-4 py-3 text-sm leading-6 text-base-content/80",e0?.content),rP=Jy(eZ,e1?.root),rB=Jy(eX,e1?.trigger),rK=Gy(e1?.overlay,eQ);"number"==typeof eU&&(rK.zIndex=eU);let rV=qy(rK)||void 0,rq=qy(e1?.panel)||void 0,rU=qy(e1?.arrow)||void 0,rG=qy(e1?.header)||void 0,rZ=qy(e1?.title)||void 0,rY=qy(e1?.content)||void 0,rX=t0?Qy(tU)?tU:i("div",{className:rL,style:rq,role:"dialog","aria-modal":"false",children:[Qy(tV)?r("div",{className:rW,style:rG,children:r("div",{className:rH,style:rZ,children:tV})}):null,Qy(tq)?r("div",{className:rF,style:rY,children:tq}):null]}):null;return rb(e$,t9,r$,rP,e$=>{e9=e$},e$=>{Xy(t5,e$),e$?.defaultPrevented||(()=>{if(tY){if(tL&&(clearTimeout(tL),tL=null),eV<=0)return tH(!0);tR&&clearTimeout(tR),tR=setTimeout(()=>{tR=null,tH(!0)},1e3*eV)}})()},e$=>{Xy(t3,e$),e$?.defaultPrevented||(()=>{if(tY){if(tR&&(clearTimeout(tR),tR=null),eq<=0)return tH(!1);tL&&clearTimeout(tL),tL=setTimeout(()=>{tL=null,tH(!1)},1e3*eq)}})()},e$=>{Xy(t4,e$)},e$=>{Xy(t6,e$)},r("div",{className:rI,style:rB,ref:e$=>{t$=e$},"aria-haspopup":tZ?"dialog":void 0,"aria-expanded":tZ?String(e6.value):void 0,onClick:e$=>{Xy(t8,e$),!e$?.defaultPrevented&&tJ&&(tW(),tH(!e6.value))},onContextMenu:e$=>{Xy(t7,e$),!e$?.defaultPrevented&&tQ&&("function"==typeof e$.preventDefault&&e$.preventDefault(),tW(),tH(!e6.value))},children:e5}),t0?i("div",{className:rR,style:rV,ref:e$=>{tI=e$},"aria-hidden":e6.value?"false":"true",children:[t2?r("span",{className:rz,style:rU}):null,rX]}):null)},ab={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl",small:"sm",medium:"md",middle:"md",large:"lg"},ob={label:"label",value:"value",options:"options",disabled:"disabled",title:"title",className:"className",groupLabel:"label"},sb=(e$,eI)=>eI?`${e$} ${eI}`:e$,cb=e$=>"string"==typeof e$&&e$ in ab,lb=(e$,eI)=>eI&&cb(eI)?ab[eI]:cb(e$)?ab[e$]:void 0,ub=(e$,eI)=>null!=eI?String(eI):"number"==typeof e$?String(e$):"string"!=typeof e$||""===e$||cb(e$)?void 0:e$,db=(e$,eI)=>{switch(eI?"ghost":e$){case"filled":return"bg-base-200 border-base-300 shadow-none";case"borderless":return"select-ghost bg-transparent border-transparent shadow-none";case"ghost":return"select-ghost";default:return}},fb=(e$,eI)=>{switch(eI?"ghost":e$){case"filled":return"bg-base-200 border-base-300 shadow-none";case"borderless":return"bg-transparent border-transparent shadow-none px-0";case"ghost":return"input-ghost";default:return}},pb=(e$,eI,eR,eL,ez,eW,eH)=>{let eF="select",eP=eI??e$,eB=lb(eL,ez),eK=db(eR,eW);return eP&&(eF+=` select-${eP}`),eB&&(eF+=` select-${eB}`),eK&&(eF+=` ${eK}`),eH&&(eF+=` ${eH}`),eF},mb=(e$,eI,eR,eL,ez,eW,eH)=>{let eF="input",eP=eI??e$,eB=lb(eL,ez),eK=fb(eR,eW);return eP&&(eF+=` input-${eP}`),eB&&(eF+=` input-${eB}`),eK&&(eF+=` ${eK}`),eF+=" flex items-center gap-2",eH&&(eF+=` ${eH}`),eF},hb=(e$,eI,eR)=>e$[eR?.[eI]??ob[eI]],gb=(e$,eI,eR="option",eL)=>e$.flatMap((e$,ez)=>{let eW=`${eR}-${ez}`,eH=hb(e$,"options",eI),eF=eL??hb(e$,"groupLabel",eI);return Array.isArray(eH)?gb(eH,eI,eW,hb(e$,"groupLabel",eI)??hb(e$,"label",eI)):[{key:eW,value:hb(e$,"value",eI),label:hb(e$,"label",eI)??e$.children,disabled:hb(e$,"disabled",eI),title:hb(e$,"title",eI),className:hb(e$,"className",eI),groupLabel:eF,raw:e$}]}),_b=(e$,eI)=>{let eR={};return Array.isArray(e$)&&gb(e$,eI).forEach(e$=>{void 0===e$.value||null===e$.value||(eR[String(e$.value)]=e$)}),eR},vb=(e$,eI,eR="option")=>e$.map((e$,eL)=>{let ez=`${eR}-${eL}`,eW=hb(e$,"options",eI),eH=hb(e$,"className",eI),eF=hb(e$,"title",eI),eP=hb(e$,"disabled",eI);if(Array.isArray(eW))return r("optgroup",{label:String(hb(e$,"groupLabel",eI)??hb(e$,"label",eI)??""),className:eH,title:eF,children:vb(eW,eI,ez)},ez);let eB=hb(e$,"label",eI)??e$.children,eK=hb(e$,"value",eI);return r("option",{value:eK,disabled:eP,title:eF,className:eH,children:eB??eK},null==eK?ez:String(eK))}),yb=e$=>{if(!e$)return!1;let eI=Number(e$);return Number.isFinite(eI)&&eI>1},bb=null,xb=null,Sb=160,Cb=()=>{xb&&(clearTimeout(xb),xb=null),bb=null},wb=e$=>{if(!e$||typeof document>"u")return null;let eI=[],eR=e$;for(;eR&&eR!==document.body;){let e$=eR.parentElement;if(!e$)return null;eI.push(Array.from(e$.children).indexOf(eR)),eR=e$}return eR===document.body?eI.reverse().join("."):null},Tb=(e$,eI,eR,eL,ez,eW)=>{let eH=e$.id??e$.name??e$["data-testid"]??e$["aria-label"]??e$.title;if(null!=eH&&""!==eH)return`prop:${String(eH)}`;if(!Array.isArray(eI)||!eI.length)return null;let eF=gb(eI,eR).map(e$=>`${String(e$.groupLabel??"")}>${String(e$.value??e$.label??"")}`).join("|");return`options:${null==eL?"":String(eL)}:${[ez,eW].filter(Boolean).join("|")}:${eF}`},Eb=e$=>{e$&&(Cb(),bb=e$,xb=setTimeout(()=>{bb===e$&&(bb=null),xb=null},Sb))},Db=e$=>{if(!e$||!bb)return!1;let eI=bb===e$;return eI&&Cb(),eI},Ob=(e$,eI,eR)=>{if(eR){let eL=eI?.raw?.[eR];if(void 0!==eL)return eL;let ez=e$.getAttribute(eR);if(null!==ez)return ez;let eW=e$[eR];if(null!=eW&&""!==eW)return eW}return eI?.label===void 0?e$.textContent??e$.label??e$.value:eI.label},kb=(e$,eI)=>eI?.value!==void 0&&null!==eI.value?eI.value:e$.value,Ab=(e$,eI,eR)=>{let eL=kb(e$,eI);return{value:eL,key:eL,label:Ob(e$,eI,eR),disabled:eI?.disabled??e$.disabled,title:eI?.title??e$.title}},jb=(e$,eI,eR)=>{let eL=Ab(e$,eI,eR);return{key:e$.value,value:eL.value,label:eL.label,disabled:eL.disabled,title:eL.title,className:eI?.className,groupLabel:eI?.groupLabel,raw:eI?.raw}},Mb=(e$,eI,eR,eL)=>{let ez=Array.from(e$.selectedOptions),eW=ez.map(e$=>jb(e$,eI[e$.value],eR)),eH=eW.map(e$=>e$.value),eF=eW.map(e$=>e$.label),eP=eL?ez.map(e$=>Ab(e$,eI[e$.value],eR)):eH;return{values:eH,labels:eF,options:eW,payload:e$.multiple?eP:eP[0]??null}},Nb=(e$,eI,eR)=>{if(!e$.multiple||!eR||eR<=0)return Array.from(e$.selectedOptions).map(e$=>e$.value);let eL=Array.from(e$.selectedOptions).map(e$=>e$.value);if(eL.length<=eR)return eL;let ez=[];eL.forEach(e$=>{eI.includes(e$)&&!ez.includes(e$)&&ez.length<eR&&ez.push(e$)}),eL.forEach(e$=>{!ez.includes(e$)&&ez.length<eR&&ez.push(e$)});let eW=new Set(ez);return Array.from(e$.options).forEach(e$=>{e$.selected=eW.has(e$.value)}),Array.from(e$.selectedOptions).map(e$=>e$.value)},Pb=(e$,eI)=>Array.from(e$.options).find(e$=>e$.value===eI),Fb=e$=>null==e$?[]:Array.isArray(e$)?e$.map(e$=>String(e$)):[String(e$)],Ib=e$=>{let eI=[],eR=new Map,eL=[];return e$.forEach(e$=>{if(void 0===e$.groupLabel||null===e$.groupLabel||""===e$.groupLabel)return void eL.push(e$);let ez=String(e$.groupLabel),eW=eR.get(ez);eW||(eW={key:ez,label:e$.groupLabel,options:[]},eR.set(ez,eW),eI.push(eW)),eW.options.push(e$)}),eL.length&&eI.unshift({key:"__ungrouped__",options:eL}),eI},Lb=e$=>{let eI=e$.value??e$.key;return{key:String(eI),value:eI,label:e$.label??eI,disabled:e$.disabled,title:e$.title,className:e$.className,groupLabel:e$.groupLabel,raw:e$.raw}},Rb=()=>r("svg",{viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",className:"h-4 w-4 shrink-0 opacity-60",children:r("path",{d:"M6 8.5L10 12.5L14 8.5",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round"})}),zb=Object.assign(({value:e$,defaultValue:eI,color:eR,status:eL,variant:ez,size:eW,uiSize:eH,nativeSize:eF,ghost:eP,loading:eB,loadingText:eK,options:eV,fieldNames:eq,placeholder:eU,placeholderValue:eG="",placeholderDisabled:eZ=!0,notFoundContent:eY,allowClear:eX,clearLabel:eJ="清空选择",onClear:eQ,prefix:e0,suffix:e1,addonBefore:e2,addonAfter:e5,suffixIcon:e3,showArrow:e4=!0,mode:e6,labelInValue:e8,optionLabelProp:e7,maxCount:e9,onChange:t$,onValueChange:tI,onSelect:tR,onDeselect:tL,rootClassName:tz,selectClassName:tW,className:tH,children:tF,multiple:tP,disabled:tB,...tK})=>{let tV=(0,e.useRef)(),tq=(0,e.useRef)(),tU=(0,e.useRef)(),tG=(0,e.useRef)(),tZ=(0,e.useRef)(),tY=(0,e.useRef)([]),tX=Array.isArray(eV)&&eV.length>0,tJ=null!=tF,tQ=tX?gb(eV,eq).map(e$=>Lb(e$)):[],t0=(0,e.ref)(0),t1=(0,e.ref)(Fb(void 0===e$?eI:e$)),t2=(0,e.ref)(tQ),t5=!!tB||!!eB,t3=!!tP,t4="multiple"===e6,t6=t3||t4,t8=ub(eW,eF),t7=t3||yb(t8),t9=t4&&!t7,r$=t9?Tb(tK,eV,eq,eU,tH,tW):null,rI=(0,e.useRef)(null!==r$&&bb===r$),rR=t9||(void 0!==e0||void 0!==e1||void 0!==e2||void 0!==e5||!!eX||!!eB||void 0!==e3)&&!t7,rL=_b(eV,eq),rz=tX?vb(eV,eq):tF,rW=eU??"Select options",rH=e$=>{e$||Cb(),rI.current!==e$&&(rI.current=e$,rK())},rF=()=>{t9&&!0===rI.current&&Eb(r$??wb(tV.current))},rP=()=>{t9&&Db(r$??wb(tV.current))&&(rI.current=!0,rK())},rB=()=>t1.value.map(e$=>t2.value.find(eI=>String(eI.value)===e$)).filter(Boolean),rK=()=>{let e$=!0===rI.current,eI=tU.current;eI&&(eI.setAttribute("aria-expanded",e$?"true":"false"),eI.classList.toggle("ring",e$),eI.classList.toggle("ring-primary/15",e$));let eR=tZ.current;eR&&(eR.hidden=!e$,eR.setAttribute("aria-hidden",e$?"false":"true"))},rV=()=>{let e$=tq.current;e$&&(t1.value=Array.from(e$.selectedOptions).map(e$=>e$.value),t2.value=Array.from(e$.options).map(e$=>jb(e$,rL[e$.value],e7)),t0.value+=1,rK(),(()=>{let e$=tG.current;if(!e$||typeof document>"u")return;let eI=rB();if(e$.replaceChildren(),!eI.length){let eI=document.createElement("span");eI.className="truncate text-sm text-base-content/40",eI.textContent=String(rW),e$.appendChild(eI);return}eI.forEach(eI=>{let eR=String(eI.value),eL=document.createElement("span");eL.className="inline-flex max-w-full items-center gap-1 rounded-md bg-base-200 px-2 py-1 text-xs text-base-content";let ez=document.createElement("span");if(ez.className="truncate",ez.textContent=String(eI.label??eI.value),eL.appendChild(ez),!t5){let e$=document.createElement("button");e$.type="button",e$.className="btn btn-ghost btn-xs h-4 min-h-0 w-4 rounded-full p-0 text-[10px]",e$.setAttribute("aria-label",`移除 ${String(eI.label??eI.value)}`),e$.textContent="\xd7",e$.addEventListener("click",e$=>{rZ(eR,e$)}),eL.appendChild(e$)}e$.appendChild(eL)})})(),(()=>{let e$=tZ.current;if(!e$)return;let eI=new Set(t1.value);Array.from(e$.querySelectorAll("[data-rue-select-option]")).forEach(e$=>{let eR=e$.getAttribute("data-rue-select-option")??"",eL=eI.has(eR);e$.setAttribute("aria-selected",eL?"true":"false"),e$.classList.toggle("bg-primary/10",eL),e$.classList.toggle("text-primary",eL),e$.classList.toggle("hover:bg-base-200",!eL&&!e$.disabled);let ez=e$.querySelector('[data-rue-select-check="true"]');ez&&(ez.classList.toggle("opacity-100",eL),ez.classList.toggle("opacity-0",!eL))})})())},rq=()=>{let eR=void 0===e$?eI:e$;void 0===eR||(e$=>{let eI=tq.current;if(eI){if(eI.multiple){let eR=new Set(e$);Array.from(eI.options).forEach(e$=>{e$.selected=eR.has(e$.value)});return}eI.value=e$[0]??""}})(Fb(eR)),rV()},rU=()=>{tq.current&&(tY.current=Array.from(tq.current.selectedOptions).map(e$=>e$.value))},rG=()=>{let e$=tq.current;e$&&(e$.dispatchEvent(new Event("input",{bubbles:!0})),e$.dispatchEvent(new Event("change",{bubbles:!0})))},rZ=(e$,eI)=>{eI.preventDefault(),eI.stopPropagation();let eR=tq.current;if(!eR||t5)return;let eL=Pb(eR,e$);eL&&!eL.disabled&&eL.selected&&(eL.selected=!1,rV(),rF(),rG())},rY=e$=>{let eI=tq.current;!eI||t5||(eI.multiple?Array.from(eI.options).forEach(e$=>{e$.selected=!1}):null==eU?(eI.selectedIndex=-1,eI.value=""):eI.value=String(eG),rV(),rF(),rG(),eQ&&eQ(e$))};(0,e.onMounted)(()=>{if(rq(),rU(),rV(),rP(),typeof window>"u")return;let e$=e$=>{if(!0!==rI.current)return;let eI=e$.target;eI&&(tV.current?.contains(eI)||rH(!1))},eI=e$=>{!0===rI.current&&"Escape"===e$.key&&rH(!1)};window.addEventListener("pointerdown",e$,!0),window.addEventListener("keydown",eI),(0,e.onUnmounted)(()=>{window.removeEventListener("pointerdown",e$,!0),window.removeEventListener("keydown",eI)})}),(0,e.watch)(()=>e$,()=>{rq(),rU(),rV(),rP()},{immediate:!0}),(0,e.watch)(()=>eI,()=>{rq(),rU(),rV(),rP()}),(0,e.watch)(()=>eV,()=>{rq(),rU(),rV(),rP()}),(0,e.watch)(()=>tF,()=>{rq(),rU(),rV(),rP()});let rX=pb(eR,eL,ez,eW,eH,eP,tH),rJ=mb(eR,eL,ez,eW,eH,eP,tH),rQ=e4?e3??r(Rb,{}):e3,r0=rB(),r1=Ib(t2.value),r2=i("select",{...tK,...void 0===t8?{}:{size:t8},...t6?{multiple:!0}:{},...t5?{disabled:!0}:{},...void 0===eI?{}:{defaultValue:eI},...void 0===e$?{}:{value:e$},ref:tq,tabIndex:t9?-1:tK.tabIndex,"aria-hidden":t9?"true":void 0,"aria-busy":eB?"true":void 0,className:sb(t9?"pointer-events-none absolute h-0 w-0 overflow-hidden opacity-0":rR?"min-w-0 grow appearance-none border-none bg-transparent pr-1 text-base-content outline-none":rX,tW),onChange:e$=>{(e$=>{let eI=tq.current;if(!eI)return;let eR=(tY.current??[]).slice(),eL=Nb(eI,eR,e9),ez=Mb(eI,rL,e7,e8),eW=eL.map(e$=>String(e$)),eH=eW.filter(e$=>!eR.includes(e$)),eF=eR.filter(e$=>!eW.includes(e$));tI&&tI(ez.payload,{values:ez.values,labels:ez.labels,options:ez.options,nativeEvent:e$}),tR&&eH.forEach(eR=>{let eL=Pb(eI,eR);if(!eL)return;let ez=jb(eL,rL[eR],e7);tR(e8?Ab(eL,rL[eR],e7):ez.value,ez,e$)}),tL&&eF.forEach(eR=>{let eL=Pb(eI,eR);if(!eL)return;let ez=jb(eL,rL[eR],e7);tL(e8?Ab(eL,rL[eR],e7):ez.value,ez,e$)}),tY.current=eW})(e$),rV(),t$&&t$(e$)},children:[t6||null==eU?null:r("option",{value:eG,disabled:eZ,children:eU}),rz,!eB||tX||tJ?null:r("option",{disabled:!0,children:eK??"正在加载..."}),eB||tX||tJ?null:r("option",{disabled:!0,children:eY??"暂无可选项"})]});return rR?t9?i("div",{ref:tV,className:sb("relative",tz),"data-rue-select-root":"true","aria-disabled":t5?"true":void 0,children:[r2,i("div",{ref:tU,className:sb(sb(rJ,"flex min-h-12 items-center gap-2 py-2"),!0===rI.current?"ring ring-primary/15":void 0),role:"button",tabIndex:t5?-1:0,"aria-haspopup":"listbox","aria-expanded":!0===rI.current?"true":"false","data-rue-select-trigger":"true","data-rue-select-version":String(t0.value),onClick:e$=>{e$.preventDefault(),t5||!0===rI.current||rH(!0)},onKeyDown:e$=>{if(!t5){if("Escape"===e$.key)return void rH(!1);("Enter"===e$.key||" "===e$.key||"ArrowDown"===e$.key)&&(e$.preventDefault(),rH(!0))}},children:[void 0===e2?null:r("span",{className:"shrink-0 text-sm text-base-content/60",children:e2}),void 0===e0?null:r("span",{className:"shrink-0 text-sm text-base-content/60",children:e0}),r("div",{ref:tG,className:"flex min-w-0 flex-1 flex-wrap items-center gap-1"}),!eB&&eX&&r0.length?r("button",{type:"button",className:"btn btn-ghost btn-xs btn-circle shrink-0","aria-label":eJ,onClick:e$=>{e$.preventDefault(),e$.stopPropagation(),rY(e$)},disabled:t5,children:"\xd7"}):null,eB?r("span",{className:"loading loading-spinner loading-xs shrink-0","aria-hidden":"true"}):null,void 0===e1?null:r("span",{className:"shrink-0 text-sm text-base-content/60",children:e1}),null==rQ?null:r("span",{className:"pointer-events-none flex shrink-0 items-center text-base-content/70",children:rQ}),void 0===e5?null:r("span",{className:"shrink-0 text-sm text-base-content/60",children:e5})]}),r("div",{ref:tZ,className:"absolute z-30 mt-2 w-full rounded-box border border-base-300 bg-base-100 p-2 shadow-xl","data-rue-select-popup":"true","aria-hidden":!0===rI.current?"false":"true",hidden:!0!==rI.current,children:r("div",{role:"listbox","aria-multiselectable":"true",className:"max-h-72 space-y-2 overflow-auto",children:r1.map(e$=>i("div",{className:"space-y-1",children:[void 0===e$.label?null:r("div",{className:"px-3 pt-1 text-[11px] font-semibold uppercase tracking-[0.18em] text-base-content/45",children:e$.label}),e$.options.map(e$=>{let eI=String(e$.value),eR=t1.value.includes(eI);return i("button",{type:"button",className:sb("flex w-full items-center justify-between rounded-lg px-3 py-2 text-left text-sm transition",e$.disabled?"cursor-not-allowed opacity-50":eR?"bg-primary/10 text-primary":"hover:bg-base-200"),"data-rue-select-option":eI,"aria-selected":eR?"true":"false",disabled:e$.disabled,onClick:e$=>{((e$,eI)=>{eI.preventDefault(),eI.stopPropagation();let eR=tq.current;if(!eR||t5)return;let eL=Pb(eR,e$);!eL||eL.disabled||(eL.selected=!eL.selected,rV(),rF(),rG())})(eI,e$)},children:[r("span",{className:"truncate",children:e$.label??e$.value}),r("span",{"data-rue-select-check":"true",className:eR?"opacity-100":"opacity-0",children:"✓"})]},eI)})]},e$.key))})})]}):i("div",{ref:tV,className:sb(rJ,tz),"data-rue-select-root":"true","aria-disabled":t5?"true":void 0,children:[void 0===e2?null:r("span",{className:"shrink-0 text-sm text-base-content/60",children:e2}),void 0===e0?null:r("span",{className:"shrink-0 text-sm text-base-content/60",children:e0}),r2,!eB&&eX?r("button",{type:"button",className:"btn btn-ghost btn-xs btn-circle inline-flex shrink-0 items-center justify-center self-center","aria-label":eJ,onClick:rY,disabled:t5,children:"\xd7"}):null,eB?r("span",{className:"loading loading-spinner loading-xs shrink-0 self-center","aria-hidden":"true"}):null,void 0===e1?null:r("span",{className:"inline-flex shrink-0 items-center self-center text-sm text-base-content/60",children:e1}),null==rQ?null:r("span",{className:"pointer-events-none inline-flex shrink-0 items-center self-center text-base-content/70",children:rQ}),void 0===e5?null:r("span",{className:"shrink-0 text-sm text-base-content/60",children:e5})]}):r2},{Option:({className:e$,children:eI,...eR})=>r("option",{...eR,className:e$,children:eI}),OptGroup:({label:e$,className:eI,children:eR,...eL})=>r("optgroup",{...eL,label:e$,className:eI,children:eR}),Shell:({className:e$,children:eI,...eR})=>r("label",{...eR,className:sb("input",e$),children:eI})}),Bb=0,Vb=420,Hb="cubic-bezier(0.2, 0, 0, 1)",Ub=(e$,eI)=>e$?eI?`${e$} ${eI}`:e$:eI??"",Wb=(...e$)=>{let eI=e$.filter(Boolean);if(eI.length)return Object.assign({},...eI)},Gb=(e$,eI,eR,eL)=>{if(eR.get(e$)===eI)return e$;let ez=eL.get(e$);return ez||(ez=(e$.ownerDocument??document).createComment("rue-segmented-managed-anchor"),e$.appendChild(ez),eL.set(e$,ez)),(0,t.renderAnchor)(null==eI?null:r(e.Fragment,{children:eI}),e$,ez),eR.set(e$,eI),e$},Kb=(e$,eI,eR)=>{if(!eI.has(e$))return;let eL=eR.get(e$);eL&&(0,t.renderAnchor)(null,e$,eL),eI.delete(e$)},qb=e$=>void 0===e$?"__undefined__":null===e$?"__null__":`${typeof e$}:${String(e$)}`,Jb=e$=>!!e$&&"object"==typeof e$&&!Array.isArray(e$)&&"value"in e$,Yb=e$=>"string"==typeof e$?e$:e$&&"object"==typeof e$&&null!=e$.title?String(e$.title):void 0,Xb=(e$,eI)=>"horizontal"===e$||"vertical"===e$?e$:eI?"vertical":"horizontal",Zb=e$=>{switch(e$){case"small":case"sm":return{trackClassName:"gap-1 p-1",itemClassName:"min-h-8 px-3 text-xs",iconClassName:"size-3.5"};case"large":case"lg":return{trackClassName:"gap-1.5 p-1.5",itemClassName:"min-h-12 px-5 text-base",iconClassName:"size-5"};default:return{trackClassName:"gap-1.5 p-1.5",itemClassName:"min-h-10 px-4 text-sm",iconClassName:"size-4"}}},Qb=e$=>"round"===e$?{root:"rounded-[999px]",item:"rounded-[999px]"}:{root:"rounded-[1.35rem]",item:"rounded-[1rem]"},$b=e$=>(e$??[]).map(e$=>{if(!Jb(e$))return{value:e$,label:e$,disabled:!1};let eI=Object.prototype.hasOwnProperty.call(e$,"label");return{value:e$.value,label:eI?e$.label:null==e$.icon?e$.value:null,icon:e$.icon,disabled:!!e$.disabled,className:e$.className,style:e$.style,title:e$.title,tooltip:e$.tooltip,ariaLabel:e$.ariaLabel}}),ex=(e$,eI)=>{let eR=qb(eI);return e$.find(e$=>qb(e$.value)===eR)},tx=e$=>e$.find(e$=>!e$.disabled)??e$[0],nx=(e$,eI,eR)=>ex(eI,e$)?.value??ex(eI,eR)?.value??tx(eI)?.value,rx=(e$,eI)=>{if(e$)return"function"==typeof e$?e$({props:eI}):e$},ix=e$=>e$.ariaLabel?e$.ariaLabel:"string"==typeof e$.label||"number"==typeof e$.label?String(e$.label):e$.title?e$.title:String(e$.value),ax=e$=>{let eI=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let{options:eI=[],value:eR,defaultValue:eL,disabled:ez=!1,block:eW=!1,size:eH="middle",vertical:eF,orientation:eP,shape:eB="default",name:eK,className:eV,style:eq,classNames:eU,styles:eG,onChange:eZ,...eY}=e$,eX=(0,t._$vaporWithHookId)("ref:1:0",()=>(0,t.ref)(`rue-segmented-${++Bb}`)),eJ=(0,t._$vaporWithHookId)("useRef:1:1",()=>(0,t.useRef)()),eQ=(0,t._$vaporWithHookId)("useRef:1:2",()=>(0,t.useRef)()),e0=(0,t._$vaporWithHookId)("useRef:1:3",()=>(0,t.useRef)()),e1=(0,t._$vaporWithHookId)("useRef:1:4",()=>(0,t.useRef)()),e2=(0,t._$vaporWithHookId)("useRef:1:5",()=>(0,t.useRef)()),e5=(0,t._$vaporWithHookId)("useRef:1:6",()=>(0,t.useRef)()),e3=(0,t._$vaporWithHookId)("useRef:1:7",()=>(0,t.useRef)()),e4=(0,t._$vaporWithHookId)("useRef:1:8",()=>(0,t.useRef)()),e6=$b(eI),e8=(0,t._$vaporWithHookId)("ref:1:9",()=>(0,t.ref)(e6)),e7=(0,t._$vaporWithHookId)("ref:1:10",()=>(0,t.ref)(nx(void 0,e8.value,eL??eR))),e9=(0,t._$vaporWithHookId)("ref:1:11",()=>(0,t.ref)(void 0===eR?"__uncontrolled__":qb(eR))),t$=(0,t._$vaporWithHookId)("ref:1:12",()=>(0,t.ref)(!1)),tI=(0,t._$vaporWithHookId)("ref:1:13",()=>(0,t.ref)(!1)),tR=(0,t._$vaporWithHookId)("computed:1:14",()=>(0,t.computed)(()=>rx(eU,e$)??{})),tL=(0,t._$vaporWithHookId)("computed:1:15",()=>(0,t.computed)(()=>rx(eG,e$)??{})),tz=Zb(eH),tW=Qb(eB),tH=Xb(eP,eF),tF=e7.value,tP=qb(tF),tB=eK??eX.value;e2.current||(e2.current=new Set),e5.current||(e5.current=new WeakMap),e3.current||(e3.current=new WeakMap),e4.current||(e4.current=new WeakMap);let tK=()=>{void 0!==e0.current&&(clearTimeout(e0.current),e0.current=void 0),void 0!==e1.current&&"function"==typeof cancelAnimationFrame&&(cancelAnimationFrame(e1.current),e1.current=void 0)},tV=()=>{let e$=eJ.current;if(!e$)return;let eI=new Set,eR=e5.current,eL=e3.current,ez=e4.current;e8.value.forEach(eW=>{let eH=e$.querySelector(`button[data-rue-segmented-value="${qb(eW.value)}"]`);if(!eH)return;let eF=eH.querySelector('[data-rue-segmented-icon-host="true"]'),eP=eH.querySelector('[data-rue-segmented-label-host="true"]');eF&&eI.add(Gb(eF,eW.icon,eR,ez)),eP&&eI.add(Gb(eP,eW.label,eL,ez))}),e2.current.forEach(e$=>{eI.has(e$)||("icon"===e$.dataset.rueSegmentedManagedKind?Kb(e$,eR,ez):Kb(e$,eL,ez))}),e2.current=eI},tq=()=>{tV(),tX()},tU=()=>{"function"==typeof queueMicrotask?queueMicrotask(tq):Promise.resolve().then(tq)},tG=()=>{let eI=e8.value;if(void 0!==e$.value){e9.value=qb(e$.value),e7.value=ex(eI,e$.value)?.value??tx(eI)?.value;return}e9.value="__uncontrolled__",e7.value=nx(e7.value,eI,e$.defaultValue)},tZ=e$=>{let eI=eJ.current;if(!eI)return;let eR=eI.querySelector('[data-rue-segmented-thumb="true"]');if(!eR||!e$){eR&&(eR.style.opacity="0");return}let eL=eI.getBoundingClientRect(),ez=e$.getBoundingClientRect(),eW=Math.max(0,ez.left-eL.left),eH=Math.max(0,ez.top-eL.top);eR.style.opacity="1",eR.style.width=`${ez.width}px`,eR.style.height=`${ez.height}px`,eR.style.transform=`translate3d(${eW}px, ${eH}px, 0)`},tY=e$=>{if(eQ.current&&(eQ.current.disconnect(),eQ.current=void 0),!e$||typeof ResizeObserver>"u")return;let eI=new ResizeObserver(()=>{tX()});eI.observe(e$),eQ.current=eI},tX=()=>{let eI=eJ.current;if(!eI)return;let eR=!!e$.disabled,eL=e$.name??eX.value,ez=qb(e7.value),eW=eI.querySelector('input[data-rue-segmented-hidden="true"]');eW&&(eW.name=eL,eW.value=null==e7.value?"":String(e7.value),eW.disabled=eR);let eH=Array.from(eI.querySelectorAll("button[data-rue-segmented-value]")),eF=null;(eH.forEach(e$=>{let eI=e$.dataset.rueSegmentedValue===ez,eL=eR||"true"===e$.dataset.rueSegmentedOptionDisabled;eI&&(eF=e$),e$.dataset.state=eI?"checked":"unchecked",e$.dataset.disabled=eL?"true":"false",e$.setAttribute("aria-checked",eI?"true":"false"),eL?e$.setAttribute("aria-disabled","true"):e$.removeAttribute("aria-disabled"),e$.disabled=eL}),t$.value)?tI.value||tZ(eF):tZ(null)};(0,t.onMounted)(()=>{tY(eJ.current??null),tU()}),(0,t.onUpdated)(()=>{tq()}),(0,t.onUnmounted)(()=>{tK(),e2.current?.forEach(e$=>{"icon"===e$.dataset.rueSegmentedManagedKind?Kb(e$,e5.current,e4.current):Kb(e$,e3.current,e4.current)}),e2.current?.clear(),eQ.current?.disconnect(),eQ.current=void 0}),(0,t._$vaporWithHookId)("watch:1:16",()=>(0,t.watch)(()=>e7.value,()=>{tU()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:17",()=>(0,t.watch)(()=>e$.options,e$=>{e8.value=$b(e$),tG(),tU()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:18",()=>(0,t.watch)(()=>e$.value,()=>{tG(),tU()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:19",()=>(0,t.watch)(()=>e$.defaultValue,()=>{void 0===e$.value&&(tG(),tU())},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:20",()=>(0,t.watch)(()=>e$.disabled,()=>{tU()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:21",()=>(0,t.watch)(()=>e$.name,()=>{tU()},{immediate:!0}));let tJ=Ub("rue-segmented relative isolate inline-flex max-w-full overflow-hidden border border-base-300/70 bg-base-200/75 text-base-content shadow-[inset_0_1px_0_rgba(255,255,255,0.6)] backdrop-blur-sm",tz.trackClassName);tJ=Ub(tJ,tW.root),tJ=Ub(tJ,"vertical"===tH?"flex-col items-stretch":"flex-row items-stretch"),eW&&(tJ=Ub(tJ,"w-full")),ez&&(tJ=Ub(tJ,"opacity-80")),tJ=Ub(tJ,tR.get().root),tJ=Ub(tJ,eV);let tQ="pointer-events-none absolute left-0 top-0 opacity-0 border border-base-100/90 bg-base-100 shadow-[0_14px_30px_-22px_rgba(15,23,42,0.7),0_1px_0_rgba(255,255,255,0.75)_inset] transition-[transform,width,height,opacity] will-change-transform";return tQ=Ub(tQ,tW.item),{options:eI,value:eR,defaultValue:eL,disabled:ez,block:eW,size:eH,vertical:eF,orientation:eP,shape:eB,name:eK,className:eV,style:eq,classNames:eU,styles:eG,onChange:eZ,rest:eY,generatedNameRef:eX,rootRef:eJ,resizeObserverRef:eQ,thumbHideTimerRef:e0,thumbFrameRef:e1,managedHostsRef:e2,iconHostCacheRef:e5,labelHostCacheRef:e3,hostAnchorsRef:e4,normalizedOptions:e6,normalizedOptionsRef:e8,uncontrolledValueRef:e7,controlledValueSignatureRef:e9,thumbVisibleRef:t$,thumbAnimatingRef:tI,semanticClassNames:tR,semanticStyles:tL,sizeConfig:tz,shapeConfig:tW,mergedOrientation:tH,activeValue:tF,activeSerializedValue:tP,mergedName:tB,clearThumbMotion:tK,syncManagedContent:tV,flushManagedDomSync:tq,scheduleSyncDom:tU,syncControlledStateFromProps:tG,syncThumbFromElement:tZ,connectResizeObserver:tY,syncDom:tX,handleSelect:(eI,eR)=>{if(e$.disabled||eR||qb(eI)===qb(e7.value))return;let eL=qb(e7.value),ez=qb(eI),eW=eJ.current?.querySelector(`button[data-rue-segmented-value="${eL}"]`),eH=eJ.current?.querySelector(`button[data-rue-segmented-value="${ez}"]`);if(tK(),eW&&eH&&eW!==eH?(t$.value=!0,tI.value=!0,tZ(eW)):(t$.value=!1,tI.value=!1),e7.value=eI,tX(),eZ&&eZ(eI),eW&&eH&&eW!==eH){let e$=()=>{e1.current=void 0,tI.value=!1,tZ(eH),e0.current=setTimeout(()=>{t$.value=!1,tX(),e0.current=void 0},Vb)};"function"==typeof requestAnimationFrame?e1.current=requestAnimationFrame(e$):e0.current=setTimeout(()=>{e0.current=void 0,e$()},16)}tU()},rootClassName:tJ,thumbClassName:tQ}})),{disabled:eR,block:eL,size:ez,shape:eW,name:eH,style:eF,rootRef:eP,normalizedOptions:eB,semanticClassNames:eK,semanticStyles:eV,sizeConfig:eq,shapeConfig:eU,mergedOrientation:eG,activeValue:eZ,activeSerializedValue:eY,mergedName:eX,handleSelect:eJ}=eI,{rootClassName:eQ,thumbClassName:e0}=eI;return(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("div",e$),e1=(0,t._$vaporBindUseRef)(eI,()=>eP);(0,t.onBeforeUnmount)(()=>{e1()}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eI,String(eQ))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eI,Wb(eV.get().root,eF))}),(0,t._$setAttribute)(eI,"role","radiogroup"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eI,"aria-disabled",String(eR?"true":void 0))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eI,"data-orientation",String(eG))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eI,"data-shape",String(eW))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eI,"data-size",String(ez))});let e2=(0,t._$createElement)("span",eI);(0,t._$appendChild)(eI,e2),(0,t._$setAttribute)(e2,"aria-hidden","true"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(e2,String(e0))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(e2,{transitionDuration:`${Vb}ms`,transitionTimingFunction:Hb})}),(0,t._$setAttribute)(e2,"data-rue-segmented-thumb","true");let e5=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eI,e5),(0,t.watchEffect)(()=>{let e$=eH?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("input",e$);return(0,t._$appendChild)(e$,eI),(0,t._$setAttribute)(eI,"type","hidden"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eI,"name",String(eX))}),(0,t.watchEffect)(()=>{(0,t._$setValue)(eI,null==eZ?"":String(eZ))}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eI,eR)}),(0,t._$setAttribute)(eI,"data-rue-segmented-hidden","true"),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,e5))}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let e3=(0,t._$createComment)("rue:list:start"),e4=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eI,e3),(0,t._$appendChild)(eI,e4);let e6=new Map;return(0,t.watchEffect)(()=>{e6=(0,t._$vaporKeyedList)({items:eB||[],getKey:(e$,eI)=>qb(e$.value)||`segmented-option-${eI}`,elements:e6,parent:e3.parentNode,before:e4,start:e3,renderItem:(e$,eI,ez,eW,eH)=>{let eF,eP,eB,eZ,eX,eQ,e0,e1,e2,e5;(0,t.renderBetween)((eF=qb(e$.value)===eY,eP=eR||e$.disabled,eB=Yb(e$.tooltip)??e$.title,eZ=e$.label??String(e$.value),eX=null!=e$.label,eQ=null!=e$.icon&&!eX,e0=Ub("relative z-[1] inline-flex w-full select-none items-center justify-center gap-2 overflow-hidden border font-medium leading-tight transition duration-200 ease-out focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/25",eq.itemClassName),e0=Ub(e0,eU.item),e0=Ub(e0,"vertical"===eG?"justify-start text-left":"text-center"),e0=Ub(e0,eQ?"gap-0":void 0),e0=Ub(e0,eL||"vertical"===eG?"w-full":"min-w-[3.5rem]"),eL&&"vertical"!==eG&&(e0=Ub(e0,"flex-1")),e0=Ub(e0,"data-[state=checked]:border-base-100/90 data-[state=checked]:bg-base-100 data-[state=checked]:text-base-content data-[state=checked]:shadow-[0_14px_30px_-22px_rgba(15,23,42,0.7),0_1px_0_rgba(255,255,255,0.75)_inset] data-[state=unchecked]:border-transparent data-[state=unchecked]:text-base-content/70 data-[state=unchecked]:hover:border-base-100/70 data-[state=unchecked]:hover:bg-base-100/65 data-[state=unchecked]:hover:text-base-content"),e0=Ub(e0,"data-[disabled=false]:cursor-pointer data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-40"),e0=Ub(e0,eK.get().item),e0=Ub(e0,e$.className),e1=Ub("inline-flex shrink-0 items-center justify-center opacity-85",eq.iconClassName),e2="string"==typeof e$.label||"number"==typeof e$.label,e5=Ub("vertical"===eG||null==e$.icon?"min-w-0 flex-1":"min-w-0","vertical"===eG?"text-left":"text-center"),e5=Ub(e5,e2&&"vertical"!==eG?"whitespace-nowrap":"whitespace-normal"),i("button",{type:"button",role:"radio","aria-checked":eF?"true":"false","aria-disabled":eP?"true":void 0,"aria-label":ix(e$),title:eB,className:e0,style:Wb(eV.get().item,e$.style),"data-state":eF?"checked":"unchecked","data-disabled":eP?"true":"false","data-rue-segmented-value":qb(e$.value),"data-rue-segmented-option-disabled":e$.disabled?"true":"false",onClick:()=>{eJ(e$.value,eP)},children:[null==e$.icon?null:r("span",{className:Ub(e1,eK.get().icon),style:eV.get().icon,"data-rue-segmented-icon-host":"true","data-rue-segmented-managed-kind":"icon"}),eX?r("span",{className:Ub(e5,eK.get().label),style:eV.get().label,"data-rue-segmented-label-host":"true","data-rue-segmented-managed-kind":"label"}):r("span",{className:"sr-only",children:eZ})]},qb(e$.value)||`segmented-option-${eH}`)),eI,ez,eW)}})}),eI})},ox=(...e$)=>e$.filter(Boolean).join(" "),sx=(e$,eI,eR)=>Number.isNaN(e$)?eI:Math.min(Math.max(e$,eI),eR),cx=e$=>e$&&Number.isFinite(e$)&&!(e$<=0)?Math.max(1,Math.floor(e$)):1,lx=(e$,eI=2)=>String(e$).padStart(eI,"0"),ux=e$=>e$.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),dx=()=>{let e$=globalThis;return e$.__rue_active??e$.__rue},fx=(e$,eI)=>{if("object"!=typeof e$&&"function"!=typeof e$||null==e$)return eI();let eR=globalThis,eL=Object.prototype.hasOwnProperty.call(eR,"__rue_active"),ez=eR.__rue_active;eR.__rue_active=e$;try{return eI()}finally{eL?eR.__rue_active=ez:delete eR.__rue_active}},px=e$=>{switch(e$){case"small":return"sm";case"middle":case"medium":return"md";case"large":return"lg";default:return e$}},mx=e$=>{switch(e$){case"filled":return"border-transparent bg-base-200/70 shadow-none focus-within:bg-base-100";case"borderless":return"input-ghost border-transparent bg-transparent shadow-none";case"ghost":return"input-ghost";default:return}},hx=e$=>{switch(e$){case"warning":return"input-warning";case"error":return"input-error";default:return}},gx=({status:e$,size:eI,variant:eR,className:eL})=>{let ez="input flex w-full items-center gap-2",eW=px(eI),eH=mx(eR),eF=hx(e$);return eW&&(ez+=` input-${eW}`),eH&&(ez+=` ${eH}`),eF&&(ez+=` ${eF}`),eL&&(ez+=` ${eL}`),ez},_x=(e$,eI)=>ox("absolute z-30 min-w-[20rem] max-w-[min(92vw,30rem)] rounded-2xl border border-base-300 bg-base-100 p-3 shadow-[0_24px_60px_-32px_rgba(15,23,42,0.55)]",e$.startsWith("top")?"bottom-full mb-2":"top-full mt-2",e$.endsWith("Right")?"right-0":"left-0",eI),vx=(e$,eI)=>e$&&e$.trim()?e$:eI?"h:mm:ss a":"HH:mm:ss",yx=(e$,eI)=>eI.test(e$),bx=(e$,eI)=>{let eR=["hour"];return yx(e$,/m/)&&eR.push("minute"),yx(e$,/s/)&&eR.push("second"),(eI||yx(e$,/a|A/))&&eR.push("meridiem"),eR},xx=e$=>e$>=12?"pm":"am",Sx=e$=>{let eI=e$%12;return 0===eI?12:eI},Cx=(e$,eI)=>{let eR=Sx(e$);return"am"===eI?12===eR?0:eR:12===eR?12:eR+12},wx=e$=>({hour:sx(e$.hour,0,23),minute:sx(e$.minute,0,59),second:sx(e$.second,0,59)}),Tx=(e$,eI)=>!e$&&!eI||!!e$&&!!eI&&e$.hour===eI.hour&&e$.minute===eI.minute&&e$.second===eI.second,Ex=e$=>3600*e$.hour+60*e$.minute+e$.second,Dx=e$=>{let eI=/(HH|H|hh|h|mm|m|ss|s|A|a)/g,eR=[],eL=[],ez=0,eW=null;for(eW=eI.exec(e$);eW;){let[eH]=eW;switch(eR.push(ux(e$.slice(ez,eW.index))),eH){case"HH":case"hh":eR.push("(\\d{2})");break;case"H":case"h":case"mm":case"m":case"ss":case"s":eR.push("(\\d{1,2})");break;case"A":case"a":eR.push("([aApP][mM])");break;default:eR.push(ux(eH))}eL.push(eH),ez=eW.index+eH.length,eW=eI.exec(e$)}return eR.push(ux(e$.slice(ez))),{regex:RegExp(`^${eR.join("")}$`,"i"),tokens:eL}},Ox=(e$,eI,eR)=>{let eL=null==e$?"":String(e$).trim();if(!eL)return null;let{regex:ez,tokens:eW}=Dx(eI),eH=ez.exec(eL);if(!eH)return null;let eF=0,eP=0,eB=0,eK=null;if(eW.forEach((e$,eI)=>{let eR=eH[eI+1]??"";switch(e$){case"HH":case"H":case"hh":case"h":eF=Number(eR);break;case"mm":case"m":eP=Number(eR);break;case"ss":case"s":eB=Number(eR);break;case"A":case"a":eK="pm"===eR.toLowerCase()?"pm":"am"}}),!Number.isFinite(eF)||!Number.isFinite(eP)||!Number.isFinite(eB))return null;if(eR||eW.includes("hh")||eW.includes("h")||eK){if(eF<1||eF>12)return null;eF=Cx(eF,eK??"am")}return eF<0||eF>23||eP<0||eP>59||eB<0||eB>59?null:{hour:eF,minute:eP,second:eB}},kx=(e$,eI)=>eI.replace(/HH|H|hh|h|mm|m|ss|s|A|a/g,eI=>{switch(eI){case"HH":return lx(e$.hour);case"H":return String(e$.hour);case"hh":return lx(Sx(e$.hour));case"h":return String(Sx(e$.hour));case"mm":return lx(e$.minute);case"m":return String(e$.minute);case"ss":return lx(e$.second);case"s":return String(e$.second);case"A":return xx(e$.hour).toUpperCase();case"a":return xx(e$.hour);default:return eI}}),Ax=(e$,eI)=>e$?{hour:e$.hour,minute:e$.minute,second:e$.second,meridiem:xx(e$.hour),text:kx(e$,eI)}:null,jx=(e$,eI)=>{let eR=cx(eI),eL=[];for(let eI=0;eI<=e$;eI+=eR)eL.push(eI);return!eL.includes(e$)&&59===e$&&eR>1&&60%eR!=0&&eL.push(e$),eL},Mx=e$=>e$.find(e$=>!e$.disabled),Nx=(e$,eI)=>eI?e$.filter(e$=>!e$.disabled):e$,Px=(e$,eI)=>eI.disabledTime?.(Ax(e$,eI.format)),Fx=(e$,eI,eR=!0)=>{let eL=Px(e$,eI),ez=new Set(eL?.disabledHours?.()??[]),eW=jx(23,eI.hourStep);return Nx([{key:"am",value:"am",label:"AM",disabled:!eW.some(e$=>e$<12&&!ez.has(e$))},{key:"pm",value:"pm",label:"PM",disabled:!eW.some(e$=>e$>=12&&!ez.has(e$))}],eR&&eI.hideDisabledOptions)},Ix=(e$,eI,eR=!0)=>{let eL=Px(e$,eI),ez=new Set(eL?.disabledHours?.()??[]),eW=jx(23,eI.hourStep),eH=xx(e$.hour);return Nx((eI.use12Hours?eW.filter(e$=>xx(e$)===eH):eW).map(e$=>({key:`hour-${e$}`,value:e$,label:eI.use12Hours?lx(Sx(e$)):lx(e$),disabled:ez.has(e$)})),eR&&eI.hideDisabledOptions)},Lx=(e$,eI,eR=!0)=>{let eL=Px(e$,eI),ez=new Set(eL?.disabledMinutes?.(e$.hour)??[]);return Nx(jx(59,eI.minuteStep).map(e$=>({key:`minute-${e$}`,value:e$,label:lx(e$),disabled:ez.has(e$)})),eR&&eI.hideDisabledOptions)},Rx=(e$,eI,eR=!0)=>{let eL=Px(e$,eI),ez=new Set(eL?.disabledSeconds?.(e$.hour,e$.minute)??[]);return Nx(jx(59,eI.secondStep).map(e$=>({key:`second-${e$}`,value:e$,label:lx(e$),disabled:ez.has(e$)})),eR&&eI.hideDisabledOptions)},zx=(e$,eI,eR,eL=!0)=>{switch(e$){case"hour":return Ix(eI,eR,eL);case"minute":return Lx(eI,eR,eL);case"second":return Rx(eI,eR,eL);case"meridiem":return Fx(eI,eR,eL);default:return[]}},Bx=(e$,eI)=>{let eR=wx(e$);if(eI.use12Hours){let e$=Fx(eR,eI,!1),eL=xx(eR.hour),ez=e$.find(e$=>e$.value===eL&&!e$.disabled)??Mx(e$);ez&&(eR.hour=Cx(eR.hour,ez.value))}let eL=Ix(eR,eI,!1).find(e$=>e$.value===eR.hour&&!e$.disabled)??Mx(Ix(eR,eI,!1));eL&&(eR.hour=eL.value);let ez=Lx(eR,eI,!1).find(e$=>e$.value===eR.minute&&!e$.disabled)??Mx(Lx(eR,eI,!1));ez&&(eR.minute=ez.value);let eW=Rx(eR,eI,!1).find(e$=>e$.value===eR.second&&!e$.disabled)??Mx(Rx(eR,eI,!1));return eW&&(eR.second=eW.value),eR},Vx=()=>{let e$=new Date;return{hour:e$.getHours(),minute:e$.getMinutes(),second:e$.getSeconds()}},Hx=(e$,eI,eR)=>"meridiem"===eI?{...e$,hour:Cx(e$.hour,eR)}:{...e$,[eI]:Number(eR)},Ux=e$=>{switch(e$){case"hour":return"时";case"minute":return"分";case"second":return"秒";case"meridiem":return"时段";default:return""}},Wx=(e$,eI)=>"meridiem"===e$?xx(eI.hour):eI[e$],Gx=(e$,eI,eR)=>Bx(Ox(eI,eR.format,eR.use12Hours)??e$??Vx(),eR),Kx=(e$,eI,eR,eL)=>{let ez=Ox(e$,eR,eL),eW=Ox(eI,eR,eL);return ez&&eW?Ex(ez)-Ex(eW):0},qx=e$=>Array.isArray(e$)?[e$[0]??null,e$[1]??null]:[null,null],Jx=(e$,eI)=>e$[0]===eI[0]&&e$[1]===eI[1],Yx=e$=>Array.isArray(e$)?[!!e$[0],!!e$[1]]:[!!e$,!!e$],Xx=e$=>Array.isArray(e$)?[e$[0]??"开始时间",e$[1]??"结束时间"]:e$?[e$,e$]:["开始时间","结束时间"],Zx=e$=>Array.isArray(e$)?[e$[0]??null,e$[1]??null]:[e$??null,e$??null],Qx=({children:e$})=>r("span",{className:"join-item inline-flex items-center border border-base-300 bg-base-200 px-3 text-sm text-base-content/65",children:e$}),$x=()=>r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4","aria-hidden":"true",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m7 7 10 10M17 7 7 17"})}),eS=({iconRef:e$})=>i("svg",{ref:e$,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:"size-4 transition-transform duration-150","aria-hidden":"true",children:[r("circle",{cx:"12",cy:"12",r:"8"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 7.5v5l3 1.8"})]}),tS=({value:e$,defaultValue:eI,defaultOpenValue:eR,open:eL,defaultOpen:ez=!1,disabled:eW,allowClear:eH,clearLabel:eF="清空时间",format:eP,use12Hours:eB=!1,hourStep:eK=1,minuteStep:eV=1,secondStep:eq=1,hideDisabledOptions:eU=!1,inputReadOnly:eG=!1,needConfirm:eZ=!1,showNow:eY=!0,nowLabel:eX="此刻",confirmLabel:eJ="确定",changeOnScroll:eQ=!1,placeholder:e0="请选择时间",placement:e1="bottomLeft",status:e2,variant:e5,size:e3,prefix:e4,suffixIcon:e6,addonBefore:e8,addonAfter:e7,renderExtraFooter:e9,disabledTime:t$,cellRender:tI,rootClassName:tR,popupClassName:tL,panelClassName:tz,inputClassName:tW,className:tH,onChange:tF,onCalendarChange:tP,onOpenChange:tB,onInput:tK,onFocus:tV,onBlur:tq,...tU})=>{let tG=(0,e.useRef)(),tZ=(0,e.useRef)(),tY=(0,e.useRef)(),tX=(0,e.useRef)(),tJ=(0,e.useRef)(),tQ=(0,e.useRef)(),t0=(0,e.useRef)(),t1=(0,e.useRef)(!1),t2=tU.ref,t5=void 0!==eL,t3=vx(eP,eB),t4=bx(t3,eB),t6=(0,e.useRef)(t5?!!eL:!!ez),t8=(0,e.useRef)(void 0===e$?eI??"":e$??""),t7=(0,e.useRef)(null),t9=(0,e.useRef)(null),r$=(0,e.useRef)(),rI=()=>({format:t3,use12Hours:eB,hourStep:eK,minuteStep:eV,secondStep:eq,hideDisabledOptions:eU,disabledTime:t$}),rR=dx();"ref"in tU&&delete tU.ref;let rL=()=>{if(!tY.current)return;let e$=t8.current??"";tY.current.value!==e$&&(tY.current.value=e$)},rz=()=>{tQ.current?.classList.toggle("hidden",!(eH&&!eW&&(t8.current??"").length>0))},rW=()=>{let e$,eI=tX.current;if(!eI)return;let eR=!!t6.current&&!eW;eI.hidden=!eR,eI.classList.toggle("hidden",!eR),eI.setAttribute("aria-hidden",eR?"false":"true"),e$=!!t6.current&&!eW,tZ.current?.classList.toggle("ring",e$),tZ.current?.classList.toggle("ring-primary/15",e$),t0.current?.classList.toggle("scale-110",e$),rq()},rH=e$=>{t8.current=e$?kx(e$,t3):""},rF=e$=>{eW||(t5||(t6.current=e$),e$&&(t9.current=Gx(t7.current??null,eR,rI())),rW(),tB&&fx(rR,()=>{tB(e$)}))},rP=(e$,eI)=>{if(!tP)return;let eR=e$?kx(e$,t3):"";fx(rR,()=>{tP(eR||null,eR,{selection:Ax(e$,t3),source:eI})})},rB=(e$,eI)=>{let eR=e$?Bx(e$,rI()):null,eL=t7.current??null,ez=eL?kx(eL,t3):"",eW=eR?kx(eR,t3):"";t7.current=eR?{...eR}:null,rH(eR),rL(),rz(),t6.current&&("panel"===eI||"now"===eI)&&rq(),(ez!==eW||"clear"===eI)&&tF&&fx(rR,()=>{tF(eW||null,eW,{selection:Ax(eR,t3),source:eI})})},rK=()=>{let eL=Ox(void 0===e$?eI:e$,t3,eB),ez=eL?Bx(eL,rI()):null,eW=ez?kx(ez,t3):"",eH=void 0!==e$||!t6.current||!eZ,eF=eH?Gx(ez,eR,rI()):null,eP=!Tx(t7.current??null,ez),eK=(t8.current??"")!==eW,eV=eH&&!Tx(t9.current??null,eF);eP&&(t7.current=ez?{...ez}:null),eK&&(t8.current=eW),eV&&(t9.current=eF?{...eF}:null),rL(),rz(),rW()},rV=()=>t9.current??Gx(t7.current??null,eR,rI()),rq=()=>{(()=>{let e$=tJ.current;if(!e$)return;if(!(t6.current&&!eW))return fx(rR,()=>{(0,e.render)(null,e$)});let eI=rV();fx(rR,()=>{(0,e.render)(i("div",{className:ox("rounded-[1.1rem] bg-gradient-to-br from-base-100 via-base-100 to-base-200/55 p-1",tz),"data-rue-time-picker-popup-content":"true",children:[r("div",{className:"grid gap-2 px-2 pt-2",style:{gridTemplateColumns:`repeat(${t4.length}, minmax(0, 1fr))`},children:t4.map(e$=>{let eR=zx(e$,eI,rI(),!0),eL=Wx(e$,eI);return i("div",{className:"min-w-0 rounded-xl border border-base-300/70 bg-base-100/85 p-2",children:[r("div",{className:"mb-2 px-2 text-[11px] uppercase tracking-[0.2em] text-base-content/45",children:Ux(e$)}),r("div",{className:"max-h-56 space-y-1 overflow-y-auto pr-1",onWheel:eI=>{eQ&&(eI.preventDefault(),rQ(e$,eI.deltaY>0?1:-1))},children:eR.length?eR.map(eI=>{let eR=eI.value===eL;return r("button",{type:"button",disabled:eI.disabled,"aria-selected":eR?"true":"false","data-rue-time-selected":eR?"true":"false","data-rue-time-column":e$,"data-rue-time-option":String(eI.value),className:ox("flex w-full items-center justify-center rounded-lg border px-3 py-2 text-sm font-medium transition-colors duration-150",eI.disabled?"cursor-not-allowed border-transparent opacity-35":eR?"border-primary bg-primary text-primary-content shadow-[0_14px_28px_-20px_rgba(59,130,246,0.95)]":"border-transparent text-base-content/75 hover:bg-base-200"),onMouseDown:rJ,onClick:()=>rU(e$,eI.value),children:tI?tI(eI.value,{subType:e$,selected:eR,disabled:!!eI.disabled,label:eI.label}):eI.label},eI.key)}):r("div",{className:"px-2 py-6 text-center text-sm text-base-content/40",children:"暂无可选项"})})]},e$)})}),i("div",{className:"mt-3 border-t border-base-300/70 px-2 pt-3",children:[e9?r("div",{className:"mb-3 text-sm text-base-content/65",children:e9()}):null,i("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[r("div",{className:"text-xs text-base-content/45",children:eQ?"支持滚轮快速切换":"点击列表项完成选择"}),i("div",{className:"flex flex-wrap items-center gap-2",children:[eY?r("button",{type:"button",className:"btn btn-ghost btn-sm",onMouseDown:rJ,onClick:rG,children:eX}):null,eZ?r("button",{type:"button",className:"btn btn-primary btn-sm","data-rue-time-confirm":"true",onMouseDown:rJ,onClick:rX,children:eJ}):null]})]})]})]}),e$)})})()},rU=(e$,eI,eR="panel")=>{let eL=Bx(Hx(rV(),e$,eI),rI());t9.current={...eL},eZ&&rq(),rP(eL,eR),eZ||(rB(eL,eR),"panel"===eR&&setTimeout(()=>{!tY.current||eW||(t6.current||rF(!0),tY.current.ownerDocument.activeElement!==tY.current&&tY.current.focus())},0))},rG=()=>{let e$=Bx(Vx(),rI());t9.current={...e$},eZ&&rq(),rP(e$,"now"),eZ||rB(e$,"now")},rZ=()=>{t9.current=Gx(t7.current??null,eR,rI()),rq()},rY=()=>{let e$=(t8.current??"").trim();if(!e$){t9.current=Gx(null,eR,rI()),rB(null,"clear");return}let eI=Ox(e$,t3,eB);if(!eI){rH(t7.current??null),rZ(),rL(),rz();return}let eL=Bx(eI,rI());t9.current={...eL},rP(eL,"input"),rB(eL,"input")},rX=()=>{rB(t9.current??null,"confirm"),rF(!1)},rJ=e$=>{t1.current=!0,"function"==typeof e$.preventDefault&&e$.preventDefault()},rQ=(e$,eI)=>{if(!eQ)return;let eR=rV(),eL=zx(e$,eR,rI(),!0).filter(e$=>!e$.disabled);if(!eL.length)return;let ez=Wx(e$,eR),eW=eL.findIndex(e$=>e$.value===ez);rU(e$,eL[((eW>=0?eW:0)+eI+eL.length)%eL.length].value)};(0,e.onMounted)(()=>{if(rK(),rW(),rz(),typeof window>"u")return;let e$=eR=>{if(tG.current&&!tG.current.isConnected){window.removeEventListener("pointerdown",e$,!0),window.removeEventListener("keydown",eI);return}if(!t6.current)return;let eL=eR.target;eL&&(tG.current?.contains(eL)||(rY(),rF(!1)))},eI=eR=>{if(tG.current&&!tG.current.isConnected){window.removeEventListener("pointerdown",e$,!0),window.removeEventListener("keydown",eI);return}t6.current&&"Escape"===eR.key&&(rH(t7.current??null),rZ(),rF(!1))};window.addEventListener("pointerdown",e$,!0),window.addEventListener("keydown",eI),(0,e.onUnmounted)(()=>{r$.current&&clearTimeout(r$.current),window.removeEventListener("pointerdown",e$,!0),window.removeEventListener("keydown",eI)})}),(0,e.onUnmounted)(()=>{tJ.current&&(fx(rR,()=>{(0,e.render)(null,tJ.current)}),tJ.current=void 0)}),(0,e.watch)(()=>e$,()=>{rK()},{immediate:!0}),(0,e.watch)(()=>eI,()=>{void 0===e$&&rK()}),(0,e.watch)(()=>eL,()=>{void 0!==eL&&(t6.current=!!eL,rW())},{immediate:!0});let r0=void 0!==e8||void 0!==e7,r1=i("label",{ref:tZ,className:gx({status:e2,size:e3,variant:e5,className:ox(tH,r0?"join-item min-w-0 flex-1":void 0)}),"aria-disabled":eW?"true":void 0,"data-rue-time-picker":"true",children:[void 0===e4?null:r("span",{className:"shrink-0 text-sm text-base-content/60",children:e4}),r("input",{...tU,ref:e$=>{(tY.current=e$??void 0,"function"==typeof t2)?t2(e$):t2&&"object"==typeof t2&&(t2.current=e$??void 0)},type:"text",value:t8.current??"",disabled:eW,readOnly:eG,placeholder:e0,"aria-invalid":"error"===e2?"true":tU["aria-invalid"],className:ox("min-w-0 grow border-0 bg-transparent p-0 text-sm outline-none placeholder:text-base-content/40",tW),onClick:()=>rF(!0),onInput:e$=>{t8.current=e$.target?.value??"",rz(),tK&&fx(rR,()=>{tK(e$)})},onFocus:e$=>{t1.current=!1,r$.current&&(clearTimeout(r$.current),r$.current=void 0),rF(!0),tV&&fx(rR,()=>{tV(e$)})},onBlur:e$=>{tq&&fx(rR,()=>{tq(e$)}),r$.current=setTimeout(()=>{if(t1.current){t1.current=!1,tY.current?.focus();return}tG.current?.contains(document.activeElement)||(rY(),rF(!1))},0)},onKeyDown:e$=>{if("ArrowDown"===e$.key&&!t6.current){e$.preventDefault(),rF(!0);return}if("Escape"===e$.key){rH(t7.current??null),rZ(),rF(!1);return}if("Enter"===e$.key){if(e$.preventDefault(),eZ&&t6.current)return void rX();rY(),rF(!1)}}}),r("button",{ref:tQ,type:"button",tabIndex:-1,"aria-label":eF,className:"btn btn-ghost btn-xs btn-circle hidden h-7 min-h-0 w-7 shrink-0 p-0 text-base-content/55 hover:text-base-content","data-rue-time-clear":"true",onClick:e$=>{"function"==typeof e$.preventDefault&&e$.preventDefault(),"function"==typeof e$.stopPropagation&&e$.stopPropagation(),rB(null,"clear"),rZ(),rF(!1),tY.current?.focus()},children:(eH&&"object"==typeof eH?eH:void 0)?.clearIcon??r($x,{})}),r("span",{className:"shrink-0 text-base-content/55",children:e6??r(eS,{iconRef:t0})})]}),r2=r0?i("div",{className:"join w-full items-stretch",children:[void 0===e8?null:r(Qx,{children:e8}),r1,void 0===e7?null:r(Qx,{children:e7})]}):r1;return i("div",{ref:tG,className:ox("relative",tR),children:[r2,r("div",{ref:tX,role:"dialog","aria-label":"Time picker panel","aria-hidden":"true",className:ox(_x(e1,tL),"hidden"),"data-rue-time-picker-popup":"true",children:r("div",{ref:e$=>{tJ.current=e$??void 0,e$&&rq()}})})]})},nS=Object.assign(tS,{RangePicker:({value:e$,defaultValue:eI,defaultOpenValue:eR,disabled:eL,placeholder:ez,allowClear:eW,order:eH=!0,separator:eF,format:eP,use12Hours:eB,hourStep:eK,minuteStep:eV,secondStep:eq,hideDisabledOptions:eU,inputReadOnly:eG,needConfirm:eZ,showNow:eY,nowLabel:eX,confirmLabel:eJ,changeOnScroll:eQ,status:e0,variant:e1,size:e2,renderExtraFooter:e5,disabledTime:e3,rootClassName:e4,className:e6,pickerClassName:e8,startPickerClassName:e7,endPickerClassName:e9,onChange:t$,onCalendarChange:tI})=>{let tR=vx(eP,eB),tL=Xx(ez),tz=Yx(eL),tW=Zx(eR),tH=(0,e.ref)(0),tF=(0,e.ref)(qx(eI)),tP=()=>{tH.value+=1},tB=()=>void 0===e$?tF.value:qx(e$);(0,e.watch)(()=>e$,()=>{if(void 0!==e$){let eI=qx(e$);Jx(tF.value,eI)||(tF.value=eI,tP())}},{immediate:!0});let tK=(eI,eR,eL,ez=!1)=>{let eW=[...tB()];eW[eI]=eR,eH&&eW[0]&&eW[1]&&Kx(eW[0],eW[1],tR,eB)>0&&eW.reverse(),ez||void 0!==e$||(tF.value=eW,tP());let eF=[Ax(Ox(eW[0],tR,eB),tR),Ax(Ox(eW[1],tR,eB),tR)];if(ez){tI&&tI(eW,[eW[0]??"",eW[1]??""],{range:0===eI?"start":"end",values:eF});return}t$&&t$(eW,[eW[0]??"",eW[1]??""],{range:eL,values:eF})},tV=tB();return i("div",{className:ox("flex items-center gap-2",e4,e6),"data-rue-time-range-picker-version":String(tH.value),children:[r(tS,{value:tV[0],defaultOpenValue:tW[0],disabled:tz[0],placeholder:tL[0],allowClear:eW,format:tR,use12Hours:eB,hourStep:eK,minuteStep:eV,secondStep:eq,hideDisabledOptions:eU,inputReadOnly:eG,needConfirm:eZ,showNow:eY,nowLabel:eX,confirmLabel:eJ,changeOnScroll:eQ,status:e0,variant:e1,size:e2,renderExtraFooter:e5,disabledTime:e$=>e3?.(e$,"start"),className:ox("min-w-0 flex-1",e8,e7),onChange:e$=>{tK(0,e$,e$?"start":"clear")},onCalendarChange:e$=>{tK(0,e$,"start",!0)}}),r("span",{className:"shrink-0 text-sm text-base-content/45",children:eF??"至"}),r(tS,{value:tV[1],defaultOpenValue:tW[1],disabled:tz[1],placeholder:tL[1],allowClear:eW,format:tR,use12Hours:eB,hourStep:eK,minuteStep:eV,secondStep:eq,hideDisabledOptions:eU,inputReadOnly:eG,needConfirm:eZ,showNow:eY,nowLabel:eX,confirmLabel:eJ,changeOnScroll:eQ,status:e0,variant:e1,size:e2,renderExtraFooter:e5,disabledTime:e$=>e3?.(e$,"end"),className:ox("min-w-0 flex-1",e8,e9),onChange:e$=>{tK(1,e$,e$?"end":"clear")},onCalendarChange:e$=>{tK(1,e$,"end",!0)}})]})}}),rS=e$=>"string"==typeof e$.label||"number"==typeof e$.label?e$.label:fS(e$.record,e$.key),iS={titles:["待选择","已加入"],notFoundContent:"暂无条目",searchPlaceholder:"搜索条目",itemUnit:"项",itemsUnit:"项",remove:"移出",selectAll:"全选",deselectAll:"取消全选",selectInvert:"反选",clearSelection:"清空选择",removeSelected:"移出已选"},aS="Reentrant render detected on the same target. This usually means render logic triggered a nested render or state update while that target was already rendering.",oS=(e$,eI)=>e$?eI?`${e$} ${eI}`:e$:eI??"",sS=e$=>`${typeof e$}:${String(e$)}`,cS=e$=>{let eI=[],eR=new Set;return(e$??[]).forEach(e$=>{let eL=sS(e$);eR.has(eL)||(eR.add(eL),eI.push(e$))}),eI},lS=(e$,eI)=>{let eR=sS(eI);return e$.some(e$=>sS(e$)===eR)},uS=(e$,eI)=>{let eR=new Set(eI.map(sS));return e$.filter(e$=>!eR.has(sS(e$)))},dS=e$=>null==e$||"boolean"==typeof e$?"":"string"==typeof e$||"number"==typeof e$?String(e$):Array.isArray(e$)?e$.map(e$=>dS(e$)).filter(Boolean).join(" "):"object"==typeof e$?["value","title","label","name","description","text","children"].map(eI=>dS(e$[eI])).filter(Boolean).join(" "):"",fS=(e$,eI)=>[e$?.title,e$?.label,e$?.name,e$?.text,e$?.description].find(e$=>null!=e$)??String(eI),pS=(e$,eI,eR)=>{let eL=eR?eR(e$):void 0;return eL&&"object"==typeof eL&&!Array.isArray(eL)&&"label"in eL?{label:eL.label,description:eL.description,searchText:dS(eL.value)||dS(eL.label)||dS(e$?.description)||dS(fS(e$,eI))}:null==eL?{label:fS(e$,eI),description:e$?.description,searchText:[dS(e$?.title),dS(e$?.label),dS(e$?.name),dS(e$?.description),dS(eI)].filter(Boolean).join(" ")}:{label:eL,description:e$?.description,searchText:dS(eL)||dS(e$?.description)||dS(fS(e$,eI))}},mS=(e$,eI,eR)=>"function"==typeof eR?eR(e$):e$?.key!==void 0&&e$?.key!==null?e$.key:eI,hS=(e$,eI,eR)=>{let eL=new Set;return(e$??[]).flatMap((e$,ez)=>{let eW=mS(e$,ez,eI),eH=sS(eW);if(eL.has(eH))return[];eL.add(eH);let eF=pS(e$,eW,eR);return[{key:eW,keyText:eH,record:e$,disabled:!!e$?.disabled,label:eF.label,description:eF.description,searchText:eF.searchText}]})},gS=(e$,eI)=>{let eR=e$??eI??iS.titles;return[eR[0]??iS.titles[0],eR[1]??iS.titles[1]]},_S=(e$,eI)=>Array.isArray(e$)?e$[+("left"!==eI)]??iS.notFoundContent:e$??iS.notFoundContent,vS=e$=>e$?"object"==typeof e$?{enabled:!0,placeholder:e$.placeholder??iS.searchPlaceholder,defaultValue:e$.defaultValue??""}:{enabled:!0,placeholder:iS.searchPlaceholder,defaultValue:""}:{enabled:!1,placeholder:iS.searchPlaceholder,defaultValue:""},yS=e$=>e$?!0===e$?{pageSize:10}:{pageSize:Math.max(1,Math.floor(e$.pageSize??10))}:null,bS=(e$,eI)=>{if(e$)return"function"==typeof e$?e$({direction:eI}):e$},xS=(e$,eI,eR)=>{let eL=[],ez=[];return e$.forEach(e$=>{let eW=sS(e$);eR.has(eW)&&(eI.has(eW)?ez.push(e$):eL.push(e$))}),{left:eL,right:ez}},SS=(e$,eI,eR,eL)=>{let ez=eI.trim();return ez?e$.filter(e$=>eL?eL(ez,e$.record,eR):e$.searchText.toLowerCase().includes(ez.toLowerCase())):e$},CS=(e$,eI,eR)=>{if(!eR)return{currentPage:1,pageCount:1,items:e$};let eL=Math.max(1,Math.ceil(e$.length/eR)),ez=Math.min(Math.max(eI,1),eL),eW=(ez-1)*eR;return{currentPage:ez,pageCount:eL,items:e$.slice(eW,eW+eR)}},wS=(e$,eI)=>1===e$?eI.itemUnit:eI.itemsUnit,TS=(e$,eI)=>"function"==typeof e$?e$(eI):e$,ES=e$=>{switch(e$){case"small":case"sm":return{inputClass:"input-sm",buttonClass:"btn-sm",checkboxSize:"sm",itemClass:"px-3 py-2 text-sm",panelMinHeightClass:"min-h-[19rem]"};case"large":case"lg":return{inputClass:"input-md",buttonClass:"btn-md",checkboxSize:"md",itemClass:"px-4 py-3.5 text-[0.95rem]",panelMinHeightClass:"min-h-[23rem]"};default:return{inputClass:"input-sm",buttonClass:"btn-sm",checkboxSize:"sm",itemClass:"px-3.5 py-2.5 text-sm",panelMinHeightClass:"min-h-[21rem]"}}},DS=e$=>{switch(e$){case"error":return"border-error/55 shadow-[0_0_0_1px_rgba(248,113,113,0.14)]";case"warning":return"border-warning/55 shadow-[0_0_0_1px_rgba(251,191,36,0.14)]";default:return""}},OS=e$=>"md"===e$?"checkbox checkbox-md":"checkbox checkbox-sm",kS=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.8"),(0,t._$setClassName)(eI,"size-4");let eR=(0,t._$createElement)("path",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","M5 12h14");let eL=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,eL),(0,t._$setAttribute)(eL,"strokeLinecap","round"),(0,t._$setAttribute)(eL,"strokeLinejoin","round"),(0,t._$setAttribute)(eL,"d","m13 6 6 6-6 6"),eI}),AS=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.8"),(0,t._$setClassName)(eI,"size-4");let eR=(0,t._$createElement)("path",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","M19 12H5");let eL=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,eL),(0,t._$setAttribute)(eL,"strokeLinecap","round"),(0,t._$setAttribute)(eL,"strokeLinejoin","round"),(0,t._$setAttribute)(eL,"d","m11 18-6-6 6-6"),eI}),jS=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.8"),(0,t._$setClassName)(eI,"size-3.5");let eR=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","M6 6l12 12M18 6 6 18"),eI}),MS=e$=>{let{sideIndex:eI,filteredItems:eR,pagedItems:eL,visibleItems:ez,visibleSelectableKeys:eW,visibleSelectedCount:eH,visibleAllSelected:eF,visiblePartiallySelected:eP,filteredSelectableKeys:eB,snapshot:eK,removableSelectedKeys:eV,listRenderProps:eq,selectionBadge:eU,panelClassName:eG,panelStyle:eZ,defaultListContent:eY}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let eI=(0,t._$vaporWithHookId)("computed:1:0",()=>(0,t.computed)(()=>+("left"!==e$.direction))),eR=(0,t._$vaporWithHookId)("computed:1:1",()=>(0,t.computed)(()=>SS(e$.rawItems,e$.searchValue,e$.direction,e$.filterOption))),eL=(0,t._$vaporWithHookId)("computed:1:2",()=>(0,t.computed)(()=>CS(eR.get(),e$.currentPage,e$.paginationPageSize))),ez=(0,t._$vaporWithHookId)("computed:1:3",()=>(0,t.computed)(()=>eL.get().items)),eW=(0,t._$vaporWithHookId)("computed:1:4",()=>(0,t.computed)(()=>ez.get().filter(eI=>!e$.disabled&&!eI.disabled).map(e$=>e$.key))),eH=(0,t._$vaporWithHookId)("computed:1:5",()=>(0,t.computed)(()=>eW.get().filter(eI=>lS(e$.sideSelectedKeys,eI)).length)),eF=(0,t._$vaporWithHookId)("computed:1:6",()=>(0,t.computed)(()=>eW.get().length>0&&eH.get()===eW.get().length)),eP=(0,t._$vaporWithHookId)("computed:1:7",()=>(0,t.computed)(()=>eH.get()>0&&!eF.get())),eB=(0,t._$vaporWithHookId)("computed:1:8",()=>(0,t.computed)(()=>eR.get().filter(eI=>!e$.disabled&&!eI.disabled).map(e$=>e$.key))),eK=(0,t._$vaporWithHookId)("computed:1:9",()=>(0,t.computed)(()=>e$.getTransferStateSnapshot()));return{sideIndex:eI,filteredItems:eR,pagedItems:eL,visibleItems:ez,visibleSelectableKeys:eW,visibleSelectedCount:eH,visibleAllSelected:eF,visiblePartiallySelected:eP,filteredSelectableKeys:eB,snapshot:eK,removableSelectedKeys:(0,t._$vaporWithHookId)("computed:1:10",()=>(0,t.computed)(()=>"right"===e$.direction?eK.get().targetItems.filter(e$=>lS(eK.get().targetSelectedKeys,e$.key)&&!e$.disabled).map(e$=>e$.key):[])),listRenderProps:(0,t._$vaporWithHookId)("computed:1:11",()=>(0,t.computed)(()=>({direction:e$.direction,disabled:!!e$.disabled,items:ez.get().map(e$=>({key:e$.key,record:e$.record,disabled:e$.disabled,label:rS(e$),description:e$.description,searchText:e$.searchText})),filteredItems:eR.get().map(e$=>({key:e$.key,record:e$.record,disabled:e$.disabled,label:rS(e$),description:e$.description,searchText:e$.searchText})),selectedKeys:e$.sideSelectedKeys,searchValue:e$.searchValue,onItemSelect:e$.onItemSelect,onItemSelectAll:e$.onItemSelectAll}))),selectionBadge:(0,t._$vaporWithHookId)("computed:1:12",()=>(0,t.computed)(()=>TS(e$.selectAllLabels[eI.get()],{selectedCount:eH.get(),totalCount:eW.get().length}))),panelClassName:(0,t._$vaporWithHookId)("computed:1:13",()=>(0,t.computed)(()=>oS(oS(`relative overflow-hidden rounded-[1.35rem] border border-base-300/70 bg-gradient-to-b from-base-100 via-base-100 to-base-200/35 shadow-[0_18px_40px_-32px_rgba(15,23,42,0.35)] ${e$.sizeConfig.panelMinHeightClass}`,DS(e$.status)),e$.classNames?.panel))),panelStyle:(0,t._$vaporWithHookId)("computed:1:14",()=>(0,t.computed)(()=>({...e$.styles?.panel,...bS(e$.listStyle,e$.direction)}))),defaultListContent:(0,t._$vaporWithHookId)("computed:1:15",()=>(0,t.computed)(()=>ez.get().length?r("ul",{role:"listbox","aria-multiselectable":"true",className:"space-y-2",children:ez.get().map(eI=>{let eR=lS(e$.sideSelectedKeys,eI.key),eL=e$.oneWay&&"right"===e$.direction&&!e$.disabled&&!eI.disabled;return(0,t.vapor)(ez=>{let eW=(0,t._$createElement)("li",ez);(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eW,"key",String(eI.keyText))});let eH=(0,t._$createElement)("label",eW);(0,t._$appendChild)(eW,eH),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eH,String(oS(oS(oS(`flex w-full items-start gap-3 rounded-2xl border border-base-300/75 bg-base-100/80 ${e$.sizeConfig.itemClass} transition duration-200 ease-out hover:border-base-300 hover:bg-base-100 hover:shadow-sm`,eR?"border-primary/45 bg-primary/6 shadow-[0_14px_28px_-24px_rgba(59,130,246,0.75)]":""),e$.disabled||eI.disabled?"cursor-not-allowed opacity-55":"cursor-pointer"),e$.classNames?.item)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.item;(0,t._$setStyle)(eH,eI)});let eF=(0,t._$createElement)("span",eH);(0,t._$appendChild)(eH,eF),(0,t._$setClassName)(eF,"shrink-0 pt-0.5");let eP=(0,t._$createElement)("input",eF);(0,t._$appendChild)(eF,eP),(0,t._$setAttribute)(eP,"type","checkbox"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eP,String(OS(e$.sizeConfig.checkboxSize)))}),(0,t.watchEffect)(()=>{(0,t._$setChecked)(eP,!!eR)}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eP,e$.disabled||eI.disabled)}),(0,t._$addEventListener)(eP,"change",eR=>e$.onItemSelect(eI.key,eR.currentTarget.checked));let eB=(0,t._$createElement)("div",eH);(0,t._$appendChild)(eH,eB),(0,t._$setClassName)(eB,"flex min-w-0 flex-1 items-start gap-3");let eK=(0,t._$createElement)("div",eB);(0,t._$appendChild)(eB,eK),(0,t._$setClassName)(eK,"min-w-0 flex-1");let eV=(0,t._$createElement)("div",eK);(0,t._$appendChild)(eK,eV),(0,t._$setClassName)(eV,"min-w-0 truncate font-medium leading-5 text-base-content");let eq=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eV,eq),(0,t.watchEffect)(()=>{let e$=rS(eI);(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eV,eq))});let eU=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eK,eU),(0,t.watchEffect)(()=>{let e$=eI.description?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",e$);(0,t._$appendChild)(e$,eR),(0,t._$setClassName)(eR,"mt-1 text-xs leading-5 text-base-content/60");let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let e$=eI.description;(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eL))}),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eK,eU))});let eG=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eB,eG),(0,t.watchEffect)(()=>{let eR=eL?(0,t.vapor)(()=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("button",eR);(0,t._$appendChild)(eR,eL),(0,t._$setAttribute)(eL,"type","button"),(0,t._$setClassName)(eL,"btn btn-ghost btn-xs -mt-1 -mr-1 rounded-full text-base-content/55 hover:text-base-content"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"aria-label",String(String(e$.mergedLocale.remove)))}),(0,t._$addEventListener)(eL,"click",eR=>{eR.preventDefault(),eR.stopPropagation(),e$.onMoveItems("left",[eI.key])});let ez=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eL,ez),(0,t.renderAnchor)((0,t._$createComponent)(jS,{}),eL,ez),eR}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eR,eB,eG))}),eW})})}):r("div",{className:oS("grid h-full place-items-center px-6 py-8 text-center text-sm text-base-content/55",e$.classNames?.empty),style:e$.styles?.empty,children:i("div",{children:[r("div",{className:"mx-auto mb-3 grid size-12 place-items-center rounded-2xl bg-base-200/80 text-base-content/35",children:i("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",className:"size-5",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 7h16M7 4h10l1 3H6l1-3Z"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 10v7a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-7"})]})}),r("div",{children:_S(e$.mergedLocale.notFoundContent,e$.direction)})]})})))}}));return(0,t.vapor)(eI=>{let ez=(0,t._$createElement)("section",eI);(0,t.watchEffect)(()=>{(0,t._$setClassName)(ez,String(eG.get()))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(ez,eZ.get())}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(ez,"data-rue-transfer-panel",String(e$.direction))});let eH=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,eH),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eH,String(oS("flex min-h-16 flex-wrap items-start justify-between gap-3 border-b border-base-300/70 px-4 py-4",e$.classNames?.header)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.header;(0,t._$setStyle)(eH,eI)});let eK=(0,t._$createElement)("div",eH);(0,t._$appendChild)(eH,eK),(0,t._$setClassName)(eK,"min-w-0 flex-1"),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eK,"right"===e$.direction&&e$.oneWay?{flex:4}:void 0)});let eX=(0,t._$createElement)("div",eK);(0,t._$appendChild)(eK,eX),(0,t._$setClassName)(eX,"flex flex-wrap items-center gap-2");let eJ=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eX,eJ),(0,t.watchEffect)(()=>{let eI=e$.showSelectAll?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("label",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(oS("mr-1 inline-flex items-center",e$.disabled||0===eW.get().length?"cursor-not-allowed opacity-50":"cursor-pointer")))});let eL=(0,t._$createElement)("input",eR);(0,t._$appendChild)(eR,eL);let ez=(0,t._$vaporBindUseRef)(eL,()=>e$=>{e$&&(e$.indeterminate=eP.get())});return(0,t.onBeforeUnmount)(()=>{ez()}),(0,t._$setAttribute)(eL,"type","checkbox"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(OS(e$.sizeConfig.checkboxSize)))}),(0,t.watchEffect)(()=>{(0,t._$setChecked)(eL,!!eF.get())}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eL,e$.disabled||0===eW.get().length)}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"aria-label",String(`${String(e$.title)}全选`))}),(0,t._$addEventListener)(eL,"change",eI=>e$.onItemSelectAll(eW.get(),eI.currentTarget.checked)),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eX,eJ))});let eQ=(0,t._$createElement)("h3",eX);(0,t._$appendChild)(eX,eQ),(0,t._$setClassName)(eQ,"m-0 truncate text-sm font-semibold text-base-content md:text-[0.95rem]");let e0=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eQ,e0),(0,t.watchEffect)(()=>{let eI=e$.title;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eQ,e0))});let e1=(0,t._$createElement)("span",eX);(0,t._$appendChild)(eX,e1),(0,t._$setClassName)(e1,"badge badge-ghost badge-sm rounded-full px-2.5");let e2=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(e1,e2),(0,t.watchEffect)(()=>{let eI=e$.sideSelectedKeys.length;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,e1,e2))}),(0,t._$appendChild)(e1,(0,t._$createTextNode)("/"));let e5=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(e1,e5),(0,t.watchEffect)(()=>{let eI=e$.rawItems.length;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,e1,e5))});let e3=(0,t._$createTextWrapper)(e1);(0,t._$appendChild)(e1,e3),(0,t._$settextContent)(e3," "),(0,t._$appendChild)(e1,(0,t._$createTextNode)(" "));let e4=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(e1,e4),(0,t.watchEffect)(()=>{let eI=wS(e$.rawItems.length,e$.mergedLocale);(0,t.untrack)(()=>(0,t.renderAnchor)(eI,e1,e4))});let e6=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eX,e6),(0,t.watchEffect)(()=>{let eI=eR.get().length===e$.rawItems.length?"":(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("span",e$);(0,t._$appendChild)(e$,eI),(0,t._$setClassName)(eI,"text-xs text-base-content/55"),(0,t._$appendChild)(eI,(0,t._$createTextNode)("匹配 "));let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eL),(0,t.watchEffect)(()=>{let e$=eR.get().length;(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eL))}),e$});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eX,e6))});let e8=(0,t._$createElement)("div",eH);(0,t._$appendChild)(eH,e8),(0,t._$setClassName)(e8,"flex w-full min-w-0 flex-wrap items-center justify-start gap-1.5 text-xs md:w-auto md:justify-end");let e7=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(e8,e7),(0,t.watchEffect)(()=>{let e$=eU.get()?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("span",e$);(0,t._$appendChild)(e$,eI),(0,t._$setClassName)(eI,"badge badge-outline badge-sm");let eR=(0,t._$createTextWrapper)(eI);return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eR,eU.get())}),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,e8,e7))}),(0,t._$appendChild)(e8,(0,t._$createTextNode)(" "));let e9=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(e8,e9),(0,t.watchEffect)(()=>{let eI=e$.showSelectAll&&eW.get().length>0?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)();(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let eR=(0,t._$createElement)("button",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"type","button"),(0,t._$setClassName)(eR,"btn btn-ghost btn-xs min-h-0 rounded-full px-2"),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eR,e$.disabled)}),(0,t._$addEventListener)(eR,"click",()=>e$.onItemSelectAll(eB.get(),!0));let eL=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.mergedLocale.selectAll;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let ez=(0,t._$createElement)("button",eI);(0,t._$appendChild)(eI,ez),(0,t._$setAttribute)(ez,"type","button"),(0,t._$setClassName)(ez,"btn btn-ghost btn-xs min-h-0 rounded-full px-2"),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(ez,e$.disabled)}),(0,t._$addEventListener)(ez,"click",()=>{let eI=eB.get().filter(eI=>!lS(e$.sideSelectedKeys,eI));e$.onReplaceSideSelection([...uS(e$.sideSelectedKeys,eB.get()),...eI])});let eW=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,eW),(0,t.watchEffect)(()=>{let eI=e$.mergedLocale.selectInvert;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,eW))}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let eH=(0,t._$createElement)("button",eI);(0,t._$appendChild)(eI,eH),(0,t._$setAttribute)(eH,"type","button"),(0,t._$setClassName)(eH,"btn btn-ghost btn-xs min-h-0 rounded-full px-2"),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eH,e$.disabled||0===e$.sideSelectedKeys.length)}),(0,t._$addEventListener)(eH,"click",()=>e$.onItemSelectAll(e$.sideSelectedKeys,!1));let eF=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eH,eF),(0,t.watchEffect)(()=>{let eI=e$.mergedLocale.clearSelection;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eH,eF))}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" ")),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,e8,e9))}),(0,t._$appendChild)(e8,(0,t._$createTextNode)(" "));let t$=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(e8,t$),(0,t.watchEffect)(()=>{let eI=e$.oneWay&&"right"===e$.direction?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("button",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"type","button"),(0,t._$setClassName)(eR,"btn btn-ghost btn-xs min-h-0 rounded-full px-2"),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eR,e$.disabled||0===eV.get().length)}),(0,t._$addEventListener)(eR,"click",()=>e$.onMoveItems("left",eV.get()));let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.mergedLocale.removeSelected;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,e8,t$))});let tI=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,tI),(0,t.watchEffect)(()=>{let eI=e$.searchEnabled?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(oS("border-b border-base-300/70 px-4 py-3",e$.classNames?.search)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.search;(0,t._$setStyle)(eR,eI)});let eL=(0,t._$createElement)("label",eR);(0,t._$appendChild)(eR,eL),(0,t._$setClassName)(eL,"input input-bordered flex w-full items-center gap-2 rounded-2xl border-base-300/80 bg-base-100/85 px-3 shadow-sm focus-within:border-primary/45 focus-within:outline-none");let ez=(0,t._$createElement)("svg",eL);(0,t._$appendChild)(eL,ez),(0,t._$setAttribute)(ez,"viewBox","0 0 24 24"),(0,t._$setAttribute)(ez,"fill","none"),(0,t._$setAttribute)(ez,"stroke","currentColor"),(0,t._$setAttribute)(ez,"strokeWidth","1.8"),(0,t._$setClassName)(ez,"size-4 text-base-content/50");let eW=(0,t._$createElement)("circle",ez);(0,t._$appendChild)(ez,eW),(0,t._$setAttribute)(eW,"cx","11"),(0,t._$setAttribute)(eW,"cy","11"),(0,t._$setAttribute)(eW,"r","7");let eH=(0,t._$createElement)("path",ez);(0,t._$appendChild)(ez,eH),(0,t._$setAttribute)(eH,"strokeLinecap","round"),(0,t._$setAttribute)(eH,"d","m20 20-3.5-3.5");let eF=(0,t._$createElement)("input",eL);(0,t._$appendChild)(eL,eF);let eP=(0,t._$vaporBindUseRef)(eF,()=>e$.assignSearchInputRef);return(0,t.onBeforeUnmount)(()=>{eP()}),(0,t._$setAttribute)(eF,"type","text"),(0,t.watchEffect)(()=>{(0,t._$setValue)(eF,e$.searchValue)}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eF,"placeholder",String(e$.sharedSearchPlaceholder))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eF,String(oS(`grow bg-transparent ${e$.sizeConfig.inputClass}`,"border-none px-0 outline-none")))}),(0,t._$addEventListener)(eF,"compositionstart",()=>{e$.searchComposingRef.current=!0}),(0,t._$addEventListener)(eF,"compositionend",eI=>{e$.searchComposingRef.current=!1,e$.onSearchInput(eI.currentTarget.value)}),(0,t._$addEventListener)(eF,"input",eI=>e$.searchComposingRef.current?void 0:e$.onSearchInput(eI.currentTarget.value)),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,tI))});let tR=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,tR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(tR,String(oS("flex flex-col",e$.classNames?.body)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.body;(0,t._$setStyle)(tR,eI)});let tL=(0,t._$createElement)("div",tR);(0,t._$appendChild)(tR,tL),(0,t.watchEffect)(()=>{(0,t._$setClassName)(tL,String(oS("h-80 overflow-auto px-3 py-3",e$.classNames?.list)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.list;(0,t._$setStyle)(tL,eI)}),(0,t._$addEventListener)(tL,"scroll",eI=>{e$.onScroll&&e$.onScroll(e$.direction,eI)});let tz=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(tL,tz),(0,t.watchEffect)(()=>{let eI=e$.customListRenderer?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let eL=e$.runManagedRenderCallback(()=>e$.customListRenderer(eq.get()));(0,t.untrack)(()=>(0,t.renderAnchor)(eL,eI,eR))}),eI}):(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(e$,eI),(0,t.watchEffect)(()=>{let eR=eY.get();(0,t.untrack)(()=>(0,t.renderAnchor)(eR,e$,eI))}),e$});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,tL,tz))});let tW=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(tR,tW),(0,t.watchEffect)(()=>{let eI=null!=e$.paginationPageSize&&eR.get().length>0?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(oS("flex items-center justify-between border-t border-base-300/70 px-4 py-3 text-xs text-base-content/65",e$.classNames?.pager)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.pager;(0,t._$setStyle)(eR,eI)});let ez=(0,t._$createElement)("span",eR);(0,t._$appendChild)(eR,ez),(0,t._$appendChild)(ez,(0,t._$createTextNode)("第 "));let eW=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,eW),(0,t.watchEffect)(()=>{let e$=eL.get().currentPage;(0,t.untrack)(()=>(0,t.renderAnchor)(e$,ez,eW))}),(0,t._$appendChild)(ez,(0,t._$createTextNode)(" / "));let eH=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,eH),(0,t.watchEffect)(()=>{let e$=eL.get().pageCount;(0,t.untrack)(()=>(0,t.renderAnchor)(e$,ez,eH))}),(0,t._$appendChild)(ez,(0,t._$createTextNode)(" 页"));let eF=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eF),(0,t._$setClassName)(eF,"flex items-center gap-2");let eP=(0,t._$createElement)("button",eF);(0,t._$appendChild)(eF,eP),(0,t._$setAttribute)(eP,"type","button"),(0,t._$setClassName)(eP,"btn btn-ghost btn-xs rounded-full"),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eP,eL.get().currentPage<=1)}),(0,t._$addEventListener)(eP,"click",()=>e$.setCurrentPage(eL.get().currentPage-1)),(0,t._$appendChild)(eP,(0,t._$createTextNode)("上一页"));let eB=(0,t._$createElement)("button",eF);return(0,t._$appendChild)(eF,eB),(0,t._$setAttribute)(eB,"type","button"),(0,t._$setClassName)(eB,"btn btn-ghost btn-xs rounded-full"),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eB,eL.get().currentPage>=eL.get().pageCount)}),(0,t._$addEventListener)(eB,"click",()=>e$.setCurrentPage(eL.get().currentPage+1)),(0,t._$appendChild)(eB,(0,t._$createTextNode)("下一页")),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,tR,tW))}),(0,t._$appendChild)(tR,(0,t._$createTextNode)(" "));let tH=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(tR,tH),(0,t.watchEffect)(()=>{let eI=e$.footer?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(oS("border-t border-base-300/70 px-4 py-3",e$.classNames?.footer)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.footer;(0,t._$setStyle)(eR,eI)}),(0,t._$appendChild)(eR,(0,t._$createTextNode)(" "));let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.runManagedRenderCallback(()=>e$.footer({...eq.get(),items:[...eq.get().items],filteredItems:[...eq.get().filteredItems],selectedKeys:[...eq.get().selectedKeys]},{direction:e$.direction}));(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),(0,t._$appendChild)(eR,(0,t._$createTextNode)(" ")),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,tR,tH))}),ez})},NS=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,__rue_rest_omit_20:e1,__rue_rest_omit_21:e2,__rue_rest_omit_22:e5,__rue_rest_omit_23:e3,__rue_rest_omit_24:e4,__rue_rest_omit_25:e6,__rue_rest_omit_26:e8,__rue_rest_omit_27:e7,__rue_rest_omit_28:e9,__rue_rest_omit_29:t$,__rue_rest_omit_30:tI,__rue_rest_omit_31:tR,__rue_rest_omit_32:tL,rest:tz,mergedLocale:tW,searchConfig:tH,paginationConfig:tF,sizeConfig:tP,uncontrolledTargetKeysRef:tB,uncontrolledSelectedKeysRef:tK,leftSearchValueRef:tV,rightSearchValueRef:tq,leftPageRef:tU,rightPageRef:tG,leftSearchInputRef:tZ,rightSearchInputRef:tY,leftSearchComposingRef:tX,rightSearchComposingRef:tJ,activeManagedRenderRef:tQ,leftPanelHostRef:t0,operationsHostRef:t1,rightPanelHostRef:t2,normalizedItems:t5,itemMap:t3,mergedActions:t4,mergedTitles:t6,sharedSearchPlaceholder:t8,customListRenderer:t7,getTransferStateSnapshot:t9,emitSelectChange:r$,managedPanelSharedProps:rI,reportManagedRenderMutationError:rR,renderManagedTarget:rL,runManagedRenderCallback:rz,renderManagedRegions:rW,commitSelectedKeys:rH,commitTargetKeys:rF,mergeSideSelection:rP,handleItemSelect:rB,handleItemSelectAll:rK,moveItems:rV,moveToRight:rq,moveToLeft:rU,handleSearchInput:rG,renderOperationButton:rZ,renderOperations:rY}=(0,t._$vaporWithHookId)("useSetup:0:0:dup3",()=>(0,t.useSetup)(()=>{let{className:eI,style:eR,disabled:eL,size:ez,status:eW,dataSource:eH,targetKeys:eF,defaultTargetKeys:eP,selectedKeys:eB,defaultSelectedKeys:eK,render:eV,onChange:eq,onSelectChange:eU,titles:eG,operations:eZ,actions:eY,showSearch:eX,filterOption:eJ,locale:eQ,footer:e0,renderList:e1,rowKey:e2,onSearch:e5,onScroll:e3,children:e4,showSelectAll:e6,selectAllLabels:e8,oneWay:e7,pagination:e9,listStyle:t$,operationStyle:tI,classNames:tR,styles:tL,...tz}=e$,tW=(0,t._$vaporWithHookId)("computed:1:16",()=>(0,t.computed)(()=>({...iS,...e$.locale}))),tH=(0,t._$vaporWithHookId)("computed:1:17",()=>(0,t.computed)(()=>vS(e$.showSearch))),tF=(0,t._$vaporWithHookId)("computed:1:18",()=>(0,t.computed)(()=>yS(e$.pagination))),tP=(0,t._$vaporWithHookId)("computed:1:19",()=>(0,t.computed)(()=>ES(e$.size))),tB=(0,t._$vaporWithHookId)("ref:1:20",()=>(0,t.ref)(cS(e$.defaultTargetKeys??e$.targetKeys))),tK=(0,t._$vaporWithHookId)("ref:1:21",()=>(0,t.ref)(cS(e$.defaultSelectedKeys??e$.selectedKeys))),tV=(0,t._$vaporWithHookId)("ref:1:22",()=>(0,t.ref)(tH.get().defaultValue)),tq=(0,t._$vaporWithHookId)("ref:1:23",()=>(0,t.ref)(tH.get().defaultValue)),tU=(0,t._$vaporWithHookId)("ref:1:24",()=>(0,t.ref)(1)),tG=(0,t._$vaporWithHookId)("ref:1:25",()=>(0,t.ref)(1)),tZ=(0,t._$vaporWithHookId)("useRef:1:26",()=>(0,t.useRef)()),tY=(0,t._$vaporWithHookId)("useRef:1:27",()=>(0,t.useRef)()),tX=(0,t._$vaporWithHookId)("useRef:1:28",()=>(0,t.useRef)(!1)),tJ=(0,t._$vaporWithHookId)("useRef:1:29",()=>(0,t.useRef)(!1)),tQ=(0,t._$vaporWithHookId)("useRef:1:30",()=>(0,t.useRef)(null)),t0=(0,t._$vaporWithHookId)("useRef:1:31",()=>(0,t.useRef)()),t1=(0,t._$vaporWithHookId)("useRef:1:32",()=>(0,t.useRef)()),t2=(0,t._$vaporWithHookId)("useRef:1:33",()=>(0,t.useRef)()),t5=(0,t._$vaporWithHookId)("computed:1:34",()=>(0,t.computed)(()=>hS(e$.dataSource,e$.rowKey,e$.render))),t3=(0,t._$vaporWithHookId)("computed:1:35",()=>(0,t.computed)(()=>new Map(t5.get().map(e$=>[e$.keyText,e$])))),t4=(0,t._$vaporWithHookId)("computed:1:36",()=>(0,t.computed)(()=>e$.actions??e$.operations??["加入","移出"])),t6=(0,t._$vaporWithHookId)("computed:1:37",()=>(0,t.computed)(()=>gS(e$.titles,tW.get().titles))),t8=(0,t._$vaporWithHookId)("computed:1:38",()=>(0,t.computed)(()=>tH.get().placeholder||String(tW.get().searchPlaceholder))),t7=(0,t._$vaporWithHookId)("computed:1:39",()=>(0,t.computed)(()=>"function"==typeof e$.renderList?e$.renderList:"function"==typeof e$.children&&"block-factory"!==e$.children.kind?e$.children:void 0)),t9=()=>{let eI=(void 0===e$.targetKeys?tB.value:cS(e$.targetKeys)).filter(e$=>t3.get().has(sS(e$))),eR=new Set(eI.map(sS)),eL=(void 0===e$.selectedKeys?tK.value:cS(e$.selectedKeys)).filter(e$=>t3.get().has(sS(e$))),ez=xS(eL,eR,t3.get()),eW=t5.get().filter(e$=>!eR.has(e$.keyText)),eH=eI.map(e$=>t3.get().get(sS(e$))).filter(Boolean);return{mergedTargetKeys:eI,mergedSelectedKeys:eL,sourceSelectedKeys:ez.left,targetSelectedKeys:ez.right,sourceItems:eW,targetItems:eH}},r$=(eI,eR=t9().mergedTargetKeys)=>{if(!e$.onSelectChange)return;let eL=xS(eI,new Set(eR.map(sS)),t3.get());e$.onSelectChange(eL.left,eL.right)},rI=(0,t._$vaporWithHookId)("computed:1:40",()=>(0,t.computed)(()=>({disabled:e$.disabled,filterOption:e$.filterOption,footer:e$.footer,listStyle:e$.listStyle,oneWay:e$.oneWay,onScroll:e$.onScroll,selectAllLabels:void 0===e$.selectAllLabels?[]:e$.selectAllLabels,showSelectAll:void 0===e$.showSelectAll||e$.showSelectAll,status:e$.status,classNames:e$.classNames,styles:e$.styles}))),rR=e$=>{let eI=tQ.current??"unknown",eR=Error(`${aS} Transfer blocked ${e$} while the ${eI} managed region was rendering.`),eL=globalThis.__rue_active??globalThis.__rue_vapor_preferred??globalThis.__rue;try{eL?.handleError?.(eR,null)}catch{}},rL=(e$,eI,eR)=>{let eL=tQ.current;tQ.current=e$;try{(0,e.render)(eI,eR)}finally{tQ.current=eL}},rz=(e$,eI)=>{let eR=tQ.current;tQ.current=e$;try{return eI()}finally{tQ.current=eR}},rW=()=>{let e$="u">typeof document?document.activeElement:null,eI=e$===tZ.current?{direction:"left",selectionStart:e$.selectionStart,selectionEnd:e$.selectionEnd}:e$===tY.current?{direction:"right",selectionStart:e$.selectionStart,selectionEnd:e$.selectionEnd}:null,eR=t9();if(t0.current&&rL("left",(0,e.h)(MS,{...rI.get(),direction:"left",rawItems:eR.sourceItems,sideSelectedKeys:eR.sourceSelectedKeys,searchValue:tV.value,currentPage:tU.value,paginationPageSize:tF.get()?.pageSize,searchEnabled:tH.get().enabled,sizeConfig:tP.get(),mergedLocale:tW.get(),title:t6.get()[0],sharedSearchPlaceholder:t8.get(),customListRenderer:t7.get(),getTransferStateSnapshot:t9,onItemSelect:(e$,eI)=>rB("left",e$,eI),onItemSelectAll:(e$,eI)=>rK("left",e$,eI),onReplaceSideSelection:e$=>rP("left",e$),onMoveItems:rV,onSearchInput:e$=>rG("left",e$),assignSearchInputRef:e$=>{tZ.current=e$??void 0},searchComposingRef:tX,runManagedRenderCallback:e$=>rz("left",e$),setCurrentPage:e$=>{tU.value=e$}}),t0.current),t1.current&&rL("operations",rY(),t1.current),t2.current&&rL("right",(0,e.h)(MS,{...rI.get(),direction:"right",rawItems:eR.targetItems,sideSelectedKeys:eR.targetSelectedKeys,searchValue:tq.value,currentPage:tG.value,paginationPageSize:tF.get()?.pageSize,searchEnabled:tH.get().enabled,sizeConfig:tP.get(),mergedLocale:tW.get(),title:t6.get()[1],sharedSearchPlaceholder:t8.get(),customListRenderer:t7.get(),getTransferStateSnapshot:t9,onItemSelect:(e$,eI)=>rB("right",e$,eI),onItemSelectAll:(e$,eI)=>rK("right",e$,eI),onReplaceSideSelection:e$=>rP("right",e$),onMoveItems:rV,onSearchInput:e$=>rG("right",e$),assignSearchInputRef:e$=>{tY.current=e$??void 0},searchComposingRef:tJ,runManagedRenderCallback:e$=>rz("right",e$),setCurrentPage:e$=>{tG.value=e$}}),t2.current),eI){let e$=()=>{let e$="left"===eI.direction?tZ.current:tY.current;if(!e$)return!1;if(e$.focus(),null!=eI.selectionStart&&null!=eI.selectionEnd)try{e$.setSelectionRange(eI.selectionStart,eI.selectionEnd)}catch{}return document.activeElement===e$};queueMicrotask(()=>{e$()||setTimeout(()=>{e$()},0)})}};(0,t.onMounted)(()=>{rW()}),(0,t._$vaporWithHookId)("watch:1:41",()=>(0,t.watch)(()=>[t5.get().map(e$=>e$.keyText).join("|"),tB.value.map(sS).join("|"),tK.value.map(sS).join("|"),e$.targetKeys?cS(e$.targetKeys).map(sS).join("|"):"",e$.selectedKeys?cS(e$.selectedKeys).map(sS).join("|"):"",tV.value,tq.value,tU.value,tG.value,e$.disabled,e$.oneWay,void 0===e$.showSelectAll||e$.showSelectAll,tF.get()?.pageSize??0],()=>{rW()}));let rH=(eI,eR=t9().mergedTargetKeys)=>{if(tQ.current)return void rR("selection mutation");let eL=cS(eI).filter(e$=>t3.get().has(sS(e$)));void 0===e$.selectedKeys&&(tK.value=eL),r$(eL,eR)},rF=(eI,eR,eL,ez)=>{let eW=cS(eI).filter(e$=>t3.get().has(sS(e$)));void 0===e$.targetKeys&&(tB.value=eW),rH(ez,eW),e$.onChange&&e$.onChange(eW,eR,eL)},rP=(e$,eI)=>{let eR=t9(),eL=cS(eI);rH("left"===e$?[...eL,...eR.targetSelectedKeys]:[...eR.sourceSelectedKeys,...eL])},rB=(eI,eR,eL)=>{let ez=t3.get().get(sS(eR));if(!ez||e$.disabled||ez.disabled)return;let eW=t9(),eH="left"===eI?eW.sourceSelectedKeys:eW.targetSelectedKeys;rP(eI,eL?cS([...eH,eR]):eH.filter(e$=>sS(e$)!==sS(eR)))},rK=(e$,eI,eR)=>{let eL=t9(),ez="left"===e$?eL.sourceSelectedKeys:eL.targetSelectedKeys;rP(e$,eR?cS([...ez,...eI]):uS(ez,eI))},rV=(e$,eI)=>{if(!eI.length)return;let eR=t9();if("right"===e$)return void rF(cS([...eR.mergedTargetKeys,...eI]),"right",eI,uS(eR.mergedSelectedKeys,eI));let eL=new Set(eI.map(sS));rF(eR.mergedTargetKeys.filter(e$=>!eL.has(sS(e$))),"left",eI,uS(eR.mergedSelectedKeys,eI))},rq=()=>{let e$=t9();rV("right",e$.sourceItems.filter(eI=>lS(e$.sourceSelectedKeys,eI.key)&&!eI.disabled).map(e$=>e$.key))},rU=()=>{let e$=t9();rV("left",e$.targetItems.filter(eI=>lS(e$.targetSelectedKeys,eI.key)&&!eI.disabled).map(e$=>e$.key))},rG=(eI,eR)=>{let eL="left"===eI?tV.value:tq.value,ez="left"===eI?tU.value:tG.value;eL===eR&&1===ez||("left"===eI?(tV.value=eR,tU.value=1):(tq.value=eR,tG.value=1),e$.onSearch&&e$.onSearch(eI,eR))},rZ=(eI,eR,eL)=>{let{baseClassName:ez}=(0,t._$vaporWithHookId)("useSetup:0:0:dup1",()=>(0,t.useSetup)(()=>({baseClassName:(0,t._$vaporWithHookId)("computed:1:42",()=>(0,t.computed)(()=>oS(`btn btn-outline ${tP.get().buttonClass} min-w-24 rounded-2xl shadow-sm`,"right"===eI?"border-primary/25 hover:border-primary hover:bg-primary/6":"border-base-300")))})));return(0,e.h)("button",{type:"button",disabled:eL,className:ez.get(),onClick:"right"===eI?rq:rU},(0,e.h)("span",{className:"inline-flex items-center gap-2"},"left"!==eI||e$.oneWay?null:(0,e.h)(AS,null),(0,e.h)("span",null,eR),"right"===eI?(0,e.h)(kS,null):null))},rY=()=>{let{snapshot:eI,canMoveRight:eR,canMoveLeft:eL}=(0,t._$vaporWithHookId)("useSetup:0:0:dup2",()=>(0,t.useSetup)(()=>{let e$=t9();return{snapshot:e$,canMoveRight:e$.sourceItems.some(eI=>lS(e$.sourceSelectedKeys,eI.key)&&!eI.disabled),canMoveLeft:e$.targetItems.some(eI=>lS(e$.targetSelectedKeys,eI.key)&&!eI.disabled)}}));return(0,e.h)("div",{className:oS("flex flex-row items-center justify-center gap-2 lg:flex-col",e$.classNames?.operations),style:{...e$.styles?.operations,...e$.operationStyle}},rZ("right",t4.get()[0]??iS.selectAll,e$.disabled||!eR),e$.oneWay?null:rZ("left",t4.get()[1]??iS.remove,e$.disabled||!eL))};return{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,__rue_rest_omit_20:e1,__rue_rest_omit_21:e2,__rue_rest_omit_22:e5,__rue_rest_omit_23:e3,__rue_rest_omit_24:e4,__rue_rest_omit_25:e6,__rue_rest_omit_26:e8,__rue_rest_omit_27:e7,__rue_rest_omit_28:e9,__rue_rest_omit_29:t$,__rue_rest_omit_30:tI,__rue_rest_omit_31:tR,__rue_rest_omit_32:tL,rest:tz,mergedLocale:tW,searchConfig:tH,paginationConfig:tF,sizeConfig:tP,uncontrolledTargetKeysRef:tB,uncontrolledSelectedKeysRef:tK,leftSearchValueRef:tV,rightSearchValueRef:tq,leftPageRef:tU,rightPageRef:tG,leftSearchInputRef:tZ,rightSearchInputRef:tY,leftSearchComposingRef:tX,rightSearchComposingRef:tJ,activeManagedRenderRef:tQ,leftPanelHostRef:t0,operationsHostRef:t1,rightPanelHostRef:t2,normalizedItems:t5,itemMap:t3,mergedActions:t4,mergedTitles:t6,sharedSearchPlaceholder:t8,customListRenderer:t7,getTransferStateSnapshot:t9,emitSelectChange:r$,managedPanelSharedProps:rI,reportManagedRenderMutationError:rR,renderManagedTarget:rL,runManagedRenderCallback:rz,renderManagedRegions:rW,commitSelectedKeys:rH,commitTargetKeys:rF,mergeSideSelection:rP,handleItemSelect:rB,handleItemSelectAll:rK,moveItems:rV,moveToRight:rq,moveToLeft:rU,handleSearchInput:rG,renderOperationButton:rZ,renderOperations:rY}}));return(0,e.h)("div",{...tz,className:oS(oS("rue-transfer grid gap-4 lg:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] lg:items-stretch",e$.classNames?.root),e$.className),style:{...e$.styles?.root,...e$.style},"data-rue-transfer":"true"},(0,e.h)("div",{ref:t0}),(0,e.h)("div",{ref:t1}),(0,e.h)("div",{ref:t2}))},PS={next:"下一步",previous:"上一步",finish:"完成",close:"关闭引导"},FS=16,IS=18,LS=(...e$)=>e$.filter(Boolean).join(" "),RS=(...e$)=>{let eI={};return e$.forEach(e$=>{e$&&Object.assign(eI,e$)}),eI},zS=e$=>`${e$}px`,BS=(e$,eI)=>{let eR={};return new Set([...Object.keys(e$??{}),...Object.keys(eI??{})]).forEach(eL=>{let ez=LS(e$?.[eL],eI?.[eL]);ez&&(eR[eL]=ez)}),eR},VS=(e$,eI)=>{let eR={};return new Set([...Object.keys(e$??{}),...Object.keys(eI??{})]).forEach(eL=>{let ez=RS(e$?.[eL],eI?.[eL]);Object.keys(ez).length>0&&(eR[eL]=ez)}),eR},HS=(e$,eI,eR)=>eR<eI?eI:Math.min(Math.max(e$,eI),eR),US=e$=>"function"==typeof e$?e$():e$,WS=e$=>"function"==typeof e$?e$()??null:e$??null,GS=e$=>{let eI=e$?.offset??8;if(Array.isArray(eI))return{horizontal:Math.max(0,eI[0]??0),vertical:Math.max(0,eI[1]??eI[0]??0)};let eR=Math.max(0,eI);return{horizontal:eR,vertical:eR}},KS=e$=>Math.max(0,e$?.radius??18),qS=e$=>!1===e$?null:e$&&"object"==typeof e$?{color:e$.color??"rgba(15, 23, 42, 0.46)",style:e$.style}:{color:"rgba(15, 23, 42, 0.46)",style:void 0},JS=e$=>!1!==e$,YS=e$=>"object"!=typeof e$||!1!==e$.pointAtCenter,XS=e$=>e$??"bottom",ZS=e$=>"center"===e$?"center":e$.startsWith("top")?"top":e$.startsWith("bottom")?"bottom":e$.startsWith("left")?"left":"right",QS=e$=>{switch(e$){case"top":return"bottom";case"topLeft":return"bottomLeft";case"topRight":return"bottomRight";case"bottom":return"top";case"bottomLeft":return"topLeft";case"bottomRight":return"topRight";case"left":return"right";case"leftTop":return"rightTop";case"leftBottom":return"rightBottom";case"right":return"left";case"rightTop":return"leftTop";case"rightBottom":return"leftBottom";default:return"center"}},$S=()=>typeof window>"u"||typeof document>"u"?{width:1440,height:900}:{width:document.documentElement.clientWidth||window.innerWidth||1440,height:document.documentElement.clientHeight||window.innerHeight||900},eC=(e$,eI)=>{if(!e$)return null;let eR=e$.getBoundingClientRect();if(eR.width<=0||eR.height<=0)return null;let eL=$S(),ez=GS(eI),eW=KS(eI),eH=HS(eR.left-ez.horizontal,4,eL.width-4),eF=HS(eR.top-ez.vertical,4,eL.height-4),eP=HS(eR.right+ez.horizontal,4,eL.width-4),eB=HS(eR.bottom+ez.vertical,4,eL.height-4),eK=Math.max(0,eP-eH),eV=Math.max(0,eB-eF);return{left:eH,top:eF,width:eK,height:eV,radius:eW,centerX:eH+eK/2,centerY:eF+eV/2,right:eP,bottom:eB}},tC=(e$,eI,eR,eL)=>{switch(e$){case"top":return{left:eI.centerX-eR/2,top:eI.top-eL-IS};case"topLeft":return{left:eI.left,top:eI.top-eL-IS};case"topRight":return{left:eI.right-eR,top:eI.top-eL-IS};case"bottom":default:return{left:eI.centerX-eR/2,top:eI.bottom+IS};case"bottomLeft":return{left:eI.left,top:eI.bottom+IS};case"bottomRight":return{left:eI.right-eR,top:eI.bottom+IS};case"left":return{left:eI.left-eR-IS,top:eI.centerY-eL/2};case"leftTop":return{left:eI.left-eR-IS,top:eI.top};case"leftBottom":return{left:eI.left-eR-IS,top:eI.bottom-eL};case"right":return{left:eI.right+IS,top:eI.centerY-eL/2};case"rightTop":return{left:eI.right+IS,top:eI.top};case"rightBottom":return{left:eI.right+IS,top:eI.bottom-eL}}},nC=(e$,eI,eR,eL,ez)=>{switch(ZS(e$)){case"top":return eI.top<FS;case"bottom":return eI.top+eL>ez.height-FS;case"left":return eI.left<FS;case"right":return eI.left+eR>ez.width-FS;default:return!1}},rC=(e$,eI,eR,eL)=>{let ez=$S();if(!eI||"center"===e$)return{placement:"center",left:HS((ez.width-eR)/2,FS,ez.width-eR-FS),top:HS((ez.height-eL)/2,FS,ez.height-eL-FS)};let eW=e$,eH=tC(eW,eI,eR,eL);return nC(eW,eH,eR,eL,ez)&&(eH=tC(eW=QS(eW),eI,eR,eL)),{placement:eW,left:HS(eH.left,FS,ez.width-eR-FS),top:HS(eH.top,FS,ez.height-eL-FS)}},iC=(e$,eI,eR,eL,ez,eW,eH)=>{if(!eI||"center"===e$)return null;let eF=HS(eI.centerX-eR-9,24,ez-24),eP=HS(eI.centerY-eL-9,24,eW-24),eB=eH?void 0:28;switch(ZS(e$)){case"top":return{left:zS(eB??eF),bottom:"-9px"};case"bottom":return{left:zS(eB??eF),top:"-9px"};case"left":return{top:zS(eB??eP),right:"-9px"};case"right":return{top:zS(eB??eP),left:"-9px"};default:return null}},aC=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.9"),(0,t._$setClassName)(eI,"size-4");let eR=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","M6 6l12 12M18 6 6 18"),eI}),oC=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.8"),(0,t._$setClassName)(eI,"size-4");let eR=(0,t._$createElement)("path",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","m12 3 1.7 4.2L18 9l-4.3 1.7L12 15l-1.7-4.3L6 9l4.3-1.8L12 3Z");let eL=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,eL),(0,t._$setAttribute)(eL,"strokeLinecap","round"),(0,t._$setAttribute)(eL,"strokeLinejoin","round"),(0,t._$setAttribute)(eL,"d","M5 19h.01M12 21h.01M19 19h.01"),eI}),sC=e$=>{let eI,eR,eL,ez,eW,{steps:eH,defaultOpen:eF,defaultCurrent:eP,placement:eB,mask:eK,gap:eV,arrow:eq,type:eU,closeIcon:eG,disabledInteraction:eZ,keyboard:eY,zIndex:eX,scrollIntoViewOptions:eJ,getPopupContainer:eQ,locale:e0,indicatorsRender:e1,actionsRender:e2,className:e5,style:e3,classNames:e4,styles:e6,onChange:e8,onClose:e7,onFinish:e9,onOpenChange:t$,rest:tI,panelRef:tR,rafIdRef:tL,renderVersion:tz,isControlledOpen:tW,isControlledCurrent:tH,uncontrolledOpen:tF,uncontrolledCurrent:tP,lastDefaultOpen:tB,lastDefaultCurrent:tK,currentOpenRef:tV,currentIndexRef:tq,panelStyleRef:tU,arrowStyleRef:tG,spotlightRef:tZ,placementRef:tY,mergedLocale:tX,getTotal:tJ,normalizeCurrentValue:tQ,getMergedOpen:t0,getMergedCurrent:t1,getCurrentStep:t2,requestRender:t5,requestOpenChange:t3,requestCurrentChange:t4,scheduleLayoutSync:t6,syncScrollIntoView:t8,handleClose:t7,handleMaskClick:t9,handleNext:r$,handlePrev:rI,total:rR,currentIndex:rL,step:rz,mergedOpen:rW}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let{steps:eI=[],defaultOpen:eR=!1,defaultCurrent:eL=0,placement:ez="bottom",mask:eW=!0,gap:eH,arrow:eF=!0,type:eP="default",closeIcon:eB,disabledInteraction:eK=!1,keyboard:eV=!0,zIndex:eq=1400,scrollIntoViewOptions:eU={block:"center",inline:"center",behavior:"smooth"},getPopupContainer:eG,locale:eZ,indicatorsRender:eY,actionsRender:eX,className:eJ,style:eQ,classNames:e0,styles:e1,onChange:e2,onClose:e5,onFinish:e3,onOpenChange:e4,...e6}=e$,e8=(0,t._$vaporWithHookId)("useRef:1:0",()=>(0,t.useRef)()),e7=(0,t._$vaporWithHookId)("useRef:1:1",()=>(0,t.useRef)()),e9=(0,t._$vaporWithHookId)("ref:1:2",()=>(0,t.ref)(0)),t$="boolean"==typeof e$.open,tI="number"==typeof e$.current,tR=(0,t._$vaporWithHookId)("ref:1:3",()=>(0,t.ref)(eR)),tL=(0,t._$vaporWithHookId)("ref:1:4",()=>(0,t.ref)(eL)),tz=(0,t._$vaporWithHookId)("ref:1:5",()=>(0,t.ref)(!!eR)),tW=(0,t._$vaporWithHookId)("ref:1:6",()=>(0,t.ref)(Math.max(0,Math.floor(eL)))),tH=(0,t._$vaporWithHookId)("ref:1:7",()=>(0,t.ref)(t$?!!e$.open:eR)),tF=(0,t._$vaporWithHookId)("ref:1:8",()=>(0,t.ref)(tI?Math.max(0,Math.floor(e$.current)):Math.max(0,Math.floor(eL)))),tP=(0,t._$vaporWithHookId)("ref:1:9",()=>(0,t.ref)({visibility:"hidden",opacity:0})),tB=(0,t._$vaporWithHookId)("ref:1:10",()=>(0,t.ref)(null)),tK=(0,t._$vaporWithHookId)("ref:1:11",()=>(0,t.ref)(null)),tV=(0,t._$vaporWithHookId)("ref:1:12",()=>(0,t.ref)(XS(ez))),tq={...PS,...eZ},tU=()=>eI.length,tG=e$=>{let eI=tU();return eI<=0?0:HS(Math.floor(e$),0,eI-1)},tZ=()=>t$?!!e$.open:tH.value,tY=()=>tG(tI?e$.current:tF.value),tX=()=>eI[tY()],tJ=()=>{e9.value+=1},tQ=e$=>{tH.value=e$,t$||(tR.value=e$),tJ(),e4&&e4(e$)},t0=e$=>{let eI=tU();if(eI<=0)return;let eR=HS(e$,0,eI-1);tF.value=eR,tI||(tL.value=eR),tJ(),e2&&e2(eR)},t1=()=>{typeof window>"u"||(null!=e7.current&&window.cancelAnimationFrame(e7.current),e7.current=window.requestAnimationFrame(()=>{let e$=e8.current??document.querySelector('[data-rue-tour-panel="true"]'),eI=tX();if(!tZ()||!e$||!eI){tP.value={visibility:"hidden",opacity:0},tK.value=null,tB.value=null,tJ();return}let eR=eC(WS(eI.target),eH),eL=e$.getBoundingClientRect(),eW=rC(XS(eI.placement??ez),eR,Math.max(eL.width,320),Math.max(eL.height,1)),eP=JS(eI.arrow??eF),eB=YS(eI.arrow??eF);tK.value=eR,tV.value=eW.placement,tP.value={left:zS(eW.left),top:zS(eW.top),opacity:1,visibility:"visible"},tB.value=eP?iC(eW.placement,eR,eW.left,eW.top,eL.width,eL.height,eB):null,tJ()}))},t2=()=>{let e$=tX();if(!tZ()||!e$||typeof window>"u")return;let eI=WS(e$.target),eR=e$.scrollIntoViewOptions??eU;eI&&!1!==eR&&"function"==typeof eI.scrollIntoView&&window.requestAnimationFrame(()=>{eI.scrollIntoView(!0===eR?{block:"center",inline:"center",behavior:"smooth"}:eR)})},t5=()=>{tX()?.onClose?.(),tQ(!1),e5&&e5()},t3=()=>{let e$=tX();if(!e$)return;e$.nextButtonProps?.onClick?.();let eI=tY();if(eI>=tU()-1){e3&&e3(),tQ(!1);return}t0(eI+1)},t4=()=>{let e$=tX();e$&&(e$.prevButtonProps?.onClick?.(),t0(tY()-1))};(0,t.onMounted)(()=>{if(typeof window>"u")return;let e$=e$=>{if(!(!tZ()||!eV)){if("Escape"===e$.key){e$.preventDefault(),t5();return}if("ArrowRight"===e$.key){e$.preventDefault(),t3();return}"ArrowLeft"===e$.key&&(e$.preventDefault(),t4())}},eI=()=>{t1()};window.addEventListener("resize",eI),window.addEventListener("scroll",eI,!0),window.addEventListener("keydown",e$),t2(),t1(),(0,t.onUnmounted)(()=>{window.removeEventListener("resize",eI),window.removeEventListener("scroll",eI,!0),window.removeEventListener("keydown",e$),null!=e7.current&&window.cancelAnimationFrame(e7.current)})}),(0,t._$vaporWithHookId)("watch:1:13",()=>(0,t.watch)(()=>e$.open,e$=>{"boolean"==typeof e$&&(tH.value=e$)},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:14",()=>(0,t.watch)(()=>e$.current,e$=>{"number"==typeof e$&&(tF.value=tG(e$))},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:15",()=>(0,t.watch)(()=>eI.length,()=>{tF.value=tG(tF.value)},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:16",()=>(0,t.watch)(()=>[tZ(),tY(),eI.length,ez,eH?.radius??-1,Array.isArray(eH?.offset)?`${eH?.offset[0]??0}:${eH?.offset[1]??0}`:eH?.offset??-1],()=>{t2(),t1()},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:17",()=>(0,t.watch)(()=>eR,e$=>{let eI=!!e$;t$||eI===tz.value||(tz.value=eI,tR.value=eI,tH.value=eI)})),(0,t._$vaporWithHookId)("watch:1:18",()=>(0,t.watch)(()=>eL,e$=>{let eI=Math.max(0,Math.floor(e$));tI||eI===tW.value||(tW.value=eI,tL.value=eI,tF.value=tG(eI))}));let t6=eI.length,t8=(e9.value,tG(tI?e$.current:tF.value));return{steps:eI,defaultOpen:eR,defaultCurrent:eL,placement:ez,mask:eW,gap:eH,arrow:eF,type:eP,closeIcon:eB,disabledInteraction:eK,keyboard:eV,zIndex:eq,scrollIntoViewOptions:eU,getPopupContainer:eG,locale:eZ,indicatorsRender:eY,actionsRender:eX,className:eJ,style:eQ,classNames:e0,styles:e1,onChange:e2,onClose:e5,onFinish:e3,onOpenChange:e4,rest:e6,panelRef:e8,rafIdRef:e7,renderVersion:e9,isControlledOpen:t$,isControlledCurrent:tI,uncontrolledOpen:tR,uncontrolledCurrent:tL,lastDefaultOpen:tz,lastDefaultCurrent:tW,currentOpenRef:tH,currentIndexRef:tF,panelStyleRef:tP,arrowStyleRef:tB,spotlightRef:tK,placementRef:tV,mergedLocale:tq,getTotal:tU,normalizeCurrentValue:tG,getMergedOpen:tZ,getMergedCurrent:tY,getCurrentStep:tX,requestRender:tJ,requestOpenChange:tQ,requestCurrentChange:t0,scheduleLayoutSync:t1,syncScrollIntoView:t2,handleClose:t5,handleMaskClick:()=>{t5()},handleNext:t3,handlePrev:t4,total:t6,currentIndex:t8,step:t6>0?eI[t8]:void 0,mergedOpen:(e9.value,t$?!!e$.open:tH.value)}}));if(!rW||!rz||0===rR)return null;let rH=qS(rz.mask??eK),rF=rz.type??eU,rP={...tX,...rz.locale},rB=BS(e4,rz.classNames),rK=VS(e6,rz.styles),rV=eC(WS(rz.target),eV),rq=rC(XS(rz.placement??eB),rV,368,225),rU="visible"===tU.value.visibility?tU.value:{left:zS(rq.left),top:zS(rq.top),opacity:1,visibility:"visible"},rG="visible"===tU.value.visibility?tY.value:rq.placement,rZ=tZ.value,rY=rZ&&rZ.width>0&&rZ.height>0?rZ:rV,rX=!!rY,rJ=rz.indicatorsRender??e1,rQ=rz.actionsRender??e2,r0=rz.closeIcon??eG??r(aC,{}),r1=i("div",{...tI,className:LS("pointer-events-none fixed inset-0",rB.root,e5),style:RS(rK.root,e3,{zIndex:eX}),"data-rue-tour":"true","data-rue-tour-placement":rG,"data-rue-tour-version":String(tz.value),"data-rue-tour-current":String(tH?e$.current:tq.value),"data-rue-tour-total":String(rR),"data-rue-tour-open":String(tW?!!e$.open:tV.value),children:[rH?r(e.Fragment,{children:rX?i(e.Fragment,{children:[r("div",{"aria-hidden":"true",className:LS("pointer-events-auto fixed inset-x-0 top-0",rB.mask),style:RS(rK.mask,rH.style,{height:zS(rY.top),background:rH.color}),onClick:t9,"data-rue-tour-mask":"true","data-rue-tour-mask-part":"top"}),r("div",{"aria-hidden":"true",className:LS("pointer-events-auto fixed",rB.mask),style:RS(rK.mask,rH.style,{left:"0px",top:zS(rY.top),width:zS(rY.left),height:zS(rY.height),background:rH.color}),onClick:t9,"data-rue-tour-mask":"true","data-rue-tour-mask-part":"left"}),r("div",{"aria-hidden":"true",className:LS("pointer-events-auto fixed",rB.mask),style:RS(rK.mask,rH.style,{left:zS(rY.right),top:zS(rY.top),width:`calc(100vw - ${rY.right}px)`,height:zS(rY.height),background:rH.color}),onClick:t9,"data-rue-tour-mask":"true","data-rue-tour-mask-part":"right"}),r("div",{"aria-hidden":"true",className:LS("pointer-events-auto fixed inset-x-0 bottom-0",rB.mask),style:RS(rK.mask,rH.style,{top:zS(rY.bottom),background:rH.color}),onClick:t9,"data-rue-tour-mask":"true","data-rue-tour-mask-part":"bottom"}),r("div",{"aria-hidden":"true",className:LS("pointer-events-none fixed border border-primary/25 bg-primary/10 shadow-[0_0_0_1px_rgba(59,130,246,0.12),0_20px_60px_-36px_rgba(59,130,246,0.75)] backdrop-blur-[1px]",rB.spotlight),style:RS(rK.spotlight,{left:zS(rY.left),top:zS(rY.top),width:zS(rY.width),height:zS(rY.height),borderRadius:zS(rY.radius)}),"data-rue-tour-spotlight":"true"}),eZ?r("div",{"aria-hidden":"true",className:"pointer-events-auto fixed",style:{left:zS(rY.left),top:zS(rY.top),width:zS(rY.width),height:zS(rY.height),borderRadius:zS(rY.radius)},"data-rue-tour-blocker":"true"}):null]}):r("div",{"aria-hidden":"true",className:LS("pointer-events-auto fixed inset-0",rB.mask),style:RS(rK.mask,rH.style,{background:rH.color}),onClick:t9,"data-rue-tour-mask":"true","data-rue-tour-mask-part":"full"})}):null,i("div",{ref:e$=>{tR.current=e$??void 0,e$&&t6()},role:"dialog","aria-modal":rH?"true":"false",className:LS("pointer-events-auto fixed w-[min(92vw,23rem)] rounded-[14px] border px-0 py-0 transition duration-200 ease-out md:w-[23rem]","primary"===rF?"border-primary/25 bg-[linear-gradient(180deg,rgba(8,47,73,0.98),rgba(8,78,119,0.96))] text-primary-content shadow-[0_28px_90px_-40px_rgba(15,23,42,0.7)] backdrop-blur-xl":"border-black/[0.06] bg-white text-[#262626] shadow-[0_12px_32px_rgba(0,0,0,0.18),0_3px_10px_rgba(0,0,0,0.12)]",rB.panel,rz.className),style:RS(rK.panel,rz.style,rU),"data-rue-tour-panel":"true",children:[tG.value?r("span",{"aria-hidden":"true",className:LS("absolute size-[14px] rotate-45 border","primary"===rF?"border-primary/20 bg-sky-900 shadow-[8px_8px_18px_-14px_rgba(15,23,42,0.75)]":"border-black/[0.06] bg-white shadow-[8px_8px_18px_-14px_rgba(0,0,0,0.28)]",rB.arrow),style:RS(rK.arrow,tG.value),"data-rue-tour-arrow":"true"}):null,i("div",{className:LS("relative px-6 pb-5 pt-5",rB.section),style:rK.section,"data-rue-tour-section":"true",children:[r("button",{type:"button","aria-label":String(rP.close),className:LS("absolute right-4 top-4 inline-flex h-8 w-8 items-center justify-center rounded-full transition","primary"===rF?"text-primary-content/80 hover:bg-white/10 hover:text-primary-content":"text-black/35 hover:bg-black/[0.04] hover:text-black/60",rB.close),style:rK.close,onClick:t7,"data-rue-tour-close":"true",children:r0}),rz.cover?r("div",{className:LS("mb-5 overflow-hidden rounded-[12px]",rB.cover),style:rK.cover,"data-rue-tour-cover":"true",children:rz.cover}):null,i("div",{className:LS("pr-11",rB.body),style:rK.body,"data-rue-tour-body":"true",children:[i("div",{className:LS("mb-3 inline-flex items-center gap-2 rounded-full px-2.5 py-1 text-[11px] font-medium","primary"===rF?"bg-white/10 text-primary-content/70":"border border-black/[0.06] bg-[#fafafa] text-[#8c8c8c]",rB.meta),style:rK.meta,"data-rue-tour-meta":"true",children:[r(oC,{}),r("span",{children:"Tour"}),i("span",{className:"primary"===rF?"text-primary-content/50":"text-base-content/40",children:[String(rL+1).padStart(2,"0")," / ",String(rR).padStart(2,"0")]})]}),r("div",{className:LS("",rB.header),style:rK.header,"data-rue-tour-header":"true",children:rz.title?r("div",{className:LS("text-[1.08rem] font-semibold leading-7 tracking-[0.01em]",rB.title),style:rK.title,"data-rue-tour-title":"true",children:rz.title}):null}),rz.description?r("div",{className:LS("mt-3 text-[15px] leading-7","primary"===rF?"text-primary-content/80":"text-[#595959]",rB.description),style:rK.description,"data-rue-tour-description":"true",children:rz.description}):null]}),(eI=rJ?rJ(rL,rR):r("div",{className:LS("flex flex-wrap items-center gap-2.5",rB.indicators),style:rK.indicators,"data-rue-tour-indicators":"true",children:Array.from({length:rR}).map((e$,eI)=>(0,t.vapor)(e$=>{let eR=(0,t._$createElement)("span",e$);return(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"key",String(`indicator-${eI}`))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(LS("block size-2.5 rounded-full transition-all duration-200",eI===rL?"primary"===rF?"bg-white shadow-[0_0_0_2px_rgba(255,255,255,0.18)]":"bg-[#1677ff] shadow-[0_0_0_2px_rgba(22,119,255,0.14)]":"primary"===rF?"bg-white/30":"bg-black/12",rB.indicator)))}),(0,t.watchEffect)(()=>{let e$=rK.indicator;(0,t._$setStyle)(eR,e$)}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"data-rue-tour-indicator",String(eI===rL?"active":"inactive"))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"data-rue-tour-indicator-index",String(String(eI)))}),eR}))}),eR=0===rL||rz.prevButtonProps?.disabled,eL=!!rz.nextButtonProps?.disabled,ez=i("div",{className:LS("flex flex-wrap items-center justify-between gap-3",rB.actions),style:rK.actions,"data-rue-tour-actions":"true",children:[eI,i("div",{className:LS("flex items-center gap-2.5",rB.buttons),style:rK.buttons,"data-rue-tour-buttons":"true",children:[r("button",{type:"button",className:LS("inline-flex h-10 min-w-[84px] items-center justify-center rounded-[10px] border px-4 text-[14px] font-medium transition disabled:cursor-not-allowed","primary"===rF?"border-white/18 bg-transparent text-primary-content/78 hover:bg-white/10 hover:text-primary-content disabled:border-white/10 disabled:text-white/28":"border-black/[0.08] bg-white text-[#595959] hover:border-black/[0.12] hover:bg-[#fafafa] disabled:border-black/[0.06] disabled:bg-[#fafafa] disabled:text-black/25",rB.prevButton,rz.prevButtonProps?.className),style:RS(rK.prevButton,rz.prevButtonProps?.style),disabled:eR,onClick:rI,"data-rue-tour-prev":"true",children:rz.prevButtonProps?.children??rP.previous}),r("button",{type:"button",className:LS("inline-flex h-10 min-w-[96px] items-center justify-center rounded-[10px] border px-4 text-[14px] font-medium transition disabled:cursor-not-allowed","primary"===rF?"border-0 bg-white text-sky-900 shadow-[0_2px_0_rgba(255,255,255,0.08)] hover:bg-sky-50 disabled:bg-white/40 disabled:text-sky-950/40":"border-[#1677ff] bg-[#1677ff] text-white shadow-[0_2px_0_rgba(5,145,255,0.12)] hover:border-[#4096ff] hover:bg-[#4096ff] disabled:border-[#91caff] disabled:bg-[#91caff]",rB.nextButton,rz.nextButtonProps?.className),style:RS(rK.nextButton,rz.nextButtonProps?.style),disabled:eL,onClick:r$,"data-rue-tour-next":rL===rR-1?"finish":"next",children:rz.nextButtonProps?.children??(rL===rR-1?rP.finish:rP.next)})]})]}),(eW=rQ?rQ(ez,{current:rL,total:rR}):ez)?r("div",{className:LS("mt-5 border-t pt-4","primary"===rF?"border-white/10":"border-black/[0.06]",rB.footer),style:rK.footer,"data-rue-tour-footer":"true",children:eW}):null)]})]})]}),r2=US(eQ);return!1===r2||null==r2?r1:(0,t.vapor)(e$=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let e$=(0,t._$createComponent)(e.Teleport,{to:r2,children:r1});(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eR))}),eI})},cC=0,lC=120,uC=(...e$)=>e$.filter(Boolean).join(" "),dC=(...e$)=>{let eI={};return e$.forEach(e$=>{e$&&Object.assign(eI,e$)}),eI},fC=e$=>e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),pC=e$=>{if(e$)return"string"==typeof e$?e$.trim()||void 0:Object.entries(e$).filter(([,e$])=>null!=e$).map(([e$,eI])=>`${e$.startsWith("--")?e$:fC(e$)}:${String(eI)}`).join("; ")||void 0},mC=e$=>null!=e$&&!1!==e$&&""!==e$,hC=e$=>"function"==typeof e$?e$():e$,gC=e$=>!!e$&&"function"==typeof e$.then,_C=(e$,eI)=>{"function"==typeof e$&&e$(eI)},vC=e$=>Array.from(new Set(Array.isArray(e$)?e$:e$?[e$]:["click"])),yC=e$=>{switch(e$){case"top":return{direction:"top",align:"center"};case"topLeft":return{direction:"top",align:"start"};case"topRight":return{direction:"top",align:"end"};case"bottom":return{direction:"bottom",align:"center"};case"bottomRight":return{direction:"bottom",align:"end"};case"left":return{direction:"left",align:"center"};case"leftTop":return{direction:"left",align:"start"};case"leftBottom":return{direction:"left",align:"end"};case"right":return{direction:"right",align:"center"};case"rightTop":return{direction:"right",align:"start"};case"rightBottom":return{direction:"right",align:"end"};default:return{direction:"bottom",align:"start"}}},bC=e$=>{switch(e$){case"top":return"bottom-full left-1/2 mb-3 -translate-x-1/2";case"topLeft":return"bottom-full left-0 mb-3";case"topRight":return"bottom-full right-0 mb-3";case"bottom":return"top-full left-1/2 mt-3 -translate-x-1/2";case"bottomRight":return"top-full right-0 mt-3";case"left":return"right-full top-1/2 me-3 -translate-y-1/2";case"leftTop":return"right-full top-0 me-3";case"leftBottom":return"right-full bottom-0 me-3";case"right":return"left-full top-1/2 ms-3 -translate-y-1/2";case"rightTop":return"left-full top-0 ms-3";case"rightBottom":return"left-full bottom-0 ms-3";default:return"top-full left-0 mt-3"}},xC=e$=>{switch(e$){case"top":case"topLeft":case"topRight":return"origin-bottom";case"left":case"leftTop":case"leftBottom":return"origin-right";case"right":case"rightTop":case"rightBottom":return"origin-left";default:return"origin-top"}},SC=(e$,eI)=>{let eR=yC(e$);return"top"===eR.direction?uC("bottom-[-6px] border-r border-b",eI||"center"===eR.align?"left-1/2 -translate-x-1/2":"end"===eR.align?"right-5":"left-5"):"bottom"===eR.direction?uC("top-[-6px] border-l border-t",eI||"center"===eR.align?"left-1/2 -translate-x-1/2":"end"===eR.align?"right-5":"left-5"):"left"===eR.direction?uC("right-[-6px] border-r border-t",eI||"center"===eR.align?"top-1/2 -translate-y-1/2":"end"===eR.align?"bottom-5":"top-5"):uC("left-[-6px] border-l border-b",eI||"center"===eR.align?"top-1/2 -translate-y-1/2":"end"===eR.align?"bottom-5":"top-5")},CC=e$=>{switch(e$){case"xs":return"btn-xs";case"sm":case"small":return"btn-sm";case"lg":case"large":return"btn-lg";case"xl":return"btn-xl";default:return"btn-md"}},wC=(e$,eI)=>{let eR=eI?"danger":e$;return eR&&"default"!==eR?`btn-${"danger"===eR?"error":eR}`:""},TC=e$=>{switch(e$){case"outlined":return"btn-outline";case"dashed":return"btn-dash";case"filled":return"btn-soft";case"text":return"btn-ghost";case"link":return"btn-link";default:return""}},EC=e$=>{switch(e$){case"default":return{};case"danger":return{color:"danger"};case"primary":default:return{color:"primary"};case"filled":case"outlined":case"dashed":case"text":case"link":case"solid":return{type:e$}}},DC=(e$,eI,eR)=>uC("btn",CC(e$?.size),wC(e$?.color,e$?.danger),TC(e$?.type),e$?.shape==="circle"?"btn-circle":"",e$?.shape==="square"?"btn-square":"",e$?.shape==="round"?"rounded-full":"",e$?.block?"btn-block":"",e$?.wide?"btn-wide":"",eI,eR,e$?.className),OC=e$=>e$?"object"==typeof e$?{active:!0,icon:e$.icon}:{active:!0,icon:void 0}:{active:!1,icon:void 0},kC=(e$,eI,eR)=>{let{hasChildren:eL,loadingConfig:ez,shouldShowIcon:eW,renderIconContent:eH}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let eI=mC(e$?.children),eL=OC(e$?.loading);return{hasChildren:eI,loadingConfig:eL,shouldShowIcon:!!eR||!!e$?.icon,renderIconContent:()=>eR?eL.icon??r("span",{"aria-hidden":"true",className:"loading loading-spinner loading-xs"}):e$?.icon}}));return e$?.iconPlacement==="end"?(0,t.vapor)(eR=>{let ez=(0,t._$createDocumentFragment)(),eF=(0,t._$createElement)("span",ez);(0,t._$appendChild)(ez,eF);let eP=(0,t._$createTextWrapper)(eF);(0,t._$appendChild)(eF,eP),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eP,eL?e$?.children:eI)});let eB=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(ez,eB),(0,t.watchEffect)(()=>{let e$=eW?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("span",e$);(0,t._$appendChild)(e$,eI),(0,t._$setClassName)(eI,"inline-flex items-center justify-center");let eR=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let e$=eH();(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eR))}),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,ez,eB))}),ez}):(0,t.vapor)(eR=>{let ez=(0,t._$createDocumentFragment)(),eF=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(ez,eF),(0,t.watchEffect)(()=>{let e$=eW?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("span",e$);(0,t._$appendChild)(e$,eI),(0,t._$setClassName)(eI,"inline-flex items-center justify-center");let eR=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let e$=eH();(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eI,eR))}),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,ez,eF))});let eP=(0,t._$createElement)("span",ez);(0,t._$appendChild)(ez,eP);let eB=(0,t._$createTextWrapper)(eP);return(0,t._$appendChild)(eP,eB),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eB,eL?e$?.children:eI)}),ez})},AC=e$=>{let{currentOpenRef:eI,titleId:eR,descriptionId:eL,resolvedTitle:ez,resolvedDescription:eW,resolvedIcon:eH,okPreset:eF,showArrow:eP,isOkLoading:eB,hasTrigger:eK,setRootElement:eV,requestOpenChange:eq,scheduleHoverClose:eU,handleCancel:eG,handleConfirm:eZ,onMouseEnter:eY,onMouseLeave:eX,onFocus:eJ,onBlur:eQ,onClick:e0,onContextMenu:e1,rootClassName:e2,triggerClassName:e5,overlayClass:e3,arrowClassName:e4}=(0,t._$vaporWithHookId)("useSetup:0:0:dup1",()=>(0,t.useSetup)(()=>{let{title:eI,description:eR,disabled:eL,placement:ez,trigger:eW,arrow:eH,open:eF,defaultOpen:eP,icon:eB,okText:eK,cancelText:eV,okType:eq,okButtonProps:eU,cancelButtonProps:eG,showCancel:eZ,className:eY,style:eX,overlayClassName:eJ,overlayStyle:eQ,classNames:e0,styles:e1,onConfirm:e2,onCancel:e5,onOpenChange:e3,onPopupClick:e4,children:e6,...e8}=e$,e7=(0,t._$vaporWithHookId)("ref:1:0",()=>(0,t.ref)(void 0!==e$.defaultOpen&&e$.defaultOpen)),e9=(0,t._$vaporWithHookId)("ref:1:1",()=>(0,t.ref)(e$.open??(void 0!==e$.defaultOpen&&e$.defaultOpen))),t$=(0,t._$vaporWithHookId)("ref:1:2",()=>(0,t.ref)(vC(e$.trigger))),tI=(0,t._$vaporWithHookId)("ref:1:3",()=>(0,t.ref)(!1)),tR=(0,t._$vaporWithHookId)("ref:1:4",()=>(0,t.ref)(`rue-popconfirm-title-${cC++}`)),tL=(0,t._$vaporWithHookId)("ref:1:5",()=>(0,t.ref)(`rue-popconfirm-desc-${cC++}`)),tz=(0,t._$vaporWithHookId)("computed:1:6",()=>(0,t.computed)(()=>void 0!==e$.open)),tW=(0,t._$vaporWithHookId)("computed:1:7",()=>(0,t.computed)(()=>hC(e$.title))),tH=(0,t._$vaporWithHookId)("computed:1:8",()=>(0,t.computed)(()=>hC(e$.description))),tF=(0,t._$vaporWithHookId)("computed:1:9",()=>(0,t.computed)(()=>void 0===e$.icon?void 0:hC(e$.icon))),tP=(0,t._$vaporWithHookId)("computed:1:10",()=>(0,t.computed)(()=>EC(void 0===e$.okType?"primary":e$.okType))),tB="object"==typeof(void 0===e$.arrow||e$.arrow)&&!!(void 0===e$.arrow||e$.arrow).pointAtCenter,tK=(0,t._$vaporWithHookId)("computed:1:11",()=>(0,t.computed)(()=>(void 0===e$.arrow||e$.arrow)!==!1)),tV=OC(e$.okButtonProps?.loading),tq=e$=>t$.value.includes(e$),tU=null,tG=null,tZ=e$=>{tU!==e$&&(tU&&(tU.removeEventListener("focusin",t0),tU.removeEventListener("focusout",t1)),(tU=e$)&&(tU.addEventListener("focusin",t0),tU.addEventListener("focusout",t1)))},tY=()=>{tG&&(clearTimeout(tG),tG=null)};(0,t._$vaporWithHookId)("watch:1:12",()=>(0,t.watch)(()=>e$.open,e$=>{if("boolean"==typeof e$){e9.value=e$,e$||(tI.value=!1);return}e9.value=e7.value},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:13",()=>(0,t.watch)(()=>void 0!==e$.defaultOpen&&e$.defaultOpen,e$=>{tz.get()||(e7.value=!!e$,e9.value=!!e$)},{immediate:!0})),(0,t._$vaporWithHookId)("watch:1:14",()=>(0,t.watch)(()=>e$.trigger,e$=>{t$.value=vC(e$)},{immediate:!0}));let tX=eI=>{tY(),e$.disabled||eI===e9.value||(tz.get()||(e7.value=eI),e9.value=eI,eI||(tI.value=!1),e$.onOpenChange?.(eI))},tJ=e$=>{e9.value&&(tq("click")||tq("contextMenu"))&&(tU?.contains(e$.target)||tX(!1))},tQ=e$=>{e9.value&&"Escape"===e$.key&&tX(!1)},t0=e$=>{tq("focus")&&(t4?.(e$),e$.defaultPrevented||tX(!0))},t1=e$=>{if(!tq("focus")||(t6?.(e$),e$.defaultPrevented))return;let eI=e$.relatedTarget;eI&&tU?.contains(eI)||tX(!1)};(0,t.onMounted)(()=>{typeof window>"u"||(window.addEventListener("click",tJ,!0),window.addEventListener("keydown",tQ))}),(0,t.onUnmounted)(()=>{tY(),tZ(null),typeof window>"u"||(window.removeEventListener("click",tJ,!0),window.removeEventListener("keydown",tQ))});let t2=async eI=>{if(tI.value||(_C(e$.okButtonProps?.onClick,eI),eI.defaultPrevented))return;let eR=e$.onConfirm?.(eI);if(!1!==eR){if(gC(eR)){tI.value=!0,e9.value=!0;try{await eR!==!1&&tX(!1)}catch{}finally{tI.value=!1}return}tX(!1)}},{onMouseEnter:t5,onMouseLeave:t3,onFocus:t4,onBlur:t6,onClick:t8,onContextMenu:t7,...t9}=e8;return{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,__rue_rest_omit_20:e1,__rue_rest_omit_21:e2,__rue_rest_omit_22:e5,__rue_rest_omit_23:e3,__rue_rest_omit_24:e4,__rue_rest_omit_25:e6,rest:e8,uncontrolledOpen:e7,currentOpenRef:e9,currentTriggers:t$,confirmLoading:tI,titleId:tR,descriptionId:tL,isControlled:tz,resolvedTitle:tW,resolvedDescription:tH,resolvedIcon:tF,okPreset:tP,pointAtCenter:tB,showArrow:tK,resolvedOkLoading:tV,isOkLoading:()=>tI.value||tV.active,hasTrigger:tq,setRootElement:tZ,clearHoverCloseTimer:tY,requestOpenChange:tX,scheduleHoverClose:()=>{tY(),tG=setTimeout(()=>{tG=null,tX(!1)},lC)},handleWindowClick:tJ,handleWindowKeyDown:tQ,handleNativeFocusIn:t0,handleNativeFocusOut:t1,handleCancel:eI=>{_C(e$.cancelButtonProps?.onClick,eI),eI.defaultPrevented||(tX(!1),e$.onCancel?.(eI))},handleConfirm:t2,onMouseEnter:t5,onMouseLeave:t3,onFocus:t4,onBlur:t6,onClick:t8,onContextMenu:t7,domProps:t9,rootClassName:(0,t._$vaporWithHookId)("computed:1:15",()=>(0,t.computed)(()=>uC("relative inline-flex max-w-full align-top",e$.classNames?.root,e$.className))),triggerClassName:uC("inline-flex max-w-full items-stretch",e$.classNames?.trigger),overlayClass:(0,t._$vaporWithHookId)("computed:1:16",()=>(0,t.computed)(()=>uC("absolute z-50 w-max max-w-[min(24rem,calc(100vw-2rem))] transform-gpu transition duration-150 ease-out",bC(void 0===e$.placement?"top":e$.placement),xC(void 0===e$.placement?"top":e$.placement),e$.classNames?.overlay,e$.overlayClassName))),arrowClassName:(0,t._$vaporWithHookId)("computed:1:17",()=>(0,t.computed)(()=>uC("absolute block h-3 w-3 rotate-45 border-base-300/80 bg-base-100/95",SC(void 0===e$.placement?"top":e$.placement,tB),e$.classNames?.arrow))),rootElement:tU,hoverCloseTimer:tG}}));return(0,t.vapor)(e6=>{let e8=(0,t._$createElement)("div",e6),e7=(0,t._$vaporBindUseRef)(e8,()=>eV);(0,t.onBeforeUnmount)(()=>{e7()}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(e8,String(e2.get()))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(e8,pC(dC("string"==typeof e$.style?void 0:e$.style,e$.styles?.root)))}),(0,t._$addEventListener)(e8,"mouseenter",e$=>{_C(eY,e$),!e$?.defaultPrevented&&eK("hover")&&eq(!0)}),(0,t._$addEventListener)(e8,"mouseleave",e$=>{_C(eX,e$),!e$?.defaultPrevented&&eK("hover")&&eU()}),(0,t._$addEventListener)(e8,"focus",e$=>{_C(eJ,e$)}),(0,t._$addEventListener)(e8,"blur",e$=>{_C(eQ,e$)});let e9=(0,t._$createElement)("div",e8);(0,t._$appendChild)(e8,e9),(0,t.watchEffect)(()=>{(0,t._$setClassName)(e9,String(e5))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(e9,pC(e$.styles?.trigger))}),(0,t._$setAttribute)(e9,"aria-haspopup","dialog"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(e9,"aria-expanded",String(String(eI.value)))}),(0,t._$addEventListener)(e9,"click",e$=>{_C(e0,e$),!e$?.defaultPrevented&&eK("click")&&eq(!eI.value)}),(0,t._$addEventListener)(e9,"contextmenu",e$=>{_C(e1,e$),!e$?.defaultPrevented&&eK("contextMenu")&&("function"==typeof e$.preventDefault&&e$.preventDefault(),eq(!eI.value))});let t$=(0,t._$createComment)("rue:children:anchor");(0,t._$appendChild)(e9,t$),(0,t.watchEffect)(()=>{let eI=e$.children;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,e9,t$))});let tI=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(e8,tI),(0,t.watchEffect)(()=>{let eK=eI.value?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eK=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eK),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eK,String(e3.get()))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eK,pC(dC(e$.styles?.overlay,e$.overlayStyle)))}),(0,t._$setAttribute)(eK,"aria-hidden","false");let eV=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eK,eV),(0,t.watchEffect)(()=>{let eI=eP.get()?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("span",eI);return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(e4.get()))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,pC(e$.styles?.arrow))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eK,eV))});let eq=(0,t._$createElement)("div",eK);(0,t._$appendChild)(eK,eq),(0,t._$setAttribute)(eq,"data-rue-popconfirm-panel","true"),(0,t._$setAttribute)(eq,"role","alertdialog"),(0,t._$setAttribute)(eq,"aria-modal","false"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eq,"aria-labelledby",String(mC(ez.get())?eR.value:void 0))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eq,"aria-describedby",String(mC(eW.get())?eL.value:void 0))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eq,String(uC("space-y-4 rounded-[1.15rem] border border-base-300/80 bg-base-100/95 p-4 shadow-[0_20px_48px_-28px_rgba(15,23,42,0.55)] backdrop-blur",e$.classNames?.panel)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eq,pC(e$.styles?.panel))}),(0,t._$addEventListener)(eq,"click",eI=>{e$.onPopupClick?.(eI)});let eU=(0,t._$createElement)("div",eq);(0,t._$appendChild)(eq,eU),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eU,String(uC("flex items-start gap-3",e$.classNames?.body)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eU,pC(e$.styles?.body))});let eY=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eU,eY),(0,t.watchEffect)(()=>{let eI=mC(eH.get())?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(uC("mt-0.5 shrink-0",e$.classNames?.icon)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,pC(e$.styles?.icon))});let eL=(0,t._$createTextWrapper)(eR);return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eL,eH.get())}),eI}):void 0===e$.icon?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(uC("mt-0.5 shrink-0",e$.classNames?.icon)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,pC(e$.styles?.icon))});let eL=(0,t._$createElement)("span",eR);(0,t._$appendChild)(eR,eL),(0,t._$setAttribute)(eL,"aria-hidden","true"),(0,t._$setClassName)(eL,"inline-flex h-8 w-8 items-center justify-center rounded-full bg-warning/12 text-warning ring-1 ring-inset ring-warning/25");let ez=(0,t._$createElement)("svg",eL);(0,t._$appendChild)(eL,ez),(0,t._$setAttribute)(ez,"viewBox","0 0 24 24"),(0,t._$setClassName)(ez,"h-4 w-4"),(0,t._$setAttribute)(ez,"fill","none"),(0,t._$setAttribute)(ez,"stroke","currentColor"),(0,t._$setAttribute)(ez,"strokeWidth","1.8");let eW=(0,t._$createElement)("path",ez);(0,t._$appendChild)(ez,eW),(0,t._$setAttribute)(eW,"strokeLinecap","round"),(0,t._$setAttribute)(eW,"strokeLinejoin","round"),(0,t._$setAttribute)(eW,"d","M12 8.5v4.75");let eH=(0,t._$createElement)("circle",ez);(0,t._$appendChild)(ez,eH),(0,t._$setAttribute)(eH,"cx","12"),(0,t._$setAttribute)(eH,"cy","16.3"),(0,t._$setAttribute)(eH,"r","0.75"),(0,t._$setAttribute)(eH,"fill","currentColor"),(0,t._$setAttribute)(eH,"stroke","none");let eF=(0,t._$createElement)("path",ez);return(0,t._$appendChild)(ez,eF),(0,t._$setAttribute)(eF,"strokeLinecap","round"),(0,t._$setAttribute)(eF,"strokeLinejoin","round"),(0,t._$setAttribute)(eF,"d","M10.04 3.77 3.9 14.08A2 2 0 0 0 5.63 17h12.74a2 2 0 0 0 1.72-2.92L13.96 3.77a2.25 2.25 0 0 0-3.92 0Z"),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eU,eY))});let eX=(0,t._$createElement)("div",eU);(0,t._$appendChild)(eU,eX),(0,t._$setClassName)(eX,"min-w-0 flex-1 space-y-1.5");let eJ=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eX,eJ),(0,t.watchEffect)(()=>{let eI=mC(ez.get())?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eL),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"id",String(eR.value))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(uC("text-sm font-semibold leading-5 text-base-content",e$.classNames?.title)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eL,pC(e$.styles?.title))});let eW=(0,t._$createTextWrapper)(eL);return(0,t._$appendChild)(eL,eW),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eW,ez.get())}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eX,eJ))}),(0,t._$appendChild)(eX,(0,t._$createTextNode)(" "));let eQ=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eX,eQ),(0,t.watchEffect)(()=>{let eI=mC(eW.get())?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"id",String(eL.value))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(uC("text-xs leading-5 text-base-content/70",e$.classNames?.description)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,pC(e$.styles?.description))});let ez=(0,t._$createTextWrapper)(eR);return(0,t._$appendChild)(eR,ez),(0,t.watchEffect)(()=>{(0,t._$settextContent)(ez,eW.get())}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eX,eQ))});let e0=(0,t._$createElement)("div",eq);(0,t._$appendChild)(eq,e0),(0,t.watchEffect)(()=>{(0,t._$setClassName)(e0,String(uC("flex items-center justify-end gap-2 border-t border-base-200/80 pt-3",e$.classNames?.footer)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(e0,pC(e$.styles?.footer))});let e1=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(e0,e1),(0,t.watchEffect)(()=>{let eI=void 0===e$.showCancel||e$.showCancel?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("button",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"data-rue-popconfirm-action","cancel"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"type",String(e$.cancelButtonProps?.htmlType??"button"))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(DC({...e$.cancelButtonProps,type:e$.cancelButtonProps?.type??"text",size:e$.cancelButtonProps?.size??"small"},"",e$.classNames?.cancelButton)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,pC(dC(e$.styles?.cancelButton,e$.cancelButtonProps?.style)))}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eR,e$.cancelButtonProps?.disabled)}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"aria-disabled",String(String(!!e$.cancelButtonProps?.disabled)))}),(0,t._$addEventListener)(eR,"click",eG);let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=kC(e$.cancelButtonProps,void 0===e$.cancelText?"取消":e$.cancelText);(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,e0,e1))});let e2=(0,t._$createElement)("button",e0);(0,t._$appendChild)(e0,e2),(0,t._$setAttribute)(e2,"data-rue-popconfirm-action","ok"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(e2,"type",String(e$.okButtonProps?.htmlType??"button"))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(e2,String(DC({...eF.get(),...e$.okButtonProps,size:e$.okButtonProps?.size??"small"},(void 0===e$.okType?"primary":e$.okType)==="default"?"":"btn-primary",e$.classNames?.okButton)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(e2,pC(dC(e$.styles?.okButton,e$.okButtonProps?.style)))}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(e2,!!e$.okButtonProps?.disabled||eB())}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(e2,"aria-disabled",String(String(!!e$.okButtonProps?.disabled||eB())))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(e2,"aria-busy",String(String(eB())))}),(0,t._$addEventListener)(e2,"click",eZ);let e5=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(e2,e5),(0,t.watchEffect)(()=>{let eI=kC(e$.okButtonProps,void 0===e$.okText?"确认":e$.okText,eB());(0,t.untrack)(()=>(0,t.renderAnchor)(eI,e2,e5))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eK,e8,tI))}),e8})},jC=(e$,eI,eR)=>Math.min(eR,Math.max(eI,e$)),MC=(e$,eI)=>eI?`${e$} ${eI}`:e$,NC=(e$,eI,eR,eL)=>{let ez=(eL-90)*Math.PI/180;return{x:e$+eR*Math.cos(ez),y:eI+eR*Math.sin(ez)}},PC=(e$,eI,eR,eL,ez)=>{let eW=NC(e$,eI,eR,eL),eH=NC(e$,eI,eR,ez),eF=+(ez-eL>180);return`M ${eW.x} ${eW.y} A ${eR} ${eR} 0 ${eF} 1 ${eH.x} ${eH.y}`},FC=(e$,eI)=>{switch(e$??("success"===eI?"success":"exception"===eI?"error":void 0)??"primary"){case"neutral":return"text-neutral";case"secondary":return"text-secondary";case"accent":return"text-accent";case"info":return"text-info";case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return"text-primary"}},IC=(e$,eI)=>e$||((eI??0)>=100?"success":"normal"),LC=(e$,eI,eR)=>"number"==typeof e$?jC(e$,0,100):"number"==typeof eI?jC("number"==typeof eR&&eR>0?eI/eR*100:eI,0,100):void 0,RC=e$=>"number"==typeof e$?.percent?jC(e$.percent,0,100):0,zC=(e$,eI)=>Array.isArray(e$)?{width:e$[0],height:"number"==typeof e$[1]?e$[1]:10}:"object"==typeof e$&&e$?{width:e$.width,height:"number"==typeof e$.height?e$.height:10}:"number"==typeof e$?{width:void 0,height:e$}:"number"==typeof eI&&eI>0?{width:void 0,height:eI}:"small"===e$?{width:void 0,height:6}:{width:void 0,height:10},BC=e$=>"number"==typeof e$?e$:"string"==typeof e$&&"small"===e$?84:120,VC=e$=>"number"==typeof e$&&e$>0?{count:Math.floor(e$),gap:4}:"object"==typeof e$&&e$&&e$.count>0?{count:Math.floor(e$.count),gap:e$.gap>=0?e$.gap:4}:null,HC=e$=>{switch(e$){case"butt":return"rounded-none";case"square":return"rounded-sm";default:return"rounded-full"}},UC=e$=>{if(!(!e$||Array.isArray(e$)))return"string"==typeof e$?{backgroundColor:e$}:{backgroundImage:`linear-gradient(${e$.direction??"to right"}, ${e$.from}, ${e$.to})`}},WC=e$=>{if(e$)return"string"==typeof e$?e$:Array.isArray(e$)?e$[0]:e$.from},GC=(e$,eI)=>{if(!(!Array.isArray(e$)||!e$.length))return{backgroundColor:e$[Math.min(eI,e$.length-1)]}},KC=(e$,eI)=>{if(e$)return e$;switch(eI){case"left":return"start";case"right":return"end";default:return eI??"bottom"}},qC=e$=>{switch(e$){case"top":return 0;case"start":return 270;case"end":return 90;default:return 180}},JC=e$=>null!=e$&&(!Array.isArray(e$)||e$.length>0),YC=({status:e$})=>"success"===e$?r("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-success/15 text-success",children:r("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-3.5 w-3.5",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m5 10 3 3 7-7"})})}):"exception"===e$?r("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-error/15 text-error",children:r("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-3.5 w-3.5",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 6 8 8M14 6l-8 8"})})}):null,XC=({children:e$,showInfo:eI,format:eR,percent:eL,successPercent:ez,status:eW,type:eH,inner:eF})=>JC(e$)?e$:!1===eI?null:eR?eR(eL,ez):eF||"success"!==eW&&"exception"!==eW?null==eL?"line"===eH?"加载中":"--":`${Math.round(eL)}%`:r(YC,{status:eW}),ZC=({color:e$,className:eI,type:eR="line",percent:eL,max:ez,value:eW,status:eH,showInfo:eF=!0,format:eP,size:eB,strokeWidth:eK,strokeLinecap:eV="round",strokeColor:eq,trailColor:eU,railColor:eG,success:eZ,steps:eY,gapDegree:eX,gapPlacement:eJ,gapPosition:eQ,percentPosition:e0,rounding:e1=Math.round,children:e2,...e5})=>{let e3=JC(e2);if(!(void 0!==eL||"line"!==eR||void 0!==eH||!0!==eF||void 0!==eP||void 0!==eB||void 0!==eK||"round"!==eV||void 0!==eq||void 0!==eU||void 0!==eG||void 0!==eZ||void 0!==eY||void 0!==eX||void 0!==eJ||void 0!==eQ||void 0!==e0||e3)){let eR="progress";return e$&&(eR+=` progress-${e$}`),eI&&(eR+=` ${eI}`),r("progress",{...e5,...void 0===ez?{}:{max:String(ez)},...void 0===eW?{}:{value:eW},className:eR})}let e4=LC(eL,eW,ez),e6=Math.min(RC(eZ),e4??100),e8=IC(eH,e4),e7=eG??eU,e9=FC(e$,e8),t$=e0?.type??"outer",tI=e0?.align??"end",tR=XC({children:e2,showInfo:eF,format:eP,percent:e4,successPercent:e6,status:e8,type:eR,inner:"line"===eR&&"inner"===t$&&!eY});if("line"===eR){let e$=zC(eB,eK),eR=HC(eV),eL=e$.width?{width:"number"==typeof e$.width?`${e$.width}px`:e$.width}:void 0,ez=VC(eY),eW="outer"===t$&&null!=tR?r("div",{className:`text-sm ${"center"===tI?"text-center":"start"===tI?"text-left":"text-right"}`,children:tR}):null,eH=i("div",{className:MC(`relative w-full overflow-hidden bg-base-300/70 ${eR}`,void 0),style:{...eL,...e7?{backgroundColor:e7}:{},height:`${e$.height}px`},children:[ez?r("div",{className:"flex h-full w-full",style:{gap:`${ez.gap}px`},children:Array.from({length:ez.count},(e$,eI)=>{let eL=null==e4?0:jC(e1(e4/100*ez.count),0,ez.count),eW=jC(e1(e6/100*ez.count),0,ez.count),eH=eI<eW,eF=eI>=eW&&eI<eL,eP=eF?GC(eq,eI):void 0;return r("span",{className:MC(`block h-full flex-1 ${eR}`,eH?"bg-success":eF?MC("bg-current",e9):"bg-base-300/70"),style:eH?eZ?.strokeColor?{backgroundColor:eZ.strokeColor}:void 0:eF?eP:e7?{backgroundColor:e7}:void 0},eI)})}):null==e4?r("span",{className:MC(`absolute inset-y-0 left-0 animate-pulse bg-current ${eR}`,e9),style:{width:"38%",...UC(eq)}}):i(e.Fragment,{children:[e6>0?r("span",{className:MC(`absolute inset-y-0 left-0 ${eR}`,eZ?.strokeColor?void 0:"bg-success"),style:{width:`${e6}%`,...eZ?.strokeColor?{backgroundColor:eZ.strokeColor}:{}}}):null,(e4??0)>e6?r("span",{className:MC(`absolute inset-y-0 ${eR} bg-current`,e9),style:{left:`${e6}%`,width:`${Math.max((e4??0)-e6,0)}%`,...UC(eq)}}):null,"active"===e8?r("span",{className:MC(`absolute inset-y-0 left-0 animate-pulse bg-white/20 ${eR}`,void 0),style:{width:`${e4??0}%`,backgroundImage:"repeating-linear-gradient(120deg, rgba(255,255,255,0.15) 0 10px, rgba(255,255,255,0.32) 10px 20px)"}}):null]}),"inner"!==t$||null==tR||ez?null:r("span",{className:`absolute inset-0 flex items-center px-3 text-xs font-medium ${"center"===tI?"justify-center text-white":"start"===tI?"justify-start text-white":"justify-end text-white"}`,children:tR})]}),eF=eW&&"end"===tI?i("div",{className:"flex items-center gap-3",children:[r("div",{className:MC("min-w-0 flex-1",e9),children:eH}),r("div",{className:"shrink-0 text-sm",children:tR})]}):i("div",{className:MC("space-y-2",e9),children:[eH,eW]});return r("div",{...e5,className:MC("rue-progress w-full",eI),"data-progress-type":"line",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":null==e4?void 0:String(Math.round(e4)),children:eF})}let tL=BC(eB),tz=jC(eK??8,2,20),tW=50-tz/2,tH=jC("dashboard"===eR?eX??75:eX??0,0,295),tF=qC(KC(eJ,eQ))+tH/2,tP=360-tH,tB=tF+("circle"===eR&&0===tH?359.999:tP),tK=tF+(e4??0)/100*tP,tV=tF+e6/100*tP,tq=WC(eq),tU=VC(eY),tG="square"===eV?"square":"butt"===eV?"butt":"round",tZ=PC(50,50,tW,tF,tB);return r("div",{...e5,className:MC(`rue-progress inline-flex flex-col items-center gap-3 ${e9}`,eI),"data-progress-type":eR,role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":null==e4?void 0:String(Math.round(e4)),children:i("div",{className:"relative",style:{width:`${tL}px`,height:`${tL}px`},children:[i("svg",{viewBox:"0 0 100 100",className:"h-full w-full -rotate-90 overflow-visible",children:[r("path",{d:tZ,fill:"none",stroke:e7??"currentColor",strokeWidth:tz,strokeLinecap:tG,className:e7?void 0:"text-base-300/70"}),tU?Array.from({length:tU.count},(e$,eI)=>{let eR=jC(tU.gap,0,tP/Math.max(2*tU.count,1)),eL=Math.max((tP-eR*(tU.count-1))/tU.count,.01),ez=tF+eI*(eL+eR),eW=null==e4?0:jC(e1(e4/100*tU.count),0,tU.count),eH=jC(e1(e6/100*tU.count),0,tU.count),eF=eI<eH,eP=eI>=eH&&eI<eW;return r("path",{d:PC(50,50,tW,ez,ez+eL),fill:"none",stroke:eF?eZ?.strokeColor??"#22c55e":eP?WC(eq)??"currentColor":e7??"currentColor",strokeWidth:tz,strokeLinecap:tG,className:eF||eP||e7?void 0:"text-base-300/70"},eI)}):null,!tU&&e6>0?r("path",{d:PC(50,50,tW,tF,tV),fill:"none",stroke:eZ?.strokeColor??"#22c55e",strokeWidth:tz,strokeLinecap:tG}):null,!tU&&(e4??0)>e6?r("path",{d:PC(50,50,tW,tV,tK),fill:"none",stroke:tq??"currentColor",strokeWidth:tz,strokeLinecap:tG}):null]}),null==tR?null:r("div",{className:"absolute inset-0 flex items-center justify-center px-4 text-center text-sm font-medium text-base-content",children:tR})]})})},QC=4,$C=[236,17],ew={L:1,M:0,Q:3,H:2},tw=3,nw=3,rw=40,iw=10,aw=[[!0,!1,!0,!0,!0,!1,!0,!1,!1,!1,!1],[!1,!1,!1,!1,!0,!1,!0,!0,!0,!1,!0]],ow=["L","M","Q","H"],sw={L:[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],M:[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],Q:[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],H:[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]},cw={L:[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],M:[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],Q:[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],H:[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]},lw=(e$,eI)=>Array.from({length:e$},()=>Array.from({length:e$},()=>eI)),uw=e$=>e$.map(e$=>e$.slice()),dw=(e$,eI,eR)=>{for(let eL=eR-1;eL>=0;--eL)e$.push(eI>>>eL&1)},fw=e$=>{let eI=[];for(let eR=0;eR<e$.length;eR+=8){let eL=0;for(let eI=0;eI<8;eI+=1)eL=eL<<1|(e$[eR+eI]??0);eI.push(eL)}return eI},pw=e$=>{let eI=(16*e$+128)*e$+64;if(e$>=2){let eR=Math.floor(e$/7)+2;eI-=(25*eR-10)*eR-55,e$>=7&&(eI-=36)}return eI},mw=(e$,eI)=>Math.floor(pw(e$)/8)-sw[eI][e$]*cw[eI][e$],hw=(e$,eI,eR)=>{for(let eL=1;eL<=40;eL+=1){let ez=4+(eL<10?8:16)+8*e$;if(ez>8*mw(eL,eI))continue;let eW=eI;if(eR){let e$=ow.indexOf(eI);for(let eI=e$+1;eI<ow.length;eI+=1){let e$=ow[eI];ez<=8*mw(eL,e$)&&(eW=e$)}}return{version:eL,level:eW}}return null},gw=(e$,eI)=>{let eR=0;for(let eL=7;eL>=0;--eL)eR=eR<<1^(eR>>>7&1)*285,eI>>>eL&1&&(eR^=e$);return 255&eR},_w=e$=>{let eI=Array.from({length:e$},()=>0);eI[e$-1]=1;let eR=1;for(let eL=0;eL<e$;eL+=1){for(let eL=0;eL<e$;eL+=1)eI[eL]=gw(eI[eL],eR),eL+1<e$&&(eI[eL]^=eI[eL+1]);eR=gw(eR,2)}return eI},vw=(e$,eI)=>{let eR=eI.map(()=>0);for(let eL of e$){let e$=eL^eR[0];eR.copyWithin(0,1),eR[eR.length-1]=0;for(let eL=0;eL<eR.length;eL+=1)eR[eL]^=gw(eI[eL],e$)}return eR},yw=(e$,eI,eR)=>{let eL=cw[eR][eI],ez=sw[eR][eI],eW=Math.floor(pw(eI)/8),eH=eL-eW%eL,eF=Math.floor(eW/eL),eP=_w(ez),eB=[],eK=0;for(let eI=0;eI<eL;eI+=1){let eR=eF-ez+(eI<eH?0:1),eL=e$.slice(eK,eK+eR);eK+=eR;let eW=vw(eL,eP),eV=eL.slice();eI<eH&&eV.push(0),eB.push(eV.concat(eW))}let eV=[],eq=eF-ez;for(let e$=0;e$<eB[0].length;e$+=1)for(let eI=0;eI<eB.length;eI+=1)(e$!==eq||eI>=eH)&&eV.push(eB[eI][e$]);return eV},bw=e$=>{if(1===e$)return[];let eI=Math.floor(e$/7)+2,eR=32===e$?26:2*Math.ceil((4*e$+2*eI+1)/(2*eI-2)),eL=[6];for(let ez=4*e$+17-7;eL.length<eI;ez-=eR)eL.splice(1,0,ez);return eL},xw=(e$,eI,eR,eL)=>{for(let ez=-4;ez<=4;ez+=1)for(let eW=-4;eW<=4;eW+=1){let eH=e$+eW,eF=eI+ez;if(eH<0||eH>=eR||eF<0||eF>=eR)continue;let eP=Math.max(Math.abs(eW),Math.abs(ez));eL(eH,eF,2!==eP&&4!==eP)}},Sw=(e$,eI,eR)=>{for(let eL=-2;eL<=2;eL+=1)for(let ez=-2;ez<=2;ez+=1){let eW=Math.max(Math.abs(ez),Math.abs(eL));eR(e$+ez,eI+eL,1!==eW)}},Cw=(e$,eI,eR,eL)=>{let ez=e$.length,eW=(eR,eL,ez)=>{e$[eL][eR]=ez,eI[eL][eR]=!0},eH=ew[eR]<<3|eL,eF=eH;for(let e$=0;e$<10;e$+=1)eF=eF<<1^(eF>>>9&1)*1335;let eP=(eH<<10|eF)^21522;for(let e$=0;e$<=5;e$+=1)eW(8,e$,(eP>>>e$&1)!=0);eW(8,7,(eP>>>6&1)!=0),eW(8,8,(eP>>>7&1)!=0),eW(7,8,(eP>>>8&1)!=0);for(let e$=9;e$<15;e$+=1)eW(14-e$,8,(eP>>>e$&1)!=0);for(let e$=0;e$<8;e$+=1)eW(ez-1-e$,8,(eP>>>e$&1)!=0);for(let e$=8;e$<15;e$+=1)eW(8,ez-15+e$,(eP>>>e$&1)!=0);eW(8,ez-8,!0)},ww=(e$,eI,eR)=>{if(eR<7)return;let eL=e$.length,ez=(eR,eL,ez)=>{e$[eL][eR]=ez,eI[eL][eR]=!0},eW=eR;for(let e$=0;e$<12;e$+=1)eW=eW<<1^(eW>>>11&1)*7973;let eH=eR<<12|eW;for(let e$=0;e$<18;e$+=1){let eI=(eH>>>e$&1)!=0,eR=eL-11+e$%3,eW=Math.floor(e$/3);ez(eR,eW,eI),ez(eW,eR,eI)}},Tw=(e$,eI,eR,eL)=>{let ez=eI.length;for(let e$=0;e$<ez;e$+=1)eL(6,e$,e$%2==0),eL(e$,6,e$%2==0);xw(3,3,ez,eL),xw(ez-4,3,ez,eL),xw(3,ez-4,ez,eL);let eW=bw(e$);for(let e$=0;e$<eW.length;e$+=1)for(let eI=0;eI<eW.length;eI+=1)0===eI&&0===e$||0===eI&&e$===eW.length-1||eI===eW.length-1&&0===e$||Sw(eW[eI],eW[e$],eL);Cw(eI,eR,"M",0),ww(eI,eR,e$)},Ew=(e$,eI,eR)=>{let eL=eI.length,ez=0;for(let eW=eL-1;eW>=1;eW-=2){6===eW&&(eW=5);for(let eH=0;eH<eL;eH+=1){let eF=eW+1&2?eH:eL-1-eH;for(let eL=0;eL<2;eL+=1){let eH=eW-eL;if(!eR[eF][eH]&&ez<8*e$.length){let eR=e$[ez>>>3]>>>7-(7&ez)&1;eI[eF][eH]=0!==eR,ez+=1}}}}},Dw=(e$,eI,eR)=>{switch(e$){case 0:return(eI+eR)%2==0;case 1:return eR%2==0;case 2:return eI%3==0;case 3:return(eI+eR)%3==0;case 4:return(Math.floor(eR/2)+Math.floor(eI/3))%2==0;case 5:return eI*eR%2+eI*eR%3==0;case 6:return(eI*eR%2+eI*eR%3)%2==0;case 7:return((eI+eR)%2+eI*eR%3)%2==0;default:return!1}},Ow=(e$,eI,eR)=>{for(let eL=0;eL<e$.length;eL+=1)for(let ez=0;ez<e$.length;ez+=1)!eI[eL][ez]&&Dw(eR,ez,eL)&&(e$[eL][ez]=!e$[eL][ez])},kw=e$=>aw.some(eI=>eI.every((eI,eR)=>eI===e$[eR])),Aw=e$=>{let eI=e$.length,eR=0;for(let eL=0;eL<eI;eL+=1){let ez=e$[eL][0],eW=1;for(let eH=1;eH<=eI;eH+=1){let eF=eH<eI?e$[eL][eH]:!ez;eH<eI&&eF===ez?eW+=1:(eW>=5&&(eR+=tw+(eW-5)),ez=eF,eW=1)}}for(let eL=0;eL<eI;eL+=1){let ez=e$[0][eL],eW=1;for(let eH=1;eH<=eI;eH+=1){let eF=eH<eI?e$[eH][eL]:!ez;eH<eI&&eF===ez?eW+=1:(eW>=5&&(eR+=tw+(eW-5)),ez=eF,eW=1)}}for(let eL=0;eL<eI-1;eL+=1)for(let ez=0;ez<eI-1;ez+=1){let eI=e$[eL][ez];eI===e$[eL][ez+1]&&eI===e$[eL+1][ez]&&eI===e$[eL+1][ez+1]&&(eR+=nw)}for(let eL=0;eL<eI;eL+=1)for(let ez=0;ez<=eI-11;ez+=1)kw(e$[eL].slice(ez,ez+11))&&(eR+=rw);for(let eL=0;eL<eI;eL+=1)for(let ez=0;ez<=eI-11;ez+=1)kw(Array.from({length:11},(eI,eR)=>e$[ez+eR][eL]))&&(eR+=rw);let eL=0;for(let eI of e$)for(let e$ of eI)e$&&(eL+=1);let ez=eI*eI;return eR+(Math.ceil(Math.abs(20*eL-10*ez)/ez)-1)*iw},jw=e$=>"u">typeof TextEncoder?Array.from(new TextEncoder().encode(e$)):Array.from(encodeURIComponent(e$).match(/%[0-9A-F]{2}|./gi)??[]).map(e$=>e$.startsWith("%")?Number.parseInt(e$.slice(1),16):e$.charCodeAt(0)),Mw=(e$,eI={})=>{let eR=jw(e$),eL=eI.errorLevel??"M",ez=hw(eR.length,eL,!1!==eI.boostLevel);if(!ez)throw RangeError("QR code payload exceeds version 40 capacity");let{version:eW,level:eH}=ez,eF=eW<10?8:16;if(eR.length>=1<<eF)throw RangeError("QR code payload is too long for byte mode");let eP=mw(eW,eH),eB=[];for(let e$ of(dw(eB,QC,4),dw(eB,eR.length,eF),eR))dw(eB,e$,8);for(dw(eB,0,Math.min(4,8*eP-eB.length));eB.length%8!=0;)eB.push(0);let eK=fw(eB);for(;eK.length<eP;)eK.push($C[eK.length%2]);let eV=yw(eK,eW,eH),eq=4*eW+17,eU=lw(eq,!1),eG=lw(eq,!1);Tw(eW,eU,eG,(e$,eI,eR)=>{eU[eI][e$]=eR,eG[eI][e$]=!0}),Ew(eV,eU,eG);let eZ=0,eY=1/0,eX=eU;for(let e$=0;e$<8;e$+=1){let eI=uw(eU);Ow(eI,eG,e$),Cw(eI,eG,eH,e$);let eR=Aw(eI);eR<eY&&(eY=eR,eZ=e$,eX=eI)}return{version:eW,size:eq,mask:eZ,level:eH,matrix:eX}},Nw={expired:"二维码已过期",refresh:"刷新二维码",scanned:"已扫码,等待确认",loading:"准备二维码中…",overflow:"内容过长,请缩短后重试"},Pw=(...e$)=>e$.filter(Boolean).join(" "),Fw=(e$,eI,eR)=>Number.isFinite(e$)?Math.min(Math.max(e$,eI),eR):eI,Iw=(e$,eI)=>{let eR=Fw(Math.round(.24*eI),22,Math.round(.42*eI));if("number"==typeof e$){let eR=Fw(e$,16,Math.round(.42*eI));return{width:eR,height:eR}}return e$&&"object"==typeof e$?{width:Fw(e$.width??eR,16,Math.round(.42*eI)),height:Fw(e$.height??eR,16,Math.round(.42*eI))}:{width:eR,height:eR}},Lw=(e$,eI)=>{let eR="";for(let eL=0;eL<e$.length;eL+=1){let ez=-1;for(let eW=0;eW<=e$.length;eW+=1){let eH=eW<e$.length&&e$[eL][eW];if(eH&&ez<0&&(ez=eW),!eH&&ez>=0){let e$=ez+eI,eH=eL+eI;eR+=`M${e$} ${eH}h${eW-ez}v1H${e$}z`,ez=-1}}}return eR},Rw=(e$,eI,eR)=>{let eL=eR.width/eI*e$,ez=eR.height/eI*e$,eW=Math.max(.18*Math.min(eR.width,eR.height)*e$/eI,.9);return{x:(e$-eL)/2,y:(e$-ez)/2,width:eL,height:ez,padding:eW}},zw=(e$,eI,eR,eL,ez)=>{let eW=Math.max(1,Math.round(eR.width)),eH=Math.max(1,Math.round(eR.height)),eF=Math.max(4,Math.round(.18*Math.min(eW,eH))),eP=Math.round((eI-eW)/2),eB=Math.round((eI-eH)/2);e$.fillStyle=eL,e$.fillRect(eP-eF,eB-eF,eW+2*eF,eH+2*eF),e$.drawImage(ez,eP,eB,eW,eH)},Bw=(e$,eI,eR)=>{try{return{encoded:Mw(e$,{errorLevel:eI,boostLevel:eR}),error:null}}catch(e$){return{encoded:null,error:e$}}},Vw=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("span",e$);return(0,t._$setClassName)(eI,"loading loading-spinner loading-sm"),eI}),Hw=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.8"),(0,t._$setClassName)(eI,"h-5 w-5");let eR=(0,t._$createElement)("path",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","M12 7v5l3 3");let eL=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,eL),(0,t._$setAttribute)(eL,"strokeLinecap","round"),(0,t._$setAttribute)(eL,"strokeLinejoin","round"),(0,t._$setAttribute)(eL,"d","M20 12a8 8 0 1 1-2.34-5.66L20 8V4h-4"),eI}),Uw=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.8"),(0,t._$setClassName)(eI,"h-5 w-5");let eR=(0,t._$createElement)("path",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","m7 12 3 3 7-7");let eL=(0,t._$createElement)("circle",eI);return(0,t._$appendChild)(eI,eL),(0,t._$setAttribute)(eL,"cx","12"),(0,t._$setAttribute)(eL,"cy","12"),(0,t._$setAttribute)(eL,"r","9"),eI}),Ww=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.8"),(0,t._$setClassName)(eI,"h-5 w-5");let eR=(0,t._$createElement)("path",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","m12 4 8 14H4L12 4Z");let eL=(0,t._$createElement)("path",eI);(0,t._$appendChild)(eI,eL),(0,t._$setAttribute)(eL,"strokeLinecap","round"),(0,t._$setAttribute)(eL,"strokeLinejoin","round"),(0,t._$setAttribute)(eL,"d","M12 9v4");let ez=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,ez),(0,t._$setAttribute)(ez,"strokeLinecap","round"),(0,t._$setAttribute)(ez,"strokeLinejoin","round"),(0,t._$setAttribute)(ez,"d","M12 17h.01"),eI}),Gw=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.8"),(0,t._$setClassName)(eI,"h-4 w-4");let eR=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"strokeLinecap","round"),(0,t._$setAttribute)(eR,"strokeLinejoin","round"),(0,t._$setAttribute)(eR,"d","M20 12a8 8 0 1 1-2.34-5.66L20 8V4h-4"),eI}),Kw=e$=>(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI);(0,t._$setClassName)(eR,"flex flex-col items-center gap-2 text-center");let eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL),(0,t._$setClassName)(eL,"flex items-center gap-2 text-warning");let ez=(0,t._$createComment)("rue:component:anchor");(0,t._$appendChild)(eL,ez),(0,t.renderAnchor)((0,t._$createComponent)(Ww,{}),eL,ez);let eW=(0,t._$createElement)("span",eL);(0,t._$appendChild)(eL,eW),(0,t._$setClassName)(eW,"text-sm font-semibold text-base-content");let eH=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eW,eH),(0,t.watchEffect)(()=>{let eI=e$.locale.overflow;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eW,eH))});let eF=(0,t._$createElement)("p",eR);(0,t._$appendChild)(eR,eF),(0,t._$setClassName)(eF,"m-0 text-xs opacity-70");let eP=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eF,eP),(0,t.watchEffect)(()=>{let eI=e$.message;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eF,eP))}),eR}),qw=e$=>"loading"===e$.status?(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI);(0,t._$setClassName)(eR,"flex flex-col items-center gap-2");let eL=(0,t._$createComment)("rue:component:anchor");(0,t._$appendChild)(eR,eL),(0,t.renderAnchor)((0,t._$createComponent)(Vw,{}),eR,eL);let ez=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,ez),(0,t._$setClassName)(ez,"text-sm font-medium");let eW=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(ez,eW),(0,t.watchEffect)(()=>{let eI=e$.locale.loading;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,eW))}),eR}):"scanned"===e$.status?(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI);(0,t._$setClassName)(eR,"flex flex-col items-center gap-2 text-success");let eL=(0,t._$createComment)("rue:component:anchor");(0,t._$appendChild)(eR,eL),(0,t.renderAnchor)((0,t._$createComponent)(Uw,{}),eR,eL);let ez=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,ez),(0,t._$setClassName)(ez,"text-sm font-medium text-base-content");let eW=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(ez,eW),(0,t.watchEffect)(()=>{let eI=e$.locale.scanned;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,ez,eW))}),eR}):(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI);(0,t._$setClassName)(eR,"flex flex-col items-center gap-3");let eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL),(0,t._$setClassName)(eL,"flex items-center gap-2 text-warning");let ez=(0,t._$createComment)("rue:component:anchor");(0,t._$appendChild)(eL,ez),(0,t.renderAnchor)((0,t._$createComponent)(Hw,{}),eL,ez);let eW=(0,t._$createElement)("span",eL);(0,t._$appendChild)(eL,eW),(0,t._$setClassName)(eW,"text-sm font-medium text-base-content");let eH=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eW,eH),(0,t.watchEffect)(()=>{let eI=e$.locale.expired;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eW,eH))});let eF=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eF),(0,t.watchEffect)(()=>{let eI=e$.onRefresh?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("button",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"type","button"),(0,t._$setClassName)(eR,"btn btn-primary btn-sm rounded-full px-4"),(0,t._$addEventListener)(eR,"click",e$.onRefresh),(0,t._$setAttribute)(eR,"data-rue-qrcode-refresh","true");let eL=(0,t._$createComment)("rue:component:anchor");(0,t._$appendChild)(eR,eL),(0,t.renderAnchor)((0,t._$createComponent)(Gw,{}),eR,eL);let ez=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,ez),(0,t.watchEffect)(()=>{let eI=e$.locale.refresh;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,ez))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eF))}),eR}),Jw=({render:e$,info:eI})=>e$(eI),Yw=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,rest:e1}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let{value:eI,type:eR,icon:eL,size:ez,iconSize:eW,color:eH,errorLevel:eF,status:eP,bordered:eB,onRefresh:eK,style:eV,className:eq,rootClassName:eU,bgColor:eG,marginSize:eZ,statusRender:eY,locale:eX,classNames:eJ,styles:eQ,boostLevel:e0,...e1}=e$;return{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,rest:e1}}));if(null==e$.value||""===e$.value)return null;let e2={...Nw,...e$.locale},e5=Math.max(48,Math.round(void 0===e$.size?160:e$.size)),e3=void 0===e$.bordered||e$.bordered?Math.max(6,Math.round(.06*e5)):0,e4=Math.max(e5-2*e3,24),e6=Math.max(0,Math.round(void 0===e$.marginSize?4:e$.marginSize)),e8=Math.max(16,Math.round(.16*e5)),e7=Iw(e$.iconSize,e4),e9=(0,t._$vaporWithHookId)("useRef:1:0",()=>(0,t.useRef)(0)),t$=(0,t._$vaporWithHookId)("useRef:1:1",()=>(0,t.useRef)(null)),{encoded:tI,error:tR}=Bw(String(e$.value),void 0===e$.errorLevel?"M":e$.errorLevel,void 0===e$.boostLevel||e$.boostLevel),tL=(tI?.size??21)+2*e6,tz=tI?Lw(tI.matrix,e6):"",tW=Rw(tL,e4,e7),tH=!!tR||(void 0===e$.status?"active":e$.status)!=="active",tF=(void 0===e$.status?"active":e$.status)==="active"?null:{status:void 0===e$.status?"active":e$.status,locale:e2,onRefresh:e$.onRefresh},tP=()=>{let eI=t$.current;if(!eI||(void 0===e$.type?"canvas":e$.type)!=="canvas")return;let eR=Bw(String(e$.value),void 0===e$.errorLevel?"M":e$.errorLevel,void 0===e$.boostLevel||e$.boostLevel);if(!eR.encoded)return;let eL=eR.encoded.matrix,ez=globalThis.devicePixelRatio||1,eW=Math.max(1,Math.round(e4*ez)),eH=eR.encoded.size+2*e6;eI.width=eW,eI.height=eW,eI.style.width=`${e4}px`,eI.style.height=`${e4}px`;let eF=null;try{eF=eI.getContext("2d")}catch{eF=null}if(!eF)return;let eP=e$=>Math.round(e$/eH*eW);eF.clearRect(0,0,eW,eW),eF.fillStyle=void 0===e$.bgColor?"#ffffff":e$.bgColor,eF.fillRect(0,0,eW,eW),eF.fillStyle=void 0===e$.color?"#111827":e$.color;for(let e$=0;e$<eL.length;e$+=1)for(let eI=0;eI<eL.length;eI+=1){if(!eL[e$][eI])continue;let eR=eP(eI+e6),ez=eP(e$+e6),eW=eP(eI+e6+1),eH=eP(e$+e6+1);eF.fillRect(eR,ez,Math.max(1,eW-eR),Math.max(1,eH-ez))}if(!e$.icon||typeof Image>"u")return;let eB=(e9.current??0)+1;e9.current=eB;let eK=new Image;eK.crossOrigin="anonymous",eK.onload=()=>{if(e9.current===eB&&t$.current===eI)try{zw(eF,eW,{width:Math.max(1,Math.round(e7.width*ez)),height:Math.max(1,Math.round(e7.height*ez))},void 0===e$.bgColor?"#ffffff":e$.bgColor,eK)}catch{}},eK.onerror=()=>void 0,eK.src=e$.icon},tB=e$=>{t$.current=e$,e$&&tP()};return(0,t.onMounted)(()=>{tP(),(0,t._$vaporWithHookId)("watch:1:2",()=>(0,t.watch)(()=>[e$.value,void 0===e$.type?"canvas":e$.type,e4,void 0===e$.color?"#111827":e$.color,void 0===e$.bgColor?"#ffffff":e$.bgColor,e$.icon??"",e7.width,e7.height,e6,void 0===e$.errorLevel?"M":e$.errorLevel,void 0===e$.boostLevel||e$.boostLevel?"1":"0"].join("|"),()=>{tP()},{immediate:!0}))}),(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Pw("rue-qrcode relative inline-flex items-center justify-center overflow-hidden border-base-300 text-base-content",void 0===e$.bordered||e$.bordered?"border bg-base-100 shadow-sm":"border border-transparent bg-transparent shadow-none",e$.className,e$.rootClassName,e$.classNames?.root)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:`${e5}px`,height:`${e5}px`,borderRadius:`${e8}px`,overflow:"hidden",...e$.styles?.root,...e$.style})}),(0,t._$setAttribute)(eR,"data-rue-qrcode","true"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"data-rue-qrcode-type",String(void 0===e$.type?"canvas":e$.type))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"data-rue-qrcode-status",String(tR?"overflow":void 0===e$.status?"active":e$.status))});let eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(Pw("rue-qrcode-frame relative flex items-center justify-center overflow-hidden",e$.classNames?.frame)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eL,{width:`${e4}px`,height:`${e4}px`,borderRadius:`${Math.max(12,e8-e3/2)}px`,backgroundColor:void 0===e$.bgColor?"#ffffff":e$.bgColor,...e$.styles?.frame})}),(0,t._$setAttribute)(eL,"data-rue-qrcode-frame","true");let ez=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{let eI=tI?(void 0===e$.type?"canvas":e$.type)==="svg"?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("svg",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"viewBox",String(`0 0 ${tL} ${tL}`))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"width",String(e4))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"height",String(e4))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Pw("rue-qrcode-svg block",e$.classNames?.code,e$.classNames?.svg)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{display:"block",width:`${e4}px`,height:`${e4}px`,...e$.styles?.code,...e$.styles?.svg})}),(0,t._$setAttribute)(eR,"data-rue-qrcode-svg","true"),(0,t._$setAttribute)(eR,"aria-hidden","true");let eL=(0,t._$createElement)("rect",eR);(0,t._$appendChild)(eR,eL),(0,t._$setAttribute)(eL,"x","0"),(0,t._$setAttribute)(eL,"y","0"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"width",String(tL))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"height",String(tL))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"fill",String(void 0===e$.bgColor?"#ffffff":e$.bgColor))});let ez=(0,t._$createElement)("path",eR);(0,t._$appendChild)(eR,ez),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(ez,"d",String(tz))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(ez,"fill",String(void 0===e$.color?"#111827":e$.color))});let eW=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eW),(0,t.watchEffect)(()=>{let eI=e$.icon?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)();(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let eR=(0,t._$createElement)("rect",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"x",String(tW.x-tW.padding))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"y",String(tW.y-tW.padding))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"width",String(tW.width+2*tW.padding))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"height",String(tW.height+2*tW.padding))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"rx",String(Math.max(.9*tW.padding,1.2)))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"fill",String(void 0===e$.bgColor?"#ffffff":e$.bgColor))}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" "));let eL=(0,t._$createElement)("image",eI);return(0,t._$appendChild)(eI,eL),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"href",String(e$.icon))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"xlinkHref",String(e$.icon))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"x",String(tW.x))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"y",String(tW.y))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"width",String(tW.width))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"height",String(tW.height))}),(0,t._$setAttribute)(eL,"preserveAspectRatio","xMidYMid meet"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(Pw("rue-qrcode-icon",e$.classNames?.icon)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eL,{...e$.styles?.icon})}),(0,t._$appendChild)(eI,(0,t._$createTextNode)(" ")),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eW))}),eI}):(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("canvas",eI);(0,t._$appendChild)(eI,eR);let eL=(0,t._$vaporBindUseRef)(eR,()=>tB);return(0,t.onBeforeUnmount)(()=>{eL()}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Pw("rue-qrcode-canvas block",e$.classNames?.code,e$.classNames?.canvas)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{display:"block",width:`${e4}px`,height:`${e4}px`,...e$.styles?.code,...e$.styles?.canvas})}),(0,t._$setAttribute)(eR,"data-rue-qrcode-canvas","true"),(0,t._$setAttribute)(eR,"aria-hidden","true"),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eL,ez))});let eW=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eW),(0,t.watchEffect)(()=>{let eI=tH?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(Pw("rue-qrcode-cover absolute inset-0 flex items-center justify-center p-4 text-center",e$.classNames?.cover)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{backgroundColor:"oklch(var(--b1) / 0.82)",backdropFilter:"blur(10px)",...e$.styles?.cover})}),(0,t._$setAttribute)(eR,"data-rue-qrcode-cover","true");let eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(Pw("rue-qrcode-status rounded-[20px] border border-base-300 bg-base-100/90 px-4 py-3 shadow-lg",e$.classNames?.status)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eL,{...e$.styles?.status})});let ez=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{let e$=tR?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(e$,eI),(0,t.watchEffect)(()=>{let eR=(0,t._$createComponent)(Kw,{locale:e2,message:tR.message});(0,t.untrack)(()=>(0,t.renderAnchor)(eR,e$,eI))}),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eL,ez))}),(0,t._$appendChild)(eL,(0,t._$createTextNode)(" "));let eW=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eL,eW),(0,t.watchEffect)(()=>{let eI=!tR&&tF&&e$.statusRender?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{let eL=(0,t._$createComponent)(Jw,{render:e$.statusRender,info:tF});(0,t.untrack)(()=>(0,t.renderAnchor)(eL,eI,eR))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eL,eW))}),(0,t._$appendChild)(eL,(0,t._$createTextNode)(" "));let eH=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eL,eH),(0,t.watchEffect)(()=>{let eI=tR||!tF||e$.statusRender?"":(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(e$,eI),(0,t.watchEffect)(()=>{let eR=(0,t._$createComponent)(qw,{...tF});(0,t.untrack)(()=>(0,t.renderAnchor)(eR,e$,eI))}),e$});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eL,eH))}),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eW))}),eR})},Xw=(e$,eI)=>eI?`${e$} ${eI}`:e$,Zw=e$=>null!=e$&&!1!==e$&&""!==e$&&(!Array.isArray(e$)||e$.some(e$=>Zw(e$))),Qw=e$=>null==e$?"info":`${e$}`,$w=e$=>"403"===e$||"404"===e$||"500"===e$,eT=e$=>"success"===e$||"warning"===e$||"error"===e$?e$:"403"===e$?"warning":"500"===e$?"error":"info",tT=(e$,eI)=>{let eR="";return"soft"===e$?eR+=" bg-base-200/60 shadow-inner":"outline"===e$?eR+=" bg-base-100/70 shadow-none":eR+=" bg-base-100 shadow-[0_28px_60px_-40px_rgba(15,23,42,0.6)]","outline"===e$?eR+=" border-2 border-base-300/80":eI?eR+=" border border-base-300/70":eR+=" border border-transparent",eR.trim()},nT=e$=>{switch(e$){case"success":return"bg-success/20";case"warning":return"bg-warning/20";case"error":return"bg-error/20";default:return"bg-info/20"}},rT=e$=>{switch(e$){case"success":return"text-success";case"warning":return"text-warning";case"error":return"text-error";default:return"text-info"}},iT=e$=>{switch(e$){case"success":return"border-success/15 bg-success/10 text-success";case"warning":return"border-warning/15 bg-warning/10 text-warning";case"error":return"border-error/15 bg-error/10 text-error";default:return"border-info/15 bg-info/10 text-info"}},aT=e$=>{switch(e$){case"sm":return"text-2xl sm:text-[1.8rem]";case"lg":return"text-4xl sm:text-[2.8rem]";default:return"text-3xl sm:text-[2.25rem]"}},oT=e$=>{switch(e$){case"sm":return"size-9";case"lg":return"size-14";default:return"size-11"}},sT=e$=>{switch(e$){case"sm":return"size-20 rounded-[1.5rem]";case"lg":return"size-28 rounded-[2rem]";default:return"size-24 rounded-[1.75rem]"}},cT=e$=>{switch(e$){case"sm":return"max-w-[16rem]";case"lg":return"max-w-[23rem]";default:return"max-w-[19rem]"}},lT={403:{label:"访问受限",title:"当前空间暂不可访问",subTitle:"权限策略已拦截这次访问请求。请切换账号、申请权限,或返回上一级工作区。",scene:"Permission rules blocked the current request."},404:{label:"路径缺失",title:"页面没有找到",subTitle:"目标页面可能已移动、删除,或地址输入不完整。你可以返回首页重新定位内容。",scene:"The requested route is no longer mapped."},500:{label:"服务异常",title:"系统刚刚开了个小差",subTitle:"服务端返回了异常结果。建议稍后重试,或先把上下文信息发送给维护者。",scene:"The backend returned an unexpected fault."}},uT=({status:e$,className:eI})=>"success"===e$?i("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:eI,"data-rue-result-glyph":"success",children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.4 12.3 2.4 2.4 4.8-5.1"})]}):"warning"===e$?i("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:eI,"data-rue-result-glyph":"warning",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5 20 18.5H4L12 4.5Z"}),r("path",{strokeLinecap:"round",d:"M12 9.5v4.8"}),r("circle",{cx:"12",cy:"16.9",r:"0.9",fill:"currentColor",stroke:"none"})]}):"error"===e$?i("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:eI,"data-rue-result-glyph":"error",children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{strokeLinecap:"round",d:"m9 9 6 6M15 9l-6 6"})]}):i("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",className:eI,"data-rue-result-glyph":"info",children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{strokeLinecap:"round",d:"M12 10.2v5.2"}),r("circle",{cx:"12",cy:"7.4",r:"0.9",fill:"currentColor",stroke:"none"})]}),dT=({status:e$,tone:eI,className:eR,style:eL,size:ez="md"})=>{let eW=lT[e$];return i("div",{className:Xw(`relative mx-auto w-full ${cT(ez)}`,eR),style:eL,"data-rue-result-illustration":e$,children:[r("div",{"aria-hidden":"true",className:`absolute inset-x-6 top-4 h-24 rounded-[2rem] blur-2xl opacity-75 ${nT(eI)}`}),i("div",{className:"relative overflow-hidden rounded-[1.8rem] border border-base-300/70 bg-base-200/65 p-4 shadow-inner",children:[r("div",{"aria-hidden":"true",className:"absolute left-4 top-4 h-3 w-20 rounded-full bg-base-100/70"}),r("div",{"aria-hidden":"true",className:"absolute right-4 top-4 size-10 rounded-full border border-base-100/70 bg-base-100/75"}),i("div",{className:"relative rounded-[1.45rem] border border-base-100/80 bg-base-100/90 p-5 shadow-[0_22px_50px_-36px_rgba(15,23,42,0.65)]",children:[i("div",{className:"flex items-center justify-between gap-3",children:[r("span",{className:`rounded-full border px-3 py-1 text-[0.64rem] font-semibold uppercase tracking-[0.22em] ${iT(eI)}`,children:eW.label}),r("span",{className:"text-[0.68rem] uppercase tracking-[0.28em] opacity-50",children:"Rue Result"})]}),i("div",{className:"mt-5 flex items-end justify-between gap-4",children:[i("div",{className:"min-w-0",children:[r("div",{className:`text-[4rem] font-black leading-none tracking-[-0.1em] ${rT(eI)}`,children:e$}),r("div",{className:"mt-2 max-w-[13rem] text-xs leading-5 opacity-60",children:eW.scene})]}),r("div",{className:`grid size-16 shrink-0 place-items-center rounded-[1.35rem] border ${iT(eI)}`,children:r(uT,{status:eI,className:"size-7"})})]})]})]})]})},fT=(e$,eI,eR)=>$w(e$)?r(dT,{status:e$,tone:eI,size:eR}):r("div",{className:`grid place-items-center border ${iT(eI)} ${sT(eR)}`,"data-rue-result-icon":"true",children:r(uT,{status:eI,className:oT(eR)})}),pT=Object.assign(({status:e$="info",icon:eI,title:eR,subTitle:eL,extra:ez,children:eW,variant:eH="surface",size:eF="md",align:eP="center",showIcon:eB=!0,bordered:eK=!0,role:eV="status",className:eq,style:eU,iconClassName:eG,iconStyle:eZ,contentClassName:eY,contentStyle:eX,titleClassName:eJ,titleStyle:eQ,subTitleClassName:e0,subTitleStyle:e1,extraClassName:e2,extraStyle:e5,bodyClassName:e3,bodyStyle:e4,...e6})=>{let e8=Qw(e$),e7=eT(e8),e9=$w(e8)?lT[e8]:void 0,t$=eR??e9?.title,tI=eL??e9?.subTitle,tR=!1===eB||null===eI||!1===eI,tL=null!=eI&&!1!==eI?eI:fT(e8,e7,eF),tz=Zw(eW);return i("section",{role:eV,className:Xw(`rue-result relative isolate overflow-hidden rounded-[2rem] px-6 py-7 sm:px-8 ${"start"===eP?"text-left":"text-center"} ${tT(eH,eK)}`,eq),style:eU,"data-rue-status":e8,"data-rue-tone":e7,...e6,children:[r("div",{"aria-hidden":"true",className:`pointer-events-none absolute left-1/2 top-0 h-32 w-32 -translate-x-1/2 rounded-full blur-3xl opacity-50 ${nT(e7)}`}),i("div",{className:Xw(`relative flex w-full flex-col gap-5 ${"start"===eP?"items-start text-left":"items-center text-center"}`,eY),style:eX,children:[tR?null:r("div",{className:eG,style:eZ,"data-rue-result-icon-slot":"true",children:tL}),null!=t$||null!=tI?i("div",{className:`flex w-full max-w-3xl flex-col gap-2 ${"start"===eP?"items-start text-left":"items-center text-center"}`,children:[null==t$?null:r("div",{className:Xw(`${aT(eF)} font-semibold leading-tight tracking-[-0.02em]`,eJ),style:eQ,children:t$}),null==tI?null:r("div",{className:Xw("max-w-2xl text-sm leading-7 text-base-content/70 sm:text-base",e0),style:e1,children:tI})]}):null,null==ez?null:r("div",{className:Xw(`flex w-full flex-wrap gap-3 ${"start"===eP?"justify-start":"justify-center"}`,e2),style:e5,"data-rue-result-extra":"true",children:ez}),tz?r("div",{className:Xw("w-full max-w-4xl rounded-[1.5rem] border border-base-200/80 bg-base-100/70 p-5 text-left shadow-inner",e3),style:e4,"data-rue-result-body":"true",children:eW}):null]})]})},{PRESENTED_IMAGE_403:e$=>r(dT,{...e$,status:"403",tone:"warning"}),PRESENTED_IMAGE_404:e$=>r(dT,{...e$,status:"404",tone:"info"}),PRESENTED_IMAGE_500:e$=>r(dT,{...e$,status:"500",tone:"error"})}),mT=e$=>e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),hT=(e$,eI,eR)=>Math.min(eR,Math.max(eI,e$)),gT=(e$,eI)=>eI?`${e$} ${eI}`:e$,_T=(e$,eI)=>{"function"==typeof e$?e$(eI):e$&&"object"==typeof e$&&"current"in e$&&(e$.current=eI??void 0)},vT=e$=>{if("number"==typeof e$)return Number.isFinite(e$)?e$:void 0;if("string"==typeof e$&&e$.trim()){let eI=Number(e$);return Number.isFinite(eI)?eI:void 0}},yT=e$=>{if(null!=e$)return"number"==typeof e$?`${e$}px`:String(e$)},bT=e$=>"small"===e$?"4rem":"medium"===e$?"6rem":"default"===e$||null==e$?"5rem":yT(e$)??"5rem",xT=(e$,eI,eR)=>yT(e$??eI)??`calc(${eR??"5rem"} / 10)`,ST=(e$,eI,eR)=>{if("number"==typeof e$)return hT(e$,0,100);let eL=vT(eI);if(null==eL)return;let ez=vT(eR);return hT(null!=ez&&ez>0?eL/ez*100:eL,0,100)},CT=(e$,eI)=>e$?"number"==typeof e$.percent?hT(e$.percent,0,100):ST(void 0,e$.value,eI)??0:0,wT=(e$,eI)=>e$||(eI>=100?"success":"normal"),TT=e$=>"success"===e$?"text-success":"exception"===e$?"text-error":void 0,ET=(e$,eI)=>{if(e$)return e$;switch(eI){case"left":return"start";case"right":return"end";default:return eI??"bottom"}},DT=e$=>{switch(e$){case"top":return 0;case"start":return 270;case"end":return 90;default:return 180}},OT=e$=>"number"==typeof e$&&e$>0?{count:Math.floor(e$),gap:2}:"object"==typeof e$&&e$&&e$.count>0?{count:Math.floor(e$.count),gap:e$.gap>=0?e$.gap:2}:null,kT=(e$,eI,eR,eL)=>{let ez=(eL-90)*Math.PI/180;return{x:e$+eR*Math.cos(ez),y:eI+eR*Math.sin(ez)}},AT=(e$,eI,eR,eL,ez)=>{let eW=kT(e$,eI,eR,eL),eH=kT(e$,eI,eR,ez),eF=+(ez-eL>180);return`M ${eW.x} ${eW.y} A ${eR} ${eR} 0 ${eF} 1 ${eH.x} ${eH.y}`},jT=e$=>null!=e$&&(!Array.isArray(e$)||e$.length>0),MT=({status:e$})=>"success"===e$?r("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-success/15 text-success",children:r("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-3.5 w-3.5",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m5 10 3 3 7-7"})})}):"exception"===e$?r("span",{className:"inline-flex h-5 w-5 items-center justify-center rounded-full bg-error/15 text-error",children:r("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"h-3.5 w-3.5",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m6 6 8 8M14 6l-8 8"})})}):null,NT=({children:e$,showInfo:eI,format:eR,percent:eL,successPercent:ez,status:eW})=>jT(e$)?e$:!1===eI?null:eR?eR(eL,ez):"success"===eW||"exception"===eW?r(MT,{status:eW}):`${Math.round(eL)}%`,PT=e$=>e$?"string"==typeof e$?e$.trim():Object.entries(e$).filter(([,e$])=>null!=e$).map(([e$,eI])=>`${e$.startsWith("--")?e$:mT(e$)}:${String(eI)}`).join("; "):"",FT=({value:e$,percent:eI,max:eR,type:eL="circle",status:ez,showInfo:eW=!0,format:eH,size:eF,thickness:eP,strokeWidth:eB,strokeLinecap:eK="round",strokeColor:eV,railColor:eq,trailColor:eU,success:eG,steps:eZ,gapDegree:eY,gapPlacement:eX,gapPosition:eJ,style:eQ,className:e0,children:e1,role:e2,...e5})=>{let e3=e5["aria-valuenow"],e4=e5["aria-valuemin"],e6=e5["aria-valuemax"],e8=e5.ref;"aria-valuenow"in e5&&delete e5["aria-valuenow"],"aria-valuemin"in e5&&delete e5["aria-valuemin"],"aria-valuemax"in e5&&delete e5["aria-valuemax"],"ref"in e5&&delete e5.ref;let e7=ST(eI,e$,eR)??0,e9=Math.min(CT(eG,eR),e7),t$=wT(ez,e7),tI=bT(eF),tR=xT(eP,eB,tI),tL=eq??eU,tz=OT(eZ),tW=hT("dashboard"===eL?eY??75:eY??0,0,295),tH=DT(ET(eX,eJ))+tW/2,tF=360-tW,tP=tH+("circle"===eL&&0===tW?359.999:tF),tB=tH+e7/100*tF,tK=tH+e9/100*tF,tV=TT(t$),tq=NT({children:e1,showInfo:eW,format:eH,percent:e7,successPercent:e9,status:t$}),tU=Array.isArray(eV)?eV[0]:eV,tG=PT(eQ),tZ=AT(50,50,42,tH,tP),tY=`clamp(0.75rem, calc(${tI} / 4.5), 1.75rem)`;return i("div",{...e5,ref:e$=>{e$&&(tG?e$.setAttribute("style",tG):e$.removeAttribute("style"),e$.style.setProperty("--value",String(e7)),e$.style.setProperty("--size",tI),e$.style.setProperty("--thickness",tR),e$.style.width=tI,e$.style.height=tI),_T(e8,e$)},role:e2??"progressbar","aria-valuemin":e4??"0","aria-valuemax":e6??"100","aria-valuenow":String(e3??Math.round(e7)),className:gT("rue-radial-progress relative inline-grid shrink-0 place-items-center align-middle",e0),"data-progress-type":eL,children:[r("div",{className:"radial-progress invisible pointer-events-none absolute inset-0","aria-hidden":"true"}),i("svg",{viewBox:"0 0 100 100",className:"pointer-events-none absolute inset-0 h-full w-full -rotate-90 overflow-visible","aria-hidden":"true",children:[r("path",{d:tZ,fill:"none",stroke:tL??"currentColor",strokeLinecap:eK,vectorEffect:"non-scaling-stroke",style:{strokeWidth:"var(--thickness)"},className:tL?void 0:"text-base-300/70"}),tz?Array.from({length:tz.count},(e$,eI)=>{let eR=hT(tz.gap,0,tF/Math.max(2*tz.count,1)),eL=Math.max((tF-eR*(tz.count-1))/tz.count,.01),ez=tH+eI*(eL+eR),eW=hT(Math.round(e7/100*tz.count),0,tz.count),eH=hT(Math.round(e9/100*tz.count),0,tz.count),eF=eI<eH,eP=eI>=eH&&eI<eW,eB=eF?eG?.strokeColor:Array.isArray(eV)?eV[Math.min(eI,eV.length-1)]:tU;return r("path",{d:AT(50,50,42,ez,ez+eL),fill:"none",stroke:eB??"currentColor",strokeLinecap:eK,vectorEffect:"non-scaling-stroke",style:{strokeWidth:"var(--thickness)"},className:eF?eG?.strokeColor?void 0:"text-success":eP?eB?void 0:tV:tL?void 0:"text-base-300/70"},eI)}):null,!tz&&e9>0?r("path",{d:AT(50,50,42,tH,tK),fill:"none",stroke:eG?.strokeColor??"currentColor",strokeLinecap:eK,vectorEffect:"non-scaling-stroke",style:{strokeWidth:"var(--thickness)"},className:eG?.strokeColor?void 0:"text-success"}):null,!tz&&e7>e9?r("path",{d:AT(50,50,42,tK,tB),fill:"none",stroke:tU??"currentColor",strokeLinecap:eK,vectorEffect:"non-scaling-stroke",style:{strokeWidth:"var(--thickness)"},className:tU?void 0:tV}):null]}),null==tq?null:r("div",{className:"relative z-10 flex h-full w-full items-center justify-center px-[18%] text-center font-medium leading-tight",style:{fontSize:tY},children:tq})]})},IT=(e$,eI)=>eI?`${e$} ${eI}`:e$,LT=e$=>{switch(e$){case"small":return"sm";case"medium":case"middle":return"md";case"large":return"lg";default:return e$}},RT=(e$,eI,eR)=>{let eL="radio",ez=LT(eI);return e$&&(eL+=` radio-${e$}`),ez&&(eL+=` radio-${ez}`),eR&&(eL+=` ${eR}`),eL},zT=(e$,eI,eR)=>{let eL="inline-flex items-start gap-3 text-sm leading-5 text-base-content";return eR&&(eL+=" w-full"),e$?eL+=" cursor-not-allowed opacity-60":eL+=" cursor-pointer",eI&&(eL+=` ${eI}`),eL},BT=(e$,eI,eR)=>{let eL="inline-flex";return eR&&(eL+=" w-full"),e$?eL+=" cursor-not-allowed opacity-60":eL+=" cursor-pointer",eI&&(eL+=` ${eI}`),eL},VT=e$=>IT("min-w-0 flex-1",e$),HT=e$=>{switch(LT(e$)){case"xs":return"btn-xs";case"sm":return"btn-sm";case"lg":return"btn-lg";case"xl":return"btn-xl";default:return"btn-md"}},UT=e$=>{switch(e$??"primary"){case"neutral":return"peer-checked:border-neutral peer-checked:bg-neutral/10 peer-checked:text-neutral";case"secondary":return"peer-checked:border-secondary peer-checked:bg-secondary/10 peer-checked:text-secondary";case"accent":return"peer-checked:border-accent peer-checked:bg-accent/10 peer-checked:text-accent";case"success":return"peer-checked:border-success peer-checked:bg-success/10 peer-checked:text-success";case"warning":return"peer-checked:border-warning peer-checked:bg-warning/10 peer-checked:text-warning";case"info":return"peer-checked:border-info peer-checked:bg-info/10 peer-checked:text-info";case"error":return"peer-checked:border-error peer-checked:bg-error/10 peer-checked:text-error";default:return"peer-checked:border-primary peer-checked:bg-primary/10 peer-checked:text-primary"}},WT=e$=>{switch(e$??"primary"){case"neutral":return"peer-checked:border-neutral peer-checked:bg-neutral peer-checked:text-neutral-content";case"secondary":return"peer-checked:border-secondary peer-checked:bg-secondary peer-checked:text-secondary-content";case"accent":return"peer-checked:border-accent peer-checked:bg-accent peer-checked:text-accent-content";case"success":return"peer-checked:border-success peer-checked:bg-success peer-checked:text-success-content";case"warning":return"peer-checked:border-warning peer-checked:bg-warning peer-checked:text-warning-content";case"info":return"peer-checked:border-info peer-checked:bg-info peer-checked:text-info-content";case"error":return"peer-checked:border-error peer-checked:bg-error peer-checked:text-error-content";default:return"peer-checked:border-primary peer-checked:bg-primary peer-checked:text-primary-content"}},GT=({color:e$,size:eI,buttonStyle:eR,className:eL,block:ez})=>{let eW="btn min-h-0 border-base-300 bg-base-100 text-base-content shadow-none transition-colors duration-200 peer-disabled:pointer-events-none peer-disabled:opacity-60 peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary/20 peer-checked:shadow-sm";return eW+=` ${HT(eI)}`+(ez?" w-full justify-center":" justify-center"),"solid"===eR?eW+=` hover:bg-base-200 ${WT(e$)}`:eW+=` btn-outline hover:bg-base-200 ${UT(e$)}`,eL&&(eW+=` ${eL}`),eW},KT=({optionType:e$,orientation:eI,className:eR,block:eL})=>{let ez="button"===e$?"vertical"===eI?"flex flex-col gap-2":"flex flex-wrap items-start gap-2":"vertical"===eI?"flex flex-col gap-3":"flex flex-wrap items-center gap-4";return eL&&(ez+=" w-full"),eR&&(ez+=` ${eR}`),ez},qT=e$=>{switch(typeof e$){case"number":return`number:${e$}`;case"boolean":return`boolean:${e$?"true":"false"}`;default:return`string:${e$}`}},JT=e$=>{if(!e$)return;let eI=e$.indexOf(":");if(-1===eI)return e$;let eR=e$.slice(0,eI),eL=e$.slice(eI+1);return"number"===eR?Number(eL):"boolean"===eR?"true"===eL:eL},YT=e$=>(e$??[]).map(e$=>"string"==typeof e$||"number"==typeof e$||"boolean"==typeof e$?{label:String(e$),value:e$}:e$),XT=(e$,eI)=>e$??(eI?"vertical":"horizontal"),ZT=e$=>{let eI=e$?.closest('[data-rue-radio-group="true"]');return eI?{optionType:eI.dataset.rueRadioGroupOptionType,buttonStyle:eI.dataset.rueRadioGroupButtonStyle,size:eI.dataset.rueRadioGroupSize,color:eI.dataset.rueRadioGroupColor,block:"true"===eI.dataset.rueRadioGroupBlock}:{optionType:void 0,buttonStyle:void 0,size:void 0,color:void 0,block:void 0}},QT=({color:e$,size:eI,checked:eR,defaultChecked:eL,disabled:ez,value:eW,className:eH,rootClassName:eF,contentClassName:eP,style:eB,rootStyle:eK,children:eV,title:eq,id:eU,name:eG,optionType:eZ,buttonStyle:eY,block:eX,onChange:eJ,onCheckedChange:eQ,...e0})=>{let e1=(0,e.useRef)(),e2=(0,e.useRef)(),e5=(0,e.useRef)(),e3=(0,e.ref)(void 0),e4=(0,e.ref)(void 0),e6=(0,e.ref)(void 0),e8=(0,e.ref)(void 0),e7=(0,e.ref)(void 0),e9=()=>{"boolean"==typeof eR&&e1.current&&(e1.current.checked=eR)},t$=()=>{let eR=ZT(e1.current);e3.value=eR.optionType,e4.value=eR.buttonStyle,e6.value=eR.size,e8.value=eR.color,e7.value=eR.block,e2.current&&(e2.current.className=BT(ez,eF,eX??eR.block??!1)),e5.current&&(e5.current.className=GT({color:e$??eR.color,size:eI??eR.size,buttonStyle:eY??eR.buttonStyle??"outline",className:eH,block:eX??eR.block??!1}))};(0,e.onMounted)(()=>{e9(),t$()}),(0,e.watch)(()=>eR,()=>{e9()},{immediate:!0});let tI=eZ??e3.value??"default",tR=eY??e4.value??"outline",tL=eI??e6.value,tz=e$??e8.value,tW=eX??e7.value??!1,tH="button"===tI,tF=r("input",{...e0,ref:e1,id:eU,name:eG,title:eq,type:"radio",value:eW,checked:eR,defaultChecked:eL,disabled:ez,style:tH?void 0:eB,className:tH?"peer sr-only":RT(e$,eI,eH),"data-rue-radio-input":"true","data-rue-radio-disabled":ez?"true":"false","data-rue-radio-option-type":tI,"data-rue-radio-value":void 0===eW?void 0:qT(eW),onChange:e$=>{let eI=e$.target?.checked===!0;t$(),"boolean"==typeof eR&&e1.current&&(e1.current.checked=eR);let eL=eZ??e3.value??"default";eJ&&eJ(e$,{checked:eI,value:eW,optionType:eL}),eQ&&eQ(eI,e$)}});if(tH){let e$=eV??(void 0===eW?null:String(eW));return i("label",{ref:e2,className:BT(ez,eF,tW),style:eK,title:eq,"data-rue-radio-root":"true","data-rue-radio-option-type":"button",children:[tF,r("span",{ref:e5,className:GT({color:tz,size:tL,buttonStyle:tR,className:eH,block:tW}),style:eB,children:e$})]})}return null!=eV||eF||eK||eP?i("label",{className:zT(ez,eF,tW),style:eK,title:eq,"data-rue-radio-root":"true","data-rue-radio-option-type":"default",children:[r("span",{className:"shrink-0 pt-0.5",children:tF}),null==eV?null:r("span",{className:VT(eP),children:eV})]}):tF},$T=Object.assign(QT,{Group:({value:e$,defaultValue:eI,options:eR,disabled:eL,name:ez,className:eW,style:eH,children:eF,optionType:eP="default",buttonStyle:eB="outline",size:eK,color:eV,block:eq,orientation:eU,vertical:eG,onChange:eZ,...eY})=>{let eX=(0,e.useRef)(),eJ=(0,e.ref)(void 0),eQ=(0,e.ref)(e$??eI),e0=YT(eR);eJ.value||(eJ.value=`rue-radio-group-${Math.random().toString(36).slice(2,10)}`);let e1=ez??eJ.value,e2=XT(eU,eG),e5=()=>{let e$=eX.current;if(!e$)return;let eI=void 0===eQ.value?void 0:qT(eQ.value);Array.from(e$.querySelectorAll('input[type="radio"][data-rue-radio-input="true"]')).forEach(e$=>{let eR=e$.dataset.rueRadioValue;eR&&(e$.checked=void 0!==eI&&eR===eI),e$.name=e1,e$.disabled=!!eL||"true"===e$.dataset.rueRadioDisabled})};(0,e.onMounted)(()=>{e5()}),(0,e.watch)(()=>e$,e$=>{void 0!==e$&&(eQ.value=e$),e5()},{immediate:!0}),(0,e.watch)(()=>eQ.value,()=>{e5()},{immediate:!0}),(0,e.watch)(()=>eL,()=>{e5()},{immediate:!0}),(0,e.watch)(()=>e1,()=>{e5()},{immediate:!0});let e3=void 0===e$?eQ.value:e$;return r("div",{...eY,ref:eX,role:eY.role??"radiogroup",className:KT({optionType:eP,orientation:e2,className:eW,block:eq}),style:eH,"data-rue-radio-group":"true","data-rue-radio-group-block":eq?"true":"false","data-rue-radio-group-button-style":eB,"data-rue-radio-group-color":eV,"data-rue-radio-group-option-type":eP,"data-rue-radio-group-size":LT(eK),onChange:eI=>{let eR,eL=eI.target;if(!eL||"radio"!==eL.type||"true"!==eL.dataset.rueRadioInput)return;let ez=eL.dataset.rueRadioValue,eW=JT(ez),eH=e0.find(e$=>qT(e$.value)===ez),eF=void 0!==e$;if(void 0===eW){eF&&e5();return}eR=eF?e$:eQ.value,eF||(eQ.value=eW),eW!==eR&&eZ&&eZ(eW,eI,{checked:!0,value:eW,previousValue:eR,optionType:eP,option:eH}),eW!==eR&&eH?.onChange&&eH.onChange(eI,{checked:!0,value:eW,optionType:eP}),e5()},children:e0.length?e0.map(e$=>r(QT,{value:e$.value,checked:e3===e$.value,disabled:eL||e$.disabled,name:e1,title:e$.title,id:e$.id,required:e$.required,optionType:eP,buttonStyle:eB,size:e$.size??eK,color:e$.color??eV,block:eq,rootClassName:e$.className,rootStyle:e$.style,children:e$.label},qT(e$.value))):eF})},Button:e$=>r(QT,{...e$,optionType:"button"})}),eE=0,tE=(e$,eI)=>eI?`${e$} ${eI}`:e$,nE=(e$,eI)=>{let eR=Number(e$);return Number.isFinite(eR)?eR:eI},rE=(e$,eI,eR)=>e$<eI?eI:e$>eR?eR:e$,iE=(e$,eI)=>{let eR=nE(e$,0),eL=nE(eI,100);return eL<=eR?{min:eR,max:eR+1}:{min:eR,max:eL}},aE=e$=>{let eI=nE(e$,1);return eI>0?eI:1},oE=e$=>{switch(e$){case"small":return"sm";case"default":case"medium":return"md";case"large":return"lg";default:return e$}},sE=(e$,eI,eR,eL)=>rE(nE(e$,eL),eI,eR),cE=(e$,eI,eR)=>(e$-eI)/(eR-eI)*100,lE=e$=>e$?!0===e$?{visible:!0,placement:"inline"}:{visible:!0,placement:e$.placement??"inline",className:e$.className,formatter:e$.formatter}:{visible:!1,placement:"inline"},uE=e$=>"object"==typeof e$&&!!e$&&"value"in e$,dE=(e$,eI,eR)=>e$?.length?e$.map((e$,eL)=>{let ez=uE(e$)?e$.value:e$,eW=sE(ez,eI,eR,eI),eH=uE(e$)&&"label"in e$?e$.label:String(ez);return{key:`${eL}-${String(ez)}`,value:eW,label:eH,percent:cE(eW,eI,eR)}}).sort((e$,eI)=>e$.value-eI.value):[],fE=(e$,eI,eR)=>"function"==typeof eI?eI(e$,eR):String(e$),pE=(e$,eI,eR)=>{let eL="range";e$&&(eL+=` range-${e$}`);let ez=oE(eI);return ez&&(eL+=` range-${ez}`),eR&&(eL+=` ${eR}`),eL},mE=({id:e$,color:eI,size:eR,className:eL,rootClassName:ez,label:eW,hint:eH,helper:eF,labelClassName:eP,hintClassName:eB,helperClassName:eK,valueClassName:eV,marksClassName:eq,style:eU,rootStyle:eG,min:eZ,max:eY,step:eX,value:eJ,defaultValue:eQ,showValue:e0,formatter:e1,marks:e2,disabled:e5,onInput:e3,onChange:e4,onValueChange:e6,onValueCommit:e8,...e7})=>{let e9=(0,e.useRef)(),t$=(0,e.useRef)(),tI=e7.ref,tR=(0,e.ref)(`rue-range-${eE++}`),tL=iE(eZ,eY),tz=aE(eX),tW=void 0!==eJ,tH=(0,e.ref)(sE(eQ??eJ??tL.min,tL.min,tL.max,tL.min)),tF=tW?sE(eJ,tL.min,tL.max,tH.value):sE(tH.value,tL.min,tL.max,tL.min),tP=lE(e0),tB=dE(e2,tL.min,tL.max),tK=e$??tR.value,tV={min:tL.min,max:tL.max,percent:cE(tF,tL.min,tL.max)},tq=tP.formatter??e1,tU=fE(tF,tq,tV),tG="string"==typeof tU||"number"==typeof tU?String(tU):void 0,tZ=null!=eW||null!=eH||null!=eF||tP.visible||tB.length>0||!!ez||!!eG||!!eP||!!eB||!!eK||!!eV||!!eq;"ref"in e7&&delete e7.ref;let tY=e$=>{let eI=fE(e$,tq,{min:tL.min,max:tL.max,percent:cE(e$,tL.min,tL.max)}),eR="string"==typeof eI||"number"==typeof eI?String(eI):void 0;e9.current&&(e9.current.value=String(e$),e9.current.setAttribute("aria-valuenow",String(e$)),void 0===eR?e9.current.removeAttribute("aria-valuetext"):e9.current.setAttribute("aria-valuetext",eR)),t$.current&&(void 0!==eR&&t$.current.querySelectorAll('[data-rue-range-output="true"]').forEach(e$=>{e$.textContent=eR}),t$.current.querySelectorAll("[data-rue-range-mark]").forEach(eI=>{let eR=e$>=Number(eI.getAttribute("data-rue-range-mark"));eI.className=`absolute top-0 flex -translate-x-1/2 flex-col items-center gap-1 text-[11px] ${eR?"font-medium text-base-content":"text-base-content/55"}`;let eL=eI.firstElementChild;eL&&(eL.className=eR?"h-2 w-px bg-base-content/80":"h-2 w-px bg-base-content/25")}))};(0,e.onMounted)(()=>{tY(tF)}),(0,e.watch)(()=>eJ,e$=>{tW&&tY(sE(e$,tL.min,tL.max,tH.value))},{immediate:!0});let tX=r("input",{...e7,ref:e$=>{e9.current=e$??void 0,"function"==typeof tI?tI(e$):tI&&"object"==typeof tI&&(tI.current=e$??void 0)},id:tK,type:"range",className:pE(eI,eR,eL),style:eU,min:String(tL.min),max:String(tL.max),step:void 0===eX?void 0:String(tz),value:String(tF),disabled:e5,"aria-valuemin":String(tL.min),"aria-valuemax":String(tL.max),"aria-valuenow":String(tF),"aria-valuetext":tG,onInput:e$=>{let eI=e$.target,eR=sE(eI?.value,tL.min,tL.max,tF);tW||(tH.value=eR,tY(eR)),e3?.(e$),e6?.(eR,e$)},onChange:e$=>{let eI=e$.target,eR=sE(eI?.value,tL.min,tL.max,tF);tW||(tH.value=eR,tY(eR)),e4?.(e$),e8?.(eR,e$)}});return tZ?i("div",{ref:e$=>{t$.current=e$??void 0},className:tE("w-full space-y-3",ez),style:eG,"data-rue-range-root":"true",children:[null!=eW||null!=eH||tP.visible&&"inline"===tP.placement?i("div",{className:"flex items-start justify-between gap-4",children:[i("div",{className:"min-w-0 space-y-1",children:[null==eW?null:r("label",{htmlFor:tK,className:tE("block text-sm font-medium text-base-content",eP),children:eW}),null==eH?null:r("p",{className:tE("m-0 text-xs text-base-content/65",eB),children:eH})]}),tP.visible&&"inline"===tP.placement?r("output",{htmlFor:tK,className:tE(tE("shrink-0 rounded-full bg-base-200 px-3 py-1 text-xs font-medium text-base-content",tP.className),eV),"data-rue-range-output":"true",children:tU}):null]}):null,r("div",{className:"w-full",children:tX}),tP.visible&&"below"===tP.placement?r("div",{className:"flex justify-end",children:r("output",{htmlFor:tK,className:tE(tE("rounded-full bg-base-200 px-3 py-1 text-xs font-medium text-base-content",tP.className),eV),"data-rue-range-output":"true",children:tU})}):null,tB.length>0?r("div",{className:tE("relative h-10",eq),"data-rue-range-marks":"true",children:tB.map(e$=>{let eI=tF>=e$.value;return i("span",{className:tE(`absolute top-0 flex -translate-x-1/2 flex-col items-center gap-1 text-[11px] ${eI?"font-medium text-base-content":"text-base-content/55"}`),style:{left:`${e$.percent}%`},"data-rue-range-mark":String(e$.value),children:[r("span",{className:`h-2 w-px ${eI?"bg-base-content/80":"bg-base-content/25"}`}),null==e$.label?null:r("span",{className:"whitespace-nowrap",children:e$.label})]},e$.key)})}):null,null==eF?null:r("p",{className:tE("m-0 text-xs text-base-content/60",eK),children:eF})]}):tX},hE=0,gE=(e$,eI)=>e$?eI?`${e$} ${eI}`:e$:eI??"",_E=e$=>Array.isArray(e$)?e$.length>0:null!=e$,vE=(e$,eI,eR)=>Math.min(eR,Math.max(eI,e$)),yE=e$=>{switch(e$){case"small":return"sm";case"default":case"medium":case"middle":return"md";case"large":return"lg";default:return e$}},bE=e$=>{switch(yE(e$)){case"xs":return"text-lg";case"sm":return"text-xl";case"lg":return"text-3xl";case"xl":return"text-4xl";default:return"text-2xl"}},xE=e$=>"number"!=typeof e$||Number.isNaN(e$)?5:Math.max(1,Math.round(e$)),SE=(e$,eI,eR)=>{if("number"!=typeof e$||Number.isNaN(e$))return 0;let eL=vE(e$,0,eR);return Number((eI?Math.round(2*eL)/2:Math.round(eL)).toFixed(1))},CE="0.35",wE="1",TE="0.45",EE="bg-orange-400",DE="bg-base-content",OE=(e$,eI,eR)=>{let eL="rating",ez=yE(e$);return ez&&(eL+=` rating-${ez}`),eI&&(eL+=" rating-half"),eR&&(eL+=` ${eR}`),eL},kE=(e$,eI,eR,eL,ez)=>{let eW=eL?OE(e$,!1,"rue-rating align-middle select-none"):gE("rue-rating inline-flex flex-wrap items-center gap-1 align-middle select-none",bE(e$));return eW=eI?gE(eW,"cursor-not-allowed opacity-50"):eR?gE(eW,"cursor-default opacity-85"):gE(eW,"cursor-pointer"),gE(eW,ez)},AE=(e$,eI,eR)=>{let eL=eI?"group relative inline-flex shrink-0 items-center justify-center border-0 bg-transparent p-0 leading-none opacity-100 transition duration-150":"group relative inline-flex shrink-0 items-center justify-center rounded-full border-0 bg-transparent p-0.5 leading-none transition duration-150";return eL=e$?gE(eL,"hover:-translate-y-0.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/25"):gE(eL,"focus:outline-none"),gE(eL,eR)},jE=(e$,eI)=>gE("relative inline-flex items-center justify-center leading-none",gE(bE(e$),eI)),ME=(e$,eI,eR)=>{e$.classList.remove(EE,DE),e$.classList.add(eR||eI<=0?DE:EE),e$.style.opacity=eR?TE:eI>0?wE:CE},NE=(e$,eI)=>{let eR=e$?.[eI];if(null!=eR){if("string"==typeof eR||"number"==typeof eR)return String(eR);if("object"==typeof eR&&"title"in eR&&null!=eR.title)return String(eR.title)}},PE=(e$,eI,eR)=>{let eL=eI+1;if(!eR)return eL;let ez=e$.currentTarget?.getBoundingClientRect?.();return ez&&ez.width&&e$.clientX-ez.left<=ez.width/2?eI+.5:eL},FE=()=>r("span",{"aria-hidden":"true",className:"mask mask-star inline-block size-[1em] bg-current"}),IE=(e$,eI)=>"function"==typeof e$?e$(eI):e$??r(FE,{}),LE=Object.assign(({size:e$,half:eI,allowHalf:eR,count:eL,value:ez,defaultValue:eW,allowClear:eH=!0,disabled:eF,readOnly:eP,name:eB,character:eK,tooltips:eV,className:eq,itemClassName:eU,characterClassName:eG,activeCharacterClassName:eZ,inactiveCharacterClassName:eY,clearLabel:eX="clear rating",style:eJ,children:eQ,onChange:e0,onHoverChange:e1,onBlur:e2,onFocus:e5,onKeyDown:e3,...e4})=>{let e6=eR??eI??!1,e8=xE(eL),e7=(0,e.ref)(eB??`rue-rating-${hE++}`),e9=(0,e.useRef)(),t$=(0,e.ref)(SE(eW??ez??0,e6,e8)),tI=(0,e.ref)(null),tR="number"==typeof ez?SE(ez,e6,e8):void 0;void 0!==tR&&t$.value!==tR&&(t$.value=tR);let tL=void 0===tR?SE(t$.value,e6,e8):tR,tz=tI.value??tL,tW=!eF&&!eP,tH=null==eK&&!e6,{onMouseLeave:tF,...tP}=e4,tB=e$=>{e1&&e1(e$)},tK=()=>{let e$=e9.current;if(!e$)return;let eI=SE(t$.value,e6,e8),eR=tI.value??eI;e$.dataset.ratingValue=String(eI),e$.dataset.ratingHover=null==tI.value?"":String(tI.value);let eL=e$.querySelector('input[type="hidden"][data-rating-hidden="true"]');eL&&(eL.value=String(eI)),Array.from(e$.querySelectorAll("button[data-rating-index]")).forEach(e$=>{let eL=Number(e$.dataset.ratingIndex??0),ez=vE(eR-eL,0,1),eW=e$.querySelector('[data-rating-active-layer="true"]'),eH=e$.querySelector('[data-rating-legacy-mask="true"]');e$.dataset.ratingFill=String(ez),eI===eL+1?e$.dataset.ratingCurrent="true":delete e$.dataset.ratingCurrent,e$.setAttribute("aria-pressed",ez>0?"true":"false"),e$.tabIndex=eF?-1:eI>0?Math.ceil(eI)-1===eL?0:-1:0===eL?0:-1,eW&&(eW.style.width=`${100*ez}%`),eH&&ME(eH,ez,!!eF)})},tV=e$=>{if(!tW)return;let eI=SE(e$,e6,e8),eR=eH&&tL===eI?0:eI;t$.value=eR,tI.value=null,tB(0),tK(),e0&&e0(eR)},tq=e6?.5:1;if((0,e.onMounted)(()=>{tK()}),(0,e.watch)(()=>"number"==typeof ez?SE(ez,e6,e8):void 0,e$=>{"number"==typeof e$&&(t$.value=e$),tK()},{immediate:!0}),_E(eQ))return r("div",{...tP,style:eJ,className:OE(e$,e6,eq),children:eQ});let tU=eB??e7.value,tG=Array.from({length:e8},(e$,eI)=>eI);return i("div",{...tP,ref:e9,style:eJ,className:kE(e$,!!eF,!!eP,tH,eq),"data-rating-mode":"auto","data-rating-value":String(tL),"data-rating-hover":null==tI.value?"":String(tI.value),"data-rating-name":tU,onMouseLeave:e$=>{null!==tI.value&&(tI.value=null,tB(0),tK()),tF&&tF(e$)},children:[eB?r("input",{type:"hidden",name:eB,value:tL,disabled:eF,"data-rating-hidden":"true"}):null,tG.map(eI=>{let eR=eI+1,eL=vE(tz-eI,0,1),ez=null!==tI.value&&tz>=eR,eW=NE(eV,eI),eP={index:eI,value:eR,fill:eL,checked:tL>=eR,hovered:ez,half:e6},eB=jE(e$,eG),eq=eF?-1:tL>0?Math.ceil(tL)-1===eI?0:-1:0===eI?0:-1;return i("button",{type:"button",role:"button",title:eW,"aria-label":eW??`${eR} star`,"aria-disabled":eF?"true":void 0,"aria-pressed":eL>0?"true":"false",tabIndex:eq,disabled:eF,className:AE(tW,tH,eU),"data-rating-index":String(eI),"data-rating-fill":String(eL),"data-rating-current":tL===eR?"true":void 0,onFocus:e$=>{e5&&e5(e$)},onBlur:e$=>{e2&&e2(e$)},onMouseMove:e$=>{if(!tW)return;let eR=PE(e$,eI,e6);tI.value!==eR&&(tI.value=eR,tB(eR),tK())},onClick:e$=>{e$.preventDefault?.(),tV(PE(e$,eI,e6))},onKeyDown:e$=>((e$,eI)=>{let eR=e$.key,eL=null;if("ArrowRight"===eR||"ArrowUp"===eR?eL=vE(tL+tq,eH?0:tq,e8):"ArrowLeft"===eR||"ArrowDown"===eR?eL=vE(tL-tq,eH?0:tq,e8):"Home"===eR?eL=eH?0:tq:"End"===eR?eL=e8:("Backspace"===eR||"Delete"===eR)&&eH?eL=0:(" "===eR||"Enter"===eR)&&(eL=eI+1),null===eL){e3&&e3(e$);return}e$.preventDefault?.(),0===eL?(t$.value=0,tI.value=null,tB(0),tK(),tW&&e0&&e0(0)):tV(eL),e3&&e3(e$)})(e$,eI),children:[tH?r("span",{className:gE(gE("mask mask-star inline-block size-[1em] transition-colors duration-150",eF?`${DE} opacity-45`:eL>0?`${EE} opacity-100`:`${DE} opacity-[0.35]`),eG),"aria-hidden":"true","data-rating-legacy-mask":"true"}):i("span",{className:"relative inline-flex",children:[r("span",{className:gE(eB,eF?"text-base-content/20":eY??"text-base-content/35"),"aria-hidden":"true",children:IE(eK,eP)}),r("span",{className:"pointer-events-none absolute inset-y-0 left-0 overflow-hidden",style:{width:`${100*eL}%`},"aria-hidden":"true","data-rating-active-layer":"true",children:r("span",{className:gE(eB,eF?"text-base-content/45":eZ??"text-orange-400"),children:IE(eK,eP)})})]}),eH&&tW&&tL>0&&tL===eR?r("span",{className:"sr-only",children:eX}):null]},`${tU}-${eI}`)})]})},{Item:({as:e$="input",hidden:eI,type:eR,className:eL,children:ez,...eW})=>{let eH=gE(eI?"rating-hidden":void 0,eL).trim();return"input"===e$?r("input",{...eW,type:eR??"radio",className:eH||void 0}):r(e$,{...eW,className:eH||void 0,children:ez})}}),RE=(...e$)=>e$.filter(Boolean).join(" "),zE=(...e$)=>{let eI={};return e$.forEach(e$=>{e$&&Object.assign(eI,e$)}),Object.keys(eI).length>0?eI:void 0},BE=e$=>{if(null!=e$)return"number"==typeof e$?`${e$}px`:e$},VE=e$=>{switch(e$){case"small":return"sm";case"default":case"medium":case"middle":return"md";case"large":return"lg";default:return e$??"md"}},HE=(e$,eI)=>!1===e$?{enabled:!1,props:{}}:e$&&"object"==typeof e$?{enabled:!0,props:e$}:{enabled:!0===e$||eI,props:{}},UE=e$=>Array.isArray(e$)?e$.flatMap(e$=>UE(e$)):null==e$||"boolean"==typeof e$?[]:[e$],WE=e$=>Array.isArray(e$)?e$.map(e$=>WE(e$)):e$,GE=e$=>({...e$,children:WE(e$.children)}),KE=e$=>{if(null!=e$){if("function"==typeof e$)return e$();if("object"==typeof e$){if("function"==typeof e$.get)return e$.get();if("value"in e$)return e$.value}return e$}},qE=(e$,eI,eR)=>(0,e.h)(e$,eI,...UE(eR)),JE=(e$,eI,eR)=>RE("skeleton",eI&&"skeleton-text",eR&&"animate-pulse",e$),YE=e$=>{let eI=VE(e$);if("number"==typeof eI)return{className:void 0,style:{width:`${eI}px`,height:`${eI}px`}};switch(eI){case"xs":return{className:"h-8 w-8",style:void 0};case"sm":return{className:"h-10 w-10",style:void 0};case"lg":return{className:"h-16 w-16",style:void 0};case"xl":return{className:"h-20 w-20",style:void 0};default:return{className:"h-12 w-12",style:void 0}}},XE=e$=>{let eI=VE(e$);if("number"==typeof eI)return{className:void 0,style:{height:`${eI}px`}};switch(eI){case"xs":return{className:"h-7",style:void 0};case"sm":return{className:"h-8",style:void 0};case"lg":return{className:"h-12",style:void 0};case"xl":return{className:"h-14",style:void 0};default:return{className:"h-10",style:void 0}}},ZE=({as:e$="div",active:eI,className:eR,style:eL,children:ez,...eW})=>{let eH=KE(eI);return qE(e$,{...eW,className:JE(RE("flex min-h-24 w-full items-center justify-center rounded-2xl text-base-content/40",eR),!1,eH),style:eL},ez)},QE=(e$,eI)=>JE(RE("flex min-h-24 w-full items-center justify-center rounded-2xl text-base-content/40",e$),!1,eI),$E=(e$,eI="video",eR)=>QE(RE("square"===eI?"aspect-square w-32":"aspect-video w-48",e$),eR),eD=(e$,eI)=>e$&&!eI?{size:"lg",shape:"square"}:{size:"lg",shape:"circle"},tD=(e$,eI)=>!e$&&eI?{width:"38%"}:e$&&eI?{width:"50%"}:{},nD=(e$,eI)=>({rows:!e$&&eI?3:2,width:e$&&eI?void 0:"61%"}),rD=({as:e$="div",text:eI,active:eR,className:eL,rootClassName:ez,classNames:eW,style:eH,styles:eF,children:eP,...eB})=>qE(e$,{...eB,className:JE(RE(eW?.root,eL,ez),eI,eR),style:zE(eF?.root,eH)},eP),iD=({active:e$,className:eI,style:eR,size:eL,shape:ez="circle",...eW})=>{let eH=YE(eL);return r("div",{...eW,className:JE(RE(eH.className,"square"===ez?"rounded-2xl":"rounded-full",eI),!1,e$),style:{...eH.style,...eR}})},aD=({active:e$,className:eI,style:eR,size:eL,shape:ez="default",block:eW,...eH})=>{let eF=XE(eL),eP="square"===ez||"circle"===ez;return r("div",{...eH,className:JE(RE(eF.className,eW?"w-full":eP?"w-10":"w-24","circle"===ez||"round"===ez?"rounded-full":"rounded-xl",eI),!1,e$),style:{...eF.style,...eP&&eF.style?.height?{width:eF.style.height}:{},...eR}})},oD=({active:e$,className:eI,style:eR,size:eL,block:ez,...eW})=>{let eH=XE(eL);return r("div",{...eW,className:JE(RE(eH.className,ez?"w-full":"w-56","rounded-xl",eI),!1,e$),style:{...eH.style,...eR}})},sD=({...e$})=>{let eI=(0,e.useSetup)(()=>({container:null,startEl:null,endEl:null,propsSig:(0,e.signal)(GE(e$),{},!0),started:!1,effect:null})),eR=()=>{if(eI.container||typeof document>"u")return;let e$=document.createElement("span");e$.style.display="contents";let eR=document.createComment("rue-skeleton-node-start"),eL=document.createComment("rue-skeleton-node-end");e$.appendChild(eR),e$.appendChild(eL),eI.container=e$,eI.startEl=eR,eI.endEl=eL};return(0,e.onMounted)(()=>{eI.started||(eI.started=!0,eR(),eI.container&&eI.startEl&&eI.endEl&&(0,e.renderBetween)(ZE(eI.propsSig.get()),eI.container,eI.startEl,eI.endEl),eI.effect=(0,e.watchEffect)(()=>{let e$=eI.propsSig.get(),eR=(()=>{if(!eI.startEl||!eI.endEl)return null;let e$=eI.startEl.nextSibling;for(;e$&&e$!==eI.endEl;){if(1===e$.nodeType)return e$;e$=e$.nextSibling}return null})(),eL=KE(e$.active);eR&&(eR.className=QE(e$.className,eL))}))}),(0,e.onUnmounted)(()=>{eI.effect&&(eI.effect.dispose(),eI.effect=null),eI.started=!1,eI.container&&eI.startEl&&eI.endEl&&(0,e.renderBetween)([],eI.container,eI.startEl,eI.endEl)}),(0,e.vapor)(()=>(eR(),eI.container?(eI.propsSig.set(GE(e$)),eI.container):ZE(e$)))},cD=()=>(0,e.h)("svg",{viewBox:"0 0 64 64",className:"h-10 w-10 fill-current opacity-60","aria-hidden":"true"},(0,e.h)("path",{d:"M10 14a4 4 0 0 1 4-4h36a4 4 0 0 1 4 4v36a4 4 0 0 1-4 4H14a4 4 0 0 1-4-4V14Zm4 0v28.28l9.64-9.63a3 3 0 0 1 4.24 0L36 40.77l6.64-6.63a3 3 0 0 1 4.24 0L50 37.25V14H14Zm36 36V42.9l-5.24-5.23L38.12 44.3a3 3 0 0 1-4.24 0l-8.12-8.11L14 47.97V50h36ZM22 28a5 5 0 1 0 0-10 5 5 0 0 0 0 10Z"})),lD=({as:e$="div",active:eI,aspect:eR="video",className:eL,children:ez,style:eW,...eH})=>{let eF=KE(eR)??"video",eP=KE(eI),eB=UE(ez).length>0?ez:cD();return qE(e$,{...eH,className:$E(eL,eF,eP),style:eW},eB)},uD=({...e$})=>{let eI=(0,e.useSetup)(()=>({container:null,startEl:null,endEl:null,propsSig:(0,e.signal)(GE(e$),{},!0),started:!1,effect:null})),eR=()=>{if(eI.container||typeof document>"u")return;let e$=document.createElement("span");e$.style.display="contents";let eR=document.createComment("rue-skeleton-image-start"),eL=document.createComment("rue-skeleton-image-end");e$.appendChild(eR),e$.appendChild(eL),eI.container=e$,eI.startEl=eR,eI.endEl=eL};return(0,e.onMounted)(()=>{eI.started||(eI.started=!0,eR(),eI.container&&eI.startEl&&eI.endEl&&(0,e.renderBetween)(lD(eI.propsSig.get()),eI.container,eI.startEl,eI.endEl),eI.effect=(0,e.watchEffect)(()=>{let e$=eI.propsSig.get(),eR=(()=>{if(!eI.startEl||!eI.endEl)return null;let e$=eI.startEl.nextSibling;for(;e$&&e$!==eI.endEl;){if(1===e$.nodeType)return e$;e$=e$.nextSibling}return null})(),eL=KE(e$.aspect)??"video",ez=KE(e$.active);eR&&(eR.className=$E(e$.className,eL,ez))}))}),(0,e.onUnmounted)(()=>{eI.effect&&(eI.effect.dispose(),eI.effect=null),eI.started=!1,eI.container&&eI.startEl&&eI.endEl&&(0,e.renderBetween)([],eI.container,eI.startEl,eI.endEl)}),(0,e.vapor)(()=>(eR(),eI.container?(eI.propsSig.set(GE(e$)),eI.container):lD(e$)))},dD=(e$,eI,eR,eL,ez)=>{let{className:eW,style:eH,width:eF,...eP}=e$;return r("div",{...eP,className:JE(RE("h-4 max-w-full",eR&&"rounded-full",eL,eW),!1,eI),style:zE({width:BE(eF)},ez,eH)})},fD=(e$,eI,eR)=>Array.isArray(e$)?e$[eI]??(eI===eR-1&&e$.length>0?e$[e$.length-1]:void 0):eI===eR-1?e$:void 0,pD=(e$,eI,eR,eL,ez)=>{let{className:eW,style:eH,rows:eF=2,width:eP,rowClassName:eB,...eK}=e$;return r("div",{...eK,className:RE("flex flex-col gap-3",eL,eW),style:zE(ez,eH),children:Array.from({length:eF}).map((e$,eL)=>r("div",{className:JE(RE("h-4 max-w-full",eR&&"rounded-full",eB),!1,eI),style:{width:BE(fD(eP,eL,eF))}},eL))})},mD=Object.assign(e$=>{let{loading:eI,active:eR,avatar:eL,title:ez,paragraph:eW,round:eH,className:eF,rootClassName:eP,classNames:eB,style:eK,styles:eV,children:eq,...eU}=e$;if(!(Object.prototype.hasOwnProperty.call(e$,"loading")||void 0!==eL||void 0!==ez||void 0!==eW||eH))return r(rD,{...e$});if(!1===eI)return eq??null;let eG=HE(eL,!1),eZ=HE(ez,!0),eY=HE(eW,!0),eX=eG.enabled,eJ=eZ.enabled,eQ=eY.enabled,e0=eX?{...eD(eJ,eQ),...eG.props}:null,e1=eJ?{...tD(eX,eQ),...eZ.props}:null,e2=eQ?{...nD(eX,eJ),...eY.props}:null;return i("div",{...eU,className:RE("flex w-full gap-4",!eX&&"flex-col",eB?.root,eF,eP),style:zE(eV?.root,eK),children:[eX?r("div",{className:RE("shrink-0",eB?.header),style:eV?.header,children:r(iD,{active:eR,...e0,className:RE(eB?.avatar,e0?.className),style:zE(eV?.avatar,e0?.style)})}):null,eJ||eQ?i("div",{className:RE("flex min-w-0 flex-1 flex-col gap-3",eB?.section),style:eV?.section,children:[eJ?dD(e1??{},eR,eH,eB?.title,eV?.title):null,eQ?pD(e2??{},eR,eH,eB?.paragraph,eV?.paragraph):null]}):null]})},{Avatar:iD,Button:aD,Input:oD,Image:uD,Node:sD}),hD={small:"var(--rue-theme-space-sm, 8px)",middle:"var(--rue-theme-space-md, 16px)",large:"var(--rue-theme-space-lg, 24px)"},gD=(...e$)=>e$.filter(Boolean).join(" "),_D=(...e$)=>{let eI={};return e$.forEach(e$=>{!e$||"object"!=typeof e$||Array.isArray(e$)||Object.assign(eI,e$)}),Object.keys(eI).length>0?eI:void 0},vD=e$=>Array.isArray(e$)?e$.flatMap(e$=>vD(e$)):null==e$||"boolean"==typeof e$?[]:[e$],yD=e$=>{if(null!=e$)return"number"==typeof e$?`${e$}px`:"small"===e$||"middle"===e$||"large"===e$?hD[e$]:e$},bD=e$=>{if(Array.isArray(e$))return{columnGap:yD(e$[0]),rowGap:yD(e$[1])};let eI=yD(e$??"small");return{columnGap:eI,rowGap:eI}},xD=(e$,eI,eR)=>eR?"vertical":e$??eI??"horizontal",SD=(e$,eI,eR)=>{let eL=0===eI,ez=eI===eR-1;return"vertical"===e$?gD("rue-space-compact-item relative overflow-hidden",!eL&&"-mt-px rounded-t-none",!ez&&"rounded-b-none"):gD("rue-space-compact-item relative overflow-hidden",!eL&&"-ml-px rounded-l-none",!ez&&"rounded-r-none")},CD=e$=>"function"==typeof e$?e$():e$,wD=e$=>{if(null!=e$){if("number"==typeof e$)return{minHeight:`${e$}px`};if("small"===e$)return{fontSize:"0.875rem"};if("large"===e$)return{fontSize:"1rem"};if(/^\d/.test(e$))return{minHeight:e$}}},TD=(e$,eI)=>r("span",{"aria-hidden":"true",className:gD("rue-space-separator shrink-0 select-none text-base-content/45","vertical"===eI&&"leading-none"),children:e$}),ED=Object.assign(({as:e$="div",size:eI,direction:eR,orientation:eL,vertical:ez,align:eW,split:eH,separator:eF,wrap:eP=!1,block:eB=!1,className:eK,style:eV,itemClassName:eq,itemStyle:eU,children:eG,...eZ})=>{let eY=vD(eG),eX=xD(eL,eR,ez),eJ=eW??("horizontal"===eX?"center":void 0),eQ=bD(eI),e0=eF??eH,e1="vertical"===eX?eQ.rowGap:eQ.columnGap;return(0,e.h)(e$,{...eZ,className:gD("rue-space min-w-0 max-w-full",eK),style:_D({display:eB?"flex":"inline-flex",flexDirection:"vertical"===eX?"column":"row",flexWrap:eP?"wrap":"nowrap",alignItems:eJ,width:eB?"100%":void 0,maxWidth:"100%",columnGap:eQ.columnGap,rowGap:eQ.rowGap},eV),"data-rue-space":"","data-rue-space-direction":eX,"aria-orientation":eX},...eY.map((e$,eI)=>{let eR=e$?.key??e$?.props?.key??eI,eL=null!=e0&&eI<eY.length-1;return i("div",{className:gD("rue-space-item min-w-0 max-w-full",eq),style:_D({display:"flex",flexDirection:"vertical"===eX?"column":"row",alignItems:eJ,minWidth:0,maxWidth:"100%",...eL?"vertical"===eX?{rowGap:e1}:{columnGap:e1}:{}},eU),children:[e$,eL?TD(CD(e0),eX):null]},eR)}))},{Compact:({as:e$="div",size:eI,direction:eR,orientation:eL,vertical:ez,block:eW=!1,className:eH,style:eF,children:eP,...eB})=>{let eK=vD(eP);if(0===eK.length)return null;let eV=xD(eL,eR,ez),eq=eW?"vertical"===eV?{width:"100%"}:{flex:"1 1 0%"}:void 0,eU=wD(eI);return(0,e.h)(e$,{...eB,className:gD("rue-space-compact max-w-full",eH),style:_D({display:"flex",flexDirection:"vertical"===eV?"column":"row",width:eW?"100%":void 0,maxWidth:"100%"},eF),"data-rue-space-compact":"","data-rue-space-direction":eV,"aria-orientation":eV},...eK.map((e$,eI)=>r("div",{"data-rue-space-compact-item":"",className:gD(SD(eV,eI,eK.length),eW&&("vertical"===eV?"w-full":"flex-1")),style:_D({display:"flex",minWidth:0,maxWidth:"100%"},eq,eU),children:e$},eI)))}}),DD=.5,OD=10,kD=(e$,eI,eR)=>Math.min(eR,Math.max(eI,e$)),AD=(e$,eI)=>eI?`${e$} ${eI}`:e$,jD=e$=>"number"==typeof e$&&Number.isFinite(e$)?`${e$}px`:e$,MD=e$=>{if(!(!e$||"object"!=typeof e$||Array.isArray(e$)))return{...e$,width:jD(e$.width),minWidth:jD(e$.minWidth),maxWidth:jD(e$.maxWidth),height:jD(e$.height),minHeight:jD(e$.minHeight),maxHeight:jD(e$.maxHeight)}},ND=e$=>Array.isArray(e$)?e$.flatMap(e$=>ND(e$)):null==e$||"boolean"==typeof e$?[]:[e$],PD=e$=>e$.map(e$=>Math.max(0,Math.round(e$))),FD=e$=>e$.reduce((e$,eI)=>e$+eI,0),ID=(e$,eI)=>{let eR=FD(e$);if(eI<=0||eR<=DD)return e$.slice();let eL=eI/eR;return e$.map(e$=>e$*eL)},LD=(e$,eI)=>e$.length===eI.length&&e$.every((e$,eR)=>Math.abs(e$-eI[eR])<=DD),RD=(e$,eI,eR)=>e$||eI||(eR?"vertical":"horizontal"),zD=(e$,eI)=>{if(null==e$)return;if("number"==typeof e$&&Number.isFinite(e$))return Math.max(0,e$);if("string"!=typeof e$)return;let eR=e$.trim();if(!eR)return;if(eR.endsWith("%")){let e$=Number.parseFloat(eR.slice(0,-1));return Number.isFinite(e$)?Math.max(0,e$/100*eI):void 0}let eL=Number.parseFloat(eR);if(Number.isFinite(eL))return Math.max(0,eL)},BD=e$=>e$?!0===e$?{start:!0,end:!0,show:!0}:{start:!!e$.start,end:!!e$.end,show:!1!==e$.showCollapsibleIcon}:{start:!1,end:!1,show:!1},VD=(e$,eI,eR)=>{if(eR<=0)return e$.map(()=>0);let eL=e$.map((e$,eR)=>"number"==typeof e$&&Number.isFinite(e$)?kD(e$,eI[eR].min,eI[eR].max):NaN),ez=eL.map((e$,eI)=>Number.isNaN(e$)?eI:-1).filter(e$=>e$>=0),eW=eL.reduce((e$,eI)=>Number.isNaN(eI)?e$:e$+eI,0),eH=ez.length?Math.max(eR-eW,0)/ez.length:0;ez.forEach(e$=>{eL[e$]=kD(eH||eR/Math.max(eL.length,1),eI[e$].min,eI[e$].max)});for(let e$=0;e$<16;e$+=1){let e$=eR-FD(eL);if(Math.abs(e$)<=DD)break;if(e$>0){let eR=eL.map((e$,eR)=>eI[eR].max-e$>DD?eR:-1).filter(e$=>e$>=0);if(!eR.length)return eL;let ez=e$/eR.length;eR.forEach(e$=>{eL[e$]=Math.min(eL[e$]+ez,eI[e$].max)});continue}let ez=eL.map((e$,eR)=>e$-eI[eR].min>DD?eR:-1).filter(e$=>e$>=0);if(!ez.length)break;let eW=ez.reduce((e$,eR)=>e$+(eL[eR]-eI[eR].min),0);ez.forEach(eR=>{let eH=eL[eR]-eI[eR].min,eF=eW<=DD?1/ez.length:eH/eW;eL[eR]=Math.max(eL[eR]+e$*eF,eI[eR].min)})}return eL},HD=(e$,eI)=>{if(!e$)return 0;let eR=e$.getBoundingClientRect();return"vertical"===eI?eR.height||e$.clientHeight||0:eR.width||e$.clientWidth||0},UD=(e$,eI)=>"vertical"===eI?e$.clientY:e$.clientX,WD=(e$,eI,eR)=>e$.map((e$,eL)=>{if(eR[eL])return{min:0,max:0};let ez=zD(e$.min,eI)??0,eW=zD(e$.max,eI)??eI;return{min:kD(ez,0,eI),max:kD(Math.max(eW,ez),ez,eI)}}),GD=(e$,eI,eR,eL)=>{let ez=WD(e$,eI,eR),eW=eL&&eL.length===e$.length&&FD(eL)>DD?ID(eL,eI):void 0;return VD(e$.map((e$,eL)=>{if(eR[eL])return 0;let ez=zD(e$.size,eI);if("number"==typeof ez)return ez;let eH=zD(e$.defaultSize,eI);return"number"==typeof eH?eH:eW?eW[eL]:void 0}),ez,eI)},KD=(e$,eI,eR,eL)=>{let ez=e$.slice(),eW=e$[eR],eH=eW+e$[eR+1],eF=kD(eW+eL,Math.max(eI[eR].min,eH-eI[eR+1].max),Math.min(eI[eR].max,eH-eI[eR+1].min));return ez[eR]=eF,ez[eR+1]=eH-eF,ez},qD=(e$,eI,eR,eL)=>{if(!eI[eL])return VD(e$,eI,eR);let ez=kD(e$[eL],eI[eL].min,eI[eL].max),eW=Array.from({length:e$.length},()=>0),eH=e$.map((e$,eI)=>eI).filter(e$=>e$!==eL),eF=eH.map(e$=>eI[e$]),eP=VD(eH.map(eI=>e$[eI]),eF,Math.max(eR-ez,0));return eW[eL]=ez,eH.forEach((e$,eI)=>{eW[e$]=eP[eI]}),eW},JD=e$=>{let eI="M10 6 6 10l4 4";"right"===e$&&(eI="m6 6 4 4-4 4"),"up"===e$&&(eI="m6 10 4-4 4 4"),"down"===e$&&(eI="m6 6 4 4 4-4");let eR=document.createElementNS("http://www.w3.org/2000/svg","svg");eR.setAttribute("viewBox","0 0 16 16"),eR.setAttribute("fill","none"),eR.setAttribute("stroke","currentColor"),eR.setAttribute("stroke-width","1.75"),eR.setAttribute("class","h-3.5 w-3.5");let eL=document.createElementNS("http://www.w3.org/2000/svg","path");return eL.setAttribute("d",eI),eL.setAttribute("stroke-linecap","round"),eL.setAttribute("stroke-linejoin","round"),eR.appendChild(eL),eR},YD=e$=>{let eI=document.createElement("span");eI.className="vertical"===e$?"inline-grid h-2 w-3 grid-cols-3 grid-rows-2 place-items-center gap-px leading-none text-base-content/55":"inline-grid h-3 w-2 grid-cols-2 grid-rows-3 place-items-center gap-px leading-none text-base-content/55";for(let e$=0;e$<6;e$+=1){let e$=document.createElement("span");e$.className="h-[3px] w-[3px] rounded-full bg-current opacity-65",eI.appendChild(e$)}return eI},XD=(e$,eI,eR)=>{if(e$.innerHTML="",null==eI||!1===eI)return void e$.appendChild(eR());if("string"==typeof eI||"number"==typeof eI){e$.textContent=String(eI);return}if("u">typeof Node&&eI instanceof Node)return void e$.appendChild(eI.cloneNode(!0));try{(0,e.render)(eI,e$)}catch{e$.appendChild(eR())}},ZD=(e$,eI,eR)=>"vertical"===eR?"end"===e$?eI?"down":"up":eI?"up":"down":"end"===e$?eI?"right":"left":eI?"left":"right",QD=e$=>{let eI=eI=>e$.getAttribute(eI)??void 0,eR=(eI,eR=!1)=>{let eL=e$.getAttribute(eI);return null==eL?eR:"false"!==eL};return{min:eI("data-rue-splitter-min"),max:eI("data-rue-splitter-max"),size:eI("data-rue-splitter-size"),defaultSize:eI("data-rue-splitter-default-size"),resizable:eR("data-rue-splitter-resizable",!0),collapsible:{start:eR("data-rue-splitter-collapsible-start"),end:eR("data-rue-splitter-collapsible-end"),show:eR("data-rue-splitter-collapsible-show")}}},$D=Object.assign(({orientation:e$,layout:eI,vertical:eR,lazy:eL=!1,className:ez,style:eW,draggerIcon:eH,collapsibleIcon:eF,onDraggerDoubleClick:eP,onResizeStart:eB,onResize:eK,onResizeEnd:eV,onCollapse:eq,children:eU,...eG})=>{let eZ=(0,e.useRef)(),eY=(0,e.useRef)(),eX=(0,e.useRef)(),eJ=(0,e.useRef)(),eQ=(0,e.useRef)(),e0=(0,e.useRef)(),e1=(0,e.useRef)(),e2=(0,e.useRef)(),e5=(0,e.useRef)(),e3=(0,e.useRef)(),e4=(0,e.useRef)(),e6=(0,e.useRef)(!1),e8=(0,e.useRef)(0),e7=RD(e$,eI,eR);eJ.current||(eJ.current=[]),eQ.current||(eQ.current=[]),e0.current||(e0.current=[]),e1.current||(e1.current=[]),e2.current||(e2.current=[]),e5.current||(e5.current=[]);let e9=MD(eW),t$="vertical"===e7&&e9?.height==null?{height:e9?.minHeight??"320px"}:void 0,tI=()=>{let e$=eZ.current;return e$?Array.from(e$.children).filter(e$=>e$ instanceof HTMLElement&&"true"===e$.getAttribute("data-rue-splitter-panel")):[]},tR=e$=>{let eI=e1.current;if(eI.length===e$)return eI;let eR=Array.from({length:e$},(e$,eR)=>eI[eR]??!1);return e1.current=eR,e2.current=Array.from({length:e$},(e$,eI)=>e2.current?.[eI]??0),eR},tL=e$=>{eK&&eK(PD(e$))},tz=(e$,eI)=>{eq&&eq(e$.slice(),PD(eI))},tW=e$=>{let eI=eJ.current??[],eR=e1.current??[];eI.forEach((eI,eL)=>{let ez=e$[eL]??0;eI.dataset.rueSplitterPanelIndex=String(eL),eI.dataset.rueSplitterCollapsed=eR[eL]?"true":"false",eI.style.flex="0 0 auto",eI.style.flexBasis=`${ez}px`,"vertical"===e7?(eI.style.height=`${ez}px`,eI.style.width=""):(eI.style.width=`${ez}px`,eI.style.height="")})},tH=()=>{let e$=e5.current??[],eI=eQ.current??[],eR=e0.current??[],ez=e1.current??[],eW=e4.current,eP=e8.current;e$.forEach((e$,eB)=>{let eK=eI[eB],eV=eI[eB+1],eq=FD(eR.slice(0,eB+1)),eU=!0===ez[eB],eG=!0===ez[eB+1],eZ=eW===eB,eY=eL&&eZ?"vertical"===e7?`translateY(${eP}px)`:`translateX(${eP}px)`:"";e$.root.dataset.rueSplitterHandleActive=eZ?"true":"false",e$.root.style.transform=eY,"vertical"===e7?(e$.root.style.top=`${eq-OD/2}px`,e$.root.style.left="0",e$.root.style.height=`${OD}px`,e$.root.style.width="100%"):(e$.root.style.left=`${eq-OD/2}px`,e$.root.style.top="0",e$.root.style.width=`${OD}px`,e$.root.style.height="100%"),e$.previousButton&&e$.previousIconHost&&(e$.previousButton.setAttribute("aria-label",`${eU?"展开":"折叠"}面板 ${eB+1}`),XD(e$.previousIconHost,eF?.end,()=>JD(ZD("end",eU,e7)))),e$.nextButton&&e$.nextIconHost&&(e$.nextButton.setAttribute("aria-label",`${eG?"展开":"折叠"}面板 ${eB+2}`),XD(e$.nextIconHost,eF?.start,()=>JD(ZD("start",eG,e7)))),XD(e$.draggerHost,eH,()=>YD(e7));let eX=!eK.resizable||!eV?.resizable;e$.root.dataset.rueSplitterHandleDisabled=eX?"true":"false",eX&&(e$.root.style.cursor="default")})},tF=()=>{let e$=eY.current;e$&&(e$.innerHTML=""),e5.current=[]},tP=(e$,eI=!1)=>{let eR=HD(eZ.current,e7),eL=e1.current??[],ez=VD(e$,WD(eQ.current??[],eR,eL),eR);e0.current=ez,ez.forEach((e$,eI)=>{!eL[eI]&&e$>DD&&(e2.current[eI]=e$)}),tW(ez),tH(),eI&&tL(ez)},tB=e$=>{let eI=eQ.current??[];if(!eI[e$])return;let eR=HD(eZ.current,e7),eL=tR(eI.length).slice(),ez=e0.current?.length===eI.length?e0.current.slice():GD(eI,eR,eL);if(eL[e$]){eL[e$]=!1,ez[e$]=zD(eI[e$].size,eR)??e2.current?.[e$]??zD(eI[e$].defaultSize,eR)??eR/Math.max(eI.length,1),e1.current=eL;let eW=qD(ez,WD(eI,eR,eL),eR,e$);e0.current=eW,tW(eW),tH(),tL(eW),tz(eL,eW);return}ez[e$]>DD&&(e2.current[e$]=ez[e$]),eL[e$]=!0,ez[e$]=0,e1.current=eL;let eW=VD(ez,WD(eI,eR,eL),eR);e0.current=eW,tW(eW),tH(),tL(eW),tz(eL,eW)},tK=(e$=!0)=>{eJ.current=tI(),eQ.current=eJ.current.map(QD);let eI=eQ.current;if(!eI.length){e0.current=[],e1.current=[],tF();return}let eR=HD(eZ.current,e7),eL=tR(eI.length),ez=GD(eI,eR,eL,e$&&e0.current?.length===eI.length?e0.current:void 0);LD(e0.current??[],ez)||(e0.current=ez),ez.forEach((e$,eI)=>{!eL[eI]&&e$>DD&&(e2.current[eI]=e$)}),tW(ez),(()=>{tF();let e$=eY.current,eI=eQ.current??[];if(!e$||eI.length<=1)return;let eR=[];eI.slice(0,-1).forEach((eL,ez)=>{let eW,eH,eF,eB,eK=eI[ez+1],eV=document.createElement("div");eV.setAttribute("role","separator"),eV.setAttribute("aria-orientation",e7),eV.setAttribute("aria-label",`调整面板 ${ez+1} 与 ${ez+2}`),eV.setAttribute("data-rue-splitter-handle",String(ez)),eV.className="vertical"===e7?"pointer-events-auto absolute z-10 h-2.5 w-full select-none cursor-row-resize":"pointer-events-auto absolute z-10 h-full w-2.5 select-none cursor-col-resize";let eq=document.createElement("span");eq.className="vertical"===e7?"absolute left-0 right-0 top-1/2 h-px -translate-y-1/2 bg-base-300/90":"absolute bottom-0 left-1/2 top-0 w-px -translate-x-1/2 bg-base-300/90",eV.appendChild(eq);let eU=document.createElement("div");eU.className="vertical"===e7?"absolute left-1/2 top-1/2 flex min-w-[2.25rem] -translate-x-1/2 -translate-y-1/2 items-center justify-center gap-0.5 rounded-full border border-base-300 bg-base-100/95 px-1 py-0.5 text-base-content/70 shadow-sm":"absolute left-1/2 top-1/2 flex min-h-[2.25rem] -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center gap-0.5 rounded-full border border-base-300 bg-base-100/95 px-1 py-0.5 text-base-content/70 shadow-sm",eV.appendChild(eU),eL.collapsible.end&&eL.collapsible.show&&((eW=document.createElement("button")).type="button",eW.className="inline-flex h-4 w-4 items-center justify-center rounded-full text-base-content/60 transition hover:bg-base-200 hover:text-base-content",(eF=document.createElement("span")).className="inline-flex h-full w-full items-center justify-center leading-none",eW.appendChild(eF),eW.addEventListener("mousedown",e$=>{e$.stopPropagation()}),eW.addEventListener("click",e$=>{e$.stopPropagation(),tB(ez)}),eU.appendChild(eW));let eG=document.createElement("span");eG.className="inline-flex h-4 w-4 items-center justify-center leading-none",eG.setAttribute("aria-hidden","true"),eU.appendChild(eG),eK?.collapsible.start&&eK.collapsible.show&&((eH=document.createElement("button")).type="button",eH.className="inline-flex h-4 w-4 items-center justify-center rounded-full text-base-content/60 transition hover:bg-base-200 hover:text-base-content",(eB=document.createElement("span")).className="inline-flex h-full w-full items-center justify-center leading-none",eH.appendChild(eB),eH.addEventListener("mousedown",e$=>{e$.stopPropagation()}),eH.addEventListener("click",e$=>{e$.stopPropagation(),tB(ez+1)}),eU.appendChild(eH)),eV.addEventListener("mousedown",e$=>{e$.target?.closest("button")||tG(e$,ez)}),eV.addEventListener("dblclick",e$=>{e$.target?.closest("button")||eP&&eP(ez)}),eL.resizable&&eK?.resizable||(eV.dataset.rueSplitterHandleDisabled="true",eV.style.cursor="default"),e$.appendChild(eV),eR.push({root:eV,previousButton:eW,nextButton:eH,draggerHost:eG,previousIconHost:eF,nextIconHost:eB})}),e5.current=eR,tH()})()},tV=()=>{typeof window>"u"||(window.removeEventListener("mousemove",tq),window.removeEventListener("mouseup",tU))};function tq(e$){let eI=eX.current;if(!eI)return;let eR=WD(eQ.current??[],eI.availableSize,e1.current??[]),ez=UD(e$,e7)-eI.startPoint,eW=KD(eI.startSizes,eR,eI.index,ez),eH=eW[eI.index]-eI.startSizes[eI.index];(e3.current=eW,e8.current=eL?eH:0,eL)?tH():tP(eW,!0)}function tU(){let e$=eX.current;if(!e$)return;let eI=e0.current??[],eR=eQ.current,ez=eL?e3.current??e$.startSizes:eI.length===eR?.length?eI.slice():e$.startSizes;eL&&tP(ez,!0),eX.current=null,e3.current=null,e4.current=null,e8.current=0,tH(),tV(),eV&&eV(PD(ez))}let tG=(e$,eI)=>{if(0!==e$.button)return;eJ.current=tI(),eQ.current=eJ.current.map(QD);let eR=eQ.current??[];if(!eR[eI]||!eR[eI+1]||!eR[eI].resizable||!eR[eI+1].resizable)return;e$.preventDefault();let eL=HD(eZ.current,e7),ez=e0.current?.length===eR.length?e0.current.slice():GD(eR,eL,tR(eR.length));eX.current={index:eI,startPoint:UD(e$,e7),startSizes:ez,availableSize:eL},e3.current=null,e4.current=eI,e8.current=0,tH(),"u">typeof window&&(window.addEventListener("mousemove",tq),window.addEventListener("mouseup",tU)),eB&&eB(PD(ez))};return(0,e.onMounted)(()=>{tK(!1);let e$=()=>{eX.current||tK(!0)};eZ.current?.addEventListener("rue-splitter-panel-config-change",e$);let eI=()=>{eX.current||tK(!0)};"u">typeof window&&window.addEventListener("resize",eI),(0,e.onUnmounted)(()=>{tV(),eZ.current?.removeEventListener("rue-splitter-panel-config-change",e$),"u">typeof window&&window.removeEventListener("resize",eI),tF()})}),e6.current||(e6.current=!0,queueMicrotask(()=>{e6.current=!1,!eZ.current||eX.current||tK(!1)})),(0,e.h)("div",{...eG,ref:eZ,className:AD(AD(AD("rue-splitter relative flex min-h-0 min-w-0 overflow-hidden rounded-box border border-base-300 bg-base-100 shadow-sm","vertical"===e7?"flex-col":void 0),"items-stretch"),ez),style:{...t$,...e9,flexDirection:"vertical"===e7?"column":"row"},"data-rue-splitter-root":"true","data-rue-splitter-orientation":e7,"data-rue-splitter-lazy":eL?"true":"false"},...ND(eU),(0,e.h)("div",{ref:eY,className:"pointer-events-none absolute inset-0","aria-hidden":"true"}))},{Panel:({className:e$,style:eI,min:eR,max:eL,size:ez,defaultSize:eW,resizable:eH=!0,collapsible:eF,children:eP,...eB})=>{let eK=(0,e.useRef)(),eV=BD(eF);return queueMicrotask(()=>{let e$=eK.current;e$&&e$.dispatchEvent(new Event("rue-splitter-panel-config-change",{bubbles:!0}))}),(0,e.h)("div",{...eB,ref:eK,className:AD("rue-splitter-panel relative min-h-0 min-w-0 overflow-hidden bg-base-100",e$),style:eI,"data-rue-splitter-panel":"true","data-rue-splitter-min":null==eR?void 0:String(eR),"data-rue-splitter-max":null==eL?void 0:String(eL),"data-rue-splitter-size":null==ez?void 0:String(ez),"data-rue-splitter-default-size":null==eW?void 0:String(eW),"data-rue-splitter-resizable":eH?"true":"false","data-rue-splitter-collapsible-start":eV.start?"true":void 0,"data-rue-splitter-collapsible-end":eV.end?"true":void 0,"data-rue-splitter-collapsible-show":eV.show?"true":void 0},(0,e.h)("div",{className:"h-full w-full"},...ND(eP)))}}),eO=(e$,eI)=>eI?`${e$} ${eI}`:e$,tO=e$=>Array.isArray(e$)?e$.flatMap(e$=>tO(e$)):null==e$?[]:[e$],nO=e$=>{switch(e$){case"top":return{vertical:"top"};case"bottom":return{vertical:"bottom"};case"start":return{horizontal:"start"};case"end":return{horizontal:"end"};case"top-start":return{vertical:"top",horizontal:"start"};case"top-end":return{vertical:"top",horizontal:"end"};case"bottom-start":return{vertical:"bottom",horizontal:"start"};case"bottom-end":return{vertical:"bottom",horizontal:"end"};default:return{}}},rO=({as:e$="div",vertical:eI,horizontal:eR,placement:eL,reverse:ez,className:eW,children:eH,...eF})=>{let eP=nO(eL),eB=eI??eP.vertical,eK=eR??eP.horizontal,eV=tO(eH),eq=ez?[...eV].reverse():eV,eU="stack";return eB&&"center"!==eB&&(eU+=` stack-${eB}`),eK&&"center"!==eK&&(eU+=` stack-${eK}`),(0,e.h)(e$,{...eF,className:eO(eU,eW)},...eq)},iO=(...e$)=>e$.filter(Boolean).join(" "),aO=(e$,eI)=>eI?`${e$} ${eI}`:e$,oO=(e$,eI)=>eI??e$,sO=(e$,eI)=>eI||("error"===e$?"error":"finish"===e$||"process"===e$?"primary":void 0),cO=(e$,eI)=>{if(!eI){if("finish"===e$)return"✓";if("error"===e$)return"✕"}},lO=e$=>{"function"==typeof e$.preventDefault&&e$.preventDefault(),"function"==typeof e$.stopPropagation&&e$.stopPropagation()},uO=({status:e$})=>r("span",{className:"wait"===e$?"inline-block size-2.5 rounded-full border border-base-300 bg-base-100":"inline-block size-2.5 rounded-full bg-current"}),dO=(e$,eI)=>{if(!e$)return;let eR=r(uO,{status:eI.status});return"function"==typeof e$?e$(eR,eI):eR},fO=(e$,eI,eR,eL)=>e$.status?e$.status:"number"==typeof eR?eI<eR?"finish":eI===eR?eL??"process":"wait":"wait",pO=({as:e$="li",color:eI,className:eR,title:eL,description:ez,content:eW,subTitle:eH,icon:eF,status:eP,disabled:eB,clickable:eK,dataContent:eV,children:eq,index:eU,onClick:eG,onKeyDown:eZ,...eY})=>{let eX=eW??ez,eJ=eL??eq,eQ=eK??!!eG,e0=sO(eP,eI),e1=eV??eY["data-content"]??cO(eP,null!=eF),e2=null!=eL||null!=eX||null!=eH||null!=eF,e5=eY["aria-current"]??("process"===eP?"step":void 0),e3="step";e0&&(e3+=` step-${e0}`),eQ&&!eB&&(e3+=" cursor-pointer"),eB&&(e3+=" opacity-50"),eQ&&eB&&(e3+=" cursor-not-allowed");let e4={...eY,className:aO(e3,eR)};void 0!==e1&&(e4["data-content"]=e1);let e6=e$=>{eB?lO(e$):eG&&eG(e$,eU)};return eQ&&(e4.role=eY.role??"button",e4.tabIndex=eY.tabIndex??(eB?-1:0),e4.onClick=e6,e4.onKeyDown=e$=>{if(eZ&&eZ(e$),e$.defaultPrevented||eB){eB&&lO(e$);return}("Enter"===e$.key||" "===e$.key)&&(e$.preventDefault(),e6(e$))}),r(e$,{...e4,"aria-current":e5,"aria-disabled":eB?"true":void 0,children:e2?i(e.Fragment,{children:[null==eF?null:r("span",{className:aO("step-icon",null==eX?void 0:"mt-0.5"),"aria-hidden":"true",children:eF}),i("span",{className:"inline-flex min-w-0 flex-col gap-1 py-1 text-start",children:[null!=eJ||null!=eH?i("span",{className:"flex flex-wrap items-center gap-2 leading-tight",children:[null==eJ?null:r("span",{className:"font-medium",children:eJ}),null==eH?null:r("span",{className:"text-xs opacity-60",children:eH})]}):null,null==eX?null:r("span",{className:"text-xs leading-snug opacity-70",children:eX})]})]}):eq})},mO=Object.assign(({as:e$="ul",direction:eI,orientation:eR,className:eL,children:ez,items:eW,current:eH,status:eF,progressDot:eP,onChange:eB,...eK})=>{let eV=oO(eI,eR),eq=eW&&eW.length>0?eW.map((e$,eI)=>{let eR=fO(e$,eI,eH,eF),eL=e$.icon??dO(eP,{index:eI,status:eR,title:e$.title,description:e$.description,content:e$.content}),ez=e$.clickable??(!!eB||!!e$.onClick);return r(pO,{...e$,index:eI,status:eR,color:sO(eR,e$.color),icon:eL,clickable:ez,onClick:(eI,eR)=>{e$.disabled||(e$.onClick&&"number"==typeof eR&&e$.onClick(eI,eR),eB&&"number"==typeof eR&&eR!==eH&&eB(eR))}},e$.key??eI)}):ez,eU="steps";return eV&&(eU+=` steps-${eV}`),r(e$,{...eK,className:iO(eU,eL),children:eq})},{Step:pO,Icon:({as:e$="span",className:eI,children:eR,...eL})=>r(e$,{...eL,className:aO("step-icon",eI),children:eR})}),hO=(e$,eI)=>eI?`${e$} ${eI}`:e$,gO=(e$,eI=[])=>(null==e$||!1===e$||(Array.isArray(e$)?e$.forEach(e$=>gO(e$,eI)):eI.push(e$)),eI),_O=e$=>gO(e$).some(e$=>!!e$&&"object"==typeof e$&&"input"===e$.type&&e$.props?.type==="checkbox"),vO=(e$,eI,eR,eL,ez,eW)=>{let eH="swap";return e$&&(eH+=" swap-active"),(eI||"rotate"===eL)&&(eH+=" swap-rotate"),(eR||"flip"===eL)&&(eH+=" swap-flip"),ez&&(eH+=" cursor-not-allowed opacity-60"),eW&&(eH+=` ${eW}`),eH},yO=Object.assign(({as:e$="label",active:eI,checked:eR,defaultChecked:eL,disabled:ez,indeterminate:eW,defaultIndeterminate:eH,rotate:eF,flip:eP,effect:eB,className:eK,inputClassName:eV,inputProps:eq,children:eU,onChange:eG,onCheckedChange:eZ,...eY})=>{let eX=(0,e.useRef)(),eJ=(0,e.ref)(!!eH),eQ=_O(eU),e0=!eQ&&("boolean"==typeof eR||"boolean"==typeof eL||"boolean"==typeof ez||"boolean"==typeof eW||"boolean"==typeof eH||!!eV||!!eq||!!eG||!!eZ),e1=eQ||e0?"input":"class",e2=()=>{eX.current&&("boolean"==typeof eR&&(eX.current.checked=eR),eX.current.indeterminate="boolean"==typeof eW?eW:eJ.value)};return(0,e.onMounted)(()=>{e2()}),(0,e.watch)(()=>eR,()=>{e2()},{immediate:!0}),(0,e.watch)(()=>eW,()=>{e2()},{immediate:!0}),(0,e.watch)(()=>eJ.value,()=>{e2()}),i(e$,{...eY,className:vO(eI,eF,eP,eB,ez,eK),"aria-disabled":ez?"true":eY["aria-disabled"],"data-rue-swap-root":"true","data-rue-swap-mode":e1,"data-rue-swap-disabled":ez?"true":"false",children:[e0?r("input",{...eq,ref:eX,type:"checkbox",checked:eR,defaultChecked:eL,disabled:ez,autoComplete:eq?.autoComplete??"off",className:eV,"aria-checked":("boolean"==typeof eW?eW:eJ.value)?"mixed":eq?.["aria-checked"],"data-rue-swap-input":"true",onChange:e$=>{let eL=e$.target?.checked===!0,ez="boolean"==typeof eW&&eW;"boolean"!=typeof eW&&(eJ.value=!1),"boolean"==typeof eR&&eX.current&&(eX.current.checked=eR),e2(),eG&&eG(e$,{checked:eL,indeterminate:ez,active:!!eI||eL,mode:e1}),eZ&&eZ(eL,e$)}}):null,eU]})},{On:({as:e$="div",className:eI,children:eR,...eL})=>r(e$,{...eL,className:hO("swap-on",eI),children:eR}),Off:({as:e$="div",className:eI,children:eR,...eL})=>r(e$,{...eL,className:hO("swap-off",eI),children:eR}),Indeterminate:({as:e$="div",className:eI,children:eR,...eL})=>r(e$,{...eL,className:hO("swap-indeterminate",eI),children:eR})}),bO={themeName:"default",resolvedThemeName:void 0,appearance:"light",density:"default",colorScheme:"light",colors:{primary:"#2563eb",primaryContent:"#eff6ff",secondary:"#0f766e",secondaryContent:"#ecfeff",accent:"#9333ea",accentContent:"#faf5ff",neutral:"#0f172a",neutralContent:"#f8fafc",base100:"#f8fafc",base200:"#eef2ff",base300:"#e2e8f0",baseContent:"#0f172a",info:"#0ea5e9",infoContent:"#082f49",success:"#16a34a",successContent:"#f0fdf4",warning:"#d97706",warningContent:"#451a03",error:"#dc2626",errorContent:"#fef2f2"},radius:{selector:"0.5rem",field:"0.9rem",box:"1.4rem"},size:{selector:"0.25rem",field:"0.25rem"},spacing:{xs:"0.375rem",sm:"0.625rem",md:"1rem",lg:"1.5rem",xl:"2rem"},typography:{family:"ui-sans-serif, system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, monospace",size:"1rem",lineHeight:"1.5"},shadow:{sm:"0 12px 30px rgba(15, 23, 42, 0.08)",md:"0 20px 50px rgba(15, 23, 42, 0.12)",lg:"0 30px 70px rgba(15, 23, 42, 0.18)"},borderWidth:"1px",depth:1,noise:0},xO={default:{},garden:{colors:{primary:"#2f855a",primaryContent:"#f0fff4",secondary:"#276749",secondaryContent:"#f0fff4",accent:"#2b6cb0",accentContent:"#eff6ff",base100:"#f6fff8",base200:"#e6ffed",base300:"#c6f6d5",baseContent:"#16351f",neutral:"#1f2d22",neutralContent:"#f7fff8",info:"#3182ce",success:"#2f855a",warning:"#b7791f",error:"#c53030"}},retro:{colors:{primary:"#7b4f2a",primaryContent:"#fff7ed",secondary:"#5b6c8c",secondaryContent:"#eff6ff",accent:"#c05621",accentContent:"#fff7ed",base100:"#fff9ed",base200:"#f7ead5",base300:"#e9d8b4",baseContent:"#3f2c1f",neutral:"#6b4f3a",neutralContent:"#fff7ed",info:"#3b82f6",success:"#15803d",warning:"#b45309",error:"#b91c1c"}},synthwave:{appearance:"dark",colorScheme:"dark",colors:{primary:"#e779c1",primaryContent:"#16081b",secondary:"#58c7f3",secondaryContent:"#04131d",accent:"#f3cc30",accentContent:"#241a02",base100:"#221551",base200:"#1a103d",base300:"#140b32",baseContent:"#f7f0ff",neutral:"#0f0b1f",neutralContent:"#f7f0ff",info:"#7dd3fc",success:"#4ade80",warning:"#facc15",error:"#fb7185"},shadow:{sm:"0 12px 30px rgba(20, 11, 50, 0.35)",md:"0 20px 50px rgba(20, 11, 50, 0.45)",lg:"0 30px 80px rgba(20, 11, 50, 0.55)"}},cyberpunk:{appearance:"dark",colorScheme:"dark",colors:{primary:"#ffed00",primaryContent:"#221a00",secondary:"#ff7598",secondaryContent:"#2f0513",accent:"#75d1f0",accentContent:"#04141c",base100:"#0d0d0d",base200:"#171717",base300:"#222222",baseContent:"#fff9d5",neutral:"#050505",neutralContent:"#fff9d5",info:"#38bdf8",success:"#4ade80",warning:"#facc15",error:"#fb7185"}},night:{appearance:"dark",colorScheme:"dark",colors:{primary:"#60a5fa",primaryContent:"#07111f",secondary:"#22d3ee",secondaryContent:"#04161a",accent:"#c084fc",accentContent:"#160a2a",base100:"#0f172a",base200:"#111c34",base300:"#1e293b",baseContent:"#e2e8f0",neutral:"#020617",neutralContent:"#f8fafc",info:"#38bdf8",success:"#4ade80",warning:"#fbbf24",error:"#f87171"},shadow:{sm:"0 14px 34px rgba(2, 6, 23, 0.32)",md:"0 22px 60px rgba(2, 6, 23, 0.42)",lg:"0 36px 90px rgba(2, 6, 23, 0.55)"}},coffee:{appearance:"dark",colorScheme:"dark",colors:{primary:"#c08457",primaryContent:"#2a1409",secondary:"#f5d0a9",secondaryContent:"#2a1409",accent:"#eab308",accentContent:"#271605",base100:"#21130f",base200:"#2e1d17",base300:"#3b261d",baseContent:"#f7e7db",neutral:"#160d0a",neutralContent:"#fff7f2",info:"#7dd3fc",success:"#4ade80",warning:"#fbbf24",error:"#fb7185"}}},SO={theme:"default"},CO=e$=>({...e$,colors:{...e$.colors},radius:{...e$.radius},size:{...e$.size},spacing:{...e$.spacing},typography:{...e$.typography},shadow:{...e$.shadow}}),wO=(e$,eI)=>{let eR=CO(e$);return eI&&(eI.appearance&&(eR.appearance=eI.appearance),eI.density&&(eR.density=eI.density),eI.colorScheme&&(eR.colorScheme=eI.colorScheme),eI.colors&&(eR.colors={...eR.colors,...eI.colors}),eI.radius&&(eR.radius={...eR.radius,...eI.radius}),eI.size&&(eR.size={...eR.size,...eI.size}),eI.spacing&&(eR.spacing={...eR.spacing,...eI.spacing}),eI.typography&&(eR.typography={...eR.typography,...eI.typography}),eI.shadow&&(eR.shadow={...eR.shadow,...eI.shadow}),eI.borderWidth&&(eR.borderWidth=eI.borderWidth),void 0!==eI.depth&&(eR.depth=eI.depth),void 0!==eI.noise&&(eR.noise=eI.noise)),eR},TO=e$=>e$?Array.isArray(e$)?[...e$]:[e$]:[],EO=e$=>e$?.theme?e$.theme:e$?.baseToken?.themeName?e$.baseToken.themeName:SO.theme??"default",DO=e$=>{let eI=CO(bO),eR=xO[e$],eL=eR?wO(eI,eR):eI;return eL.themeName=e$,eL},OO=e$=>{let eI=CO(e$);return eI.colorScheme=eI.appearance,eI.resolvedThemeName="default"===eI.themeName?void 0:eI.themeName,eI},kO=e$=>{let eI=CO(e$);return eI.appearance="dark",eI.colorScheme="dark",eI.colors={...eI.colors,base100:"#111827",base200:"#172036",base300:"#243047",baseContent:"#f8fafc",neutral:"#020617",neutralContent:"#f8fafc",infoContent:"#082f49",successContent:"#052e16",warningContent:"#451a03",errorContent:"#450a0a"},eI.shadow={sm:"0 14px 34px rgba(2, 6, 23, 0.32)",md:"0 24px 64px rgba(2, 6, 23, 0.42)",lg:"0 36px 96px rgba(2, 6, 23, 0.54)"},eI},AO=e$=>{let eI=CO(e$);return eI.density="compact",eI.radius={selector:"0.375rem",field:"0.75rem",box:"1rem"},eI.size={selector:"0.21875rem",field:"0.21875rem"},eI.spacing={xs:"0.25rem",sm:"0.5rem",md:"0.75rem",lg:"1rem",xl:"1.5rem"},eI.typography={...eI.typography,size:"0.95rem"},eI},jO=e$=>{let eI=EO(e$),eR=e$?.baseToken?CO(e$.baseToken):DO(eI);return eR.themeName=eI,OO(wO(TO(e$?.algorithm).reduce((e$,eI)=>eI(e$),eR),e$?.token))},MO=e$=>({"--color-primary":e$.colors.primary,"--color-primary-content":e$.colors.primaryContent,"--color-secondary":e$.colors.secondary,"--color-secondary-content":e$.colors.secondaryContent,"--color-accent":e$.colors.accent,"--color-accent-content":e$.colors.accentContent,"--color-neutral":e$.colors.neutral,"--color-neutral-content":e$.colors.neutralContent,"--color-base-100":e$.colors.base100,"--color-base-200":e$.colors.base200,"--color-base-300":e$.colors.base300,"--color-base-content":e$.colors.baseContent,"--color-info":e$.colors.info,"--color-info-content":e$.colors.infoContent,"--color-success":e$.colors.success,"--color-success-content":e$.colors.successContent,"--color-warning":e$.colors.warning,"--color-warning-content":e$.colors.warningContent,"--color-error":e$.colors.error,"--color-error-content":e$.colors.errorContent,"--radius-selector":e$.radius.selector,"--radius-field":e$.radius.field,"--radius-box":e$.radius.box,"--size-selector":e$.size.selector,"--size-field":e$.size.field,"--border":e$.borderWidth,"--depth":String(e$.depth),"--noise":String(e$.noise),"--rue-theme-space-xs":e$.spacing.xs,"--rue-theme-space-sm":e$.spacing.sm,"--rue-theme-space-md":e$.spacing.md,"--rue-theme-space-lg":e$.spacing.lg,"--rue-theme-space-xl":e$.spacing.xl,"--rue-theme-font-family":e$.typography.family,"--rue-theme-font-mono":e$.typography.monoFamily,"--rue-theme-font-size":e$.typography.size,"--rue-theme-line-height":e$.typography.lineHeight,"--rue-theme-shadow-sm":e$.shadow.sm,"--rue-theme-shadow-md":e$.shadow.md,"--rue-theme-shadow-lg":e$.shadow.lg}),NO=e$=>{let eI=jO(e$);return{theme:eI.themeName,resolvedTheme:eI.resolvedThemeName,token:eI,cssVariables:MO(eI)}},PO=(e$,eI)=>eI?`${e$} ${eI}`:e$,FO=(e$,eI)=>{"function"==typeof e$?e$(eI):e$&&"object"==typeof e$&&"current"in e$&&(e$.current=eI??void 0)},IO=e$=>e$.startsWith("--")?e$:e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),LO=e$=>Object.entries(e$).filter(([,e$])=>void 0!==e$).map(([e$,eI])=>`${IO(e$)}: ${String(eI)}`).join("; "),RO=(e$,eI)=>{let eR=LO(e$);if(!eI)return eR;if("string"==typeof eI)return eR?`${eR}; ${eI}`:eI;let eL=LO(eI);return eR?eL?`${eR}; ${eL}`:eR:eL},zO=Object.assign(({type:e$="checkbox",theme:eI,className:eR,...eL})=>{let ez=eI??eL.value,eW=PO("theme-controller",eR);return r("input",{...eL,type:e$,value:ez,autoComplete:eL.autoComplete??"off",className:eW})},{Provider:({as:e$="div",className:eI,render:eR,style:eL,children:ez,theme:eW,token:eH,algorithm:eF,baseToken:eP,...eB})=>{let eK=eB.ref,eV=(0,e.useRef)(null);"ref"in eB&&delete eB.ref;let eq=NO({theme:eW,token:eH,algorithm:eF,baseToken:eP}),eU=eR?eR(eq):ez,eG=RO({colorScheme:eq.token.colorScheme,...eq.cssVariables},eL),eZ=e$=>{let eI=eV.current;eI&&(e$?eI.setAttribute("style",e$):eI.removeAttribute("style"))};return(0,e.onMounted)(()=>{eZ(eG)}),(0,e.watch)(()=>eG,e$=>{eZ(e$)},{immediate:!0}),r("section"===e$?"section":"article"===e$?"article":"span"===e$?"span":"div",{...{...eB,ref:e$=>{eV.current=e$,eZ(eG),FO(eK,e$)},className:PO("rue-theme-scope",eI),"data-theme":eq.resolvedTheme,"data-rue-theme":eq.theme,"data-rue-appearance":eq.token.appearance,"data-rue-density":eq.token.density},children:eU})},compactAlgorithm:AO,darkAlgorithm:kO,defaultAlgorithm:OO,defaultConfig:SO,defaultSeed:bO,getDesignToken:jO,presets:xO,useToken:NO}),BO={"top-start":{horizontal:"start",vertical:"top"},top:{horizontal:"center",vertical:"top"},"top-center":{horizontal:"center",vertical:"top"},"top-end":{horizontal:"end",vertical:"top"},"middle-start":{horizontal:"start",vertical:"middle"},middle:{horizontal:"center",vertical:"middle"},"middle-center":{horizontal:"center",vertical:"middle"},"middle-end":{horizontal:"end",vertical:"middle"},"bottom-start":{horizontal:"start",vertical:"bottom"},bottom:{horizontal:"center",vertical:"bottom"},"bottom-center":{horizontal:"center",vertical:"bottom"},"bottom-end":{horizontal:"end",vertical:"bottom"},start:{horizontal:"start",vertical:"bottom"},center:{horizontal:"center",vertical:"middle"},end:{horizontal:"end",vertical:"bottom"}},VO=e$=>"number"==typeof e$?`${e$}px`:e$,HO=(...e$)=>e$.filter(Boolean).join(" "),UO=e$=>Array.isArray(e$)?e$.flatMap(e$=>UO(e$)):null==e$?[]:[e$],WO=e$=>UO(e$).length>0,GO=e$=>{if(null==e$)return null;if("object"==typeof e$){let eI={},eR=VO(e$.x),eL=VO(e$.y);return null!=eR&&(eI.paddingInline=eR),null!=eL&&(eI.paddingBlock=eL),Object.keys(eI).length?eI:null}let eI=VO(e$);return null==eI?null:{padding:eI}},KO=(e$,eI)=>"horizontal"===e$?eI?"flex-row-reverse":"flex-row":eI?"flex-col-reverse":"",qO="pointer-events-auto w-full max-w-sm rounded-[1.25rem] border px-4 py-3 text-left text-sm backdrop-blur transition",JO={soft:{neutral:"border-base-300 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80",info:"border-info/25 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80",success:"border-success/25 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80",warning:"border-warning/30 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80",error:"border-error/30 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80",loading:"border-primary/25 bg-base-100/95 text-base-content shadow-lg supports-[backdrop-filter]:bg-base-100/80"},solid:{neutral:"border-neutral bg-neutral text-neutral-content shadow-lg",info:"border-info bg-info text-info-content shadow-lg",success:"border-success bg-success text-success-content shadow-lg",warning:"border-warning bg-warning text-warning-content shadow-lg",error:"border-error bg-error text-error-content shadow-lg",loading:"border-primary bg-primary text-primary-content shadow-lg"},outline:{neutral:"border-neutral bg-base-100/90 text-base-content shadow-md",info:"border-info bg-base-100/90 text-base-content shadow-md",success:"border-success bg-base-100/90 text-base-content shadow-md",warning:"border-warning bg-base-100/90 text-base-content shadow-md",error:"border-error bg-base-100/90 text-base-content shadow-md",loading:"border-primary bg-base-100/90 text-base-content shadow-md"}},YO={soft:{neutral:"bg-base-200 text-base-content/70",info:"bg-info/15 text-info",success:"bg-success/15 text-success",warning:"bg-warning/20 text-warning",error:"bg-error/15 text-error",loading:"bg-primary/15 text-primary"},solid:{neutral:"bg-neutral-content/10 text-neutral-content",info:"bg-info-content/10 text-info-content",success:"bg-success-content/10 text-success-content",warning:"bg-warning-content/10 text-warning-content",error:"bg-error-content/10 text-error-content",loading:"bg-primary-content/10 text-primary-content"},outline:{neutral:"bg-base-200 text-base-content/70",info:"bg-info/10 text-info",success:"bg-success/10 text-success",warning:"bg-warning/15 text-warning",error:"bg-error/10 text-error",loading:"bg-primary/10 text-primary"}},XO={soft:{neutral:"text-base-content/50 hover:bg-base-200 hover:text-base-content",info:"text-info/75 hover:bg-info/10 hover:text-info",success:"text-success/75 hover:bg-success/10 hover:text-success",warning:"text-warning/80 hover:bg-warning/15 hover:text-warning",error:"text-error/75 hover:bg-error/10 hover:text-error",loading:"text-primary/75 hover:bg-primary/10 hover:text-primary"},solid:{neutral:"text-neutral-content/75 hover:bg-neutral-content/10 hover:text-neutral-content",info:"text-info-content/75 hover:bg-info-content/10 hover:text-info-content",success:"text-success-content/75 hover:bg-success-content/10 hover:text-success-content",warning:"text-warning-content/75 hover:bg-warning-content/10 hover:text-warning-content",error:"text-error-content/75 hover:bg-error-content/10 hover:text-error-content",loading:"text-primary-content/75 hover:bg-primary-content/10 hover:text-primary-content"},outline:{neutral:"text-base-content/50 hover:bg-base-200 hover:text-base-content",info:"text-info/75 hover:bg-info/10 hover:text-info",success:"text-success/75 hover:bg-success/10 hover:text-success",warning:"text-warning/80 hover:bg-warning/15 hover:text-warning",error:"text-error/75 hover:bg-error/10 hover:text-error",loading:"text-primary/75 hover:bg-primary/10 hover:text-primary"}},ZO=3,QO="top",$O=0,ek=(e$,eI)=>"number"!=typeof eI||eI<=0||e$.length<=eI?e$:e$.slice(e$.length-eI),tk=(e$,eI,eR=!1)=>{if(typeof document>"u")return null;let eL="function"==typeof e$?e$():e$;return!1===eL?eI??null:"string"==typeof eL?document.querySelector(eL):eL instanceof HTMLElement?eL:eR?document.body:null},nk=({records:e$,onDestroy:eI,maxCount:eR,duration:eL=ZO,closable:ez,pauseOnHover:eW=!0,showIcon:eH=!0,variant:eF,type:eP="neutral",placement:eB=QO,...eK})=>0===e$.length?r("div",{style:{display:"contents"}}):r(xk,{placement:eB,...eK,children:e$.map(e$=>{let{key:eR,content:eB,children:eK,type:eV=eP,variant:eq=eF,duration:eU=eL,closable:eG=ez,pauseOnHover:eZ=eW,showIcon:eY=eH,onClose:eX,onOpenChange:eJ,...eQ}=e$.config,e0=WO(eK)?eK:eB;return r(bk,{...eQ,type:eV,variant:eq,duration:eU,closable:eG,pauseOnHover:eZ,showIcon:eY,onClose:e$=>{eX&&eX(e$)},onOpenChange:(eR,eL)=>{eR||eI(e$.key),eJ&&eJ(eR,eL)},children:e0},e$.key)})}),rk=(e$={})=>{let eI=(0,e.useRef)(),eR=(0,e.useRef)([]),eL=(0,e.useRef)(),ez=(0,e.useRef)(),eW=(0,e.useRef)(e$);eW.current=e$;let eH=()=>{let e$=(()=>{let e$=tk((eW.current??{}).getContainer,eL.current??null,!0);if(!e$)return null;if(null==ez.current){let e$=document.createElement("div");e$.style.display="contents",e$.dataset.rueToastMessageViewport="true",ez.current=e$}return ez.current.parentElement!==e$&&e$.appendChild(ez.current),ez.current})();if(!e$)return;let eI=eW.current??{};(0,e.render)(r(nk,{records:eR.current??[],onDestroy:eF,...eI}),e$)},eF=e$=>{let eI=eR.current??[];if(null==e$){eI.length>0&&(eR.current=[],eH());return}let eL=eI.filter(eI=>eI.key!==e$);eL.length!==eI.length&&(eR.current=eL,eH())},eP=e$=>{let eI=e$.key??`rue-toast-message-${$O++}`,eL={key:eI,config:{...e$,key:eI}},ez=eR.current??[],eP=ez.findIndex(e$=>e$.key===eI),eB=-1===eP?[...ez,eL]:[...ez.slice(0,eP),eL,...ez.slice(eP+1)];return eR.current=eB=ek(eB,(eW.current??{}).maxCount),eH(),()=>{eF(eI)}};if(null==eI.current){let e$=(e$,eI)=>eR=>eP({...eR,type:e$,duration:eR.duration??eI});eI.current={open:eP,info:e$("info"),success:e$("success"),warning:e$("warning"),error:e$("error"),loading:e$("loading",0),destroy:eF}}(0,e.onUnmounted)(()=>{eR.current=[],ez.current&&(ez.current.remove(),ez.current=void 0),eL.current=void 0});let eB=r("div",{style:{display:"contents"},ref:e$=>{eL.current=e$??void 0,eW.current?.getContainer===!1&&e$&&eH()}});return[eI.current,eB]},ik=e$=>"warning"===e$||"error"===e$?"alert":"status",ak=e$=>"warning"===e$||"error"===e$?"assertive":"polite",ok=e$=>"number"!=typeof e$||e$<=0?null:1e3*e$,sk=new WeakMap,ck=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"M12 10v6"}),r("path",{d:"M12 7.5h.01",strokeLinecap:"round",strokeLinejoin:"round"})]}),lk=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"m8.5 12 2.5 2.5 4.5-5",strokeLinecap:"round",strokeLinejoin:"round"})]}),uk=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("path",{d:"M12 4 3.8 18.2a1 1 0 0 0 .87 1.5h14.66a1 1 0 0 0 .87-1.5z",strokeLinejoin:"round"}),r("path",{d:"M12 9v4",strokeLinecap:"round"}),r("path",{d:"M12 16.5h.01",strokeLinecap:"round",strokeLinejoin:"round"})]}),dk=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"m9 9 6 6",strokeLinecap:"round"}),r("path",{d:"m15 9-6 6",strokeLinecap:"round"})]}),fk=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("path",{d:"m7 7 10 10",strokeLinecap:"round"}),r("path",{d:"M17 7 7 17",strokeLinecap:"round"})]}),pk=e$=>{let eI="h-5 w-5";switch(e$){case"info":return r(ck,{className:eI});case"success":return r(lk,{className:eI});case"warning":return r(uk,{className:eI});case"error":return r(dk,{className:eI});case"loading":return r("span",{className:"loading loading-spinner loading-sm","aria-hidden":"true"});default:return null}},mk=({as:e$="div",className:eI,children:eR,...eL})=>r(e$,{...eL,className:HO("flex h-10 w-10 shrink-0 items-center justify-center rounded-2xl",eI),children:eR}),hk=({as:e$="div",className:eI,children:eR,...eL})=>r(e$,{...eL,className:HO("min-w-0 flex-1",eI),children:eR}),gk=({as:e$="div",className:eI,children:eR,...eL})=>r(e$,{...eL,className:HO("font-semibold leading-5",eI),children:eR}),_k=({as:e$="div",className:eI,children:eR,...eL})=>r(e$,{...eL,className:HO("mt-1 text-xs leading-5 opacity-80",eI),children:eR}),vk=({as:e$="div",className:eI,children:eR,...eL})=>r(e$,{...eL,className:HO("flex shrink-0 items-center gap-2",eI),children:eR}),yk=({as:e$="button",className:eI,icon:eR,label:eL="关闭提示",children:ez,...eW})=>{let eH={...eW},eF=eH.onClick;return("button"===e$||null==e$)&&null==eH.type&&(eH.type="button"),eH["aria-label"]??(eH["aria-label"]=eL),r(e$,{...eH,className:HO("inline-flex h-8 w-8 items-center justify-center rounded-xl transition",eI),onClick:e$=>{if("function"==typeof eF&&eF(e$),e$.defaultPrevented)return;let eI=e$.currentTarget?.closest('[data-rue-toast-item-root="true"]'),eR=eI?sk.get(eI):null;eR&&eR("close",e$)},children:WO(ez)?ez:eR??r(fk,{className:"h-4 w-4"})})},bk=({as:e$="div",open:eI,defaultOpen:eR=!0,type:eL="neutral",variant:ez="soft",icon:eW,showIcon:eH=!0,title:eF,description:eP,action:eB,closable:eK,closeIcon:eV,duration:eq,pauseOnHover:eU=!0,className:eG,style:eZ,contentClassName:eY,titleClassName:eX,descriptionClassName:eJ,iconClassName:eQ,actionClassName:e0,closeClassName:e1,children:e2,onClose:e5,onOpenChange:e3,...e4})=>{let e6=(0,e.ref)(eR),e8=(0,e.ref)(!!eR),e7="boolean"==typeof eI,[e9,t$]=(0,e.useState)(e7?!!eI:e6.value,{kind:"ref"}),tI=(0,e.ref)(!1),tR=(0,e.useRef)(),tL=(0,e.useRef)(),tz=(0,e.useRef)(ok(eq)),tW={...e4},tH=tW.onMouseEnter,tF=tW.onMouseLeave,tP=null,tB=e7?!!eI:e9.value;"onMouseEnter"in tW&&delete tW.onMouseEnter,"onMouseLeave"in tW&&delete tW.onMouseLeave,tW.role=tW.role??ik(eL),tW["aria-live"]=tW["aria-live"]??ak(eL),tW["data-rue-toast-item"]=tW["data-rue-toast-item"]??"true",tW["data-rue-toast-type"]=tW["data-rue-toast-type"]??eL,tW["data-rue-toast-item-root"]=tW["data-rue-toast-item-root"]??"true";let tK=tW["data-testid"],tV=tW["data-rue-toast-item"],tq=tW["data-rue-toast-type"];function tU(e$){if(tP){if(tP.style.display=e$?"":"none",e$){tP.removeAttribute("aria-hidden"),tP.setAttribute("data-rue-toast-item",String(tV)),tP.setAttribute("data-rue-toast-type",String(tq)),null!=tK&&tP.setAttribute("data-testid",String(tK));return}tP.setAttribute("aria-hidden","true"),tP.removeAttribute("data-rue-toast-item"),tP.removeAttribute("data-rue-toast-type"),null!=tK&&tP.removeAttribute("data-testid")}}let tG=(e$=!1)=>{if(null!=tR.current){if(e$&&null!=tz.current&&null!=tL.current){let e$=Date.now()-tL.current;tz.current=Math.max(0,tz.current-e$)}window.clearTimeout(tR.current),tR.current=void 0,tL.current=void 0}},tZ=()=>{tG(),e9.value&&(eU&&tI.value||null==tz.current||tz.current<=0||(tL.current=Date.now(),tR.current=window.setTimeout(()=>{tR.current=void 0,tL.current=void 0,tz.current=0,tX("timeout")},tz.current)))},tY=(e$=!0)=>{tG(),e$&&(tz.current=ok(eq)),tZ()},tX=(e$,eI)=>{if(tG(),tz.current=0,!e9.value)return;t$(!1),tU(!1),e7||(e6.value=!1);let eR={source:e$,event:eI};e3&&e3(!1,eR),e5&&e5(eR)};if((0,e.onUnmounted)(()=>{tG()}),(0,e.watch)(()=>eI,e$=>{"boolean"==typeof e$&&t$(e$)},{immediate:!0}),(0,e.watch)(()=>eR,e$=>{let eI=!!e$;e7||eI===e8.value||(e8.value=eI,e6.value=eI,t$(eI))},{immediate:!0}),(0,e.watch)(()=>e7?!!eI:e9.value,e$=>{if(!e$){tG(),tU(!1);return}tU(!0),tY(!0)},{immediate:!0}),(0,e.watch)(()=>eq,()=>{if(!e9.value){tz.current=ok(eq);return}tY(!0)}),(0,e.watch)(()=>eU,()=>{e9.value&&tY(!1)}),!tB)return null;let tJ=JO[ez][eL],tQ=YO[ez][eL],t0=XO[ez][eL],t1=!1===eH?null:void 0===eW?pk(eL):eW,t2=WO(eF),t5=WO(eP),t3=WO(e2),t4=WO(eB),t6=WO(t1);return r("div",{style:{display:"contents"},children:tB?r(e$,{...tW,className:HO(qO,tJ,eG),style:eZ,ref:e$=>{tP=e$,e$&&sk.set(e$,tX),tU(e9.value)},onMouseEnter:e$=>{tI.value=!0,eU&&tG(!0),"function"==typeof tH&&tH(e$)},onMouseLeave:e$=>{tI.value=!1,eU&&tZ(),"function"==typeof tF&&tF(e$)},children:i("div",{className:"flex items-start gap-3",children:[t6?r(mk,{className:HO(tQ,eQ),children:t1}):null,i(hk,{className:eY,children:[t2?r(gk,{className:eX,children:eF}):null,t5?r(_k,{className:eJ,children:eP}):null,t3?r("div",{className:HO(t2||t5?"mt-2":""),children:e2}):null]}),t4||eK?i(vk,{className:HO("ml-3 items-start self-start",e0),children:[eB,eK?r("button",{type:"button","aria-label":"关闭提示",className:HO("inline-flex h-8 w-8 items-center justify-center rounded-xl transition",t0,e1),onClick:e$=>{tX("close",e$)},children:eV??r(fk,{className:"h-4 w-4"})}):null]}):null]})}):null})},xk=({as:e$="div",placement:eI,horizontal:eR,vertical:eL,stack:ez,reverse:eW,inset:eH,gap:eF,zIndex:eP,className:eB,style:eK,children:eV,...eq})=>{let eU=eI?BO[eI]:void 0,eG=eR??eU?.horizontal,eZ=eL??eU?.vertical,eY=KO(ez,eW),eX=eK?{...eK}:{},eJ=GO(eH);null!=eF&&(eX.gap=VO(eF)),null!=eP&&(eX.zIndex=eP),eJ&&Object.assign(eX,eJ);let eQ="toast";return eG&&(eQ+=` toast-${eG}`),eZ&&(eQ+=` toast-${eZ}`),eY&&(eQ+=` ${eY}`),eB&&(eQ+=` ${eB}`),r(e$,{...eq,className:eQ,style:Object.keys(eX).length?eX:eK,children:UO(eV)})},Sk=Object.assign(xk,{Item:bk,Icon:mk,Content:hk,Title:gk,Description:_k,Action:vk,Close:yk,useMessage:rk}),Ck="message",wk=10,Tk=20,Ek="top",Dk=0,Ok="w-auto min-w-[min(16rem,100%)] max-w-[min(38rem,calc(100vw-2rem))] rounded-2xl px-4 py-2.5 shadow-xl",kk="text-sm leading-5",Ak=new Set(["key","content","children","type","duration","icon","showIcon","variant","className","style","onClose","onClick","closable","pauseOnHover","closeIcon","contentClassName","iconClassName","closeClassName","action"]),jk=0,Mk={},Fk=(...e$)=>e$.filter(Boolean).join(" "),Ik=e$=>Array.isArray(e$)?e$.flatMap(e$=>Ik(e$)):null==e$?[]:[e$],Lk=e$=>Ik(e$).length>0,Rk=e$=>!!e$&&"object"==typeof e$&&!Array.isArray(e$),zk=e$=>Rk(e$)&&Object.keys(e$).some(e$=>Ak.has(e$)),Bk=e$=>Lk(e$)?(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("div",eI);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(kk))});let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eL))}),eR}):null,Vk=(e$,eI)=>eI??{x:16,y:e$??Tk},Hk=(e$={})=>{let{placement:eI=Ek,top:eR,inset:eL,gap:ez=wk,className:eW,...eH}=e$;return{placement:eI,inset:Vk(eR,eL),gap:ez,className:Fk(Ck,eW),...eH}},Uk=(e$,eI,eR)=>{let{content:eL,children:ez,type:eW,duration:eH,showIcon:eF,className:eP,contentClassName:eB,...eK}=e$,eV=eW??eI??"neutral",eq=Lk(ez)?ez:eL;return{...eK,type:eV,duration:eH??eR,showIcon:eF??"neutral"!==eV,className:Fk(Ok,eP),contentClassName:Fk("min-w-0",eB),children:Bk(eq)}},Wk=(...e$)=>{if(zk(e$[0]))return e$[0];let[eI,eR,eL]=e$;return{content:eI,duration:"number"==typeof eR?eR:void 0,onClose:"function"==typeof eR?eR:"function"==typeof eL?eL:void 0}},Gk="then",Kk=(e$,eI)=>(Object.defineProperty(e$,Gk,{configurable:!0,writable:!0,value:(e$,eR)=>eI.then(e$,eR)}),e$.promise=eI,e$),qk=()=>Kk(()=>{},Promise.resolve(!0)),Jk=(e$,eI)=>{let eR=!1,eL,ez=()=>{},eW=new Promise(e$=>{ez=e$}),eH=()=>{eR||(eR=!0,ez(!0))};return eL=e$({...eI,onClose:e$=>{eI.onClose?.(e$),eH()}}),Kk(()=>{eL?.(),eH()},eW)},Yk=e$=>{let eI=(eI,eR)=>(...eL)=>{let ez=Wk(...eL);return Jk(e$.open,Uk(ez,eI,eR))};return{open:eI=>Jk(e$.open,Uk(eI)),success:eI("success"),info:eI("info"),warning:eI("warning"),error:eI("error"),loading:eI("loading",Dk),destroy:e$.destroy}},Xk=(e$={})=>{let[eI,eR]=Sk.useMessage(Hk(e$)),eL=(0,t._$vaporWithHookId)("useRef:1:0",()=>(0,t.useRef)());return eL.current??(eL.current=Yk(eI)),[eL.current,eR]},Zk=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,rest:eF,resolvedType:eP,resolvedChildren:eB}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>{let{content:eI,children:eR,type:eL,showIcon:ez,className:eW,contentClassName:eH,...eF}=e$;return{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,rest:eF,resolvedType:(0,t._$vaporWithHookId)("computed:1:1",()=>(0,t.computed)(()=>e$.type??"neutral")),resolvedChildren:(0,t._$vaporWithHookId)("computed:1:2",()=>(0,t.computed)(()=>Lk(e$.children)?e$.children:e$.content))}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=(0,t._$createComponent)(Sk.Item,{...eF,type:eP.get(),showIcon:e$.showIcon??"neutral"!==eP.get(),className:Fk(Ok,e$.className),contentClassName:Fk("min-w-0",e$.contentClassName),children:Bk(eB.get())});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eR})},Qk=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,rest:eF}=(0,t._$vaporWithHookId)("useSetup:0:0:dup1",()=>(0,t.useSetup)(()=>{let{placement:eI,top:eR,inset:eL,gap:ez,className:eW,children:eH,...eF}=e$;return{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,rest:eF}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=(0,t._$createComponent)(Sk,{...eF,placement:void 0===e$.placement?Ek:e$.placement,inset:Vk(e$.top,e$.inset),gap:void 0===e$.gap?wk:e$.gap,className:Fk(Ck,e$.className),children:e$.children});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eR})},$k=()=>typeof document>"u"?null:(Pk&&!Pk.isConnected&&(Pk=void 0,Nk=void 0),Pk??((Pk=document.createElement("div")).style.display="contents",Pk.dataset.rueMessageViewport="true",document.body.appendChild(Pk)),Pk),eA=({options:e$})=>{let[eI,eR]=Xk(e$);return Nk=eI,eR},tA=()=>{let e$=$k();if(e$)return(0,e.render)(r(eA,{options:Mk}),e$),Nk},nA=e$=>{let eI={...e$,key:e$.key??`rue-message-${jk++}`},eR=tA();return eR?eR.open(eI):qk()},rA=Object.assign(Qk,{Item:Zk,useMessage:Xk,open:nA,success:(...e$)=>nA({...Wk(...e$),type:"success"}),info:(...e$)=>nA({...Wk(...e$),type:"info"}),warning:(...e$)=>nA({...Wk(...e$),type:"warning"}),error:(...e$)=>nA({...Wk(...e$),type:"error"}),loading:(...e$)=>{let eI=Wk(...e$);return nA({...eI,type:"loading",duration:eI.duration??Dk})},destroy:e$=>{let eI=tA();eI&&eI.destroy(e$)},config:e$=>{Mk={...Mk,...e$},tA()}}),iA=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],aA="topRight",oA=4.5,sA=24,cA=24,lA=14,uA=0,dA={},fA=[],mA=(...e$)=>e$.filter(Boolean).join(" "),hA=e$=>Array.isArray(e$)?e$.flatMap(e$=>hA(e$)):null==e$||!1===e$?[]:[e$],gA=e$=>hA(e$).length>0,_A=e$=>"number"==typeof e$?`${e$}px`:e$,vA=e$=>"number"!=typeof e$||e$<=0?null:1e3*e$,yA=e$=>e$??"neutral",bA=e$=>"warning"===e$||"error"===e$?"alert":"status",xA=e$=>"warning"===e$||"error"===e$?"assertive":"polite",SA=(e$,eI)=>{if(!(!e$&&!eI))return{root:mA(e$?.root,eI?.root),icon:mA(e$?.icon,eI?.icon),title:mA(e$?.title,eI?.title),description:mA(e$?.description,eI?.description),actions:mA(e$?.actions,eI?.actions),progress:mA(e$?.progress,eI?.progress),close:mA(e$?.close,eI?.close)}},CA=(e$,eI)=>{if(!(!e$&&!eI))return{root:{...e$?.root,...eI?.root},icon:{...e$?.icon,...eI?.icon},title:{...e$?.title,...eI?.title},description:{...e$?.description,...eI?.description},actions:{...e$?.actions,...eI?.actions},progress:{...e$?.progress,...eI?.progress},close:{...e$?.close,...eI?.close}}},wA=(e$,eI)=>"number"!=typeof eI||eI<=0||e$.length<=eI?e$:e$.slice(e$.length-eI),TA=(e$,eI,eR=!1)=>{if(typeof document>"u")return null;let eL="function"==typeof e$?e$():e$;return!1===eL?eI??null:"string"==typeof eL?document.querySelector(eL):eL&&"object"==typeof eL&&"appendChild"in eL?eL:eR?document.body:null},EA={top:{align:"items-center",justify:"justify-start",top:!0},topLeft:{align:"items-start",justify:"justify-start",top:!0},topRight:{align:"items-end",justify:"justify-start",top:!0},bottom:{align:"items-center",justify:"justify-end",top:!1},bottomLeft:{align:"items-start",justify:"justify-end",top:!1},bottomRight:{align:"items-end",justify:"justify-end",top:!1}},DA={neutral:{soft:"border-base-300 bg-base-100/92 text-base-content supports-[backdrop-filter]:bg-base-100/78",solid:"border-neutral bg-neutral text-neutral-content",outline:"border-neutral/60 bg-base-100/90 text-base-content",icon:"bg-base-200 text-base-content/75",close:"text-base-content/45 hover:bg-base-200 hover:text-base-content",progress:"bg-base-content/25",accent:"bg-gradient-to-r from-base-content/10 via-base-content/25 to-base-content/5"},info:{soft:"border-info/25 bg-base-100/92 text-base-content supports-[backdrop-filter]:bg-base-100/78",solid:"border-info bg-info text-info-content",outline:"border-info bg-base-100/90 text-base-content",icon:"bg-info/10 text-info",close:"text-info/80 hover:bg-info/10 hover:text-info",progress:"bg-info/70",accent:"bg-gradient-to-r from-info/35 via-info/80 to-info/20"},success:{soft:"border-success/25 bg-base-100/92 text-base-content supports-[backdrop-filter]:bg-base-100/78",solid:"border-success bg-success text-success-content",outline:"border-success bg-base-100/90 text-base-content",icon:"bg-success/10 text-success",close:"text-success/80 hover:bg-success/10 hover:text-success",progress:"bg-success/70",accent:"bg-gradient-to-r from-success/35 via-success/80 to-success/20"},warning:{soft:"border-warning/30 bg-base-100/92 text-base-content supports-[backdrop-filter]:bg-base-100/78",solid:"border-warning bg-warning text-warning-content",outline:"border-warning bg-base-100/90 text-base-content",icon:"bg-warning/15 text-warning",close:"text-warning/85 hover:bg-warning/15 hover:text-warning",progress:"bg-warning/70",accent:"bg-gradient-to-r from-warning/35 via-warning/80 to-warning/20"},error:{soft:"border-error/28 bg-base-100/92 text-base-content supports-[backdrop-filter]:bg-base-100/78",solid:"border-error bg-error text-error-content",outline:"border-error bg-base-100/90 text-base-content",icon:"bg-error/10 text-error",close:"text-error/80 hover:bg-error/10 hover:text-error",progress:"bg-error/70",accent:"bg-gradient-to-r from-error/35 via-error/80 to-error/20"}},OA="pointer-events-auto relative w-full max-w-full overflow-hidden rounded-[1.5rem] border px-4 py-4 text-left shadow-[0_24px_80px_-40px_rgba(15,23,42,0.65)] backdrop-blur transition sm:w-[26rem]",kA=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("path",{d:"M12 4a5 5 0 0 0-5 5v2.35c0 .6-.18 1.18-.53 1.67L5 15h14l-1.47-1.98A2.8 2.8 0 0 1 17 11.35V9a5 5 0 0 0-5-5Z",strokeLinecap:"round",strokeLinejoin:"round"}),r("path",{d:"M9.75 18a2.25 2.25 0 0 0 4.5 0",strokeLinecap:"round"})]}),AA=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"M12 10v6"}),r("path",{d:"M12 7.5h.01",strokeLinecap:"round",strokeLinejoin:"round"})]}),jA=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"m8.5 12 2.5 2.5 4.5-5",strokeLinecap:"round",strokeLinejoin:"round"})]}),MA=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("path",{d:"M12 4 3.8 18.2a1 1 0 0 0 .87 1.5h14.66a1 1 0 0 0 .87-1.5z",strokeLinejoin:"round"}),r("path",{d:"M12 9v4",strokeLinecap:"round"}),r("path",{d:"M12 16.5h.01",strokeLinecap:"round",strokeLinejoin:"round"})]}),NA=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"m9 9 6 6",strokeLinecap:"round"}),r("path",{d:"m15 9-6 6",strokeLinecap:"round"})]}),PA=({className:e$})=>i("svg",{viewBox:"0 0 24 24",className:e$,fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[r("path",{d:"m7 7 10 10",strokeLinecap:"round"}),r("path",{d:"M17 7 7 17",strokeLinecap:"round"})]}),FA=e$=>{let eI="h-5 w-5";switch(e$){case"info":return r(AA,{className:eI});case"success":return r(jA,{className:eI});case"warning":return r(MA,{className:eI});case"error":return r(NA,{className:eI});default:return r(kA,{className:eI})}},IA=(e$,eI)=>e$?"object"==typeof e$?{enabled:!0,icon:e$.icon??eI,label:e$.label??"关闭通知",onClose:e$.onClose}:{enabled:!0,icon:eI,label:"关闭通知",onClose:void 0}:{enabled:!1,icon:eI,label:"关闭通知",onClose:void 0},LA=({as:e$="div",open:eI,defaultOpen:eR=!0,type:eL,variant:ez="soft",icon:eW,showIcon:eH,title:eF,message:eP,description:eB,actions:eK,btn:eV,closable:eq,closeIcon:eU,duration:eG,pauseOnHover:eZ=!0,showProgress:eY=!1,className:eX,style:eJ,classNames:eQ,styles:e0,props:e1,children:e2,onClose:e5,onOpenChange:e3,onClick:e4,...e6})=>{let e8=(0,e.ref)(!!eR),e7=(0,e.ref)(!!eR),e9="boolean"==typeof eI,[t$,tI]=(0,e.useState)(e9?!!eI:e8.value,{kind:"ref"}),tR=(0,e.ref)(!1),tL=(0,e.useRef)(),tz=(0,e.useRef)(),tW=(0,e.useRef)(vA(eG)),{onMouseEnter:tH,onMouseLeave:tF,onClick:tP,role:tB,"aria-live":tK,"data-rue-notification-item":tV,"data-rue-notification-type":tq,...tU}={...e1,...e6},tG=null,tZ=e9?!!eI:t$.value,tY=yA(eL),tX=DA[tY],tJ="solid"===ez?tX.solid:"outline"===ez?tX.outline:tX.soft,tQ=eF??eP,t0=eK??eV,t1=IA(eq,eU),t2=eH??(void 0!==eW||void 0!==eL)?eW??FA(eL):null,t5=tV??"true",t3=tq??tY,t4={...tU,role:tB??bA(eL),"aria-live":tK??xA(eL),"data-rue-notification-item":t5,"data-rue-notification-type":t3},t6=t4["data-testid"],t8=e$=>{if(tG){if(tG.style.display=e$?"":"none",e$){tG.removeAttribute("aria-hidden"),tG.setAttribute("data-rue-notification-item",String(t5)),tG.setAttribute("data-rue-notification-type",String(t3)),null!=t6&&tG.setAttribute("data-testid",String(t6));return}tG.setAttribute("aria-hidden","true"),tG.removeAttribute("data-rue-notification-item"),tG.removeAttribute("data-rue-notification-type"),null!=t6&&tG.removeAttribute("data-testid")}},t7=(e$=!1)=>{if(null!=tL.current){if(e$&&null!=tW.current&&null!=tz.current){let e$=Date.now()-tz.current;tW.current=Math.max(0,tW.current-e$)}window.clearTimeout(tL.current),tL.current=void 0,tz.current=void 0}},t9=(e$,eI)=>{if(t7(),tW.current=0,!t$.value)return;tI(!1),t8(!1),e9||(e8.value=!1);let eR={source:e$,event:eI};"close"===e$&&t1.onClose&&t1.onClose(eR),e3&&e3(!1,eR),e5&&e5(eR)},r$=()=>{t7(),t$.value&&(eZ&&tR.value||null==tW.current||tW.current<=0||(tz.current=Date.now(),tL.current=window.setTimeout(()=>{tL.current=void 0,tz.current=void 0,tW.current=0,t9("timeout")},tW.current)))},rI=(e$=!0)=>{t7(),e$&&(tW.current=vA(eG)),r$()};if((0,e.onUnmounted)(()=>{t7()}),(0,e.watch)(()=>eI,e$=>{"boolean"==typeof e$&&tI(e$)},{immediate:!0}),(0,e.watch)(()=>eR,e$=>{let eI=!!e$;e9||eI===e7.value||(e7.value=eI,e8.value=eI,tI(eI))},{immediate:!0}),(0,e.watch)(()=>e9?!!eI:t$.value,e$=>{if(!e$){t7(),t8(!1);return}t8(!0),rI(!0)},{immediate:!0}),(0,e.watch)(()=>eG,()=>{if(!t$.value){tW.current=vA(eG);return}rI(!0)}),(0,e.watch)(()=>eZ,()=>{t$.value&&rI(!1)}),!tZ)return null;let rR={maxWidth:"var(--rue-notification-max-width, 26rem)",...e0?.root,...eJ};return r("div",{style:{display:"contents"},children:i(e$,{...t4,className:mA(OA,tJ,eQ?.root,eX),style:rR,ref:e$=>{tG=e$,t8(t$.value)},onClick:e$=>{"function"==typeof tP&&tP(e$),e$.defaultPrevented||"function"!=typeof e4||e4(e$)},onMouseEnter:e$=>{tR.value=!0,eZ&&t7(!0),"function"==typeof tH&&tH(e$)},onMouseLeave:e$=>{tR.value=!1,eZ&&r$(),"function"==typeof tF&&tF(e$)},children:[r("div",{className:mA("absolute inset-x-0 top-0 h-1",tX.accent)}),i("div",{className:"flex items-start gap-3",children:[gA(t2)?r("div",{className:mA("flex h-11 w-11 shrink-0 items-center justify-center rounded-2xl",tX.icon,eQ?.icon),style:e0?.icon,children:t2}):null,i("div",{className:"min-w-0 flex-1",children:[i("div",{className:"flex items-start gap-3",children:[i("div",{className:"min-w-0 flex-1",children:[gA(tQ)?r("div",{className:mA("text-sm font-semibold leading-6",eQ?.title),style:e0?.title,children:tQ}):null,gA(eB)?r("div",{className:mA(gA(tQ)?"mt-1 text-sm leading-6 opacity-75":"text-sm leading-6 opacity-80",eQ?.description),style:e0?.description,children:eB}):null]}),t1.enabled?r("button",{type:"button","aria-label":t1.label,className:mA("inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-2xl transition",tX.close,eQ?.close),style:e0?.close,onClick:e$=>t9("close",e$),children:t1.icon??r(PA,{className:"h-4 w-4"})}):null]}),gA(e2)?r("div",{className:mA(gA(tQ)||gA(eB)?"mt-3":""),children:e2}):null,gA(t0)?r("div",{className:mA(gA(tQ)||gA(eB)||gA(e2)?"mt-4 flex flex-wrap items-center gap-2":"flex flex-wrap items-center gap-2",eQ?.actions),style:e0?.actions,children:t0}):null]})]}),eY&&null!=vA(eG)?r("div",{className:mA("mt-4 h-1 overflow-hidden rounded-full bg-base-content/10",eQ?.progress),style:e0?.progress,children:r("div",{className:mA("h-full w-full rounded-full",tX.progress)})}):null]})})},RA=({as:e$="div",inline:eI=!1,placement:eR=aA,top:eL=sA,bottom:ez=cA,gap:eW=lA,zIndex:eH=70,maxWidth:eF,className:eP,style:eB,children:eK,...eV})=>{let eq=EA[eR],eU={...eB,...null==eW?{}:{gap:_A(eW)},...null==eH?{}:{zIndex:eH},...eq.top&&null!=eL?{paddingTop:_A(eL)}:{},...!eq.top&&null!=ez?{paddingBottom:_A(ez)}:{},...null==eF?{}:{"--rue-notification-max-width":_A(eF)}};return r(e$,{...eV,className:mA(eI?"absolute":"fixed","pointer-events-none inset-0 flex flex-col p-4 sm:p-6",eq.align,eq.justify,eP),style:eU,children:hA(eK)})},zA=(e$,eI)=>{let eR={top:[],topLeft:[],topRight:[],bottom:[],bottomLeft:[],bottomRight:[]};return e$.forEach(e$=>{eR[e$.config.placement??eI].push(e$)}),eR},BA=({records:e$,inline:eI=!1,onDestroy:eR,placement:eL=aA,duration:ez=oA,closable:eW=!0,pauseOnHover:eH=!0,showProgress:eF=!1,showIcon:eP,variant:eB="soft",type:eK,closeIcon:eV,classNames:eq,styles:eU,props:eG,...eZ})=>{if(0===e$.length)return r("div",{style:{display:"contents"}});let eY=zA(e$,eL);return r(e.Fragment,{children:iA.map(e$=>{let eL=eY[e$];if(0===eL.length)return null;let eX=EA[e$].top?[...eL].reverse():eL;return r(RA,{...eZ,inline:eI,placement:e$,children:eX.map(e$=>{let{key:eI,placement:eL,duration:eZ=ez,closable:eY=eW,pauseOnHover:eX=eH,showProgress:eJ=eF,showIcon:eQ=eP,variant:e0=eB,type:e1=eK,closeIcon:e2=eV,classNames:e5,styles:e3,props:e4,onClose:e6,onOpenChange:e8,...e7}=e$.config;return r(LA,{...e7,props:{...eG,...e4},duration:eZ,closable:eY,pauseOnHover:eX,showProgress:eJ,showIcon:eQ,variant:e0,type:e1,closeIcon:e2,classNames:SA(eq,e5),styles:CA(eU,e3),onClose:e$=>{e6&&e6(e$)},onOpenChange:(eI,eL)=>{eI||eR(e$.key),e8&&e8(eI,eL)}},e$.key)})},e$)})})},VA=(e$={})=>{let eI=(0,e.useRef)(),eR=(0,e.useRef)([]),eL=(0,e.useRef)(),ez=(0,e.useRef)(),eW=(0,e.useRef)(e$);eW.current=e$;let eH=e$=>{let eI=eR.current??[];if(null==e$){eI.length>0&&(eR.current=[],eF());return}let eL=eI.filter(eI=>eI.key!==e$);eL.length!==eI.length&&(eR.current=eL,eF())},eF=()=>{let e$=eR.current??[];if(0===e$.length&&null==ez.current)return;let eI=(()=>{let e$=TA((eW.current??{}).getContainer,eL.current??null,!0);if(!e$)return null;if(null==ez.current){let e$=document.createElement("div");e$.style.display="contents",e$.dataset.rueNotificationViewport="true",ez.current=e$}return ez.current.parentNode!==e$&&e$.appendChild(ez.current),ez.current})();eI&&(0,e.render)(r(BA,{records:e$,onDestroy:eH,inline:!1===(eW.current??{}).getContainer,...eW.current??{}}),eI)},eP=e$=>{let eI=e$.key??`rue-notification-${uA++}`,eL={key:eI,config:{...e$,key:eI}},ez=eR.current??[],eP=ez.findIndex(e$=>e$.key===eI),eB=-1===eP?[...ez,eL]:[...ez.slice(0,eP),eL,...ez.slice(eP+1)];return eR.current=eB=wA(eB,(eW.current??{}).maxCount),eF(),()=>eH(eI)};if(null==eI.current){let e$=e$=>eI=>eP({...eI,type:e$});eI.current={open:eP,success:e$("success"),info:e$("info"),warning:e$("warning"),error:e$("error"),destroy:eH}}(0,e.onUnmounted)(()=>{eR.current=[],ez.current&&(ez.current.remove(),ez.current=void 0),eL.current=void 0});let eB=r("div",{style:{display:"contents"},ref:e$=>{eL.current=e$??void 0,!1===(eW.current??{}).getContainer&&e$&&(eR.current??[]).length>0&&eF()}});return[eI.current,eB]},HA=()=>{let e$=TA(dA.getContainer,null,!0);if(!e$)return null;if(null==pA){let e$=document.createElement("div");e$.style.display="contents",e$.dataset.rueNotificationGlobalViewport="true",pA=e$}return pA.parentNode!==e$&&e$.appendChild(pA),pA},UA=e$=>{if(null==e$){fA.length>0&&(fA=[],WA());return}let eI=fA.filter(eI=>eI.key!==e$);eI.length!==fA.length&&(fA=eI,WA())},WA=()=>{if(typeof document>"u"||0===fA.length&&null==pA)return;let e$=HA();e$&&(0,e.render)(r(BA,{records:fA,onDestroy:UA,...dA}),e$)},GA=e$=>{let eI=e$.key??`rue-notification-${uA++}`,eR={key:eI,config:{...e$,key:eI}},eL=fA.findIndex(e$=>e$.key===eI),ez=-1===eL?[...fA,eR]:[...fA.slice(0,eL),eR,...fA.slice(eL+1)];return fA=ez=wA(ez,dA.maxCount),WA(),()=>UA(eI)},KA=Object.assign(RA,{Item:LA,useNotification:VA,open:GA,success:e$=>GA({...e$,type:"success"}),info:e$=>GA({...e$,type:"info"}),warning:e$=>GA({...e$,type:"warning"}),error:e$=>GA({...e$,type:"error"}),destroy:UA,config:e$=>{dA={...dA,...e$},WA()}}),qA=(e$,eI)=>eI?`${e$} ${eI}`:e$,JA=e$=>{switch(e$){case"small":return"sm";case"default":case"medium":return"md";default:return e$}},YA=e$=>{switch(JA(e$)){case"xs":case"sm":return"loading-xs";case"lg":return"loading-md";case"xl":return"loading-lg";default:return"loading-sm"}},XA=(e$,eI)=>"boolean"==typeof e$?e$:"boolean"==typeof eI?eI:void 0,ZA=(e$,eI,eR=!1)=>"boolean"==typeof e$?e$:"boolean"==typeof eI?eI:eR,QA=e$=>"boolean"==typeof e$?void 0:e$,$A=e$=>"boolean"==typeof e$?void 0:e$,ej=(e$,eI,eR)=>{let eL="toggle";e$&&(eL+=` toggle-${e$}`);let ez=JA(eI);return ez&&(eL+=` toggle-${ez}`),eR&&(eL+=` ${eR}`),eL},tj=(e$,eI)=>{let eR="inline-flex max-w-full items-start gap-3 align-top text-base-content";return e$?eR+=" cursor-not-allowed opacity-65":eR+=" cursor-pointer",eI&&(eR+=` ${eI}`),eR},nj=e$=>qA("flex min-w-0 flex-col gap-1 pt-0.5",e$),rj=e$=>qA("inline-flex items-center gap-2 text-xs text-base-content/60",e$),ij=({color:e$,size:eI,checked:eR,defaultChecked:eL,value:ez,defaultValue:eW,checkedChildren:eH,unCheckedChildren:eF,loading:eP,disabled:eB,className:eK,rootClassName:eV,contentClassName:eq,stateClassName:eU,style:eG,rootStyle:eZ,children:eY,onChange:eX,onCheckedChange:eJ,onClick:eQ,onNativeChange:e0,...e1})=>{let e2=(0,e.useRef)(),e5=XA(eR,ez),e3=(0,e.ref)(ZA(eL,eW,e5??!1)),e4=!!eB||!!eP,e6=null!=eH||null!=eF,e8=e5??e3.value,e7=!!eP||null!=eY||e6||!!eV||!!eZ||!!eq||!!eU,e9=e$=>{e2.current&&(e2.current.checked=e$)},t$=e$=>{let eI=e2.current?.closest('[data-rue-toggle-root="true"]')?.querySelector('[data-rue-toggle-state-input="true"]');eI&&(eI.checked=e$)};(0,e.onMounted)(()=>{e9(e5??e3.value),t$(e5??e3.value)}),(0,e.watch)(()=>XA(eR,ez),e$=>{"boolean"==typeof e$&&(e3.value=e$,e9(e$),t$(e$))},{immediate:!0});let tI=r("input",{...e1,ref:e2,type:"checkbox",checked:e5,defaultChecked:ZA(eL,eW,e8),value:QA(ez),defaultValue:$A(eW),disabled:e4,style:eG,autoComplete:e1.autoComplete??"off",className:ej(e$,eI,eK),"aria-busy":eP?"true":void 0,"data-rue-toggle-input":"true",onClick:e$=>{let eI=e$.target;eQ?.(eI?.checked===!0,e$)},onChange:e$=>{let eI=e$.target?.checked===!0,eR=void 0===e5?eI:e5;void 0===e5?e3.value=eI:e9(e5),t$(eR),e0?.(e$),eX?.(eI,e$),eJ?.(eI,e$)}});if(!e7)return tI;let tR=i("span",{className:"relative inline-flex shrink-0 items-center justify-center",children:[tI,eP?r("span",{className:"pointer-events-none absolute inset-0 inline-flex items-center justify-center text-base-content/70",children:r("span",{className:`loading loading-spinner ${YA(eI)}`.trim()})}):null]});return null!=eY||e6?i("label",{className:tj(e4,eV),style:eZ,"data-rue-toggle-root":"true",children:[tR,i("span",{className:nj(eq),children:[null==eY?null:r("span",{className:"text-sm font-medium text-base-content",children:eY}),e6?r("span",{className:rj(eU),children:i("span",{className:"swap pointer-events-none min-h-0 min-w-0",children:[r("input",{type:"checkbox",checked:e8,tabIndex:-1,"aria-hidden":"true",className:"sr-only","data-rue-toggle-state-input":"true"}),r("span",{className:"swap-on inline-flex items-center gap-2",children:eH}),r("span",{className:"swap-off inline-flex items-center gap-2",children:eF})]})}):null]})]}):r("span",{className:qA("inline-flex align-middle",eV),style:eZ,children:tR})},aj=({render:e$})=>e$(),oj={title:"title",key:"key",children:"children",disabled:"disabled",selectable:"selectable",checkable:"checkable",disableCheckbox:"disableCheckbox",isLeaf:"isLeaf",icon:"icon",className:"className",id:"id",pId:"pId"},sj=(...e$)=>e$.filter(Boolean).join(" "),cj=e$=>"object"==typeof e$&&!!e$&&!Array.isArray(e$),lj=e$=>"string"==typeof e$||"number"==typeof e$,uj=e$=>`${typeof e$}:${String(e$)}`,dj=e$=>{let eI=[],eR=new Set;return(e$??[]).forEach(e$=>{let eL=uj(e$);eR.has(eL)||(eR.add(eL),eI.push(e$))}),eI},fj=(e$,eI)=>e$?eI?`${e$} ${eI}`:e$:eI??"",pj=(e$,eI,eR)=>e$[eR?.[eI]??oj[eI]],mj=(e$,eI)=>pj(e$,"title",eI)??e$.title??e$.key,hj=e$=>new Set(dj(e$).map(uj)),gj=e$=>null==e$||"boolean"==typeof e$?"":"string"==typeof e$||"number"==typeof e$?String(e$):Array.isArray(e$)?e$.map(e$=>gj(e$)).filter(Boolean).join(" "):"object"==typeof e$?["title","label","name","text","description","children"].map(eI=>gj(e$[eI])).filter(Boolean).join(" "):"",_j=(e$,eI,eR)=>{if(!eI)return e$;let eL=cj(eI)?eI:void 0,ez=eL?.id??eR?.id??oj.id,eW=eL?.pId??eR?.pId??oj.pId,eH=eL?.rootPId??0,eF=eR?.children??oj.children,eP=new Map;e$.forEach((e$,eI)=>{let eR=e$[ez]??e$.key??eI;eP.set(eR,{...e$,[eF]:[]})});let eB=[];return e$.forEach((e$,eI)=>{let eR=e$[ez]??e$.key??eI,eL=e$[eW],eK=eP.get(eR);if(!eK)return;if(null==eL||eL===eH||!eP.has(eL))return void eB.push(eK);let eV=eP.get(eL);if(!eV)return void eB.push(eK);let eq=eV[eF]??[];eq.push(eK),eV[eF]=eq}),eB},vj=(e$,eI)=>{let eR=[],eL={},ez=(e$,eW,eH,eF)=>{let eP=pj(e$,"key",eI),eB=lj(eP)?eP:eH,eK=uj(eB),eV=pj(e$,"isLeaf",eI),eq={key:eB,keyText:eK,title:mj(e$,eI),depth:eW,children:[],raw:e$,disabled:!!pj(e$,"disabled",eI),selectable:!1!==pj(e$,"selectable",eI),checkable:!1!==pj(e$,"checkable",eI),disableCheckbox:!!pj(e$,"disableCheckbox",eI),isLeaf:!1,className:pj(e$,"className",eI),icon:pj(e$,"icon",eI),parentKeyText:eF};eR.push(eq),eL[eK]=eq;let eU=pj(e$,"children",eI);return eq.children=Array.isArray(eU)?eU.map((e$,eI)=>ez(e$,eW+1,`${eH}-${eI}`,eK)):[],eq.isLeaf=!0===eV||!1!==eV&&0===eq.children.length,eq};return{roots:e$.map((e$,eI)=>ez(e$,0,`node-${eI}`)),flat:eR,byKeyText:eL}},yj=e$=>{let eI=[],eR=e$=>{e$.disabled||!e$.checkable||e$.disableCheckbox||eI.push(e$.keyText),e$.children.forEach(e$=>eR(e$))};return eR(e$),eI},bj=e$=>{let eI=[],eR=e$=>{eI.push(e$.key),e$.children.forEach(e$=>eR(e$))};return eR(e$),eI},xj=(e$,eI,eR)=>{let eL=new Set,ez=new Set,eW={},eH=e$=>{let eF=!e$.disabled&&e$.checkable&&!e$.disableCheckbox,eP=e$.children.map(e$=>eH(e$)).filter(e$=>e$.participates),eB=eI.has(e$.keyText),eK=eB,eV=!1;if(!eR&&eP.length>0){let e$=eP.every(e$=>e$.checked),eI=eP.some(e$=>e$.checked||e$.halfChecked);eV=!(eK=eB||e$)&&eI}let eq={checked:eK,halfChecked:eV,participates:eF||eP.length>0};return eW[e$.keyText]=eq,eK&&eF&&eL.add(e$.keyText),eV&&eF&&ez.add(e$.keyText),eq};return e$.forEach(e$=>eH(e$)),{checkedKeys:eL,halfCheckedKeys:ez,stateMap:eW}},Sj=(e$,eI,eR,eL)=>{let ez=new Set(e$),eW=new Set(eI),eH=eR.filter(e$=>ez.has(e$.keyText)).map(e$=>e$.key).filter(lj);return eL?{checked:eH,halfChecked:eR.filter(e$=>eW.has(e$.keyText)).map(e$=>e$.key).filter(lj)}:eH},Cj=(e$,eI,eR,eL)=>{if(!eR){let eR=[],eL=e$=>{eR.push({node:e$,matched:!1}),eI.has(e$.keyText)&&e$.children.forEach(e$=>eL(e$))};return e$.forEach(e$=>eL(e$)),eR}let ez=e$=>{let eI=eL(e$),eR=e$.children.flatMap(e$=>ez(e$));if(!eI&&0===eR.length)return[];if(eI){let eI=[{node:e$,matched:!0}],eR=e$=>{eI.push({node:e$,matched:!1}),e$.children.forEach(e$=>eR(e$))};return e$.children.forEach(e$=>eR(e$)),eI}return[{node:e$,matched:!1},...eR]};return e$.flatMap(e$=>ez(e$))},wj=(e$,eI,eR)=>!eI||("function"==typeof eR?eR(eI,e$):!1===eR||gj(e$.title).toLowerCase().includes(eI.toLowerCase())),Tj=(e$,eI,eR)=>{let eL=eI.parentKeyText;for(;eL;){if(eL===e$.keyText)return!0;eL=eR[eL]?.parentKeyText}return!1},Ej=e$=>{let eI=!!e$,eR=cj(e$)?e$:void 0;return{enabled:eI,icon:eR?.icon,nodeDraggable:eL=>!!eI&&("function"==typeof e$?e$(eL):!eR||"function"!=typeof eR.nodeDraggable||eR.nodeDraggable(eL))}},Dj=(e$,eI,eR,eL,ez)=>{if(!ez||!eR||!eL)return{items:e$,topSpacer:0,bottomSpacer:0};let eW=eL+4,eH=Math.max(1,Math.ceil(eR/eW))+12,eF=Math.min(Math.max(0,e$.length-eH),Math.max(0,Math.floor(eI/eW)-6)),eP=Math.min(e$.length,eF+eH);return{items:e$.slice(eF,eP),topSpacer:eF*eW,bottomSpacer:Math.max(0,(e$.length-eP)*eW)}},Oj=e$=>-1===e$?"before":1===e$?"after":0===e$?"inside":void 0,kj=(e$,eI)=>e$.map(e$=>eI[e$]?.key).filter(lj),Aj=(e$,eI)=>{if(e$.size!==eI.size)return!1;for(let eR of e$)if(!eI.has(eR))return!1;return!0},jj=e$=>{switch(e$){case"small":case"sm":return{headerPadding:"px-4 py-3",bodyPadding:"px-3 py-3",rowPadding:"py-1.5",textClass:"text-sm",rowMinHeight:36,rowEstimate:42};case"large":case"lg":return{headerPadding:"px-5 py-4",bodyPadding:"px-4 py-4",rowPadding:"py-2.5",textClass:"text-[0.95rem]",rowMinHeight:44,rowEstimate:50};default:return{headerPadding:"px-4 py-3.5",bodyPadding:"px-3.5 py-3.5",rowPadding:"py-2",textClass:"text-sm",rowMinHeight:40,rowEstimate:46}}},Mj=e$=>{switch(e$){case"error":return"border-error/55 shadow-[0_0_0_1px_rgba(248,113,113,0.14)]";case"warning":return"border-warning/55 shadow-[0_0_0_1px_rgba(251,191,36,0.14)]";default:return""}},Nj=e$=>(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("span",eI);(0,t._$setAttribute)(eR,"aria-hidden","true"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(sj("inline-flex size-4 items-center justify-center text-base-content/55 transition-transform duration-150",e$.expanded&&"rotate-90",e$.hidden&&"opacity-0")))});let eL=(0,t._$createElement)("svg",eR);(0,t._$appendChild)(eR,eL),(0,t._$setAttribute)(eL,"viewBox","0 0 20 20"),(0,t._$setAttribute)(eL,"fill","none"),(0,t._$setClassName)(eL,"size-4");let ez=(0,t._$createElement)("path",eL);return(0,t._$appendChild)(eL,ez),(0,t._$setAttribute)(ez,"d","M7.5 5.5L12.5 10L7.5 14.5"),(0,t._$setAttribute)(ez,"stroke","currentColor"),(0,t._$setAttribute)(ez,"strokeWidth","1.8"),(0,t._$setAttribute)(ez,"strokeLinecap","round"),(0,t._$setAttribute)(ez,"strokeLinejoin","round"),eR}),Pj=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("span",e$);return(0,t._$setClassName)(eI,"loading loading-spinner loading-xs text-base-content/55"),(0,t._$setAttribute)(eI,"aria-hidden","true"),eI}),Fj=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 20 20"),(0,t._$setAttribute)(eI,"fill","currentColor"),(0,t._$setClassName)(eI,"size-4");let eR=(0,t._$createElement)("circle",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"cx","6"),(0,t._$setAttribute)(eR,"cy","5"),(0,t._$setAttribute)(eR,"r","1.2");let eL=(0,t._$createElement)("circle",eI);(0,t._$appendChild)(eI,eL),(0,t._$setAttribute)(eL,"cx","6"),(0,t._$setAttribute)(eL,"cy","10"),(0,t._$setAttribute)(eL,"r","1.2");let ez=(0,t._$createElement)("circle",eI);(0,t._$appendChild)(eI,ez),(0,t._$setAttribute)(ez,"cx","6"),(0,t._$setAttribute)(ez,"cy","15"),(0,t._$setAttribute)(ez,"r","1.2");let eW=(0,t._$createElement)("circle",eI);(0,t._$appendChild)(eI,eW),(0,t._$setAttribute)(eW,"cx","13"),(0,t._$setAttribute)(eW,"cy","5"),(0,t._$setAttribute)(eW,"r","1.2");let eH=(0,t._$createElement)("circle",eI);(0,t._$appendChild)(eI,eH),(0,t._$setAttribute)(eH,"cx","13"),(0,t._$setAttribute)(eH,"cy","10"),(0,t._$setAttribute)(eH,"r","1.2");let eF=(0,t._$createElement)("circle",eI);return(0,t._$appendChild)(eI,eF),(0,t._$setAttribute)(eF,"cx","13"),(0,t._$setAttribute)(eF,"cy","15"),(0,t._$setAttribute)(eF,"r","1.2"),eI}),Ij=e$=>(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("svg",eI);(0,t._$setAttribute)(eR,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eR,"fill","none"),(0,t._$setClassName)(eR,"size-5");let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.expanded?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("path",e$);return(0,t._$appendChild)(e$,eI),(0,t._$setAttribute)(eI,"d","M3 8.5a2 2 0 0 1 2-2h4l1.4 1.5H19a2 2 0 0 1 1.9 2.6l-1.4 5A2 2 0 0 1 17.6 17H6a2 2 0 0 1-1.93-1.48L3 8.5Z"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.6"),(0,t._$setAttribute)(eI,"strokeLinejoin","round"),e$}):(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("path",e$);return(0,t._$appendChild)(e$,eI),(0,t._$setAttribute)(eI,"d","M3 7.5a2 2 0 0 1 2-2h4l1.4 1.5H19a2 2 0 0 1 2 2V16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7.5Z"),(0,t._$setAttribute)(eI,"stroke","currentColor"),(0,t._$setAttribute)(eI,"strokeWidth","1.6"),(0,t._$setAttribute)(eI,"strokeLinejoin","round"),e$});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eR}),Lj=()=>(0,t.vapor)(e$=>{let eI=(0,t._$createElement)("svg",e$);(0,t._$setAttribute)(eI,"viewBox","0 0 24 24"),(0,t._$setAttribute)(eI,"fill","none"),(0,t._$setClassName)(eI,"size-5");let eR=(0,t._$createElement)("path",eI);(0,t._$appendChild)(eI,eR),(0,t._$setAttribute)(eR,"d","M8 3.5h6l4 4V19a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V5.5a2 2 0 0 1 2-2Z"),(0,t._$setAttribute)(eR,"stroke","currentColor"),(0,t._$setAttribute)(eR,"strokeWidth","1.6"),(0,t._$setAttribute)(eR,"strokeLinejoin","round");let eL=(0,t._$createElement)("path",eI);return(0,t._$appendChild)(eI,eL),(0,t._$setAttribute)(eL,"d","M14 3.5V8h4"),(0,t._$setAttribute)(eL,"stroke","currentColor"),(0,t._$setAttribute)(eL,"strokeWidth","1.6"),(0,t._$setAttribute)(eL,"strokeLinejoin","round"),eI}),Rj=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,__rue_rest_omit_20:e1,__rue_rest_omit_21:e2,__rue_rest_omit_22:e5,__rue_rest_omit_23:e3,__rue_rest_omit_24:e4,__rue_rest_omit_25:e6,__rue_rest_omit_26:e8,__rue_rest_omit_27:e7,__rue_rest_omit_28:e9,__rue_rest_omit_29:t$,__rue_rest_omit_30:tI,__rue_rest_omit_31:tR,__rue_rest_omit_32:tL,__rue_rest_omit_33:tz,__rue_rest_omit_34:tW,__rue_rest_omit_35:tH,__rue_rest_omit_36:tF,__rue_rest_omit_37:tP,__rue_rest_omit_38:tB,__rue_rest_omit_39:tK,__rue_rest_omit_40:tV,__rue_rest_omit_41:tq,__rue_rest_omit_42:tU,__rue_rest_omit_43:tG,__rue_rest_omit_44:tZ,__rue_rest_omit_45:tY,__rue_rest_omit_46:tX,__rue_rest_omit_47:tJ,__rue_rest_omit_48:tQ,__rue_rest_omit_49:t0,__rue_rest_omit_50:t1,__rue_rest_omit_51:t2,__rue_rest_omit_52:t5,__rue_rest_omit_53:t3,__rue_rest_omit_54:t4,rest:t6,sourceTreeData:t8,normalizedTree:t7,componentSize:t9,dragConfig:r$,initialExpandedKeys:rI,uncontrolledSelectedKeysRef:rR,uncontrolledCheckedKeysRef:rL,uncontrolledExpandedKeysRef:rz,controlledCheckedKeyTextsRef:rW,searchValueRef:rH,loadingKeyTextsRef:rF,scrollTopRef:rP,directoryLastSelectedKeyTextRef:rB,directoryCachedSelectedKeyTextsRef:rK,dragStateRef:rV,dragHoverDepthRef:rq,mergedSelectedKeys:rU,mergedExpandedKeys:rG,mergedSearchValue:rZ,mergedCheckedKeyTexts:rY,selectedKeyTextSet:rX,expandedKeyTextSet:rJ,checkState:rQ,visibleNodes:r0,estimatedRowHeight:r1,viewportHeight:r2,fixedVirtualRowHeight:r5,virtualSlice:r3,emitExpand:r4,commitSelectedKeys:r6,commitCheckedKeys:r8,toggleExpanded:r7,handleExpandToggle:r9,selectTreeNode:a$,handleCheck:aI,handleSearchInput:aR,handleBodyScroll:aL,clearDragHoverState:az,setDragHoverState:aW,updateDragHoverDepth:aH,resetDragState:aF,resolveDropContext:aP,handleDragStartNode:aB,handleDragEnterNode:aK,handleDragOverNode:aV,handleDragLeaveNode:aq,handleDragEndNode:aU,handleDropNode:aG,renderSwitcher:aZ,renderDragHandle:aY,renderGapPlaceholder:aX,renderNodeIcon:aJ,handleLabelActivate:aQ,bodyViewportStyle:a0}=(0,t._$vaporWithHookId)("useSetup:0:0:dup2",()=>(0,t.useSetup)(()=>{let{className:eI,style:eR,treeData:eL,fieldNames:ez,treeDataSimpleMode:eW,selectedKeys:eH,defaultSelectedKeys:eF,checkedKeys:eP,defaultCheckedKeys:eB,expandedKeys:eK,defaultExpandedKeys:eV,defaultExpandAll:eq,multiple:eU,checkable:eG,checkStrictly:eZ,showLine:eY,showIcon:eX,blockNode:eJ,selectable:eQ,disabled:e0,size:e1,status:e2,draggable:e5,allowDrop:e3,virtual:e4,height:e6,itemHeight:e8,titleRender:e7,switcherIcon:e9,icon:t$,filterTreeNode:tI,searchValue:tR,defaultSearchValue:tL,searchPlaceholder:tz,allowSearch:tW,loadData:tH,emptyText:tF,onSelect:tP,onCheck:tB,onExpand:tK,onSearch:tV,onDoubleClick:tq,onDragStart:tU,onDragEnter:tG,onDragOver:tZ,onDragLeave:tY,onDragEnd:tX,onDrop:tJ,onScroll:tQ,classNames:t0,styles:t1,directoryMode:t2,expandAction:t5,toggleSelect:t3,rangeSelect:t4,...t6}=e$,t8=(0,t._$vaporWithHookId)("computed:1:0",()=>(0,t.computed)(()=>_j(void 0===e$.treeData?[]:e$.treeData,e$.treeDataSimpleMode,e$.fieldNames))),t7=(0,t._$vaporWithHookId)("computed:1:1",()=>(0,t.computed)(()=>vj(t8.get(),e$.fieldNames))),t9=(0,t._$vaporWithHookId)("computed:1:2",()=>(0,t.computed)(()=>jj(e$.size))),r$=(0,t._$vaporWithHookId)("computed:1:3",()=>(0,t.computed)(()=>Ej(e$.draggable))),rI=e$.defaultExpandAll?t7.get().flat.filter(e$=>e$.children.length>0||!e$.isLeaf).map(e$=>e$.key):e$.defaultExpandedKeys??[],rR=(0,t._$vaporWithHookId)("ref:1:4",()=>(0,t.ref)(dj(e$.defaultSelectedKeys??e$.selectedKeys))),rL=(0,t._$vaporWithHookId)("ref:1:5",()=>(0,t.ref)(dj(e$.defaultCheckedKeys))),rz=(0,t._$vaporWithHookId)("ref:1:6",()=>(0,t.ref)(dj(rI))),rW=(0,t._$vaporWithHookId)("ref:1:7",()=>(0,t.ref)(void 0===e$.checkedKeys?new Set:Array.isArray(e$.checkedKeys)?hj(e$.checkedKeys):hj(e$.checkedKeys.checked))),rH=(0,t._$vaporWithHookId)("ref:1:8",()=>(0,t.ref)(e$.defaultSearchValue??"")),rF=(0,t._$vaporWithHookId)("ref:1:9",()=>(0,t.ref)([])),rP=(0,t._$vaporWithHookId)("ref:1:10",()=>(0,t.ref)(0)),rB=(0,t._$vaporWithHookId)("ref:1:11",()=>(0,t.ref)(null)),rK=(0,t._$vaporWithHookId)("ref:1:12",()=>(0,t.ref)([])),rV=(0,t._$vaporWithHookId)("ref:1:13",()=>(0,t.ref)({})),rq=(0,t._$vaporWithHookId)("ref:1:14",()=>(0,t.ref)({}));if(void 0!==e$.checkedKeys){let eI=Array.isArray(e$.checkedKeys)?hj(e$.checkedKeys):hj(e$.checkedKeys.checked);Aj(rW.value,eI)||(rW.value=eI)}let rU=(0,t._$vaporWithHookId)("computed:1:15",()=>(0,t.computed)(()=>void 0===e$.selectedKeys?rR.value:dj(e$.selectedKeys))),rG=(0,t._$vaporWithHookId)("computed:1:16",()=>(0,t.computed)(()=>void 0===e$.expandedKeys?rz.value:dj(e$.expandedKeys))),rZ=(0,t._$vaporWithHookId)("computed:1:17",()=>(0,t.computed)(()=>void 0===e$.searchValue?rH.value:e$.searchValue)),rY=void 0===e$.checkedKeys?hj(rL.value):rW.value,rX=(0,t._$vaporWithHookId)("computed:1:18",()=>(0,t.computed)(()=>hj(rU.get()))),rJ=(0,t._$vaporWithHookId)("computed:1:19",()=>(0,t.computed)(()=>hj(rG.get()))),rQ=(0,t._$vaporWithHookId)("computed:1:20",()=>(0,t.computed)(()=>xj(t7.get().roots,rY,!!e$.checkStrictly))),r0=(0,t._$vaporWithHookId)("computed:1:21",()=>(0,t.computed)(()=>Cj(t7.get().roots,rJ.get(),rZ.get(),eI=>wj(eI,rZ.get(),e$.filterTreeNode)))),r1=(0,t._$vaporWithHookId)("computed:1:22",()=>(0,t.computed)(()=>e$.itemHeight??t9.get().rowEstimate)),r2=(0,t._$vaporWithHookId)("computed:1:23",()=>(0,t.computed)(()=>"number"==typeof e$.height&&e$.height>0?e$.height:void 0)),r5=(0,t._$vaporWithHookId)("computed:1:24",()=>(0,t.computed)(()=>(void 0===e$.virtual||e$.virtual)!==!1&&r2.get()&&"number"==typeof e$.itemHeight&&e$.itemHeight>0?e$.itemHeight:void 0)),r3=(0,t._$vaporWithHookId)("computed:1:25",()=>(0,t.computed)(()=>Dj(r0.get(),rP.value,r2.get(),r1.get(),(void 0===e$.virtual||e$.virtual)!==!1&&!!r2.get()))),r4=(eI,eR,eL)=>{let ez=dj(eI);return void 0===e$.expandedKeys&&(rz.value=ez),e$.onExpand&&e$.onExpand(ez,{node:eR,expanded:ez.some(e$=>uj(e$)===eR.keyText),nativeEvent:eL}),ez},r6=(eI,eR,eL)=>{let ez=dj(eI).filter(e$=>t7.get().byKeyText[uj(e$)]),eW=ez.map(e$=>t7.get().byKeyText[uj(e$)]).filter(Boolean);void 0===e$.selectedKeys&&(rR.value=ez),e$.onSelect&&e$.onSelect(ez,{node:eR,nativeEvent:eL,selected:ez.some(e$=>uj(e$)===eR.keyText),selectedNodes:eW})},r8=(eI,eR,eL)=>{let ez=xj(t7.get().roots,eI,!!e$.checkStrictly),eW=Sj(Array.from(ez.checkedKeys),Array.from(ez.halfCheckedKeys),t7.get().flat,!!e$.checkStrictly);void 0===e$.checkedKeys?rL.value=e$.checkStrictly?eW.checked:eW:rW.value=new Set(ez.checkedKeys),e$.onCheck&&e$.onCheck(eW,{node:eR,nativeEvent:eL,checked:ez.checkedKeys.has(eR.keyText),checkedNodes:Array.from(ez.checkedKeys).map(e$=>t7.get().byKeyText[e$]).filter(Boolean),halfCheckedKeys:Array.from(ez.halfCheckedKeys).map(e$=>t7.get().byKeyText[e$]?.key).filter(lj)})},r7=async(eI,eR)=>{if(e$.disabled||eI.disabled)return rG.get();let eL=rJ.get().has(eI.keyText),ez=eL?rG.get().filter(e$=>uj(e$)!==eI.keyText):[...rG.get(),eI.key];if(!eL&&e$.loadData&&!eI.isLeaf&&0===eI.children.length&&!rF.value.includes(eI.keyText)){rF.value=[...rF.value,eI.keyText];try{await e$.loadData(eI)}finally{rF.value=rF.value.filter(e$=>e$!==eI.keyText)}}return r4(ez,eI,eR)},r9=(eI,eR)=>{if(!(e$.disabled||eI.disabled||!(void 0===e$.selectable||e$.selectable)||!eI.selectable)){if(e$.directoryMode){let eL=!!e$.multiple&&!!(void 0===e$.toggleSelect||e$.toggleSelect)&&!!(eR?.ctrlKey||eR?.metaKey),ez=!!e$.multiple&&(void 0===e$.rangeSelect?"append":e$.rangeSelect)!==!1&&!!eR?.shiftKey&&!!rB.value;if(e$.multiple&&ez){let eL=r0.get().map(e$=>e$.node.keyText),ez=rB.value??eI.keyText,eW=eL.indexOf(ez),eH=eL.indexOf(eI.keyText),eF=Math.min(eW,eH),eP=Math.max(eW,eH),eB=eL.slice(eF,eP+1);r6(kj(Array.from(new Set([...(void 0===e$.rangeSelect?"append":e$.rangeSelect)==="append"?rK.value.length?rK.value:rU.get().map(uj):[],...eB])),t7.get().byKeyText),eI,eR);return}if(e$.multiple&&eL){let e$=rX.get().has(eI.keyText)?rU.get().filter(e$=>uj(e$)!==eI.keyText):[...rU.get(),eI.key];rB.value=eI.keyText,rK.value=e$.map(uj),r6(e$,eI,eR);return}rB.value=eI.keyText,rK.value=[eI.keyText],r6([eI.key],eI,eR);return}if(e$.multiple)return void r6(rX.get().has(eI.keyText)?rU.get().filter(e$=>uj(e$)!==eI.keyText):[...rU.get(),eI.key],eI,eR);r6(rX.get().has(eI.keyText)?[]:[eI.key],eI,eR)}},a$=e$=>{e$&&rV.value.overKeyText===e$&&(rV.value={dragKeyText:rV.value.dragKeyText})},aI=(e$,eI)=>{rV.value.overKeyText===e$&&rV.value.dropPosition===eI||(rV.value={...rV.value,overKeyText:e$,dropPosition:eI})},aR=(e$,eI)=>{let eR={...rq.value},eL=Math.max((eR[e$]??0)+eI,0);return eL>0?eR[e$]=eL:delete eR[e$],rq.value=eR,eL},aL=()=>{rq.value={},rV.value={}},az=(eI,eR,eL)=>{let ez=rV.value.dragKeyText;if(!ez)return null;let eW=t7.get().byKeyText[ez];if(!eW||eW.keyText===eI.keyText||Tj(eW,eI,t7.get().byKeyText))return null;let eH=eL?.getBoundingClientRect?.(),eF="clientY"in eR?eR.clientY:void 0,eP=0;eH&&"number"==typeof eF&&(eF<eH.top+.25*eH.height?eP=-1:eF>eH.bottom-.25*eH.height&&(eP=1));let eB=0!==eP;return e$.allowDrop&&!e$.allowDrop({dragNode:eW,dropNode:eI,dropPosition:eP,dropToGap:eB})?null:{dragNode:eW,dropPosition:eP}};return{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,__rue_rest_omit_4:eW,__rue_rest_omit_5:eH,__rue_rest_omit_6:eF,__rue_rest_omit_7:eP,__rue_rest_omit_8:eB,__rue_rest_omit_9:eK,__rue_rest_omit_10:eV,__rue_rest_omit_11:eq,__rue_rest_omit_12:eU,__rue_rest_omit_13:eG,__rue_rest_omit_14:eZ,__rue_rest_omit_15:eY,__rue_rest_omit_16:eX,__rue_rest_omit_17:eJ,__rue_rest_omit_18:eQ,__rue_rest_omit_19:e0,__rue_rest_omit_20:e1,__rue_rest_omit_21:e2,__rue_rest_omit_22:e5,__rue_rest_omit_23:e3,__rue_rest_omit_24:e4,__rue_rest_omit_25:e6,__rue_rest_omit_26:e8,__rue_rest_omit_27:e7,__rue_rest_omit_28:e9,__rue_rest_omit_29:t$,__rue_rest_omit_30:tI,__rue_rest_omit_31:tR,__rue_rest_omit_32:tL,__rue_rest_omit_33:tz,__rue_rest_omit_34:tW,__rue_rest_omit_35:tH,__rue_rest_omit_36:tF,__rue_rest_omit_37:tP,__rue_rest_omit_38:tB,__rue_rest_omit_39:tK,__rue_rest_omit_40:tV,__rue_rest_omit_41:tq,__rue_rest_omit_42:tU,__rue_rest_omit_43:tG,__rue_rest_omit_44:tZ,__rue_rest_omit_45:tY,__rue_rest_omit_46:tX,__rue_rest_omit_47:tJ,__rue_rest_omit_48:tQ,__rue_rest_omit_49:t0,__rue_rest_omit_50:t1,__rue_rest_omit_51:t2,__rue_rest_omit_52:t5,__rue_rest_omit_53:t3,__rue_rest_omit_54:t4,rest:t6,sourceTreeData:t8,normalizedTree:t7,componentSize:t9,dragConfig:r$,initialExpandedKeys:rI,uncontrolledSelectedKeysRef:rR,uncontrolledCheckedKeysRef:rL,uncontrolledExpandedKeysRef:rz,controlledCheckedKeyTextsRef:rW,searchValueRef:rH,loadingKeyTextsRef:rF,scrollTopRef:rP,directoryLastSelectedKeyTextRef:rB,directoryCachedSelectedKeyTextsRef:rK,dragStateRef:rV,dragHoverDepthRef:rq,mergedSelectedKeys:rU,mergedExpandedKeys:rG,mergedSearchValue:rZ,mergedCheckedKeyTexts:rY,selectedKeyTextSet:rX,expandedKeyTextSet:rJ,checkState:rQ,visibleNodes:r0,estimatedRowHeight:r1,viewportHeight:r2,fixedVirtualRowHeight:r5,virtualSlice:r3,emitExpand:r4,commitSelectedKeys:r6,commitCheckedKeys:r8,toggleExpanded:r7,handleExpandToggle:(e$,eI)=>{eI.preventDefault(),eI.stopPropagation(),r7(e$,eI)},selectTreeNode:r9,handleCheck:(eI,eR)=>{if(eR.preventDefault(),eR.stopPropagation(),e$.disabled||eI.disabled||!eI.checkable||eI.disableCheckbox)return;let eL=new Set(rY),ez=rQ.get().checkedKeys.has(eI.keyText);if(e$.checkStrictly)ez?eL.delete(eI.keyText):eL.add(eI.keyText);else{let e$=yj(eI);ez?e$.forEach(e$=>eL.delete(e$)):e$.forEach(e$=>eL.add(e$))}r8(eL,eI,eR)},handleSearchInput:eI=>{void 0===e$.searchValue&&(rH.value=eI),e$.onSearch&&e$.onSearch(eI)},handleBodyScroll:eI=>{rP.value=eI.currentTarget.scrollTop,e$.onScroll&&e$.onScroll(eI)},clearDragHoverState:a$,setDragHoverState:aI,updateDragHoverDepth:aR,resetDragState:aL,resolveDropContext:az,handleDragStartNode:(eI,eR)=>{!r$.get().enabled||!r$.get().nodeDraggable(eI)||e$.disabled||eI.disabled||(eR.dataTransfer&&(eR.dataTransfer.effectAllowed="move",eR.dataTransfer.setData("text/plain",eI.keyText)),rq.value={},rV.value={dragKeyText:eI.keyText},e$.onDragStart&&e$.onDragStart({event:eR,node:eI}))},handleDragEnterNode:(eI,eR)=>{if(!rV.value.dragKeyText)return;aR(eI.keyText,1);let eL=az(eI,eR,eR.currentTarget);if(!eL)return void a$(eI.keyText);eR.preventDefault(),aI(eI.keyText,eL.dropPosition);let ez=rG.get();0!==eL.dropPosition||rJ.get().has(eI.keyText)||!(eI.children.length>0)&&eI.isLeaf||(ez=r4([...rG.get(),eI.key],eI,eR)),e$.onDragEnter&&e$.onDragEnter({event:eR,node:eI,expandedKeys:ez})},handleDragOverNode:(eI,eR)=>{if(!rV.value.dragKeyText)return;let eL=az(eI,eR,eR.currentTarget);eL?(eR.preventDefault(),eR.dataTransfer&&(eR.dataTransfer.dropEffect="move"),aI(eI.keyText,eL.dropPosition),e$.onDragOver&&e$.onDragOver({event:eR,node:eI})):a$(eI.keyText)},handleDragLeaveNode:(eI,eR)=>{0===aR(eI.keyText,-1)&&a$(eI.keyText),e$.onDragLeave&&e$.onDragLeave({event:eR,node:eI})},handleDragEndNode:(eI,eR)=>{aL(),e$.onDragEnd&&e$.onDragEnd({event:eR,node:eI})},handleDropNode:(eI,eR)=>{let eL=az(eI,eR,eR.currentTarget);eL&&(eR.preventDefault(),eR.stopPropagation(),e$.onDrop&&e$.onDrop({event:eR,node:eI,dragNode:eL.dragNode,dragNodesKeys:bj(eL.dragNode),dropPosition:eL.dropPosition,dropToGap:0!==eL.dropPosition})),aL()},renderSwitcher:(eI,eR,eL,ez,eW,eH)=>{let{renderProps:eF}=(0,t._$vaporWithHookId)("useSetup:0:0",()=>(0,t.useSetup)(()=>({renderProps:{node:eI,expanded:eR,selected:eL,checked:ez,halfChecked:eW,loading:eH}})));return"function"==typeof e$.switcherIcon?e$.switcherIcon(eF):void 0===e$.switcherIcon?eH?r(Pj,{}):r(Nj,{expanded:eR,hidden:eI.isLeaf&&0===eI.children.length}):e$.switcherIcon},renderDragHandle:eI=>r$.get().enabled&&!1!==r$.get().icon&&r$.get().nodeDraggable(eI)?(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("span",eI);(0,t._$setAttribute)(eR,"aria-hidden","true"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(fj("inline-flex size-6 shrink-0 cursor-grab items-center justify-center rounded-lg text-base-content/35 transition group-hover:text-base-content/55",e$.classNames?.dragHandle)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.dragHandle;(0,t._$setStyle)(eR,eI)}),(0,t._$setAttribute)(eR,"data-rue-tree-drag-handle","true");let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let e$=r$.get().icon??(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(e$,eI),(0,t.renderAnchor)((0,t._$createComponent)(Fj,{}),e$,eI),e$});(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eL))}),eR}):null,renderGapPlaceholder:(e$,eI)=>(0,t.vapor)(eR=>{let eL=(0,t._$createElement)("div",eR);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(sj("pointer-events-none absolute inset-x-0 z-10 flex items-center gap-2 px-2.5 py-0.5 text-[11px] font-semibold uppercase tracking-[0.08em] text-primary/85","before"===eI?"-top-2.5":"-bottom-2.5")))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eL,{paddingLeft:`${18*e$.depth+20}px`})}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"data-rue-tree-drop-placeholder",String(eI))});let ez=(0,t._$createElement)("span",eL);(0,t._$appendChild)(eL,ez),(0,t._$setClassName)(ez,"h-[2px] flex-1 rounded-full bg-primary/60");let eW=(0,t._$createElement)("span",eL);return(0,t._$appendChild)(eL,eW),(0,t._$setClassName)(eW,"rounded-full bg-primary/10 px-2 py-1 text-[10px]"),(0,t._$appendChild)(eW,(0,t._$createTextNode)("插入到此处")),eL}),renderNodeIcon:(eI,eR,eL,ez,eW,eH)=>{let{renderProps:eF}=(0,t._$vaporWithHookId)("useSetup:0:0:dup1",()=>(0,t.useSetup)(()=>({renderProps:{node:eI,expanded:eR,selected:eL,checked:ez,halfChecked:eW,loading:eH}})));return"function"==typeof e$.icon?e$.icon(eF):void 0===e$.icon?void 0===eI.icon?e$.showIcon?e$.directoryMode?(0,t.vapor)(e$=>{let eL=(0,t._$createElement)("span",e$);(0,t._$setClassName)(eL,"inline-flex size-6 items-center justify-center text-base-content/60");let ez=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{let e$=eI.children.length>0||!eI.isLeaf?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(e$,eI),(0,t.watchEffect)(()=>{let eL=(0,t._$createComponent)(Ij,{expanded:eR});(0,t.untrack)(()=>(0,t.renderAnchor)(eL,e$,eI))}),e$}):(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(e$,eI),(0,t.renderAnchor)((0,t._$createComponent)(Lj,{}),e$,eI),e$});(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eL,ez))}),eL}):(0,t.vapor)(e$=>{let eR=(0,t._$createElement)("span",e$);(0,t._$setClassName)(eR,"inline-flex size-6 items-center justify-center rounded-xl bg-base-200/80 text-[11px] text-base-content/60");let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let e$=eI.children.length>0||!eI.isLeaf?"DIR":"DOC";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eL))}),eR}):null:eI.icon:e$.icon},handleLabelActivate:(eI,eR,eL)=>{eR.preventDefault(),eR.stopPropagation(),"doubleClick"===eL&&e$.onDoubleClick&&e$.onDoubleClick(eR,eI);let ez=e$.directoryMode&&(void 0!==e$.expandAction&&e$.expandAction)===eL&&(eI.children.length>0||!eI.isLeaf);"click"===eL&&ez?(0,t.batch)(()=>{r7(eI,eR),r9(eI,eR)}):(ez&&r7(eI,eR),"click"===eL&&r9(eI,eR))},bodyViewportStyle:(0,t._$vaporWithHookId)("computed:1:26",()=>(0,t.computed)(()=>r2.get()?(void 0===e$.virtual||e$.virtual)===!1?{maxHeight:`${r2.get()}px`,overflowY:"auto"}:{height:`${r2.get()}px`,overflowY:"auto"}:{overflowY:"visible"}))}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createElement)("section",eI);(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(fj(fj(fj(sj("rue-tree overflow-hidden rounded-[1.35rem] border border-base-300/70 bg-gradient-to-b from-base-100 via-base-100 to-base-200/35 shadow-[0_18px_40px_-32px_rgba(15,23,42,0.35)]",e$.directoryMode&&"rue-directory-tree"),Mj(e$.status)),e$.classNames?.root),e$.className)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{...e$.styles?.root,...e$.style})}),(0,t._$setAttribute)(eR,"data-rue-tree","true");let eL=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=e$.allowSearch?(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(fj(fj(`border-b border-base-300/70 ${t9.get().headerPadding}`,e$.classNames?.header),e$.classNames?.search)))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eR,{...e$.styles?.header,...e$.styles?.search})});let eL=(0,t._$createElement)("label",eR);(0,t._$appendChild)(eR,eL),(0,t._$setClassName)(eL,"input input-bordered flex w-full items-center gap-2 rounded-2xl border-base-300/80 bg-base-100/85 px-3 shadow-sm focus-within:border-primary/45 focus-within:outline-none");let ez=(0,t._$createElement)("svg",eL);(0,t._$appendChild)(eL,ez),(0,t._$setAttribute)(ez,"viewBox","0 0 24 24"),(0,t._$setAttribute)(ez,"fill","none"),(0,t._$setAttribute)(ez,"stroke","currentColor"),(0,t._$setAttribute)(ez,"strokeWidth","1.8"),(0,t._$setClassName)(ez,"size-4 text-base-content/50");let eW=(0,t._$createElement)("circle",ez);(0,t._$appendChild)(ez,eW),(0,t._$setAttribute)(eW,"cx","11"),(0,t._$setAttribute)(eW,"cy","11"),(0,t._$setAttribute)(eW,"r","7");let eH=(0,t._$createElement)("path",ez);(0,t._$appendChild)(ez,eH),(0,t._$setAttribute)(eH,"strokeLinecap","round"),(0,t._$setAttribute)(eH,"d","m20 20-3.5-3.5");let eF=(0,t._$createElement)("input",eL);return(0,t._$appendChild)(eL,eF),(0,t._$setAttribute)(eF,"type","text"),(0,t.watchEffect)(()=>{(0,t._$setValue)(eF,rZ.get())}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eF,"placeholder",String(void 0===e$.searchPlaceholder?"搜索节点":e$.searchPlaceholder))}),(0,t._$setClassName)(eF,"grow border-none bg-transparent px-0 py-2 text-sm outline-none"),(0,t._$addEventListener)(eF,"input",e$=>aR(e$.currentTarget.value)),eI}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))});let ez=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,ez),(0,t.watchEffect)(()=>{(0,t._$setClassName)(ez,String(fj(`flex flex-col ${t9.get().bodyPadding}`,e$.classNames?.body)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.body;(0,t._$setStyle)(ez,eI)});let eW=(0,t._$createElement)("div",ez);(0,t._$appendChild)(ez,eW),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eW,String(r2.get()?"overflow-auto":"overflow-visible"))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eW,a0.get())}),(0,t._$addEventListener)(eW,"scroll",e$=>aL(e$)),(0,t._$setAttribute)(eW,"data-rue-tree-body","true"),(0,t._$appendChild)(eW,(0,t._$createTextNode)(" "));let eH=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eW,eH),(0,t.watchEffect)(()=>{let e$=r3.get().topSpacer>0?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("div",e$);return(0,t._$appendChild)(e$,eI),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eI,{height:`${r3.get().topSpacer}px`})}),(0,t._$setAttribute)(eI,"aria-hidden","true"),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eW,eH))}),(0,t._$appendChild)(eW,(0,t._$createTextNode)(" "));let eF=(0,t._$createElement)("div",eW);(0,t._$appendChild)(eW,eF),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eF,String(r0.get().length?"space-y-1":"hidden"))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eF,"aria-hidden",String(r0.get().length?void 0:"true"))});let eP=(0,t._$createComment)("rue:list:start"),eB=(0,t._$createComment)("rue:list:end");(0,t._$appendChild)(eF,eP),(0,t._$appendChild)(eF,eB);let eK=new Map;(0,t.watchEffect)(()=>{eK=(0,t._$vaporKeyedList)({items:r3.get().items||[],getKey:(e$,eI)=>e$.node.keyText,elements:eK,parent:eF,before:eB,singleRoot:!0,trackIndex:!1,start:eP,renderItem:(eI,eR,eL,ez,eW)=>{(0,t.renderAnchor)((0,t.vapor)(()=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"key",String(eI.node.keyText))}),(0,t._$setClassName)(eL,"relative flex flex-col");let ez=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{let e$=(rV.value.overKeyText===eI.node.keyText?Oj(rV.value.dropPosition):void 0)==="before"?aX(eI.node,"before"):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eL,ez))});let eW=(0,t._$createElement)("div",eL);(0,t._$appendChild)(eL,eW),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eW,String(fj(fj(sj(`group flex items-center gap-2 rounded-2xl px-2.5 ${t9.get().rowPadding} transition duration-200 ease-out`,eI.matched&&"bg-primary/8",rX.get().has(eI.node.keyText)&&"bg-primary/18 ring-1 ring-primary/30 shadow-[0_18px_32px_-24px_rgba(37,99,235,0.85)]",e$.showLine&&eI.node.depth>0&&"border-l border-base-300/60",e$.blockNode?"w-full":"",rV.value.overKeyText===eI.node.keyText&&0===rV.value.dropPosition?"ring-2 ring-primary/35 ring-inset":"",eI.node.className),e$.classNames?.node),e$.disabled||eI.node.disabled?"opacity-55":"")))}),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eW,{paddingLeft:`${18*eI.node.depth+8}px`,minHeight:r5.get()?void 0:`${t9.get().rowMinHeight}px`,height:r5.get()?`${r5.get()}px`:void 0,boxSizing:r5.get()?"border-box":void 0,...e$.styles?.node})}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eW,"data-rue-tree-node",String(eI.node.keyText))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eW,"data-rue-tree-drop-position",String(rV.value.overKeyText===eI.node.keyText?String(rV.value.dropPosition??0):""))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eW,"data-rue-tree-drop-intent",String((rV.value.overKeyText===eI.node.keyText?Oj(rV.value.dropPosition):void 0)??""))}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eW,"draggable",String(r$.get().enabled&&r$.get().nodeDraggable(eI.node)&&!e$.disabled&&!eI.node.disabled))}),(0,t._$addEventListener)(eW,"dragstart",e$=>aB(eI.node,e$)),(0,t._$addEventListener)(eW,"dragenter",e$=>aK(eI.node,e$)),(0,t._$addEventListener)(eW,"dragover",e$=>aV(eI.node,e$)),(0,t._$addEventListener)(eW,"dragleave",e$=>aq(eI.node,e$)),(0,t._$addEventListener)(eW,"dragend",e$=>aU(eI.node,e$)),(0,t._$addEventListener)(eW,"drop",e$=>aG(eI.node,e$));let eH=(0,t._$createElement)("button",eW);(0,t._$appendChild)(eW,eH),(0,t._$setAttribute)(eH,"type","button"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eH,String(fj("inline-flex size-7 shrink-0 items-center justify-center rounded-xl hover:bg-base-200 disabled:cursor-not-allowed",e$.classNames?.switcher)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.switcher;(0,t._$setStyle)(eH,eI)}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eH,!(e$.loadData||eI.node.children.length>0||!eI.node.isLeaf)||e$.disabled||eI.node.disabled)}),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eH,"aria-label",String(rZ.get()||rJ.get().has(eI.node.keyText)?"折叠节点":"展开节点"))}),(0,t._$addEventListener)(eH,"click",e$=>r9(eI.node,e$));let eF=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eH,eF),(0,t.watchEffect)(()=>{let e$=aZ(eI.node,!!rZ.get()||rJ.get().has(eI.node.keyText),rX.get().has(eI.node.keyText),(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).checked,(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).halfChecked,rF.value.includes(eI.node.keyText));(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eH,eF))});let eP=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eW,eP),(0,t.watchEffect)(()=>{let eR=e$.checkable?(0,t.vapor)(()=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("button",eR);(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"key",String(`checkbox-${eI.node.keyText}-${(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).checked?"checked":(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).halfChecked?"mixed":"unchecked"}`))}),(0,t._$setAttribute)(eL,"type","button"),(0,t._$setAttribute)(eL,"role","checkbox"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eL,"aria-checked",String((rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).halfChecked?"mixed":(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).checked?"true":"false"))}),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eL,String(fj(fj(sj("inline-flex size-[1.1rem] shrink-0 items-center justify-center rounded-[0.4rem] border text-[0.75rem] font-semibold shadow-sm transition-all duration-150",(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).checked||(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).halfChecked?"border-primary/95 bg-primary text-primary-content shadow-[0_0_0_1px_rgba(37,99,235,0.22)]":"border-base-content/30 bg-base-100 text-base-content/0 shadow-[0_0_0_1px_rgba(15,23,42,0.06)]",(e$.disabled||eI.node.disabled||eI.node.disableCheckbox||!eI.node.checkable)&&"opacity-45"),e$.classNames?.checkbox),e$.disabled||eI.node.disabled||eI.node.disableCheckbox||!eI.node.checkable?"cursor-not-allowed":"")))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.checkbox;(0,t._$setStyle)(eL,eI)}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eL,e$.disabled||eI.node.disabled||eI.node.disableCheckbox||!eI.node.checkable)}),(0,t._$addEventListener)(eL,"click",e$=>aI(eI.node,e$));let ez=(0,t._$createTextWrapper)(eL);return(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{(0,t._$settextContent)(ez,(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).halfChecked?"−":(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).checked?"✓":"")}),eR}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eR,eW,eP))}),(0,t._$appendChild)(eW,(0,t._$createTextNode)(" "));let eB=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eW,eB),(0,t.watchEffect)(()=>{let e$=aY(eI.node);(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eW,eB))}),(0,t._$appendChild)(eW,(0,t._$createTextNode)(" "));let eK=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eW,eK),(0,t.watchEffect)(()=>{let eR=e$.showIcon||void 0!==eI.node.icon||void 0!==e$.icon?aJ(eI.node,!!rZ.get()||rJ.get().has(eI.node.keyText),rX.get().has(eI.node.keyText),(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).checked,(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).halfChecked,rF.value.includes(eI.node.keyText)):"";(0,t.untrack)(()=>(0,t.renderAnchor)(eR,eW,eK))});let eV=(0,t._$createElement)("button",eW);(0,t._$appendChild)(eW,eV),(0,t._$setAttribute)(eV,"type","button"),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eV,String(fj(fj(sj(`flex min-w-0 flex-1 items-center gap-2 rounded-xl px-2.5 py-1.5 text-left ${t9.get().textClass} transition-colors duration-150`,e$.directoryMode?rX.get().has(eI.node.keyText)?"bg-base-200/85 text-base-content":"text-base-content hover:bg-base-200/70":rX.get().has(eI.node.keyText)?"bg-primary/10 font-semibold text-primary":"text-base-content hover:bg-base-200/70",e$.disabled||eI.node.disabled||!(void 0===e$.selectable||e$.selectable)||!eI.node.selectable?"cursor-not-allowed opacity-55":""),e$.classNames?.label),e$.blockNode?"w-full":"")))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.label;(0,t._$setStyle)(eV,eI)}),(0,t.watchEffect)(()=>{(0,t._$setDisabled)(eV,e$.disabled||eI.node.disabled||!(void 0===e$.selectable||e$.selectable)||!eI.node.selectable)}),(0,t._$addEventListener)(eV,"click",e$=>aQ(eI.node,e$,"click")),(0,t._$addEventListener)(eV,"dblclick",e$=>aQ(eI.node,e$,"doubleClick"));let eq=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eV,eq),(0,t.watchEffect)(()=>{let eR=e$.titleRender?(0,t.vapor)(()=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL),(0,t._$setClassName)(eL,"min-w-0 flex-1");let ez=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eL,ez),(0,t.renderAnchor)((0,t._$createComponent)(aj,{render:()=>e$.titleRender({node:eI.node,expanded:!!rZ.get()||rJ.get().has(eI.node.keyText),selected:rX.get().has(eI.node.keyText),checked:(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).checked,halfChecked:(rQ.get().stateMap[eI.node.keyText]??{checked:!1,halfChecked:!1,participates:!0}).halfChecked,loading:rF.value.includes(eI.node.keyText)})}),eL,ez),eR}):(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("span",e$);(0,t._$appendChild)(e$,eR),(0,t._$setClassName)(eR,"min-w-0 flex-1 truncate");let eL=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let e$=eI.node.title;(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eR,eL))}),e$});(0,t.untrack)(()=>(0,t.renderAnchor)(eR,eV,eq))}),(0,t._$appendChild)(eV,(0,t._$createTextNode)(" "));let eU=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eV,eU),(0,t.watchEffect)(()=>{let e$=rV.value.overKeyText===eI.node.keyText&&Oj(rV.value.dropPosition)?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("span",e$);(0,t._$appendChild)(e$,eR),(0,t._$setClassName)(eR,"badge badge-primary badge-xs"),(0,t.watchEffect)(()=>{(0,t._$setAttribute)(eR,"data-rue-tree-drop-placeholder",String(rV.value.overKeyText===eI.node.keyText?Oj(rV.value.dropPosition):void 0))});let eL=(0,t._$createTextWrapper)(eR);return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{(0,t._$settextContent)(eL,(rV.value.overKeyText===eI.node.keyText?Oj(rV.value.dropPosition):void 0)==="inside"?"放入":(rV.value.overKeyText===eI.node.keyText?Oj(rV.value.dropPosition):void 0)==="before"?"插前":"插后")}),e$}):rX.get().has(eI.node.keyText)?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("span",e$);return(0,t._$appendChild)(e$,eI),(0,t._$setClassName)(eI,"badge badge-primary badge-outline badge-xs"),(0,t._$appendChild)(eI,(0,t._$createTextNode)("选中")),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eV,eU))});let eG=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eL,eG),(0,t.watchEffect)(()=>{let e$=(rV.value.overKeyText===eI.node.keyText?Oj(rV.value.dropPosition):void 0)==="after"?aX(eI.node,"after"):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eL,eG))}),eR}),eR,eL)}})}),(0,t._$appendChild)(eW,(0,t._$createTextNode)(" "));let eV=(0,t._$createComment)("rue:slot:anchor");(0,t._$appendChild)(eW,eV),(0,t.watchEffect)(()=>{let e$=r3.get().bottomSpacer>0?(0,t.vapor)(()=>{let e$=(0,t._$createDocumentFragment)(),eI=(0,t._$createElement)("div",e$);return(0,t._$appendChild)(e$,eI),(0,t.watchEffect)(()=>{(0,t._$setStyle)(eI,{height:`${r3.get().bottomSpacer}px`})}),(0,t._$setAttribute)(eI,"aria-hidden","true"),e$}):"";(0,t.untrack)(()=>(0,t.renderAnchor)(e$,eW,eV))}),(0,t._$appendChild)(eW,(0,t._$createTextNode)(" "));let eq=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eW,eq),(0,t.watchEffect)(()=>{let eI=r0.get().length?"":(0,t.vapor)(()=>{let eI=(0,t._$createDocumentFragment)(),eR=(0,t._$createElement)("div",eI);(0,t._$appendChild)(eI,eR),(0,t.watchEffect)(()=>{(0,t._$setClassName)(eR,String(fj("grid min-h-40 place-items-center rounded-2xl border border-dashed border-base-300/70 bg-base-100/50 px-6 py-8 text-center text-sm text-base-content/55",e$.classNames?.empty)))}),(0,t.watchEffect)(()=>{let eI=e$.styles?.empty;(0,t._$setStyle)(eR,eI)});let eL=(0,t._$createElement)("div",eR);(0,t._$appendChild)(eR,eL);let ez=(0,t._$createComment)("rue:slot:anchor");return(0,t._$appendChild)(eL,ez),(0,t.watchEffect)(()=>{let eI=void 0===e$.emptyText?"暂无节点":e$.emptyText;(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eL,ez))}),eI});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eW,eq))}),(0,t._$appendChild)(eW,(0,t._$createTextNode)(" ")),eR})},zj=e$=>{let{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,rest:eW}=(0,t._$vaporWithHookId)("useSetup:0:0:dup3",()=>(0,t.useSetup)(()=>{let{className:eI,showIcon:eR,blockNode:eL,expandAction:ez,...eW}=e$;return{__rue_rest_omit_0:eI,__rue_rest_omit_1:eR,__rue_rest_omit_2:eL,__rue_rest_omit_3:ez,rest:eW}}));return(0,t.vapor)(eI=>{let eR=(0,t._$createDocumentFragment)(),eL=(0,t._$createComment)("rue:component:anchor");return(0,t._$appendChild)(eR,eL),(0,t.watchEffect)(()=>{let eI=(0,t._$createComponent)(Rj,{...eW,className:fj("rue-directory-tree",e$.className),showIcon:void 0===e$.showIcon||e$.showIcon,blockNode:void 0===e$.blockNode||e$.blockNode,directoryMode:!0,expandAction:void 0===e$.expandAction?"click":e$.expandAction});(0,t.untrack)(()=>(0,t.renderAnchor)(eI,eR,eL))}),eR})},Bj=Rj;Bj.DirectoryTree=zj;var Vj="SHOW_ALL",Hj="SHOW_PARENT",Uj="SHOW_CHILD",Wj={xs:"input-xs",sm:"input-sm",md:"",lg:"input-lg",xl:"input-xl",small:"input-sm",medium:"",middle:"",large:"input-lg"},Gj={label:"title",value:"value",children:"children",key:"key",disabled:"disabled",selectable:"selectable",checkable:"checkable",disableCheckbox:"disableCheckbox",isLeaf:"isLeaf",className:"className",icon:"icon",id:"id",pId:"pId"},Kj=(...e$)=>e$.filter(Boolean).join(" "),qj=e$=>"object"==typeof e$&&!!e$&&!Array.isArray(e$),Jj=e$=>"string"==typeof e$||"number"==typeof e$,Yj=e$=>null==e$?[]:Array.isArray(e$)?e$:[e$],Xj=e$=>`${typeof e$}:${String(e$)}`,Zj=e$=>Jj(e$)?e$:qj(e$)&&Jj(e$.value)?e$.value:void 0,Qj=e$=>Yj(e$).flatMap(e$=>{let eI=Zj(e$);return void 0===eI?[]:[eI]}),$j=(e$,eI,eR)=>e$[eR?.[eI]??Gj[eI]],eM=(e$,eI)=>$j(e$,"label",eI)??e$.title??e$.label??$j(e$,"value",eI)??$j(e$,"key",eI),tM=e$=>"string"==typeof e$||"number"==typeof e$?String(e$):"",nM=(e$,eI,eR)=>{if(!eI)return e$;let eL=qj(eI)?eI:void 0,ez=eL?.id??eR?.id??Gj.id,eW=eL?.pId??eR?.pId??Gj.pId,eH=eL?.rootPId??0,eF=eR?.children??Gj.children,eP=new Map;e$.forEach((e$,eI)=>{let eR=e$[ez]??e$.value??e$.key??eI;eP.set(eR,{...e$,[eF]:[]})});let eB=[];return e$.forEach((e$,eI)=>{let eR=e$[ez]??e$.value??e$.key??eI,eL=e$[eW],eK=eP.get(eR);if(!eK)return;if(null==eL||eL===eH||!eP.has(eL))return void eB.push(eK);let eV=eP.get(eL);if(!eV)return void eB.push(eK);let eq=eV[eF]??[];eq.push(eK),eV[eF]=eq}),eB},rM=(e$,eI)=>{let eR=[],eL={},ez=(e$,eW,eH,eF)=>{let eP=$j(e$,"children",eI),eB=$j(e$,"value",eI),eK=$j(e$,"key",eI),eV=$j(e$,"isLeaf",eI),eq=Jj(eB)?eB:Jj(eK)?eK:eH,eU=eM(e$,eI),eG=Xj(eq),eZ=Array.isArray(eP)?eP.map((e$,eI)=>ez(e$,eW+1,`${eH}-${eI}`,eG)):[],eY={key:String(eK??eq),value:eq,valueKey:eG,label:eU,labelText:tM(eU),depth:eW,parentValueKey:eF,children:eZ,raw:e$,disabled:!!$j(e$,"disabled",eI),selectable:!1!==$j(e$,"selectable",eI),checkable:!1!==$j(e$,"checkable",eI),disableCheckbox:!!$j(e$,"disableCheckbox",eI),isLeaf:!0===eV||!1!==eV&&0===eZ.length,className:$j(e$,"className",eI),icon:$j(e$,"icon",eI)};return eR.push(eY),eL[eG]=eY,eY};return{roots:e$.map((e$,eI)=>ez(e$,0,`node-${eI}`)),flat:eR,byValueKey:eL}},iM=e$=>{let eI=[],eR=e$=>{e$.disabled||!e$.checkable||e$.disableCheckbox||eI.push(e$.valueKey),e$.children.forEach(e$=>eR(e$))};return eR(e$),eI},aM=e$=>{let eI=[];return e$.children.forEach(e$=>{iM(e$).forEach(e$=>eI.push(e$))}),eI},oM=(e$,eI,eR)=>{let eL=new Set;return e$.forEach(e$=>{let ez=eI[e$];if(!ez)return;if(eR)return void eL.add(e$);let eW=aM(ez);eW.length>0?eW.forEach(e$=>eL.add(e$)):ez.disabled||!ez.checkable||ez.disableCheckbox||eL.add(e$)}),eL},sM=(e$,eI,eR)=>{let eL=new Set,ez=new Set,eW={},eH=e$=>{let eF=!e$.disabled&&e$.checkable&&!e$.disableCheckbox,eP=e$.children.map(e$=>eH(e$)).filter(e$=>e$.participates),eB=eI.has(e$.valueKey),eK=eB,eV=!1;if(!eR&&eP.length>0){let e$=eP.every(e$=>e$.checked),eI=eP.some(e$=>e$.checked||e$.halfChecked);eV=!(eK=eB||e$)&&eI}let eq={checked:eK,halfChecked:eV,participates:eF||eP.length>0};return eW[e$.valueKey]=eq,eK&&eF&&eL.add(e$.valueKey),eV&&eF&&ez.add(e$.valueKey),eq};return e$.forEach(e$=>eH(e$)),{checkedKeys:eL,halfCheckedKeys:ez,stateMap:eW}},cM=(e$,eI,eR)=>{let eL=[],ez=(e$,eW)=>{let eH=eI[e$.valueKey];if(!eH)return;let eF=e$.children.map(e$=>eI[e$.valueKey]).filter(Boolean).some(e$=>e$.checked||e$.halfChecked),eP=!e$.disabled&&e$.checkable&&!e$.disableCheckbox&&eH.checked;if("SHOW_ALL"===eR){eP&&eL.push(e$),e$.children.forEach(e$=>ez(e$,eW));return}"SHOW_PARENT"===eR?eP&&eF&&!eW||eP&&!eF&&!eW?eL.push(e$):e$.children.forEach(e$=>ez(e$,eW||eP)):eP&&!eF||eP&&0===e$.children.length?eL.push(e$):e$.children.forEach(e$=>ez(e$,eW))};return e$.forEach(e$=>ez(e$,!1)),eL},lM=(e$,eI)=>eI&&void 0!==e$.raw[eI]?e$.raw[eI]:e$.label,uM=(e$,eI,eR)=>({value:e$.value,key:e$.value,label:lM(e$,eR),halfChecked:eI,disabled:e$.disabled}),dM=(e$,eI,eR,eL,ez)=>{let eW=eR?e$.map(e$=>uM(e$,eL.has(e$.valueKey),ez)):e$.map(e$=>e$.value);return eI?eW:eW[0]??null},fM=(e$,eI,eR)=>{let eL=e$.map(e$=>lM(e$,eR));return eI?eL:eL[0]??null},pM=(e$,eI,eR)=>String("title"===eI||"label"===eI?lM(e$,eR)??"":"value"===eI?e$.value:e$.raw[eI]??""),mM=(e$,eI)=>[String(e$.value??""),String(lM(e$,eI)??"")],hM=(e$,eI,eR,eL)=>{if(!eR){let eR=[],eL=e$=>{eR.push({node:e$,matched:!1}),eI.has(e$.valueKey)&&e$.children.forEach(e$=>eL(e$))};return e$.forEach(e$=>eL(e$)),eR}let ez=[],eW=e$=>{let eI=eL(e$),eR=e$.children.flatMap(e$=>eW(e$));if(!eI&&0===eR.length)return[];if(eI){let eI=[{node:e$,matched:!0}];return e$.children.forEach(e$=>{let eR=[],eL=(e$,eI)=>{eR.push({node:e$,matched:eI}),e$.children.forEach(e$=>eL(e$,!1))};eL(e$,!1),eI.push(...eR)}),eI}return[{node:e$,matched:!1},...eR]};return e$.forEach(e$=>{ez.push(...eW(e$))}),ez},gM=(e$,eI)=>{let eR=e$?.[eI];return"string"==typeof eR?eR:qj(eR)&&"string"==typeof eR.root?eR.root:void 0},_M=(e$,eI)=>{let eR=e$?.[eI];return!qj(eR)||"root"in eR?qj(eR?.root)?eR.root:void 0:eR},vM=(e$,eI)=>{let eR="string"==typeof e$||"number"==typeof e$?String(e$):e$;return"string"!=typeof eR||!eI||eR.length<=eI?eR:`${eR.slice(0,eI)}...`},yM=e$=>"string"==typeof e$||"number"==typeof e$?String(e$):null==e$||!1===e$?"":String(e$),bM=(e$,eI)=>{qj(eI)&&Object.assign(e$.style,eI)},xM=()=>r("svg",{viewBox:"0 0 20 20",fill:"none",className:"block h-4 w-4",children:r("path",{d:"M6 6L14 14M14 6L6 14",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round"})}),SM=({value:e$,defaultValue:eI,treeData:eR=[],fieldNames:eL,treeDataSimpleMode:ez,multiple:eW,treeCheckable:eH,treeCheckStrictly:eF,showCheckedStrategy:eP=Uj,labelInValue:eB,showSearch:eK,searchValue:eV,filterTreeNode:eq,treeNodeFilterProp:eU,placeholder:eG,allowClear:eZ,clearLabel:eY="清空选择",notFoundContent:eX,disabled:eJ,loading:eQ,open:e0,defaultOpen:e1,onOpenChange:e2,treeDefaultExpandAll:e5,treeDefaultExpandedKeys:e3,treeExpandedKeys:e4,treeLoadedKeys:e6,onTreeExpand:e8,loadData:e7,maxCount:e9,maxTagCount:t$,maxTagPlaceholder:tI,maxTagTextLength:tR,listHeight:tL=320,placement:tz="bottomLeft",popupMatchSelectWidth:tW=!0,size:tH="md",status:tF,variant:tP="outlined",prefix:tB,suffix:tK,suffixIcon:tV,showArrow:tq=!0,switcherIcon:tU,treeTitleRender:tG,treeNodeLabelProp:tZ="title",treeLine:tY,onSearch:tX,onChange:tJ,onSelect:tQ,onDeselect:t0,onClear:t1,onPopupScroll:t2,className:t5,style:t3,selectorClassName:t4,selectorStyle:t6,popupClassName:t8,popupStyle:t7,dropdownClassName:t9,dropdownStyle:r$,classNames:rI,styles:rR,tagRender:rL,children:rz,...rW})=>{let rH=(0,e.useRef)(),rF=(0,e.useRef)(),rP=(0,e.useRef)(),rB=(0,e.useRef)(),rK=(0,e.useRef)(),rV=(0,e.useRef)(),rq=(0,e.useRef)(),rU=(0,e.useRef)(),rG=(0,e.ref)(0),rZ=(0,e.ref)(eI??(eH||eW?[]:null)),rY=(0,e.ref)(!!e1),rX=rM(nM(eR,ez,eL),eL),rJ=(0,e.ref)(e5?rX.flat.filter(e$=>e$.children.length>0).map(e$=>e$.value):e3??[]),rQ=(0,e.ref)([]),r0=(0,e.ref)(""),r1=(0,e.ref)([]),r2=(0,e.ref)(0),r5=qj(eK)?eK:void 0,r3=rM(nM(eR,ez,eL),eL),r4=(0,e.useRef)();r4.current=r3;let r6=!!eW||!!eH,r8=!!eB||!!eF,r7=!!eJ||!!eQ,r9=qj(eZ)?eZ:eZ?{}:null,a$="boolean"==typeof eK?eK:void 0!==eK||r6,aI=gM(rI,"selector"),aR=_M(rR,"selector"),aL=gM(rI,"popup"),az=_M(rR,"popup"),aW=gM(rI,"tree"),aH=_M(rR,"tree"),aF=gM(rI,"search"),aP=_M(rR,"search"),aB=gM(rI,"tag"),aK=_M(rR,"tag"),aV=gM(rI,"root"),aq=_M(rR,"root"),aU=()=>{let e$=rM(nM(eR,ez,eL),eL);return r4.current=e$,e$},aG=()=>r5?.searchValue??eV??(a$?r0.value:""),aZ=()=>new Set(Qj(e4??rJ.value).map(Xj)),aY=()=>Qj(e6??rQ.value),aX=()=>{let eI=r4.current??r3,eR=Qj(void 0===e$?rZ.value:e$).map(Xj),eL=new Set(eR),ez=eH?oM(eR,eI.byValueKey,!!eF):eL,eW=eH?sM(eI.roots,ez,!!eF):{checkedKeys:eL,halfCheckedKeys:new Set,stateMap:Object.fromEntries(eI.flat.map(e$=>[e$.valueKey,{checked:eL.has(e$.valueKey),halfChecked:!1,participates:!0}]))},eB=eH?cM(eI.roots,eW.stateMap,eP):eR.map(e$=>eI.byValueKey[e$]).filter(Boolean);return{currentValueKeys:eR,currentValueKeySet:eL,derivedCheckState:eW,displayNodes:eB,displayNodeKeySet:new Set(eB.map(e$=>e$.valueKey))}},aJ=r5?.treeNodeFilterProp??eU,aQ=r5?.filterTreeNode??eq??!0,a0="number"==typeof t$&&t$>=0?Math.max(0,t$):void 0,a1=()=>{rG.value+=1},a2=()=>{let e$,eI;(e$=rF.current)&&e$.setAttribute("aria-expanded",e0??rY.value?"true":"false"),(()=>{let e$=rq.current;if(!e$)return;let eI=e0??rY.value;e$.hidden=!eI,e$.setAttribute("aria-hidden",eI?"false":"true")})(),(eI=rP.current)&&eI.classList.toggle("rotate-180",e0??rY.value)},a5=(e$,eI)=>{let eR=new Set(e$.map(e$=>e$.valueKey));return{currentValueKeySet:eR,derivedCheckState:eI??{checkedKeys:eR,halfCheckedKeys:new Set,stateMap:Object.fromEntries((r4.current??r3).flat.map(e$=>[e$.valueKey,{checked:eR.has(e$.valueKey),halfChecked:!1,participates:!0}]))},displayNodes:e$,displayNodeKeySet:new Set(e$.map(e$=>e$.valueKey))}},a3=e$=>{let eI=e$?.length??aX().displayNodes.length;return!!r9&&!r7&&eI>0},a4=()=>{let e$=rU.current;if(!e$)return;let eI=e$.scrollHeight>0||e$.clientHeight>0?Math.max(0,e$.scrollHeight-e$.clientHeight):r2.value,eR=Math.min(r2.value,eI);r2.value=eR,e$.scrollTop!==eR&&(e$.scrollTop=eR)},a6=e$=>{let eI=rV.current;if(!eI)return;let eR=a3(e$);eI.classList.toggle("hidden",!eR),eI.classList.toggle("inline-flex",eR),eI.disabled=!eR},a8=e$=>{let eI=rB.current;if(!eI||typeof document>"u")return;let eR=aX(),eL=e$??eR.displayNodes,ez=eL.length>0,eW=void 0===a0?eL:eL.slice(0,a0),eF=void 0===a0?[]:eL.slice(a0),eP=aG(),eB=e0??rY.value,eK=a$&&(r6||eH||eB||!ez);if(eI.replaceChildren(),eW.forEach(e$=>{let eR=vM(lM(e$,tZ),tR),eL=document.createElement("span");eL.className=Kj("badge badge-outline inline-flex max-w-full items-center gap-1 rounded-md px-2 py-1 text-xs font-medium leading-none",aB),bM(eL,aK);let ez=document.createElement("span");if(ez.className="truncate",ez.textContent=yM(eR),eL.appendChild(ez),!r7){let eI=document.createElement("button");eI.type="button",eI.className="btn btn-ghost btn-xs inline-flex h-4 min-h-0 w-4 shrink-0 items-center justify-center rounded-full p-0 text-center leading-none",eI.setAttribute("aria-label",`移除 ${yM(lM(e$,tZ)??e$.value)}`),eI.textContent="\xd7",eI.addEventListener("click",eI=>{let eR=nL(e$,eI);eR&&(a8(eR.displayNodes),a6(eR.displayNodes),a7(eR),a2())}),eL.appendChild(eI)}eI.appendChild(eL)}),eF.length>0){let e$=document.createElement("span");e$.className="badge badge-ghost inline-flex max-w-full items-center rounded-md px-2 py-1 text-xs leading-none",e$.textContent=yM("function"==typeof tI?tI(eF):tI??`+${eF.length}`),eI.appendChild(e$)}if(eK){let e$=document.createElement("input");e$.value=eP,e$.disabled=r7,e$.placeholder=yM(eG??"请选择"),e$.className=Kj("min-w-[5rem] flex-1 border-0 bg-transparent px-0 py-0 text-sm leading-5 outline-none placeholder:text-base-content/40",aF),bM(e$,aP),e$.addEventListener("click",e$=>e$.stopPropagation()),e$.addEventListener("input",e$=>{n$(!0),nI(e$.target.value,{syncSelector:!1})}),rK.current=e$,eI.appendChild(e$);return}rK.current=void 0;let eV=document.createElement("span");eV.className=!ez||r6||eH?"flex flex-1 items-center truncate text-sm leading-5 text-base-content/40":"flex flex-1 items-center truncate text-sm leading-5",eV.textContent=yM(!ez||r6||eH?eG??"请选择":lM(eL[0],tZ)),eI.appendChild(eV)},a7=e$=>{let eI,eR,eL=rU.current;if(!eL||typeof document>"u")return;let ez=e$??aX(),eW=(eI=r4.current??r3,eR=aG(),hM(eI.roots,aZ(),eR,e$=>((e$,eI)=>{if(!eI)return!0;if("function"==typeof aQ)return aQ(eI,e$);if(!1===aQ)return!0;let eR=eI.toLowerCase();return(aJ?[pM(e$,aJ,tZ)]:mM(e$,tZ)).some(e$=>e$.toLowerCase().includes(eR))})(e$,eR))),eF=aG(),eP=aZ();if(eL.replaceChildren(),!eW.length){let e$=document.createElement("div");e$.className="rounded-md px-3 py-8 text-center text-sm text-base-content/55",e$.textContent=yM(eX??"暂无匹配项"),eL.appendChild(e$),a4();return}eW.forEach(({node:e$,matched:eI})=>{let eR=ez.derivedCheckState.stateMap[e$.valueKey]??{checked:!1,halfChecked:!1,participates:!0},eW=eH?eR.checked:ez.currentValueKeySet.has(e$.valueKey),eB=!!eH&&eR.halfChecked,eK=!!eF||eP.has(e$.valueKey),eV=r1.value.includes(e$.valueKey),eq=!!e7||e$.children.length>0||!e$.isLeaf,eU=document.createElement("div");eU.dataset.rueTreeSelectNode=e$.valueKey,eU.className=Kj("group flex items-center gap-1 rounded-lg py-1.5 pr-2",eI&&"bg-primary/8",tY&&e$.depth>0&&"border-l border-base-300/60",e$.className),eU.style.paddingLeft=`${16*e$.depth+4}px`;let eG=document.createElement("button");if(eG.type="button",eG.className="inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-md hover:bg-base-200 disabled:cursor-not-allowed",eG.disabled=!eq||r7||e$.disabled,eG.setAttribute("aria-label",eK?"折叠节点":"展开节点"),eG.textContent=eV?"…":eq?eK?"▾":"▸":"",eG.addEventListener("click",eI=>{r2.value=eL.scrollTop,nW(e$,eI),a7(),a2()}),eU.appendChild(eG),eH){let eI=document.createElement("button");eI.type="button",eI.setAttribute("role","checkbox"),eI.setAttribute("aria-checked",eB?"mixed":eR.checked?"true":"false"),eI.disabled=r7||e$.disabled||e$.disableCheckbox||!e$.checkable,eI.className=Kj("inline-flex h-4 w-4 shrink-0 items-center justify-center rounded border transition-colors duration-150",eR.checked||eB?"border-primary bg-primary text-primary-content":"border-base-content/40 bg-base-100 text-base-content/0",(r7||e$.disabled||e$.disableCheckbox||!e$.checkable)&&"opacity-45"),eI.textContent=eB?"−":eR.checked?"✓":"",eI.addEventListener("click",eI=>{r2.value=eL.scrollTop;let eR=nz(e$,eI);eR&&(a8(eR.displayNodes),a6(eR.displayNodes),a7(eR),a2())}),eU.appendChild(eI)}let eZ=document.createElement("button");eZ.type="button",eZ.className=Kj("flex min-w-0 flex-1 items-center gap-1 rounded-md px-1.5 py-1 text-left text-sm transition-colors duration-150",eW?"bg-primary/12 text-primary":"text-base-content hover:bg-base-200/70",(r7||e$.disabled||!e$.selectable)&&"cursor-not-allowed opacity-55"),eZ.disabled=r7||e$.disabled||!e$.selectable,eZ.textContent=yM(tG?tG(e$):lM(e$,tZ)),eZ.addEventListener("click",eI=>{r2.value=eL.scrollTop;let eR=nz(e$,eI);eR&&(a8(eR.displayNodes),a6(eR.displayNodes),a7(eR),a2())}),eU.appendChild(eZ),eL.appendChild(eU)}),a4()},a9=()=>{a8(),a6(),a7(),a2()},n$=(e$,eI)=>{let eR=(e0??rY.value)!==e$;void 0===e0&&rY.value!==e$&&(rY.value=e$,a1()),eR&&a8(eI?.selectionOverride),a2(),eR&&e2&&e2(e$),eR&&e$&&a$&&Promise.resolve().then(()=>{rK.current?.focus()})},nI=(e$,eI)=>{if(r5?.searchValue===void 0&&void 0===eV){if(r0.value===e$)return;r0.value=e$,a1()}eI?.syncSelector===!1?(a6(),a7(),a2()):a9(),r5?.onSearch&&r5.onSearch(e$),tX&&tX(e$)},nR=(eI,eR,eL)=>{var ez,eW;let eF,eP,eB=r4.current??r3,eK=aX(),eV=dM(eI,r6,r8,eL,tZ),eq=fM(eI,r6,tZ);void 0===e$&&(rZ.value=eV,a1()),a8(eI),a6(eI),a7(),a2(),ez=eK.displayNodes,eW={...eR,displayNodes:eI,halfCheckedKeys:Array.from(eL).map(e$=>eB.byValueKey[e$]?.value).filter(Jj)},eF=new Set(ez.map(e$=>e$.valueKey)),eP=new Set(eI.map(e$=>e$.valueKey)),t0&&ez.filter(e$=>!eP.has(e$.valueKey)).forEach(e$=>{t0(r8?uM(e$,eL.has(e$.valueKey),tZ):e$.value,e$,{...eW,selected:!1,checked:!1})}),tQ&&eI.filter(e$=>!eF.has(e$.valueKey)).forEach(e$=>{tQ(r8?uM(e$,eL.has(e$.valueKey),tZ):e$.value,e$,{...eW,selected:!0,checked:!0})}),tJ&&tJ(eV,eq,{...eR,displayNodes:eI,halfCheckedKeys:Array.from(eL).map(e$=>eB.byValueKey[e$]?.value).filter(Jj),checkedNodes:eH?eB.flat.filter(e$=>eI.some(eI=>eI.valueKey===e$.valueKey)):eI})},nL=(e$,eI)=>{eI.preventDefault(),eI.stopPropagation();let eR=aX(),eL=r4.current??r3;if(eH){let eI=oM(eR.currentValueKeys,eL.byValueKey,!!eF);eF?eI.delete(e$.valueKey):iM(e$).forEach(e$=>eI.delete(e$));let ez=sM(eL.roots,eI,!!eF),eW=cM(eL.roots,ez.stateMap,eP);return nR(eW,{triggerNode:e$,triggerValue:e$.value,checked:!1},ez.halfCheckedKeys),a5(eW,ez)}let ez=eR.displayNodes.filter(eI=>eI.valueKey!==e$.valueKey);return nR(ez,{triggerNode:e$,triggerValue:e$.value,selected:!1},new Set),a5(ez)},nz=(e$,eI)=>{if(eI.preventDefault(),eI.stopPropagation(),r7||e$.disabled)return null;let eR=aX(),eL=r4.current??r3;if(eH){let eI=oM(eR.currentValueKeys,eL.byValueKey,!!eF),ez=eR.derivedCheckState.checkedKeys.has(e$.valueKey);if(eF)ez?eI.delete(e$.valueKey):eI.add(e$.valueKey);else{let eR=iM(e$);ez?eR.forEach(e$=>eI.delete(e$)):eR.forEach(e$=>eI.add(e$))}let eW=sM(eL.roots,eI,!!eF),eH=cM(eL.roots,eW.stateMap,eP);return!ez&&e9&&eH.length>e9?null:(nR(eH,{triggerNode:e$,triggerValue:e$.value,checked:!ez,selected:!ez},eW.halfCheckedKeys),(r5?.autoClearSearchValue??!0)&&aG()&&nI(""),n$(!0),a5(eH,eW))}if(r6){let eI=eR.displayNodes.some(eI=>eI.valueKey===e$.valueKey)?eR.displayNodes.filter(eI=>eI.valueKey!==e$.valueKey):[...eR.displayNodes,e$];return!eR.displayNodeKeySet.has(e$.valueKey)&&e9&&eI.length>e9?null:(nR(eI,{triggerNode:e$,triggerValue:e$.value,selected:!eR.displayNodeKeySet.has(e$.valueKey)},new Set),(r5?.autoClearSearchValue??!0)&&aG()&&nI(""),n$(!0),a5(eI))}return nR([e$],{triggerNode:e$,triggerValue:e$.value,selected:!0},new Set),aG()&&nI(""),n$(!1,{selectionOverride:[e$]}),a5([e$])},nW=(e$,eI)=>{var eR;if(eI.preventDefault(),eI.stopPropagation(),r7||e$.disabled||!e7&&0===e$.children.length&&e$.isLeaf)return;let eL=aZ(),ez=aY(),eW=new Set(aY().map(Xj)),eH=aG(),eF=r4.current??r3,eP=new Set(eL),eB=!eL.has(e$.valueKey);eB?eP.add(e$.valueKey):eP.delete(e$.valueKey),eR=Array.from(eP).map(e$=>eF.byValueKey[e$]?.value).filter(Jj),void 0===e4&&(rJ.value=eR,a1()),a7(),e8&&e8(eR),!eB||!e7||eH||eW.has(e$.valueKey)||r1.value.includes(e$.valueKey)||e$.isLeaf||0!==e$.children.length||(r1.value=[...r1.value,e$.valueKey],a1(),a7(),Promise.resolve(e7(e$)).then(()=>{var eI;aU(),eI=Array.from(new Set([...ez,e$.value])),void 0===e6&&(rQ.value=eI,a1()),a7(),a9()}).finally(()=>{r1.value=r1.value.filter(eI=>eI!==e$.valueKey),aU(),a1(),a7()}))};(0,e.onMounted)(()=>{if(typeof document>"u")return;a9();let e$=e$=>{let eI=e$.target;eI&&(rH.current?.contains(eI)||n$(!1))},eI=e$=>{"Escape"===e$.key&&n$(!1)};document.addEventListener("mousedown",e$),document.addEventListener("keydown",eI),(0,e.onUnmounted)(()=>{document.removeEventListener("mousedown",e$),document.removeEventListener("keydown",eI)})}),(0,e.watch)(()=>e$,()=>{a9()}),(0,e.watch)(()=>e0,()=>{a9()}),(0,e.watch)(()=>eV,()=>{a9()}),(0,e.watch)(()=>eR,()=>{aU(),a9()}),(0,e.watch)(()=>e4,()=>{a9()}),(0,e.watch)(()=>e6,()=>{a9()});let nH=Kj("input relative flex w-full items-center gap-2 px-3 text-left transition-shadow duration-150",Wj[tH]??"","error"===tF&&"input-error","warning"===tF&&"input-warning","filled"===tP&&"bg-base-200 border-base-300 shadow-none","borderless"===tP&&"border-transparent bg-transparent px-0 shadow-none","underlined"===tP&&"rounded-none border-x-0 border-t-0 bg-transparent px-0 shadow-none",r7?"cursor-not-allowed opacity-60":"cursor-pointer",aI,t4),nF=Kj("absolute z-40 overflow-hidden rounded-box border border-base-300 bg-base-100 shadow-[0_24px_70px_-36px_rgba(15,23,42,0.45)]",tz.startsWith("top")?"bottom-full mb-2":"top-full mt-2",tz.endsWith("Right")?"right-0":"left-0",aL,t8,t9),nP=!1===tW?{minWidth:"18rem"}:"number"==typeof tW?{width:`${tW}px`}:{minWidth:"100%"},nB=r9?.clearIcon??r(xM,{});return i("div",{...rW,ref:rH,"data-rue-tree-select-root":"true","data-rue-tree-select-version":String(rG.value),className:Kj("relative",aV,t5),style:{...aq,...t3},onMouseDown:e$=>{r7&&e$.preventDefault()},children:[i("div",{"data-rue-tree-select-selector":"true",ref:rF,className:nH,style:{...aR,...t6},role:"combobox","aria-expanded":(rG.value,e0??rY.value),"aria-disabled":r7,"aria-haspopup":"tree",onClick:()=>{r7||n$(!(e0??rY.value))},children:[void 0===tB?null:r("span",{className:"flex shrink-0 items-center text-base-content/65",children:tB}),r("div",{ref:rB,className:"flex min-w-0 flex-1 flex-wrap items-center gap-1.5 self-stretch py-1"}),r("button",{ref:rV,type:"button",className:Kj("btn btn-ghost btn-xs btn-circle h-7 min-h-0 w-7 shrink-0 items-center justify-center self-center p-0 leading-none text-base-content/55 hover:text-base-content",(rG.value,a3()?"inline-flex":"hidden")),"aria-label":eY,disabled:(rG.value,!a3()),onClick:e$=>{e$.preventDefault(),e$.stopPropagation(),t1&&t1(e$),aG()&&nI(""),nR([],{clear:!0,selected:!1,checked:!1,triggerNode:null,triggerValue:null},new Set);let eI=a5([]);a8(eI.displayNodes),a6(eI.displayNodes),a7(eI),a2()},children:nB}),void 0===tK?null:r("span",{className:"flex shrink-0 items-center text-base-content/65",children:tK}),tq?r("span",{className:"flex shrink-0 items-center",children:tV??r("span",{ref:rP,"data-rue-tree-select-arrow":"true","aria-hidden":"true",className:Kj("inline-flex h-4 w-4 items-center justify-center text-base-content/55 transition-transform duration-150",(rG.value,(e0??rY.value)&&"rotate-180")),children:r("svg",{viewBox:"0 0 20 20",fill:"none",className:"h-4 w-4",children:r("path",{d:"M5.5 7.5L10 12.5L14.5 7.5",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round"})})})}):null]}),r("div",{ref:rq,"data-rue-tree-select-popup":"true","aria-hidden":(rG.value,e0??rY.value?"false":"true"),className:nF,style:{...nP,...az,...t7,...r$},children:r("div",{ref:rU,role:"tree",className:Kj("overflow-auto p-2",aW),style:{maxHeight:`${tL}px`,...aH},onScroll:e$=>{r2.value=e$.target.scrollTop,t2&&t2(e$)}})}),rz]})};SM.SHOW_ALL=Vj,SM.SHOW_PARENT=Hj,SM.SHOW_CHILD=Uj;var CM=100,wM=100,TM=9,EM=1,DM="rgba(15, 23, 42, 0.14)",OM='ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',kM=120,AM=64,jM=32,MM=24,NM=(...e$)=>e$.filter(Boolean).join(" "),PM=(e$,eI)=>{"function"==typeof e$?e$(eI):e$&&"object"==typeof e$&&"current"in e$&&(e$.current=eI??void 0)},FM=e$=>e$.startsWith("--")?e$:e$.replace(/[A-Z]/g,e$=>`-${e$.toLowerCase()}`),IM=e$=>Object.entries(e$).filter(([,e$])=>void 0!==e$).map(([e$,eI])=>`${FM(e$)}: ${String(eI)}`).join("; "),LM=(e$,eI)=>{let eR=IM(e$);if(!eI)return eR;if("string"==typeof eI)return eR?`${eR}; ${eI}`:eI;let eL=IM(eI);return eR?eL?`${eR}; ${eL}`:eR:eL},RM=(e$,eI,eR)=>Math.min(eR,Math.max(eI,e$)),zM=e$=>e$.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),BM=e$=>{if("number"==typeof e$&&Number.isFinite(e$))return e$;if("string"==typeof e$){let eI=Number.parseFloat(e$);if(Number.isFinite(eI))return e$.endsWith("rem")?16*eI:eI}return 16},VM=e$=>null==e$?[]:(Array.isArray(e$)?e$:[e$]).flatMap(e$=>String(e$).split(/\r?\n/)),HM=e$=>e$.some(e$=>e$.trim().length>0),UM=(e$,eI,eR,eL,ez)=>{let eW=BM(eI.fontSize),eH=Math.max(Math.round(1.45*eW),eW+6);if(ez)return{markWidth:Math.max(eR??kM,jM),markHeight:Math.max(eL??AM,MM),lineHeight:eH,fontSizePx:eW};if(null!=eR&&null!=eL)return{markWidth:Math.max(eR,jM),markHeight:Math.max(eL,MM),lineHeight:eH,fontSizePx:eW};let eF=eI.fontFamily??OM,eP=eI.fontWeight??"normal",eB=eI.fontStyle&&"none"!==eI.fontStyle?eI.fontStyle:"normal",eK=0;if("u">typeof document){let eI=document.createElement("canvas").getContext("2d");eI&&(eI.font=`${eB} ${eP} ${eW}px ${eF}`,eK=Math.ceil(e$.reduce((e$,eR)=>Math.max(e$,eI.measureText(eR).width),0)))}eK||(eK=Math.ceil(e$.reduce((e$,eI)=>Math.max(e$,eI.length*eW*.62),0)));let eV=Math.ceil(eW+(Math.max(e$.length,1)-1)*eH);return{markWidth:Math.max(eR??eK,jM),markHeight:Math.max(eL??eV,MM),lineHeight:eH,fontSizePx:eW}},WM=e$=>{switch(e$){case"left":case"start":return{anchor:"start",xRatio:0};case"right":case"end":return{anchor:"end",xRatio:1};default:return{anchor:"middle",xRatio:.5}}},GM=(e$,eI,eR)=>{let eL=e$/2,ez=eI/2,eW=eR?.[0]??eL,eH=eR?.[1]??ez,eF=eW-eL,eP=eH-ez,eB="0px",eK="0px",eV="100%",eq="100%";return eF>0&&(eB=`${eF}px`,eV=`calc(100% - ${eF}px)`,eF=0),eP>0&&(eK=`${eP}px`,eq=`calc(100% - ${eP}px)`,eP=0),{left:eB,top:eK,width:eV,height:eq,backgroundPosition:`${eF}px ${eP}px`}},KM=({image:e$,lines:eI,rotate:eR,font:eL,gapX:ez,gapY:eW,dimensions:eH,opacity:eF})=>{let{markWidth:eP,markHeight:eB,lineHeight:eK,fontSizePx:eV}=eH,eq=eP+ez,eU=eB+eW,eG=ez/2,eZ=eW/2,eY=eL.color??DM,eX=eL.fontWeight??"normal",eJ=eL.fontStyle&&"none"!==eL.fontStyle?eL.fontStyle:"normal",eQ=eL.fontFamily??OM,{anchor:e0,xRatio:e1}=WM(eL.textAlign),e2="";if(e$)e2=`<image href="${zM(e$)}" x="${eG}" y="${eZ}" width="${eP}" height="${eB}" preserveAspectRatio="xMidYMid meet" />`;else{let e$=eZ+Math.max((eB-(eV+(Math.max(eI.length,1)-1)*eK))/2,0),eR=eG+eP*e1;e2=eI.map((eI,eL)=>`<text x="${eR}" y="${e$+eL*eK}" fill="${zM(eY)}" font-size="${eV}" font-weight="${zM(String(eX))}" font-style="${zM(eJ)}" font-family="${zM(eQ)}" text-anchor="${e0}" dominant-baseline="hanging">${zM(eI)}</text>`).join("")}let e5=`<svg xmlns="http://www.w3.org/2000/svg" width="${eq}" height="${eU}" viewBox="0 0 ${eq} ${eU}"><g opacity="${eF}" transform="rotate(${eR} ${eG+eP/2} ${eZ+eB/2})">${e2}</g></svg>`;return{url:`url("data:image/svg+xml;charset=UTF-8,${encodeURIComponent(e5)}")`,tileWidth:eq,tileHeight:eU}},qM=({zIndex:e$,rotate:eI=-22,width:eR,height:eL,image:ez,content:eW,font:eH={},className:eF,rootClassName:eP,overlayClassName:eB,style:eK,overlayStyle:eV,gap:eq=[CM,wM],offset:eU,opacity:eG=EM,children:eZ,inherit:eY=!0,...eX})=>{let eJ=eX.ref,eQ=(0,e.useRef)(null),e0=(0,e.useRef)(null);"ref"in eX&&delete eX.ref;let e1=VM(eW),[e2=CM,e5=wM]=eq,e3=!!ez||HM(e1),e4=UM(e1,eH,eR,eL,ez),e6=GM(e2,e5,eU),e8=RM(eG,0,1),e7=e3?KM({image:ez,lines:e1.length?e1:[""],rotate:eI,font:eH,gapX:e2,gapY:e5,dimensions:e4,opacity:e8}):null,e9={position:eK?.position??"relative",overflow:eK?.overflow??"hidden",isolation:eK?.isolation??"isolate"};e7?(e9["--rue-watermark-image"]=e7.url,e9["--rue-watermark-size"]=`${e7.tileWidth}px ${e7.tileHeight}px`,e9["--rue-watermark-position"]=e6.backgroundPosition,e9["--rue-watermark-left"]=e6.left,e9["--rue-watermark-top"]=e6.top,e9["--rue-watermark-width"]=e6.width,e9["--rue-watermark-height"]=e6.height,e9["--rue-watermark-z-index"]=String(e$??TM)):eY||(e9["--rue-watermark-image"]="none",e9["--rue-watermark-size"]="auto",e9["--rue-watermark-position"]="0px 0px",e9["--rue-watermark-left"]="0px",e9["--rue-watermark-top"]="0px",e9["--rue-watermark-width"]="100%",e9["--rue-watermark-height"]="100%",e9["--rue-watermark-z-index"]="0");let t$=LM(e9,eK),tI=LM({position:"absolute",left:e7?e6.left:"var(--rue-watermark-left, 0px)",top:e7?e6.top:"var(--rue-watermark-top, 0px)",width:e7?e6.width:"var(--rue-watermark-width, 100%)",height:e7?e6.height:"var(--rue-watermark-height, 100%)",pointerEvents:"none",backgroundRepeat:"repeat",backgroundImage:e7?e7.url:eY?"var(--rue-watermark-image, none)":"none",backgroundSize:e7?`${e7.tileWidth}px ${e7.tileHeight}px`:eY?"var(--rue-watermark-size, auto)":"auto",backgroundPosition:e7?e6.backgroundPosition:eY?"var(--rue-watermark-position, 0px 0px)":"0px 0px",zIndex:e7?e$??TM:eY?"var(--rue-watermark-z-index, 9)":0},eV),tR=(e$,eI)=>{e$&&(eI?e$.setAttribute("style",eI):e$.removeAttribute("style"))};return(0,e.onMounted)(()=>{tR(eQ.current,t$),tR(e0.current,tI)}),(0,e.watch)(()=>t$,e$=>{tR(eQ.current,e$)},{immediate:!0}),(0,e.watch)(()=>tI,e$=>{tR(e0.current,e$)},{immediate:!0}),i("div",{...eX,ref:e$=>{eQ.current=e$,tR(e$,t$),PM(eJ,e$)},className:NM("rue-watermark",eF,eP),"data-rue-watermark-root":"true","data-rue-watermark-inherit":eY?"true":"false",children:[r("div",{"aria-hidden":"true",ref:e$=>{e0.current=e$,tR(e$,tI)},className:NM("rue-watermark-overlay",eB),"data-rue-watermark-overlay":"true"}),eZ]})},JM=["input","select","textarea","checkbox","toggle"],YM=(...e$)=>e$.filter(Boolean).join(" "),XM=e$=>new Set((e$??"").split(/\s+/).map(e$=>e$.trim()).filter(Boolean)),ZM=e$=>{let eI=XM(e$);return JM.find(e$=>eI.has(e$))},QM=(e$,eI,eR)=>{if(eI)return eI;let eL=ZM(eR);return eL||("select"===e$?"select":"textarea"===e$?"textarea":void 0)},$M=(e$,eI)=>e$||("select"===eI?"select":"textarea"===eI?"textarea":"input"),eN=(e$,eI,eR,eL)=>{let ez=XM(eL);return YM("validator",e$&&!ez.has(e$)?e$:void 0,e$&&eI&&!ez.has(`${e$}-${eI}`)?`${e$}-${eI}`:void 0,e$&&eR&&!ez.has(`${e$}-${eR}`)?`${e$}-${eR}`:void 0,eL)},tN=e$=>Array.isArray(e$)?e$.map((e$,eI)=>r("span",{className:"block",children:e$},`validator-line-${eI}`)):e$,nN=({as:e$,appearance:eI,size:eR,status:eL,className:ez,children:eW,...eH})=>{let eF=QM(e$,eI,ez),eP=$M(e$,eF),eB=eN(eF,eR,eL,ez);return"select"===eP?r("select",{...eH,className:eB,children:eW}):"textarea"===eP?r("textarea",{...eH,className:eB,children:eW}):r("input",{...eH,className:eB})},rN=({as:e$="p",className:eI,children:eR,hideUntilInvalid:eL,lines:ez,...eW})=>r(e$,{...eW,className:YM("validator-hint",eL?"hidden":void 0,eI),children:ez?.length?tN(ez):eR}),iN=(e$,eI)=>YM("fieldset"===e$?"fieldset gap-2":"grid gap-2",eI),aN=Object.assign(nN,{Hint:rN,Field:({fieldAs:e$="fieldset",className:eI,controlClassName:eR,label:eL,labelClassName:ez,hint:eW,hintAs:eH="p",hintClassName:eF,hideHintWhenValid:eP,extra:eB,extraClassName:eK,requiredMark:eV,id:eq,children:eU,...eG})=>{let eZ="string"==typeof eq&&eq.trim()?eq:void 0,eY=eZ&&null!=eW&&null==eG["aria-describedby"]?`${eZ}-hint`:void 0,eX=eG["aria-describedby"]??eY,eJ=eV??!0===eG.required;return i(e$,{className:iN(e$,eI),children:[null==eL?null:i("label",{className:YM("label",ez),for:eZ,children:[r("span",{children:eL}),eJ?r("span",{className:"text-error","aria-hidden":"true",children:"*"}):null]}),r(nN,{...eG,id:eZ,"aria-describedby":eX,className:eR,children:eU}),null==eW?null:r(rN,{id:eY,as:eH,className:eF,hideUntilInvalid:eP,children:tN(eW)}),null==eB?null:r("p",{className:YM("label text-xs opacity-70",eK),children:tN(eB)})]})}});exports.Accordion=S,exports.Affix=Bn,exports.Alert=o,exports.Anchor=On,exports.AutoComplete=G,exports.Avatar=nn,exports.Badge=yo,exports.Breadcrumbs=zf,exports.Button=ie,exports.COLOR_PICKER_MODE_GRADIENT=Ke,exports.COLOR_PICKER_MODE_SINGLE=Ge,exports.Calendar=Be,exports.Card=ue,exports.Carousel=zc,exports.Chat=$c,exports.Checkbox=jm,exports.Collapse=Ql,exports.Color=pt,exports.ColorPicker=Ut,exports.Countdown=fu,exports.Descriptions=Dr,exports.Diff=Lo,exports.Divider=Yn,exports.Dock=qf,exports.DrawerSidebar=bh,exports.Dropdown=Jd,exports.Empty=rs,exports.FORMAT_HEX=He,exports.FORMAT_HSB=We,exports.FORMAT_RGB=Ue,exports.Fab=tg,exports.Fieldset=Um,exports.FileInput=Ol,exports.Filter=xg,exports.Flex=Ir,exports.Footer=Gr,exports.Form=wi,exports.GradientColor=bt,exports.Grid=Qi,exports.Hero=Bg,exports.Hover3D=ss,exports.HoverGallery=vu,exports.Indicator=Xg,exports.Input=S_,exports.InputNumber=G_,exports.Join=ym,exports.Kbd=Nu,exports.Label=mv,exports.Layout=Vp,exports.Link=vp,exports.List=ad,exports.Loading=Av,exports.Mask=Bv,exports.Masonry=Ta,exports.Mentions=fm,exports.Menu=Ad,exports.Message=rA,exports.MockupBrowser=qv,exports.MockupCode=$v,exports.MockupPhone=oy,exports.MockupWindow=my,exports.Modal=Ra,exports.Navbar=Ey,exports.Notification=KA,exports.Pagination=Uy,exports.Popconfirm=AC,exports.Popover=ib,exports.Progress=ZC,exports.QRCode=Yw,exports.RadialProgress=FT,exports.Radio=$T,exports.Range=mE,exports.Rating=LE,exports.Result=pT,exports.Segmented=ax,exports.Select=zb,exports.Skeleton=mD,exports.Space=ED,exports.Splitter=$D,exports.Stack=rO,exports.Stat=Ec,exports.Status=tc,exports.Steps=mO,exports.Swap=yO,exports.Table=Df,exports.Tabs=Ya,exports.TextRotate=Vs,exports.Textarea=o_,exports.ThemeController=zO,exports.TimePicker=nS,exports.Timeline=Os,exports.Toast=Sk,exports.Toggle=ij,exports.Tooltip=Bh,exports.Tour=sC,exports.Transfer=NS,exports.Tree=Bj,exports.TreeSelect=SM,exports.Typography=Ls,exports.Validator=aN,exports.Watermark=qM;
|