@tempots/beatui 0.93.0 → 0.95.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.
Files changed (115) hide show
  1. package/dist/{ar-8Cko5i-Z.js → ar-B4jDJwHQ.js} +2 -1
  2. package/dist/{ar-D2DjoXta.cjs → ar-BVXPzVJB.cjs} +1 -1
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +1 -1
  5. package/dist/{auth-divider-Rt0WDKAe.js → auth-divider-BPwKk8MW.js} +7 -7
  6. package/dist/{auth-divider-C3E16pml.cjs → auth-divider-BgaQ8ifw.cjs} +1 -1
  7. package/dist/better-auth/index.cjs.js +1 -1
  8. package/dist/better-auth/index.es.js +5 -5
  9. package/dist/{de-Cdf3432J.cjs → de-BdfPZskW.cjs} +1 -1
  10. package/dist/{de-Bt-d2iKj.js → de-Dd33yWzb.js} +2 -1
  11. package/dist/{deep-merge-CoLO4id0.js → deep-merge-C8dSqIXI.js} +4 -4
  12. package/dist/{deep-merge-Blrucd-E.cjs → deep-merge-ChJQbUKq.cjs} +1 -1
  13. package/dist/{duration-input-DrVonjKK.js → duration-input-DFZwkg6M.js} +4 -4
  14. package/dist/{duration-input-47x7nbGh.cjs → duration-input-IuFWywO5.cjs} +1 -1
  15. package/dist/{editor-toolbar-group-DhKJdqER.cjs → editor-toolbar-group-BCBfu8pG.cjs} +1 -1
  16. package/dist/{editor-toolbar-group-CzdBZ1yr.js → editor-toolbar-group-DiJFgGcI.js} +2 -2
  17. package/dist/{es-6fFPkKHL.cjs → es-C8TpneCm.cjs} +1 -1
  18. package/dist/{es-2llfNFX2.js → es-jHMT3_7O.js} +2 -1
  19. package/dist/{fa-GXyNzAXz.cjs → fa-BXnP4pbN.cjs} +1 -1
  20. package/dist/{fa-CQVIBjKP.js → fa-eX3_BAZR.js} +2 -1
  21. package/dist/{fr-CC3smTlW.js → fr-Bj-GjMJm.js} +2 -1
  22. package/dist/{fr-C6EYTwSH.cjs → fr-HJDhGjI2.cjs} +1 -1
  23. package/dist/{he-CJUgxvi8.cjs → he-C6nEVZhN.cjs} +1 -1
  24. package/dist/{he-CZilsN75.js → he-DYgmPPkG.js} +2 -1
  25. package/dist/{hi-CAZjwGv-.js → hi-CgYLonE9.js} +2 -1
  26. package/dist/{hi-DqIR4VtX.cjs → hi-DMVSXAJt.cjs} +1 -1
  27. package/dist/{index-BOC0cVoY.cjs → index-D_zOXmU5.cjs} +2 -2
  28. package/dist/{index-DJ9YIJcG.js → index-vowHNIPH.js} +5 -5
  29. package/dist/{index-BFzxpY7y.js → index-yOU4Ceaq.js} +1 -1
  30. package/dist/{index-B-cwxUsP.cjs → index-zQ3IYJFH.cjs} +1 -1
  31. package/dist/index.cjs.js +2 -2
  32. package/dist/index.es.js +19 -19
  33. package/dist/{input-container-DiYEl_y8.cjs → input-container-BWYHj0Iq.cjs} +1 -1
  34. package/dist/{input-container-9r1F3KuX.js → input-container-DMoVdH6E.js} +1 -1
  35. package/dist/{it-D6RXFIL6.js → it-CO2BPqah.js} +2 -1
  36. package/dist/{it-BvHsJ7fH.cjs → it-DhfVcjKb.cjs} +1 -1
  37. package/dist/{ja-D7zsz4Ij.js → ja-BrzwjH8T.js} +3 -2
  38. package/dist/{ja-B2gP7OHY.cjs → ja-Bt6fGS_Q.cjs} +1 -1
  39. package/dist/json-schema/index.cjs.js +1 -1
  40. package/dist/json-schema/index.es.js +10 -10
  41. package/dist/json-schema-display/index.cjs.js +1 -1
  42. package/dist/json-schema-display/index.es.js +1 -1
  43. package/dist/json-structure/index.cjs.js +1 -1
  44. package/dist/json-structure/index.es.js +5 -5
  45. package/dist/{ko-taN2Npr4.js → ko-D-lJ4wYQ.js} +4 -3
  46. package/dist/{ko-BddhddIA.cjs → ko-DfAaBGrz.cjs} +1 -1
  47. package/dist/lexical/index.cjs.js +30 -30
  48. package/dist/lexical/index.es.js +5002 -4766
  49. package/dist/{modal-DUlqGUW7.cjs → modal-CiGmgsOI.cjs} +1 -1
  50. package/dist/{modal-ZitwUeXx.js → modal-CwZuWiSK.js} +3 -3
  51. package/dist/{nl-COrtZUnH.cjs → nl-CNWBQjK5.cjs} +1 -1
  52. package/dist/{nl-CRC6r4Q4.js → nl-ClsworIe.js} +2 -1
  53. package/dist/{notice-DAVOTnfA.cjs → notice-CPZQuxcA.cjs} +1 -1
  54. package/dist/{notice-E_p2hg1G.js → notice-D7hYFM5A.js} +4 -4
  55. package/dist/{oneof-branch-detection-D6Xa8qNR.cjs → oneof-branch-detection-BFxukD63.cjs} +1 -1
  56. package/dist/{oneof-branch-detection-DCPwyutI.js → oneof-branch-detection-izpPjBCR.js} +1 -1
  57. package/dist/{pl-BHI4zBgV.cjs → pl-CqHTeu3-.cjs} +1 -1
  58. package/dist/{pl-C6qNs0Lq.js → pl-WTwLAxnV.js} +2 -1
  59. package/dist/prosemirror/index.cjs.js +1 -1
  60. package/dist/prosemirror/index.es.js +1 -1
  61. package/dist/{pt-BGzC9MhU.cjs → pt-BQmsiqbo.cjs} +1 -1
  62. package/dist/{pt-CcWPLqBh.js → pt-CgkjJnsG.js} +2 -1
  63. package/dist/{ru-CXeFbIPb.cjs → ru-CG56A2To.cjs} +1 -1
  64. package/dist/{ru-Dt9-9m0E.js → ru-CtgH7OY9.js} +2 -1
  65. package/dist/{text-input-BgPx8BbG.js → text-input-BLupB3cU.js} +1 -1
  66. package/dist/{text-input-DUnhBUd6.cjs → text-input-M6WBhhVj.cjs} +1 -1
  67. package/dist/{toolbar-DKOh_gbA.js → toolbar-Be1eU0qU.js} +1 -1
  68. package/dist/{toolbar-Dkc2y1dI.cjs → toolbar-WWv5kcYG.cjs} +1 -1
  69. package/dist/{tr-CDTWeRY0.js → tr-D1O1vEmr.js} +4 -3
  70. package/dist/{tr-CdOtQAtA.cjs → tr-DE7_VtKu.cjs} +1 -1
  71. package/dist/{translations-BdCtLBZt.cjs → translations-DBxIjvWR.cjs} +1 -1
  72. package/dist/{translations-CiBhB2FV.js → translations-DyCmyLE_.js} +59 -58
  73. package/dist/translations-OOsMRpX9.cjs +1 -0
  74. package/dist/{translations-NBY7SubC.js → translations-yu4gNqlP.js} +1 -1
  75. package/dist/types/beatui-i18n/default.d.ts +1 -0
  76. package/dist/types/beatui-i18n/locales/en.d.ts +1 -0
  77. package/dist/types/beatui-i18n/translations.d.ts +1 -0
  78. package/dist/types/components/lexical/toolbar/toolbar-registry.d.ts +2 -1
  79. package/dist/types/lexical/index.d.ts +2 -2
  80. package/dist/types/lexical/plugins/element-style.d.ts +28 -0
  81. package/dist/types/lexical/plugins/index.d.ts +2 -2
  82. package/dist/types/lexical/plugins/text.d.ts +5 -0
  83. package/dist/types/lexical/types.d.ts +126 -5
  84. package/dist/types/lexical-i18n/default.d.ts +1 -0
  85. package/dist/types/lexical-i18n/locales/ar.d.ts +1 -0
  86. package/dist/types/lexical-i18n/locales/de.d.ts +1 -0
  87. package/dist/types/lexical-i18n/locales/en.d.ts +1 -0
  88. package/dist/types/lexical-i18n/locales/es.d.ts +1 -0
  89. package/dist/types/lexical-i18n/locales/fa.d.ts +1 -0
  90. package/dist/types/lexical-i18n/locales/fr.d.ts +1 -0
  91. package/dist/types/lexical-i18n/locales/he.d.ts +1 -0
  92. package/dist/types/lexical-i18n/locales/hi.d.ts +1 -0
  93. package/dist/types/lexical-i18n/locales/it.d.ts +1 -0
  94. package/dist/types/lexical-i18n/locales/ja.d.ts +1 -0
  95. package/dist/types/lexical-i18n/locales/ko.d.ts +1 -0
  96. package/dist/types/lexical-i18n/locales/nl.d.ts +1 -0
  97. package/dist/types/lexical-i18n/locales/pl.d.ts +1 -0
  98. package/dist/types/lexical-i18n/locales/pt.d.ts +1 -0
  99. package/dist/types/lexical-i18n/locales/ru.d.ts +1 -0
  100. package/dist/types/lexical-i18n/locales/tr.d.ts +1 -0
  101. package/dist/types/lexical-i18n/locales/ur.d.ts +1 -0
  102. package/dist/types/lexical-i18n/locales/vi.d.ts +1 -0
  103. package/dist/types/lexical-i18n/locales/zh.d.ts +1 -0
  104. package/dist/{ur-CLrK5FPQ.js → ur-BcuB7IqE.js} +2 -1
  105. package/dist/{ur-C7itXvnC.cjs → ur-ZJgsSpG2.cjs} +1 -1
  106. package/dist/{use-form-BQRVnIp9.js → use-form-CfxvyTfd.js} +2 -2
  107. package/dist/{use-form-DTyNw0kM.cjs → use-form-ClA0ZRco.cjs} +1 -1
  108. package/dist/{vi-CQrUWB3y.cjs → vi-BOgLRkuK.cjs} +1 -1
  109. package/dist/{vi-B1_QDUQJ.js → vi-D0rQ3dIx.js} +2 -1
  110. package/dist/{widget-customization-C-fSx3RB.js → widget-customization-CLZNGavL.js} +5 -5
  111. package/dist/{widget-customization-xEBfEPhQ.cjs → widget-customization-DtEEo35Y.cjs} +1 -1
  112. package/dist/{zh-DWswYYTS.cjs → zh-BTZ8OZ4H.cjs} +1 -1
  113. package/dist/{zh-rDtQ92Pp.js → zh-DoYqiZO1.js} +2 -1
  114. package/package.json +9 -9
  115. package/dist/translations-Cy9hoMGV.cjs +0 -1
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),ae=require("@tempots/ui"),f=require("./translations-Cy9hoMGV.cjs"),Z=require("./colors-BI0YhONJ.cjs"),x=require("./index-CN10Cyqr.cjs"),W=require("./use-form-DTyNw0kM.cjs"),le=require("./use-animated-toggle-DrqK7nUS.cjs"),Se=require("./theme-DogY9oT1.cjs"),bt=require("./tailwind/preset.cjs.js"),T=require("./widget-customization-xEBfEPhQ.cjs"),oe=require("./session-id-B5lJMzbB.cjs"),A=require("./deep-merge-Blrucd-E.cjs"),te=require("./modal-DUlqGUW7.cjs"),G=require("./input-container-DiYEl_y8.cjs"),ce=require("./text-input-DUnhBUd6.cjs"),ie=require("./menu-De_-sGeb.cjs"),Pe=require("./timer-BJHOsuS6.cjs"),se=require("./duration-input-47x7nbGh.cjs"),oa=require("./utils-DIUEhA-Z.cjs"),Ve=require("./stack-4VUGISn6.cjs"),Ke=require("./notice-DAVOTnfA.cjs"),la=require("./link-portal-_tiDFZqh.cjs"),De=require("./toolbar-Dkc2y1dI.cjs");function sa(t,a=0,n=()=>!0){let r=null,o;const c=e.prop(t.value);return t.on(s=>{o=s,n(s)?r==null&&(r=setTimeout(()=>{r=null,c.set(o)},a)):c.set(s)}),t.onDispose(()=>{r!=null&&clearTimeout(r)}),c}const Qe=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")}},ia=(t,a,n="application/octet-stream")=>{const r=new Blob([t],{type:n});Qe(URL.createObjectURL(r),a),URL.revokeObjectURL(URL.createObjectURL(r))},ca=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"),s=c?parseInt(c,10):void 0,i=(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 p=o.body.getReader();let d=0;for(;;){const{done:v,value:b}=await p.read();if(v)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",l=await i,h=new File([l],u,{type:l.type});r=!0,n.set({type:"done",file:h})}catch(o){n.set({type:"error",error:o})}finally{r=!0,n.dispose()}})(),{signal:n,cancel:()=>{r||a.abort()}}},ua=t=>{Qe(URL.createObjectURL(t),t.name)},ct=(t,a)=>t<a?t:a,$e=(t,a)=>t>a?t:a,da=(t,{abortSignal:a}={})=>new Promise((n,r)=>{const o=setTimeout(n,t);a&&a.addEventListener("abort",()=>{clearTimeout(o),r(new DOMException("Aborted","AbortError"))})}),We=["xs","sm","md","lg","xl"];function pa(t,a=1){const n=We.indexOf(t);if(n===-1)throw new Error(`Invalid size: ${t}`);const r=Math.min(Math.max(n+a,0),We.length-1);return We[r]}function ma(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 ha(t){const a=f.backgroundValue(t,"solid","light"),n=f.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 ba(t,a,n){const r=["bc-avatar",`bc-avatar--size-${t}`,`bc-avatar--${a}`];return n&&r.push("bc-avatar--bordered"),r.join(" ")}function ga({src:t,name:a,icon:n,size:r="md",variant:o="circle",color:c="base",bordered:s=!1},...i){const u=e.html.span(e.attr.class("bc-avatar__icon"),f.Icon({icon:"mdi:account",size:"md"}));return e.html.div(e.attr.class(e.computedOf(r,o,s)((l,h,m)=>ba(l??"md",h??"circle",m??!1))),e.attr.style(e.Value.map(c,l=>ha(l??"base"))),e.Ensure(t,l=>e.html.img(e.attr.class("bc-avatar__image"),e.attr.src(l),e.attr.alt(a!=null?e.Value.map(a,h=>h??"Avatar"):"Avatar")),()=>e.Ensure(a,l=>e.html.span(e.attr.class("bc-avatar__initials"),l.map(h=>ma(h))),()=>e.Ensure(n,l=>e.html.span(e.attr.class("bc-avatar__icon"),f.Icon({icon:l,size:"md"})),()=>u))),...i)}const me=20,_e=7,fa=["January","February","March","April","May","June","July","August","September","October","November","December"],ya=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],va=["Su","Mo","Tu","We","Th","Fr","Sa"];function ka(t,a){const n=["bc-calendar",`bc-calendar--size-${t}`];return a&&n.push("bc-calendar--disabled"),n.join(" ")}function Ca(t){const a=f.backgroundValue(t,"solid","light"),n=f.backgroundValue(t,"solid","dark"),r=f.backgroundValue(t,"light","light"),o=f.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 gt(t,a,n,r,o,c){const s=t.PlainDate.from({year:a,month:n,day:1}),i=s.daysInMonth,l=(s.dayOfWeek%7-r+_e)%_e,h=s.subtract({months:1}),m=h.daysInMonth,p=[],d=(b,k,C)=>{p.push({day:k,date:b,inMonth:C,isToday:b.equals(o),isDisabled:c?.(b)??!1})};for(let b=l-1;b>=0;b--){const k=m-b;d(h.with({day:k}),k,!1)}for(let b=1;b<=i;b++)d(t.PlainDate.from({year:a,month:n,day:b}),b,!0);const v=_e-p.length%_e;if(v<_e){const b=s.add({months:1});for(let k=1;k<=v;k++)d(b.with({day:k}),k,!1)}return p}function ft(t,a,n,r,o){const c=t.Now.plainDateISO(),s=e.prop(a),i=e.prop(n),u=e.prop("days"),l=e.prop(Math.floor(a/me)*me),h=[];for(let m=0;m<_e;m++)h.push(va[(m+o)%_e]);return{today:c,currentYear:s,currentMonth:i,view:u,yearPageStart:l,shiftedDayNames:h,prevMonth:()=>{if(e.Value.get(r))return;const m=i.value,p=s.value;m===1?(i.set(12),s.set(p-1)):i.set(m-1)},nextMonth:()=>{if(e.Value.get(r))return;const m=i.value,p=s.value;m===12?(i.set(1),s.set(p+1)):i.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)||l.update(m=>m-me)},nextYearPage:()=>{e.Value.get(r)||l.update(m=>m+me)},switchToMonthsView:()=>{e.Value.get(r)||u.set("months")},switchToYearsView:()=>{if(e.Value.get(r))return;const m=s.value;l.set(Math.floor(m/me)*me),u.set("years")},selectMonth:m=>{e.Value.get(r)||(i.set(m),u.set("days"))},selectYear:m=>{e.Value.get(r)||(s.set(m),u.set("months"))}}}function yt(t,a,n){const{size:r,disabled:o,color:c,ariaLabel:s}=a,{today:i,currentYear:u,currentMonth:l,view:h,yearPageStart:m,prevMonth:p,nextMonth:d,prevYear:v,nextYear:b,prevYearPage:k,nextYearPage:C,switchToMonthsView:_,switchToYearsView:w,selectMonth:y,selectYear:V}=t;return e.html.div(e.attr.class(e.computedOf(r,o)(ka)),e.attr.style(e.Value.map(c,Ca)),e.attr.role("grid"),e.aria.label(s),e.OneOfValue(h,{days:()=>e.html.div(e.attr.class("bc-calendar__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Previous year"),e.on.click(g=>{g.preventDefault(),v()}),"«"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Previous month"),e.on.click(g=>{g.preventDefault(),p()}),"‹"),e.html.div(e.attr.class("bc-calendar__title"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__title-btn"),e.attr.disabled(o),e.aria.label("Select month"),e.on.click(g=>{g.preventDefault(),_()}),e.Value.map(l,g=>fa[g-1])),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__title-btn"),e.attr.disabled(o),e.aria.label("Select year"),e.on.click(g=>{g.preventDefault(),w()}),e.Value.map(u,String))),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Next month"),e.on.click(g=>{g.preventDefault(),d()}),"›"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Next year"),e.on.click(g=>{g.preventDefault(),b()}),"»")),months:()=>e.html.div(e.attr.class("bc-calendar__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Previous year"),e.on.click(g=>{g.preventDefault(),v()}),"«"),e.html.span(e.attr.class("bc-calendar__title"),e.Value.map(u,String)),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Next year"),e.on.click(g=>{g.preventDefault(),b()}),"»")),years:()=>e.html.div(e.attr.class("bc-calendar__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label(`Previous ${me} years`),e.on.click(g=>{g.preventDefault(),k()}),"«"),e.html.span(e.attr.class("bc-calendar__title"),e.Value.map(m,g=>`${g} – ${g+me-1}`)),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label(`Next ${me} years`),e.on.click(g=>{g.preventDefault(),C()}),"»"))}),e.OneOfValue(h,{days:()=>e.html.div(e.attr.class("bc-calendar__days-view"),e.html.div(e.attr.class("bc-calendar__weekdays"),...t.shiftedDayNames.map(g=>e.html.div(e.attr.class("bc-calendar__weekday"),g))),n()),months:()=>e.html.div(e.attr.class("bc-calendar__picker-grid bc-calendar__picker-grid--months"),...ya.map((g,I)=>{const B=I+1;return e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(l,u)((N,O)=>{const E=["bc-calendar__month-cell"];return N===B&&E.push("bc-calendar__month-cell--current"),i.month===B&&i.year===O&&E.push("bc-calendar__month-cell--active"),E.join(" ")})),e.attr.disabled(o),e.on.click(N=>{N.preventDefault(),y(B)}),g)})),years:()=>e.html.div(e.attr.class("bc-calendar__picker-grid bc-calendar__picker-grid--years"),e.ForEach(e.Value.map(m,g=>{const I=[];for(let B=0;B<me;B++)I.push(g+B);return I}),g=>e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(u,g)((I,B)=>{const N=["bc-calendar__year-cell"];return I===B&&N.push("bc-calendar__year-cell--current"),i.year===B&&N.push("bc-calendar__year-cell--active"),N.join(" ")})),e.attr.disabled(o),e.on.click(I=>{I.preventDefault(),V(e.Value.get(g))}),e.Value.map(g,String))))}))}function Ie(t){return new Date(t.year,t.month-1,t.day)}function qe(t,a){return t.PlainDate.from({year:a.getFullYear(),month:a.getMonth()+1,day:a.getDate()})}function vt(t,{value:a=null,onSelect:n,isDateDisabled:r,color:o="primary",size:c="md",disabled:s=!1,weekStartsOn:i=0}){const u=a!=null?e.Value.get(a):null,l=ft(t,u?.year??t.Now.plainDateISO().year,u?.month??t.Now.plainDateISO().month,s,i),h=e.computedOf(l.currentYear,l.currentMonth,a)((m,p,d)=>gt(t,m,p,i,l.today,r).map(v=>({...v,isSelected:d!=null&&v.date.equals(d)})));return yt(l,{size:c,disabled:s,color:o,ariaLabel:"Calendar"},()=>e.html.div(e.attr.class("bc-calendar__grid"),e.ForEach(h,m=>{const p=m.map(b=>{const k=["bc-calendar__day"];return b.inMonth||k.push("bc-calendar__day--outside"),b.isToday&&k.push("bc-calendar__day--today"),b.isSelected&&k.push("bc-calendar__day--selected"),b.isDisabled&&k.push("bc-calendar__day--disabled"),k.join(" ")}),d=m.map(b=>b.isDisabled),v=m.map(b=>String(b.day));return e.html.button(e.attr.type("button"),e.attr.class(p),e.attr.disabled(e.computedOf(d,s)((b,k)=>b||k)),e.on.click(b=>{b.preventDefault();const k=e.Value.get(m);!k.isDisabled&&!e.Value.get(s)&&(k.inMonth||(l.currentYear.set(k.date.year),l.currentMonth.set(k.date.month)),n?.(k.date))}),v)})))}function _a(t){return A.WithTemporal(a=>vt(a,t??{}))}function wa(t){const{value:a,onSelect:n,isDateDisabled:r,...o}=t??{};return A.WithTemporal(c=>{const s=a!=null?e.Value.map(a,l=>l!=null?qe(c,l):null):void 0;return vt(c,{...o,value:s,onSelect:n?l=>n(Ie(l)):void 0,isDateDisabled:r?l=>r(Ie(l)):void 0})})}function kt(t,{value:a=null,onChange:n,isDateDisabled:r,color:o="primary",size:c="md",disabled:s=!1,weekStartsOn:i=0}){const u=a!=null?e.Value.get(a):null,l=ft(t,u?.[0]?.year??t.Now.plainDateISO().year,u?.[0]?.month??t.Now.plainDateISO().month,s,i),h=e.prop(null),m=e.prop(null);a!=null&&e.Value.on(a,()=>{h.set(null)});const p=e.computedOf(l.currentYear,l.currentMonth,a,h,m)((d,v,b,k,C)=>{let _=null,w=null,y=!1;if(k!=null&&C!=null){const V=t.PlainDate.compare(k,C);_=V<=0?k:C,w=V<=0?C:k,y=!0}else b!=null&&(_=b[0],w=b[1]);return gt(t,d,v,i,l.today,r).map(V=>{let g=!1,I=!1,B=!1;return _!=null&&w!=null&&(g=V.date.equals(_),I=V.date.equals(w),B=t.PlainDate.compare(V.date,_)>0&&t.PlainDate.compare(V.date,w)<0),{...V,isRangeStart:g,isRangeEnd:I,isInRange:B,isPreview:y}})});return yt(l,{size:c,disabled:s,color:o,ariaLabel:"Date range calendar"},()=>e.html.div(e.attr.class("bc-calendar__grid"),e.on.mouseleave(()=>{m.set(null)}),e.ForEach(p,d=>{const v=d.map(C=>{const _=["bc-calendar__day"];return C.inMonth||_.push("bc-calendar__day--outside"),C.isToday&&_.push("bc-calendar__day--today"),C.isDisabled&&_.push("bc-calendar__day--disabled"),C.isRangeStart&&_.push("bc-calendar__day--range-start"),C.isRangeEnd&&_.push("bc-calendar__day--range-end"),C.isInRange&&_.push("bc-calendar__day--in-range"),C.isPreview&&(C.isRangeStart||C.isRangeEnd||C.isInRange)&&_.push("bc-calendar__day--preview"),_.join(" ")}),b=d.map(C=>C.isDisabled),k=d.map(C=>String(C.day));return e.html.button(e.attr.type("button"),e.attr.class(v),e.attr.disabled(e.computedOf(b,s)((C,_)=>C||_)),e.on.mouseenter(()=>{const C=e.Value.get(d);!C.isDisabled&&!e.Value.get(s)&&m.set(C.date)}),e.on.click(C=>{C.preventDefault();const _=e.Value.get(d);if(_.isDisabled||e.Value.get(s))return;_.inMonth||(l.currentYear.set(_.date.year),l.currentMonth.set(_.date.month));const w=h.value;if(w==null)h.set(_.date);else{const V=t.PlainDate.compare(w,_.date)<=0?[w,_.date]:[_.date,w];h.set(null),m.set(null),n?.(V)}}),k)})))}function Va(t){return A.WithTemporal(a=>kt(a,t??{}))}function xa(t){const{value:a,onChange:n,isDateDisabled:r,...o}=t??{};return A.WithTemporal(c=>{const s=a!=null?e.Value.map(a,l=>l!=null?[qe(c,l[0]),qe(c,l[1])]:null):void 0;return kt(c,{...o,value:s,onChange:n?l=>n([Ie(l[0]),Ie(l[1])]):void 0,isDateDisabled:r?l=>r(Ie(l)):void 0})})}function Ia(t){const a=f.backgroundValue(t,"solid","light"),n=f.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 Sa({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 Da({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=>Ia(r??"base"))),e.html.span(e.attr.class("bc-avatar__initials"),e.Value.map(t,r=>`+${r??0}`)))}function Ct(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--dot"),c.join(" ")}function _t(t,a){const n=new Map,r=(o,c,s,i)=>{n.set("--badge-bg-hover",o),n.set("--badge-text-hover",s),n.set("--badge-bg-hover-dark",c),n.set("--badge-text-hover-dark",i)};switch(t){case"filled":{const o=f.backgroundValue(a,"solid","light"),c=f.backgroundValue(a,"solid","dark"),s=f.hoverBackgroundValue(a,"soft","light"),i=f.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(s.backgroundColor,i.backgroundColor,s.textColor,i.textColor);break}case"light":{const o=f.backgroundValue(a,"light","light"),c=f.backgroundValue(a,"light","dark"),s=f.hoverBackgroundValue(a,"light","light"),i=f.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(s.backgroundColor,i.backgroundColor,s.textColor,i.textColor);break}case"outline":{const o=f.textColorValue(a,"light"),c=f.textColorValue(a,"dark"),s=f.borderColorValue(a,"light"),i=f.borderColorValue(a,"dark"),u=f.hoverBackgroundValue(a,"light","light"),l=f.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",s),n.set("--badge-border-dark",i),r(u.backgroundColor,l.backgroundColor,u.textColor,l.textColor);break}case"default":{const o=f.textColorValue(a,"light"),c=f.textColorValue(a,"dark"),s=f.hoverBackgroundValue(a,"light","light"),i=f.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(s.backgroundColor,i.backgroundColor,s.textColor,i.textColor);break}case"dashed":{const o=f.textColorValue(a,"light"),c=f.textColorValue(a,"dark"),s=f.borderColorValue(a,"light"),i=f.borderColorValue(a,"dark"),u=f.hoverBackgroundValue(a,"light","light"),l=f.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",s),n.set("--badge-border-dark",i),n.set("--badge-border-style","dashed"),r(u.backgroundColor,l.backgroundColor,u.textColor,l.textColor);break}case"text":{const o=f.textColorValue(a,"light"),c=f.textColorValue(a,"dark"),s=f.hoverBackgroundValue(a,"light","light"),i=f.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(s.backgroundColor,i.backgroundColor,s.textColor,i.textColor);break}}return Array.from(n.entries()).map(([o,c])=>`${o}: ${c}`).join("; ")}function Ae({variant:t="filled",size:a="md",color:n="base",roundedness:r="full",circle:o=!1,fullWidth:c=!1,dot:s=!1},...i){return e.html.span(e.attr.class(e.computedOf(a,r,o,c,s)((u,l,h,m,p)=>Ct(u??"md",l??"sm",h??!1,m??!1,p??!1))),e.attr.style(e.computedOf(t,n)((u,l)=>_t(u??"filled",l??"base"))),e.html.span(e.attr.class("bc-badge__content"),...i))}function $a(t){const{entries:a,filters:n}=t,r=e.prop("all"),o=e.computedOf(a,r)((i,u)=>u==="all"?i:i.filter(l=>{const h=l.action.toLowerCase();switch(u){case"deletions":return h.includes("delet");case"edits":return h.includes("edit");case"schema":return h.includes("schema");case"restorable":return l.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(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"),f.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),()=>G.Button({variant:"outline",size:"xs",onClick:()=>i.value.onRestore?.()},f.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 Ta(t){const{indicator:a,count:n,maxCount:r=9,indicatorColor:o="danger",...c}=t,s=e.computedOf(a??!1,n??0)((l,h)=>l||h>0),i=e.computedOf(n??0,r)((l,h)=>l<=0?"":l>h?`${h}+`:String(l)),u=e.computedOf(a??!1,n??0)((l,h)=>l&&h<=0);return e.html.span(e.attr.class("bc-icon-badge"),f.Icon(c),e.When(s,()=>e.html.span(e.attr.class("bc-icon-badge__indicator"),e.When(u,()=>Ae({dot:!0,color:o,size:"xs"}),()=>Ae({color:o,size:"xs",circle:!0},i)))))}function Oa({onChange:t,accept:a="*/*",onDragContent:n,content:r,onInvalidSelection:o,disabled:c=!1}){const s=e.prop(!1),i=e.prop([]);let u=null,l=0;const h=w=>w.dataTransfer?.types.includes("Files")??!1,m=(w,y)=>y==="*/*"?!0:y.split(",").map(g=>g.trim()).some(g=>{if(g==="*/*")return!0;if(g.endsWith("/*")){const I=g.slice(0,-2);return w.type.startsWith(I+"/")}return w.type===g||w.name.endsWith(g)}),p=w=>{e.Value.get(c)||h(w)&&(w.preventDefault(),w.stopPropagation(),l++,l===1&&(s.value=!0))},d=w=>{e.Value.get(c)||h(w)&&(w.preventDefault(),w.stopPropagation(),w.dataTransfer!=null&&(w.dataTransfer.dropEffect="copy"))},v=w=>{e.Value.get(c)||h(w)&&(w.preventDefault(),w.stopPropagation(),l--,l===0&&(s.value=!1))},b=w=>{if(e.Value.get(c)||!h(w))return;w.preventDefault(),w.stopPropagation(),l=0,s.value=!1;const y=Array.from(w.dataTransfer?.files??[]);if(y.length>0){const V=e.Value.get(a),g=y.filter(B=>m(B,V)),I=y.filter(B=>!g.includes(B));g.length>0&&(i.value=g,t(g,"dragdrop")),I.length>0&&o?.(y)}};typeof document<"u"&&(document.addEventListener("dragenter",p),document.addEventListener("dragover",d),document.addEventListener("dragleave",v),document.addEventListener("drop",b));const k=()=>{typeof document<"u"&&(document.removeEventListener("dragenter",p),document.removeEventListener("dragover",d),document.removeEventListener("dragleave",v),document.removeEventListener("drop",b)),l=0},C=()=>{u?.click()},_=w=>{const y=w.target,V=Array.from(y.files??[]);V.length>0&&(i.value=V,t(V,"click")),y.value=""};return e.Fragment(e.OnDispose(k),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(_),e.WithElement(w=>(u=w,e.OnDispose(()=>{u!=null&&(u.value="")})))),n!=null?e.When(s,()=>n({files:i})):null,r!=null?r({isDragging:s,files:i,selectFiles:C}):null)}function wt(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 Ba(t,...a){return e.html.span(e.attr.class("bc-presence-highlight"),e.attr.style(`--presence-color: ${t.color}`),...a)}function Ea(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),wt({author:n,color:r}))}function Vt(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 xt(t){const a=new Map,n=f.backgroundValue(t,"solid","light"),r=f.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 Pa({value:t=0,max:a=100,size:n="md",color:r="primary",indeterminate:o=!1,showLabel:c=!1,roundedness:s="full"}){const i=e.computedOf(t,a)((h,m)=>{const p=h??0,d=m??100;return d>0?Math.min(Math.max(p/d*100,0),100):0}),u=e.Value.map(i,h=>`${Math.round(h)}%`),l=e.computedOf(i,o)((h,m)=>m??!1?"":`${h}%`);return e.html.div(e.attr.class("bc-progress-bar-wrapper"),e.html.div(e.attr.class(e.computedOf(n,o,s)((h,m,p)=>Vt(h??"md",m??!1,p??"full"))),e.attr.style(e.Value.map(r,h=>xt(h??"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(l)))),e.When(c,()=>e.html.div(e.attr.class("bc-progress-bar__label"),e.aria.hidden(!0),u),()=>{}))}function Ge(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 It(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 Aa({variant:t="text",width:a,height:n,lines:r=1,animate:o=!0,roundedness:c="sm"}){const s=e.computedOf(t,r)((i,u)=>i==="text"&&(u??1)>1);return e.When(s,()=>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,l)=>Ge("text",u??!0,l??"sm")+" bc-skeleton__line")),e.style.width(e.computedOf(i.isLast,a)((u,l)=>u&&l===void 0?"80%":l!==void 0?l:""))))),()=>e.html.div(e.attr.class(e.computedOf(t,o,c)((i,u,l)=>Ge(i??"text",u??!0,l??"sm"))),e.attr.style(e.computedOf(a,n,t)((i,u,l)=>It(i,u,l??"text"))),e.aria.hidden(!0)))}function La(t,a,n,r,o,c){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"),c&&s.push("bc-table--with-row-borders"),s.join(" ")}function Ma(t){if(t!=null)return t==="none"?"--table-border-radius: 0":`--table-border-radius: var(--radius-${t})`}function Na({size:t="md",hoverable:a=!1,stickyHeader:n=!1,fullWidth:r=!1,withStripedRows:o=!1,withTableBorder:c=!0,withColumnBorders:s=!1,withRowBorders:i=!0,borderRadius:u}={},...l){const h=e.computedOf(t,a,n,o,s,i)((d,v,b,k,C,_)=>La(d??"md",v??!1,b??!1,k??!1,C??!1,_??!0)),m=e.computedOf(n,r,c)((d,v,b)=>{const k=["bc-table-container"];return d&&k.push("bc-table-container--sticky"),v&&k.push("bc-table-container--full-width"),b&&k.push("bc-table-container--with-table-border"),k.join(" ")}),p=e.computedOf(u)(d=>Ma(d));return e.html.div(e.attr.class(m),e.attr.style(p),e.html.table(e.attr.class(h),...l))}function Fa(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 Wa(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=(s,i,u,l)=>{r||(o.set("--toggle-bg-hover",s),o.set("--toggle-text-hover",u),o.set("--toggle-bg-hover-dark",i),o.set("--toggle-text-hover-dark",l))};if(n){const s=f.backgroundValue(a,"solid","light"),i=f.backgroundValue(a,"solid","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",s.textColor),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",i.textColor),o.set("--toggle-border",s.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=f.hoverBackgroundValue(a,"solid","light"),l=f.hoverBackgroundValue(a,"solid","dark");c(u.backgroundColor,l.backgroundColor,u.textColor,l.textColor)}else switch(t){case"outline":case"dashed":{o.set("--toggle-bg","transparent"),o.set("--toggle-bg-dark","transparent"),o.set("--toggle-border",f.borderColorValue(a,"light")),o.set("--toggle-border-dark",f.borderColorValue(a,"dark")),o.set("--toggle-text",f.textColorValue(a,"light")),o.set("--toggle-text-dark",f.textColorValue(a,"dark")),t==="dashed"&&o.set("--toggle-border-style","dashed");const s=f.hoverBackgroundValue(a,"light","light"),i=f.hoverBackgroundValue(a,"light","dark");c(s.backgroundColor,i.backgroundColor,s.textColor,i.textColor);break}case"light":{const s=f.backgroundValue(a,"light","light"),i=f.backgroundValue(a,"light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",s.textColor),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",i.textColor);const u=f.hoverBackgroundValue(a,"light","light"),l=f.hoverBackgroundValue(a,"light","dark");c(u.backgroundColor,l.backgroundColor,u.textColor,l.textColor);break}case"filled":{const s=f.backgroundValue("neutral","light","light"),i=f.backgroundValue("neutral","light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",f.textColorValue(a,"light")),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",f.textColorValue(a,"dark"));const u=f.hoverBackgroundValue("base","light","light"),l=f.hoverBackgroundValue("base","light","dark");c(u.backgroundColor,l.backgroundColor,o.get("--toggle-text")??s.textColor,o.get("--toggle-text-dark")??i.textColor);break}case"default":{const s=f.backgroundValue("neutral","light","light"),i=f.backgroundValue("neutral","light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",f.textColorValue(a,"light")),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",f.textColorValue(a,"dark")),o.set("--toggle-border",Z.getColorVar("neutral",300)),o.set("--toggle-border-dark",Z.getColorVar("neutral",700));const u=f.hoverBackgroundValue("base","light","light"),l=f.hoverBackgroundValue("base","light","dark");c(u.backgroundColor,l.backgroundColor,o.get("--toggle-text")??s.textColor,o.get("--toggle-text-dark")??i.textColor);break}default:{const s=f.backgroundValue("neutral","light","light"),i=f.backgroundValue("neutral","light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",f.textColorValue(a,"light")),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",f.textColorValue(a,"dark"));const u=f.hoverBackgroundValue("base","light","light"),l=f.hoverBackgroundValue("base","light","dark");c(u.backgroundColor,l.backgroundColor,o.get("--toggle-text")??s.textColor,o.get("--toggle-text-dark")??i.textColor);break}}return Array.from(o.entries()).map(([s,i])=>`${s}: ${i}`).join("; ")}function St({pressed:t,onToggle:a,disabled:n=!1,variant:r="outline",size:o="md",color:c="primary",roundedness:s="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,s,i,t)(Fa)),e.attr.style(e.computedOf(r,c,t,n)(Wa)),e.on.click(l=>{l.preventDefault(),l.stopPropagation(),e.Value.get(n)||a?.(!e.Value.get(t))}),...u)}function Ua(t,a){return["bc-toggle-button-group",`bc-toggle-button-group--${t}`,`bc-toggle-button-group--rounded-${a}`].join(" ")}function Ra({items:t,value:a,onChange:n,multiple:r=!1,disabled:o=!1,variant:c="outline",size:s="md",color:i="primary",roundedness:u="sm",orientation:l="horizontal"}){const h=(m,p)=>{const d=e.Value.get(a),v=e.Value.get(r);let b;v?b=p?[...d,m]:d.filter(k=>k!==m):b=p?[m]:[],n?.(b)};return e.html.div(e.attr.role("group"),e.attr.class(e.computedOf(l,u)(Ua)),e.aria.orientation(l),...t.map(m=>{const p=e.Value.map(a,v=>v.includes(m.key)),d=m.disabled?e.Value.map(o,v=>v||m.disabled):o;return St({pressed:p,onToggle:v=>h(m.key,v),disabled:d,variant:c,size:s,color:i,roundedness:"none",fullWidth:!1},m.label)}))}function za(t,a){const n=["bc-tag"];return t!=="md"&&n.push(`bc-tag--${t}`),a&&n.push("bc-tag--disabled"),n.join(" ")}function ja(t){const a=f.backgroundValue(t,"light","light"),n=f.backgroundValue(t,"light","dark"),r=f.hoverBackgroundValue(t,"light","light"),o=f.hoverBackgroundValue(t,"light","dark");return[`--tag-bg: ${a.backgroundColor}`,`--tag-text: ${a.textColor}`,`--tag-bg-dark: ${n.backgroundColor}`,`--tag-text-dark: ${n.textColor}`,`--tag-bg-hover: ${r.backgroundColor}`,`--tag-text-hover: ${r.textColor}`,`--tag-bg-hover-dark: ${o.backgroundColor}`,`--tag-text-hover-dark: ${o.textColor}`].join("; ")}const et=({value:t,color:a="base",onClose:n,size:r="md",class:o,disabled:c})=>e.html.span(e.attr.class(e.computedOf(r??"md",c??!1)((s,i)=>za(s,i))),e.attr.style(e.computedOf(a)(s=>ja(s??"base"))),e.attr.class(o),e.html.span(t),n!=null?e.Use(f.BeatUII18n,s=>W.CloseButton({size:"xs",label:s.$.removeItem,disabled:c,onClick:()=>n?.(e.Value.get(t))},e.attr.class("bc-tag__close"))):e.Empty);function Dt({value:t,onChange:a,disabled:n}){return e.Use(f.BeatUII18n,r=>A.SegmentedInput({size:"sm",variant:"squared",value:t,disabled:n,options:{system:e.html.span(e.attr.title(r.$.appearanceSystem),f.Icon({icon:"line-md:laptop",color:"gray"})),light:e.html.span(e.attr.title(r.$.appearanceLight),f.Icon({icon:"line-md:sunny-twotone-loop",color:"yellow"})),dark:e.html.span(e.attr.title(r.$.appearanceDark),f.Icon({icon:"line-md:sunny-outline-to-moon-alt-loop-transition",color:"blue"}))},onChange:a}))}function Ha(){return e.Use(Se.Theme,({appearancePreference:t,setAppearancePreference:a})=>Dt({value:t,onChange:a}))}function qa({value:t,onChange:a,onInput:n}){let r=null;return e.html.div(e.attr.class("bc-color-input__swatch-container"),e.html.span(e.attr.class("bc-color-input__swatch"),e.on.click(()=>r?.showPicker()),e.input.color(e.WithElement(o=>(r=o,e.Empty)),e.attr.value(t),e.style.width("4px"),e.style.height("4px"),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,o=>`background-color: ${o}`))))}function $t(t){const{value:a,onBlur:n,onChange:r,onInput:o}=t;return G.InputContainer({...t,input:e.input.text(ce.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"),qa({value:a,onChange:t.onChange,onInput:t.onInput}))}const Ga=t=>{const{value:a,onChange:n,onInput:r,onBlur:o,after:c,disabled:s,...i}=t,u=A.NullableResetAfter(a,s,n??r);return $t({...i,disabled:s,value:e.Value.map(a,T.nullToEmpty),onChange:n!=null?l=>n(T.emptyToNull(l)):void 0,onInput:r!=null?l=>r(T.emptyToNull(l)):void 0,onBlur:o,after:c!=null?e.Fragment(u,c):u})},Ya=t=>{const{value:a,onChange:n,onInput:r,onBlur:o,after:c,disabled:s,...i}=t,u=A.NullableResetAfter(a,s,n??r);return T.ColorSwatchInput({...i,disabled:s,value:e.Value.map(a,T.nullToEmpty),onChange:n!=null?l=>n(T.emptyToNull(l)):void 0,onInput:r!=null?l=>r(T.emptyToNull(l)):void 0,onBlur:o,after:c!=null?e.Fragment(u,c):u})};function Le({open:t},...a){return e.WithElement(n=>{const{status:r,setOpen:o,dispose:c}=le.useAnimatedElementToggle({initialStatus:e.Value.get(t)?"opened":"closed",element:n});return e.Value.on(t,o),ae.ElementRect(s=>{const i=e.prop(null);return e.computedOf(r,s.$.height)((l,h)=>l==="opened"&&h>0?h:null).on(l=>{l!=null&&i.set(l)}),r.on(l=>{if(n&&l==="start-opening"){const h=n.style.height,m=n.style.transition;n.style.transition="none",n.style.height="auto",n.offsetHeight;const p=n.scrollHeight;p>0&&i.set(p),n.style.height=h,n.style.transition=m,n.offsetHeight}}),e.Fragment(e.OnDispose(c),e.attr.style(i.map(l=>`--collapse-height: ${l!=null?`${l}px`:"auto"}`)),e.attr.class(r.map(l=>`bc-collapse bc-collapse--${l}`)),...a)})})}function Za(t,a){return["bc-accordion",`bc-accordion--size-${t}`,`bc-accordion--${a}`].join(" ")}function Ja({items:t,multiple:a=!1,size:n="md",variant:r="default"}){const o=oe.sessionId("accordion"),c=new Map;for(const i of t)c.set(i.key,e.prop(i.defaultOpen??!1));const s=i=>{const u=c.get(i);if(u!=null){if(!e.Value.get(a))for(const[l,h]of c)l!==i&&h.set(!1);u.update(l=>!l)}};return e.html.div(e.attr.class(e.computedOf(n,r)(Za)),e.attr.role("presentation"),...t.map((i,u)=>{const l=c.get(i.key),h=`${o}-header-${u}`,m=`${o}-panel-${u}`;return e.html.div(e.attr.class("bc-accordion__item"),e.attr.class(l.map(p=>p?"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(h),e.aria.expanded(l),e.aria.controls(m),e.attr.disabled(i.disabled??!1),e.on.click(p=>{p.preventDefault(),i.disabled||s(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(l.map(p=>p?"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(h),e.html.div(Le({open:l},e.html.div(e.attr.class("bc-accordion__body"),i.body)))))}))}function Xa(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 Ka(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,s])=>`${c}: ${s}`).join("; ")}function Qa({icon:t,title:a,description:n,active:r=!1,disabled:o=!1,onClick:c,size:s="md",iconColor:i="primary",iconSize:u="md",backgroundColor:l,borderColor:h,titleColor:m,descriptionColor:p}){const d=c!=null;return e.html.div(e.attr.class(e.computedOf(r,o,s)((v,b,k)=>Xa(v??!1,b??!1,k??"md",d))),e.attr.style(e.computedOf(l,h,m,p)((v,b,k,C)=>Ka(v,b,k,C))),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"),f.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 en=["!=","<=",">=","<",">","="];function tn(t){for(const a of en)if(typeof t=="string"&&t.startsWith(a))return[a,t.slice(a.length)];return["=",t]}function Tt(t,a,n){const[r,o]=tn(a),c=t.findIndex(u=>u[1]===o);if(c===-1)throw new Error(`Breakpoint ${String(o)} not found`);const s=t[c][0],i=c<t.length-1?t[c+1][0]:1/0;switch(r){case"=":return n>=s&&n<i;case"!=":return!(n>=s&&n<i);case"<=":return n<=s;case">=":return n>=s;case"<":return n<s;case">":return n>s;default:return!1}}function an(t,a){const n=t.findIndex(r=>r[0]>a)-1;return n>=0?t[n][1]:(t.length>0&&a>=t[0][0],t[0][1])}function tt(t,{breakpoints:a,mode:n="viewport"}){const o=[...Object.entries(a).map(([s,i])=>[i,s])].sort((s,i)=>s[0]-i[0]),c=s=>{const i=s.map(({width:l})=>{const h=o.findIndex(m=>m[0]>l)-1;return h>=0?{width:l,breakpoint:o[h][1]}:o.length>0&&l>=o[0][0]?{width:l,breakpoint:o[0][1]}:{width:l,breakpoint:o[0][1]}});return t({value:i,breakpoints:a,asList:o,is:(l,h)=>Tt(o,l,h)})};return n==="element"?ae.ElementRect(c):ae.WindowSize(c)}let Ue=NaN;function nn(t,a){return t?(isNaN(Ue)&&(Ue=parseFloat(getComputedStyle(document.documentElement).fontSize)),parseFloat(t)*Ue):a}function ne(t,a,n){return nn(t.getPropertyValue(a),n)}function Ot(t){return e.WithElement(a=>{const n=getComputedStyle(a),r={zero:0,xs:ne(n,"--breakpoint-xs",640),sm:ne(n,"--breakpoint-sm",768),md:ne(n,"--breakpoint-md",1024),lg:ne(n,"--breakpoint-lg",1280),xl:ne(n,"--breakpoint-xl",1536)};return tt(t,{breakpoints:r})})}function rn(t){return e.WithElement(a=>{const n=getComputedStyle(a),r={zero:0,"3xs":ne(n,"--container-3xs",256),"2xs":ne(n,"--container-2xs",288),xs:ne(n,"--container-xs",320),sm:ne(n,"--container-sm",384),md:ne(n,"--container-md",448),lg:ne(n,"--container-lg",512),xl:ne(n,"--container-xl",640),"2xl":ne(n,"--container-2xl",768),"3xl":ne(n,"--container-3xl",1024),"4xl":ne(n,"--container-4xl",1280),"5xl":ne(n,"--container-5xl",1536),"6xl":ne(n,"--container-6xl",2048)};return tt(t,{breakpoints:r,mode:"element"})})}function ue(t,a){return`bc-panel ${(Array.isArray(t)?t:[t]).map(r=>`bc-panel--side-${r}`).join(" ")} bc-panel--shadow-${a}`}function ye(t){const a=e.Value.toSignal(t).map(r=>f.backgroundValue(r,"lighter","light")),n=e.Value.toSignal(t).map(r=>f.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 pe={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 ut(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 Re(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 on({smallBreakpoint:t,mediumBreakpoint:a,vertical:n,horizontal:r,is:o}){function c(u){let l=[[null],[null],[null],[null],[null],[null]];const h=[];h.push("1fr");const m=[];return r.banner&&(m.push(r.banner[u]+"px"),l[0][1]="banner"),(r.header||n.menu||n.aside)&&(m.push((r.header?.[u]??pe.header[u])+"px"),l[1][1]="header"),r.mainHeader&&(m.push(r.mainHeader[u]+"px"),l[2][1]="mainHeader"),m.push("1fr"),l[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[u]+"px"),l[4][1]="mainFooter"),r.footer&&(m.push(r.footer[u]+"px"),l[5][1]="footer"),l=Re(l),{columns:h.join(" "),rows:m.join(" "),areas:l.map(d=>`"${d.join(" ")}"`).join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),ae=require("@tempots/ui"),f=require("./translations-OOsMRpX9.cjs"),Z=require("./colors-BI0YhONJ.cjs"),x=require("./index-CN10Cyqr.cjs"),W=require("./use-form-ClA0ZRco.cjs"),le=require("./use-animated-toggle-DrqK7nUS.cjs"),Se=require("./theme-DogY9oT1.cjs"),bt=require("./tailwind/preset.cjs.js"),T=require("./widget-customization-DtEEo35Y.cjs"),oe=require("./session-id-B5lJMzbB.cjs"),A=require("./deep-merge-ChJQbUKq.cjs"),te=require("./modal-CiGmgsOI.cjs"),G=require("./input-container-BWYHj0Iq.cjs"),ce=require("./text-input-M6WBhhVj.cjs"),ie=require("./menu-De_-sGeb.cjs"),Pe=require("./timer-BJHOsuS6.cjs"),se=require("./duration-input-IuFWywO5.cjs"),oa=require("./utils-DIUEhA-Z.cjs"),Ve=require("./stack-4VUGISn6.cjs"),Ke=require("./notice-CPZQuxcA.cjs"),la=require("./link-portal-_tiDFZqh.cjs"),De=require("./toolbar-WWv5kcYG.cjs");function sa(t,a=0,n=()=>!0){let r=null,o;const c=e.prop(t.value);return t.on(s=>{o=s,n(s)?r==null&&(r=setTimeout(()=>{r=null,c.set(o)},a)):c.set(s)}),t.onDispose(()=>{r!=null&&clearTimeout(r)}),c}const Qe=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")}},ia=(t,a,n="application/octet-stream")=>{const r=new Blob([t],{type:n});Qe(URL.createObjectURL(r),a),URL.revokeObjectURL(URL.createObjectURL(r))},ca=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"),s=c?parseInt(c,10):void 0,i=(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 p=o.body.getReader();let d=0;for(;;){const{done:v,value:b}=await p.read();if(v)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",l=await i,h=new File([l],u,{type:l.type});r=!0,n.set({type:"done",file:h})}catch(o){n.set({type:"error",error:o})}finally{r=!0,n.dispose()}})(),{signal:n,cancel:()=>{r||a.abort()}}},ua=t=>{Qe(URL.createObjectURL(t),t.name)},ct=(t,a)=>t<a?t:a,$e=(t,a)=>t>a?t:a,da=(t,{abortSignal:a}={})=>new Promise((n,r)=>{const o=setTimeout(n,t);a&&a.addEventListener("abort",()=>{clearTimeout(o),r(new DOMException("Aborted","AbortError"))})}),We=["xs","sm","md","lg","xl"];function pa(t,a=1){const n=We.indexOf(t);if(n===-1)throw new Error(`Invalid size: ${t}`);const r=Math.min(Math.max(n+a,0),We.length-1);return We[r]}function ma(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 ha(t){const a=f.backgroundValue(t,"solid","light"),n=f.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 ba(t,a,n){const r=["bc-avatar",`bc-avatar--size-${t}`,`bc-avatar--${a}`];return n&&r.push("bc-avatar--bordered"),r.join(" ")}function ga({src:t,name:a,icon:n,size:r="md",variant:o="circle",color:c="base",bordered:s=!1},...i){const u=e.html.span(e.attr.class("bc-avatar__icon"),f.Icon({icon:"mdi:account",size:"md"}));return e.html.div(e.attr.class(e.computedOf(r,o,s)((l,h,m)=>ba(l??"md",h??"circle",m??!1))),e.attr.style(e.Value.map(c,l=>ha(l??"base"))),e.Ensure(t,l=>e.html.img(e.attr.class("bc-avatar__image"),e.attr.src(l),e.attr.alt(a!=null?e.Value.map(a,h=>h??"Avatar"):"Avatar")),()=>e.Ensure(a,l=>e.html.span(e.attr.class("bc-avatar__initials"),l.map(h=>ma(h))),()=>e.Ensure(n,l=>e.html.span(e.attr.class("bc-avatar__icon"),f.Icon({icon:l,size:"md"})),()=>u))),...i)}const me=20,_e=7,fa=["January","February","March","April","May","June","July","August","September","October","November","December"],ya=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],va=["Su","Mo","Tu","We","Th","Fr","Sa"];function ka(t,a){const n=["bc-calendar",`bc-calendar--size-${t}`];return a&&n.push("bc-calendar--disabled"),n.join(" ")}function Ca(t){const a=f.backgroundValue(t,"solid","light"),n=f.backgroundValue(t,"solid","dark"),r=f.backgroundValue(t,"light","light"),o=f.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 gt(t,a,n,r,o,c){const s=t.PlainDate.from({year:a,month:n,day:1}),i=s.daysInMonth,l=(s.dayOfWeek%7-r+_e)%_e,h=s.subtract({months:1}),m=h.daysInMonth,p=[],d=(b,k,C)=>{p.push({day:k,date:b,inMonth:C,isToday:b.equals(o),isDisabled:c?.(b)??!1})};for(let b=l-1;b>=0;b--){const k=m-b;d(h.with({day:k}),k,!1)}for(let b=1;b<=i;b++)d(t.PlainDate.from({year:a,month:n,day:b}),b,!0);const v=_e-p.length%_e;if(v<_e){const b=s.add({months:1});for(let k=1;k<=v;k++)d(b.with({day:k}),k,!1)}return p}function ft(t,a,n,r,o){const c=t.Now.plainDateISO(),s=e.prop(a),i=e.prop(n),u=e.prop("days"),l=e.prop(Math.floor(a/me)*me),h=[];for(let m=0;m<_e;m++)h.push(va[(m+o)%_e]);return{today:c,currentYear:s,currentMonth:i,view:u,yearPageStart:l,shiftedDayNames:h,prevMonth:()=>{if(e.Value.get(r))return;const m=i.value,p=s.value;m===1?(i.set(12),s.set(p-1)):i.set(m-1)},nextMonth:()=>{if(e.Value.get(r))return;const m=i.value,p=s.value;m===12?(i.set(1),s.set(p+1)):i.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)||l.update(m=>m-me)},nextYearPage:()=>{e.Value.get(r)||l.update(m=>m+me)},switchToMonthsView:()=>{e.Value.get(r)||u.set("months")},switchToYearsView:()=>{if(e.Value.get(r))return;const m=s.value;l.set(Math.floor(m/me)*me),u.set("years")},selectMonth:m=>{e.Value.get(r)||(i.set(m),u.set("days"))},selectYear:m=>{e.Value.get(r)||(s.set(m),u.set("months"))}}}function yt(t,a,n){const{size:r,disabled:o,color:c,ariaLabel:s}=a,{today:i,currentYear:u,currentMonth:l,view:h,yearPageStart:m,prevMonth:p,nextMonth:d,prevYear:v,nextYear:b,prevYearPage:k,nextYearPage:C,switchToMonthsView:_,switchToYearsView:w,selectMonth:y,selectYear:V}=t;return e.html.div(e.attr.class(e.computedOf(r,o)(ka)),e.attr.style(e.Value.map(c,Ca)),e.attr.role("grid"),e.aria.label(s),e.OneOfValue(h,{days:()=>e.html.div(e.attr.class("bc-calendar__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Previous year"),e.on.click(g=>{g.preventDefault(),v()}),"«"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Previous month"),e.on.click(g=>{g.preventDefault(),p()}),"‹"),e.html.div(e.attr.class("bc-calendar__title"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__title-btn"),e.attr.disabled(o),e.aria.label("Select month"),e.on.click(g=>{g.preventDefault(),_()}),e.Value.map(l,g=>fa[g-1])),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__title-btn"),e.attr.disabled(o),e.aria.label("Select year"),e.on.click(g=>{g.preventDefault(),w()}),e.Value.map(u,String))),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Next month"),e.on.click(g=>{g.preventDefault(),d()}),"›"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Next year"),e.on.click(g=>{g.preventDefault(),b()}),"»")),months:()=>e.html.div(e.attr.class("bc-calendar__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Previous year"),e.on.click(g=>{g.preventDefault(),v()}),"«"),e.html.span(e.attr.class("bc-calendar__title"),e.Value.map(u,String)),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label("Next year"),e.on.click(g=>{g.preventDefault(),b()}),"»")),years:()=>e.html.div(e.attr.class("bc-calendar__nav"),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label(`Previous ${me} years`),e.on.click(g=>{g.preventDefault(),k()}),"«"),e.html.span(e.attr.class("bc-calendar__title"),e.Value.map(m,g=>`${g} – ${g+me-1}`)),e.html.button(e.attr.type("button"),e.attr.class("bc-calendar__nav-btn"),e.attr.disabled(o),e.aria.label(`Next ${me} years`),e.on.click(g=>{g.preventDefault(),C()}),"»"))}),e.OneOfValue(h,{days:()=>e.html.div(e.attr.class("bc-calendar__days-view"),e.html.div(e.attr.class("bc-calendar__weekdays"),...t.shiftedDayNames.map(g=>e.html.div(e.attr.class("bc-calendar__weekday"),g))),n()),months:()=>e.html.div(e.attr.class("bc-calendar__picker-grid bc-calendar__picker-grid--months"),...ya.map((g,I)=>{const B=I+1;return e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(l,u)((N,O)=>{const E=["bc-calendar__month-cell"];return N===B&&E.push("bc-calendar__month-cell--current"),i.month===B&&i.year===O&&E.push("bc-calendar__month-cell--active"),E.join(" ")})),e.attr.disabled(o),e.on.click(N=>{N.preventDefault(),y(B)}),g)})),years:()=>e.html.div(e.attr.class("bc-calendar__picker-grid bc-calendar__picker-grid--years"),e.ForEach(e.Value.map(m,g=>{const I=[];for(let B=0;B<me;B++)I.push(g+B);return I}),g=>e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(u,g)((I,B)=>{const N=["bc-calendar__year-cell"];return I===B&&N.push("bc-calendar__year-cell--current"),i.year===B&&N.push("bc-calendar__year-cell--active"),N.join(" ")})),e.attr.disabled(o),e.on.click(I=>{I.preventDefault(),V(e.Value.get(g))}),e.Value.map(g,String))))}))}function Ie(t){return new Date(t.year,t.month-1,t.day)}function qe(t,a){return t.PlainDate.from({year:a.getFullYear(),month:a.getMonth()+1,day:a.getDate()})}function vt(t,{value:a=null,onSelect:n,isDateDisabled:r,color:o="primary",size:c="md",disabled:s=!1,weekStartsOn:i=0}){const u=a!=null?e.Value.get(a):null,l=ft(t,u?.year??t.Now.plainDateISO().year,u?.month??t.Now.plainDateISO().month,s,i),h=e.computedOf(l.currentYear,l.currentMonth,a)((m,p,d)=>gt(t,m,p,i,l.today,r).map(v=>({...v,isSelected:d!=null&&v.date.equals(d)})));return yt(l,{size:c,disabled:s,color:o,ariaLabel:"Calendar"},()=>e.html.div(e.attr.class("bc-calendar__grid"),e.ForEach(h,m=>{const p=m.map(b=>{const k=["bc-calendar__day"];return b.inMonth||k.push("bc-calendar__day--outside"),b.isToday&&k.push("bc-calendar__day--today"),b.isSelected&&k.push("bc-calendar__day--selected"),b.isDisabled&&k.push("bc-calendar__day--disabled"),k.join(" ")}),d=m.map(b=>b.isDisabled),v=m.map(b=>String(b.day));return e.html.button(e.attr.type("button"),e.attr.class(p),e.attr.disabled(e.computedOf(d,s)((b,k)=>b||k)),e.on.click(b=>{b.preventDefault();const k=e.Value.get(m);!k.isDisabled&&!e.Value.get(s)&&(k.inMonth||(l.currentYear.set(k.date.year),l.currentMonth.set(k.date.month)),n?.(k.date))}),v)})))}function _a(t){return A.WithTemporal(a=>vt(a,t??{}))}function wa(t){const{value:a,onSelect:n,isDateDisabled:r,...o}=t??{};return A.WithTemporal(c=>{const s=a!=null?e.Value.map(a,l=>l!=null?qe(c,l):null):void 0;return vt(c,{...o,value:s,onSelect:n?l=>n(Ie(l)):void 0,isDateDisabled:r?l=>r(Ie(l)):void 0})})}function kt(t,{value:a=null,onChange:n,isDateDisabled:r,color:o="primary",size:c="md",disabled:s=!1,weekStartsOn:i=0}){const u=a!=null?e.Value.get(a):null,l=ft(t,u?.[0]?.year??t.Now.plainDateISO().year,u?.[0]?.month??t.Now.plainDateISO().month,s,i),h=e.prop(null),m=e.prop(null);a!=null&&e.Value.on(a,()=>{h.set(null)});const p=e.computedOf(l.currentYear,l.currentMonth,a,h,m)((d,v,b,k,C)=>{let _=null,w=null,y=!1;if(k!=null&&C!=null){const V=t.PlainDate.compare(k,C);_=V<=0?k:C,w=V<=0?C:k,y=!0}else b!=null&&(_=b[0],w=b[1]);return gt(t,d,v,i,l.today,r).map(V=>{let g=!1,I=!1,B=!1;return _!=null&&w!=null&&(g=V.date.equals(_),I=V.date.equals(w),B=t.PlainDate.compare(V.date,_)>0&&t.PlainDate.compare(V.date,w)<0),{...V,isRangeStart:g,isRangeEnd:I,isInRange:B,isPreview:y}})});return yt(l,{size:c,disabled:s,color:o,ariaLabel:"Date range calendar"},()=>e.html.div(e.attr.class("bc-calendar__grid"),e.on.mouseleave(()=>{m.set(null)}),e.ForEach(p,d=>{const v=d.map(C=>{const _=["bc-calendar__day"];return C.inMonth||_.push("bc-calendar__day--outside"),C.isToday&&_.push("bc-calendar__day--today"),C.isDisabled&&_.push("bc-calendar__day--disabled"),C.isRangeStart&&_.push("bc-calendar__day--range-start"),C.isRangeEnd&&_.push("bc-calendar__day--range-end"),C.isInRange&&_.push("bc-calendar__day--in-range"),C.isPreview&&(C.isRangeStart||C.isRangeEnd||C.isInRange)&&_.push("bc-calendar__day--preview"),_.join(" ")}),b=d.map(C=>C.isDisabled),k=d.map(C=>String(C.day));return e.html.button(e.attr.type("button"),e.attr.class(v),e.attr.disabled(e.computedOf(b,s)((C,_)=>C||_)),e.on.mouseenter(()=>{const C=e.Value.get(d);!C.isDisabled&&!e.Value.get(s)&&m.set(C.date)}),e.on.click(C=>{C.preventDefault();const _=e.Value.get(d);if(_.isDisabled||e.Value.get(s))return;_.inMonth||(l.currentYear.set(_.date.year),l.currentMonth.set(_.date.month));const w=h.value;if(w==null)h.set(_.date);else{const V=t.PlainDate.compare(w,_.date)<=0?[w,_.date]:[_.date,w];h.set(null),m.set(null),n?.(V)}}),k)})))}function Va(t){return A.WithTemporal(a=>kt(a,t??{}))}function xa(t){const{value:a,onChange:n,isDateDisabled:r,...o}=t??{};return A.WithTemporal(c=>{const s=a!=null?e.Value.map(a,l=>l!=null?[qe(c,l[0]),qe(c,l[1])]:null):void 0;return kt(c,{...o,value:s,onChange:n?l=>n([Ie(l[0]),Ie(l[1])]):void 0,isDateDisabled:r?l=>r(Ie(l)):void 0})})}function Ia(t){const a=f.backgroundValue(t,"solid","light"),n=f.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 Sa({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 Da({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=>Ia(r??"base"))),e.html.span(e.attr.class("bc-avatar__initials"),e.Value.map(t,r=>`+${r??0}`)))}function Ct(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--dot"),c.join(" ")}function _t(t,a){const n=new Map,r=(o,c,s,i)=>{n.set("--badge-bg-hover",o),n.set("--badge-text-hover",s),n.set("--badge-bg-hover-dark",c),n.set("--badge-text-hover-dark",i)};switch(t){case"filled":{const o=f.backgroundValue(a,"solid","light"),c=f.backgroundValue(a,"solid","dark"),s=f.hoverBackgroundValue(a,"soft","light"),i=f.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(s.backgroundColor,i.backgroundColor,s.textColor,i.textColor);break}case"light":{const o=f.backgroundValue(a,"light","light"),c=f.backgroundValue(a,"light","dark"),s=f.hoverBackgroundValue(a,"light","light"),i=f.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(s.backgroundColor,i.backgroundColor,s.textColor,i.textColor);break}case"outline":{const o=f.textColorValue(a,"light"),c=f.textColorValue(a,"dark"),s=f.borderColorValue(a,"light"),i=f.borderColorValue(a,"dark"),u=f.hoverBackgroundValue(a,"light","light"),l=f.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",s),n.set("--badge-border-dark",i),r(u.backgroundColor,l.backgroundColor,u.textColor,l.textColor);break}case"default":{const o=f.textColorValue(a,"light"),c=f.textColorValue(a,"dark"),s=f.hoverBackgroundValue(a,"light","light"),i=f.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(s.backgroundColor,i.backgroundColor,s.textColor,i.textColor);break}case"dashed":{const o=f.textColorValue(a,"light"),c=f.textColorValue(a,"dark"),s=f.borderColorValue(a,"light"),i=f.borderColorValue(a,"dark"),u=f.hoverBackgroundValue(a,"light","light"),l=f.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",s),n.set("--badge-border-dark",i),n.set("--badge-border-style","dashed"),r(u.backgroundColor,l.backgroundColor,u.textColor,l.textColor);break}case"text":{const o=f.textColorValue(a,"light"),c=f.textColorValue(a,"dark"),s=f.hoverBackgroundValue(a,"light","light"),i=f.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(s.backgroundColor,i.backgroundColor,s.textColor,i.textColor);break}}return Array.from(n.entries()).map(([o,c])=>`${o}: ${c}`).join("; ")}function Ae({variant:t="filled",size:a="md",color:n="base",roundedness:r="full",circle:o=!1,fullWidth:c=!1,dot:s=!1},...i){return e.html.span(e.attr.class(e.computedOf(a,r,o,c,s)((u,l,h,m,p)=>Ct(u??"md",l??"sm",h??!1,m??!1,p??!1))),e.attr.style(e.computedOf(t,n)((u,l)=>_t(u??"filled",l??"base"))),e.html.span(e.attr.class("bc-badge__content"),...i))}function $a(t){const{entries:a,filters:n}=t,r=e.prop("all"),o=e.computedOf(a,r)((i,u)=>u==="all"?i:i.filter(l=>{const h=l.action.toLowerCase();switch(u){case"deletions":return h.includes("delet");case"edits":return h.includes("edit");case"schema":return h.includes("schema");case"restorable":return l.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(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"),f.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),()=>G.Button({variant:"outline",size:"xs",onClick:()=>i.value.onRestore?.()},f.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 Ta(t){const{indicator:a,count:n,maxCount:r=9,indicatorColor:o="danger",...c}=t,s=e.computedOf(a??!1,n??0)((l,h)=>l||h>0),i=e.computedOf(n??0,r)((l,h)=>l<=0?"":l>h?`${h}+`:String(l)),u=e.computedOf(a??!1,n??0)((l,h)=>l&&h<=0);return e.html.span(e.attr.class("bc-icon-badge"),f.Icon(c),e.When(s,()=>e.html.span(e.attr.class("bc-icon-badge__indicator"),e.When(u,()=>Ae({dot:!0,color:o,size:"xs"}),()=>Ae({color:o,size:"xs",circle:!0},i)))))}function Oa({onChange:t,accept:a="*/*",onDragContent:n,content:r,onInvalidSelection:o,disabled:c=!1}){const s=e.prop(!1),i=e.prop([]);let u=null,l=0;const h=w=>w.dataTransfer?.types.includes("Files")??!1,m=(w,y)=>y==="*/*"?!0:y.split(",").map(g=>g.trim()).some(g=>{if(g==="*/*")return!0;if(g.endsWith("/*")){const I=g.slice(0,-2);return w.type.startsWith(I+"/")}return w.type===g||w.name.endsWith(g)}),p=w=>{e.Value.get(c)||h(w)&&(w.preventDefault(),w.stopPropagation(),l++,l===1&&(s.value=!0))},d=w=>{e.Value.get(c)||h(w)&&(w.preventDefault(),w.stopPropagation(),w.dataTransfer!=null&&(w.dataTransfer.dropEffect="copy"))},v=w=>{e.Value.get(c)||h(w)&&(w.preventDefault(),w.stopPropagation(),l--,l===0&&(s.value=!1))},b=w=>{if(e.Value.get(c)||!h(w))return;w.preventDefault(),w.stopPropagation(),l=0,s.value=!1;const y=Array.from(w.dataTransfer?.files??[]);if(y.length>0){const V=e.Value.get(a),g=y.filter(B=>m(B,V)),I=y.filter(B=>!g.includes(B));g.length>0&&(i.value=g,t(g,"dragdrop")),I.length>0&&o?.(y)}};typeof document<"u"&&(document.addEventListener("dragenter",p),document.addEventListener("dragover",d),document.addEventListener("dragleave",v),document.addEventListener("drop",b));const k=()=>{typeof document<"u"&&(document.removeEventListener("dragenter",p),document.removeEventListener("dragover",d),document.removeEventListener("dragleave",v),document.removeEventListener("drop",b)),l=0},C=()=>{u?.click()},_=w=>{const y=w.target,V=Array.from(y.files??[]);V.length>0&&(i.value=V,t(V,"click")),y.value=""};return e.Fragment(e.OnDispose(k),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(_),e.WithElement(w=>(u=w,e.OnDispose(()=>{u!=null&&(u.value="")})))),n!=null?e.When(s,()=>n({files:i})):null,r!=null?r({isDragging:s,files:i,selectFiles:C}):null)}function wt(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 Ba(t,...a){return e.html.span(e.attr.class("bc-presence-highlight"),e.attr.style(`--presence-color: ${t.color}`),...a)}function Ea(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),wt({author:n,color:r}))}function Vt(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 xt(t){const a=new Map,n=f.backgroundValue(t,"solid","light"),r=f.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 Pa({value:t=0,max:a=100,size:n="md",color:r="primary",indeterminate:o=!1,showLabel:c=!1,roundedness:s="full"}){const i=e.computedOf(t,a)((h,m)=>{const p=h??0,d=m??100;return d>0?Math.min(Math.max(p/d*100,0),100):0}),u=e.Value.map(i,h=>`${Math.round(h)}%`),l=e.computedOf(i,o)((h,m)=>m??!1?"":`${h}%`);return e.html.div(e.attr.class("bc-progress-bar-wrapper"),e.html.div(e.attr.class(e.computedOf(n,o,s)((h,m,p)=>Vt(h??"md",m??!1,p??"full"))),e.attr.style(e.Value.map(r,h=>xt(h??"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(l)))),e.When(c,()=>e.html.div(e.attr.class("bc-progress-bar__label"),e.aria.hidden(!0),u),()=>{}))}function Ge(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 It(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 Aa({variant:t="text",width:a,height:n,lines:r=1,animate:o=!0,roundedness:c="sm"}){const s=e.computedOf(t,r)((i,u)=>i==="text"&&(u??1)>1);return e.When(s,()=>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,l)=>Ge("text",u??!0,l??"sm")+" bc-skeleton__line")),e.style.width(e.computedOf(i.isLast,a)((u,l)=>u&&l===void 0?"80%":l!==void 0?l:""))))),()=>e.html.div(e.attr.class(e.computedOf(t,o,c)((i,u,l)=>Ge(i??"text",u??!0,l??"sm"))),e.attr.style(e.computedOf(a,n,t)((i,u,l)=>It(i,u,l??"text"))),e.aria.hidden(!0)))}function La(t,a,n,r,o,c){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"),c&&s.push("bc-table--with-row-borders"),s.join(" ")}function Ma(t){if(t!=null)return t==="none"?"--table-border-radius: 0":`--table-border-radius: var(--radius-${t})`}function Na({size:t="md",hoverable:a=!1,stickyHeader:n=!1,fullWidth:r=!1,withStripedRows:o=!1,withTableBorder:c=!0,withColumnBorders:s=!1,withRowBorders:i=!0,borderRadius:u}={},...l){const h=e.computedOf(t,a,n,o,s,i)((d,v,b,k,C,_)=>La(d??"md",v??!1,b??!1,k??!1,C??!1,_??!0)),m=e.computedOf(n,r,c)((d,v,b)=>{const k=["bc-table-container"];return d&&k.push("bc-table-container--sticky"),v&&k.push("bc-table-container--full-width"),b&&k.push("bc-table-container--with-table-border"),k.join(" ")}),p=e.computedOf(u)(d=>Ma(d));return e.html.div(e.attr.class(m),e.attr.style(p),e.html.table(e.attr.class(h),...l))}function Fa(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 Wa(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=(s,i,u,l)=>{r||(o.set("--toggle-bg-hover",s),o.set("--toggle-text-hover",u),o.set("--toggle-bg-hover-dark",i),o.set("--toggle-text-hover-dark",l))};if(n){const s=f.backgroundValue(a,"solid","light"),i=f.backgroundValue(a,"solid","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",s.textColor),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",i.textColor),o.set("--toggle-border",s.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=f.hoverBackgroundValue(a,"solid","light"),l=f.hoverBackgroundValue(a,"solid","dark");c(u.backgroundColor,l.backgroundColor,u.textColor,l.textColor)}else switch(t){case"outline":case"dashed":{o.set("--toggle-bg","transparent"),o.set("--toggle-bg-dark","transparent"),o.set("--toggle-border",f.borderColorValue(a,"light")),o.set("--toggle-border-dark",f.borderColorValue(a,"dark")),o.set("--toggle-text",f.textColorValue(a,"light")),o.set("--toggle-text-dark",f.textColorValue(a,"dark")),t==="dashed"&&o.set("--toggle-border-style","dashed");const s=f.hoverBackgroundValue(a,"light","light"),i=f.hoverBackgroundValue(a,"light","dark");c(s.backgroundColor,i.backgroundColor,s.textColor,i.textColor);break}case"light":{const s=f.backgroundValue(a,"light","light"),i=f.backgroundValue(a,"light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",s.textColor),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",i.textColor);const u=f.hoverBackgroundValue(a,"light","light"),l=f.hoverBackgroundValue(a,"light","dark");c(u.backgroundColor,l.backgroundColor,u.textColor,l.textColor);break}case"filled":{const s=f.backgroundValue("neutral","light","light"),i=f.backgroundValue("neutral","light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",f.textColorValue(a,"light")),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",f.textColorValue(a,"dark"));const u=f.hoverBackgroundValue("base","light","light"),l=f.hoverBackgroundValue("base","light","dark");c(u.backgroundColor,l.backgroundColor,o.get("--toggle-text")??s.textColor,o.get("--toggle-text-dark")??i.textColor);break}case"default":{const s=f.backgroundValue("neutral","light","light"),i=f.backgroundValue("neutral","light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",f.textColorValue(a,"light")),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",f.textColorValue(a,"dark")),o.set("--toggle-border",Z.getColorVar("neutral",300)),o.set("--toggle-border-dark",Z.getColorVar("neutral",700));const u=f.hoverBackgroundValue("base","light","light"),l=f.hoverBackgroundValue("base","light","dark");c(u.backgroundColor,l.backgroundColor,o.get("--toggle-text")??s.textColor,o.get("--toggle-text-dark")??i.textColor);break}default:{const s=f.backgroundValue("neutral","light","light"),i=f.backgroundValue("neutral","light","dark");o.set("--toggle-bg",s.backgroundColor),o.set("--toggle-text",f.textColorValue(a,"light")),o.set("--toggle-bg-dark",i.backgroundColor),o.set("--toggle-text-dark",f.textColorValue(a,"dark"));const u=f.hoverBackgroundValue("base","light","light"),l=f.hoverBackgroundValue("base","light","dark");c(u.backgroundColor,l.backgroundColor,o.get("--toggle-text")??s.textColor,o.get("--toggle-text-dark")??i.textColor);break}}return Array.from(o.entries()).map(([s,i])=>`${s}: ${i}`).join("; ")}function St({pressed:t,onToggle:a,disabled:n=!1,variant:r="outline",size:o="md",color:c="primary",roundedness:s="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,s,i,t)(Fa)),e.attr.style(e.computedOf(r,c,t,n)(Wa)),e.on.click(l=>{l.preventDefault(),l.stopPropagation(),e.Value.get(n)||a?.(!e.Value.get(t))}),...u)}function Ua(t,a){return["bc-toggle-button-group",`bc-toggle-button-group--${t}`,`bc-toggle-button-group--rounded-${a}`].join(" ")}function Ra({items:t,value:a,onChange:n,multiple:r=!1,disabled:o=!1,variant:c="outline",size:s="md",color:i="primary",roundedness:u="sm",orientation:l="horizontal"}){const h=(m,p)=>{const d=e.Value.get(a),v=e.Value.get(r);let b;v?b=p?[...d,m]:d.filter(k=>k!==m):b=p?[m]:[],n?.(b)};return e.html.div(e.attr.role("group"),e.attr.class(e.computedOf(l,u)(Ua)),e.aria.orientation(l),...t.map(m=>{const p=e.Value.map(a,v=>v.includes(m.key)),d=m.disabled?e.Value.map(o,v=>v||m.disabled):o;return St({pressed:p,onToggle:v=>h(m.key,v),disabled:d,variant:c,size:s,color:i,roundedness:"none",fullWidth:!1},m.label)}))}function za(t,a){const n=["bc-tag"];return t!=="md"&&n.push(`bc-tag--${t}`),a&&n.push("bc-tag--disabled"),n.join(" ")}function ja(t){const a=f.backgroundValue(t,"light","light"),n=f.backgroundValue(t,"light","dark"),r=f.hoverBackgroundValue(t,"light","light"),o=f.hoverBackgroundValue(t,"light","dark");return[`--tag-bg: ${a.backgroundColor}`,`--tag-text: ${a.textColor}`,`--tag-bg-dark: ${n.backgroundColor}`,`--tag-text-dark: ${n.textColor}`,`--tag-bg-hover: ${r.backgroundColor}`,`--tag-text-hover: ${r.textColor}`,`--tag-bg-hover-dark: ${o.backgroundColor}`,`--tag-text-hover-dark: ${o.textColor}`].join("; ")}const et=({value:t,color:a="base",onClose:n,size:r="md",class:o,disabled:c})=>e.html.span(e.attr.class(e.computedOf(r??"md",c??!1)((s,i)=>za(s,i))),e.attr.style(e.computedOf(a)(s=>ja(s??"base"))),e.attr.class(o),e.html.span(t),n!=null?e.Use(f.BeatUII18n,s=>W.CloseButton({size:"xs",label:s.$.removeItem,disabled:c,onClick:()=>n?.(e.Value.get(t))},e.attr.class("bc-tag__close"))):e.Empty);function Dt({value:t,onChange:a,disabled:n}){return e.Use(f.BeatUII18n,r=>A.SegmentedInput({size:"sm",variant:"squared",value:t,disabled:n,options:{system:e.html.span(e.attr.title(r.$.appearanceSystem),f.Icon({icon:"line-md:laptop",color:"gray"})),light:e.html.span(e.attr.title(r.$.appearanceLight),f.Icon({icon:"line-md:sunny-twotone-loop",color:"yellow"})),dark:e.html.span(e.attr.title(r.$.appearanceDark),f.Icon({icon:"line-md:sunny-outline-to-moon-alt-loop-transition",color:"blue"}))},onChange:a}))}function Ha(){return e.Use(Se.Theme,({appearancePreference:t,setAppearancePreference:a})=>Dt({value:t,onChange:a}))}function qa({value:t,onChange:a,onInput:n}){let r=null;return e.html.div(e.attr.class("bc-color-input__swatch-container"),e.html.span(e.attr.class("bc-color-input__swatch"),e.on.click(()=>r?.showPicker()),e.input.color(e.WithElement(o=>(r=o,e.Empty)),e.attr.value(t),e.style.width("4px"),e.style.height("4px"),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,o=>`background-color: ${o}`))))}function $t(t){const{value:a,onBlur:n,onChange:r,onInput:o}=t;return G.InputContainer({...t,input:e.input.text(ce.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"),qa({value:a,onChange:t.onChange,onInput:t.onInput}))}const Ga=t=>{const{value:a,onChange:n,onInput:r,onBlur:o,after:c,disabled:s,...i}=t,u=A.NullableResetAfter(a,s,n??r);return $t({...i,disabled:s,value:e.Value.map(a,T.nullToEmpty),onChange:n!=null?l=>n(T.emptyToNull(l)):void 0,onInput:r!=null?l=>r(T.emptyToNull(l)):void 0,onBlur:o,after:c!=null?e.Fragment(u,c):u})},Ya=t=>{const{value:a,onChange:n,onInput:r,onBlur:o,after:c,disabled:s,...i}=t,u=A.NullableResetAfter(a,s,n??r);return T.ColorSwatchInput({...i,disabled:s,value:e.Value.map(a,T.nullToEmpty),onChange:n!=null?l=>n(T.emptyToNull(l)):void 0,onInput:r!=null?l=>r(T.emptyToNull(l)):void 0,onBlur:o,after:c!=null?e.Fragment(u,c):u})};function Le({open:t},...a){return e.WithElement(n=>{const{status:r,setOpen:o,dispose:c}=le.useAnimatedElementToggle({initialStatus:e.Value.get(t)?"opened":"closed",element:n});return e.Value.on(t,o),ae.ElementRect(s=>{const i=e.prop(null);return e.computedOf(r,s.$.height)((l,h)=>l==="opened"&&h>0?h:null).on(l=>{l!=null&&i.set(l)}),r.on(l=>{if(n&&l==="start-opening"){const h=n.style.height,m=n.style.transition;n.style.transition="none",n.style.height="auto",n.offsetHeight;const p=n.scrollHeight;p>0&&i.set(p),n.style.height=h,n.style.transition=m,n.offsetHeight}}),e.Fragment(e.OnDispose(c),e.attr.style(i.map(l=>`--collapse-height: ${l!=null?`${l}px`:"auto"}`)),e.attr.class(r.map(l=>`bc-collapse bc-collapse--${l}`)),...a)})})}function Za(t,a){return["bc-accordion",`bc-accordion--size-${t}`,`bc-accordion--${a}`].join(" ")}function Ja({items:t,multiple:a=!1,size:n="md",variant:r="default"}){const o=oe.sessionId("accordion"),c=new Map;for(const i of t)c.set(i.key,e.prop(i.defaultOpen??!1));const s=i=>{const u=c.get(i);if(u!=null){if(!e.Value.get(a))for(const[l,h]of c)l!==i&&h.set(!1);u.update(l=>!l)}};return e.html.div(e.attr.class(e.computedOf(n,r)(Za)),e.attr.role("presentation"),...t.map((i,u)=>{const l=c.get(i.key),h=`${o}-header-${u}`,m=`${o}-panel-${u}`;return e.html.div(e.attr.class("bc-accordion__item"),e.attr.class(l.map(p=>p?"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(h),e.aria.expanded(l),e.aria.controls(m),e.attr.disabled(i.disabled??!1),e.on.click(p=>{p.preventDefault(),i.disabled||s(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(l.map(p=>p?"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(h),e.html.div(Le({open:l},e.html.div(e.attr.class("bc-accordion__body"),i.body)))))}))}function Xa(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 Ka(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,s])=>`${c}: ${s}`).join("; ")}function Qa({icon:t,title:a,description:n,active:r=!1,disabled:o=!1,onClick:c,size:s="md",iconColor:i="primary",iconSize:u="md",backgroundColor:l,borderColor:h,titleColor:m,descriptionColor:p}){const d=c!=null;return e.html.div(e.attr.class(e.computedOf(r,o,s)((v,b,k)=>Xa(v??!1,b??!1,k??"md",d))),e.attr.style(e.computedOf(l,h,m,p)((v,b,k,C)=>Ka(v,b,k,C))),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"),f.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 en=["!=","<=",">=","<",">","="];function tn(t){for(const a of en)if(typeof t=="string"&&t.startsWith(a))return[a,t.slice(a.length)];return["=",t]}function Tt(t,a,n){const[r,o]=tn(a),c=t.findIndex(u=>u[1]===o);if(c===-1)throw new Error(`Breakpoint ${String(o)} not found`);const s=t[c][0],i=c<t.length-1?t[c+1][0]:1/0;switch(r){case"=":return n>=s&&n<i;case"!=":return!(n>=s&&n<i);case"<=":return n<=s;case">=":return n>=s;case"<":return n<s;case">":return n>s;default:return!1}}function an(t,a){const n=t.findIndex(r=>r[0]>a)-1;return n>=0?t[n][1]:(t.length>0&&a>=t[0][0],t[0][1])}function tt(t,{breakpoints:a,mode:n="viewport"}){const o=[...Object.entries(a).map(([s,i])=>[i,s])].sort((s,i)=>s[0]-i[0]),c=s=>{const i=s.map(({width:l})=>{const h=o.findIndex(m=>m[0]>l)-1;return h>=0?{width:l,breakpoint:o[h][1]}:o.length>0&&l>=o[0][0]?{width:l,breakpoint:o[0][1]}:{width:l,breakpoint:o[0][1]}});return t({value:i,breakpoints:a,asList:o,is:(l,h)=>Tt(o,l,h)})};return n==="element"?ae.ElementRect(c):ae.WindowSize(c)}let Ue=NaN;function nn(t,a){return t?(isNaN(Ue)&&(Ue=parseFloat(getComputedStyle(document.documentElement).fontSize)),parseFloat(t)*Ue):a}function ne(t,a,n){return nn(t.getPropertyValue(a),n)}function Ot(t){return e.WithElement(a=>{const n=getComputedStyle(a),r={zero:0,xs:ne(n,"--breakpoint-xs",640),sm:ne(n,"--breakpoint-sm",768),md:ne(n,"--breakpoint-md",1024),lg:ne(n,"--breakpoint-lg",1280),xl:ne(n,"--breakpoint-xl",1536)};return tt(t,{breakpoints:r})})}function rn(t){return e.WithElement(a=>{const n=getComputedStyle(a),r={zero:0,"3xs":ne(n,"--container-3xs",256),"2xs":ne(n,"--container-2xs",288),xs:ne(n,"--container-xs",320),sm:ne(n,"--container-sm",384),md:ne(n,"--container-md",448),lg:ne(n,"--container-lg",512),xl:ne(n,"--container-xl",640),"2xl":ne(n,"--container-2xl",768),"3xl":ne(n,"--container-3xl",1024),"4xl":ne(n,"--container-4xl",1280),"5xl":ne(n,"--container-5xl",1536),"6xl":ne(n,"--container-6xl",2048)};return tt(t,{breakpoints:r,mode:"element"})})}function ue(t,a){return`bc-panel ${(Array.isArray(t)?t:[t]).map(r=>`bc-panel--side-${r}`).join(" ")} bc-panel--shadow-${a}`}function ye(t){const a=e.Value.toSignal(t).map(r=>f.backgroundValue(r,"lighter","light")),n=e.Value.toSignal(t).map(r=>f.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 pe={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 ut(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 Re(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 on({smallBreakpoint:t,mediumBreakpoint:a,vertical:n,horizontal:r,is:o}){function c(u){let l=[[null],[null],[null],[null],[null],[null]];const h=[];h.push("1fr");const m=[];return r.banner&&(m.push(r.banner[u]+"px"),l[0][1]="banner"),(r.header||n.menu||n.aside)&&(m.push((r.header?.[u]??pe.header[u])+"px"),l[1][1]="header"),r.mainHeader&&(m.push(r.mainHeader[u]+"px"),l[2][1]="mainHeader"),m.push("1fr"),l[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[u]+"px"),l[4][1]="mainFooter"),r.footer&&(m.push(r.footer[u]+"px"),l[5][1]="footer"),l=Re(l),{columns:h.join(" "),rows:m.join(" "),areas:l.map(d=>`"${d.join(" ")}"`).join(`
2
2
  `),displayMenu:!1,displayAside:!1,menuWidth:pe.menu[u]+"px",asideWidth:pe.aside[u]+"px"}}function s(u){let l=[[null,null],[null,null],[null,null],[null,null],[null,null],[null,null]];const h=[];n.menu&&(h.push(n.menu[u]+"px"),l[2][0]="?menu",l[3][0]="menu",l[4][0]="?menu"),h.push("1fr");const m=[];return r.banner&&(m.push(r.banner[u]+"px"),l[0][0]="?banner",l[0][1]="banner"),(r.header||n.aside)&&(m.push((r.header?.[u]??pe.header[u])+"px"),l[1][0]="?header",l[1][1]="header"),r.mainHeader&&(m.push(r.mainHeader[u]+"px"),l[2][1]="mainHeader"),m.push("1fr"),l[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[u]+"px"),l[4][1]="mainFooter"),r.footer&&(m.push(r.footer[u]+"px"),l[5][0]="?footer",l[5][1]="footer"),l=Re(l),{columns:h.join(" "),rows:m.join(" "),areas:l.map(d=>`"${d.join(" ")}"`).join(`
3
3
  `),displayMenu:!0,displayAside:!1,menuWidth:pe.menu[u]+"px",asideWidth:pe.aside[u]+"px"}}function i(u){let l=[[null,null,null],[null,null,null],[null,null,null],[null,null,null],[null,null,null],[null,null,null]];const h=[];n.menu&&(h.push(n.menu[u]+"px"),l[2][0]="?menu",l[3][0]="menu",l[4][0]="?menu"),h.push("1fr"),n.aside&&(h.push(n.aside[u]+"px"),l[2][2]="?aside",l[3][2]="aside",l[4][2]="?aside");const m=[];return r.banner&&(m.push(r.banner[u]+"px"),l[0][0]="?banner",l[0][1]="banner",l[0][2]="?banner"),r.header&&(m.push(r.header[u]+"px"),l[1][0]="?header",l[1][1]="header",l[1][2]="?header"),r.mainHeader&&(m.push(r.mainHeader[u]+"px"),l[2][1]="mainHeader"),m.push("1fr"),l[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[u]+"px"),l[4][1]="mainFooter"),r.footer&&(m.push(r.footer[u]+"px"),l[5][0]="?footer",l[5][1]="footer",l[5][2]="?footer"),l=Re(l),{columns:h.join(" "),rows:m.join(" "),areas:l.map(d=>`"${d.join(" ")}"`).join(`
4
- `),displayMenu:!0,displayAside:!0,menuWidth:pe.menu[u]+"px",asideWidth:pe.aside[u]+"px"}}return({width:u,breakpoint:l})=>o(`<=${t}`,u)?c(l):o(`<=${a}`,u)?s(l):i(l)}const ln=["menu","aside"],sn=["banner","header","mainHeader","mainFooter","footer"];function cn(t,{displayMenu:a},n){return t?a?"block":n?"float":"none":"none"}function un(t,{displayAside:a},n){return t?a?"block":n?"float":"none":"none"}function dn({smallBreakpoint:t="sm",mediumBreakpoint:a="md",...n}){const r=Object.fromEntries(ln.filter(c=>n[c]).map(c=>[c,ut(n[c].width??{},pe[c])])),o=Object.fromEntries(sn.filter(c=>n[c]).map(c=>[c,ut(n[c].height??{},pe[c])]));return e.Use(f.BeatUII18n,c=>Ot(({value:s,is:i})=>{const u=on({smallBreakpoint:t,mediumBreakpoint:a,vertical:r,horizontal:o,is:i}),l=s.map(u),h=o.header!=null||r.menu!=null||r.aside!=null,m=e.computedOf(r.aside!=null,l)((_,{displayAside:w})=>_&&!w),p=e.computedOf(r.menu!=null,l)((_,{displayMenu:w})=>_&&!w),d=le.useAnimatedElementToggle(),v=le.useAnimatedElementToggle(),b=e.prop(0),k=e.computedOf(r.menu!=null,l,d.display)(cn),C=e.computedOf(r.aside!=null,l,v.display)(un);return e.html.div(e.style.display("grid"),e.style.height("100%"),e.style.width("100%"),e.style.gridTemplateColumns(l.$.columns),e.style.gridTemplateRows(l.$.rows),e.style.gridTemplateAreas(l.$.areas),e.style.gridColumnGap("0"),e.style.gridRowGap("0"),n.banner?e.html.header(e.attr.class(ue("none",n.banner.shadow??"none")),ye(n.banner.color??"white"),e.style.height("100%"),e.style.gridArea("banner"),n.banner.content):null,e.html.header(e.attr.class(ue("bottom",n.header?.shadow??"none")),ye(n.header?.color??"white"),e.style.zIndex("20"),e.style.display(h?"block":"none"),e.style.gridArea("header"),ae.ElementRect(_=>(_.$.bottom.feedProp(b),null)),e.html.div(e.style.display("flex"),e.style.height("100%"),e.html.div(e.style.display(p.map(_=>_?"flex":"none")),e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),G.Button({onClick:()=>d.toggle(),variant:"light",color:"base"},e.aria.label(c.$.toggleMenu),f.Icon({icon:d.display.map(_=>_?"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(_=>_?"flex":"none")),G.Button({onClick:()=>v.toggle(),roundedness:"full",variant:"light",color:"base"},e.aria.label(c.$.toggleAside),f.Icon({icon:"line-md/chevron-left"},e.attr.style("transition: transform 0.2s ease-in-out"),e.attr.style(v.display.map(_=>`transform: rotate(${_?180:0}deg)`))))))),n.menu?e.html.nav(e.WithElement(_=>d.setElement(_)),e.style.zIndex("10"),e.aria.label(c.$.mainNavigation),e.attr.role("navigation"),e.style.overflow("hidden"),e.attr.class(k.map(_=>_==="float"?ue("right",n.menu?.shadow??"md"):ue("right",n.menu?.shadow??"none"))),ye(n.menu?.color??"white"),e.style.height(k.map(_=>_==="float"?"auto":"100%")),e.style.overflow("hidden"),e.style.gridArea("menu"),e.style.display(e.computedOf(k,d.status)((_,w)=>_==="none"&&w==="closed"?"none":"block")),e.style.position(e.computedOf(k,d.status)((_,w)=>_==="float"||_==="none"&&w!=="closed"?"fixed":"initial")),e.style.top(b.map(_=>`${_}px`)),e.WithElement(_=>{_.style.setProperty("--slide-distance","100%")}),le.AnimatedToggleClass({animation:{slide:"right"},status:e.computedOf(k,d.status)((_,w)=>_==="block"?"opened":w)}),e.style.width(e.coalesce(n.menu?.width,l.$.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(ue("none",n.mainHeader?.shadow??"none")),ye(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(ue("none",n.main?.shadow??"none")),ye(n.main?.color??"white"),n.main.content),n.mainFooter?e.html.footer(e.style.height("100%"),e.style.gridArea("mainFooter"),e.attr.class(ue("none",n.mainFooter?.shadow??"none")),ye(n.mainFooter?.color??"white"),n.mainFooter.content):null,n.aside?e.html.aside(e.WithElement(_=>{v.setElement(_)}),e.style.zIndex("10"),e.aria.label(c.$.sidebar),e.attr.role("complementary"),e.attr.class(C.map(_=>_==="float"?ue("left","md"):ue("left","none"))),ye("white"),e.style.height("100%"),e.style.gridArea("aside"),e.style.display(e.computedOf(C,v.status)((_,w)=>_==="none"&&w==="closed"?"none":"block")),e.style.position(e.computedOf(C,v.status)((_,w)=>_==="float"||_==="none"&&w!=="closed"?"fixed":"initial")),e.style.top(b.map(_=>`${_}px`)),e.WithElement(_=>{_.style.setProperty("--slide-distance","100%")}),le.AnimatedToggleClass({animation:{slide:"left"},status:e.computedOf(C,v.status)((_,w)=>_==="block"?"opened":w)}),e.style.width(e.coalesce(n.aside?.width,l.$.asideWidth)),e.style.bottom(b.map(_=>`${_}px`)),n.aside.content):null,n.footer?e.html.footer(e.attr.class(ue("top","none")),ye("white"),e.style.height("100%"),e.style.gridArea("footer"),n.footer.content):null)}))}function pn(...t){return e.html.div(e.attr.class("bc-center-h"),e.html.div(e.attr.class("bc-center__content"),...t))}function mn(t){const a=["bc-center"];return t!=="lg"&&a.push(`bc-center--gap-${t}`),a.join(" ")}function hn({gap:t="lg"}={},...a){return e.html.div(e.attr.class(e.computedOf(t)(n=>mn(n??"lg"))),...a)}function dt(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 bn({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,i,u,l)=>dt(s??"horizontal",i??"solid",u??"default",!0,l??"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,i,u)=>dt(s??"horizontal",i??"solid",u??"default",!1,"center"))),e.attr.role("separator"))}function gn(t){return`${t}px`}function pt(t){return e.Value.map(t,gn)}function fn({body:t,contentWidth:a,contentHeight:n,header:r,headerHeight:o=0,topStart:c,topEnd:s,footer:i,footerHeight:u=0,bottomStart:l,bottomEnd:h,sidebarStart:m,sidebarStartWidth:p=0,sidebarEnd:d,sidebarEndWidth:v=0,anchorMode:b="container-edge"}){const k=e.prop(0n),C=e.prop(0n),_=pt(o),w=pt(p),y=e.prop(16);return e.html.div(e.attr.class("bc-nine-slice-container"),ae.ElementRect(V=>{const g=e.computedOf(V.$.width,p,v)(($,F,X)=>$-F-X),I=e.computedOf(V.$.height,o,u)(($,F,X)=>$-F-X),B=e.computedOf(a,g)(($,F)=>$>BigInt(F)),N=e.computedOf(n,I)(($,F)=>$>BigInt(F)),O=e.computedOf(g,N,y)(($,F,X)=>F?$-X:$),E=e.computedOf(I,B,y)(($,F,X)=>F?$-X:$),z=e.computedOf(a,O)(($,F)=>Number($/BigInt(Math.max(1,F)))),K=e.computedOf(n,E)(($,F)=>Number($/BigInt(Math.max(1,F)))),L=e.Value.map(b,$=>$==="body-end"||$==="body-end-bottom"),D=e.When(L,()=>e.style.left(e.computedOf(p,a,O,v)(($,F,X,S)=>{const P=$+Number(F),R=$+X,J=Math.min(P,R);return`${Math.max($+S,J)}px`})),()=>e.style.right("0")),M=e.Value.map(b,$=>$==="body-bottom"||$==="body-end-bottom"),U=e.When(M,()=>e.style.top(e.computedOf(o,n,E,u)(($,F,X,S)=>{const P=$+Number(F),R=$+X,J=Math.min(P,R);return`${Math.max($+S,J)}px`})),()=>e.style.bottom("0")),j=e.computedOf(N,y)(($,F)=>$?`${F}px`:"0"),H=e.computedOf(B,y)(($,F)=>$?`${F}px`:"0"),Q=e.style.transform(e.computedOf(C,k,B,N)(($,F,X,S)=>{const P=X?`translateX(-${$}px)`:"",R=S?`translateY(-${F}px)`:"";return`${P} ${R}`.trim()||"none"})),ee=e.style.transform(C.map($=>`translateX(-${$}px)`)),re=e.style.transform(k.map($=>`translateY(-${$}px)`)),ge=e.computedOf(n,E)(($,F)=>$-BigInt(Math.max(1,F))),we=e.computedOf(a,O)(($,F)=>$-BigInt(Math.max(1,F)));let q=null,ve=0,ke=0;const Ne=()=>{const $=ge.value,F=we.value,X=N.value,S=B.value;if(X&&ke!==0){const P=ct($e(0n,$),$e(0n,k.value+BigInt(Math.round(ke))));k.set(P)}if(S&&ve!==0){const P=ct($e(0n,F),$e(0n,C.value+BigInt(Math.round(ve))));C.set(P)}ve=0,ke=0,q=null};return B.on($=>{$||C.set(0n)}),N.on($=>{$||k.set(0n)}),e.Fragment(e.OnDispose(()=>{q&&clearTimeout(q)}),e.on.wheel($=>{$.preventDefault();const{deltaX:F,deltaY:X}=$;ve+=F,ke+=X,q||(q=setTimeout(Ne,16))}),e.html.div(e.attr.class("bc-nine-slice-pane-container"),e.style.right(j),e.style.bottom(H),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"),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(w),e.html.div(e.attr.class("bc-nine-slice-pane-content"),ee,r)):null,s!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-end"),e.style.top("0"),D,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(_),e.html.div(e.attr.class("bc-nine-slice-pane-content"),re,m)):null,e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-body"),e.style.left(w),e.style.top(_),e.html.div(e.attr.class("bc-nine-slice-pane-content"),Q,t)),d!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),D,e.style.top(_),e.html.div(e.attr.class("bc-nine-slice-pane-content"),re,d)):null,l!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-start"),e.style.left("0"),U,l):null,i!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-footer"),e.style.left(w),U,e.html.div(e.attr.class("bc-nine-slice-pane-content"),ee,i)):null,h!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-end"),D,U,h):null),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar"),e.style.overflowX("scroll"),e.style.left("0"),e.style.right(e.computedOf(N,y)(($,F)=>$?`${F}px`:"0")),e.style.bottom("0"),e.style.height(B.map($=>$?"16px":"0")),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar-thumb"),e.style.width(z.map($=>`${100/Math.max(1,$)}%`)),e.style.height("100%"),e.style.backgroundColor("#ff000066")),e.on.scroll($=>{const F=$.target,X=F.scrollLeft,S=F.scrollWidth-F.clientWidth;if(S>0){const P=X/S,R=we.value;C.set(BigInt(Math.round(Number(R)*P)))}})),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-vertical-scrollbar"),e.style.overflowY("scroll"),e.style.top("0"),e.style.bottom(e.computedOf(B,y)(($,F)=>$?`${F}px`:"0")),e.style.right("0"),e.style.width(N.map($=>$?"16px":"0")),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-vertical-scrollbar-thumb"),e.style.width("100%"),e.style.height(e.computedOf(o,u,n,K)(($,F,X,S)=>`${100/Math.max(1,S)}%`)),e.style.backgroundColor("#ff000066")),e.on.scroll($=>{const F=$.target,X=F.scrollTop,S=F.scrollHeight-F.clientHeight;if(S>0){const P=X/S,R=ge.value;k.set(BigInt(Math.round(Number(R)*P)))}})))}))}function Ye({header:t,footer:a,body:n,shadowOnScroll:r=!0},...o){const c=e.prop("none");function s(u){const l=u.scrollTop===0,h=u.scrollTop+u.clientHeight>=u.scrollHeight-1;l&&h?c.set("none"):l?c.set("bottom"):h?c.set("top"):c.set("both")}return e.html.div(e.attr.class("bc-scrollable-panel"),e.attr.class(e.computedOf(c,r)((u,l)=>{if(!l)return"";switch(u){case"both":return"bc-scrollable-panel--scrolled-up bc-scrollable-panel--scrolled-down";case"bottom":return"bc-scrollable-panel--scrolled-up";case"top":return"bc-scrollable-panel--scrolled-down";default:return""}})),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=>e.OnDispose(Pe.g(()=>s(u)))),e.on.scroll(u=>{const l=u.target;s(l)}),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 yn(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 vn({variant:t="default",size:a="md",roundedness:n="lg"}={},...r){return e.html.div(e.attr.class(e.computedOf(t,a,n)((o,c,s)=>yn(o??"default",c??"md",s??"lg"))),...r)}const be={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"?be.getValues(a.options):a.type==="break"?[]:[a.value]),contains:(t,a,n=(r,o)=>r===o)=>be.getValues(t).some(r=>n(r,a))},at=t=>{const{onChange:a,onInput:n,onBlur:r,role:o,display:c,optionsSource:s,allowSpaceToggle:i=!1,onBeforeOpen:u,onAfterOpen:l,buildListboxContent:h}=t,m=e.prop(!1),p=e.prop(-1),d=e.prop(null),v=oe.sessionId("dropdown"),b=oe.sessionId("listbox");let k,C,_;const w=V=>{a?.(V),n?.(V),m.set(!1),p.set(-1),d.set(null),_?.(),k?.focus()},y=V=>{const g=be.getValues(e.Value.get(s));switch(V.key){case"ArrowDown":{if(V.preventDefault(),!m.value)m.set(!0),g.length>0&&(p.set(0),d.set(g[0]));else{const I=Math.min(p.value+1,g.length-1);p.set(I),d.set(g[I]??null)}break}case"ArrowUp":{if(V.preventDefault(),m.value){const I=Math.max(p.value-1,0);p.set(I),d.set(g[I]??null)}break}case"Enter":{if(V.preventDefault(),m.value&&p.value>=0){const I=g[p.value];I!=null&&w(I)}else{u?.();const I=be.getValues(e.Value.get(s));m.set(!0),I.length>0&&(p.set(0),d.set(I[0])),setTimeout(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{l?.()})})},0)}break}case"Escape":{m.value&&(V.preventDefault(),m.set(!1),p.set(-1),d.set(null),k?.focus());break}case" ":{if(e.Value.get(i)){V.preventDefault();const I=be.getValues(e.Value.get(s));m.set(!m.value),m.value&&I.length>0&&(p.set(0),d.set(I[0]))}break}}};return G.InputContainer({...t,input:A.Group(e.attr.class("bc-dropdown__trigger"),e.html.span(e.attr.class("bc-dropdown__display"),c),f.Icon({icon:"ph:caret-up-down-bold",color:"neutral"},e.attr.class("bc-dropdown__arrow")))},ae.ElementRect(V=>e.Fragment(e.WithElement(g=>(k=g,g.addEventListener("keydown",y),e.OnDispose(()=>g.removeEventListener("keydown",y)))),ce.CommonInputAttributes(t),e.attr.id(v),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)((g,I)=>g&&I!=null?`dropdown-option-${String(I)}`:"")),r!=null?e.on.blur(()=>{setTimeout(()=>{C?.contains(document.activeElement)||(m.set(!1),p.set(-1),r())},100)}):e.Empty,ie.Flyout({content:()=>e.html.div(e.WithElement(g=>{C=g}),e.style.minWidth(V.$.width.map(g=>`${g-10}px`)),e.attr.class("bc-dropdown__listbox"),e.attr.role("listbox"),e.attr.id(b),e.aria.labelledby(v),h({dropdownId:v,listboxId:b,focusedValue:d,handleKeyDown:y,onSelect:w})),mainAxisOffset:0,placement:"bottom-start",hasPopup:"listbox",showOn:(g,I)=>{const B=I;I=()=>{m.set(!1),p.set(-1),d.set(null),B()},_=I;const N=()=>{if(m.value)I();else{u?.();const O=be.getValues(e.Value.get(s));m.set(!0),O.length>0&&(p.set(0),d.set(O[0])),g(),setTimeout(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{l?.()})})},0)}};return e.on.click(N)},showDelay:0,hideDelay:0,closable:!0}))))},Bt=(t,a,n,r,o)=>e.Ensure(t,c=>e.OneOfType(c,{value:s=>{const i=e.computedOf(s,n)((l,h)=>a(l.value,h)),u=e.computedOf(s,o)((l,h)=>h!=null&&a(l.value,h));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(i,u,s)((l,h,m)=>{const p=[];return l&&p.push("bc-dropdown__option--selected"),h&&p.push("bc-dropdown__option--focused"),m.disabled&&p.push("bc-dropdown__option--disabled"),p.join(" ")})),e.attr.role("option"),e.attr.id(s.map(l=>`dropdown-option-${String(l.value)}`)),e.aria.selected(i),A.Expando("value",s.$.value),e.When(s.map(l=>!l.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,i=>Bt(i,a,n,r,o))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),Et=t=>{const{value:a,options:n,unselectedLabel:r,equality:o=(l,h)=>l===h,placeholder:c,searchable:s=!1}=t,i=e.computedOf(a,n)((l,h)=>{if(l==null)return"";const m=p=>{for(const d of p){if(d.type==="value"&&o(d.value,l))return d.label;if(d.type==="group"){const v=m(d.options);if(v)return v}}};return m(h)||String(l)}),u=e.computedOf(s)(l=>!l);return at({...t,role:"dropdown",display:e.When(i.map(l=>l.length>0),()=>i,()=>e.Use(f.BeatUII18n,l=>e.coalesce(c,r,l.$.selectOne))),optionsSource:n,allowSpaceToggle:u,buildListboxContent:({focusedValue:l,onSelect:h})=>e.ForEach(n,m=>Bt(m,o,a,h,l))})},Pt=t=>{const{controller:a,onChange:n,onBlur:r,...o}=t;return Et({...o,value:a.signal,onChange:W.makeOnChangeHandler(a,n),onBlur:W.makeOnBlurHandler(a,r)})},kn=t=>W.InputWrapper({...t,content:Pt(t)}),At=(t,a,n,r,o,c)=>e.Ensure(t,s=>e.OneOfType(s,{value:i=>{const u=e.computedOf(i,n)((h,m)=>a(h.value,m)),l=e.computedOf(i,o)((h,m)=>m!=null&&a(h.value,m));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(u,l,i)((h,m,p)=>{const d=[];return h&&d.push("bc-dropdown__option--selected"),m&&d.push("bc-dropdown__option--focused"),p.disabled&&d.push("bc-dropdown__option--disabled"),d.join(" ")})),e.attr.role("option"),e.attr.id(i.map(h=>`dropdown-option-${String(h.value)}`)),e.aria.selected(u),e.When(i.map(h=>!h.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=>At(u,a,n,r,o,c))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),Lt=t=>{const{value:a,loadOptions:n,renderOption:r,renderValue:o,equality:c=(w,y)=>w===y,placeholder:s,searchPlaceholder:i,debounceMs:u=150,autoFocusSearch:l=!0}=t,h=e.prop(""),m=e.prop(!1),p=e.prop([]);let d;const v=e.Value.toSignal(a),b=()=>(o??r)(v);let k=null;const C=w=>{m.set(!0),Promise.resolve(n(w)).then(y=>{p.set(y??[])}).catch(()=>{p.set([])}).finally(()=>m.set(!1))},_=w=>{k!=null&&(clearTimeout(k),k=null),k=setTimeout(()=>{C(w)},Math.max(0,u))};return at({...t,role:"combobox",display:e.When(e.computedOf(a)(w=>w!=null),b,()=>e.Use(f.BeatUII18n,w=>w.$.selectOne)),optionsSource:p,onBeforeOpen:()=>{const w=e.Value.get(h);_(w)},onAfterOpen:()=>{l&&d?.focus()},buildListboxContent:({focusedValue:w,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(i,s)((g,I)=>g??I??"Search")),e.attr.value(h),e.WithElement(g=>(d=g,e.Empty)),e.on.input(g=>{const I=g.target;h.set(I.value),_(I.value)}),e.on.keydown(y))),e.When(m,()=>e.html.div(e.attr.class("bc-dropdown__loading"),f.Icon({icon:"ph:spinner-bold",color:"neutral"})),()=>e.ForEach(p,g=>At(g,c,v,V,w,r))))})},Mt=t=>{const{controller:a,onChange:n,onBlur:r,...o}=t;return Lt({...o,value:a.signal,onChange:W.makeOnChangeHandler(a,n),onBlur:W.makeOnBlurHandler(a,r)})},Cn=t=>W.InputWrapper({...t,content:Mt(t)});function Nt(t,a,n){return t.some(o=>n(o,a))?t.filter(o=>!n(o,a)):[...t,a]}function Ft(t,a,n){return t.filter(r=>!n(r,a))}function Wt(t,a,n){return t.some(r=>n(r,a))}function Ut(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=Ut(r.options,a,n);if(o!=null)return o}}function _n(t,a,n){return Ut(t,a,n)?.label??String(a)}function Rt(t,a,n){const r=a.trim().toLowerCase(),o=n??((s,i)=>i.label.toLowerCase().includes(s));if(r==="")return t;const c=[];for(const s of t)if(s.type==="value")o(r,{label:s.label})&&c.push(s);else if(s.type==="group"){const i=Rt(s.options,r,o);i.length>0&&c.push({...s,options:i})}return c}function nt(t){const{values:a,options:n,equality:r,disabled:o,onRemove:c}=t;return e.NotEmpty(a,()=>e.ForEach(a,s=>et({value:e.computedOf(s,n)((i,u)=>_n(u,i,r)),onClose:()=>c(s.value),disabled:o})),()=>e.html.span(e.attr.class("bc-input-container__placeholder"),t.placeholder))}function rt(t){const{value:a,options:n,equality:r=(l,h)=>l===h,placeholder:o}=t,c=l=>{const h=e.Value.get(a);t.onChange?.(Ft(h,l,r))},s=l=>{const h=e.Value.get(a);t.onChange?.(Nt(h,l,r))},i=l=>e.computedOf(a)(h=>Wt(h,l,r)),u=ie.Menu({items:()=>{const l=e.Value.get(n),h=[];for(const m of l)if(m.type==="value"){const p=i(m.value);h.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(m.disabled===!0),e.aria.checked(p),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"?h.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(p=>{if(p.type==="value"){const d=i(p.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(p.disabled===!0),e.aria.checked(d),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),p.label),e.on.click(()=>s(p.value)))}return e.Empty}))):h.push(ie.MenuSeparator());return h},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:"click",closable:!0});return G.InputContainer({...t,before:t.before??G.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),u,nt({values:a,placeholder:o,options:n,equality:r,disabled:t.disabled,onRemove:c})),after:G.InputIcon({icon:"line-md:plus",color:"neutral",size:"sm"})})}function wn(t){return W.BaseControl(rt,t)}function Vn(t){return W.Control(rt,t)}function ot(t){const{value:a,options:n,equality:r=(d,v)=>d===v,placeholder:o,searchPlaceholder:c,filter:s}=t,i=e.prop(""),u=d=>{const v=e.Value.get(a);t.onChange?.(Ft(v,d,r))},l=d=>{const v=e.Value.get(a);t.onChange?.(Nt(v,d,r))},h=e.computedOf(n,i)((d,v)=>Rt(d,v,s)),m=d=>e.Ensure(d,v=>e.OneOfType(v,{value:b=>{const k=e.computedOf(a,b)((C,_)=>Wt(C,_.value,r));return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(b.map(C=>C.disabled===!0)),e.aria.checked(k),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),b.$.label),e.on.click(()=>l(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:()=>ie.MenuSeparator()})),p=ie.Menu({items:()=>[e.When(h.map(d=>d.length===0),()=>e.html.div(e.attr.class("bc-dropdown__empty"),e.Use(f.BeatUII18n,d=>d.$.noResults))),e.ForEach(h,m)],placement:"bottom-start",showDelay:0,hideDelay:100,showOn:(d,v)=>e.WithElement(b=>{const k=b.querySelector(".bc-dropdown__search-input");if(k){const C=()=>d();return k.addEventListener("focus",C),e.OnDispose(()=>{k.removeEventListener("focus",C)})}return e.Empty}),closable:!0});return G.InputContainer({...t,before:t.before??G.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),nt({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,v)=>d??v??"")),e.attr.value(i),e.on.input(d=>{const v=d.target;i.set(v.value)}),e.on.keydown(d=>{(d.key==="ArrowUp"||d.key==="ArrowDown"||d.key==="Enter"||d.key===" ")&&d.stopPropagation()})),p))})}function xn(t){return W.BaseControl(ot,t)}function In(t){return W.Control(ot,t)}const Sn=t=>{const{value:a,onBlur:n,onChange:r}=t;return G.InputContainer({...t,input:e.input.date(ce.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)})},Dn=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}`},$n=t=>{const{value:a,onBlur:n,onChange:r}=t;return G.InputContainer({...t,input:e.input["datetime-local"](ce.CommonInputAttributes(t),e.attr.value(e.Value.map(a,Dn)),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 Tn(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 On=t=>ae.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?be.value(o.id,o.label):o));return A.NativeSelect({...t,options:n,unselectedLabel:t.unselectedLabel,equality:t.equality})},pending:()=>e.Use(f.BeatUII18n,a=>e.html.span(f.Icon({icon:"line-md:loading-twotone-loop",title:a.$.loadingShort})))}),Bn=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:c,disabled:s,...i}=t,u=A.NullableResetAfter(a,s,r??o);return A.MaskInput({...i,value:e.Value.map(a,T.nullToEmpty),onChange:r!=null?l=>r(T.emptyToNull(l)):void 0,onInput:o!=null?l=>o(T.emptyToNull(l)):void 0,onBlur:n,after:c!=null?e.Fragment(u,c):u})};function En(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 Pn(t){const{values:a,onChange:n,placeholder:r="Add...",size:o="md",disabled:c=!1,maxTags:s,hasError:i=!1}=t,u=e.prop(""),l=p=>{const v=e.Value.get(a).filter(b=>b!==p);n?.(v)},h=p=>{const d=p.trim();if(!d)return;const v=e.Value.get(a),b=e.Value.get(s??1/0);v.includes(d)||v.length>=b||(n?.([...v,d]),u.set(""))},m=p=>{if(p.key==="Enter"||p.key===",")p.preventDefault(),h(u.value);else if(p.key==="Backspace"&&u.value===""){const d=e.Value.get(a);d.length>0&&l(d[d.length-1])}};return e.html.div(e.attr.class(e.computedOf(o,c,i)((p,d,v)=>En(p??"md",d??!1,v??!1))),e.ForEach(a,p=>e.html.span(e.attr.class("bc-tag-input__tag"),e.html.span(e.attr.class("bc-tag-input__tag-text"),p),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(),l(p.value)}),"×"),()=>e.Empty))),e.html.input(e.attr.class("bc-tag-input__input"),e.attr.type("text"),e.attr.placeholder(e.computedOf(a,r)((p,d)=>p.length===0?d??"Add...":"")),e.attr.disabled(c),e.attr.value(u),e.on.input(p=>{const d=p.target;u.set(d.value)}),e.on.keydown(m),e.on.blur(()=>{u.value.trim()&&h(u.value)})))}const An=t=>{const{value:a,onChange:n,onBlur:r,before:o}=t,c=e.prop(""),s=u=>{n?.(e.Value.get(a).filter(l=>l!==u))},i=()=>{const u=c.value.trim(),l=e.Value.get(a);u===""||l.includes(u)||(c.set(""),n?.([...l,u]))};return G.InputContainer({...t,before:o??G.InputIcon({icon:"tabler:tag",size:t.size,color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),e.ForEach(a,u=>et({value:u,onClose:()=>s(u.value),disabled:t.disabled})),e.input.text(ce.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 Ln(t,a){const n=["bc-radio-group",`bc-radio-group--${t}`];return a&&a.length>0&&n.push(a),n.join(" ")}function Mn(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 Nn({options:t,value:a,onChange:n,name:r,disabled:o=!1,orientation:c="vertical",size:s="md",class:i}){const u=r??oe.sessionId("radio-group");return e.html.div(e.attr.class(e.computedOf(c,i)((l,h)=>Ln(l??"vertical",h))),e.attr.role("radiogroup"),e.ForEach(t,l=>{const h=l.map(p=>p.disabled??!1),m=oe.sessionId("radio");return e.html.label(e.attr.class(e.computedOf(s,o,h)((p,d,v)=>Mn(p??"md",v??!1,d??!1))),e.html.input(e.attr.type("radio"),e.attr.name(u),e.attr.id(m),e.attr.value(l.map(p=>String(p.value))),e.attr.class("bc-radio-group__input"),e.attr.checked(e.computedOf(a,l)((p,d)=>p===d.value)),e.attr.disabled(e.computedOf(o,h)((p,d)=>(p??!1)||(d??!1))),e.on.change(()=>{e.Value.get(o)||(e.Value.get(l).disabled??!1)||n?.(e.Value.get(l).value)}),e.aria.disabled(e.computedOf(o,h)((p,d)=>(p??!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"),l.map(p=>p.label)),e.html.span(e.attr.class("bc-radio-group__description"),l.map(p=>p.description??""))))}))}function Te(t,a,n){return Math.min(Math.max(t,a),n)}function Fn(t,a,n){return A.roundToStep(Math.round((t-a)/n)*n+a,n)}function he(t,a,n){return n===a?0:(t-a)/(n-a)*100}function Wn(t,a){const n=["bc-advanced-slider",`bc-advanced-slider--size-${t}`];return a&&n.push("bc-advanced-slider--disabled"),n.join(" ")}function Un(t){const a=f.backgroundValue(t,"solid","light"),n=f.backgroundValue(t,"solid","dark"),r=new Map;return r.set("--slider-color",a.backgroundColor),r.set("--slider-color-dark",n.backgroundColor),Array.from(r.entries()).map(([o,c])=>`${o}: ${c}`).join("; ")}function Rn({min:t=0,max:a=100,step:n=1,disabled:r=!1,size:o="md",color:c="primary",value:s,onChange:i,range:u,points:l,onRangeChange:h,onPointsChange:m,ticks:p,showValue:d=!1,formatValue:v=C=>String(C),segmentColors:b,renderThumb:k}){const C=l!=null?"multi":u!=null?"range":"single",_=C==="multi"?e.Value.get(l).length:C==="range"?2:1,w=[];if(p===!0)for(let O=t;O<=a;O+=n)w.push({value:O});else Array.isArray(p)&&w.push(...p);const y=C==="multi"?e.Value.map(l,O=>[...O]):C==="range"?e.Value.map(u,O=>[O[0],O[1]]):e.Value.map(s??0,O=>[O]),V=e.prop(null);function g(O){if(C==="multi")m?.(O);else if(C==="range"){const E=[O[0],O[1]];E[0]>E[1]&&E.reverse(),h?.(E)}else i?.(O[0])}function I(O,E,z){const K=O.getBoundingClientRect(),L=Te((E-K.left)/K.width,0,1),D=t+L*(a-t),M=Te(Fn(D,t,n),t,a),U=e.Value.get(y);if(z!=null){const j=[...U];j[z]=M,g(j)}else{let j=0,H=Math.abs(U[0]-M);for(let ee=1;ee<U.length;ee++){const re=Math.abs(U[ee]-M);re<H&&(j=ee,H=re)}const Q=[...U];Q[j]=M,V.set(j),g(Q)}}function B(O){return e.Value.map(y,E=>E[O]??t)}function N(O,E){const z=B(O),K=e.Value.map(z,L=>`${he(L,t,a)}%`);return e.html.div(e.attr.class("bc-advanced-slider__thumb-container"),e.style.left(K),e.When(d,()=>e.html.div(e.attr.class("bc-advanced-slider__value-label"),e.Value.map(z,L=>v(L))),()=>e.Empty),e.html.div(e.attr.class(k?"bc-advanced-slider__thumb-custom":"bc-advanced-slider__thumb"),e.attr.role("slider"),e.attr.tabindex(0),e.aria.valuemin(t),e.aria.valuemax(a),e.aria.valuenow(z),e.aria.label(`Thumb ${O+1}`),e.on.keydown(L=>{if(e.Value.get(r))return;const D=e.Value.get(y),M=D[O];let U;switch(L.key){case"ArrowRight":case"ArrowUp":L.preventDefault(),U=Te(A.roundToStep(M+n,n),t,a);break;case"ArrowLeft":case"ArrowDown":L.preventDefault(),U=Te(A.roundToStep(M-n,n),t,a);break;case"Home":L.preventDefault(),U=t;break;case"End":L.preventDefault(),U=a;break;default:return}const j=[...D];j[O]=U,g(j)}),e.on.pointerdown(L=>{if(L.stopPropagation(),L.preventDefault(),e.Value.get(r))return;V.set(O);const D=U=>{I(E,U.clientX,O)},M=()=>{V.set(null),window.removeEventListener("pointermove",D),window.removeEventListener("pointerup",M)};window.addEventListener("pointermove",D),window.addEventListener("pointerup",M)}),k?k(O,z):e.Empty))}return e.WithElement(O=>{const E=D=>{if(e.Value.get(r))return;D.preventDefault(),I(O,D.clientX,null);const M=j=>{I(O,j.clientX,V.value)},U=()=>{V.set(null),window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",U)};window.addEventListener("pointermove",M),window.addEventListener("pointerup",U)},z=b!=null&&(C==="range"||C==="multi"),K=z?"":e.computedOf(y)(D=>{if(C==="range"&&D.length===2){const U=he(Math.min(D[0],D[1]),t,a),j=he(Math.max(D[0],D[1]),t,a);return`left: ${U}%; width: ${j-U}%`}if(C==="multi"&&D.length>=2){const U=[...D].sort((Q,ee)=>Q-ee),j=he(U[0],t,a),H=he(U[U.length-1],t,a);return`left: ${j}%; width: ${H-j}%`}return`left: 0%; width: ${he(D[0]??t,t,a)}%`}),L=Array.from({length:_},(D,M)=>N(M,O));return e.Fragment(e.attr.class(e.computedOf(o,r)(Wn)),e.attr.style(e.Value.map(c,Un)),e.attr.role("group"),e.aria.label("Slider"),e.on.pointerdown(E),e.html.div(e.attr.class("bc-advanced-slider__track"),z?e.MapSignal(y,D=>{const M=[...D].sort((j,H)=>j-H),U=[];for(let j=0;j<M.length-1;j++){const H=M[j],Q=M[j+1],ee=he(H,t,a),re=he(Q,t,a),ge=b[j]??e.Value.get(c)??"primary";U.push({left:ee,width:re-ee,color:ge})}return e.Fragment(...U.map(j=>{const H=f.backgroundValue(j.color,"solid","light"),Q=f.backgroundValue(j.color,"solid","dark"),ee=`left: ${j.left}%; width: ${j.width}%; --slider-color: ${H.backgroundColor}; --slider-color-dark: ${Q.backgroundColor}`;return e.html.div(e.attr.class("bc-advanced-slider__fill"),e.attr.style(ee))}))}):e.html.div(e.attr.class("bc-advanced-slider__fill"),e.attr.style(K)),w.length>0?e.html.div(e.attr.class("bc-advanced-slider__ticks"),...w.map(D=>{const M=he(D.value,t,a);return e.html.div(e.attr.class("bc-advanced-slider__tick"),e.style.left(`${M}%`),D.label!=null?e.html.span(e.attr.class("bc-advanced-slider__tick-label"),D.label):e.Empty)})):e.Empty,...L))})}function zn(t,a){const n=["bc-otp-input",`bc-otp-input--size-${t}`];return a&&n.push("bc-otp-input--disabled"),n.join(" ")}function jn(t){const a=f.backgroundValue(t,"solid","light"),n=f.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",f.borderColorValue(t,"light")),r.set("--otp-focus-border-dark",f.borderColorValue(t,"dark")),Array.from(r.entries()).map(([o,c])=>`${o}: ${c}`).join("; ")}function Hn(t,a){return a==="numeric"?/^\d$/.test(t):/^[a-zA-Z0-9]$/.test(t)}function qn({length:t=6,value:a="",onChange:n,onComplete:r,disabled:o=!1,mask:c=!1,type:s="numeric",size:i="md",color:u="primary",placeholder:l="",autoFocus:h=!1}={}){const m=oe.sessionId("otp"),p=e.prop((()=>{const y=e.Value.get(a),V=new Array(t).fill("");for(let g=0;g<Math.min(y.length,t);g++)V[g]=y[g];return V})()),d=e.prop(null),v=[];function b(y){const V=v[y];V!=null&&(V.focus(),V.select())}function k(){const y=p.value.join("");n?.(y),y.length===t&&y.split("").every(V=>V!=="")&&r?.(y)}function C(y,V){if(e.Value.get(o))return;const g=V.split("").filter(I=>Hn(I,s));if(g.length>1){const I=[...p.value];for(let N=0;N<g.length&&y+N<t;N++)I[y+N]=g[N];p.set(I),k();const B=Math.min(y+g.length,t-1);b(B);return}if(g.length===1){const I=[...p.value];I[y]=g[0],p.set(I),k(),y<t-1&&b(y+1)}}function _(y,V){if(!e.Value.get(o))switch(V.key){case"Backspace":{V.preventDefault();const g=[...p.value];g[y]!==""?(g[y]="",p.set(g),k()):y>0&&(g[y-1]="",p.set(g),k(),b(y-1));break}case"ArrowLeft":V.preventDefault(),y>0&&b(y-1);break;case"ArrowRight":V.preventDefault(),y<t-1&&b(y+1);break;case"Delete":{V.preventDefault();const g=[...p.value];g[y]="",p.set(g),k();break}case"Home":V.preventDefault(),b(0);break;case"End":V.preventDefault(),b(t-1);break}}function w(y,V){V.preventDefault();const g=V.clipboardData?.getData("text")??"";C(y,g)}return e.html.div(e.attr.class(e.computedOf(i,o)(zn)),e.attr.style(e.Value.map(u,jn)),e.attr.role("group"),e.aria.label("One-time password input"),...Array.from({length:t},(y,V)=>{const g=`${m}-cell-${V}`;return e.html.input(e.WithElement(I=>(v[V]=I,h&&V===0&&requestAnimationFrame(()=>I.focus()),e.Empty)),e.attr.id(g),e.attr.type(c?"password":"text"),e.attr.inputmode(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(I=>I===V?"bc-otp-input__cell--focused":"")),e.attr.placeholder(l),e.attr.disabled(o),e.aria.label(`Digit ${V+1} of ${t}`),e.attr.value(p.map(I=>I[V]??"")),e.on.focus(()=>{d.set(V);const I=v[V];I?.select()}),e.on.blur(()=>{d.set(null)}),e.on.input(I=>{const B=I.target;C(V,B.value),B.value=p.value[V]??""}),e.on.keydown(I=>_(V,I)),e.on.paste(I=>w(V,I)))}))}const Gn=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"),s=a.getMinutes().toString().padStart(2,"0");return`${n}-${r}-${o}T${c}:${s}`},Yn=t=>{const{value:a,onBlur:n,onChange:r}=t;return A.WithTemporal(o=>G.InputContainer({...t,input:e.input["datetime-local"](ce.CommonInputAttributes(t),e.attr.value(e.Value.map(a,c=>Gn(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)}))},Zn=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"),s=a.getMinutes().toString().padStart(2,"0");return`${n}-${r}-${o}T${c}:${s}`},Jn=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:c,disabled:s}=t,i=A.NullableResetAfter(a,s,r??o);return A.WithTemporal(u=>G.InputContainer({...t,input:e.input["datetime-local"](ce.CommonInputAttributes(t),e.attr.value(e.Value.map(a,l=>l==null?null:Zn(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(l===""?null:u.Instant.from(new Date(l).toISOString())))):e.Empty,o!=null?e.on.input(e.emitValue(l=>o(l===""?null:u.Instant.from(new Date(l).toISOString())))):e.Empty),after:c!=null?e.Fragment(i,c):i}))},Xn=t=>{const{value:a,onBlur:n,onChange:r}=t;return A.WithTemporal(o=>G.InputContainer({...t,input:e.input["datetime-local"](ce.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 s=o.PlainDateTime.from(c),i=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(o.ZonedDateTime.from({...s,timeZone:i}))})):e.Empty)}))},Kn=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:c,disabled:s}=t,i=A.NullableResetAfter(a,s,r??o);return A.WithTemporal(u=>G.InputContainer({...t,input:e.input["datetime-local"](ce.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=>{if(l==="")return r(null);const h=u.PlainDateTime.from(l),m=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(u.ZonedDateTime.from({...h,timeZone:m}))})):e.Empty,o!=null?e.on.input(e.emitValue(l=>{if(l==="")return o(null);const h=u.PlainDateTime.from(l),m=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return o(u.ZonedDateTime.from({...h,timeZone:m}))})):e.Empty),after:c!=null?e.Fragment(i,c):i}))},Qn=se.createTemporalInput({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,a)=>t.PlainYearMonth.from(a)}),er=se.createNullableTemporalInput({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,a)=>t.PlainYearMonth.from(a)}),tr=t=>{const{value:a,onChange:n}=t;return A.WithTemporal(r=>A.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"}))},ar=t=>{const{value:a,onChange:n,onInput:r,after:o,disabled:c}=t,s=A.NullableResetAfter(a,c,n??r);return A.WithTemporal(i=>A.MaskInput({...t,value:e.Value.map(a,u=>u?.toString()??""),onChange:n!=null?u=>n(u===""?null:i.PlainMonthDay.from(`--${u}`)):void 0,onInput:r!=null?u=>r(u===""?null:i.PlainMonthDay.from(`--${u}`)):void 0,mask:"99-99",placeholder:"MM-DD",after:o!=null?e.Fragment(s,o):s}))};function nr(t,a,n){return e.Ensure(t.signal,()=>{const r=t.transform(o=>o,o=>o);return a(r)},n)}const rr={filling:{type:"filling"},submitting:{type:"submitting"},error:t=>({type:"error",error:t}),success:{type:"success"}};class zt extends W.Controller{constructor(a,n,r,o,c){super(a,n,r,o,c)}isValidColor=this.signal.map(T.isValidColor);isValidHex=this.signal.map(T.isValidHexColor);normalizedHex=this.signal.map(a=>T.normalizeHexColor(a)??a);setColor=a=>{if(T.isValidHexColor(a)){const n=T.normalizeHexColor(a);if(n){this.change(n);return}}this.change(a)};setHex=a=>{const n=T.normalizeHexColor(a);n&&this.change(n)};setRgb=(a,n,r)=>{const o=s=>{const i=Math.round(Math.max(0,Math.min(255,s))).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=T.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 T.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=>T.normalizeHexColor(o)??o;return this.transform(n,r,[`format-${a}`])}}function or(t){return new zt(t.path,t.change,t.signal,t.status,{disabled:t.disabled})}function lr(t){return{id:t.name,disabled:t.disabled,value:t.normalizedHex,hasError:t.errorVisible,onChange:t.setColor,onInput:t.setColor}}function sr({locales:t,onChange:a,updateLocale:n=!0}){return e.Use(f.BeatUII18n,r=>e.Use(f.Locale,({locale:o,setLocale:c})=>W.InputWrapper({layout:"horizontal",content:A.Group(e.attr.class("bc-group--align-center bc-group--gap-2"),f.Icon({icon:"ic:twotone-language",size:"lg",color:"neutral",title:r.$.locale}),A.NativeSelect({options:e.Value.map(t,s=>s.map(i=>{let u=i.name;return i.nativeName!=null&&i.nativeName!==i.name&&(u+=` (${i.nativeName})`),be.value(i.code,u)})),value:o,onChange:s=>{n&&c(s),a?.(s)}}))})))}const ir=()=>e.Use(f.Locale,({direction:t})=>e.Portal("body",e.attr.class(t.map(a=>`b-${a}`))));function jt(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 Ht(t,a){return[`--notification-accent-color: ${Z.getColorVar(t,500)}`,`--notification-radius: ${x.getRadiusVar(a)}`].join("; ")}function qt({loading:t=!1,withCloseButton:a=!1,withBorder:n=!1,color:r="primary",radius:o="md",title:c,icon:s,onClose:i,class:u}={},...l){const h=e.Value.map(s,m=>m!=null);return e.html.section(e.attr.class(e.computedOf(n,h,a,t,u)((m,p,d,v,b)=>[jt(m,p,d,v,b)].join(" "))),e.attr.style(e.computedOf(r,o)((m,p)=>Ht(m,p))),e.aria.live("polite"),e.aria.busy(t),e.When(t,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__loader"),f.Icon({icon:"line-md:loading-twotone-loop",size:"lg",color:r,accessibility:"decorative"})),()=>e.When(h,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__icon"),f.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"),c!=null?e.html.div(e.attr.class("bc-notification__title"),c):null,e.html.div(e.attr.class("bc-notification__content"),...l)),e.When(a,()=>e.html.div(e.attr.class("bc-notification__meta"),W.CloseButton({size:"sm",color:r,onClick:i}))))}class cr{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 Gt=new cr,lt={mark:e.makeProviderMark("NotificationProvider"),create:({position:t="bottom-end"}={})=>{const a=e.prop(0),n=[];function r(u){return n.push(u),()=>{const l=n.lastIndexOf(u);l>=0&&n.splice(l,1)}}const o=[],c=({dismissAfter:u,onClose:l,animation:h={fade:!0},...m},...p)=>{a.update(b=>b+1);const d=u!=null?typeof u=="number"?da(u*1e3):u:void 0,v={animation:h,class:e.Value.toSignal(m.class),loading:e.Value.toSignal(m.loading??!1),withCloseButton:e.Value.toSignal(m.withCloseButton==null&&u==null?!0:m.withCloseButton??!0),withBorder:e.Value.toSignal(m.withBorder??!1),color:e.Value.toSignal(m.color??"primary"),radius:e.Value.toSignal(m.radius??"md"),title:m.title??e.Empty,icon:e.Value.toSignal(m.icon),children:p,listenRequestClose:b=>(o.push(b),l?.(),()=>{}),delayedClose:d};n.forEach(b=>b(v))},s=()=>{o.forEach(u=>u()),o.length=0},i=Gt.attach({show:c,clear:s});return{value:{activeNotifications:a,show:c,clear:s,position:t,listenOnShow:r},dispose:()=>{i(),s()}}}};function Yt(){return e.Use(lt,({listenOnShow:t,position:a})=>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(le.AnimatedToggle({animation:r.animation,initialStatus:"start-opening"},({close:s,listenOnClosed:i})=>(r.delayedClose?.finally(s),i(()=>{o.forEach(u=>u())}),qt({class:r.class,loading:r.loading,withCloseButton:r.withCloseButton,withBorder:r.withBorder,color:r.color,radius:r.radius,title:r.title,icon:r.icon,onClose:s},...r.children))));o.push(e.renderWithContext(c,n))})))))}function ur({includeAuthI18n:t=!1,enableAppearance:a=!0,defaultAppearance:n="system",appearancePreferenceKey:r="bui-appearance",includeNotifications:o=!0,notificationPosition:c="bottom-end"},...s){return e.WithProvider(({set:i,use:u})=>{i(ae.Location,{}),i(f.Locale,{}),i(f.BeatUII18n,{}),i(Se.Theme,{defaultAppearance:a?n:"light",appearancePreferenceKey:r}),o&&i(lt,{position:c}),ae.NavigationService.attach(u(ae.Location));const l=e.Fragment(a?Se.ThemeAppearance():e.Empty,ir(),o?Yt():e.Empty,...s);return t?e.Task(()=>Promise.resolve().then(()=>require("./translations-BdCtLBZt.cjs")).then(h=>h.translations),({AuthI18n:h})=>e.Provide(h,{},()=>l)):l})}function dr({content:t,toolbar:a=!0,page:n,zoom:r,view:o,pagemode:c,scrollbar:s=!0,navpanes:i=!0,search:u,nameddest:l,viewrect:h,highlight:m,allowfullscreen:p=!1}){const d=e.Value.toSignal(t).mapAsync(async b=>{if(b instanceof Blob){const k=await b.arrayBuffer(),C=new Blob([k],{type:"application/pdf"});return URL.createObjectURL(C)}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 C=await(await fetch(b)).arrayBuffer(),_=new Blob([C],{type:"application/pdf"});return URL.createObjectURL(_)}}},null),v=e.computedOf(d,a,n,r,o,c,s,i,u,l,h,m)((b,k,C,_,w,y,V,g,I,B,N,O)=>{if(b==null)return null;const E=[];k===!1&&E.push("toolbar=0"),C!=null&&C>0&&E.push(`page=${C}`),_!=null&&_>0&&E.push(`zoom=${_}`),w!=null&&E.push(`view=${w}`),y!=null&&E.push(`pagemode=${y}`),V===!1&&E.push("scrollbar=0"),g===!1&&E.push("navpanes=0"),I!=null&&E.push(`search=${encodeURIComponent(I)}`),B!=null&&E.push(`nameddest=${encodeURIComponent(B)}`),N!=null&&E.push(`viewrect=${encodeURIComponent(N)}`),O!=null&&E.push(`highlight=${encodeURIComponent(O)}`);const z=E.join("&");return z?`${b}#${z}`:b});return d.on((b,k)=>{k!=null&&URL.revokeObjectURL(k)}),e.Use(f.BeatUII18n,b=>e.html.div(e.OnDispose(()=>{const k=d.value;k!=null&&URL.revokeObjectURL(k)}),e.attr.class("h-full w-full"),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(p),e.attr.title(b.$.pdfPreview),e.attr.loading("lazy"),e.WithElement(k=>{const C=k;let _=!0;return v.on(w=>{w!=null&&(_?(C.src=w,_=!1):(C.src="about:blank",setTimeout(()=>{C.src=w},50)))}),e.Empty}))))}function pr({content:t,page:a,zoom:n,pagemode:r,nameddest:o,search:c,textLayerMode:s,sidebarViewOnLoad:i,scrollModeOnLoad:u,spreadModeOnLoad:l,enableScripting:h,enablePrinting:m,viewerUrl:p=null,allowfullscreen:d=!0,class:v=null}){const b=e.Value.toSignal(t).mapAsync(async C=>{if(C instanceof Blob)return URL.createObjectURL(C);if(C instanceof ArrayBuffer)return URL.createObjectURL(new Blob([C],{type:"application/pdf"}));if(C instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(C)],{type:"application/pdf"}));if(typeof C=="string")return C},null),k=e.computedOf(b,p,a,n,r,o,c,s,i,u,l,h,m)((C,_,w,y,V,g,I,B,N,O,E,z,K)=>{if(C==null)return null;const L=_??"https://mozilla.github.io/pdf.js/web/viewer.html",D=new URLSearchParams;D.set("file",C);const M=[];w!=null&&w>0&&M.push(`page=${w}`),y!=null&&(typeof y=="string"?M.push(`zoom=${y}`):M.push(`zoom=${y}`)),V!=null&&M.push(`pagemode=${V}`),g!=null&&M.push(`nameddest=${encodeURIComponent(g)}`),I!=null&&M.push(`search=${encodeURIComponent(I)}`),B!=null&&M.push(`textLayer=${B}`),N!=null&&M.push(`sidebar=${N}`),O!=null&&M.push(`scrollMode=${O}`),E!=null&&M.push(`spreadMode=${E}`),z!=null&&M.push(`enableScripting=${z?"1":"0"}`),K!=null&&M.push(`enablePrinting=${K?"1":"0"}`);const U=M.length>0?`#${M.join("&")}`:"";return`${L}?${D.toString()}${U}`});return b.on((C,_)=>{_!=null&&_.startsWith("blob:")&&URL.revokeObjectURL(_)}),e.Use(f.BeatUII18n,C=>e.html.div(e.OnDispose(()=>{const _=b.value;_!=null&&_.startsWith("blob:")&&URL.revokeObjectURL(_)}),e.attr.class("bc-pdfjs-preview h-full w-full"),e.attr.class(v),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(d),e.attr.title(C.$.pdfPreview),e.attr.loading("lazy"),e.attr.src(k))))}function mr(t,a){const n=["bc-empty-state",`bc-empty-state--size-${t}`];return a&&a.length>0&&n.push(a),n.join(" ")}function hr({icon:t,title:a,description:n,size:r="md",action:o,class:c}){return e.html.div(e.attr.class(e.computedOf(r,c)((s,i)=>mr(s??"md",i))),e.Ensure(t,s=>e.html.div(e.attr.class("bc-empty-state__icon"),f.Icon({icon:s,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,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 br=({id:t,css:a})=>e.Portal("head",e.html.style(e.attr.id(t),e.attr.innerHTML(a)));function de(t,a){return a==null?null:e.html.meta(e.attr.name(t),e.attr.content(e.Value.map(a,n=>String(n))))}function Y(t,a){return a==null?null:e.html.meta(e.attr.property(t),e.attr.content(e.Value.map(a,n=>String(n))))}function Ee(t,a){return a==null?null:e.ForEach(a,n=>Y(t,n))}function gr(t,a){return a==null?null:e.When(e.Value.map(a,n=>Array.isArray(n)),()=>Ee(t,a),()=>Y(t,a))}const fr=t=>{const a=[];if(a.push(Y("og:title",t.title)),a.push(Y("og:type",t.type)),a.push(Y("og:url",t.url)),a.push(Y("og:image",t.image)),a.push(Y("og:description",t.description)),a.push(Y("og:site_name",t.siteName)),a.push(Y("og:locale",t.locale)),t.localeAlternate!=null){const n=Ee("og:locale:alternate",t.localeAlternate);n!=null&&a.push(n)}if(a.push(Y("og:image:alt",t.imageAlt)),a.push(Y("og:image:width",t.imageWidth)),a.push(Y("og:image:height",t.imageHeight)),a.push(Y("og:image:type",t.imageType)),t.images!=null){const n=Ee("og:image",t.images);n!=null&&a.push(n)}if(a.push(Y("og:video",t.video)),a.push(Y("og:video:type",t.videoType)),a.push(Y("og:video:width",t.videoWidth)),a.push(Y("og:video:height",t.videoHeight)),a.push(Y("og:video:secure_url",t.videoSecureUrl)),a.push(Y("og:audio",t.audio)),a.push(Y("og:audio:type",t.audioType)),a.push(Y("og:audio:secure_url",t.audioSecureUrl)),a.push(Y("article:published_time",t.publishedTime)),a.push(Y("article:modified_time",t.modifiedTime)),a.push(Y("article:expiration_time",t.expirationTime)),a.push(gr("article:author",t.author)),a.push(Y("article:section",t.section)),t.tags!=null){const n=Ee("article:tag",t.tags);n!=null&&a.push(n)}return a.push(Y("profile:first_name",t.firstName)),a.push(Y("profile:last_name",t.lastName)),a.push(Y("profile:username",t.username)),a.push(Y("profile:gender",t.gender)),a.push(de("twitter:card",t.twitterCard)),a.push(de("twitter:site",t.twitterSite)),a.push(de("twitter:creator",t.twitterCreator)),a.push(de("twitter:title",e.coalesce(t.twitterTitle,t.title))),a.push(de("twitter:description",e.coalesce(t.twitterDescription,t.description))),a.push(de("twitter:image",e.coalesce(t.twitterImage,t.image))),a.push(de("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(de("robots",t.robots)),a.push(de("keywords",t.keywords)),a.push(de("author",t.metaAuthor)),e.Portal("head",a.filter(n=>n!=null).flat())};function yr(t){const{items:a,onMarkAllRead:n,onClose:r}=t,o=e.computedOf(a)(c=>c.filter(s=>!s.read).length);return e.Use(f.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)(s=>s>0),()=>Ae({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()),f.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(i=>i.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(i=>i.iconColor?`background: ${i.iconColor}14; color: ${i.iconColor}`:"")),f.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(i=>i.source!==void 0),()=>e.html.span(e.attr.class("bc-notification-panel__item-source"),s.map(i=>i.source?.label??""))))),e.When(s.map(i=>!i.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"),f.Icon({icon:"lucide:bell-off",size:"lg"}),e.html.div(c.$.noNotifications))))))}function vr(t){return["bc-breadcrumbs",`bc-breadcrumbs--size-${t}`].join(" ")}function kr(t,a){if(t.length<=a)return t;const n=t[0],r=t.slice(-(a-1));return[n,{isEllipsis:!0},...r]}function Cr({items:t,separator:a="/",maxItems:n,size:r="md"}){const o=e.computedOf(t,n)((c,s)=>s&&s>0?kr(c,s):c);return e.Use(f.BeatUII18n,c=>e.html.nav(e.attr.class(e.Value.map(r,s=>vr(s??"md"))),e.aria.label(c.$.breadcrumbs),e.html.ol(e.attr.class("bc-breadcrumbs__list"),e.ForEach(o,s=>{const i=s.map(l=>"isEllipsis"in l&&l.isEllipsis===!0),u=s.map(l=>!("isEllipsis"in l)&&l.current===!0);return e.When(i,()=>e.html.li(e.attr.class("bc-breadcrumbs__item bc-breadcrumbs__ellipsis"),e.aria.hidden(!0),"..."),()=>{const l=s.map(d=>!("isEllipsis"in d)&&d.href!=null),h=s.map(d=>!("isEllipsis"in d)&&d.href==null&&d.onClick!=null),m=s.map(d=>!("isEllipsis"in d)&&d.icon!=null),p=d=>[e.attr.class(d),e.When(m,()=>f.Icon({icon:s.map(v=>"isEllipsis"in v?"":v.icon??""),size:r,accessibility:"decorative"})),e.html.span(s.map(v=>"isEllipsis"in v?"":v.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(l,()=>e.html.a(e.attr.href(s.map(d=>"isEllipsis"in d?"":d.href??"")),...p("bc-breadcrumbs__link")),()=>e.When(h,()=>e.html.button(e.attr.type("button"),e.on.click(()=>{const d=e.Value.get(s);"isEllipsis"in d||d.onClick?.()}),...p("bc-breadcrumbs__button")),()=>e.html.span(...p("bc-breadcrumbs__text")))))})},()=>e.html.li(e.attr.class("bc-breadcrumbs__separator"),e.aria.hidden(!0),a)))))}const st=({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 Ze(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 Je(t){const a=f.textColorValue(t,"light"),n=f.textColorValue(t,"dark");return[`--link-color: ${a}`,`--link-color-dark: ${n}`,`--link-hover-color: ${a}`,`--link-hover-color-dark: ${n}`].join("; ")}function Zt({href:t,variant:a="default",color:n="primary",colorDisabled:r="base",disabled:o=!1,viewTransition:c=!0,state:s,scroll:i,replace:u,target:l,rel:h},...m){return e.When(o,()=>e.html.span(e.attr.class(e.computedOf(a,o)((p,d)=>Ze(p,d))),e.attr.style(e.computedOf(r)(p=>Je(p??"base"))),...m),()=>ae.Anchor({href:t,...st({viewTransition:c,state:s,scroll:i,replace:u})},e.attr.class(e.computedOf(a,o)((p,d)=>Ze(p,d))),e.attr.style(e.computedOf(n)(p=>Je(p??"primary"))),l?e.attr.target(l):null,h?e.attr.rel(h):null,...m))}const _r=t=>t?t.startsWith("#")?t:`#${t}`:"",wr=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 Jt(t,a,n){const r=wr(t.search),o=r.toString(),c=o?`?${o}`:"",s=_r(t.hash);switch(n){case"exact":return t.pathname+c+s===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 l=Array.from(new URLSearchParams(u.search).entries()).sort(),h=Array.from(r.entries()).sort();return l.length!==h.length?!1:l.every(([m,p],d)=>{const[v,b]=h[d];return m===v&&p===b})}catch{return t.pathname===a}default:return!1}}function Me(t,a){return a==="exact"?e.computedOf(t)(n=>n):e.computedOf(t)(n=>r=>Jt(r,n,a))}function Vr({href:t,matchMode:a="exact",disableWhenActive:n=!0,...r},...o){return e.Use(ae.Location,c=>{const s=c.matchSignal(Me(t,a)),i=e.computedOf(s,n)((u,l)=>l??!0?u:!1);return Zt({...r,href:t,disabled:i},...o)})}function xr({href:t,viewTransition:a=!0,state:n,scroll:r,replace:o,target:c,rel:s,matchMode:i,disableWhenActive:u,variant:l="filled",size:h="md",color:m="base",roundedness:p="sm",disabled:d=!1},...v){return i!==void 0||u!==void 0?e.Use(ae.Location,b=>{const k=i!==void 0?b.matchSignal(Me(t,i)):e.computedOf(b.location)(()=>!1),C=e.computedOf(k,u)((w,y)=>!(y??!0)||!i?!1:w),_=e.computedOf(d,C)((w,y)=>w||y);return mt({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:c,rel:s,variant:l,size:h,color:m,roundedness:p,disabled:_},...v)}):mt({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:c,rel:s,variant:l,size:h,color:m,roundedness:p,disabled:d},...v)}function mt({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:c,rel:s,variant:i="default",size:u="md",color:l="base",roundedness:h="sm",disabled:m=!1,fullWidth:p=!1,loading:d=!1},...v){return e.When(m??!1,()=>e.html.span(e.attr.class(e.computedOf(u,h,d,p)(G.generateButtonClasses)),e.attr.style(e.computedOf(i,l,m)((b,k,C)=>G.generateButtonStyles(b??"filled",k??"base",C))),...v),()=>ae.Anchor({href:t,...st({viewTransition:a,state:n,scroll:r,replace:o})},e.attr.class(e.computedOf(u,h,d,p)(G.generateButtonClasses)),e.attr.style(e.computedOf(i,l,m)((b,k,C)=>G.generateButtonStyles(b??"filled",k??"base",C))),c?e.attr.target(c):null,s?e.attr.rel(s):null,...v))}function Xt(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 s=o;s<=c;s++)r.push(s);return c<a&&(c<a-1&&r.push("dots"),r.push(a)),r}function Ir({currentPage:t,totalPages:a,onPageChange:n,siblings:r=1,showPrevNext:o=!0,showFirstLast:c=!1,size:s="md",justify:i=!1,responsive:u=!1}){const l=e.prop(e.Value.get(r)),h=e.computedOf(u,l,r)((m,p,d)=>m?p:d);return e.Use(f.BeatUII18n,m=>e.html.nav(e.attr.class(e.computedOf(s,i)((p,d)=>{const v=["bc-pagination",`bc-pagination--size-${p}`];return d&&v.push("bc-pagination--justify"),v.join(" ")})),e.aria.label(m.$.paginationLabel),e.When(u,()=>e.WithElement(p=>{const d=()=>{const b=p.clientWidth;if(b===0)return;const k=p.querySelector(".bc-pagination__item");if(!k)return;const C=k.offsetWidth,_=parseFloat(getComputedStyle(p).gap)||0,w=C+_,y=Math.floor((b+_)/w),V=(e.Value.get(o)?2:0)+(e.Value.get(c)?2:0),g=e.Value.get(a),I=y-V,B=Math.max(0,Math.floor((I-5)/2)),N=Math.floor((g-3)/2);l.set(Math.min(B,Math.max(0,N)))},v=new ResizeObserver(d);return v.observe(p),requestAnimationFrame(d),e.OnDispose(()=>v.disconnect())})),e.When(c,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((p,d)=>p<=1||d<=1)),e.aria.label(m.$.firstPage),e.on.click(p=>{p.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)((p,d)=>p<=1||d<=1)),e.aria.label(m.$.previousPage),e.on.click(p=>{p.preventDefault();const d=e.Value.get(t);d>1&&n(d-1)}),"‹")),e.ForEach(e.computedOf(t,a,h)((p,d,v)=>Xt(p,d,v)),p=>{const d=p.map(b=>b==="dots"),v=e.computedOf(p,t)((b,k)=>b===k);return e.When(d,()=>e.html.span(e.attr.class("bc-pagination__dots"),"…"),()=>e.html.button(e.attr.class(e.Value.map(v,b=>b?"bc-pagination__item bc-pagination__item--active":"bc-pagination__item")),e.WithElement(b=>{e.Value.on(v,k=>{k?b.setAttribute("aria-current","page"):b.removeAttribute("aria-current")})}),e.on.click(b=>{b.preventDefault();const k=e.Value.get(p);k!=="dots"&&k!==e.Value.get(t)&&n(k)}),p.map(b=>String(b))))}),e.When(o,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((p,d)=>p>=d||d<=1)),e.aria.label(m.$.nextPage),e.on.click(p=>{p.preventDefault();const d=e.Value.get(t),v=e.Value.get(a);d<v&&n(d+1)}),"›")),e.When(c,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((p,d)=>p>=d||d<=1)),e.aria.label(m.$.lastPage),e.on.click(p=>{p.preventDefault();const d=e.Value.get(a);d>1&&n(d)}),"»"))))}const Kt={mark:e.makeProviderMark("SidebarContext"),create:t=>({value:{backgroundMode:"light"},dispose:()=>{}})};function Sr({backgroundMode:t="light"},...a){return e.Provide(Kt,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 Xe({rail:t,header:a},...n){return Ve.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 Qt(t,...a){const n=st({viewTransition:t.viewTransition??!0,state:t.state,scroll:t.scroll,replace:t.replace});return ae.Anchor({href:t.href,...n},...a)}function ea(...t){return e.html.span(...t)}function ta(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 aa(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"),f.Icon({icon:t.icon}))),a.push(e.html.span(e.attr.class("bc-sidebar-link__content"),t.content)),t.right!=null&&a.push(e.html.span(e.attr.class("bc-sidebar-link__right"),t.right)),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)}),f.Icon({icon:t.action?.icon}))),"onClick"in t?ta(t,...a):e.Use(ae.Location,n=>{const r=n.matchSignal(Me(t.href,"exact"),{includeSearch:!1,includeHash:!1});return e.When(r,()=>ea(...a),()=>Qt(t,...a))})}function Dr({rail:t=!0,icon:a,header:n,startOpen:r=!0},...o){const c=e.Value.deriveProp(r),s=oe.sessionId("sidebar-group"),i=`${s}-content`;return Xe({},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(s),aa({icon:a,onClick:()=>c.update(u=>!u),ariaExpanded:c,ariaControls:i,right:e.html.span(e.attr.class("bc-sidebar-group-collapsible-indicator"),f.Icon({icon:"lucide:chevron-down",color:"base"})),content:n}),Xe({rail:t},e.attr.id(i),Le({open:c},...o)))}function $r(){return e.html.hr(e.attr.class("bc-sidebar-separator"))}function Tr(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 Or(t,a){if(t!=="filled")return"";const n=new Map,r=f.backgroundValue(a,"solid","light"),o=f.backgroundValue(a,"solid","dark");n.set("--tabs-filled-inactive-bg",r.backgroundColor),n.set("--tabs-filled-inactive-text","var(--color-white)");const c=f.hoverBackgroundValue(a,"solid","light");n.set("--tabs-filled-inactive-bg-hover",c.backgroundColor);const s=f.hoverBackgroundValue(a,"solid","dark");n.set("--tabs-filled-inactive-bg-dark-hover",s.backgroundColor),n.set("--tabs-filled-inactive-bg-dark",o.backgroundColor),n.set("--tabs-filled-inactive-text-dark",o.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)");const i=a==="white"||a==="black"||a==="transparent"?"var(--color-white)":Z.getColorVar(a,400);return n.set("--tabs-filled-active-text-dark",i),Array.from(n.entries()).map(([u,l])=>`${u}: ${l}`).join("; ")}function Br(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 Oe(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 s=a[o];if(!e.Value.get(s.disabled??!1))return o;o+=n,o>=r?o=0:o<0&&(o=r-1),c++}return t}function Er(t){const{items:a,value:n,onChange:r,size:o="md",variant:c="default",color:s="primary",disabled:i=!1,orientation:u="horizontal",showContent:l=!0,ariaLabel:h}=t,m=oe.sessionId("tablist"),p=e.prop(-1),d=a.map((b,k)=>{const C=e.computedOf(n)(V=>V===b.key),_=e.computedOf(i,b.disabled)((V,g)=>V||g),w=`${m}-tab-${b.key}`,y=`${m}-panel-${b.key}`;return{item:b,index:k,isActive:C,isTabDisabled:_,tabId:w,panelId:y}}),v=b=>{if(e.Value.get(i))return;const C=p.value,_=e.Value.get(u)==="horizontal";let w=C;switch(b.key){case(_?"ArrowRight":"ArrowDown"):b.preventDefault(),w=Oe(C,a,1);break;case(_?"ArrowLeft":"ArrowUp"):b.preventDefault(),w=Oe(C,a,-1);break;case"Home":b.preventDefault(),w=Oe(-1,a,1);break;case"End":b.preventDefault(),w=Oe(a.length,a,-1);break;case"Enter":case" ":if(b.preventDefault(),C>=0&&C<a.length){const y=a[C];e.Value.get(y.disabled??!1)||r?.(y.key)}break}w!==C&&w>=0&&w<a.length&&(p.set(w),setTimeout(()=>{const y=document.querySelector(`[data-tab-index="${w}"]`);y&&y.focus()},0))};return e.html.div(e.attr.class(e.computedOf(o,u,i,c)((b,k,C,_)=>Tr(b??"md",k??"horizontal",C??!1,_??"default"))),e.attr.style(e.computedOf(c,s)((b,k)=>Or(b??"default",k??"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(h),e.on.keydown(v),...d.map(({item:b,index:k,isActive:C,isTabDisabled:_,tabId:w,panelId:y})=>e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(o,C,_)((V,g,I)=>Br(V??"md",g??!1,I??!1))),e.attr.id(w),e.attr.role("tab"),e.attr.tabindex(e.computedOf(C,p)((V,g)=>V||g===k?0:-1)),e.aria.selected(C),e.aria.controls(y),e.aria.disabled(_),e.attr.disabled(_),e.dataAttr["tab-index"](String(k)),e.aria.label(b.ariaLabel),e.on.click(V=>{V.preventDefault(),e.Value.get(b.disabled??!1)||e.Value.get(i)||(r?.(b.key),p.set(k))}),e.on.focus(()=>{p.set(k)}),b.label))),e.When(l??!0,()=>e.html.div(e.attr.class("bc-tabs__panels"),...d.map(({item:b,isActive:k,tabId:C,panelId:_})=>e.When(k,()=>e.html.div(e.attr.class("bc-tabs__panel"),e.attr.id(_),e.attr.role("tabpanel"),e.attr.tabindex(0),e.aria.labelledby(C),b.content()))))))}function na(t,a,n,r,o,c,s){const i=t.map(d=>d.children!=null&&d.children.length>0),u=e.computedOf(r,t)((d,v)=>d.has(v.id)),l=e.computedOf(n,t)((d,v)=>d===v.id),h=t.map(d=>d.children??[]),m=()=>{o?.(e.Value.get(t).id)},p=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(l,s)((d,v)=>["bc-tree-item__row",`bc-tree-item__row--size-${v??"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(l),e.WithElement(d=>{const v=e.computedOf(i,u)((b,k)=>b?String(k):null);e.Value.on(v,b=>{b!=null?d.setAttribute("aria-expanded",b):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(p),f.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"),f.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(Le({open:u},e.html.div(e.attr.class("bc-tree-item__children"),e.attr.role("group"),e.ForEach(h,d=>na(d,a+1,n,r,o,c,s))))),()=>e.Empty))}function Pr({items:t,selectedId:a,onSelect:n,expandedIds:r,onToggle:o,size:c="md"},...s){const i=e.prop(new Set),u=r??i,l=a??e.prop(void 0),h=m=>{const p=e.Value.get(u),d=!p.has(m);if(r==null){const v=new Set(p);d?v.add(m):v.delete(m),i.set(v)}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=>na(m,0,l,u,n,h,c)),...s)}function Ar(t){return te.Overlay((a,n)=>{let r=n;const o=()=>r();return t(i=>{const{size:u="md",side:l="right",dismissable:h=!0,showCloseButton:m=!0,onClose:p,overlayEffect:d="opaque",container:v="body",header:b,body:k,footer:C}=i;r=n;const _=e.prop("capturing");e.Value.on(h,V=>{_.set(V?"capturing":"non-capturing")});const w=e.computedOf(b!=null,m)((V,g)=>V||g),y=e.WithElement(V=>{const g=le.useAnimatedElementToggle({initialStatus:"closed",element:V});g.listenOnClosed(()=>{n()}),r=()=>{g.close()},Pe.g(()=>g.open());const B=oe.sessionId("drawer"),N=b!=null?`${B}-header`:void 0,O=`${B}-body`;return e.html.div(e.attr.class(e.computedOf(u,l,g.status)((E,z,K)=>`bc-drawer bc-drawer--size-${E} bc-drawer--container-${v} bc-drawer--side-${z} bc-drawer--status-${K}`)),e.attr.role("dialog"),e.aria.modal(!0),...N?[e.aria.labelledby(N)]:[],e.aria.describedby(O),e.attr.tabindex(-1),e.attr.id(B),e.dataAttr.focusTrap("true"),te.FocusTrap({active:!0,escapeDeactivates:!1,initialFocus:()=>document.querySelector(`#${B} [aria-label="Close drawer"]`)||null}),e.on.mousedown(E=>E.stopPropagation()),e.When(w,()=>Ye({header:e.html.div(e.attr.class("bc-drawer__header"),e.html.div(e.attr.id(N),b),e.When(m,()=>e.Use(f.BeatUII18n,E=>W.CloseButton({size:"sm",onClick:o,label:E.$.closeDrawer})))),body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(O),k),footer:C&&e.html.div(e.attr.class("bc-drawer__footer"),C)}),()=>Ye({body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(O),k),footer:C&&e.html.div(e.attr.class("bc-drawer__footer"),C)})))});a({mode:_,effect:d??"opaque",container:v,content:y,onClickOutside:()=>{p?.(),o()},onEscape:()=>{p?.(),o()}})},()=>{o()})})}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 Mr(t){const{content:a,placement:n="top",showDelay:r=250,hideDelay:o=500,mainAxisOffset:c=8,crossAxisOffset:s=0,showOn:i="hover-focus"}=t,u=oe.sessionId("tooltip");return e.Fragment(e.aria.describedby(u),ie.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:s,showOn:i,closable:!0,role:"tooltip",arrow:l=>{const h=l.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(h.map(m=>`bc-tooltip__arrow-${m}`)),e.style.transform(l.map(({x:m,y:p})=>m==null&&p==null?"":m!=null?`translate(${m}px, 0)`:`translate(0, ${p}px)`)),Lr(h))}}))}function Nr(t){const{content:a,placement:n="bottom",showDelay:r=0,hideDelay:o=0,mainAxisOffset:c=8,crossAxisOffset:s=0,showOn:i="click",closable:u=!0,role:l="dialog",hasPopup:h="dialog"}=t,m=oe.sessionId("popover"),p=typeof a=="function"?a:()=>a;return e.Fragment(e.aria.describedby(m),ie.Flyout({content:()=>e.Fragment(e.attr.class("bc-popover"),e.attr.role(l),e.attr.id(m),p()),placement:n,showDelay:r,hideDelay:o,mainAxisOffset:c,crossAxisOffset:s,showOn:i,closable:u,role:l,hasPopup:h}))}function Fr(t,a,n,r,o,c){const s=f.backgroundValue(t,"solid","light"),i=f.backgroundValue(t,"solid","dark");return[`--ribbon-bg: ${s.backgroundColor}`,`--ribbon-text: ${s.textColor}`,`--ribbon-bg-dark: ${i.backgroundColor}`,`--ribbon-text-dark: ${i.textColor}`,`--ribbon-inset: ${ze(a)}`,`--ribbon-offset: ${ze(n)}`,`--ribbon-width: ${ze(r)}`,`--ribbon-angle: ${o}deg`,`--ribbon-corner: ${c}`].join("; ")}function ze(t){return t==null?null:typeof t=="number"?`${t}px`:t}function Wr({color:t="primary",class:a,inset:n=0,offset:r=40,width:o=100,angle:c=45,corner:s="top-end"},...i){return e.html.div(e.attr.class("bc-ribbon"),e.attr.style(e.computedOf(t,n,r,o,c,s)(Fr)),e.attr.class(a),...i)}function Ur(t,a){const{dismissable:n=!0,showCloseButton:r=!0,overlayEffect:o="opaque",container:c="body",padding:s=32}=t;return te.Overlay((i,u)=>{let l=()=>{};return a(p=>{l=u;const d=e.prop(typeof n!="boolean"||n?"capturing":"non-capturing");let v=typeof n=="boolean"?n:!0;e.Value.on(n,k=>{v=k,d.set(k?"capturing":"non-capturing")});const b=e.html.div(e.attr.class("bc-lightbox"),e.When(r,()=>e.Use(f.BeatUII18n,k=>e.html.div(e.attr.class("bc-lightbox__close"),W.CloseButton({size:"md",label:k.$.closeModal,onClick:()=>{l(),u()}}))),()=>null),e.html.div(e.attr.class("bc-lightbox__viewport"),e.attr.style(e.computedOf(s)(k=>`padding:${typeof k=="number"?k+"px":k}`)),e.html.div(e.attr.class("bc-lightbox__content"),p)));i({mode:d,effect:o??"opaque",container:c,content:b,onClickOutside:()=>{v&&(l(),u())},onEscape:()=>{v&&(l(),u())}})},()=>{l(),u()})})}function Rr(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 zr(t){return`--announcement-bar-bg-color: ${Z.getColorVar(t,600)}`}function jr({color:t="primary",icon:a,closable:n=!1,onDismiss:r,class:o},...c){const s=e.prop(!0);return e.When(s,()=>{const i=e.Value.map(n,u=>!!u||r!=null);return e.html.div(e.attr.class(e.computedOf(i,o)((u,l)=>Rr(u,l))),e.attr.style(e.Value.map(t,u=>zr(u))),e.html.div(e.attr.class("bc-announcement-bar__content"),e.When(e.Value.map(a,u=>u!=null),()=>e.html.div(e.attr.class("bc-announcement-bar__icon"),f.Icon({icon:a,size:"sm",accessibility:"decorative"}))),e.html.div(e.attr.class("bc-announcement-bar__text"),...c),e.When(i,()=>e.html.div(e.attr.class("bc-announcement-bar__close"),W.CloseButton({size:"xs",color:"white",onClick:()=>{s.set(!1),r?.()}})))))})}function Hr(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 s=0;for(const[i,u]of o)for(let l=0;l<u.length;l++)c.push({item:u[l],globalIndex:s++,sectionStart:l===0&&i?i:void 0});return c}function qr(t,a){const{placeholder:n,emptyMessage:r,size:o="md",container:c="body"}=t;return e.Use(f.BeatUII18n,s=>te.Overlay((i,u)=>{const l=n??s.$.typeACommand,h=r??s.$.noResultsFound;return a(p=>{const d=e.prop(""),v=e.prop(0);d.on(()=>v.set(0));const k=`${oe.sessionId("command-palette")}-input`,C=d.map(y=>Hr(p,y??"")),_=C.map(y=>y.length===0),w=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()),te.FocusTrap({escapeDeactivates:!1,initialFocus:()=>document.getElementById(k)}),e.html.div(e.attr.class("bc-command-palette__header"),e.html.span(e.attr.class("bc-command-palette__search-icon"),f.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(k),e.attr.placeholder(l),e.attr.autocomplete("off"),e.on.input(y=>{d.set(y.target.value)}),e.on.keydown(y=>{const V=e.Value.get(C),g=e.Value.get(v);switch(y.key){case"ArrowDown":y.preventDefault(),v.set(Math.min(g+1,V.length-1));break;case"ArrowUp":y.preventDefault(),v.set(Math.max(g-1,0));break;case"Enter":y.preventDefault();{const I=V.find(B=>B.globalIndex===g);I&&(I.item.onSelect(),u())}break}}))),e.html.div(e.attr.class("bc-command-palette__body"),e.When(_,()=>e.html.div(e.attr.class("bc-command-palette__empty"),h),()=>e.ForEach(C,y=>{const V=e.computedOf(v,y)((g,I)=>g===I.globalIndex);return e.html.div(e.attr.class("bc-command-palette__section"),e.When(y.map(g=>g.sectionStart!=null),()=>e.html.div(e.attr.class("bc-command-palette__section-title"),y.map(g=>g.sectionStart??""))),e.html.div(e.attr.class(e.Value.map(V,g=>`bc-command-palette__item${g?" 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(()=>{v.set(e.Value.get(y).globalIndex)}),e.When(y.map(g=>g.item.icon!=null),()=>e.html.span(e.attr.class("bc-command-palette__item-icon"),f.Icon({icon:y.map(g=>g.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(g=>g.item.label)),e.When(y.map(g=>g.item.description!=null),()=>e.html.span(e.attr.class("bc-command-palette__item-description"),y.map(g=>g.item.description??"")))),e.When(y.map(g=>g.item.shortcut!=null&&g.item.shortcut.length>0),()=>e.html.span(e.attr.class("bc-command-palette__item-shortcut"),e.ForEach(y.map(g=>g.item.shortcut??[]),g=>e.html.kbd(e.attr.class("bc-kbd bc-kbd--size-xs"),g))))))}))));i({mode:"capturing",effect:"transparent",container:c,content:w,onClickOutside:u,onEscape:u})},u)}))}function Gr(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 Yr(t){const{items:a,onClose:n,position:r}=t,o=e.prop(""),c=e.prop(0);o.on(()=>c.set(0));const s=e.computedOf(a,o)((l,h)=>Gr(l,h??"")),i=l=>{const h=e.Value.get(s),m=e.Value.get(c);switch(l.key){case"ArrowDown":l.preventDefault(),c.set(Math.min(m+1,h.length-1));break;case"ArrowUp":l.preventDefault(),c.set(Math.max(m-1,0));break;case"Enter":l.preventDefault();{const p=h.find(d=>d.index===m);p&&(p.item.onSelect(),n())}break;case"Escape":l.preventDefault(),n();break}},u=r?e.computedOf(r)(l=>l?`position: absolute; left: ${l.x}px; top: ${l.y}px;`:""):void 0;return e.Use(f.BeatUII18n,l=>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(l.$.typeACommand),e.attr.autofocus(!0),e.attr.value(o),e.on.input(h=>{o.set(h.target.value),c.set(0)}))),e.html.div(e.attr.class("bc-block-command-palette__list"),e.ForEach(s,h=>{const m=e.computedOf(c,h)((p,d)=>p===d.index);return e.html.div(e.attr.class(e.Value.map(m,p=>`bc-block-command-palette__item${p?" bc-block-command-palette__item--selected":""}`)),e.on.click(()=>{e.Value.get(h).item.onSelect(),n()}),e.on.mouseenter(()=>{c.set(e.Value.get(h).index)}),e.html.span(e.attr.class("bc-block-command-palette__item-icon"),f.Icon({icon:h.map(p=>p.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"),h.map(p=>p.item.label)),e.When(h.map(p=>p.item.description!=null),()=>e.html.span(e.attr.class("bc-block-command-palette__item-desc"),h.map(p=>p.item.description??"")))),e.When(h.map(p=>p.item.shortcut!=null),()=>e.html.span(e.attr.class("bc-block-command-palette__item-shortcut"),h.map(p=>p.item.shortcut??""))))})),e.When(e.computedOf(s)(h=>h.length===0),()=>e.html.div(e.attr.class("bc-block-command-palette__empty"),l.$.noMatchingCommands))))}function Zr(t,a){const{title:n,body:r,icon:o="lucide:alert-triangle",color:c="danger",consequences:s,confirmText:i,cancelText:u,onConfirm:l,onCancel:h,dismissable:m=!0}=t,p={size:"sm",showCloseButton:!1,dismissable:m,onClose:h};return e.Use(f.BeatUII18n,d=>te.Modal(p,(v,b)=>{const k=()=>{l?.(),b()},C=()=>{h?.(),b()};return a(()=>{v({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,w=>Z.getColorVar(w,100))),e.style.color(e.Value.map(c,w=>Z.getColorVar(w,600))),f.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),s&&s.length>0?e.html.ul(e.attr.class("bc-dialog__consequences"),...s.map(w=>e.html.li(w))):e.Empty),footer:e.Fragment(e.attr.class("bc-dialog__actions"),G.Button({variant:"light",size:"sm",onClick:C},e.coalesce(u,d.$.cancel)),G.Button({color:c,variant:"filled",size:"sm",onClick:k},e.coalesce(i,d.$.confirm)))})},b)}))}const Jr={info:{icon:"lucide:info",color:"info"},success:{icon:"lucide:check-circle",color:"success"},warning:{icon:"lucide:alert-triangle",color:"warning"},error:{icon:"lucide:alert-circle",color:"danger"}};function Xr(t,a){const{title:n,body:r,variant:o="info",icon:c,okText:s,onOk:i,dismissable:u=!0}=t,l=Jr[o],h=c??l.icon,m=l.color,p={size:"sm",showCloseButton:!1,dismissable:u,onClose:i};return e.Use(f.BeatUII18n,d=>te.Modal(p,(v,b)=>{const k=()=>{i?.(),b()};return a(()=>{v({header:e.html.div(e.attr.class("bc-dialog__header-row"),e.html.div(e.attr.class("bc-dialog__icon"),e.style.backgroundColor(Z.getColorVar(m,100)),e.style.color(Z.getColorVar(m,600)),f.Icon({icon:h,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"),G.Button({color:m,variant:"filled",size:"sm",onClick:k},e.coalesce(s,d.$.ok)))})},b)}))}function Kr(t,a){const{title:n,body:r,placeholder:o,defaultValue:c="",confirmText:s,cancelText:i,onConfirm:u,onCancel:l,dismissable:h=!0}=t,m={size:"sm",showCloseButton:!1,dismissable:h,onClose:l};return e.Use(f.BeatUII18n,p=>te.Modal(m,(d,v)=>{const b=e.prop(c),k=()=>{u?.(b.value),v()},C=()=>{l?.(),v()};return a(()=>{b.set(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(b),e.attr.placeholder(o??""),e.on.input(e.emitValue(w=>b.set(w))),e.on.keydown(w=>{w.key==="Enter"&&(w.preventDefault(),k())}))),footer:e.Fragment(e.attr.class("bc-dialog__actions"),G.Button({variant:"light",size:"sm",onClick:C},e.coalesce(i,p.$.cancel)),G.Button({color:"primary",variant:"filled",size:"sm",onClick:k},e.coalesce(s,p.$.confirm)))})},v)}))}function Qr(t){return`bc-kbd bc-kbd--size-${t}`}function eo({size:t="sm"}={},...a){return e.html.kbd(e.attr.class(e.Value.map(t,n=>Qr(n??"sm"))),...a)}function to(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\//i.test(t)}let Be=null;function ao(){return typeof window<"u"&&window.YT?.Player?Promise.resolve(window.YT):Be||(Be=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)}),Be)}function no(t){const{url:a,playing:n=!1,loop:r=!1,controls:o=!1,volume:c=1,muted:s=!1,playbackRate:i=1,pip:u=!1,playsinline:l=!0,width:h,height:m,progressInterval:p=1e3,seekTo:d,config:v,onReady:b,onStart:k,onPlay:C,onPause:_,onBuffer:w,onBufferEnd:y,onEnded:V,onError:g,onDuration:I,onSeek:B,onProgress:N,onPlaybackRateChange:O,onPlaybackQualityChange:E}=t;function z(S){return/\.m3u8(\?|$)/i.test(S)}function K(S){try{const P=S.canPlayType("application/vnd.apple.mpegurl");return P==="probably"||P==="maybe"}catch{return!1}}const L=e.prop("file");let D=null,M=null,U=null;function j(){try{U?.destroy()}catch{}U=null}const H=[];H.push(e.Value.on(a,S=>{typeof S=="string"&&S.length>0&&to(S)?L.value="youtube":(L.value="file",D&&Q())}));async function Q(){const S=D;if(!S)return;const P=e.Value.get(a);if(typeof P!="string"||P.length===0)return;j();const R=v?.file?.forceHLS??!1;if(z(P)||R){if(K(S)){S.setAttribute("src",P);try{S.load()}catch{}return}if(typeof window>"u")return;try{const J=await Promise.resolve().then(()=>require("./hls.light.min-C6xKDzRR.cjs")).then(fe=>fe.hls_light_min),xe=J;let Ce=xe.default??xe.Hls??J;for(let fe=0;fe<3&&(typeof Ce=="object"&&Ce!=null&&"default"in Ce);fe++)Ce=Ce.default;if(typeof Ce=="function"){const fe=Ce;if(typeof fe.isSupported=="function"&&fe.isSupported()){S.removeAttribute("src");try{S.load()}catch{}const Fe=new fe(v?.hls);U=Fe,Fe.attachMedia(S),Fe.loadSource(P)}else{S.setAttribute("src",P);try{S.load()}catch{}}}else{S.setAttribute("src",P);try{S.load()}catch{}}}catch(J){g?.(J),S.setAttribute("src",P);try{S.load()}catch{}}return}S.setAttribute("src",P);try{S.load()}catch{}}function ee(){M?.();const S=e.Value.get(p)??1e3;M=Pe.T(()=>{const P=D;if(!P)return;const R=P.duration||0,J=P.currentTime||0,xe=P.buffered?.length?P.buffered.end(P.buffered.length-1):0;N?.({played:R>0?J/R:0,playedSeconds:J,loaded:R>0?Math.min(xe,R)/R:0,loadedSeconds:Math.min(xe,R)})},S)}function re(S){if(S!=null)return typeof S=="number"?`${S}px`:S}const ge=e.html.video(e.WithElement(S=>{D=S,b?.();try{D.playbackRate=e.Value.get(i)??1}catch{}D.muted=!!(e.Value.get(s)??!1),D.loop=!!(e.Value.get(r)??!1),D.controls=!!(e.Value.get(o)??!1),D.playsInline!=null&&(!!(e.Value.get(l)??!0)?D.setAttribute("playsinline",""):D.removeAttribute("playsinline")),e.Value.get(n)&&(D.play?.().catch(()=>{}),k?.());try{const P=!!(e.Value.get(u)??!1),R=document,J=D;P?typeof J.requestPictureInPicture=="function"&&R.pictureInPictureElement!==D&&J.requestPictureInPicture().catch(()=>{}):R.pictureInPictureElement===D&&typeof R.exitPictureInPicture=="function"&&R.exitPictureInPicture().catch(()=>{})}catch{}ee(),Q()}),e.style.width(e.Value.map(h,re)),e.style.height(e.Value.map(m,re)),e.on.play(()=>C?.()),e.on.playing(()=>{k?.(),y?.()}),e.on.pause(()=>_?.()),e.on.waiting(()=>w?.()),e.on.canplay(()=>{const S=D?.duration;S!=null&&Number.isFinite(S)&&I?.(S)}),e.on.ended(()=>V?.()),e.on.error(S=>{U||g?.(S)}));let we=null,q=null,ve=null;function ke(){const S=e.Value.get(a);!we||typeof S!="string"||ao().then(P=>{const R=ra(S);if(R){if(q){q.loadVideoById({videoId:R});return}q=new P.Player(we,{videoId:R,playerVars:ro(t),events:{onReady:()=>{b?.(),$(),e.Value.get(n)&&k?.(),Ne()},onStateChange:J=>{switch(J.data){case P.PlayerState.PLAYING:C?.(),y?.();break;case P.PlayerState.PAUSED:_?.();break;case P.PlayerState.BUFFERING:w?.();break;case P.PlayerState.ENDED:V?.();break}},onError:J=>g?.(J),onPlaybackRateChange:J=>O?.(J.data),onPlaybackQualityChange:J=>E?.(J.data)}})}})}function Ne(){ve?.();const S=e.Value.get(p)??1e3;ve=Pe.T(()=>{if(!q)return;const P=q.getDuration?.()??0,R=q.getCurrentTime?.()??0,J=q.getVideoLoadedFraction?.()??0;N?.({played:P>0?R/P:0,playedSeconds:R,loaded:J,loadedSeconds:J*P})},S)}function $(){if(!q)return;try{const R=e.Value.get(i)??1;q.setPlaybackRate?.(R)}catch{}try{const R=Math.round(Math.min(Math.max(e.Value.get(c)??1,0),1)*100);q.setVolume?.(R)}catch{}try{e.Value.get(s)??!1?q.mute?.():q.unMute?.()}catch{}e.Value.get(n)??!1?q.playVideo?.():q.pauseVideo?.();const P=e.Value.get(d);typeof P=="number"&&Number.isFinite(P)&&(q.seekTo?.(P,!0),B?.(P))}const F=e.html.div(e.WithElement(S=>{we=S,ke(),b?.()}));H.push(e.Value.on(a,()=>{L.value==="youtube"&&ke()})),H.push(e.Value.on(n,()=>{L.value==="file"&&D?e.Value.get(n)?D.play?.().catch(()=>{}):D.pause?.():L.value==="youtube"&&q&&(e.Value.get(n)?q.playVideo?.():q.pauseVideo?.())})),H.push(e.Value.on(c,()=>{if(L.value==="file"&&D)D.volume=Math.min(Math.max(e.Value.get(c)??1,0),1);else if(L.value==="youtube"&&q){const S=Math.round(Math.min(Math.max(e.Value.get(c)??1,0),1)*100);q.setVolume?.(S)}})),H.push(e.Value.on(s,()=>{L.value==="file"&&D?D.muted=!!e.Value.get(s):L.value==="youtube"&&q&&(e.Value.get(s)?q.mute?.():q.unMute?.())})),H.push(e.Value.on(i,()=>{if(L.value==="file"&&D)try{D.playbackRate=e.Value.get(i)??1}catch{}else L.value==="youtube"&&q&&q.setPlaybackRate?.(e.Value.get(i)??1)})),H.push(e.Value.on(u,async()=>{if(!(L.value!=="file"||!D))try{const S=!!(e.Value.get(u)??!1),P=document,R=D;S?typeof R.requestPictureInPicture=="function"&&P.pictureInPictureElement!==D&&await R.requestPictureInPicture()?.catch(()=>{}):P.pictureInPictureElement===D&&typeof P.exitPictureInPicture=="function"&&await P.exitPictureInPicture()?.catch(()=>{})}catch{}})),H.push(e.Value.on(d??null,()=>{const S=e.Value.get(d);if(S!=null)if(L.value==="file"&&D)try{D.currentTime=S,B?.(S)}catch{}else L.value==="youtube"&&q&&(q.seekTo?.(S,!0),B?.(S))}));const X=e.html.div(e.attr.class("bc-base-video"),e.style.width(e.Value.map(h,re)),e.style.height(e.Value.map(m,re)),e.When(e.Value.map(L,S=>S==="youtube"),()=>F,()=>ge));return e.Fragment(e.OnDispose(...H),X)}function ra(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 ro(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"?ra(r):null;return n&&o&&(a.loop=1,a.playlist=o),a}const it="https://cdn.jsdelivr.net/npm/pdfjs-dist@5.4.394/",oo=t=>{if(!t||typeof t!="object")return!1;const a=t;return!!(a.getDocument&&typeof a.getDocument=="function")};function lo(){if(typeof window>"u")return;const a=window.pdfjsLib;a?.GlobalWorkerOptions?.workerSrc||a?.GlobalWorkerOptions&&(a.GlobalWorkerOptions.workerSrc=`${it}build/pdf.worker.min.mjs`)}const so=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)}),io=async()=>{const t=window;if(t.pdfjsLib&&oo(t.pdfjsLib))return t.pdfjsLib;if(await so(`${it}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 je=null,ht=!1;async function co(){if(je)return je;!ht&&typeof window<"u"&&(lo(),ht=!0);const t=await io();return je=t,t.GlobalWorkerOptions&&(t.GlobalWorkerOptions.workerSrc=`${it}build/pdf.worker.min.mjs`),t}function uo(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,s=n&3;for(let i=0;i<c;i++)if(r.getUint32(i*4)!==o.getUint32(i*4))return!1;for(let i=n-s;i<n;i++)if(t[i]!==a[i])return!1;return!0}function po(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 l=0;l<r;l++)if(o[l]!==c[l])return!1;const s=n&3,i=new Uint8Array(t,r*4,s),u=new Uint8Array(a,r*4,s);for(let l=0;l<s;l++)if(i[l]!==u[l])return!1;return!0}function mo(t,a){try{return typeof t=="string"&&typeof a=="string"?t===a:t instanceof Uint8Array&&a instanceof Uint8Array?uo(t,a):t instanceof ArrayBuffer&&a instanceof ArrayBuffer?po(t,a):!1}catch{return!1}}function He(t){return typeof t=="string"?t:t instanceof Uint8Array?t.slice():t instanceof ArrayBuffer?t.slice(0):t}function ho({source:t,page:a=1,fit:n="width",scale:r=1,rotation:o=0,quality:c=2,renderTextLayer:s=!0,renderAnnotationLayer:i=!1,onPageChange:u,onLoadComplete:l},...h){const m=co();let p=He(e.Value.get(t)),d=null,v=e.Value.get(a),b=null;return e.Use(f.BeatUII18n,k=>e.Fragment(e.OnDispose(()=>{if(b){try{b.cancel()}catch{}b=null}d!=null&&(d.destroy(),d=null)}),ae.ElementRect(C=>{const _=e.delaySignal(C.map(w=>w==null?null:{width:w.width,height:w.height},(w,y)=>w!=null&&y!=null&&w.width===y.width&&w.height===y.height),100);return e.Ensure(_,w=>ae.Query({request:e.computedOf(t,a,n,r,o,c,s,i,w)((y,V,g,I,B,N,O,E,z)=>({source:y,page:V,fit:g,scale:I,rotation:B,quality:N,renderTextLayer:O,renderAnnotationLayer:E,containerWidth:z.width,containerHeight:z.height})),load:async({request:y})=>{const V=await m,g=y.source,I=He(g),B=He(g);(d==null||!mo(p,I))&&(d!=null&&(d.destroy(),d=null),p=I,d=await V.getDocument(B).promise,l?.({pdfDoc:d}));const N=y.page<1||y.page>d.numPages?1:y.page;u!=null&&N!==v&&(v=N,u(N));const O=await d.getPage(N);let E;if(y.fit==="none")E=y.scale;else{const L=O.getViewport({scale:1,rotation:y.rotation}),D=L.width/L.height,M=y.containerWidth/y.containerHeight;switch(y.fit){case"width":E=y.containerWidth/L.width;break;case"height":E=y.containerHeight/L.height;break;case"contain":E=Math.min(y.containerWidth/L.width,y.containerHeight/L.height);break;case"cover":D>M?E=y.containerHeight/L.height:E=y.containerWidth/L.width;break}}const z=O.getViewport({scale:E,rotation:y.rotation}),K=O.getViewport({scale:E*y.quality,rotation:y.rotation});return{pdfWidth:z.width,pdfHeight:z.height,canvasWidth:Math.floor(z.width),canvasHeight:Math.floor(z.height),highResWidth:Math.floor(K.width),highResHeight:Math.floor(K.height),render:async(L,D,M)=>{if(b)try{b.cancel(),await b.promise.catch(()=>{})}catch{}L.width=K.width,L.height=K.height,L.style.width=`${z.width}px`,L.style.height=`${z.height}px`;const U=L.getContext("2d");if(!U)throw new Error("Failed to get canvas context");const j=O.render({canvasContext:U,canvas:L,viewport:K});b=j;try{await j.promise}catch(H){if((H instanceof Error?H.name:H?.name)!=="RenderingCancelledException")throw H;return}finally{b===j&&(b=null)}if(y.renderTextLayer&&D!=null){D.innerHTML="";try{const H=await O.getTextContent(),Q=V.TextLayer;Q!=null&&await new Q({textContentSource:H,container:D,viewport:z}).render()}catch(H){console.warn("Failed to render text layer:",H)}}if(y.renderAnnotationLayer&&M!=null){M.innerHTML="",M.style.width=`${z.width}px`,M.style.height=`${z.height}px`;try{const H=await O.getAnnotations(),Q=V.AnnotationLayer;if(Q!=null&&H.length>0){const ee={getDestinationHash:()=>"",getAnchorUrl:ge=>ge,executeNamedAction:()=>{},executeSetOCGState:()=>{},cachePageRef:()=>{}};await new Q({div:M,page:O,viewport:z,linkService:ee,annotationStorage:null}).render({viewport:z,div:M,annotations:H,page:O,linkService:ee,renderForms:!0})}}catch(H){console.warn("Failed to render annotation layer:",H)}}}}},convertError:y=>y instanceof Error?y.message:JSON.stringify(y),pending:()=>e.html.div(e.attr.class("bc-pdf-page-viewer__loading"),f.Icon({icon:"line-md:loading-twotone-loop",size:"lg"}),e.html.span(e.attr.class("bc-pdf-page-viewer__loading-text"),k.map(y=>y.pdfPageViewer.loading))),failure:({error:y})=>e.html.div(e.attr.class("bc-pdf-page-viewer__error"),f.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=>V==="none"?"bc-pdf-page-viewer":`bc-pdf-page-viewer bc-pdf-page-viewer--fit-${V}`)),e.html.div(e.attr.class("bc-pdf-page-viewer__content"),e.When(e.Value.map(n,V=>V==="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)),...h),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 g=V.querySelector(".bc-pdf-page-viewer__canvas"),I=V.querySelector(".bc-pdf-page-viewer__text-layer"),B=V.querySelector(".bc-pdf-page-viewer__annotation-layer");return e.Value.on(y,async N=>{await N.render(g,I,B)}),e.Empty}))}))})))}Object.defineProperty(exports,"Use",{enumerable:!0,get:()=>e.Use});exports.BeatUII18n=f.BeatUII18n;exports.Icon=f.Icon;exports.LOGICAL_PROPERTY_MAP=f.LOGICAL_PROPERTY_MAP;exports.Locale=f.Locale;exports.defaultLocale=f.defaultLocale;exports.defaultMessages=f.defaultMessages;exports.formatFileSize=f.formatFileSize;exports.getDirectionClassName=f.getDirectionClassName;exports.getDirectionFromLocale=f.getDirectionFromLocale;exports.getIconLocally=f.getIconLocally;exports.getOppositeDirection=f.getOppositeDirection;exports.getPhysicalProperty=f.getPhysicalProperty;exports.isIndexedDBAvailable=f.isIndexedDBAvailable;exports.isRTLLocale=f.isRTLLocale;exports.makeI18nProvider=f.makeI18nProvider;exports.makeMessages=f.makeMessages;exports.resolveDirection=f.resolveDirection;exports.storeIconLocally=f.storeIconLocally;exports.backgroundConfig=Z.backgroundConfig;exports.bgColors=Z.bgColors;exports.borderColors=Z.borderColors;exports.colorShades=Z.colorShades;exports.colors=Z.colors;exports.generateColorVariables=Z.generateColorVariables;exports.generateCoreColorVariables=Z.generateCoreColorVariables;exports.generateSemanticColorVariables=Z.generateSemanticColorVariables;exports.getColorVar=Z.getColorVar;exports.getColorVarName=Z.getColorVarName;exports.interactiveColors=Z.interactiveColors;exports.normalizeColorName=Z.normalizeColorName;exports.resolveSemanticColorMap=Z.resolveSemanticColorMap;exports.semanticColorNames=Z.semanticColorNames;exports.semanticColors=Z.semanticColors;exports.textColors=Z.textColors;exports.themeColorNames=Z.themeColorNames;exports.baseFontSize=x.baseFontSize;exports.baseMotionDuration=x.baseMotionDuration;exports.baseSpacing=x.baseSpacing;exports.borderWidth=x.borderWidth;exports.breakpoints=x.breakpoints;exports.changeFontSize=x.changeFontSize;exports.controlGap=x.controlGap;exports.controlHeight=x.controlHeight;exports.controlPaddingBlock=x.controlPaddingBlock;exports.controlPaddingInline=x.controlPaddingInline;exports.fontFamily=x.fontFamily;exports.fontSize=x.fontSize;exports.fontWeight=x.fontWeight;exports.generateAllTokenVariables=x.generateAllTokenVariables;exports.generateBorderWidthVariables=x.generateBorderWidthVariables;exports.generateBreakpointVariables=x.generateBreakpointVariables;exports.generateControlGapVariables=x.generateControlGapVariables;exports.generateControlHeightVariables=x.generateControlHeightVariables;exports.generateControlPaddingVariables=x.generateControlPaddingVariables;exports.generateControlTokenVariables=x.generateControlTokenVariables;exports.generateCoreTokenVariables=x.generateCoreTokenVariables;exports.generateFontFamilyOverrideVariables=x.generateFontFamilyOverrideVariables;exports.generateMotionVariables=x.generateMotionVariables;exports.generateOutlineWidthVariables=x.generateOutlineWidthVariables;exports.generateOverlayWidthVariables=x.generateOverlayWidthVariables;exports.generateRadiusVariables=x.generateRadiusVariables;exports.generateSemanticFontVariables=x.generateSemanticFontVariables;exports.generateSemanticMotionVariables=x.generateSemanticMotionVariables;exports.generateSemanticRadiusVariables=x.generateSemanticRadiusVariables;exports.generateSemanticShadowVariables=x.generateSemanticShadowVariables;exports.generateSemanticSpacingVariables=x.generateSemanticSpacingVariables;exports.generateSemanticTextShadowVariables=x.generateSemanticTextShadowVariables;exports.generateSemanticTokenVariables=x.generateSemanticTokenVariables;exports.generateShadowVariables=x.generateShadowVariables;exports.generateSpacingVariables=x.generateSpacingVariables;exports.generateTextShadowVariables=x.generateTextShadowVariables;exports.generateTypographyVariables=x.generateTypographyVariables;exports.generateZIndexVariables=x.generateZIndexVariables;exports.getBaseFontSizeVar=x.getBaseFontSizeVar;exports.getBaseFontSizeVarName=x.getBaseFontSizeVarName;exports.getBaseMotionDurationVar=x.getBaseMotionDurationVar;exports.getBaseMotionDurationVarName=x.getBaseMotionDurationVarName;exports.getBorderWidthVar=x.getBorderWidthVar;exports.getBorderWidthVarName=x.getBorderWidthVarName;exports.getBreakpointMediaQuery=x.getBreakpointMediaQuery;exports.getBreakpointVar=x.getBreakpointVar;exports.getBreakpointVarName=x.getBreakpointVarName;exports.getControlGapVar=x.getControlGapVar;exports.getControlGapVarName=x.getControlGapVarName;exports.getControlHeightVar=x.getControlHeightVar;exports.getControlHeightVarName=x.getControlHeightVarName;exports.getControlPaddingBlockVar=x.getControlPaddingBlockVar;exports.getControlPaddingBlockVarName=x.getControlPaddingBlockVarName;exports.getControlPaddingInlineVar=x.getControlPaddingInlineVar;exports.getControlPaddingInlineVarName=x.getControlPaddingInlineVarName;exports.getFontFamilyVar=x.getFontFamilyVar;exports.getFontFamilyVarName=x.getFontFamilyVarName;exports.getFontSizeLineHeightVar=x.getFontSizeLineHeightVar;exports.getFontSizeLineHeightVarName=x.getFontSizeLineHeightVarName;exports.getFontSizeVar=x.getFontSizeVar;exports.getFontSizeVarName=x.getFontSizeVarName;exports.getFontWeightVar=x.getFontWeightVar;exports.getFontWeightVarName=x.getFontWeightVarName;exports.getLetterSpacingVar=x.getLetterSpacingVar;exports.getLetterSpacingVarName=x.getLetterSpacingVarName;exports.getLineHeightVar=x.getLineHeightVar;exports.getLineHeightVarName=x.getLineHeightVarName;exports.getMotionDurationVar=x.getMotionDurationVar;exports.getMotionDurationVarName=x.getMotionDurationVarName;exports.getMotionEasingVar=x.getMotionEasingVar;exports.getMotionEasingVarName=x.getMotionEasingVarName;exports.getOutlineWidthVar=x.getOutlineWidthVar;exports.getOutlineWidthVarName=x.getOutlineWidthVarName;exports.getOverlayWidthVar=x.getOverlayWidthVar;exports.getOverlayWidthVarName=x.getOverlayWidthVarName;exports.getRadiusMediaQuery=x.getRadiusMediaQuery;exports.getRadiusVar=x.getRadiusVar;exports.getRadiusVarName=x.getRadiusVarName;exports.getSemanticFontVar=x.getSemanticFontVar;exports.getSemanticFontVarName=x.getSemanticFontVarName;exports.getSemanticMotionVarName=x.getSemanticMotionVarName;exports.getSemanticRadiusVarName=x.getSemanticRadiusVarName;exports.getSemanticShadowVarName=x.getSemanticShadowVarName;exports.getSemanticSpacingVarName=x.getSemanticSpacingVarName;exports.getSemanticTextShadowVarName=x.getSemanticTextShadowVarName;exports.getShadowVar=x.getShadowVar;exports.getShadowVarName=x.getShadowVarName;exports.getSpacingVar=x.getSpacingVar;exports.getSpacingVarName=x.getSpacingVarName;exports.getTextShadowVar=x.getTextShadowVar;exports.getTextShadowVarName=x.getTextShadowVarName;exports.getTokenValue=x.getTokenValue;exports.getZIndexVar=x.getZIndexVar;exports.getZIndexVarName=x.getZIndexVarName;exports.letterSpacing=x.letterSpacing;exports.lineHeight=x.lineHeight;exports.motionDurations=x.motionDurations;exports.motionEasings=x.motionEasings;exports.outlineWidth=x.outlineWidth;exports.overlayWidth=x.overlayWidth;exports.radius=x.radius;exports.semanticFontNames=x.semanticFontNames;exports.semanticMotionNames=x.semanticMotionNames;exports.semanticRadiusNames=x.semanticRadiusNames;exports.semanticShadowNames=x.semanticShadowNames;exports.semanticSpacingNames=x.semanticSpacingNames;exports.semanticTextShadowNames=x.semanticTextShadowNames;exports.shadows=x.shadows;exports.spacing=x.spacing;exports.textShadows=x.textShadows;exports.zIndex=x.zIndex;exports.ArrayController=W.ArrayController;exports.BaseControl=W.BaseControl;exports.BaseMappedControl=W.BaseMappedControl;exports.CheckboxInput=W.CheckboxInput;exports.CloseButton=W.CloseButton;exports.Control=W.Control;exports.Controller=W.Controller;exports.ControllerValidation=W.ControllerValidation;exports.InputWrapper=W.InputWrapper;exports.MappedControl=W.MappedControl;exports.ObjectController=W.ObjectController;exports.RequiredSymbol=W.RequiredSymbol;exports.connectCommonAttributes=W.connectCommonAttributes;exports.connectNumberInput=W.connectNumberInput;exports.connectStringInput=W.connectStringInput;exports.convertStandardSchemaIssues=W.convertStandardSchemaIssues;exports.convertStandardSchemaPathToPath=W.convertStandardSchemaPathToPath;exports.makeMapValidation=W.makeMapValidation;exports.makeOnBlurHandler=W.makeOnBlurHandler;exports.makeOnChangeHandler=W.makeOnChangeHandler;exports.parsePath=W.parsePath;exports.pathToString=W.pathToString;exports.standardSchemaResultToValidation=W.standardSchemaResultToValidation;exports.taskToValidation=W.taskToValidation;exports.useController=W.useController;exports.useForm=W.useForm;exports.wrapSegment=W.wrapSegment;exports.AnimatedToggle=le.AnimatedToggle;exports.AnimatedToggleClass=le.AnimatedToggleClass;exports.useAnimatedElementToggle=le.useAnimatedElementToggle;exports.useAnimatedToggle=le.useAnimatedToggle;exports.useTimedToggle=le.useTimedToggle;exports.Theme=Se.Theme;exports.ThemeAppearance=Se.ThemeAppearance;exports.beatuiPreset=bt.beatuiPreset;exports.createBeatuiPreset=bt.createBeatuiPreset;exports.Base64Input=T.Base64Input;exports.Base64sInput=T.Base64sInput;exports.ColorSwatchInput=T.ColorSwatchInput;exports.EditableText=T.EditableText;exports.NullableDateInput=T.NullableDateInput;exports.NullableDateTimeInput=T.NullableDateTimeInput;exports.NullableEmailInput=T.NullableEmailInput;exports.NullablePasswordInput=T.NullablePasswordInput;exports.NullableRatingInput=T.NullableRatingInput;exports.NullableSliderInput=T.NullableSliderInput;exports.NullableTextArea=T.NullableTextArea;exports.NullableTextInput=T.NullableTextInput;exports.NullableUUIDInput=T.NullableUUIDInput;exports.NullableUrlInput=T.NullableUrlInput;exports.RatingInput=T.RatingInput;exports.SliderInput=T.SliderInput;exports.Switch=T.Switch;exports.emptyToNull=T.emptyToNull;exports.fileToBase64=T.fileToBase64;exports.forFormat=T.forFormat;exports.forTypeAndFormat=T.forTypeAndFormat;exports.forXUI=T.forXUI;exports.formatColor=T.formatColor;exports.getContrastRatio=T.getContrastRatio;exports.hexToRgb=T.hexToRgb;exports.hslToRgb=T.hslToRgb;exports.hwbToRgb=T.hwbToRgb;exports.isValidColor=T.isValidColor;exports.isValidHexColor=T.isValidHexColor;exports.isValidHslColor=T.isValidHslColor;exports.isValidRgbColor=T.isValidRgbColor;exports.isValidRgbaColor=T.isValidRgbaColor;exports.linearToSrgb=T.linearToSrgb;exports.mulberry32=T.mulberry32;exports.normalizeHexColor=T.normalizeHexColor;exports.nullToEmpty=T.nullToEmpty;exports.oklchToRgb=T.oklchToRgb;exports.parseAnyColor=T.parseAnyColor;exports.resolveEffectiveFormat=T.resolveEffectiveFormat;exports.rgbToHex=T.rgbToHex;exports.rgbToHsl=T.rgbToHsl;exports.rgbToHwb=T.rgbToHwb;exports.rgbToOklch=T.rgbToOklch;exports.srgbToLinear=T.srgbToLinear;exports.toRgbaString=T.toRgbaString;exports.sessionId=oe.sessionId;exports.BaseListControl=A.BaseListControl;exports.BaseNativeSelectControl=A.BaseNativeSelectControl;exports.Expando=A.Expando;exports.FilesInput=A.FilesInput;exports.Group=A.Group;exports.ListControl=A.ListControl;exports.ListInput=A.ListInput;exports.ListItemControls=A.ListItemControls;exports.MaskInput=A.MaskInput;exports.NativeSelect=A.NativeSelect;exports.NativeSelectControl=A.NativeSelectControl;exports.NullableDurationInput=A.NullableDurationInput;exports.NullableNumberInput=A.NullableNumberInput;exports.NumberInput=A.NumberInput;exports.SegmentedInput=A.SegmentedInput;exports.TextArea=A.TextArea;exports.UUIDInput=A.UUIDInput;exports.UnionController=A.UnionController;exports.UnstyledDropZone=A.UnstyledDropZone;exports.UrlInput=A.UrlInput;exports.WithTemporal=A.WithTemporal;exports.deepMergeDefaults=A.deepMergeDefaults;exports.emitExpando=A.emitExpando;exports.emitOptionExpando=A.emitOptionExpando;exports.ensureTemporal=A.ensureTemporal;exports.transformEmptyStringToUndefined=A.transformEmptyStringToUndefined;exports.transformNullToUndefined=A.transformNullToUndefined;exports.transformUndefinedToNull=A.transformUndefinedToNull;exports.BooleanValidator=te.BooleanValidator;exports.ConfirmModal=te.ConfirmModal;exports.FocusTrap=te.FocusTrap;exports.Modal=te.Modal;exports.ObjectValidator=te.ObjectValidator;exports.Overlay=te.Overlay;exports.StringValidator=te.StringValidator;exports.boolean=te.boolean;exports.createStandardSchema=te.createStandardSchema;exports.object=te.object;exports.string=te.string;exports.useFocusTrap=te.useFocusTrap;exports.Button=G.Button;exports.InputContainer=G.InputContainer;exports.InputIcon=G.InputIcon;exports.generateButtonClasses=G.generateButtonClasses;exports.generateButtonStyles=G.generateButtonStyles;exports.generateInputContainerInputClasses=G.generateInputContainerInputClasses;exports.CommonInputAttributes=ce.CommonInputAttributes;exports.TextInput=ce.TextInput;exports.Flyout=ie.Flyout;exports.Menu=ie.Menu;exports.MenuItem=ie.MenuItem;exports.MenuSeparator=ie.MenuSeparator;exports.BigintInput=se.BigintInput;exports.DurationInput=se.DurationInput;exports.FileInput=se.FileInput;exports.NullableBigintInput=se.NullableBigintInput;exports.NullablePlainDateInput=se.NullablePlainDateInput;exports.NullablePlainDateTimeInput=se.NullablePlainDateTimeInput;exports.NullablePlainTimeInput=se.NullablePlainTimeInput;exports.PlainDateInput=se.PlainDateInput;exports.PlainDateTimeInput=se.PlainDateTimeInput;exports.PlainTimeInput=se.PlainTimeInput;exports.Card=oa.Card;exports.DangerLabel=Ve.DangerLabel;exports.EmphasisLabel=Ve.EmphasisLabel;exports.Label=Ve.Label;exports.MutedLabel=Ve.MutedLabel;exports.Stack=Ve.Stack;exports.EmailInput=Ke.EmailInput;exports.Notice=Ke.Notice;exports.PasswordInput=Ke.PasswordInput;exports.LinkPortal=la.LinkPortal;exports.Toolbar=De.Toolbar;exports.ToolbarButton=De.ToolbarButton;exports.ToolbarDivider=De.ToolbarDivider;exports.ToolbarGroup=De.ToolbarGroup;exports.ToolbarSpacer=De.ToolbarSpacer;exports.Accordion=Ja;exports.ActionCard=Qa;exports.AdvancedSlider=Rn;exports.AlertDialog=Xr;exports.AnnouncementBar=jr;exports.AppShell=dn;exports.AppearanceSelector=Dt;exports.Avatar=ga;exports.AvatarGroup=Sa;exports.AvatarGroupOverflow=Da;exports.Badge=Ae;exports.BaseComboboxControl=Mt;exports.BaseComboboxTagsControl=xn;exports.BaseDropdownControl=Pt;exports.BaseSelectTagsControl=wn;exports.BaseVideoPlayer=no;exports.BeatUI=ur;exports.BlockCommandPalette=Yr;exports.Breadcrumbs=Cr;exports.ButtonLink=xr;exports.Calendar=_a;exports.Center=hn;exports.CenterH=pn;exports.Chips=nt;exports.Collapse=Le;exports.CollapsibleSidebarGroup=Dr;exports.ColorController=zt;exports.ColorInput=$t;exports.ComboboxControl=Cn;exports.ComboboxInput=Lt;exports.ComboboxTagsControl=In;exports.ComboboxTagsInput=ot;exports.CommandPalette=qr;exports.ConfirmationDialog=Zr;exports.DateCalendar=wa;exports.DateInput=Sn;exports.DateRangeCalendar=xa;exports.DateTimeInput=$n;exports.Divider=bn;exports.Drawer=Ar;exports.DropdownBase=at;exports.DropdownControl=kn;exports.DropdownInput=Et;exports.EmptyState=hr;exports.EnsureControl=nr;exports.FormStatus=rr;exports.HistoryTimeline=$a;exports.IconBadge=Ta;exports.InputAdornment=Tn;exports.InstantInput=Yn;exports.Kbd=eo;exports.LazyNativeSelect=On;exports.Lightbox=Ur;exports.Link=Zt;exports.LocaleSelector=sr;exports.NativePdfPreview=dr;exports.NavigationLink=Vr;exports.NineSliceScrollView=fn;exports.Notification=qt;exports.NotificationPanel=yr;exports.NotificationProvider=lt;exports.NotificationService=Gt;exports.NotificationViewport=Yt;exports.NullableColorInput=Ga;exports.NullableColorSwatchInput=Ya;exports.NullableInstantInput=Jn;exports.NullableMaskInput=Bn;exports.NullablePlainMonthDayInput=ar;exports.NullablePlainYearMonthInput=er;exports.NullableZonedDateTimeInput=Kn;exports.OTPInput=qn;exports.OpenGraph=fr;exports.Option=be;exports.PDFJSPreview=pr;exports.PageDropZone=Oa;exports.Pagination=Ir;exports.PdfPageViewer=ho;exports.PlainMonthDayInput=tr;exports.PlainYearMonthInput=Qn;exports.Popover=Nr;exports.PresenceCursor=wt;exports.PresenceHighlight=Ba;exports.PresenceSelectionMark=Ea;exports.ProgressBar=Pa;exports.PromptDialog=Kr;exports.RadioGroup=Nn;exports.RangeCalendar=Va;exports.Ribbon=Wr;exports.ScrollablePanel=Ye;exports.SelectTagsControl=Vn;exports.SelectTagsInput=rt;exports.Sidebar=Sr;exports.SidebarActiveLink=ea;exports.SidebarClickLink=ta;exports.SidebarContext=Kt;exports.SidebarGroup=Xe;exports.SidebarLink=aa;exports.SidebarSeparator=$r;exports.SidebarUrlLink=Qt;exports.Sink=vn;exports.Skeleton=Aa;exports.StandaloneAppearanceSelector=Ha;exports.StylePortal=br;exports.Table=Na;exports.Tabs=Er;exports.Tag=et;exports.TagInput=Pn;exports.TagsInput=An;exports.ToggleButton=St;exports.ToggleButtonGroup=Ra;exports.Tooltip=Mr;exports.TreeView=Pr;exports.WithBeatUIBreakpoint=Ot;exports.WithBeatUIElementBreakpoint=rn;exports.WithBreakpoint=tt;exports.ZonedDateTimeInput=Xn;exports.colorInputOptionsFromController=lr;exports.compareBreakpoint=Tt;exports.createColorController=or;exports.createLocationMatcher=Me;exports.delaySignal=sa;exports.downloadContent=ia;exports.downloadFile=ua;exports.downloadUrl=Qe;exports.downloadUrlAndMonitor=ca;exports.findBreakpoint=an;exports.generateBadgeClasses=Ct;exports.generateBadgeStyles=_t;exports.generateLinkClasses=Ze;exports.generateLinkStyles=Je;exports.generateNotificationClasses=jt;exports.generateNotificationStyles=Ht;exports.generatePaginationRange=Xt;exports.generateProgressBarClasses=Vt;exports.generateProgressBarStyles=xt;exports.generateSkeletonClasses=Ge;exports.generateSkeletonStyles=It;exports.increaseSize=pa;exports.isUrlMatch=Jt;
4
+ `),displayMenu:!0,displayAside:!0,menuWidth:pe.menu[u]+"px",asideWidth:pe.aside[u]+"px"}}return({width:u,breakpoint:l})=>o(`<=${t}`,u)?c(l):o(`<=${a}`,u)?s(l):i(l)}const ln=["menu","aside"],sn=["banner","header","mainHeader","mainFooter","footer"];function cn(t,{displayMenu:a},n){return t?a?"block":n?"float":"none":"none"}function un(t,{displayAside:a},n){return t?a?"block":n?"float":"none":"none"}function dn({smallBreakpoint:t="sm",mediumBreakpoint:a="md",...n}){const r=Object.fromEntries(ln.filter(c=>n[c]).map(c=>[c,ut(n[c].width??{},pe[c])])),o=Object.fromEntries(sn.filter(c=>n[c]).map(c=>[c,ut(n[c].height??{},pe[c])]));return e.Use(f.BeatUII18n,c=>Ot(({value:s,is:i})=>{const u=on({smallBreakpoint:t,mediumBreakpoint:a,vertical:r,horizontal:o,is:i}),l=s.map(u),h=o.header!=null||r.menu!=null||r.aside!=null,m=e.computedOf(r.aside!=null,l)((_,{displayAside:w})=>_&&!w),p=e.computedOf(r.menu!=null,l)((_,{displayMenu:w})=>_&&!w),d=le.useAnimatedElementToggle(),v=le.useAnimatedElementToggle(),b=e.prop(0),k=e.computedOf(r.menu!=null,l,d.display)(cn),C=e.computedOf(r.aside!=null,l,v.display)(un);return e.html.div(e.style.display("grid"),e.style.height("100%"),e.style.width("100%"),e.style.gridTemplateColumns(l.$.columns),e.style.gridTemplateRows(l.$.rows),e.style.gridTemplateAreas(l.$.areas),e.style.gridColumnGap("0"),e.style.gridRowGap("0"),n.banner?e.html.header(e.attr.class(ue("none",n.banner.shadow??"none")),ye(n.banner.color??"white"),e.style.height("100%"),e.style.gridArea("banner"),n.banner.content):null,e.html.header(e.attr.class(ue("bottom",n.header?.shadow??"none")),ye(n.header?.color??"white"),e.style.zIndex("20"),e.style.display(h?"block":"none"),e.style.gridArea("header"),ae.ElementRect(_=>(_.$.bottom.feedProp(b),null)),e.html.div(e.style.display("flex"),e.style.height("100%"),e.html.div(e.style.display(p.map(_=>_?"flex":"none")),e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),G.Button({onClick:()=>d.toggle(),variant:"light",color:"base"},e.aria.label(c.$.toggleMenu),f.Icon({icon:d.display.map(_=>_?"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(_=>_?"flex":"none")),G.Button({onClick:()=>v.toggle(),roundedness:"full",variant:"light",color:"base"},e.aria.label(c.$.toggleAside),f.Icon({icon:"line-md/chevron-left"},e.attr.style("transition: transform 0.2s ease-in-out"),e.attr.style(v.display.map(_=>`transform: rotate(${_?180:0}deg)`))))))),n.menu?e.html.nav(e.WithElement(_=>d.setElement(_)),e.style.zIndex("10"),e.aria.label(c.$.mainNavigation),e.attr.role("navigation"),e.style.overflow("hidden"),e.attr.class(k.map(_=>_==="float"?ue("right",n.menu?.shadow??"md"):ue("right",n.menu?.shadow??"none"))),ye(n.menu?.color??"white"),e.style.height(k.map(_=>_==="float"?"auto":"100%")),e.style.overflow("hidden"),e.style.gridArea("menu"),e.style.display(e.computedOf(k,d.status)((_,w)=>_==="none"&&w==="closed"?"none":"block")),e.style.position(e.computedOf(k,d.status)((_,w)=>_==="float"||_==="none"&&w!=="closed"?"fixed":"initial")),e.style.top(b.map(_=>`${_}px`)),e.WithElement(_=>{_.style.setProperty("--slide-distance","100%")}),le.AnimatedToggleClass({animation:{slide:"right"},status:e.computedOf(k,d.status)((_,w)=>_==="block"?"opened":w)}),e.style.width(e.coalesce(n.menu?.width,l.$.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(ue("none",n.mainHeader?.shadow??"none")),ye(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(ue("none",n.main?.shadow??"none")),ye(n.main?.color??"white"),n.main.content),n.mainFooter?e.html.footer(e.style.height("100%"),e.style.gridArea("mainFooter"),e.attr.class(ue("none",n.mainFooter?.shadow??"none")),ye(n.mainFooter?.color??"white"),n.mainFooter.content):null,n.aside?e.html.aside(e.WithElement(_=>{v.setElement(_)}),e.style.zIndex("10"),e.aria.label(c.$.sidebar),e.attr.role("complementary"),e.attr.class(C.map(_=>_==="float"?ue("left","md"):ue("left","none"))),ye("white"),e.style.height("100%"),e.style.gridArea("aside"),e.style.display(e.computedOf(C,v.status)((_,w)=>_==="none"&&w==="closed"?"none":"block")),e.style.position(e.computedOf(C,v.status)((_,w)=>_==="float"||_==="none"&&w!=="closed"?"fixed":"initial")),e.style.top(b.map(_=>`${_}px`)),e.WithElement(_=>{_.style.setProperty("--slide-distance","100%")}),le.AnimatedToggleClass({animation:{slide:"left"},status:e.computedOf(C,v.status)((_,w)=>_==="block"?"opened":w)}),e.style.width(e.coalesce(n.aside?.width,l.$.asideWidth)),e.style.bottom(b.map(_=>`${_}px`)),n.aside.content):null,n.footer?e.html.footer(e.attr.class(ue("top","none")),ye("white"),e.style.height("100%"),e.style.gridArea("footer"),n.footer.content):null)}))}function pn(...t){return e.html.div(e.attr.class("bc-center-h"),e.html.div(e.attr.class("bc-center__content"),...t))}function mn(t){const a=["bc-center"];return t!=="lg"&&a.push(`bc-center--gap-${t}`),a.join(" ")}function hn({gap:t="lg"}={},...a){return e.html.div(e.attr.class(e.computedOf(t)(n=>mn(n??"lg"))),...a)}function dt(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 bn({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,i,u,l)=>dt(s??"horizontal",i??"solid",u??"default",!0,l??"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,i,u)=>dt(s??"horizontal",i??"solid",u??"default",!1,"center"))),e.attr.role("separator"))}function gn(t){return`${t}px`}function pt(t){return e.Value.map(t,gn)}function fn({body:t,contentWidth:a,contentHeight:n,header:r,headerHeight:o=0,topStart:c,topEnd:s,footer:i,footerHeight:u=0,bottomStart:l,bottomEnd:h,sidebarStart:m,sidebarStartWidth:p=0,sidebarEnd:d,sidebarEndWidth:v=0,anchorMode:b="container-edge"}){const k=e.prop(0n),C=e.prop(0n),_=pt(o),w=pt(p),y=e.prop(16);return e.html.div(e.attr.class("bc-nine-slice-container"),ae.ElementRect(V=>{const g=e.computedOf(V.$.width,p,v)(($,F,X)=>$-F-X),I=e.computedOf(V.$.height,o,u)(($,F,X)=>$-F-X),B=e.computedOf(a,g)(($,F)=>$>BigInt(F)),N=e.computedOf(n,I)(($,F)=>$>BigInt(F)),O=e.computedOf(g,N,y)(($,F,X)=>F?$-X:$),E=e.computedOf(I,B,y)(($,F,X)=>F?$-X:$),z=e.computedOf(a,O)(($,F)=>Number($/BigInt(Math.max(1,F)))),K=e.computedOf(n,E)(($,F)=>Number($/BigInt(Math.max(1,F)))),L=e.Value.map(b,$=>$==="body-end"||$==="body-end-bottom"),D=e.When(L,()=>e.style.left(e.computedOf(p,a,O,v)(($,F,X,S)=>{const P=$+Number(F),R=$+X,J=Math.min(P,R);return`${Math.max($+S,J)}px`})),()=>e.style.right("0")),M=e.Value.map(b,$=>$==="body-bottom"||$==="body-end-bottom"),U=e.When(M,()=>e.style.top(e.computedOf(o,n,E,u)(($,F,X,S)=>{const P=$+Number(F),R=$+X,J=Math.min(P,R);return`${Math.max($+S,J)}px`})),()=>e.style.bottom("0")),j=e.computedOf(N,y)(($,F)=>$?`${F}px`:"0"),H=e.computedOf(B,y)(($,F)=>$?`${F}px`:"0"),Q=e.style.transform(e.computedOf(C,k,B,N)(($,F,X,S)=>{const P=X?`translateX(-${$}px)`:"",R=S?`translateY(-${F}px)`:"";return`${P} ${R}`.trim()||"none"})),ee=e.style.transform(C.map($=>`translateX(-${$}px)`)),re=e.style.transform(k.map($=>`translateY(-${$}px)`)),ge=e.computedOf(n,E)(($,F)=>$-BigInt(Math.max(1,F))),we=e.computedOf(a,O)(($,F)=>$-BigInt(Math.max(1,F)));let q=null,ve=0,ke=0;const Ne=()=>{const $=ge.value,F=we.value,X=N.value,S=B.value;if(X&&ke!==0){const P=ct($e(0n,$),$e(0n,k.value+BigInt(Math.round(ke))));k.set(P)}if(S&&ve!==0){const P=ct($e(0n,F),$e(0n,C.value+BigInt(Math.round(ve))));C.set(P)}ve=0,ke=0,q=null};return B.on($=>{$||C.set(0n)}),N.on($=>{$||k.set(0n)}),e.Fragment(e.OnDispose(()=>{q&&clearTimeout(q)}),e.on.wheel($=>{$.preventDefault();const{deltaX:F,deltaY:X}=$;ve+=F,ke+=X,q||(q=setTimeout(Ne,16))}),e.html.div(e.attr.class("bc-nine-slice-pane-container"),e.style.right(j),e.style.bottom(H),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"),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(w),e.html.div(e.attr.class("bc-nine-slice-pane-content"),ee,r)):null,s!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-end"),e.style.top("0"),D,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(_),e.html.div(e.attr.class("bc-nine-slice-pane-content"),re,m)):null,e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-body"),e.style.left(w),e.style.top(_),e.html.div(e.attr.class("bc-nine-slice-pane-content"),Q,t)),d!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),D,e.style.top(_),e.html.div(e.attr.class("bc-nine-slice-pane-content"),re,d)):null,l!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-start"),e.style.left("0"),U,l):null,i!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-footer"),e.style.left(w),U,e.html.div(e.attr.class("bc-nine-slice-pane-content"),ee,i)):null,h!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-end"),D,U,h):null),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar"),e.style.overflowX("scroll"),e.style.left("0"),e.style.right(e.computedOf(N,y)(($,F)=>$?`${F}px`:"0")),e.style.bottom("0"),e.style.height(B.map($=>$?"16px":"0")),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar-thumb"),e.style.width(z.map($=>`${100/Math.max(1,$)}%`)),e.style.height("100%"),e.style.backgroundColor("#ff000066")),e.on.scroll($=>{const F=$.target,X=F.scrollLeft,S=F.scrollWidth-F.clientWidth;if(S>0){const P=X/S,R=we.value;C.set(BigInt(Math.round(Number(R)*P)))}})),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-vertical-scrollbar"),e.style.overflowY("scroll"),e.style.top("0"),e.style.bottom(e.computedOf(B,y)(($,F)=>$?`${F}px`:"0")),e.style.right("0"),e.style.width(N.map($=>$?"16px":"0")),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-vertical-scrollbar-thumb"),e.style.width("100%"),e.style.height(e.computedOf(o,u,n,K)(($,F,X,S)=>`${100/Math.max(1,S)}%`)),e.style.backgroundColor("#ff000066")),e.on.scroll($=>{const F=$.target,X=F.scrollTop,S=F.scrollHeight-F.clientHeight;if(S>0){const P=X/S,R=ge.value;k.set(BigInt(Math.round(Number(R)*P)))}})))}))}function Ye({header:t,footer:a,body:n,shadowOnScroll:r=!0},...o){const c=e.prop("none");function s(u){const l=u.scrollTop===0,h=u.scrollTop+u.clientHeight>=u.scrollHeight-1;l&&h?c.set("none"):l?c.set("bottom"):h?c.set("top"):c.set("both")}return e.html.div(e.attr.class("bc-scrollable-panel"),e.attr.class(e.computedOf(c,r)((u,l)=>{if(!l)return"";switch(u){case"both":return"bc-scrollable-panel--scrolled-up bc-scrollable-panel--scrolled-down";case"bottom":return"bc-scrollable-panel--scrolled-up";case"top":return"bc-scrollable-panel--scrolled-down";default:return""}})),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=>e.OnDispose(Pe.g(()=>s(u)))),e.on.scroll(u=>{const l=u.target;s(l)}),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 yn(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 vn({variant:t="default",size:a="md",roundedness:n="lg"}={},...r){return e.html.div(e.attr.class(e.computedOf(t,a,n)((o,c,s)=>yn(o??"default",c??"md",s??"lg"))),...r)}const be={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"?be.getValues(a.options):a.type==="break"?[]:[a.value]),contains:(t,a,n=(r,o)=>r===o)=>be.getValues(t).some(r=>n(r,a))},at=t=>{const{onChange:a,onInput:n,onBlur:r,role:o,display:c,optionsSource:s,allowSpaceToggle:i=!1,onBeforeOpen:u,onAfterOpen:l,buildListboxContent:h}=t,m=e.prop(!1),p=e.prop(-1),d=e.prop(null),v=oe.sessionId("dropdown"),b=oe.sessionId("listbox");let k,C,_;const w=V=>{a?.(V),n?.(V),m.set(!1),p.set(-1),d.set(null),_?.(),k?.focus()},y=V=>{const g=be.getValues(e.Value.get(s));switch(V.key){case"ArrowDown":{if(V.preventDefault(),!m.value)m.set(!0),g.length>0&&(p.set(0),d.set(g[0]));else{const I=Math.min(p.value+1,g.length-1);p.set(I),d.set(g[I]??null)}break}case"ArrowUp":{if(V.preventDefault(),m.value){const I=Math.max(p.value-1,0);p.set(I),d.set(g[I]??null)}break}case"Enter":{if(V.preventDefault(),m.value&&p.value>=0){const I=g[p.value];I!=null&&w(I)}else{u?.();const I=be.getValues(e.Value.get(s));m.set(!0),I.length>0&&(p.set(0),d.set(I[0])),setTimeout(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{l?.()})})},0)}break}case"Escape":{m.value&&(V.preventDefault(),m.set(!1),p.set(-1),d.set(null),k?.focus());break}case" ":{if(e.Value.get(i)){V.preventDefault();const I=be.getValues(e.Value.get(s));m.set(!m.value),m.value&&I.length>0&&(p.set(0),d.set(I[0]))}break}}};return G.InputContainer({...t,input:A.Group(e.attr.class("bc-dropdown__trigger"),e.html.span(e.attr.class("bc-dropdown__display"),c),f.Icon({icon:"ph:caret-up-down-bold",color:"neutral"},e.attr.class("bc-dropdown__arrow")))},ae.ElementRect(V=>e.Fragment(e.WithElement(g=>(k=g,g.addEventListener("keydown",y),e.OnDispose(()=>g.removeEventListener("keydown",y)))),ce.CommonInputAttributes(t),e.attr.id(v),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)((g,I)=>g&&I!=null?`dropdown-option-${String(I)}`:"")),r!=null?e.on.blur(()=>{setTimeout(()=>{C?.contains(document.activeElement)||(m.set(!1),p.set(-1),r())},100)}):e.Empty,ie.Flyout({content:()=>e.html.div(e.WithElement(g=>{C=g}),e.style.minWidth(V.$.width.map(g=>`${g-10}px`)),e.attr.class("bc-dropdown__listbox"),e.attr.role("listbox"),e.attr.id(b),e.aria.labelledby(v),h({dropdownId:v,listboxId:b,focusedValue:d,handleKeyDown:y,onSelect:w})),mainAxisOffset:0,placement:"bottom-start",hasPopup:"listbox",showOn:(g,I)=>{const B=I;I=()=>{m.set(!1),p.set(-1),d.set(null),B()},_=I;const N=()=>{if(m.value)I();else{u?.();const O=be.getValues(e.Value.get(s));m.set(!0),O.length>0&&(p.set(0),d.set(O[0])),g(),setTimeout(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{l?.()})})},0)}};return e.on.click(N)},showDelay:0,hideDelay:0,closable:!0}))))},Bt=(t,a,n,r,o)=>e.Ensure(t,c=>e.OneOfType(c,{value:s=>{const i=e.computedOf(s,n)((l,h)=>a(l.value,h)),u=e.computedOf(s,o)((l,h)=>h!=null&&a(l.value,h));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(i,u,s)((l,h,m)=>{const p=[];return l&&p.push("bc-dropdown__option--selected"),h&&p.push("bc-dropdown__option--focused"),m.disabled&&p.push("bc-dropdown__option--disabled"),p.join(" ")})),e.attr.role("option"),e.attr.id(s.map(l=>`dropdown-option-${String(l.value)}`)),e.aria.selected(i),A.Expando("value",s.$.value),e.When(s.map(l=>!l.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,i=>Bt(i,a,n,r,o))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),Et=t=>{const{value:a,options:n,unselectedLabel:r,equality:o=(l,h)=>l===h,placeholder:c,searchable:s=!1}=t,i=e.computedOf(a,n)((l,h)=>{if(l==null)return"";const m=p=>{for(const d of p){if(d.type==="value"&&o(d.value,l))return d.label;if(d.type==="group"){const v=m(d.options);if(v)return v}}};return m(h)||String(l)}),u=e.computedOf(s)(l=>!l);return at({...t,role:"dropdown",display:e.When(i.map(l=>l.length>0),()=>i,()=>e.Use(f.BeatUII18n,l=>e.coalesce(c,r,l.$.selectOne))),optionsSource:n,allowSpaceToggle:u,buildListboxContent:({focusedValue:l,onSelect:h})=>e.ForEach(n,m=>Bt(m,o,a,h,l))})},Pt=t=>{const{controller:a,onChange:n,onBlur:r,...o}=t;return Et({...o,value:a.signal,onChange:W.makeOnChangeHandler(a,n),onBlur:W.makeOnBlurHandler(a,r)})},kn=t=>W.InputWrapper({...t,content:Pt(t)}),At=(t,a,n,r,o,c)=>e.Ensure(t,s=>e.OneOfType(s,{value:i=>{const u=e.computedOf(i,n)((h,m)=>a(h.value,m)),l=e.computedOf(i,o)((h,m)=>m!=null&&a(h.value,m));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(u,l,i)((h,m,p)=>{const d=[];return h&&d.push("bc-dropdown__option--selected"),m&&d.push("bc-dropdown__option--focused"),p.disabled&&d.push("bc-dropdown__option--disabled"),d.join(" ")})),e.attr.role("option"),e.attr.id(i.map(h=>`dropdown-option-${String(h.value)}`)),e.aria.selected(u),e.When(i.map(h=>!h.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=>At(u,a,n,r,o,c))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),Lt=t=>{const{value:a,loadOptions:n,renderOption:r,renderValue:o,equality:c=(w,y)=>w===y,placeholder:s,searchPlaceholder:i,debounceMs:u=150,autoFocusSearch:l=!0}=t,h=e.prop(""),m=e.prop(!1),p=e.prop([]);let d;const v=e.Value.toSignal(a),b=()=>(o??r)(v);let k=null;const C=w=>{m.set(!0),Promise.resolve(n(w)).then(y=>{p.set(y??[])}).catch(()=>{p.set([])}).finally(()=>m.set(!1))},_=w=>{k!=null&&(clearTimeout(k),k=null),k=setTimeout(()=>{C(w)},Math.max(0,u))};return at({...t,role:"combobox",display:e.When(e.computedOf(a)(w=>w!=null),b,()=>e.Use(f.BeatUII18n,w=>w.$.selectOne)),optionsSource:p,onBeforeOpen:()=>{const w=e.Value.get(h);_(w)},onAfterOpen:()=>{l&&d?.focus()},buildListboxContent:({focusedValue:w,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(i,s)((g,I)=>g??I??"Search")),e.attr.value(h),e.WithElement(g=>(d=g,e.Empty)),e.on.input(g=>{const I=g.target;h.set(I.value),_(I.value)}),e.on.keydown(y))),e.When(m,()=>e.html.div(e.attr.class("bc-dropdown__loading"),f.Icon({icon:"ph:spinner-bold",color:"neutral"})),()=>e.ForEach(p,g=>At(g,c,v,V,w,r))))})},Mt=t=>{const{controller:a,onChange:n,onBlur:r,...o}=t;return Lt({...o,value:a.signal,onChange:W.makeOnChangeHandler(a,n),onBlur:W.makeOnBlurHandler(a,r)})},Cn=t=>W.InputWrapper({...t,content:Mt(t)});function Nt(t,a,n){return t.some(o=>n(o,a))?t.filter(o=>!n(o,a)):[...t,a]}function Ft(t,a,n){return t.filter(r=>!n(r,a))}function Wt(t,a,n){return t.some(r=>n(r,a))}function Ut(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=Ut(r.options,a,n);if(o!=null)return o}}function _n(t,a,n){return Ut(t,a,n)?.label??String(a)}function Rt(t,a,n){const r=a.trim().toLowerCase(),o=n??((s,i)=>i.label.toLowerCase().includes(s));if(r==="")return t;const c=[];for(const s of t)if(s.type==="value")o(r,{label:s.label})&&c.push(s);else if(s.type==="group"){const i=Rt(s.options,r,o);i.length>0&&c.push({...s,options:i})}return c}function nt(t){const{values:a,options:n,equality:r,disabled:o,onRemove:c}=t;return e.NotEmpty(a,()=>e.ForEach(a,s=>et({value:e.computedOf(s,n)((i,u)=>_n(u,i,r)),onClose:()=>c(s.value),disabled:o})),()=>e.html.span(e.attr.class("bc-input-container__placeholder"),t.placeholder))}function rt(t){const{value:a,options:n,equality:r=(l,h)=>l===h,placeholder:o}=t,c=l=>{const h=e.Value.get(a);t.onChange?.(Ft(h,l,r))},s=l=>{const h=e.Value.get(a);t.onChange?.(Nt(h,l,r))},i=l=>e.computedOf(a)(h=>Wt(h,l,r)),u=ie.Menu({items:()=>{const l=e.Value.get(n),h=[];for(const m of l)if(m.type==="value"){const p=i(m.value);h.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(m.disabled===!0),e.aria.checked(p),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"?h.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(p=>{if(p.type==="value"){const d=i(p.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(p.disabled===!0),e.aria.checked(d),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),p.label),e.on.click(()=>s(p.value)))}return e.Empty}))):h.push(ie.MenuSeparator());return h},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:"click",closable:!0});return G.InputContainer({...t,before:t.before??G.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),u,nt({values:a,placeholder:o,options:n,equality:r,disabled:t.disabled,onRemove:c})),after:G.InputIcon({icon:"line-md:plus",color:"neutral",size:"sm"})})}function wn(t){return W.BaseControl(rt,t)}function Vn(t){return W.Control(rt,t)}function ot(t){const{value:a,options:n,equality:r=(d,v)=>d===v,placeholder:o,searchPlaceholder:c,filter:s}=t,i=e.prop(""),u=d=>{const v=e.Value.get(a);t.onChange?.(Ft(v,d,r))},l=d=>{const v=e.Value.get(a);t.onChange?.(Nt(v,d,r))},h=e.computedOf(n,i)((d,v)=>Rt(d,v,s)),m=d=>e.Ensure(d,v=>e.OneOfType(v,{value:b=>{const k=e.computedOf(a,b)((C,_)=>Wt(C,_.value,r));return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(b.map(C=>C.disabled===!0)),e.aria.checked(k),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),b.$.label),e.on.click(()=>l(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:()=>ie.MenuSeparator()})),p=ie.Menu({items:()=>[e.When(h.map(d=>d.length===0),()=>e.html.div(e.attr.class("bc-dropdown__empty"),e.Use(f.BeatUII18n,d=>d.$.noResults))),e.ForEach(h,m)],placement:"bottom-start",showDelay:0,hideDelay:100,showOn:(d,v)=>e.WithElement(b=>{const k=b.querySelector(".bc-dropdown__search-input");if(k){const C=()=>d();return k.addEventListener("focus",C),e.OnDispose(()=>{k.removeEventListener("focus",C)})}return e.Empty}),closable:!0});return G.InputContainer({...t,before:t.before??G.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),nt({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,v)=>d??v??"")),e.attr.value(i),e.on.input(d=>{const v=d.target;i.set(v.value)}),e.on.keydown(d=>{(d.key==="ArrowUp"||d.key==="ArrowDown"||d.key==="Enter"||d.key===" ")&&d.stopPropagation()})),p))})}function xn(t){return W.BaseControl(ot,t)}function In(t){return W.Control(ot,t)}const Sn=t=>{const{value:a,onBlur:n,onChange:r}=t;return G.InputContainer({...t,input:e.input.date(ce.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)})},Dn=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}`},$n=t=>{const{value:a,onBlur:n,onChange:r}=t;return G.InputContainer({...t,input:e.input["datetime-local"](ce.CommonInputAttributes(t),e.attr.value(e.Value.map(a,Dn)),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 Tn(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 On=t=>ae.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?be.value(o.id,o.label):o));return A.NativeSelect({...t,options:n,unselectedLabel:t.unselectedLabel,equality:t.equality})},pending:()=>e.Use(f.BeatUII18n,a=>e.html.span(f.Icon({icon:"line-md:loading-twotone-loop",title:a.$.loadingShort})))}),Bn=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:c,disabled:s,...i}=t,u=A.NullableResetAfter(a,s,r??o);return A.MaskInput({...i,value:e.Value.map(a,T.nullToEmpty),onChange:r!=null?l=>r(T.emptyToNull(l)):void 0,onInput:o!=null?l=>o(T.emptyToNull(l)):void 0,onBlur:n,after:c!=null?e.Fragment(u,c):u})};function En(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 Pn(t){const{values:a,onChange:n,placeholder:r="Add...",size:o="md",disabled:c=!1,maxTags:s,hasError:i=!1}=t,u=e.prop(""),l=p=>{const v=e.Value.get(a).filter(b=>b!==p);n?.(v)},h=p=>{const d=p.trim();if(!d)return;const v=e.Value.get(a),b=e.Value.get(s??1/0);v.includes(d)||v.length>=b||(n?.([...v,d]),u.set(""))},m=p=>{if(p.key==="Enter"||p.key===",")p.preventDefault(),h(u.value);else if(p.key==="Backspace"&&u.value===""){const d=e.Value.get(a);d.length>0&&l(d[d.length-1])}};return e.html.div(e.attr.class(e.computedOf(o,c,i)((p,d,v)=>En(p??"md",d??!1,v??!1))),e.ForEach(a,p=>e.html.span(e.attr.class("bc-tag-input__tag"),e.html.span(e.attr.class("bc-tag-input__tag-text"),p),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(),l(p.value)}),"×"),()=>e.Empty))),e.html.input(e.attr.class("bc-tag-input__input"),e.attr.type("text"),e.attr.placeholder(e.computedOf(a,r)((p,d)=>p.length===0?d??"Add...":"")),e.attr.disabled(c),e.attr.value(u),e.on.input(p=>{const d=p.target;u.set(d.value)}),e.on.keydown(m),e.on.blur(()=>{u.value.trim()&&h(u.value)})))}const An=t=>{const{value:a,onChange:n,onBlur:r,before:o}=t,c=e.prop(""),s=u=>{n?.(e.Value.get(a).filter(l=>l!==u))},i=()=>{const u=c.value.trim(),l=e.Value.get(a);u===""||l.includes(u)||(c.set(""),n?.([...l,u]))};return G.InputContainer({...t,before:o??G.InputIcon({icon:"tabler:tag",size:t.size,color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),e.ForEach(a,u=>et({value:u,onClose:()=>s(u.value),disabled:t.disabled})),e.input.text(ce.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 Ln(t,a){const n=["bc-radio-group",`bc-radio-group--${t}`];return a&&a.length>0&&n.push(a),n.join(" ")}function Mn(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 Nn({options:t,value:a,onChange:n,name:r,disabled:o=!1,orientation:c="vertical",size:s="md",class:i}){const u=r??oe.sessionId("radio-group");return e.html.div(e.attr.class(e.computedOf(c,i)((l,h)=>Ln(l??"vertical",h))),e.attr.role("radiogroup"),e.ForEach(t,l=>{const h=l.map(p=>p.disabled??!1),m=oe.sessionId("radio");return e.html.label(e.attr.class(e.computedOf(s,o,h)((p,d,v)=>Mn(p??"md",v??!1,d??!1))),e.html.input(e.attr.type("radio"),e.attr.name(u),e.attr.id(m),e.attr.value(l.map(p=>String(p.value))),e.attr.class("bc-radio-group__input"),e.attr.checked(e.computedOf(a,l)((p,d)=>p===d.value)),e.attr.disabled(e.computedOf(o,h)((p,d)=>(p??!1)||(d??!1))),e.on.change(()=>{e.Value.get(o)||(e.Value.get(l).disabled??!1)||n?.(e.Value.get(l).value)}),e.aria.disabled(e.computedOf(o,h)((p,d)=>(p??!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"),l.map(p=>p.label)),e.html.span(e.attr.class("bc-radio-group__description"),l.map(p=>p.description??""))))}))}function Te(t,a,n){return Math.min(Math.max(t,a),n)}function Fn(t,a,n){return A.roundToStep(Math.round((t-a)/n)*n+a,n)}function he(t,a,n){return n===a?0:(t-a)/(n-a)*100}function Wn(t,a){const n=["bc-advanced-slider",`bc-advanced-slider--size-${t}`];return a&&n.push("bc-advanced-slider--disabled"),n.join(" ")}function Un(t){const a=f.backgroundValue(t,"solid","light"),n=f.backgroundValue(t,"solid","dark"),r=new Map;return r.set("--slider-color",a.backgroundColor),r.set("--slider-color-dark",n.backgroundColor),Array.from(r.entries()).map(([o,c])=>`${o}: ${c}`).join("; ")}function Rn({min:t=0,max:a=100,step:n=1,disabled:r=!1,size:o="md",color:c="primary",value:s,onChange:i,range:u,points:l,onRangeChange:h,onPointsChange:m,ticks:p,showValue:d=!1,formatValue:v=C=>String(C),segmentColors:b,renderThumb:k}){const C=l!=null?"multi":u!=null?"range":"single",_=C==="multi"?e.Value.get(l).length:C==="range"?2:1,w=[];if(p===!0)for(let O=t;O<=a;O+=n)w.push({value:O});else Array.isArray(p)&&w.push(...p);const y=C==="multi"?e.Value.map(l,O=>[...O]):C==="range"?e.Value.map(u,O=>[O[0],O[1]]):e.Value.map(s??0,O=>[O]),V=e.prop(null);function g(O){if(C==="multi")m?.(O);else if(C==="range"){const E=[O[0],O[1]];E[0]>E[1]&&E.reverse(),h?.(E)}else i?.(O[0])}function I(O,E,z){const K=O.getBoundingClientRect(),L=Te((E-K.left)/K.width,0,1),D=t+L*(a-t),M=Te(Fn(D,t,n),t,a),U=e.Value.get(y);if(z!=null){const j=[...U];j[z]=M,g(j)}else{let j=0,H=Math.abs(U[0]-M);for(let ee=1;ee<U.length;ee++){const re=Math.abs(U[ee]-M);re<H&&(j=ee,H=re)}const Q=[...U];Q[j]=M,V.set(j),g(Q)}}function B(O){return e.Value.map(y,E=>E[O]??t)}function N(O,E){const z=B(O),K=e.Value.map(z,L=>`${he(L,t,a)}%`);return e.html.div(e.attr.class("bc-advanced-slider__thumb-container"),e.style.left(K),e.When(d,()=>e.html.div(e.attr.class("bc-advanced-slider__value-label"),e.Value.map(z,L=>v(L))),()=>e.Empty),e.html.div(e.attr.class(k?"bc-advanced-slider__thumb-custom":"bc-advanced-slider__thumb"),e.attr.role("slider"),e.attr.tabindex(0),e.aria.valuemin(t),e.aria.valuemax(a),e.aria.valuenow(z),e.aria.label(`Thumb ${O+1}`),e.on.keydown(L=>{if(e.Value.get(r))return;const D=e.Value.get(y),M=D[O];let U;switch(L.key){case"ArrowRight":case"ArrowUp":L.preventDefault(),U=Te(A.roundToStep(M+n,n),t,a);break;case"ArrowLeft":case"ArrowDown":L.preventDefault(),U=Te(A.roundToStep(M-n,n),t,a);break;case"Home":L.preventDefault(),U=t;break;case"End":L.preventDefault(),U=a;break;default:return}const j=[...D];j[O]=U,g(j)}),e.on.pointerdown(L=>{if(L.stopPropagation(),L.preventDefault(),e.Value.get(r))return;V.set(O);const D=U=>{I(E,U.clientX,O)},M=()=>{V.set(null),window.removeEventListener("pointermove",D),window.removeEventListener("pointerup",M)};window.addEventListener("pointermove",D),window.addEventListener("pointerup",M)}),k?k(O,z):e.Empty))}return e.WithElement(O=>{const E=D=>{if(e.Value.get(r))return;D.preventDefault(),I(O,D.clientX,null);const M=j=>{I(O,j.clientX,V.value)},U=()=>{V.set(null),window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",U)};window.addEventListener("pointermove",M),window.addEventListener("pointerup",U)},z=b!=null&&(C==="range"||C==="multi"),K=z?"":e.computedOf(y)(D=>{if(C==="range"&&D.length===2){const U=he(Math.min(D[0],D[1]),t,a),j=he(Math.max(D[0],D[1]),t,a);return`left: ${U}%; width: ${j-U}%`}if(C==="multi"&&D.length>=2){const U=[...D].sort((Q,ee)=>Q-ee),j=he(U[0],t,a),H=he(U[U.length-1],t,a);return`left: ${j}%; width: ${H-j}%`}return`left: 0%; width: ${he(D[0]??t,t,a)}%`}),L=Array.from({length:_},(D,M)=>N(M,O));return e.Fragment(e.attr.class(e.computedOf(o,r)(Wn)),e.attr.style(e.Value.map(c,Un)),e.attr.role("group"),e.aria.label("Slider"),e.on.pointerdown(E),e.html.div(e.attr.class("bc-advanced-slider__track"),z?e.MapSignal(y,D=>{const M=[...D].sort((j,H)=>j-H),U=[];for(let j=0;j<M.length-1;j++){const H=M[j],Q=M[j+1],ee=he(H,t,a),re=he(Q,t,a),ge=b[j]??e.Value.get(c)??"primary";U.push({left:ee,width:re-ee,color:ge})}return e.Fragment(...U.map(j=>{const H=f.backgroundValue(j.color,"solid","light"),Q=f.backgroundValue(j.color,"solid","dark"),ee=`left: ${j.left}%; width: ${j.width}%; --slider-color: ${H.backgroundColor}; --slider-color-dark: ${Q.backgroundColor}`;return e.html.div(e.attr.class("bc-advanced-slider__fill"),e.attr.style(ee))}))}):e.html.div(e.attr.class("bc-advanced-slider__fill"),e.attr.style(K)),w.length>0?e.html.div(e.attr.class("bc-advanced-slider__ticks"),...w.map(D=>{const M=he(D.value,t,a);return e.html.div(e.attr.class("bc-advanced-slider__tick"),e.style.left(`${M}%`),D.label!=null?e.html.span(e.attr.class("bc-advanced-slider__tick-label"),D.label):e.Empty)})):e.Empty,...L))})}function zn(t,a){const n=["bc-otp-input",`bc-otp-input--size-${t}`];return a&&n.push("bc-otp-input--disabled"),n.join(" ")}function jn(t){const a=f.backgroundValue(t,"solid","light"),n=f.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",f.borderColorValue(t,"light")),r.set("--otp-focus-border-dark",f.borderColorValue(t,"dark")),Array.from(r.entries()).map(([o,c])=>`${o}: ${c}`).join("; ")}function Hn(t,a){return a==="numeric"?/^\d$/.test(t):/^[a-zA-Z0-9]$/.test(t)}function qn({length:t=6,value:a="",onChange:n,onComplete:r,disabled:o=!1,mask:c=!1,type:s="numeric",size:i="md",color:u="primary",placeholder:l="",autoFocus:h=!1}={}){const m=oe.sessionId("otp"),p=e.prop((()=>{const y=e.Value.get(a),V=new Array(t).fill("");for(let g=0;g<Math.min(y.length,t);g++)V[g]=y[g];return V})()),d=e.prop(null),v=[];function b(y){const V=v[y];V!=null&&(V.focus(),V.select())}function k(){const y=p.value.join("");n?.(y),y.length===t&&y.split("").every(V=>V!=="")&&r?.(y)}function C(y,V){if(e.Value.get(o))return;const g=V.split("").filter(I=>Hn(I,s));if(g.length>1){const I=[...p.value];for(let N=0;N<g.length&&y+N<t;N++)I[y+N]=g[N];p.set(I),k();const B=Math.min(y+g.length,t-1);b(B);return}if(g.length===1){const I=[...p.value];I[y]=g[0],p.set(I),k(),y<t-1&&b(y+1)}}function _(y,V){if(!e.Value.get(o))switch(V.key){case"Backspace":{V.preventDefault();const g=[...p.value];g[y]!==""?(g[y]="",p.set(g),k()):y>0&&(g[y-1]="",p.set(g),k(),b(y-1));break}case"ArrowLeft":V.preventDefault(),y>0&&b(y-1);break;case"ArrowRight":V.preventDefault(),y<t-1&&b(y+1);break;case"Delete":{V.preventDefault();const g=[...p.value];g[y]="",p.set(g),k();break}case"Home":V.preventDefault(),b(0);break;case"End":V.preventDefault(),b(t-1);break}}function w(y,V){V.preventDefault();const g=V.clipboardData?.getData("text")??"";C(y,g)}return e.html.div(e.attr.class(e.computedOf(i,o)(zn)),e.attr.style(e.Value.map(u,jn)),e.attr.role("group"),e.aria.label("One-time password input"),...Array.from({length:t},(y,V)=>{const g=`${m}-cell-${V}`;return e.html.input(e.WithElement(I=>(v[V]=I,h&&V===0&&requestAnimationFrame(()=>I.focus()),e.Empty)),e.attr.id(g),e.attr.type(c?"password":"text"),e.attr.inputmode(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(I=>I===V?"bc-otp-input__cell--focused":"")),e.attr.placeholder(l),e.attr.disabled(o),e.aria.label(`Digit ${V+1} of ${t}`),e.attr.value(p.map(I=>I[V]??"")),e.on.focus(()=>{d.set(V);const I=v[V];I?.select()}),e.on.blur(()=>{d.set(null)}),e.on.input(I=>{const B=I.target;C(V,B.value),B.value=p.value[V]??""}),e.on.keydown(I=>_(V,I)),e.on.paste(I=>w(V,I)))}))}const Gn=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"),s=a.getMinutes().toString().padStart(2,"0");return`${n}-${r}-${o}T${c}:${s}`},Yn=t=>{const{value:a,onBlur:n,onChange:r}=t;return A.WithTemporal(o=>G.InputContainer({...t,input:e.input["datetime-local"](ce.CommonInputAttributes(t),e.attr.value(e.Value.map(a,c=>Gn(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)}))},Zn=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"),s=a.getMinutes().toString().padStart(2,"0");return`${n}-${r}-${o}T${c}:${s}`},Jn=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:c,disabled:s}=t,i=A.NullableResetAfter(a,s,r??o);return A.WithTemporal(u=>G.InputContainer({...t,input:e.input["datetime-local"](ce.CommonInputAttributes(t),e.attr.value(e.Value.map(a,l=>l==null?null:Zn(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(l===""?null:u.Instant.from(new Date(l).toISOString())))):e.Empty,o!=null?e.on.input(e.emitValue(l=>o(l===""?null:u.Instant.from(new Date(l).toISOString())))):e.Empty),after:c!=null?e.Fragment(i,c):i}))},Xn=t=>{const{value:a,onBlur:n,onChange:r}=t;return A.WithTemporal(o=>G.InputContainer({...t,input:e.input["datetime-local"](ce.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 s=o.PlainDateTime.from(c),i=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(o.ZonedDateTime.from({...s,timeZone:i}))})):e.Empty)}))},Kn=t=>{const{value:a,onBlur:n,onChange:r,onInput:o,after:c,disabled:s}=t,i=A.NullableResetAfter(a,s,r??o);return A.WithTemporal(u=>G.InputContainer({...t,input:e.input["datetime-local"](ce.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=>{if(l==="")return r(null);const h=u.PlainDateTime.from(l),m=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(u.ZonedDateTime.from({...h,timeZone:m}))})):e.Empty,o!=null?e.on.input(e.emitValue(l=>{if(l==="")return o(null);const h=u.PlainDateTime.from(l),m=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return o(u.ZonedDateTime.from({...h,timeZone:m}))})):e.Empty),after:c!=null?e.Fragment(i,c):i}))},Qn=se.createTemporalInput({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,a)=>t.PlainYearMonth.from(a)}),er=se.createNullableTemporalInput({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,a)=>t.PlainYearMonth.from(a)}),tr=t=>{const{value:a,onChange:n}=t;return A.WithTemporal(r=>A.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"}))},ar=t=>{const{value:a,onChange:n,onInput:r,after:o,disabled:c}=t,s=A.NullableResetAfter(a,c,n??r);return A.WithTemporal(i=>A.MaskInput({...t,value:e.Value.map(a,u=>u?.toString()??""),onChange:n!=null?u=>n(u===""?null:i.PlainMonthDay.from(`--${u}`)):void 0,onInput:r!=null?u=>r(u===""?null:i.PlainMonthDay.from(`--${u}`)):void 0,mask:"99-99",placeholder:"MM-DD",after:o!=null?e.Fragment(s,o):s}))};function nr(t,a,n){return e.Ensure(t.signal,()=>{const r=t.transform(o=>o,o=>o);return a(r)},n)}const rr={filling:{type:"filling"},submitting:{type:"submitting"},error:t=>({type:"error",error:t}),success:{type:"success"}};class zt extends W.Controller{constructor(a,n,r,o,c){super(a,n,r,o,c)}isValidColor=this.signal.map(T.isValidColor);isValidHex=this.signal.map(T.isValidHexColor);normalizedHex=this.signal.map(a=>T.normalizeHexColor(a)??a);setColor=a=>{if(T.isValidHexColor(a)){const n=T.normalizeHexColor(a);if(n){this.change(n);return}}this.change(a)};setHex=a=>{const n=T.normalizeHexColor(a);n&&this.change(n)};setRgb=(a,n,r)=>{const o=s=>{const i=Math.round(Math.max(0,Math.min(255,s))).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=T.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 T.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=>T.normalizeHexColor(o)??o;return this.transform(n,r,[`format-${a}`])}}function or(t){return new zt(t.path,t.change,t.signal,t.status,{disabled:t.disabled})}function lr(t){return{id:t.name,disabled:t.disabled,value:t.normalizedHex,hasError:t.errorVisible,onChange:t.setColor,onInput:t.setColor}}function sr({locales:t,onChange:a,updateLocale:n=!0}){return e.Use(f.BeatUII18n,r=>e.Use(f.Locale,({locale:o,setLocale:c})=>W.InputWrapper({layout:"horizontal",content:A.Group(e.attr.class("bc-group--align-center bc-group--gap-2"),f.Icon({icon:"ic:twotone-language",size:"lg",color:"neutral",title:r.$.locale}),A.NativeSelect({options:e.Value.map(t,s=>s.map(i=>{let u=i.name;return i.nativeName!=null&&i.nativeName!==i.name&&(u+=` (${i.nativeName})`),be.value(i.code,u)})),value:o,onChange:s=>{n&&c(s),a?.(s)}}))})))}const ir=()=>e.Use(f.Locale,({direction:t})=>e.Portal("body",e.attr.class(t.map(a=>`b-${a}`))));function jt(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 Ht(t,a){return[`--notification-accent-color: ${Z.getColorVar(t,500)}`,`--notification-radius: ${x.getRadiusVar(a)}`].join("; ")}function qt({loading:t=!1,withCloseButton:a=!1,withBorder:n=!1,color:r="primary",radius:o="md",title:c,icon:s,onClose:i,class:u}={},...l){const h=e.Value.map(s,m=>m!=null);return e.html.section(e.attr.class(e.computedOf(n,h,a,t,u)((m,p,d,v,b)=>[jt(m,p,d,v,b)].join(" "))),e.attr.style(e.computedOf(r,o)((m,p)=>Ht(m,p))),e.aria.live("polite"),e.aria.busy(t),e.When(t,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__loader"),f.Icon({icon:"line-md:loading-twotone-loop",size:"lg",color:r,accessibility:"decorative"})),()=>e.When(h,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__icon"),f.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"),c!=null?e.html.div(e.attr.class("bc-notification__title"),c):null,e.html.div(e.attr.class("bc-notification__content"),...l)),e.When(a,()=>e.html.div(e.attr.class("bc-notification__meta"),W.CloseButton({size:"sm",color:r,onClick:i}))))}class cr{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 Gt=new cr,lt={mark:e.makeProviderMark("NotificationProvider"),create:({position:t="bottom-end"}={})=>{const a=e.prop(0),n=[];function r(u){return n.push(u),()=>{const l=n.lastIndexOf(u);l>=0&&n.splice(l,1)}}const o=[],c=({dismissAfter:u,onClose:l,animation:h={fade:!0},...m},...p)=>{a.update(b=>b+1);const d=u!=null?typeof u=="number"?da(u*1e3):u:void 0,v={animation:h,class:e.Value.toSignal(m.class),loading:e.Value.toSignal(m.loading??!1),withCloseButton:e.Value.toSignal(m.withCloseButton==null&&u==null?!0:m.withCloseButton??!0),withBorder:e.Value.toSignal(m.withBorder??!1),color:e.Value.toSignal(m.color??"primary"),radius:e.Value.toSignal(m.radius??"md"),title:m.title??e.Empty,icon:e.Value.toSignal(m.icon),children:p,listenRequestClose:b=>(o.push(b),l?.(),()=>{}),delayedClose:d};n.forEach(b=>b(v))},s=()=>{o.forEach(u=>u()),o.length=0},i=Gt.attach({show:c,clear:s});return{value:{activeNotifications:a,show:c,clear:s,position:t,listenOnShow:r},dispose:()=>{i(),s()}}}};function Yt(){return e.Use(lt,({listenOnShow:t,position:a})=>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(le.AnimatedToggle({animation:r.animation,initialStatus:"start-opening"},({close:s,listenOnClosed:i})=>(r.delayedClose?.finally(s),i(()=>{o.forEach(u=>u())}),qt({class:r.class,loading:r.loading,withCloseButton:r.withCloseButton,withBorder:r.withBorder,color:r.color,radius:r.radius,title:r.title,icon:r.icon,onClose:s},...r.children))));o.push(e.renderWithContext(c,n))})))))}function ur({includeAuthI18n:t=!1,enableAppearance:a=!0,defaultAppearance:n="system",appearancePreferenceKey:r="bui-appearance",includeNotifications:o=!0,notificationPosition:c="bottom-end"},...s){return e.WithProvider(({set:i,use:u})=>{i(ae.Location,{}),i(f.Locale,{}),i(f.BeatUII18n,{}),i(Se.Theme,{defaultAppearance:a?n:"light",appearancePreferenceKey:r}),o&&i(lt,{position:c}),ae.NavigationService.attach(u(ae.Location));const l=e.Fragment(a?Se.ThemeAppearance():e.Empty,ir(),o?Yt():e.Empty,...s);return t?e.Task(()=>Promise.resolve().then(()=>require("./translations-DBxIjvWR.cjs")).then(h=>h.translations),({AuthI18n:h})=>e.Provide(h,{},()=>l)):l})}function dr({content:t,toolbar:a=!0,page:n,zoom:r,view:o,pagemode:c,scrollbar:s=!0,navpanes:i=!0,search:u,nameddest:l,viewrect:h,highlight:m,allowfullscreen:p=!1}){const d=e.Value.toSignal(t).mapAsync(async b=>{if(b instanceof Blob){const k=await b.arrayBuffer(),C=new Blob([k],{type:"application/pdf"});return URL.createObjectURL(C)}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 C=await(await fetch(b)).arrayBuffer(),_=new Blob([C],{type:"application/pdf"});return URL.createObjectURL(_)}}},null),v=e.computedOf(d,a,n,r,o,c,s,i,u,l,h,m)((b,k,C,_,w,y,V,g,I,B,N,O)=>{if(b==null)return null;const E=[];k===!1&&E.push("toolbar=0"),C!=null&&C>0&&E.push(`page=${C}`),_!=null&&_>0&&E.push(`zoom=${_}`),w!=null&&E.push(`view=${w}`),y!=null&&E.push(`pagemode=${y}`),V===!1&&E.push("scrollbar=0"),g===!1&&E.push("navpanes=0"),I!=null&&E.push(`search=${encodeURIComponent(I)}`),B!=null&&E.push(`nameddest=${encodeURIComponent(B)}`),N!=null&&E.push(`viewrect=${encodeURIComponent(N)}`),O!=null&&E.push(`highlight=${encodeURIComponent(O)}`);const z=E.join("&");return z?`${b}#${z}`:b});return d.on((b,k)=>{k!=null&&URL.revokeObjectURL(k)}),e.Use(f.BeatUII18n,b=>e.html.div(e.OnDispose(()=>{const k=d.value;k!=null&&URL.revokeObjectURL(k)}),e.attr.class("h-full w-full"),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(p),e.attr.title(b.$.pdfPreview),e.attr.loading("lazy"),e.WithElement(k=>{const C=k;let _=!0;return v.on(w=>{w!=null&&(_?(C.src=w,_=!1):(C.src="about:blank",setTimeout(()=>{C.src=w},50)))}),e.Empty}))))}function pr({content:t,page:a,zoom:n,pagemode:r,nameddest:o,search:c,textLayerMode:s,sidebarViewOnLoad:i,scrollModeOnLoad:u,spreadModeOnLoad:l,enableScripting:h,enablePrinting:m,viewerUrl:p=null,allowfullscreen:d=!0,class:v=null}){const b=e.Value.toSignal(t).mapAsync(async C=>{if(C instanceof Blob)return URL.createObjectURL(C);if(C instanceof ArrayBuffer)return URL.createObjectURL(new Blob([C],{type:"application/pdf"}));if(C instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(C)],{type:"application/pdf"}));if(typeof C=="string")return C},null),k=e.computedOf(b,p,a,n,r,o,c,s,i,u,l,h,m)((C,_,w,y,V,g,I,B,N,O,E,z,K)=>{if(C==null)return null;const L=_??"https://mozilla.github.io/pdf.js/web/viewer.html",D=new URLSearchParams;D.set("file",C);const M=[];w!=null&&w>0&&M.push(`page=${w}`),y!=null&&(typeof y=="string"?M.push(`zoom=${y}`):M.push(`zoom=${y}`)),V!=null&&M.push(`pagemode=${V}`),g!=null&&M.push(`nameddest=${encodeURIComponent(g)}`),I!=null&&M.push(`search=${encodeURIComponent(I)}`),B!=null&&M.push(`textLayer=${B}`),N!=null&&M.push(`sidebar=${N}`),O!=null&&M.push(`scrollMode=${O}`),E!=null&&M.push(`spreadMode=${E}`),z!=null&&M.push(`enableScripting=${z?"1":"0"}`),K!=null&&M.push(`enablePrinting=${K?"1":"0"}`);const U=M.length>0?`#${M.join("&")}`:"";return`${L}?${D.toString()}${U}`});return b.on((C,_)=>{_!=null&&_.startsWith("blob:")&&URL.revokeObjectURL(_)}),e.Use(f.BeatUII18n,C=>e.html.div(e.OnDispose(()=>{const _=b.value;_!=null&&_.startsWith("blob:")&&URL.revokeObjectURL(_)}),e.attr.class("bc-pdfjs-preview h-full w-full"),e.attr.class(v),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(d),e.attr.title(C.$.pdfPreview),e.attr.loading("lazy"),e.attr.src(k))))}function mr(t,a){const n=["bc-empty-state",`bc-empty-state--size-${t}`];return a&&a.length>0&&n.push(a),n.join(" ")}function hr({icon:t,title:a,description:n,size:r="md",action:o,class:c}){return e.html.div(e.attr.class(e.computedOf(r,c)((s,i)=>mr(s??"md",i))),e.Ensure(t,s=>e.html.div(e.attr.class("bc-empty-state__icon"),f.Icon({icon:s,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,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 br=({id:t,css:a})=>e.Portal("head",e.html.style(e.attr.id(t),e.attr.innerHTML(a)));function de(t,a){return a==null?null:e.html.meta(e.attr.name(t),e.attr.content(e.Value.map(a,n=>String(n))))}function Y(t,a){return a==null?null:e.html.meta(e.attr.property(t),e.attr.content(e.Value.map(a,n=>String(n))))}function Ee(t,a){return a==null?null:e.ForEach(a,n=>Y(t,n))}function gr(t,a){return a==null?null:e.When(e.Value.map(a,n=>Array.isArray(n)),()=>Ee(t,a),()=>Y(t,a))}const fr=t=>{const a=[];if(a.push(Y("og:title",t.title)),a.push(Y("og:type",t.type)),a.push(Y("og:url",t.url)),a.push(Y("og:image",t.image)),a.push(Y("og:description",t.description)),a.push(Y("og:site_name",t.siteName)),a.push(Y("og:locale",t.locale)),t.localeAlternate!=null){const n=Ee("og:locale:alternate",t.localeAlternate);n!=null&&a.push(n)}if(a.push(Y("og:image:alt",t.imageAlt)),a.push(Y("og:image:width",t.imageWidth)),a.push(Y("og:image:height",t.imageHeight)),a.push(Y("og:image:type",t.imageType)),t.images!=null){const n=Ee("og:image",t.images);n!=null&&a.push(n)}if(a.push(Y("og:video",t.video)),a.push(Y("og:video:type",t.videoType)),a.push(Y("og:video:width",t.videoWidth)),a.push(Y("og:video:height",t.videoHeight)),a.push(Y("og:video:secure_url",t.videoSecureUrl)),a.push(Y("og:audio",t.audio)),a.push(Y("og:audio:type",t.audioType)),a.push(Y("og:audio:secure_url",t.audioSecureUrl)),a.push(Y("article:published_time",t.publishedTime)),a.push(Y("article:modified_time",t.modifiedTime)),a.push(Y("article:expiration_time",t.expirationTime)),a.push(gr("article:author",t.author)),a.push(Y("article:section",t.section)),t.tags!=null){const n=Ee("article:tag",t.tags);n!=null&&a.push(n)}return a.push(Y("profile:first_name",t.firstName)),a.push(Y("profile:last_name",t.lastName)),a.push(Y("profile:username",t.username)),a.push(Y("profile:gender",t.gender)),a.push(de("twitter:card",t.twitterCard)),a.push(de("twitter:site",t.twitterSite)),a.push(de("twitter:creator",t.twitterCreator)),a.push(de("twitter:title",e.coalesce(t.twitterTitle,t.title))),a.push(de("twitter:description",e.coalesce(t.twitterDescription,t.description))),a.push(de("twitter:image",e.coalesce(t.twitterImage,t.image))),a.push(de("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(de("robots",t.robots)),a.push(de("keywords",t.keywords)),a.push(de("author",t.metaAuthor)),e.Portal("head",a.filter(n=>n!=null).flat())};function yr(t){const{items:a,onMarkAllRead:n,onClose:r}=t,o=e.computedOf(a)(c=>c.filter(s=>!s.read).length);return e.Use(f.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)(s=>s>0),()=>Ae({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()),f.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(i=>i.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(i=>i.iconColor?`background: ${i.iconColor}14; color: ${i.iconColor}`:"")),f.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(i=>i.source!==void 0),()=>e.html.span(e.attr.class("bc-notification-panel__item-source"),s.map(i=>i.source?.label??""))))),e.When(s.map(i=>!i.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"),f.Icon({icon:"lucide:bell-off",size:"lg"}),e.html.div(c.$.noNotifications))))))}function vr(t){return["bc-breadcrumbs",`bc-breadcrumbs--size-${t}`].join(" ")}function kr(t,a){if(t.length<=a)return t;const n=t[0],r=t.slice(-(a-1));return[n,{isEllipsis:!0},...r]}function Cr({items:t,separator:a="/",maxItems:n,size:r="md"}){const o=e.computedOf(t,n)((c,s)=>s&&s>0?kr(c,s):c);return e.Use(f.BeatUII18n,c=>e.html.nav(e.attr.class(e.Value.map(r,s=>vr(s??"md"))),e.aria.label(c.$.breadcrumbs),e.html.ol(e.attr.class("bc-breadcrumbs__list"),e.ForEach(o,s=>{const i=s.map(l=>"isEllipsis"in l&&l.isEllipsis===!0),u=s.map(l=>!("isEllipsis"in l)&&l.current===!0);return e.When(i,()=>e.html.li(e.attr.class("bc-breadcrumbs__item bc-breadcrumbs__ellipsis"),e.aria.hidden(!0),"..."),()=>{const l=s.map(d=>!("isEllipsis"in d)&&d.href!=null),h=s.map(d=>!("isEllipsis"in d)&&d.href==null&&d.onClick!=null),m=s.map(d=>!("isEllipsis"in d)&&d.icon!=null),p=d=>[e.attr.class(d),e.When(m,()=>f.Icon({icon:s.map(v=>"isEllipsis"in v?"":v.icon??""),size:r,accessibility:"decorative"})),e.html.span(s.map(v=>"isEllipsis"in v?"":v.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(l,()=>e.html.a(e.attr.href(s.map(d=>"isEllipsis"in d?"":d.href??"")),...p("bc-breadcrumbs__link")),()=>e.When(h,()=>e.html.button(e.attr.type("button"),e.on.click(()=>{const d=e.Value.get(s);"isEllipsis"in d||d.onClick?.()}),...p("bc-breadcrumbs__button")),()=>e.html.span(...p("bc-breadcrumbs__text")))))})},()=>e.html.li(e.attr.class("bc-breadcrumbs__separator"),e.aria.hidden(!0),a)))))}const st=({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 Ze(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 Je(t){const a=f.textColorValue(t,"light"),n=f.textColorValue(t,"dark");return[`--link-color: ${a}`,`--link-color-dark: ${n}`,`--link-hover-color: ${a}`,`--link-hover-color-dark: ${n}`].join("; ")}function Zt({href:t,variant:a="default",color:n="primary",colorDisabled:r="base",disabled:o=!1,viewTransition:c=!0,state:s,scroll:i,replace:u,target:l,rel:h},...m){return e.When(o,()=>e.html.span(e.attr.class(e.computedOf(a,o)((p,d)=>Ze(p,d))),e.attr.style(e.computedOf(r)(p=>Je(p??"base"))),...m),()=>ae.Anchor({href:t,...st({viewTransition:c,state:s,scroll:i,replace:u})},e.attr.class(e.computedOf(a,o)((p,d)=>Ze(p,d))),e.attr.style(e.computedOf(n)(p=>Je(p??"primary"))),l?e.attr.target(l):null,h?e.attr.rel(h):null,...m))}const _r=t=>t?t.startsWith("#")?t:`#${t}`:"",wr=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 Jt(t,a,n){const r=wr(t.search),o=r.toString(),c=o?`?${o}`:"",s=_r(t.hash);switch(n){case"exact":return t.pathname+c+s===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 l=Array.from(new URLSearchParams(u.search).entries()).sort(),h=Array.from(r.entries()).sort();return l.length!==h.length?!1:l.every(([m,p],d)=>{const[v,b]=h[d];return m===v&&p===b})}catch{return t.pathname===a}default:return!1}}function Me(t,a){return a==="exact"?e.computedOf(t)(n=>n):e.computedOf(t)(n=>r=>Jt(r,n,a))}function Vr({href:t,matchMode:a="exact",disableWhenActive:n=!0,...r},...o){return e.Use(ae.Location,c=>{const s=c.matchSignal(Me(t,a)),i=e.computedOf(s,n)((u,l)=>l??!0?u:!1);return Zt({...r,href:t,disabled:i},...o)})}function xr({href:t,viewTransition:a=!0,state:n,scroll:r,replace:o,target:c,rel:s,matchMode:i,disableWhenActive:u,variant:l="filled",size:h="md",color:m="base",roundedness:p="sm",disabled:d=!1},...v){return i!==void 0||u!==void 0?e.Use(ae.Location,b=>{const k=i!==void 0?b.matchSignal(Me(t,i)):e.computedOf(b.location)(()=>!1),C=e.computedOf(k,u)((w,y)=>!(y??!0)||!i?!1:w),_=e.computedOf(d,C)((w,y)=>w||y);return mt({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:c,rel:s,variant:l,size:h,color:m,roundedness:p,disabled:_},...v)}):mt({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:c,rel:s,variant:l,size:h,color:m,roundedness:p,disabled:d},...v)}function mt({href:t,viewTransition:a,state:n,scroll:r,replace:o,target:c,rel:s,variant:i="default",size:u="md",color:l="base",roundedness:h="sm",disabled:m=!1,fullWidth:p=!1,loading:d=!1},...v){return e.When(m??!1,()=>e.html.span(e.attr.class(e.computedOf(u,h,d,p)(G.generateButtonClasses)),e.attr.style(e.computedOf(i,l,m)((b,k,C)=>G.generateButtonStyles(b??"filled",k??"base",C))),...v),()=>ae.Anchor({href:t,...st({viewTransition:a,state:n,scroll:r,replace:o})},e.attr.class(e.computedOf(u,h,d,p)(G.generateButtonClasses)),e.attr.style(e.computedOf(i,l,m)((b,k,C)=>G.generateButtonStyles(b??"filled",k??"base",C))),c?e.attr.target(c):null,s?e.attr.rel(s):null,...v))}function Xt(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 s=o;s<=c;s++)r.push(s);return c<a&&(c<a-1&&r.push("dots"),r.push(a)),r}function Ir({currentPage:t,totalPages:a,onPageChange:n,siblings:r=1,showPrevNext:o=!0,showFirstLast:c=!1,size:s="md",justify:i=!1,responsive:u=!1}){const l=e.prop(e.Value.get(r)),h=e.computedOf(u,l,r)((m,p,d)=>m?p:d);return e.Use(f.BeatUII18n,m=>e.html.nav(e.attr.class(e.computedOf(s,i)((p,d)=>{const v=["bc-pagination",`bc-pagination--size-${p}`];return d&&v.push("bc-pagination--justify"),v.join(" ")})),e.aria.label(m.$.paginationLabel),e.When(u,()=>e.WithElement(p=>{const d=()=>{const b=p.clientWidth;if(b===0)return;const k=p.querySelector(".bc-pagination__item");if(!k)return;const C=k.offsetWidth,_=parseFloat(getComputedStyle(p).gap)||0,w=C+_,y=Math.floor((b+_)/w),V=(e.Value.get(o)?2:0)+(e.Value.get(c)?2:0),g=e.Value.get(a),I=y-V,B=Math.max(0,Math.floor((I-5)/2)),N=Math.floor((g-3)/2);l.set(Math.min(B,Math.max(0,N)))},v=new ResizeObserver(d);return v.observe(p),requestAnimationFrame(d),e.OnDispose(()=>v.disconnect())})),e.When(c,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((p,d)=>p<=1||d<=1)),e.aria.label(m.$.firstPage),e.on.click(p=>{p.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)((p,d)=>p<=1||d<=1)),e.aria.label(m.$.previousPage),e.on.click(p=>{p.preventDefault();const d=e.Value.get(t);d>1&&n(d-1)}),"‹")),e.ForEach(e.computedOf(t,a,h)((p,d,v)=>Xt(p,d,v)),p=>{const d=p.map(b=>b==="dots"),v=e.computedOf(p,t)((b,k)=>b===k);return e.When(d,()=>e.html.span(e.attr.class("bc-pagination__dots"),"…"),()=>e.html.button(e.attr.class(e.Value.map(v,b=>b?"bc-pagination__item bc-pagination__item--active":"bc-pagination__item")),e.WithElement(b=>{e.Value.on(v,k=>{k?b.setAttribute("aria-current","page"):b.removeAttribute("aria-current")})}),e.on.click(b=>{b.preventDefault();const k=e.Value.get(p);k!=="dots"&&k!==e.Value.get(t)&&n(k)}),p.map(b=>String(b))))}),e.When(o,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((p,d)=>p>=d||d<=1)),e.aria.label(m.$.nextPage),e.on.click(p=>{p.preventDefault();const d=e.Value.get(t),v=e.Value.get(a);d<v&&n(d+1)}),"›")),e.When(c,()=>e.html.button(e.attr.class("bc-pagination__item"),e.attr.disabled(e.computedOf(t,a)((p,d)=>p>=d||d<=1)),e.aria.label(m.$.lastPage),e.on.click(p=>{p.preventDefault();const d=e.Value.get(a);d>1&&n(d)}),"»"))))}const Kt={mark:e.makeProviderMark("SidebarContext"),create:t=>({value:{backgroundMode:"light"},dispose:()=>{}})};function Sr({backgroundMode:t="light"},...a){return e.Provide(Kt,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 Xe({rail:t,header:a},...n){return Ve.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 Qt(t,...a){const n=st({viewTransition:t.viewTransition??!0,state:t.state,scroll:t.scroll,replace:t.replace});return ae.Anchor({href:t.href,...n},...a)}function ea(...t){return e.html.span(...t)}function ta(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 aa(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"),f.Icon({icon:t.icon}))),a.push(e.html.span(e.attr.class("bc-sidebar-link__content"),t.content)),t.right!=null&&a.push(e.html.span(e.attr.class("bc-sidebar-link__right"),t.right)),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)}),f.Icon({icon:t.action?.icon}))),"onClick"in t?ta(t,...a):e.Use(ae.Location,n=>{const r=n.matchSignal(Me(t.href,"exact"),{includeSearch:!1,includeHash:!1});return e.When(r,()=>ea(...a),()=>Qt(t,...a))})}function Dr({rail:t=!0,icon:a,header:n,startOpen:r=!0},...o){const c=e.Value.deriveProp(r),s=oe.sessionId("sidebar-group"),i=`${s}-content`;return Xe({},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(s),aa({icon:a,onClick:()=>c.update(u=>!u),ariaExpanded:c,ariaControls:i,right:e.html.span(e.attr.class("bc-sidebar-group-collapsible-indicator"),f.Icon({icon:"lucide:chevron-down",color:"base"})),content:n}),Xe({rail:t},e.attr.id(i),Le({open:c},...o)))}function $r(){return e.html.hr(e.attr.class("bc-sidebar-separator"))}function Tr(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 Or(t,a){if(t!=="filled")return"";const n=new Map,r=f.backgroundValue(a,"solid","light"),o=f.backgroundValue(a,"solid","dark");n.set("--tabs-filled-inactive-bg",r.backgroundColor),n.set("--tabs-filled-inactive-text","var(--color-white)");const c=f.hoverBackgroundValue(a,"solid","light");n.set("--tabs-filled-inactive-bg-hover",c.backgroundColor);const s=f.hoverBackgroundValue(a,"solid","dark");n.set("--tabs-filled-inactive-bg-dark-hover",s.backgroundColor),n.set("--tabs-filled-inactive-bg-dark",o.backgroundColor),n.set("--tabs-filled-inactive-text-dark",o.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)");const i=a==="white"||a==="black"||a==="transparent"?"var(--color-white)":Z.getColorVar(a,400);return n.set("--tabs-filled-active-text-dark",i),Array.from(n.entries()).map(([u,l])=>`${u}: ${l}`).join("; ")}function Br(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 Oe(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 s=a[o];if(!e.Value.get(s.disabled??!1))return o;o+=n,o>=r?o=0:o<0&&(o=r-1),c++}return t}function Er(t){const{items:a,value:n,onChange:r,size:o="md",variant:c="default",color:s="primary",disabled:i=!1,orientation:u="horizontal",showContent:l=!0,ariaLabel:h}=t,m=oe.sessionId("tablist"),p=e.prop(-1),d=a.map((b,k)=>{const C=e.computedOf(n)(V=>V===b.key),_=e.computedOf(i,b.disabled)((V,g)=>V||g),w=`${m}-tab-${b.key}`,y=`${m}-panel-${b.key}`;return{item:b,index:k,isActive:C,isTabDisabled:_,tabId:w,panelId:y}}),v=b=>{if(e.Value.get(i))return;const C=p.value,_=e.Value.get(u)==="horizontal";let w=C;switch(b.key){case(_?"ArrowRight":"ArrowDown"):b.preventDefault(),w=Oe(C,a,1);break;case(_?"ArrowLeft":"ArrowUp"):b.preventDefault(),w=Oe(C,a,-1);break;case"Home":b.preventDefault(),w=Oe(-1,a,1);break;case"End":b.preventDefault(),w=Oe(a.length,a,-1);break;case"Enter":case" ":if(b.preventDefault(),C>=0&&C<a.length){const y=a[C];e.Value.get(y.disabled??!1)||r?.(y.key)}break}w!==C&&w>=0&&w<a.length&&(p.set(w),setTimeout(()=>{const y=document.querySelector(`[data-tab-index="${w}"]`);y&&y.focus()},0))};return e.html.div(e.attr.class(e.computedOf(o,u,i,c)((b,k,C,_)=>Tr(b??"md",k??"horizontal",C??!1,_??"default"))),e.attr.style(e.computedOf(c,s)((b,k)=>Or(b??"default",k??"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(h),e.on.keydown(v),...d.map(({item:b,index:k,isActive:C,isTabDisabled:_,tabId:w,panelId:y})=>e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(o,C,_)((V,g,I)=>Br(V??"md",g??!1,I??!1))),e.attr.id(w),e.attr.role("tab"),e.attr.tabindex(e.computedOf(C,p)((V,g)=>V||g===k?0:-1)),e.aria.selected(C),e.aria.controls(y),e.aria.disabled(_),e.attr.disabled(_),e.dataAttr["tab-index"](String(k)),e.aria.label(b.ariaLabel),e.on.click(V=>{V.preventDefault(),e.Value.get(b.disabled??!1)||e.Value.get(i)||(r?.(b.key),p.set(k))}),e.on.focus(()=>{p.set(k)}),b.label))),e.When(l??!0,()=>e.html.div(e.attr.class("bc-tabs__panels"),...d.map(({item:b,isActive:k,tabId:C,panelId:_})=>e.When(k,()=>e.html.div(e.attr.class("bc-tabs__panel"),e.attr.id(_),e.attr.role("tabpanel"),e.attr.tabindex(0),e.aria.labelledby(C),b.content()))))))}function na(t,a,n,r,o,c,s){const i=t.map(d=>d.children!=null&&d.children.length>0),u=e.computedOf(r,t)((d,v)=>d.has(v.id)),l=e.computedOf(n,t)((d,v)=>d===v.id),h=t.map(d=>d.children??[]),m=()=>{o?.(e.Value.get(t).id)},p=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(l,s)((d,v)=>["bc-tree-item__row",`bc-tree-item__row--size-${v??"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(l),e.WithElement(d=>{const v=e.computedOf(i,u)((b,k)=>b?String(k):null);e.Value.on(v,b=>{b!=null?d.setAttribute("aria-expanded",b):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(p),f.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"),f.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(Le({open:u},e.html.div(e.attr.class("bc-tree-item__children"),e.attr.role("group"),e.ForEach(h,d=>na(d,a+1,n,r,o,c,s))))),()=>e.Empty))}function Pr({items:t,selectedId:a,onSelect:n,expandedIds:r,onToggle:o,size:c="md"},...s){const i=e.prop(new Set),u=r??i,l=a??e.prop(void 0),h=m=>{const p=e.Value.get(u),d=!p.has(m);if(r==null){const v=new Set(p);d?v.add(m):v.delete(m),i.set(v)}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=>na(m,0,l,u,n,h,c)),...s)}function Ar(t){return te.Overlay((a,n)=>{let r=n;const o=()=>r();return t(i=>{const{size:u="md",side:l="right",dismissable:h=!0,showCloseButton:m=!0,onClose:p,overlayEffect:d="opaque",container:v="body",header:b,body:k,footer:C}=i;r=n;const _=e.prop("capturing");e.Value.on(h,V=>{_.set(V?"capturing":"non-capturing")});const w=e.computedOf(b!=null,m)((V,g)=>V||g),y=e.WithElement(V=>{const g=le.useAnimatedElementToggle({initialStatus:"closed",element:V});g.listenOnClosed(()=>{n()}),r=()=>{g.close()},Pe.g(()=>g.open());const B=oe.sessionId("drawer"),N=b!=null?`${B}-header`:void 0,O=`${B}-body`;return e.html.div(e.attr.class(e.computedOf(u,l,g.status)((E,z,K)=>`bc-drawer bc-drawer--size-${E} bc-drawer--container-${v} bc-drawer--side-${z} bc-drawer--status-${K}`)),e.attr.role("dialog"),e.aria.modal(!0),...N?[e.aria.labelledby(N)]:[],e.aria.describedby(O),e.attr.tabindex(-1),e.attr.id(B),e.dataAttr.focusTrap("true"),te.FocusTrap({active:!0,escapeDeactivates:!1,initialFocus:()=>document.querySelector(`#${B} [aria-label="Close drawer"]`)||null}),e.on.mousedown(E=>E.stopPropagation()),e.When(w,()=>Ye({header:e.html.div(e.attr.class("bc-drawer__header"),e.html.div(e.attr.id(N),b),e.When(m,()=>e.Use(f.BeatUII18n,E=>W.CloseButton({size:"sm",onClick:o,label:E.$.closeDrawer})))),body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(O),k),footer:C&&e.html.div(e.attr.class("bc-drawer__footer"),C)}),()=>Ye({body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(O),k),footer:C&&e.html.div(e.attr.class("bc-drawer__footer"),C)})))});a({mode:_,effect:d??"opaque",container:v,content:y,onClickOutside:()=>{p?.(),o()},onEscape:()=>{p?.(),o()}})},()=>{o()})})}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 Mr(t){const{content:a,placement:n="top",showDelay:r=250,hideDelay:o=500,mainAxisOffset:c=8,crossAxisOffset:s=0,showOn:i="hover-focus"}=t,u=oe.sessionId("tooltip");return e.Fragment(e.aria.describedby(u),ie.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:s,showOn:i,closable:!0,role:"tooltip",arrow:l=>{const h=l.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(h.map(m=>`bc-tooltip__arrow-${m}`)),e.style.transform(l.map(({x:m,y:p})=>m==null&&p==null?"":m!=null?`translate(${m}px, 0)`:`translate(0, ${p}px)`)),Lr(h))}}))}function Nr(t){const{content:a,placement:n="bottom",showDelay:r=0,hideDelay:o=0,mainAxisOffset:c=8,crossAxisOffset:s=0,showOn:i="click",closable:u=!0,role:l="dialog",hasPopup:h="dialog"}=t,m=oe.sessionId("popover"),p=typeof a=="function"?a:()=>a;return e.Fragment(e.aria.describedby(m),ie.Flyout({content:()=>e.Fragment(e.attr.class("bc-popover"),e.attr.role(l),e.attr.id(m),p()),placement:n,showDelay:r,hideDelay:o,mainAxisOffset:c,crossAxisOffset:s,showOn:i,closable:u,role:l,hasPopup:h}))}function Fr(t,a,n,r,o,c){const s=f.backgroundValue(t,"solid","light"),i=f.backgroundValue(t,"solid","dark");return[`--ribbon-bg: ${s.backgroundColor}`,`--ribbon-text: ${s.textColor}`,`--ribbon-bg-dark: ${i.backgroundColor}`,`--ribbon-text-dark: ${i.textColor}`,`--ribbon-inset: ${ze(a)}`,`--ribbon-offset: ${ze(n)}`,`--ribbon-width: ${ze(r)}`,`--ribbon-angle: ${o}deg`,`--ribbon-corner: ${c}`].join("; ")}function ze(t){return t==null?null:typeof t=="number"?`${t}px`:t}function Wr({color:t="primary",class:a,inset:n=0,offset:r=40,width:o=100,angle:c=45,corner:s="top-end"},...i){return e.html.div(e.attr.class("bc-ribbon"),e.attr.style(e.computedOf(t,n,r,o,c,s)(Fr)),e.attr.class(a),...i)}function Ur(t,a){const{dismissable:n=!0,showCloseButton:r=!0,overlayEffect:o="opaque",container:c="body",padding:s=32}=t;return te.Overlay((i,u)=>{let l=()=>{};return a(p=>{l=u;const d=e.prop(typeof n!="boolean"||n?"capturing":"non-capturing");let v=typeof n=="boolean"?n:!0;e.Value.on(n,k=>{v=k,d.set(k?"capturing":"non-capturing")});const b=e.html.div(e.attr.class("bc-lightbox"),e.When(r,()=>e.Use(f.BeatUII18n,k=>e.html.div(e.attr.class("bc-lightbox__close"),W.CloseButton({size:"md",label:k.$.closeModal,onClick:()=>{l(),u()}}))),()=>null),e.html.div(e.attr.class("bc-lightbox__viewport"),e.attr.style(e.computedOf(s)(k=>`padding:${typeof k=="number"?k+"px":k}`)),e.html.div(e.attr.class("bc-lightbox__content"),p)));i({mode:d,effect:o??"opaque",container:c,content:b,onClickOutside:()=>{v&&(l(),u())},onEscape:()=>{v&&(l(),u())}})},()=>{l(),u()})})}function Rr(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 zr(t){return`--announcement-bar-bg-color: ${Z.getColorVar(t,600)}`}function jr({color:t="primary",icon:a,closable:n=!1,onDismiss:r,class:o},...c){const s=e.prop(!0);return e.When(s,()=>{const i=e.Value.map(n,u=>!!u||r!=null);return e.html.div(e.attr.class(e.computedOf(i,o)((u,l)=>Rr(u,l))),e.attr.style(e.Value.map(t,u=>zr(u))),e.html.div(e.attr.class("bc-announcement-bar__content"),e.When(e.Value.map(a,u=>u!=null),()=>e.html.div(e.attr.class("bc-announcement-bar__icon"),f.Icon({icon:a,size:"sm",accessibility:"decorative"}))),e.html.div(e.attr.class("bc-announcement-bar__text"),...c),e.When(i,()=>e.html.div(e.attr.class("bc-announcement-bar__close"),W.CloseButton({size:"xs",color:"white",onClick:()=>{s.set(!1),r?.()}})))))})}function Hr(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 s=0;for(const[i,u]of o)for(let l=0;l<u.length;l++)c.push({item:u[l],globalIndex:s++,sectionStart:l===0&&i?i:void 0});return c}function qr(t,a){const{placeholder:n,emptyMessage:r,size:o="md",container:c="body"}=t;return e.Use(f.BeatUII18n,s=>te.Overlay((i,u)=>{const l=n??s.$.typeACommand,h=r??s.$.noResultsFound;return a(p=>{const d=e.prop(""),v=e.prop(0);d.on(()=>v.set(0));const k=`${oe.sessionId("command-palette")}-input`,C=d.map(y=>Hr(p,y??"")),_=C.map(y=>y.length===0),w=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()),te.FocusTrap({escapeDeactivates:!1,initialFocus:()=>document.getElementById(k)}),e.html.div(e.attr.class("bc-command-palette__header"),e.html.span(e.attr.class("bc-command-palette__search-icon"),f.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(k),e.attr.placeholder(l),e.attr.autocomplete("off"),e.on.input(y=>{d.set(y.target.value)}),e.on.keydown(y=>{const V=e.Value.get(C),g=e.Value.get(v);switch(y.key){case"ArrowDown":y.preventDefault(),v.set(Math.min(g+1,V.length-1));break;case"ArrowUp":y.preventDefault(),v.set(Math.max(g-1,0));break;case"Enter":y.preventDefault();{const I=V.find(B=>B.globalIndex===g);I&&(I.item.onSelect(),u())}break}}))),e.html.div(e.attr.class("bc-command-palette__body"),e.When(_,()=>e.html.div(e.attr.class("bc-command-palette__empty"),h),()=>e.ForEach(C,y=>{const V=e.computedOf(v,y)((g,I)=>g===I.globalIndex);return e.html.div(e.attr.class("bc-command-palette__section"),e.When(y.map(g=>g.sectionStart!=null),()=>e.html.div(e.attr.class("bc-command-palette__section-title"),y.map(g=>g.sectionStart??""))),e.html.div(e.attr.class(e.Value.map(V,g=>`bc-command-palette__item${g?" 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(()=>{v.set(e.Value.get(y).globalIndex)}),e.When(y.map(g=>g.item.icon!=null),()=>e.html.span(e.attr.class("bc-command-palette__item-icon"),f.Icon({icon:y.map(g=>g.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(g=>g.item.label)),e.When(y.map(g=>g.item.description!=null),()=>e.html.span(e.attr.class("bc-command-palette__item-description"),y.map(g=>g.item.description??"")))),e.When(y.map(g=>g.item.shortcut!=null&&g.item.shortcut.length>0),()=>e.html.span(e.attr.class("bc-command-palette__item-shortcut"),e.ForEach(y.map(g=>g.item.shortcut??[]),g=>e.html.kbd(e.attr.class("bc-kbd bc-kbd--size-xs"),g))))))}))));i({mode:"capturing",effect:"transparent",container:c,content:w,onClickOutside:u,onEscape:u})},u)}))}function Gr(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 Yr(t){const{items:a,onClose:n,position:r}=t,o=e.prop(""),c=e.prop(0);o.on(()=>c.set(0));const s=e.computedOf(a,o)((l,h)=>Gr(l,h??"")),i=l=>{const h=e.Value.get(s),m=e.Value.get(c);switch(l.key){case"ArrowDown":l.preventDefault(),c.set(Math.min(m+1,h.length-1));break;case"ArrowUp":l.preventDefault(),c.set(Math.max(m-1,0));break;case"Enter":l.preventDefault();{const p=h.find(d=>d.index===m);p&&(p.item.onSelect(),n())}break;case"Escape":l.preventDefault(),n();break}},u=r?e.computedOf(r)(l=>l?`position: absolute; left: ${l.x}px; top: ${l.y}px;`:""):void 0;return e.Use(f.BeatUII18n,l=>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(l.$.typeACommand),e.attr.autofocus(!0),e.attr.value(o),e.on.input(h=>{o.set(h.target.value),c.set(0)}))),e.html.div(e.attr.class("bc-block-command-palette__list"),e.ForEach(s,h=>{const m=e.computedOf(c,h)((p,d)=>p===d.index);return e.html.div(e.attr.class(e.Value.map(m,p=>`bc-block-command-palette__item${p?" bc-block-command-palette__item--selected":""}`)),e.on.click(()=>{e.Value.get(h).item.onSelect(),n()}),e.on.mouseenter(()=>{c.set(e.Value.get(h).index)}),e.html.span(e.attr.class("bc-block-command-palette__item-icon"),f.Icon({icon:h.map(p=>p.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"),h.map(p=>p.item.label)),e.When(h.map(p=>p.item.description!=null),()=>e.html.span(e.attr.class("bc-block-command-palette__item-desc"),h.map(p=>p.item.description??"")))),e.When(h.map(p=>p.item.shortcut!=null),()=>e.html.span(e.attr.class("bc-block-command-palette__item-shortcut"),h.map(p=>p.item.shortcut??""))))})),e.When(e.computedOf(s)(h=>h.length===0),()=>e.html.div(e.attr.class("bc-block-command-palette__empty"),l.$.noMatchingCommands))))}function Zr(t,a){const{title:n,body:r,icon:o="lucide:alert-triangle",color:c="danger",consequences:s,confirmText:i,cancelText:u,onConfirm:l,onCancel:h,dismissable:m=!0}=t,p={size:"sm",showCloseButton:!1,dismissable:m,onClose:h};return e.Use(f.BeatUII18n,d=>te.Modal(p,(v,b)=>{const k=()=>{l?.(),b()},C=()=>{h?.(),b()};return a(()=>{v({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,w=>Z.getColorVar(w,100))),e.style.color(e.Value.map(c,w=>Z.getColorVar(w,600))),f.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),s&&s.length>0?e.html.ul(e.attr.class("bc-dialog__consequences"),...s.map(w=>e.html.li(w))):e.Empty),footer:e.Fragment(e.attr.class("bc-dialog__actions"),G.Button({variant:"light",size:"sm",onClick:C},e.coalesce(u,d.$.cancel)),G.Button({color:c,variant:"filled",size:"sm",onClick:k},e.coalesce(i,d.$.confirm)))})},b)}))}const Jr={info:{icon:"lucide:info",color:"info"},success:{icon:"lucide:check-circle",color:"success"},warning:{icon:"lucide:alert-triangle",color:"warning"},error:{icon:"lucide:alert-circle",color:"danger"}};function Xr(t,a){const{title:n,body:r,variant:o="info",icon:c,okText:s,onOk:i,dismissable:u=!0}=t,l=Jr[o],h=c??l.icon,m=l.color,p={size:"sm",showCloseButton:!1,dismissable:u,onClose:i};return e.Use(f.BeatUII18n,d=>te.Modal(p,(v,b)=>{const k=()=>{i?.(),b()};return a(()=>{v({header:e.html.div(e.attr.class("bc-dialog__header-row"),e.html.div(e.attr.class("bc-dialog__icon"),e.style.backgroundColor(Z.getColorVar(m,100)),e.style.color(Z.getColorVar(m,600)),f.Icon({icon:h,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"),G.Button({color:m,variant:"filled",size:"sm",onClick:k},e.coalesce(s,d.$.ok)))})},b)}))}function Kr(t,a){const{title:n,body:r,placeholder:o,defaultValue:c="",confirmText:s,cancelText:i,onConfirm:u,onCancel:l,dismissable:h=!0}=t,m={size:"sm",showCloseButton:!1,dismissable:h,onClose:l};return e.Use(f.BeatUII18n,p=>te.Modal(m,(d,v)=>{const b=e.prop(c),k=()=>{u?.(b.value),v()},C=()=>{l?.(),v()};return a(()=>{b.set(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(b),e.attr.placeholder(o??""),e.on.input(e.emitValue(w=>b.set(w))),e.on.keydown(w=>{w.key==="Enter"&&(w.preventDefault(),k())}))),footer:e.Fragment(e.attr.class("bc-dialog__actions"),G.Button({variant:"light",size:"sm",onClick:C},e.coalesce(i,p.$.cancel)),G.Button({color:"primary",variant:"filled",size:"sm",onClick:k},e.coalesce(s,p.$.confirm)))})},v)}))}function Qr(t){return`bc-kbd bc-kbd--size-${t}`}function eo({size:t="sm"}={},...a){return e.html.kbd(e.attr.class(e.Value.map(t,n=>Qr(n??"sm"))),...a)}function to(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\//i.test(t)}let Be=null;function ao(){return typeof window<"u"&&window.YT?.Player?Promise.resolve(window.YT):Be||(Be=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)}),Be)}function no(t){const{url:a,playing:n=!1,loop:r=!1,controls:o=!1,volume:c=1,muted:s=!1,playbackRate:i=1,pip:u=!1,playsinline:l=!0,width:h,height:m,progressInterval:p=1e3,seekTo:d,config:v,onReady:b,onStart:k,onPlay:C,onPause:_,onBuffer:w,onBufferEnd:y,onEnded:V,onError:g,onDuration:I,onSeek:B,onProgress:N,onPlaybackRateChange:O,onPlaybackQualityChange:E}=t;function z(S){return/\.m3u8(\?|$)/i.test(S)}function K(S){try{const P=S.canPlayType("application/vnd.apple.mpegurl");return P==="probably"||P==="maybe"}catch{return!1}}const L=e.prop("file");let D=null,M=null,U=null;function j(){try{U?.destroy()}catch{}U=null}const H=[];H.push(e.Value.on(a,S=>{typeof S=="string"&&S.length>0&&to(S)?L.value="youtube":(L.value="file",D&&Q())}));async function Q(){const S=D;if(!S)return;const P=e.Value.get(a);if(typeof P!="string"||P.length===0)return;j();const R=v?.file?.forceHLS??!1;if(z(P)||R){if(K(S)){S.setAttribute("src",P);try{S.load()}catch{}return}if(typeof window>"u")return;try{const J=await Promise.resolve().then(()=>require("./hls.light.min-C6xKDzRR.cjs")).then(fe=>fe.hls_light_min),xe=J;let Ce=xe.default??xe.Hls??J;for(let fe=0;fe<3&&(typeof Ce=="object"&&Ce!=null&&"default"in Ce);fe++)Ce=Ce.default;if(typeof Ce=="function"){const fe=Ce;if(typeof fe.isSupported=="function"&&fe.isSupported()){S.removeAttribute("src");try{S.load()}catch{}const Fe=new fe(v?.hls);U=Fe,Fe.attachMedia(S),Fe.loadSource(P)}else{S.setAttribute("src",P);try{S.load()}catch{}}}else{S.setAttribute("src",P);try{S.load()}catch{}}}catch(J){g?.(J),S.setAttribute("src",P);try{S.load()}catch{}}return}S.setAttribute("src",P);try{S.load()}catch{}}function ee(){M?.();const S=e.Value.get(p)??1e3;M=Pe.T(()=>{const P=D;if(!P)return;const R=P.duration||0,J=P.currentTime||0,xe=P.buffered?.length?P.buffered.end(P.buffered.length-1):0;N?.({played:R>0?J/R:0,playedSeconds:J,loaded:R>0?Math.min(xe,R)/R:0,loadedSeconds:Math.min(xe,R)})},S)}function re(S){if(S!=null)return typeof S=="number"?`${S}px`:S}const ge=e.html.video(e.WithElement(S=>{D=S,b?.();try{D.playbackRate=e.Value.get(i)??1}catch{}D.muted=!!(e.Value.get(s)??!1),D.loop=!!(e.Value.get(r)??!1),D.controls=!!(e.Value.get(o)??!1),D.playsInline!=null&&(!!(e.Value.get(l)??!0)?D.setAttribute("playsinline",""):D.removeAttribute("playsinline")),e.Value.get(n)&&(D.play?.().catch(()=>{}),k?.());try{const P=!!(e.Value.get(u)??!1),R=document,J=D;P?typeof J.requestPictureInPicture=="function"&&R.pictureInPictureElement!==D&&J.requestPictureInPicture().catch(()=>{}):R.pictureInPictureElement===D&&typeof R.exitPictureInPicture=="function"&&R.exitPictureInPicture().catch(()=>{})}catch{}ee(),Q()}),e.style.width(e.Value.map(h,re)),e.style.height(e.Value.map(m,re)),e.on.play(()=>C?.()),e.on.playing(()=>{k?.(),y?.()}),e.on.pause(()=>_?.()),e.on.waiting(()=>w?.()),e.on.canplay(()=>{const S=D?.duration;S!=null&&Number.isFinite(S)&&I?.(S)}),e.on.ended(()=>V?.()),e.on.error(S=>{U||g?.(S)}));let we=null,q=null,ve=null;function ke(){const S=e.Value.get(a);!we||typeof S!="string"||ao().then(P=>{const R=ra(S);if(R){if(q){q.loadVideoById({videoId:R});return}q=new P.Player(we,{videoId:R,playerVars:ro(t),events:{onReady:()=>{b?.(),$(),e.Value.get(n)&&k?.(),Ne()},onStateChange:J=>{switch(J.data){case P.PlayerState.PLAYING:C?.(),y?.();break;case P.PlayerState.PAUSED:_?.();break;case P.PlayerState.BUFFERING:w?.();break;case P.PlayerState.ENDED:V?.();break}},onError:J=>g?.(J),onPlaybackRateChange:J=>O?.(J.data),onPlaybackQualityChange:J=>E?.(J.data)}})}})}function Ne(){ve?.();const S=e.Value.get(p)??1e3;ve=Pe.T(()=>{if(!q)return;const P=q.getDuration?.()??0,R=q.getCurrentTime?.()??0,J=q.getVideoLoadedFraction?.()??0;N?.({played:P>0?R/P:0,playedSeconds:R,loaded:J,loadedSeconds:J*P})},S)}function $(){if(!q)return;try{const R=e.Value.get(i)??1;q.setPlaybackRate?.(R)}catch{}try{const R=Math.round(Math.min(Math.max(e.Value.get(c)??1,0),1)*100);q.setVolume?.(R)}catch{}try{e.Value.get(s)??!1?q.mute?.():q.unMute?.()}catch{}e.Value.get(n)??!1?q.playVideo?.():q.pauseVideo?.();const P=e.Value.get(d);typeof P=="number"&&Number.isFinite(P)&&(q.seekTo?.(P,!0),B?.(P))}const F=e.html.div(e.WithElement(S=>{we=S,ke(),b?.()}));H.push(e.Value.on(a,()=>{L.value==="youtube"&&ke()})),H.push(e.Value.on(n,()=>{L.value==="file"&&D?e.Value.get(n)?D.play?.().catch(()=>{}):D.pause?.():L.value==="youtube"&&q&&(e.Value.get(n)?q.playVideo?.():q.pauseVideo?.())})),H.push(e.Value.on(c,()=>{if(L.value==="file"&&D)D.volume=Math.min(Math.max(e.Value.get(c)??1,0),1);else if(L.value==="youtube"&&q){const S=Math.round(Math.min(Math.max(e.Value.get(c)??1,0),1)*100);q.setVolume?.(S)}})),H.push(e.Value.on(s,()=>{L.value==="file"&&D?D.muted=!!e.Value.get(s):L.value==="youtube"&&q&&(e.Value.get(s)?q.mute?.():q.unMute?.())})),H.push(e.Value.on(i,()=>{if(L.value==="file"&&D)try{D.playbackRate=e.Value.get(i)??1}catch{}else L.value==="youtube"&&q&&q.setPlaybackRate?.(e.Value.get(i)??1)})),H.push(e.Value.on(u,async()=>{if(!(L.value!=="file"||!D))try{const S=!!(e.Value.get(u)??!1),P=document,R=D;S?typeof R.requestPictureInPicture=="function"&&P.pictureInPictureElement!==D&&await R.requestPictureInPicture()?.catch(()=>{}):P.pictureInPictureElement===D&&typeof P.exitPictureInPicture=="function"&&await P.exitPictureInPicture()?.catch(()=>{})}catch{}})),H.push(e.Value.on(d??null,()=>{const S=e.Value.get(d);if(S!=null)if(L.value==="file"&&D)try{D.currentTime=S,B?.(S)}catch{}else L.value==="youtube"&&q&&(q.seekTo?.(S,!0),B?.(S))}));const X=e.html.div(e.attr.class("bc-base-video"),e.style.width(e.Value.map(h,re)),e.style.height(e.Value.map(m,re)),e.When(e.Value.map(L,S=>S==="youtube"),()=>F,()=>ge));return e.Fragment(e.OnDispose(...H),X)}function ra(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 ro(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"?ra(r):null;return n&&o&&(a.loop=1,a.playlist=o),a}const it="https://cdn.jsdelivr.net/npm/pdfjs-dist@5.4.394/",oo=t=>{if(!t||typeof t!="object")return!1;const a=t;return!!(a.getDocument&&typeof a.getDocument=="function")};function lo(){if(typeof window>"u")return;const a=window.pdfjsLib;a?.GlobalWorkerOptions?.workerSrc||a?.GlobalWorkerOptions&&(a.GlobalWorkerOptions.workerSrc=`${it}build/pdf.worker.min.mjs`)}const so=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)}),io=async()=>{const t=window;if(t.pdfjsLib&&oo(t.pdfjsLib))return t.pdfjsLib;if(await so(`${it}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 je=null,ht=!1;async function co(){if(je)return je;!ht&&typeof window<"u"&&(lo(),ht=!0);const t=await io();return je=t,t.GlobalWorkerOptions&&(t.GlobalWorkerOptions.workerSrc=`${it}build/pdf.worker.min.mjs`),t}function uo(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,s=n&3;for(let i=0;i<c;i++)if(r.getUint32(i*4)!==o.getUint32(i*4))return!1;for(let i=n-s;i<n;i++)if(t[i]!==a[i])return!1;return!0}function po(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 l=0;l<r;l++)if(o[l]!==c[l])return!1;const s=n&3,i=new Uint8Array(t,r*4,s),u=new Uint8Array(a,r*4,s);for(let l=0;l<s;l++)if(i[l]!==u[l])return!1;return!0}function mo(t,a){try{return typeof t=="string"&&typeof a=="string"?t===a:t instanceof Uint8Array&&a instanceof Uint8Array?uo(t,a):t instanceof ArrayBuffer&&a instanceof ArrayBuffer?po(t,a):!1}catch{return!1}}function He(t){return typeof t=="string"?t:t instanceof Uint8Array?t.slice():t instanceof ArrayBuffer?t.slice(0):t}function ho({source:t,page:a=1,fit:n="width",scale:r=1,rotation:o=0,quality:c=2,renderTextLayer:s=!0,renderAnnotationLayer:i=!1,onPageChange:u,onLoadComplete:l},...h){const m=co();let p=He(e.Value.get(t)),d=null,v=e.Value.get(a),b=null;return e.Use(f.BeatUII18n,k=>e.Fragment(e.OnDispose(()=>{if(b){try{b.cancel()}catch{}b=null}d!=null&&(d.destroy(),d=null)}),ae.ElementRect(C=>{const _=e.delaySignal(C.map(w=>w==null?null:{width:w.width,height:w.height},(w,y)=>w!=null&&y!=null&&w.width===y.width&&w.height===y.height),100);return e.Ensure(_,w=>ae.Query({request:e.computedOf(t,a,n,r,o,c,s,i,w)((y,V,g,I,B,N,O,E,z)=>({source:y,page:V,fit:g,scale:I,rotation:B,quality:N,renderTextLayer:O,renderAnnotationLayer:E,containerWidth:z.width,containerHeight:z.height})),load:async({request:y})=>{const V=await m,g=y.source,I=He(g),B=He(g);(d==null||!mo(p,I))&&(d!=null&&(d.destroy(),d=null),p=I,d=await V.getDocument(B).promise,l?.({pdfDoc:d}));const N=y.page<1||y.page>d.numPages?1:y.page;u!=null&&N!==v&&(v=N,u(N));const O=await d.getPage(N);let E;if(y.fit==="none")E=y.scale;else{const L=O.getViewport({scale:1,rotation:y.rotation}),D=L.width/L.height,M=y.containerWidth/y.containerHeight;switch(y.fit){case"width":E=y.containerWidth/L.width;break;case"height":E=y.containerHeight/L.height;break;case"contain":E=Math.min(y.containerWidth/L.width,y.containerHeight/L.height);break;case"cover":D>M?E=y.containerHeight/L.height:E=y.containerWidth/L.width;break}}const z=O.getViewport({scale:E,rotation:y.rotation}),K=O.getViewport({scale:E*y.quality,rotation:y.rotation});return{pdfWidth:z.width,pdfHeight:z.height,canvasWidth:Math.floor(z.width),canvasHeight:Math.floor(z.height),highResWidth:Math.floor(K.width),highResHeight:Math.floor(K.height),render:async(L,D,M)=>{if(b)try{b.cancel(),await b.promise.catch(()=>{})}catch{}L.width=K.width,L.height=K.height,L.style.width=`${z.width}px`,L.style.height=`${z.height}px`;const U=L.getContext("2d");if(!U)throw new Error("Failed to get canvas context");const j=O.render({canvasContext:U,canvas:L,viewport:K});b=j;try{await j.promise}catch(H){if((H instanceof Error?H.name:H?.name)!=="RenderingCancelledException")throw H;return}finally{b===j&&(b=null)}if(y.renderTextLayer&&D!=null){D.innerHTML="";try{const H=await O.getTextContent(),Q=V.TextLayer;Q!=null&&await new Q({textContentSource:H,container:D,viewport:z}).render()}catch(H){console.warn("Failed to render text layer:",H)}}if(y.renderAnnotationLayer&&M!=null){M.innerHTML="",M.style.width=`${z.width}px`,M.style.height=`${z.height}px`;try{const H=await O.getAnnotations(),Q=V.AnnotationLayer;if(Q!=null&&H.length>0){const ee={getDestinationHash:()=>"",getAnchorUrl:ge=>ge,executeNamedAction:()=>{},executeSetOCGState:()=>{},cachePageRef:()=>{}};await new Q({div:M,page:O,viewport:z,linkService:ee,annotationStorage:null}).render({viewport:z,div:M,annotations:H,page:O,linkService:ee,renderForms:!0})}}catch(H){console.warn("Failed to render annotation layer:",H)}}}}},convertError:y=>y instanceof Error?y.message:JSON.stringify(y),pending:()=>e.html.div(e.attr.class("bc-pdf-page-viewer__loading"),f.Icon({icon:"line-md:loading-twotone-loop",size:"lg"}),e.html.span(e.attr.class("bc-pdf-page-viewer__loading-text"),k.map(y=>y.pdfPageViewer.loading))),failure:({error:y})=>e.html.div(e.attr.class("bc-pdf-page-viewer__error"),f.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=>V==="none"?"bc-pdf-page-viewer":`bc-pdf-page-viewer bc-pdf-page-viewer--fit-${V}`)),e.html.div(e.attr.class("bc-pdf-page-viewer__content"),e.When(e.Value.map(n,V=>V==="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)),...h),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 g=V.querySelector(".bc-pdf-page-viewer__canvas"),I=V.querySelector(".bc-pdf-page-viewer__text-layer"),B=V.querySelector(".bc-pdf-page-viewer__annotation-layer");return e.Value.on(y,async N=>{await N.render(g,I,B)}),e.Empty}))}))})))}Object.defineProperty(exports,"Use",{enumerable:!0,get:()=>e.Use});exports.BeatUII18n=f.BeatUII18n;exports.Icon=f.Icon;exports.LOGICAL_PROPERTY_MAP=f.LOGICAL_PROPERTY_MAP;exports.Locale=f.Locale;exports.defaultLocale=f.defaultLocale;exports.defaultMessages=f.defaultMessages;exports.formatFileSize=f.formatFileSize;exports.getDirectionClassName=f.getDirectionClassName;exports.getDirectionFromLocale=f.getDirectionFromLocale;exports.getIconLocally=f.getIconLocally;exports.getOppositeDirection=f.getOppositeDirection;exports.getPhysicalProperty=f.getPhysicalProperty;exports.isIndexedDBAvailable=f.isIndexedDBAvailable;exports.isRTLLocale=f.isRTLLocale;exports.makeI18nProvider=f.makeI18nProvider;exports.makeMessages=f.makeMessages;exports.resolveDirection=f.resolveDirection;exports.storeIconLocally=f.storeIconLocally;exports.backgroundConfig=Z.backgroundConfig;exports.bgColors=Z.bgColors;exports.borderColors=Z.borderColors;exports.colorShades=Z.colorShades;exports.colors=Z.colors;exports.generateColorVariables=Z.generateColorVariables;exports.generateCoreColorVariables=Z.generateCoreColorVariables;exports.generateSemanticColorVariables=Z.generateSemanticColorVariables;exports.getColorVar=Z.getColorVar;exports.getColorVarName=Z.getColorVarName;exports.interactiveColors=Z.interactiveColors;exports.normalizeColorName=Z.normalizeColorName;exports.resolveSemanticColorMap=Z.resolveSemanticColorMap;exports.semanticColorNames=Z.semanticColorNames;exports.semanticColors=Z.semanticColors;exports.textColors=Z.textColors;exports.themeColorNames=Z.themeColorNames;exports.baseFontSize=x.baseFontSize;exports.baseMotionDuration=x.baseMotionDuration;exports.baseSpacing=x.baseSpacing;exports.borderWidth=x.borderWidth;exports.breakpoints=x.breakpoints;exports.changeFontSize=x.changeFontSize;exports.controlGap=x.controlGap;exports.controlHeight=x.controlHeight;exports.controlPaddingBlock=x.controlPaddingBlock;exports.controlPaddingInline=x.controlPaddingInline;exports.fontFamily=x.fontFamily;exports.fontSize=x.fontSize;exports.fontWeight=x.fontWeight;exports.generateAllTokenVariables=x.generateAllTokenVariables;exports.generateBorderWidthVariables=x.generateBorderWidthVariables;exports.generateBreakpointVariables=x.generateBreakpointVariables;exports.generateControlGapVariables=x.generateControlGapVariables;exports.generateControlHeightVariables=x.generateControlHeightVariables;exports.generateControlPaddingVariables=x.generateControlPaddingVariables;exports.generateControlTokenVariables=x.generateControlTokenVariables;exports.generateCoreTokenVariables=x.generateCoreTokenVariables;exports.generateFontFamilyOverrideVariables=x.generateFontFamilyOverrideVariables;exports.generateMotionVariables=x.generateMotionVariables;exports.generateOutlineWidthVariables=x.generateOutlineWidthVariables;exports.generateOverlayWidthVariables=x.generateOverlayWidthVariables;exports.generateRadiusVariables=x.generateRadiusVariables;exports.generateSemanticFontVariables=x.generateSemanticFontVariables;exports.generateSemanticMotionVariables=x.generateSemanticMotionVariables;exports.generateSemanticRadiusVariables=x.generateSemanticRadiusVariables;exports.generateSemanticShadowVariables=x.generateSemanticShadowVariables;exports.generateSemanticSpacingVariables=x.generateSemanticSpacingVariables;exports.generateSemanticTextShadowVariables=x.generateSemanticTextShadowVariables;exports.generateSemanticTokenVariables=x.generateSemanticTokenVariables;exports.generateShadowVariables=x.generateShadowVariables;exports.generateSpacingVariables=x.generateSpacingVariables;exports.generateTextShadowVariables=x.generateTextShadowVariables;exports.generateTypographyVariables=x.generateTypographyVariables;exports.generateZIndexVariables=x.generateZIndexVariables;exports.getBaseFontSizeVar=x.getBaseFontSizeVar;exports.getBaseFontSizeVarName=x.getBaseFontSizeVarName;exports.getBaseMotionDurationVar=x.getBaseMotionDurationVar;exports.getBaseMotionDurationVarName=x.getBaseMotionDurationVarName;exports.getBorderWidthVar=x.getBorderWidthVar;exports.getBorderWidthVarName=x.getBorderWidthVarName;exports.getBreakpointMediaQuery=x.getBreakpointMediaQuery;exports.getBreakpointVar=x.getBreakpointVar;exports.getBreakpointVarName=x.getBreakpointVarName;exports.getControlGapVar=x.getControlGapVar;exports.getControlGapVarName=x.getControlGapVarName;exports.getControlHeightVar=x.getControlHeightVar;exports.getControlHeightVarName=x.getControlHeightVarName;exports.getControlPaddingBlockVar=x.getControlPaddingBlockVar;exports.getControlPaddingBlockVarName=x.getControlPaddingBlockVarName;exports.getControlPaddingInlineVar=x.getControlPaddingInlineVar;exports.getControlPaddingInlineVarName=x.getControlPaddingInlineVarName;exports.getFontFamilyVar=x.getFontFamilyVar;exports.getFontFamilyVarName=x.getFontFamilyVarName;exports.getFontSizeLineHeightVar=x.getFontSizeLineHeightVar;exports.getFontSizeLineHeightVarName=x.getFontSizeLineHeightVarName;exports.getFontSizeVar=x.getFontSizeVar;exports.getFontSizeVarName=x.getFontSizeVarName;exports.getFontWeightVar=x.getFontWeightVar;exports.getFontWeightVarName=x.getFontWeightVarName;exports.getLetterSpacingVar=x.getLetterSpacingVar;exports.getLetterSpacingVarName=x.getLetterSpacingVarName;exports.getLineHeightVar=x.getLineHeightVar;exports.getLineHeightVarName=x.getLineHeightVarName;exports.getMotionDurationVar=x.getMotionDurationVar;exports.getMotionDurationVarName=x.getMotionDurationVarName;exports.getMotionEasingVar=x.getMotionEasingVar;exports.getMotionEasingVarName=x.getMotionEasingVarName;exports.getOutlineWidthVar=x.getOutlineWidthVar;exports.getOutlineWidthVarName=x.getOutlineWidthVarName;exports.getOverlayWidthVar=x.getOverlayWidthVar;exports.getOverlayWidthVarName=x.getOverlayWidthVarName;exports.getRadiusMediaQuery=x.getRadiusMediaQuery;exports.getRadiusVar=x.getRadiusVar;exports.getRadiusVarName=x.getRadiusVarName;exports.getSemanticFontVar=x.getSemanticFontVar;exports.getSemanticFontVarName=x.getSemanticFontVarName;exports.getSemanticMotionVarName=x.getSemanticMotionVarName;exports.getSemanticRadiusVarName=x.getSemanticRadiusVarName;exports.getSemanticShadowVarName=x.getSemanticShadowVarName;exports.getSemanticSpacingVarName=x.getSemanticSpacingVarName;exports.getSemanticTextShadowVarName=x.getSemanticTextShadowVarName;exports.getShadowVar=x.getShadowVar;exports.getShadowVarName=x.getShadowVarName;exports.getSpacingVar=x.getSpacingVar;exports.getSpacingVarName=x.getSpacingVarName;exports.getTextShadowVar=x.getTextShadowVar;exports.getTextShadowVarName=x.getTextShadowVarName;exports.getTokenValue=x.getTokenValue;exports.getZIndexVar=x.getZIndexVar;exports.getZIndexVarName=x.getZIndexVarName;exports.letterSpacing=x.letterSpacing;exports.lineHeight=x.lineHeight;exports.motionDurations=x.motionDurations;exports.motionEasings=x.motionEasings;exports.outlineWidth=x.outlineWidth;exports.overlayWidth=x.overlayWidth;exports.radius=x.radius;exports.semanticFontNames=x.semanticFontNames;exports.semanticMotionNames=x.semanticMotionNames;exports.semanticRadiusNames=x.semanticRadiusNames;exports.semanticShadowNames=x.semanticShadowNames;exports.semanticSpacingNames=x.semanticSpacingNames;exports.semanticTextShadowNames=x.semanticTextShadowNames;exports.shadows=x.shadows;exports.spacing=x.spacing;exports.textShadows=x.textShadows;exports.zIndex=x.zIndex;exports.ArrayController=W.ArrayController;exports.BaseControl=W.BaseControl;exports.BaseMappedControl=W.BaseMappedControl;exports.CheckboxInput=W.CheckboxInput;exports.CloseButton=W.CloseButton;exports.Control=W.Control;exports.Controller=W.Controller;exports.ControllerValidation=W.ControllerValidation;exports.InputWrapper=W.InputWrapper;exports.MappedControl=W.MappedControl;exports.ObjectController=W.ObjectController;exports.RequiredSymbol=W.RequiredSymbol;exports.connectCommonAttributes=W.connectCommonAttributes;exports.connectNumberInput=W.connectNumberInput;exports.connectStringInput=W.connectStringInput;exports.convertStandardSchemaIssues=W.convertStandardSchemaIssues;exports.convertStandardSchemaPathToPath=W.convertStandardSchemaPathToPath;exports.makeMapValidation=W.makeMapValidation;exports.makeOnBlurHandler=W.makeOnBlurHandler;exports.makeOnChangeHandler=W.makeOnChangeHandler;exports.parsePath=W.parsePath;exports.pathToString=W.pathToString;exports.standardSchemaResultToValidation=W.standardSchemaResultToValidation;exports.taskToValidation=W.taskToValidation;exports.useController=W.useController;exports.useForm=W.useForm;exports.wrapSegment=W.wrapSegment;exports.AnimatedToggle=le.AnimatedToggle;exports.AnimatedToggleClass=le.AnimatedToggleClass;exports.useAnimatedElementToggle=le.useAnimatedElementToggle;exports.useAnimatedToggle=le.useAnimatedToggle;exports.useTimedToggle=le.useTimedToggle;exports.Theme=Se.Theme;exports.ThemeAppearance=Se.ThemeAppearance;exports.beatuiPreset=bt.beatuiPreset;exports.createBeatuiPreset=bt.createBeatuiPreset;exports.Base64Input=T.Base64Input;exports.Base64sInput=T.Base64sInput;exports.ColorSwatchInput=T.ColorSwatchInput;exports.EditableText=T.EditableText;exports.NullableDateInput=T.NullableDateInput;exports.NullableDateTimeInput=T.NullableDateTimeInput;exports.NullableEmailInput=T.NullableEmailInput;exports.NullablePasswordInput=T.NullablePasswordInput;exports.NullableRatingInput=T.NullableRatingInput;exports.NullableSliderInput=T.NullableSliderInput;exports.NullableTextArea=T.NullableTextArea;exports.NullableTextInput=T.NullableTextInput;exports.NullableUUIDInput=T.NullableUUIDInput;exports.NullableUrlInput=T.NullableUrlInput;exports.RatingInput=T.RatingInput;exports.SliderInput=T.SliderInput;exports.Switch=T.Switch;exports.emptyToNull=T.emptyToNull;exports.fileToBase64=T.fileToBase64;exports.forFormat=T.forFormat;exports.forTypeAndFormat=T.forTypeAndFormat;exports.forXUI=T.forXUI;exports.formatColor=T.formatColor;exports.getContrastRatio=T.getContrastRatio;exports.hexToRgb=T.hexToRgb;exports.hslToRgb=T.hslToRgb;exports.hwbToRgb=T.hwbToRgb;exports.isValidColor=T.isValidColor;exports.isValidHexColor=T.isValidHexColor;exports.isValidHslColor=T.isValidHslColor;exports.isValidRgbColor=T.isValidRgbColor;exports.isValidRgbaColor=T.isValidRgbaColor;exports.linearToSrgb=T.linearToSrgb;exports.mulberry32=T.mulberry32;exports.normalizeHexColor=T.normalizeHexColor;exports.nullToEmpty=T.nullToEmpty;exports.oklchToRgb=T.oklchToRgb;exports.parseAnyColor=T.parseAnyColor;exports.resolveEffectiveFormat=T.resolveEffectiveFormat;exports.rgbToHex=T.rgbToHex;exports.rgbToHsl=T.rgbToHsl;exports.rgbToHwb=T.rgbToHwb;exports.rgbToOklch=T.rgbToOklch;exports.srgbToLinear=T.srgbToLinear;exports.toRgbaString=T.toRgbaString;exports.sessionId=oe.sessionId;exports.BaseListControl=A.BaseListControl;exports.BaseNativeSelectControl=A.BaseNativeSelectControl;exports.Expando=A.Expando;exports.FilesInput=A.FilesInput;exports.Group=A.Group;exports.ListControl=A.ListControl;exports.ListInput=A.ListInput;exports.ListItemControls=A.ListItemControls;exports.MaskInput=A.MaskInput;exports.NativeSelect=A.NativeSelect;exports.NativeSelectControl=A.NativeSelectControl;exports.NullableDurationInput=A.NullableDurationInput;exports.NullableNumberInput=A.NullableNumberInput;exports.NumberInput=A.NumberInput;exports.SegmentedInput=A.SegmentedInput;exports.TextArea=A.TextArea;exports.UUIDInput=A.UUIDInput;exports.UnionController=A.UnionController;exports.UnstyledDropZone=A.UnstyledDropZone;exports.UrlInput=A.UrlInput;exports.WithTemporal=A.WithTemporal;exports.deepMergeDefaults=A.deepMergeDefaults;exports.emitExpando=A.emitExpando;exports.emitOptionExpando=A.emitOptionExpando;exports.ensureTemporal=A.ensureTemporal;exports.transformEmptyStringToUndefined=A.transformEmptyStringToUndefined;exports.transformNullToUndefined=A.transformNullToUndefined;exports.transformUndefinedToNull=A.transformUndefinedToNull;exports.BooleanValidator=te.BooleanValidator;exports.ConfirmModal=te.ConfirmModal;exports.FocusTrap=te.FocusTrap;exports.Modal=te.Modal;exports.ObjectValidator=te.ObjectValidator;exports.Overlay=te.Overlay;exports.StringValidator=te.StringValidator;exports.boolean=te.boolean;exports.createStandardSchema=te.createStandardSchema;exports.object=te.object;exports.string=te.string;exports.useFocusTrap=te.useFocusTrap;exports.Button=G.Button;exports.InputContainer=G.InputContainer;exports.InputIcon=G.InputIcon;exports.generateButtonClasses=G.generateButtonClasses;exports.generateButtonStyles=G.generateButtonStyles;exports.generateInputContainerInputClasses=G.generateInputContainerInputClasses;exports.CommonInputAttributes=ce.CommonInputAttributes;exports.TextInput=ce.TextInput;exports.Flyout=ie.Flyout;exports.Menu=ie.Menu;exports.MenuItem=ie.MenuItem;exports.MenuSeparator=ie.MenuSeparator;exports.BigintInput=se.BigintInput;exports.DurationInput=se.DurationInput;exports.FileInput=se.FileInput;exports.NullableBigintInput=se.NullableBigintInput;exports.NullablePlainDateInput=se.NullablePlainDateInput;exports.NullablePlainDateTimeInput=se.NullablePlainDateTimeInput;exports.NullablePlainTimeInput=se.NullablePlainTimeInput;exports.PlainDateInput=se.PlainDateInput;exports.PlainDateTimeInput=se.PlainDateTimeInput;exports.PlainTimeInput=se.PlainTimeInput;exports.Card=oa.Card;exports.DangerLabel=Ve.DangerLabel;exports.EmphasisLabel=Ve.EmphasisLabel;exports.Label=Ve.Label;exports.MutedLabel=Ve.MutedLabel;exports.Stack=Ve.Stack;exports.EmailInput=Ke.EmailInput;exports.Notice=Ke.Notice;exports.PasswordInput=Ke.PasswordInput;exports.LinkPortal=la.LinkPortal;exports.Toolbar=De.Toolbar;exports.ToolbarButton=De.ToolbarButton;exports.ToolbarDivider=De.ToolbarDivider;exports.ToolbarGroup=De.ToolbarGroup;exports.ToolbarSpacer=De.ToolbarSpacer;exports.Accordion=Ja;exports.ActionCard=Qa;exports.AdvancedSlider=Rn;exports.AlertDialog=Xr;exports.AnnouncementBar=jr;exports.AppShell=dn;exports.AppearanceSelector=Dt;exports.Avatar=ga;exports.AvatarGroup=Sa;exports.AvatarGroupOverflow=Da;exports.Badge=Ae;exports.BaseComboboxControl=Mt;exports.BaseComboboxTagsControl=xn;exports.BaseDropdownControl=Pt;exports.BaseSelectTagsControl=wn;exports.BaseVideoPlayer=no;exports.BeatUI=ur;exports.BlockCommandPalette=Yr;exports.Breadcrumbs=Cr;exports.ButtonLink=xr;exports.Calendar=_a;exports.Center=hn;exports.CenterH=pn;exports.Chips=nt;exports.Collapse=Le;exports.CollapsibleSidebarGroup=Dr;exports.ColorController=zt;exports.ColorInput=$t;exports.ComboboxControl=Cn;exports.ComboboxInput=Lt;exports.ComboboxTagsControl=In;exports.ComboboxTagsInput=ot;exports.CommandPalette=qr;exports.ConfirmationDialog=Zr;exports.DateCalendar=wa;exports.DateInput=Sn;exports.DateRangeCalendar=xa;exports.DateTimeInput=$n;exports.Divider=bn;exports.Drawer=Ar;exports.DropdownBase=at;exports.DropdownControl=kn;exports.DropdownInput=Et;exports.EmptyState=hr;exports.EnsureControl=nr;exports.FormStatus=rr;exports.HistoryTimeline=$a;exports.IconBadge=Ta;exports.InputAdornment=Tn;exports.InstantInput=Yn;exports.Kbd=eo;exports.LazyNativeSelect=On;exports.Lightbox=Ur;exports.Link=Zt;exports.LocaleSelector=sr;exports.NativePdfPreview=dr;exports.NavigationLink=Vr;exports.NineSliceScrollView=fn;exports.Notification=qt;exports.NotificationPanel=yr;exports.NotificationProvider=lt;exports.NotificationService=Gt;exports.NotificationViewport=Yt;exports.NullableColorInput=Ga;exports.NullableColorSwatchInput=Ya;exports.NullableInstantInput=Jn;exports.NullableMaskInput=Bn;exports.NullablePlainMonthDayInput=ar;exports.NullablePlainYearMonthInput=er;exports.NullableZonedDateTimeInput=Kn;exports.OTPInput=qn;exports.OpenGraph=fr;exports.Option=be;exports.PDFJSPreview=pr;exports.PageDropZone=Oa;exports.Pagination=Ir;exports.PdfPageViewer=ho;exports.PlainMonthDayInput=tr;exports.PlainYearMonthInput=Qn;exports.Popover=Nr;exports.PresenceCursor=wt;exports.PresenceHighlight=Ba;exports.PresenceSelectionMark=Ea;exports.ProgressBar=Pa;exports.PromptDialog=Kr;exports.RadioGroup=Nn;exports.RangeCalendar=Va;exports.Ribbon=Wr;exports.ScrollablePanel=Ye;exports.SelectTagsControl=Vn;exports.SelectTagsInput=rt;exports.Sidebar=Sr;exports.SidebarActiveLink=ea;exports.SidebarClickLink=ta;exports.SidebarContext=Kt;exports.SidebarGroup=Xe;exports.SidebarLink=aa;exports.SidebarSeparator=$r;exports.SidebarUrlLink=Qt;exports.Sink=vn;exports.Skeleton=Aa;exports.StandaloneAppearanceSelector=Ha;exports.StylePortal=br;exports.Table=Na;exports.Tabs=Er;exports.Tag=et;exports.TagInput=Pn;exports.TagsInput=An;exports.ToggleButton=St;exports.ToggleButtonGroup=Ra;exports.Tooltip=Mr;exports.TreeView=Pr;exports.WithBeatUIBreakpoint=Ot;exports.WithBeatUIElementBreakpoint=rn;exports.WithBreakpoint=tt;exports.ZonedDateTimeInput=Xn;exports.colorInputOptionsFromController=lr;exports.compareBreakpoint=Tt;exports.createColorController=or;exports.createLocationMatcher=Me;exports.delaySignal=sa;exports.downloadContent=ia;exports.downloadFile=ua;exports.downloadUrl=Qe;exports.downloadUrlAndMonitor=ca;exports.findBreakpoint=an;exports.generateBadgeClasses=Ct;exports.generateBadgeStyles=_t;exports.generateLinkClasses=Ze;exports.generateLinkStyles=Je;exports.generateNotificationClasses=jt;exports.generateNotificationStyles=Ht;exports.generatePaginationRange=Xt;exports.generateProgressBarClasses=Vt;exports.generateProgressBarStyles=xt;exports.generateSkeletonClasses=Ge;exports.generateSkeletonStyles=It;exports.increaseSize=pa;exports.isUrlMatch=Jt;