@tempots/beatui 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-D_3gKZ6g.js → auth-divider-BIATan1F.js} +3 -3
- package/dist/{auth-divider-itm5-j5G.cjs → auth-divider-CVKfA8Cp.cjs} +1 -1
- package/dist/beatui.css +416 -55
- package/dist/beatui.tailwind.css +416 -55
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +2 -2
- package/dist/deep-merge-B33Qtlmw.cjs +1 -0
- package/dist/{deep-merge-CzZVsVF-.js → deep-merge-BUsrE2v4.js} +130 -130
- package/dist/{duration-input-BrYLC1js.cjs → duration-input-C5il_E0F.cjs} +1 -1
- package/dist/{duration-input-CFu6vq-y.js → duration-input-DoCCrqOG.js} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +6560 -6032
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +107 -107
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +3 -3
- package/dist/{modal-YKqlh4Dk.js → modal-BHlp4QeT.js} +1 -1
- package/dist/{modal-DCxNGrzk.cjs → modal-BmpfNL48.cjs} +1 -1
- package/dist/{notice-Q0A1gIho.cjs → notice-BBnSXYUc.cjs} +1 -1
- package/dist/{notice-Du3tWJTW.js → notice-BXKtBEiC.js} +1 -1
- package/dist/types/components/data/auto-color-badge.d.ts +60 -0
- package/dist/types/components/data/data-table-context.d.ts +9 -1
- package/dist/types/components/data/data-table-row-details.d.ts +21 -0
- package/dist/types/components/data/data-table-types.d.ts +23 -0
- package/dist/types/components/data/index.d.ts +2 -0
- package/dist/types/components/form/control/control.d.ts +5 -5
- package/dist/types/components/form/control/list-control.d.ts +11 -11
- package/dist/types/components/form/fieldset/fieldset.d.ts +60 -0
- package/dist/types/components/form/fieldset/index.d.ts +1 -0
- package/dist/types/components/form/index.d.ts +1 -0
- package/dist/types/components/form/input/combobox-input.d.ts +2 -2
- package/dist/types/components/form/input/combobox-tags-input.d.ts +1 -1
- package/dist/types/components/form/input/date-time-input.d.ts +1 -1
- package/dist/types/components/form/input/dropdown-input.d.ts +2 -2
- package/dist/types/components/form/input/field-layout.d.ts +64 -0
- package/dist/types/components/form/input/{input-wrapper.d.ts → field.d.ts} +23 -14
- package/dist/types/components/form/input/index.d.ts +2 -1
- package/dist/types/components/form/input/multi-select.d.ts +2 -2
- package/dist/types/components/form/input/native-select.d.ts +1 -1
- package/dist/types/components/form/input/range-slider.d.ts +19 -2
- package/dist/types/components/form/input/select-tags-input.d.ts +1 -1
- package/dist/types/components/format/format-bigint.d.ts +64 -0
- package/dist/types/components/format/format-date-time.d.ts +54 -0
- package/dist/types/components/format/format-date.d.ts +82 -0
- package/dist/types/components/format/format-display-name.d.ts +70 -0
- package/dist/types/components/format/format-file-size.d.ts +30 -0
- package/dist/types/components/format/format-list.d.ts +61 -0
- package/dist/types/components/format/format-number.d.ts +88 -0
- package/dist/types/components/format/format-plural.d.ts +96 -0
- package/dist/types/components/format/format-relative-time.d.ts +62 -0
- package/dist/types/components/format/format-time.d.ts +66 -0
- package/dist/types/components/format/index.d.ts +11 -0
- package/dist/types/components/i18n/locale-selector.d.ts +1 -1
- package/dist/types/components/json-schema/controls/composition-shared.d.ts +1 -1
- package/dist/types/components/json-schema/controls/shared-utils.d.ts +3 -3
- package/dist/types/components/json-schema/widgets/string-controls.d.ts +2 -2
- package/dist/types/components/json-schema-display/display-wrapper.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/use-form-CP6nftVl.cjs +2 -0
- package/dist/{use-form-D_TJyZhP.js → use-form-CmQdxpOi.js} +474 -434
- package/dist/{widget-customization-DELy3SMQ.cjs → widget-customization-B0y-eesp.cjs} +1 -1
- package/dist/{widget-customization-BAchyOUo.js → widget-customization-CKbR4Dsg.js} +2 -2
- package/package.json +1 -1
- package/dist/deep-merge-Bydz6jLt.cjs +0 -1
- package/dist/use-form-BvBkVEKi.cjs +0 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var mn=Object.create;var ea=Object.defineProperty;var hn=Object.getOwnPropertyDescriptor;var bn=Object.getOwnPropertyNames;var gn=Object.getPrototypeOf,fn=Object.prototype.hasOwnProperty;var vn=(t,a,n,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of bn(a))!fn.call(t,o)&&o!==n&&ea(t,o,{get:()=>a[o],enumerable:!(r=hn(a,o))||r.enumerable});return t};var yn=(t,a,n)=>(n=t!=null?mn(gn(t)):{},vn(a||!t||!t.__esModule?ea(n,"default",{value:t,enumerable:!0}):n,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),Te=require("@tempots/ui"),_=require("./translations-qefRsdGi.cjs"),he=require("./colors-DPCHjRMj.cjs"),T=require("./index-DFF7Uahh.cjs"),re=require("./use-form-BvBkVEKi.cjs"),Me=require("@tempots/std"),Ne=require("./use-animated-toggle-cKcuItmz.cjs"),nt=require("./theme-DogY9oT1.cjs"),pa=require("./tailwind/preset.cjs.js"),X=require("./widget-customization-DELy3SMQ.cjs"),Pe=require("./session-id-B5lJMzbB.cjs"),$e=require("./modal-DCxNGrzk.cjs"),se=require("./input-container-BkPcNDaZ.cjs"),Q=require("./deep-merge-Bydz6jLt.cjs"),Ee=require("./text-input-D_IxFd0M.cjs"),Ve=require("./menu-B60Q9j3-.cjs"),We=require("./duration-input-BrYLC1js.cjs"),lt=require("./utils-DmEuG3Np.cjs"),Qe=require("./stack-dwLevGa2.cjs"),At=require("./notice-Q0A1gIho.cjs"),kn=require("./link-portal-_tiDFZqh.cjs"),st=require("./toolbar-CnecqhaU.cjs");function _n(t,a=0,n=()=>!0){let r=null,o;const c=e.prop(t.value);return t.on(l=>{o=l,n(l)?r==null&&(r=setTimeout(()=>{r=null,c.set(o)},a)):c.set(l)}),t.onDispose(()=>{r!=null&&clearTimeout(r)}),c}const Bt=async(t,a="")=>{try{const r=await(await fetch(t)).blob(),o=URL.createObjectURL(r),c=document.createElement("a");c.href=o,c.download=a,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(o)}catch{window.open(t,"_blank")}},wn=(t,a,n="application/octet-stream")=>{const r=new Blob([t],{type:n});Bt(URL.createObjectURL(r),a),URL.revokeObjectURL(URL.createObjectURL(r))},Cn=t=>{const a=new AbortController,n=e.prop({type:"progress",value:0});let r=!1;return(async()=>{try{const o=await fetch(t,{signal:a.signal});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const c=o.headers.get("content-length"),l=c?parseInt(c,10):void 0,i=(async()=>{if(l===void 0||isNaN(l))return n.set({type:"undetermined"}),await o.blob();{const m=new Uint8Array(l);if(o.body==null)throw new Error("Response body is null");const h=o.body.getReader();let d=0;for(;;){const{done:b,value:f}=await h.read();if(b)break;m.set(f,d),d+=f.length,n.set({type:"progress",value:Math.min(d/l,1)})}return new Blob([m],{type:o.headers.get("content-type")??void 0})}})(),u=t.split("/").pop()||"download",s=await i,p=new File([s],u,{type:s.type});r=!0,n.set({type:"done",file:p})}catch(o){n.set({type:"error",error:o})}finally{r=!0,n.dispose()}})(),{signal:n,cancel:()=>{r||a.abort()}}},Vn=t=>{Bt(URL.createObjectURL(t),t.name)},kt=["xs","sm","md","lg","xl"];function Sn(t,a=1){const n=kt.indexOf(t);if(n===-1)throw new Error(`Invalid size: ${t}`);const r=Math.min(Math.max(n+a,0),kt.length-1);return kt[r]}const xn={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"xl"};function In(t){const a=t.trim().split(/\s+/);return a.length===1?a[0][0].toUpperCase():(a[0][0]+a[a.length-1][0]).toUpperCase()}function $n(t){const a=_.backgroundValue(t,"solid","light"),n=_.backgroundValue(t,"solid","dark");return[`--avatar-bg: ${a.backgroundColor}`,`--avatar-text: ${a.textColor}`,`--avatar-bg-dark: ${n.backgroundColor}`,`--avatar-text-dark: ${n.textColor}`].join("; ")}function On(t,a,n){const r=["bc-avatar",`bc-avatar--size-${t}`,`bc-avatar--${a}`];return n&&r.push("bc-avatar--bordered"),r.join(" ")}function Tn({src:t,name:a,icon:n,size:r="md",variant:o="circle",color:c="base",bordered:l=!1,borderColor:i},...u){const s=e.Value.map(e.Value.toSignal(r),m=>xn[m??"md"]),p=e.html.span(e.attr.class("bc-avatar__icon"),_.Icon({icon:"mdi:account",size:s}));return e.html.div(e.attr.class(e.computedOf(r,o,l,i)((m,h,d,b)=>On(m??"md",h??"circle",(d??!1)||b!=null))),e.attr.style(e.computedOf(c,i)((m,h)=>{const d=$n(m??"base");if(h==null)return d;const b=he.getColorVar(h,500),f=he.getColorVar(h,400);return`${d}; --avatar-border-color: ${b}; --avatar-border-color-dark: ${f}`})),e.Ensure(t,m=>e.html.img(e.attr.class("bc-avatar__image"),e.attr.src(m),e.attr.alt(a!=null?e.Value.map(a,h=>h??"Avatar"):"Avatar")),()=>e.Ensure(a,m=>e.html.span(e.attr.class("bc-avatar__initials"),m.map(In)),()=>e.Ensure(n,m=>e.html.span(e.attr.class("bc-avatar__icon"),_.Icon({icon:m,size:s})),()=>p))),...u)}const Ge=20,Xe=7,Dn=["January","February","March","April","May","June","July","August","September","October","November","December"],Pn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],En=["Su","Mo","Tu","We","Th","Fr","Sa"];function Fn(t,a){const n=["bc-date-picker",`bc-date-picker--size-${t}`];return a&&n.push("bc-date-picker--disabled"),n.join(" ")}function An(t){const a=_.backgroundValue(t,"solid","light"),n=_.backgroundValue(t,"solid","dark"),r=_.backgroundValue(t,"light","light"),o=_.backgroundValue(t,"light","dark");return[`--cal-selected-bg: ${a.backgroundColor}`,`--cal-selected-text: ${a.textColor}`,`--cal-selected-bg-dark: ${n.backgroundColor}`,`--cal-selected-text-dark: ${n.textColor}`,`--cal-today-bg: ${r.backgroundColor}`,`--cal-today-text: ${r.textColor}`,`--cal-today-bg-dark: ${o.backgroundColor}`,`--cal-today-text-dark: ${o.textColor}`].join("; ")}function ma(t,a,n,r,o,c){const l=t.PlainDate.from({year:a,month:n,day:1}),i=l.daysInMonth,s=(l.dayOfWeek%7-r+Xe)%Xe,p=l.subtract({months:1}),m=p.daysInMonth,h=[],d=(f,g,y)=>{h.push({day:g,date:f,inMonth:y,isToday:f.equals(o),isDisabled:c?.(f)??!1})};for(let f=s-1;f>=0;f--){const g=m-f;d(p.with({day:g}),g,!1)}for(let f=1;f<=i;f++)d(t.PlainDate.from({year:a,month:n,day:f}),f,!0);const b=Xe-h.length%Xe;if(b<Xe){const f=l.add({months:1});for(let g=1;g<=b;g++)d(f.with({day:g}),g,!1)}return h}function ha(t,a,n,r,o){const c=t.Now.plainDateISO(),l=e.prop(a),i=e.prop(n),u=e.prop("days"),s=e.prop(Math.floor(a/Ge)*Ge),p=e.Value.map(o,m=>{const h=[];for(let d=0;d<Xe;d++)h.push(En[(d+m)%Xe]);return h});return{today:c,currentYear:l,currentMonth:i,view:u,yearPageStart:s,shiftedDayNames:p,prevMonth:()=>{if(e.Value.get(r))return;const m=i.value,h=l.value;m===1?(i.set(12),l.set(h-1)):i.set(m-1)},nextMonth:()=>{if(e.Value.get(r))return;const m=i.value,h=l.value;m===12?(i.set(1),l.set(h+1)):i.set(m+1)},prevYear:()=>{e.Value.get(r)||l.update(m=>m-1)},nextYear:()=>{e.Value.get(r)||l.update(m=>m+1)},prevYearPage:()=>{e.Value.get(r)||s.update(m=>m-Ge)},nextYearPage:()=>{e.Value.get(r)||s.update(m=>m+Ge)},switchToMonthsView:()=>{e.Value.get(r)||u.set("months")},switchToYearsView:()=>{if(e.Value.get(r))return;const m=l.value;s.set(Math.floor(m/Ge)*Ge),u.set("years")},selectMonth:m=>{e.Value.get(r)||(i.set(m),u.set("days"))},selectYear:m=>{e.Value.get(r)||(l.set(m),u.set("months"))}}}function ba(t,a,n){const{size:r,disabled:o,color:c,ariaLabel:l}=a,{today:i,currentYear:u,currentMonth:s,view:p,yearPageStart:m,prevMonth:h,nextMonth:d,prevYear:b,nextYear:f,prevYearPage:g,nextYearPage:y,switchToMonthsView:w,switchToYearsView:k,selectMonth:v,selectYear:V}=t;return e.html.div(e.attr.class(e.computedOf(r,o)(Fn)),e.attr.style(e.Value.map(c,An)),e.attr.role("grid"),e.aria.label(l),e.OneOfValue(p,{days:()=>e.html.div(e.attr.class("bc-date-picker__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Previous year"),e.on.click(C=>{C.preventDefault(),b()}),"«"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Previous month"),e.on.click(C=>{C.preventDefault(),h()}),"‹"),e.html.div(e.attr.class("bc-date-picker__title"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__title-btn"),e.attr.disabled(o),e.aria.label("Select month"),e.on.click(C=>{C.preventDefault(),w()}),e.Value.map(s,C=>Dn[C-1])),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__title-btn"),e.attr.disabled(o),e.aria.label("Select year"),e.on.click(C=>{C.preventDefault(),k()}),e.Value.map(u,String))),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Next month"),e.on.click(C=>{C.preventDefault(),d()}),"›"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Next year"),e.on.click(C=>{C.preventDefault(),f()}),"»")),months:()=>e.html.div(e.attr.class("bc-date-picker__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Previous year"),e.on.click(C=>{C.preventDefault(),b()}),"«"),e.html.span(e.attr.class("bc-date-picker__title"),e.Value.map(u,String)),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Next year"),e.on.click(C=>{C.preventDefault(),f()}),"»")),years:()=>e.html.div(e.attr.class("bc-date-picker__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label(`Previous ${Ge} years`),e.on.click(C=>{C.preventDefault(),g()}),"«"),e.html.span(e.attr.class("bc-date-picker__title"),e.Value.map(m,C=>`${C} – ${C+Ge-1}`)),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label(`Next ${Ge} years`),e.on.click(C=>{C.preventDefault(),y()}),"»"))}),e.OneOfValue(p,{days:()=>e.html.div(e.attr.class("bc-date-picker__days-view"),e.html.div(e.attr.class("bc-date-picker__weekdays"),e.ForEach(t.shiftedDayNames,C=>e.html.div(e.attr.class("bc-date-picker__weekday"),C))),n()),months:()=>e.html.div(e.attr.class("bc-date-picker__picker-grid bc-date-picker__picker-grid--months"),...Pn.map((C,S)=>{const D=S+1;return e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(s,u)((B,$)=>{const R=["bc-date-picker__month-cell"];return B===D&&R.push("bc-date-picker__month-cell--current"),i.month===D&&i.year===$&&R.push("bc-date-picker__month-cell--active"),R.join(" ")})),e.attr.disabled(o),e.on.click(B=>{B.preventDefault(),v(D)}),C)})),years:()=>e.html.div(e.attr.class("bc-date-picker__picker-grid bc-date-picker__picker-grid--years"),e.ForEach(e.Value.map(m,C=>{const S=[];for(let D=0;D<Ge;D++)S.push(C+D);return S}),C=>e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(u,C)((S,D)=>{const B=["bc-date-picker__year-cell"];return S===D&&B.push("bc-date-picker__year-cell--current"),i.year===D&&B.push("bc-date-picker__year-cell--active"),B.join(" ")})),e.attr.disabled(o),e.on.click(S=>{S.preventDefault(),V(e.Value.get(C))}),e.Value.map(C,String))))}))}function Bn(t,{value:a=null,onSelect:n,isDateDisabled:r,color:o="primary",size:c="md",disabled:l=!1,weekStartsOn:i=0}){const u=a!=null?e.Value.get(a):null,s=ha(t,u?.year??t.Now.plainDateISO().year,u?.month??t.Now.plainDateISO().month,l,i),p=e.Value.toSignal(i),m=e.computedOf(s.currentYear,s.currentMonth,a,p)((h,d,b,f)=>ma(t,h,d,f,s.today,r).map(g=>({...g,isSelected:b!=null&&g.date.equals(b)})));return ba(s,{size:c,disabled:l,color:o,ariaLabel:"Date picker"},()=>e.html.div(e.attr.class("bc-date-picker__grid"),e.ForEach(m,h=>{const d=h.map(g=>{const y=["bc-date-picker__day"];return g.inMonth||y.push("bc-date-picker__day--outside"),g.isToday&&y.push("bc-date-picker__day--today"),g.isSelected&&y.push("bc-date-picker__day--selected"),g.isDisabled&&y.push("bc-date-picker__day--disabled"),y.join(" ")}),b=h.map(g=>g.isDisabled),f=h.map(g=>String(g.day));return e.html.button(e.attr.type("button"),e.attr.class(d),e.attr.disabled(e.computedOf(b,l)((g,y)=>g||y)),e.on.click(g=>{g.preventDefault();const y=e.Value.get(h);!y.isDisabled&&!e.Value.get(l)&&(y.inMonth||(s.currentYear.set(y.date.year),s.currentMonth.set(y.date.month)),n?.(y.date))}),f)})))}function Mn(t){return Q.WithTemporal(a=>Bn(a,t??{}))}function Ln(t,{value:a=null,onChange:n,isDateDisabled:r,color:o="primary",size:c="md",disabled:l=!1,weekStartsOn:i=0}){const u=a!=null?e.Value.get(a):null,s=ha(t,u?.[0]?.year??t.Now.plainDateISO().year,u?.[0]?.month??t.Now.plainDateISO().month,l,i),p=e.Value.toSignal(i),m=e.prop(null),h=e.prop(null);a!=null&&e.Value.on(a,()=>{m.set(null)});const d=e.computedOf(s.currentYear,s.currentMonth,a,m,h,p)((b,f,g,y,w,k)=>{let v=null,V=null,C=!1;if(y!=null&&w!=null){const S=t.PlainDate.compare(y,w);v=S<=0?y:w,V=S<=0?w:y,C=!0}else g!=null&&(v=g[0],V=g[1]);return ma(t,b,f,k,s.today,r).map(S=>{let D=!1,B=!1,$=!1;return v!=null&&V!=null&&(D=S.date.equals(v),B=S.date.equals(V),$=t.PlainDate.compare(S.date,v)>0&&t.PlainDate.compare(S.date,V)<0),{...S,isRangeStart:D,isRangeEnd:B,isInRange:$,isPreview:C}})});return ba(s,{size:c,disabled:l,color:o,ariaLabel:"Date range picker"},()=>e.html.div(e.attr.class("bc-date-picker__grid"),e.on.mouseleave(()=>{h.set(null)}),e.ForEach(d,b=>{const f=b.map(w=>{const k=["bc-date-picker__day"];return w.inMonth||k.push("bc-date-picker__day--outside"),w.isToday&&k.push("bc-date-picker__day--today"),w.isDisabled&&k.push("bc-date-picker__day--disabled"),w.isRangeStart&&k.push("bc-date-picker__day--range-start"),w.isRangeEnd&&k.push("bc-date-picker__day--range-end"),w.isInRange&&k.push("bc-date-picker__day--in-range"),w.isPreview&&(w.isRangeStart||w.isRangeEnd||w.isInRange)&&k.push("bc-date-picker__day--preview"),k.join(" ")}),g=b.map(w=>w.isDisabled),y=b.map(w=>String(w.day));return e.html.button(e.attr.type("button"),e.attr.class(f),e.attr.disabled(e.computedOf(g,l)((w,k)=>w||k)),e.on.mouseenter(()=>{const w=e.Value.get(b);!w.isDisabled&&!e.Value.get(l)&&h.set(w.date)}),e.on.click(w=>{w.preventDefault();const k=e.Value.get(b);if(k.isDisabled||e.Value.get(l))return;k.inMonth||(s.currentYear.set(k.date.year),s.currentMonth.set(k.date.month));const v=m.value;if(v==null)m.set(k.date);else{const C=t.PlainDate.compare(v,k.date)<=0?[v,k.date]:[k.date,v];m.set(null),h.set(null),n?.(C)}}),y)})))}function Nn(t){return Q.WithTemporal(a=>Ln(a,t??{}))}function Wn(t){const a=_.backgroundValue(t,"solid","light"),n=_.backgroundValue(t,"solid","dark");return[`--avatar-bg: ${a.backgroundColor}`,`--avatar-text: ${a.textColor}`,`--avatar-bg-dark: ${n.backgroundColor}`,`--avatar-text-dark: ${n.textColor}`].join("; ")}function Un({size:t="md",spacing:a="tight"},...n){return e.html.div(e.attr.class(e.computedOf(t,a)((r,o)=>["bc-avatar-group",`bc-avatar-group--size-${r??"md"}`,`bc-avatar-group--spacing-${o??"tight"}`].join(" "))),...n)}function Rn({count:t,size:a="md",color:n="base"}){return e.html.div(e.attr.class(e.Value.map(a,r=>["bc-avatar",`bc-avatar--size-${r??"md"}`,"bc-avatar--circle","bc-avatar-group__overflow"].join(" "))),e.attr.style(e.Value.map(n,r=>Wn(r??"base"))),e.html.span(e.attr.class("bc-avatar__initials"),e.Value.map(t,r=>`+${r??0}`)))}function ga(t,a,n,r,o){const c=["bc-badge",`bc-badge--size-${t}`,`bc-control--rounded-${a}`];return n&&c.push("bc-badge--circle"),r&&c.push("bc-badge--full-width"),o&&c.push("bc-badge--disabled"),c.join(" ")}function fa(t,a){const n=new Map,r=(o,c,l,i)=>{n.set("--badge-bg-hover",o),n.set("--badge-text-hover",l),n.set("--badge-bg-hover-dark",c),n.set("--badge-text-hover-dark",i)};switch(t){case"filled":{const o=_.backgroundValue(a,"solid","light"),c=_.backgroundValue(a,"solid","dark"),l=_.hoverBackgroundValue(a,"soft","light"),i=_.hoverBackgroundValue(a,"soft","dark");n.set("--badge-bg",o.backgroundColor),n.set("--badge-text",o.textColor),n.set("--badge-bg-dark",c.backgroundColor),n.set("--badge-text-dark",c.textColor),n.set("--badge-border","transparent"),n.set("--badge-border-dark","transparent"),r(l.backgroundColor,i.backgroundColor,l.textColor,i.textColor);break}case"light":{const o=_.backgroundValue(a,"light","light"),c=_.backgroundValue(a,"light","dark"),l=_.hoverBackgroundValue(a,"light","light"),i=_.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg",o.backgroundColor),n.set("--badge-text",o.textColor),n.set("--badge-bg-dark",c.backgroundColor),n.set("--badge-text-dark",c.textColor),n.set("--badge-border","transparent"),n.set("--badge-border-dark","transparent"),r(l.backgroundColor,i.backgroundColor,l.textColor,i.textColor);break}case"outline":{const o=_.textColorValue(a,"light"),c=_.textColorValue(a,"dark"),l=_.borderColorValue(a,"light"),i=_.borderColorValue(a,"dark"),u=_.hoverBackgroundValue(a,"light","light"),s=_.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg","transparent"),n.set("--badge-text",o),n.set("--badge-bg-dark","transparent"),n.set("--badge-text-dark",c),n.set("--badge-border",l),n.set("--badge-border-dark",i),r(u.backgroundColor,s.backgroundColor,u.textColor,s.textColor);break}case"default":{const o=_.textColorValue(a,"light"),c=_.textColorValue(a,"dark"),l=_.hoverBackgroundValue(a,"light","light"),i=_.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg","var(--bg-background-light)"),n.set("--badge-text",o),n.set("--badge-bg-dark","var(--bg-background-dark)"),n.set("--badge-text-dark",c),n.set("--badge-border","var(--border-border-light)"),n.set("--badge-border-dark","var(--border-border-dark)"),r(l.backgroundColor,i.backgroundColor,l.textColor,i.textColor);break}case"dashed":{const o=_.textColorValue(a,"light"),c=_.textColorValue(a,"dark"),l=_.borderColorValue(a,"light"),i=_.borderColorValue(a,"dark"),u=_.hoverBackgroundValue(a,"light","light"),s=_.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg","transparent"),n.set("--badge-text",o),n.set("--badge-bg-dark","transparent"),n.set("--badge-text-dark",c),n.set("--badge-border",l),n.set("--badge-border-dark",i),n.set("--badge-border-style","dashed"),r(u.backgroundColor,s.backgroundColor,u.textColor,s.textColor);break}case"subtle":{const o=_.textColorValue(a,"light"),c=_.textColorValue(a,"dark"),l=_.hoverBackgroundValue(a,"light","light"),i=_.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg","transparent"),n.set("--badge-text",o),n.set("--badge-bg-dark","transparent"),n.set("--badge-text-dark",c),n.set("--badge-border","transparent"),n.set("--badge-border-dark","transparent"),r(l.backgroundColor,i.backgroundColor,l.textColor,i.textColor);break}case"text":{const o=_.textColorValue(a,"light"),c=_.textColorValue(a,"dark"),l=_.hoverBackgroundValue(a,"light","light"),i=_.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg","transparent"),n.set("--badge-text",o),n.set("--badge-bg-dark","transparent"),n.set("--badge-text-dark",c),n.set("--badge-border","transparent"),n.set("--badge-border-dark","transparent"),r(l.backgroundColor,i.backgroundColor,l.textColor,i.textColor);break}}return Array.from(n.entries()).map(([o,c])=>`${o}: ${c}`).join("; ")}function Je({variant:t="filled",size:a="md",color:n="base",roundedness:r="full",circle:o=!1,fullWidth:c=!1,onClose:l,disabled:i=!1},...u){return e.html.span(e.attr.class(e.computedOf(a,r,o,c,i)((s,p,m,h,d)=>ga(s??"md",p??"sm",m??!1,h??!1,d??!1))),e.attr.style(e.computedOf(t,n)((s,p)=>fa(s??"filled",p??"base"))),e.html.span(e.attr.class("bc-badge__content"),...u),l!=null?e.Use(_.BeatUII18n,s=>e.html.button(e.attr.class("bc-badge__close"),e.attr.type("button"),e.attr.disabled(i),e.aria.label(s.$.removeItem),e.on.click(p=>{p.stopPropagation(),l()}),"×")):e.Empty)}function zn(t){const{entries:a,filters:n}=t,r=e.prop("all"),o=e.computedOf(a,r)((i,u)=>u==="all"?i:i.filter(s=>{const p=s.action.toLowerCase();switch(u){case"deletions":return p.includes("delet");case"edits":return p.includes("edit");case"schema":return p.includes("schema");case"restorable":return s.restorable===!0;default:return!0}})),l=n??[{value:"all",label:"All"},{value:"deletions",label:"Deletions"},{value:"edits",label:"Edits"},{value:"schema",label:"Schema changes"},{value:"restorable",label:"Restorable"}];return e.html.div(e.attr.class("bc-history-timeline"),e.html.div(e.attr.class("bc-history-timeline__filters"),...l.map(i=>e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(r)(u=>u===i.value?"bc-history-timeline__filter bc-history-timeline__filter--active":"bc-history-timeline__filter")),e.on.click(()=>r.set(i.value)),i.label))),e.html.div(e.attr.class("bc-history-timeline__list"),e.ForEach(o,i=>e.html.div(e.attr.class("bc-history-timeline__entry"),e.html.div(e.attr.class("bc-history-timeline__line"),e.html.div(e.attr.class("bc-history-timeline__dot"),e.attr.style(i.map(u=>`background: ${u.actionColor}`)))),e.html.div(e.attr.class("bc-history-timeline__content"),e.html.div(e.attr.class("bc-history-timeline__content-header"),e.html.span(e.attr.class("bc-history-timeline__action"),e.attr.style(i.map(u=>`color: ${u.actionColor}`)),i.$.action),e.html.span(e.attr.class("bc-history-timeline__time"),i.$.time)),e.html.div(e.attr.class("bc-history-timeline__target"),_.Icon({icon:i.$.targetIcon,size:"xs"}),e.html.span(i.$.target)),e.html.div(e.attr.class("bc-history-timeline__detail"),i.$.detail),e.html.div(e.attr.class("bc-history-timeline__footer"),e.html.div(e.attr.class("bc-history-timeline__actor"),e.html.div(e.attr.class("bc-history-timeline__avatar"),i.$.actor.$.initials),e.html.span(i.$.actor.$.name)),e.When(i.map(u=>u.restorable===!0&&u.onRestore!=null),()=>se.Button({variant:"outline",size:"xs",onClick:()=>i.value.onRestore?.()},_.Icon({icon:"lucide:rotate-ccw",size:"xs"}),"Restore")))))),e.When(e.computedOf(o)(i=>i.length===0),()=>e.html.div(e.attr.class("bc-history-timeline__empty"),"No matching history entries"))))}function Hn(t,a,n){const r=["bc-indicator__badge",`bc-indicator--${t}`,`bc-indicator--size-${a}`];return n?r.push("bc-indicator--dot"):r.push("bc-indicator--count"),r.join(" ")}function jn(t){const a=_.backgroundValue(t,"solid","light"),n=_.backgroundValue(t,"solid","dark");return[`--indicator-bg: ${a.backgroundColor}`,`--indicator-text: ${a.textColor}`,`--indicator-bg-dark: ${n.backgroundColor}`,`--indicator-text-dark: ${n.textColor}`].join("; ")}function qn({show:t=!0,count:a,maxCount:n=9,color:r="danger",placement:o="top-right",size:c="sm"},...l){const i=e.computedOf(t,a??0)((p,m)=>(p??!0)||m>0),u=e.computedOf(a??0)(p=>p<=0),s=e.computedOf(a??0,n)((p,m)=>p<=0?"":p>(m??9)?`${m??9}+`:String(p));return e.html.span(e.attr.class("bc-indicator"),...l,e.When(i,()=>e.html.span(e.attr.class(e.computedOf(o,c,u)((p,m,h)=>Hn(p??"top-right",m??"sm",h??!0))),e.attr.style(e.computedOf(r)(p=>jn(p??"danger"))),s)))}function Gn({onChange:t,accept:a="*/*",onDragContent:n,content:r,onInvalidSelection:o,disabled:c=!1}){const l=e.prop(!1),i=e.prop([]);let u=null,s=0;const p=k=>k.dataTransfer?.types.includes("Files")??!1,m=(k,v)=>v==="*/*"?!0:v.split(",").map(C=>C.trim()).some(C=>{if(C==="*/*")return!0;if(C.endsWith("/*")){const S=C.slice(0,-2);return k.type.startsWith(S+"/")}return k.type===C||k.name.endsWith(C)}),h=k=>{e.Value.get(c)||p(k)&&(k.preventDefault(),k.stopPropagation(),s++,s===1&&(l.value=!0))},d=k=>{e.Value.get(c)||p(k)&&(k.preventDefault(),k.stopPropagation(),k.dataTransfer!=null&&(k.dataTransfer.dropEffect="copy"))},b=k=>{e.Value.get(c)||p(k)&&(k.preventDefault(),k.stopPropagation(),s--,s===0&&(l.value=!1))},f=k=>{if(e.Value.get(c)||!p(k))return;k.preventDefault(),k.stopPropagation(),s=0,l.value=!1;const v=Array.from(k.dataTransfer?.files??[]);if(v.length>0){const V=e.Value.get(a),C=v.filter(D=>m(D,V)),S=v.filter(D=>!C.includes(D));C.length>0&&(i.value=C,t(C,"dragdrop")),S.length>0&&o?.(v)}};typeof document<"u"&&(document.addEventListener("dragenter",h),document.addEventListener("dragover",d),document.addEventListener("dragleave",b),document.addEventListener("drop",f));const g=()=>{typeof document<"u"&&(document.removeEventListener("dragenter",h),document.removeEventListener("dragover",d),document.removeEventListener("dragleave",b),document.removeEventListener("drop",f)),s=0},y=()=>{u?.click()},w=k=>{const v=k.target,V=Array.from(v.files??[]);V.length>0&&(i.value=V,t(V,"click")),v.value=""};return e.Fragment(e.OnDispose(g),e.html.input(e.attr.type("file"),e.attr.name("bui-page-drop-zone"),e.attr.multiple(!0),e.attr.accept(a),e.style.position("absolute"),e.style.opacity("0"),e.style.pointerEvents("none"),e.style.width("0"),e.style.height("0"),e.on.change(w),e.WithElement(k=>(u=k,e.OnDispose(()=>{u!=null&&(u.value="")})))),n!=null?e.When(l,()=>n({files:i})):null,r!=null?r({isDragging:l,files:i,selectFiles:y}):null)}function va(t){const{author:a,color:n}=t;return e.html.span(e.attr.class("bc-presence-cursor"),e.attr.style(`--presence-color: ${n}`),e.html.span(e.attr.class("bc-presence-cursor__bar")),e.html.span(e.attr.class("bc-presence-cursor__label"),a))}function Yn(t,...a){return e.html.span(e.attr.class("bc-presence-highlight"),e.attr.style(`--presence-color: ${t.color}`),...a)}function Kn(t,...a){const{author:n,color:r}=t;return e.html.span(e.attr.class("bc-presence-selection"),e.attr.style(`--presence-color: ${r}`),e.html.span(e.attr.class("bc-presence-highlight"),...a),va({author:n,color:r}))}function ya(t,a,n){const r=["bc-progress-bar",`bc-progress-bar--size-${t}`,`bc-control--rounded-${n}`];return a&&r.push("bc-progress-bar--indeterminate"),r.join(" ")}function ka(t){const a=new Map,n=_.backgroundValue(t,"solid","light"),r=_.backgroundValue(t,"solid","dark");return a.set("--progress-fill",n.backgroundColor),a.set("--progress-fill-dark",r.backgroundColor),Array.from(a.entries()).map(([o,c])=>`${o}: ${c}`).join("; ")}function Xn({value:t=0,max:a=100,size:n="md",color:r="primary",indeterminate:o=!1,showLabel:c=!1,roundedness:l="full"}){const i=e.computedOf(t,a)((p,m)=>{const h=p??0,d=m??100;return d>0?Math.min(Math.max(h/d*100,0),100):0}),u=e.Value.map(i,p=>`${Math.round(p)}%`),s=e.computedOf(i,o)((p,m)=>m??!1?"":`${p}%`);return e.html.div(e.attr.class("bc-progress-bar-wrapper"),e.html.div(e.attr.class(e.computedOf(n,o,l)((p,m,h)=>ya(p??"md",m??!1,h??"full"))),e.attr.style(e.Value.map(r,p=>ka(p??"primary"))),e.attr.role("progressbar"),e.aria.valuemin(0),e.aria.valuemax(a),e.aria.valuenow(t),e.aria.valuetext(u),e.html.div(e.attr.class("bc-progress-bar__track"),e.html.div(e.attr.class("bc-progress-bar__fill"),e.style.width(s)))),e.When(c,()=>e.html.div(e.attr.class("bc-progress-bar__label"),e.aria.hidden(!0),u),()=>{}))}function $t(t,a,n){const r=["bc-skeleton",`bc-skeleton--${t}`,`bc-control--rounded-${n}`];return a&&r.push("bc-skeleton--animate"),t==="circle"&&r.push("bc-skeleton--circle"),r.join(" ")}function _a(t,a,n){const r=[];return t!==void 0&&r.push(`width: ${t}`),a!==void 0?r.push(`height: ${a}`):n==="text"?r.push("height: 1em"):n==="circle"&&t!==void 0&&r.push(`height: ${t}`),r.join("; ")}function Zn({variant:t="text",width:a,height:n,lines:r=1,animate:o=!0,roundedness:c="sm"}){const l=e.computedOf(t,r)((i,u)=>i==="text"&&(u??1)>1);return e.When(l,()=>e.html.div(e.attr.class("bc-skeleton__lines-container"),e.Repeat(r,i=>e.html.div(e.attr.class(e.computedOf(o,c)((u,s)=>$t("text",u??!0,s??"sm")+" bc-skeleton__line")),e.style.width(e.computedOf(i.isLast,a)((u,s)=>u&&s===void 0?"80%":s!==void 0?s:""))))),()=>e.html.div(e.attr.class(e.computedOf(t,o,c)((i,u,s)=>$t(i??"text",u??!0,s??"sm"))),e.attr.style(e.computedOf(a,n,t)((i,u,s)=>_a(i,u,s??"text"))),e.aria.hidden(!0)))}function Jn(t,a,n,r,o,c){const l=["bc-table"];return t!=="md"&&l.push(`bc-table--size-${t}`),a&&l.push("bc-table--hoverable"),n&&l.push("bc-table--sticky-header"),r&&l.push("bc-table--with-striped-rows"),o&&l.push("bc-table--with-column-borders"),c&&l.push("bc-table--with-row-borders"),l.join(" ")}function Qn(t){if(t!=null)return t==="none"?"--table-border-radius: 0":`--table-border-radius: var(--radius-${t})`}function wa({size:t="md",hoverable:a=!1,stickyHeader:n=!1,fullWidth:r=!1,withStripedRows:o=!1,withTableBorder:c=!0,withColumnBorders:l=!1,withRowBorders:i=!0,borderRadius:u}={},...s){const p=e.computedOf(t,a,n,o,l,i)((d,b,f,g,y,w)=>Jn(d??"md",b??!1,f??!1,g??!1,y??!1,w??!0)),m=e.computedOf(n,r,c)((d,b,f)=>{const g=["bc-table-container"];return d&&g.push("bc-table-container--sticky"),b&&g.push("bc-table-container--full-width"),f&&g.push("bc-table-container--with-table-border"),g.join(" ")}),h=e.computedOf(u)(d=>Qn(d));return e.html.div(e.attr.class(m),e.attr.style(h),e.html.table(e.attr.class(p),...s))}const er=new Set(["text","compare","range","set","boolean","null","composite"]);function it(t){return er.has(t.kind)}function Mt(t){if(t instanceof Date)return"date";switch(typeof t){case"string":return"string";case"number":return"number";case"bigint":return"bigint";case"boolean":return"boolean";default:return"string"}}function _t(t,a,n){if(t==null&&a==null)return 0;if(t==null)return-1;if(a==null)return 1;switch(n){case"string":return String(t).localeCompare(String(a));case"number":return t-a;case"bigint":{const r=t-a;return r<0n?-1:r>0n?1:0}case"date":return t.getTime()-a.getTime();case"boolean":return(t?1:0)-(a?1:0);default:return String(t).localeCompare(String(a))}}function wt(t,a,n){return n==="date"&&t instanceof Date&&a instanceof Date?t.getTime()===a.getTime():t===a}function gt(t,a){switch(t.kind){case"text":{const n=t.caseSensitive??!1,r=a==null?"":String(a),o=t.value,c=n?r:r.toLowerCase(),l=n?o:o.toLowerCase();switch(t.operator){case"contains":return c.includes(l);case"notContains":return!c.includes(l);case"equals":return c===l;case"notEquals":return c!==l;case"startsWith":return c.startsWith(l);case"endsWith":return c.endsWith(l)}return!1}case"compare":{if(a==null)return!1;const n=_t(a,t.value,t.valueType);switch(t.operator){case"eq":return wt(a,t.value,t.valueType);case"neq":return!wt(a,t.value,t.valueType);case"gt":return n>0;case"gte":return n>=0;case"lt":return n<0;case"lte":return n<=0}return!1}case"range":{if(a==null)return!1;const n=t.exclusive??!1;if(t.min!=null){const r=_t(a,t.min,t.valueType);if(n?r<=0:r<0)return!1}if(t.max!=null){const r=_t(a,t.max,t.valueType);if(n?r>=0:r>0)return!1}return!0}case"set":{const n=t.values.some(r=>wt(a,r,t.valueType));return t.mode==="include"?n:!n}case"boolean":return a===t.value;case"null":return t.operator==="isNull"?a==null:a!=null;case"composite":return(t.mode==="and"?Array.prototype.every:Array.prototype.some).call(t.filters,r=>gt(r,a))}}function mt(t,a,n,r){if(t.kind==="and")return t.filters.every(c=>mt(c,a,n,r));if(t.kind==="or")return t.filters.some(c=>mt(c,a,n,r));if(t.kind==="not")return!mt(t.filter,a,n,r);const o=t;if(it(o)){const c=n(o.column,a);return gt(o,c)}return r?.evaluateFilter?r.evaluateFilter(o,a):!0}function Be(t){return t instanceof Date?t.toLocaleDateString():typeof t=="bigint"?t.toString():String(t)}const tr={contains:"contains",notContains:"does not contain",equals:"equals",notEquals:"does not equal",startsWith:"starts with",endsWith:"ends with"},ar={eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤"};function Lt(t){const a=t.column;switch(t.kind){case"text":return`${a} ${tr[t.operator]} "${t.value}"`;case"compare":return`${a} ${ar[t.operator]} ${Be(t.value)}`;case"range":{const n=[];return t.min!=null&&n.push(`${Be(t.min)}`),n.push(a),t.max!=null&&n.push(Be(t.max)),n.length===3?`${n[0]} ${t.exclusive?"<":"≤"} ${n[1]} ${t.exclusive?"<":"≤"} ${n[2]}`:t.min!=null?`${a} ${t.exclusive?">":"≥"} ${Be(t.min)}`:`${a} ${t.exclusive?"<":"≤"} ${Be(t.max)}`}case"set":return t.mode==="include"?`${a} in [${t.values.map(Be).join(", ")}]`:`${a} not in [${t.values.map(Be).join(", ")}]`;case"boolean":return`${a} is ${t.value}`;case"null":return t.operator==="isNull"?`${a} is null`:`${a} is not null`;case"composite":{const n=t.mode==="and"?" AND ":" OR ";return t.filters.length===0?`${a}: (empty)`:t.filters.map(r=>Lt(r)).join(n)}}}function Nt(t,a){return it(t)?Lt(t):a?.describeFilter?a.describeFilter(t):`${t.column}: [${t.kind}]`}function Wt(t,a){const n=t.column;switch(t.kind){case"text":{const r=t.value;return{contains:a.textContains,notContains:a.textNotContains,equals:a.textEquals,notEquals:a.textNotEquals,startsWith:a.textStartsWith,endsWith:a.textEndsWith}[t.operator](n,r)}case"compare":{const r=Be(t.value);return{eq:a.compareEq,neq:a.compareNeq,gt:a.compareGt,gte:a.compareGte,lt:a.compareLt,lte:a.compareLte}[t.operator](n,r)}case"range":return t.min!=null&&t.max!=null?a.rangeBetween(n,Be(t.min),Be(t.max)):t.min!=null?a.rangeGte(n,Be(t.min)):a.rangeLte(n,Be(t.max));case"set":{const r=t.values.map(Be).join(", ");return t.mode==="include"?a.setIn(n,r):a.setNotIn(n,r)}case"boolean":return a.booleanIs(n,String(t.value));case"null":return t.operator==="isNull"?a.isNull(n):a.isNotNull(n);case"composite":{const r=t.filters.map(o=>Wt(o,a));return t.mode==="and"?a.compositeAnd(r):a.compositeOr(r)}}}function ft(t,a,n){return it(t)?Wt(t,a):n?.describeFilter?n.describeFilter(t):`${t.column}: [${t.kind}]`}function et(t){if(t instanceof Date)return{valueType:"date",value:t};switch(typeof t){case"number":return{valueType:"number",value:t};case"bigint":return{valueType:"bigint",value:t};case"boolean":return{valueType:"boolean",value:t};default:return{valueType:"string",value:String(t)}}}function nr(t,a){const n=t??a;if(n==null)return{valueType:"string"};const o={valueType:Mt(n)};return t!=null&&(o.min=t),a!=null&&(o.max=a),o}function ta(t){return{valueType:t.length>0?Mt(t[0]):"string",values:t}}const Se={text:(t,a,n,r)=>({kind:"text",column:t,operator:a,value:n,...r!=null?{caseSensitive:r}:{}}),contains:(t,a,n)=>Se.text(t,"contains",a,n),notContains:(t,a,n)=>Se.text(t,"notContains",a,n),equals:(t,a,n)=>Se.text(t,"equals",a,n),notEquals:(t,a,n)=>Se.text(t,"notEquals",a,n),startsWith:(t,a,n)=>Se.text(t,"startsWith",a,n),endsWith:(t,a,n)=>Se.text(t,"endsWith",a,n),eq:(t,a)=>({kind:"compare",column:t,operator:"eq",...et(a)}),neq:(t,a)=>({kind:"compare",column:t,operator:"neq",...et(a)}),gt:(t,a)=>({kind:"compare",column:t,operator:"gt",...et(a)}),gte:(t,a)=>({kind:"compare",column:t,operator:"gte",...et(a)}),lt:(t,a)=>({kind:"compare",column:t,operator:"lt",...et(a)}),lte:(t,a)=>({kind:"compare",column:t,operator:"lte",...et(a)}),between:(t,a,n,r)=>({kind:"range",column:t,...r!=null?{exclusive:r}:{},...nr(a,n)}),oneOf:(t,a)=>({kind:"set",column:t,mode:"include",...ta(a)}),noneOf:(t,a)=>({kind:"set",column:t,mode:"exclude",...ta(a)}),isTrue:t=>({kind:"boolean",column:t,value:!0}),isFalse:t=>({kind:"boolean",column:t,value:!1}),isNull:t=>({kind:"null",column:t,operator:"isNull"}),isNotNull:t=>({kind:"null",column:t,operator:"isNotNull"}),composite:(t,a,n)=>({kind:"composite",column:t,mode:a,filters:n}),and:(...t)=>({kind:"and",filters:t}),or:(...t)=>({kind:"or",filters:t}),not:t=>({kind:"not",filter:t})};function rr(t,a){return t==null&&a==null?0:t==null?-1:a==null?1:typeof t=="string"&&typeof a=="string"?t.localeCompare(a):typeof t=="number"&&typeof a=="number"?t-a:typeof t=="boolean"&&typeof a=="boolean"?(t?1:0)-(a?1:0):t instanceof Date&&a instanceof Date?t.getTime()-a.getTime():String(t).localeCompare(String(a))}function or(t,a){return t[a]}function Ca(t){const{data:a,rowId:n,accessors:r={},comparators:o={},initialSort:c=[],initialFilters:l=[],pageSize:i,multiSort:u=!1,serverSide:s=!1,groupBy:p,onSortChange:m,onFilterChange:h,onPageChange:d,onSelectionChange:b,onGroupByChange:f,evaluateFilter:g}=t,y=[],w=e.prop(c),k=e.prop(l),v=e.prop(new Set),V=e.prop(1),C=e.prop(i!=null?e.Value.get(i):0);if(y.push(()=>w.dispose(),()=>k.dispose(),()=>v.dispose(),()=>V.dispose(),()=>C.dispose()),i!=null){const P=e.Value.toSignal(i),z=e.Value.on(P,ee=>{C.set(ee),V.set(1)});y.push(z),y.push(()=>P.dispose())}const S=e.prop([]);y.push(()=>S.dispose());const D=P=>r[P]??(z=>or(z,P)),B=P=>o[P]??rr,$=e.Value.toSignal(a);y.push(()=>$.dispose());const R=$.map(P=>P.length);y.push(()=>R.dispose());const G=e.computedOf($,S)((P,z)=>{if(z.length===0)return P;const ee=new Map(P.map(me=>[n(me),me])),oe=[];for(const me of z){const fe=ee.get(me);fe!=null&&(oe.push(fe),ee.delete(me))}for(const me of ee.values())oe.push(me);return oe});y.push(()=>G.dispose());const A=s?G:e.computedOf(G,k)((P,z)=>z.length===0?P:P.filter(ee=>z.every(oe=>{if(it(oe)){if(oe.kind==="text"&&oe.value==="")return!0;const me=D(oe.column);return gt(oe,me(ee))}return g?g(oe,ee):!0})));s||y.push(()=>A.dispose());const j=A.map(P=>P.length);y.push(()=>j.dispose());const E=s?A:e.computedOf(A,w)((P,z)=>{if(z.length===0)return P;const ee=[...P];return ee.sort((oe,me)=>{for(const fe of z){const Ie=D(fe.column),ge=B(fe.column)(Ie(oe),Ie(me));if(ge!==0)return fe.direction==="desc"?-ge:ge}return 0}),ee});s||y.push(()=>E.dispose());const q=e.prop(p!=null?e.Value.get(p):void 0);if(y.push(()=>q.dispose()),p!=null){const P=e.Value.toSignal(p),z=e.Value.on(P,ee=>{q.set(ee)});y.push(z),y.push(()=>P.dispose())}const J=e.computedOf(E,q)((P,z)=>{if(z==null)return[];const ee=D(z),oe=new Map,me=[];for(const fe of P){const Ie=String(ee(fe)??"");oe.has(Ie)||(oe.set(Ie,[]),me.push(Ie)),oe.get(Ie).push(fe)}return me.map(fe=>({key:fe,rows:oe.get(fe)}))});y.push(()=>J.dispose());const ae=i!=null,M=ae?e.computedOf(j,C)((P,z)=>z>0?Math.max(1,Math.ceil(P/z)):1):e.prop(1);if(y.push(()=>M.dispose()),ae){const P=e.Value.on(M,z=>{V.value>z&&V.set(Math.max(1,z))});y.push(P)}const K=s||!ae?E:e.computedOf(E,V,C)((P,z,ee)=>{if(ee<=0)return P;const oe=(z-1)*ee;return P.slice(oe,oe+ee)});!s&&ae&&y.push(()=>K.dispose());const te=v.map(P=>P.size);y.push(()=>te.dispose());const N=e.computedOf(v,A)((P,z)=>z.length===0?!1:z.every(ee=>P.has(n(ee))));y.push(()=>N.dispose());const I=e.computedOf(v,N)((P,z)=>P.size>0&&!z);y.push(()=>I.dispose());const L=new Map,Z=new Map,pe=new Map,be=(P,z)=>{const ee=z?.multi??e.Value.get(u),oe=w.value,me=oe.find(Ie=>Ie.column===P);let fe;me?me.direction==="asc"?fe=oe.map(Ie=>Ie.column===P?{...Ie,direction:"desc"}:Ie):fe=oe.filter(Ie=>Ie.column!==P):fe=ee?[...oe,{column:P,direction:"asc"}]:[{column:P,direction:"asc"}],w.set(fe),m?.(fe)},ve=P=>{w.set(P),m?.(P)},H=()=>{w.set([]),m?.([])},ie=P=>{let z=L.get(P);if(!z){const ee=e.untracked(()=>e.prop(w.value.find(me=>me.column===P)?.direction)),oe=w.on(me=>{ee.set(me.find(fe=>fe.column===P)?.direction)},{noAutoDispose:!0});z=ee,L.set(P,z),y.push(()=>{oe(),ee.dispose()})}return z},de=P=>{const ee=[...k.value.filter(oe=>oe.column!==P.column),P];k.set(ee),V.set(1),h?.(ee)},xe=P=>{const z=[...k.value,P];k.set(z),V.set(1),h?.(z)},ke=P=>{const z=k.value.filter(ee=>ee.column!==P);k.set(z),V.set(1),h?.(z)},F=()=>{k.set([]),V.set(1),h?.([])},Y=P=>{let z=Z.get(P);if(!z){const ee=e.untracked(()=>e.prop(k.value.filter(me=>me.column===P))),oe=k.on(me=>{ee.set(me.filter(fe=>fe.column===P))},{noAutoDispose:!0});z=ee,Z.set(P,z),y.push(()=>{oe(),ee.dispose()})}return z},ne=P=>{let z=pe.get(P);if(!z){const ee=e.untracked(()=>e.prop(k.value.find(fe=>fe.column===P&&fe.kind==="text")?.value??"")),oe=k.on(me=>{const fe=me.find(Ie=>Ie.column===P&&Ie.kind==="text");ee.set(fe?.value??"")},{noAutoDispose:!0});z=ee,pe.set(P,z),y.push(()=>{oe(),ee.dispose()})}return z},x=P=>{v.set(P),b?.(P)},le=P=>{const z=new Set(v.value);z.has(P)?z.delete(P):z.add(P),x(z)},ye=P=>{const z=new Set(v.value);for(const ee of P)z.add(ee);x(z)},Ce=P=>{const z=new Set(v.value);for(const ee of P)z.delete(ee);x(z)},O=()=>{const P=A.value.map(z=>n(z));x(new Set(P))},W=()=>{x(new Set)};return{rows:K,totalRows:R,totalFilteredRows:j,sort:w,toggleSort:be,setSort:ve,getSortDirection:ie,resetSort:H,filters:k,setFilter:de,addFilter:xe,removeFilter:ke,getColumnFilters:Y,getTextFilterValue:ne,resetFilters:F,selected:v,toggleSelect:le,select:ye,deselect:Ce,selectAll:O,deselectAll:W,isAllSelected:N,isSomeSelected:I,selectedCount:te,currentPage:V,totalPages:M,pageSize:C,setPage:P=>{const z=Math.max(1,Math.min(P,M.value));V.set(z),d?.(z)},setPageSize:P=>{C.set(P),V.set(1),d?.(1)},groupBy:q,setGroupBy:P=>{q.set(P),f?.(P)},groups:J,allFilteredRows:E,moveRow:(P,z)=>{if(P===z||w.value.length>0)return;const ee=$.value,oe=S.value.length>0?[...S.value]:ee.map(Ie=>n(Ie)),me=oe.indexOf(P),fe=oe.indexOf(z);me<0||fe<0||(oe.splice(me,1),oe.splice(fe,0,P),S.set(oe))},resetAll:()=>{H(),F(),W(),V.set(1),S.set([]),q.set(void 0)},dispose:()=>{for(const P of y)P();y.length=0,L.clear(),Z.clear(),pe.clear()}}}function Va(t,a,n){const r=[],o=Math.max(1,t-n),c=Math.min(a,t+n);o>1&&(r.push(1),o>2&&r.push("dots"));for(let l=o;l<=c;l++)r.push(l);return c<a&&(c<a-1&&r.push("dots"),r.push(a)),r}function Sa(t,a){const n=new Map;switch(t){case"filled":case"pill":{const c=_.backgroundValue(a,"solid","light"),l=_.backgroundValue(a,"solid","dark");n.set("--pagination-active-bg",c.backgroundColor),n.set("--pagination-active-text",c.textColor),n.set("--pagination-active-bg-dark",l.backgroundColor),n.set("--pagination-active-text-dark",l.textColor);break}case"outline":{n.set("--pagination-active-bg","transparent"),n.set("--pagination-active-text",_.textColorValue(a,"light")),n.set("--pagination-active-border",_.borderColorValue(a,"light")),n.set("--pagination-active-bg-dark","transparent"),n.set("--pagination-active-text-dark",_.textColorValue(a,"dark")),n.set("--pagination-active-border-dark",_.borderColorValue(a,"dark")),n.set("--pagination-item-border",he.getColorVar("base",300)),n.set("--pagination-item-border-dark",he.getColorVar("base",600));break}case"light":{const c=_.backgroundValue(a,"light","light"),l=_.backgroundValue(a,"light","dark");n.set("--pagination-active-bg",c.backgroundColor),n.set("--pagination-active-text",_.textColorValue(a,"light")),n.set("--pagination-active-bg-dark",l.backgroundColor),n.set("--pagination-active-text-dark",_.textColorValue(a,"dark")),n.set("--pagination-item-bg",he.getColorVar("base",100)),n.set("--pagination-item-bg-dark",he.getColorVar("base",800));break}case"subtle":{n.set("--pagination-active-bg","transparent"),n.set("--pagination-active-text",_.textColorValue(a,"light")),n.set("--pagination-active-bg-dark","transparent"),n.set("--pagination-active-text-dark",_.textColorValue(a,"dark"));break}}const r=he.getColorVar("base",100),o=he.getColorVar("base",700);return n.set("--pagination-hover-bg",r),n.set("--pagination-hover-bg-dark",o),Array.from(n.entries()).map(([c,l])=>`${c}: ${l}`).join("; ")}function xa({currentPage:t,totalPages:a,onChange:n,siblings:r=1,showPrevNext:o=!0,showFirstLast:c=!1,size:l="md",variant:i="filled",color:u="primary",justify:s=!1,responsive:p=!1}){const m=e.Value.deriveProp(r),h=e.computedOf(p,m,r)((d,b,f)=>d?b:f);return e.Use(_.BeatUII18n,d=>e.html.nav(e.attr.class(e.computedOf(l,i,s)((b,f,g)=>{const y=["bc-pagination",`bc-pagination--size-${b}`,`bc-pagination--variant-${f}`];return g&&y.push("bc-pagination--justify"),y.join(" ")})),e.attr.style(e.computedOf(i,u)((b,f)=>Sa(b,f))),e.aria.label(d.$.paginationLabel),e.When(p,()=>e.WithElement(b=>{const f=()=>{const y=b.clientWidth;if(y===0)return;const w=b.querySelector(".bc-pagination__item");if(!w)return;const k=w.offsetWidth,v=parseFloat(getComputedStyle(b).gap)||0,V=k+v,C=Math.floor((y+v)/V),S=(e.Value.get(o)?2:0)+(e.Value.get(c)?2:0),D=e.Value.get(a),B=C-S,$=Math.max(0,Math.floor((B-5)/2)),R=Math.floor((D-3)/2);m.set(Math.min($,Math.max(0,R)))},g=new ResizeObserver(f);return g.observe(b),Me.delayedAnimationFrame(f),e.OnDispose(()=>g.disconnect())})),e.When(c,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((b,f)=>b<=1||f<=1)),e.aria.label(d.$.firstPage),e.on.click(b=>{b.preventDefault(),e.Value.get(a)>1&&n(1)}),"«")),e.When(o,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((b,f)=>b<=1||f<=1)),e.aria.label(d.$.previousPage),e.on.click(b=>{b.preventDefault();const f=e.Value.get(t);f>1&&n(f-1)}),"‹")),e.ForEach(e.computedOf(t,a,h)((b,f,g)=>Va(b,f,g)),b=>{const f=b.map(y=>y==="dots"),g=e.computedOf(b,t)((y,w)=>y===w);return e.When(f,()=>e.html.span(e.attr.class("bc-pagination__dots"),"…"),()=>e.html.button(e.attr.class(e.Value.map(g,y=>y?"bc-pagination__item bc-pagination__item--active":"bc-pagination__item")),e.WithElement(y=>{e.Value.on(g,w=>{w?y.setAttribute("aria-current","page"):y.removeAttribute("aria-current")})}),e.on.click(y=>{y.preventDefault();const w=e.Value.get(b);w!=="dots"&&w!==e.Value.get(t)&&n(w)}),b.map(y=>String(y))))}),e.When(o,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((b,f)=>b>=f||f<=1)),e.aria.label(d.$.nextPage),e.on.click(b=>{b.preventDefault();const f=e.Value.get(t),g=e.Value.get(a);f<g&&n(f+1)}),"›")),e.When(c,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((b,f)=>b>=f||f<=1)),e.aria.label(d.$.lastPage),e.on.click(b=>{b.preventDefault();const f=e.Value.get(a);f>1&&n(f)}),"»"))))}function Ia({dataSource:t,showSort:a=!0,showFilters:n=!0,showSelection:r=!0,bulkActions:o=[],resetLabel:c,describeFilter:l}){const i=e.computedOf(t.sort,t.filters,t.selectedCount)((h,d,b)=>h.length>0||d.length>0||b>0),u=e.Value.toSignal(r),s=e.computedOf(u,t.selectedCount)((h,d)=>h&&d>0),p=l?{describeFilter:l}:void 0;function m(h,d){return d?ft(h,d,p):Nt(h,p)}return e.Fragment(e.OnDispose(()=>{i.dispose(),u.dispose(),s.dispose()}),e.Use(_.BeatUII18n,h=>e.When(i,()=>e.html.div(e.attr.class("bc-data-toolbar"),e.When(a,()=>e.ForEach(t.sort,d=>Je({variant:"light",color:"green",size:"sm",onClose:()=>{const b=d.value,f=t.sort.value.filter(g=>g.column!==b.column);t.setSort(f)}},d.map(b=>`${b.column} ${b.direction==="asc"?"↑":"↓"}`)))),e.When(n,()=>e.ForEach(t.filters,d=>Je({variant:"light",color:"violet",size:"sm",onClose:()=>{t.removeFilter(d.value.column)}},d.map(b=>m(b,h.value.dataTable.describeFilter))))),e.When(s,()=>e.html.div(e.attr.class("bc-data-toolbar__selection"),e.html.span(e.attr.class("bc-data-toolbar__selection-count"),t.selectedCount.map(d=>h.value.dataTable.selectedCount(d))),...o.map(d=>e.html.button(e.attr.class("bc-data-toolbar__action"),e.on.click(()=>d.onClick(t.selected.value)),d.icon!=null?_.Icon({icon:d.icon,size:"sm"}):null,d.label)),e.html.button(e.attr.class("bc-data-toolbar__action bc-data-toolbar__action--secondary"),e.on.click(()=>t.deselectAll()),h.$.dataTable.map(d=>d.deselectAll)))),e.html.button(e.attr.class("bc-data-toolbar__reset"),e.on.click(()=>t.resetAll()),_.Icon({icon:"line-md:close-small",size:"sm"}),c??h.$.dataTable.map(d=>d.resetAll))))))}const Le={value:(t,a,{disabled:n,before:r,after:o}={})=>({type:"value",value:t,label:a,disabled:n,before:r,after:o}),group:(t,a,{disabled:n,before:r,after:o}={})=>({type:"group",group:t,options:a,disabled:n,before:r,after:o}),break:{type:"break"},getValues:t=>t.flatMap(a=>a.type==="group"?Le.getValues(a.options):a.type==="break"?[]:[a.value]),contains:(t,a,n=(r,o)=>r===o)=>Le.getValues(t).some(r=>n(r,a))};function aa(t){for(const a of t)if(a.kind==="set"&&a.mode==="include")return a.values.map(String);return[]}function Ze(t){const{dataSource:a,column:n,size:r="sm"}=t;if(t.type==="tags"){const{options:p,placeholder:m}=t,h=a.getColumnFilters(n),d=e.prop(aa(h.value)),b=h.on(w=>{d.set(aa(w))}),f=e.prop(""),g=f.map(w=>{if(w==="")return p;const k=w.toLowerCase();return p.filter(v=>v.label.toLowerCase().includes(k))}),y=w=>{const k=d.value,v=k.includes(w)?k.filter(V=>V!==w):[...k,w];d.set(v),v.length===0?a.removeFilter(n):a.setFilter(Se.oneOf(n,v))};return e.Fragment(e.OnDispose(()=>{b(),d.dispose(),f.dispose(),g.dispose()}),e.Use(_.BeatUII18n,w=>e.html.div(e.attr.class("bc-column-filter-tags"),e.html.input(e.attr.type("text"),e.attr.class("bc-column-filter"),e.attr.placeholder(m??w.$.dataTable.map(k=>k.filterTagsPlaceholder)),e.attr.value(f),e.on.input(k=>f.set(k.target.value))),e.html.div(e.attr.class("bc-column-filter-tags__list"),e.ForEach(g,k=>{const v=e.computedOf(d,k)((V,C)=>V.includes(C.value));return e.html.label(e.attr.class("bc-column-filter-tags__item"),e.html.input(e.attr.type("checkbox"),e.attr.checked(v),e.on.change(()=>y(e.Value.get(k).value))),e.html.span(e.Value.map(k,V=>V.label)))})))))}if(t.type==="select"){const{options:p,allLabel:m}=t,d=a.getColumnFilters(n).map(b=>b.find(g=>g.kind==="text")?.value??"");return e.Use(_.BeatUII18n,b=>{const f=m??b.value.dataTable.selectAll,g=[Le.value("",f),...p.map(y=>Le.value(y.value,y.label))];return Q.NativeSelect({value:d,options:g,size:r,class:"bc-column-filter",onChange:y=>{y===""?a.removeFilter(n):a.setFilter(Se.equals(n,y))}})})}const o=a.getTextFilterValue(n),{placeholder:c,operator:l="contains",debounce:i=300}=t;let u;const s=o.map(p=>p===""?null:p);return e.Fragment(e.OnDispose(()=>{u!=null&&clearTimeout(u),s.dispose()}),e.Use(_.BeatUII18n,p=>Ee.TextInput({value:o,size:r,class:"bc-column-filter",placeholder:c??p.$.dataTable.map(m=>m.filterPlaceholder),onInput:m=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{m===""?a.removeFilter(n):a.setFilter(Se.text(n,l,m))},i)},after:Q.NullableResetAfter(s,void 0,()=>{u!=null&&clearTimeout(u),a.removeFilter(n)})})))}function lr(t){const a={up:"M0 16 L8 10 L16 16 Z",down:"M0 0 L8 6 L16 0 Z",left:"M16 0 L10 8 L16 16 Z",right:"M0 0 L6 8 L0 16 Z"};return e.svg.svg(e.svgAttr.viewBox("0 0 16 16"),e.svg.path(e.svgAttr.d(t.map(n=>a[n]))))}function rt(t){const{content:a,placement:n="top",showDelay:r=250,hideDelay:o=500,mainAxisOffset:c=8,crossAxisOffset:l=0,showOn:i="hover-focus"}=t,u=Pe.sessionId("tooltip");return e.Fragment(e.aria.describedby(u),Ve.Flyout({content:()=>e.Fragment(e.attr.class("bc-tooltip"),e.attr.role("tooltip"),e.attr.id(u),a),placement:n,showDelay:r,hideDelay:o,mainAxisOffset:c,crossAxisOffset:l,showOn:i,closable:!0,role:"tooltip",arrow:s=>{const p=s.map(({placement:m})=>m.includes("top")?"down":m.includes("bottom")?"up":m.includes("left")?"right":m.includes("right")?"left":"up");return e.Fragment(e.attr.class("bc-tooltip__arrow"),e.attr.class(p.map(m=>`bc-tooltip__arrow-${m}`)),e.style.transform(s.map(({x:m,y:h})=>m==null&&h==null?"":m!=null?`translate(${m}px, 0)`:`translate(0, ${h}px)`)),lr(p))}}))}function vt({open:t},...a){return e.WithElement(n=>{const{status:r,setOpen:o,dispose:c}=Ne.useAnimatedElementToggle({initialStatus:e.Value.get(t)?"opened":"closed",element:n});return e.Value.on(t,o),Te.ElementRect(l=>{const i=e.prop(null);return e.computedOf(r,l.$.height)((s,p)=>s==="opened"&&p>0?p:null).on(s=>{s!=null&&i.set(s)}),r.on(s=>{if(n&&s==="start-opening"){const p=n.style.height,m=n.style.transition;n.style.transition="none",n.style.height="auto",n.offsetHeight;const h=n.scrollHeight;h>0&&i.set(h),n.style.height=p,n.style.transition=m,n.offsetHeight}}),e.Fragment(e.OnDispose(c),e.attr.style(i.map(s=>`--collapse-height: ${s!=null?`${s}px`:"auto"}`)),e.attr.class(r.map(s=>`bc-collapse bc-collapse--${s}`)),...a)})})}function sr(t,a){return["bc-accordion",`bc-accordion--size-${t}`,`bc-accordion--${a}`].join(" ")}function ir({items:t,multiple:a=!1,size:n="md",variant:r="default"}){const o=Pe.sessionId("accordion"),c=new Map;for(const i of t)c.set(i.key,e.prop(i.defaultOpen??!1));const l=i=>{const u=c.get(i);if(u!=null){if(!e.Value.get(a))for(const[s,p]of c)s!==i&&p.set(!1);u.update(s=>!s)}};return e.html.div(e.attr.class(e.computedOf(n,r)(sr)),e.attr.role("presentation"),...t.map((i,u)=>{const s=c.get(i.key),p=`${o}-header-${u}`,m=`${o}-panel-${u}`;return e.html.div(e.attr.class("bc-accordion__item"),e.attr.class(s.map(h=>h?"bc-accordion__item--open":"bc-accordion__item--closed")),i.disabled?e.attr.class("bc-accordion__item--disabled"):e.Empty,e.html.button(e.attr.type("button"),e.attr.class("bc-accordion__header"),e.attr.id(p),e.aria.expanded(s),e.aria.controls(m),e.attr.disabled(i.disabled??!1),e.on.click(h=>{h.preventDefault(),i.disabled||l(i.key)}),e.html.span(e.attr.class("bc-accordion__header-content"),i.header),e.html.span(e.attr.class("bc-accordion__chevron"),e.attr.class(s.map(h=>h?"bc-accordion__chevron--open":"bc-accordion__chevron--closed")),e.html.span(e.attr.class("bc-accordion__chevron-icon")))),e.html.div(e.attr.id(m),e.attr.role("region"),e.aria.labelledby(p),e.html.div(vt({open:s},e.html.div(e.attr.class("bc-accordion__body"),i.body)))))}))}function cr(t,a,n,r){const o=["bc-action-card"];return t&&o.push("bc-action-card--active"),a&&o.push("bc-action-card--disabled"),n!=="md"&&o.push(`bc-action-card--${n}`),r&&!a&&o.push("bc-action-card--clickable"),o.join(" ")}function ur(t,a,n,r){const o=new Map;if(t!=null&&o.set("--action-card-bg",t),a!=null&&o.set("--action-card-border",a),n!=null&&o.set("--action-card-title-color",n),r!=null&&o.set("--action-card-description-color",r),o.size!==0)return Array.from(o.entries()).map(([c,l])=>`${c}: ${l}`).join("; ")}function dr({icon:t,title:a,description:n,active:r=!1,disabled:o=!1,onClick:c,size:l="md",iconColor:i="primary",iconSize:u="md",backgroundColor:s,borderColor:p,titleColor:m,descriptionColor:h}){const d=c!=null;return e.html.div(e.attr.class(e.computedOf(r,o,l)((b,f,g)=>cr(b??!1,f??!1,g??"md",d))),e.attr.style(e.computedOf(s,p,m,h)((b,f,g,y)=>ur(b,f,g,y))),e.When(d,()=>e.Fragment(e.Unless(o,()=>e.Fragment(e.on.click(()=>c?.()),e.attr.tabindex(0))),e.attr.role("button"))),e.aria.disabled(o),e.html.div(e.attr.class("bc-action-card__icon"),_.Icon({icon:t,size:u,color:i})),e.html.div(e.attr.class("bc-action-card__content"),e.html.div(e.attr.class("bc-action-card__title"),a),e.html.div(e.attr.class("bc-action-card__description"),n)))}const pr=["!=","<=",">=","<",">","="];function mr(t){for(const a of pr)if(typeof t=="string"&&t.startsWith(a))return[a,t.slice(a.length)];return["=",t]}function $a(t,a,n){const[r,o]=mr(a),c=t.findIndex(u=>u[1]===o);if(c===-1)throw new Error(`Breakpoint ${String(o)} not found`);const l=t[c][0],i=c<t.length-1?t[c+1][0]:1/0;switch(r){case"=":return n>=l&&n<i;case"!=":return!(n>=l&&n<i);case"<=":return n<=l;case">=":return n>=l;case"<":return n<l;case">":return n>l;default:return!1}}function hr(t,a){const n=t.findIndex(r=>r[0]>a);return n===-1?t[t.length-1][1]:n===0?t[0][1]:t[n-1][1]}function Ut(t,{breakpoints:a,mode:n="viewport"}){const o=[...Object.entries(a).map(([l,i])=>[i,l])].sort((l,i)=>l[0]-i[0]),c=l=>{const i=l.map(({width:s})=>{const p=o.findIndex(m=>m[0]>s);return p===-1?{width:s,breakpoint:o[o.length-1][1]}:p===0?{width:s,breakpoint:o[0][1]}:{width:s,breakpoint:o[p-1][1]}});return t({value:i,breakpoints:a,asList:o,is:(s,p)=>$a(o,s,p)})};return n==="element"?Te.ElementRect(c):Te.WindowSize(c)}let Ct=NaN;function br(t,a){return t?(isNaN(Ct)&&(Ct=parseFloat(getComputedStyle(document.documentElement).fontSize)),parseFloat(t)*Ct):a}function De(t,a,n){return br(t.getPropertyValue(a),n)}function Oa(t){return e.WithElement(a=>{const n=getComputedStyle(a),r={zero:0,xs:De(n,"--breakpoint-xs",640),sm:De(n,"--breakpoint-sm",768),md:De(n,"--breakpoint-md",1024),lg:De(n,"--breakpoint-lg",1280),xl:De(n,"--breakpoint-xl",1536)};return Ut(t,{breakpoints:r})})}function gr(t){return e.WithElement(a=>{const n=getComputedStyle(a),r={zero:0,"3xs":De(n,"--container-3xs",256),"2xs":De(n,"--container-2xs",288),xs:De(n,"--container-xs",320),sm:De(n,"--container-sm",384),md:De(n,"--container-md",448),lg:De(n,"--container-lg",512),xl:De(n,"--container-xl",640),"2xl":De(n,"--container-2xl",768),"3xl":De(n,"--container-3xl",1024),"4xl":De(n,"--container-4xl",1280),"5xl":De(n,"--container-5xl",1536),"6xl":De(n,"--container-6xl",2048)};return Ut(t,{breakpoints:r,mode:"element"})})}function fr(t,a,n,r){const o=["bc-toggle-button",`bc-toggle-button--size-${t}`,`bc-control--padding-${t}`,`bc-control--rounded-${a}`];return n&&o.push("bc-toggle-button--full-width"),r&&o.push("bc-toggle-button--pressed"),o.join(" ")}function vr(t,a,n,r){const o=new Map;o.set("--toggle-text-shadow","var(--text-shadow-none)"),o.set("--toggle-text-shadow-dark","var(--text-shadow-none)");const c=(l,i,u,s)=>{r||(o.set("--toggle-bg-hover",l),o.set("--toggle-text-hover",u),o.set("--toggle-bg-hover-dark",i),o.set("--toggle-text-hover-dark",s))};if(n){const l=_.backgroundValue(a,"solid","light"),i=_.backgroundValue(a,"solid","dark");o.set("--toggle-bg",l.backgroundColor),o.set("--toggle-text",l.textColor),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",i.textColor),o.set("--toggle-border",l.backgroundColor),o.set("--toggle-border-dark",i.backgroundColor),o.set("--toggle-text-shadow","var(--text-shadow-button-filled, var(--text-shadow-sm))"),o.set("--toggle-text-shadow-dark","var(--text-shadow-button-filled, var(--text-shadow-sm))");const u=_.hoverBackgroundValue(a,"solid","light"),s=_.hoverBackgroundValue(a,"solid","dark");c(u.backgroundColor,s.backgroundColor,u.textColor,s.textColor)}else switch(t){case"outline":case"dashed":{o.set("--toggle-bg","transparent"),o.set("--toggle-bg-dark","transparent"),o.set("--toggle-border",_.borderColorValue(a,"light")),o.set("--toggle-border-dark",_.borderColorValue(a,"dark")),o.set("--toggle-text",_.textColorValue(a,"light")),o.set("--toggle-text-dark",_.textColorValue(a,"dark")),t==="dashed"&&o.set("--toggle-border-style","dashed");const l=_.hoverBackgroundValue(a,"light","light"),i=_.hoverBackgroundValue(a,"light","dark");c(l.backgroundColor,i.backgroundColor,l.textColor,i.textColor);break}case"light":{const l=_.backgroundValue(a,"light","light"),i=_.backgroundValue(a,"light","dark");o.set("--toggle-bg",l.backgroundColor),o.set("--toggle-text",l.textColor),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",i.textColor);const u=_.hoverBackgroundValue(a,"light","light"),s=_.hoverBackgroundValue(a,"light","dark");c(u.backgroundColor,s.backgroundColor,u.textColor,s.textColor);break}case"filled":{const l=_.backgroundValue("neutral","light","light"),i=_.backgroundValue("neutral","light","dark");o.set("--toggle-bg",l.backgroundColor),o.set("--toggle-text",_.textColorValue(a,"light")),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",_.textColorValue(a,"dark"));const u=_.hoverBackgroundValue("base","light","light"),s=_.hoverBackgroundValue("base","light","dark");c(u.backgroundColor,s.backgroundColor,o.get("--toggle-text")??l.textColor,o.get("--toggle-text-dark")??i.textColor);break}case"default":{const l=_.backgroundValue("neutral","light","light"),i=_.backgroundValue("neutral","light","dark");o.set("--toggle-bg",l.backgroundColor),o.set("--toggle-text",_.textColorValue(a,"light")),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",_.textColorValue(a,"dark")),o.set("--toggle-border",he.getColorVar("neutral",300)),o.set("--toggle-border-dark",he.getColorVar("neutral",700));const u=_.hoverBackgroundValue("base","light","light"),s=_.hoverBackgroundValue("base","light","dark");c(u.backgroundColor,s.backgroundColor,o.get("--toggle-text")??l.textColor,o.get("--toggle-text-dark")??i.textColor);break}case"subtle":{o.set("--toggle-bg","transparent"),o.set("--toggle-bg-dark","transparent"),o.set("--toggle-text",_.textColorValue(a,"light")),o.set("--toggle-text-dark",_.textColorValue(a,"dark"));const l=_.hoverBackgroundValue(a,"light","light"),i=_.hoverBackgroundValue(a,"light","dark");c(l.backgroundColor,i.backgroundColor,l.textColor,i.textColor);break}default:{const l=_.backgroundValue("neutral","light","light"),i=_.backgroundValue("neutral","light","dark");o.set("--toggle-bg",l.backgroundColor),o.set("--toggle-text",_.textColorValue(a,"light")),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",_.textColorValue(a,"dark"));const u=_.hoverBackgroundValue("base","light","light"),s=_.hoverBackgroundValue("base","light","dark");c(u.backgroundColor,s.backgroundColor,o.get("--toggle-text")??l.textColor,o.get("--toggle-text-dark")??i.textColor);break}}return Array.from(o.entries()).map(([l,i])=>`${l}: ${i}`).join("; ")}function Ta({pressed:t,onChange:a,disabled:n=!1,variant:r="outline",size:o="md",color:c="primary",roundedness:l="sm",fullWidth:i=!1},...u){return e.html.button(e.attr.type("button"),e.attr.disabled(n),e.aria.pressed(t),e.attr.class(e.computedOf(o,l,i,t)(fr)),e.attr.style(e.computedOf(r,c,t,n)(vr)),e.on.click(s=>{s.preventDefault(),s.stopPropagation(),e.Value.get(n)||a?.(!e.Value.get(t))}),...u)}function yr(t,a){return["bc-toggle-button-group",`bc-toggle-button-group--${t}`,`bc-toggle-button-group--rounded-${a}`].join(" ")}function kr({items:t,value:a,onChange:n,multiple:r=!1,disabled:o=!1,variant:c="outline",size:l="md",color:i="primary",roundedness:u="sm",orientation:s="horizontal"}){const p=(m,h)=>{const d=e.Value.get(a),b=e.Value.get(r);let f;b?f=h?[...d,m]:d.filter(g=>g!==m):f=h?[m]:[],n?.(f)};return e.html.div(e.attr.role("group"),e.attr.class(e.computedOf(s,u)(yr)),e.aria.orientation(s),...t.map(m=>{const h=e.Value.map(a,b=>b.includes(m.key)),d=m.disabled?e.Value.map(o,b=>b||m.disabled):o;return Ta({pressed:h,onChange:b=>p(m.key,b),disabled:d,variant:c,size:l,color:i,roundedness:"none",fullWidth:!1},m.label)}))}function ze(t,a){return`bc-panel ${(Array.isArray(t)?t:[t]).map(r=>`bc-panel--side-${r}`).join(" ")} bc-panel--shadow-${a}`}function Ke(t){const a=e.Value.toSignal(t).map(r=>_.backgroundValue(r,"lighter","light")),n=e.Value.toSignal(t).map(r=>_.backgroundValue(r,"lighter","dark"));return e.Fragment(e.style.variable("--panel-bg",a.$.backgroundColor),e.style.variable("--panel-text",a.$.textColor),e.style.variable("--panel-bg-dark",n.$.backgroundColor),e.style.variable("--panel-text-dark",n.$.textColor))}const qe={banner:{zero:32,xs:32,sm:32,md:32,lg:32,xl:32},header:{zero:60,xs:60,sm:60,md:60,lg:60,xl:60},mainHeader:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},mainFooter:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},footer:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},menu:{zero:300,xs:300,sm:300,md:300,lg:300,xl:300},aside:{zero:280,xs:280,sm:280,md:280,lg:280,xl:280}};function na(t,a){if(typeof t=="number")return{zero:t,xs:t,sm:t,md:t,lg:t,xl:t};const n={zero:t.zero??a.zero,xs:t.xs??a.xs,sm:t.sm??a.sm,md:t.md??a.md,lg:t.lg??a.lg,xl:t.xl??a.xl};return n.xs<n.zero&&(n.xs=n.zero),n.sm<n.xs&&(n.sm=n.xs),n.md<n.sm&&(n.md=n.sm),n.lg<n.md&&(n.lg=n.md),n.xl<n.lg&&(n.xl=n.lg),n}function Vt(t){t=t.filter(a=>a.some(n=>n!=null&&!n.startsWith("?")));for(let a=0;a<t[0].length;a++)t.every(n=>n[a]==null||n[a].startsWith("?"))&&(t=t.map(n=>n.filter((r,o)=>o!==a)),a--);return t=t.map(a=>a.map(n=>n?.startsWith("?")?n.slice(1):n)),t}function _r({smallBreakpoint:t,mediumBreakpoint:a,vertical:n,horizontal:r,is:o}){function c(u){let s=[[null],[null],[null],[null],[null],[null]];const p=[];p.push("1fr");const m=[];return r.banner&&(m.push(r.banner[u]+"px"),s[0][1]="banner"),(r.header||n.menu||n.aside)&&(m.push((r.header?.[u]??qe.header[u])+"px"),s[1][1]="header"),r.mainHeader&&(m.push(r.mainHeader[u]+"px"),s[2][1]="mainHeader"),m.push("1fr"),s[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[u]+"px"),s[4][1]="mainFooter"),r.footer&&(m.push(r.footer[u]+"px"),s[5][1]="footer"),s=Vt(s),{columns:p.join(" "),rows:m.join(" "),areas:s.map(d=>`"${d.join(" ")}"`).join(`
|
|
2
|
-
`),displayMenu:!1,displayAside:!1,menuWidth:
|
|
3
|
-
`),displayMenu:!0,displayAside:!1,menuWidth:
|
|
4
|
-
`),displayMenu:!0,displayAside:!0,menuWidth:qe.menu[u]+"px",asideWidth:qe.aside[u]+"px"}}return({width:u,breakpoint:s})=>o(`<=${t}`,u)?c(s):o(`<=${a}`,u)?l(s):i(s)}const wr=["menu","aside"],Cr=["banner","header","mainHeader","mainFooter","footer"];function Vr(t,{displayMenu:a},n){return t?a?"block":n?"float":"none":"none"}function Sr(t,{displayAside:a},n){return t?a?"block":n?"float":"none":"none"}function xr({smallBreakpoint:t="sm",mediumBreakpoint:a="md",...n}){const r=Object.fromEntries(wr.filter(c=>n[c]).map(c=>[c,na(n[c].width??{},qe[c])])),o=Object.fromEntries(Cr.filter(c=>n[c]).map(c=>[c,na(n[c].height??{},qe[c])]));return e.Use(_.BeatUII18n,c=>Oa(({value:l,is:i})=>{const u=_r({smallBreakpoint:t,mediumBreakpoint:a,vertical:r,horizontal:o,is:i}),s=l.map(u),p=o.header!=null||r.menu!=null||r.aside!=null,m=e.computedOf(r.aside!=null,s)((w,{displayAside:k})=>w&&!k),h=e.computedOf(r.menu!=null,s)((w,{displayMenu:k})=>w&&!k),d=Ne.useAnimatedElementToggle(),b=Ne.useAnimatedElementToggle(),f=e.prop(0),g=e.computedOf(r.menu!=null,s,d.display)(Vr),y=e.computedOf(r.aside!=null,s,b.display)(Sr);return e.html.div(e.style.display("grid"),e.style.height("100%"),e.style.width("100%"),e.style.gridTemplateColumns(s.$.columns),e.style.gridTemplateRows(s.$.rows),e.style.gridTemplateAreas(s.$.areas),e.style.gridColumnGap("0"),e.style.gridRowGap("0"),n.banner?e.html.header(e.attr.class(ze("none",n.banner.shadow??"none")),Ke(n.banner.color??"white"),e.style.height("100%"),e.style.gridArea("banner"),n.banner.content):null,e.html.header(e.attr.class(ze("bottom",n.header?.shadow??"none")),Ke(n.header?.color??"white"),e.style.zIndex("20"),e.style.display(p?"block":"none"),e.style.gridArea("header"),Te.ElementRect(w=>(w.$.bottom.feedProp(f),null)),e.html.div(e.style.display("flex"),e.style.height("100%"),e.html.div(e.style.display(h.map(w=>w?"flex":"none")),e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),se.Button({onClick:()=>d.toggle(),variant:"light",color:"base"},e.aria.label(c.$.toggleMenu),_.Icon({icon:d.display.map(w=>w?"line-md/menu-to-close-alt-transition":"line-md/close-to-menu-alt-transition")}))),e.html.div(e.style.height("100%"),e.style.flexGrow("1"),n.header?.content),e.html.div(e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),e.style.display(m.map(w=>w?"flex":"none")),se.Button({onClick:()=>b.toggle(),roundedness:"full",variant:"light",color:"base"},e.aria.label(c.$.toggleAside),_.Icon({icon:"line-md/chevron-left"},e.attr.style("transition: transform 0.2s ease-in-out"),e.attr.style(b.display.map(w=>`transform: rotate(${w?180:0}deg)`))))))),n.menu?e.html.nav(e.WithElement(w=>d.setElement(w)),e.style.zIndex("10"),e.aria.label(c.$.mainNavigation),e.attr.role("navigation"),e.style.overflow("hidden"),e.attr.class(g.map(w=>w==="float"?ze("right",n.menu?.shadow??"md"):ze("right",n.menu?.shadow??"none"))),Ke(n.menu?.color??"white"),e.style.height(g.map(w=>w==="float"?"auto":"100%")),e.style.overflow("hidden"),e.style.gridArea("menu"),e.style.display(e.computedOf(g,d.status)((w,k)=>w==="none"&&k==="closed"?"none":"block")),e.style.position(e.computedOf(g,d.status)((w,k)=>w==="float"||w==="none"&&k!=="closed"?"fixed":"initial")),e.style.top(f.map(w=>`${w}px`)),e.WithElement(w=>{w.style.setProperty("--slide-distance","100%")}),Ne.AnimatedToggleClass({animation:{slide:"right"},status:e.computedOf(g,d.status)((w,k)=>w==="block"?"opened":k)}),e.style.width(e.coalesce(n.menu?.width,s.$.menuWidth)),e.style.bottom("0"),n.menu?.content):null,n.mainHeader?e.html.header(e.style.height("100%"),e.style.gridArea("mainHeader"),e.attr.class(ze("none",n.mainHeader?.shadow??"none")),Ke(n.mainHeader?.color??"white"),n.mainHeader.content):null,e.html.main(e.style.height("100%"),e.style.overflow("hidden"),e.style.gridArea("main"),e.attr.class(ze("none",n.main?.shadow??"none")),Ke(n.main?.color??"white"),n.main.content),n.mainFooter?e.html.footer(e.style.height("100%"),e.style.gridArea("mainFooter"),e.attr.class(ze("none",n.mainFooter?.shadow??"none")),Ke(n.mainFooter?.color??"white"),n.mainFooter.content):null,n.aside?e.html.aside(e.WithElement(w=>{b.setElement(w)}),e.style.zIndex("10"),e.aria.label(c.$.sidebar),e.attr.role("complementary"),e.attr.class(y.map(w=>w==="float"?ze("left","md"):ze("left","none"))),Ke("white"),e.style.height("100%"),e.style.gridArea("aside"),e.style.display(e.computedOf(y,b.status)((w,k)=>w==="none"&&k==="closed"?"none":"block")),e.style.position(e.computedOf(y,b.status)((w,k)=>w==="float"||w==="none"&&k!=="closed"?"fixed":"initial")),e.style.top(f.map(w=>`${w}px`)),e.WithElement(w=>{w.style.setProperty("--slide-distance","100%")}),Ne.AnimatedToggleClass({animation:{slide:"left"},status:e.computedOf(y,b.status)((w,k)=>w==="block"?"opened":k)}),e.style.width(e.coalesce(n.aside?.width,s.$.asideWidth)),e.style.bottom(f.map(w=>`${w}px`)),n.aside.content):null,n.footer?e.html.footer(e.attr.class(ze("top","none")),Ke("white"),e.style.height("100%"),e.style.gridArea("footer"),n.footer.content):null)}))}function Ir(...t){return e.html.div(e.attr.class("bc-center-h"),e.html.div(e.attr.class("bc-center__content"),...t))}function $r(t){const a=["bc-center"];return t!=="lg"&&a.push(`bc-center--gap-${t}`),a.join(" ")}function Or({gap:t="lg"}={},...a){return e.html.div(e.attr.class(e.computedOf(t)(n=>$r(n??"lg"))),...a)}function ra(t,a,n,r,o){const c=["bc-divider"];return t==="vertical"&&c.push("bc-divider--vertical"),a!=="solid"&&c.push(`bc-divider--${a}`),n!=="default"&&c.push(`bc-divider--tone-${n}`),r&&(c.push("bc-divider--labeled"),o!=="center"&&c.push(`bc-divider--labeled-${o}`)),c.join(" ")}function Tr({orientation:t="horizontal",variant:a="solid",tone:n="default",label:r,labelAlign:o="center"}={}){return r!=null?e.html.div(e.attr.class(e.computedOf(t,a,n,o)((l,i,u,s)=>ra(l??"horizontal",i??"solid",u??"default",!0,s??"center"))),e.attr.role("separator"),e.html.span(e.attr.class("bc-divider__line")),e.html.span(e.attr.class("bc-divider__label"),r),e.html.span(e.attr.class("bc-divider__line"))):e.html.hr(e.attr.class(e.computedOf(t,a,n)((l,i,u)=>ra(l??"horizontal",i??"solid",u??"default",!1,"center"))),e.attr.role("separator"))}const ct=12,ut=40;function Ot(t){return`${t}px`}function tt(t){return e.Value.map(t,Ot)}function Fe(t,a){return Me.biMin(Me.biMax(0n,a),Me.biMax(0n,t))}function Dr({body:t,contentWidth:a,contentHeight:n,header:r,headerHeight:o=0,topStart:c,topEnd:l,footer:i,footerHeight:u=0,bottomStart:s,bottomEnd:p,sidebarStart:m,sidebarStartWidth:h=0,sidebarEnd:d,sidebarEndWidth:b=0,anchorMode:f="container-edge"}){const g=e.prop(0n),y=e.prop(0n),w=tt(o),k=tt(u),v=tt(h),V=tt(b);return e.html.div(e.attr.class("bc-nine-slice-container"),e.attr.tabindex(0),e.attr.role("group"),e.aria.label("Scrollable grid view"),Te.ElementRect(C=>{const S=e.computedOf(C.$.width,h,b)((O,W,ce)=>O-W-ce),D=e.computedOf(C.$.height,o,u)((O,W,ce)=>O-W-ce),B=e.computedOf(a,S)((O,W)=>O>BigInt(Math.max(0,W))),$=e.computedOf(n,D)((O,W)=>O>BigInt(Math.max(0,W))),R=e.computedOf(S,$)((O,W)=>W?O-ct:O),G=e.computedOf(D,B)((O,W)=>W?O-ct:O),A=R.map(Ot),j=G.map(Ot),E=e.computedOf(n,G)((O,W)=>Me.biMax(0n,O-BigInt(Math.max(1,W)))),q=e.computedOf(a,R)((O,W)=>Me.biMax(0n,O-BigInt(Math.max(1,W)))),J=e.Value.map(f,O=>O==="body-end"||O==="body-end-bottom"),ae=e.When(J,()=>e.style.left(e.computedOf(h,a,R,b)((O,W,ce,ue)=>{const Oe=O+Number(W),we=O+ce,Ae=Math.min(Oe,we);return`${Math.max(O+ue,Ae)}px`})),()=>e.style.right("0")),M=e.Value.map(f,O=>O==="body-bottom"||O==="body-end-bottom"),K=e.When(M,()=>e.style.top(e.computedOf(o,n,G,u)((O,W,ce,ue)=>{const Oe=O+Number(W),we=O+ce,Ae=Math.min(Oe,we);return`${Math.max(O+ue,Ae)}px`})),()=>e.style.bottom("0")),te=e.computedOf($)(O=>O?`${ct}px`:"0"),N=e.computedOf(B)(O=>O?`${ct}px`:"0"),I=e.style.transform(e.computedOf(y,g,B,$)((O,W,ce,ue)=>{const Oe=ce?`translateX(-${O}px)`:"",we=ue?`translateY(-${W}px)`:"";return`${Oe} ${we}`.trim()||"none"})),L=e.style.transform(y.map(O=>`translateX(-${O}px)`)),Z=e.style.transform(g.map(O=>`translateY(-${O}px)`));let pe=null,be=0,ve=0;const H=()=>{const O=E.value,W=q.value,ce=$.value,ue=B.value;ce&&ve!==0&&g.set(Fe(g.value+BigInt(Math.round(ve)),O)),ue&&be!==0&&y.set(Fe(y.value+BigInt(Math.round(be)),W)),be=0,ve=0,pe=null};q.on(O=>{y.value>O&&y.set(Me.biMax(0n,O))}),E.on(O=>{g.value>O&&g.set(Me.biMax(0n,O))}),B.on(O=>{O||y.set(0n)}),$.on(O=>{O||g.set(0n)});const ie=e.createInertiaHandler((O,W)=>{const ce=q.value,ue=E.value;B.value&&y.set(Fe(y.value-BigInt(Math.round(O)),ce)),$.value&&g.set(Fe(g.value-BigInt(Math.round(W)),ue))},{friction:.92,minVelocity:.5});let de=null;const xe=typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,ke=e.computedOf(R,a)((O,W)=>{const ce=Number(W);return ce>0?Math.max(24,O*O/ce):0}),F=e.computedOf(R,ke)((O,W)=>Math.max(1,O-W)),Y=e.computedOf(y,q,F)((O,W,ce)=>{const ue=Number(W);return ue>0?Number(O)/ue*ce:0}),ne=e.computedOf(G,n)((O,W)=>{const ce=Number(W);return ce>0?Math.max(24,O*O/ce):0}),x=e.computedOf(G,ne)((O,W)=>Math.max(1,O-W)),le=e.computedOf(g,E,x)((O,W,ce)=>{const ue=Number(W);return ue>0?Number(O)/ue*ce:0});function ye(O,W,ce,ue){return e.on.pointerdown(Oe=>{Oe.preventDefault(),Oe.stopPropagation();const we=O==="horizontal"?Oe.clientX:Oe.clientY,Ae=Number(W.value),Ue=z=>{const ee=O==="horizontal"?z.clientX-we:z.clientY-we,oe=e.Value.get(ue),me=Number(e.Value.get(ce));if(oe>0&&me>0){const fe=Ae+ee/oe*me;W.set(Fe(BigInt(Math.round(fe)),e.Value.get(ce)))}},P=()=>{window.removeEventListener("pointermove",Ue),window.removeEventListener("pointerup",P)};window.addEventListener("pointermove",Ue),window.addEventListener("pointerup",P)})}function Ce(O,W,ce,ue,Oe){return e.on.pointerdown(we=>{const Ae=we.target;if(!Ae.classList.contains("bc-nine-slice-scrollbar-track"))return;we.preventDefault();const Ue=Ae.getBoundingClientRect(),P=O==="horizontal"?we.clientX-Ue.left:we.clientY-Ue.top,z=e.Value.get(Oe)/2,ee=e.Value.get(ue),oe=Number(e.Value.get(ce));if(ee>0&&oe>0){const me=Math.max(0,Math.min(1,(P-z)/ee));W.set(Fe(BigInt(Math.round(me*oe)),e.Value.get(ce)))}})}return e.Fragment(e.OnDispose(()=>{pe&&clearTimeout(pe),de&&de.dispose()}),e.on.wheel(O=>{O.preventDefault(),be+=O.deltaX,ve+=O.deltaY,pe||(pe=setTimeout(H,16))}),e.on.keydown(O=>{const W=B.value,ce=$.value;let ue=!1;switch(O.key){case"ArrowUp":ce&&(g.set(Fe(g.value-BigInt(ut),E.value)),ue=!0);break;case"ArrowDown":ce&&(g.set(Fe(g.value+BigInt(ut),E.value)),ue=!0);break;case"ArrowLeft":W&&(y.set(Fe(y.value-BigInt(ut),q.value)),ue=!0);break;case"ArrowRight":W&&(y.set(Fe(y.value+BigInt(ut),q.value)),ue=!0);break;case"PageUp":ce&&(g.set(Fe(g.value-BigInt(Math.round(G.value)),E.value)),ue=!0);break;case"PageDown":ce&&(g.set(Fe(g.value+BigInt(Math.round(G.value)),E.value)),ue=!0);break;case"Home":ce&&(g.set(0n),ue=!0),W&&(y.set(0n),ue=!0);break;case"End":ce&&(g.set(E.value),ue=!0),W&&(y.set(q.value),ue=!0);break}ue&&O.preventDefault()}),e.html.div(e.attr.class("bc-nine-slice-pane-container"),e.style.right(te),e.style.bottom(N),c!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-start"),e.style.top("0"),e.style.left("0"),e.style.width(v),e.style.height(w),c):null,r!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-header"),e.style.top("0"),e.style.left(v),e.style.width(A),e.style.height(w),e.html.div(e.attr.class("bc-nine-slice-pane-content"),L,r)):null,l!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-end"),e.style.top("0"),ae,e.style.width(V),e.style.height(w),l):null,m!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-start"),e.style.left("0"),e.style.top(w),e.style.width(v),e.style.height(j),e.html.div(e.attr.class("bc-nine-slice-pane-content"),Z,m)):null,e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-body"),e.style.left(v),e.style.top(w),e.style.width(A),e.style.height(j),e.on.pointerdown(O=>{if(O.button!==0)return;de&&(de.dispose(),de=null),ie.track(O.clientX,O.clientY);const W=we=>{const Ae=we.clientX-ce,Ue=we.clientY-ue;ce=we.clientX,ue=we.clientY,ie.track(we.clientX,we.clientY);const P=q.value,z=E.value;B.value&&y.set(Fe(y.value-BigInt(Math.round(Ae)),P)),$.value&&g.set(Fe(g.value-BigInt(Math.round(Ue)),z))};let ce=O.clientX,ue=O.clientY;const Oe=()=>{xe?.matches||(de=ie.release()),window.removeEventListener("pointermove",W),window.removeEventListener("pointerup",Oe)};window.addEventListener("pointermove",W),window.addEventListener("pointerup",Oe)}),e.style.cursor(e.computedOf(B,$)((O,W)=>O||W?"grab":"default")),e.html.div(e.attr.class("bc-nine-slice-pane-content"),I,t)),d!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),ae,e.style.top(w),e.style.width(V),e.style.height(j),e.html.div(e.attr.class("bc-nine-slice-pane-content"),Z,d)):null,s!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-start"),e.style.left("0"),K,e.style.width(v),e.style.height(k),s):null,i!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-footer"),e.style.left(v),K,e.style.width(A),e.style.height(k),e.html.div(e.attr.class("bc-nine-slice-pane-content"),L,i)):null,p!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-end"),ae,K,e.style.width(V),e.style.height(k),p):null),e.html.div(e.attr.class(B.map(O=>`bc-nine-slice-scrollbar bc-nine-slice-scrollbar--horizontal${O?"":" bc-nine-slice-scrollbar--hidden"}`)),e.style.left(tt(h)),e.style.right(te),Ce("horizontal",y,q,F,ke),e.WithElement(O=>(e.Value.on(q,W=>{O.setAttribute("aria-valuemax",String(W))}),e.Value.on(y,W=>{O.setAttribute("aria-valuenow",String(W))}),e.Fragment(e.attr.role("scrollbar"),e.aria.orientation("horizontal"),e.aria.valuemin(0),e.html.div(e.attr.class("bc-nine-slice-scrollbar-track"),e.html.div(e.attr.class("bc-nine-slice-scrollbar-thumb"),e.style.width(ke.map(W=>`${W}px`)),e.style.transform(Y.map(W=>`translateX(${W}px)`)),ye("horizontal",y,q,F))))))),e.html.div(e.attr.class($.map(O=>`bc-nine-slice-scrollbar bc-nine-slice-scrollbar--vertical${O?"":" bc-nine-slice-scrollbar--hidden"}`)),e.style.top(w),e.style.bottom(N),Ce("vertical",g,E,x,ne),e.WithElement(O=>(e.Value.on(E,W=>{O.setAttribute("aria-valuemax",String(W))}),e.Value.on(g,W=>{O.setAttribute("aria-valuenow",String(W))}),e.Fragment(e.attr.role("scrollbar"),e.aria.orientation("vertical"),e.aria.valuemin(0),e.html.div(e.attr.class("bc-nine-slice-scrollbar-track"),e.html.div(e.attr.class("bc-nine-slice-scrollbar-thumb"),e.style.height(ne.map(W=>`${W}px`)),e.style.transform(le.map(W=>`translateY(${W}px)`)),ye("vertical",g,E,x))))))))}))}function Pr(t){return e.attr.class(`bc-flex--gap-${t}`)}function Er(t){return e.attr.class(`bc-flex--align-${t}`)}function Fr(t){return e.attr.class(`bc-flex--justify-${t}`)}const Ar=e.attr.class("bc-flex--wrap"),Br=e.attr.class("bc-flex--nowrap"),Mr=e.attr.class("bc-flex--grow");function Tt({header:t,footer:a,body:n,shadowOnScroll:r=!0},...o){const c=e.prop("none");function l(u){const s=u.scrollTop<=1,p=u.scrollTop+u.clientHeight>=u.scrollHeight-2;s&&p?c.set("none"):s?c.set("bottom"):p?c.set("top"):c.set("both")}return e.html.div(e.attr.class(e.computedOf(c,r)((u,s)=>{const p=["bc-scrollable-panel"];return s&&((u==="top"||u==="both")&&p.push("bc-scrollable-panel--scrolled-down"),(u==="bottom"||u==="both")&&p.push("bc-scrollable-panel--scrolled-up")),p.join(" ")})),t&&e.html.div(e.attr.class("bc-scrollable-panel__header"),t),e.html.div(e.attr.class("bc-scrollable-panel--header-shadow"),e.html.div()),e.html.div(e.attr.class("bc-scrollable-panel__body"),e.WithElement(u=>{l(u);const s=new ResizeObserver(()=>l(u));s.observe(u);const p=new MutationObserver(()=>{requestAnimationFrame(()=>l(u))});return p.observe(u,{childList:!0,subtree:!0}),e.OnDispose(()=>{s.disconnect(),p.disconnect()})}),e.on.scroll(u=>{const s=u.target;l(s)}),n),e.html.div(e.attr.class("bc-scrollable-panel--footer-shadow"),e.html.div()),a&&e.html.div(e.attr.class("bc-scrollable-panel__footer"),a),...o)}function Lr(t,a,n){const r=["bc-sink"];return t!=="default"&&r.push(`bc-sink--${t}`),a!=="md"&&r.push(`bc-sink--padding-${a}`),n!=="lg"&&r.push(`bc-sink--rounded-${n}`),r.join(" ")}function Nr({variant:t="default",size:a="md",roundedness:n="lg"}={},...r){return e.html.div(e.attr.class(e.computedOf(t,a,n)((o,c,l)=>Lr(o??"default",c??"md",l??"lg"))),...r)}const Wr=[{value:"contains",labelKey:"filterPanelContains"},{value:"notContains",labelKey:"filterPanelNotContains"},{value:"equals",labelKey:"filterPanelEquals"},{value:"notEquals",labelKey:"filterPanelNotEquals"},{value:"startsWith",labelKey:"filterPanelStartsWith"},{value:"endsWith",labelKey:"filterPanelEndsWith"},{value:"isNull",labelKey:"filterPanelIsNull"},{value:"isNotNull",labelKey:"filterPanelIsNotNull"}],Ur=[{value:"eq",labelKey:"filterPanelEquals"},{value:"neq",labelKey:"filterPanelNotEquals"},{value:"gt",labelKey:"filterPanelGt"},{value:"gte",labelKey:"filterPanelGte"},{value:"lt",labelKey:"filterPanelLt"},{value:"lte",labelKey:"filterPanelLte"},{value:"between",labelKey:"filterPanelBetween"},{value:"isNull",labelKey:"filterPanelIsNull"},{value:"isNotNull",labelKey:"filterPanelIsNotNull"}],Rr=new Set(["isNull","isNotNull"]);function zr(t,a,n){const r=a.operator;if(r==="isNull")return Se.isNull(t);if(r==="isNotNull")return Se.isNotNull(t);if(a.value==="")return null;if(n==="number"){if(r==="between"){const c=a.value.split(",").map(Number);return c.length===2&&!c.some(isNaN)?Se.between(t,c[0],c[1]):null}const o=Number(a.value);if(Number.isNaN(o))return null;switch(r){case"eq":return Se.eq(t,o);case"neq":return Se.neq(t,o);case"gt":return Se.gt(t,o);case"gte":return Se.gte(t,o);case"lt":return Se.lt(t,o);case"lte":return Se.lte(t,o);default:return null}}return Se.text(t,r,a.value)}function Dt(t,a){switch(t.kind){case"text":return[{id:a(),operator:t.operator,value:t.value}];case"compare":return[{id:a(),operator:t.operator,value:String(t.value)}];case"range":return[{id:a(),operator:"between",value:`${t.min},${t.max}`}];case"null":return[{id:a(),operator:t.operator,value:""}];case"composite":return t.filters.flatMap(n=>Dt(n,a));default:return[]}}function Hr(){let t=0;return()=>++t}function jr(t,a,n=""){return{opProp:e.prop(t),valProp:e.prop(a),val2Prop:e.prop(n)}}function oa(t){t.opProp.dispose(),t.valProp.dispose(),t.val2Prop.dispose()}function ot(t){const{dataSource:a,column:n,columnType:r="text",size:o="sm",embedded:c=!1}=t,l=Hr(),i=a.getColumnFilters(n),u=i.map(S=>S.length>0),s=new Map,p=e.prop([]),m=e.prop("and");function h(){return r==="number"?"eq":"contains"}function d(){return r==="number"?"0":""}function b(S,D,B=""){const $=l();return s.set($,jr(S,D,B)),$}function f(){for(const S of s.values())oa(S);s.clear()}function g(){f();const S=i.value;let D;if(S.length===0)D=[{id:0,operator:h(),value:d()}],m.set("and");else{const $=S.find(R=>R.kind==="composite");$?(m.set($.mode),D=Dt($,l)):(m.set("and"),D=S.flatMap(R=>R.kind==="text"||R.kind==="compare"||R.kind==="range"||R.kind==="null"||R.kind==="composite"?Dt(R,l):[])),D.length===0&&(D=[{id:0,operator:h(),value:d()}])}const B=[];for(const $ of D)if($.operator==="between"&&$.value.includes(",")){const[R,G]=$.value.split(",");B.push(b($.operator,R,G))}else B.push(b($.operator,$.value));p.set(B)}function y(){const S=b(h(),d());p.set([...p.value,S])}function w(S){const D=s.get(S);D&&(oa(D),s.delete(S));const B=p.value.filter($=>$!==S);B.length===0?y():p.set(B)}function k(){const D=p.value.map(B=>{const $=s.get(B);if(!$)return null;const R=$.opProp.value;if(R==="between"){const G=Number($.valProp.value),A=Number($.val2Prop.value);return Number.isNaN(G)||Number.isNaN(A)?null:Se.between(n,G,A)}return zr(n,{operator:R,value:$.valProp.value},r)}).filter(B=>B!=null);D.length===0?a.removeFilter(n):D.length===1?a.setFilter(D[0]):a.setFilter(Se.composite(n,m.value,D))}function v(){a.removeFilter(n),f();const S=b(h(),d());p.set([S]),m.set("and")}const V=r==="number"?Ur:Wr,C=()=>e.Use(_.BeatUII18n,S=>{g();const D=S.$.dataTable,B=V.map($=>Le.value($.value,D.value[$.labelKey]));return e.html.div(e.attr.class("bc-column-filter-panel"),e.on.click($=>$.stopPropagation()),e.When(p.map($=>$.length>=2),()=>e.html.div(e.attr.class("bc-column-filter-panel__mode"),Q.SegmentedInput({options:{and:D.map($=>$.filterPanelAnd),or:D.map($=>$.filterPanelOr)},value:m,onChange:$=>m.set($),size:"xs"}))),e.html.div(e.attr.class("bc-column-filter-panel__conditions"),e.ForEach(p,$=>e.MapSignal($,R=>{const G=s.get(R);if(!G)return null;const A=D.map(J=>J.filterPanelValuePlaceholder),j=(J,ae)=>Q.NumberInput({value:J.map(M=>M===""?0:Number(M)),size:"xs",class:"bc-column-filter-panel__value",placeholder:A,onChange:M=>J.set(String(M))}),E=J=>Ee.TextInput({value:J,size:"xs",class:"bc-column-filter-panel__value",placeholder:A,onInput:ae=>J.set(ae)}),q=()=>{if(r==="number"){const J=G.opProp.map(ae=>ae==="between");return e.Fragment(j(G.valProp),e.When(J,()=>j(G.val2Prop)))}return E(G.valProp)};return e.html.div(e.attr.class("bc-column-filter-panel__row"),e.html.div(e.attr.class("bc-column-filter-panel__row-header"),Q.NativeSelect({value:G.opProp,options:B,size:"xs",class:"bc-column-filter-panel__operator",onChange:J=>G.opProp.set(J)}),re.CloseButton({size:"xs",onClick:()=>w(R)})),e.html.div(e.attr.class(G.opProp.map(J=>Rr.has(J)?"bc-column-filter-panel__value-wrap bc-column-filter-panel__value-wrap--hidden":"bc-column-filter-panel__value-wrap")),q()))}))),e.html.div(e.attr.class("bc-column-filter-panel__add"),e.html.button(e.attr.type("button"),e.attr.class("bc-column-filter-panel__add-btn"),e.on.click(()=>y()),"+ ",D.map($=>$.filterPanelAddCondition))),e.html.div(e.attr.class("bc-column-filter-panel__actions"),se.Button({size:"xs",variant:"light",color:"danger",onClick:()=>v()},_.Icon({icon:"lucide:trash-2",size:"xs"}),D.map($=>$.filterPanelClear)),se.Button({size:"xs",variant:"filled",onClick:()=>k()},D.map($=>$.filterPanelApply))))});if(c){const S=i.on(()=>{g()});return e.Fragment(e.OnDispose(()=>{S(),f(),p.dispose(),m.dispose()}),C())}return e.Fragment(e.OnDispose(()=>{f(),p.dispose(),m.dispose()}),e.html.div(e.attr.class("bc-column-filter-panel__trigger-wrap"),e.html.button(e.attr.class(u.map(S=>S?"bc-column-filter-panel__trigger bc-column-filter-panel__trigger--active":"bc-column-filter-panel__trigger")),e.attr.type("button"),_.Icon({icon:"lucide:filter",size:o}),e.When(u,()=>e.html.span(e.attr.class("bc-column-filter-panel__active-dot"))),e.When(u,()=>e.Use(_.BeatUII18n,S=>{const D=S.value.dataTable.describeFilter;return rt({content:i.map(B=>{if(B.length===0)return"";const $=B[0];return D?ft($,D):Nt($)}),showDelay:500})})),Ve.Flyout({content:()=>C(),placement:"bottom-start",showOn:"click",showDelay:0,hideDelay:0}))))}function qr(t){return t===!0?{}:t===!1||t==null?!1:t}function Gr(t,a,n){if(a<=0)return[t];const r=[];let o=[],c=0;for(const l of t){const i=n.has(l.key)?1:l.rows.length;if(i<=a)c>0&&c+i>a&&(r.push(o),o=[],c=0),o.push(l),c+=i;else{c>0&&(r.push(o),o=[],c=0);let u=0;for(;u<l.rows.length;){const s=l.rows.slice(u,u+a);o.push({key:l.key,rows:s}),c=s.length,u+a<l.rows.length&&(r.push(o),o=[],c=0),u+=a}}}return o.length>0&&r.push(o),r.length>0?r:[[]]}function Yr(t){return t===!0?{pageSize:10}:t===!1||t==null?!1:t}function Kr(t,a,n,r){if(t==null||t===!1)return null;if(t===!0||t==="text")return e.html.div(e.attr.class("bc-column-filter-panel"),Ze({dataSource:a,column:n,size:r}));if(t==="number")return ot({dataSource:a,column:n,columnType:"number",size:r,embedded:!0});if(typeof t=="object"&&"render"in t)return t.render({dataSource:a,column:n,size:r});if(typeof t=="object"&&"input"in t)return Da(t,a,n,r);if(typeof t=="object"&&"type"in t)switch(t.type){case"select":return e.html.div(e.attr.class("bc-column-filter-panel"),Ze({dataSource:a,column:n,type:"select",options:t.options,size:r}));case"tags":return e.html.div(e.attr.class("bc-column-filter-panel"),Ze({dataSource:a,column:n,type:"tags",options:t.options,size:r}));case"panel":return ot({dataSource:a,column:n,columnType:t.valueType,size:r,embedded:!0})}return null}function Da(t,a,n,r){const o=a.getTextFilterValue(n),c=e.prop(o.value);let l=!1;return o.on(i=>{!l&&c.value!==i&&(l=!0,c.set(i),l=!1)}),c.on(i=>{!l&&o.value!==i&&(l=!0,i===""?a.removeFilter(n):a.setFilter(Se.text(n,"contains",i)),l=!1)}),t.input(c,r)}function Xr(t,a,n,r){if(t==null||t===!1)return e.html.th();if(t===!0||t==="text")return e.html.th(Ze({dataSource:a,column:n,size:r}));if(t==="number")return e.html.th(ot({dataSource:a,column:n,columnType:"number",size:r}));if(typeof t=="object"&&"render"in t)return e.html.th(t.render({dataSource:a,column:n,size:r}));if(typeof t=="object"&&"input"in t)return e.html.th(Da(t,a,n,r));if(typeof t=="object"&&"type"in t)switch(t.type){case"select":return e.html.th(Ze({dataSource:a,column:n,type:"select",options:t.options,size:r}));case"tags":return e.html.th(Ze({dataSource:a,column:n,type:"tags",options:t.options,size:r}));case"panel":return e.html.th(ot({dataSource:a,column:n,columnType:t.valueType,size:r}))}return e.html.th()}function Pa(t){if(t.filter!=null)return e.Value.get(t.filter)}function Ea(t){return t.filter!=null}function Zr(t){const{data:a,columns:n,rowId:r,sortable:o=!1,filterable:c=!1,selectable:l=!1,reorderableColumns:i=!1,onColumnOrderChange:u,pagination:s,toolbar:p,size:m="md",hoverable:h=!1,onSortChange:d,onFilterChange:b,onSelectionChange:f,onGroupByChange:g,onRowClick:y,serverSide:w=!1,loading:k=!1,groupBy:v,groupCollapsible:V=!0,showFooter:C=!1,groupSummary:S,emptyContent:D,hiddenColumns:B=[],onDataSource:$}=t,R=e.Value.map(o,U=>!!U),G=e.Value.map(o,U=>U==="multi"),A=e.Value.map(c,U=>!!U),j=e.Value.map(c,U=>U==="row"?"row":"header"),E=e.Value.map(l,U=>!!U),q=e.Value.map(l,U=>typeof U=="object"?U.position==="after":!1),J=e.Value.map(l,U=>typeof U=="object"?U.selectOnRowClick??!1:!1),ae=e.Value.deriveProp(B),M=e.Value.map(s??!1,U=>Yr(U??!1)),K=e.Value.toSignal(p??!1).map(qr),te=n.filter(U=>{const ge=U.hideable;return ge==null?!1:typeof ge=="boolean"?ge:ge.value}),N=e.Value.map(ae??[],U=>U.length>0),I=e.prop(n.map(U=>U.id)),L=new Map(n.map(U=>[U.id,U])),Z=U=>L.get(U),pe=e.computedOf(i,ae,I)((U,ge,Re)=>U?Re.filter(Ye=>!ge.includes(Ye)&&L.has(Ye)):n.filter(Ye=>!ge.includes(Ye.id)).map(Ye=>Ye.id)),be=U=>{const ge=new Set(ae.value);ge.has(U)?ge.delete(U):ge.add(U),ae.set(Array.from(ge))},ve=()=>{ae.set(Array.from(n.map(U=>U.id)))},H={},ie={};for(const U of n)U.value&&(H[U.id]=U.value),U.comparator&&(ie[U.id]=U.comparator);const de=Ca({data:a,rowId:r,accessors:H,comparators:ie,...s!=null?{pageSize:e.Value.map(M,U=>U===!1?0:U?.pageSize??10)}:{},multiSort:G,serverSide:w,groupBy:v,onSortChange:d,onFilterChange:b,onSelectionChange:f,onGroupByChange:g});$?.(de);const xe=e.Value.toSignal(h),ke=e.Value.toSignal(J),F=e.Value.toSignal(E),Y=e.computedOf(xe,ke,F)((U,ge,Re)=>U||ge&&Re||y!=null),ne=e.computedOf(ke,F)((U,ge)=>U&&ge||y!=null),le=n.some(U=>U.filter!=null)?e.Value.map(A,U=>!!U):!1,ye=n.some(U=>U.footer!=null),Ce=e.Value.toSignal(e.Value.map(M,U=>U!==!1)),O=e.prop(new Set),W=e.Value.toSignal(e.Value.map(M,U=>U===!1?0:U?.pageSize??10)),ce=e.Value.toSignal(w),ue=e.prop(1),Oe=e.computedOf(de.groups,W,O,ce)((U,ge,Re,Ye)=>Ye?[U]:Gr(U,ge,Re)),we=Oe.map(U=>U.length),Ae=e.Value.on(we,U=>{ue.value>U&&ue.set(Math.max(1,U))}),Ue=e.computedOf(Oe,ue)((U,ge)=>{const Re=Math.max(0,Math.min(ge-1,U.length-1));return U[Re]??[]}),P=e.computedOf(de.groupBy,de.totalPages,we)((U,ge,Re)=>U!=null?Re:ge),z=e.computedOf(de.groupBy,de.currentPage,ue)((U,ge,Re)=>U!=null?Re:ge),ee=U=>{if(de.groupBy.value!=null){const ge=Math.max(1,Math.min(U,we.value));ue.set(ge)}else de.setPage(U)},oe=e.computedOf(Ce,P)((U,ge)=>U&&ge>1),me=e.computedOf(pe,F)((U,ge)=>U.length+(ge?1:0));return{ds:de,columns:n,columnMap:L,getCol:Z,rowId:r,visibleColumns:pe,hiddenColumns:ae,hideableColumns:te,hasColumnVisibility:N,toggleColumnVisibility:be,showAllColumns:ve,columnOrder:I,reorderableColumns:i,onColumnOrderChange:u,dragState:{columnId:null},selectable:E,selectableSignal:F,selectOnRowClickSignal:ke,selectionAfter:q,sortable:R,multiSort:G,size:m,onRowClick:y,filterLayout:j,hasFilters:le,loading:k,showFooter:C,emptyContent:D,groupCollapsible:V,groupSummary:S,hasFooter:ye,rowClickable:ne,effectiveHoverable:Y,totalColSpan:me,collapsedGroups:O,currentGroupPageGroups:Ue,toolbarConfig:K,paginationConfig:M,paginationEnabledSignal:Ce,pageSizeSignal:W,effectiveTotalPages:P,effectiveCurrentPage:z,setEffectivePage:ee,showPagination:oe,dispose:()=>{de.dispose(),ae.dispose(),pe.dispose(),me.dispose(),I.dispose(),O.dispose(),xe.dispose(),ke.dispose(),F.dispose(),Y.dispose(),ne.dispose(),Ce.dispose(),W.dispose(),ce.dispose(),ue.dispose(),Ae(),Oe.dispose(),we.dispose(),Ue.dispose(),P.dispose(),z.dispose(),oe.dispose(),K.dispose()}}}function Fa({dataSource:t,column:a,size:n,actions:r,menu:o,hideInactiveIcon:c=!1,multiSort:l=!0,draggable:i,onDragStart:u,onDragOver:s,onDrop:p,onDragEnd:m},...h){const d=t.getSortDirection(a),b=d.map(g=>{switch(g){case"asc":return"line-md:arrow-small-up";case"desc":return"line-md:arrow-small-down";default:return"line-md:arrows-vertical"}}),f=d.map(g=>{const y="bc-sortable-header";return g==="asc"?`${y} ${y}--asc`:g==="desc"?`${y} ${y}--desc`:y});return e.html.th(e.attr.class(f),e.attr.role("columnheader"),i!=null?e.attr.draggable(e.Value.map(i,g=>g?"true":void 0)):null,u!=null?e.on.dragstart(u):null,s!=null?e.on.dragover(s):null,p!=null?e.on.drop(p):null,m!=null?e.on.dragend(m):null,e.aria.sort(d.map(g=>g==="asc"?"ascending":g==="desc"?"descending":"none")),e.on.click(g=>t.toggleSort(a,{multi:g.shiftKey})),e.html.div(e.attr.class("bc-sortable-header__content"),e.html.span(e.attr.class("bc-sortable-header__label"),...h),e.html.span(e.attr.class("bc-sortable-header__icons"),c?e.When(d.map(g=>g!=null),()=>e.html.span(e.attr.class("bc-sortable-header__icon bc-sortable-header__icon--active"),_.Icon({icon:b,size:n??"md"}),e.When(l,()=>e.Use(_.BeatUII18n,g=>rt({content:g.$.dataTable.map(y=>y.sortMultiHint),showDelay:800}))))):e.html.span(e.attr.class(d.map(g=>g!=null?"bc-sortable-header__icon bc-sortable-header__icon--active":"bc-sortable-header__icon")),_.Icon({icon:b,size:n??"md"}),e.When(l,()=>e.Use(_.BeatUII18n,g=>rt({content:g.$.dataTable.map(y=>y.sortMultiHint),showDelay:800})))),r??null,o!=null?e.html.span(e.attr.class("bc-sortable-header__menu"),e.on.click(g=>g.stopPropagation()),o):null)))}function Aa(t){const{dataSource:a,column:n,sortable:r=!1,hideable:o=!1,size:c="md",onHideColumn:l,hideableColumns:i,hiddenColumns:u,onToggleColumn:s,onResetColumns:p,filterContent:m,hasActiveFilter:h,onClearFilter:d}=t,b=r?a.getSortDirection(n):void 0;return e.Use(_.BeatUII18n,f=>{const g=f.$.dataTable;return Ve.Menu({items:()=>{const y=[],w=b?.value;if(r){const v=[Ve.MenuItem({key:"sort-asc",content:g.map(V=>V.menuSortAsc),before:_.Icon({icon:"line-md:arrow-small-up",size:c}),disabled:b?.map(V=>V==="asc"),onClick:()=>a.setSort([{column:n,direction:"asc"}])}),Ve.MenuItem({key:"sort-desc",content:g.map(V=>V.menuSortDesc),before:_.Icon({icon:"line-md:arrow-small-down",size:c}),disabled:b?.map(V=>V==="desc"),onClick:()=>a.setSort([{column:n,direction:"desc"}])})];w!=null&&v.push(Ve.MenuItem({key:"clear-sort",content:g.map(V=>V.menuClearSort),before:_.Icon({icon:"line-md:arrows-vertical",size:c}),onClick:()=>{const V=a.sort.value.filter(C=>C.column!==n);a.setSort(V)}})),y.push(v)}if(m!=null){const v=[Ve.MenuItem({key:"filter",content:g.map(V=>V.menuFilter??"Filter"),before:_.Icon({icon:"lucide:filter",size:c}),submenu:()=>[e.html.div(e.on.click(V=>V.stopPropagation()),m)]})];d&&h&&v.push(e.When(h,()=>Ve.MenuItem({key:"clear-filter",content:g.map(V=>V.clearFilter),before:_.Icon({icon:"lucide:filter-x",size:c}),onClick:d}))),y.push(v)}if(o&&l&&y.push([Ve.MenuItem({key:"hide-column",content:g.map(v=>v.menuHideColumn),before:_.Icon({icon:"lucide:eye-off",size:c}),onClick:l})]),i&&i.length>0&&u&&s){const v=[Ve.MenuItem({key:"choose-columns",content:g.map(V=>V.menuChooseColumns),before:_.Icon({icon:"lucide:columns-3",size:c}),submenu:()=>[e.html.div(e.attr.class("bc-data-table__column-toggle-panel"),e.on.click(V=>V.stopPropagation()),...i.map(V=>re.CheckboxInput({value:u.map(C=>!C.has(V.id)),onChange:()=>s(V.id),placeholder:V.label})),e.When(u.map(V=>V.size>0),()=>p?se.Button({size:"xs",variant:"outline",onClick:()=>p()},g.$.showAllColumns):null))]})];p&&v.push(e.When(u.map(V=>V.size>0),()=>Ve.MenuItem({key:"reset-columns",content:g.map(V=>V.menuResetColumns),before:_.Icon({icon:"lucide:rotate-ccw",size:c}),onClick:p}))),y.push(v)}const k=[];for(let v=0;v<y.length;v++)v>0&&k.push(Ve.MenuSeparator()),k.push(...y[v]);return k},placement:"bottom-end",showOn:"click"})})}function Jr(t){return t==="checked"?!0:t==="indeterminate"?"mixed":!1}function Qr(t){return t==="unchecked"?"checked":t==="checked"?"indeterminate":"unchecked"}const Ba=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,placeholder:c,disabled:l,id:i,activeIcon:u,inactiveIcon:s,indeterminateIcon:p,size:m="md"}=t,h=i??Pe.sessionId("tri-state-checkbox"),d=`${h}-label`,b=()=>{if(e.Value.get(l??!1))return;const k=e.Value.get(a),v=Qr(k);r?.(v),o?.(v)},f=k=>{e.Value.get(l??!1)||(k.key===" "||k.key==="Enter")&&(k.preventDefault(),b())},g=e.Value.map(a,k=>k==="checked"?"bc-checkbox-input__checkbox--checked":k==="indeterminate"?"bc-checkbox-input__checkbox--indeterminate":"bc-checkbox-input__checkbox--unchecked"),y=e.Value.map(a,k=>Jr(k)),w=e.computedOf(a,u,s,p)((k,v,V,C)=>k==="checked"?v??"ri:checkbox-fill":k==="indeterminate"?C??"mdi:checkbox-indeterminate-outline":V??"mdi:checkbox-blank-outline");return se.InputContainer({baseContainer:!0,growInput:!1,...t,input:e.html.span(e.attr.class("bc-checkbox-input"),e.html.span(e.attr.class("bc-checkbox-input__checkbox"),e.attr.class(g),e.attr.class(e.Value.map(l??!1,k=>k?"bc-checkbox-input__checkbox--disabled":"")),e.attr.id(h),e.attr.role("checkbox"),e.attr.tabindex(e.Value.map(l??!1,k=>k?-1:0)),e.aria.checked(y),e.aria.disabled(l),c!=null?e.aria.labelledby(d):e.Empty,e.on.keydown(f),n!=null?e.on.blur(n):e.Empty,_.Icon({icon:w,accessibility:"decorative",size:m})),c!=null?e.html.label(e.attr.class("bc-checkbox-input__label"),e.attr.id(d),e.attr.for(h),Qe.MutedLabel(c)):e.Empty)},e.on.click(b))};function Rt({dataSource:t,rowId:a,isSelected:n,size:r="md"}){return re.CheckboxInput({size:r,value:n,onChange:()=>t.toggleSelect(e.Value.get(a))})}function Ma({dataSource:t,size:a="md"}){const n=e.computedOf(t.isAllSelected,t.isSomeSelected)((r,o)=>r?"checked":o?"indeterminate":"unchecked");return Ba({size:a,value:n,onChange:()=>{t.isAllSelected.value?t.deselectAll():t.selectAll()}})}function eo(t,a){if(!Ea(t))return;const n=Pa(t);return Kr(n,a.ds,t.id,a.size)??void 0}function to(t,a,n){const r=n.ds.getColumnFilters(t.id),o=r.map(d=>d.length>0),c=t.sortable!=null?t.sortable:!1,l=t.hideable!=null?typeof t.hideable=="boolean"?t.hideable:t.hideable.value:!1,i=Ea(t),u=e.computedOf(n.sortable,c)((d,b)=>!!d&&!!b),s=i?e.computedOf(a,o)((d,b)=>d&&b):!1,p=i?eo(t,n):void 0,m=i?a:!1,h=e.computedOf(u,m)((d,b)=>d||b||l);return e.html.span(e.attr.class("bc-column-header-menu"),e.When(s,()=>e.html.span(e.attr.class("bc-sortable-header__icon bc-sortable-header__icon--active"),e.on.click(d=>d.stopPropagation()),_.Icon({icon:"lucide:filter",size:n.size}),Ve.Flyout({content:()=>e.html.div(e.attr.class("bc-column-filter-panel"),e.on.click(d=>d.stopPropagation()),p??null),placement:"bottom-end",showOn:"click",showDelay:0,hideDelay:0}),e.Use(_.BeatUII18n,d=>{const b=e.computedOf(d.$.dataTable.$.describeFilter,r)((f,g)=>g.map(y=>ft(y,f)).join(", "));return rt({content:b,showDelay:300})}))),e.When(h,()=>e.html.span(e.attr.class("bc-sortable-header__menu"),e.on.click(d=>d.stopPropagation()),_.Icon({icon:"lucide:ellipsis-vertical",size:n.size}),e.MapSignal(e.computedOf(u,m)((d,b)=>({s:d,f:b})),({s:d,f:b})=>Aa({dataSource:n.ds,column:t.id,sortable:d,hideable:l,size:n.size,onHideColumn:l?()=>n.toggleColumnVisibility(t.id):void 0,filterContent:b?p:void 0,hasActiveFilter:b?o:void 0,onClearFilter:b&&i?()=>n.ds.removeFilter(t.id):void 0})))))}function ao(t,a){return{reorderable:a.reorderableColumns,onDragStart:n=>{if(!e.Value.get(a.reorderableColumns))return;a.dragState.columnId=t,n.dataTransfer&&(n.dataTransfer.effectAllowed="move",n.dataTransfer.setData("text/plain",t)),n.currentTarget.classList.add("bc-data-table__header--dragging")},onDragOver:n=>{if(!e.Value.get(a.reorderableColumns)||a.dragState.columnId==null||a.dragState.columnId===t)return;n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.currentTarget.classList.add("bc-data-table__header--drag-over")},onDrop:n=>{if(!e.Value.get(a.reorderableColumns)||(n.preventDefault(),n.currentTarget.classList.remove("bc-data-table__header--drag-over"),a.dragState.columnId==null||a.dragState.columnId===t))return;const o=[...a.columnOrder.value],c=o.indexOf(a.dragState.columnId),l=o.indexOf(t);c<0||l<0||(o.splice(c,1),o.splice(l,0,a.dragState.columnId),a.columnOrder.set(o),a.onColumnOrderChange?.(o),a.dragState.columnId=null)},onDragEnd:n=>{if(!e.Value.get(a.reorderableColumns))return;a.dragState.columnId=null;const r=n.currentTarget;r.classList.remove("bc-data-table__header--dragging"),r.closest("tr")?.querySelectorAll(".bc-data-table__header--drag-over").forEach(o=>o.classList.remove("bc-data-table__header--drag-over"))}}}function no(t,a){return e.MapSignal(t,n=>{const r=a.getCol(n),o=typeof r.header=="string"?r.header:r.header(),c=e.computedOf(a.hasFilters,a.filterLayout)((p,m)=>p&&m==="header"),l=to(r,c,a),i=ao(r.id,a),u=r.sortable!=null?r.sortable:!1,s=e.computedOf(a.sortable,u)((p,m)=>!!p&&!!m);return e.When(s,()=>Fa({dataSource:a.ds,column:r.id,size:a.size,menu:l,multiSort:a.multiSort,draggable:i.reorderable,onDragStart:i.onDragStart,onDragOver:i.onDragOver,onDrop:i.onDrop,onDragEnd:i.onDragEnd},o),()=>e.html.th(e.attr.draggable(e.Value.map(i.reorderable,p=>p?"true":void 0)),e.on.dragstart(i.onDragStart),e.on.dragover(i.onDragOver),e.on.drop(i.onDrop),e.on.dragend(i.onDragEnd),r.width!=null?e.style.width(r.width):null,r.minWidth!=null?e.style.minWidth(r.minWidth):null,r.maxWidth!=null?e.style.maxWidth(r.maxWidth):null,r.align!=null?e.style.textAlign(e.Value.map(r.align,p=>p)):null,e.html.div(e.attr.class("bc-sortable-header__content"),e.html.span(e.attr.class("bc-sortable-header__label"),o),l!=null?e.html.span(e.attr.class("bc-sortable-header__icons"),e.html.span(e.attr.class("bc-sortable-header__menu"),e.on.click(p=>p.stopPropagation()),l)):null)))})}function ro(t,a){return e.MapSignal(t,n=>{const r=a.getCol(n),o=Pa(r);return Xr(o,a.ds,n,a.size)})}function la(t){return e.When(t.selectable,()=>e.html.th(e.attr.class("bc-data-table__selection-header"),e.html.div(e.attr.class("bc-data-table__selection-cell"),Ma({dataSource:t.ds,size:t.size}))))}function sa(t){return e.When(t.selectable,()=>e.html.th())}function oo(t){return e.html.tr(e.When(e.Value.map(t.selectionAfter,a=>!a),()=>la(t)),e.ForEach(t.visibleColumns,a=>no(a,t)),e.When(t.selectionAfter,()=>la(t)))}function lo(t){const a=e.computedOf(t.hasFilters,t.filterLayout)((n,r)=>n&&r==="row");return e.When(a,()=>e.html.tr(e.attr.class("bc-data-table__filter-row"),e.When(e.Value.map(t.selectionAfter,n=>!n),()=>sa(t)),e.ForEach(t.visibleColumns,n=>ro(n,t)),e.When(t.selectionAfter,()=>sa(t))))}function La(t){const{visible:a,message:n,size:r="lg"}=t;return e.When(a,()=>e.html.div(e.attr.class("bc-loading-overlay"),e.html.div(e.attr.class("bc-loading-overlay__content"),_.Icon({icon:"line-md:loading-twotone-loop",size:r}),n!=null?e.html.span(e.attr.class("bc-loading-overlay__message"),n):e.Empty)))}function Na(t,a,n,r){return e.MapSignal(t,o=>{const c=r.getCol(o);return e.html.td(c.align!=null?e.style.textAlign(e.Value.map(c.align,l=>l)):null,c.width!=null?e.style.width(c.width):null,c.maxWidth!=null?e.style.maxWidth(c.maxWidth):null,c.cell(n,a))})}function so(t){return e.ForEach(t.ds.rows,a=>{const n=a.map(t.rowId),r=e.computedOf(n,t.ds.selected)((l,i)=>i.has(l)),o=()=>e.When(t.selectable,()=>e.html.td(e.on.click(l=>l.stopPropagation()),e.html.div(e.attr.class("bc-data-table__selection-cell"),Rt({dataSource:t.ds,rowId:n,isSelected:r,size:t.size})))),c=e.computedOf(r,t.rowClickable)((l,i)=>{let u="bc-data-table__row";return l&&(u+=" bc-data-table__row--selected"),i&&(u+=" bc-data-table__row--clickable"),u});return e.html.tr(e.attr.class(c),e.on.click(()=>{t.selectOnRowClickSignal.value&&t.selectableSignal.value&&t.ds.toggleSelect(n.value),t.onRowClick?.(a.value)}),e.When(e.Value.map(t.selectionAfter,l=>!l),()=>o()),e.ForEach(t.visibleColumns,(l,i)=>Na(l,i.index,a,t)),e.When(t.selectionAfter,()=>o()))})}function io(t,a){const n=a.rowId(t),r=e.computedOf(n,a.ds.selected)((i,u)=>u.has(i)),o=e.Value.toSignal(t),c=()=>e.When(a.selectable,()=>e.html.td(e.on.click(i=>i.stopPropagation()),e.html.div(e.attr.class("bc-data-table__selection-cell"),Rt({dataSource:a.ds,rowId:n,isSelected:r,size:a.size})))),l=e.computedOf(r,a.rowClickable)((i,u)=>{let s="bc-data-table__row";return i&&(s+=" bc-data-table__row--selected"),u&&(s+=" bc-data-table__row--clickable"),s});return e.html.tr(e.attr.class(l),e.on.click(()=>{a.selectOnRowClickSignal.value&&a.selectableSignal.value&&a.ds.toggleSelect(n),a.onRowClick?.(t)}),e.When(e.Value.map(a.selectionAfter,i=>!i),()=>c()),e.ForEach(a.visibleColumns,(i,u)=>Na(i,u.index,o,a)),e.When(a.selectionAfter,()=>c()))}function co(t){const a=e.computedOf(t.visibleColumns,t.selectableSignal)((o,c)=>o.length+(c?1:0)),n=e.computedOf(t.visibleColumns,t.selectableSignal)((o,c)=>{const l=o.findIndex(i=>t.getCol(i).footer!=null);return l<0?o.length+(c?1:0):l+(c?1:0)}),r=t.hasFooter;return e.MapSignal(t.currentGroupPageGroups,o=>e.Fragment(...o.map(c=>{const l=t.collapsedGroups.map(u=>u.has(c.key)),i=()=>{const u=new Set(t.collapsedGroups.value);u.has(c.key)?u.delete(c.key):u.add(c.key),t.collapsedGroups.set(u)};return e.Fragment(e.Use(_.BeatUII18n,u=>e.html.tr(e.attr.class("bc-data-table__group-header"),e.on.click(()=>{t.groupCollapsible&&i()}),e.html.td(e.When(l,()=>e.attr.colspan(n),()=>e.attr.colspan(a)),e.html.div(e.attr.class("bc-data-table__group-header-content"),t.groupCollapsible?e.html.span(e.attr.class(l.map(s=>s?"bc-data-table__group-toggle bc-data-table__group-toggle--collapsed":"bc-data-table__group-toggle")),e.aria.label(l.map(s=>{const p=u.value.dataTable;return s?p.expandGroup??"Expand group":p.collapseGroup??"Collapse group"})),_.Icon({icon:"lucide:chevron-down",size:"sm"})):null,e.html.span(e.attr.class("bc-data-table__group-label"),c.key),e.html.span(e.attr.class("bc-data-table__group-count"),(()=>{const s=u.value.dataTable.groupCount;return s?s(c.rows.length):`(${c.rows.length})`})()),t.groupSummary!=null?e.When(l,()=>e.html.span(e.attr.class("bc-data-table__group-footer-summary"),t.groupSummary(c.key,c.rows))):null)),e.When(l,()=>r?e.When(t.showFooter,()=>e.ForEach(t.visibleColumns,(s,p)=>e.MapSignal(s,m=>{const h=t.getCol(m);return h.footer?e.html.td(e.attr.class("bc-data-table__footer-row bc-data-table__group-footer-row"),h.align!=null?e.style.textAlign(e.Value.map(h.align,d=>d)):null,h.footer(e.Value.toSignal(c.rows))):e.When(n.map(d=>d<p.index),()=>e.html.td())}))):null))),e.When(l.map(u=>!u),()=>e.Fragment(...c.rows.map(u=>io(u,t)),r?e.When(t.showFooter,()=>e.html.tr(e.attr.class("bc-data-table__footer-row bc-data-table__group-footer-row"),e.When(t.selectable,()=>e.html.td()),e.ForEach(t.visibleColumns,u=>e.MapSignal(u,s=>{const p=t.getCol(s);return p.footer?e.html.td(p.align!=null?e.style.textAlign(e.Value.map(p.align,m=>m)):null,p.footer(e.Value.toSignal(c.rows))):e.html.td()})))):null)))})))}function ia(t){return e.When(t.ds.rows.map(a=>a.length===0),()=>e.Use(_.BeatUII18n,a=>e.html.tr(e.html.td(e.attr.colspan(t.totalColSpan),e.attr.class("bc-data-table__empty"),t.emptyContent??a.$.dataTable.map(n=>n.noResults)))))}function uo(t){return e.Use(_.BeatUII18n,a=>La({visible:t.loading,message:a.$.dataTable.map(n=>n.loading),size:"lg"}))}function po(t){return t.hasFooter?e.When(t.showFooter,()=>e.html.tr(e.attr.class("bc-data-table__footer-row"),e.When(t.selectable,()=>e.html.td()),e.ForEach(t.visibleColumns,a=>e.MapSignal(a,n=>{const r=t.getCol(n);return r.footer?e.html.td(r.align!=null?e.style.textAlign(e.Value.map(r.align,o=>o)):null,r.footer(t.ds.allFilteredRows)):e.html.td()})))):null}function mo(t){if(t.hideableColumns.length===0)return null;const a=t.hiddenColumns.map(n=>n.length>0);return e.Use(_.BeatUII18n,n=>e.html.div(e.attr.class("bc-data-table__column-toggle"),e.html.button(e.attr.type("button"),e.attr.class(a.map(r=>r?"bc-data-table__column-toggle-btn bc-data-table__column-toggle-btn--active":"bc-data-table__column-toggle-btn")),_.Icon({icon:"lucide:columns-3",size:t.size}),e.html.span(e.attr.class("bc-data-table__column-toggle-label"),n.$.dataTable.map(r=>r.columnVisibility)),Ve.Flyout({content:()=>e.html.div(e.attr.class("bc-data-table__column-toggle-panel"),e.on.click(r=>r.stopPropagation()),...t.hideableColumns.map(r=>re.CheckboxInput({value:t.hiddenColumns.map(o=>!o.includes(r.id)),onChange:()=>t.toggleColumnVisibility(r.id),placeholder:typeof r.header=="string"?r.header:r.id,size:"sm"})),e.When(a,()=>se.Button({size:"xs",variant:"outline",onClick:()=>t.showAllColumns()},n.$.dataTable.map(r=>r.showAllColumns)))),placement:"bottom-end",showOn:"click",showDelay:0,hideDelay:0}))))}function ho(t){const{size:a="md",stickyHeader:n=!1,fullWidth:r=!1,withStripedRows:o=!1,withTableBorder:c=!0,withColumnBorders:l=!1,withRowBorders:i=!0}=t,u=Zr(t),s=e.computedOf(u.ds.totalFilteredRows,u.ds.totalRows)((g,y)=>({filtered:g,total:y})),p=mo(u),m=e.MapSignal(u.toolbarConfig,g=>g===!1?null:Ia({dataSource:u.ds,showSort:g.showSort??!0,showFilters:g.showFilters??!0,showSelection:g.showSelection??!0,bulkActions:g.bulkActions??[]})),h=e.html.div(e.attr.class("bc-data-table__wrapper"),uo(u),wa({size:a,hoverable:u.effectiveHoverable,stickyHeader:n,fullWidth:r,withStripedRows:o,withTableBorder:c,withColumnBorders:l,withRowBorders:i},e.html.thead(oo(u),lo(u)),e.html.tbody(e.When(u.ds.groupBy.map(g=>g!=null),()=>e.Fragment(co(u),ia(u)),()=>e.Fragment(so(u),ia(u)))),e.html.tfoot(po(u)))),d=e.When(u.showPagination,()=>e.html.div(e.attr.class("bc-data-table__pagination"),e.Use(_.BeatUII18n,g=>e.html.div(e.attr.class("bc-data-table__row-count"),e.computedOf(u.pageSizeSignal,u.effectiveCurrentPage,s.$.filtered,s.$.total)((y,w,k,v)=>{const V=(w-1)*y+1,C=Math.min(w*y,k);return g.value.paginationRange(V,C,k,v)}))),xa({currentPage:u.effectiveCurrentPage,totalPages:u.effectiveTotalPages,onChange:g=>u.setEffectivePage(g),siblings:e.Value.map(u.paginationConfig,g=>g===!1?1:g.siblings??1),showFirstLast:e.Value.map(u.paginationConfig,g=>g===!1?!1:g.showFirstLast??!1),showPrevNext:!0,size:a,responsive:e.Value.map(u.paginationConfig,g=>g===!1?!1:g.responsive??!1)}))),b=e.Fragment(p,m,h,d);return e.Value.get(n)?e.html.div(e.attr.class("bc-data-table"),e.OnDispose(()=>{u.dispose(),s.dispose()}),b):e.Fragment(e.OnDispose(()=>{u.dispose(),s.dispose()}),b)}function Wa({value:t,onChange:a,disabled:n,size:r="md"}){return e.Use(_.BeatUII18n,o=>Q.SegmentedInput({size:r,variant:"squared",value:t,disabled:n,options:{system:e.html.span(e.attr.title(o.$.appearanceSystem),_.Icon({icon:"line-md:laptop",color:"gray"})),light:e.html.span(e.attr.title(o.$.appearanceLight),_.Icon({icon:"line-md:sunny-twotone-loop",color:"yellow"})),dark:e.html.span(e.attr.title(o.$.appearanceDark),_.Icon({icon:"line-md:sunny-outline-to-moon-alt-loop-transition",color:"blue"}))},onChange:a}))}function bo(t){return e.Use(nt.Theme,({appearancePreference:a,setAppearancePreference:n})=>Wa({value:a,onChange:n,size:t?.size}))}function go({value:t,onChange:a,onInput:n}){return e.html.div(e.attr.class("bc-color-input__swatch-container"),e.html.span(e.attr.class("bc-color-input__swatch"),e.input.color(e.attr.class("bc-color-input__swatch-native"),e.attr.value(t),a!=null?e.on.change(e.emitValue(a)):e.Empty,n!=null?e.on.input(e.emitValue(n)):e.Empty),e.attr.style(e.Value.map(t,r=>`background-color: ${r}`))))}function Ua(t){const{value:a="#000000",onBlur:n,onChange:r,onInput:o,swatchSize:c,...l}=t;return se.InputContainer({...l,input:e.input.text(Ee.CommonInputAttributes(t),e.attr.value(a),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(r)):e.Empty,o!=null?e.on.input(e.emitValue(o)):e.Empty)},e.attr.class("bc-color-input"),go({value:a,onChange:t.onChange,onInput:t.onInput}))}const fo=t=>{const{value:a,onChange:n,onInput:r,onBlur:o,after:c,disabled:l,...i}=t,u=Q.NullableResetAfter(a,l,n??r);return Ua({...i,disabled:l,value:e.Value.map(a,X.nullToEmpty),onChange:n!=null?s=>n(X.emptyToNull(s)):void 0,onInput:r!=null?s=>r(X.emptyToNull(s)):void 0,onBlur:o,after:c!=null?e.Fragment(u,c):u})},vo=t=>{const{value:a,onChange:n,onInput:r,onBlur:o,after:c,disabled:l,...i}=t,u=Q.NullableResetAfter(a,l,n??r);return X.ColorSwatchInput({...i,disabled:l,value:e.Value.map(a,X.nullToEmpty),onChange:n!=null?s=>n(X.emptyToNull(s)):void 0,onInput:r!=null?s=>r(X.emptyToNull(s)):void 0,onBlur:o,after:c!=null?e.Fragment(u,c):u})},zt=t=>{const{onChange:a,onInput:n,onBlur:r,role:o,display:c,optionsSource:l,allowSpaceToggle:i=!1,onBeforeOpen:u,onAfterOpen:s,buildListboxContent:p}=t,m=e.prop(!1),h=e.prop(-1),d=e.prop(null),b=Pe.sessionId("dropdown"),f=Pe.sessionId("listbox");let g,y;m.onChange(v=>{v||(h.set(-1),d.set(null))});const w=v=>{a?.(v),n?.(v),m.set(!1),g?.focus()},k=v=>{const V=Le.getValues(e.Value.get(l));switch(v.key){case"ArrowDown":{if(v.preventDefault(),!m.value)m.set(!0),V.length>0&&(h.set(0),d.set(V[0]));else{const C=Math.min(h.value+1,V.length-1);h.set(C),d.set(V[C]??null)}break}case"ArrowUp":{if(v.preventDefault(),m.value){const C=Math.max(h.value-1,0);h.set(C),d.set(V[C]??null)}break}case"Enter":{if(v.preventDefault(),m.value&&h.value>=0){const C=V[h.value];C!=null&&w(C)}else{u?.();const C=Le.getValues(e.Value.get(l));m.set(!0),C.length>0&&(h.set(0),d.set(C[0])),setTimeout(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{s?.()})})},0)}break}case"Escape":{m.value&&(v.preventDefault(),m.set(!1),g?.focus());break}case" ":{if(e.Value.get(i)){v.preventDefault();const C=Le.getValues(e.Value.get(l));m.set(!m.value),m.value&&C.length>0&&(h.set(0),d.set(C[0]))}break}}};return se.InputContainer({...t,input:Q.Group(e.attr.class("bc-dropdown__trigger"),e.html.span(e.attr.class("bc-dropdown__display"),c)),after:e.Fragment(se.InputIcon({icon:"ph:caret-up-down-bold",color:"neutral",size:"sm"}),t.after)},Te.ElementRect(v=>e.Fragment(e.WithElement(V=>{g=V;const C=()=>{if(m.value)m.set(!1);else{u?.();const S=Le.getValues(e.Value.get(l));m.set(!0),S.length>0&&(h.set(0),d.set(S[0])),setTimeout(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{s?.()})})},0)}};return V.addEventListener("keydown",k),V.addEventListener("click",C),e.OnDispose(()=>{V.removeEventListener("keydown",k),V.removeEventListener("click",C)})}),Ee.CommonInputAttributes(t),e.attr.id(b),e.attr.tabindex(0),e.aria.controls(f),e.aria.expanded(m),e.attr.class("bc-dropdown"),e.attr.role(o),e.aria.activedescendant(e.computedOf(m,d)((V,C)=>V&&C!=null?`dropdown-option-${String(C)}`:"")),r!=null?e.on.blur(()=>{requestAnimationFrame(()=>{!y?.contains(document.activeElement)&&!g?.contains(document.activeElement)&&(m.set(!1),r())})}):e.Empty,Ve.Flyout({content:()=>e.html.div(e.WithElement(V=>{y=V}),e.style.minWidth(v.$.width.map(V=>`${V-10}px`)),e.attr.class("bc-dropdown__listbox"),e.attr.role("listbox"),e.attr.id(f),e.aria.labelledby(b),p({dropdownId:b,listboxId:f,focusedValue:d,handleKeyDown:k,onSelect:w})),mainAxisOffset:0,placement:"bottom-start",hasPopup:"listbox",open:m,showOn:"never",showDelay:0,hideDelay:0,closable:!0}))))},Ra=(t,a,n,r,o)=>e.Ensure(t,c=>e.OneOfType(c,{value:l=>{const i=e.computedOf(l,n)((s,p)=>a(s.value,p)),u=e.computedOf(l,o)((s,p)=>p!=null&&a(s.value,p));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(i,u,l)((s,p,m)=>{const h=[];return s&&h.push("bc-dropdown__option--selected"),p&&h.push("bc-dropdown__option--focused"),m.disabled&&h.push("bc-dropdown__option--disabled"),h.join(" ")})),e.attr.role("option"),e.attr.id(l.map(s=>`dropdown-option-${String(s.value)}`)),e.aria.selected(i),Q.Expando("value",l.$.value),e.When(l.map(s=>!s.disabled),()=>e.on.click(()=>r(l.value.value)),()=>e.Empty),e.html.div(e.attr.class("bc-dropdown__option-content"),l.value.before&&e.html.span(e.attr.class("bc-dropdown__option-before"),l.value.before),e.html.span(e.attr.class("bc-dropdown__option-label"),l.$.label),l.value.after&&e.html.span(e.attr.class("bc-dropdown__option-after"),l.value.after)))},group:l=>e.html.div(e.attr.class("bc-dropdown__group"),e.attr.role("group"),e.aria.label(l.$.group),e.html.div(e.attr.class("bc-dropdown__group-label"),l.$.group),e.ForEach(l.$.options,i=>Ra(i,a,n,r,o))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),za=t=>{const{value:a,options:n,unselectedLabel:r,equality:o=(s,p)=>s===p,placeholder:c,searchable:l=!1}=t,i=e.computedOf(a,n)((s,p)=>{if(s==null)return"";const m=h=>{for(const d of h){if(d.type==="value"&&o(d.value,s))return d.label;if(d.type==="group"){const b=m(d.options);if(b)return b}}};return m(p)||String(s)}),u=e.computedOf(l)(s=>!s);return zt({...t,role:"dropdown",display:e.When(i.map(s=>s.length>0),()=>i,()=>e.Use(_.BeatUII18n,s=>e.coalesce(c,r,s.$.selectOne))),optionsSource:n,allowSpaceToggle:u,buildListboxContent:({focusedValue:s,onSelect:p})=>e.ForEach(n,m=>Ra(m,o,a,p,s))})},Ha=t=>{const{controller:a,onChange:n,onBlur:r,...o}=t;return za({...o,value:a.signal,onChange:re.makeOnChangeHandler(a,n),onBlur:re.makeOnBlurHandler(a,r)})},yo=t=>re.InputWrapper({...t,content:Ha(t)}),ja=(t,a,n,r,o,c)=>e.Ensure(t,l=>e.OneOfType(l,{value:i=>{const u=e.computedOf(i,n)((p,m)=>m!=null&&a(p.value,m)),s=e.computedOf(i,o)((p,m)=>m!=null&&a(p.value,m));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(u,s,i)((p,m,h)=>{const d=[];return p&&d.push("bc-dropdown__option--selected"),m&&d.push("bc-dropdown__option--focused"),h.disabled&&d.push("bc-dropdown__option--disabled"),d.join(" ")})),e.attr.role("option"),e.attr.id(i.map(p=>`dropdown-option-${String(p.value)}`)),e.aria.selected(u),e.When(i.map(p=>!p.disabled),()=>e.on.click(()=>r(i.value.value)),()=>e.Empty),e.html.div(e.attr.class("bc-dropdown__option-content"),i.value.before&&e.html.span(e.attr.class("bc-dropdown__option-before"),i.value.before),e.html.span(e.attr.class("bc-dropdown__option-label"),c(i.$.value)),i.value.after&&e.html.span(e.attr.class("bc-dropdown__option-after"),i.value.after)))},group:i=>e.html.div(e.attr.class("bc-dropdown__group"),e.attr.role("group"),e.aria.label(i.$.group),e.html.div(e.attr.class("bc-dropdown__group-label"),i.$.group),e.ForEach(i.$.options,u=>ja(u,a,n,r,o,c))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),qa=t=>{const{value:a,loadOptions:n,renderOption:r,renderValue:o,equality:c=(k,v)=>k===v,placeholder:l,searchPlaceholder:i,debounceMs:u=150,autoFocusSearch:s=!0}=t,p=e.prop(""),m=e.prop(!1),h=e.prop([]);let d;const b=e.Value.toSignal(a),f=()=>(o??r)(b);let g=null;const y=k=>{m.set(!0),Promise.resolve(n(k)).then(v=>{h.set(v??[])}).catch(()=>{h.set([])}).finally(()=>m.set(!1))},w=k=>{g!=null&&(clearTimeout(g),g=null),g=setTimeout(()=>{y(k)},Math.max(0,u))};return zt({...t,role:"combobox",display:e.When(e.computedOf(a)(k=>k!=null),f,()=>e.Use(_.BeatUII18n,k=>k.$.selectOne)),optionsSource:h,onBeforeOpen:()=>{const k=e.Value.get(p);w(k)},onAfterOpen:()=>{s&&d?.focus()},buildListboxContent:({focusedValue:k,handleKeyDown:v,onSelect:V})=>e.Fragment(e.html.div(e.attr.class("bc-dropdown__search"),e.html.input(e.attr.type("text"),e.attr.class("bc-dropdown__search-input"),e.attr.placeholder(e.computedOf(i,l)((C,S)=>C??S??"Search")),e.attr.value(p),e.WithElement(C=>(d=C,e.Empty)),e.on.input(C=>{const S=C.target;p.set(S.value),w(S.value)}),e.on.keydown(v))),e.When(m,()=>e.html.div(e.attr.class("bc-dropdown__loading"),_.Icon({icon:"ph:spinner-bold",color:"neutral"})),()=>e.ForEach(h,C=>ja(C,c,b,V,k,r))))})},Ga=t=>{const{controller:a,onChange:n,onBlur:r,...o}=t;return qa({...o,value:a.signal,onChange:re.makeOnChangeHandler(a,n),onBlur:re.makeOnBlurHandler(a,r)})},ko=t=>re.InputWrapper({...t,content:Ga(t)});function Ht(t,a,n){return t.some(o=>n(o,a))?t.filter(o=>!n(o,a)):[...t,a]}function jt(t,a,n){return t.filter(r=>!n(r,a))}function bt(t,a,n){return t.some(r=>n(r,a))}function Ya(t,a,n){for(const r of t)if(r.type==="value"){if(n(r.value,a))return{label:r.label}}else if(r.type==="group"){const o=Ya(r.options,a,n);if(o!=null)return o}}function Ka(t,a,n){return Ya(t,a,n)?.label??String(a)}function qt(t,a,n){const r=a.trim().toLowerCase(),o=n??((l,i)=>i.label.toLowerCase().includes(l));if(r==="")return t;const c=[];for(const l of t)if(l.type==="value")o(r,{label:l.label})&&c.push(l);else if(l.type==="group"){const i=qt(l.options,r,o);i.length>0&&c.push({...l,options:i})}return c}function Gt(t){const{values:a,options:n,equality:r,disabled:o,onRemove:c}=t;return e.NotEmpty(a,()=>e.ForEach(a,l=>Je({variant:"light",onClose:()=>c(l.value),disabled:o},e.computedOf(l,n)((i,u)=>Ka(u,i,r)))),()=>e.html.span(e.attr.class("bc-input-container__placeholder"),t.placeholder))}function Yt(t){const{value:a,options:n,equality:r=(s,p)=>s===p,placeholder:o}=t,c=s=>{const p=e.Value.get(a);t.onChange?.(jt(p,s,r))},l=s=>{const p=e.Value.get(a);t.onChange?.(Ht(p,s,r))},i=s=>e.computedOf(a)(p=>bt(p,s,r)),u=Ve.Menu({items:()=>{const s=e.Value.get(n),p=[];for(const m of s)if(m.type==="value"){const h=i(m.value);p.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(m.disabled===!0),e.aria.checked(h),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),m.label),e.on.click(()=>l(m.value))))}else m.type==="group"?p.push(e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),m.group),...m.options.map(h=>{if(h.type==="value"){const d=i(h.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(h.disabled===!0),e.aria.checked(d),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),h.label),e.on.click(()=>l(h.value)))}return e.Empty}))):p.push(Ve.MenuSeparator());return p},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:"click",closable:!0});return se.InputContainer({...t,before:t.before??se.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),u,Gt({values:a,placeholder:o,options:n,equality:r,disabled:t.disabled,onRemove:c})),after:se.InputIcon({icon:"line-md:plus",color:"neutral",size:"sm"})})}function _o(t){return re.BaseControl(Yt,t)}function wo(t){return re.Control(Yt,t)}function Kt(t){const{value:a,options:n,equality:r=(d,b)=>d===b,placeholder:o,searchPlaceholder:c,filter:l}=t,i=e.prop(""),u=d=>{const b=e.Value.get(a);t.onChange?.(jt(b,d,r))},s=d=>{const b=e.Value.get(a);t.onChange?.(Ht(b,d,r))},p=e.computedOf(n,i)((d,b)=>qt(d,b,l)),m=d=>e.Ensure(d,b=>e.OneOfType(b,{value:f=>{const g=e.computedOf(a,f)((y,w)=>bt(y,w.value,r));return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(f.map(y=>y.disabled===!0)),e.aria.checked(g),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),f.$.label),e.on.click(()=>s(f.value.value)))},group:f=>e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),f.$.group),e.ForEach(f.$.options,m)),break:()=>Ve.MenuSeparator()})),h=Ve.Menu({items:()=>[e.When(p.map(d=>d.length===0),()=>e.html.div(e.attr.class("bc-dropdown__empty"),e.Use(_.BeatUII18n,d=>d.$.noResults))),e.ForEach(p,m)],placement:"bottom-start",showDelay:0,hideDelay:100,showOn:d=>e.WithElement(b=>{const f=b.querySelector(".bc-dropdown__search-input");if(f){const g=()=>d.set(!0);return f.addEventListener("focus",g),e.OnDispose(()=>{f.removeEventListener("focus",g)})}return e.Empty}),closable:!0});return se.InputContainer({...t,before:t.before??se.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),Gt({values:a,options:n,placeholder:o,equality:r,disabled:t.disabled,onRemove:u}),e.html.div(e.attr.class("bc-input-container__tags-selector"),e.html.input(e.attr.type("text"),e.attr.class("bc-dropdown__search-input"),e.attr.placeholder(e.computedOf(c,o)((d,b)=>d??b??"")),e.attr.value(i),e.on.input(d=>{const b=d.target;i.set(b.value)}),e.on.keydown(d=>{(d.key==="ArrowUp"||d.key==="ArrowDown"||d.key==="Enter"||d.key===" ")&&d.stopPropagation()})),h))})}function Co(t){return re.BaseControl(Kt,t)}function Vo(t){return re.Control(Kt,t)}function Xt(t){const{value:a,options:n,equality:r=(N,I)=>N===I,placeholder:o,searchPlaceholder:c,filter:l,loadOptions:i,loadDebounce:u=300,maxSelection:s,showActions:p=!1,selectAllLabel:m,clearAllLabel:h,renderOption:d}=t,b=e.prop(!1),f=e.prop(""),g=e.prop(-1),y=e.prop(!1),w=e.prop(null),k=Pe.sessionId("multi-select"),v=Pe.sessionId("multi-select-listbox");let V,C,S,D;const B=e.computedOf(n,w,f)((N,I,L)=>i&&I!=null?I:qt(N,L,l)),$=B.map(N=>Le.getValues(N));b.onChange(N=>{N||(g.set(-1),f.set(""),w.set(null))});const R=N=>{const I=e.Value.get(a);t.onChange?.(jt(I,N,r))},G=N=>{const I=e.Value.get(a),L=e.Value.get(s);L!=null&&!bt(I,N,r)&&I.length>=L||t.onChange?.(Ht(I,N,r))},A=()=>{const N=e.Value.get(s),I=$.value,L=N!=null?I.slice(0,N):I;t.onChange?.(L)},j=()=>{t.onChange?.([])},E=N=>e.computedOf(a)(I=>bt(I,N,r)),q=N=>{f.set(N),i&&(D!=null&&clearTimeout(D),D=setTimeout(()=>{y.set(!0),i(N).then(I=>{w.set(I)}).finally(()=>{y.set(!1)})},u))},J=N=>{const I=$.value;switch(N.key){case"ArrowDown":{N.preventDefault(),b.value?g.set(Math.min(g.value+1,I.length-1)):(b.set(!0),I.length>0&&g.set(0),setTimeout(()=>{requestAnimationFrame(()=>C?.focus())},0));break}case"ArrowUp":{N.preventDefault(),b.value&&g.set(Math.max(g.value-1,0));break}case"Enter":{if(N.preventDefault(),b.value&&g.value>=0){const L=I[g.value];L!=null&&G(L)}else b.value||(b.set(!0),I.length>0&&g.set(0),setTimeout(()=>{requestAnimationFrame(()=>C?.focus())},0));break}case"Escape":{b.value&&(N.preventDefault(),b.set(!1),V?.focus());break}case"Backspace":{if(f.value===""){const L=e.Value.get(a);L.length>0&&t.onChange?.(L.slice(0,-1))}break}case" ":{document.activeElement!==C&&(N.preventDefault(),b.set(!b.value),b.value&&setTimeout(()=>{requestAnimationFrame(()=>C?.focus())},0));break}}},ae=e.computedOf(g,$)((N,I)=>I[N]??null),M=(N,I)=>{const L=E(N.value),Z=e.computedOf(a,s)((ve,H)=>H!=null&&ve.length>=H),pe=e.computedOf(L,Z)((ve,H)=>N.disabled===!0||!ve&&H),be=ae.map(ve=>ve!=null?r(ve,N.value):!1);return d?e.html.div(e.attr.role("option"),e.attr.id(`multi-select-option-${String(N.value)}`),e.aria.selected(L),e.aria.disabled(pe),e.attr.class(e.computedOf(be,L)((ve,H)=>{const ie=["bc-multi-select__option"];return ve&&ie.push("bc-multi-select__option--focused"),H&&ie.push("bc-multi-select__option--selected"),I>0&&ie.push("bc-multi-select__option--grouped"),ie.join(" ")})),e.on.click(()=>G(N.value)),d(N,L)):e.html.div(e.attr.role("option"),e.attr.id(`multi-select-option-${String(N.value)}`),e.aria.selected(L),e.aria.disabled(pe),e.attr.class(e.computedOf(be,L)((ve,H)=>{const ie=["bc-multi-select__option"];return ve&&ie.push("bc-multi-select__option--focused"),H&&ie.push("bc-multi-select__option--selected"),I>0&&ie.push("bc-multi-select__option--grouped"),ie.join(" ")})),e.on.click(()=>G(N.value)),e.html.span(e.attr.class("bc-multi-select__option-check"),e.When(L,()=>_.Icon({icon:"ph:check-bold",size:"xs",color:"primary"}))),e.html.span(e.attr.class("bc-multi-select__option-label"),N.label))},K=N=>e.Ensure(N,I=>e.OneOfType(I,{value:L=>M({value:L.value.value,label:L.value.label,disabled:L.value.disabled},0),group:L=>e.html.div(e.attr.class("bc-multi-select__group"),e.html.div(e.attr.class("bc-multi-select__group-label"),L.$.group),e.ForEach(L.$.options,Z=>e.Ensure(Z,pe=>e.OneOfType(pe,{value:be=>M({value:be.value.value,label:be.value.label,disabled:be.value.disabled},1),group:()=>e.Empty,break:()=>e.html.div(e.attr.class("bc-multi-select__separator"))})))),break:()=>e.html.div(e.attr.class("bc-multi-select__separator"))})),te=e.NotEmpty(a,()=>e.ForEach(a,N=>Je({variant:"light",size:t.size,onClose:()=>R(N.value),disabled:t.disabled},e.computedOf(N,n)((I,L)=>Ka(L,I,r)))),()=>e.html.span(e.attr.class("bc-multi-select__placeholder"),o));return se.InputContainer({...t,input:e.html.div(e.attr.class("bc-multi-select__badge-container"),te),after:e.Fragment(se.InputIcon({icon:"ph:caret-up-down-bold",color:"neutral",size:"sm"}),t.after)},Te.ElementRect(N=>e.Fragment(e.WithElement(I=>{V=I;const L=()=>{b.value?b.set(!1):(b.set(!0),$.value.length>0&&g.set(0),setTimeout(()=>{requestAnimationFrame(()=>C?.focus())},0))};return I.addEventListener("keydown",J),I.addEventListener("click",L),e.OnDispose(()=>{I.removeEventListener("keydown",J),I.removeEventListener("click",L),D!=null&&clearTimeout(D)})}),Ee.CommonInputAttributes(t),e.attr.id(k),e.attr.tabindex(0),e.aria.controls(v),e.aria.expanded(b),e.attr.class("bc-multi-select"),e.attr.role("combobox"),e.aria.activedescendant(e.computedOf(b,ae)((I,L)=>I&&L!=null?`multi-select-option-${String(L)}`:"")),t.onBlur!=null?e.on.blur(()=>{requestAnimationFrame(()=>{!S?.contains(document.activeElement)&&!V?.contains(document.activeElement)&&(b.set(!1),t.onBlur())})}):e.Empty,Ve.Flyout({content:()=>e.html.div(e.WithElement(I=>{S=I}),e.style.minWidth(N.$.width.map(I=>`${I-10}px`)),e.attr.class("bc-multi-select__dropdown"),e.html.input(e.WithElement(I=>{C=I}),e.attr.type("text"),e.attr.class("bc-multi-select__search"),e.attr.placeholder(e.computedOf(c,o)((I,L)=>I??L??"Search...")),e.attr.value(f),e.on.input(I=>{const L=I.target;q(L.value)}),e.on.keydown(I=>{(I.key==="ArrowUp"||I.key==="ArrowDown"||I.key==="Enter"||I.key==="Escape"||I.key==="Backspace"&&f.value==="")&&J(I)})),e.When(p,()=>e.html.div(e.attr.class("bc-multi-select__actions"),e.html.button(e.attr.type("button"),e.attr.class("bc-multi-select__action"),e.on.click(I=>{I.stopPropagation(),A()}),m??"Select all"),e.html.span(e.attr.class("bc-multi-select__action-sep"),"|"),e.html.button(e.attr.type("button"),e.attr.class("bc-multi-select__action"),e.on.click(I=>{I.stopPropagation(),j()}),h??"Clear all"))),e.When(y,()=>e.html.div(e.attr.class("bc-multi-select__loading"),e.Use(_.BeatUII18n,I=>I.$.loadingShort))),e.html.div(e.attr.role("listbox"),e.attr.id(v),e.aria.labelledby(k),e.WithElement(I=>{I.setAttribute("aria-multiselectable","true")}),e.attr.class("bc-multi-select__listbox"),e.When(e.computedOf(B,y)((I,L)=>!L&&I.length===0),()=>e.html.div(e.attr.class("bc-multi-select__empty"),e.Use(_.BeatUII18n,I=>I.$.noResults))),e.ForEach(B,K)),e.When(e.computedOf(a)(I=>I.length>0),()=>e.html.div(e.attr.class("bc-multi-select__footer"),e.computedOf(a,s)((I,L)=>L!=null?`${I.length} / ${L} selected`:`${I.length} selected`)))),mainAxisOffset:0,placement:"bottom-start",hasPopup:"listbox",open:b,showOn:"never",showDelay:0,hideDelay:0,closable:!0}))))}function So(t){return re.BaseControl(Xt,t)}function xo(t){return re.Control(Xt,t)}const Io=t=>{const{value:a,onBlur:n,onChange:r}=t;return se.InputContainer({...t,input:e.input.date(Ee.CommonInputAttributes(t),e.attr.valueAsDate(a),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValueAsDate(r)):e.Empty)})},$o=t=>{const a=t.getFullYear(),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),c=t.getMinutes().toString().padStart(2,"0");return`${a}-${n}-${r}T${o}:${c}`},Oo=t=>{const{value:a,onBlur:n,onChange:r}=t;return se.InputContainer({...t,input:e.input["datetime-local"](Ee.CommonInputAttributes(t),e.attr.value(e.Value.map(a,$o)),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(o=>r(new Date(o)))):e.Empty)})};function To(t,...a){const{size:n="md",filled:r=!1}=t;return e.html.span(e.attr.class("bc-input-adornment"),e.attr.class(e.Value.map(n,o=>`bc-input-adornment--size-${o}`)),e.attr.class(e.Value.map(r,o=>o?"bc-input-adornment--filled":"")),e.html.span(e.attr.class("bc-input-adornment__content"),...a))}const Do=t=>Te.Query({request:t.request,load:t.load,convertError:String,success:({value:a})=>{const n=a.map(r=>r.map(o=>typeof o=="object"&&"id"in o&&"label"in o?Le.value(o.id,o.label):o));return Q.NativeSelect({...t,options:n,unselectedLabel:t.unselectedLabel,equality:t.equality})},pending:()=>se.InputContainer({...t,disabled:!0,after:e.Fragment(se.InputIcon({icon:"ph:caret-up-down-bold",color:"neutral",size:"sm"}),t.after),input:e.html.select(e.attr.class("bc-native-select bc-input"),e.attr.disabled(!0),e.Use(_.BeatUII18n,a=>e.html.option(a.$.loadingShort)))})}),Po=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:c,disabled:l,...i}=t,u=Q.NullableResetAfter(a,l,r??o);return Q.MaskInput({...i,value:e.Value.map(a,X.nullToEmpty),onChange:r!=null?s=>r(X.emptyToNull(s)):void 0,onInput:o!=null?s=>o(X.emptyToNull(s)):void 0,onBlur:n,after:c!=null?e.Fragment(u,c):u})};function Eo(t,a,n){const r=["bc-tag-input",`bc-tag-input--${t}`];return a&&r.push("bc-tag-input--disabled"),n&&r.push("bc-tag-input--error"),r.join(" ")}function Fo(t){const{values:a,onChange:n,placeholder:r="Add...",size:o="md",disabled:c=!1,maxTags:l,hasError:i=!1}=t,u=e.prop(""),s=h=>{const b=e.Value.get(a).filter(f=>f!==h);n?.(b)},p=h=>{const d=h.trim();if(!d)return;const b=e.Value.get(a),f=e.Value.get(l??1/0);b.includes(d)||b.length>=f||(n?.([...b,d]),u.set(""))},m=h=>{if(h.key==="Enter"||h.key===",")h.preventDefault(),p(u.value);else if(h.key==="Backspace"&&u.value===""){const d=e.Value.get(a);d.length>0&&s(d[d.length-1])}};return e.html.div(e.attr.class(e.computedOf(o,c,i)((h,d,b)=>Eo(h??"md",d??!1,b??!1))),e.ForEach(a,h=>e.html.span(e.attr.class("bc-tag-input__tag"),e.html.span(e.attr.class("bc-tag-input__tag-text"),h),e.When(e.computedOf(c)(d=>!(d??!1)),()=>e.html.button(e.attr.type("button"),e.attr.class("bc-tag-input__tag-remove"),e.on.click(d=>{d.stopPropagation(),s(h.value)}),"×"),()=>e.Empty))),e.html.input(e.attr.class("bc-tag-input__input"),e.attr.type("text"),e.attr.placeholder(e.computedOf(a,r)((h,d)=>h.length===0?d??"Add...":"")),e.attr.disabled(c),e.attr.value(u),e.on.input(h=>{const d=h.target;u.set(d.value)}),e.on.keydown(m),e.on.blur(()=>{u.value.trim()&&p(u.value)})))}const Ao=t=>{const{value:a,onChange:n,onBlur:r,before:o}=t,c=e.prop(""),l=u=>{n?.(e.Value.get(a).filter(s=>s!==u))},i=()=>{const u=c.value.trim(),s=e.Value.get(a);u===""||s.includes(u)||(c.set(""),n?.([...s,u]))};return se.InputContainer({...t,before:o??se.InputIcon({icon:"tabler:tag",size:t.size,color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),e.ForEach(a,u=>Je({variant:"light",onClose:()=>l(u.value),disabled:t.disabled},u)),e.input.text(Ee.CommonInputAttributes(t),e.attr.value(c),e.attr.class("bc-input bc-input-container__tags-input"),e.on.input(e.emitValue(u=>c.set(u))),n!=null?e.on.change(i):e.Empty,r!=null?e.on.blur(r):e.Empty))})};function Bo(t,a){const n=["bc-radio-group",`bc-radio-group--${t}`];return a&&a.length>0&&n.push(a),n.join(" ")}function Mo(t,a,n){const r=["bc-radio-group__item",`bc-radio-group__item--size-${t}`];return(a||n)&&r.push("bc-radio-group__item--disabled"),r.join(" ")}function Lo({options:t,value:a,onChange:n,name:r,disabled:o=!1,orientation:c="vertical",size:l="md",class:i}){const u=r??Pe.sessionId("radio-group");return e.html.div(e.attr.class(e.computedOf(c,i)((s,p)=>Bo(s??"vertical",p))),e.attr.role("radiogroup"),e.ForEach(t,s=>{const p=s.map(h=>h.disabled??!1),m=Pe.sessionId("radio");return e.html.label(e.attr.class(e.computedOf(l,o,p)((h,d,b)=>Mo(h??"md",b??!1,d??!1))),e.html.input(e.attr.type("radio"),e.attr.name(u),e.attr.id(m),e.attr.value(s.map(h=>String(h.value))),e.attr.class("bc-radio-group__input"),e.attr.checked(e.computedOf(a,s)((h,d)=>h===d.value)),e.attr.disabled(e.computedOf(o,p)((h,d)=>(h??!1)||(d??!1))),e.on.change(()=>{e.Value.get(o)||(e.Value.get(s).disabled??!1)||n?.(e.Value.get(s).value)}),e.aria.disabled(e.computedOf(o,p)((h,d)=>(h??!1)||(d??!1)))),e.html.span(e.attr.class("bc-radio-group__indicator")),e.html.span(e.attr.class("bc-radio-group__label-container"),e.html.span(e.attr.class("bc-radio-group__label"),s.map(h=>h.label)),e.html.span(e.attr.class("bc-radio-group__description"),s.map(h=>h.description??""))))}))}function at(t,a,n){return Math.min(Math.max(t,a),n)}function No(t,a,n){return Q.roundToStep(Math.round((t-a)/n)*n+a,n)}function He(t,a,n){return n===a?0:(t-a)/(n-a)*100}function Wo(t,a,n,r){const o=["bc-range-slider",`bc-range-slider--size-${t}`];return a&&o.push("bc-range-slider--disabled"),n&&o.push("bc-range-slider--readonly"),r==="vertical"&&o.push("bc-range-slider--vertical"),o.join(" ")}function Uo(t){const a=_.backgroundValue(t,"solid","light"),n=_.backgroundValue(t,"solid","dark");return`--rs-color: ${a.backgroundColor}; --rs-color-dark: ${n.backgroundColor}`}function Ro({min:t=0,max:a=100,step:n=1,disabled:r=!1,readonly:o=!1,size:c="md",color:l="primary",value:i,onChange:u,range:s,onRangeChange:p,points:m,onPointsChange:h,ticks:d,showValue:b=!1,formatValue:f=k=>String(k),segmentStyles:g,renderThumb:y,orientation:w="horizontal"}){const k=m!=null?"multi":s!=null?"range":"single",v=k==="multi"?e.Value.get(m).length:k==="range"?2:1,V=e.Value.get(w)==="vertical",C=k==="multi"?e.Value.map(m,A=>[...A]):k==="range"?e.Value.map(s,A=>[A[0],A[1]]):e.Value.map(i??0,A=>[A]),S=e.prop(null);function D(A){if(k==="multi")h?.(A);else if(k==="range"){const j=[A[0],A[1]];j[0]>j[1]&&j.reverse(),p?.(j)}else u?.(A[0])}function B(){return!e.Value.get(r)&&!e.Value.get(o)}function $(A,j,E,q){const J=e.Value.get(t),ae=e.Value.get(a),M=e.Value.get(n),K=A.getBoundingClientRect();let te;V?te=at(1-(E-K.top)/K.height,0,1):te=at((j-K.left)/K.width,0,1);const N=J+te*(ae-J),I=at(No(N,J,M),J,ae),L=e.Value.get(C);if(q!=null){const Z=[...L];Z[q]=I,D(Z)}else{let Z=0,pe=Math.abs(L[0]-I);for(let ve=1;ve<L.length;ve++){const H=Math.abs(L[ve]-I);H<pe&&(Z=ve,pe=H)}const be=[...L];be[Z]=I,S.set(Z),D(be)}}function R(A){return e.computedOf(C,t)((j,E)=>j[A]??E)}function G(A,j){const E=R(A),q=e.computedOf(E,t,a)((J,ae,M)=>`${He(J,ae,M)}%`);return e.html.div(e.attr.class("bc-range-slider__thumb-container"),V?e.style.bottom(q):e.style.left(q),e.When(b,()=>e.html.div(e.attr.class("bc-range-slider__value-label"),e.Value.map(E,J=>f(J))),()=>e.Empty),e.html.div(e.attr.class(y?"bc-range-slider__thumb-custom":"bc-range-slider__thumb"),e.attr.role("slider"),e.attr.tabindex(0),e.aria.valuemin(t),e.aria.valuemax(a),e.aria.valuenow(E),e.aria.label(`Thumb ${A+1}`),V?e.aria.orientation("vertical"):e.Empty,e.on.keydown(J=>{if(!B())return;const ae=e.Value.get(t),M=e.Value.get(a),K=e.Value.get(n),te=e.Value.get(C),N=te[A];let I;switch(J.key){case"ArrowRight":case"ArrowUp":J.preventDefault(),I=at(Q.roundToStep(N+K,K),ae,M);break;case"ArrowLeft":case"ArrowDown":J.preventDefault(),I=at(Q.roundToStep(N-K,K),ae,M);break;case"Home":J.preventDefault(),I=ae;break;case"End":J.preventDefault(),I=M;break;default:return}const L=[...te];L[A]=I,D(L)}),e.on.pointerdown(J=>{if(J.stopPropagation(),J.preventDefault(),!B())return;S.set(A);const ae=K=>{$(j,K.clientX,K.clientY,A)},M=()=>{S.set(null),window.removeEventListener("pointermove",ae),window.removeEventListener("pointerup",M)};window.addEventListener("pointermove",ae),window.addEventListener("pointerup",M)}),y?y(A,E):e.Empty))}return e.WithElement(A=>{const j=M=>{if(!B())return;M.preventDefault(),$(A,M.clientX,M.clientY,null);const K=N=>{$(A,N.clientX,N.clientY,S.value)},te=()=>{S.set(null),window.removeEventListener("pointermove",K),window.removeEventListener("pointerup",te)};window.addEventListener("pointermove",K),window.addEventListener("pointerup",te)},E=e.computedOf(C,t,a)((M,K,te)=>{if(V){if((k==="range"||k==="multi")&&M.length>=2){const I=[...M].sort((pe,be)=>pe-be),L=He(I[0],K,te),Z=He(I[I.length-1],K,te);return`bottom: ${L}%; height: ${Z-L}%`}return`bottom: 0%; height: ${He(M[0]??K,K,te)}%`}else{if((k==="range"||k==="multi")&&M.length>=2){const I=[...M].sort((pe,be)=>pe-be),L=He(I[0],K,te),Z=He(I[I.length-1],K,te);return`left: ${L}%; width: ${Z-L}%`}return`left: 0%; width: ${He(M[0]??K,K,te)}%`}}),q=g!=null?e.MapSignal(e.computedOf(C,t,a,g,l)((M,K,te,N,I)=>({vals:M,mn:K,mx:te,styles:N,clr:I})),({vals:M,mn:K,mx:te,styles:N,clr:I})=>{const L=[...M].sort((pe,be)=>pe-be),Z=[K,...L,te];return e.Fragment(...Z.slice(0,-1).map((pe,be)=>{const ve=Z[be+1],H=N[be],ie=He(pe,K,te),de=He(ve,K,te),xe=H?.color??I,ke=_.backgroundValue(xe,"solid","light"),F=_.backgroundValue(xe,"solid","dark"),Y=H?.thickness,ne=H?.pattern??"solid",x=Y?`height: ${Y};`:"",le=ne!=="solid"?`border-style: ${ne}; background: none; border-color: ${ke.backgroundColor};`:"";let ye;V?ye=`bottom: ${ie}%; height: ${de-ie}%;`:ye=`left: ${ie}%; width: ${de-ie}%;`;const Ce=`${ye} --rs-color: ${ke.backgroundColor}; --rs-color-dark: ${F.backgroundColor}; ${x} ${le}`;return e.html.div(e.attr.class("bc-range-slider__fill bc-range-slider__segment"),e.attr.style(Ce))}))}):e.html.div(e.attr.class("bc-range-slider__fill"),e.attr.style(E)),J=Array.from({length:v},(M,K)=>G(K,A)),ae=d?e.MapSignal(e.computedOf(d,t,a,n)((M,K,te,N)=>{if(M===!0){const I=[];for(let L=K;L<=te;L+=N)I.push({value:L});return{marks:I,mn:K,mx:te}}return Array.isArray(M)?{marks:M,mn:K,mx:te}:{marks:[],mn:K,mx:te}}),({marks:M,mn:K,mx:te})=>M.length===0?e.Empty:e.html.div(e.attr.class("bc-range-slider__ticks"),...M.map(N=>{const I=He(N.value,K,te);return e.html.div(e.attr.class("bc-range-slider__tick"),V?e.style.bottom(`${I}%`):e.style.left(`${I}%`),N.label!=null?e.html.span(e.attr.class("bc-range-slider__tick-label"),N.label):e.Empty)}))):e.Empty;return e.Fragment(e.attr.class(e.computedOf(c,r,o,w)(Wo)),e.attr.style(e.Value.map(l,Uo)),e.attr.role("group"),e.aria.label(k==="multi"?"Multi-point slider":k==="range"?"Range slider":"Slider"),e.on.pointerdown(j),e.html.div(e.attr.class("bc-range-slider__track"),q,ae,...J))})}function zo(t,a){const n=["bc-otp-input",`bc-otp-input--size-${t}`];return a&&n.push("bc-otp-input--disabled"),n.join(" ")}function Ho(t){const a=_.backgroundValue(t,"solid","light"),n=_.backgroundValue(t,"solid","dark"),r=new Map;return r.set("--otp-focus-color",a.backgroundColor),r.set("--otp-focus-color-dark",n.backgroundColor),r.set("--otp-focus-border",_.borderColorValue(t,"light")),r.set("--otp-focus-border-dark",_.borderColorValue(t,"dark")),Array.from(r.entries()).map(([o,c])=>`${o}: ${c}`).join("; ")}function jo(t,a){return a==="numeric"?/^\d$/.test(t):/^[a-zA-Z0-9]$/.test(t)}function qo({length:t=6,value:a="",onChange:n,onComplete:r,disabled:o=!1,mask:c=!1,type:l="numeric",size:i="md",color:u="primary",placeholder:s="",autoFocus:p=!1}={}){const m=Pe.sessionId("otp"),h=e.computedOf(t,a)((v,V)=>{const C=new Array(v).fill("");for(let S=0;S<Math.min(V.length,v);S++)C[S]=V[S];return C}).deriveProp(),d=e.prop(null),b=[];function f(v){const V=b[v];V!=null&&(V.focus(),V.select())}function g(){const v=h.value.join("");n?.(v),v.length===t&&v.split("").every(V=>V!=="")&&r?.(v)}function y(v,V){if(e.Value.get(o))return;const C=e.Value.get(l),S=V.split("").filter(D=>jo(D,C));if(S.length>1){const D=[...h.value];for(let $=0;$<S.length&&v+$<e.Value.get(t);$++)D[v+$]=S[$];h.set(D),g();const B=Math.min(v+S.length,e.Value.get(t)-1);f(B);return}if(S.length===1){const D=[...h.value];D[v]=S[0],h.set(D),g(),v<e.Value.get(t)-1&&f(v+1)}}function w(v,V){if(!e.Value.get(o))switch(V.key){case"Backspace":{V.preventDefault();const C=[...h.value];C[v]!==""?(C[v]="",h.set(C),g()):v>0&&(C[v-1]="",h.set(C),g(),f(v-1));break}case"ArrowLeft":V.preventDefault(),v>0&&f(v-1);break;case"ArrowRight":V.preventDefault(),v<e.Value.get(t)-1&&f(v+1);break;case"Delete":{V.preventDefault();const C=[...h.value];C[v]="",h.set(C),g();break}case"Home":V.preventDefault(),f(0);break;case"End":V.preventDefault(),f(e.Value.get(t)-1);break}}function k(v,V){V.preventDefault();const C=V.clipboardData?.getData("text")??"";y(v,C)}return e.html.div(e.attr.class(e.computedOf(i,o)(zo)),e.attr.style(e.Value.map(u,Ho)),e.attr.role("group"),e.aria.label("One-time password input"),e.Repeat(t,v=>{const V=v.index,C=`${m}-cell-${V}`;return e.html.input(e.WithElement(S=>(b[V]=S,p&&V===0&&Me.delayedAnimationFrame(()=>S.focus()),e.Empty)),e.attr.id(C),e.attr.type(e.Value.map(c,S=>S?"password":"text")),e.attr.inputmode(e.Value.map(l,S=>S==="numeric"?"numeric":"text")),e.attr.maxlength(1),e.attr.autocomplete("one-time-code"),e.attr.class("bc-otp-input__cell"),e.attr.class(d.map(S=>S===V?"bc-otp-input__cell--focused":"")),e.attr.placeholder(s),e.attr.disabled(o),e.aria.label(`Digit ${V+1} of ${t}`),e.attr.value(h.map(S=>S[V]??"")),e.on.focus(()=>{d.set(V);const S=b[V];S?.select()}),e.on.blur(()=>{d.set(null)}),e.on.input(S=>{const D=S.target;y(V,D.value)}),e.on.keydown(S=>w(V,S)),e.on.paste(S=>k(V,S)))}))}const Go=t=>{const a=new Date(t),n=a.getFullYear().toString().padStart(4,"0"),r=(a.getMonth()+1).toString().padStart(2,"0"),o=a.getDate().toString().padStart(2,"0"),c=a.getHours().toString().padStart(2,"0"),l=a.getMinutes().toString().padStart(2,"0");return`${n}-${r}-${o}T${c}:${l}`},Yo=t=>{const{value:a,onBlur:n,onChange:r}=t;return Q.WithTemporal(o=>se.InputContainer({...t,input:e.input["datetime-local"](Ee.CommonInputAttributes(t),e.attr.value(e.Value.map(a,c=>Go(Number(c.epochMilliseconds)))),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(c=>r(o.Instant.from(new Date(c).toISOString())))):e.Empty)}))},Ko=t=>{const a=new Date(t),n=a.getFullYear().toString().padStart(4,"0"),r=(a.getMonth()+1).toString().padStart(2,"0"),o=a.getDate().toString().padStart(2,"0"),c=a.getHours().toString().padStart(2,"0"),l=a.getMinutes().toString().padStart(2,"0");return`${n}-${r}-${o}T${c}:${l}`},Xo=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:c,disabled:l}=t,i=Q.NullableResetAfter(a,l,r??o);return Q.WithTemporal(u=>se.InputContainer({...t,input:e.input["datetime-local"](Ee.CommonInputAttributes(t),e.attr.value(e.Value.map(a,s=>s==null?null:Ko(Number(s.epochMilliseconds)))),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(s=>r(s===""?null:u.Instant.from(new Date(s).toISOString())))):e.Empty,o!=null?e.on.input(e.emitValue(s=>o(s===""?null:u.Instant.from(new Date(s).toISOString())))):e.Empty),after:c!=null?e.Fragment(i,c):i}))},Zo=t=>{const{value:a,onBlur:n,onChange:r}=t;return Q.WithTemporal(o=>se.InputContainer({...t,input:e.input["datetime-local"](Ee.CommonInputAttributes(t),e.attr.value(e.Value.map(a,c=>c.toJSON())),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(c=>{const l=o.PlainDateTime.from(c),i=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(o.ZonedDateTime.from({...l,timeZone:i}))})):e.Empty)}))},Jo=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:c,disabled:l}=t,i=Q.NullableResetAfter(a,l,r??o);return Q.WithTemporal(u=>se.InputContainer({...t,input:e.input["datetime-local"](Ee.CommonInputAttributes(t),e.attr.value(e.Value.map(a,s=>s?.toJSON())),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(s=>{if(s==="")return r(null);const p=u.PlainDateTime.from(s),m=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(u.ZonedDateTime.from({...p,timeZone:m}))})):e.Empty,o!=null?e.on.input(e.emitValue(s=>{if(s==="")return o(null);const p=u.PlainDateTime.from(s),m=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return o(u.ZonedDateTime.from({...p,timeZone:m}))})):e.Empty),after:c!=null?e.Fragment(i,c):i}))},Qo=We.createTemporalInput({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,a)=>t.PlainYearMonth.from(a)}),el=We.createNullableTemporalInput({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,a)=>t.PlainYearMonth.from(a)}),tl=t=>{const{value:a,onChange:n}=t;return Q.WithTemporal(r=>Q.MaskInput({...t,value:e.Value.map(a,o=>o.toString()),onChange:n!=null?o=>n(r.PlainMonthDay.from(`--${o}`)):void 0,onInput:void 0,mask:"99-99",placeholder:"MM-DD"}))},al=t=>{const{after:a,disabled:n}=t,r=Q.NullableResetAfter(t.value,n,t.onChange??t.onInput);return Q.WithTemporal(o=>{const c=Ee.mapInputOptions(t,l=>l?.toString()??"",l=>l===""?null:o.PlainMonthDay.from(`--${l}`));return Q.MaskInput({...c,mask:"99-99",placeholder:"MM-DD",after:a!=null?e.Fragment(r,a):r})})};function nl(t,a,n){return e.Ensure(t.signal,()=>{const r=t.transform(o=>o,o=>o);return a(r)},n)}const rl={filling:{type:"filling"},submitting:{type:"submitting"},error:t=>({type:"error",error:t}),success:{type:"success"}};class Xa extends re.Controller{constructor(a,n,r,o,c){super(a,n,r,o,c)}isValidColor=this.signal.map(X.isValidColor);isValidHex=this.signal.map(X.isValidHexColor);normalizedHex=this.signal.map(a=>X.normalizeHexColor(a)??a);setColor=a=>{if(X.isValidHexColor(a)){const n=X.normalizeHexColor(a);if(n){this.change(n);return}}this.change(a)};setHex=a=>{const n=X.normalizeHexColor(a);n&&this.change(n)};setRgb=(a,n,r)=>{const o=l=>{const i=Math.round(Math.max(0,Math.min(255,l))).toString(16);return i.length===1?"0"+i:i},c=`#${o(a)}${o(n)}${o(r)}`;this.change(c)};getRgb=()=>{const a=this.signal.value,n=X.normalizeHexColor(a);if(!n)return null;const r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null};withFormat=a=>{const n=o=>{switch(a){case"hex":return X.normalizeHexColor(o)??o;case"rgb":const c=this.getRgb();return c?`rgb(${c.r}, ${c.g}, ${c.b})`:o;case"hsl":return o;default:return o}},r=o=>X.normalizeHexColor(o)??o;return this.transform(n,r,[`format-${a}`])}}function ol(t){return new Xa(t.path,t.change,t.signal,t.status,{disabled:t.disabled})}function ll(t){return{id:t.name,disabled:t.disabled,value:t.normalizedHex,hasError:t.errorVisible,onChange:t.setColor,onInput:t.setColor}}function sl({locales:t,onChange:a,updateLocale:n=!0}){return e.Use(_.BeatUII18n,r=>e.Use(_.Locale,({locale:o,setLocale:c})=>re.InputWrapper({layout:"horizontal",content:Q.Group(e.attr.class("bc-group--align-center bc-group--gap-2"),_.Icon({icon:"ic:twotone-language",size:"lg",color:"neutral",title:r.$.locale}),Q.NativeSelect({ariaLabel:r.$.locale,options:e.Value.map(t,l=>l.map(i=>{let u=i.name;return i.nativeName!=null&&i.nativeName!==i.name&&(u+=` (${i.nativeName})`),Le.value(i.code,u)})),value:o,onChange:l=>{n&&c(l),a?.(l)}}))})))}const il=()=>e.Use(_.Locale,({direction:t})=>e.Portal("body",e.attr.class(t.map(a=>`b-${a}`))));function Za(t,a,n,r,o){const c=["bc-notification"];return t&&c.push("bc-notification--bordered"),a&&c.push("bc-notification--has-icon"),n&&c.push("bc-notification--closable"),r&&c.push("bc-notification--loading"),o&&o.length>0&&c.push(o),c.join(" ")}function Ja(t,a){return[`--notification-accent-color: ${he.getColorVar(t,500)}`,`--notification-radius: ${T.getRadiusVar(a)}`].join("; ")}function Qa({loading:t=!1,showCloseButton:a=!1,showBorder:n=!1,color:r="primary",roundedness:o="md",title:c,icon:l,onClose:i,class:u}={},...s){const p=e.Value.map(l,m=>m!=null);return e.html.section(e.attr.class(e.computedOf(n,p,a,t,u)((m,h,d,b,f)=>[Za(m,h,d,b,f)].join(" "))),e.attr.style(e.computedOf(r,o)((m,h)=>Ja(m,h))),e.aria.live("polite"),e.aria.busy(t),e.When(t,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__loader"),_.Icon({icon:"line-md:loading-twotone-loop",size:"lg",color:r,accessibility:"decorative"})),()=>e.When(p,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__icon"),_.Icon({icon:l,size:"md"})),()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__accent"),e.aria.hidden(!0)))),e.html.div(e.attr.class("bc-notification__body"),c!=null?e.html.div(e.attr.class("bc-notification__title"),c):null,e.html.div(e.attr.class("bc-notification__content"),...s)),e.When(a,()=>e.html.div(e.attr.class("bc-notification__meta"),re.CloseButton({size:"sm",color:r,onClick:i}))))}let cl=0;class ul{handles=[];attach(a){return this.detach(a),this.handles.push(a),()=>this.detach(a)}detach(a){const n=this.handles.lastIndexOf(a);n>=0&&this.handles.splice(n,1)}get current(){const a=this.handles[this.handles.length-1];if(!a)throw new Error("NotificationService: no provider attached. Ensure BeatUI includes notifications or attach the provider manually.");return a}show(a,...n){return this.current.show(a,...n)}clear(){this.current.clear()}}const en=new ul,Zt={mark:e.makeProviderMark("NotificationProvider"),create:({position:t="bottom-end"}={})=>{const a=e.prop(0),n=e.prop([]),r=[];function o(p){return r.push(p),()=>{const m=r.lastIndexOf(p);m>=0&&r.splice(m,1)}}const c=p=>{n.update(m=>m.filter(h=>h.id!==p)),a.update(m=>Math.max(0,m-1))},l=[],i=({dismissAfter:p,onClose:m,animation:h={fade:!0},...d},...b)=>{const f=`notification-${++cl}`;a.update(w=>w+1);const g=p!=null?typeof p=="number"?Me.sleep(p*1e3):p:void 0,y={id:f,animation:h,class:e.Value.toSignal(d.class),loading:e.Value.toSignal(d.loading??!1),showCloseButton:e.Value.toSignal(d.showCloseButton==null&&p==null?!0:d.showCloseButton??!0),showBorder:e.Value.toSignal(d.showBorder??!1),color:e.Value.toSignal(d.color??"primary"),roundedness:e.Value.toSignal(d.roundedness??"md"),title:d.title??e.Empty,icon:e.Value.toSignal(d.icon),children:b,listenRequestClose:w=>(l.push(w),m?.(),()=>{}),delayedClose:g};n.update(w=>[...w,y]),r.forEach(w=>w(y))},u=()=>{l.forEach(p=>p()),l.length=0,n.set([]),a.set(0)},s=en.attach({show:i,clear:u});return{value:{activeNotifications:a,entries:n,removeEntry:c,show:i,clear:u,position:t,listenOnShow:o},dispose:()=>{s(),u()}}}};function tn(){return e.Use(Zt,({listenOnShow:t,position:a})=>e.Portal("body",e.html.div(e.attr.class("bc-notification-viewport"),e.attr.class(`bc-notification-viewport--${a}`),e.WithBrowserCtx(n=>e.OnDispose(t(r=>{const o=[],c=e.html.div(Ne.AnimatedToggle({animation:r.animation,initialStatus:"start-opening"},({close:l,listenOnClosed:i})=>(r.delayedClose?.finally(l),i(()=>{o.forEach(u=>u())}),Qa({class:r.class,loading:r.loading,showCloseButton:r.showCloseButton,showBorder:r.showBorder,color:r.color,roundedness:r.roundedness,title:r.title,icon:r.icon,onClose:l},...r.children))));o.push(e.renderWithContext(c,n))}))))))}function dl({includeAuthI18n:t=!1,enableAppearance:a=!0,defaultAppearance:n="system",appearancePreferenceKey:r="bui-appearance",includeNotifications:o=!0,notificationPosition:c="bottom-end"},...l){return e.WithProvider(({set:i,use:u})=>{i(Te.Location,{}),i(_.Locale,{}),i(_.BeatUII18n,{}),i(nt.Theme,{defaultAppearance:a?n:"light",appearancePreferenceKey:r}),i(e.ReducedMotion,void 0),o&&i(Zt,{position:c}),Te.NavigationService.attach(u(Te.Location));const s=e.Fragment(a?nt.ThemeAppearance():e.Empty,il(),o?tn():e.Empty,...l);return t?e.Task(()=>Promise.resolve().then(()=>require("./translations-C_-cObaF.cjs")).then(p=>p.translations),({AuthI18n:p})=>e.Provide(p,{},()=>s)):s})}function pl({content:t,toolbar:a=!0,page:n,zoom:r,view:o,pagemode:c,scrollbar:l=!0,navpanes:i=!0,search:u,nameddest:s,viewrect:p,highlight:m,allowfullscreen:h=!1}){const d=e.Value.toSignal(t).mapAsync(async f=>{if(f instanceof Blob){const g=await f.arrayBuffer(),y=new Blob([g],{type:"application/pdf"});return URL.createObjectURL(y)}else{if(f instanceof ArrayBuffer)return URL.createObjectURL(new Blob([f],{type:"application/pdf"}));if(f instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(f)],{type:"application/pdf"}));if(typeof f=="string"){const y=await(await fetch(f)).arrayBuffer(),w=new Blob([y],{type:"application/pdf"});return URL.createObjectURL(w)}}},null),b=e.computedOf(d,a,n,r,o,c,l,i,u,s,p,m)((f,g,y,w,k,v,V,C,S,D,B,$)=>{if(f==null)return null;const R=[];g===!1&&R.push("toolbar=0"),y!=null&&y>0&&R.push(`page=${y}`),w!=null&&w>0&&R.push(`zoom=${w}`),k!=null&&R.push(`view=${k}`),v!=null&&R.push(`pagemode=${v}`),V===!1&&R.push("scrollbar=0"),C===!1&&R.push("navpanes=0"),S!=null&&R.push(`search=${encodeURIComponent(S)}`),D!=null&&R.push(`nameddest=${encodeURIComponent(D)}`),B!=null&&R.push(`viewrect=${encodeURIComponent(B)}`),$!=null&&R.push(`highlight=${encodeURIComponent($)}`);const G=R.join("&");return G?`${f}#${G}`:f});return d.on((f,g)=>{g!=null&&URL.revokeObjectURL(g)}),e.Use(_.BeatUII18n,f=>e.html.div(e.OnDispose(()=>{const g=d.value;g!=null&&URL.revokeObjectURL(g)}),e.attr.class("h-full w-full"),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(h),e.attr.title(f.$.pdfPreview),e.attr.loading("lazy"),e.WithElement(g=>{const y=g;let w=!0;return b.on(k=>{k!=null&&(w?(y.src=k,w=!1):(y.src="about:blank",setTimeout(()=>{y.src=k},50)))}),e.Empty}))))}function ml({content:t,page:a,zoom:n,pagemode:r,nameddest:o,search:c,textLayerMode:l,sidebarViewOnLoad:i,scrollModeOnLoad:u,spreadModeOnLoad:s,enableScripting:p,enablePrinting:m,viewerUrl:h=null,allowfullscreen:d=!0,class:b=null}){const f=e.Value.toSignal(t).mapAsync(async y=>{if(y instanceof Blob)return URL.createObjectURL(y);if(y instanceof ArrayBuffer)return URL.createObjectURL(new Blob([y],{type:"application/pdf"}));if(y instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(y)],{type:"application/pdf"}));if(typeof y=="string")return y},null),g=e.computedOf(f,h,a,n,r,o,c,l,i,u,s,p,m)((y,w,k,v,V,C,S,D,B,$,R,G,A)=>{if(y==null)return null;const j=w??"https://mozilla.github.io/pdf.js/web/viewer.html",E=new URLSearchParams;E.set("file",y);const q=[];k!=null&&k>0&&q.push(`page=${k}`),v!=null&&(typeof v=="string"?q.push(`zoom=${v}`):q.push(`zoom=${v}`)),V!=null&&q.push(`pagemode=${V}`),C!=null&&q.push(`nameddest=${encodeURIComponent(C)}`),S!=null&&q.push(`search=${encodeURIComponent(S)}`),D!=null&&q.push(`textLayer=${D}`),B!=null&&q.push(`sidebar=${B}`),$!=null&&q.push(`scrollMode=${$}`),R!=null&&q.push(`spreadMode=${R}`),G!=null&&q.push(`enableScripting=${G?"1":"0"}`),A!=null&&q.push(`enablePrinting=${A?"1":"0"}`);const J=q.length>0?`#${q.join("&")}`:"";return`${j}?${E.toString()}${J}`});return f.on((y,w)=>{w!=null&&w.startsWith("blob:")&&URL.revokeObjectURL(w)}),e.Use(_.BeatUII18n,y=>e.html.div(e.OnDispose(()=>{const w=f.value;w!=null&&w.startsWith("blob:")&&URL.revokeObjectURL(w)}),e.attr.class("bc-pdfjs-preview h-full w-full"),e.attr.class(b),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(d),e.attr.title(y.$.pdfPreview),e.attr.loading("lazy"),e.attr.src(g))))}function hl(t,a){const n=["bc-empty-state",`bc-empty-state--size-${t}`];return a&&a.length>0&&n.push(a),n.join(" ")}function bl({icon:t,title:a,description:n,size:r="md",action:o,class:c}){return e.html.div(e.attr.class(e.computedOf(r,c)((l,i)=>hl(l??"md",i))),e.Ensure(t,l=>e.html.div(e.attr.class("bc-empty-state__icon"),_.Icon({icon:l,size:e.Value.map(r,i=>{const u=i??"md";return u==="sm"?"lg":"xl"}),accessibility:"decorative"}))),e.html.h3(e.attr.class("bc-empty-state__title"),a),e.Ensure(n,l=>e.html.p(e.attr.class("bc-empty-state__description"),l)),o!=null?e.html.div(e.attr.class("bc-empty-state__action"),o):e.Empty)}const gl=({id:t,css:a})=>e.Portal("head",e.html.style(e.attr.id(t),e.attr.innerHTML(a)));function je(t,a){return a==null?null:e.html.meta(e.attr.name(t),e.attr.content(e.Value.map(a,n=>String(n))))}function _e(t,a){return a==null?null:e.html.meta(e.attr.property(t),e.attr.content(e.Value.map(a,n=>String(n))))}function ht(t,a){return a==null?null:e.ForEach(a,n=>_e(t,n))}function fl(t,a){return a==null?null:e.When(e.Value.map(a,n=>Array.isArray(n)),()=>ht(t,a),()=>_e(t,a))}const vl=t=>{const a=[];if(a.push(_e("og:title",t.title)),a.push(_e("og:type",t.type)),a.push(_e("og:url",t.url)),a.push(_e("og:image",t.image)),a.push(_e("og:description",t.description)),a.push(_e("og:site_name",t.siteName)),a.push(_e("og:locale",t.locale)),t.localeAlternate!=null){const n=ht("og:locale:alternate",t.localeAlternate);n!=null&&a.push(n)}if(a.push(_e("og:image:alt",t.imageAlt)),a.push(_e("og:image:width",t.imageWidth)),a.push(_e("og:image:height",t.imageHeight)),a.push(_e("og:image:type",t.imageType)),t.images!=null){const n=ht("og:image",t.images);n!=null&&a.push(n)}if(a.push(_e("og:video",t.video)),a.push(_e("og:video:type",t.videoType)),a.push(_e("og:video:width",t.videoWidth)),a.push(_e("og:video:height",t.videoHeight)),a.push(_e("og:video:secure_url",t.videoSecureUrl)),a.push(_e("og:audio",t.audio)),a.push(_e("og:audio:type",t.audioType)),a.push(_e("og:audio:secure_url",t.audioSecureUrl)),a.push(_e("article:published_time",t.publishedTime)),a.push(_e("article:modified_time",t.modifiedTime)),a.push(_e("article:expiration_time",t.expirationTime)),a.push(fl("article:author",t.author)),a.push(_e("article:section",t.section)),t.tags!=null){const n=ht("article:tag",t.tags);n!=null&&a.push(n)}return a.push(_e("profile:first_name",t.firstName)),a.push(_e("profile:last_name",t.lastName)),a.push(_e("profile:username",t.username)),a.push(_e("profile:gender",t.gender)),a.push(je("twitter:card",t.twitterCard)),a.push(je("twitter:site",t.twitterSite)),a.push(je("twitter:creator",t.twitterCreator)),a.push(je("twitter:title",e.coalesce(t.twitterTitle,t.title))),a.push(je("twitter:description",e.coalesce(t.twitterDescription,t.description))),a.push(je("twitter:image",e.coalesce(t.twitterImage,t.image))),a.push(je("twitter:image:alt",e.coalesce(t.twitterImageAlt,t.imageAlt))),t.canonical!=null&&e.Value.get(t.canonical)!=null&&a.push(e.html.link(e.attr.rel("canonical"),e.attr.href(t.canonical))),a.push(je("robots",t.robots)),a.push(je("keywords",t.keywords)),a.push(je("author",t.metaAuthor)),e.Portal("head",a.filter(n=>n!=null).flat())};function yl(t){const{items:a,onMarkAllRead:n,onClose:r}=t,o=e.computedOf(a)(c=>c.filter(l=>!l.read).length);return e.Use(_.BeatUII18n,c=>e.html.div(e.attr.class("bc-notification-panel"),e.html.div(e.attr.class("bc-notification-panel__header"),e.html.div(e.attr.class("bc-notification-panel__header-title"),e.html.span(c.$.notifications),e.When(e.computedOf(o)(l=>l>0),()=>Je({color:"primary",size:"xs",circle:!0},o.map(String)))),e.html.div(e.attr.class("bc-notification-panel__header-actions"),n?e.html.button(e.attr.class("bc-notification-panel__mark-read-btn"),e.attr.type("button"),e.on.click(()=>n()),c.$.markAllAsRead):e.Empty,r?e.html.button(e.attr.class("bc-notification-panel__close-btn"),e.attr.type("button"),e.on.click(()=>r()),_.Icon({icon:"lucide:x",size:"sm"})):e.Empty)),e.html.div(e.attr.class("bc-notification-panel__list"),e.ForEach(a,l=>e.html.div(e.attr.class(l.map(i=>i.read?"bc-notification-panel__item":"bc-notification-panel__item bc-notification-panel__item--unread")),e.on.click(()=>l.value.onClick?.()),e.html.div(e.attr.class("bc-notification-panel__item-icon"),e.attr.style(l.map(i=>i.iconColor?`background: ${i.iconColor}14; color: ${i.iconColor}`:"")),_.Icon({icon:l.$.icon,size:"sm"})),e.html.div(e.attr.class("bc-notification-panel__item-content"),e.html.div(e.attr.class("bc-notification-panel__item-title"),l.$.title),e.html.div(e.attr.class("bc-notification-panel__item-body"),l.$.body),e.html.div(e.attr.class("bc-notification-panel__item-meta"),e.html.span(l.$.time),e.When(l.map(i=>i.source!==void 0),()=>e.html.span(e.attr.class("bc-notification-panel__item-source"),l.map(i=>i.source?.label??""))))),e.When(l.map(i=>!i.read),()=>e.html.span(e.attr.class("bc-notification-panel__item-dot"))))),e.When(e.computedOf(a)(l=>l.length===0),()=>e.html.div(e.attr.class("bc-notification-panel__empty"),_.Icon({icon:"lucide:bell-off",size:"lg"}),e.html.div(c.$.noNotifications))))))}function kl(t){return["bc-breadcrumbs",`bc-breadcrumbs--size-${t}`].join(" ")}function _l(t,a){if(t.length<=a)return t;const n=t[0],r=t.slice(-(a-1));return[n,{isEllipsis:!0},...r]}function wl({items:t,separator:a="›",maxItems:n,size:r="md"}){const o=n!=null?e.computedOf(t,n)((c,l)=>l&&l>0?_l(c,l):c):e.Value.map(t,c=>c);return e.Use(_.BeatUII18n,c=>e.html.nav(e.attr.class(e.Value.map(r,l=>kl(l??"md"))),e.aria.label(c.$.breadcrumbs),e.html.ol(e.attr.class("bc-breadcrumbs__list"),e.ForEach(o,l=>{const i=l.map(s=>"isEllipsis"in s&&s.isEllipsis===!0),u=l.map(s=>!("isEllipsis"in s)&&s.current===!0);return e.When(i,()=>e.html.li(e.attr.class("bc-breadcrumbs__item bc-breadcrumbs__ellipsis"),e.aria.hidden(!0),"..."),()=>{const s=l.map(d=>!("isEllipsis"in d)&&d.href!=null),p=l.map(d=>!("isEllipsis"in d)&&d.href==null&&d.onClick!=null),m=l.map(d=>!("isEllipsis"in d)&&d.icon!=null),h=d=>[e.attr.class(d),e.When(m,()=>_.Icon({icon:l.map(b=>"isEllipsis"in b?"":b.icon??""),size:r,accessibility:"decorative"})),e.html.span(l.map(b=>"isEllipsis"in b?"":b.label))];return e.html.li(e.attr.class(e.Value.map(u,d=>d?"bc-breadcrumbs__item bc-breadcrumbs__item--current":"bc-breadcrumbs__item")),e.When(u,()=>e.aria.current("page")),e.When(s,()=>e.html.a(e.attr.href(l.map(d=>"isEllipsis"in d?"":d.href??"")),...h("bc-breadcrumbs__link")),()=>e.When(p,()=>e.html.button(e.attr.type("button"),e.on.click(()=>{const d=e.Value.get(l);"isEllipsis"in d||d.onClick?.()}),...h("bc-breadcrumbs__button")),()=>e.html.span(...h("bc-breadcrumbs__text")))))})},()=>e.html.li(e.attr.class("bc-breadcrumbs__separator"),e.aria.hidden(!0),a)))))}const Jt=({viewTransition:t,state:a,scroll:n,replace:r})=>{const o={};return a!==void 0&&(o.state=a),n!==void 0&&(o.scroll=n),r!==void 0&&(o.replace=r),t!==void 0&&(o.viewTransition=t),o};function Pt(t,a){const n=["bc-link"];if(a)n.push("bc-link--disabled");else switch(t){case"plain":n.push("bc-link--plain");break;case"hover":n.push("bc-link--hover");break;default:n.push("bc-link--default");break}return n.join(" ")}function Et(t){const a=_.textColorValue(t,"light"),n=_.textColorValue(t,"dark");return[`--link-color: ${a}`,`--link-color-dark: ${n}`,`--link-hover-color: ${a}`,`--link-hover-color-dark: ${n}`].join("; ")}function an({href:t,variant:a="default",color:n="primary",colorDisabled:r="base",disabled:o=!1,viewTransition:c=!0,state:l,scroll:i,replace:u,target:s,rel:p},...m){return e.When(o,()=>e.html.span(e.attr.class(e.computedOf(a,o)((h,d)=>Pt(h,d))),e.attr.style(e.computedOf(r)(h=>Et(h??"base"))),...m),()=>Te.Anchor({href:t,...Jt({viewTransition:c,state:l,scroll:i,replace:u})},e.attr.class(e.computedOf(a,o)((h,d)=>Pt(h,d))),e.attr.style(e.computedOf(n)(h=>Et(h??"primary"))),s?e.attr.target(s):null,p?e.attr.rel(p):null,...m))}const Cl=t=>t?t.startsWith("#")?t:`#${t}`:"",Vl=t=>{if(!t)return new URLSearchParams;if(typeof t=="string"){const a=t.startsWith("?")?t.slice(1):t;return new URLSearchParams(a)}return t instanceof URLSearchParams?new URLSearchParams(t):new URLSearchParams(t)};function nn(t,a,n){const r=Vl(t.search),o=r.toString(),c=o?`?${o}`:"",l=Cl(t.hash);switch(n){case"exact":return t.pathname+c+l===a;case"prefix":return t.pathname.startsWith(a)||(t.pathname+c).startsWith(a);case"params":try{const i=typeof document<"u"&&document.baseURI?document.baseURI:"http://localhost/",u=new URL(a,i);if(t.pathname!==u.pathname)return!1;const s=Array.from(new URLSearchParams(u.search).entries()).sort(),p=Array.from(r.entries()).sort();return s.length!==p.length?!1:s.every(([m,h],d)=>{const[b,f]=p[d];return m===b&&h===f})}catch{return t.pathname===a}default:return!1}}function yt(t,a){return a==="exact"?e.computedOf(t)(n=>n):e.computedOf(t)(n=>r=>nn(r,n,a))}function Sl({href:t,matchMode:a="exact",disableWhenActive:n=!0,...r},...o){return e.Use(Te.Location,c=>{const l=c.matchSignal(yt(t,a)),i=e.computedOf(l,n)((u,s)=>s??!0?u:!1);return an({...r,href:t,disabled:i},...o)})}function xl({href:t,viewTransition:a=!0,state:n,scroll:r,replace:o,target:c,rel:l,matchMode:i,disableWhenActive:u,variant:s="filled",size:p="md",color:m="base",roundedness:h="sm",disabled:d=!1},...b){return i!==void 0||u!==void 0?e.Use(Te.Location,f=>{const g=i!==void 0?f.matchSignal(yt(t,i)):e.computedOf(f.location)(()=>!1),y=e.computedOf(g,u)((k,v)=>!(v??!0)||!i?!1:k),w=e.computedOf(d,y)((k,v)=>k||v);return ca({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:c,rel:l,variant:s,size:p,color:m,roundedness:h,disabled:w},...b)}):ca({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:c,rel:l,variant:s,size:p,color:m,roundedness:h,disabled:d},...b)}function ca({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:c,rel:l,variant:i="default",size:u="md",color:s="base",roundedness:p="sm",disabled:m=!1,fullWidth:h=!1,loading:d=!1},...b){return e.When(m??!1,()=>e.html.span(e.attr.class(e.computedOf(u,p,d,h)(se.generateButtonClasses)),e.attr.style(e.computedOf(i,s,m)((f,g,y)=>se.generateButtonStyles(f??"filled",g??"base",y))),...b),()=>Te.Anchor({href:t,...Jt({viewTransition:a,state:n,scroll:r,replace:o})},e.attr.class(e.computedOf(u,p,d,h)(se.generateButtonClasses)),e.attr.style(e.computedOf(i,s,m)((f,g,y)=>se.generateButtonStyles(f??"filled",g??"base",y))),c?e.attr.target(c):null,l?e.attr.rel(l):null,...b))}const rn={mark:e.makeProviderMark("SidebarContext"),create:t=>({value:{backgroundMode:"light"},dispose:()=>{}})};function Il({backgroundMode:t="light"},...a){return e.Provide(rn,e.Value.map(t,n=>({backgroundMode:n})),()=>e.html.div(e.attr.class("bc-sidebar"),e.attr.class(e.Value.map(t,n=>n==="dark"?"bc-sidebar--dark-bg":"")),...a))}function Ft({rail:t,header:a},...n){return Qe.Stack(a!=null?e.html.div(e.attr.class("bc-sidebar-group__header"),a):null,e.html.div(e.attr.class(e.Value.map(t??!1,r=>r?"bc-sidebar-group--rail":"")),e.attr.class("bc-sidebar-group"),...n))}function on(t,...a){const n=Jt({viewTransition:t.viewTransition??!0,state:t.state,scroll:t.scroll,replace:t.replace});return Te.Anchor({href:t.href,...n},...a)}function ln(...t){return e.html.span(...t)}function sn(t,...a){return e.html.button(e.attr.type("button"),e.on.click(t.onClick),t.ariaExpanded!=null?e.aria.expanded(e.Value.map(t.ariaExpanded,n=>n)):null,t.ariaControls!=null?e.aria.controls(t.ariaControls):null,t.ariaLabel!=null?e.aria.label(t.ariaLabel):null,...a)}function cn(t){const a=[e.attr.class("bc-sidebar-link")];return t.icon!=null&&a.push(e.html.span(e.attr.class("bc-sidebar-link--icon"),_.Icon({icon:t.icon}))),a.push(e.html.span(e.attr.class("bc-sidebar-link__content"),t.content)),t.after!=null&&a.push(e.html.span(e.attr.class("bc-sidebar-link__right"),t.after)),t.action!=null&&a.push(e.html.button(e.attr.type("button"),e.attr.class("bc-sidebar-link--action"),e.on.click((n,r)=>{t.action?.onClick?.(r)}),_.Icon({icon:t.action?.icon}))),"onClick"in t?sn(t,...a):e.Use(Te.Location,n=>{const r=n.matchSignal(yt(t.href,"exact"),{includeSearch:!1,includeHash:!1});return e.When(r,()=>ln(...a),()=>on(t,...a))})}function $l({rail:t=!0,icon:a,header:n,startOpen:r=!0},...o){const c=e.Value.deriveProp(r),l=Pe.sessionId("sidebar-group"),i=`${l}-content`;return Ft({},e.attr.class("bc-sidebar-group-collapsible"),e.attr.class(c.map(u=>u?"bc-sidebar-group-collapsible--open":"bc-sidebar-group-collapsible--closed")),e.attr.role("group"),e.attr.id(l),cn({icon:a,onClick:()=>c.update(u=>!u),ariaExpanded:c,ariaControls:i,after:e.html.span(e.attr.class("bc-sidebar-group-collapsible-indicator"),_.Icon({icon:"lucide:chevron-down",color:"base",size:"xs"})),content:n}),Ft({rail:t},e.attr.id(i),vt({open:c},...o)))}function Ol(){return e.html.hr(e.attr.class("bc-sidebar-separator"))}function Tl(t,a,n,r){const o=["bc-tabs",`bc-tabs--${t}`,`bc-tabs--${a}`];return n&&o.push("bc-tabs--disabled"),r!=null&&r!=="default"&&o.push(`bc-tabs--variant-${r}`),o.join(" ")}function Dl(t,a){const n=new Map,r=a==="white"||a==="black"||a==="transparent"?"var(--color-primary-600)":he.getColorVar(a,600),o=a==="white"||a==="black"||a==="transparent"?"var(--color-primary-400)":he.getColorVar(a,400),c=a==="white"||a==="black"||a==="transparent"?"var(--color-primary-500)":he.getColorVar(a,500),l=a==="white"||a==="black"||a==="transparent"?"var(--color-primary-400)":he.getColorVar(a,400);if(n.set("--tabs-active-color",r),n.set("--tabs-active-color-dark",o),n.set("--tabs-indicator-color",c),n.set("--tabs-indicator-color-dark",l),t==="filled"){const i=_.backgroundValue(a,"solid","light"),u=_.backgroundValue(a,"solid","dark");n.set("--tabs-filled-inactive-bg",i.backgroundColor),n.set("--tabs-filled-inactive-text","var(--color-white)");const s=_.hoverBackgroundValue(a,"solid","light");n.set("--tabs-filled-inactive-bg-hover",s.backgroundColor);const p=_.hoverBackgroundValue(a,"solid","dark");n.set("--tabs-filled-inactive-bg-dark-hover",p.backgroundColor),n.set("--tabs-filled-inactive-bg-dark",u.backgroundColor),n.set("--tabs-filled-inactive-text-dark",u.textColor),n.set("--tabs-filled-active-bg","var(--color-white)"),n.set("--tabs-filled-active-text","var(--color-base-800)"),n.set("--tabs-filled-active-bg-dark","var(--color-base-900)"),n.set("--tabs-filled-active-text-dark",o)}return t==="outline"&&(n.set("--tabs-outline-active-border",l),n.set("--tabs-outline-active-border-dark",he.getColorVar(a==="white"||a==="black"||a==="transparent"?"primary":a,600))),Array.from(n.entries()).map(([i,u])=>`${i}: ${u}`).join("; ")}function Pl(t,a,n){const r=["bc-tab",`bc-tab--${t}`];return a&&r.push("bc-tab--active"),n&&r.push("bc-tab--disabled"),r.join(" ")}function dt(t,a,n){const r=a.length;let o=t+n;o>=r?o=0:o<0&&(o=r-1);let c=0;for(;c<r;){const l=a[o];if(!e.Value.get(l.disabled??!1))return o;o+=n,o>=r?o=0:o<0&&(o=r-1),c++}return t}function El(t){const{items:a,value:n,onChange:r,size:o="md",variant:c="default",color:l="primary",disabled:i=!1,orientation:u="horizontal",showContent:s=!0,ariaLabel:p}=t,m=Pe.sessionId("tablist"),h=e.prop(-1),d=a.map((f,g)=>{const y=e.computedOf(n)(V=>V===f.key),w=e.computedOf(i,f.disabled)((V,C)=>V||C),k=`${m}-tab-${f.key}`,v=`${m}-panel-${f.key}`;return{item:f,index:g,isActive:y,isTabDisabled:w,tabId:k,panelId:v}}),b=f=>{if(e.Value.get(i))return;const y=h.value,w=e.Value.get(u)==="horizontal";let k=y;switch(f.key){case(w?"ArrowRight":"ArrowDown"):f.preventDefault(),k=dt(y,a,1);break;case(w?"ArrowLeft":"ArrowUp"):f.preventDefault(),k=dt(y,a,-1);break;case"Home":f.preventDefault(),k=dt(-1,a,1);break;case"End":f.preventDefault(),k=dt(a.length,a,-1);break;case"Enter":case" ":if(f.preventDefault(),y>=0&&y<a.length){const v=a[y];e.Value.get(v.disabled??!1)||r?.(v.key)}break}k!==y&&k>=0&&k<a.length&&(h.set(k),setTimeout(()=>{const v=document.querySelector(`[data-tab-index="${k}"]`);v&&v.focus()},0))};return e.html.div(e.attr.class(e.computedOf(o,u,i,c)((f,g,y,w)=>Tl(f??"md",g??"horizontal",y??!1,w??"default"))),e.attr.style(e.computedOf(c,l)((f,g)=>Dl(f??"default",g??"primary"))),e.html.div(e.attr.class("bc-tabs__list"),e.attr.role("tablist"),e.attr.id(m),e.aria.orientation(u??"horizontal"),e.aria.label(p),e.on.keydown(b),...d.map(({item:f,index:g,isActive:y,isTabDisabled:w,tabId:k,panelId:v})=>e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(o,y,w)((V,C,S)=>Pl(V??"md",C??!1,S??!1))),e.attr.id(k),e.attr.role("tab"),e.attr.tabindex(e.computedOf(y,h)((V,C)=>V||C===g?0:-1)),e.aria.selected(y),e.aria.controls(v),e.aria.disabled(w),e.attr.disabled(w),e.dataAttr("tab-index",String(g)),e.aria.label(f.ariaLabel),e.on.click(V=>{V.preventDefault(),e.Value.get(f.disabled??!1)||e.Value.get(i)||(r?.(f.key),h.set(g))}),e.on.focus(()=>{h.set(g)}),f.label))),e.When(s??!0,()=>e.html.div(e.attr.class("bc-tabs__panels"),...d.map(({item:f,isActive:g,tabId:y,panelId:w})=>e.When(g,()=>e.html.div(e.attr.class("bc-tabs__panel"),e.attr.id(w),e.attr.role("tabpanel"),e.attr.tabindex(0),e.aria.labelledby(y),f.content()))))))}function Fl(t){return t<20?10:t<50?3:t<80?2:t<99?.5:0}function Al(t){const a=_.backgroundValue(t,"solid","light"),n=_.backgroundValue(t,"solid","dark");return`--nav-progress-fill: ${a.backgroundColor}; --nav-progress-fill-dark: ${n.backgroundColor}`}function Bl(t={}){const{color:a="primary",height:n=3,position:r="top",showSpinner:o=!1,trickleSpeed:c=200,minimumDuration:l=300,animationSpeed:i=200}=t,u=e.prop(0),s=e.prop(!1),p=e.prop(!1);let m=null,h=null,d=0;function b(){m!=null&&(clearInterval(m),m=null)}function f(){h!=null&&(clearTimeout(h),h=null)}function g(){b(),m=setInterval(()=>{const A=u.value,j=Fl(A);j>0&&u.set(Math.min(A+Math.random()*j,99.5))},e.Value.get(c))}function y(){f(),u.set(0),s.set(!0),p.set(!0),d=Date.now(),requestAnimationFrame(()=>{u.set(Math.random()*5+2),g()})}function w(A){const j=Math.max(0,Math.min(100,A));u.set(j),!s.value&&j<100&&(s.set(!0),p.set(!0))}function k(){b(),u.set(100);const A=e.Value.get(i);h=setTimeout(()=>{s.set(!1),h=setTimeout(()=>{p.set(!1),u.set(0)},A)},A)}function v(){f();const A=Date.now()-d,E=e.Value.get(l)-A;E>0?h=setTimeout(k,E):k()}function V(){b(),f(),s.set(!1),p.set(!1),u.set(0)}const C={start:y,set:w,done:v,reset:V,isActive:s},S=e.Value.map(r,A=>`bc-navigation-progress bc-navigation-progress--${A??"top"}`),D=e.Value.map(a,A=>Al(A??"primary")),B=e.Value.map(n,A=>`${A??3}px`),$=e.Value.map(u,A=>`translateX(${-100+A}%)`),R=e.Value.map(i,A=>`transform ${A??200}ms var(--motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))`);return[e.When(p,()=>e.Portal("body",e.Fragment(e.html.div(e.attr.class(S),e.attr.style(D),e.style.height(B),e.attr.role("progressbar"),e.aria.valuemin(0),e.aria.valuemax(100),e.aria.valuenow(u),e.html.div(e.attr.class(e.Value.map(s,A=>`bc-navigation-progress__bar${A?"":" bc-navigation-progress__bar--done"}`)),e.style.transform($),e.style.transition(R),e.html.div(e.attr.class("bc-navigation-progress__peg")))),e.When(o,()=>e.html.div(e.attr.class(e.Value.map(S,A=>`bc-navigation-progress__spinner${A.includes("--bottom")?" bc-navigation-progress__spinner--bottom":""}`)),e.attr.style(D),e.html.div(e.attr.class("bc-navigation-progress__spinner-icon"))),()=>{}),e.OnDispose(()=>{b(),f()})))),C]}function un(t,a,n,r,o,c,l){const i=t.map(d=>d.children!=null&&d.children.length>0),u=e.computedOf(r,t)((d,b)=>d.has(b.id)),s=e.computedOf(n,t)((d,b)=>d===b.id),p=t.map(d=>d.children??[]),m=()=>{o?.(e.Value.get(t).id)},h=d=>{d.stopPropagation(),c(e.Value.get(t).id)};return e.html.div(e.attr.class("bc-tree-item"),e.html.div(e.attr.class(e.computedOf(s,l)((d,b)=>["bc-tree-item__row",`bc-tree-item__row--size-${b??"md"}`,d?"bc-tree-item__row--selected":""].filter(Boolean).join(" "))),e.attr.style(`padding-left: ${a*20+8}px`),e.attr.role("treeitem"),e.attr.tabindex(0),e.aria.selected(s),e.WithElement(d=>{const b=e.computedOf(i,u)((f,g)=>f?String(g):null);e.Value.on(b,f=>{f!=null?d.setAttribute("aria-expanded",f):d.removeAttribute("aria-expanded")})}),e.on.click(m),e.When(i,()=>e.html.span(e.attr.class(e.Value.map(u,d=>["bc-tree-item__toggle",d?"bc-tree-item__toggle--expanded":""].filter(Boolean).join(" "))),e.on.click(h),_.Icon({icon:"mdi:chevron-right",size:"sm",accessibility:"decorative"})),()=>e.html.span(e.attr.class("bc-tree-item__toggle-spacer"))),e.When(t.map(d=>d.icon!=null),()=>e.html.span(e.attr.class("bc-tree-item__icon"),_.Icon({icon:t.map(d=>d.icon??""),size:"sm",accessibility:"decorative"})),()=>e.Empty),e.html.span(e.attr.class("bc-tree-item__label"),t.map(d=>d.label)),e.When(t.map(d=>d.badge!=null),()=>e.html.span(e.attr.class("bc-tree-item__badge"),t.map(d=>d.badge??"")),()=>e.Empty)),e.When(i,()=>e.html.div(vt({open:u},e.html.div(e.attr.class("bc-tree-item__children"),e.attr.role("group"),e.ForEach(p,d=>un(d,a+1,n,r,o,c,l))))),()=>e.Empty))}function Ml({items:t,selectedId:a,onSelect:n,expandedIds:r,onToggle:o,size:c="md"},...l){const i=e.prop(new Set),u=r??i,s=a??e.prop(void 0),p=m=>{const h=e.Value.get(u),d=!h.has(m);if(r==null){const b=new Set(h);d?b.add(m):b.delete(m),i.set(b)}o?.(m,d)};return e.html.div(e.attr.class(e.Value.map(c,m=>`bc-tree-view bc-tree-view--size-${m??"md"}`)),e.attr.role("tree"),e.ForEach(t,m=>un(m,0,s,u,n,p,c)),...l)}function Ll(t){return $e.Overlay((a,n)=>{let r=n;const o=()=>r();return t(i=>{const{size:u="md",side:s="right",dismissable:p=!0,showCloseButton:m=!0,onClose:h,overlayEffect:d="opaque",container:b="body",header:f,body:g,footer:y}=i;r=n;const w=e.prop("capturing");e.Value.on(p,V=>{w.set(V?"capturing":"non-capturing")});const k=e.computedOf(f!=null,m)((V,C)=>V||C),v=e.WithElement(V=>{const C=Ne.useAnimatedElementToggle({initialStatus:"closed",element:V});C.listenOnClosed(()=>{n()}),r=()=>{C.close()},Me.delayedAnimationFrame(()=>C.open());const D=Pe.sessionId("drawer"),B=f!=null?`${D}-header`:void 0,$=`${D}-body`;return e.html.div(e.attr.class(e.computedOf(u,s,C.status)((R,G,A)=>`bc-drawer bc-drawer--size-${R} bc-drawer--container-${b} bc-drawer--side-${G} bc-drawer--status-${A}`)),e.attr.role("dialog"),e.aria.modal(!0),...B?[e.aria.labelledby(B)]:[],e.aria.describedby($),e.attr.tabindex(-1),e.attr.id(D),e.dataAttr("focus-trap","true"),$e.FocusTrap({active:!0,escapeDeactivates:!1,initialFocus:()=>document.querySelector(`#${D} [aria-label="Close drawer"]`)||null}),e.on.mousedown(R=>R.stopPropagation()),e.When(k,()=>Tt({header:e.html.div(e.attr.class("bc-drawer__header"),e.html.div(e.attr.id(B),f),e.When(m,()=>e.Use(_.BeatUII18n,R=>re.CloseButton({size:"sm",onClick:o,label:R.$.closeDrawer})))),body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id($),g),footer:y&&e.html.div(e.attr.class("bc-drawer__footer"),y)}),()=>Tt({body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id($),g),footer:y&&e.html.div(e.attr.class("bc-drawer__footer"),y)})))});a({mode:w,effect:d??"opaque",container:b,content:v,onClickOutside:()=>{h?.(),o()},onEscape:()=>{h?.(),o()}})},()=>{o()})})}function Nl(t){const{content:a,placement:n="bottom",showDelay:r=0,hideDelay:o=0,mainAxisOffset:c=8,crossAxisOffset:l=0,showOn:i="click",closable:u=!0,role:s="dialog",hasPopup:p="dialog"}=t,m=Pe.sessionId("popover"),h=typeof a=="function"?a:()=>a;return e.Fragment(e.aria.describedby(m),Ve.Flyout({content:()=>e.Fragment(e.attr.class("bc-popover"),e.attr.role(s),e.attr.id(m),h()),placement:n,showDelay:r,hideDelay:o,mainAxisOffset:c,crossAxisOffset:l,showOn:i,closable:u,role:s,hasPopup:p}))}function Wl(t,a,n,r,o,c){const l=_.backgroundValue(t,"solid","light"),i=_.backgroundValue(t,"solid","dark");return[`--ribbon-bg: ${l.backgroundColor}`,`--ribbon-text: ${l.textColor}`,`--ribbon-bg-dark: ${i.backgroundColor}`,`--ribbon-text-dark: ${i.textColor}`,`--ribbon-inset: ${St(a)}`,`--ribbon-offset: ${St(n)}`,`--ribbon-width: ${St(r)}`,`--ribbon-angle: ${o}deg`,`--ribbon-corner: ${c}`].join("; ")}function St(t){return t==null?null:typeof t=="number"?`${t}px`:t}function Ul({color:t="primary",class:a,inset:n=0,offset:r=40,width:o=100,angle:c=45,corner:l="top-end"},...i){return e.html.div(e.attr.class("bc-ribbon"),e.attr.style(e.computedOf(t,n,r,o,c,l)(Wl)),e.attr.class(a),...i)}function Rl(t,a){const{dismissable:n=!0,showCloseButton:r=!0,overlayEffect:o="opaque",container:c="body",padding:l=32}=t;return $e.Overlay((i,u)=>{let s=()=>{};return a(h=>{s=u;const d=e.prop(typeof n!="boolean"||n?"capturing":"non-capturing");let b=typeof n=="boolean"?n:!0;e.Value.on(n,g=>{b=g,d.set(g?"capturing":"non-capturing")});const f=e.html.div(e.attr.class("bc-lightbox"),e.When(r,()=>e.Use(_.BeatUII18n,g=>e.html.div(e.attr.class("bc-lightbox__close"),re.CloseButton({size:"md",label:g.$.closeModal,onClick:()=>{s(),u()}}))),()=>null),e.html.div(e.attr.class("bc-lightbox__viewport"),e.attr.style(e.computedOf(l)(g=>`padding:${typeof g=="number"?g+"px":g}`)),e.html.div(e.attr.class("bc-lightbox__content"),h)));i({mode:d,effect:o??"opaque",container:c,content:f,onClickOutside:()=>{b&&(s(),u())},onEscape:()=>{b&&(s(),u())}})},()=>{s(),u()})})}function zl(t,a){const n=["bc-announcement-bar"];return t&&n.push("bc-announcement-bar--dismissible"),a&&a.length>0&&n.push(a),n.join(" ")}function Hl(t){return`--announcement-bar-bg-color: ${he.getColorVar(t,600)}`}function jl({color:t="primary",icon:a,closable:n=!1,onClose:r,class:o,portal:c=!1},...l){const i=e.prop(!0),u=e.When(i,()=>{const s=e.Value.map(n,p=>!!p||r!=null);return e.html.div(e.attr.class(e.computedOf(s,o)((p,m)=>zl(p,m))),e.attr.style(e.Value.map(t,p=>Hl(p))),e.html.div(e.attr.class("bc-announcement-bar__content"),e.When(e.Value.map(a,p=>p!=null),()=>e.html.div(e.attr.class("bc-announcement-bar__icon"),_.Icon({icon:a,size:"sm",accessibility:"decorative"}))),e.html.div(e.attr.class("bc-announcement-bar__text"),...l),e.When(s,()=>e.html.div(e.attr.class("bc-announcement-bar__close"),re.CloseButton({size:"xs",color:"white",onClick:()=>{i.set(!1),r?.()}})))))});return c===!1?u:e.Portal(c===!0?"body":c,u)}function ql(t,a){const n=a.toLowerCase(),r=n?t.filter(i=>i.label.toLowerCase().includes(n)||i.description?.toLowerCase().includes(n)):t,o=new Map;for(const i of r){const u=i.section??"";o.has(u)||o.set(u,[]),o.get(u).push(i)}const c=[];let l=0;for(const[i,u]of o)for(let s=0;s<u.length;s++)c.push({item:u[s],globalIndex:l++,sectionStart:s===0&&i?i:void 0});return c}function Gl(t,a){const{placeholder:n,emptyMessage:r,size:o="md",container:c="body"}=t;return e.Use(_.BeatUII18n,l=>$e.Overlay((i,u)=>{const s=n??l.$.typeACommand,p=r??l.$.noResultsFound;return a(h=>{const d=e.prop(""),b=e.prop(0);d.on(()=>b.set(0));const g=`${Pe.sessionId("command-palette")}-input`,y=d.map(v=>ql(h,v??"")),w=y.map(v=>v.length===0),k=e.html.div(e.attr.class(e.Value.map(o,v=>`bc-command-palette bc-command-palette--size-${v??"md"}`)),e.attr.role("dialog"),e.aria.modal(!0),e.aria.label(l.$.commandPalette),e.on.mousedown(v=>v.stopPropagation()),$e.FocusTrap({escapeDeactivates:!1,initialFocus:()=>document.getElementById(g)}),e.html.div(e.attr.class("bc-command-palette__header"),e.html.span(e.attr.class("bc-command-palette__search-icon"),_.Icon({icon:"mdi:magnify",size:"md",accessibility:"decorative"})),e.html.input(e.attr.class("bc-command-palette__input"),e.attr.type("text"),e.attr.id(g),e.attr.placeholder(s),e.attr.autocomplete("off"),e.on.input(v=>{d.set(v.target.value)}),e.on.keydown(v=>{const V=e.Value.get(y),C=e.Value.get(b);switch(v.key){case"ArrowDown":v.preventDefault(),b.set(Math.min(C+1,V.length-1));break;case"ArrowUp":v.preventDefault(),b.set(Math.max(C-1,0));break;case"Enter":v.preventDefault();{const S=V.find(D=>D.globalIndex===C);S&&(S.item.onSelect(),u())}break}}))),e.html.div(e.attr.class("bc-command-palette__body"),e.When(w,()=>e.html.div(e.attr.class("bc-command-palette__empty"),p),()=>e.ForEach(y,v=>{const V=e.computedOf(b,v)((C,S)=>C===S.globalIndex);return e.html.div(e.attr.class("bc-command-palette__section"),e.When(v.map(C=>C.sectionStart!=null),()=>e.html.div(e.attr.class("bc-command-palette__section-title"),v.map(C=>C.sectionStart??""))),e.html.div(e.attr.class(e.Value.map(V,C=>`bc-command-palette__item${C?" bc-command-palette__item--selected":""}`)),e.attr.role("option"),e.aria.selected(V),e.on.click(()=>{e.Value.get(v).item.onSelect(),u()}),e.on.mouseenter(()=>{b.set(e.Value.get(v).globalIndex)}),e.When(v.map(C=>C.item.icon!=null),()=>e.html.span(e.attr.class("bc-command-palette__item-icon"),_.Icon({icon:v.map(C=>C.item.icon??""),size:"sm",accessibility:"decorative"}))),e.html.span(e.attr.class("bc-command-palette__item-content"),e.html.span(e.attr.class("bc-command-palette__item-label"),v.map(C=>C.item.label)),e.When(v.map(C=>C.item.description!=null),()=>e.html.span(e.attr.class("bc-command-palette__item-description"),v.map(C=>C.item.description??"")))),e.When(v.map(C=>C.item.shortcut!=null&&C.item.shortcut.length>0),()=>e.html.span(e.attr.class("bc-command-palette__item-shortcut"),e.ForEach(v.map(C=>C.item.shortcut??[]),C=>e.html.kbd(e.attr.class("bc-kbd bc-kbd--size-xs"),C))))))}))));i({mode:"capturing",effect:"transparent",container:c,content:k,onClickOutside:u,onEscape:u})},u)}))}function Yl(t,a){const n=a.toLowerCase();return(a?t.filter(o=>o.label.toLowerCase().includes(n)||(o.description?.toLowerCase().includes(n)??!1)):t).map((o,c)=>({item:o,index:c}))}function Kl(t){const{items:a,onClose:n,position:r}=t,o=e.prop(""),c=e.prop(0);o.on(()=>c.set(0));const l=e.computedOf(a,o)((s,p)=>Yl(s,p??"")),i=s=>{const p=e.Value.get(l),m=e.Value.get(c);switch(s.key){case"ArrowDown":s.preventDefault(),c.set(Math.min(m+1,p.length-1));break;case"ArrowUp":s.preventDefault(),c.set(Math.max(m-1,0));break;case"Enter":s.preventDefault();{const h=p.find(d=>d.index===m);h&&(h.item.onSelect(),n())}break;case"Escape":s.preventDefault(),n();break}},u=r?e.computedOf(r)(s=>s?`position: absolute; left: ${s.x}px; top: ${s.y}px;`:""):void 0;return e.Use(_.BeatUII18n,s=>e.html.div(e.attr.class("bc-block-command-palette"),u?e.attr.style(u):e.Empty,e.on.keydown(i),e.html.div(e.attr.class("bc-block-command-palette__search"),e.html.span(e.attr.class("bc-block-command-palette__search-prefix"),"/"),e.html.input(e.attr.class("bc-block-command-palette__search-input"),e.attr.type("text"),e.attr.placeholder(s.$.typeACommand),e.attr.autofocus(!0),e.attr.value(o),e.on.input(p=>{o.set(p.target.value),c.set(0)}))),e.html.div(e.attr.class("bc-block-command-palette__list"),e.ForEach(l,p=>{const m=e.computedOf(c,p)((h,d)=>h===d.index);return e.html.div(e.attr.class(e.Value.map(m,h=>`bc-block-command-palette__item${h?" bc-block-command-palette__item--selected":""}`)),e.on.click(()=>{e.Value.get(p).item.onSelect(),n()}),e.on.mouseenter(()=>{c.set(e.Value.get(p).index)}),e.html.span(e.attr.class("bc-block-command-palette__item-icon"),_.Icon({icon:p.map(h=>h.item.icon),size:"sm",accessibility:"decorative"})),e.html.div(e.attr.class("bc-block-command-palette__item-content"),e.html.span(e.attr.class("bc-block-command-palette__item-label"),p.map(h=>h.item.label)),e.When(p.map(h=>h.item.description!=null),()=>e.html.span(e.attr.class("bc-block-command-palette__item-desc"),p.map(h=>h.item.description??"")))),e.When(p.map(h=>h.item.shortcut!=null),()=>e.html.span(e.attr.class("bc-block-command-palette__item-shortcut"),p.map(h=>h.item.shortcut??""))))})),e.When(e.computedOf(l)(p=>p.length===0),()=>e.html.div(e.attr.class("bc-block-command-palette__empty"),s.$.noMatchingCommands))))}function Xl(t,a){const{title:n,body:r,icon:o="lucide:alert-triangle",color:c="danger",consequences:l,confirmText:i,cancelText:u,onConfirm:s,onCancel:p,dismissable:m=!0}=t,h={size:"sm",showCloseButton:!1,dismissable:m,onClose:p};return e.Use(_.BeatUII18n,d=>$e.Modal(h,(b,f)=>{const g=()=>{s?.(),f()},y=()=>{p?.(),f()};return a(()=>{b({header:e.html.div(e.attr.class("bc-dialog__header-row"),e.html.div(e.attr.class("bc-dialog__icon"),e.style.backgroundColor(e.Value.map(c,k=>he.getColorVar(k,100))),e.style.color(e.Value.map(c,k=>he.getColorVar(k,600))),_.Icon({icon:o,size:"sm"})),e.html.span(e.attr.class("bc-dialog__title"),n)),body:e.html.div(e.attr.class("bc-dialog__body"),e.html.p(e.attr.class("bc-dialog__description"),r),e.NotEmpty(l??[],k=>e.html.ul(e.attr.class("bc-dialog__consequences"),e.ForEach(k,v=>e.html.li(v))))),footer:e.Fragment(e.attr.class("bc-dialog__actions"),se.Button({variant:"light",size:"sm",onClick:y},e.coalesce(u,d.$.cancel)),se.Button({color:c,variant:"filled",size:"sm",onClick:g},e.coalesce(i,d.$.confirm)))})},f)}))}const Zl={info:{icon:"lucide:info",color:"info"},success:{icon:"lucide:check-circle",color:"success"},warning:{icon:"lucide:alert-triangle",color:"warning"},danger:{icon:"lucide:alert-circle",color:"danger"}};function Jl(t,a){const{title:n,body:r,variant:o="info",icon:c,okText:l,onOk:i,dismissable:u=!0}=t,s=Zl[o],p=c??s.icon,m=s.color,h={size:"sm",showCloseButton:!1,dismissable:u,onClose:i};return e.Use(_.BeatUII18n,d=>$e.Modal(h,(b,f)=>{const g=()=>{i?.(),f()};return a(()=>{b({header:e.html.div(e.attr.class("bc-dialog__header-row"),e.html.div(e.attr.class("bc-dialog__icon"),e.style.backgroundColor(he.getColorVar(m,100)),e.style.color(he.getColorVar(m,600)),_.Icon({icon:p,size:"sm"})),e.html.span(e.attr.class("bc-dialog__title"),n)),body:e.html.div(e.attr.class("bc-dialog__body"),r),footer:e.Fragment(e.attr.class("bc-dialog__actions"),se.Button({color:m,variant:"filled",size:"sm",onClick:g},e.coalesce(l,d.$.ok)))})},f)}))}function Ql(t,a){const{title:n,body:r,placeholder:o,defaultValue:c="",confirmText:l,cancelText:i,onConfirm:u,onCancel:s,dismissable:p=!0}=t,m={size:"sm",showCloseButton:!1,dismissable:p,onClose:s};return e.Use(_.BeatUII18n,h=>$e.Modal(m,(d,b)=>{const f=e.prop(""),g=()=>{u?.(f.value),b()},y=()=>{s?.(),b()};return a(()=>{f.set(e.Value.get(c)),d({header:e.html.span(e.attr.class("bc-dialog__title"),n),body:e.html.div(e.attr.class("bc-dialog__body"),r??e.Empty,e.html.input(e.attr.class("bc-dialog__input"),e.attr.type("text"),e.attr.value(c),e.attr.placeholder(o??""),e.on.input(e.emitValue(k=>f.set(k))),e.on.keydown(k=>{k.key==="Enter"&&(k.preventDefault(),g())}))),footer:e.Fragment(e.attr.class("bc-dialog__actions"),se.Button({variant:"light",size:"sm",onClick:y},e.coalesce(i,h.$.cancel)),se.Button({color:"primary",variant:"filled",size:"sm",onClick:g},e.coalesce(l,h.$.confirm)))})},b)}))}function ua(t){return typeof t=="string"?document.querySelector(t):t}function es(t,a){const n=t.getBoundingClientRect();return{top:n.top-a,left:n.left-a,width:n.width+a*2,height:n.height+a*2}}function ts(t,a,n,r){const c=window.innerWidth,l=window.innerHeight;let i=a;if(i==="auto"){const p=t.top,m=l-(t.top+t.height),h=t.left,d=c-(t.left+t.width),b=Math.max(p,m,h,d);b===m?i="bottom":b===p?i="top":b===d?i="right":i="left"}let u,s;switch(i){case"bottom":u=t.top+t.height+12,s=t.left+t.width/2-n/2;break;case"top":u=t.top-r-12,s=t.left+t.width/2-n/2;break;case"right":u=t.top+t.height/2-r/2,s=t.left+t.width+12;break;case"left":u=t.top+t.height/2-r/2,s=t.left-n-12;break}return s=Math.max(8,Math.min(s,c-n-8)),u=Math.max(8,Math.min(u,l-r-8)),{top:`${u}px`,left:`${s}px`,actualPlacement:i}}function as(t){const{steps:a,backdropAction:n="ignore",spotlightPadding:r=8,spotlightRadius:o=8,showStepIndicator:c=!0,showSkipButton:l=!0,onStart:i,onStepChange:u,onComplete:s,onSkip:p,container:m="body"}=t,h=e.prop(!1),d=e.prop(!1),b=e.prop(0),f=e.prop(0),g=e.prop("0px"),y=e.prop("0px"),w=e.prop("0px"),k=e.prop("0px"),v=e.prop("0px"),V=e.prop("0px"),C=e.prop("bottom"),S=Pe.sessionId("onboarding-tour");let D=null;function B(){const H=f.value;if(H<0||H>=a.length)return;const ie=a[H],de=ua(ie.target);if(!de)return;const xe=es(de,r);g.set(`${xe.top}px`),y.set(`${xe.left}px`),w.set(`${xe.width}px`),k.set(`${xe.height}px`);const Y=ts(xe,ie.placement??"auto",320,200);v.set(Y.top),V.set(Y.left),C.set(Y.actualPlacement)}function $(){const H=f.value;if(H<0||H>=a.length)return;const ie=a[H],de=ua(ie.target);de&&(de.scrollIntoView({behavior:"smooth",block:"nearest"}),requestAnimationFrame(B))}function R(){a.length!==0&&(f.set(0),B(),h.set(!0),d.set(!0),i?.(),u?.(0),requestAnimationFrame(()=>b.set(1)))}async function G(){const H=f.value,ie=a[H];if(!(ie.beforeNext&&!await ie.beforeNext()))if(H>=a.length-1)q(),s?.();else{const de=H+1;f.set(de),u?.(de),$()}}function A(){const H=f.value;if(H>0){const ie=H-1;f.set(ie),u?.(ie),$()}}function j(){q(),p?.()}const E=200;function q(){h.set(!1),b.set(0),setTimeout(()=>{d.set(!1),f.set(0)},E)}function J(H){H<0||H>=a.length||(f.set(H),u?.(H),h.value&&$())}const ae={startTour:R,goToStep:J,endTour:q,isActive:h,currentStep:f},M=e.Value.map(f,H=>H<a.length?a[H].title??"":""),K=e.Value.map(f,H=>H<a.length?a[H].description??"":""),te=f.map(H=>H<a.length?a[H].content!=null:!1),N=e.Value.map(f,H=>`Step ${H+1} of ${a.length}`),I=e.Value.map(f,H=>H===0),L=e.Value.map(f,H=>H>=a.length-1),Z=e.Value.map(f,H=>H<a.length?a[H].allowInteraction??!1:!1),pe=e.computedOf(g,y,w,k)((H,ie,de,xe)=>{const ke=parseFloat(H),F=parseFloat(ie),Y=parseFloat(de),ne=parseFloat(xe),x=o;return`M0,0 H${window.innerWidth} V${window.innerHeight} H0 Z M${F+x},${ke} H${F+Y-x} Q${F+Y},${ke} ${F+Y},${ke+x} V${ke+ne-x} Q${F+Y},${ke+ne} ${F+Y-x},${ke+ne} H${F+x} Q${F},${ke+ne} ${F},${ke+ne-x} V${ke+x} Q${F},${ke} ${F+x},${ke} Z`}),be=()=>e.html.div(e.attr.class("bc-onboarding-tour"),e.attr.id(S),e.attr.role("dialog"),e.aria.modal(!0),e.aria.label("Guided tour"),e.style.opacity(b.map(String)),e.svg.svg(e.attr.class(e.computedOf(Z)(H=>`bc-onboarding-tour__backdrop${H?" bc-onboarding-tour__backdrop--interactive":""}`)),e.svgAttr.width("100%"),e.svgAttr.height("100%"),e.on.click(()=>{n==="close"?j():n==="advance"&&G()}),e.svg.path(e.svgAttr.d(pe),e.svgAttr["fill-rule"]("evenodd"),e.attr.class("bc-onboarding-tour__mask"))),e.html.div(e.attr.class(e.Value.map(C,H=>`bc-onboarding-tour__tooltip bc-onboarding-tour__tooltip--${H}`)),e.style.top(v),e.style.left(V),e.html.div(e.attr.class("bc-onboarding-tour__arrow")),e.html.div(e.attr.class("bc-onboarding-tour__content"),c?e.html.div(e.attr.class("bc-onboarding-tour__step-indicator"),N):e.Empty,e.When(e.Value.map(M,H=>H.length>0),()=>e.html.h3(e.attr.class("bc-onboarding-tour__title"),e.attr.id(`${S}-title`),M),()=>{}),e.When(te,()=>{const H=f.value;return e.html.div(e.attr.class("bc-onboarding-tour__body"),H<a.length?a[H].content:void 0)},()=>e.When(e.Value.map(K,H=>H.length>0),()=>e.html.p(e.attr.class("bc-onboarding-tour__description"),K),()=>{})),e.html.div(e.attr.class("bc-onboarding-tour__nav"),e.html.div(e.attr.class("bc-onboarding-tour__nav-left"),l?se.Button({variant:"default",size:"sm",onClick:j},"Skip"):e.Empty),e.html.div(e.attr.class("bc-onboarding-tour__nav-right"),e.When(I,()=>e.Empty,()=>se.Button({variant:"outline",size:"sm",onClick:A},"Previous")),e.When(L,()=>se.Button({variant:"filled",color:"primary",size:"sm",onClick:()=>G()},"Finish"),()=>se.Button({variant:"filled",color:"primary",size:"sm",onClick:()=>G()},"Next"))))),$e.FocusTrap({escapeDeactivates:!0,onEscape:j})),e.WithElement(()=>{const H=ie=>{ie.key==="ArrowRight"?(ie.preventDefault(),G()):ie.key==="ArrowLeft"&&(ie.preventDefault(),A())};return D=()=>$(),document.addEventListener("keydown",H),window.addEventListener("resize",D),e.OnDispose(()=>{document.removeEventListener("keydown",H),D&&(window.removeEventListener("resize",D),D=null)})}));return[e.When(d,()=>m==="body"?e.Portal("body",be()):be()),ae]}function ns(t){return`bc-kbd bc-kbd--size-${t}`}function rs({size:t="sm"}={},...a){return e.html.kbd(e.attr.class(e.Value.map(t,n=>ns(n??"sm"))),...a)}function os(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\//i.test(t)}let pt=null;function ls(){return typeof window<"u"&&window.YT?.Player?Promise.resolve(window.YT):pt||(pt=new Promise(t=>{const a=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{a?.(),t(window.YT)};const n=document.createElement("script");n.src="https://www.youtube.com/iframe_api",n.async=!0,document.head.appendChild(n)}),pt)}function ss(t){const{url:a,playing:n=!1,loop:r=!1,controls:o=!1,volume:c=1,muted:l=!1,playbackRate:i=1,pip:u=!1,playsinline:s=!0,width:p,height:m,progressInterval:h=1e3,seekTo:d,config:b,onReady:f,onStart:g,onPlay:y,onPause:w,onBuffer:k,onBufferEnd:v,onEnded:V,onError:C,onDuration:S,onSeek:D,onProgress:B,onPlaybackRateChange:$,onPlaybackQualityChange:R}=t;function G(F){return/\.m3u8(\?|$)/i.test(F)}function A(F){try{const Y=F.canPlayType("application/vnd.apple.mpegurl");return Y==="probably"||Y==="maybe"}catch{return!1}}const j=e.prop("file");let E=null,q=null,J=null;function ae(){try{J?.destroy()}catch{}J=null}const M=[];async function K(){const F=E;if(!F)return;const Y=e.Value.get(a);if(typeof Y!="string"||Y.length===0)return;ae();const ne=b?.file?.forceHLS??!1;if(G(Y)||ne){if(A(F)){F.setAttribute("src",Y);try{F.load()}catch{}return}if(typeof window>"u")return;try{const x=await import("hls.js/dist/hls.light.min.js"),le=x;let ye=le.default??le.Hls??x;for(let Ce=0;Ce<3&&(typeof ye=="object"&&ye!=null&&"default"in ye);Ce++)ye=ye.default;if(typeof ye=="function"){const Ce=ye;if(typeof Ce.isSupported=="function"&&Ce.isSupported()){F.removeAttribute("src");try{F.load()}catch{}const O=new Ce(b?.hls);J=O,O.attachMedia(F),O.loadSource(Y)}else{F.setAttribute("src",Y);try{F.load()}catch{}}}else{F.setAttribute("src",Y);try{F.load()}catch{}}}catch(x){C?.(x),F.setAttribute("src",Y);try{F.load()}catch{}}return}F.setAttribute("src",Y);try{F.load()}catch{}}function te(){q?.();const F=e.Value.get(h)??1e3;q=Me.interval(()=>{const Y=E;if(!Y)return;const ne=Y.duration||0,x=Y.currentTime||0,le=Y.buffered?.length?Y.buffered.end(Y.buffered.length-1):0;B?.({played:ne>0?x/ne:0,playedSeconds:x,loaded:ne>0?Math.min(le,ne)/ne:0,loadedSeconds:Math.min(le,ne)})},F)}function N(F){if(F!=null)return typeof F=="number"?`${F}px`:F}const I=e.html.video(e.WithElement(F=>{E=F,f?.();try{E.playbackRate=e.Value.get(i)??1}catch{}E.muted=!!(e.Value.get(l)??!1),E.loop=!!(e.Value.get(r)??!1),E.controls=!!(e.Value.get(o)??!1),E.playsInline!=null&&(!!(e.Value.get(s)??!0)?E.setAttribute("playsinline",""):E.removeAttribute("playsinline"));try{const Y=!!(e.Value.get(u)??!1),ne=document,x=E;Y?typeof x.requestPictureInPicture=="function"&&ne.pictureInPictureElement!==E&&x.requestPictureInPicture().catch(()=>{}):ne.pictureInPictureElement===E&&typeof ne.exitPictureInPicture=="function"&&ne.exitPictureInPicture().catch(()=>{})}catch{}te(),K()}),e.style.width(e.Value.map(p,N)),e.style.height(e.Value.map(m,N)),e.on.play(()=>y?.()),e.on.playing(()=>{g?.(),v?.()}),e.on.pause(()=>w?.()),e.on.waiting(()=>k?.()),e.on.canplay(()=>{const F=E?.duration;F!=null&&Number.isFinite(F)&&S?.(F),e.Value.get(n)&&E&&E.paused&&E.play?.().catch(()=>{})}),e.on.ended(()=>V?.()),e.on.error(F=>{J||C?.(F)}));let L=null,Z=null,pe=null;function be(){const F=e.Value.get(a);!L||typeof F!="string"||ls().then(Y=>{const ne=dn(F);if(ne){if(Z){Z.loadVideoById({videoId:ne});return}Z=new Y.Player(L,{videoId:ne,playerVars:is(t),events:{onReady:()=>{f?.(),H(),e.Value.get(n)&&g?.(),ve()},onStateChange:x=>{switch(x.data){case Y.PlayerState.PLAYING:y?.(),v?.();break;case Y.PlayerState.PAUSED:w?.();break;case Y.PlayerState.BUFFERING:k?.();break;case Y.PlayerState.ENDED:V?.();break}},onError:x=>C?.(x),onPlaybackRateChange:x=>$?.(x.data),onPlaybackQualityChange:x=>R?.(x.data)}})}})}function ve(){pe?.();const F=e.Value.get(h)??1e3;pe=Me.interval(()=>{if(!Z)return;const Y=Z.getDuration?.()??0,ne=Z.getCurrentTime?.()??0,x=Z.getVideoLoadedFraction?.()??0;B?.({played:Y>0?ne/Y:0,playedSeconds:ne,loaded:x,loadedSeconds:x*Y})},F)}function H(){if(!Z)return;try{const ne=e.Value.get(i)??1;Z.setPlaybackRate?.(ne)}catch{}try{const ne=Math.round(Math.min(Math.max(e.Value.get(c)??1,0),1)*100);Z.setVolume?.(ne)}catch{}try{e.Value.get(l)??!1?Z.mute?.():Z.unMute?.()}catch{}e.Value.get(n)??!1?Z.playVideo?.():Z.pauseVideo?.();const Y=e.Value.get(d);typeof Y=="number"&&Number.isFinite(Y)&&(Z.seekTo?.(Y,!0),D?.(Y))}const ie=e.html.div(e.WithElement(F=>{L=F,j.value==="youtube"&&be()}));M.push(e.Value.on(a,F=>{const Y=typeof F=="string"&&F.length>0&&os(F),ne=Y?"youtube":"file";j.set(ne),Y?be():E&&K()})),M.push(e.Value.on(n,()=>{j.value==="file"&&E?e.Value.get(n)?E.play?.().catch(()=>{}):E.pause?.():j.value==="youtube"&&Z&&(e.Value.get(n)?Z.playVideo?.():Z.pauseVideo?.())})),M.push(e.Value.on(c,()=>{if(j.value==="file"&&E)E.volume=Math.min(Math.max(e.Value.get(c)??1,0),1);else if(j.value==="youtube"&&Z){const F=Math.round(Math.min(Math.max(e.Value.get(c)??1,0),1)*100);Z.setVolume?.(F)}})),M.push(e.Value.on(l,()=>{j.value==="file"&&E?E.muted=!!e.Value.get(l):j.value==="youtube"&&Z&&(e.Value.get(l)?Z.mute?.():Z.unMute?.())})),M.push(e.Value.on(i,()=>{if(j.value==="file"&&E)try{E.playbackRate=e.Value.get(i)??1}catch{}else j.value==="youtube"&&Z&&Z.setPlaybackRate?.(e.Value.get(i)??1)})),M.push(e.Value.on(u,async()=>{if(!(j.value!=="file"||!E))try{const F=!!(e.Value.get(u)??!1),Y=document,ne=E;F?typeof ne.requestPictureInPicture=="function"&&Y.pictureInPictureElement!==E&&await ne.requestPictureInPicture()?.catch(()=>{}):Y.pictureInPictureElement===E&&typeof Y.exitPictureInPicture=="function"&&await Y.exitPictureInPicture()?.catch(()=>{})}catch{}})),M.push(e.Value.on(o,()=>{j.value==="file"&&E&&(E.controls=!!e.Value.get(o))})),M.push(e.Value.on(r,()=>{j.value==="file"&&E&&(E.loop=!!e.Value.get(r))})),M.push(e.Value.on(s,()=>{j.value==="file"&&E&&(!!e.Value.get(s)?E.setAttribute("playsinline",""):E.removeAttribute("playsinline"))})),M.push(e.Value.on(d??null,()=>{const F=e.Value.get(d);if(F!=null)if(j.value==="file"&&E)try{E.currentTime=F,D?.(F)}catch{}else j.value==="youtube"&&Z&&(Z.seekTo?.(F,!0),D?.(F))})),M.push(()=>{q?.(),pe?.(),ae();try{Z?.destroy()}catch{}});const de=e.Value.map(j,F=>F==="file"),xe=e.Value.map(j,F=>F==="youtube"),ke=e.html.div(e.attr.class("bc-base-video"),e.style.width(e.Value.map(p,N)),e.style.height(e.Value.map(m,N)),e.html.div(e.style.display(e.Value.map(de,F=>F?"block":"none")),I),e.html.div(e.style.display(e.Value.map(xe,F=>F?"block":"none")),ie));return e.Fragment(e.OnDispose(...M),ke)}function dn(t){const a=/[?&]v=([^&#]+)/.exec(t);if(a)return a[1];const n=/youtu\.be\/([^?&#]+)/.exec(t);if(n)return n[1];const r=/youtube\.com\/embed\/([^?&#]+)/.exec(t);return r?r[1]:null}function is(t){const a={autoplay:e.Value.get(t.playing)??!1?1:0,controls:e.Value.get(t.controls)??!1?1:0,rel:0,playsinline:e.Value.get(t.playsinline)??!0?1:0,modestbranding:1},n=e.Value.get(t.loop)??!1,r=e.Value.get(t.url),o=typeof r=="string"?dn(r):null;return n&&o&&(a.loop=1,a.playlist=o),a}function pn(t,...a){const n=a.length;if(n===0){const x={goTo:()=>{},next:()=>{},prev:()=>{},play:()=>{},pause:()=>{},isPlaying:e.prop(!1),currentIndex:e.prop(0),totalSlides:0};return[e.Empty,x]}const r=e.prop(e.Value.get(t.currentIndex??0)),o=e.Value.toSignal(t.autoPlay??!1),c=e.Value.toSignal(t.interval??3e3),l=e.Value.toSignal(t.loop??!1),i=e.Value.toSignal(t.slidesPerView??1),u=e.Value.toSignal(t.transition??"slide"),s=e.Value.toSignal(t.transitionDuration??300),p=e.Value.toSignal(t.showArrows??!0),m=e.Value.toSignal(t.pauseOnHover??!0),h=e.Value.toSignal(t.keyboard??!0),d=e.Value.toSignal(t.gap??"0px"),b=e.Value.toSignal(t.peekAmount??"0px"),f=e.Value.toSignal(t.align??"start"),g=e.Value.toSignal(t.easing??"cubic-bezier(0.2, 0, 0, 1)"),y=e.Value.toSignal(t.dragThreshold??50),w=e.Value.toSignal(t.indicator??"dots"),k=e.prop(!1),v=e.prop(e.Value.get(o));o.on(x=>v.set(x));const V=e.prop(Math.max(0,n-e.Value.get(i)));i.on(x=>{V.set(Math.max(0,n-x))});const C=e.computedOf(r,l)((x,le)=>!le&&x===0),S=e.computedOf(r,l,V)((x,le,ye)=>!le&&x>=ye);function D(x){const le=V.value;return le===0?0:e.Value.get(l)?(x%n+n)%n:Math.max(0,Math.min(x,le))}function B(x){const le=D(x);le!==r.value&&(r.set(le),t.onSlideChange?.(le))}function $(){const x=r.value+1;(e.Value.get(l)||x<=V.value)&&B(x)}function R(){const x=r.value-1;(e.Value.get(l)||x>=0)&&B(x)}function G(){v.set(!0),t.onAutoPlayToggle?.(!0)}function A(){v.set(!1),t.onAutoPlayToggle?.(!1)}let j=null;function E(){q(),j=setInterval(()=>{k.value&&e.Value.get(m)||$()},e.Value.get(c))}function q(){j!=null&&(clearInterval(j),j=null)}v.on(x=>{x?E():q()}),c.on(()=>{v.value&&E()});let J=0,ae=0,M=0;const K=50;let te=!1,N=0,I=0,L=!1;const Z=e.prop("0%");function pe(x){if(e.Value.get(u)==="fade")return"0%";const le=e.Value.get(i),ye=e.Value.get(d),Ce=-(x*(100/le));return ye==="0px"||ye==="0"?`${Ce}%`:`calc(${Ce}% - ${x} * ${ye})`}r.on(x=>{Z.set(pe(x))}),u.on(()=>{Z.set(pe(r.value))}),Z.set(pe(e.Value.get(r)));const be=t.prevIcon??"lucide:chevron-left",ve=t.nextIcon??"lucide:chevron-right",H=t.arrowIconSize??"md",ie=e.computedOf(i,d)((x,le)=>le==="0px"||le==="0"?`${100/x}%`:`calc((100% - ${x-1} * ${le}) / ${x})`),de=u.map(x=>x==="fade"),xe=a.map((x,le)=>{const ye=e.computedOf(de,r)((W,ce)=>W?ce===le?"1":"0":""),Ce=de.map(W=>W?le===0?"relative":"absolute":""),O=de.map(W=>W&&le!==0?"0":"");return e.html.div(e.attr.class("bc-carousel__slide"),e.attr.class(r.map(W=>W===le?"bc-carousel__slide--active":"")),e.attr.role("tabpanel"),e.aria.roledescription("slide"),e.aria.label(`Slide ${le+1} of ${n}`),e.style.minWidth(ie),e.style.flexShrink("0"),e.style.opacity(ye),e.style.position(Ce),e.style.inset(O),x)}),ke=Array.from({length:n},(x,le)=>e.html.button(e.attr.class(r.map(ye=>`bc-carousel__dot${ye===le?" bc-carousel__dot--active":""}`)),e.attr.type("button"),e.aria.label(`Go to slide ${le+1}`),e.on.click(()=>B(le)))),F=f.map(x=>{switch(x){case"center":return"center";case"end":return"flex-end";default:return"flex-start"}}),Y={goTo:B,next:$,prev:R,play:G,pause:A,isPlaying:v,currentIndex:r,totalSlides:n};return[e.html.div(e.attr.class(u.map(x=>`bc-carousel bc-carousel--${x}`)),e.attr.role("region"),e.aria.roledescription("carousel"),e.aria.label(t.ariaLabel??"Carousel"),e.attr.tabindex(0),e.WithElement(x=>{const le=O=>{e.Value.get(h)&&(O.key==="ArrowLeft"?(O.preventDefault(),R()):O.key==="ArrowRight"&&(O.preventDefault(),$()))};x.addEventListener("keydown",le);const ye=O=>{te&&(I=O.clientX-N)},Ce=()=>{te&&(te=!1,x.classList.remove("bc-carousel--dragging"),Math.abs(I)>=e.Value.get(y)?(L=!0,I>0?R():$()):Math.abs(I)>5&&(L=!0),L&&requestAnimationFrame(()=>{L=!1}))};return window.addEventListener("mousemove",ye),window.addEventListener("mouseup",Ce),e.OnDispose(()=>{x.removeEventListener("keydown",le),window.removeEventListener("mousemove",ye),window.removeEventListener("mouseup",Ce),q()})}),e.on.mouseenter(()=>k.set(!0)),e.on.mouseleave(()=>k.set(!1)),e.on.touchstart(x=>{J=x.touches[0].clientX,ae=x.touches[0].clientY,M=0}),e.on.touchmove(x=>{M=x.touches[0].clientX-J;const le=Math.abs(x.touches[0].clientY-ae);Math.abs(M)>le&&x.preventDefault()}),e.on.touchend(()=>{Math.abs(M)>=K&&(M>0?R():$())}),e.html.div(e.attr.class("bc-carousel__viewport"),e.style.paddingLeft(b),e.style.paddingRight(b),e.WithElement(x=>(u.on(le=>{le==="fade"?x.style.minWidth=`${x.offsetWidth}px`:x.style.minWidth=""}),e.OnDispose(()=>{}))),e.on.mousedown(x=>{te=!0,N=x.clientX,I=0,L=!1,x.preventDefault()}),e.on.click(x=>{L&&(x.preventDefault(),x.stopPropagation())}),e.html.div(e.attr.class("bc-carousel__track"),e.style.position(de.map(x=>x?"relative":"")),e.style.transform(Z.map(x=>`translateX(${x})`)),e.style.transitionDuration(s.map(x=>`${x}ms`)),e.style.transitionTimingFunction(g),e.style.gap(d),e.style.justifyContent(F),...xe)),e.When(p,()=>e.html.button(e.attr.class("bc-carousel__arrow bc-carousel__arrow--prev"),e.attr.class(C.map(x=>x?"bc-carousel__arrow--disabled":"")),e.attr.type("button"),e.attr.disabled(C),e.aria.label("Previous slide"),e.on.click(()=>R()),_.Icon({icon:be,size:H,accessibility:"decorative"}))),e.When(p,()=>e.html.button(e.attr.class("bc-carousel__arrow bc-carousel__arrow--next"),e.attr.class(S.map(x=>x?"bc-carousel__arrow--disabled":"")),e.attr.type("button"),e.attr.disabled(S),e.aria.label("Next slide"),e.on.click(()=>$()),_.Icon({icon:ve,size:H,accessibility:"decorative"}))),e.When(w.map(x=>x==="dots"),()=>e.html.div(e.attr.class("bc-carousel__dots"),e.attr.role("tablist"),e.aria.label("Slide navigation"),...ke)),e.When(w.map(x=>x==="progress"),()=>e.html.div(e.attr.class("bc-carousel__progress"),e.attr.role("progressbar"),e.aria.valuemin(0),e.aria.valuemax(100),e.aria.valuenow(r.map(x=>Math.round((x+1)/n*100))),e.html.div(e.attr.class("bc-carousel__progress-fill"),e.style.width(r.map(x=>`${(x+1)/n*100}%`))))),e.When(w.map(x=>x==="fraction"),()=>e.html.div(e.attr.class("bc-carousel__fraction"),e.aria.live("polite"),r.map(x=>`${x+1} / ${n}`)))),Y]}function cs(t,...a){return pn(t,...a)[0]}const Qt="https://cdn.jsdelivr.net/npm/pdfjs-dist@5.4.394/",us=t=>{if(!t||typeof t!="object")return!1;const a=t;return!!(a.getDocument&&typeof a.getDocument=="function")};function ds(){if(typeof window>"u")return;const a=window.pdfjsLib;a?.GlobalWorkerOptions?.workerSrc||a?.GlobalWorkerOptions&&(a.GlobalWorkerOptions.workerSrc=`${Qt}build/pdf.worker.min.mjs`)}const ps=t=>new Promise((a,n)=>{const r=document.createElement("script");r.type="module",r.src=t,r.onload=()=>a(),r.onerror=()=>n(new Error(`Failed to load script: ${t}`)),document.head.appendChild(r)}),ms=async()=>{const t=window;if(t.pdfjsLib&&us(t.pdfjsLib))return t.pdfjsLib;if(await ps(`${Qt}build/pdf.min.mjs`),await new Promise(a=>setTimeout(a,100)),!t.pdfjsLib)throw new Error("PDF.js failed to initialize after loading");return t.pdfjsLib};let xt=null,da=!1;async function hs(){if(xt)return xt;!da&&typeof window<"u"&&(ds(),da=!0);const t=await ms();return xt=t,t.GlobalWorkerOptions&&(t.GlobalWorkerOptions.workerSrc=`${Qt}build/pdf.worker.min.mjs`),t}function bs(t,a){if(t.byteLength!==a.byteLength)return!1;const n=t.byteLength,r=new DataView(t.buffer,t.byteOffset,n),o=new DataView(a.buffer,a.byteOffset,n),c=n>>>2,l=n&3;for(let i=0;i<c;i++)if(r.getUint32(i*4)!==o.getUint32(i*4))return!1;for(let i=n-l;i<n;i++)if(t[i]!==a[i])return!1;return!0}function gs(t,a){if(t.byteLength!==a.byteLength)return!1;const n=t.byteLength,r=n>>>2,o=new Uint32Array(t,0,r),c=new Uint32Array(a,0,r);for(let s=0;s<r;s++)if(o[s]!==c[s])return!1;const l=n&3,i=new Uint8Array(t,r*4,l),u=new Uint8Array(a,r*4,l);for(let s=0;s<l;s++)if(i[s]!==u[s])return!1;return!0}function fs(t,a){try{return typeof t=="string"&&typeof a=="string"?t===a:t instanceof Uint8Array&&a instanceof Uint8Array?bs(t,a):t instanceof ArrayBuffer&&a instanceof ArrayBuffer?gs(t,a):!1}catch{return!1}}function It(t){return typeof t=="string"?t:t instanceof Uint8Array?t.slice():t instanceof ArrayBuffer?t.slice(0):t}function vs({source:t,page:a=1,fit:n="width",scale:r=1,rotation:o=0,quality:c=2,renderTextLayer:l=!0,renderAnnotationLayer:i=!1,onPageChange:u,onLoadComplete:s},...p){const m=hs();let h=It(e.Value.get(t)),d=null,b=e.Value.get(a),f=null;return e.Use(_.BeatUII18n,g=>e.Fragment(e.OnDispose(()=>{if(f){try{f.cancel()}catch{}f=null}d!=null&&(d.destroy(),d=null)}),Te.ElementRect(y=>{const w=e.delaySignal(y.map(k=>k==null?null:{width:k.width,height:k.height},(k,v)=>k!=null&&v!=null&&k.width===v.width&&k.height===v.height),100);return e.Ensure(w,k=>Te.Query({request:e.computedOf(t,a,n,r,o,c,l,i,k)((v,V,C,S,D,B,$,R,G)=>({source:v,page:V??1,fit:C??"width",scale:Math.max(.1,S??1),rotation:D??0,quality:Math.max(1,B??2),renderTextLayer:$??!0,renderAnnotationLayer:R??!1,containerWidth:G.width,containerHeight:G.height})),load:async({request:v})=>{const V=await m,C=v.source,S=It(C),D=It(C);(d==null||!fs(h,S))&&(d!=null&&(d.destroy(),d=null),h=S,d=await V.getDocument(D).promise,s?.({pdfDoc:d}));const B=v.page<1||v.page>d.numPages?1:v.page;u!=null&&B!==b&&(b=B,u(B));const $=await d.getPage(B);let R;if(v.fit==="none")R=v.scale;else{const j=$.getViewport({scale:1,rotation:v.rotation}),E=j.width/j.height,q=v.containerWidth/v.containerHeight;switch(v.fit){case"width":R=v.containerWidth/j.width;break;case"height":R=v.containerHeight/j.height;break;case"contain":R=Math.min(v.containerWidth/j.width,v.containerHeight/j.height);break;case"cover":E>q?R=v.containerHeight/j.height:R=v.containerWidth/j.width;break}}const G=$.getViewport({scale:R,rotation:v.rotation}),A=$.getViewport({scale:R*v.quality,rotation:v.rotation});return{pdfWidth:G.width,pdfHeight:G.height,canvasWidth:Math.floor(G.width),canvasHeight:Math.floor(G.height),highResWidth:Math.floor(A.width),highResHeight:Math.floor(A.height),render:async(j,E,q)=>{if(f)try{f.cancel(),await f.promise.catch(()=>{})}catch{}j.width=A.width,j.height=A.height,j.style.width=`${G.width}px`,j.style.height=`${G.height}px`;const J=j.getContext("2d");if(!J)throw new Error("Failed to get canvas context");const ae=$.render({canvasContext:J,canvas:j,viewport:A});f=ae;try{await ae.promise}catch(M){if((M instanceof Error?M.name:M?.name)!=="RenderingCancelledException")throw M;return}finally{f===ae&&(f=null)}if(v.renderTextLayer&&E!=null){E.innerHTML="";try{const M=await $.getTextContent(),K=V.TextLayer;K!=null&&await new K({textContentSource:M,container:E,viewport:G}).render()}catch(M){console.warn("Failed to render text layer:",M)}}if(v.renderAnnotationLayer&&q!=null){q.innerHTML="",q.style.width=`${G.width}px`,q.style.height=`${G.height}px`;try{const M=await $.getAnnotations(),K=V.AnnotationLayer;if(K!=null&&M.length>0){const te={getDestinationHash:()=>"",getAnchorUrl:I=>I,executeNamedAction:()=>{},executeSetOCGState:()=>{},cachePageRef:()=>{}};await new K({div:q,page:$,viewport:G,linkService:te,annotationStorage:null}).render({viewport:G,div:q,annotations:M,page:$,linkService:te,renderForms:!0})}}catch(M){console.warn("Failed to render annotation layer:",M)}}}}},convertError:v=>v instanceof Error?v.message:JSON.stringify(v),pending:()=>e.html.div(e.attr.class("bc-pdf-page-viewer__loading"),_.Icon({icon:"line-md:loading-twotone-loop",size:"lg"}),e.html.span(e.attr.class("bc-pdf-page-viewer__loading-text"),g.map(v=>v.pdfPageViewer.loading))),failure:({error:v})=>e.html.div(e.attr.class("bc-pdf-page-viewer__error"),_.Icon({icon:"line-md:alert-circle",size:"lg",color:"danger"}),e.html.span(e.attr.class("bc-pdf-page-viewer__error-text"),v)),success:({value:v})=>e.html.div(e.attr.class(e.Value.map(n,V=>{const C=V??"width";return C==="none"?"bc-pdf-page-viewer":`bc-pdf-page-viewer bc-pdf-page-viewer--fit-${C}`})),e.html.div(e.attr.class("bc-pdf-page-viewer__content"),e.When(e.Value.map(n,V=>(V??"width")==="none"),()=>e.attr.style(v.$.canvasWidth.map(V=>`width: ${V}px; height: ${v.value.canvasHeight}px;`))),e.html.canvas(e.attr.class("bc-pdf-page-viewer__canvas"),e.attr.width(v.$.canvasWidth.map(String)),e.attr.height(v.$.canvasHeight.map(String)),...p),e.html.div(e.attr.class("bc-pdf-page-viewer__text-layer")),e.html.div(e.attr.class("bc-pdf-page-viewer__annotation-layer"))),e.WithElement(V=>{const C=V.querySelector(".bc-pdf-page-viewer__canvas"),S=V.querySelector(".bc-pdf-page-viewer__text-layer"),D=V.querySelector(".bc-pdf-page-viewer__annotation-layer");return e.Value.on(v,async B=>{await B.render(C,S,D)}),e.Empty}))}))})))}Object.defineProperty(exports,"Use",{enumerable:!0,get:()=>e.Use});exports.BeatUII18n=_.BeatUII18n;exports.Icon=_.Icon;exports.LOGICAL_PROPERTY_MAP=_.LOGICAL_PROPERTY_MAP;exports.Locale=_.Locale;exports.defaultLocale=_.defaultLocale;exports.defaultMessages=_.defaultMessages;exports.formatFileSize=_.formatFileSize;exports.getDirectionClassName=_.getDirectionClassName;exports.getDirectionFromLocale=_.getDirectionFromLocale;exports.getIconLocally=_.getIconLocally;exports.getOppositeDirection=_.getOppositeDirection;exports.getPhysicalProperty=_.getPhysicalProperty;exports.isIndexedDBAvailable=_.isIndexedDBAvailable;exports.isRTLLocale=_.isRTLLocale;exports.makeI18nProvider=_.makeI18nProvider;exports.makeMessages=_.makeMessages;exports.resolveDirection=_.resolveDirection;exports.storeIconLocally=_.storeIconLocally;exports.backgroundConfig=he.backgroundConfig;exports.bgColors=he.bgColors;exports.borderColors=he.borderColors;exports.colorShades=he.colorShades;exports.colors=he.colors;exports.generateColorVariables=he.generateColorVariables;exports.generateCoreColorVariables=he.generateCoreColorVariables;exports.generateSemanticColorVariables=he.generateSemanticColorVariables;exports.getColorVar=he.getColorVar;exports.getColorVarName=he.getColorVarName;exports.interactiveColors=he.interactiveColors;exports.normalizeColorName=he.normalizeColorName;exports.resolveSemanticColorMap=he.resolveSemanticColorMap;exports.semanticColorNames=he.semanticColorNames;exports.semanticColors=he.semanticColors;exports.textColors=he.textColors;exports.themeColorNames=he.themeColorNames;exports.baseFontSize=T.baseFontSize;exports.baseMotionDuration=T.baseMotionDuration;exports.baseSpacing=T.baseSpacing;exports.borderWidth=T.borderWidth;exports.breakpoints=T.breakpoints;exports.changeFontSize=T.changeFontSize;exports.controlGap=T.controlGap;exports.controlHeight=T.controlHeight;exports.controlPaddingBlock=T.controlPaddingBlock;exports.controlPaddingInline=T.controlPaddingInline;exports.fontFamily=T.fontFamily;exports.fontSize=T.fontSize;exports.fontWeight=T.fontWeight;exports.generateAllTokenVariables=T.generateAllTokenVariables;exports.generateBorderWidthVariables=T.generateBorderWidthVariables;exports.generateBreakpointVariables=T.generateBreakpointVariables;exports.generateControlGapVariables=T.generateControlGapVariables;exports.generateControlHeightVariables=T.generateControlHeightVariables;exports.generateControlPaddingVariables=T.generateControlPaddingVariables;exports.generateControlTokenVariables=T.generateControlTokenVariables;exports.generateCoreTokenVariables=T.generateCoreTokenVariables;exports.generateFontFamilyOverrideVariables=T.generateFontFamilyOverrideVariables;exports.generateMotionVariables=T.generateMotionVariables;exports.generateOutlineWidthVariables=T.generateOutlineWidthVariables;exports.generateOverlayWidthVariables=T.generateOverlayWidthVariables;exports.generateRadiusVariables=T.generateRadiusVariables;exports.generateSemanticFontVariables=T.generateSemanticFontVariables;exports.generateSemanticMotionVariables=T.generateSemanticMotionVariables;exports.generateSemanticRadiusVariables=T.generateSemanticRadiusVariables;exports.generateSemanticShadowVariables=T.generateSemanticShadowVariables;exports.generateSemanticSpacingVariables=T.generateSemanticSpacingVariables;exports.generateSemanticTextShadowVariables=T.generateSemanticTextShadowVariables;exports.generateSemanticTokenVariables=T.generateSemanticTokenVariables;exports.generateShadowVariables=T.generateShadowVariables;exports.generateSpacingVariables=T.generateSpacingVariables;exports.generateTextShadowVariables=T.generateTextShadowVariables;exports.generateTypographyVariables=T.generateTypographyVariables;exports.generateZIndexVariables=T.generateZIndexVariables;exports.getBaseFontSizeVar=T.getBaseFontSizeVar;exports.getBaseFontSizeVarName=T.getBaseFontSizeVarName;exports.getBaseMotionDurationVar=T.getBaseMotionDurationVar;exports.getBaseMotionDurationVarName=T.getBaseMotionDurationVarName;exports.getBorderWidthVar=T.getBorderWidthVar;exports.getBorderWidthVarName=T.getBorderWidthVarName;exports.getBreakpointMediaQuery=T.getBreakpointMediaQuery;exports.getBreakpointVar=T.getBreakpointVar;exports.getBreakpointVarName=T.getBreakpointVarName;exports.getControlGapVar=T.getControlGapVar;exports.getControlGapVarName=T.getControlGapVarName;exports.getControlHeightVar=T.getControlHeightVar;exports.getControlHeightVarName=T.getControlHeightVarName;exports.getControlPaddingBlockVar=T.getControlPaddingBlockVar;exports.getControlPaddingBlockVarName=T.getControlPaddingBlockVarName;exports.getControlPaddingInlineVar=T.getControlPaddingInlineVar;exports.getControlPaddingInlineVarName=T.getControlPaddingInlineVarName;exports.getFontFamilyVar=T.getFontFamilyVar;exports.getFontFamilyVarName=T.getFontFamilyVarName;exports.getFontSizeLineHeightVar=T.getFontSizeLineHeightVar;exports.getFontSizeLineHeightVarName=T.getFontSizeLineHeightVarName;exports.getFontSizeVar=T.getFontSizeVar;exports.getFontSizeVarName=T.getFontSizeVarName;exports.getFontWeightVar=T.getFontWeightVar;exports.getFontWeightVarName=T.getFontWeightVarName;exports.getLetterSpacingVar=T.getLetterSpacingVar;exports.getLetterSpacingVarName=T.getLetterSpacingVarName;exports.getLineHeightVar=T.getLineHeightVar;exports.getLineHeightVarName=T.getLineHeightVarName;exports.getMotionDurationVar=T.getMotionDurationVar;exports.getMotionDurationVarName=T.getMotionDurationVarName;exports.getMotionEasingVar=T.getMotionEasingVar;exports.getMotionEasingVarName=T.getMotionEasingVarName;exports.getOutlineWidthVar=T.getOutlineWidthVar;exports.getOutlineWidthVarName=T.getOutlineWidthVarName;exports.getOverlayWidthVar=T.getOverlayWidthVar;exports.getOverlayWidthVarName=T.getOverlayWidthVarName;exports.getRadiusMediaQuery=T.getRadiusMediaQuery;exports.getRadiusVar=T.getRadiusVar;exports.getRadiusVarName=T.getRadiusVarName;exports.getSemanticFontVar=T.getSemanticFontVar;exports.getSemanticFontVarName=T.getSemanticFontVarName;exports.getSemanticMotionVarName=T.getSemanticMotionVarName;exports.getSemanticRadiusVarName=T.getSemanticRadiusVarName;exports.getSemanticShadowVarName=T.getSemanticShadowVarName;exports.getSemanticSpacingVarName=T.getSemanticSpacingVarName;exports.getSemanticTextShadowVarName=T.getSemanticTextShadowVarName;exports.getShadowVar=T.getShadowVar;exports.getShadowVarName=T.getShadowVarName;exports.getSpacingVar=T.getSpacingVar;exports.getSpacingVarName=T.getSpacingVarName;exports.getTextShadowVar=T.getTextShadowVar;exports.getTextShadowVarName=T.getTextShadowVarName;exports.getTokenValue=T.getTokenValue;exports.getZIndexVar=T.getZIndexVar;exports.getZIndexVarName=T.getZIndexVarName;exports.letterSpacing=T.letterSpacing;exports.lineHeight=T.lineHeight;exports.motionDurations=T.motionDurations;exports.motionEasings=T.motionEasings;exports.outlineWidth=T.outlineWidth;exports.overlayWidth=T.overlayWidth;exports.radius=T.radius;exports.semanticFontNames=T.semanticFontNames;exports.semanticMotionNames=T.semanticMotionNames;exports.semanticRadiusNames=T.semanticRadiusNames;exports.semanticShadowNames=T.semanticShadowNames;exports.semanticSpacingNames=T.semanticSpacingNames;exports.semanticTextShadowNames=T.semanticTextShadowNames;exports.shadows=T.shadows;exports.spacing=T.spacing;exports.textShadows=T.textShadows;exports.zIndex=T.zIndex;exports.ArrayController=re.ArrayController;exports.BaseControl=re.BaseControl;exports.BaseMappedControl=re.BaseMappedControl;exports.CheckboxInput=re.CheckboxInput;exports.CloseButton=re.CloseButton;exports.Control=re.Control;exports.Controller=re.Controller;exports.ControllerValidation=re.ControllerValidation;exports.InputWrapper=re.InputWrapper;exports.MappedControl=re.MappedControl;exports.ObjectController=re.ObjectController;exports.RequiredSymbol=re.RequiredSymbol;exports.connectCommonAttributes=re.connectCommonAttributes;exports.connectNumberInput=re.connectNumberInput;exports.connectStringInput=re.connectStringInput;exports.convertStandardSchemaIssues=re.convertStandardSchemaIssues;exports.convertStandardSchemaPathToPath=re.convertStandardSchemaPathToPath;exports.makeMapValidation=re.makeMapValidation;exports.makeOnBlurHandler=re.makeOnBlurHandler;exports.makeOnChangeHandler=re.makeOnChangeHandler;exports.parsePath=re.parsePath;exports.pathToString=re.pathToString;exports.standardSchemaResultToValidation=re.standardSchemaResultToValidation;exports.taskToValidation=re.taskToValidation;exports.useController=re.useController;exports.useForm=re.useForm;exports.wrapSegment=re.wrapSegment;exports.AnimatedToggle=Ne.AnimatedToggle;exports.AnimatedToggleClass=Ne.AnimatedToggleClass;exports.useAnimatedElementToggle=Ne.useAnimatedElementToggle;exports.useAnimatedToggle=Ne.useAnimatedToggle;exports.useTimedToggle=Ne.useTimedToggle;exports.Theme=nt.Theme;exports.ThemeAppearance=nt.ThemeAppearance;exports.beatuiPreset=pa.beatuiPreset;exports.createBeatuiPreset=pa.createBeatuiPreset;exports.Base64Input=X.Base64Input;exports.Base64sInput=X.Base64sInput;exports.ColorSwatchInput=X.ColorSwatchInput;exports.EditableText=X.EditableText;exports.NullableDateInput=X.NullableDateInput;exports.NullableDateTimeInput=X.NullableDateTimeInput;exports.NullableEmailInput=X.NullableEmailInput;exports.NullablePasswordInput=X.NullablePasswordInput;exports.NullableRatingInput=X.NullableRatingInput;exports.NullableSliderInput=X.NullableSliderInput;exports.NullableTextArea=X.NullableTextArea;exports.NullableTextInput=X.NullableTextInput;exports.NullableUrlInput=X.NullableUrlInput;exports.NullableUuidInput=X.NullableUuidInput;exports.RatingInput=X.RatingInput;exports.SliderInput=X.SliderInput;exports.Switch=X.Switch;exports.emptyToNull=X.emptyToNull;exports.fileToBase64=X.fileToBase64;exports.forFormat=X.forFormat;exports.forTypeAndFormat=X.forTypeAndFormat;exports.forXUI=X.forXUI;exports.formatColor=X.formatColor;exports.getContrastRatio=X.getContrastRatio;exports.hexToRgb=X.hexToRgb;exports.hslToRgb=X.hslToRgb;exports.hwbToRgb=X.hwbToRgb;exports.isValidColor=X.isValidColor;exports.isValidHexColor=X.isValidHexColor;exports.isValidHslColor=X.isValidHslColor;exports.isValidRgbColor=X.isValidRgbColor;exports.isValidRgbaColor=X.isValidRgbaColor;exports.linearToSrgb=X.linearToSrgb;exports.mulberry32=X.mulberry32;exports.normalizeHexColor=X.normalizeHexColor;exports.nullToEmpty=X.nullToEmpty;exports.oklchToRgb=X.oklchToRgb;exports.parseAnyColor=X.parseAnyColor;exports.resolveEffectiveFormat=X.resolveEffectiveFormat;exports.rgbToHex=X.rgbToHex;exports.rgbToHsl=X.rgbToHsl;exports.rgbToHwb=X.rgbToHwb;exports.rgbToOklch=X.rgbToOklch;exports.srgbToLinear=X.srgbToLinear;exports.toRgbaString=X.toRgbaString;exports.sessionId=Pe.sessionId;exports.BooleanValidator=$e.BooleanValidator;exports.ConfirmModal=$e.ConfirmModal;exports.FocusTrap=$e.FocusTrap;exports.Modal=$e.Modal;exports.ObjectValidator=$e.ObjectValidator;exports.Overlay=$e.Overlay;exports.StringValidator=$e.StringValidator;exports.boolean=$e.boolean;exports.createStandardSchema=$e.createStandardSchema;exports.object=$e.object;exports.string=$e.string;exports.useFocusTrap=$e.useFocusTrap;exports.Button=se.Button;exports.InputContainer=se.InputContainer;exports.InputIcon=se.InputIcon;exports.generateButtonClasses=se.generateButtonClasses;exports.generateButtonStyles=se.generateButtonStyles;exports.generateInputContainerInputClasses=se.generateInputContainerInputClasses;exports.BaseListControl=Q.BaseListControl;exports.BaseNativeSelectControl=Q.BaseNativeSelectControl;exports.Expando=Q.Expando;exports.FilesInput=Q.FilesInput;exports.Group=Q.Group;exports.ListControl=Q.ListControl;exports.ListInput=Q.ListInput;exports.ListItemControls=Q.ListItemControls;exports.MaskInput=Q.MaskInput;exports.NativeSelect=Q.NativeSelect;exports.NativeSelectControl=Q.NativeSelectControl;exports.NullableDurationInput=Q.NullableDurationInput;exports.NullableNumberInput=Q.NullableNumberInput;exports.NumberInput=Q.NumberInput;exports.SegmentedInput=Q.SegmentedInput;exports.TextArea=Q.TextArea;exports.UnionController=Q.UnionController;exports.UnstyledDropZone=Q.UnstyledDropZone;exports.UrlInput=Q.UrlInput;exports.UuidInput=Q.UuidInput;exports.WithTemporal=Q.WithTemporal;exports.deepMergeDefaults=Q.deepMergeDefaults;exports.emitExpando=Q.emitExpando;exports.emitOptionExpando=Q.emitOptionExpando;exports.ensureTemporal=Q.ensureTemporal;exports.transformEmptyStringToUndefined=Q.transformEmptyStringToUndefined;exports.transformNullToUndefined=Q.transformNullToUndefined;exports.transformUndefinedToNull=Q.transformUndefinedToNull;exports.CommonInputAttributes=Ee.CommonInputAttributes;exports.TextInput=Ee.TextInput;exports.mapInputOptions=Ee.mapInputOptions;exports.Flyout=Ve.Flyout;exports.Menu=Ve.Menu;exports.MenuItem=Ve.MenuItem;exports.MenuSeparator=Ve.MenuSeparator;exports.BigintInput=We.BigintInput;exports.DurationInput=We.DurationInput;exports.FileInput=We.FileInput;exports.NullableBigintInput=We.NullableBigintInput;exports.NullablePlainDateInput=We.NullablePlainDateInput;exports.NullablePlainDateTimeInput=We.NullablePlainDateTimeInput;exports.NullablePlainTimeInput=We.NullablePlainTimeInput;exports.PlainDateInput=We.PlainDateInput;exports.PlainDateTimeInput=We.PlainDateTimeInput;exports.PlainTimeInput=We.PlainTimeInput;exports.Card=lt.Card;exports.CardBody=lt.CardBody;exports.CardCoverImage=lt.CardCoverImage;exports.CardFooter=lt.CardFooter;exports.CardHeader=lt.CardHeader;exports.DangerLabel=Qe.DangerLabel;exports.EmphasisLabel=Qe.EmphasisLabel;exports.Label=Qe.Label;exports.MutedLabel=Qe.MutedLabel;exports.Stack=Qe.Stack;exports.EmailInput=At.EmailInput;exports.Notice=At.Notice;exports.PasswordInput=At.PasswordInput;exports.LinkPortal=kn.LinkPortal;exports.Toolbar=st.Toolbar;exports.ToolbarButton=st.ToolbarButton;exports.ToolbarDivider=st.ToolbarDivider;exports.ToolbarGroup=st.ToolbarGroup;exports.ToolbarSpacer=st.ToolbarSpacer;exports.Accordion=ir;exports.ActionCard=dr;exports.AlertDialog=Jl;exports.Align=Er;exports.AnnouncementBar=jl;exports.AppShell=xr;exports.AppearanceSelector=Wa;exports.Avatar=Tn;exports.AvatarGroup=Un;exports.AvatarGroupOverflow=Rn;exports.Badge=Je;exports.BaseComboboxControl=Ga;exports.BaseComboboxTagsControl=Co;exports.BaseDropdownControl=Ha;exports.BaseMultiSelectControl=So;exports.BaseSelectTagsControl=_o;exports.BaseVideoPlayer=ss;exports.BeatUI=dl;exports.BlockCommandPalette=Kl;exports.Breadcrumbs=wl;exports.ButtonLink=xl;exports.Carousel=cs;exports.Center=Or;exports.CenterH=Ir;exports.Chips=Gt;exports.Collapse=vt;exports.CollapsibleSidebarGroup=$l;exports.ColorController=Xa;exports.ColorInput=Ua;exports.ColumnFilter=Ze;exports.ColumnFilterPanel=ot;exports.ColumnHeaderMenu=Aa;exports.ComboboxControl=ko;exports.ComboboxInput=qa;exports.ComboboxTagsControl=Vo;exports.ComboboxTagsInput=Kt;exports.CommandPalette=Gl;exports.ConfirmationDialog=Xl;exports.DataTable=ho;exports.DataToolbar=Ia;exports.DateInput=Io;exports.DatePicker=Mn;exports.DateRangePicker=Nn;exports.DateTimeInput=Oo;exports.Divider=Tr;exports.Drawer=Ll;exports.DropdownBase=zt;exports.DropdownControl=yo;exports.DropdownInput=za;exports.EmptyState=bl;exports.EnsureControl=nl;exports.Filter=Se;exports.FormStatus=rl;exports.Gap=Pr;exports.Grow=Mr;exports.HistoryTimeline=zn;exports.Indicator=qn;exports.InputAdornment=To;exports.InstantInput=Yo;exports.Justify=Fr;exports.Kbd=rs;exports.LazyNativeSelect=Do;exports.Lightbox=Rl;exports.Link=an;exports.LoadingOverlay=La;exports.LocaleSelector=sl;exports.MultiSelect=Xt;exports.MultiSelectControl=xo;exports.NativePdfPreview=pl;exports.NavigationLink=Sl;exports.NavigationProgress=Bl;exports.NineSliceScrollView=Dr;exports.NoWrap=Br;exports.Notification=Qa;exports.NotificationPanel=yl;exports.NotificationProvider=Zt;exports.NotificationService=en;exports.NotificationViewport=tn;exports.NullableColorInput=fo;exports.NullableColorSwatchInput=vo;exports.NullableInstantInput=Xo;exports.NullableMaskInput=Po;exports.NullablePlainMonthDayInput=al;exports.NullablePlainYearMonthInput=el;exports.NullableZonedDateTimeInput=Jo;exports.OnboardingTour=as;exports.OpenGraph=vl;exports.Option=Le;exports.OtpInput=qo;exports.PDFJSPreview=ml;exports.PageDropZone=Gn;exports.Pagination=xa;exports.PdfPageViewer=vs;exports.PlainMonthDayInput=tl;exports.PlainYearMonthInput=Qo;exports.Popover=Nl;exports.PresenceCursor=va;exports.PresenceHighlight=Yn;exports.PresenceSelectionMark=Kn;exports.ProgressBar=Xn;exports.PromptDialog=Ql;exports.RadioGroup=Lo;exports.RangeSlider=Ro;exports.Ribbon=Ul;exports.ScrollablePanel=Tt;exports.SelectAllCheckbox=Ma;exports.SelectTagsControl=wo;exports.SelectTagsInput=Yt;exports.SelectionCheckbox=Rt;exports.Sidebar=Il;exports.SidebarActiveLink=ln;exports.SidebarClickLink=sn;exports.SidebarContext=rn;exports.SidebarGroup=Ft;exports.SidebarLink=cn;exports.SidebarSeparator=Ol;exports.SidebarUrlLink=on;exports.Sink=Nr;exports.Skeleton=Zn;exports.SortableHeader=Fa;exports.StandaloneAppearanceSelector=bo;exports.StylePortal=gl;exports.Table=wa;exports.Tabs=El;exports.TagInput=Fo;exports.TagsInput=Ao;exports.ToggleButton=Ta;exports.ToggleButtonGroup=kr;exports.Tooltip=rt;exports.TreeView=Ml;exports.TriStateCheckboxInput=Ba;exports.WithBeatUIBreakpoint=Oa;exports.WithBeatUIElementBreakpoint=gr;exports.WithBreakpoint=Ut;exports.Wrap=Ar;exports.ZonedDateTimeInput=Zo;exports.colorInputOptionsFromController=ll;exports.compareBreakpoint=$a;exports.createCarousel=pn;exports.createColorController=ol;exports.createDataSource=Ca;exports.createLocationMatcher=yt;exports.delaySignal=_n;exports.describeBuiltinFilter=Lt;exports.describeBuiltinFilterLocalized=Wt;exports.describeFilter=Nt;exports.describeFilterLocalized=ft;exports.downloadContent=wn;exports.downloadFile=Vn;exports.downloadUrl=Bt;exports.downloadUrlAndMonitor=Cn;exports.evaluateBuiltinFilter=gt;exports.evaluateFilterExpr=mt;exports.findBreakpoint=hr;exports.generateBadgeClasses=ga;exports.generateBadgeStyles=fa;exports.generateLinkClasses=Pt;exports.generateLinkStyles=Et;exports.generateNotificationClasses=Za;exports.generateNotificationStyles=Ja;exports.generatePaginationRange=Va;exports.generatePaginationStyles=Sa;exports.generateProgressBarClasses=ya;exports.generateProgressBarStyles=ka;exports.generateSkeletonClasses=$t;exports.generateSkeletonStyles=_a;exports.increaseSize=Sn;exports.inferValueType=Mt;exports.isBuiltinFilter=it;exports.isUrlMatch=nn;
|
|
1
|
+
"use strict";var Mn=Object.create;var pa=Object.defineProperty;var Nn=Object.getOwnPropertyDescriptor;var Wn=Object.getOwnPropertyNames;var Un=Object.getPrototypeOf,Rn=Object.prototype.hasOwnProperty;var zn=(t,a,n,r)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of Wn(a))!Rn.call(t,o)&&o!==n&&pa(t,o,{get:()=>a[o],enumerable:!(r=Nn(a,o))||r.enumerable});return t};var Hn=(t,a,n)=>(n=t!=null?Mn(Un(t)):{},zn(a||!t||!t.__esModule?pa(n,"default",{value:t,enumerable:!0}):n,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),$e=require("@tempots/ui"),k=require("./translations-qefRsdGi.cjs"),me=require("./colors-DPCHjRMj.cjs"),T=require("./index-DFF7Uahh.cjs"),ee=require("./use-form-CP6nftVl.cjs"),Ne=require("@tempots/std"),Ue=require("./use-animated-toggle-cKcuItmz.cjs"),ut=require("./theme-DogY9oT1.cjs"),Ia=require("./tailwind/preset.cjs.js"),X=require("./widget-customization-B0y-eesp.cjs"),Fe=require("./session-id-B5lJMzbB.cjs"),Oe=require("./modal-BmpfNL48.cjs"),se=require("./input-container-BkPcNDaZ.cjs"),J=require("./deep-merge-B33Qtlmw.cjs"),Ee=require("./text-input-D_IxFd0M.cjs"),Ve=require("./menu-B60Q9j3-.cjs"),Re=require("./duration-input-C5il_E0F.cjs"),mt=require("./utils-DmEuG3Np.cjs"),rt=require("./stack-dwLevGa2.cjs"),qt=require("./notice-BBnSXYUc.cjs"),jn=require("./link-portal-_tiDFZqh.cjs"),ht=require("./toolbar-CnecqhaU.cjs");function qn(t,a=0,n=()=>!0){let r=null,o;const l=e.prop(t.value);return t.on(s=>{o=s,n(s)?r==null&&(r=setTimeout(()=>{r=null,l.set(o)},a)):l.set(s)}),t.onDispose(()=>{r!=null&&clearTimeout(r)}),l}const Gt=async(t,a="")=>{try{const r=await(await fetch(t)).blob(),o=URL.createObjectURL(r),l=document.createElement("a");l.href=o,l.download=a,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(o)}catch{window.open(t,"_blank")}},Gn=(t,a,n="application/octet-stream")=>{const r=new Blob([t],{type:n});Gt(URL.createObjectURL(r),a),URL.revokeObjectURL(URL.createObjectURL(r))},Yn=t=>{const a=new AbortController,n=e.prop({type:"progress",value:0});let r=!1;return(async()=>{try{const o=await fetch(t,{signal:a.signal});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const l=o.headers.get("content-length"),s=l?parseInt(l,10):void 0,c=(async()=>{if(s===void 0||isNaN(s))return n.set({type:"undetermined"}),await o.blob();{const m=new Uint8Array(s);if(o.body==null)throw new Error("Response body is null");const h=o.body.getReader();let d=0;for(;;){const{done:f,value:b}=await h.read();if(f)break;m.set(b,d),d+=b.length,n.set({type:"progress",value:Math.min(d/s,1)})}return new Blob([m],{type:o.headers.get("content-type")??void 0})}})(),u=t.split("/").pop()||"download",i=await c,p=new File([i],u,{type:i.type});r=!0,n.set({type:"done",file:p})}catch(o){n.set({type:"error",error:o})}finally{r=!0,n.dispose()}})(),{signal:n,cancel:()=>{r||a.abort()}}},Zn=t=>{Gt(URL.createObjectURL(t),t.name)},$t=["xs","sm","md","lg","xl"];function Kn(t,a=1){const n=$t.indexOf(t);if(n===-1)throw new Error(`Invalid size: ${t}`);const r=Math.min(Math.max(n+a,0),$t.length-1);return $t[r]}const Xn={xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"xl","2xl":"xl"};function Jn(t){const a=t.trim().split(/\s+/);return a.length===1?a[0][0].toUpperCase():(a[0][0]+a[a.length-1][0]).toUpperCase()}function Qn(t){const a=k.backgroundValue(t,"solid","light"),n=k.backgroundValue(t,"solid","dark");return[`--avatar-bg: ${a.backgroundColor}`,`--avatar-text: ${a.textColor}`,`--avatar-bg-dark: ${n.backgroundColor}`,`--avatar-text-dark: ${n.textColor}`].join("; ")}function er(t,a,n){const r=["bc-avatar",`bc-avatar--size-${t}`,`bc-avatar--${a}`];return n&&r.push("bc-avatar--bordered"),r.join(" ")}function tr({src:t,name:a,icon:n,size:r="md",variant:o="circle",color:l="base",bordered:s=!1,borderColor:c},...u){const i=e.Value.map(e.Value.toSignal(r),m=>Xn[m??"md"]),p=e.html.span(e.attr.class("bc-avatar__icon"),k.Icon({icon:"mdi:account",size:i}));return e.html.div(e.attr.class(e.computedOf(r,o,s,c)((m,h,d,f)=>er(m??"md",h??"circle",(d??!1)||f!=null))),e.attr.style(e.computedOf(l,c)((m,h)=>{const d=Qn(m??"base");if(h==null)return d;const f=me.getColorVar(h,500),b=me.getColorVar(h,400);return`${d}; --avatar-border-color: ${f}; --avatar-border-color-dark: ${b}`})),e.Ensure(t,m=>e.html.img(e.attr.class("bc-avatar__image"),e.attr.src(m),e.attr.alt(a!=null?e.Value.map(a,h=>h??"Avatar"):"Avatar")),()=>e.Ensure(a,m=>e.html.span(e.attr.class("bc-avatar__initials"),m.map(Jn)),()=>e.Ensure(n,m=>e.html.span(e.attr.class("bc-avatar__icon"),k.Icon({icon:m,size:i})),()=>p))),...u)}const Ke=20,tt=7,ar=["January","February","March","April","May","June","July","August","September","October","November","December"],nr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],rr=["Su","Mo","Tu","We","Th","Fr","Sa"];function or(t,a){const n=["bc-date-picker",`bc-date-picker--size-${t}`];return a&&n.push("bc-date-picker--disabled"),n.join(" ")}function lr(t){const a=k.backgroundValue(t,"solid","light"),n=k.backgroundValue(t,"solid","dark"),r=k.backgroundValue(t,"light","light"),o=k.backgroundValue(t,"light","dark");return[`--cal-selected-bg: ${a.backgroundColor}`,`--cal-selected-text: ${a.textColor}`,`--cal-selected-bg-dark: ${n.backgroundColor}`,`--cal-selected-text-dark: ${n.textColor}`,`--cal-today-bg: ${r.backgroundColor}`,`--cal-today-text: ${r.textColor}`,`--cal-today-bg-dark: ${o.backgroundColor}`,`--cal-today-text-dark: ${o.textColor}`].join("; ")}function Da(t,a,n,r,o,l){const s=t.PlainDate.from({year:a,month:n,day:1}),c=s.daysInMonth,i=(s.dayOfWeek%7-r+tt)%tt,p=s.subtract({months:1}),m=p.daysInMonth,h=[],d=(b,g,v)=>{h.push({day:g,date:b,inMonth:v,isToday:b.equals(o),isDisabled:l?.(b)??!1})};for(let b=i-1;b>=0;b--){const g=m-b;d(p.with({day:g}),g,!1)}for(let b=1;b<=c;b++)d(t.PlainDate.from({year:a,month:n,day:b}),b,!0);const f=tt-h.length%tt;if(f<tt){const b=s.add({months:1});for(let g=1;g<=f;g++)d(b.with({day:g}),g,!1)}return h}function Oa(t,a,n,r,o){const l=t.Now.plainDateISO(),s=e.prop(a),c=e.prop(n),u=e.prop("days"),i=e.prop(Math.floor(a/Ke)*Ke),p=e.Value.map(o,m=>{const h=[];for(let d=0;d<tt;d++)h.push(rr[(d+m)%tt]);return h});return{today:l,currentYear:s,currentMonth:c,view:u,yearPageStart:i,shiftedDayNames:p,prevMonth:()=>{if(e.Value.get(r))return;const m=c.value,h=s.value;m===1?(c.set(12),s.set(h-1)):c.set(m-1)},nextMonth:()=>{if(e.Value.get(r))return;const m=c.value,h=s.value;m===12?(c.set(1),s.set(h+1)):c.set(m+1)},prevYear:()=>{e.Value.get(r)||s.update(m=>m-1)},nextYear:()=>{e.Value.get(r)||s.update(m=>m+1)},prevYearPage:()=>{e.Value.get(r)||i.update(m=>m-Ke)},nextYearPage:()=>{e.Value.get(r)||i.update(m=>m+Ke)},switchToMonthsView:()=>{e.Value.get(r)||u.set("months")},switchToYearsView:()=>{if(e.Value.get(r))return;const m=s.value;i.set(Math.floor(m/Ke)*Ke),u.set("years")},selectMonth:m=>{e.Value.get(r)||(c.set(m),u.set("days"))},selectYear:m=>{e.Value.get(r)||(s.set(m),u.set("months"))}}}function $a(t,a,n){const{size:r,disabled:o,color:l,ariaLabel:s}=a,{today:c,currentYear:u,currentMonth:i,view:p,yearPageStart:m,prevMonth:h,nextMonth:d,prevYear:f,nextYear:b,prevYearPage:g,nextYearPage:v,switchToMonthsView:C,switchToYearsView:_,selectMonth:y,selectYear:V}=t;return e.html.div(e.attr.class(e.computedOf(r,o)(or)),e.attr.style(e.Value.map(l,lr)),e.attr.role("grid"),e.aria.label(s),e.OneOfValue(p,{days:()=>e.html.div(e.attr.class("bc-date-picker__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Previous year"),e.on.click(w=>{w.preventDefault(),f()}),"«"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Previous month"),e.on.click(w=>{w.preventDefault(),h()}),"‹"),e.html.div(e.attr.class("bc-date-picker__title"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__title-btn"),e.attr.disabled(o),e.aria.label("Select month"),e.on.click(w=>{w.preventDefault(),C()}),e.Value.map(i,w=>ar[w-1])),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__title-btn"),e.attr.disabled(o),e.aria.label("Select year"),e.on.click(w=>{w.preventDefault(),_()}),e.Value.map(u,String))),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Next month"),e.on.click(w=>{w.preventDefault(),d()}),"›"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Next year"),e.on.click(w=>{w.preventDefault(),b()}),"»")),months:()=>e.html.div(e.attr.class("bc-date-picker__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Previous year"),e.on.click(w=>{w.preventDefault(),f()}),"«"),e.html.span(e.attr.class("bc-date-picker__title"),e.Value.map(u,String)),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label("Next year"),e.on.click(w=>{w.preventDefault(),b()}),"»")),years:()=>e.html.div(e.attr.class("bc-date-picker__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label(`Previous ${Ke} years`),e.on.click(w=>{w.preventDefault(),g()}),"«"),e.html.span(e.attr.class("bc-date-picker__title"),e.Value.map(m,w=>`${w} – ${w+Ke-1}`)),e.html.button(e.attr.type("button"),e.attr.class("bc-date-picker__nav-btn"),e.attr.disabled(o),e.aria.label(`Next ${Ke} years`),e.on.click(w=>{w.preventDefault(),v()}),"»"))}),e.OneOfValue(p,{days:()=>e.html.div(e.attr.class("bc-date-picker__days-view"),e.html.div(e.attr.class("bc-date-picker__weekdays"),e.ForEach(t.shiftedDayNames,w=>e.html.div(e.attr.class("bc-date-picker__weekday"),w))),n()),months:()=>e.html.div(e.attr.class("bc-date-picker__picker-grid bc-date-picker__picker-grid--months"),...nr.map((w,S)=>{const $=S+1;return e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(i,u)((N,D)=>{const M=["bc-date-picker__month-cell"];return N===$&&M.push("bc-date-picker__month-cell--current"),c.month===$&&c.year===D&&M.push("bc-date-picker__month-cell--active"),M.join(" ")})),e.attr.disabled(o),e.on.click(N=>{N.preventDefault(),y($)}),w)})),years:()=>e.html.div(e.attr.class("bc-date-picker__picker-grid bc-date-picker__picker-grid--years"),e.ForEach(e.Value.map(m,w=>{const S=[];for(let $=0;$<Ke;$++)S.push(w+$);return S}),w=>e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(u,w)((S,$)=>{const N=["bc-date-picker__year-cell"];return S===$&&N.push("bc-date-picker__year-cell--current"),c.year===$&&N.push("bc-date-picker__year-cell--active"),N.join(" ")})),e.attr.disabled(o),e.on.click(S=>{S.preventDefault(),V(e.Value.get(w))}),e.Value.map(w,String))))}))}function sr(t,{value:a=null,onSelect:n,isDateDisabled:r,color:o="primary",size:l="md",disabled:s=!1,weekStartsOn:c=0}){const u=a!=null?e.Value.get(a):null,i=Oa(t,u?.year??t.Now.plainDateISO().year,u?.month??t.Now.plainDateISO().month,s,c),p=e.Value.toSignal(c),m=e.computedOf(i.currentYear,i.currentMonth,a,p)((h,d,f,b)=>Da(t,h,d,b,i.today,r).map(g=>({...g,isSelected:f!=null&&g.date.equals(f)})));return $a(i,{size:l,disabled:s,color:o,ariaLabel:"Date picker"},()=>e.html.div(e.attr.class("bc-date-picker__grid"),e.ForEach(m,h=>{const d=h.map(g=>{const v=["bc-date-picker__day"];return g.inMonth||v.push("bc-date-picker__day--outside"),g.isToday&&v.push("bc-date-picker__day--today"),g.isSelected&&v.push("bc-date-picker__day--selected"),g.isDisabled&&v.push("bc-date-picker__day--disabled"),v.join(" ")}),f=h.map(g=>g.isDisabled),b=h.map(g=>String(g.day));return e.html.button(e.attr.type("button"),e.attr.class(d),e.attr.disabled(e.computedOf(f,s)((g,v)=>g||v)),e.on.click(g=>{g.preventDefault();const v=e.Value.get(h);!v.isDisabled&&!e.Value.get(s)&&(v.inMonth||(i.currentYear.set(v.date.year),i.currentMonth.set(v.date.month)),n?.(v.date))}),b)})))}function ir(t){return J.WithTemporal(a=>sr(a,t??{}))}function cr(t,{value:a=null,onChange:n,isDateDisabled:r,color:o="primary",size:l="md",disabled:s=!1,weekStartsOn:c=0}){const u=a!=null?e.Value.get(a):null,i=Oa(t,u?.[0]?.year??t.Now.plainDateISO().year,u?.[0]?.month??t.Now.plainDateISO().month,s,c),p=e.Value.toSignal(c),m=e.prop(null),h=e.prop(null);a!=null&&e.Value.on(a,()=>{m.set(null)});const d=e.computedOf(i.currentYear,i.currentMonth,a,m,h,p)((f,b,g,v,C,_)=>{let y=null,V=null,w=!1;if(v!=null&&C!=null){const S=t.PlainDate.compare(v,C);y=S<=0?v:C,V=S<=0?C:v,w=!0}else g!=null&&(y=g[0],V=g[1]);return Da(t,f,b,_,i.today,r).map(S=>{let $=!1,N=!1,D=!1;return y!=null&&V!=null&&($=S.date.equals(y),N=S.date.equals(V),D=t.PlainDate.compare(S.date,y)>0&&t.PlainDate.compare(S.date,V)<0),{...S,isRangeStart:$,isRangeEnd:N,isInRange:D,isPreview:w}})});return $a(i,{size:l,disabled:s,color:o,ariaLabel:"Date range picker"},()=>e.html.div(e.attr.class("bc-date-picker__grid"),e.on.mouseleave(()=>{h.set(null)}),e.ForEach(d,f=>{const b=f.map(C=>{const _=["bc-date-picker__day"];return C.inMonth||_.push("bc-date-picker__day--outside"),C.isToday&&_.push("bc-date-picker__day--today"),C.isDisabled&&_.push("bc-date-picker__day--disabled"),C.isRangeStart&&_.push("bc-date-picker__day--range-start"),C.isRangeEnd&&_.push("bc-date-picker__day--range-end"),C.isInRange&&_.push("bc-date-picker__day--in-range"),C.isPreview&&(C.isRangeStart||C.isRangeEnd||C.isInRange)&&_.push("bc-date-picker__day--preview"),_.join(" ")}),g=f.map(C=>C.isDisabled),v=f.map(C=>String(C.day));return e.html.button(e.attr.type("button"),e.attr.class(b),e.attr.disabled(e.computedOf(g,s)((C,_)=>C||_)),e.on.mouseenter(()=>{const C=e.Value.get(f);!C.isDisabled&&!e.Value.get(s)&&h.set(C.date)}),e.on.click(C=>{C.preventDefault();const _=e.Value.get(f);if(_.isDisabled||e.Value.get(s))return;_.inMonth||(i.currentYear.set(_.date.year),i.currentMonth.set(_.date.month));const y=m.value;if(y==null)m.set(_.date);else{const w=t.PlainDate.compare(y,_.date)<=0?[y,_.date]:[_.date,y];m.set(null),h.set(null),n?.(w)}}),v)})))}function ur(t){return J.WithTemporal(a=>cr(a,t??{}))}function dr(t){const a=k.backgroundValue(t,"solid","light"),n=k.backgroundValue(t,"solid","dark");return[`--avatar-bg: ${a.backgroundColor}`,`--avatar-text: ${a.textColor}`,`--avatar-bg-dark: ${n.backgroundColor}`,`--avatar-text-dark: ${n.textColor}`].join("; ")}function pr({size:t="md",spacing:a="tight"},...n){return e.html.div(e.attr.class(e.computedOf(t,a)((r,o)=>["bc-avatar-group",`bc-avatar-group--size-${r??"md"}`,`bc-avatar-group--spacing-${o??"tight"}`].join(" "))),...n)}function mr({count:t,size:a="md",color:n="base"}){return e.html.div(e.attr.class(e.Value.map(a,r=>["bc-avatar",`bc-avatar--size-${r??"md"}`,"bc-avatar--circle","bc-avatar-group__overflow"].join(" "))),e.attr.style(e.Value.map(n,r=>dr(r??"base"))),e.html.span(e.attr.class("bc-avatar__initials"),e.Value.map(t,r=>`+${r??0}`)))}const ma={min:0,max:360},ha={min:50,max:80},fa={min:40,max:65};function hr(t){let a=5381;for(let n=0;n<t.length;n++)a=(a<<5)+a+t.charCodeAt(n)|0;return a>>>0}function Tt(t,a,n,r){const o=(t*2654435761+a*2246822519>>>0)%1e4;return n+o/1e4*(r-n)}function fr(t){return t>56?"#000":"#fff"}function gr(t,a,n,r){const o=t.trim();if(o==="")return"";const l=hr(o),s=Tt(l,1,a.min,a.max),c=Tt(l,2,n.min,n.max),u=Tt(l,3,r.min,r.max),i=fr(u);return`background-color: hsl(${s.toFixed(1)} ${c.toFixed(1)}% ${u.toFixed(1)}%); color: ${i}`}function br(t,a){return["bc-auto-color-badge",`bc-badge--size-${t}`,`bc-control--rounded-${a}`].join(" ")}function vr(t={},...a){const{size:n="md",roundedness:r="full",text:o,hue:l=ma,saturation:s=ha,lightness:c=fa}=t,u=o??e.prop(""),i=e.computedOf(u,l,s,c)((p,m,h,d)=>gr(p??"",m??ma,h??ha,d??fa));return e.html.span(e.attr.class(e.computedOf(n,r)((p,m)=>br(p??"md",m??"full"))),e.attr.style(i),e.html.span(e.attr.class("bc-badge__content"),...a),e.When(e.Value.map(o,p=>p==null),()=>e.WithElement(p=>{const m=u;m.set(p.textContent??"");const h=new MutationObserver(()=>{m.set(p.textContent??"")});return h.observe(p,{childList:!0,subtree:!0,characterData:!0}),e.OnDispose(()=>h.disconnect())})))}function Ta(t,a,n,r,o){const l=["bc-badge",`bc-badge--size-${t}`,`bc-control--rounded-${a}`];return n&&l.push("bc-badge--circle"),r&&l.push("bc-badge--full-width"),o&&l.push("bc-badge--disabled"),l.join(" ")}function Fa(t,a){const n=new Map,r=(o,l,s,c)=>{n.set("--badge-bg-hover",o),n.set("--badge-text-hover",s),n.set("--badge-bg-hover-dark",l),n.set("--badge-text-hover-dark",c)};switch(t){case"filled":{const o=k.backgroundValue(a,"solid","light"),l=k.backgroundValue(a,"solid","dark"),s=k.hoverBackgroundValue(a,"soft","light"),c=k.hoverBackgroundValue(a,"soft","dark");n.set("--badge-bg",o.backgroundColor),n.set("--badge-text",o.textColor),n.set("--badge-bg-dark",l.backgroundColor),n.set("--badge-text-dark",l.textColor),n.set("--badge-border","transparent"),n.set("--badge-border-dark","transparent"),r(s.backgroundColor,c.backgroundColor,s.textColor,c.textColor);break}case"light":{const o=k.backgroundValue(a,"light","light"),l=k.backgroundValue(a,"light","dark"),s=k.hoverBackgroundValue(a,"light","light"),c=k.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg",o.backgroundColor),n.set("--badge-text",o.textColor),n.set("--badge-bg-dark",l.backgroundColor),n.set("--badge-text-dark",l.textColor),n.set("--badge-border","transparent"),n.set("--badge-border-dark","transparent"),r(s.backgroundColor,c.backgroundColor,s.textColor,c.textColor);break}case"outline":{const o=k.textColorValue(a,"light"),l=k.textColorValue(a,"dark"),s=k.borderColorValue(a,"light"),c=k.borderColorValue(a,"dark"),u=k.hoverBackgroundValue(a,"light","light"),i=k.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg","transparent"),n.set("--badge-text",o),n.set("--badge-bg-dark","transparent"),n.set("--badge-text-dark",l),n.set("--badge-border",s),n.set("--badge-border-dark",c),r(u.backgroundColor,i.backgroundColor,u.textColor,i.textColor);break}case"default":{const o=k.textColorValue(a,"light"),l=k.textColorValue(a,"dark"),s=k.hoverBackgroundValue(a,"light","light"),c=k.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg","var(--bg-background-light)"),n.set("--badge-text",o),n.set("--badge-bg-dark","var(--bg-background-dark)"),n.set("--badge-text-dark",l),n.set("--badge-border","var(--border-border-light)"),n.set("--badge-border-dark","var(--border-border-dark)"),r(s.backgroundColor,c.backgroundColor,s.textColor,c.textColor);break}case"dashed":{const o=k.textColorValue(a,"light"),l=k.textColorValue(a,"dark"),s=k.borderColorValue(a,"light"),c=k.borderColorValue(a,"dark"),u=k.hoverBackgroundValue(a,"light","light"),i=k.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg","transparent"),n.set("--badge-text",o),n.set("--badge-bg-dark","transparent"),n.set("--badge-text-dark",l),n.set("--badge-border",s),n.set("--badge-border-dark",c),n.set("--badge-border-style","dashed"),r(u.backgroundColor,i.backgroundColor,u.textColor,i.textColor);break}case"subtle":{const o=k.textColorValue(a,"light"),l=k.textColorValue(a,"dark"),s=k.hoverBackgroundValue(a,"light","light"),c=k.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg","transparent"),n.set("--badge-text",o),n.set("--badge-bg-dark","transparent"),n.set("--badge-text-dark",l),n.set("--badge-border","transparent"),n.set("--badge-border-dark","transparent"),r(s.backgroundColor,c.backgroundColor,s.textColor,c.textColor);break}case"text":{const o=k.textColorValue(a,"light"),l=k.textColorValue(a,"dark"),s=k.hoverBackgroundValue(a,"light","light"),c=k.hoverBackgroundValue(a,"light","dark");n.set("--badge-bg","transparent"),n.set("--badge-text",o),n.set("--badge-bg-dark","transparent"),n.set("--badge-text-dark",l),n.set("--badge-border","transparent"),n.set("--badge-border-dark","transparent"),r(s.backgroundColor,c.backgroundColor,s.textColor,c.textColor);break}}return Array.from(n.entries()).map(([o,l])=>`${o}: ${l}`).join("; ")}function nt({variant:t="filled",size:a="md",color:n="base",roundedness:r="full",circle:o=!1,fullWidth:l=!1,onClose:s,disabled:c=!1},...u){return e.html.span(e.attr.class(e.computedOf(a,r,o,l,c)((i,p,m,h,d)=>Ta(i??"md",p??"sm",m??!1,h??!1,d??!1))),e.attr.style(e.computedOf(t,n)((i,p)=>Fa(i??"filled",p??"base"))),e.html.span(e.attr.class("bc-badge__content"),...u),s!=null?e.Use(k.BeatUII18n,i=>e.html.button(e.attr.class("bc-badge__close"),e.attr.type("button"),e.attr.disabled(c),e.aria.label(i.$.removeItem),e.on.click(p=>{p.stopPropagation(),s()}),"×")):e.Empty)}function yr(t){const{entries:a,filters:n}=t,r=e.prop("all"),o=e.computedOf(a,r)((c,u)=>u==="all"?c:c.filter(i=>{const p=i.action.toLowerCase();switch(u){case"deletions":return p.includes("delet");case"edits":return p.includes("edit");case"schema":return p.includes("schema");case"restorable":return i.restorable===!0;default:return!0}})),s=n??[{value:"all",label:"All"},{value:"deletions",label:"Deletions"},{value:"edits",label:"Edits"},{value:"schema",label:"Schema changes"},{value:"restorable",label:"Restorable"}];return e.html.div(e.attr.class("bc-history-timeline"),e.html.div(e.attr.class("bc-history-timeline__filters"),...s.map(c=>e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(r)(u=>u===c.value?"bc-history-timeline__filter bc-history-timeline__filter--active":"bc-history-timeline__filter")),e.on.click(()=>r.set(c.value)),c.label))),e.html.div(e.attr.class("bc-history-timeline__list"),e.ForEach(o,c=>e.html.div(e.attr.class("bc-history-timeline__entry"),e.html.div(e.attr.class("bc-history-timeline__line"),e.html.div(e.attr.class("bc-history-timeline__dot"),e.attr.style(c.map(u=>`background: ${u.actionColor}`)))),e.html.div(e.attr.class("bc-history-timeline__content"),e.html.div(e.attr.class("bc-history-timeline__content-header"),e.html.span(e.attr.class("bc-history-timeline__action"),e.attr.style(c.map(u=>`color: ${u.actionColor}`)),c.$.action),e.html.span(e.attr.class("bc-history-timeline__time"),c.$.time)),e.html.div(e.attr.class("bc-history-timeline__target"),k.Icon({icon:c.$.targetIcon,size:"xs"}),e.html.span(c.$.target)),e.html.div(e.attr.class("bc-history-timeline__detail"),c.$.detail),e.html.div(e.attr.class("bc-history-timeline__footer"),e.html.div(e.attr.class("bc-history-timeline__actor"),e.html.div(e.attr.class("bc-history-timeline__avatar"),c.$.actor.$.initials),e.html.span(c.$.actor.$.name)),e.When(c.map(u=>u.restorable===!0&&u.onRestore!=null),()=>se.Button({variant:"outline",size:"xs",onClick:()=>c.value.onRestore?.()},k.Icon({icon:"lucide:rotate-ccw",size:"xs"}),"Restore")))))),e.When(e.computedOf(o)(c=>c.length===0),()=>e.html.div(e.attr.class("bc-history-timeline__empty"),"No matching history entries"))))}function kr(t,a,n){const r=["bc-indicator__badge",`bc-indicator--${t}`,`bc-indicator--size-${a}`];return n?r.push("bc-indicator--dot"):r.push("bc-indicator--count"),r.join(" ")}function _r(t){const a=k.backgroundValue(t,"solid","light"),n=k.backgroundValue(t,"solid","dark");return[`--indicator-bg: ${a.backgroundColor}`,`--indicator-text: ${a.textColor}`,`--indicator-bg-dark: ${n.backgroundColor}`,`--indicator-text-dark: ${n.textColor}`].join("; ")}function wr({show:t=!0,count:a,maxCount:n=9,color:r="danger",placement:o="top-right",size:l="sm"},...s){const c=e.computedOf(t,a??0)((p,m)=>(p??!0)||m>0),u=e.computedOf(a??0)(p=>p<=0),i=e.computedOf(a??0,n)((p,m)=>p<=0?"":p>(m??9)?`${m??9}+`:String(p));return e.html.span(e.attr.class("bc-indicator"),...s,e.When(c,()=>e.html.span(e.attr.class(e.computedOf(o,l,u)((p,m,h)=>kr(p??"top-right",m??"sm",h??!0))),e.attr.style(e.computedOf(r)(p=>_r(p??"danger"))),i)))}function Cr({onChange:t,accept:a="*/*",onDragContent:n,content:r,onInvalidSelection:o,disabled:l=!1}){const s=e.prop(!1),c=e.prop([]);let u=null,i=0;const p=_=>_.dataTransfer?.types.includes("Files")??!1,m=(_,y)=>y==="*/*"?!0:y.split(",").map(w=>w.trim()).some(w=>{if(w==="*/*")return!0;if(w.endsWith("/*")){const S=w.slice(0,-2);return _.type.startsWith(S+"/")}return _.type===w||_.name.endsWith(w)}),h=_=>{e.Value.get(l)||p(_)&&(_.preventDefault(),_.stopPropagation(),i++,i===1&&(s.value=!0))},d=_=>{e.Value.get(l)||p(_)&&(_.preventDefault(),_.stopPropagation(),_.dataTransfer!=null&&(_.dataTransfer.dropEffect="copy"))},f=_=>{e.Value.get(l)||p(_)&&(_.preventDefault(),_.stopPropagation(),i--,i===0&&(s.value=!1))},b=_=>{if(e.Value.get(l)||!p(_))return;_.preventDefault(),_.stopPropagation(),i=0,s.value=!1;const y=Array.from(_.dataTransfer?.files??[]);if(y.length>0){const V=e.Value.get(a),w=y.filter($=>m($,V)),S=y.filter($=>!w.includes($));w.length>0&&(c.value=w,t(w,"dragdrop")),S.length>0&&o?.(y)}};typeof document<"u"&&(document.addEventListener("dragenter",h),document.addEventListener("dragover",d),document.addEventListener("dragleave",f),document.addEventListener("drop",b));const g=()=>{typeof document<"u"&&(document.removeEventListener("dragenter",h),document.removeEventListener("dragover",d),document.removeEventListener("dragleave",f),document.removeEventListener("drop",b)),i=0},v=()=>{u?.click()},C=_=>{const y=_.target,V=Array.from(y.files??[]);V.length>0&&(c.value=V,t(V,"click")),y.value=""};return e.Fragment(e.OnDispose(g),e.html.input(e.attr.type("file"),e.attr.name("bui-page-drop-zone"),e.attr.multiple(!0),e.attr.accept(a),e.style.position("absolute"),e.style.opacity("0"),e.style.pointerEvents("none"),e.style.width("0"),e.style.height("0"),e.on.change(C),e.WithElement(_=>(u=_,e.OnDispose(()=>{u!=null&&(u.value="")})))),n!=null?e.When(s,()=>n({files:c})):null,r!=null?r({isDragging:s,files:c,selectFiles:v}):null)}function Pa(t){const{author:a,color:n}=t;return e.html.span(e.attr.class("bc-presence-cursor"),e.attr.style(`--presence-color: ${n}`),e.html.span(e.attr.class("bc-presence-cursor__bar")),e.html.span(e.attr.class("bc-presence-cursor__label"),a))}function Vr(t,...a){return e.html.span(e.attr.class("bc-presence-highlight"),e.attr.style(`--presence-color: ${t.color}`),...a)}function Sr(t,...a){const{author:n,color:r}=t;return e.html.span(e.attr.class("bc-presence-selection"),e.attr.style(`--presence-color: ${r}`),e.html.span(e.attr.class("bc-presence-highlight"),...a),Pa({author:n,color:r}))}function Ea(t,a,n){const r=["bc-progress-bar",`bc-progress-bar--size-${t}`,`bc-control--rounded-${n}`];return a&&r.push("bc-progress-bar--indeterminate"),r.join(" ")}function Aa(t){const a=new Map,n=k.backgroundValue(t,"solid","light"),r=k.backgroundValue(t,"solid","dark");return a.set("--progress-fill",n.backgroundColor),a.set("--progress-fill-dark",r.backgroundColor),Array.from(a.entries()).map(([o,l])=>`${o}: ${l}`).join("; ")}function xr({value:t=0,max:a=100,size:n="md",color:r="primary",indeterminate:o=!1,showLabel:l=!1,roundedness:s="full"}){const c=e.computedOf(t,a)((p,m)=>{const h=p??0,d=m??100;return d>0?Math.min(Math.max(h/d*100,0),100):0}),u=e.Value.map(c,p=>`${Math.round(p)}%`),i=e.computedOf(c,o)((p,m)=>m??!1?"":`${p}%`);return e.html.div(e.attr.class("bc-progress-bar-wrapper"),e.html.div(e.attr.class(e.computedOf(n,o,s)((p,m,h)=>Ea(p??"md",m??!1,h??"full"))),e.attr.style(e.Value.map(r,p=>Aa(p??"primary"))),e.attr.role("progressbar"),e.aria.valuemin(0),e.aria.valuemax(a),e.aria.valuenow(t),e.aria.valuetext(u),e.html.div(e.attr.class("bc-progress-bar__track"),e.html.div(e.attr.class("bc-progress-bar__fill"),e.style.width(i)))),e.When(l,()=>e.html.div(e.attr.class("bc-progress-bar__label"),e.aria.hidden(!0),u),()=>{}))}function Nt(t,a,n){const r=["bc-skeleton",`bc-skeleton--${t}`,`bc-control--rounded-${n}`];return a&&r.push("bc-skeleton--animate"),t==="circle"&&r.push("bc-skeleton--circle"),r.join(" ")}function Ba(t,a,n){const r=[];return t!==void 0&&r.push(`width: ${t}`),a!==void 0?r.push(`height: ${a}`):n==="text"?r.push("height: 1em"):n==="circle"&&t!==void 0&&r.push(`height: ${t}`),r.join("; ")}function Ir({variant:t="text",width:a,height:n,lines:r=1,animate:o=!0,roundedness:l="sm"}){const s=e.computedOf(t,r)((c,u)=>c==="text"&&(u??1)>1);return e.When(s,()=>e.html.div(e.attr.class("bc-skeleton__lines-container"),e.Repeat(r,c=>e.html.div(e.attr.class(e.computedOf(o,l)((u,i)=>Nt("text",u??!0,i??"sm")+" bc-skeleton__line")),e.style.width(e.computedOf(c.isLast,a)((u,i)=>u&&i===void 0?"80%":i!==void 0?i:""))))),()=>e.html.div(e.attr.class(e.computedOf(t,o,l)((c,u,i)=>Nt(c??"text",u??!0,i??"sm"))),e.attr.style(e.computedOf(a,n,t)((c,u,i)=>Ba(c,u,i??"text"))),e.aria.hidden(!0)))}function Dr(t,a,n,r,o,l){const s=["bc-table"];return t!=="md"&&s.push(`bc-table--size-${t}`),a&&s.push("bc-table--hoverable"),n&&s.push("bc-table--sticky-header"),r&&s.push("bc-table--with-striped-rows"),o&&s.push("bc-table--with-column-borders"),l&&s.push("bc-table--with-row-borders"),s.join(" ")}function Or(t){if(t!=null)return t==="none"?"--table-border-radius: 0":`--table-border-radius: var(--radius-${t})`}function La({size:t="md",hoverable:a=!1,stickyHeader:n=!1,fullWidth:r=!1,withStripedRows:o=!1,withTableBorder:l=!0,withColumnBorders:s=!1,withRowBorders:c=!0,borderRadius:u}={},...i){const p=e.computedOf(t,a,n,o,s,c)((d,f,b,g,v,C)=>Dr(d??"md",f??!1,b??!1,g??!1,v??!1,C??!0)),m=e.computedOf(n,r,l)((d,f,b)=>{const g=["bc-table-container"];return d&&g.push("bc-table-container--sticky"),f&&g.push("bc-table-container--full-width"),b&&g.push("bc-table-container--with-table-border"),g.join(" ")}),h=e.computedOf(u)(d=>Or(d));return e.html.div(e.attr.class(m),e.attr.style(h),e.html.table(e.attr.class(p),...i))}const $r=new Set(["text","compare","range","set","boolean","null","composite"]);function ft(t){return $r.has(t.kind)}function Yt(t){if(t instanceof Date)return"date";switch(typeof t){case"string":return"string";case"number":return"number";case"bigint":return"bigint";case"boolean":return"boolean";default:return"string"}}function Ft(t,a,n){if(t==null&&a==null)return 0;if(t==null)return-1;if(a==null)return 1;switch(n){case"string":return String(t).localeCompare(String(a));case"number":return t-a;case"bigint":{const r=t-a;return r<0n?-1:r>0n?1:0}case"date":return t.getTime()-a.getTime();case"boolean":return(t?1:0)-(a?1:0);default:return String(t).localeCompare(String(a))}}function Pt(t,a,n){return n==="date"&&t instanceof Date&&a instanceof Date?t.getTime()===a.getTime():t===a}function St(t,a){switch(t.kind){case"text":{const n=t.caseSensitive??!1,r=a==null?"":String(a),o=t.value,l=n?r:r.toLowerCase(),s=n?o:o.toLowerCase();switch(t.operator){case"contains":return l.includes(s);case"notContains":return!l.includes(s);case"equals":return l===s;case"notEquals":return l!==s;case"startsWith":return l.startsWith(s);case"endsWith":return l.endsWith(s)}return!1}case"compare":{if(a==null)return!1;const n=Ft(a,t.value,t.valueType);switch(t.operator){case"eq":return Pt(a,t.value,t.valueType);case"neq":return!Pt(a,t.value,t.valueType);case"gt":return n>0;case"gte":return n>=0;case"lt":return n<0;case"lte":return n<=0}return!1}case"range":{if(a==null)return!1;const n=t.exclusive??!1;if(t.min!=null){const r=Ft(a,t.min,t.valueType);if(n?r<=0:r<0)return!1}if(t.max!=null){const r=Ft(a,t.max,t.valueType);if(n?r>=0:r>0)return!1}return!0}case"set":{const n=t.values.some(r=>Pt(a,r,t.valueType));return t.mode==="include"?n:!n}case"boolean":return a===t.value;case"null":return t.operator==="isNull"?a==null:a!=null;case"composite":return(t.mode==="and"?Array.prototype.every:Array.prototype.some).call(t.filters,r=>St(r,a))}}function wt(t,a,n,r){if(t.kind==="and")return t.filters.every(l=>wt(l,a,n,r));if(t.kind==="or")return t.filters.some(l=>wt(l,a,n,r));if(t.kind==="not")return!wt(t.filter,a,n,r);const o=t;if(ft(o)){const l=n(o.column,a);return St(o,l)}return r?.evaluateFilter?r.evaluateFilter(o,a):!0}function Me(t){return t instanceof Date?t.toLocaleDateString():typeof t=="bigint"?t.toString():String(t)}const Tr={contains:"contains",notContains:"does not contain",equals:"equals",notEquals:"does not equal",startsWith:"starts with",endsWith:"ends with"},Fr={eq:"=",neq:"≠",gt:">",gte:"≥",lt:"<",lte:"≤"};function Zt(t){const a=t.column;switch(t.kind){case"text":return`${a} ${Tr[t.operator]} "${t.value}"`;case"compare":return`${a} ${Fr[t.operator]} ${Me(t.value)}`;case"range":{const n=[];return t.min!=null&&n.push(`${Me(t.min)}`),n.push(a),t.max!=null&&n.push(Me(t.max)),n.length===3?`${n[0]} ${t.exclusive?"<":"≤"} ${n[1]} ${t.exclusive?"<":"≤"} ${n[2]}`:t.min!=null?`${a} ${t.exclusive?">":"≥"} ${Me(t.min)}`:`${a} ${t.exclusive?"<":"≤"} ${Me(t.max)}`}case"set":return t.mode==="include"?`${a} in [${t.values.map(Me).join(", ")}]`:`${a} not in [${t.values.map(Me).join(", ")}]`;case"boolean":return`${a} is ${t.value}`;case"null":return t.operator==="isNull"?`${a} is null`:`${a} is not null`;case"composite":{const n=t.mode==="and"?" AND ":" OR ";return t.filters.length===0?`${a}: (empty)`:t.filters.map(r=>Zt(r)).join(n)}}}function Kt(t,a){return ft(t)?Zt(t):a?.describeFilter?a.describeFilter(t):`${t.column}: [${t.kind}]`}function Xt(t,a){const n=t.column;switch(t.kind){case"text":{const r=t.value;return{contains:a.textContains,notContains:a.textNotContains,equals:a.textEquals,notEquals:a.textNotEquals,startsWith:a.textStartsWith,endsWith:a.textEndsWith}[t.operator](n,r)}case"compare":{const r=Me(t.value);return{eq:a.compareEq,neq:a.compareNeq,gt:a.compareGt,gte:a.compareGte,lt:a.compareLt,lte:a.compareLte}[t.operator](n,r)}case"range":return t.min!=null&&t.max!=null?a.rangeBetween(n,Me(t.min),Me(t.max)):t.min!=null?a.rangeGte(n,Me(t.min)):a.rangeLte(n,Me(t.max));case"set":{const r=t.values.map(Me).join(", ");return t.mode==="include"?a.setIn(n,r):a.setNotIn(n,r)}case"boolean":return a.booleanIs(n,String(t.value));case"null":return t.operator==="isNull"?a.isNull(n):a.isNotNull(n);case"composite":{const r=t.filters.map(o=>Xt(o,a));return t.mode==="and"?a.compositeAnd(r):a.compositeOr(r)}}}function xt(t,a,n){return ft(t)?Xt(t,a):n?.describeFilter?n.describeFilter(t):`${t.column}: [${t.kind}]`}function ot(t){if(t instanceof Date)return{valueType:"date",value:t};switch(typeof t){case"number":return{valueType:"number",value:t};case"bigint":return{valueType:"bigint",value:t};case"boolean":return{valueType:"boolean",value:t};default:return{valueType:"string",value:String(t)}}}function Pr(t,a){const n=t??a;if(n==null)return{valueType:"string"};const o={valueType:Yt(n)};return t!=null&&(o.min=t),a!=null&&(o.max=a),o}function ga(t){return{valueType:t.length>0?Yt(t[0]):"string",values:t}}const De={text:(t,a,n,r)=>({kind:"text",column:t,operator:a,value:n,...r!=null?{caseSensitive:r}:{}}),contains:(t,a,n)=>De.text(t,"contains",a,n),notContains:(t,a,n)=>De.text(t,"notContains",a,n),equals:(t,a,n)=>De.text(t,"equals",a,n),notEquals:(t,a,n)=>De.text(t,"notEquals",a,n),startsWith:(t,a,n)=>De.text(t,"startsWith",a,n),endsWith:(t,a,n)=>De.text(t,"endsWith",a,n),eq:(t,a)=>({kind:"compare",column:t,operator:"eq",...ot(a)}),neq:(t,a)=>({kind:"compare",column:t,operator:"neq",...ot(a)}),gt:(t,a)=>({kind:"compare",column:t,operator:"gt",...ot(a)}),gte:(t,a)=>({kind:"compare",column:t,operator:"gte",...ot(a)}),lt:(t,a)=>({kind:"compare",column:t,operator:"lt",...ot(a)}),lte:(t,a)=>({kind:"compare",column:t,operator:"lte",...ot(a)}),between:(t,a,n,r)=>({kind:"range",column:t,...r!=null?{exclusive:r}:{},...Pr(a,n)}),oneOf:(t,a)=>({kind:"set",column:t,mode:"include",...ga(a)}),noneOf:(t,a)=>({kind:"set",column:t,mode:"exclude",...ga(a)}),isTrue:t=>({kind:"boolean",column:t,value:!0}),isFalse:t=>({kind:"boolean",column:t,value:!1}),isNull:t=>({kind:"null",column:t,operator:"isNull"}),isNotNull:t=>({kind:"null",column:t,operator:"isNotNull"}),composite:(t,a,n)=>({kind:"composite",column:t,mode:a,filters:n}),and:(...t)=>({kind:"and",filters:t}),or:(...t)=>({kind:"or",filters:t}),not:t=>({kind:"not",filter:t})};function Er(t,a){return t==null&&a==null?0:t==null?-1:a==null?1:typeof t=="string"&&typeof a=="string"?t.localeCompare(a):typeof t=="number"&&typeof a=="number"?t-a:typeof t=="boolean"&&typeof a=="boolean"?(t?1:0)-(a?1:0):t instanceof Date&&a instanceof Date?t.getTime()-a.getTime():String(t).localeCompare(String(a))}function Ar(t,a){return t[a]}function Ma(t){const{data:a,rowId:n,accessors:r={},comparators:o={},initialSort:l=[],initialFilters:s=[],pageSize:c,multiSort:u=!1,serverSide:i=!1,groupBy:p,onSortChange:m,onFilterChange:h,onPageChange:d,onSelectionChange:f,onGroupByChange:b,evaluateFilter:g}=t,v=[],C=e.prop(l),_=e.prop(s),y=e.prop(new Set),V=e.prop(1),w=e.prop(c!=null?e.Value.get(c):0);if(v.push(()=>C.dispose(),()=>_.dispose(),()=>y.dispose(),()=>V.dispose(),()=>w.dispose()),c!=null){const P=e.Value.toSignal(c),z=e.Value.on(P,Q=>{w.set(Q),V.set(1)});v.push(z),v.push(()=>P.dispose())}const S=e.prop([]);v.push(()=>S.dispose());const $=P=>r[P]??(z=>Ar(z,P)),N=P=>o[P]??Er,D=e.Value.toSignal(a);v.push(()=>D.dispose());const M=D.map(P=>P.length);v.push(()=>M.dispose());const Y=e.computedOf(D,S)((P,z)=>{if(z.length===0)return P;const Q=new Map(P.map(de=>[n(de),de])),le=[];for(const de of z){const he=Q.get(de);he!=null&&(le.push(he),Q.delete(de))}for(const de of Q.values())le.push(de);return le});v.push(()=>Y.dispose());const K=i?Y:e.computedOf(Y,_)((P,z)=>z.length===0?P:P.filter(Q=>z.every(le=>{if(ft(le)){if(le.kind==="text"&&le.value==="")return!0;const de=$(le.column);return St(le,de(Q))}return g?g(le,Q):!0})));i||v.push(()=>K.dispose());const A=K.map(P=>P.length);v.push(()=>A.dispose());const B=i?K:e.computedOf(K,C)((P,z)=>{if(z.length===0)return P;const Q=[...P];return Q.sort((le,de)=>{for(const he of z){const Ie=$(he.column),bt=N(he.column)(Ie(le),Ie(de));if(bt!==0)return he.direction==="desc"?-bt:bt}return 0}),Q});i||v.push(()=>B.dispose());const j=e.prop(p!=null?e.Value.get(p):void 0);if(v.push(()=>j.dispose()),p!=null){const P=e.Value.toSignal(p),z=e.Value.on(P,Q=>{j.set(Q)});v.push(z),v.push(()=>P.dispose())}const ae=e.computedOf(B,j)((P,z)=>{if(z==null)return[];const Q=$(z),le=new Map,de=[];for(const he of P){const Ie=String(Q(he)??"");le.has(Ie)||(le.set(Ie,[]),de.push(Ie)),le.get(Ie).push(he)}return de.map(he=>({key:he,rows:le.get(he)}))});v.push(()=>ae.dispose());const te=c!=null,q=te?e.computedOf(A,w)((P,z)=>z>0?Math.max(1,Math.ceil(P/z)):1):e.prop(1);if(v.push(()=>q.dispose()),te){const P=e.Value.on(q,z=>{V.value>z&&V.set(Math.max(1,z))});v.push(P)}const ue=i||!te?B:e.computedOf(B,V,w)((P,z,Q)=>{if(Q<=0)return P;const le=(z-1)*Q;return P.slice(le,le+Q)});!i&&te&&v.push(()=>ue.dispose());const Z=y.map(P=>P.size);v.push(()=>Z.dispose());const F=e.computedOf(y,K)((P,z)=>z.length===0?!1:z.every(Q=>P.has(n(Q))));v.push(()=>F.dispose());const I=e.computedOf(y,F)((P,z)=>P.size>0&&!z);v.push(()=>I.dispose());const E=new Map,H=new Map,ne=new Map,ge=(P,z)=>{const Q=z?.multi??e.Value.get(u),le=C.value,de=le.find(Ie=>Ie.column===P);let he;de?de.direction==="asc"?he=le.map(Ie=>Ie.column===P?{...Ie,direction:"desc"}:Ie):he=le.filter(Ie=>Ie.column!==P):he=Q?[...le,{column:P,direction:"asc"}]:[{column:P,direction:"asc"}],C.set(he),m?.(he)},be=P=>{C.set(P),m?.(P)},W=()=>{C.set([]),m?.([])},ce=P=>{let z=E.get(P);if(!z){const Q=e.untracked(()=>e.prop(C.value.find(de=>de.column===P)?.direction)),le=C.on(de=>{Q.set(de.find(he=>he.column===P)?.direction)},{noAutoDispose:!0});z=Q,E.set(P,z),v.push(()=>{le(),Q.dispose()})}return z},ve=P=>{const Q=[..._.value.filter(le=>le.column!==P.column),P];_.set(Q),V.set(1),h?.(Q)},ye=P=>{const z=[..._.value,P];_.set(z),V.set(1),h?.(z)},we=P=>{const z=_.value.filter(Q=>Q.column!==P);_.set(z),V.set(1),h?.(z)},L=()=>{_.set([]),V.set(1),h?.([])},G=P=>{let z=H.get(P);if(!z){const Q=e.untracked(()=>e.prop(_.value.filter(de=>de.column===P))),le=_.on(de=>{Q.set(de.filter(he=>he.column===P))},{noAutoDispose:!0});z=Q,H.set(P,z),v.push(()=>{le(),Q.dispose()})}return z},re=P=>{let z=ne.get(P);if(!z){const Q=e.untracked(()=>e.prop(_.value.find(he=>he.column===P&&he.kind==="text")?.value??"")),le=_.on(de=>{const he=de.find(Ie=>Ie.column===P&&Ie.kind==="text");Q.set(he?.value??"")},{noAutoDispose:!0});z=Q,ne.set(P,z),v.push(()=>{le(),Q.dispose()})}return z},x=P=>{y.set(P),f?.(P)},oe=P=>{const z=new Set(y.value);z.has(P)?z.delete(P):z.add(P),x(z)},ke=P=>{const z=new Set(y.value);for(const Q of P)z.add(Q);x(z)},Se=P=>{const z=new Set(y.value);for(const Q of P)z.delete(Q);x(z)},O=()=>{const P=K.value.map(z=>n(z));x(new Set(P))},U=()=>{x(new Set)};return{rows:ue,totalRows:M,totalFilteredRows:A,sort:C,toggleSort:ge,setSort:be,getSortDirection:ce,resetSort:W,filters:_,setFilter:ve,addFilter:ye,removeFilter:we,getColumnFilters:G,getTextFilterValue:re,resetFilters:L,selected:y,toggleSelect:oe,select:ke,deselect:Se,selectAll:O,deselectAll:U,isAllSelected:F,isSomeSelected:I,selectedCount:Z,currentPage:V,totalPages:q,pageSize:w,setPage:P=>{const z=Math.max(1,Math.min(P,q.value));V.set(z),d?.(z)},setPageSize:P=>{w.set(P),V.set(1),d?.(1)},groupBy:j,setGroupBy:P=>{j.set(P),b?.(P)},groups:ae,allFilteredRows:B,moveRow:(P,z)=>{if(P===z||C.value.length>0)return;const Q=D.value,le=S.value.length>0?[...S.value]:Q.map(Ie=>n(Ie)),de=le.indexOf(P),he=le.indexOf(z);de<0||he<0||(le.splice(de,1),le.splice(he,0,P),S.set(le))},resetAll:()=>{W(),L(),U(),V.set(1),S.set([]),j.set(void 0)},dispose:()=>{for(const P of v)P();v.length=0,E.clear(),H.clear(),ne.clear()}}}function Na(t,a,n){const r=[],o=Math.max(1,t-n),l=Math.min(a,t+n);o>1&&(r.push(1),o>2&&r.push("dots"));for(let s=o;s<=l;s++)r.push(s);return l<a&&(l<a-1&&r.push("dots"),r.push(a)),r}function Wa(t,a){const n=new Map;switch(t){case"filled":case"pill":{const l=k.backgroundValue(a,"solid","light"),s=k.backgroundValue(a,"solid","dark");n.set("--pagination-active-bg",l.backgroundColor),n.set("--pagination-active-text",l.textColor),n.set("--pagination-active-bg-dark",s.backgroundColor),n.set("--pagination-active-text-dark",s.textColor);break}case"outline":{n.set("--pagination-active-bg","transparent"),n.set("--pagination-active-text",k.textColorValue(a,"light")),n.set("--pagination-active-border",k.borderColorValue(a,"light")),n.set("--pagination-active-bg-dark","transparent"),n.set("--pagination-active-text-dark",k.textColorValue(a,"dark")),n.set("--pagination-active-border-dark",k.borderColorValue(a,"dark")),n.set("--pagination-item-border",me.getColorVar("base",300)),n.set("--pagination-item-border-dark",me.getColorVar("base",600));break}case"light":{const l=k.backgroundValue(a,"light","light"),s=k.backgroundValue(a,"light","dark");n.set("--pagination-active-bg",l.backgroundColor),n.set("--pagination-active-text",k.textColorValue(a,"light")),n.set("--pagination-active-bg-dark",s.backgroundColor),n.set("--pagination-active-text-dark",k.textColorValue(a,"dark")),n.set("--pagination-item-bg",me.getColorVar("base",100)),n.set("--pagination-item-bg-dark",me.getColorVar("base",800));break}case"subtle":{n.set("--pagination-active-bg","transparent"),n.set("--pagination-active-text",k.textColorValue(a,"light")),n.set("--pagination-active-bg-dark","transparent"),n.set("--pagination-active-text-dark",k.textColorValue(a,"dark"));break}}const r=me.getColorVar("base",100),o=me.getColorVar("base",700);return n.set("--pagination-hover-bg",r),n.set("--pagination-hover-bg-dark",o),Array.from(n.entries()).map(([l,s])=>`${l}: ${s}`).join("; ")}function Ua({currentPage:t,totalPages:a,onChange:n,siblings:r=1,showPrevNext:o=!0,showFirstLast:l=!1,size:s="md",variant:c="filled",color:u="primary",justify:i=!1,responsive:p=!1}){const m=e.Value.deriveProp(r),h=e.computedOf(p,m,r)((d,f,b)=>d?f:b);return e.Use(k.BeatUII18n,d=>e.html.nav(e.attr.class(e.computedOf(s,c,i)((f,b,g)=>{const v=["bc-pagination",`bc-pagination--size-${f}`,`bc-pagination--variant-${b}`];return g&&v.push("bc-pagination--justify"),v.join(" ")})),e.attr.style(e.computedOf(c,u)((f,b)=>Wa(f,b))),e.aria.label(d.$.paginationLabel),e.When(p,()=>e.WithElement(f=>{const b=()=>{const v=f.clientWidth;if(v===0)return;const C=f.querySelector(".bc-pagination__item");if(!C)return;const _=C.offsetWidth,y=parseFloat(getComputedStyle(f).gap)||0,V=_+y,w=Math.floor((v+y)/V),S=(e.Value.get(o)?2:0)+(e.Value.get(l)?2:0),$=e.Value.get(a),N=w-S,D=Math.max(0,Math.floor((N-5)/2)),M=Math.floor(($-3)/2);m.set(Math.min(D,Math.max(0,M)))},g=new ResizeObserver(b);return g.observe(f),Ne.delayedAnimationFrame(b),e.OnDispose(()=>g.disconnect())})),e.When(l,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((f,b)=>f<=1||b<=1)),e.aria.label(d.$.firstPage),e.on.click(f=>{f.preventDefault(),e.Value.get(a)>1&&n(1)}),"«")),e.When(o,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((f,b)=>f<=1||b<=1)),e.aria.label(d.$.previousPage),e.on.click(f=>{f.preventDefault();const b=e.Value.get(t);b>1&&n(b-1)}),"‹")),e.ForEach(e.computedOf(t,a,h)((f,b,g)=>Na(f,b,g)),f=>{const b=f.map(v=>v==="dots"),g=e.computedOf(f,t)((v,C)=>v===C);return e.When(b,()=>e.html.span(e.attr.class("bc-pagination__dots"),"…"),()=>e.html.button(e.attr.class(e.Value.map(g,v=>v?"bc-pagination__item bc-pagination__item--active":"bc-pagination__item")),e.WithElement(v=>{e.Value.on(g,C=>{C?v.setAttribute("aria-current","page"):v.removeAttribute("aria-current")})}),e.on.click(v=>{v.preventDefault();const C=e.Value.get(f);C!=="dots"&&C!==e.Value.get(t)&&n(C)}),f.map(v=>String(v))))}),e.When(o,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((f,b)=>f>=b||b<=1)),e.aria.label(d.$.nextPage),e.on.click(f=>{f.preventDefault();const b=e.Value.get(t),g=e.Value.get(a);b<g&&n(b+1)}),"›")),e.When(l,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((f,b)=>f>=b||b<=1)),e.aria.label(d.$.lastPage),e.on.click(f=>{f.preventDefault();const b=e.Value.get(a);b>1&&n(b)}),"»"))))}function Ra({dataSource:t,showSort:a=!0,showFilters:n=!0,showSelection:r=!0,bulkActions:o=[],resetLabel:l,describeFilter:s}){const c=e.computedOf(t.sort,t.filters,t.selectedCount)((h,d,f)=>h.length>0||d.length>0||f>0),u=e.Value.toSignal(r),i=e.computedOf(u,t.selectedCount)((h,d)=>h&&d>0),p=s?{describeFilter:s}:void 0;function m(h,d){return d?xt(h,d,p):Kt(h,p)}return e.Fragment(e.OnDispose(()=>{c.dispose(),u.dispose(),i.dispose()}),e.Use(k.BeatUII18n,h=>e.When(c,()=>e.html.div(e.attr.class("bc-data-toolbar"),e.When(a,()=>e.ForEach(t.sort,d=>nt({variant:"light",color:"green",size:"sm",onClose:()=>{const f=d.value,b=t.sort.value.filter(g=>g.column!==f.column);t.setSort(b)}},d.map(f=>`${f.column} ${f.direction==="asc"?"↑":"↓"}`)))),e.When(n,()=>e.ForEach(t.filters,d=>nt({variant:"light",color:"violet",size:"sm",onClose:()=>{t.removeFilter(d.value.column)}},d.map(f=>m(f,h.value.dataTable.describeFilter))))),e.When(i,()=>e.html.div(e.attr.class("bc-data-toolbar__selection"),e.html.span(e.attr.class("bc-data-toolbar__selection-count"),t.selectedCount.map(d=>h.value.dataTable.selectedCount(d))),...o.map(d=>e.html.button(e.attr.class("bc-data-toolbar__action"),e.on.click(()=>d.onClick(t.selected.value)),d.icon!=null?k.Icon({icon:d.icon,size:"sm"}):null,d.label)),e.html.button(e.attr.class("bc-data-toolbar__action bc-data-toolbar__action--secondary"),e.on.click(()=>t.deselectAll()),h.$.dataTable.map(d=>d.deselectAll)))),e.html.button(e.attr.class("bc-data-toolbar__reset"),e.on.click(()=>t.resetAll()),k.Icon({icon:"line-md:close-small",size:"sm"}),l??h.$.dataTable.map(d=>d.resetAll))))))}const Le={value:(t,a,{disabled:n,before:r,after:o}={})=>({type:"value",value:t,label:a,disabled:n,before:r,after:o}),group:(t,a,{disabled:n,before:r,after:o}={})=>({type:"group",group:t,options:a,disabled:n,before:r,after:o}),break:{type:"break"},getValues:t=>t.flatMap(a=>a.type==="group"?Le.getValues(a.options):a.type==="break"?[]:[a.value]),contains:(t,a,n=(r,o)=>r===o)=>Le.getValues(t).some(r=>n(r,a))};function Jt(t,a,n){return t.some(o=>n(o,a))?t.filter(o=>!n(o,a)):[...t,a]}function Qt(t,a,n){return t.filter(r=>!n(r,a))}function Vt(t,a,n){return t.some(r=>n(r,a))}function za(t,a,n){for(const r of t)if(r.type==="value"){if(n(r.value,a))return{label:r.label}}else if(r.type==="group"){const o=za(r.options,a,n);if(o!=null)return o}}function Ha(t,a,n){return za(t,a,n)?.label??String(a)}function ea(t,a,n){const r=a.trim().toLowerCase(),o=n??((s,c)=>c.label.toLowerCase().includes(s));if(r==="")return t;const l=[];for(const s of t)if(s.type==="value")o(r,{label:s.label})&&l.push(s);else if(s.type==="group"){const c=ea(s.options,r,o);c.length>0&&l.push({...s,options:c})}return l}function It(t){const{value:a,options:n,equality:r=(F,I)=>F===I,placeholder:o,searchPlaceholder:l,filter:s,loadOptions:c,loadDebounce:u=300,maxSelection:i,showActions:p=!1,selectAllLabel:m,clearAllLabel:h,renderOption:d}=t,f=e.prop(!1),b=e.prop(""),g=e.prop(-1),v=e.prop(!1),C=e.prop(null),_=Fe.sessionId("multi-select"),y=Fe.sessionId("multi-select-listbox");let V,w,S,$;const N=e.computedOf(n,C,b)((F,I,E)=>c&&I!=null?I:ea(F,E,s)),D=N.map(F=>Le.getValues(F));f.onChange(F=>{F||(g.set(-1),b.set(""),C.set(null))});const M=F=>{const I=e.Value.get(a);t.onChange?.(Qt(I,F,r))},Y=F=>{const I=e.Value.get(a),E=e.Value.get(i);E!=null&&!Vt(I,F,r)&&I.length>=E||t.onChange?.(Jt(I,F,r))},K=()=>{const F=e.Value.get(i),I=D.value,E=F!=null?I.slice(0,F):I;t.onChange?.(E)},A=()=>{t.onChange?.([])},B=F=>e.computedOf(a)(I=>Vt(I,F,r)),j=F=>{b.set(F),c&&($!=null&&clearTimeout($),$=setTimeout(()=>{v.set(!0),c(F).then(I=>{C.set(I)}).finally(()=>{v.set(!1)})},u))},ae=F=>{const I=D.value;switch(F.key){case"ArrowDown":{F.preventDefault(),f.value?g.set(Math.min(g.value+1,I.length-1)):(f.set(!0),I.length>0&&g.set(0),setTimeout(()=>{requestAnimationFrame(()=>w?.focus())},0));break}case"ArrowUp":{F.preventDefault(),f.value&&g.set(Math.max(g.value-1,0));break}case"Enter":{if(F.preventDefault(),f.value&&g.value>=0){const E=I[g.value];E!=null&&Y(E)}else f.value||(f.set(!0),I.length>0&&g.set(0),setTimeout(()=>{requestAnimationFrame(()=>w?.focus())},0));break}case"Escape":{f.value&&(F.preventDefault(),f.set(!1),V?.focus());break}case"Backspace":{if(b.value===""){const E=e.Value.get(a);E.length>0&&t.onChange?.(E.slice(0,-1))}break}case" ":{document.activeElement!==w&&(F.preventDefault(),f.set(!f.value),f.value&&setTimeout(()=>{requestAnimationFrame(()=>w?.focus())},0));break}}},te=e.computedOf(g,D)((F,I)=>I[F]??null),q=(F,I)=>{const E=B(F.value),H=e.computedOf(a,i)((be,W)=>W!=null&&be.length>=W),ne=e.computedOf(E,H)((be,W)=>F.disabled===!0||!be&&W),ge=te.map(be=>be!=null?r(be,F.value):!1);return d?e.html.div(e.attr.role("option"),e.attr.id(`multi-select-option-${String(F.value)}`),e.aria.selected(E),e.aria.disabled(ne),e.attr.class(e.computedOf(ge,E)((be,W)=>{const ce=["bc-multi-select__option"];return be&&ce.push("bc-multi-select__option--focused"),W&&ce.push("bc-multi-select__option--selected"),I>0&&ce.push("bc-multi-select__option--grouped"),ce.join(" ")})),e.on.click(()=>Y(F.value)),d(F,E)):e.html.div(e.attr.role("option"),e.attr.id(`multi-select-option-${String(F.value)}`),e.aria.selected(E),e.aria.disabled(ne),e.attr.class(e.computedOf(ge,E)((be,W)=>{const ce=["bc-multi-select__option"];return be&&ce.push("bc-multi-select__option--focused"),W&&ce.push("bc-multi-select__option--selected"),I>0&&ce.push("bc-multi-select__option--grouped"),ce.join(" ")})),e.on.click(()=>Y(F.value)),e.html.span(e.attr.class("bc-multi-select__option-check"),e.When(E,()=>k.Icon({icon:"ph:check-bold",size:"xs",color:"primary"}))),e.html.span(e.attr.class("bc-multi-select__option-label"),F.label))},ue=F=>e.Ensure(F,I=>e.OneOfType(I,{value:E=>q({value:E.value.value,label:E.value.label,disabled:E.value.disabled},0),group:E=>e.html.div(e.attr.class("bc-multi-select__group"),e.html.div(e.attr.class("bc-multi-select__group-label"),E.$.group),e.ForEach(E.$.options,H=>e.Ensure(H,ne=>e.OneOfType(ne,{value:ge=>q({value:ge.value.value,label:ge.value.label,disabled:ge.value.disabled},1),group:()=>e.Empty,break:()=>e.html.div(e.attr.class("bc-multi-select__separator"))})))),break:()=>e.html.div(e.attr.class("bc-multi-select__separator"))})),Z=e.NotEmpty(a,()=>e.ForEach(a,F=>nt({variant:"light",size:t.size,onClose:()=>M(F.value),disabled:t.disabled},e.computedOf(F,n)((I,E)=>Ha(E,I,r)))),()=>e.html.span(e.attr.class("bc-multi-select__placeholder"),o));return se.InputContainer({...t,input:e.html.div(e.attr.class("bc-multi-select__badge-container"),Z),after:e.Fragment(se.InputIcon({icon:"ph:caret-up-down-bold",color:"neutral",size:"sm"}),t.after)},$e.ElementRect(F=>e.Fragment(e.WithElement(I=>{V=I;const E=()=>{f.value?f.set(!1):(f.set(!0),D.value.length>0&&g.set(0),setTimeout(()=>{requestAnimationFrame(()=>w?.focus())},0))};return I.addEventListener("keydown",ae),I.addEventListener("click",E),e.OnDispose(()=>{I.removeEventListener("keydown",ae),I.removeEventListener("click",E),$!=null&&clearTimeout($)})}),Ee.CommonInputAttributes(t),e.attr.id(_),e.attr.tabindex(0),e.aria.controls(y),e.aria.expanded(f),e.attr.class("bc-multi-select"),e.attr.role("combobox"),e.aria.activedescendant(e.computedOf(f,te)((I,E)=>I&&E!=null?`multi-select-option-${String(E)}`:"")),t.onBlur!=null?e.on.blur(()=>{requestAnimationFrame(()=>{!S?.contains(document.activeElement)&&!V?.contains(document.activeElement)&&(f.set(!1),t.onBlur())})}):e.Empty,Ve.Flyout({content:()=>e.html.div(e.WithElement(I=>{S=I}),e.style.minWidth(F.$.width.map(I=>`${I-10}px`)),e.attr.class("bc-multi-select__dropdown"),e.html.input(e.WithElement(I=>{w=I}),e.attr.type("text"),e.attr.class("bc-multi-select__search"),e.attr.placeholder(e.computedOf(l,o)((I,E)=>I??E??"Search...")),e.attr.value(b),e.on.input(I=>{const E=I.target;j(E.value)}),e.on.keydown(I=>{(I.key==="ArrowUp"||I.key==="ArrowDown"||I.key==="Enter"||I.key==="Escape"||I.key==="Backspace"&&b.value==="")&&ae(I)})),e.When(p,()=>e.html.div(e.attr.class("bc-multi-select__actions"),e.html.button(e.attr.type("button"),e.attr.class("bc-multi-select__action"),e.on.click(I=>{I.stopPropagation(),K()}),m??"Select all"),e.html.span(e.attr.class("bc-multi-select__action-sep"),"|"),e.html.button(e.attr.type("button"),e.attr.class("bc-multi-select__action"),e.on.click(I=>{I.stopPropagation(),A()}),h??"Clear all"))),e.When(v,()=>e.html.div(e.attr.class("bc-multi-select__loading"),e.Use(k.BeatUII18n,I=>I.$.loadingShort))),e.html.div(e.attr.role("listbox"),e.attr.id(y),e.aria.labelledby(_),e.WithElement(I=>{I.setAttribute("aria-multiselectable","true")}),e.attr.class("bc-multi-select__listbox"),e.When(e.computedOf(N,v)((I,E)=>!E&&I.length===0),()=>e.html.div(e.attr.class("bc-multi-select__empty"),e.Use(k.BeatUII18n,I=>I.$.noResults))),e.ForEach(N,ue)),e.When(e.computedOf(a)(I=>I.length>0),()=>e.html.div(e.attr.class("bc-multi-select__footer"),e.computedOf(a,i)((I,E)=>E!=null?`${I.length} / ${E} selected`:`${I.length} selected`)))),mainAxisOffset:0,placement:"bottom-start",hasPopup:"listbox",open:f,showOn:"never",showDelay:0,hideDelay:0,closable:!0}))))}function Br(t){return ee.BaseControl(It,t)}function Lr(t){return ee.Control(It,t)}function ba(t){for(const a of t)if(a.kind==="set"&&a.mode==="include")return a.values.map(String);return[]}function at(t){const{dataSource:a,column:n,size:r="sm"}=t;if(t.type==="tags"){const{options:p,placeholder:m}=t,h=a.getColumnFilters(n),d=e.prop(ba(h.value)),f=h.on(g=>{d.set(ba(g))}),b=p.map(g=>Le.value(g.value,g.label));return e.Fragment(e.OnDispose(()=>{f(),d.dispose()}),e.Use(k.BeatUII18n,g=>It({value:d,options:b,size:r,placeholder:m??g.$.dataTable.map(v=>v.filterTagsPlaceholder),showActions:!0,onChange:v=>{d.set(v),v.length===0?a.removeFilter(n):a.setFilter(De.oneOf(n,v))}})))}if(t.type==="select"){const{options:p,allLabel:m}=t,d=a.getColumnFilters(n).map(f=>f.find(g=>g.kind==="text")?.value??"");return e.Use(k.BeatUII18n,f=>{const b=m??f.value.dataTable.selectAll,g=[Le.value("",b),...p.map(v=>Le.value(v.value,v.label))];return J.NativeSelect({value:d,options:g,size:r,class:"bc-column-filter",onChange:v=>{v===""?a.removeFilter(n):a.setFilter(De.equals(n,v))}})})}const o=a.getTextFilterValue(n),{placeholder:l,operator:s="contains",debounce:c=300}=t;let u;const i=o.map(p=>p===""?null:p);return e.Fragment(e.OnDispose(()=>{u!=null&&clearTimeout(u),i.dispose()}),e.Use(k.BeatUII18n,p=>Ee.TextInput({value:o,size:r,class:"bc-column-filter",placeholder:l??p.$.dataTable.map(m=>m.filterPlaceholder),onInput:m=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{m===""?a.removeFilter(n):a.setFilter(De.text(n,s,m))},c)},after:J.NullableResetAfter(i,void 0,()=>{u!=null&&clearTimeout(u),a.removeFilter(n)})})))}function Mr(t){const a={up:"M0 16 L8 10 L16 16 Z",down:"M0 0 L8 6 L16 0 Z",left:"M16 0 L10 8 L16 16 Z",right:"M0 0 L6 8 L0 16 Z"};return e.svg.svg(e.svgAttr.viewBox("0 0 16 16"),e.svg.path(e.svgAttr.d(t.map(n=>a[n]))))}function dt(t){const{content:a,placement:n="top",showDelay:r=250,hideDelay:o=500,mainAxisOffset:l=8,crossAxisOffset:s=0,showOn:c="hover-focus"}=t,u=Fe.sessionId("tooltip");return e.Fragment(e.aria.describedby(u),Ve.Flyout({content:()=>e.Fragment(e.attr.class("bc-tooltip"),e.attr.role("tooltip"),e.attr.id(u),a),placement:n,showDelay:r,hideDelay:o,mainAxisOffset:l,crossAxisOffset:s,showOn:c,closable:!0,role:"tooltip",arrow:i=>{const p=i.map(({placement:m})=>m.includes("top")?"down":m.includes("bottom")?"up":m.includes("left")?"right":m.includes("right")?"left":"up");return e.Fragment(e.attr.class("bc-tooltip__arrow"),e.attr.class(p.map(m=>`bc-tooltip__arrow-${m}`)),e.style.transform(i.map(({x:m,y:h})=>m==null&&h==null?"":m!=null?`translate(${m}px, 0)`:`translate(0, ${h}px)`)),Mr(p))}}))}function gt({open:t},...a){return e.WithElement(n=>{const{status:r,setOpen:o,dispose:l}=Ue.useAnimatedElementToggle({initialStatus:e.Value.get(t)?"opened":"closed",element:n});return e.Value.on(t,o),$e.ElementRect(s=>{const c=e.prop(null);return e.computedOf(r,s.$.height)((i,p)=>i==="opened"&&p>0?p:null).on(i=>{i!=null&&c.set(i)}),r.on(i=>{if(n&&i==="start-opening"){const p=n.style.height,m=n.style.transition;n.style.transition="none",n.style.height="auto",n.offsetHeight;const h=n.scrollHeight;h>0&&c.set(h),n.style.height=p,n.style.transition=m,n.offsetHeight}}),e.Fragment(e.OnDispose(l),e.attr.style(c.map(i=>`--collapse-height: ${i!=null?`${i}px`:"auto"}`)),e.attr.class(r.map(i=>`bc-collapse bc-collapse--${i}`)),...a)})})}function Nr(t,a){return["bc-accordion",`bc-accordion--size-${t}`,`bc-accordion--${a}`].join(" ")}function Wr({items:t,multiple:a=!1,size:n="md",variant:r="default"}){const o=Fe.sessionId("accordion"),l=new Map;for(const c of t)l.set(c.key,e.prop(c.defaultOpen??!1));const s=c=>{const u=l.get(c);if(u!=null){if(!e.Value.get(a))for(const[i,p]of l)i!==c&&p.set(!1);u.update(i=>!i)}};return e.html.div(e.attr.class(e.computedOf(n,r)(Nr)),e.attr.role("presentation"),...t.map((c,u)=>{const i=l.get(c.key),p=`${o}-header-${u}`,m=`${o}-panel-${u}`;return e.html.div(e.attr.class("bc-accordion__item"),e.attr.class(i.map(h=>h?"bc-accordion__item--open":"bc-accordion__item--closed")),c.disabled?e.attr.class("bc-accordion__item--disabled"):e.Empty,e.html.button(e.attr.type("button"),e.attr.class("bc-accordion__header"),e.attr.id(p),e.aria.expanded(i),e.aria.controls(m),e.attr.disabled(c.disabled??!1),e.on.click(h=>{h.preventDefault(),c.disabled||s(c.key)}),e.html.span(e.attr.class("bc-accordion__header-content"),c.header),e.html.span(e.attr.class("bc-accordion__chevron"),e.attr.class(i.map(h=>h?"bc-accordion__chevron--open":"bc-accordion__chevron--closed")),e.html.span(e.attr.class("bc-accordion__chevron-icon")))),e.html.div(e.attr.id(m),e.attr.role("region"),e.aria.labelledby(p),e.html.div(gt({open:i},e.html.div(e.attr.class("bc-accordion__body"),c.body)))))}))}function Ur(t,a,n,r){const o=["bc-action-card"];return t&&o.push("bc-action-card--active"),a&&o.push("bc-action-card--disabled"),n!=="md"&&o.push(`bc-action-card--${n}`),r&&!a&&o.push("bc-action-card--clickable"),o.join(" ")}function Rr(t,a,n,r){const o=new Map;if(t!=null&&o.set("--action-card-bg",t),a!=null&&o.set("--action-card-border",a),n!=null&&o.set("--action-card-title-color",n),r!=null&&o.set("--action-card-description-color",r),o.size!==0)return Array.from(o.entries()).map(([l,s])=>`${l}: ${s}`).join("; ")}function zr({icon:t,title:a,description:n,active:r=!1,disabled:o=!1,onClick:l,size:s="md",iconColor:c="primary",iconSize:u="md",backgroundColor:i,borderColor:p,titleColor:m,descriptionColor:h}){const d=l!=null;return e.html.div(e.attr.class(e.computedOf(r,o,s)((f,b,g)=>Ur(f??!1,b??!1,g??"md",d))),e.attr.style(e.computedOf(i,p,m,h)((f,b,g,v)=>Rr(f,b,g,v))),e.When(d,()=>e.Fragment(e.Unless(o,()=>e.Fragment(e.on.click(()=>l?.()),e.attr.tabindex(0))),e.attr.role("button"))),e.aria.disabled(o),e.html.div(e.attr.class("bc-action-card__icon"),k.Icon({icon:t,size:u,color:c})),e.html.div(e.attr.class("bc-action-card__content"),e.html.div(e.attr.class("bc-action-card__title"),a),e.html.div(e.attr.class("bc-action-card__description"),n)))}const Hr=["!=","<=",">=","<",">","="];function jr(t){for(const a of Hr)if(typeof t=="string"&&t.startsWith(a))return[a,t.slice(a.length)];return["=",t]}function ja(t,a,n){const[r,o]=jr(a),l=t.findIndex(u=>u[1]===o);if(l===-1)throw new Error(`Breakpoint ${String(o)} not found`);const s=t[l][0],c=l<t.length-1?t[l+1][0]:1/0;switch(r){case"=":return n>=s&&n<c;case"!=":return!(n>=s&&n<c);case"<=":return n<=s;case">=":return n>=s;case"<":return n<s;case">":return n>s;default:return!1}}function qr(t,a){const n=t.findIndex(r=>r[0]>a);return n===-1?t[t.length-1][1]:n===0?t[0][1]:t[n-1][1]}function ta(t,{breakpoints:a,mode:n="viewport"}){const o=[...Object.entries(a).map(([s,c])=>[c,s])].sort((s,c)=>s[0]-c[0]),l=s=>{const c=s.map(({width:i})=>{const p=o.findIndex(m=>m[0]>i);return p===-1?{width:i,breakpoint:o[o.length-1][1]}:p===0?{width:i,breakpoint:o[0][1]}:{width:i,breakpoint:o[p-1][1]}});return t({value:c,breakpoints:a,asList:o,is:(i,p)=>ja(o,i,p)})};return n==="element"?$e.ElementRect(l):$e.WindowSize(l)}let Et=NaN;function Gr(t,a){return t?(isNaN(Et)&&(Et=parseFloat(getComputedStyle(document.documentElement).fontSize)),parseFloat(t)*Et):a}function Te(t,a,n){return Gr(t.getPropertyValue(a),n)}function qa(t){return e.WithElement(a=>{const n=getComputedStyle(a),r={zero:0,xs:Te(n,"--breakpoint-xs",640),sm:Te(n,"--breakpoint-sm",768),md:Te(n,"--breakpoint-md",1024),lg:Te(n,"--breakpoint-lg",1280),xl:Te(n,"--breakpoint-xl",1536)};return ta(t,{breakpoints:r})})}function Yr(t){return e.WithElement(a=>{const n=getComputedStyle(a),r={zero:0,"3xs":Te(n,"--container-3xs",256),"2xs":Te(n,"--container-2xs",288),xs:Te(n,"--container-xs",320),sm:Te(n,"--container-sm",384),md:Te(n,"--container-md",448),lg:Te(n,"--container-lg",512),xl:Te(n,"--container-xl",640),"2xl":Te(n,"--container-2xl",768),"3xl":Te(n,"--container-3xl",1024),"4xl":Te(n,"--container-4xl",1280),"5xl":Te(n,"--container-5xl",1536),"6xl":Te(n,"--container-6xl",2048)};return ta(t,{breakpoints:r,mode:"element"})})}function Zr(t,a,n,r){const o=["bc-toggle-button",`bc-toggle-button--size-${t}`,`bc-control--padding-${t}`,`bc-control--rounded-${a}`];return n&&o.push("bc-toggle-button--full-width"),r&&o.push("bc-toggle-button--pressed"),o.join(" ")}function Kr(t,a,n,r){const o=new Map;o.set("--toggle-text-shadow","var(--text-shadow-none)"),o.set("--toggle-text-shadow-dark","var(--text-shadow-none)");const l=(s,c,u,i)=>{r||(o.set("--toggle-bg-hover",s),o.set("--toggle-text-hover",u),o.set("--toggle-bg-hover-dark",c),o.set("--toggle-text-hover-dark",i))};if(n){const s=k.backgroundValue(a,"solid","light"),c=k.backgroundValue(a,"solid","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",s.textColor),o.set("--toggle-bg-dark",c.backgroundColor),o.set("--toggle-text-dark",c.textColor),o.set("--toggle-border",s.backgroundColor),o.set("--toggle-border-dark",c.backgroundColor),o.set("--toggle-text-shadow","var(--text-shadow-button-filled, var(--text-shadow-sm))"),o.set("--toggle-text-shadow-dark","var(--text-shadow-button-filled, var(--text-shadow-sm))");const u=k.hoverBackgroundValue(a,"solid","light"),i=k.hoverBackgroundValue(a,"solid","dark");l(u.backgroundColor,i.backgroundColor,u.textColor,i.textColor)}else switch(t){case"outline":case"dashed":{o.set("--toggle-bg","transparent"),o.set("--toggle-bg-dark","transparent"),o.set("--toggle-border",k.borderColorValue(a,"light")),o.set("--toggle-border-dark",k.borderColorValue(a,"dark")),o.set("--toggle-text",k.textColorValue(a,"light")),o.set("--toggle-text-dark",k.textColorValue(a,"dark")),t==="dashed"&&o.set("--toggle-border-style","dashed");const s=k.hoverBackgroundValue(a,"light","light"),c=k.hoverBackgroundValue(a,"light","dark");l(s.backgroundColor,c.backgroundColor,s.textColor,c.textColor);break}case"light":{const s=k.backgroundValue(a,"light","light"),c=k.backgroundValue(a,"light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",s.textColor),o.set("--toggle-bg-dark",c.backgroundColor),o.set("--toggle-text-dark",c.textColor);const u=k.hoverBackgroundValue(a,"light","light"),i=k.hoverBackgroundValue(a,"light","dark");l(u.backgroundColor,i.backgroundColor,u.textColor,i.textColor);break}case"filled":{const s=k.backgroundValue("neutral","light","light"),c=k.backgroundValue("neutral","light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",k.textColorValue(a,"light")),o.set("--toggle-bg-dark",c.backgroundColor),o.set("--toggle-text-dark",k.textColorValue(a,"dark"));const u=k.hoverBackgroundValue("base","light","light"),i=k.hoverBackgroundValue("base","light","dark");l(u.backgroundColor,i.backgroundColor,o.get("--toggle-text")??s.textColor,o.get("--toggle-text-dark")??c.textColor);break}case"default":{const s=k.backgroundValue("neutral","light","light"),c=k.backgroundValue("neutral","light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",k.textColorValue(a,"light")),o.set("--toggle-bg-dark",c.backgroundColor),o.set("--toggle-text-dark",k.textColorValue(a,"dark")),o.set("--toggle-border",me.getColorVar("neutral",300)),o.set("--toggle-border-dark",me.getColorVar("neutral",700));const u=k.hoverBackgroundValue("base","light","light"),i=k.hoverBackgroundValue("base","light","dark");l(u.backgroundColor,i.backgroundColor,o.get("--toggle-text")??s.textColor,o.get("--toggle-text-dark")??c.textColor);break}case"subtle":{o.set("--toggle-bg","transparent"),o.set("--toggle-bg-dark","transparent"),o.set("--toggle-text",k.textColorValue(a,"light")),o.set("--toggle-text-dark",k.textColorValue(a,"dark"));const s=k.hoverBackgroundValue(a,"light","light"),c=k.hoverBackgroundValue(a,"light","dark");l(s.backgroundColor,c.backgroundColor,s.textColor,c.textColor);break}default:{const s=k.backgroundValue("neutral","light","light"),c=k.backgroundValue("neutral","light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",k.textColorValue(a,"light")),o.set("--toggle-bg-dark",c.backgroundColor),o.set("--toggle-text-dark",k.textColorValue(a,"dark"));const u=k.hoverBackgroundValue("base","light","light"),i=k.hoverBackgroundValue("base","light","dark");l(u.backgroundColor,i.backgroundColor,o.get("--toggle-text")??s.textColor,o.get("--toggle-text-dark")??c.textColor);break}}return Array.from(o.entries()).map(([s,c])=>`${s}: ${c}`).join("; ")}function Ga({pressed:t,onChange:a,disabled:n=!1,variant:r="outline",size:o="md",color:l="primary",roundedness:s="sm",fullWidth:c=!1},...u){return e.html.button(e.attr.type("button"),e.attr.disabled(n),e.aria.pressed(t),e.attr.class(e.computedOf(o,s,c,t)(Zr)),e.attr.style(e.computedOf(r,l,t,n)(Kr)),e.on.click(i=>{i.preventDefault(),i.stopPropagation(),e.Value.get(n)||a?.(!e.Value.get(t))}),...u)}function Xr(t,a){return["bc-toggle-button-group",`bc-toggle-button-group--${t}`,`bc-toggle-button-group--rounded-${a}`].join(" ")}function Jr({items:t,value:a,onChange:n,multiple:r=!1,disabled:o=!1,variant:l="outline",size:s="md",color:c="primary",roundedness:u="sm",orientation:i="horizontal"}){const p=(m,h)=>{const d=e.Value.get(a),f=e.Value.get(r);let b;f?b=h?[...d,m]:d.filter(g=>g!==m):b=h?[m]:[],n?.(b)};return e.html.div(e.attr.role("group"),e.attr.class(e.computedOf(i,u)(Xr)),e.aria.orientation(i),...t.map(m=>{const h=e.Value.map(a,f=>f.includes(m.key)),d=m.disabled?e.Value.map(o,f=>f||m.disabled):o;return Ga({pressed:h,onChange:f=>p(m.key,f),disabled:d,variant:l,size:s,color:c,roundedness:"none",fullWidth:!1},m.label)}))}function je(t,a){return`bc-panel ${(Array.isArray(t)?t:[t]).map(r=>`bc-panel--side-${r}`).join(" ")} bc-panel--shadow-${a}`}function et(t){const a=e.Value.toSignal(t).map(r=>k.backgroundValue(r,"lighter","light")),n=e.Value.toSignal(t).map(r=>k.backgroundValue(r,"lighter","dark"));return e.Fragment(e.style.variable("--panel-bg",a.$.backgroundColor),e.style.variable("--panel-text",a.$.textColor),e.style.variable("--panel-bg-dark",n.$.backgroundColor),e.style.variable("--panel-text-dark",n.$.textColor))}const Ze={banner:{zero:32,xs:32,sm:32,md:32,lg:32,xl:32},header:{zero:60,xs:60,sm:60,md:60,lg:60,xl:60},mainHeader:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},mainFooter:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},footer:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},menu:{zero:300,xs:300,sm:300,md:300,lg:300,xl:300},aside:{zero:280,xs:280,sm:280,md:280,lg:280,xl:280}};function va(t,a){if(typeof t=="number")return{zero:t,xs:t,sm:t,md:t,lg:t,xl:t};const n={zero:t.zero??a.zero,xs:t.xs??a.xs,sm:t.sm??a.sm,md:t.md??a.md,lg:t.lg??a.lg,xl:t.xl??a.xl};return n.xs<n.zero&&(n.xs=n.zero),n.sm<n.xs&&(n.sm=n.xs),n.md<n.sm&&(n.md=n.sm),n.lg<n.md&&(n.lg=n.md),n.xl<n.lg&&(n.xl=n.lg),n}function At(t){t=t.filter(a=>a.some(n=>n!=null&&!n.startsWith("?")));for(let a=0;a<t[0].length;a++)t.every(n=>n[a]==null||n[a].startsWith("?"))&&(t=t.map(n=>n.filter((r,o)=>o!==a)),a--);return t=t.map(a=>a.map(n=>n?.startsWith("?")?n.slice(1):n)),t}function Qr({smallBreakpoint:t,mediumBreakpoint:a,vertical:n,horizontal:r,is:o}){function l(u){let i=[[null],[null],[null],[null],[null],[null]];const p=[];p.push("1fr");const m=[];return r.banner&&(m.push(r.banner[u]+"px"),i[0][1]="banner"),(r.header||n.menu||n.aside)&&(m.push((r.header?.[u]??Ze.header[u])+"px"),i[1][1]="header"),r.mainHeader&&(m.push(r.mainHeader[u]+"px"),i[2][1]="mainHeader"),m.push("1fr"),i[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[u]+"px"),i[4][1]="mainFooter"),r.footer&&(m.push(r.footer[u]+"px"),i[5][1]="footer"),i=At(i),{columns:p.join(" "),rows:m.join(" "),areas:i.map(d=>`"${d.join(" ")}"`).join(`
|
|
2
|
+
`),displayMenu:!1,displayAside:!1,menuWidth:Ze.menu[u]+"px",asideWidth:Ze.aside[u]+"px"}}function s(u){let i=[[null,null],[null,null],[null,null],[null,null],[null,null],[null,null]];const p=[];n.menu&&(p.push(n.menu[u]+"px"),i[2][0]="?menu",i[3][0]="menu",i[4][0]="?menu"),p.push("1fr");const m=[];return r.banner&&(m.push(r.banner[u]+"px"),i[0][0]="?banner",i[0][1]="banner"),(r.header||n.aside)&&(m.push((r.header?.[u]??Ze.header[u])+"px"),i[1][0]="?header",i[1][1]="header"),r.mainHeader&&(m.push(r.mainHeader[u]+"px"),i[2][1]="mainHeader"),m.push("1fr"),i[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[u]+"px"),i[4][1]="mainFooter"),r.footer&&(m.push(r.footer[u]+"px"),i[5][0]="?footer",i[5][1]="footer"),i=At(i),{columns:p.join(" "),rows:m.join(" "),areas:i.map(d=>`"${d.join(" ")}"`).join(`
|
|
3
|
+
`),displayMenu:!0,displayAside:!1,menuWidth:Ze.menu[u]+"px",asideWidth:Ze.aside[u]+"px"}}function c(u){let i=[[null,null,null],[null,null,null],[null,null,null],[null,null,null],[null,null,null],[null,null,null]];const p=[];n.menu&&(p.push(n.menu[u]+"px"),i[2][0]="?menu",i[3][0]="menu",i[4][0]="?menu"),p.push("1fr"),n.aside&&(p.push(n.aside[u]+"px"),i[2][2]="?aside",i[3][2]="aside",i[4][2]="?aside");const m=[];return r.banner&&(m.push(r.banner[u]+"px"),i[0][0]="?banner",i[0][1]="banner",i[0][2]="?banner"),r.header&&(m.push(r.header[u]+"px"),i[1][0]="?header",i[1][1]="header",i[1][2]="?header"),r.mainHeader&&(m.push(r.mainHeader[u]+"px"),i[2][1]="mainHeader"),m.push("1fr"),i[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[u]+"px"),i[4][1]="mainFooter"),r.footer&&(m.push(r.footer[u]+"px"),i[5][0]="?footer",i[5][1]="footer",i[5][2]="?footer"),i=At(i),{columns:p.join(" "),rows:m.join(" "),areas:i.map(d=>`"${d.join(" ")}"`).join(`
|
|
4
|
+
`),displayMenu:!0,displayAside:!0,menuWidth:Ze.menu[u]+"px",asideWidth:Ze.aside[u]+"px"}}return({width:u,breakpoint:i})=>o(`<=${t}`,u)?l(i):o(`<=${a}`,u)?s(i):c(i)}const eo=["menu","aside"],to=["banner","header","mainHeader","mainFooter","footer"];function ao(t,{displayMenu:a},n){return t?a?"block":n?"float":"none":"none"}function no(t,{displayAside:a},n){return t?a?"block":n?"float":"none":"none"}function ro({smallBreakpoint:t="sm",mediumBreakpoint:a="md",...n}){const r=Object.fromEntries(eo.filter(l=>n[l]).map(l=>[l,va(n[l].width??{},Ze[l])])),o=Object.fromEntries(to.filter(l=>n[l]).map(l=>[l,va(n[l].height??{},Ze[l])]));return e.Use(k.BeatUII18n,l=>qa(({value:s,is:c})=>{const u=Qr({smallBreakpoint:t,mediumBreakpoint:a,vertical:r,horizontal:o,is:c}),i=s.map(u),p=o.header!=null||r.menu!=null||r.aside!=null,m=e.computedOf(r.aside!=null,i)((C,{displayAside:_})=>C&&!_),h=e.computedOf(r.menu!=null,i)((C,{displayMenu:_})=>C&&!_),d=Ue.useAnimatedElementToggle(),f=Ue.useAnimatedElementToggle(),b=e.prop(0),g=e.computedOf(r.menu!=null,i,d.display)(ao),v=e.computedOf(r.aside!=null,i,f.display)(no);return e.html.div(e.style.display("grid"),e.style.height("100%"),e.style.width("100%"),e.style.gridTemplateColumns(i.$.columns),e.style.gridTemplateRows(i.$.rows),e.style.gridTemplateAreas(i.$.areas),e.style.gridColumnGap("0"),e.style.gridRowGap("0"),n.banner?e.html.header(e.attr.class(je("none",n.banner.shadow??"none")),et(n.banner.color??"white"),e.style.height("100%"),e.style.gridArea("banner"),n.banner.content):null,e.html.header(e.attr.class(je("bottom",n.header?.shadow??"none")),et(n.header?.color??"white"),e.style.zIndex("20"),e.style.display(p?"block":"none"),e.style.gridArea("header"),$e.ElementRect(C=>(C.$.bottom.feedProp(b),null)),e.html.div(e.style.display("flex"),e.style.height("100%"),e.html.div(e.style.display(h.map(C=>C?"flex":"none")),e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),se.Button({onClick:()=>d.toggle(),variant:"light",color:"base"},e.aria.label(l.$.toggleMenu),k.Icon({icon:d.display.map(C=>C?"line-md/menu-to-close-alt-transition":"line-md/close-to-menu-alt-transition")}))),e.html.div(e.style.height("100%"),e.style.flexGrow("1"),n.header?.content),e.html.div(e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),e.style.display(m.map(C=>C?"flex":"none")),se.Button({onClick:()=>f.toggle(),roundedness:"full",variant:"light",color:"base"},e.aria.label(l.$.toggleAside),k.Icon({icon:"line-md/chevron-left"},e.attr.style("transition: transform 0.2s ease-in-out"),e.attr.style(f.display.map(C=>`transform: rotate(${C?180:0}deg)`))))))),n.menu?e.html.nav(e.WithElement(C=>d.setElement(C)),e.style.zIndex("10"),e.aria.label(l.$.mainNavigation),e.attr.role("navigation"),e.style.overflow("hidden"),e.attr.class(g.map(C=>C==="float"?je("right",n.menu?.shadow??"md"):je("right",n.menu?.shadow??"none"))),et(n.menu?.color??"white"),e.style.height(g.map(C=>C==="float"?"auto":"100%")),e.style.overflow("hidden"),e.style.gridArea("menu"),e.style.display(e.computedOf(g,d.status)((C,_)=>C==="none"&&_==="closed"?"none":"block")),e.style.position(e.computedOf(g,d.status)((C,_)=>C==="float"||C==="none"&&_!=="closed"?"fixed":"initial")),e.style.top(b.map(C=>`${C}px`)),e.WithElement(C=>{C.style.setProperty("--slide-distance","100%")}),Ue.AnimatedToggleClass({animation:{slide:"right"},status:e.computedOf(g,d.status)((C,_)=>C==="block"?"opened":_)}),e.style.width(e.coalesce(n.menu?.width,i.$.menuWidth)),e.style.bottom("0"),n.menu?.content):null,n.mainHeader?e.html.header(e.style.height("100%"),e.style.gridArea("mainHeader"),e.attr.class(je("none",n.mainHeader?.shadow??"none")),et(n.mainHeader?.color??"white"),n.mainHeader.content):null,e.html.main(e.style.height("100%"),e.style.overflow("hidden"),e.style.gridArea("main"),e.attr.class(je("none",n.main?.shadow??"none")),et(n.main?.color??"white"),n.main.content),n.mainFooter?e.html.footer(e.style.height("100%"),e.style.gridArea("mainFooter"),e.attr.class(je("none",n.mainFooter?.shadow??"none")),et(n.mainFooter?.color??"white"),n.mainFooter.content):null,n.aside?e.html.aside(e.WithElement(C=>{f.setElement(C)}),e.style.zIndex("10"),e.aria.label(l.$.sidebar),e.attr.role("complementary"),e.attr.class(v.map(C=>C==="float"?je("left","md"):je("left","none"))),et("white"),e.style.height("100%"),e.style.gridArea("aside"),e.style.display(e.computedOf(v,f.status)((C,_)=>C==="none"&&_==="closed"?"none":"block")),e.style.position(e.computedOf(v,f.status)((C,_)=>C==="float"||C==="none"&&_!=="closed"?"fixed":"initial")),e.style.top(b.map(C=>`${C}px`)),e.WithElement(C=>{C.style.setProperty("--slide-distance","100%")}),Ue.AnimatedToggleClass({animation:{slide:"left"},status:e.computedOf(v,f.status)((C,_)=>C==="block"?"opened":_)}),e.style.width(e.coalesce(n.aside?.width,i.$.asideWidth)),e.style.bottom(b.map(C=>`${C}px`)),n.aside.content):null,n.footer?e.html.footer(e.attr.class(je("top","none")),et("white"),e.style.height("100%"),e.style.gridArea("footer"),n.footer.content):null)}))}function oo(...t){return e.html.div(e.attr.class("bc-center-h"),e.html.div(e.attr.class("bc-center__content"),...t))}function lo(t){const a=["bc-center"];return t!=="lg"&&a.push(`bc-center--gap-${t}`),a.join(" ")}function so({gap:t="lg"}={},...a){return e.html.div(e.attr.class(e.computedOf(t)(n=>lo(n??"lg"))),...a)}function ya(t,a,n,r,o){const l=["bc-divider"];return t==="vertical"&&l.push("bc-divider--vertical"),a!=="solid"&&l.push(`bc-divider--${a}`),n!=="default"&&l.push(`bc-divider--tone-${n}`),r&&(l.push("bc-divider--labeled"),o!=="center"&&l.push(`bc-divider--labeled-${o}`)),l.join(" ")}function io({orientation:t="horizontal",variant:a="solid",tone:n="default",label:r,labelAlign:o="center"}={}){return r!=null?e.html.div(e.attr.class(e.computedOf(t,a,n,o)((s,c,u,i)=>ya(s??"horizontal",c??"solid",u??"default",!0,i??"center"))),e.attr.role("separator"),e.html.span(e.attr.class("bc-divider__line")),e.html.span(e.attr.class("bc-divider__label"),r),e.html.span(e.attr.class("bc-divider__line"))):e.html.hr(e.attr.class(e.computedOf(t,a,n)((s,c,u)=>ya(s??"horizontal",c??"solid",u??"default",!1,"center"))),e.attr.role("separator"))}const vt=12,yt=40;function Wt(t){return`${t}px`}function it(t){return e.Value.map(t,Wt)}function Ae(t,a){return Ne.biMin(Ne.biMax(0n,a),Ne.biMax(0n,t))}function co({body:t,contentWidth:a,contentHeight:n,header:r,headerHeight:o=0,topStart:l,topEnd:s,footer:c,footerHeight:u=0,bottomStart:i,bottomEnd:p,sidebarStart:m,sidebarStartWidth:h=0,sidebarEnd:d,sidebarEndWidth:f=0,anchorMode:b="container-edge"}){const g=e.prop(0n),v=e.prop(0n),C=it(o),_=it(u),y=it(h),V=it(f);return e.html.div(e.attr.class("bc-nine-slice-container"),e.attr.tabindex(0),e.attr.role("group"),e.aria.label("Scrollable grid view"),$e.ElementRect(w=>{const S=e.computedOf(w.$.width,h,f)((O,U,ie)=>O-U-ie),$=e.computedOf(w.$.height,o,u)((O,U,ie)=>O-U-ie),N=e.computedOf(a,S)((O,U)=>O>BigInt(Math.max(0,U))),D=e.computedOf(n,$)((O,U)=>O>BigInt(Math.max(0,U))),M=e.computedOf(S,D)((O,U)=>U?O-vt:O),Y=e.computedOf($,N)((O,U)=>U?O-vt:O),K=M.map(Wt),A=Y.map(Wt),B=e.computedOf(n,Y)((O,U)=>Ne.biMax(0n,O-BigInt(Math.max(1,U)))),j=e.computedOf(a,M)((O,U)=>Ne.biMax(0n,O-BigInt(Math.max(1,U)))),ae=e.Value.map(b,O=>O==="body-end"||O==="body-end-bottom"),te=e.When(ae,()=>e.style.left(e.computedOf(h,a,M,f)((O,U,ie,pe)=>{const xe=O+Number(U),Ce=O+ie,Pe=Math.min(xe,Ce);return`${Math.max(O+pe,Pe)}px`})),()=>e.style.right("0")),q=e.Value.map(b,O=>O==="body-bottom"||O==="body-end-bottom"),ue=e.When(q,()=>e.style.top(e.computedOf(o,n,Y,u)((O,U,ie,pe)=>{const xe=O+Number(U),Ce=O+ie,Pe=Math.min(xe,Ce);return`${Math.max(O+pe,Pe)}px`})),()=>e.style.bottom("0")),Z=e.computedOf(D)(O=>O?`${vt}px`:"0"),F=e.computedOf(N)(O=>O?`${vt}px`:"0"),I=e.style.transform(e.computedOf(v,g,N,D)((O,U,ie,pe)=>{const xe=ie?`translateX(-${O}px)`:"",Ce=pe?`translateY(-${U}px)`:"";return`${xe} ${Ce}`.trim()||"none"})),E=e.style.transform(v.map(O=>`translateX(-${O}px)`)),H=e.style.transform(g.map(O=>`translateY(-${O}px)`));let ne=null,ge=0,be=0;const W=()=>{const O=B.value,U=j.value,ie=D.value,pe=N.value;ie&&be!==0&&g.set(Ae(g.value+BigInt(Math.round(be)),O)),pe&&ge!==0&&v.set(Ae(v.value+BigInt(Math.round(ge)),U)),ge=0,be=0,ne=null};j.on(O=>{v.value>O&&v.set(Ne.biMax(0n,O))}),B.on(O=>{g.value>O&&g.set(Ne.biMax(0n,O))}),N.on(O=>{O||v.set(0n)}),D.on(O=>{O||g.set(0n)});const ce=e.createInertiaHandler((O,U)=>{const ie=j.value,pe=B.value;N.value&&v.set(Ae(v.value-BigInt(Math.round(O)),ie)),D.value&&g.set(Ae(g.value-BigInt(Math.round(U)),pe))},{friction:.92,minVelocity:.5});let ve=null;const ye=typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,we=e.computedOf(M,a)((O,U)=>{const ie=Number(U);return ie>0?Math.max(24,O*O/ie):0}),L=e.computedOf(M,we)((O,U)=>Math.max(1,O-U)),G=e.computedOf(v,j,L)((O,U,ie)=>{const pe=Number(U);return pe>0?Number(O)/pe*ie:0}),re=e.computedOf(Y,n)((O,U)=>{const ie=Number(U);return ie>0?Math.max(24,O*O/ie):0}),x=e.computedOf(Y,re)((O,U)=>Math.max(1,O-U)),oe=e.computedOf(g,B,x)((O,U,ie)=>{const pe=Number(U);return pe>0?Number(O)/pe*ie:0});function ke(O,U,ie,pe){return e.on.pointerdown(xe=>{xe.preventDefault(),xe.stopPropagation();const Ce=O==="horizontal"?xe.clientX:xe.clientY,Pe=Number(U.value),He=z=>{const Q=O==="horizontal"?z.clientX-Ce:z.clientY-Ce,le=e.Value.get(pe),de=Number(e.Value.get(ie));if(le>0&&de>0){const he=Pe+Q/le*de;U.set(Ae(BigInt(Math.round(he)),e.Value.get(ie)))}},P=()=>{window.removeEventListener("pointermove",He),window.removeEventListener("pointerup",P)};window.addEventListener("pointermove",He),window.addEventListener("pointerup",P)})}function Se(O,U,ie,pe,xe){return e.on.pointerdown(Ce=>{const Pe=Ce.target;if(!Pe.classList.contains("bc-nine-slice-scrollbar-track"))return;Ce.preventDefault();const He=Pe.getBoundingClientRect(),P=O==="horizontal"?Ce.clientX-He.left:Ce.clientY-He.top,z=e.Value.get(xe)/2,Q=e.Value.get(pe),le=Number(e.Value.get(ie));if(Q>0&&le>0){const de=Math.max(0,Math.min(1,(P-z)/Q));U.set(Ae(BigInt(Math.round(de*le)),e.Value.get(ie)))}})}return e.Fragment(e.OnDispose(()=>{ne&&clearTimeout(ne),ve&&ve.dispose()}),e.on.wheel(O=>{O.preventDefault(),ge+=O.deltaX,be+=O.deltaY,ne||(ne=setTimeout(W,16))}),e.on.keydown(O=>{const U=N.value,ie=D.value;let pe=!1;switch(O.key){case"ArrowUp":ie&&(g.set(Ae(g.value-BigInt(yt),B.value)),pe=!0);break;case"ArrowDown":ie&&(g.set(Ae(g.value+BigInt(yt),B.value)),pe=!0);break;case"ArrowLeft":U&&(v.set(Ae(v.value-BigInt(yt),j.value)),pe=!0);break;case"ArrowRight":U&&(v.set(Ae(v.value+BigInt(yt),j.value)),pe=!0);break;case"PageUp":ie&&(g.set(Ae(g.value-BigInt(Math.round(Y.value)),B.value)),pe=!0);break;case"PageDown":ie&&(g.set(Ae(g.value+BigInt(Math.round(Y.value)),B.value)),pe=!0);break;case"Home":ie&&(g.set(0n),pe=!0),U&&(v.set(0n),pe=!0);break;case"End":ie&&(g.set(B.value),pe=!0),U&&(v.set(j.value),pe=!0);break}pe&&O.preventDefault()}),e.html.div(e.attr.class("bc-nine-slice-pane-container"),e.style.right(Z),e.style.bottom(F),l!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-start"),e.style.top("0"),e.style.left("0"),e.style.width(y),e.style.height(C),l):null,r!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-header"),e.style.top("0"),e.style.left(y),e.style.width(K),e.style.height(C),e.html.div(e.attr.class("bc-nine-slice-pane-content"),E,r)):null,s!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-end"),e.style.top("0"),te,e.style.width(V),e.style.height(C),s):null,m!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-start"),e.style.left("0"),e.style.top(C),e.style.width(y),e.style.height(A),e.html.div(e.attr.class("bc-nine-slice-pane-content"),H,m)):null,e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-body"),e.style.left(y),e.style.top(C),e.style.width(K),e.style.height(A),e.on.pointerdown(O=>{if(O.button!==0)return;ve&&(ve.dispose(),ve=null),ce.track(O.clientX,O.clientY);const U=Ce=>{const Pe=Ce.clientX-ie,He=Ce.clientY-pe;ie=Ce.clientX,pe=Ce.clientY,ce.track(Ce.clientX,Ce.clientY);const P=j.value,z=B.value;N.value&&v.set(Ae(v.value-BigInt(Math.round(Pe)),P)),D.value&&g.set(Ae(g.value-BigInt(Math.round(He)),z))};let ie=O.clientX,pe=O.clientY;const xe=()=>{ye?.matches||(ve=ce.release()),window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",xe)};window.addEventListener("pointermove",U),window.addEventListener("pointerup",xe)}),e.style.cursor(e.computedOf(N,D)((O,U)=>O||U?"grab":"default")),e.html.div(e.attr.class("bc-nine-slice-pane-content"),I,t)),d!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),te,e.style.top(C),e.style.width(V),e.style.height(A),e.html.div(e.attr.class("bc-nine-slice-pane-content"),H,d)):null,i!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-start"),e.style.left("0"),ue,e.style.width(y),e.style.height(_),i):null,c!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-footer"),e.style.left(y),ue,e.style.width(K),e.style.height(_),e.html.div(e.attr.class("bc-nine-slice-pane-content"),E,c)):null,p!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-end"),te,ue,e.style.width(V),e.style.height(_),p):null),e.html.div(e.attr.class(N.map(O=>`bc-nine-slice-scrollbar bc-nine-slice-scrollbar--horizontal${O?"":" bc-nine-slice-scrollbar--hidden"}`)),e.style.left(it(h)),e.style.right(Z),Se("horizontal",v,j,L,we),e.WithElement(O=>(e.Value.on(j,U=>{O.setAttribute("aria-valuemax",String(U))}),e.Value.on(v,U=>{O.setAttribute("aria-valuenow",String(U))}),e.Fragment(e.attr.role("scrollbar"),e.aria.orientation("horizontal"),e.aria.valuemin(0),e.html.div(e.attr.class("bc-nine-slice-scrollbar-track"),e.html.div(e.attr.class("bc-nine-slice-scrollbar-thumb"),e.style.width(we.map(U=>`${U}px`)),e.style.transform(G.map(U=>`translateX(${U}px)`)),ke("horizontal",v,j,L))))))),e.html.div(e.attr.class(D.map(O=>`bc-nine-slice-scrollbar bc-nine-slice-scrollbar--vertical${O?"":" bc-nine-slice-scrollbar--hidden"}`)),e.style.top(C),e.style.bottom(F),Se("vertical",g,B,x,re),e.WithElement(O=>(e.Value.on(B,U=>{O.setAttribute("aria-valuemax",String(U))}),e.Value.on(g,U=>{O.setAttribute("aria-valuenow",String(U))}),e.Fragment(e.attr.role("scrollbar"),e.aria.orientation("vertical"),e.aria.valuemin(0),e.html.div(e.attr.class("bc-nine-slice-scrollbar-track"),e.html.div(e.attr.class("bc-nine-slice-scrollbar-thumb"),e.style.height(re.map(U=>`${U}px`)),e.style.transform(oe.map(U=>`translateY(${U}px)`)),ke("vertical",g,B,x))))))))}))}function uo(t){return e.attr.class(`bc-flex--gap-${t}`)}function po(t){return e.attr.class(`bc-flex--align-${t}`)}function mo(t){return e.attr.class(`bc-flex--justify-${t}`)}const ho=e.attr.class("bc-flex--wrap"),fo=e.attr.class("bc-flex--nowrap"),go=e.attr.class("bc-flex--grow");function Ut({header:t,footer:a,body:n,shadowOnScroll:r=!0},...o){const l=e.prop("none");function s(u){const i=u.scrollTop<=1,p=u.scrollTop+u.clientHeight>=u.scrollHeight-2;i&&p?l.set("none"):i?l.set("bottom"):p?l.set("top"):l.set("both")}return e.html.div(e.attr.class(e.computedOf(l,r)((u,i)=>{const p=["bc-scrollable-panel"];return i&&((u==="top"||u==="both")&&p.push("bc-scrollable-panel--scrolled-down"),(u==="bottom"||u==="both")&&p.push("bc-scrollable-panel--scrolled-up")),p.join(" ")})),t&&e.html.div(e.attr.class("bc-scrollable-panel__header"),t),e.html.div(e.attr.class("bc-scrollable-panel--header-shadow"),e.html.div()),e.html.div(e.attr.class("bc-scrollable-panel__body"),e.WithElement(u=>{s(u);const i=new ResizeObserver(()=>s(u));i.observe(u);const p=new MutationObserver(()=>{requestAnimationFrame(()=>s(u))});return p.observe(u,{childList:!0,subtree:!0}),e.OnDispose(()=>{i.disconnect(),p.disconnect()})}),e.on.scroll(u=>{const i=u.target;s(i)}),n),e.html.div(e.attr.class("bc-scrollable-panel--footer-shadow"),e.html.div()),a&&e.html.div(e.attr.class("bc-scrollable-panel__footer"),a),...o)}function bo(t,a,n){const r=["bc-sink"];return t!=="default"&&r.push(`bc-sink--${t}`),a!=="md"&&r.push(`bc-sink--padding-${a}`),n!=="lg"&&r.push(`bc-sink--rounded-${n}`),r.join(" ")}function vo({variant:t="default",size:a="md",roundedness:n="lg"}={},...r){return e.html.div(e.attr.class(e.computedOf(t,a,n)((o,l,s)=>bo(o??"default",l??"md",s??"lg"))),...r)}const yo=[{value:"contains",labelKey:"filterPanelContains"},{value:"notContains",labelKey:"filterPanelNotContains"},{value:"equals",labelKey:"filterPanelEquals"},{value:"notEquals",labelKey:"filterPanelNotEquals"},{value:"startsWith",labelKey:"filterPanelStartsWith"},{value:"endsWith",labelKey:"filterPanelEndsWith"},{value:"isNull",labelKey:"filterPanelIsNull"},{value:"isNotNull",labelKey:"filterPanelIsNotNull"}],ko=[{value:"eq",labelKey:"filterPanelEquals"},{value:"neq",labelKey:"filterPanelNotEquals"},{value:"gt",labelKey:"filterPanelGt"},{value:"gte",labelKey:"filterPanelGte"},{value:"lt",labelKey:"filterPanelLt"},{value:"lte",labelKey:"filterPanelLte"},{value:"between",labelKey:"filterPanelBetween"},{value:"isNull",labelKey:"filterPanelIsNull"},{value:"isNotNull",labelKey:"filterPanelIsNotNull"}],_o=new Set(["isNull","isNotNull"]);function wo(t,a,n){const r=a.operator;if(r==="isNull")return De.isNull(t);if(r==="isNotNull")return De.isNotNull(t);if(a.value==="")return null;if(n==="number"){if(r==="between"){const l=a.value.split(",").map(Number);return l.length===2&&!l.some(isNaN)?De.between(t,l[0],l[1]):null}const o=Number(a.value);if(Number.isNaN(o))return null;switch(r){case"eq":return De.eq(t,o);case"neq":return De.neq(t,o);case"gt":return De.gt(t,o);case"gte":return De.gte(t,o);case"lt":return De.lt(t,o);case"lte":return De.lte(t,o);default:return null}}return De.text(t,r,a.value)}function Rt(t,a){switch(t.kind){case"text":return[{id:a(),operator:t.operator,value:t.value}];case"compare":return[{id:a(),operator:t.operator,value:String(t.value)}];case"range":return[{id:a(),operator:"between",value:`${t.min},${t.max}`}];case"null":return[{id:a(),operator:t.operator,value:""}];case"composite":return t.filters.flatMap(n=>Rt(n,a));default:return[]}}function Co(){let t=0;return()=>++t}function Vo(t,a,n=""){return{opProp:e.prop(t),valProp:e.prop(a),val2Prop:e.prop(n)}}function ka(t){t.opProp.dispose(),t.valProp.dispose(),t.val2Prop.dispose()}function pt(t){const{dataSource:a,column:n,columnType:r="text",size:o="sm",embedded:l=!1}=t,s=Co(),c=a.getColumnFilters(n),u=c.map(S=>S.length>0),i=new Map,p=e.prop([]),m=e.prop("and");function h(){return r==="number"?"eq":"contains"}function d(){return r==="number"?"0":""}function f(S,$,N=""){const D=s();return i.set(D,Vo(S,$,N)),D}function b(){for(const S of i.values())ka(S);i.clear()}function g(){b();const S=c.value;let $;if(S.length===0)$=[{id:0,operator:h(),value:d()}],m.set("and");else{const D=S.find(M=>M.kind==="composite");D?(m.set(D.mode),$=Rt(D,s)):(m.set("and"),$=S.flatMap(M=>M.kind==="text"||M.kind==="compare"||M.kind==="range"||M.kind==="null"||M.kind==="composite"?Rt(M,s):[])),$.length===0&&($=[{id:0,operator:h(),value:d()}])}const N=[];for(const D of $)if(D.operator==="between"&&D.value.includes(",")){const[M,Y]=D.value.split(",");N.push(f(D.operator,M,Y))}else N.push(f(D.operator,D.value));p.set(N)}function v(){const S=f(h(),d());p.set([...p.value,S])}function C(S){const $=i.get(S);$&&(ka($),i.delete(S));const N=p.value.filter(D=>D!==S);N.length===0?v():p.set(N)}function _(){const $=p.value.map(N=>{const D=i.get(N);if(!D)return null;const M=D.opProp.value;if(M==="between"){const Y=Number(D.valProp.value),K=Number(D.val2Prop.value);return Number.isNaN(Y)||Number.isNaN(K)?null:De.between(n,Y,K)}return wo(n,{operator:M,value:D.valProp.value},r)}).filter(N=>N!=null);$.length===0?a.removeFilter(n):$.length===1?a.setFilter($[0]):a.setFilter(De.composite(n,m.value,$))}function y(){a.removeFilter(n),b();const S=f(h(),d());p.set([S]),m.set("and")}const V=r==="number"?ko:yo,w=()=>e.Use(k.BeatUII18n,S=>{g();const $=S.$.dataTable,N=V.map(D=>Le.value(D.value,$.value[D.labelKey]));return e.html.div(e.attr.class("bc-column-filter-panel"),e.on.click(D=>D.stopPropagation()),e.When(p.map(D=>D.length>=2),()=>e.html.div(e.attr.class("bc-column-filter-panel__mode"),J.SegmentedInput({options:{and:$.map(D=>D.filterPanelAnd),or:$.map(D=>D.filterPanelOr)},value:m,onChange:D=>m.set(D),size:"xs"}))),e.html.div(e.attr.class("bc-column-filter-panel__conditions"),e.ForEach(p,D=>e.MapSignal(D,M=>{const Y=i.get(M);if(!Y)return null;const K=$.map(ae=>ae.filterPanelValuePlaceholder),A=(ae,te)=>J.NumberInput({value:ae.map(q=>q===""?0:Number(q)),size:"xs",class:"bc-column-filter-panel__value",placeholder:K,onChange:q=>ae.set(String(q))}),B=ae=>Ee.TextInput({value:ae,size:"xs",class:"bc-column-filter-panel__value",placeholder:K,onInput:te=>ae.set(te)}),j=()=>{if(r==="number"){const ae=Y.opProp.map(te=>te==="between");return e.Fragment(A(Y.valProp),e.When(ae,()=>A(Y.val2Prop)))}return B(Y.valProp)};return e.html.div(e.attr.class("bc-column-filter-panel__row"),e.html.div(e.attr.class("bc-column-filter-panel__row-header"),J.NativeSelect({value:Y.opProp,options:N,size:"xs",class:"bc-column-filter-panel__operator",onChange:ae=>Y.opProp.set(ae)}),ee.CloseButton({size:"xs",onClick:()=>C(M)})),e.html.div(e.attr.class(Y.opProp.map(ae=>_o.has(ae)?"bc-column-filter-panel__value-wrap bc-column-filter-panel__value-wrap--hidden":"bc-column-filter-panel__value-wrap")),j()))}))),e.html.div(e.attr.class("bc-column-filter-panel__add"),e.html.button(e.attr.type("button"),e.attr.class("bc-column-filter-panel__add-btn"),e.on.click(()=>v()),"+ ",$.map(D=>D.filterPanelAddCondition))),e.html.div(e.attr.class("bc-column-filter-panel__actions"),se.Button({size:"xs",variant:"light",color:"danger",onClick:()=>y()},k.Icon({icon:"lucide:trash-2",size:"xs"}),$.map(D=>D.filterPanelClear)),se.Button({size:"xs",variant:"filled",onClick:()=>_()},$.map(D=>D.filterPanelApply))))});if(l){const S=c.on(()=>{g()});return e.Fragment(e.OnDispose(()=>{S(),b(),p.dispose(),m.dispose()}),w())}return e.Fragment(e.OnDispose(()=>{b(),p.dispose(),m.dispose()}),e.html.div(e.attr.class("bc-column-filter-panel__trigger-wrap"),e.html.button(e.attr.class(u.map(S=>S?"bc-column-filter-panel__trigger bc-column-filter-panel__trigger--active":"bc-column-filter-panel__trigger")),e.attr.type("button"),k.Icon({icon:"lucide:filter",size:o}),e.When(u,()=>e.html.span(e.attr.class("bc-column-filter-panel__active-dot"))),e.When(u,()=>e.Use(k.BeatUII18n,S=>{const $=S.value.dataTable.describeFilter;return dt({content:c.map(N=>{if(N.length===0)return"";const D=N[0];return $?xt(D,$):Kt(D)}),showDelay:500})})),Ve.Flyout({content:()=>w(),placement:"bottom-start",showOn:"click",showDelay:0,hideDelay:0}))))}function So(t){return t===!0?{}:t===!1||t==null?!1:t}function xo(t,a,n){if(a<=0)return[t];const r=[];let o=[],l=0;for(const s of t){const c=n.has(s.key)?1:s.rows.length;if(c<=a)l>0&&l+c>a&&(r.push(o),o=[],l=0),o.push(s),l+=c;else{l>0&&(r.push(o),o=[],l=0);let u=0;for(;u<s.rows.length;){const i=s.rows.slice(u,u+a);o.push({key:s.key,rows:i}),l=i.length,u+a<s.rows.length&&(r.push(o),o=[],l=0),u+=a}}}return o.length>0&&r.push(o),r.length>0?r:[[]]}function Io(t){return t===!0?{pageSize:10}:t===!1||t==null?!1:t}function Do(t,a,n,r){if(t==null||t===!1)return null;if(t===!0||t==="text")return e.html.div(e.attr.class("bc-column-filter-panel"),at({dataSource:a,column:n,size:r}));if(t==="number")return pt({dataSource:a,column:n,columnType:"number",size:r,embedded:!0});if(typeof t=="object"&&"render"in t)return t.render({dataSource:a,column:n,size:r});if(typeof t=="object"&&"input"in t)return Ya(t,a,n,r);if(typeof t=="object"&&"type"in t)switch(t.type){case"select":return e.html.div(e.attr.class("bc-column-filter-panel"),at({dataSource:a,column:n,type:"select",options:t.options,size:r}));case"tags":return e.html.div(e.attr.class("bc-column-filter-panel"),at({dataSource:a,column:n,type:"tags",options:t.options,size:r}));case"panel":return pt({dataSource:a,column:n,columnType:t.valueType,size:r,embedded:!0})}return null}function Ya(t,a,n,r){const o=a.getTextFilterValue(n),l=e.prop(o.value);let s=!1;return o.on(c=>{!s&&l.value!==c&&(s=!0,l.set(c),s=!1)}),l.on(c=>{!s&&o.value!==c&&(s=!0,c===""?a.removeFilter(n):a.setFilter(De.text(n,"contains",c)),s=!1)}),t.input(l,r)}function Oo(t,a,n,r){if(t==null||t===!1)return e.html.th();if(t===!0||t==="text")return e.html.th(at({dataSource:a,column:n,size:r}));if(t==="number")return e.html.th(pt({dataSource:a,column:n,columnType:"number",size:r}));if(typeof t=="object"&&"render"in t)return e.html.th(t.render({dataSource:a,column:n,size:r}));if(typeof t=="object"&&"input"in t)return e.html.th(Ya(t,a,n,r));if(typeof t=="object"&&"type"in t)switch(t.type){case"select":return e.html.th(at({dataSource:a,column:n,type:"select",options:t.options,size:r}));case"tags":return e.html.th(at({dataSource:a,column:n,type:"tags",options:t.options,size:r}));case"panel":return e.html.th(pt({dataSource:a,column:n,columnType:t.valueType,size:r}))}return e.html.th()}function Za(t){if(t.filter!=null)return e.Value.get(t.filter)}function Ka(t){return t.filter!=null}function $o(t){const{data:a,columns:n,rowId:r,sortable:o=!1,filterable:l=!1,selectable:s=!1,reorderableColumns:c=!1,onColumnOrderChange:u,pagination:i,toolbar:p,size:m="md",hoverable:h=!1,onSortChange:d,onFilterChange:f,onSelectionChange:b,onGroupByChange:g,onRowClick:v,serverSide:C=!1,loading:_=!1,groupBy:y,groupCollapsible:V=!0,showFooter:w=!1,groupSummary:S,emptyContent:$,hiddenColumns:N=[],onDataSource:D,rowDetails:M}=t,Y=e.Value.map(o,R=>!!R),K=e.Value.map(o,R=>R==="multi"),A=e.Value.map(l,R=>!!R),B=e.Value.map(l,R=>R==="row"?"row":"header"),j=e.Value.map(s,R=>!!R),ae=e.Value.map(s,R=>typeof R=="object"?R.position==="after":!1),te=e.Value.map(s,R=>typeof R=="object"?R.selectOnRowClick??!1:!1),q=e.Value.deriveProp(N),ue=e.Value.map(i??!1,R=>Io(R??!1)),Z=e.Value.toSignal(p??!1).map(So),F=n.filter(R=>{const fe=R.hideable;return fe==null?!1:typeof fe=="boolean"?fe:fe.value}),I=e.Value.map(q??[],R=>R.length>0),E=e.prop(n.map(R=>R.id)),H=new Map(n.map(R=>[R.id,R])),ne=R=>H.get(R),ge=e.computedOf(c,q,E)((R,fe,We)=>R?We.filter(Xe=>!fe.includes(Xe)&&H.has(Xe)):n.filter(Xe=>!fe.includes(Xe.id)).map(Xe=>Xe.id)),be=R=>{const fe=new Set(q.value);fe.has(R)?fe.delete(R):fe.add(R),q.set(Array.from(fe))},W=()=>{q.set(Array.from(n.map(R=>R.id)))},ce={},ve={};for(const R of n)R.value&&(ce[R.id]=R.value),R.comparator&&(ve[R.id]=R.comparator);const ye=Ma({data:a,rowId:r,accessors:ce,comparators:ve,...i!=null?{pageSize:e.Value.map(ue,R=>R===!1?0:R?.pageSize??10)}:{},multiSort:K,serverSide:C,groupBy:y,onSortChange:d,onFilterChange:f,onSelectionChange:b,onGroupByChange:g});D?.(ye);const we=e.Value.toSignal(h),L=e.Value.toSignal(te),G=e.Value.toSignal(j),re=e.computedOf(we,L,G)((R,fe,We)=>R||fe&&We||v!=null),x=e.computedOf(L,G)((R,fe)=>R&&fe||v!=null),ke=n.some(R=>R.filter!=null)?e.Value.map(A,R=>!!R):!1,Se=n.some(R=>R.footer!=null),O=e.Value.toSignal(e.Value.map(ue,R=>R!==!1)),U=e.prop(new Set),ie=e.Value.toSignal(e.Value.map(ue,R=>R===!1?0:R?.pageSize??10)),pe=e.Value.toSignal(C),xe=e.prop(1),Ce=e.computedOf(ye.groups,ie,U,pe)((R,fe,We,Xe)=>Xe?[R]:xo(R,fe,We)),Pe=Ce.map(R=>R.length),He=e.Value.on(Pe,R=>{xe.value>R&&xe.set(Math.max(1,R))}),P=e.computedOf(Ce,xe)((R,fe)=>{const We=Math.max(0,Math.min(fe-1,R.length-1));return R[We]??[]}),z=e.computedOf(ye.groupBy,ye.totalPages,Pe)((R,fe,We)=>R!=null?We:fe),Q=e.computedOf(ye.groupBy,ye.currentPage,xe)((R,fe,We)=>R!=null?We:fe),le=R=>{if(ye.groupBy.value!=null){const fe=Math.max(1,Math.min(R,Pe.value));xe.set(fe)}else ye.setPage(R)},de=e.computedOf(O,z)((R,fe)=>R&&fe>1),he=M!=null&&(M.defaultState??"collapsed")!=="always-visible",Ie=M!=null&&he?(()=>{const R=M.defaultState??"collapsed",fe=e.prop(new Set);return{toggledIds:fe,renderedOnce:new Set,isExpanded:st=>{const Qe=fe.value.has(st);return R==="expanded"?!Qe:Qe},toggle:st=>{const Qe=new Set(fe.value);Qe.has(st)?Qe.delete(st):Qe.add(st),fe.set(Qe),M.onExpandedChange?.(Qe)}}})():void 0,Ot=e.computedOf(ge,G)((R,fe)=>R.length+(fe?1:0)+(he?1:0));return{ds:ye,columns:n,columnMap:H,getCol:ne,rowId:r,visibleColumns:ge,hiddenColumns:q,hideableColumns:F,hasColumnVisibility:I,toggleColumnVisibility:be,showAllColumns:W,columnOrder:E,reorderableColumns:c,onColumnOrderChange:u,dragState:{columnId:null},selectable:j,selectableSignal:G,selectOnRowClickSignal:L,selectionAfter:ae,sortable:Y,multiSort:K,size:m,onRowClick:v,filterLayout:B,hasFilters:ke,loading:_,showFooter:w,emptyContent:$,groupCollapsible:V,groupSummary:S,hasFooter:Se,rowClickable:x,effectiveHoverable:re,totalColSpan:Ot,collapsedGroups:U,currentGroupPageGroups:P,toolbarConfig:Z,paginationConfig:ue,paginationEnabledSignal:O,pageSizeSignal:ie,effectiveTotalPages:z,effectiveCurrentPage:Q,setEffectivePage:le,showPagination:de,rowDetails:M,hasToggleColumn:he,expandedRows:Ie,dispose:()=>{ye.dispose(),q.dispose(),ge.dispose(),Ot.dispose(),E.dispose(),U.dispose(),we.dispose(),L.dispose(),G.dispose(),re.dispose(),x.dispose(),O.dispose(),ie.dispose(),pe.dispose(),xe.dispose(),He(),Ce.dispose(),Pe.dispose(),P.dispose(),z.dispose(),Q.dispose(),de.dispose(),Z.dispose(),Ie?.toggledIds.dispose()}}}function Xa({dataSource:t,column:a,size:n,actions:r,menu:o,hideInactiveIcon:l=!1,multiSort:s=!0,draggable:c,onDragStart:u,onDragOver:i,onDrop:p,onDragEnd:m},...h){const d=t.getSortDirection(a),f=d.map(g=>{switch(g){case"asc":return"line-md:arrow-small-up";case"desc":return"line-md:arrow-small-down";default:return"line-md:arrows-vertical"}}),b=d.map(g=>{const v="bc-sortable-header";return g==="asc"?`${v} ${v}--asc`:g==="desc"?`${v} ${v}--desc`:v});return e.html.th(e.attr.class(b),e.attr.role("columnheader"),c!=null?e.attr.draggable(e.Value.map(c,g=>g?"true":void 0)):null,u!=null?e.on.dragstart(u):null,i!=null?e.on.dragover(i):null,p!=null?e.on.drop(p):null,m!=null?e.on.dragend(m):null,e.aria.sort(d.map(g=>g==="asc"?"ascending":g==="desc"?"descending":"none")),e.on.click(g=>t.toggleSort(a,{multi:g.shiftKey})),e.html.div(e.attr.class("bc-sortable-header__content"),e.html.span(e.attr.class("bc-sortable-header__label"),...h),e.html.span(e.attr.class("bc-sortable-header__icons"),l?e.When(d.map(g=>g!=null),()=>e.html.span(e.attr.class("bc-sortable-header__icon bc-sortable-header__icon--active"),k.Icon({icon:f,size:n??"md"}),e.When(s,()=>e.Use(k.BeatUII18n,g=>dt({content:g.$.dataTable.map(v=>v.sortMultiHint),showDelay:800}))))):e.html.span(e.attr.class(d.map(g=>g!=null?"bc-sortable-header__icon bc-sortable-header__icon--active":"bc-sortable-header__icon")),k.Icon({icon:f,size:n??"md"}),e.When(s,()=>e.Use(k.BeatUII18n,g=>dt({content:g.$.dataTable.map(v=>v.sortMultiHint),showDelay:800})))),r??null,o!=null?e.html.span(e.attr.class("bc-sortable-header__menu"),e.on.click(g=>g.stopPropagation()),o):null)))}function Ja(t){return t.hasToggleColumn?e.html.th(e.attr.class("bc-data-table__toggle-header")):null}function Qa(t){return t.hasToggleColumn?e.html.th(e.attr.class("bc-data-table__toggle-header")):null}function aa(t,a,n){if(!n.hasToggleColumn||!n.expandedRows||!n.rowDetails)return null;if(!(n.rowDetails.hasDetails?n.rowDetails.hasDetails(t):!0))return e.html.td(e.attr.class("bc-data-table__toggle-cell"));const o=n.expandedRows.toggledIds.map(()=>n.expandedRows.isExpanded(a));return e.html.td(e.attr.class("bc-data-table__toggle-cell"),e.html.button(e.attr.class(o.map(l=>l?"bc-data-table__group-toggle":"bc-data-table__group-toggle bc-data-table__group-toggle--collapsed")),e.attr.type("button"),e.on.click(l=>{l.stopPropagation(),n.expandedRows.toggle(a)}),k.Icon({icon:"lucide:chevron-down",size:"sm"})))}function na(t,a,n){if(!n.rowDetails||!(n.rowDetails.hasDetails?n.rowDetails.hasDetails(t):!0))return null;const o=n.rowDetails.defaultState??"collapsed";if(o==="always-visible")return e.html.tr(e.attr.class("bc-data-table__detail-row"),e.html.td(e.attr.class("bc-data-table__detail-cell"),e.attr.colspan(n.totalColSpan),e.html.div(n.rowDetails.render(t))));if(!n.expandedRows)return null;const l=n.expandedRows,s=l.toggledIds.map(()=>l.isExpanded(a)),c=e.prop(o==="expanded"||l.renderedOnce.has(a));if(o==="expanded"&&l.renderedOnce.add(a),!c.value){const u=e.Value.on(s,i=>{i&&!c.value&&(l.renderedOnce.add(a),c.set(!0),u())})}return e.html.tr(e.attr.class("bc-data-table__detail-row"),e.style.display(s.map(u=>u?"":"none")),e.html.td(e.attr.class("bc-data-table__detail-cell"),e.attr.colspan(n.totalColSpan),e.When(c,()=>e.html.div(n.rowDetails.render(t)))))}function en(t){const{dataSource:a,column:n,sortable:r=!1,hideable:o=!1,size:l="md",onHideColumn:s,hideableColumns:c,hiddenColumns:u,onToggleColumn:i,onResetColumns:p,filterContent:m,hasActiveFilter:h,onClearFilter:d}=t,f=r?a.getSortDirection(n):void 0;return e.Use(k.BeatUII18n,b=>{const g=b.$.dataTable;return Ve.Menu({items:()=>{const v=[],C=f?.value;if(r){const y=[Ve.MenuItem({key:"sort-asc",content:g.map(V=>V.menuSortAsc),before:k.Icon({icon:"line-md:arrow-small-up",size:l}),disabled:f?.map(V=>V==="asc"),onClick:()=>a.setSort([{column:n,direction:"asc"}])}),Ve.MenuItem({key:"sort-desc",content:g.map(V=>V.menuSortDesc),before:k.Icon({icon:"line-md:arrow-small-down",size:l}),disabled:f?.map(V=>V==="desc"),onClick:()=>a.setSort([{column:n,direction:"desc"}])})];C!=null&&y.push(Ve.MenuItem({key:"clear-sort",content:g.map(V=>V.menuClearSort),before:k.Icon({icon:"line-md:arrows-vertical",size:l}),onClick:()=>{const V=a.sort.value.filter(w=>w.column!==n);a.setSort(V)}})),v.push(y)}if(m!=null){const y=[Ve.MenuItem({key:"filter",content:g.map(V=>V.menuFilter??"Filter"),before:k.Icon({icon:"lucide:filter",size:l}),submenu:()=>[e.html.div(e.on.click(V=>V.stopPropagation()),m)]})];d&&h&&y.push(e.When(h,()=>Ve.MenuItem({key:"clear-filter",content:g.map(V=>V.clearFilter),before:k.Icon({icon:"lucide:filter-x",size:l}),onClick:d}))),v.push(y)}if(o&&s&&v.push([Ve.MenuItem({key:"hide-column",content:g.map(y=>y.menuHideColumn),before:k.Icon({icon:"lucide:eye-off",size:l}),onClick:s})]),c&&c.length>0&&u&&i){const y=[Ve.MenuItem({key:"choose-columns",content:g.map(V=>V.menuChooseColumns),before:k.Icon({icon:"lucide:columns-3",size:l}),submenu:()=>[e.html.div(e.attr.class("bc-data-table__column-toggle-panel"),e.on.click(V=>V.stopPropagation()),...c.map(V=>ee.CheckboxInput({value:u.map(w=>!w.has(V.id)),onChange:()=>i(V.id),placeholder:V.label})),e.When(u.map(V=>V.size>0),()=>p?se.Button({size:"xs",variant:"outline",onClick:()=>p()},g.$.showAllColumns):null))]})];p&&y.push(e.When(u.map(V=>V.size>0),()=>Ve.MenuItem({key:"reset-columns",content:g.map(V=>V.menuResetColumns),before:k.Icon({icon:"lucide:rotate-ccw",size:l}),onClick:p}))),v.push(y)}const _=[];for(let y=0;y<v.length;y++)y>0&&_.push(Ve.MenuSeparator()),_.push(...v[y]);return _},placement:"bottom-end",showOn:"click"})})}function To(t){return t==="checked"?!0:t==="indeterminate"?"mixed":!1}function Fo(t){return t==="unchecked"?"checked":t==="checked"?"indeterminate":"unchecked"}const tn=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,placeholder:l,disabled:s,id:c,activeIcon:u,inactiveIcon:i,indeterminateIcon:p,size:m="md"}=t,h=c??Fe.sessionId("tri-state-checkbox"),d=`${h}-label`,f=()=>{if(e.Value.get(s??!1))return;const _=e.Value.get(a),y=Fo(_);r?.(y),o?.(y)},b=_=>{e.Value.get(s??!1)||(_.key===" "||_.key==="Enter")&&(_.preventDefault(),f())},g=e.Value.map(a,_=>_==="checked"?"bc-checkbox-input__checkbox--checked":_==="indeterminate"?"bc-checkbox-input__checkbox--indeterminate":"bc-checkbox-input__checkbox--unchecked"),v=e.Value.map(a,_=>To(_)),C=e.computedOf(a,u,i,p)((_,y,V,w)=>_==="checked"?y??"ri:checkbox-fill":_==="indeterminate"?w??"mdi:checkbox-indeterminate-outline":V??"mdi:checkbox-blank-outline");return se.InputContainer({baseContainer:!0,growInput:!1,...t,input:e.html.span(e.attr.class("bc-checkbox-input"),e.html.span(e.attr.class("bc-checkbox-input__checkbox"),e.attr.class(g),e.attr.class(e.Value.map(s??!1,_=>_?"bc-checkbox-input__checkbox--disabled":"")),e.attr.id(h),e.attr.role("checkbox"),e.attr.tabindex(e.Value.map(s??!1,_=>_?-1:0)),e.aria.checked(v),e.aria.disabled(s),l!=null?e.aria.labelledby(d):e.Empty,e.on.keydown(b),n!=null?e.on.blur(n):e.Empty,k.Icon({icon:C,accessibility:"decorative",size:m})),l!=null?e.html.label(e.attr.class("bc-checkbox-input__label"),e.attr.id(d),e.attr.for(h),rt.MutedLabel(l)):e.Empty)},e.on.click(f))};function ra({dataSource:t,rowId:a,isSelected:n,size:r="md"}){return ee.CheckboxInput({size:r,value:n,onChange:()=>t.toggleSelect(e.Value.get(a))})}function an({dataSource:t,size:a="md"}){const n=e.computedOf(t.isAllSelected,t.isSomeSelected)((r,o)=>r?"checked":o?"indeterminate":"unchecked");return tn({size:a,value:n,onChange:()=>{t.isAllSelected.value?t.deselectAll():t.selectAll()}})}function Po(t,a){if(!Ka(t))return;const n=Za(t);return Do(n,a.ds,t.id,a.size)??void 0}function Eo(t,a,n){const r=n.ds.getColumnFilters(t.id),o=r.map(d=>d.length>0),l=t.sortable!=null?t.sortable:!1,s=t.hideable!=null?typeof t.hideable=="boolean"?t.hideable:t.hideable.value:!1,c=Ka(t),u=e.computedOf(n.sortable,l)((d,f)=>!!d&&!!f),i=c?e.computedOf(a,o)((d,f)=>d&&f):!1,p=c?Po(t,n):void 0,m=c?a:!1,h=e.computedOf(u,m)((d,f)=>d||f||s);return e.html.span(e.attr.class("bc-column-header-menu"),e.When(i,()=>e.html.span(e.attr.class("bc-sortable-header__icon bc-sortable-header__icon--active"),e.on.click(d=>d.stopPropagation()),k.Icon({icon:"lucide:filter",size:n.size}),Ve.Flyout({content:()=>e.html.div(e.attr.class("bc-column-filter-panel"),e.on.click(d=>d.stopPropagation()),p??null),placement:"bottom-end",showOn:"click",showDelay:0,hideDelay:0}),e.Use(k.BeatUII18n,d=>{const f=e.computedOf(d.$.dataTable.$.describeFilter,r)((b,g)=>g.map(v=>xt(v,b)).join(", "));return dt({content:f,showDelay:300})}))),e.When(h,()=>e.html.span(e.attr.class("bc-sortable-header__menu"),e.on.click(d=>d.stopPropagation()),k.Icon({icon:"lucide:ellipsis-vertical",size:n.size}),e.MapSignal(e.computedOf(u,m)((d,f)=>({s:d,f})),({s:d,f})=>en({dataSource:n.ds,column:t.id,sortable:d,hideable:s,size:n.size,onHideColumn:s?()=>n.toggleColumnVisibility(t.id):void 0,filterContent:f?p:void 0,hasActiveFilter:f?o:void 0,onClearFilter:f&&c?()=>n.ds.removeFilter(t.id):void 0})))))}function Ao(t,a){return{reorderable:a.reorderableColumns,onDragStart:n=>{if(!e.Value.get(a.reorderableColumns))return;a.dragState.columnId=t,n.dataTransfer&&(n.dataTransfer.effectAllowed="move",n.dataTransfer.setData("text/plain",t)),n.currentTarget.classList.add("bc-data-table__header--dragging")},onDragOver:n=>{if(!e.Value.get(a.reorderableColumns)||a.dragState.columnId==null||a.dragState.columnId===t)return;n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.currentTarget.classList.add("bc-data-table__header--drag-over")},onDrop:n=>{if(!e.Value.get(a.reorderableColumns)||(n.preventDefault(),n.currentTarget.classList.remove("bc-data-table__header--drag-over"),a.dragState.columnId==null||a.dragState.columnId===t))return;const o=[...a.columnOrder.value],l=o.indexOf(a.dragState.columnId),s=o.indexOf(t);l<0||s<0||(o.splice(l,1),o.splice(s,0,a.dragState.columnId),a.columnOrder.set(o),a.onColumnOrderChange?.(o),a.dragState.columnId=null)},onDragEnd:n=>{if(!e.Value.get(a.reorderableColumns))return;a.dragState.columnId=null;const r=n.currentTarget;r.classList.remove("bc-data-table__header--dragging"),r.closest("tr")?.querySelectorAll(".bc-data-table__header--drag-over").forEach(o=>o.classList.remove("bc-data-table__header--drag-over"))}}}function Bo(t,a){return e.MapSignal(t,n=>{const r=a.getCol(n),o=typeof r.header=="string"?r.header:r.header(),l=e.computedOf(a.hasFilters,a.filterLayout)((p,m)=>p&&m==="header"),s=Eo(r,l,a),c=Ao(r.id,a),u=r.sortable!=null?r.sortable:!1,i=e.computedOf(a.sortable,u)((p,m)=>!!p&&!!m);return e.When(i,()=>Xa({dataSource:a.ds,column:r.id,size:a.size,menu:s,multiSort:a.multiSort,draggable:c.reorderable,onDragStart:c.onDragStart,onDragOver:c.onDragOver,onDrop:c.onDrop,onDragEnd:c.onDragEnd},o),()=>e.html.th(e.attr.draggable(e.Value.map(c.reorderable,p=>p?"true":void 0)),e.on.dragstart(c.onDragStart),e.on.dragover(c.onDragOver),e.on.drop(c.onDrop),e.on.dragend(c.onDragEnd),r.width!=null?e.style.width(r.width):null,r.minWidth!=null?e.style.minWidth(r.minWidth):null,r.maxWidth!=null?e.style.maxWidth(r.maxWidth):null,r.align!=null?e.style.textAlign(e.Value.map(r.align,p=>p)):null,e.html.div(e.attr.class("bc-sortable-header__content"),e.html.span(e.attr.class("bc-sortable-header__label"),o),s!=null?e.html.span(e.attr.class("bc-sortable-header__icons"),e.html.span(e.attr.class("bc-sortable-header__menu"),e.on.click(p=>p.stopPropagation()),s)):null)))})}function Lo(t,a){return e.MapSignal(t,n=>{const r=a.getCol(n),o=Za(r);return Oo(o,a.ds,n,a.size)})}function _a(t){return e.When(t.selectable,()=>e.html.th(e.attr.class("bc-data-table__selection-header"),e.html.div(e.attr.class("bc-data-table__selection-cell"),an({dataSource:t.ds,size:t.size}))))}function wa(t){return e.When(t.selectable,()=>e.html.th())}function Mo(t){return e.html.tr(Ja(t),e.When(e.Value.map(t.selectionAfter,a=>!a),()=>_a(t)),e.ForEach(t.visibleColumns,a=>Bo(a,t)),e.When(t.selectionAfter,()=>_a(t)))}function No(t){const a=e.computedOf(t.hasFilters,t.filterLayout)((n,r)=>n&&r==="row");return e.When(a,()=>e.html.tr(e.attr.class("bc-data-table__filter-row"),Qa(t),e.When(e.Value.map(t.selectionAfter,n=>!n),()=>wa(t)),e.ForEach(t.visibleColumns,n=>Lo(n,t)),e.When(t.selectionAfter,()=>wa(t))))}function nn(t){const{visible:a,message:n,size:r="lg"}=t;return e.When(a,()=>e.html.div(e.attr.class("bc-loading-overlay"),e.html.div(e.attr.class("bc-loading-overlay__content"),k.Icon({icon:"line-md:loading-twotone-loop",size:r}),n!=null?e.html.span(e.attr.class("bc-loading-overlay__message"),n):e.Empty)))}function rn(t,a,n,r){return e.MapSignal(t,o=>{const l=r.getCol(o);return e.html.td(l.align!=null?e.style.textAlign(e.Value.map(l.align,s=>s)):null,l.width!=null?e.style.width(l.width):null,l.maxWidth!=null?e.style.maxWidth(l.maxWidth):null,l.cell(n,a))})}function Wo(t){return e.ForEach(t.ds.rows,a=>{const n=a.map(t.rowId),r=e.computedOf(n,t.ds.selected)((c,u)=>u.has(c)),o=()=>e.When(t.selectable,()=>e.html.td(e.on.click(c=>c.stopPropagation()),e.html.div(e.attr.class("bc-data-table__selection-cell"),ra({dataSource:t.ds,rowId:n,isSelected:r,size:t.size})))),l=e.computedOf(r,t.rowClickable)((c,u)=>{let i="bc-data-table__row";return c&&(i+=" bc-data-table__row--selected"),u&&(i+=" bc-data-table__row--clickable"),i}),s=t.rowId(a.value);return e.Fragment(e.html.tr(e.attr.class(l),e.on.click(()=>{t.selectOnRowClickSignal.value&&t.selectableSignal.value&&t.ds.toggleSelect(n.value),t.onRowClick?.(a.value)}),aa(a,s,t),e.When(e.Value.map(t.selectionAfter,c=>!c),()=>o()),e.ForEach(t.visibleColumns,(c,u)=>rn(c,u.index,a,t)),e.When(t.selectionAfter,()=>o())),na(a,s,t))})}function Uo(t,a){const n=a.rowId(t),r=e.computedOf(n,a.ds.selected)((c,u)=>u.has(c)),o=e.Value.toSignal(t),l=()=>e.When(a.selectable,()=>e.html.td(e.on.click(c=>c.stopPropagation()),e.html.div(e.attr.class("bc-data-table__selection-cell"),ra({dataSource:a.ds,rowId:n,isSelected:r,size:a.size})))),s=e.computedOf(r,a.rowClickable)((c,u)=>{let i="bc-data-table__row";return c&&(i+=" bc-data-table__row--selected"),u&&(i+=" bc-data-table__row--clickable"),i});return e.Fragment(e.html.tr(e.attr.class(s),e.on.click(()=>{a.selectOnRowClickSignal.value&&a.selectableSignal.value&&a.ds.toggleSelect(n),a.onRowClick?.(t)}),aa(o,n,a),e.When(e.Value.map(a.selectionAfter,c=>!c),()=>l()),e.ForEach(a.visibleColumns,(c,u)=>rn(c,u.index,o,a)),e.When(a.selectionAfter,()=>l())),na(o,n,a))}function Ro(t){const a=e.computedOf(t.visibleColumns,t.selectableSignal)((o,l)=>o.length+(l?1:0)+(t.hasToggleColumn?1:0)),n=e.computedOf(t.visibleColumns,t.selectableSignal)((o,l)=>{const s=o.findIndex(c=>t.getCol(c).footer!=null);return s<0?o.length+(l?1:0)+(t.hasToggleColumn?1:0):s+(l?1:0)+(t.hasToggleColumn?1:0)}),r=t.hasFooter;return e.MapSignal(t.currentGroupPageGroups,o=>e.Fragment(...o.map(l=>{const s=t.collapsedGroups.map(u=>u.has(l.key)),c=()=>{const u=new Set(t.collapsedGroups.value);u.has(l.key)?u.delete(l.key):u.add(l.key),t.collapsedGroups.set(u)};return e.Fragment(e.Use(k.BeatUII18n,u=>e.html.tr(e.attr.class("bc-data-table__group-header"),e.on.click(()=>{t.groupCollapsible&&c()}),e.html.td(e.When(s,()=>e.attr.colspan(n),()=>e.attr.colspan(a)),e.html.div(e.attr.class("bc-data-table__group-header-content"),t.groupCollapsible?e.html.span(e.attr.class(s.map(i=>i?"bc-data-table__group-toggle bc-data-table__group-toggle--collapsed":"bc-data-table__group-toggle")),e.aria.label(s.map(i=>{const p=u.value.dataTable;return i?p.expandGroup??"Expand group":p.collapseGroup??"Collapse group"})),k.Icon({icon:"lucide:chevron-down",size:"sm"})):null,e.html.span(e.attr.class("bc-data-table__group-label"),l.key),e.html.span(e.attr.class("bc-data-table__group-count"),(()=>{const i=u.value.dataTable.groupCount;return i?i(l.rows.length):`(${l.rows.length})`})()),t.groupSummary!=null?e.When(s,()=>e.html.span(e.attr.class("bc-data-table__group-footer-summary"),t.groupSummary(l.key,l.rows))):null)),e.When(s,()=>r?e.When(t.showFooter,()=>e.ForEach(t.visibleColumns,(i,p)=>e.MapSignal(i,m=>{const h=t.getCol(m);return h.footer?e.html.td(e.attr.class("bc-data-table__footer-row bc-data-table__group-footer-row"),h.align!=null?e.style.textAlign(e.Value.map(h.align,d=>d)):null,h.footer(e.Value.toSignal(l.rows))):e.When(n.map(d=>d<p.index),()=>e.html.td())}))):null))),e.When(s.map(u=>!u),()=>e.Fragment(...l.rows.map(u=>Uo(u,t)),r?e.When(t.showFooter,()=>e.html.tr(e.attr.class("bc-data-table__footer-row bc-data-table__group-footer-row"),t.hasToggleColumn?e.html.td():null,e.When(t.selectable,()=>e.html.td()),e.ForEach(t.visibleColumns,u=>e.MapSignal(u,i=>{const p=t.getCol(i);return p.footer?e.html.td(p.align!=null?e.style.textAlign(e.Value.map(p.align,m=>m)):null,p.footer(e.Value.toSignal(l.rows))):e.html.td()})))):null)))})))}function Ca(t){return e.When(t.ds.rows.map(a=>a.length===0),()=>e.Use(k.BeatUII18n,a=>e.html.tr(e.html.td(e.attr.colspan(t.totalColSpan),e.attr.class("bc-data-table__empty"),t.emptyContent??a.$.dataTable.map(n=>n.noResults)))))}function zo(t){return e.Use(k.BeatUII18n,a=>nn({visible:t.loading,message:a.$.dataTable.map(n=>n.loading),size:"lg"}))}function Ho(t){return t.hasFooter?e.When(t.showFooter,()=>e.html.tr(e.attr.class("bc-data-table__footer-row"),t.hasToggleColumn?e.html.td():null,e.When(t.selectable,()=>e.html.td()),e.ForEach(t.visibleColumns,a=>e.MapSignal(a,n=>{const r=t.getCol(n);return r.footer?e.html.td(r.align!=null?e.style.textAlign(e.Value.map(r.align,o=>o)):null,r.footer(t.ds.allFilteredRows)):e.html.td()})))):null}function jo(t){if(t.hideableColumns.length===0)return null;const a=t.hiddenColumns.map(n=>n.length>0);return e.Use(k.BeatUII18n,n=>e.html.div(e.attr.class("bc-data-table__column-toggle"),e.html.button(e.attr.type("button"),e.attr.class(a.map(r=>r?"bc-data-table__column-toggle-btn bc-data-table__column-toggle-btn--active":"bc-data-table__column-toggle-btn")),k.Icon({icon:"lucide:columns-3",size:t.size}),e.html.span(e.attr.class("bc-data-table__column-toggle-label"),n.$.dataTable.map(r=>r.columnVisibility)),Ve.Flyout({content:()=>e.html.div(e.attr.class("bc-data-table__column-toggle-panel"),e.on.click(r=>r.stopPropagation()),...t.hideableColumns.map(r=>ee.CheckboxInput({value:t.hiddenColumns.map(o=>!o.includes(r.id)),onChange:()=>t.toggleColumnVisibility(r.id),placeholder:typeof r.header=="string"?r.header:r.id,size:"sm"})),e.When(a,()=>se.Button({size:"xs",variant:"outline",onClick:()=>t.showAllColumns()},n.$.dataTable.map(r=>r.showAllColumns)))),placement:"bottom-end",showOn:"click",showDelay:0,hideDelay:0}))))}function qo(t){const{size:a="md",stickyHeader:n=!1,fullWidth:r=!1,withStripedRows:o=!1,withTableBorder:l=!0,withColumnBorders:s=!1,withRowBorders:c=!0}=t,u=$o(t),i=e.computedOf(u.ds.totalFilteredRows,u.ds.totalRows)((g,v)=>({filtered:g,total:v})),p=jo(u),m=e.MapSignal(u.toolbarConfig,g=>g===!1?null:Ra({dataSource:u.ds,showSort:g.showSort??!0,showFilters:g.showFilters??!0,showSelection:g.showSelection??!0,bulkActions:g.bulkActions??[]})),h=e.html.div(e.attr.class("bc-data-table__wrapper"),zo(u),La({size:a,hoverable:u.effectiveHoverable,stickyHeader:n,fullWidth:r,withStripedRows:o,withTableBorder:l,withColumnBorders:s,withRowBorders:c},e.html.thead(Mo(u),No(u)),e.html.tbody(e.When(u.ds.groupBy.map(g=>g!=null),()=>e.Fragment(Ro(u),Ca(u)),()=>e.Fragment(Wo(u),Ca(u)))),e.html.tfoot(Ho(u)))),d=e.When(u.showPagination,()=>e.html.div(e.attr.class("bc-data-table__pagination"),e.Use(k.BeatUII18n,g=>e.html.div(e.attr.class("bc-data-table__row-count"),e.computedOf(u.pageSizeSignal,u.effectiveCurrentPage,i.$.filtered,i.$.total)((v,C,_,y)=>{const V=(C-1)*v+1,w=Math.min(C*v,_);return g.value.paginationRange(V,w,_,y)}))),Ua({currentPage:u.effectiveCurrentPage,totalPages:u.effectiveTotalPages,onChange:g=>u.setEffectivePage(g),siblings:e.Value.map(u.paginationConfig,g=>g===!1?1:g.siblings??1),showFirstLast:e.Value.map(u.paginationConfig,g=>g===!1?!1:g.showFirstLast??!1),showPrevNext:!0,size:a,responsive:e.Value.map(u.paginationConfig,g=>g===!1?!1:g.responsive??!1)}))),f=e.Fragment(p,m,h,d);return e.Value.get(n)?e.html.div(e.attr.class("bc-data-table"),e.OnDispose(()=>{u.dispose(),i.dispose()}),f):e.Fragment(e.OnDispose(()=>{u.dispose(),i.dispose()}),f)}function on({value:t,onChange:a,disabled:n,size:r="md"}){return e.Use(k.BeatUII18n,o=>J.SegmentedInput({size:r,variant:"squared",value:t,disabled:n,options:{system:e.html.span(e.attr.title(o.$.appearanceSystem),k.Icon({icon:"line-md:laptop",color:"gray"})),light:e.html.span(e.attr.title(o.$.appearanceLight),k.Icon({icon:"line-md:sunny-twotone-loop",color:"yellow"})),dark:e.html.span(e.attr.title(o.$.appearanceDark),k.Icon({icon:"line-md:sunny-outline-to-moon-alt-loop-transition",color:"blue"}))},onChange:a}))}function Go(t){return e.Use(ut.Theme,({appearancePreference:a,setAppearancePreference:n})=>on({value:a,onChange:n,size:t?.size}))}function Yo({value:t,onChange:a,onInput:n}){return e.html.div(e.attr.class("bc-color-input__swatch-container"),e.html.span(e.attr.class("bc-color-input__swatch"),e.input.color(e.attr.class("bc-color-input__swatch-native"),e.attr.value(t),a!=null?e.on.change(e.emitValue(a)):e.Empty,n!=null?e.on.input(e.emitValue(n)):e.Empty),e.attr.style(e.Value.map(t,r=>`background-color: ${r}`))))}function ln(t){const{value:a="#000000",onBlur:n,onChange:r,onInput:o,swatchSize:l,...s}=t;return se.InputContainer({...s,input:e.input.text(Ee.CommonInputAttributes(t),e.attr.value(a),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(r)):e.Empty,o!=null?e.on.input(e.emitValue(o)):e.Empty)},e.attr.class("bc-color-input"),Yo({value:a,onChange:t.onChange,onInput:t.onInput}))}const Zo=t=>{const{value:a,onChange:n,onInput:r,onBlur:o,after:l,disabled:s,...c}=t,u=J.NullableResetAfter(a,s,n??r);return ln({...c,disabled:s,value:e.Value.map(a,X.nullToEmpty),onChange:n!=null?i=>n(X.emptyToNull(i)):void 0,onInput:r!=null?i=>r(X.emptyToNull(i)):void 0,onBlur:o,after:l!=null?e.Fragment(u,l):u})},Ko=t=>{const{value:a,onChange:n,onInput:r,onBlur:o,after:l,disabled:s,...c}=t,u=J.NullableResetAfter(a,s,n??r);return X.ColorSwatchInput({...c,disabled:s,value:e.Value.map(a,X.nullToEmpty),onChange:n!=null?i=>n(X.emptyToNull(i)):void 0,onInput:r!=null?i=>r(X.emptyToNull(i)):void 0,onBlur:o,after:l!=null?e.Fragment(u,l):u})},oa=t=>{const{onChange:a,onInput:n,onBlur:r,role:o,display:l,optionsSource:s,allowSpaceToggle:c=!1,onBeforeOpen:u,onAfterOpen:i,buildListboxContent:p}=t,m=e.prop(!1),h=e.prop(-1),d=e.prop(null),f=Fe.sessionId("dropdown"),b=Fe.sessionId("listbox");let g,v;m.onChange(y=>{y||(h.set(-1),d.set(null))});const C=y=>{a?.(y),n?.(y),m.set(!1),g?.focus()},_=y=>{const V=Le.getValues(e.Value.get(s));switch(y.key){case"ArrowDown":{if(y.preventDefault(),!m.value)m.set(!0),V.length>0&&(h.set(0),d.set(V[0]));else{const w=Math.min(h.value+1,V.length-1);h.set(w),d.set(V[w]??null)}break}case"ArrowUp":{if(y.preventDefault(),m.value){const w=Math.max(h.value-1,0);h.set(w),d.set(V[w]??null)}break}case"Enter":{if(y.preventDefault(),m.value&&h.value>=0){const w=V[h.value];w!=null&&C(w)}else{u?.();const w=Le.getValues(e.Value.get(s));m.set(!0),w.length>0&&(h.set(0),d.set(w[0])),setTimeout(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{i?.()})})},0)}break}case"Escape":{m.value&&(y.preventDefault(),m.set(!1),g?.focus());break}case" ":{if(e.Value.get(c)){y.preventDefault();const w=Le.getValues(e.Value.get(s));m.set(!m.value),m.value&&w.length>0&&(h.set(0),d.set(w[0]))}break}}};return se.InputContainer({...t,input:J.Group(e.attr.class("bc-dropdown__trigger"),e.html.span(e.attr.class("bc-dropdown__display"),l)),after:e.Fragment(se.InputIcon({icon:"ph:caret-up-down-bold",color:"neutral",size:"sm"}),t.after)},$e.ElementRect(y=>e.Fragment(e.WithElement(V=>{g=V;const w=()=>{if(m.value)m.set(!1);else{u?.();const S=Le.getValues(e.Value.get(s));m.set(!0),S.length>0&&(h.set(0),d.set(S[0])),setTimeout(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{i?.()})})},0)}};return V.addEventListener("keydown",_),V.addEventListener("click",w),e.OnDispose(()=>{V.removeEventListener("keydown",_),V.removeEventListener("click",w)})}),Ee.CommonInputAttributes(t),e.attr.id(f),e.attr.tabindex(0),e.aria.controls(b),e.aria.expanded(m),e.attr.class("bc-dropdown"),e.attr.role(o),e.aria.activedescendant(e.computedOf(m,d)((V,w)=>V&&w!=null?`dropdown-option-${String(w)}`:"")),r!=null?e.on.blur(()=>{requestAnimationFrame(()=>{!v?.contains(document.activeElement)&&!g?.contains(document.activeElement)&&(m.set(!1),r())})}):e.Empty,Ve.Flyout({content:()=>e.html.div(e.WithElement(V=>{v=V}),e.style.minWidth(y.$.width.map(V=>`${V-10}px`)),e.attr.class("bc-dropdown__listbox"),e.attr.role("listbox"),e.attr.id(b),e.aria.labelledby(f),p({dropdownId:f,listboxId:b,focusedValue:d,handleKeyDown:_,onSelect:C})),mainAxisOffset:0,placement:"bottom-start",hasPopup:"listbox",open:m,showOn:"never",showDelay:0,hideDelay:0,closable:!0}))))},sn=(t,a,n,r,o)=>e.Ensure(t,l=>e.OneOfType(l,{value:s=>{const c=e.computedOf(s,n)((i,p)=>a(i.value,p)),u=e.computedOf(s,o)((i,p)=>p!=null&&a(i.value,p));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(c,u,s)((i,p,m)=>{const h=[];return i&&h.push("bc-dropdown__option--selected"),p&&h.push("bc-dropdown__option--focused"),m.disabled&&h.push("bc-dropdown__option--disabled"),h.join(" ")})),e.attr.role("option"),e.attr.id(s.map(i=>`dropdown-option-${String(i.value)}`)),e.aria.selected(c),J.Expando("value",s.$.value),e.When(s.map(i=>!i.disabled),()=>e.on.click(()=>r(s.value.value)),()=>e.Empty),e.html.div(e.attr.class("bc-dropdown__option-content"),s.value.before&&e.html.span(e.attr.class("bc-dropdown__option-before"),s.value.before),e.html.span(e.attr.class("bc-dropdown__option-label"),s.$.label),s.value.after&&e.html.span(e.attr.class("bc-dropdown__option-after"),s.value.after)))},group:s=>e.html.div(e.attr.class("bc-dropdown__group"),e.attr.role("group"),e.aria.label(s.$.group),e.html.div(e.attr.class("bc-dropdown__group-label"),s.$.group),e.ForEach(s.$.options,c=>sn(c,a,n,r,o))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),cn=t=>{const{value:a,options:n,unselectedLabel:r,equality:o=(i,p)=>i===p,placeholder:l,searchable:s=!1}=t,c=e.computedOf(a,n)((i,p)=>{if(i==null)return"";const m=h=>{for(const d of h){if(d.type==="value"&&o(d.value,i))return d.label;if(d.type==="group"){const f=m(d.options);if(f)return f}}};return m(p)||String(i)}),u=e.computedOf(s)(i=>!i);return oa({...t,role:"dropdown",display:e.When(c.map(i=>i.length>0),()=>c,()=>e.Use(k.BeatUII18n,i=>e.coalesce(l,r,i.$.selectOne))),optionsSource:n,allowSpaceToggle:u,buildListboxContent:({focusedValue:i,onSelect:p})=>e.ForEach(n,m=>sn(m,o,a,p,i))})},un=t=>{const{controller:a,onChange:n,onBlur:r,...o}=t;return cn({...o,value:a.signal,onChange:ee.makeOnChangeHandler(a,n),onBlur:ee.makeOnBlurHandler(a,r)})},Xo=t=>ee.Field({...t,content:un(t)}),dn=(t,a,n,r,o,l)=>e.Ensure(t,s=>e.OneOfType(s,{value:c=>{const u=e.computedOf(c,n)((p,m)=>m!=null&&a(p.value,m)),i=e.computedOf(c,o)((p,m)=>m!=null&&a(p.value,m));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(u,i,c)((p,m,h)=>{const d=[];return p&&d.push("bc-dropdown__option--selected"),m&&d.push("bc-dropdown__option--focused"),h.disabled&&d.push("bc-dropdown__option--disabled"),d.join(" ")})),e.attr.role("option"),e.attr.id(c.map(p=>`dropdown-option-${String(p.value)}`)),e.aria.selected(u),e.When(c.map(p=>!p.disabled),()=>e.on.click(()=>r(c.value.value)),()=>e.Empty),e.html.div(e.attr.class("bc-dropdown__option-content"),c.value.before&&e.html.span(e.attr.class("bc-dropdown__option-before"),c.value.before),e.html.span(e.attr.class("bc-dropdown__option-label"),l(c.$.value)),c.value.after&&e.html.span(e.attr.class("bc-dropdown__option-after"),c.value.after)))},group:c=>e.html.div(e.attr.class("bc-dropdown__group"),e.attr.role("group"),e.aria.label(c.$.group),e.html.div(e.attr.class("bc-dropdown__group-label"),c.$.group),e.ForEach(c.$.options,u=>dn(u,a,n,r,o,l))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),pn=t=>{const{value:a,loadOptions:n,renderOption:r,renderValue:o,equality:l=(_,y)=>_===y,placeholder:s,searchPlaceholder:c,debounceMs:u=150,autoFocusSearch:i=!0}=t,p=e.prop(""),m=e.prop(!1),h=e.prop([]);let d;const f=e.Value.toSignal(a),b=()=>(o??r)(f);let g=null;const v=_=>{m.set(!0),Promise.resolve(n(_)).then(y=>{h.set(y??[])}).catch(()=>{h.set([])}).finally(()=>m.set(!1))},C=_=>{g!=null&&(clearTimeout(g),g=null),g=setTimeout(()=>{v(_)},Math.max(0,u))};return oa({...t,role:"combobox",display:e.When(e.computedOf(a)(_=>_!=null),b,()=>e.Use(k.BeatUII18n,_=>_.$.selectOne)),optionsSource:h,onBeforeOpen:()=>{const _=e.Value.get(p);C(_)},onAfterOpen:()=>{i&&d?.focus()},buildListboxContent:({focusedValue:_,handleKeyDown:y,onSelect:V})=>e.Fragment(e.html.div(e.attr.class("bc-dropdown__search"),e.html.input(e.attr.type("text"),e.attr.class("bc-dropdown__search-input"),e.attr.placeholder(e.computedOf(c,s)((w,S)=>w??S??"Search")),e.attr.value(p),e.WithElement(w=>(d=w,e.Empty)),e.on.input(w=>{const S=w.target;p.set(S.value),C(S.value)}),e.on.keydown(y))),e.When(m,()=>e.html.div(e.attr.class("bc-dropdown__loading"),k.Icon({icon:"ph:spinner-bold",color:"neutral"})),()=>e.ForEach(h,w=>dn(w,l,f,V,_,r))))})},mn=t=>{const{controller:a,onChange:n,onBlur:r,...o}=t;return pn({...o,value:a.signal,onChange:ee.makeOnChangeHandler(a,n),onBlur:ee.makeOnBlurHandler(a,r)})},Jo=t=>ee.Field({...t,content:mn(t)});function la(t){const{values:a,options:n,equality:r,disabled:o,onRemove:l}=t;return e.NotEmpty(a,()=>e.ForEach(a,s=>nt({variant:"light",onClose:()=>l(s.value),disabled:o},e.computedOf(s,n)((c,u)=>Ha(u,c,r)))),()=>e.html.span(e.attr.class("bc-input-container__placeholder"),t.placeholder))}function sa(t){const{value:a,options:n,equality:r=(i,p)=>i===p,placeholder:o}=t,l=i=>{const p=e.Value.get(a);t.onChange?.(Qt(p,i,r))},s=i=>{const p=e.Value.get(a);t.onChange?.(Jt(p,i,r))},c=i=>e.computedOf(a)(p=>Vt(p,i,r)),u=Ve.Menu({items:()=>{const i=e.Value.get(n),p=[];for(const m of i)if(m.type==="value"){const h=c(m.value);p.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(m.disabled===!0),e.aria.checked(h),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),m.label),e.on.click(()=>s(m.value))))}else m.type==="group"?p.push(e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),m.group),...m.options.map(h=>{if(h.type==="value"){const d=c(h.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(h.disabled===!0),e.aria.checked(d),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),h.label),e.on.click(()=>s(h.value)))}return e.Empty}))):p.push(Ve.MenuSeparator());return p},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:"click",closable:!0});return se.InputContainer({...t,before:t.before??se.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),u,la({values:a,placeholder:o,options:n,equality:r,disabled:t.disabled,onRemove:l})),after:se.InputIcon({icon:"line-md:plus",color:"neutral",size:"sm"})})}function Qo(t){return ee.BaseControl(sa,t)}function el(t){return ee.Control(sa,t)}function ia(t){const{value:a,options:n,equality:r=(d,f)=>d===f,placeholder:o,searchPlaceholder:l,filter:s}=t,c=e.prop(""),u=d=>{const f=e.Value.get(a);t.onChange?.(Qt(f,d,r))},i=d=>{const f=e.Value.get(a);t.onChange?.(Jt(f,d,r))},p=e.computedOf(n,c)((d,f)=>ea(d,f,s)),m=d=>e.Ensure(d,f=>e.OneOfType(f,{value:b=>{const g=e.computedOf(a,b)((v,C)=>Vt(v,C.value,r));return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(b.map(v=>v.disabled===!0)),e.aria.checked(g),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),b.$.label),e.on.click(()=>i(b.value.value)))},group:b=>e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),b.$.group),e.ForEach(b.$.options,m)),break:()=>Ve.MenuSeparator()})),h=Ve.Menu({items:()=>[e.When(p.map(d=>d.length===0),()=>e.html.div(e.attr.class("bc-dropdown__empty"),e.Use(k.BeatUII18n,d=>d.$.noResults))),e.ForEach(p,m)],placement:"bottom-start",showDelay:0,hideDelay:100,showOn:d=>e.WithElement(f=>{const b=f.querySelector(".bc-dropdown__search-input");if(b){const g=()=>d.set(!0);return b.addEventListener("focus",g),e.OnDispose(()=>{b.removeEventListener("focus",g)})}return e.Empty}),closable:!0});return se.InputContainer({...t,before:t.before??se.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),la({values:a,options:n,placeholder:o,equality:r,disabled:t.disabled,onRemove:u}),e.html.div(e.attr.class("bc-input-container__tags-selector"),e.html.input(e.attr.type("text"),e.attr.class("bc-dropdown__search-input"),e.attr.placeholder(e.computedOf(l,o)((d,f)=>d??f??"")),e.attr.value(c),e.on.input(d=>{const f=d.target;c.set(f.value)}),e.on.keydown(d=>{(d.key==="ArrowUp"||d.key==="ArrowDown"||d.key==="Enter"||d.key===" ")&&d.stopPropagation()})),h))})}function tl(t){return ee.BaseControl(ia,t)}function al(t){return ee.Control(ia,t)}const nl=t=>{const{value:a,onBlur:n,onChange:r}=t;return se.InputContainer({...t,input:e.input.date(Ee.CommonInputAttributes(t),e.attr.valueAsDate(a),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValueAsDate(r)):e.Empty)})},rl=t=>{const a=t.getFullYear(),n=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),l=t.getMinutes().toString().padStart(2,"0");return`${a}-${n}-${r}T${o}:${l}`},ol=t=>{const{value:a,onBlur:n,onChange:r}=t;return se.InputContainer({...t,input:e.input["datetime-local"](Ee.CommonInputAttributes(t),e.attr.value(e.Value.map(a,rl)),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(o=>r(new Date(o)))):e.Empty)})};function ll(t,...a){const{size:n="md",filled:r=!1}=t;return e.html.span(e.attr.class("bc-input-adornment"),e.attr.class(e.Value.map(n,o=>`bc-input-adornment--size-${o}`)),e.attr.class(e.Value.map(r,o=>o?"bc-input-adornment--filled":"")),e.html.span(e.attr.class("bc-input-adornment__content"),...a))}const sl=t=>$e.Query({request:t.request,load:t.load,convertError:String,success:({value:a})=>{const n=a.map(r=>r.map(o=>typeof o=="object"&&"id"in o&&"label"in o?Le.value(o.id,o.label):o));return J.NativeSelect({...t,options:n,unselectedLabel:t.unselectedLabel,equality:t.equality})},pending:()=>se.InputContainer({...t,disabled:!0,after:e.Fragment(se.InputIcon({icon:"ph:caret-up-down-bold",color:"neutral",size:"sm"}),t.after),input:e.html.select(e.attr.class("bc-native-select bc-input"),e.attr.disabled(!0),e.Use(k.BeatUII18n,a=>e.html.option(a.$.loadingShort)))})}),il=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:l,disabled:s,...c}=t,u=J.NullableResetAfter(a,s,r??o);return J.MaskInput({...c,value:e.Value.map(a,X.nullToEmpty),onChange:r!=null?i=>r(X.emptyToNull(i)):void 0,onInput:o!=null?i=>o(X.emptyToNull(i)):void 0,onBlur:n,after:l!=null?e.Fragment(u,l):u})};function cl(t,a,n){const r=["bc-tag-input",`bc-tag-input--${t}`];return a&&r.push("bc-tag-input--disabled"),n&&r.push("bc-tag-input--error"),r.join(" ")}function ul(t){const{values:a,onChange:n,placeholder:r="Add...",size:o="md",disabled:l=!1,maxTags:s,hasError:c=!1}=t,u=e.prop(""),i=h=>{const f=e.Value.get(a).filter(b=>b!==h);n?.(f)},p=h=>{const d=h.trim();if(!d)return;const f=e.Value.get(a),b=e.Value.get(s??1/0);f.includes(d)||f.length>=b||(n?.([...f,d]),u.set(""))},m=h=>{if(h.key==="Enter"||h.key===",")h.preventDefault(),p(u.value);else if(h.key==="Backspace"&&u.value===""){const d=e.Value.get(a);d.length>0&&i(d[d.length-1])}};return e.html.div(e.attr.class(e.computedOf(o,l,c)((h,d,f)=>cl(h??"md",d??!1,f??!1))),e.ForEach(a,h=>e.html.span(e.attr.class("bc-tag-input__tag"),e.html.span(e.attr.class("bc-tag-input__tag-text"),h),e.When(e.computedOf(l)(d=>!(d??!1)),()=>e.html.button(e.attr.type("button"),e.attr.class("bc-tag-input__tag-remove"),e.on.click(d=>{d.stopPropagation(),i(h.value)}),"×"),()=>e.Empty))),e.html.input(e.attr.class("bc-tag-input__input"),e.attr.type("text"),e.attr.placeholder(e.computedOf(a,r)((h,d)=>h.length===0?d??"Add...":"")),e.attr.disabled(l),e.attr.value(u),e.on.input(h=>{const d=h.target;u.set(d.value)}),e.on.keydown(m),e.on.blur(()=>{u.value.trim()&&p(u.value)})))}const dl=t=>{const{value:a,onChange:n,onBlur:r,before:o}=t,l=e.prop(""),s=u=>{n?.(e.Value.get(a).filter(i=>i!==u))},c=()=>{const u=l.value.trim(),i=e.Value.get(a);u===""||i.includes(u)||(l.set(""),n?.([...i,u]))};return se.InputContainer({...t,before:o??se.InputIcon({icon:"tabler:tag",size:t.size,color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),e.ForEach(a,u=>nt({variant:"light",onClose:()=>s(u.value),disabled:t.disabled},u)),e.input.text(Ee.CommonInputAttributes(t),e.attr.value(l),e.attr.class("bc-input bc-input-container__tags-input"),e.on.input(e.emitValue(u=>l.set(u))),n!=null?e.on.change(c):e.Empty,r!=null?e.on.blur(r):e.Empty))})};function pl(t,a){const n=["bc-radio-group",`bc-radio-group--${t}`];return a&&a.length>0&&n.push(a),n.join(" ")}function ml(t,a,n){const r=["bc-radio-group__item",`bc-radio-group__item--size-${t}`];return(a||n)&&r.push("bc-radio-group__item--disabled"),r.join(" ")}function hl({options:t,value:a,onChange:n,name:r,disabled:o=!1,orientation:l="vertical",size:s="md",class:c}){const u=r??Fe.sessionId("radio-group");return e.html.div(e.attr.class(e.computedOf(l,c)((i,p)=>pl(i??"vertical",p))),e.attr.role("radiogroup"),e.ForEach(t,i=>{const p=i.map(h=>h.disabled??!1),m=Fe.sessionId("radio");return e.html.label(e.attr.class(e.computedOf(s,o,p)((h,d,f)=>ml(h??"md",f??!1,d??!1))),e.html.input(e.attr.type("radio"),e.attr.name(u),e.attr.id(m),e.attr.value(i.map(h=>String(h.value))),e.attr.class("bc-radio-group__input"),e.attr.checked(e.computedOf(a,i)((h,d)=>h===d.value)),e.attr.disabled(e.computedOf(o,p)((h,d)=>(h??!1)||(d??!1))),e.on.change(()=>{e.Value.get(o)||(e.Value.get(i).disabled??!1)||n?.(e.Value.get(i).value)}),e.aria.disabled(e.computedOf(o,p)((h,d)=>(h??!1)||(d??!1)))),e.html.span(e.attr.class("bc-radio-group__indicator")),e.html.span(e.attr.class("bc-radio-group__label-container"),e.html.span(e.attr.class("bc-radio-group__label"),i.map(h=>h.label)),e.html.span(e.attr.class("bc-radio-group__description"),i.map(h=>h.description??""))))}))}function ct(t,a,n){return Math.min(Math.max(t,a),n)}function fl(t,a,n){return J.roundToStep(Math.round((t-a)/n)*n+a,n)}function ze(t,a,n){return n===a?0:(t-a)/(n-a)*100}function gl(t,a,n,r){const o=["bc-range-slider",`bc-range-slider--size-${t}`];return a&&o.push("bc-range-slider--disabled"),n&&o.push("bc-range-slider--readonly"),r==="vertical"&&o.push("bc-range-slider--vertical"),o.join(" ")}function bl(t){const a=k.backgroundValue(t,"solid","light"),n=k.backgroundValue(t,"solid","dark");return`--rs-color: ${a.backgroundColor}; --rs-color-dark: ${n.backgroundColor}`}function vl({min:t=0,max:a=100,step:n=1,disabled:r=!1,readonly:o=!1,size:l="md",color:s="primary",value:c,onChange:u,range:i,onRangeChange:p,points:m,onPointsChange:h,ticks:d,markers:f,showValue:b=!1,formatValue:g=y=>String(y),segmentStyles:v,renderThumb:C,orientation:_="horizontal"}){const y=m!=null?"multi":i!=null?"range":"single",V=y==="multi"?e.Value.get(m).length:y==="range"?2:1,w=e.Value.get(_)==="vertical",S=y==="multi"?e.Value.map(m,A=>[...A]):y==="range"?e.Value.map(i,A=>[A[0],A[1]]):e.Value.map(c??0,A=>[A]),$=e.prop(null);function N(A){if(y==="multi")h?.(A);else if(y==="range"){const B=[A[0],A[1]];B[0]>B[1]&&B.reverse(),p?.(B)}else u?.(A[0])}function D(){return!e.Value.get(r)&&!e.Value.get(o)}function M(A,B,j,ae){const te=e.Value.get(t),q=e.Value.get(a),ue=e.Value.get(n),Z=A.getBoundingClientRect();let F;w?F=ct(1-(j-Z.top)/Z.height,0,1):F=ct((B-Z.left)/Z.width,0,1);const I=te+F*(q-te),E=ct(fl(I,te,ue),te,q),H=e.Value.get(S);if(ae!=null){const ne=[...H];ne[ae]=E,N(ne)}else{let ne=0,ge=Math.abs(H[0]-E);for(let W=1;W<H.length;W++){const ce=Math.abs(H[W]-E);ce<ge&&(ne=W,ge=ce)}const be=[...H];be[ne]=E,$.set(ne),N(be)}}function Y(A){return e.computedOf(S,t)((B,j)=>B[A]??j)}function K(A,B){const j=Y(A),ae=e.computedOf(j,t,a)((te,q,ue)=>`${ze(te,q,ue)}%`);return e.html.div(e.attr.class("bc-range-slider__thumb-container"),w?e.style.bottom(ae):e.style.left(ae),e.When(b,()=>e.html.div(e.attr.class("bc-range-slider__value-label"),e.Value.map(j,te=>g(te))),()=>e.Empty),e.html.div(e.attr.class(C?"bc-range-slider__thumb-custom":"bc-range-slider__thumb"),e.attr.role("slider"),e.attr.tabindex(0),e.aria.valuemin(t),e.aria.valuemax(a),e.aria.valuenow(j),e.aria.label(`Thumb ${A+1}`),w?e.aria.orientation("vertical"):e.Empty,e.on.keydown(te=>{if(!D())return;const q=e.Value.get(t),ue=e.Value.get(a),Z=e.Value.get(n),F=e.Value.get(S),I=F[A];let E;switch(te.key){case"ArrowRight":case"ArrowUp":te.preventDefault(),E=ct(J.roundToStep(I+Z,Z),q,ue);break;case"ArrowLeft":case"ArrowDown":te.preventDefault(),E=ct(J.roundToStep(I-Z,Z),q,ue);break;case"Home":te.preventDefault(),E=q;break;case"End":te.preventDefault(),E=ue;break;default:return}const H=[...F];H[A]=E,N(H)}),e.on.pointerdown(te=>{if(te.stopPropagation(),te.preventDefault(),!D())return;$.set(A);const q=Z=>{M(B,Z.clientX,Z.clientY,A)},ue=()=>{$.set(null),window.removeEventListener("pointermove",q),window.removeEventListener("pointerup",ue)};window.addEventListener("pointermove",q),window.addEventListener("pointerup",ue)}),C?C(A,j):e.Empty))}return e.WithElement(A=>{const B=Z=>{if(!D())return;Z.preventDefault(),M(A,Z.clientX,Z.clientY,null);const F=E=>{M(A,E.clientX,E.clientY,$.value)},I=()=>{$.set(null),window.removeEventListener("pointermove",F),window.removeEventListener("pointerup",I)};window.addEventListener("pointermove",F),window.addEventListener("pointerup",I)},j=e.computedOf(S,t,a)((Z,F,I)=>{if(w){if((y==="range"||y==="multi")&&Z.length>=2){const H=[...Z].sort((be,W)=>be-W),ne=ze(H[0],F,I),ge=ze(H[H.length-1],F,I);return`bottom: ${ne}%; height: ${ge-ne}%`}return`bottom: 0%; height: ${ze(Z[0]??F,F,I)}%`}else{if((y==="range"||y==="multi")&&Z.length>=2){const H=[...Z].sort((be,W)=>be-W),ne=ze(H[0],F,I),ge=ze(H[H.length-1],F,I);return`left: ${ne}%; width: ${ge-ne}%`}return`left: 0%; width: ${ze(Z[0]??F,F,I)}%`}}),ae=v!=null?e.MapSignal(e.computedOf(S,t,a,v,s)((Z,F,I,E,H)=>({vals:Z,mn:F,mx:I,styles:E,clr:H})),({vals:Z,mn:F,mx:I,styles:E,clr:H})=>{const ne=[...Z].sort((be,W)=>be-W),ge=[F,...ne,I];return e.Fragment(...ge.slice(0,-1).map((be,W)=>{const ce=ge[W+1],ve=E[W],ye=ze(be,F,I),we=ze(ce,F,I),L=ve?.color??H,G=k.backgroundValue(L,"solid","light"),re=k.backgroundValue(L,"solid","dark"),x=ve?.thickness,oe=ve?.pattern??"solid",ke=x?`height: ${x};`:"",Se=oe!=="solid"?`border-style: ${oe}; background: none; border-color: ${G.backgroundColor};`:"";let O;w?O=`bottom: ${ye}%; height: ${we-ye}%;`:O=`left: ${ye}%; width: ${we-ye}%;`;const U=`${O} --rs-color: ${G.backgroundColor}; --rs-color-dark: ${re.backgroundColor}; ${ke} ${Se}`;return e.html.div(e.attr.class("bc-range-slider__fill bc-range-slider__segment"),e.attr.style(U))}))}):e.html.div(e.attr.class("bc-range-slider__fill"),e.attr.style(j)),te=Array.from({length:V},(Z,F)=>K(F,A)),q=d?e.MapSignal(e.computedOf(d,t,a,n)((Z,F,I,E)=>{if(Z===!0){const H=[];for(let ne=F;ne<=I;ne+=E)H.push({value:ne});return{marks:H,mn:F,mx:I}}return Array.isArray(Z)?{marks:Z,mn:F,mx:I}:{marks:[],mn:F,mx:I}}),({marks:Z,mn:F,mx:I})=>Z.length===0?e.Empty:e.html.div(e.attr.class("bc-range-slider__ticks"),...Z.map(E=>{const H=ze(E.value,F,I);return e.html.div(e.attr.class("bc-range-slider__tick"),w?e.style.bottom(`${H}%`):e.style.left(`${H}%`),E.label!=null?e.html.span(e.attr.class("bc-range-slider__tick-label"),E.label):e.Empty)}))):e.Empty,ue=f?e.MapSignal(e.computedOf(f,t,a,n)((Z,F,I,E)=>{if(Z===!0){const H=[];for(let ne=F;ne<=I;ne+=E)H.push({value:ne});return{dots:H,mn:F,mx:I}}return Array.isArray(Z)?{dots:Z,mn:F,mx:I}:{dots:[],mn:F,mx:I}}),({dots:Z,mn:F,mx:I})=>Z.length===0?e.Empty:e.html.div(e.attr.class("bc-range-slider__markers"),...Z.map(E=>{const H=ze(E.value,F,I);return e.html.div(e.attr.class("bc-range-slider__marker"),w?e.style.bottom(`${H}%`):e.style.left(`${H}%`),E.label!=null?e.html.span(e.attr.class("bc-range-slider__marker-label"),E.label):e.Empty)}))):e.Empty;return e.Fragment(e.attr.class(e.computedOf(l,r,o,_)(gl)),e.attr.style(e.Value.map(s,bl)),e.attr.role("group"),e.aria.label(y==="multi"?"Multi-point slider":y==="range"?"Range slider":"Slider"),e.on.pointerdown(B),e.html.div(e.attr.class("bc-range-slider__track"),ae,ue,q,...te))})}function yl(t,a){const n=["bc-otp-input",`bc-otp-input--size-${t}`];return a&&n.push("bc-otp-input--disabled"),n.join(" ")}function kl(t){const a=k.backgroundValue(t,"solid","light"),n=k.backgroundValue(t,"solid","dark"),r=new Map;return r.set("--otp-focus-color",a.backgroundColor),r.set("--otp-focus-color-dark",n.backgroundColor),r.set("--otp-focus-border",k.borderColorValue(t,"light")),r.set("--otp-focus-border-dark",k.borderColorValue(t,"dark")),Array.from(r.entries()).map(([o,l])=>`${o}: ${l}`).join("; ")}function _l(t,a){return a==="numeric"?/^\d$/.test(t):/^[a-zA-Z0-9]$/.test(t)}function wl({length:t=6,value:a="",onChange:n,onComplete:r,disabled:o=!1,mask:l=!1,type:s="numeric",size:c="md",color:u="primary",placeholder:i="",autoFocus:p=!1}={}){const m=Fe.sessionId("otp"),h=e.computedOf(t,a)((y,V)=>{const w=new Array(y).fill("");for(let S=0;S<Math.min(V.length,y);S++)w[S]=V[S];return w}).deriveProp(),d=e.prop(null),f=[];function b(y){const V=f[y];V!=null&&(V.focus(),V.select())}function g(){const y=h.value.join("");n?.(y),y.length===t&&y.split("").every(V=>V!=="")&&r?.(y)}function v(y,V){if(e.Value.get(o))return;const w=e.Value.get(s),S=V.split("").filter($=>_l($,w));if(S.length>1){const $=[...h.value];for(let D=0;D<S.length&&y+D<e.Value.get(t);D++)$[y+D]=S[D];h.set($),g();const N=Math.min(y+S.length,e.Value.get(t)-1);b(N);return}if(S.length===1){const $=[...h.value];$[y]=S[0],h.set($),g(),y<e.Value.get(t)-1&&b(y+1)}}function C(y,V){if(!e.Value.get(o))switch(V.key){case"Backspace":{V.preventDefault();const w=[...h.value];w[y]!==""?(w[y]="",h.set(w),g()):y>0&&(w[y-1]="",h.set(w),g(),b(y-1));break}case"ArrowLeft":V.preventDefault(),y>0&&b(y-1);break;case"ArrowRight":V.preventDefault(),y<e.Value.get(t)-1&&b(y+1);break;case"Delete":{V.preventDefault();const w=[...h.value];w[y]="",h.set(w),g();break}case"Home":V.preventDefault(),b(0);break;case"End":V.preventDefault(),b(e.Value.get(t)-1);break}}function _(y,V){V.preventDefault();const w=V.clipboardData?.getData("text")??"";v(y,w)}return e.html.div(e.attr.class(e.computedOf(c,o)(yl)),e.attr.style(e.Value.map(u,kl)),e.attr.role("group"),e.aria.label("One-time password input"),e.Repeat(t,y=>{const V=y.index,w=`${m}-cell-${V}`;return e.html.input(e.WithElement(S=>(f[V]=S,p&&V===0&&Ne.delayedAnimationFrame(()=>S.focus()),e.Empty)),e.attr.id(w),e.attr.type(e.Value.map(l,S=>S?"password":"text")),e.attr.inputmode(e.Value.map(s,S=>S==="numeric"?"numeric":"text")),e.attr.maxlength(1),e.attr.autocomplete("one-time-code"),e.attr.class("bc-otp-input__cell"),e.attr.class(d.map(S=>S===V?"bc-otp-input__cell--focused":"")),e.attr.placeholder(i),e.attr.disabled(o),e.aria.label(`Digit ${V+1} of ${t}`),e.attr.value(h.map(S=>S[V]??"")),e.on.focus(()=>{d.set(V);const S=f[V];S?.select()}),e.on.blur(()=>{d.set(null)}),e.on.input(S=>{const $=S.target;v(V,$.value)}),e.on.keydown(S=>C(V,S)),e.on.paste(S=>_(V,S)))}))}const Cl=t=>{const a=new Date(t),n=a.getFullYear().toString().padStart(4,"0"),r=(a.getMonth()+1).toString().padStart(2,"0"),o=a.getDate().toString().padStart(2,"0"),l=a.getHours().toString().padStart(2,"0"),s=a.getMinutes().toString().padStart(2,"0");return`${n}-${r}-${o}T${l}:${s}`},Vl=t=>{const{value:a,onBlur:n,onChange:r}=t;return J.WithTemporal(o=>se.InputContainer({...t,input:e.input["datetime-local"](Ee.CommonInputAttributes(t),e.attr.value(e.Value.map(a,l=>Cl(Number(l.epochMilliseconds)))),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(l=>r(o.Instant.from(new Date(l).toISOString())))):e.Empty)}))},Sl=t=>{const a=new Date(t),n=a.getFullYear().toString().padStart(4,"0"),r=(a.getMonth()+1).toString().padStart(2,"0"),o=a.getDate().toString().padStart(2,"0"),l=a.getHours().toString().padStart(2,"0"),s=a.getMinutes().toString().padStart(2,"0");return`${n}-${r}-${o}T${l}:${s}`},xl=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:l,disabled:s}=t,c=J.NullableResetAfter(a,s,r??o);return J.WithTemporal(u=>se.InputContainer({...t,input:e.input["datetime-local"](Ee.CommonInputAttributes(t),e.attr.value(e.Value.map(a,i=>i==null?null:Sl(Number(i.epochMilliseconds)))),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(i=>r(i===""?null:u.Instant.from(new Date(i).toISOString())))):e.Empty,o!=null?e.on.input(e.emitValue(i=>o(i===""?null:u.Instant.from(new Date(i).toISOString())))):e.Empty),after:l!=null?e.Fragment(c,l):c}))},Il=t=>{const{value:a,onBlur:n,onChange:r}=t;return J.WithTemporal(o=>se.InputContainer({...t,input:e.input["datetime-local"](Ee.CommonInputAttributes(t),e.attr.value(e.Value.map(a,l=>l.toJSON())),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(l=>{const s=o.PlainDateTime.from(l),c=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(o.ZonedDateTime.from({...s,timeZone:c}))})):e.Empty)}))},Dl=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:l,disabled:s}=t,c=J.NullableResetAfter(a,s,r??o);return J.WithTemporal(u=>se.InputContainer({...t,input:e.input["datetime-local"](Ee.CommonInputAttributes(t),e.attr.value(e.Value.map(a,i=>i?.toJSON())),e.attr.class("bc-input"),n!=null?e.on.blur(e.emitValue(n)):e.Empty,r!=null?e.on.change(e.emitValue(i=>{if(i==="")return r(null);const p=u.PlainDateTime.from(i),m=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(u.ZonedDateTime.from({...p,timeZone:m}))})):e.Empty,o!=null?e.on.input(e.emitValue(i=>{if(i==="")return o(null);const p=u.PlainDateTime.from(i),m=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return o(u.ZonedDateTime.from({...p,timeZone:m}))})):e.Empty),after:l!=null?e.Fragment(c,l):c}))},Ol=Re.createTemporalInput({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,a)=>t.PlainYearMonth.from(a)}),$l=Re.createNullableTemporalInput({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,a)=>t.PlainYearMonth.from(a)}),Tl=t=>{const{value:a,onChange:n}=t;return J.WithTemporal(r=>J.MaskInput({...t,value:e.Value.map(a,o=>o.toString()),onChange:n!=null?o=>n(r.PlainMonthDay.from(`--${o}`)):void 0,onInput:void 0,mask:"99-99",placeholder:"MM-DD"}))},Fl=t=>{const{after:a,disabled:n}=t,r=J.NullableResetAfter(t.value,n,t.onChange??t.onInput);return J.WithTemporal(o=>{const l=Ee.mapInputOptions(t,s=>s?.toString()??"",s=>s===""?null:o.PlainMonthDay.from(`--${s}`));return J.MaskInput({...l,mask:"99-99",placeholder:"MM-DD",after:a!=null?e.Fragment(r,a):r})})};function Pl(t,a,n){return e.Ensure(t.signal,()=>{const r=t.transform(o=>o,o=>o);return a(r)},n)}const El={filling:{type:"filling"},submitting:{type:"submitting"},error:t=>({type:"error",error:t}),success:{type:"success"}};class hn extends ee.Controller{constructor(a,n,r,o,l){super(a,n,r,o,l)}isValidColor=this.signal.map(X.isValidColor);isValidHex=this.signal.map(X.isValidHexColor);normalizedHex=this.signal.map(a=>X.normalizeHexColor(a)??a);setColor=a=>{if(X.isValidHexColor(a)){const n=X.normalizeHexColor(a);if(n){this.change(n);return}}this.change(a)};setHex=a=>{const n=X.normalizeHexColor(a);n&&this.change(n)};setRgb=(a,n,r)=>{const o=s=>{const c=Math.round(Math.max(0,Math.min(255,s))).toString(16);return c.length===1?"0"+c:c},l=`#${o(a)}${o(n)}${o(r)}`;this.change(l)};getRgb=()=>{const a=this.signal.value,n=X.normalizeHexColor(a);if(!n)return null;const r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null};withFormat=a=>{const n=o=>{switch(a){case"hex":return X.normalizeHexColor(o)??o;case"rgb":const l=this.getRgb();return l?`rgb(${l.r}, ${l.g}, ${l.b})`:o;case"hsl":return o;default:return o}},r=o=>X.normalizeHexColor(o)??o;return this.transform(n,r,[`format-${a}`])}}function Al(t){return new hn(t.path,t.change,t.signal,t.status,{disabled:t.disabled})}function Bl(t){return{id:t.name,disabled:t.disabled,value:t.normalizedHex,hasError:t.errorVisible,onChange:t.setColor,onInput:t.setColor}}function Ll(t){const a={xs:"var(--spacing-xs)",sm:"var(--spacing-sm)",md:"var(--spacing-md)",lg:"var(--spacing-lg)",xl:"var(--spacing-xl)"};return a[t]??a.md}function Ml({legend:t,description:a,variant:n="plain",collapsible:r=!1,defaultCollapsed:o=!1,disabled:l=!1,layout:s,labelWidth:c,size:u,gap:i="md",columns:p,minFieldWidth:m,compact:h},...d){const f=e.prop(!e.Value.get(o)),b=e.Value.map(n,v=>`bc-fieldset bc-fieldset--${v}`),g={};return s!==void 0&&(g.layout=s),c!==void 0&&(g.labelWidth=c),u!==void 0&&(g.size=u),i!==void 0&&(g.gap=i),p!==void 0&&(g.columns=p),m!==void 0&&(g.minFieldWidth=m),h!==void 0&&(g.compact=h),e.html.fieldset(e.attr.class(b),e.attr.disabled(l),t!=null?e.html.legend(e.attr.class("bc-fieldset__legend"),e.When(r,()=>e.html.button(e.attr.type("button"),e.attr.class("bc-fieldset__legend-toggle"),e.on.click(()=>f.update(v=>!v)),e.html.span(e.attr.class("bc-fieldset__legend-text"),t),k.Icon({icon:"lucide:chevron-down",size:"sm",color:"neutral"},e.attr.class(f.map(v=>`bc-fieldset__collapse-icon${v?"":" bc-fieldset__collapse-icon--collapsed"}`)))),()=>e.html.span(e.attr.class("bc-fieldset__legend-text"),t))):e.Empty,a!=null?e.html.div(e.attr.class("bc-fieldset__description"),a):e.Empty,e.Provide(ee.FieldLayout,g,()=>{const v=e.html.div(e.attr.class("bc-fieldset__content"),e.attr.style(e.computedOf(i,p??void 0,m??void 0)((C,_,y)=>{const w=[`--fieldset-gap: ${Ll(e.Value.get(C)??"md")}`],S=e.Value.get(_),$=e.Value.get(y);return S!=null&&S>1?w.push(`grid-template-columns: repeat(${S}, minmax(0, 1fr))`):$!=null&&w.push(`grid-template-columns: repeat(auto-fit, minmax(${$}, 1fr))`),w.join("; ")})),...d);return e.When(r,()=>e.html.div(gt({open:f},v)),()=>v)}))}function Nl({locales:t,onChange:a,updateLocale:n=!0}){return e.Use(k.BeatUII18n,r=>e.Use(k.Locale,({locale:o,setLocale:l})=>ee.Field({layout:"horizontal",content:J.Group(e.attr.class("bc-group--align-center bc-group--gap-2"),k.Icon({icon:"ic:twotone-language",size:"lg",color:"neutral",title:r.$.locale}),J.NativeSelect({ariaLabel:r.$.locale,options:e.computedOf(t,r)((s,c)=>s.map(u=>{let p=c[u.code]??u.name;return u.nativeName!=null&&u.nativeName!==p&&(p+=` (${u.nativeName})`),Le.value(u.code,p)})),value:o,onChange:s=>{n&&l(s),a?.(s)}}))})))}const Wl=()=>e.Use(k.Locale,({direction:t})=>e.Portal("body",e.attr.class(t.map(a=>`b-${a}`))));function fn(t,a,n,r,o){const l=["bc-notification"];return t&&l.push("bc-notification--bordered"),a&&l.push("bc-notification--has-icon"),n&&l.push("bc-notification--closable"),r&&l.push("bc-notification--loading"),o&&o.length>0&&l.push(o),l.join(" ")}function gn(t,a){return[`--notification-accent-color: ${me.getColorVar(t,500)}`,`--notification-radius: ${T.getRadiusVar(a)}`].join("; ")}function bn({loading:t=!1,showCloseButton:a=!1,showBorder:n=!1,color:r="primary",roundedness:o="md",title:l,icon:s,onClose:c,class:u}={},...i){const p=e.Value.map(s,m=>m!=null);return e.html.section(e.attr.class(e.computedOf(n,p,a,t,u)((m,h,d,f,b)=>[fn(m,h,d,f,b)].join(" "))),e.attr.style(e.computedOf(r,o)((m,h)=>gn(m,h))),e.aria.live("polite"),e.aria.busy(t),e.When(t,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__loader"),k.Icon({icon:"line-md:loading-twotone-loop",size:"lg",color:r,accessibility:"decorative"})),()=>e.When(p,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__icon"),k.Icon({icon:s,size:"md"})),()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__accent"),e.aria.hidden(!0)))),e.html.div(e.attr.class("bc-notification__body"),l!=null?e.html.div(e.attr.class("bc-notification__title"),l):null,e.html.div(e.attr.class("bc-notification__content"),...i)),e.When(a,()=>e.html.div(e.attr.class("bc-notification__meta"),ee.CloseButton({size:"sm",color:r,onClick:c}))))}let Ul=0;class Rl{handles=[];attach(a){return this.detach(a),this.handles.push(a),()=>this.detach(a)}detach(a){const n=this.handles.lastIndexOf(a);n>=0&&this.handles.splice(n,1)}get current(){const a=this.handles[this.handles.length-1];if(!a)throw new Error("NotificationService: no provider attached. Ensure BeatUI includes notifications or attach the provider manually.");return a}show(a,...n){return this.current.show(a,...n)}clear(){this.current.clear()}}const vn=new Rl,ca={mark:e.makeProviderMark("NotificationProvider"),create:({position:t="bottom-end"}={})=>{const a=e.prop(0),n=e.prop([]),r=[];function o(p){return r.push(p),()=>{const m=r.lastIndexOf(p);m>=0&&r.splice(m,1)}}const l=p=>{n.update(m=>m.filter(h=>h.id!==p)),a.update(m=>Math.max(0,m-1))},s=[],c=({dismissAfter:p,onClose:m,animation:h={fade:!0},...d},...f)=>{const b=`notification-${++Ul}`;a.update(C=>C+1);const g=p!=null?typeof p=="number"?Ne.sleep(p*1e3):p:void 0,v={id:b,animation:h,class:e.Value.toSignal(d.class),loading:e.Value.toSignal(d.loading??!1),showCloseButton:e.Value.toSignal(d.showCloseButton==null&&p==null?!0:d.showCloseButton??!0),showBorder:e.Value.toSignal(d.showBorder??!1),color:e.Value.toSignal(d.color??"primary"),roundedness:e.Value.toSignal(d.roundedness??"md"),title:d.title??e.Empty,icon:e.Value.toSignal(d.icon),children:f,listenRequestClose:C=>(s.push(C),m?.(),()=>{}),delayedClose:g};n.update(C=>[...C,v]),r.forEach(C=>C(v))},u=()=>{s.forEach(p=>p()),s.length=0,n.set([]),a.set(0)},i=vn.attach({show:c,clear:u});return{value:{activeNotifications:a,entries:n,removeEntry:l,show:c,clear:u,position:t,listenOnShow:o},dispose:()=>{i(),u()}}}};function yn(){return e.Use(ca,({listenOnShow:t,position:a})=>e.Portal("body",e.html.div(e.attr.class("bc-notification-viewport"),e.attr.class(`bc-notification-viewport--${a}`),e.WithBrowserCtx(n=>e.OnDispose(t(r=>{const o=[],l=e.html.div(Ue.AnimatedToggle({animation:r.animation,initialStatus:"start-opening"},({close:s,listenOnClosed:c})=>(r.delayedClose?.finally(s),c(()=>{o.forEach(u=>u())}),bn({class:r.class,loading:r.loading,showCloseButton:r.showCloseButton,showBorder:r.showBorder,color:r.color,roundedness:r.roundedness,title:r.title,icon:r.icon,onClose:s},...r.children))));o.push(e.renderWithContext(l,n))}))))))}function zl({includeAuthI18n:t=!1,enableAppearance:a=!0,defaultAppearance:n="system",appearancePreferenceKey:r="bui-appearance",includeNotifications:o=!0,notificationPosition:l="bottom-end"},...s){return e.WithProvider(({set:c,use:u})=>{c($e.Location,{}),c(k.Locale,{}),c(k.BeatUII18n,{}),c(ut.Theme,{defaultAppearance:a?n:"light",appearancePreferenceKey:r}),c(e.ReducedMotion,void 0),o&&c(ca,{position:l}),$e.NavigationService.attach(u($e.Location));const i=e.Fragment(a?ut.ThemeAppearance():e.Empty,Wl(),o?yn():e.Empty,...s);return t?e.Task(()=>Promise.resolve().then(()=>require("./translations-C_-cObaF.cjs")).then(p=>p.translations),({AuthI18n:p})=>e.Provide(p,{},()=>i)):i})}function Hl({content:t,toolbar:a=!0,page:n,zoom:r,view:o,pagemode:l,scrollbar:s=!0,navpanes:c=!0,search:u,nameddest:i,viewrect:p,highlight:m,allowfullscreen:h=!1}){const d=e.Value.toSignal(t).mapAsync(async b=>{if(b instanceof Blob){const g=await b.arrayBuffer(),v=new Blob([g],{type:"application/pdf"});return URL.createObjectURL(v)}else{if(b instanceof ArrayBuffer)return URL.createObjectURL(new Blob([b],{type:"application/pdf"}));if(b instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(b)],{type:"application/pdf"}));if(typeof b=="string"){const v=await(await fetch(b)).arrayBuffer(),C=new Blob([v],{type:"application/pdf"});return URL.createObjectURL(C)}}},null),f=e.computedOf(d,a,n,r,o,l,s,c,u,i,p,m)((b,g,v,C,_,y,V,w,S,$,N,D)=>{if(b==null)return null;const M=[];g===!1&&M.push("toolbar=0"),v!=null&&v>0&&M.push(`page=${v}`),C!=null&&C>0&&M.push(`zoom=${C}`),_!=null&&M.push(`view=${_}`),y!=null&&M.push(`pagemode=${y}`),V===!1&&M.push("scrollbar=0"),w===!1&&M.push("navpanes=0"),S!=null&&M.push(`search=${encodeURIComponent(S)}`),$!=null&&M.push(`nameddest=${encodeURIComponent($)}`),N!=null&&M.push(`viewrect=${encodeURIComponent(N)}`),D!=null&&M.push(`highlight=${encodeURIComponent(D)}`);const Y=M.join("&");return Y?`${b}#${Y}`:b});return d.on((b,g)=>{g!=null&&URL.revokeObjectURL(g)}),e.Use(k.BeatUII18n,b=>e.html.div(e.OnDispose(()=>{const g=d.value;g!=null&&URL.revokeObjectURL(g)}),e.attr.class("h-full w-full"),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(h),e.attr.title(b.$.pdfPreview),e.attr.loading("lazy"),e.WithElement(g=>{const v=g;let C=!0;return f.on(_=>{_!=null&&(C?(v.src=_,C=!1):(v.src="about:blank",setTimeout(()=>{v.src=_},50)))}),e.Empty}))))}function jl({content:t,page:a,zoom:n,pagemode:r,nameddest:o,search:l,textLayerMode:s,sidebarViewOnLoad:c,scrollModeOnLoad:u,spreadModeOnLoad:i,enableScripting:p,enablePrinting:m,viewerUrl:h=null,allowfullscreen:d=!0,class:f=null}){const b=e.Value.toSignal(t).mapAsync(async v=>{if(v instanceof Blob)return URL.createObjectURL(v);if(v instanceof ArrayBuffer)return URL.createObjectURL(new Blob([v],{type:"application/pdf"}));if(v instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(v)],{type:"application/pdf"}));if(typeof v=="string")return v},null),g=e.computedOf(b,h,a,n,r,o,l,s,c,u,i,p,m)((v,C,_,y,V,w,S,$,N,D,M,Y,K)=>{if(v==null)return null;const A=C??"https://mozilla.github.io/pdf.js/web/viewer.html",B=new URLSearchParams;B.set("file",v);const j=[];_!=null&&_>0&&j.push(`page=${_}`),y!=null&&(typeof y=="string"?j.push(`zoom=${y}`):j.push(`zoom=${y}`)),V!=null&&j.push(`pagemode=${V}`),w!=null&&j.push(`nameddest=${encodeURIComponent(w)}`),S!=null&&j.push(`search=${encodeURIComponent(S)}`),$!=null&&j.push(`textLayer=${$}`),N!=null&&j.push(`sidebar=${N}`),D!=null&&j.push(`scrollMode=${D}`),M!=null&&j.push(`spreadMode=${M}`),Y!=null&&j.push(`enableScripting=${Y?"1":"0"}`),K!=null&&j.push(`enablePrinting=${K?"1":"0"}`);const ae=j.length>0?`#${j.join("&")}`:"";return`${A}?${B.toString()}${ae}`});return b.on((v,C)=>{C!=null&&C.startsWith("blob:")&&URL.revokeObjectURL(C)}),e.Use(k.BeatUII18n,v=>e.html.div(e.OnDispose(()=>{const C=b.value;C!=null&&C.startsWith("blob:")&&URL.revokeObjectURL(C)}),e.attr.class("bc-pdfjs-preview h-full w-full"),e.attr.class(f),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(d),e.attr.title(v.$.pdfPreview),e.attr.loading("lazy"),e.attr.src(g))))}function Be(t){return t!==void 0?e.Value.get(t):void 0}function ql(t){const a={},n=Be(t.style),r=Be(t.currency),o=Be(t.currencyDisplay),l=Be(t.signDisplay),s=Be(t.notation),c=Be(t.compactDisplay),u=Be(t.unit),i=Be(t.unitDisplay),p=Be(t.useGrouping),m=Be(t.minimumIntegerDigits),h=Be(t.minimumFractionDigits),d=Be(t.maximumFractionDigits),f=Be(t.minimumSignificantDigits),b=Be(t.maximumSignificantDigits);return n!==void 0&&(a.style=n),r!==void 0&&(a.currency=r),o!==void 0&&(a.currencyDisplay=o),l!==void 0&&(a.signDisplay=l),s!==void 0&&(a.notation=s),c!==void 0&&(a.compactDisplay=c),u!==void 0&&(a.unit=u),i!==void 0&&(a.unitDisplay=i),p!==void 0&&(a.useGrouping=p),m!==void 0&&(a.minimumIntegerDigits=m),h!==void 0&&(a.minimumFractionDigits=h),d!==void 0&&(a.maximumFractionDigits=d),f!==void 0&&(a.minimumSignificantDigits=f),b!==void 0&&(a.maximumSignificantDigits=b),a}function Gl(t,a,n){return new Intl.NumberFormat(a,n).format(t)}function Yl(t){const{value:a,locale:n}=t,r=(o,l)=>{const s=ql(t);return new Intl.NumberFormat(o,s).format(l)};if(n!==void 0){const o=e.computedOf(n,a)(r);return e.html.span(e.attr.class("bc-format-number"),o)}return e.Use(k.Locale,({locale:o})=>{const l=e.computedOf(o,a)(r);return e.html.span(e.attr.class("bc-format-number"),l)})}function qe(t){return t!==void 0?e.Value.get(t):void 0}function Zl(t){const a={},n=qe(t.style),r=qe(t.currency),o=qe(t.currencyDisplay),l=qe(t.signDisplay),s=qe(t.unit),c=qe(t.unitDisplay),u=qe(t.useGrouping),i=qe(t.minimumIntegerDigits),p=qe(t.minimumFractionDigits),m=qe(t.maximumFractionDigits);return n!==void 0&&(a.style=n),r!==void 0&&(a.currency=r),o!==void 0&&(a.currencyDisplay=o),l!==void 0&&(a.signDisplay=l),s!==void 0&&(a.unit=s),c!==void 0&&(a.unitDisplay=c),u!==void 0&&(a.useGrouping=u),i!==void 0&&(a.minimumIntegerDigits=i),p!==void 0&&(a.minimumFractionDigits=p),m!==void 0&&(a.maximumFractionDigits=m),a}function Kl(t,a,n){return new Intl.NumberFormat(a,n).format(t)}function Xl(t){const{value:a,locale:n}=t,r=(o,l)=>{const s=Zl(t);return new Intl.NumberFormat(o,s).format(l)};if(n!==void 0){const o=e.computedOf(n,a)(r);return e.html.span(e.attr.class("bc-format-bigint"),o)}return e.Use(k.Locale,({locale:o})=>{const l=e.computedOf(o,a)(r);return e.html.span(e.attr.class("bc-format-bigint"),l)})}function kn(t){return typeof t=="object"&&t!==null&&!(t instanceof Date)&&"toLocaleString"in t}function _n(t){return t instanceof Date?t:new Date(t)}function Je(t){return t!==void 0?e.Value.get(t):void 0}function Jl(t){const a={},n=Je(t.dateStyle),r=Je(t.calendar),o=Je(t.numberingSystem),l=Je(t.timeZone),s=Je(t.weekday),c=Je(t.year),u=Je(t.month),i=Je(t.day),p=Je(t.era);return s!==void 0||c!==void 0||u!==void 0||i!==void 0||p!==void 0?(s!==void 0&&(a.weekday=s),c!==void 0&&(a.year=c),u!==void 0&&(a.month=u),i!==void 0&&(a.day=i),p!==void 0&&(a.era=p)):a.dateStyle=n??"medium",r!==void 0&&(a.calendar=r),o!==void 0&&(a.numberingSystem=o),l!==void 0&&(a.timeZone=l),a}function Ql(t,a,n){return kn(t)?t.toLocaleString(a,n):new Intl.DateTimeFormat(a,n).format(_n(t))}function es(t){const{value:a,locale:n}=t,r=(o,l)=>{const s=Jl(t);return kn(l)?l.toLocaleString(o,s):new Intl.DateTimeFormat(o,s).format(_n(l))};if(n!==void 0){const o=e.computedOf(n,a)(r);return e.html.span(e.attr.class("bc-format-date"),o)}return e.Use(k.Locale,({locale:o})=>{const l=e.computedOf(o,a)(r);return e.html.span(e.attr.class("bc-format-date"),l)})}function wn(t){return typeof t=="object"&&t!==null&&!(t instanceof Date)&&"toLocaleString"in t}function Cn(t){return t instanceof Date?t:new Date(t)}function Ge(t){return t!==void 0?e.Value.get(t):void 0}function ts(t){const a={},n=Ge(t.timeStyle),r=Ge(t.timeZone),o=Ge(t.hour12),l=Ge(t.hourCycle),s=Ge(t.hour),c=Ge(t.minute),u=Ge(t.second),i=Ge(t.fractionalSecondDigits),p=Ge(t.timeZoneName),m=Ge(t.dayPeriod);return s!==void 0||c!==void 0||u!==void 0||i!==void 0||p!==void 0||m!==void 0?(s!==void 0&&(a.hour=s),c!==void 0&&(a.minute=c),u!==void 0&&(a.second=u),i!==void 0&&(a.fractionalSecondDigits=i),p!==void 0&&(a.timeZoneName=p),m!==void 0&&(a.dayPeriod=m)):a.timeStyle=n??"medium",r!==void 0&&(a.timeZone=r),o!==void 0&&(a.hour12=o),l!==void 0&&(a.hourCycle=l),a}function as(t,a,n){return wn(t)?t.toLocaleString(a,n):new Intl.DateTimeFormat(a,n).format(Cn(t))}function ns(t){const{value:a,locale:n}=t,r=(o,l)=>{const s=ts(t);return wn(l)?l.toLocaleString(o,s):new Intl.DateTimeFormat(o,s).format(Cn(l))};if(n!==void 0){const o=e.computedOf(n,a)(r);return e.html.span(e.attr.class("bc-format-time"),o)}return e.Use(k.Locale,({locale:o})=>{const l=e.computedOf(o,a)(r);return e.html.span(e.attr.class("bc-format-time"),l)})}function Vn(t){return typeof t=="object"&&t!==null&&!(t instanceof Date)&&"toLocaleString"in t}function Sn(t){return t instanceof Date?t:new Date(t)}function lt(t){return t!==void 0?e.Value.get(t):void 0}function rs(t){const a=lt(t.dateStyle),n=lt(t.timeStyle),r=lt(t.timeZone),o=lt(t.calendar),l=lt(t.hour12),s=lt(t.hourCycle),c={dateStyle:a??"medium",timeStyle:n??"short"};return r!==void 0&&(c.timeZone=r),o!==void 0&&(c.calendar=o),l!==void 0&&(c.hour12=l),s!==void 0&&(c.hourCycle=s),c}function os(t,a,n){return Vn(t)?t.toLocaleString(a,n):new Intl.DateTimeFormat(a,n).format(Sn(t))}function ls(t){const{value:a,locale:n}=t,r=(o,l)=>{const s=rs(t);return Vn(l)?l.toLocaleString(o,s):new Intl.DateTimeFormat(o,s).format(Sn(l))};if(n!==void 0){const o=e.computedOf(n,a)(r);return e.html.span(e.attr.class("bc-format-date-time"),o)}return e.Use(k.Locale,({locale:o})=>{const l=e.computedOf(o,a)(r);return e.html.span(e.attr.class("bc-format-date-time"),l)})}function ss(t,a,n,r){return new Intl.RelativeTimeFormat(n,r).format(t,a)}function is(t){const{value:a,unit:n,locale:r}=t,o=s=>s!==void 0?e.Value.get(s):void 0,l=(s,c,u)=>{const i={},p=o(t.numeric),m=o(t.style);return p!==void 0&&(i.numeric=p),m!==void 0&&(i.style=m),new Intl.RelativeTimeFormat(s,i).format(c,u)};if(r!==void 0){const s=e.computedOf(r,a,n)(l);return e.html.span(e.attr.class("bc-format-relative-time"),s)}return e.Use(k.Locale,({locale:s})=>{const c=e.computedOf(s,a,n)(l);return e.html.span(e.attr.class("bc-format-relative-time"),c)})}const xn=Intl.ListFormat;function cs(t,a,n){return new xn(a,n).format(t)}function us(t){const{value:a,locale:n}=t,r=l=>l!==void 0?e.Value.get(l):void 0,o=(l,s)=>{const c={},u=r(t.type),i=r(t.style);return u!==void 0&&(c.type=u),i!==void 0&&(c.style=i),new xn(l,c).format(s)};if(n!==void 0){const l=e.computedOf(n,a)(o);return e.html.span(e.attr.class("bc-format-list"),l)}return e.Use(k.Locale,({locale:l})=>{const s=e.computedOf(l,a)(o);return e.html.span(e.attr.class("bc-format-list"),s)})}function ds(t,a,n,r){return new Intl.DisplayNames(n,{type:a,style:r?.style,languageDisplay:a==="language"?r?.languageDisplay:void 0,fallback:r?.fallback}).of(t)??t}function ps(t){const{value:a,locale:n}=t,r=l=>l!==void 0?e.Value.get(l):void 0,o=(l,s)=>{const c=e.Value.get(t.type),u=r(t.style),i=r(t.languageDisplay),p=r(t.fallback);return new Intl.DisplayNames(l,{type:c,style:u,languageDisplay:c==="language"?i:void 0,fallback:p}).of(s)??s};if(n!==void 0){const l=e.computedOf(n,a)(o);return e.html.span(e.attr.class("bc-format-display-name"),l)}return e.Use(k.Locale,({locale:l})=>{const s=e.computedOf(l,a)(o);return e.html.span(e.attr.class("bc-format-display-name"),s)})}function In(t,a,n){return new Intl.PluralRules(a,n).select(t)}function ms(t,a,n,r){const o=In(t,n,r),l=a[o]??a.other,s=new Intl.NumberFormat(n).format(t);return l.replace(/\{count\}/g,s)}function hs(t){const{value:a,messages:n,locale:r}=t,o=s=>s!==void 0?e.Value.get(s):void 0,l=(s,c)=>{const u={},i=o(t.type),p=o(t.minimumIntegerDigits),m=o(t.minimumFractionDigits),h=o(t.maximumFractionDigits),d=o(t.minimumSignificantDigits),f=o(t.maximumSignificantDigits);i!==void 0&&(u.type=i),p!==void 0&&(u.minimumIntegerDigits=p),m!==void 0&&(u.minimumFractionDigits=m),h!==void 0&&(u.maximumFractionDigits=h),d!==void 0&&(u.minimumSignificantDigits=d),f!==void 0&&(u.maximumSignificantDigits=f);const b=new Intl.PluralRules(s,u).select(c),g=n[b]??n.other,v=new Intl.NumberFormat(s).format(c);return g.replace(/\{count\}/g,v)};if(r!==void 0){const s=e.computedOf(r,a)(l);return e.html.span(e.attr.class("bc-format-plural"),s)}return e.Use(k.Locale,({locale:s})=>{const c=e.computedOf(s,a)(l);return e.html.span(e.attr.class("bc-format-plural"),c)})}function fs(t){const{value:a,locale:n,units:r}=t,o=(l,s)=>k.formatFileSize(s,{locale:l,units:r,decimalPlaces:t.decimalPlaces!==void 0?e.Value.get(t.decimalPlaces):void 0});if(n!==void 0){const l=e.computedOf(n,a)(o);return e.html.span(e.attr.class("bc-format-file-size"),l)}return e.Use(k.Locale,({locale:l})=>{const s=e.computedOf(l,a)(o);return e.html.span(e.attr.class("bc-format-file-size"),s)})}function gs(t,a){const n=["bc-empty-state",`bc-empty-state--size-${t}`];return a&&a.length>0&&n.push(a),n.join(" ")}function bs({icon:t,title:a,description:n,size:r="md",action:o,class:l}){return e.html.div(e.attr.class(e.computedOf(r,l)((s,c)=>gs(s??"md",c))),e.Ensure(t,s=>e.html.div(e.attr.class("bc-empty-state__icon"),k.Icon({icon:s,size:e.Value.map(r,c=>{const u=c??"md";return u==="sm"?"lg":"xl"}),accessibility:"decorative"}))),e.html.h3(e.attr.class("bc-empty-state__title"),a),e.Ensure(n,s=>e.html.p(e.attr.class("bc-empty-state__description"),s)),o!=null?e.html.div(e.attr.class("bc-empty-state__action"),o):e.Empty)}const vs=({id:t,css:a})=>e.Portal("head",e.html.style(e.attr.id(t),e.attr.innerHTML(a)));function Ye(t,a){return a==null?null:e.html.meta(e.attr.name(t),e.attr.content(e.Value.map(a,n=>String(n))))}function _e(t,a){return a==null?null:e.html.meta(e.attr.property(t),e.attr.content(e.Value.map(a,n=>String(n))))}function Ct(t,a){return a==null?null:e.ForEach(a,n=>_e(t,n))}function ys(t,a){return a==null?null:e.When(e.Value.map(a,n=>Array.isArray(n)),()=>Ct(t,a),()=>_e(t,a))}const ks=t=>{const a=[];if(a.push(_e("og:title",t.title)),a.push(_e("og:type",t.type)),a.push(_e("og:url",t.url)),a.push(_e("og:image",t.image)),a.push(_e("og:description",t.description)),a.push(_e("og:site_name",t.siteName)),a.push(_e("og:locale",t.locale)),t.localeAlternate!=null){const n=Ct("og:locale:alternate",t.localeAlternate);n!=null&&a.push(n)}if(a.push(_e("og:image:alt",t.imageAlt)),a.push(_e("og:image:width",t.imageWidth)),a.push(_e("og:image:height",t.imageHeight)),a.push(_e("og:image:type",t.imageType)),t.images!=null){const n=Ct("og:image",t.images);n!=null&&a.push(n)}if(a.push(_e("og:video",t.video)),a.push(_e("og:video:type",t.videoType)),a.push(_e("og:video:width",t.videoWidth)),a.push(_e("og:video:height",t.videoHeight)),a.push(_e("og:video:secure_url",t.videoSecureUrl)),a.push(_e("og:audio",t.audio)),a.push(_e("og:audio:type",t.audioType)),a.push(_e("og:audio:secure_url",t.audioSecureUrl)),a.push(_e("article:published_time",t.publishedTime)),a.push(_e("article:modified_time",t.modifiedTime)),a.push(_e("article:expiration_time",t.expirationTime)),a.push(ys("article:author",t.author)),a.push(_e("article:section",t.section)),t.tags!=null){const n=Ct("article:tag",t.tags);n!=null&&a.push(n)}return a.push(_e("profile:first_name",t.firstName)),a.push(_e("profile:last_name",t.lastName)),a.push(_e("profile:username",t.username)),a.push(_e("profile:gender",t.gender)),a.push(Ye("twitter:card",t.twitterCard)),a.push(Ye("twitter:site",t.twitterSite)),a.push(Ye("twitter:creator",t.twitterCreator)),a.push(Ye("twitter:title",e.coalesce(t.twitterTitle,t.title))),a.push(Ye("twitter:description",e.coalesce(t.twitterDescription,t.description))),a.push(Ye("twitter:image",e.coalesce(t.twitterImage,t.image))),a.push(Ye("twitter:image:alt",e.coalesce(t.twitterImageAlt,t.imageAlt))),t.canonical!=null&&e.Value.get(t.canonical)!=null&&a.push(e.html.link(e.attr.rel("canonical"),e.attr.href(t.canonical))),a.push(Ye("robots",t.robots)),a.push(Ye("keywords",t.keywords)),a.push(Ye("author",t.metaAuthor)),e.Portal("head",a.filter(n=>n!=null).flat())};function _s(t){const{items:a,onMarkAllRead:n,onClose:r}=t,o=e.computedOf(a)(l=>l.filter(s=>!s.read).length);return e.Use(k.BeatUII18n,l=>e.html.div(e.attr.class("bc-notification-panel"),e.html.div(e.attr.class("bc-notification-panel__header"),e.html.div(e.attr.class("bc-notification-panel__header-title"),e.html.span(l.$.notifications),e.When(e.computedOf(o)(s=>s>0),()=>nt({color:"primary",size:"xs",circle:!0},o.map(String)))),e.html.div(e.attr.class("bc-notification-panel__header-actions"),n?e.html.button(e.attr.class("bc-notification-panel__mark-read-btn"),e.attr.type("button"),e.on.click(()=>n()),l.$.markAllAsRead):e.Empty,r?e.html.button(e.attr.class("bc-notification-panel__close-btn"),e.attr.type("button"),e.on.click(()=>r()),k.Icon({icon:"lucide:x",size:"sm"})):e.Empty)),e.html.div(e.attr.class("bc-notification-panel__list"),e.ForEach(a,s=>e.html.div(e.attr.class(s.map(c=>c.read?"bc-notification-panel__item":"bc-notification-panel__item bc-notification-panel__item--unread")),e.on.click(()=>s.value.onClick?.()),e.html.div(e.attr.class("bc-notification-panel__item-icon"),e.attr.style(s.map(c=>c.iconColor?`background: ${c.iconColor}14; color: ${c.iconColor}`:"")),k.Icon({icon:s.$.icon,size:"sm"})),e.html.div(e.attr.class("bc-notification-panel__item-content"),e.html.div(e.attr.class("bc-notification-panel__item-title"),s.$.title),e.html.div(e.attr.class("bc-notification-panel__item-body"),s.$.body),e.html.div(e.attr.class("bc-notification-panel__item-meta"),e.html.span(s.$.time),e.When(s.map(c=>c.source!==void 0),()=>e.html.span(e.attr.class("bc-notification-panel__item-source"),s.map(c=>c.source?.label??""))))),e.When(s.map(c=>!c.read),()=>e.html.span(e.attr.class("bc-notification-panel__item-dot"))))),e.When(e.computedOf(a)(s=>s.length===0),()=>e.html.div(e.attr.class("bc-notification-panel__empty"),k.Icon({icon:"lucide:bell-off",size:"lg"}),e.html.div(l.$.noNotifications))))))}function ws(t){return["bc-breadcrumbs",`bc-breadcrumbs--size-${t}`].join(" ")}function Cs(t,a){if(t.length<=a)return t;const n=t[0],r=t.slice(-(a-1));return[n,{isEllipsis:!0},...r]}function Vs({items:t,separator:a="›",maxItems:n,size:r="md"}){const o=n!=null?e.computedOf(t,n)((l,s)=>s&&s>0?Cs(l,s):l):e.Value.map(t,l=>l);return e.Use(k.BeatUII18n,l=>e.html.nav(e.attr.class(e.Value.map(r,s=>ws(s??"md"))),e.aria.label(l.$.breadcrumbs),e.html.ol(e.attr.class("bc-breadcrumbs__list"),e.ForEach(o,s=>{const c=s.map(i=>"isEllipsis"in i&&i.isEllipsis===!0),u=s.map(i=>!("isEllipsis"in i)&&i.current===!0);return e.When(c,()=>e.html.li(e.attr.class("bc-breadcrumbs__item bc-breadcrumbs__ellipsis"),e.aria.hidden(!0),"..."),()=>{const i=s.map(d=>!("isEllipsis"in d)&&d.href!=null),p=s.map(d=>!("isEllipsis"in d)&&d.href==null&&d.onClick!=null),m=s.map(d=>!("isEllipsis"in d)&&d.icon!=null),h=d=>[e.attr.class(d),e.When(m,()=>k.Icon({icon:s.map(f=>"isEllipsis"in f?"":f.icon??""),size:r,accessibility:"decorative"})),e.html.span(s.map(f=>"isEllipsis"in f?"":f.label))];return e.html.li(e.attr.class(e.Value.map(u,d=>d?"bc-breadcrumbs__item bc-breadcrumbs__item--current":"bc-breadcrumbs__item")),e.When(u,()=>e.aria.current("page")),e.When(i,()=>e.html.a(e.attr.href(s.map(d=>"isEllipsis"in d?"":d.href??"")),...h("bc-breadcrumbs__link")),()=>e.When(p,()=>e.html.button(e.attr.type("button"),e.on.click(()=>{const d=e.Value.get(s);"isEllipsis"in d||d.onClick?.()}),...h("bc-breadcrumbs__button")),()=>e.html.span(...h("bc-breadcrumbs__text")))))})},()=>e.html.li(e.attr.class("bc-breadcrumbs__separator"),e.aria.hidden(!0),a)))))}const ua=({viewTransition:t,state:a,scroll:n,replace:r})=>{const o={};return a!==void 0&&(o.state=a),n!==void 0&&(o.scroll=n),r!==void 0&&(o.replace=r),t!==void 0&&(o.viewTransition=t),o};function zt(t,a){const n=["bc-link"];if(a)n.push("bc-link--disabled");else switch(t){case"plain":n.push("bc-link--plain");break;case"hover":n.push("bc-link--hover");break;default:n.push("bc-link--default");break}return n.join(" ")}function Ht(t){const a=k.textColorValue(t,"light"),n=k.textColorValue(t,"dark");return[`--link-color: ${a}`,`--link-color-dark: ${n}`,`--link-hover-color: ${a}`,`--link-hover-color-dark: ${n}`].join("; ")}function Dn({href:t,variant:a="default",color:n="primary",colorDisabled:r="base",disabled:o=!1,viewTransition:l=!0,state:s,scroll:c,replace:u,target:i,rel:p},...m){return e.When(o,()=>e.html.span(e.attr.class(e.computedOf(a,o)((h,d)=>zt(h,d))),e.attr.style(e.computedOf(r)(h=>Ht(h??"base"))),...m),()=>$e.Anchor({href:t,...ua({viewTransition:l,state:s,scroll:c,replace:u})},e.attr.class(e.computedOf(a,o)((h,d)=>zt(h,d))),e.attr.style(e.computedOf(n)(h=>Ht(h??"primary"))),i?e.attr.target(i):null,p?e.attr.rel(p):null,...m))}const Ss=t=>t?t.startsWith("#")?t:`#${t}`:"",xs=t=>{if(!t)return new URLSearchParams;if(typeof t=="string"){const a=t.startsWith("?")?t.slice(1):t;return new URLSearchParams(a)}return t instanceof URLSearchParams?new URLSearchParams(t):new URLSearchParams(t)};function On(t,a,n){const r=xs(t.search),o=r.toString(),l=o?`?${o}`:"",s=Ss(t.hash);switch(n){case"exact":return t.pathname+l+s===a;case"prefix":return t.pathname.startsWith(a)||(t.pathname+l).startsWith(a);case"params":try{const c=typeof document<"u"&&document.baseURI?document.baseURI:"http://localhost/",u=new URL(a,c);if(t.pathname!==u.pathname)return!1;const i=Array.from(new URLSearchParams(u.search).entries()).sort(),p=Array.from(r.entries()).sort();return i.length!==p.length?!1:i.every(([m,h],d)=>{const[f,b]=p[d];return m===f&&h===b})}catch{return t.pathname===a}default:return!1}}function Dt(t,a){return a==="exact"?e.computedOf(t)(n=>n):e.computedOf(t)(n=>r=>On(r,n,a))}function Is({href:t,matchMode:a="exact",disableWhenActive:n=!0,...r},...o){return e.Use($e.Location,l=>{const s=l.matchSignal(Dt(t,a)),c=e.computedOf(s,n)((u,i)=>i??!0?u:!1);return Dn({...r,href:t,disabled:c},...o)})}function Ds({href:t,viewTransition:a=!0,state:n,scroll:r,replace:o,target:l,rel:s,matchMode:c,disableWhenActive:u,variant:i="filled",size:p="md",color:m="base",roundedness:h="sm",disabled:d=!1},...f){return c!==void 0||u!==void 0?e.Use($e.Location,b=>{const g=c!==void 0?b.matchSignal(Dt(t,c)):e.computedOf(b.location)(()=>!1),v=e.computedOf(g,u)((_,y)=>!(y??!0)||!c?!1:_),C=e.computedOf(d,v)((_,y)=>_||y);return Va({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:l,rel:s,variant:i,size:p,color:m,roundedness:h,disabled:C},...f)}):Va({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:l,rel:s,variant:i,size:p,color:m,roundedness:h,disabled:d},...f)}function Va({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:l,rel:s,variant:c="default",size:u="md",color:i="base",roundedness:p="sm",disabled:m=!1,fullWidth:h=!1,loading:d=!1},...f){return e.When(m??!1,()=>e.html.span(e.attr.class(e.computedOf(u,p,d,h)(se.generateButtonClasses)),e.attr.style(e.computedOf(c,i,m)((b,g,v)=>se.generateButtonStyles(b??"filled",g??"base",v))),...f),()=>$e.Anchor({href:t,...ua({viewTransition:a,state:n,scroll:r,replace:o})},e.attr.class(e.computedOf(u,p,d,h)(se.generateButtonClasses)),e.attr.style(e.computedOf(c,i,m)((b,g,v)=>se.generateButtonStyles(b??"filled",g??"base",v))),l?e.attr.target(l):null,s?e.attr.rel(s):null,...f))}const $n={mark:e.makeProviderMark("SidebarContext"),create:t=>({value:{backgroundMode:"light"},dispose:()=>{}})};function Os({backgroundMode:t="light"},...a){return e.Provide($n,e.Value.map(t,n=>({backgroundMode:n})),()=>e.html.div(e.attr.class("bc-sidebar"),e.attr.class(e.Value.map(t,n=>n==="dark"?"bc-sidebar--dark-bg":"")),...a))}function jt({rail:t,header:a},...n){return rt.Stack(a!=null?e.html.div(e.attr.class("bc-sidebar-group__header"),a):null,e.html.div(e.attr.class(e.Value.map(t??!1,r=>r?"bc-sidebar-group--rail":"")),e.attr.class("bc-sidebar-group"),...n))}function Tn(t,...a){const n=ua({viewTransition:t.viewTransition??!0,state:t.state,scroll:t.scroll,replace:t.replace});return $e.Anchor({href:t.href,...n},...a)}function Fn(...t){return e.html.span(...t)}function Pn(t,...a){return e.html.button(e.attr.type("button"),e.on.click(t.onClick),t.ariaExpanded!=null?e.aria.expanded(e.Value.map(t.ariaExpanded,n=>n)):null,t.ariaControls!=null?e.aria.controls(t.ariaControls):null,t.ariaLabel!=null?e.aria.label(t.ariaLabel):null,...a)}function En(t){const a=[e.attr.class("bc-sidebar-link")];return t.icon!=null&&a.push(e.html.span(e.attr.class("bc-sidebar-link--icon"),k.Icon({icon:t.icon}))),a.push(e.html.span(e.attr.class("bc-sidebar-link__content"),t.content)),t.after!=null&&a.push(e.html.span(e.attr.class("bc-sidebar-link__right"),t.after)),t.action!=null&&a.push(e.html.button(e.attr.type("button"),e.attr.class("bc-sidebar-link--action"),e.on.click((n,r)=>{t.action?.onClick?.(r)}),k.Icon({icon:t.action?.icon}))),"onClick"in t?Pn(t,...a):e.Use($e.Location,n=>{const r=n.matchSignal(Dt(t.href,"exact"),{includeSearch:!1,includeHash:!1});return e.When(r,()=>Fn(...a),()=>Tn(t,...a))})}function $s({rail:t=!0,icon:a,header:n,startOpen:r=!0},...o){const l=e.Value.deriveProp(r),s=Fe.sessionId("sidebar-group"),c=`${s}-content`;return jt({},e.attr.class("bc-sidebar-group-collapsible"),e.attr.class(l.map(u=>u?"bc-sidebar-group-collapsible--open":"bc-sidebar-group-collapsible--closed")),e.attr.role("group"),e.attr.id(s),En({icon:a,onClick:()=>l.update(u=>!u),ariaExpanded:l,ariaControls:c,after:e.html.span(e.attr.class("bc-sidebar-group-collapsible-indicator"),k.Icon({icon:"lucide:chevron-down",color:"base",size:"xs"})),content:n}),jt({rail:t},e.attr.id(c),gt({open:l},...o)))}function Ts(){return e.html.hr(e.attr.class("bc-sidebar-separator"))}function Fs(t,a,n,r){const o=["bc-tabs",`bc-tabs--${t}`,`bc-tabs--${a}`];return n&&o.push("bc-tabs--disabled"),r!=null&&r!=="default"&&o.push(`bc-tabs--variant-${r}`),o.join(" ")}function Ps(t,a){const n=new Map,r=a==="white"||a==="black"||a==="transparent"?"var(--color-primary-600)":me.getColorVar(a,600),o=a==="white"||a==="black"||a==="transparent"?"var(--color-primary-400)":me.getColorVar(a,400),l=a==="white"||a==="black"||a==="transparent"?"var(--color-primary-500)":me.getColorVar(a,500),s=a==="white"||a==="black"||a==="transparent"?"var(--color-primary-400)":me.getColorVar(a,400);if(n.set("--tabs-active-color",r),n.set("--tabs-active-color-dark",o),n.set("--tabs-indicator-color",l),n.set("--tabs-indicator-color-dark",s),t==="filled"){const c=k.backgroundValue(a,"solid","light"),u=k.backgroundValue(a,"solid","dark");n.set("--tabs-filled-inactive-bg",c.backgroundColor),n.set("--tabs-filled-inactive-text","var(--color-white)");const i=k.hoverBackgroundValue(a,"solid","light");n.set("--tabs-filled-inactive-bg-hover",i.backgroundColor);const p=k.hoverBackgroundValue(a,"solid","dark");n.set("--tabs-filled-inactive-bg-dark-hover",p.backgroundColor),n.set("--tabs-filled-inactive-bg-dark",u.backgroundColor),n.set("--tabs-filled-inactive-text-dark",u.textColor),n.set("--tabs-filled-active-bg","var(--color-white)"),n.set("--tabs-filled-active-text","var(--color-base-800)"),n.set("--tabs-filled-active-bg-dark","var(--color-base-900)"),n.set("--tabs-filled-active-text-dark",o)}return t==="outline"&&(n.set("--tabs-outline-active-border",s),n.set("--tabs-outline-active-border-dark",me.getColorVar(a==="white"||a==="black"||a==="transparent"?"primary":a,600))),Array.from(n.entries()).map(([c,u])=>`${c}: ${u}`).join("; ")}function Es(t,a,n){const r=["bc-tab",`bc-tab--${t}`];return a&&r.push("bc-tab--active"),n&&r.push("bc-tab--disabled"),r.join(" ")}function kt(t,a,n){const r=a.length;let o=t+n;o>=r?o=0:o<0&&(o=r-1);let l=0;for(;l<r;){const s=a[o];if(!e.Value.get(s.disabled??!1))return o;o+=n,o>=r?o=0:o<0&&(o=r-1),l++}return t}function As(t){const{items:a,value:n,onChange:r,size:o="md",variant:l="default",color:s="primary",disabled:c=!1,orientation:u="horizontal",showContent:i=!0,ariaLabel:p}=t,m=Fe.sessionId("tablist"),h=e.prop(-1),d=a.map((b,g)=>{const v=e.computedOf(n)(V=>V===b.key),C=e.computedOf(c,b.disabled)((V,w)=>V||w),_=`${m}-tab-${b.key}`,y=`${m}-panel-${b.key}`;return{item:b,index:g,isActive:v,isTabDisabled:C,tabId:_,panelId:y}}),f=b=>{if(e.Value.get(c))return;const v=h.value,C=e.Value.get(u)==="horizontal";let _=v;switch(b.key){case(C?"ArrowRight":"ArrowDown"):b.preventDefault(),_=kt(v,a,1);break;case(C?"ArrowLeft":"ArrowUp"):b.preventDefault(),_=kt(v,a,-1);break;case"Home":b.preventDefault(),_=kt(-1,a,1);break;case"End":b.preventDefault(),_=kt(a.length,a,-1);break;case"Enter":case" ":if(b.preventDefault(),v>=0&&v<a.length){const y=a[v];e.Value.get(y.disabled??!1)||r?.(y.key)}break}_!==v&&_>=0&&_<a.length&&(h.set(_),setTimeout(()=>{const y=document.querySelector(`[data-tab-index="${_}"]`);y&&y.focus()},0))};return e.html.div(e.attr.class(e.computedOf(o,u,c,l)((b,g,v,C)=>Fs(b??"md",g??"horizontal",v??!1,C??"default"))),e.attr.style(e.computedOf(l,s)((b,g)=>Ps(b??"default",g??"primary"))),e.html.div(e.attr.class("bc-tabs__list"),e.attr.role("tablist"),e.attr.id(m),e.aria.orientation(u??"horizontal"),e.aria.label(p),e.on.keydown(f),...d.map(({item:b,index:g,isActive:v,isTabDisabled:C,tabId:_,panelId:y})=>e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(o,v,C)((V,w,S)=>Es(V??"md",w??!1,S??!1))),e.attr.id(_),e.attr.role("tab"),e.attr.tabindex(e.computedOf(v,h)((V,w)=>V||w===g?0:-1)),e.aria.selected(v),e.aria.controls(y),e.aria.disabled(C),e.attr.disabled(C),e.dataAttr("tab-index",String(g)),e.aria.label(b.ariaLabel),e.on.click(V=>{V.preventDefault(),e.Value.get(b.disabled??!1)||e.Value.get(c)||(r?.(b.key),h.set(g))}),e.on.focus(()=>{h.set(g)}),b.label))),e.When(i??!0,()=>e.html.div(e.attr.class("bc-tabs__panels"),...d.map(({item:b,isActive:g,tabId:v,panelId:C})=>e.When(g,()=>e.html.div(e.attr.class("bc-tabs__panel"),e.attr.id(C),e.attr.role("tabpanel"),e.attr.tabindex(0),e.aria.labelledby(v),b.content()))))))}function Bs(t){return t<20?10:t<50?3:t<80?2:t<99?.5:0}function Ls(t){const a=k.backgroundValue(t,"solid","light"),n=k.backgroundValue(t,"solid","dark");return`--nav-progress-fill: ${a.backgroundColor}; --nav-progress-fill-dark: ${n.backgroundColor}`}function Ms(t={}){const{color:a="primary",height:n=3,position:r="top",showSpinner:o=!1,trickleSpeed:l=200,minimumDuration:s=300,animationSpeed:c=200}=t,u=e.prop(0),i=e.prop(!1),p=e.prop(!1);let m=null,h=null,d=0;function f(){m!=null&&(clearInterval(m),m=null)}function b(){h!=null&&(clearTimeout(h),h=null)}function g(){f(),m=setInterval(()=>{const K=u.value,A=Bs(K);A>0&&u.set(Math.min(K+Math.random()*A,99.5))},e.Value.get(l))}function v(){b(),u.set(0),i.set(!0),p.set(!0),d=Date.now(),requestAnimationFrame(()=>{u.set(Math.random()*5+2),g()})}function C(K){const A=Math.max(0,Math.min(100,K));u.set(A),!i.value&&A<100&&(i.set(!0),p.set(!0))}function _(){f(),u.set(100);const K=e.Value.get(c);h=setTimeout(()=>{i.set(!1),h=setTimeout(()=>{p.set(!1),u.set(0)},K)},K)}function y(){b();const K=Date.now()-d,B=e.Value.get(s)-K;B>0?h=setTimeout(_,B):_()}function V(){f(),b(),i.set(!1),p.set(!1),u.set(0)}const w={start:v,set:C,done:y,reset:V,isActive:i},S=e.Value.map(r,K=>`bc-navigation-progress bc-navigation-progress--${K??"top"}`),$=e.Value.map(a,K=>Ls(K??"primary")),N=e.Value.map(n,K=>`${K??3}px`),D=e.Value.map(u,K=>`translateX(${-100+K}%)`),M=e.Value.map(c,K=>`transform ${K??200}ms var(--motion-easing-standard, cubic-bezier(0.2, 0, 0, 1))`);return[e.When(p,()=>e.Portal("body",e.Fragment(e.html.div(e.attr.class(S),e.attr.style($),e.style.height(N),e.attr.role("progressbar"),e.aria.valuemin(0),e.aria.valuemax(100),e.aria.valuenow(u),e.html.div(e.attr.class(e.Value.map(i,K=>`bc-navigation-progress__bar${K?"":" bc-navigation-progress__bar--done"}`)),e.style.transform(D),e.style.transition(M),e.html.div(e.attr.class("bc-navigation-progress__peg")))),e.When(o,()=>e.html.div(e.attr.class(e.Value.map(S,K=>`bc-navigation-progress__spinner${K.includes("--bottom")?" bc-navigation-progress__spinner--bottom":""}`)),e.attr.style($),e.html.div(e.attr.class("bc-navigation-progress__spinner-icon"))),()=>{}),e.OnDispose(()=>{f(),b()})))),w]}function An(t,a,n,r,o,l,s){const c=t.map(d=>d.children!=null&&d.children.length>0),u=e.computedOf(r,t)((d,f)=>d.has(f.id)),i=e.computedOf(n,t)((d,f)=>d===f.id),p=t.map(d=>d.children??[]),m=()=>{o?.(e.Value.get(t).id)},h=d=>{d.stopPropagation(),l(e.Value.get(t).id)};return e.html.div(e.attr.class("bc-tree-item"),e.html.div(e.attr.class(e.computedOf(i,s)((d,f)=>["bc-tree-item__row",`bc-tree-item__row--size-${f??"md"}`,d?"bc-tree-item__row--selected":""].filter(Boolean).join(" "))),e.attr.style(`padding-left: ${a*20+8}px`),e.attr.role("treeitem"),e.attr.tabindex(0),e.aria.selected(i),e.WithElement(d=>{const f=e.computedOf(c,u)((b,g)=>b?String(g):null);e.Value.on(f,b=>{b!=null?d.setAttribute("aria-expanded",b):d.removeAttribute("aria-expanded")})}),e.on.click(m),e.When(c,()=>e.html.span(e.attr.class(e.Value.map(u,d=>["bc-tree-item__toggle",d?"bc-tree-item__toggle--expanded":""].filter(Boolean).join(" "))),e.on.click(h),k.Icon({icon:"mdi:chevron-right",size:"sm",accessibility:"decorative"})),()=>e.html.span(e.attr.class("bc-tree-item__toggle-spacer"))),e.When(t.map(d=>d.icon!=null),()=>e.html.span(e.attr.class("bc-tree-item__icon"),k.Icon({icon:t.map(d=>d.icon??""),size:"sm",accessibility:"decorative"})),()=>e.Empty),e.html.span(e.attr.class("bc-tree-item__label"),t.map(d=>d.label)),e.When(t.map(d=>d.badge!=null),()=>e.html.span(e.attr.class("bc-tree-item__badge"),t.map(d=>d.badge??"")),()=>e.Empty)),e.When(c,()=>e.html.div(gt({open:u},e.html.div(e.attr.class("bc-tree-item__children"),e.attr.role("group"),e.ForEach(p,d=>An(d,a+1,n,r,o,l,s))))),()=>e.Empty))}function Ns({items:t,selectedId:a,onSelect:n,expandedIds:r,onToggle:o,size:l="md"},...s){const c=e.prop(new Set),u=r??c,i=a??e.prop(void 0),p=m=>{const h=e.Value.get(u),d=!h.has(m);if(r==null){const f=new Set(h);d?f.add(m):f.delete(m),c.set(f)}o?.(m,d)};return e.html.div(e.attr.class(e.Value.map(l,m=>`bc-tree-view bc-tree-view--size-${m??"md"}`)),e.attr.role("tree"),e.ForEach(t,m=>An(m,0,i,u,n,p,l)),...s)}function Ws(t){return Oe.Overlay((a,n)=>{let r=n;const o=()=>r();return t(c=>{const{size:u="md",side:i="right",dismissable:p=!0,showCloseButton:m=!0,onClose:h,overlayEffect:d="opaque",container:f="body",header:b,body:g,footer:v}=c;r=n;const C=e.prop("capturing");e.Value.on(p,V=>{C.set(V?"capturing":"non-capturing")});const _=e.computedOf(b!=null,m)((V,w)=>V||w),y=e.WithElement(V=>{const w=Ue.useAnimatedElementToggle({initialStatus:"closed",element:V});w.listenOnClosed(()=>{n()}),r=()=>{w.close()},Ne.delayedAnimationFrame(()=>w.open());const $=Fe.sessionId("drawer"),N=b!=null?`${$}-header`:void 0,D=`${$}-body`;return e.html.div(e.attr.class(e.computedOf(u,i,w.status)((M,Y,K)=>`bc-drawer bc-drawer--size-${M} bc-drawer--container-${f} bc-drawer--side-${Y} bc-drawer--status-${K}`)),e.attr.role("dialog"),e.aria.modal(!0),...N?[e.aria.labelledby(N)]:[],e.aria.describedby(D),e.attr.tabindex(-1),e.attr.id($),e.dataAttr("focus-trap","true"),Oe.FocusTrap({active:!0,escapeDeactivates:!1,initialFocus:()=>document.querySelector(`#${$} [aria-label="Close drawer"]`)||null}),e.on.mousedown(M=>M.stopPropagation()),e.When(_,()=>Ut({header:e.html.div(e.attr.class("bc-drawer__header"),e.html.div(e.attr.id(N),b),e.When(m,()=>e.Use(k.BeatUII18n,M=>ee.CloseButton({size:"sm",onClick:o,label:M.$.closeDrawer})))),body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(D),g),footer:v&&e.html.div(e.attr.class("bc-drawer__footer"),v)}),()=>Ut({body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(D),g),footer:v&&e.html.div(e.attr.class("bc-drawer__footer"),v)})))});a({mode:C,effect:d??"opaque",container:f,content:y,onClickOutside:()=>{h?.(),o()},onEscape:()=>{h?.(),o()}})},()=>{o()})})}function Us(t){const{content:a,placement:n="bottom",showDelay:r=0,hideDelay:o=0,mainAxisOffset:l=8,crossAxisOffset:s=0,showOn:c="click",closable:u=!0,role:i="dialog",hasPopup:p="dialog"}=t,m=Fe.sessionId("popover"),h=typeof a=="function"?a:()=>a;return e.Fragment(e.aria.describedby(m),Ve.Flyout({content:()=>e.Fragment(e.attr.class("bc-popover"),e.attr.role(i),e.attr.id(m),h()),placement:n,showDelay:r,hideDelay:o,mainAxisOffset:l,crossAxisOffset:s,showOn:c,closable:u,role:i,hasPopup:p}))}function Rs(t,a,n,r,o,l){const s=k.backgroundValue(t,"solid","light"),c=k.backgroundValue(t,"solid","dark");return[`--ribbon-bg: ${s.backgroundColor}`,`--ribbon-text: ${s.textColor}`,`--ribbon-bg-dark: ${c.backgroundColor}`,`--ribbon-text-dark: ${c.textColor}`,`--ribbon-inset: ${Bt(a)}`,`--ribbon-offset: ${Bt(n)}`,`--ribbon-width: ${Bt(r)}`,`--ribbon-angle: ${o}deg`,`--ribbon-corner: ${l}`].join("; ")}function Bt(t){return t==null?null:typeof t=="number"?`${t}px`:t}function zs({color:t="primary",class:a,inset:n=0,offset:r=40,width:o=100,angle:l=45,corner:s="top-end"},...c){return e.html.div(e.attr.class("bc-ribbon"),e.attr.style(e.computedOf(t,n,r,o,l,s)(Rs)),e.attr.class(a),...c)}function Hs(t,a){const{dismissable:n=!0,showCloseButton:r=!0,overlayEffect:o="opaque",container:l="body",padding:s=32}=t;return Oe.Overlay((c,u)=>{let i=()=>{};return a(h=>{i=u;const d=e.prop(typeof n!="boolean"||n?"capturing":"non-capturing");let f=typeof n=="boolean"?n:!0;e.Value.on(n,g=>{f=g,d.set(g?"capturing":"non-capturing")});const b=e.html.div(e.attr.class("bc-lightbox"),e.When(r,()=>e.Use(k.BeatUII18n,g=>e.html.div(e.attr.class("bc-lightbox__close"),ee.CloseButton({size:"md",label:g.$.closeModal,onClick:()=>{i(),u()}}))),()=>null),e.html.div(e.attr.class("bc-lightbox__viewport"),e.attr.style(e.computedOf(s)(g=>`padding:${typeof g=="number"?g+"px":g}`)),e.html.div(e.attr.class("bc-lightbox__content"),h)));c({mode:d,effect:o??"opaque",container:l,content:b,onClickOutside:()=>{f&&(i(),u())},onEscape:()=>{f&&(i(),u())}})},()=>{i(),u()})})}function js(t,a){const n=["bc-announcement-bar"];return t&&n.push("bc-announcement-bar--dismissible"),a&&a.length>0&&n.push(a),n.join(" ")}function qs(t){return`--announcement-bar-bg-color: ${me.getColorVar(t,600)}`}function Gs({color:t="primary",icon:a,closable:n=!1,onClose:r,class:o,portal:l=!1},...s){const c=e.prop(!0),u=e.When(c,()=>{const i=e.Value.map(n,p=>!!p||r!=null);return e.html.div(e.attr.class(e.computedOf(i,o)((p,m)=>js(p,m))),e.attr.style(e.Value.map(t,p=>qs(p))),e.html.div(e.attr.class("bc-announcement-bar__content"),e.When(e.Value.map(a,p=>p!=null),()=>e.html.div(e.attr.class("bc-announcement-bar__icon"),k.Icon({icon:a,size:"sm",accessibility:"decorative"}))),e.html.div(e.attr.class("bc-announcement-bar__text"),...s),e.When(i,()=>e.html.div(e.attr.class("bc-announcement-bar__close"),ee.CloseButton({size:"xs",color:"white",onClick:()=>{c.set(!1),r?.()}})))))});return l===!1?u:e.Portal(l===!0?"body":l,u)}function Ys(t,a){const n=a.toLowerCase(),r=n?t.filter(c=>c.label.toLowerCase().includes(n)||c.description?.toLowerCase().includes(n)):t,o=new Map;for(const c of r){const u=c.section??"";o.has(u)||o.set(u,[]),o.get(u).push(c)}const l=[];let s=0;for(const[c,u]of o)for(let i=0;i<u.length;i++)l.push({item:u[i],globalIndex:s++,sectionStart:i===0&&c?c:void 0});return l}function Zs(t,a){const{placeholder:n,emptyMessage:r,size:o="md",container:l="body"}=t;return e.Use(k.BeatUII18n,s=>Oe.Overlay((c,u)=>{const i=n??s.$.typeACommand,p=r??s.$.noResultsFound;return a(h=>{const d=e.prop(""),f=e.prop(0);d.on(()=>f.set(0));const g=`${Fe.sessionId("command-palette")}-input`,v=d.map(y=>Ys(h,y??"")),C=v.map(y=>y.length===0),_=e.html.div(e.attr.class(e.Value.map(o,y=>`bc-command-palette bc-command-palette--size-${y??"md"}`)),e.attr.role("dialog"),e.aria.modal(!0),e.aria.label(s.$.commandPalette),e.on.mousedown(y=>y.stopPropagation()),Oe.FocusTrap({escapeDeactivates:!1,initialFocus:()=>document.getElementById(g)}),e.html.div(e.attr.class("bc-command-palette__header"),e.html.span(e.attr.class("bc-command-palette__search-icon"),k.Icon({icon:"mdi:magnify",size:"md",accessibility:"decorative"})),e.html.input(e.attr.class("bc-command-palette__input"),e.attr.type("text"),e.attr.id(g),e.attr.placeholder(i),e.attr.autocomplete("off"),e.on.input(y=>{d.set(y.target.value)}),e.on.keydown(y=>{const V=e.Value.get(v),w=e.Value.get(f);switch(y.key){case"ArrowDown":y.preventDefault(),f.set(Math.min(w+1,V.length-1));break;case"ArrowUp":y.preventDefault(),f.set(Math.max(w-1,0));break;case"Enter":y.preventDefault();{const S=V.find($=>$.globalIndex===w);S&&(S.item.onSelect(),u())}break}}))),e.html.div(e.attr.class("bc-command-palette__body"),e.When(C,()=>e.html.div(e.attr.class("bc-command-palette__empty"),p),()=>e.ForEach(v,y=>{const V=e.computedOf(f,y)((w,S)=>w===S.globalIndex);return e.html.div(e.attr.class("bc-command-palette__section"),e.When(y.map(w=>w.sectionStart!=null),()=>e.html.div(e.attr.class("bc-command-palette__section-title"),y.map(w=>w.sectionStart??""))),e.html.div(e.attr.class(e.Value.map(V,w=>`bc-command-palette__item${w?" bc-command-palette__item--selected":""}`)),e.attr.role("option"),e.aria.selected(V),e.on.click(()=>{e.Value.get(y).item.onSelect(),u()}),e.on.mouseenter(()=>{f.set(e.Value.get(y).globalIndex)}),e.When(y.map(w=>w.item.icon!=null),()=>e.html.span(e.attr.class("bc-command-palette__item-icon"),k.Icon({icon:y.map(w=>w.item.icon??""),size:"sm",accessibility:"decorative"}))),e.html.span(e.attr.class("bc-command-palette__item-content"),e.html.span(e.attr.class("bc-command-palette__item-label"),y.map(w=>w.item.label)),e.When(y.map(w=>w.item.description!=null),()=>e.html.span(e.attr.class("bc-command-palette__item-description"),y.map(w=>w.item.description??"")))),e.When(y.map(w=>w.item.shortcut!=null&&w.item.shortcut.length>0),()=>e.html.span(e.attr.class("bc-command-palette__item-shortcut"),e.ForEach(y.map(w=>w.item.shortcut??[]),w=>e.html.kbd(e.attr.class("bc-kbd bc-kbd--size-xs"),w))))))}))));c({mode:"capturing",effect:"transparent",container:l,content:_,onClickOutside:u,onEscape:u})},u)}))}function Ks(t,a){const n=a.toLowerCase();return(a?t.filter(o=>o.label.toLowerCase().includes(n)||(o.description?.toLowerCase().includes(n)??!1)):t).map((o,l)=>({item:o,index:l}))}function Xs(t){const{items:a,onClose:n,position:r}=t,o=e.prop(""),l=e.prop(0);o.on(()=>l.set(0));const s=e.computedOf(a,o)((i,p)=>Ks(i,p??"")),c=i=>{const p=e.Value.get(s),m=e.Value.get(l);switch(i.key){case"ArrowDown":i.preventDefault(),l.set(Math.min(m+1,p.length-1));break;case"ArrowUp":i.preventDefault(),l.set(Math.max(m-1,0));break;case"Enter":i.preventDefault();{const h=p.find(d=>d.index===m);h&&(h.item.onSelect(),n())}break;case"Escape":i.preventDefault(),n();break}},u=r?e.computedOf(r)(i=>i?`position: absolute; left: ${i.x}px; top: ${i.y}px;`:""):void 0;return e.Use(k.BeatUII18n,i=>e.html.div(e.attr.class("bc-block-command-palette"),u?e.attr.style(u):e.Empty,e.on.keydown(c),e.html.div(e.attr.class("bc-block-command-palette__search"),e.html.span(e.attr.class("bc-block-command-palette__search-prefix"),"/"),e.html.input(e.attr.class("bc-block-command-palette__search-input"),e.attr.type("text"),e.attr.placeholder(i.$.typeACommand),e.attr.autofocus(!0),e.attr.value(o),e.on.input(p=>{o.set(p.target.value),l.set(0)}))),e.html.div(e.attr.class("bc-block-command-palette__list"),e.ForEach(s,p=>{const m=e.computedOf(l,p)((h,d)=>h===d.index);return e.html.div(e.attr.class(e.Value.map(m,h=>`bc-block-command-palette__item${h?" bc-block-command-palette__item--selected":""}`)),e.on.click(()=>{e.Value.get(p).item.onSelect(),n()}),e.on.mouseenter(()=>{l.set(e.Value.get(p).index)}),e.html.span(e.attr.class("bc-block-command-palette__item-icon"),k.Icon({icon:p.map(h=>h.item.icon),size:"sm",accessibility:"decorative"})),e.html.div(e.attr.class("bc-block-command-palette__item-content"),e.html.span(e.attr.class("bc-block-command-palette__item-label"),p.map(h=>h.item.label)),e.When(p.map(h=>h.item.description!=null),()=>e.html.span(e.attr.class("bc-block-command-palette__item-desc"),p.map(h=>h.item.description??"")))),e.When(p.map(h=>h.item.shortcut!=null),()=>e.html.span(e.attr.class("bc-block-command-palette__item-shortcut"),p.map(h=>h.item.shortcut??""))))})),e.When(e.computedOf(s)(p=>p.length===0),()=>e.html.div(e.attr.class("bc-block-command-palette__empty"),i.$.noMatchingCommands))))}function Js(t,a){const{title:n,body:r,icon:o="lucide:alert-triangle",color:l="danger",consequences:s,confirmText:c,cancelText:u,onConfirm:i,onCancel:p,dismissable:m=!0}=t,h={size:"sm",showCloseButton:!1,dismissable:m,onClose:p};return e.Use(k.BeatUII18n,d=>Oe.Modal(h,(f,b)=>{const g=()=>{i?.(),b()},v=()=>{p?.(),b()};return a(()=>{f({header:e.html.div(e.attr.class("bc-dialog__header-row"),e.html.div(e.attr.class("bc-dialog__icon"),e.style.backgroundColor(e.Value.map(l,_=>me.getColorVar(_,100))),e.style.color(e.Value.map(l,_=>me.getColorVar(_,600))),k.Icon({icon:o,size:"sm"})),e.html.span(e.attr.class("bc-dialog__title"),n)),body:e.html.div(e.attr.class("bc-dialog__body"),e.html.p(e.attr.class("bc-dialog__description"),r),e.NotEmpty(s??[],_=>e.html.ul(e.attr.class("bc-dialog__consequences"),e.ForEach(_,y=>e.html.li(y))))),footer:e.Fragment(e.attr.class("bc-dialog__actions"),se.Button({variant:"light",size:"sm",onClick:v},e.coalesce(u,d.$.cancel)),se.Button({color:l,variant:"filled",size:"sm",onClick:g},e.coalesce(c,d.$.confirm)))})},b)}))}const Qs={info:{icon:"lucide:info",color:"info"},success:{icon:"lucide:check-circle",color:"success"},warning:{icon:"lucide:alert-triangle",color:"warning"},danger:{icon:"lucide:alert-circle",color:"danger"}};function ei(t,a){const{title:n,body:r,variant:o="info",icon:l,okText:s,onOk:c,dismissable:u=!0}=t,i=Qs[o],p=l??i.icon,m=i.color,h={size:"sm",showCloseButton:!1,dismissable:u,onClose:c};return e.Use(k.BeatUII18n,d=>Oe.Modal(h,(f,b)=>{const g=()=>{c?.(),b()};return a(()=>{f({header:e.html.div(e.attr.class("bc-dialog__header-row"),e.html.div(e.attr.class("bc-dialog__icon"),e.style.backgroundColor(me.getColorVar(m,100)),e.style.color(me.getColorVar(m,600)),k.Icon({icon:p,size:"sm"})),e.html.span(e.attr.class("bc-dialog__title"),n)),body:e.html.div(e.attr.class("bc-dialog__body"),r),footer:e.Fragment(e.attr.class("bc-dialog__actions"),se.Button({color:m,variant:"filled",size:"sm",onClick:g},e.coalesce(s,d.$.ok)))})},b)}))}function ti(t,a){const{title:n,body:r,placeholder:o,defaultValue:l="",confirmText:s,cancelText:c,onConfirm:u,onCancel:i,dismissable:p=!0}=t,m={size:"sm",showCloseButton:!1,dismissable:p,onClose:i};return e.Use(k.BeatUII18n,h=>Oe.Modal(m,(d,f)=>{const b=e.prop(""),g=()=>{u?.(b.value),f()},v=()=>{i?.(),f()};return a(()=>{b.set(e.Value.get(l)),d({header:e.html.span(e.attr.class("bc-dialog__title"),n),body:e.html.div(e.attr.class("bc-dialog__body"),r??e.Empty,e.html.input(e.attr.class("bc-dialog__input"),e.attr.type("text"),e.attr.value(l),e.attr.placeholder(o??""),e.on.input(e.emitValue(_=>b.set(_))),e.on.keydown(_=>{_.key==="Enter"&&(_.preventDefault(),g())}))),footer:e.Fragment(e.attr.class("bc-dialog__actions"),se.Button({variant:"light",size:"sm",onClick:v},e.coalesce(c,h.$.cancel)),se.Button({color:"primary",variant:"filled",size:"sm",onClick:g},e.coalesce(s,h.$.confirm)))})},f)}))}function Sa(t){return typeof t=="string"?document.querySelector(t):t}function ai(t,a){const n=t.getBoundingClientRect();return{top:n.top-a,left:n.left-a,width:n.width+a*2,height:n.height+a*2}}function ni(t,a,n,r){const l=window.innerWidth,s=window.innerHeight;let c=a;if(c==="auto"){const p=t.top,m=s-(t.top+t.height),h=t.left,d=l-(t.left+t.width),f=Math.max(p,m,h,d);f===m?c="bottom":f===p?c="top":f===d?c="right":c="left"}let u,i;switch(c){case"bottom":u=t.top+t.height+12,i=t.left+t.width/2-n/2;break;case"top":u=t.top-r-12,i=t.left+t.width/2-n/2;break;case"right":u=t.top+t.height/2-r/2,i=t.left+t.width+12;break;case"left":u=t.top+t.height/2-r/2,i=t.left-n-12;break}return i=Math.max(8,Math.min(i,l-n-8)),u=Math.max(8,Math.min(u,s-r-8)),{top:`${u}px`,left:`${i}px`,actualPlacement:c}}function ri(t){const{steps:a,backdropAction:n="ignore",spotlightPadding:r=8,spotlightRadius:o=8,showStepIndicator:l=!0,showSkipButton:s=!0,onStart:c,onStepChange:u,onComplete:i,onSkip:p,container:m="body"}=t,h=e.prop(!1),d=e.prop(!1),f=e.prop(0),b=e.prop(0),g=e.prop("0px"),v=e.prop("0px"),C=e.prop("0px"),_=e.prop("0px"),y=e.prop("0px"),V=e.prop("0px"),w=e.prop("bottom"),S=Fe.sessionId("onboarding-tour");let $=null;function N(){const W=b.value;if(W<0||W>=a.length)return;const ce=a[W],ve=Sa(ce.target);if(!ve)return;const ye=ai(ve,r);g.set(`${ye.top}px`),v.set(`${ye.left}px`),C.set(`${ye.width}px`),_.set(`${ye.height}px`);const G=ni(ye,ce.placement??"auto",320,200);y.set(G.top),V.set(G.left),w.set(G.actualPlacement)}function D(){const W=b.value;if(W<0||W>=a.length)return;const ce=a[W],ve=Sa(ce.target);ve&&(ve.scrollIntoView({behavior:"smooth",block:"nearest"}),requestAnimationFrame(N))}function M(){a.length!==0&&(b.set(0),N(),h.set(!0),d.set(!0),c?.(),u?.(0),requestAnimationFrame(()=>f.set(1)))}async function Y(){const W=b.value,ce=a[W];if(!(ce.beforeNext&&!await ce.beforeNext()))if(W>=a.length-1)j(),i?.();else{const ve=W+1;b.set(ve),u?.(ve),D()}}function K(){const W=b.value;if(W>0){const ce=W-1;b.set(ce),u?.(ce),D()}}function A(){j(),p?.()}const B=200;function j(){h.set(!1),f.set(0),setTimeout(()=>{d.set(!1),b.set(0)},B)}function ae(W){W<0||W>=a.length||(b.set(W),u?.(W),h.value&&D())}const te={startTour:M,goToStep:ae,endTour:j,isActive:h,currentStep:b},q=e.Value.map(b,W=>W<a.length?a[W].title??"":""),ue=e.Value.map(b,W=>W<a.length?a[W].description??"":""),Z=b.map(W=>W<a.length?a[W].content!=null:!1),F=e.Value.map(b,W=>`Step ${W+1} of ${a.length}`),I=e.Value.map(b,W=>W===0),E=e.Value.map(b,W=>W>=a.length-1),H=e.Value.map(b,W=>W<a.length?a[W].allowInteraction??!1:!1),ne=e.computedOf(g,v,C,_)((W,ce,ve,ye)=>{const we=parseFloat(W),L=parseFloat(ce),G=parseFloat(ve),re=parseFloat(ye),x=o;return`M0,0 H${window.innerWidth} V${window.innerHeight} H0 Z M${L+x},${we} H${L+G-x} Q${L+G},${we} ${L+G},${we+x} V${we+re-x} Q${L+G},${we+re} ${L+G-x},${we+re} H${L+x} Q${L},${we+re} ${L},${we+re-x} V${we+x} Q${L},${we} ${L+x},${we} Z`}),ge=()=>e.html.div(e.attr.class("bc-onboarding-tour"),e.attr.id(S),e.attr.role("dialog"),e.aria.modal(!0),e.aria.label("Guided tour"),e.style.opacity(f.map(String)),e.svg.svg(e.attr.class(e.computedOf(H)(W=>`bc-onboarding-tour__backdrop${W?" bc-onboarding-tour__backdrop--interactive":""}`)),e.svgAttr.width("100%"),e.svgAttr.height("100%"),e.on.click(()=>{n==="close"?A():n==="advance"&&Y()}),e.svg.path(e.svgAttr.d(ne),e.svgAttr["fill-rule"]("evenodd"),e.attr.class("bc-onboarding-tour__mask"))),e.html.div(e.attr.class(e.Value.map(w,W=>`bc-onboarding-tour__tooltip bc-onboarding-tour__tooltip--${W}`)),e.style.top(y),e.style.left(V),e.html.div(e.attr.class("bc-onboarding-tour__arrow")),e.html.div(e.attr.class("bc-onboarding-tour__content"),l?e.html.div(e.attr.class("bc-onboarding-tour__step-indicator"),F):e.Empty,e.When(e.Value.map(q,W=>W.length>0),()=>e.html.h3(e.attr.class("bc-onboarding-tour__title"),e.attr.id(`${S}-title`),q),()=>{}),e.When(Z,()=>{const W=b.value;return e.html.div(e.attr.class("bc-onboarding-tour__body"),W<a.length?a[W].content:void 0)},()=>e.When(e.Value.map(ue,W=>W.length>0),()=>e.html.p(e.attr.class("bc-onboarding-tour__description"),ue),()=>{})),e.html.div(e.attr.class("bc-onboarding-tour__nav"),e.html.div(e.attr.class("bc-onboarding-tour__nav-left"),s?se.Button({variant:"default",size:"sm",onClick:A},"Skip"):e.Empty),e.html.div(e.attr.class("bc-onboarding-tour__nav-right"),e.When(I,()=>e.Empty,()=>se.Button({variant:"outline",size:"sm",onClick:K},"Previous")),e.When(E,()=>se.Button({variant:"filled",color:"primary",size:"sm",onClick:()=>Y()},"Finish"),()=>se.Button({variant:"filled",color:"primary",size:"sm",onClick:()=>Y()},"Next"))))),Oe.FocusTrap({escapeDeactivates:!0,onEscape:A})),e.WithElement(()=>{const W=ce=>{ce.key==="ArrowRight"?(ce.preventDefault(),Y()):ce.key==="ArrowLeft"&&(ce.preventDefault(),K())};return $=()=>D(),document.addEventListener("keydown",W),window.addEventListener("resize",$),e.OnDispose(()=>{document.removeEventListener("keydown",W),$&&(window.removeEventListener("resize",$),$=null)})}));return[e.When(d,()=>m==="body"?e.Portal("body",ge()):ge()),te]}function oi(t){return`bc-kbd bc-kbd--size-${t}`}function li({size:t="sm"}={},...a){return e.html.kbd(e.attr.class(e.Value.map(t,n=>oi(n??"sm"))),...a)}function si(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\//i.test(t)}let _t=null;function ii(){return typeof window<"u"&&window.YT?.Player?Promise.resolve(window.YT):_t||(_t=new Promise(t=>{const a=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{a?.(),t(window.YT)};const n=document.createElement("script");n.src="https://www.youtube.com/iframe_api",n.async=!0,document.head.appendChild(n)}),_t)}function ci(t){const{url:a,playing:n=!1,loop:r=!1,controls:o=!1,volume:l=1,muted:s=!1,playbackRate:c=1,pip:u=!1,playsinline:i=!0,width:p,height:m,progressInterval:h=1e3,seekTo:d,config:f,onReady:b,onStart:g,onPlay:v,onPause:C,onBuffer:_,onBufferEnd:y,onEnded:V,onError:w,onDuration:S,onSeek:$,onProgress:N,onPlaybackRateChange:D,onPlaybackQualityChange:M}=t;function Y(L){return/\.m3u8(\?|$)/i.test(L)}function K(L){try{const G=L.canPlayType("application/vnd.apple.mpegurl");return G==="probably"||G==="maybe"}catch{return!1}}const A=e.prop("file");let B=null,j=null,ae=null;function te(){try{ae?.destroy()}catch{}ae=null}const q=[];async function ue(){const L=B;if(!L)return;const G=e.Value.get(a);if(typeof G!="string"||G.length===0)return;te();const re=f?.file?.forceHLS??!1;if(Y(G)||re){if(K(L)){L.setAttribute("src",G);try{L.load()}catch{}return}if(typeof window>"u")return;try{const x=await import("hls.js/dist/hls.light.min.js"),oe=x;let ke=oe.default??oe.Hls??x;for(let Se=0;Se<3&&(typeof ke=="object"&&ke!=null&&"default"in ke);Se++)ke=ke.default;if(typeof ke=="function"){const Se=ke;if(typeof Se.isSupported=="function"&&Se.isSupported()){L.removeAttribute("src");try{L.load()}catch{}const O=new Se(f?.hls);ae=O,O.attachMedia(L),O.loadSource(G)}else{L.setAttribute("src",G);try{L.load()}catch{}}}else{L.setAttribute("src",G);try{L.load()}catch{}}}catch(x){w?.(x),L.setAttribute("src",G);try{L.load()}catch{}}return}L.setAttribute("src",G);try{L.load()}catch{}}function Z(){j?.();const L=e.Value.get(h)??1e3;j=Ne.interval(()=>{const G=B;if(!G)return;const re=G.duration||0,x=G.currentTime||0,oe=G.buffered?.length?G.buffered.end(G.buffered.length-1):0;N?.({played:re>0?x/re:0,playedSeconds:x,loaded:re>0?Math.min(oe,re)/re:0,loadedSeconds:Math.min(oe,re)})},L)}function F(L){if(L!=null)return typeof L=="number"?`${L}px`:L}const I=e.html.video(e.WithElement(L=>{B=L,b?.();try{B.playbackRate=e.Value.get(c)??1}catch{}B.muted=!!(e.Value.get(s)??!1),B.loop=!!(e.Value.get(r)??!1),B.controls=!!(e.Value.get(o)??!1),B.playsInline!=null&&(!!(e.Value.get(i)??!0)?B.setAttribute("playsinline",""):B.removeAttribute("playsinline"));try{const G=!!(e.Value.get(u)??!1),re=document,x=B;G?typeof x.requestPictureInPicture=="function"&&re.pictureInPictureElement!==B&&x.requestPictureInPicture().catch(()=>{}):re.pictureInPictureElement===B&&typeof re.exitPictureInPicture=="function"&&re.exitPictureInPicture().catch(()=>{})}catch{}Z(),ue()}),e.style.width(e.Value.map(p,F)),e.style.height(e.Value.map(m,F)),e.on.play(()=>v?.()),e.on.playing(()=>{g?.(),y?.()}),e.on.pause(()=>C?.()),e.on.waiting(()=>_?.()),e.on.canplay(()=>{const L=B?.duration;L!=null&&Number.isFinite(L)&&S?.(L),e.Value.get(n)&&B&&B.paused&&B.play?.().catch(()=>{})}),e.on.ended(()=>V?.()),e.on.error(L=>{ae||w?.(L)}));let E=null,H=null,ne=null;function ge(){const L=e.Value.get(a);!E||typeof L!="string"||ii().then(G=>{const re=Bn(L);if(re){if(H){H.loadVideoById({videoId:re});return}H=new G.Player(E,{videoId:re,playerVars:ui(t),events:{onReady:()=>{b?.(),W(),e.Value.get(n)&&g?.(),be()},onStateChange:x=>{switch(x.data){case G.PlayerState.PLAYING:v?.(),y?.();break;case G.PlayerState.PAUSED:C?.();break;case G.PlayerState.BUFFERING:_?.();break;case G.PlayerState.ENDED:V?.();break}},onError:x=>w?.(x),onPlaybackRateChange:x=>D?.(x.data),onPlaybackQualityChange:x=>M?.(x.data)}})}})}function be(){ne?.();const L=e.Value.get(h)??1e3;ne=Ne.interval(()=>{if(!H)return;const G=H.getDuration?.()??0,re=H.getCurrentTime?.()??0,x=H.getVideoLoadedFraction?.()??0;N?.({played:G>0?re/G:0,playedSeconds:re,loaded:x,loadedSeconds:x*G})},L)}function W(){if(!H)return;try{const re=e.Value.get(c)??1;H.setPlaybackRate?.(re)}catch{}try{const re=Math.round(Math.min(Math.max(e.Value.get(l)??1,0),1)*100);H.setVolume?.(re)}catch{}try{e.Value.get(s)??!1?H.mute?.():H.unMute?.()}catch{}e.Value.get(n)??!1?H.playVideo?.():H.pauseVideo?.();const G=e.Value.get(d);typeof G=="number"&&Number.isFinite(G)&&(H.seekTo?.(G,!0),$?.(G))}const ce=e.html.div(e.WithElement(L=>{E=L,A.value==="youtube"&&ge()}));q.push(e.Value.on(a,L=>{const G=typeof L=="string"&&L.length>0&&si(L),re=G?"youtube":"file";A.set(re),G?ge():B&&ue()})),q.push(e.Value.on(n,()=>{A.value==="file"&&B?e.Value.get(n)?B.play?.().catch(()=>{}):B.pause?.():A.value==="youtube"&&H&&(e.Value.get(n)?H.playVideo?.():H.pauseVideo?.())})),q.push(e.Value.on(l,()=>{if(A.value==="file"&&B)B.volume=Math.min(Math.max(e.Value.get(l)??1,0),1);else if(A.value==="youtube"&&H){const L=Math.round(Math.min(Math.max(e.Value.get(l)??1,0),1)*100);H.setVolume?.(L)}})),q.push(e.Value.on(s,()=>{A.value==="file"&&B?B.muted=!!e.Value.get(s):A.value==="youtube"&&H&&(e.Value.get(s)?H.mute?.():H.unMute?.())})),q.push(e.Value.on(c,()=>{if(A.value==="file"&&B)try{B.playbackRate=e.Value.get(c)??1}catch{}else A.value==="youtube"&&H&&H.setPlaybackRate?.(e.Value.get(c)??1)})),q.push(e.Value.on(u,async()=>{if(!(A.value!=="file"||!B))try{const L=!!(e.Value.get(u)??!1),G=document,re=B;L?typeof re.requestPictureInPicture=="function"&&G.pictureInPictureElement!==B&&await re.requestPictureInPicture()?.catch(()=>{}):G.pictureInPictureElement===B&&typeof G.exitPictureInPicture=="function"&&await G.exitPictureInPicture()?.catch(()=>{})}catch{}})),q.push(e.Value.on(o,()=>{A.value==="file"&&B&&(B.controls=!!e.Value.get(o))})),q.push(e.Value.on(r,()=>{A.value==="file"&&B&&(B.loop=!!e.Value.get(r))})),q.push(e.Value.on(i,()=>{A.value==="file"&&B&&(!!e.Value.get(i)?B.setAttribute("playsinline",""):B.removeAttribute("playsinline"))})),q.push(e.Value.on(d??null,()=>{const L=e.Value.get(d);if(L!=null)if(A.value==="file"&&B)try{B.currentTime=L,$?.(L)}catch{}else A.value==="youtube"&&H&&(H.seekTo?.(L,!0),$?.(L))})),q.push(()=>{j?.(),ne?.(),te();try{H?.destroy()}catch{}});const ve=e.Value.map(A,L=>L==="file"),ye=e.Value.map(A,L=>L==="youtube"),we=e.html.div(e.attr.class("bc-base-video"),e.style.width(e.Value.map(p,F)),e.style.height(e.Value.map(m,F)),e.html.div(e.style.display(e.Value.map(ve,L=>L?"block":"none")),I),e.html.div(e.style.display(e.Value.map(ye,L=>L?"block":"none")),ce));return e.Fragment(e.OnDispose(...q),we)}function Bn(t){const a=/[?&]v=([^&#]+)/.exec(t);if(a)return a[1];const n=/youtu\.be\/([^?&#]+)/.exec(t);if(n)return n[1];const r=/youtube\.com\/embed\/([^?&#]+)/.exec(t);return r?r[1]:null}function ui(t){const a={autoplay:e.Value.get(t.playing)??!1?1:0,controls:e.Value.get(t.controls)??!1?1:0,rel:0,playsinline:e.Value.get(t.playsinline)??!0?1:0,modestbranding:1},n=e.Value.get(t.loop)??!1,r=e.Value.get(t.url),o=typeof r=="string"?Bn(r):null;return n&&o&&(a.loop=1,a.playlist=o),a}function Ln(t,...a){const n=a.length;if(n===0){const x={goTo:()=>{},next:()=>{},prev:()=>{},play:()=>{},pause:()=>{},isPlaying:e.prop(!1),currentIndex:e.prop(0),totalSlides:0};return[e.Empty,x]}const r=e.prop(e.Value.get(t.currentIndex??0)),o=e.Value.toSignal(t.autoPlay??!1),l=e.Value.toSignal(t.interval??3e3),s=e.Value.toSignal(t.loop??!1),c=e.Value.toSignal(t.slidesPerView??1),u=e.Value.toSignal(t.transition??"slide"),i=e.Value.toSignal(t.transitionDuration??300),p=e.Value.toSignal(t.showArrows??!0),m=e.Value.toSignal(t.pauseOnHover??!0),h=e.Value.toSignal(t.keyboard??!0),d=e.Value.toSignal(t.gap??"0px"),f=e.Value.toSignal(t.peekAmount??"0px"),b=e.Value.toSignal(t.align??"start"),g=e.Value.toSignal(t.easing??"cubic-bezier(0.2, 0, 0, 1)"),v=e.Value.toSignal(t.dragThreshold??50),C=e.Value.toSignal(t.indicator??"dots"),_=e.prop(!1),y=e.prop(e.Value.get(o));o.on(x=>y.set(x));const V=e.prop(Math.max(0,n-e.Value.get(c)));c.on(x=>{V.set(Math.max(0,n-x))});const w=e.computedOf(r,s)((x,oe)=>!oe&&x===0),S=e.computedOf(r,s,V)((x,oe,ke)=>!oe&&x>=ke);function $(x){const oe=V.value;return oe===0?0:e.Value.get(s)?(x%n+n)%n:Math.max(0,Math.min(x,oe))}function N(x){const oe=$(x);oe!==r.value&&(r.set(oe),t.onSlideChange?.(oe))}function D(){const x=r.value+1;(e.Value.get(s)||x<=V.value)&&N(x)}function M(){const x=r.value-1;(e.Value.get(s)||x>=0)&&N(x)}function Y(){y.set(!0),t.onAutoPlayToggle?.(!0)}function K(){y.set(!1),t.onAutoPlayToggle?.(!1)}let A=null;function B(){j(),A=setInterval(()=>{_.value&&e.Value.get(m)||D()},e.Value.get(l))}function j(){A!=null&&(clearInterval(A),A=null)}y.on(x=>{x?B():j()}),l.on(()=>{y.value&&B()});let ae=0,te=0,q=0;const ue=50;let Z=!1,F=0,I=0,E=!1;const H=e.prop("0%");function ne(x){if(e.Value.get(u)==="fade")return"0%";const oe=e.Value.get(c),ke=e.Value.get(d),Se=-(x*(100/oe));return ke==="0px"||ke==="0"?`${Se}%`:`calc(${Se}% - ${x} * ${ke})`}r.on(x=>{H.set(ne(x))}),u.on(()=>{H.set(ne(r.value))}),H.set(ne(e.Value.get(r)));const ge=t.prevIcon??"lucide:chevron-left",be=t.nextIcon??"lucide:chevron-right",W=t.arrowIconSize??"md",ce=e.computedOf(c,d)((x,oe)=>oe==="0px"||oe==="0"?`${100/x}%`:`calc((100% - ${x-1} * ${oe}) / ${x})`),ve=u.map(x=>x==="fade"),ye=a.map((x,oe)=>{const ke=e.computedOf(ve,r)((U,ie)=>U?ie===oe?"1":"0":""),Se=ve.map(U=>U?oe===0?"relative":"absolute":""),O=ve.map(U=>U&&oe!==0?"0":"");return e.html.div(e.attr.class("bc-carousel__slide"),e.attr.class(r.map(U=>U===oe?"bc-carousel__slide--active":"")),e.attr.role("tabpanel"),e.aria.roledescription("slide"),e.aria.label(`Slide ${oe+1} of ${n}`),e.style.minWidth(ce),e.style.flexShrink("0"),e.style.opacity(ke),e.style.position(Se),e.style.inset(O),x)}),we=Array.from({length:n},(x,oe)=>e.html.button(e.attr.class(r.map(ke=>`bc-carousel__dot${ke===oe?" bc-carousel__dot--active":""}`)),e.attr.type("button"),e.aria.label(`Go to slide ${oe+1}`),e.on.click(()=>N(oe)))),L=b.map(x=>{switch(x){case"center":return"center";case"end":return"flex-end";default:return"flex-start"}}),G={goTo:N,next:D,prev:M,play:Y,pause:K,isPlaying:y,currentIndex:r,totalSlides:n};return[e.html.div(e.attr.class(u.map(x=>`bc-carousel bc-carousel--${x}`)),e.attr.role("region"),e.aria.roledescription("carousel"),e.aria.label(t.ariaLabel??"Carousel"),e.attr.tabindex(0),e.WithElement(x=>{const oe=O=>{e.Value.get(h)&&(O.key==="ArrowLeft"?(O.preventDefault(),M()):O.key==="ArrowRight"&&(O.preventDefault(),D()))};x.addEventListener("keydown",oe);const ke=O=>{Z&&(I=O.clientX-F)},Se=()=>{Z&&(Z=!1,x.classList.remove("bc-carousel--dragging"),Math.abs(I)>=e.Value.get(v)?(E=!0,I>0?M():D()):Math.abs(I)>5&&(E=!0),E&&requestAnimationFrame(()=>{E=!1}))};return window.addEventListener("mousemove",ke),window.addEventListener("mouseup",Se),e.OnDispose(()=>{x.removeEventListener("keydown",oe),window.removeEventListener("mousemove",ke),window.removeEventListener("mouseup",Se),j()})}),e.on.mouseenter(()=>_.set(!0)),e.on.mouseleave(()=>_.set(!1)),e.on.touchstart(x=>{ae=x.touches[0].clientX,te=x.touches[0].clientY,q=0}),e.on.touchmove(x=>{q=x.touches[0].clientX-ae;const oe=Math.abs(x.touches[0].clientY-te);Math.abs(q)>oe&&x.preventDefault()}),e.on.touchend(()=>{Math.abs(q)>=ue&&(q>0?M():D())}),e.html.div(e.attr.class("bc-carousel__viewport"),e.style.paddingLeft(f),e.style.paddingRight(f),e.WithElement(x=>(u.on(oe=>{oe==="fade"?x.style.minWidth=`${x.offsetWidth}px`:x.style.minWidth=""}),e.OnDispose(()=>{}))),e.on.mousedown(x=>{Z=!0,F=x.clientX,I=0,E=!1,x.preventDefault()}),e.on.click(x=>{E&&(x.preventDefault(),x.stopPropagation())}),e.html.div(e.attr.class("bc-carousel__track"),e.style.position(ve.map(x=>x?"relative":"")),e.style.transform(H.map(x=>`translateX(${x})`)),e.style.transitionDuration(i.map(x=>`${x}ms`)),e.style.transitionTimingFunction(g),e.style.gap(d),e.style.justifyContent(L),...ye)),e.When(p,()=>e.html.button(e.attr.class("bc-carousel__arrow bc-carousel__arrow--prev"),e.attr.class(w.map(x=>x?"bc-carousel__arrow--disabled":"")),e.attr.type("button"),e.attr.disabled(w),e.aria.label("Previous slide"),e.on.click(()=>M()),k.Icon({icon:ge,size:W,accessibility:"decorative"}))),e.When(p,()=>e.html.button(e.attr.class("bc-carousel__arrow bc-carousel__arrow--next"),e.attr.class(S.map(x=>x?"bc-carousel__arrow--disabled":"")),e.attr.type("button"),e.attr.disabled(S),e.aria.label("Next slide"),e.on.click(()=>D()),k.Icon({icon:be,size:W,accessibility:"decorative"}))),e.When(C.map(x=>x==="dots"),()=>e.html.div(e.attr.class("bc-carousel__dots"),e.attr.role("tablist"),e.aria.label("Slide navigation"),...we)),e.When(C.map(x=>x==="progress"),()=>e.html.div(e.attr.class("bc-carousel__progress"),e.attr.role("progressbar"),e.aria.valuemin(0),e.aria.valuemax(100),e.aria.valuenow(r.map(x=>Math.round((x+1)/n*100))),e.html.div(e.attr.class("bc-carousel__progress-fill"),e.style.width(r.map(x=>`${(x+1)/n*100}%`))))),e.When(C.map(x=>x==="fraction"),()=>e.html.div(e.attr.class("bc-carousel__fraction"),e.aria.live("polite"),r.map(x=>`${x+1} / ${n}`)))),G]}function di(t,...a){return Ln(t,...a)[0]}const da="https://cdn.jsdelivr.net/npm/pdfjs-dist@5.4.394/",pi=t=>{if(!t||typeof t!="object")return!1;const a=t;return!!(a.getDocument&&typeof a.getDocument=="function")};function mi(){if(typeof window>"u")return;const a=window.pdfjsLib;a?.GlobalWorkerOptions?.workerSrc||a?.GlobalWorkerOptions&&(a.GlobalWorkerOptions.workerSrc=`${da}build/pdf.worker.min.mjs`)}const hi=t=>new Promise((a,n)=>{const r=document.createElement("script");r.type="module",r.src=t,r.onload=()=>a(),r.onerror=()=>n(new Error(`Failed to load script: ${t}`)),document.head.appendChild(r)}),fi=async()=>{const t=window;if(t.pdfjsLib&&pi(t.pdfjsLib))return t.pdfjsLib;if(await hi(`${da}build/pdf.min.mjs`),await new Promise(a=>setTimeout(a,100)),!t.pdfjsLib)throw new Error("PDF.js failed to initialize after loading");return t.pdfjsLib};let Lt=null,xa=!1;async function gi(){if(Lt)return Lt;!xa&&typeof window<"u"&&(mi(),xa=!0);const t=await fi();return Lt=t,t.GlobalWorkerOptions&&(t.GlobalWorkerOptions.workerSrc=`${da}build/pdf.worker.min.mjs`),t}function bi(t,a){if(t.byteLength!==a.byteLength)return!1;const n=t.byteLength,r=new DataView(t.buffer,t.byteOffset,n),o=new DataView(a.buffer,a.byteOffset,n),l=n>>>2,s=n&3;for(let c=0;c<l;c++)if(r.getUint32(c*4)!==o.getUint32(c*4))return!1;for(let c=n-s;c<n;c++)if(t[c]!==a[c])return!1;return!0}function vi(t,a){if(t.byteLength!==a.byteLength)return!1;const n=t.byteLength,r=n>>>2,o=new Uint32Array(t,0,r),l=new Uint32Array(a,0,r);for(let i=0;i<r;i++)if(o[i]!==l[i])return!1;const s=n&3,c=new Uint8Array(t,r*4,s),u=new Uint8Array(a,r*4,s);for(let i=0;i<s;i++)if(c[i]!==u[i])return!1;return!0}function yi(t,a){try{return typeof t=="string"&&typeof a=="string"?t===a:t instanceof Uint8Array&&a instanceof Uint8Array?bi(t,a):t instanceof ArrayBuffer&&a instanceof ArrayBuffer?vi(t,a):!1}catch{return!1}}function Mt(t){return typeof t=="string"?t:t instanceof Uint8Array?t.slice():t instanceof ArrayBuffer?t.slice(0):t}function ki({source:t,page:a=1,fit:n="width",scale:r=1,rotation:o=0,quality:l=2,renderTextLayer:s=!0,renderAnnotationLayer:c=!1,onPageChange:u,onLoadComplete:i},...p){const m=gi();let h=Mt(e.Value.get(t)),d=null,f=e.Value.get(a),b=null;return e.Use(k.BeatUII18n,g=>e.Fragment(e.OnDispose(()=>{if(b){try{b.cancel()}catch{}b=null}d!=null&&(d.destroy(),d=null)}),$e.ElementRect(v=>{const C=e.delaySignal(v.map(_=>_==null?null:{width:_.width,height:_.height},(_,y)=>_!=null&&y!=null&&_.width===y.width&&_.height===y.height),100);return e.Ensure(C,_=>$e.Query({request:e.computedOf(t,a,n,r,o,l,s,c,_)((y,V,w,S,$,N,D,M,Y)=>({source:y,page:V??1,fit:w??"width",scale:Math.max(.1,S??1),rotation:$??0,quality:Math.max(1,N??2),renderTextLayer:D??!0,renderAnnotationLayer:M??!1,containerWidth:Y.width,containerHeight:Y.height})),load:async({request:y})=>{const V=await m,w=y.source,S=Mt(w),$=Mt(w);(d==null||!yi(h,S))&&(d!=null&&(d.destroy(),d=null),h=S,d=await V.getDocument($).promise,i?.({pdfDoc:d}));const N=y.page<1||y.page>d.numPages?1:y.page;u!=null&&N!==f&&(f=N,u(N));const D=await d.getPage(N);let M;if(y.fit==="none")M=y.scale;else{const A=D.getViewport({scale:1,rotation:y.rotation}),B=A.width/A.height,j=y.containerWidth/y.containerHeight;switch(y.fit){case"width":M=y.containerWidth/A.width;break;case"height":M=y.containerHeight/A.height;break;case"contain":M=Math.min(y.containerWidth/A.width,y.containerHeight/A.height);break;case"cover":B>j?M=y.containerHeight/A.height:M=y.containerWidth/A.width;break}}const Y=D.getViewport({scale:M,rotation:y.rotation}),K=D.getViewport({scale:M*y.quality,rotation:y.rotation});return{pdfWidth:Y.width,pdfHeight:Y.height,canvasWidth:Math.floor(Y.width),canvasHeight:Math.floor(Y.height),highResWidth:Math.floor(K.width),highResHeight:Math.floor(K.height),render:async(A,B,j)=>{if(b)try{b.cancel(),await b.promise.catch(()=>{})}catch{}A.width=K.width,A.height=K.height,A.style.width=`${Y.width}px`,A.style.height=`${Y.height}px`;const ae=A.getContext("2d");if(!ae)throw new Error("Failed to get canvas context");const te=D.render({canvasContext:ae,canvas:A,viewport:K});b=te;try{await te.promise}catch(q){if((q instanceof Error?q.name:q?.name)!=="RenderingCancelledException")throw q;return}finally{b===te&&(b=null)}if(y.renderTextLayer&&B!=null){B.innerHTML="";try{const q=await D.getTextContent(),ue=V.TextLayer;ue!=null&&await new ue({textContentSource:q,container:B,viewport:Y}).render()}catch(q){console.warn("Failed to render text layer:",q)}}if(y.renderAnnotationLayer&&j!=null){j.innerHTML="",j.style.width=`${Y.width}px`,j.style.height=`${Y.height}px`;try{const q=await D.getAnnotations(),ue=V.AnnotationLayer;if(ue!=null&&q.length>0){const Z={getDestinationHash:()=>"",getAnchorUrl:I=>I,executeNamedAction:()=>{},executeSetOCGState:()=>{},cachePageRef:()=>{}};await new ue({div:j,page:D,viewport:Y,linkService:Z,annotationStorage:null}).render({viewport:Y,div:j,annotations:q,page:D,linkService:Z,renderForms:!0})}}catch(q){console.warn("Failed to render annotation layer:",q)}}}}},convertError:y=>y instanceof Error?y.message:JSON.stringify(y),pending:()=>e.html.div(e.attr.class("bc-pdf-page-viewer__loading"),k.Icon({icon:"line-md:loading-twotone-loop",size:"lg"}),e.html.span(e.attr.class("bc-pdf-page-viewer__loading-text"),g.map(y=>y.pdfPageViewer.loading))),failure:({error:y})=>e.html.div(e.attr.class("bc-pdf-page-viewer__error"),k.Icon({icon:"line-md:alert-circle",size:"lg",color:"danger"}),e.html.span(e.attr.class("bc-pdf-page-viewer__error-text"),y)),success:({value:y})=>e.html.div(e.attr.class(e.Value.map(n,V=>{const w=V??"width";return w==="none"?"bc-pdf-page-viewer":`bc-pdf-page-viewer bc-pdf-page-viewer--fit-${w}`})),e.html.div(e.attr.class("bc-pdf-page-viewer__content"),e.When(e.Value.map(n,V=>(V??"width")==="none"),()=>e.attr.style(y.$.canvasWidth.map(V=>`width: ${V}px; height: ${y.value.canvasHeight}px;`))),e.html.canvas(e.attr.class("bc-pdf-page-viewer__canvas"),e.attr.width(y.$.canvasWidth.map(String)),e.attr.height(y.$.canvasHeight.map(String)),...p),e.html.div(e.attr.class("bc-pdf-page-viewer__text-layer")),e.html.div(e.attr.class("bc-pdf-page-viewer__annotation-layer"))),e.WithElement(V=>{const w=V.querySelector(".bc-pdf-page-viewer__canvas"),S=V.querySelector(".bc-pdf-page-viewer__text-layer"),$=V.querySelector(".bc-pdf-page-viewer__annotation-layer");return e.Value.on(y,async N=>{await N.render(w,S,$)}),e.Empty}))}))})))}Object.defineProperty(exports,"Use",{enumerable:!0,get:()=>e.Use});exports.BeatUII18n=k.BeatUII18n;exports.Icon=k.Icon;exports.LOGICAL_PROPERTY_MAP=k.LOGICAL_PROPERTY_MAP;exports.Locale=k.Locale;exports.defaultLocale=k.defaultLocale;exports.defaultMessages=k.defaultMessages;exports.formatFileSize=k.formatFileSize;exports.getDirectionClassName=k.getDirectionClassName;exports.getDirectionFromLocale=k.getDirectionFromLocale;exports.getIconLocally=k.getIconLocally;exports.getOppositeDirection=k.getOppositeDirection;exports.getPhysicalProperty=k.getPhysicalProperty;exports.isIndexedDBAvailable=k.isIndexedDBAvailable;exports.isRTLLocale=k.isRTLLocale;exports.makeI18nProvider=k.makeI18nProvider;exports.makeMessages=k.makeMessages;exports.resolveDirection=k.resolveDirection;exports.storeIconLocally=k.storeIconLocally;exports.backgroundConfig=me.backgroundConfig;exports.bgColors=me.bgColors;exports.borderColors=me.borderColors;exports.colorShades=me.colorShades;exports.colors=me.colors;exports.generateColorVariables=me.generateColorVariables;exports.generateCoreColorVariables=me.generateCoreColorVariables;exports.generateSemanticColorVariables=me.generateSemanticColorVariables;exports.getColorVar=me.getColorVar;exports.getColorVarName=me.getColorVarName;exports.interactiveColors=me.interactiveColors;exports.normalizeColorName=me.normalizeColorName;exports.resolveSemanticColorMap=me.resolveSemanticColorMap;exports.semanticColorNames=me.semanticColorNames;exports.semanticColors=me.semanticColors;exports.textColors=me.textColors;exports.themeColorNames=me.themeColorNames;exports.baseFontSize=T.baseFontSize;exports.baseMotionDuration=T.baseMotionDuration;exports.baseSpacing=T.baseSpacing;exports.borderWidth=T.borderWidth;exports.breakpoints=T.breakpoints;exports.changeFontSize=T.changeFontSize;exports.controlGap=T.controlGap;exports.controlHeight=T.controlHeight;exports.controlPaddingBlock=T.controlPaddingBlock;exports.controlPaddingInline=T.controlPaddingInline;exports.fontFamily=T.fontFamily;exports.fontSize=T.fontSize;exports.fontWeight=T.fontWeight;exports.generateAllTokenVariables=T.generateAllTokenVariables;exports.generateBorderWidthVariables=T.generateBorderWidthVariables;exports.generateBreakpointVariables=T.generateBreakpointVariables;exports.generateControlGapVariables=T.generateControlGapVariables;exports.generateControlHeightVariables=T.generateControlHeightVariables;exports.generateControlPaddingVariables=T.generateControlPaddingVariables;exports.generateControlTokenVariables=T.generateControlTokenVariables;exports.generateCoreTokenVariables=T.generateCoreTokenVariables;exports.generateFontFamilyOverrideVariables=T.generateFontFamilyOverrideVariables;exports.generateMotionVariables=T.generateMotionVariables;exports.generateOutlineWidthVariables=T.generateOutlineWidthVariables;exports.generateOverlayWidthVariables=T.generateOverlayWidthVariables;exports.generateRadiusVariables=T.generateRadiusVariables;exports.generateSemanticFontVariables=T.generateSemanticFontVariables;exports.generateSemanticMotionVariables=T.generateSemanticMotionVariables;exports.generateSemanticRadiusVariables=T.generateSemanticRadiusVariables;exports.generateSemanticShadowVariables=T.generateSemanticShadowVariables;exports.generateSemanticSpacingVariables=T.generateSemanticSpacingVariables;exports.generateSemanticTextShadowVariables=T.generateSemanticTextShadowVariables;exports.generateSemanticTokenVariables=T.generateSemanticTokenVariables;exports.generateShadowVariables=T.generateShadowVariables;exports.generateSpacingVariables=T.generateSpacingVariables;exports.generateTextShadowVariables=T.generateTextShadowVariables;exports.generateTypographyVariables=T.generateTypographyVariables;exports.generateZIndexVariables=T.generateZIndexVariables;exports.getBaseFontSizeVar=T.getBaseFontSizeVar;exports.getBaseFontSizeVarName=T.getBaseFontSizeVarName;exports.getBaseMotionDurationVar=T.getBaseMotionDurationVar;exports.getBaseMotionDurationVarName=T.getBaseMotionDurationVarName;exports.getBorderWidthVar=T.getBorderWidthVar;exports.getBorderWidthVarName=T.getBorderWidthVarName;exports.getBreakpointMediaQuery=T.getBreakpointMediaQuery;exports.getBreakpointVar=T.getBreakpointVar;exports.getBreakpointVarName=T.getBreakpointVarName;exports.getControlGapVar=T.getControlGapVar;exports.getControlGapVarName=T.getControlGapVarName;exports.getControlHeightVar=T.getControlHeightVar;exports.getControlHeightVarName=T.getControlHeightVarName;exports.getControlPaddingBlockVar=T.getControlPaddingBlockVar;exports.getControlPaddingBlockVarName=T.getControlPaddingBlockVarName;exports.getControlPaddingInlineVar=T.getControlPaddingInlineVar;exports.getControlPaddingInlineVarName=T.getControlPaddingInlineVarName;exports.getFontFamilyVar=T.getFontFamilyVar;exports.getFontFamilyVarName=T.getFontFamilyVarName;exports.getFontSizeLineHeightVar=T.getFontSizeLineHeightVar;exports.getFontSizeLineHeightVarName=T.getFontSizeLineHeightVarName;exports.getFontSizeVar=T.getFontSizeVar;exports.getFontSizeVarName=T.getFontSizeVarName;exports.getFontWeightVar=T.getFontWeightVar;exports.getFontWeightVarName=T.getFontWeightVarName;exports.getLetterSpacingVar=T.getLetterSpacingVar;exports.getLetterSpacingVarName=T.getLetterSpacingVarName;exports.getLineHeightVar=T.getLineHeightVar;exports.getLineHeightVarName=T.getLineHeightVarName;exports.getMotionDurationVar=T.getMotionDurationVar;exports.getMotionDurationVarName=T.getMotionDurationVarName;exports.getMotionEasingVar=T.getMotionEasingVar;exports.getMotionEasingVarName=T.getMotionEasingVarName;exports.getOutlineWidthVar=T.getOutlineWidthVar;exports.getOutlineWidthVarName=T.getOutlineWidthVarName;exports.getOverlayWidthVar=T.getOverlayWidthVar;exports.getOverlayWidthVarName=T.getOverlayWidthVarName;exports.getRadiusMediaQuery=T.getRadiusMediaQuery;exports.getRadiusVar=T.getRadiusVar;exports.getRadiusVarName=T.getRadiusVarName;exports.getSemanticFontVar=T.getSemanticFontVar;exports.getSemanticFontVarName=T.getSemanticFontVarName;exports.getSemanticMotionVarName=T.getSemanticMotionVarName;exports.getSemanticRadiusVarName=T.getSemanticRadiusVarName;exports.getSemanticShadowVarName=T.getSemanticShadowVarName;exports.getSemanticSpacingVarName=T.getSemanticSpacingVarName;exports.getSemanticTextShadowVarName=T.getSemanticTextShadowVarName;exports.getShadowVar=T.getShadowVar;exports.getShadowVarName=T.getShadowVarName;exports.getSpacingVar=T.getSpacingVar;exports.getSpacingVarName=T.getSpacingVarName;exports.getTextShadowVar=T.getTextShadowVar;exports.getTextShadowVarName=T.getTextShadowVarName;exports.getTokenValue=T.getTokenValue;exports.getZIndexVar=T.getZIndexVar;exports.getZIndexVarName=T.getZIndexVarName;exports.letterSpacing=T.letterSpacing;exports.lineHeight=T.lineHeight;exports.motionDurations=T.motionDurations;exports.motionEasings=T.motionEasings;exports.outlineWidth=T.outlineWidth;exports.overlayWidth=T.overlayWidth;exports.radius=T.radius;exports.semanticFontNames=T.semanticFontNames;exports.semanticMotionNames=T.semanticMotionNames;exports.semanticRadiusNames=T.semanticRadiusNames;exports.semanticShadowNames=T.semanticShadowNames;exports.semanticSpacingNames=T.semanticSpacingNames;exports.semanticTextShadowNames=T.semanticTextShadowNames;exports.shadows=T.shadows;exports.spacing=T.spacing;exports.textShadows=T.textShadows;exports.zIndex=T.zIndex;exports.ArrayController=ee.ArrayController;exports.BaseControl=ee.BaseControl;exports.BaseMappedControl=ee.BaseMappedControl;exports.CheckboxInput=ee.CheckboxInput;exports.CloseButton=ee.CloseButton;exports.Control=ee.Control;exports.Controller=ee.Controller;exports.ControllerValidation=ee.ControllerValidation;exports.FIELD_LAYOUT_DEFAULTS=ee.FIELD_LAYOUT_DEFAULTS;exports.Field=ee.Field;exports.FieldLayout=ee.FieldLayout;exports.MappedControl=ee.MappedControl;exports.ObjectController=ee.ObjectController;exports.RequiredSymbol=ee.RequiredSymbol;exports.connectCommonAttributes=ee.connectCommonAttributes;exports.connectNumberInput=ee.connectNumberInput;exports.connectStringInput=ee.connectStringInput;exports.convertStandardSchemaIssues=ee.convertStandardSchemaIssues;exports.convertStandardSchemaPathToPath=ee.convertStandardSchemaPathToPath;exports.makeMapValidation=ee.makeMapValidation;exports.makeOnBlurHandler=ee.makeOnBlurHandler;exports.makeOnChangeHandler=ee.makeOnChangeHandler;exports.parsePath=ee.parsePath;exports.pathToString=ee.pathToString;exports.standardSchemaResultToValidation=ee.standardSchemaResultToValidation;exports.taskToValidation=ee.taskToValidation;exports.useController=ee.useController;exports.useForm=ee.useForm;exports.wrapSegment=ee.wrapSegment;exports.AnimatedToggle=Ue.AnimatedToggle;exports.AnimatedToggleClass=Ue.AnimatedToggleClass;exports.useAnimatedElementToggle=Ue.useAnimatedElementToggle;exports.useAnimatedToggle=Ue.useAnimatedToggle;exports.useTimedToggle=Ue.useTimedToggle;exports.Theme=ut.Theme;exports.ThemeAppearance=ut.ThemeAppearance;exports.beatuiPreset=Ia.beatuiPreset;exports.createBeatuiPreset=Ia.createBeatuiPreset;exports.Base64Input=X.Base64Input;exports.Base64sInput=X.Base64sInput;exports.ColorSwatchInput=X.ColorSwatchInput;exports.EditableText=X.EditableText;exports.NullableDateInput=X.NullableDateInput;exports.NullableDateTimeInput=X.NullableDateTimeInput;exports.NullableEmailInput=X.NullableEmailInput;exports.NullablePasswordInput=X.NullablePasswordInput;exports.NullableRatingInput=X.NullableRatingInput;exports.NullableSliderInput=X.NullableSliderInput;exports.NullableTextArea=X.NullableTextArea;exports.NullableTextInput=X.NullableTextInput;exports.NullableUrlInput=X.NullableUrlInput;exports.NullableUuidInput=X.NullableUuidInput;exports.RatingInput=X.RatingInput;exports.SliderInput=X.SliderInput;exports.Switch=X.Switch;exports.emptyToNull=X.emptyToNull;exports.fileToBase64=X.fileToBase64;exports.forFormat=X.forFormat;exports.forTypeAndFormat=X.forTypeAndFormat;exports.forXUI=X.forXUI;exports.formatColor=X.formatColor;exports.getContrastRatio=X.getContrastRatio;exports.hexToRgb=X.hexToRgb;exports.hslToRgb=X.hslToRgb;exports.hwbToRgb=X.hwbToRgb;exports.isValidColor=X.isValidColor;exports.isValidHexColor=X.isValidHexColor;exports.isValidHslColor=X.isValidHslColor;exports.isValidRgbColor=X.isValidRgbColor;exports.isValidRgbaColor=X.isValidRgbaColor;exports.linearToSrgb=X.linearToSrgb;exports.mulberry32=X.mulberry32;exports.normalizeHexColor=X.normalizeHexColor;exports.nullToEmpty=X.nullToEmpty;exports.oklchToRgb=X.oklchToRgb;exports.parseAnyColor=X.parseAnyColor;exports.resolveEffectiveFormat=X.resolveEffectiveFormat;exports.rgbToHex=X.rgbToHex;exports.rgbToHsl=X.rgbToHsl;exports.rgbToHwb=X.rgbToHwb;exports.rgbToOklch=X.rgbToOklch;exports.srgbToLinear=X.srgbToLinear;exports.toRgbaString=X.toRgbaString;exports.sessionId=Fe.sessionId;exports.BooleanValidator=Oe.BooleanValidator;exports.ConfirmModal=Oe.ConfirmModal;exports.FocusTrap=Oe.FocusTrap;exports.Modal=Oe.Modal;exports.ObjectValidator=Oe.ObjectValidator;exports.Overlay=Oe.Overlay;exports.StringValidator=Oe.StringValidator;exports.boolean=Oe.boolean;exports.createStandardSchema=Oe.createStandardSchema;exports.object=Oe.object;exports.string=Oe.string;exports.useFocusTrap=Oe.useFocusTrap;exports.Button=se.Button;exports.InputContainer=se.InputContainer;exports.InputIcon=se.InputIcon;exports.generateButtonClasses=se.generateButtonClasses;exports.generateButtonStyles=se.generateButtonStyles;exports.generateInputContainerInputClasses=se.generateInputContainerInputClasses;exports.BaseListControl=J.BaseListControl;exports.BaseNativeSelectControl=J.BaseNativeSelectControl;exports.Expando=J.Expando;exports.FilesInput=J.FilesInput;exports.Group=J.Group;exports.ListControl=J.ListControl;exports.ListInput=J.ListInput;exports.ListItemControls=J.ListItemControls;exports.MaskInput=J.MaskInput;exports.NativeSelect=J.NativeSelect;exports.NativeSelectControl=J.NativeSelectControl;exports.NullableDurationInput=J.NullableDurationInput;exports.NullableNumberInput=J.NullableNumberInput;exports.NumberInput=J.NumberInput;exports.SegmentedInput=J.SegmentedInput;exports.TextArea=J.TextArea;exports.UnionController=J.UnionController;exports.UnstyledDropZone=J.UnstyledDropZone;exports.UrlInput=J.UrlInput;exports.UuidInput=J.UuidInput;exports.WithTemporal=J.WithTemporal;exports.deepMergeDefaults=J.deepMergeDefaults;exports.emitExpando=J.emitExpando;exports.emitOptionExpando=J.emitOptionExpando;exports.ensureTemporal=J.ensureTemporal;exports.transformEmptyStringToUndefined=J.transformEmptyStringToUndefined;exports.transformNullToUndefined=J.transformNullToUndefined;exports.transformUndefinedToNull=J.transformUndefinedToNull;exports.CommonInputAttributes=Ee.CommonInputAttributes;exports.TextInput=Ee.TextInput;exports.mapInputOptions=Ee.mapInputOptions;exports.Flyout=Ve.Flyout;exports.Menu=Ve.Menu;exports.MenuItem=Ve.MenuItem;exports.MenuSeparator=Ve.MenuSeparator;exports.BigintInput=Re.BigintInput;exports.DurationInput=Re.DurationInput;exports.FileInput=Re.FileInput;exports.NullableBigintInput=Re.NullableBigintInput;exports.NullablePlainDateInput=Re.NullablePlainDateInput;exports.NullablePlainDateTimeInput=Re.NullablePlainDateTimeInput;exports.NullablePlainTimeInput=Re.NullablePlainTimeInput;exports.PlainDateInput=Re.PlainDateInput;exports.PlainDateTimeInput=Re.PlainDateTimeInput;exports.PlainTimeInput=Re.PlainTimeInput;exports.Card=mt.Card;exports.CardBody=mt.CardBody;exports.CardCoverImage=mt.CardCoverImage;exports.CardFooter=mt.CardFooter;exports.CardHeader=mt.CardHeader;exports.DangerLabel=rt.DangerLabel;exports.EmphasisLabel=rt.EmphasisLabel;exports.Label=rt.Label;exports.MutedLabel=rt.MutedLabel;exports.Stack=rt.Stack;exports.EmailInput=qt.EmailInput;exports.Notice=qt.Notice;exports.PasswordInput=qt.PasswordInput;exports.LinkPortal=jn.LinkPortal;exports.Toolbar=ht.Toolbar;exports.ToolbarButton=ht.ToolbarButton;exports.ToolbarDivider=ht.ToolbarDivider;exports.ToolbarGroup=ht.ToolbarGroup;exports.ToolbarSpacer=ht.ToolbarSpacer;exports.Accordion=Wr;exports.ActionCard=zr;exports.AlertDialog=ei;exports.Align=po;exports.AnnouncementBar=Gs;exports.AppShell=ro;exports.AppearanceSelector=on;exports.AutoColorBadge=vr;exports.Avatar=tr;exports.AvatarGroup=pr;exports.AvatarGroupOverflow=mr;exports.Badge=nt;exports.BaseComboboxControl=mn;exports.BaseComboboxTagsControl=tl;exports.BaseDropdownControl=un;exports.BaseMultiSelectControl=Br;exports.BaseSelectTagsControl=Qo;exports.BaseVideoPlayer=ci;exports.BeatUI=zl;exports.BlockCommandPalette=Xs;exports.Breadcrumbs=Vs;exports.ButtonLink=Ds;exports.Carousel=di;exports.Center=so;exports.CenterH=oo;exports.Chips=la;exports.Collapse=gt;exports.CollapsibleSidebarGroup=$s;exports.ColorController=hn;exports.ColorInput=ln;exports.ColumnFilter=at;exports.ColumnFilterPanel=pt;exports.ColumnHeaderMenu=en;exports.ComboboxControl=Jo;exports.ComboboxInput=pn;exports.ComboboxTagsControl=al;exports.ComboboxTagsInput=ia;exports.CommandPalette=Zs;exports.ConfirmationDialog=Js;exports.DataTable=qo;exports.DataToolbar=Ra;exports.DateInput=nl;exports.DatePicker=ir;exports.DateRangePicker=ur;exports.DateTimeInput=ol;exports.Divider=io;exports.Drawer=Ws;exports.DropdownBase=oa;exports.DropdownControl=Xo;exports.DropdownInput=cn;exports.EmptyState=bs;exports.EnsureControl=Pl;exports.Fieldset=Ml;exports.Filter=De;exports.FormStatus=El;exports.FormatBigInt=Xl;exports.FormatDate=es;exports.FormatDateTime=ls;exports.FormatDisplayName=ps;exports.FormatFileSize=fs;exports.FormatList=us;exports.FormatNumber=Yl;exports.FormatPlural=hs;exports.FormatRelativeTime=is;exports.FormatTime=ns;exports.Gap=uo;exports.Grow=go;exports.HistoryTimeline=yr;exports.Indicator=wr;exports.InputAdornment=ll;exports.InstantInput=Vl;exports.Justify=mo;exports.Kbd=li;exports.LazyNativeSelect=sl;exports.Lightbox=Hs;exports.Link=Dn;exports.LoadingOverlay=nn;exports.LocaleSelector=Nl;exports.MultiSelect=It;exports.MultiSelectControl=Lr;exports.NativePdfPreview=Hl;exports.NavigationLink=Is;exports.NavigationProgress=Ms;exports.NineSliceScrollView=co;exports.NoWrap=fo;exports.Notification=bn;exports.NotificationPanel=_s;exports.NotificationProvider=ca;exports.NotificationService=vn;exports.NotificationViewport=yn;exports.NullableColorInput=Zo;exports.NullableColorSwatchInput=Ko;exports.NullableInstantInput=xl;exports.NullableMaskInput=il;exports.NullablePlainMonthDayInput=Fl;exports.NullablePlainYearMonthInput=$l;exports.NullableZonedDateTimeInput=Dl;exports.OnboardingTour=ri;exports.OpenGraph=ks;exports.Option=Le;exports.OtpInput=wl;exports.PDFJSPreview=jl;exports.PageDropZone=Cr;exports.Pagination=Ua;exports.PdfPageViewer=ki;exports.PlainMonthDayInput=Tl;exports.PlainYearMonthInput=Ol;exports.Popover=Us;exports.PresenceCursor=Pa;exports.PresenceHighlight=Vr;exports.PresenceSelectionMark=Sr;exports.ProgressBar=xr;exports.PromptDialog=ti;exports.RadioGroup=hl;exports.RangeSlider=vl;exports.Ribbon=zs;exports.ScrollablePanel=Ut;exports.SelectAllCheckbox=an;exports.SelectTagsControl=el;exports.SelectTagsInput=sa;exports.SelectionCheckbox=ra;exports.Sidebar=Os;exports.SidebarActiveLink=Fn;exports.SidebarClickLink=Pn;exports.SidebarContext=$n;exports.SidebarGroup=jt;exports.SidebarLink=En;exports.SidebarSeparator=Ts;exports.SidebarUrlLink=Tn;exports.Sink=vo;exports.Skeleton=Ir;exports.SortableHeader=Xa;exports.StandaloneAppearanceSelector=Go;exports.StylePortal=vs;exports.Table=La;exports.Tabs=As;exports.TagInput=ul;exports.TagsInput=dl;exports.ToggleButton=Ga;exports.ToggleButtonGroup=Jr;exports.Tooltip=dt;exports.TreeView=Ns;exports.TriStateCheckboxInput=tn;exports.WithBeatUIBreakpoint=qa;exports.WithBeatUIElementBreakpoint=Yr;exports.WithBreakpoint=ta;exports.Wrap=ho;exports.ZonedDateTimeInput=Il;exports.colorInputOptionsFromController=Bl;exports.compareBreakpoint=ja;exports.createCarousel=Ln;exports.createColorController=Al;exports.createDataSource=Ma;exports.createLocationMatcher=Dt;exports.delaySignal=qn;exports.describeBuiltinFilter=Zt;exports.describeBuiltinFilterLocalized=Xt;exports.describeFilter=Kt;exports.describeFilterLocalized=xt;exports.downloadContent=Gn;exports.downloadFile=Zn;exports.downloadUrl=Gt;exports.downloadUrlAndMonitor=Yn;exports.evaluateBuiltinFilter=St;exports.evaluateFilterExpr=wt;exports.findBreakpoint=qr;exports.formatBigInt=Kl;exports.formatDate=Ql;exports.formatDateTime=os;exports.formatDisplayName=ds;exports.formatList=cs;exports.formatNumber=Gl;exports.formatPlural=ms;exports.formatRelativeTime=ss;exports.formatTime=as;exports.generateBadgeClasses=Ta;exports.generateBadgeStyles=Fa;exports.generateLinkClasses=zt;exports.generateLinkStyles=Ht;exports.generateNotificationClasses=fn;exports.generateNotificationStyles=gn;exports.generatePaginationRange=Na;exports.generatePaginationStyles=Wa;exports.generateProgressBarClasses=Ea;exports.generateProgressBarStyles=Aa;exports.generateSkeletonClasses=Nt;exports.generateSkeletonStyles=Ba;exports.increaseSize=Kn;exports.inferValueType=Yt;exports.isBuiltinFilter=ft;exports.isUrlMatch=On;exports.renderDetailRow=na;exports.renderToggleCell=aa;exports.renderToggleFilterCell=Qa;exports.renderToggleHeaderCell=Ja;exports.resolvePluralCategory=In;
|