@tempots/beatui 0.60.2 → 0.60.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),q=require("@tempots/ui"),h=require("./translations-DM5R5VZ0.cjs"),Z=require("./colors-B9fcMxa_.cjs"),O=require("./index-CyyNsVT9.cjs"),_=require("./notice-BIcHmVnn.cjs"),W=require("./modal-DA0OKusk.cjs"),pe=require("./theme-Dt6lCAvY.cjs"),V=require("./utils-B25pniId.cjs"),ce=require("./timer-DK_yKNwE.cjs"),$t=require("./link-portal-_tiDFZqh.cjs"),me=require("./toolbar-CC22Z53U.cjs");function Bt(t,n=0,a=()=>!0){let r=null,l;const i=e.prop(t.value);return t.on(s=>{l=s,a(s)?r==null&&(r=setTimeout(()=>{r=null,i.set(l)},n)):i.set(s)}),t.onDispose(()=>{r!=null&&clearTimeout(r)}),i}const Ze=(t,n)=>t<n?t:n,ye=(t,n)=>t>n?t:n,Lt=(t,{abortSignal:n}={})=>new Promise((a,r)=>{const l=setTimeout(a,t);n&&n.addEventListener("abort",()=>{clearTimeout(l),r(new DOMException("Aborted","AbortError"))})}),Oe=["xs","sm","md","lg","xl"];function Et(t,n=1){const a=Oe.indexOf(t);if(a===-1)throw new Error(`Invalid size: ${t}`);const r=Math.min(Math.max(a+n,0),Oe.length-1);return Oe[r]}function tt(t,n,a,r){const l=["bc-badge",`bc-badge--size-${t}`,`bc-control--rounded-${n}`];return a&&l.push("bc-badge--circle"),r&&l.push("bc-badge--full-width"),l.join(" ")}function nt(t,n){const a=new Map,r=(l,i,s,u)=>{a.set("--badge-bg-hover",l),a.set("--badge-text-hover",s),a.set("--badge-bg-hover-dark",i),a.set("--badge-text-hover-dark",u)};switch(t){case"filled":{const l=h.backgroundValue(n,"solid","light"),i=h.backgroundValue(n,"solid","dark"),s=h.hoverBackgroundValue(n,"soft","light"),u=h.hoverBackgroundValue(n,"soft","dark");a.set("--badge-bg",l.backgroundColor),a.set("--badge-text",l.textColor),a.set("--badge-bg-dark",i.backgroundColor),a.set("--badge-text-dark",i.textColor),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"light":{const l=h.backgroundValue(n,"light","light"),i=h.backgroundValue(n,"light","dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg",l.backgroundColor),a.set("--badge-text",l.textColor),a.set("--badge-bg-dark",i.backgroundColor),a.set("--badge-text-dark",i.textColor),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"outline":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.borderColorValue(n,"light"),u=h.borderColorValue(n,"dark"),c=h.hoverBackgroundValue(n,"light","light"),o=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","transparent"),a.set("--badge-text",l),a.set("--badge-bg-dark","transparent"),a.set("--badge-text-dark",i),a.set("--badge-border",s),a.set("--badge-border-dark",u),r(c.backgroundColor,o.backgroundColor,c.textColor,o.textColor);break}case"default":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","var(--bg-background-light)"),a.set("--badge-text",l),a.set("--badge-bg-dark","var(--bg-background-dark)"),a.set("--badge-text-dark",i),a.set("--badge-border","var(--border-border-light)"),a.set("--badge-border-dark","var(--border-border-dark)"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"text":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","transparent"),a.set("--badge-text",l),a.set("--badge-bg-dark","transparent"),a.set("--badge-text-dark",i),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}}return Array.from(a.entries()).map(([l,i])=>`${l}: ${i}`).join("; ")}function At({variant:t="filled",size:n="md",color:a="base",roundedness:r="full",circle:l=!1,fullWidth:i=!1},...s){return e.html.span(e.attr.class(e.computedOf(n,r,l,i)((u,c,o,p)=>tt(u??"md",c??"sm",o??!1,p??!1))),e.attr.style(e.computedOf(t,a)((u,c)=>nt(u??"filled",c??"base"))),e.html.span(e.attr.class("bc-badge__content"),...s))}function Nt({onChange:t,accept:n="*/*",onDragContent:a,content:r,onInvalidSelection:l,disabled:i=!1}){const s=e.prop(!1),u=e.prop([]);let c=null,o=0;const p=y=>y.dataTransfer?.types.includes("Files")??!1,f=(y,x)=>x==="*/*"?!0:x.split(",").map(I=>I.trim()).some(I=>{if(I==="*/*")return!0;if(I.endsWith("/*")){const T=I.slice(0,-2);return y.type.startsWith(T+"/")}return y.type===I||y.name.endsWith(I)}),C=y=>{e.Value.get(i)||p(y)&&(y.preventDefault(),y.stopPropagation(),o++,o===1&&(s.value=!0))},g=y=>{e.Value.get(i)||p(y)&&(y.preventDefault(),y.stopPropagation(),y.dataTransfer!=null&&(y.dataTransfer.dropEffect="copy"))},v=y=>{e.Value.get(i)||p(y)&&(y.preventDefault(),y.stopPropagation(),o--,o===0&&(s.value=!1))},b=y=>{if(e.Value.get(i)||!p(y))return;y.preventDefault(),y.stopPropagation(),o=0,s.value=!1;const x=Array.from(y.dataTransfer?.files??[]);if(x.length>0){const k=e.Value.get(n),I=x.filter(S=>f(S,k)),T=x.filter(S=>!I.includes(S));I.length>0&&(u.value=I,t(I,"dragdrop")),T.length>0&&l?.(x)}};typeof document<"u"&&(document.addEventListener("dragenter",C),document.addEventListener("dragover",g),document.addEventListener("dragleave",v),document.addEventListener("drop",b));const w=()=>{typeof document<"u"&&(document.removeEventListener("dragenter",C),document.removeEventListener("dragover",g),document.removeEventListener("dragleave",v),document.removeEventListener("drop",b)),o=0},m=()=>{c?.click()},d=y=>{const x=y.target,k=Array.from(x.files??[]);k.length>0&&(u.value=k,t(k,"click")),x.value=""};return e.Fragment(e.OnDispose(w),e.html.input(e.attr.type("file"),e.attr.name("bui-page-drop-zone"),e.attr.multiple(!0),e.attr.accept(n),e.style.position("absolute"),e.style.opacity("0"),e.style.pointerEvents("none"),e.style.width("0"),e.style.height("0"),e.on.change(d),e.WithElement(y=>(c=y,e.OnDispose(()=>{c!=null&&(c.value="")})))),a!=null?e.When(s,()=>a({files:u})):null,r!=null?r({isDragging:s,files:u,selectFiles:m}):null)}function Ft(t,n,a,r,l,i){const s=["bc-table"];return t!=="md"&&s.push(`bc-table--size-${t}`),n&&s.push("bc-table--hoverable"),a&&s.push("bc-table--sticky-header"),r&&s.push("bc-table--with-striped-rows"),l&&s.push("bc-table--with-column-borders"),i&&s.push("bc-table--with-row-borders"),s.join(" ")}function Mt(t){if(t!=null)return t==="none"?"--table-border-radius: 0":`--table-border-radius: var(--radius-${t})`}function Ut({size:t="md",hoverable:n=!1,stickyHeader:a=!1,fullWidth:r=!1,withStripedRows:l=!1,withTableBorder:i=!0,withColumnBorders:s=!1,withRowBorders:u=!0,borderRadius:c}={},...o){const p=e.computedOf(t,n,a,l,s,u)((g,v,b,w,m,d)=>Ft(g??"md",v??!1,b??!1,w??!1,m??!1,d??!0)),f=e.computedOf(a,r,i)((g,v,b)=>{const w=["bc-table-container"];return g&&w.push("bc-table-container--sticky"),v&&w.push("bc-table-container--full-width"),b&&w.push("bc-table-container--with-table-border"),w.join(" ")}),C=e.computedOf(c)(g=>Mt(g));return e.html.div(e.attr.class(f),e.attr.style(C),e.html.table(e.attr.class(p),...o))}function Rt(t,n){const a=["bc-tag"];return t!=="md"&&a.push(`bc-tag--${t}`),n&&a.push("bc-tag--disabled"),a.join(" ")}function Wt(t){const n=h.backgroundValue(t,"light","light"),a=h.backgroundValue(t,"light","dark"),r=h.hoverBackgroundValue(t,"light","light"),l=h.hoverBackgroundValue(t,"light","dark");return[`--tag-bg: ${n.backgroundColor}`,`--tag-text: ${n.textColor}`,`--tag-bg-dark: ${a.backgroundColor}`,`--tag-text-dark: ${a.textColor}`,`--tag-bg-hover: ${r.backgroundColor}`,`--tag-text-hover: ${r.textColor}`,`--tag-bg-hover-dark: ${l.backgroundColor}`,`--tag-text-hover-dark: ${l.textColor}`].join("; ")}const Ne=({value:t,color:n="base",onClose:a,size:r="md",class:l,disabled:i})=>e.html.span(e.attr.class(e.computedOf(r??"md",i??!1)((s,u)=>Rt(s,u))),e.attr.style(e.computedOf(n)(s=>Wt(s??"base"))),e.attr.class(l),e.html.span(t),a!=null?e.Use(h.BeatUII18n,s=>_.CloseButton({size:"xs",label:s.$.removeItem,color:"white",disabled:i,onClick:()=>a?.(e.Value.get(t))},e.attr.class("bc-tag__close"))):e.Empty);function at({value:t,onChange:n,disabled:a}){return V.SegmentedInput({size:"sm",value:t,disabled:a,options:{system:e.html.span(e.attr.title("System"),h.Icon({icon:"line-md:laptop",color:"gray"})),light:e.html.span(e.attr.title("Light"),h.Icon({icon:"line-md:sunny-twotone-loop",color:"yellow"})),dark:e.html.span(e.attr.title("Dark"),h.Icon({icon:"line-md:sunny-outline-to-moon-alt-loop-transition",color:"blue"}))},onChange:n})}function Ht(){return e.Use(pe.Theme,({appearancePreference:t,setAppearancePreference:n})=>at({value:t,onChange:n}))}function jt({value:t,onChange:n,onInput:a}){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(l=>(r=l,e.Empty)),e.attr.value(t),e.style.width("4px"),e.style.height("4px"),n!=null?e.on.change(e.emitValue(n)):e.Empty,a!=null?e.on.input(e.emitValue(a)):e.Empty),e.attr.style(e.Value.map(t,l=>`background-color: ${l}`))))}function zt(t){const{value:n,onBlur:a,onChange:r,onInput:l}=t;return h.InputContainer({...t,input:e.input.text(h.CommonInputAttributes(t),e.attr.value(n),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(r)):e.Empty,l!=null?e.on.input(e.emitValue(l)):e.Empty)},e.attr.class("bc-color-input"),jt({value:n,onChange:t.onChange,onInput:t.onInput}))}function Gt(t){const n={fade:!0,scale:!0};return t.startsWith("top")?(n.slide="down",n.transformOrigin="bottom"):t.startsWith("bottom")?(n.slide="up",n.transformOrigin="top"):t.startsWith("left")?(n.slide="right",n.transformOrigin="right"):t.startsWith("right")&&(n.slide="left",n.transformOrigin="left"),n}function fe(t){const{content:n,placement:a="top",showDelay:r=250,hideDelay:l=500,mainAxisOffset:i=8,crossAxisOffset:s=0,showOn:u="hover-focus",closable:c=!0,arrow:o,role:p,hasPopup:f="dialog"}=t;return q.PopOver((C,g)=>{const v=W.useAnimatedElementToggle({initialStatus:"closed"}),b=_.sessionId("flyout"),w=e.prop(!1);let m=null,d=null,y=!1;function x(){I!=null&&(clearTimeout(I),I=null),S!=null&&(clearTimeout(S),S=null),d&&(d(),d=null),m&&(document.removeEventListener("keydown",m),m=null),w.set(!1),y=!1}function k(){e.Value.get(c)&&(m=L=>{L.key==="Escape"&&$()},document.addEventListener("keydown",m)),y=!0,w.set(!0),C({placement:a??"top",mainAxisOffset:i,crossAxisOffset:s,onClickOutside:()=>{e.Value.get(c)&&$()},arrow:o,content:e.WithElement(L=>{v.setElement(L),d=ce.g(()=>{v.open(),d=null});const N=M=>{e.Value.get(c)&&M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),$(),w.set(!1))};return document.addEventListener("keydown",N,!0),e.Fragment(e.OnDispose(()=>{x(),document.removeEventListener("keydown",N,!0)}),e.attr.class("bc-flyout-container"),e.attr.id(b),e.attr.tabindex(-1),e.html.div(e.attr.class("bc-flyout"),W.AnimatedToggleClass({animation:e.Value.map(a,Gt),status:v.status}),p?e.attr.role(p):e.attr.role("dialog"),n()))})})}let I=null;function T(){if(I!=null&&(clearTimeout(I),I=null),S!=null&&(clearTimeout(S),S=null),v.isOpened.value||v.isOpening.value||v.isStartOpening.value)return;if(v.isClosing.value||v.isStartClosing.value){v.open();return}const L=e.Value.get(r);I=setTimeout(()=>{I=null,k()},L)}let S=null;function $(){if(I!=null&&(clearTimeout(I),I=null),S!=null&&(clearTimeout(S),S=null),w.set(!1),d&&(d(),d=null,y)){g(),x();return}const L=e.Value.get(l);S=setTimeout(()=>{S=null,v.close(),v.listenOnClosed(()=>{g(),x()})},L)}return e.WithElement(L=>{const N=()=>{T(),w.set(!0)},M=()=>{$(),w.set(!1)},z=e.Fragment(e.aria.expanded(w),e.aria.controls(b),e.aria.haspopup(f));if(typeof u=="function")return e.Fragment(z,u(N,M));const H=u;return e.Fragment(z,e.OneOfValue(H,{"hover-focus":()=>e.Fragment(e.on.mouseenter(()=>N()),e.on.mouseleave(()=>M()),e.on.focus(()=>N()),e.on.blur(()=>M())),hover:()=>e.Fragment(e.on.mouseenter(()=>N()),e.on.mouseleave(()=>M())),focus:()=>e.Fragment(e.on.focus(()=>N()),e.on.blur(()=>M())),click:()=>{function A(){document.removeEventListener("click",Y)}function Y(){A(),M()}return e.Fragment(e.OnDispose(A),e.on.click(()=>{N(),ce.g(()=>{document.addEventListener("click",Y,{once:!0})})}))},never:()=>null}))})})}function Yt(t,n,a,r){const l=["bc-action-card"];return t&&l.push("bc-action-card--active"),n&&l.push("bc-action-card--disabled"),a!=="md"&&l.push(`bc-action-card--${a}`),r&&!n&&l.push("bc-action-card--clickable"),l.join(" ")}function Zt(t,n,a,r){const l=new Map;if(t!=null&&l.set("--action-card-bg",t),n!=null&&l.set("--action-card-border",n),a!=null&&l.set("--action-card-title-color",a),r!=null&&l.set("--action-card-description-color",r),l.size!==0)return Array.from(l.entries()).map(([i,s])=>`${i}: ${s}`).join("; ")}function qt({icon:t,title:n,description:a,active:r=!1,disabled:l=!1,onClick:i,size:s="md",iconColor:u="primary",iconSize:c="md",backgroundColor:o,borderColor:p,titleColor:f,descriptionColor:C}){const g=i!=null;return e.html.div(e.attr.class(e.computedOf(r,l,s)((v,b,w)=>Yt(v??!1,b??!1,w??"md",g))),e.attr.style(e.computedOf(o,p,f,C)((v,b,w,m)=>Zt(v,b,w,m))),e.When(g,()=>e.Fragment(e.Unless(l,()=>e.Fragment(e.on.click(()=>i?.()),e.attr.tabindex(0))),e.attr.role("button"))),e.aria.disabled(l),e.html.div(e.attr.class("bc-action-card__icon"),h.Icon({icon:t,size:c,color:u})),e.html.div(e.attr.class("bc-action-card__content"),e.html.div(e.attr.class("bc-action-card__title"),n),e.html.div(e.attr.class("bc-action-card__description"),a)))}const Jt=["!=","<=",">=","<",">","="];function Kt(t){for(const n of Jt)if(typeof t=="string"&&t.startsWith(n))return[n,t.slice(n.length)];return["=",t]}function rt(t,n,a){const[r,l]=Kt(n),i=t.findIndex(c=>c[1]===l);if(i===-1)throw new Error(`Breakpoint ${String(l)} not found`);const s=t[i][0],u=i<t.length-1?t[i+1][0]:1/0;switch(r){case"=":return a>=s&&a<u;case"!=":return!(a>=s&&a<u);case"<=":return a<=s;case">=":return a>=s;case"<":return a<s;case">":return a>s;default:return!1}}function Qt(t,n){const a=t.findIndex(r=>r[0]>n)-1;return a>=0?t[a][1]:(t.length>0&&n>=t[0][0],t[0][1])}function Fe(t,{breakpoints:n,mode:a="viewport"}){const l=[...Object.entries(n).map(([s,u])=>[u,s])].sort((s,u)=>s[0]-u[0]),i=s=>{const u=s.map(({width:o})=>{const p=l.findIndex(f=>f[0]>o)-1;return p>=0?{width:o,breakpoint:l[p][1]}:l.length>0&&o>=l[0][0]?{width:o,breakpoint:l[0][1]}:{width:o,breakpoint:l[0][1]}});return t({value:u,breakpoints:n,asList:l,is:(o,p)=>rt(l,o,p)})};return a==="element"?q.ElementRect(i):q.WindowSize(i)}let Pe=NaN;function Xt(t,n){return t?(isNaN(Pe)&&(Pe=parseFloat(getComputedStyle(document.documentElement).fontSize)),parseFloat(t)*Pe):n}function J(t,n,a){return Xt(t.getPropertyValue(n),a)}function lt(t){return e.WithElement(n=>{const a=getComputedStyle(n),r={zero:0,xs:J(a,"--breakpoint-xs",640),sm:J(a,"--breakpoint-sm",768),md:J(a,"--breakpoint-md",1024),lg:J(a,"--breakpoint-lg",1280),xl:J(a,"--breakpoint-xl",1536)};return Fe(t,{breakpoints:r})})}function en(t){return e.WithElement(n=>{const a=getComputedStyle(n),r={zero:0,"3xs":J(a,"--container-3xs",256),"2xs":J(a,"--container-2xs",288),xs:J(a,"--container-xs",320),sm:J(a,"--container-sm",384),md:J(a,"--container-md",448),lg:J(a,"--container-lg",512),xl:J(a,"--container-xl",640),"2xl":J(a,"--container-2xl",768),"3xl":J(a,"--container-3xl",1024),"4xl":J(a,"--container-4xl",1280),"5xl":J(a,"--container-5xl",1536),"6xl":J(a,"--container-6xl",2048)};return Fe(t,{breakpoints:r,mode:"element"})})}function X(t,n){return`bc-panel ${(Array.isArray(t)?t:[t]).map(r=>`bc-panel--side-${r}`).join(" ")} bc-panel--shadow-${n}`}function re(t){const n=e.Value.toSignal(t).map(r=>h.backgroundValue(r,"lighter","light")),a=e.Value.toSignal(t).map(r=>h.backgroundValue(r,"lighter","dark"));return e.Fragment(e.style.variable("--panel-bg",n.$.backgroundColor),e.style.variable("--panel-text",n.$.textColor),e.style.variable("--panel-bg-dark",a.$.backgroundColor),e.style.variable("--panel-text-dark",a.$.textColor))}const te={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 qe(t,n){if(typeof t=="number")return{zero:t,xs:t,sm:t,md:t,lg:t,xl:t};const a={zero:t.zero??n.zero,xs:t.xs??n.xs,sm:t.sm??n.sm,md:t.md??n.md,lg:t.lg??n.lg,xl:t.xl??n.xl};return a.xs<a.zero&&(a.xs=a.zero),a.sm<a.xs&&(a.sm=a.xs),a.md<a.sm&&(a.md=a.sm),a.lg<a.md&&(a.lg=a.md),a.xl<a.lg&&(a.xl=a.lg),a}function De(t){t=t.filter(n=>n.some(a=>a!=null&&!a.startsWith("?")));for(let n=0;n<t[0].length;n++)t.every(a=>a[n]==null||a[n].startsWith("?"))&&(t=t.map(a=>a.filter((r,l)=>l!==n)),n--);return t=t.map(n=>n.map(a=>a?.startsWith("?")?a.slice(1):a)),t}function tn({smallBreakpoint:t,mediumBreakpoint:n,vertical:a,horizontal:r,is:l}){function i(c){let o=[[null],[null],[null],[null],[null],[null]];const p=[];p.push("1fr");const f=[];return r.banner&&(f.push(r.banner[c]+"px"),o[0][1]="banner"),(r.header||a.menu||a.aside)&&(f.push((r.header?.[c]??te.header[c])+"px"),o[1][1]="header"),r.mainHeader&&(f.push(r.mainHeader[c]+"px"),o[2][1]="mainHeader"),f.push("1fr"),o[3][1]="main",r.mainFooter&&(f.push(r.mainFooter[c]+"px"),o[4][1]="mainFooter"),r.footer&&(f.push(r.footer[c]+"px"),o[5][1]="footer"),o=De(o),{columns:p.join(" "),rows:f.join(" "),areas:o.map(g=>`"${g.join(" ")}"`).join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),q=require("@tempots/ui"),h=require("./translations-DM5R5VZ0.cjs"),Y=require("./colors-B9fcMxa_.cjs"),O=require("./index-CyyNsVT9.cjs"),$=require("./notice-BIcHmVnn.cjs"),H=require("./modal-DA0OKusk.cjs"),me=require("./theme-Dt6lCAvY.cjs"),V=require("./utils-B25pniId.cjs"),ce=require("./timer-DK_yKNwE.cjs"),$t=require("./link-portal-_tiDFZqh.cjs"),fe=require("./toolbar-CC22Z53U.cjs");function Bt(t,n=0,a=()=>!0){let r=null,l;const i=e.prop(t.value);return t.on(s=>{l=s,a(s)?r==null&&(r=setTimeout(()=>{r=null,i.set(l)},n)):i.set(s)}),t.onDispose(()=>{r!=null&&clearTimeout(r)}),i}const Ze=(t,n)=>t<n?t:n,ve=(t,n)=>t>n?t:n,Lt=(t,{abortSignal:n}={})=>new Promise((a,r)=>{const l=setTimeout(a,t);n&&n.addEventListener("abort",()=>{clearTimeout(l),r(new DOMException("Aborted","AbortError"))})}),Oe=["xs","sm","md","lg","xl"];function Et(t,n=1){const a=Oe.indexOf(t);if(a===-1)throw new Error(`Invalid size: ${t}`);const r=Math.min(Math.max(a+n,0),Oe.length-1);return Oe[r]}function tt(t,n,a,r){const l=["bc-badge",`bc-badge--size-${t}`,`bc-control--rounded-${n}`];return a&&l.push("bc-badge--circle"),r&&l.push("bc-badge--full-width"),l.join(" ")}function nt(t,n){const a=new Map,r=(l,i,s,u)=>{a.set("--badge-bg-hover",l),a.set("--badge-text-hover",s),a.set("--badge-bg-hover-dark",i),a.set("--badge-text-hover-dark",u)};switch(t){case"filled":{const l=h.backgroundValue(n,"solid","light"),i=h.backgroundValue(n,"solid","dark"),s=h.hoverBackgroundValue(n,"soft","light"),u=h.hoverBackgroundValue(n,"soft","dark");a.set("--badge-bg",l.backgroundColor),a.set("--badge-text",l.textColor),a.set("--badge-bg-dark",i.backgroundColor),a.set("--badge-text-dark",i.textColor),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"light":{const l=h.backgroundValue(n,"light","light"),i=h.backgroundValue(n,"light","dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg",l.backgroundColor),a.set("--badge-text",l.textColor),a.set("--badge-bg-dark",i.backgroundColor),a.set("--badge-text-dark",i.textColor),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"outline":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.borderColorValue(n,"light"),u=h.borderColorValue(n,"dark"),c=h.hoverBackgroundValue(n,"light","light"),o=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","transparent"),a.set("--badge-text",l),a.set("--badge-bg-dark","transparent"),a.set("--badge-text-dark",i),a.set("--badge-border",s),a.set("--badge-border-dark",u),r(c.backgroundColor,o.backgroundColor,c.textColor,o.textColor);break}case"default":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","var(--bg-background-light)"),a.set("--badge-text",l),a.set("--badge-bg-dark","var(--bg-background-dark)"),a.set("--badge-text-dark",i),a.set("--badge-border","var(--border-border-light)"),a.set("--badge-border-dark","var(--border-border-dark)"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"text":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","transparent"),a.set("--badge-text",l),a.set("--badge-bg-dark","transparent"),a.set("--badge-text-dark",i),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}}return Array.from(a.entries()).map(([l,i])=>`${l}: ${i}`).join("; ")}function At({variant:t="filled",size:n="md",color:a="base",roundedness:r="full",circle:l=!1,fullWidth:i=!1},...s){return e.html.span(e.attr.class(e.computedOf(n,r,l,i)((u,c,o,p)=>tt(u??"md",c??"sm",o??!1,p??!1))),e.attr.style(e.computedOf(t,a)((u,c)=>nt(u??"filled",c??"base"))),e.html.span(e.attr.class("bc-badge__content"),...s))}function Nt({onChange:t,accept:n="*/*",onDragContent:a,content:r,onInvalidSelection:l,disabled:i=!1}){const s=e.prop(!1),u=e.prop([]);let c=null,o=0;const p=y=>y.dataTransfer?.types.includes("Files")??!1,f=(y,x)=>x==="*/*"?!0:x.split(",").map(I=>I.trim()).some(I=>{if(I==="*/*")return!0;if(I.endsWith("/*")){const T=I.slice(0,-2);return y.type.startsWith(T+"/")}return y.type===I||y.name.endsWith(I)}),C=y=>{e.Value.get(i)||p(y)&&(y.preventDefault(),y.stopPropagation(),o++,o===1&&(s.value=!0))},g=y=>{e.Value.get(i)||p(y)&&(y.preventDefault(),y.stopPropagation(),y.dataTransfer!=null&&(y.dataTransfer.dropEffect="copy"))},v=y=>{e.Value.get(i)||p(y)&&(y.preventDefault(),y.stopPropagation(),o--,o===0&&(s.value=!1))},b=y=>{if(e.Value.get(i)||!p(y))return;y.preventDefault(),y.stopPropagation(),o=0,s.value=!1;const x=Array.from(y.dataTransfer?.files??[]);if(x.length>0){const k=e.Value.get(n),I=x.filter(S=>f(S,k)),T=x.filter(S=>!I.includes(S));I.length>0&&(u.value=I,t(I,"dragdrop")),T.length>0&&l?.(x)}};typeof document<"u"&&(document.addEventListener("dragenter",C),document.addEventListener("dragover",g),document.addEventListener("dragleave",v),document.addEventListener("drop",b));const w=()=>{typeof document<"u"&&(document.removeEventListener("dragenter",C),document.removeEventListener("dragover",g),document.removeEventListener("dragleave",v),document.removeEventListener("drop",b)),o=0},m=()=>{c?.click()},d=y=>{const x=y.target,k=Array.from(x.files??[]);k.length>0&&(u.value=k,t(k,"click")),x.value=""};return e.Fragment(e.OnDispose(w),e.html.input(e.attr.type("file"),e.attr.name("bui-page-drop-zone"),e.attr.multiple(!0),e.attr.accept(n),e.style.position("absolute"),e.style.opacity("0"),e.style.pointerEvents("none"),e.style.width("0"),e.style.height("0"),e.on.change(d),e.WithElement(y=>(c=y,e.OnDispose(()=>{c!=null&&(c.value="")})))),a!=null?e.When(s,()=>a({files:u})):null,r!=null?r({isDragging:s,files:u,selectFiles:m}):null)}function Ft(t,n,a,r,l,i){const s=["bc-table"];return t!=="md"&&s.push(`bc-table--size-${t}`),n&&s.push("bc-table--hoverable"),a&&s.push("bc-table--sticky-header"),r&&s.push("bc-table--with-striped-rows"),l&&s.push("bc-table--with-column-borders"),i&&s.push("bc-table--with-row-borders"),s.join(" ")}function Mt(t){if(t!=null)return t==="none"?"--table-border-radius: 0":`--table-border-radius: var(--radius-${t})`}function Ut({size:t="md",hoverable:n=!1,stickyHeader:a=!1,fullWidth:r=!1,withStripedRows:l=!1,withTableBorder:i=!0,withColumnBorders:s=!1,withRowBorders:u=!0,borderRadius:c}={},...o){const p=e.computedOf(t,n,a,l,s,u)((g,v,b,w,m,d)=>Ft(g??"md",v??!1,b??!1,w??!1,m??!1,d??!0)),f=e.computedOf(a,r,i)((g,v,b)=>{const w=["bc-table-container"];return g&&w.push("bc-table-container--sticky"),v&&w.push("bc-table-container--full-width"),b&&w.push("bc-table-container--with-table-border"),w.join(" ")}),C=e.computedOf(c)(g=>Mt(g));return e.html.div(e.attr.class(f),e.attr.style(C),e.html.table(e.attr.class(p),...o))}function Rt(t,n){const a=["bc-tag"];return t!=="md"&&a.push(`bc-tag--${t}`),n&&a.push("bc-tag--disabled"),a.join(" ")}function Wt(t){const n=h.backgroundValue(t,"light","light"),a=h.backgroundValue(t,"light","dark"),r=h.hoverBackgroundValue(t,"light","light"),l=h.hoverBackgroundValue(t,"light","dark");return[`--tag-bg: ${n.backgroundColor}`,`--tag-text: ${n.textColor}`,`--tag-bg-dark: ${a.backgroundColor}`,`--tag-text-dark: ${a.textColor}`,`--tag-bg-hover: ${r.backgroundColor}`,`--tag-text-hover: ${r.textColor}`,`--tag-bg-hover-dark: ${l.backgroundColor}`,`--tag-text-hover-dark: ${l.textColor}`].join("; ")}const Ne=({value:t,color:n="base",onClose:a,size:r="md",class:l,disabled:i})=>e.html.span(e.attr.class(e.computedOf(r??"md",i??!1)((s,u)=>Rt(s,u))),e.attr.style(e.computedOf(n)(s=>Wt(s??"base"))),e.attr.class(l),e.html.span(t),a!=null?e.Use(h.BeatUII18n,s=>$.CloseButton({size:"xs",label:s.$.removeItem,color:"white",disabled:i,onClick:()=>a?.(e.Value.get(t))},e.attr.class("bc-tag__close"))):e.Empty);function at({value:t,onChange:n,disabled:a}){return V.SegmentedInput({size:"sm",value:t,disabled:a,options:{system:e.html.span(e.attr.title("System"),h.Icon({icon:"line-md:laptop",color:"gray"})),light:e.html.span(e.attr.title("Light"),h.Icon({icon:"line-md:sunny-twotone-loop",color:"yellow"})),dark:e.html.span(e.attr.title("Dark"),h.Icon({icon:"line-md:sunny-outline-to-moon-alt-loop-transition",color:"blue"}))},onChange:n})}function Ht(){return e.Use(me.Theme,({appearancePreference:t,setAppearancePreference:n})=>at({value:t,onChange:n}))}function jt({value:t,onChange:n,onInput:a}){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(l=>(r=l,e.Empty)),e.attr.value(t),e.style.width("4px"),e.style.height("4px"),n!=null?e.on.change(e.emitValue(n)):e.Empty,a!=null?e.on.input(e.emitValue(a)):e.Empty),e.attr.style(e.Value.map(t,l=>`background-color: ${l}`))))}function zt(t){const{value:n,onBlur:a,onChange:r,onInput:l}=t;return h.InputContainer({...t,input:e.input.text(h.CommonInputAttributes(t),e.attr.value(n),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(r)):e.Empty,l!=null?e.on.input(e.emitValue(l)):e.Empty)},e.attr.class("bc-color-input"),jt({value:n,onChange:t.onChange,onInput:t.onInput}))}function Gt(t){const n={fade:!0,scale:!0};return t.startsWith("top")?(n.slide="down",n.transformOrigin="bottom"):t.startsWith("bottom")?(n.slide="up",n.transformOrigin="top"):t.startsWith("left")?(n.slide="right",n.transformOrigin="right"):t.startsWith("right")&&(n.slide="left",n.transformOrigin="left"),n}function ge(t){const{content:n,placement:a="top",showDelay:r=250,hideDelay:l=500,mainAxisOffset:i=8,crossAxisOffset:s=0,showOn:u="hover-focus",closable:c=!0,arrow:o,role:p,hasPopup:f="dialog"}=t;return q.PopOver((C,g)=>{const v=H.useAnimatedElementToggle({initialStatus:"closed"}),b=$.sessionId("flyout"),w=e.prop(!1);let m=null,d=null,y=!1;function x(){I!=null&&(clearTimeout(I),I=null),S!=null&&(clearTimeout(S),S=null),d&&(d(),d=null),m&&(document.removeEventListener("keydown",m),m=null),w.set(!1),y=!1}function k(){e.Value.get(c)&&(m=N=>{N.key==="Escape"&&D()},document.addEventListener("keydown",m)),y=!0,w.set(!0),C({placement:a??"top",mainAxisOffset:i,crossAxisOffset:s,onClickOutside:()=>{e.Value.get(c)&&D()},arrow:o,content:e.WithElement(N=>{v.setElement(N),d=ce.g(()=>{v.open(),d=null});const L=M=>{e.Value.get(c)&&M.key==="Escape"&&(M.preventDefault(),M.stopPropagation(),D(),w.set(!1))};return document.addEventListener("keydown",L,!0),e.Fragment(e.OnDispose(()=>{x(),document.removeEventListener("keydown",L,!0)}),e.attr.class("bc-flyout-container"),e.attr.id(b),e.attr.tabindex(-1),e.html.div(e.attr.class("bc-flyout"),H.AnimatedToggleClass({animation:e.Value.map(a,Gt),status:v.status}),p?e.attr.role(p):e.attr.role("dialog"),n()))})})}let I=null;function T(){if(I!=null&&(clearTimeout(I),I=null),S!=null&&(clearTimeout(S),S=null),v.isOpened.value||v.isOpening.value||v.isStartOpening.value)return;if(v.isClosing.value||v.isStartClosing.value){v.open();return}const N=e.Value.get(r);I=setTimeout(()=>{I=null,k()},N)}let S=null;function D(){if(I!=null&&(clearTimeout(I),I=null),S!=null&&(clearTimeout(S),S=null),w.set(!1),d&&(d(),d=null,y)){g(),x();return}const N=e.Value.get(l);S=setTimeout(()=>{S=null,v.close(),v.listenOnClosed(()=>{g(),x()})},N)}return e.WithElement(N=>{const L=()=>{T(),w.set(!0)},M=()=>{D(),w.set(!1)},Z=e.Fragment(e.aria.expanded(w),e.aria.controls(b),e.aria.haspopup(f));if(typeof u=="function")return e.Fragment(Z,u(L,M));const U=u;return e.Fragment(Z,e.OneOfValue(U,{"hover-focus":()=>e.Fragment(e.on.mouseenter(()=>L()),e.on.mouseleave(()=>M()),e.on.focus(()=>L()),e.on.blur(()=>M())),hover:()=>e.Fragment(e.on.mouseenter(()=>L()),e.on.mouseleave(()=>M())),focus:()=>e.Fragment(e.on.focus(()=>L()),e.on.blur(()=>M())),click:()=>{function E(){document.removeEventListener("click",j)}function j(){E(),M()}return e.Fragment(e.OnDispose(E),e.on.click(()=>{L(),ce.g(()=>{document.addEventListener("click",j,{once:!0})})}))},never:()=>null}))})})}function Yt(t,n,a,r){const l=["bc-action-card"];return t&&l.push("bc-action-card--active"),n&&l.push("bc-action-card--disabled"),a!=="md"&&l.push(`bc-action-card--${a}`),r&&!n&&l.push("bc-action-card--clickable"),l.join(" ")}function Zt(t,n,a,r){const l=new Map;if(t!=null&&l.set("--action-card-bg",t),n!=null&&l.set("--action-card-border",n),a!=null&&l.set("--action-card-title-color",a),r!=null&&l.set("--action-card-description-color",r),l.size!==0)return Array.from(l.entries()).map(([i,s])=>`${i}: ${s}`).join("; ")}function qt({icon:t,title:n,description:a,active:r=!1,disabled:l=!1,onClick:i,size:s="md",iconColor:u="primary",iconSize:c="md",backgroundColor:o,borderColor:p,titleColor:f,descriptionColor:C}){const g=i!=null;return e.html.div(e.attr.class(e.computedOf(r,l,s)((v,b,w)=>Yt(v??!1,b??!1,w??"md",g))),e.attr.style(e.computedOf(o,p,f,C)((v,b,w,m)=>Zt(v,b,w,m))),e.When(g,()=>e.Fragment(e.Unless(l,()=>e.Fragment(e.on.click(()=>i?.()),e.attr.tabindex(0))),e.attr.role("button"))),e.aria.disabled(l),e.html.div(e.attr.class("bc-action-card__icon"),h.Icon({icon:t,size:c,color:u})),e.html.div(e.attr.class("bc-action-card__content"),e.html.div(e.attr.class("bc-action-card__title"),n),e.html.div(e.attr.class("bc-action-card__description"),a)))}const Jt=["!=","<=",">=","<",">","="];function Kt(t){for(const n of Jt)if(typeof t=="string"&&t.startsWith(n))return[n,t.slice(n.length)];return["=",t]}function rt(t,n,a){const[r,l]=Kt(n),i=t.findIndex(c=>c[1]===l);if(i===-1)throw new Error(`Breakpoint ${String(l)} not found`);const s=t[i][0],u=i<t.length-1?t[i+1][0]:1/0;switch(r){case"=":return a>=s&&a<u;case"!=":return!(a>=s&&a<u);case"<=":return a<=s;case">=":return a>=s;case"<":return a<s;case">":return a>s;default:return!1}}function Qt(t,n){const a=t.findIndex(r=>r[0]>n)-1;return a>=0?t[a][1]:(t.length>0&&n>=t[0][0],t[0][1])}function Fe(t,{breakpoints:n,mode:a="viewport"}){const l=[...Object.entries(n).map(([s,u])=>[u,s])].sort((s,u)=>s[0]-u[0]),i=s=>{const u=s.map(({width:o})=>{const p=l.findIndex(f=>f[0]>o)-1;return p>=0?{width:o,breakpoint:l[p][1]}:l.length>0&&o>=l[0][0]?{width:o,breakpoint:l[0][1]}:{width:o,breakpoint:l[0][1]}});return t({value:u,breakpoints:n,asList:l,is:(o,p)=>rt(l,o,p)})};return a==="element"?q.ElementRect(i):q.WindowSize(i)}let Pe=NaN;function Xt(t,n){return t?(isNaN(Pe)&&(Pe=parseFloat(getComputedStyle(document.documentElement).fontSize)),parseFloat(t)*Pe):n}function J(t,n,a){return Xt(t.getPropertyValue(n),a)}function lt(t){return e.WithElement(n=>{const a=getComputedStyle(n),r={zero:0,xs:J(a,"--breakpoint-xs",640),sm:J(a,"--breakpoint-sm",768),md:J(a,"--breakpoint-md",1024),lg:J(a,"--breakpoint-lg",1280),xl:J(a,"--breakpoint-xl",1536)};return Fe(t,{breakpoints:r})})}function en(t){return e.WithElement(n=>{const a=getComputedStyle(n),r={zero:0,"3xs":J(a,"--container-3xs",256),"2xs":J(a,"--container-2xs",288),xs:J(a,"--container-xs",320),sm:J(a,"--container-sm",384),md:J(a,"--container-md",448),lg:J(a,"--container-lg",512),xl:J(a,"--container-xl",640),"2xl":J(a,"--container-2xl",768),"3xl":J(a,"--container-3xl",1024),"4xl":J(a,"--container-4xl",1280),"5xl":J(a,"--container-5xl",1536),"6xl":J(a,"--container-6xl",2048)};return Fe(t,{breakpoints:r,mode:"element"})})}function X(t,n){return`bc-panel ${(Array.isArray(t)?t:[t]).map(r=>`bc-panel--side-${r}`).join(" ")} bc-panel--shadow-${n}`}function re(t){const n=e.Value.toSignal(t).map(r=>h.backgroundValue(r,"lighter","light")),a=e.Value.toSignal(t).map(r=>h.backgroundValue(r,"lighter","dark"));return e.Fragment(e.style.variable("--panel-bg",n.$.backgroundColor),e.style.variable("--panel-text",n.$.textColor),e.style.variable("--panel-bg-dark",a.$.backgroundColor),e.style.variable("--panel-text-dark",a.$.textColor))}const te={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 qe(t,n){if(typeof t=="number")return{zero:t,xs:t,sm:t,md:t,lg:t,xl:t};const a={zero:t.zero??n.zero,xs:t.xs??n.xs,sm:t.sm??n.sm,md:t.md??n.md,lg:t.lg??n.lg,xl:t.xl??n.xl};return a.xs<a.zero&&(a.xs=a.zero),a.sm<a.xs&&(a.sm=a.xs),a.md<a.sm&&(a.md=a.sm),a.lg<a.md&&(a.lg=a.md),a.xl<a.lg&&(a.xl=a.lg),a}function De(t){t=t.filter(n=>n.some(a=>a!=null&&!a.startsWith("?")));for(let n=0;n<t[0].length;n++)t.every(a=>a[n]==null||a[n].startsWith("?"))&&(t=t.map(a=>a.filter((r,l)=>l!==n)),n--);return t=t.map(n=>n.map(a=>a?.startsWith("?")?a.slice(1):a)),t}function tn({smallBreakpoint:t,mediumBreakpoint:n,vertical:a,horizontal:r,is:l}){function i(c){let o=[[null],[null],[null],[null],[null],[null]];const p=[];p.push("1fr");const f=[];return r.banner&&(f.push(r.banner[c]+"px"),o[0][1]="banner"),(r.header||a.menu||a.aside)&&(f.push((r.header?.[c]??te.header[c])+"px"),o[1][1]="header"),r.mainHeader&&(f.push(r.mainHeader[c]+"px"),o[2][1]="mainHeader"),f.push("1fr"),o[3][1]="main",r.mainFooter&&(f.push(r.mainFooter[c]+"px"),o[4][1]="mainFooter"),r.footer&&(f.push(r.footer[c]+"px"),o[5][1]="footer"),o=De(o),{columns:p.join(" "),rows:f.join(" "),areas:o.map(g=>`"${g.join(" ")}"`).join(`
2
2
  `),displayMenu:!1,displayAside:!1,menuWidth:te.menu[c]+"px",asideWidth:te.aside[c]+"px"}}function s(c){let o=[[null,null],[null,null],[null,null],[null,null],[null,null],[null,null]];const p=[];a.menu&&(p.push(a.menu[c]+"px"),o[2][0]="?menu",o[3][0]="menu",o[4][0]="?menu"),p.push("1fr");const f=[];return r.banner&&(f.push(r.banner[c]+"px"),o[0][0]="?banner",o[0][1]="banner"),(r.header||a.aside)&&(f.push((r.header?.[c]??te.header[c])+"px"),o[1][0]="?header",o[1][1]="header"),r.mainHeader&&(f.push(r.mainHeader[c]+"px"),o[2][1]="mainHeader"),f.push("1fr"),o[3][1]="main",r.mainFooter&&(f.push(r.mainFooter[c]+"px"),o[4][1]="mainFooter"),r.footer&&(f.push(r.footer[c]+"px"),o[5][0]="?footer",o[5][1]="footer"),o=De(o),{columns:p.join(" "),rows:f.join(" "),areas:o.map(g=>`"${g.join(" ")}"`).join(`
3
3
  `),displayMenu:!0,displayAside:!1,menuWidth:te.menu[c]+"px",asideWidth:te.aside[c]+"px"}}function u(c){let o=[[null,null,null],[null,null,null],[null,null,null],[null,null,null],[null,null,null],[null,null,null]];const p=[];a.menu&&(p.push(a.menu[c]+"px"),o[2][0]="?menu",o[3][0]="menu",o[4][0]="?menu"),p.push("1fr"),a.aside&&(p.push(a.aside[c]+"px"),o[2][2]="?aside",o[3][2]="aside",o[4][2]="?aside");const f=[];return r.banner&&(f.push(r.banner[c]+"px"),o[0][0]="?banner",o[0][1]="banner",o[0][2]="?banner"),r.header&&(f.push(r.header[c]+"px"),o[1][0]="?header",o[1][1]="header",o[1][2]="?header"),r.mainHeader&&(f.push(r.mainHeader[c]+"px"),o[2][1]="mainHeader"),f.push("1fr"),o[3][1]="main",r.mainFooter&&(f.push(r.mainFooter[c]+"px"),o[4][1]="mainFooter"),r.footer&&(f.push(r.footer[c]+"px"),o[5][0]="?footer",o[5][1]="footer",o[5][2]="?footer"),o=De(o),{columns:p.join(" "),rows:f.join(" "),areas:o.map(g=>`"${g.join(" ")}"`).join(`
4
- `),displayMenu:!0,displayAside:!0,menuWidth:te.menu[c]+"px",asideWidth:te.aside[c]+"px"}}return({width:c,breakpoint:o})=>l(`<=${t}`,c)?i(o):l(`<=${n}`,c)?s(o):u(o)}const nn=["menu","aside"],an=["banner","header","mainHeader","mainFooter","footer"];function rn(t,{displayMenu:n},a){return t?n?"block":a?"float":"none":"none"}function ln(t,{displayAside:n},a){return t?n?"block":a?"float":"none":"none"}function on({smallBreakpoint:t="sm",mediumBreakpoint:n="md",...a}){const r=Object.fromEntries(nn.filter(i=>a[i]).map(i=>[i,qe(a[i].width??{},te[i])])),l=Object.fromEntries(an.filter(i=>a[i]).map(i=>[i,qe(a[i].height??{},te[i])]));return e.Use(h.BeatUII18n,i=>lt(({value:s,is:u})=>{const c=tn({smallBreakpoint:t,mediumBreakpoint:n,vertical:r,horizontal:l,is:u}),o=s.map(c),p=l.header!=null||r.menu!=null||r.aside!=null,f=e.computedOf(r.aside!=null,o)((d,{displayAside:y})=>d&&!y),C=e.computedOf(r.menu!=null,o)((d,{displayMenu:y})=>d&&!y),g=W.useAnimatedElementToggle(),v=W.useAnimatedElementToggle(),b=e.prop(0),w=e.computedOf(r.menu!=null,o,g.display)(rn),m=e.computedOf(r.aside!=null,o,v.display)(ln);return e.html.div(e.style.display("grid"),e.style.height("100%"),e.style.width("100%"),e.style.gridTemplateColumns(o.$.columns),e.style.gridTemplateRows(o.$.rows),e.style.gridTemplateAreas(o.$.areas),e.style.gridColumnGap("0"),e.style.gridRowGap("0"),a.banner?e.html.header(e.attr.class(X("none",a.banner.shadow??"none")),re(a.banner.color??"white"),e.style.height("100%"),e.style.gridArea("banner"),a.banner.content):null,e.html.header(e.attr.class(X("bottom",a.header?.shadow??"none")),re(a.header?.color??"white"),e.style.zIndex("20"),e.style.display(p?"block":"none"),e.style.gridArea("header"),q.ElementRect(d=>(d.$.bottom.feedProp(b),null)),e.html.div(e.style.display("flex"),e.style.height("100%"),e.html.div(e.style.display(C.map(d=>d?"flex":"none")),e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),h.Button({onClick:()=>g.toggle(),variant:"light",color:"base"},e.aria.label(i.$.toggleMenu),h.Icon({icon:g.display.map(d=>d?"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"),a.header?.content),e.html.div(e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),e.style.display(f.map(d=>d?"flex":"none")),h.Button({onClick:()=>v.toggle(),roundedness:"full",variant:"light",color:"base"},e.aria.label(i.$.toggleAside),h.Icon({icon:"line-md/chevron-left"},e.attr.style("transition: transform 0.2s ease-in-out"),e.attr.style(v.display.map(d=>`transform: rotate(${d?180:0}deg)`))))))),a.menu?e.html.nav(e.WithElement(d=>g.setElement(d)),e.style.zIndex("10"),e.aria.label(i.$.mainNavigation),e.attr.role("navigation"),e.style.overflow("hidden"),e.attr.class(w.map(d=>d==="float"?X("right",a.menu?.shadow??"md"):X("right",a.menu?.shadow??"none"))),re(a.menu?.color??"white"),e.style.height(w.map(d=>d==="float"?"auto":"100%")),e.style.overflow("hidden"),e.style.gridArea("menu"),e.style.display(e.computedOf(w,g.status)((d,y)=>d==="none"&&y==="closed"?"none":"block")),e.style.position(e.computedOf(w,g.status)((d,y)=>d==="float"||d==="none"&&y!=="closed"?"fixed":"initial")),e.style.top(b.map(d=>`${d}px`)),W.AnimatedToggleClass({animation:{slide:"right"},status:e.computedOf(w,g.status)((d,y)=>d==="block"?"opened":y)}),e.style.width(e.coalesce(a.menu?.width,o.$.menuWidth)),e.style.bottom("0"),a.menu?.content):null,a.mainHeader?e.html.header(e.style.height("100%"),e.style.gridArea("mainHeader"),e.attr.class(X("none",a.mainHeader?.shadow??"none")),re(a.mainHeader?.color??"white"),a.mainHeader.content):null,e.html.main(e.style.height("100%"),e.style.overflow("hidden"),e.style.gridArea("main"),e.attr.class(X("none",a.main?.shadow??"none")),re(a.main?.color??"white"),a.main.content),a.mainFooter?e.html.footer(e.style.height("100%"),e.style.gridArea("mainFooter"),e.attr.class(X("none",a.mainFooter?.shadow??"none")),re(a.mainFooter?.color??"white"),a.mainFooter.content):null,a.aside?e.html.aside(e.WithElement(d=>{v.setElement(d)}),e.style.zIndex("10"),e.aria.label(i.$.sidebar),e.attr.role("complementary"),e.attr.class(m.map(d=>d==="float"?X("left","md"):X("left","none"))),re("white"),e.style.height("100%"),e.style.gridArea("aside"),e.style.display(e.computedOf(m,v.status)((d,y)=>d==="none"&&y==="closed"?"none":"block")),e.style.position(e.computedOf(m,v.status)((d,y)=>d==="float"||d==="none"&&y!=="closed"?"fixed":"initial")),e.style.top(b.map(d=>`${d}px`)),W.AnimatedToggleClass({animation:{slide:"left"},status:e.computedOf(m,v.status)((d,y)=>d==="block"?"opened":y)}),e.style.width(e.coalesce(a.aside?.width,o.$.asideWidth)),e.style.bottom(b.map(d=>`${d}px`)),a.aside.content):null,a.footer?e.html.footer(e.attr.class(X("top","none")),re("white"),e.style.height("100%"),e.style.gridArea("footer"),a.footer.content):null)}))}function sn(...t){return e.html.div(e.attr.class("bc-center-h"),e.html.div(e.attr.class("bc-center__content"),...t))}function un(t){const n=["bc-center"];return t!=="lg"&&n.push(`bc-center--gap-${t}`),n.join(" ")}function cn({gap:t="lg"}={},...n){return e.html.div(e.attr.class(e.computedOf(t)(a=>un(a??"lg"))),...n)}function ot({open:t},...n){return e.WithElement(a=>{const{status:r,setOpen:l,dispose:i}=W.useAnimatedElementToggle({initialStatus:e.Value.get(t)?"opened":"closed",element:a});return e.Value.on(t,l),q.ElementRect(s=>{const u=e.prop(null);return e.computedOf(r,s.$.height)((o,p)=>o==="opened"&&p>0?p:null).on(o=>{o!=null&&u.set(o)}),r.on(o=>{if(a&&o==="start-opening"){const p=a.style.height,f=a.style.transition;a.style.transition="none",a.style.height="auto",a.offsetHeight;const C=a.scrollHeight;C>0&&u.set(C),a.style.height=p,a.style.transition=f,a.offsetHeight}}),e.Fragment(e.OnDispose(i),e.attr.style(u.map(o=>`--collapse-height: ${o!=null?`${o}px`:"auto"}`)),e.attr.class(r.map(o=>`bc-collapse bc-collapse--${o}`)),...n)})})}function dn(t){return`${t}px`}function Je(t){return e.Value.map(t,dn)}function pn({body:t,contentWidth:n,contentHeight:a,header:r,headerHeight:l=0,topStart:i,topEnd:s,footer:u,footerHeight:c=0,bottomStart:o,bottomEnd:p,sidebarStart:f,sidebarStartWidth:C=0,sidebarEnd:g,sidebarEndWidth:v=0,anchorMode:b="container-edge"}){const w=e.prop(0n),m=e.prop(0n),d=Je(l),y=Je(C),x=e.prop(16);return e.html.div(e.attr.class("bc-nine-slice-container"),q.ElementRect(k=>{const I=e.computedOf(k.$.width,C,v)((D,E,G)=>D-E-G),T=e.computedOf(k.$.height,l,c)((D,E,G)=>D-E-G),S=e.computedOf(n,I)((D,E)=>D>BigInt(E)),$=e.computedOf(a,T)((D,E)=>D>BigInt(E)),L=e.computedOf(I,$,x)((D,E,G)=>E?D-G:D),N=e.computedOf(T,S,x)((D,E,G)=>E?D-G:D),M=e.computedOf(n,L)((D,E)=>Number(D/BigInt(Math.max(1,E)))),z=e.computedOf(a,N)((D,E)=>Number(D/BigInt(Math.max(1,E)))),H=e.Value.map(b,D=>D==="body-end"||D==="body-end-bottom"),A=e.When(H,()=>e.style.left(e.computedOf(C,n,L,v)((D,E,G,P)=>{const B=D+Number(E),F=D+G,j=Math.min(B,F);return`${Math.max(D+P,j)}px`})),()=>e.style.right("0")),Y=e.Value.map(b,D=>D==="body-bottom"||D==="body-end-bottom"),K=e.When(Y,()=>e.style.top(e.computedOf(l,a,N,c)((D,E,G,P)=>{const B=D+Number(E),F=D+G,j=Math.min(B,F);return`${Math.max(D+P,j)}px`})),()=>e.style.bottom("0")),ke=e.computedOf($,x)((D,E)=>D?`${E}px`:"0"),Q=e.computedOf(S,x)((D,E)=>D?`${E}px`:"0"),ge=e.style.transform(e.computedOf(m,w,S,$)((D,E,G,P)=>{const B=G?`translateX(-${D}px)`:"",F=P?`translateY(-${E}px)`:"";return`${B} ${F}`.trim()||"none"})),be=e.style.transform(m.map(D=>`translateX(-${D}px)`)),le=e.style.transform(w.map(D=>`translateY(-${D}px)`)),he=e.computedOf(a,N)((D,E)=>D-BigInt(Math.max(1,E))),ue=e.computedOf(n,L)((D,E)=>D-BigInt(Math.max(1,E)));let U=null,oe=0,ie=0;const Ie=()=>{const D=he.value,E=ue.value,G=$.value,P=S.value;if(G&&ie!==0){const B=Ze(ye(0n,D),ye(0n,w.value+BigInt(Math.round(ie))));w.set(B)}if(P&&oe!==0){const B=Ze(ye(0n,E),ye(0n,m.value+BigInt(Math.round(oe))));m.set(B)}oe=0,ie=0,U=null};return S.on(D=>{D||m.set(0n)}),$.on(D=>{D||w.set(0n)}),e.Fragment(e.OnDispose(()=>{U&&clearTimeout(U)}),e.on.wheel(D=>{D.preventDefault();const{deltaX:E,deltaY:G}=D;oe+=E,ie+=G,U||(U=setTimeout(Ie,16))}),e.html.div(e.attr.class("bc-nine-slice-pane-container"),e.style.right(ke),e.style.bottom(Q),i!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-start"),e.style.top("0"),e.style.left("0"),i):null,r!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-header"),e.style.top("0"),e.style.left(y),e.html.div(e.attr.class("bc-nine-slice-pane-content"),be,r)):null,s!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-end"),e.style.top("0"),A,s):null,f!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-start"),e.style.left("0"),e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),le,f)):null,e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-body"),e.style.left(y),e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),ge,t)),g!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),A,e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),le,g)):null,o!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-start"),e.style.left("0"),K,o):null,u!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-footer"),e.style.left(y),K,e.html.div(e.attr.class("bc-nine-slice-pane-content"),be,u)):null,p!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-end"),A,K,p):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($,x)((D,E)=>D?`${E}px`:"0")),e.style.bottom("0"),e.style.height(S.map(D=>D?"16px":"0")),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar-thumb"),e.style.width(M.map(D=>`${100/Math.max(1,D)}%`)),e.style.height("100%"),e.style.backgroundColor("#ff000066")),e.on.scroll(D=>{const E=D.target,G=E.scrollLeft,P=E.scrollWidth-E.clientWidth;if(P>0){const B=G/P,F=ue.value;m.set(BigInt(Math.round(Number(F)*B)))}})),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(S,x)((D,E)=>D?`${E}px`:"0")),e.style.right("0"),e.style.width($.map(D=>D?"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(l,c,a,z)((D,E,G,P)=>`${100/Math.max(1,P)}%`)),e.style.backgroundColor("#ff000066")),e.on.scroll(D=>{const E=D.target,G=E.scrollTop,P=E.scrollHeight-E.clientHeight;if(P>0){const B=G/P,F=he.value;w.set(BigInt(Math.round(Number(F)*B)))}})))}))}function Be({header:t,footer:n,body:a,shadowOnScroll:r=!0},...l){const i=e.prop("none");function s(c){const o=c.scrollTop===0,p=c.scrollTop+c.clientHeight>=c.scrollHeight-1;o&&p?i.set("none"):o?i.set("bottom"):p?i.set("top"):i.set("both")}return e.html.div(e.attr.class("bc-scrollable-panel"),e.attr.class(e.computedOf(i,r)((c,o)=>{if(!o)return"";switch(c){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(c=>e.OnDispose(ce.g(()=>s(c)))),e.on.scroll(c=>{const o=c.target;s(o)}),a),e.html.div(e.attr.class("bc-scrollable-panel--footer-shadow"),e.html.div()),n&&e.html.div(e.attr.class("bc-scrollable-panel__footer"),n),...l)}function mn(t,n,a){const r=["bc-sink"];return t!=="default"&&r.push(`bc-sink--${t}`),n!=="md"&&r.push(`bc-sink--padding-${n}`),a!=="lg"&&r.push(`bc-sink--rounded-${a}`),r.join(" ")}function fn({variant:t="default",size:n="md",roundedness:a="lg"}={},...r){return e.html.div(e.attr.class(e.computedOf(t,n,a)((l,i,s)=>mn(l??"default",i??"md",s??"lg"))),...r)}const ne={value:(t,n,{disabled:a,before:r,after:l}={})=>({type:"value",value:t,label:n,disabled:a,before:r,after:l}),group:(t,n,{disabled:a,before:r,after:l}={})=>({type:"group",group:t,options:n,disabled:a,before:r,after:l}),break:{type:"break"},getValues:t=>t.flatMap(n=>n.type==="group"?ne.getValues(n.options):n.type==="break"?[]:[n.value]),contains:(t,n,a=(r,l)=>r===l)=>ne.getValues(t).some(r=>a(r,n))},Me=t=>{const{onChange:n,onBlur:a,role:r,display:l,optionsSource:i,allowSpaceToggle:s=!1,onBeforeOpen:u,onAfterOpen:c,buildListboxContent:o}=t,p=e.prop(!1),f=e.prop(-1),C=e.prop(null),g=_.sessionId("dropdown"),v=_.sessionId("listbox");let b,w;const m=y=>{n?.(y),p.set(!1),f.set(-1),C.set(null),b?.focus()},d=y=>{const x=ne.getValues(e.Value.get(i));switch(y.key){case"ArrowDown":{if(y.preventDefault(),!p.value)p.set(!0),x.length>0&&(f.set(0),C.set(x[0]));else{const k=Math.min(f.value+1,x.length-1);f.set(k),C.set(x[k]??null)}break}case"ArrowUp":{if(y.preventDefault(),p.value){const k=Math.max(f.value-1,0);f.set(k),C.set(x[k]??null)}break}case"Enter":{if(y.preventDefault(),p.value&&f.value>=0){const k=x[f.value];k!=null&&m(k)}else{u?.();const k=ne.getValues(e.Value.get(i));p.set(!0),k.length>0&&(f.set(0),C.set(k[0])),setTimeout(()=>c?.(),0)}break}case"Escape":{p.value&&(y.preventDefault(),p.set(!1),f.set(-1),C.set(null),b?.focus());break}case" ":{if(e.Value.get(s)){y.preventDefault();const k=ne.getValues(e.Value.get(i));p.set(!p.value),p.value&&k.length>0&&(f.set(0),C.set(k[0]))}break}}};return h.InputContainer({...t,input:V.Group(e.attr.class("bc-dropdown__trigger"),e.html.span(e.attr.class("bc-dropdown__display"),l),h.Icon({icon:"ph:caret-up-down-bold",color:"neutral"},e.attr.class("bc-dropdown__arrow")))},q.ElementRect(y=>e.Fragment(e.WithElement(x=>(b=x,x.addEventListener("keydown",d),e.OnDispose(()=>x.removeEventListener("keydown",d)))),h.CommonInputAttributes(t),e.attr.id(g),e.attr.tabindex(0),e.aria.controls(v),e.aria.expanded(p),e.attr.class("bc-dropdown"),e.attr.role(r),e.aria.activedescendant(e.computedOf(p,C)((x,k)=>x&&k!=null?`dropdown-option-${String(k)}`:"")),a!=null?e.on.blur(()=>{setTimeout(()=>{w?.contains(document.activeElement)||(p.set(!1),f.set(-1),a())},100)}):e.Empty,fe({content:()=>e.html.div(e.WithElement(x=>{w=x}),e.style.minWidth(y.$.width.map(x=>`${x-10}px`)),e.attr.class("bc-dropdown__listbox"),e.attr.role("listbox"),e.attr.id(v),e.aria.labelledby(g),o({dropdownId:g,listboxId:v,focusedValue:C,handleKeyDown:d,onSelect:m})),mainAxisOffset:0,placement:"bottom-start",hasPopup:"listbox",showOn:(x,k)=>{const I=k;k=()=>{p.set(!1),f.set(-1),C.set(null),I()};const T=()=>{if(p.value)k();else{u?.();const S=ne.getValues(e.Value.get(i));p.set(!0),S.length>0&&(f.set(0),C.set(S[0])),x(),setTimeout(()=>c?.(),0)}};return e.on.click(T)},showDelay:0,hideDelay:0,closable:!0}))))},it=(t,n,a,r,l)=>e.Ensure(t,i=>e.OneOfType(i,{value:s=>{const u=e.computedOf(s,a)((o,p)=>n(o.value,p)),c=e.computedOf(s,l)((o,p)=>p!=null&&n(o.value,p));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(u,c,s)((o,p,f)=>{const C=[];return o&&C.push("bc-dropdown__option--selected"),p&&C.push("bc-dropdown__option--focused"),f.disabled&&C.push("bc-dropdown__option--disabled"),C.join(" ")})),e.attr.role("option"),e.attr.id(s.map(o=>`dropdown-option-${String(o.value)}`)),e.aria.selected(u),V.Expando("value",s.$.value),e.When(s.map(o=>!o.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,u=>it(u,n,a,r,l))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),st=t=>{const{value:n,options:a,unselectedLabel:r,equality:l=(o,p)=>o===p,placeholder:i,searchable:s=!1}=t,u=e.computedOf(n,a)((o,p)=>{if(o==null)return"";const f=C=>{for(const g of C){if(g.type==="value"&&l(g.value,o))return g.label;if(g.type==="group"){const v=f(g.options);if(v)return v}}};return f(p)||String(o)}),c=e.computedOf(s)(o=>!o);return Me({...t,role:"dropdown",display:e.When(u.map(o=>o.length>0),()=>u,()=>e.Use(h.BeatUII18n,o=>e.coalesce(i,r,o.$.selectOne))),optionsSource:a,allowSpaceToggle:c,buildListboxContent:({focusedValue:o,onSelect:p})=>e.ForEach(a,f=>it(f,l,n,p,o))})},ut=t=>{const{controller:n,onChange:a,onBlur:r,...l}=t;return st({...l,value:n.signal,onChange:_.makeOnChangeHandler(n,a),onBlur:_.makeOnBlurHandler(n,r)})},gn=t=>_.InputWrapper({...t,content:ut(t)}),ct=(t,n,a,r,l,i)=>e.Ensure(t,s=>e.OneOfType(s,{value:u=>{const c=e.computedOf(u,a)((p,f)=>n(p.value,f)),o=e.computedOf(u,l)((p,f)=>f!=null&&n(p.value,f));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(c,o,u)((p,f,C)=>{const g=[];return p&&g.push("bc-dropdown__option--selected"),f&&g.push("bc-dropdown__option--focused"),C.disabled&&g.push("bc-dropdown__option--disabled"),g.join(" ")})),e.attr.role("option"),e.attr.id(u.map(p=>`dropdown-option-${String(p.value)}`)),e.aria.selected(c),e.When(u.map(p=>!p.disabled),()=>e.on.click(()=>r(u.value.value)),()=>e.Empty),e.html.div(e.attr.class("bc-dropdown__option-content"),u.value.before&&e.html.span(e.attr.class("bc-dropdown__option-before"),u.value.before),e.html.span(e.attr.class("bc-dropdown__option-label"),i(u.$.value)),u.value.after&&e.html.span(e.attr.class("bc-dropdown__option-after"),u.value.after)))},group:u=>e.html.div(e.attr.class("bc-dropdown__group"),e.attr.role("group"),e.aria.label(u.$.group),e.html.div(e.attr.class("bc-dropdown__group-label"),u.$.group),e.ForEach(u.$.options,c=>ct(c,n,a,r,l,i))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),dt=t=>{const{value:n,loadOptions:a,renderOption:r,renderValue:l,equality:i=(d,y)=>d===y,placeholder:s,searchPlaceholder:u,debounceMs:c=150}=t,o=e.prop(""),p=e.prop(!1),f=e.prop([]);let C;const g=e.Value.toSignal(n),v=()=>(l??r)(g);let b=null;const w=d=>{p.set(!0),Promise.resolve(a(d)).then(y=>{f.set(y??[])}).catch(()=>{f.set([])}).finally(()=>p.set(!1))},m=d=>{b!=null&&(clearTimeout(b),b=null),b=setTimeout(()=>{w(d)},Math.max(0,c))};return Me({...t,role:"combobox",display:e.When(e.computedOf(n)(d=>d!=null),v,()=>e.Use(h.BeatUII18n,d=>d.$.selectOne)),optionsSource:f,onBeforeOpen:()=>{const d=e.Value.get(o);m(d)},onAfterOpen:()=>{C?.focus()},buildListboxContent:({focusedValue:d,handleKeyDown:y,onSelect:x})=>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(u,s)((k,I)=>k??I??"Search")),e.attr.value(o),e.WithElement(k=>(C=k,e.Empty)),e.on.input(k=>{const I=k.target;o.set(I.value),m(I.value)}),e.on.keydown(y))),e.When(p,()=>e.html.div(e.attr.class("bc-dropdown__loading"),h.Icon({icon:"ph:spinner-bold",color:"neutral"})),()=>e.ForEach(f,k=>ct(k,i,g,x,d,r))))})},pt=t=>{const{controller:n,onChange:a,onBlur:r,...l}=t;return dt({...l,value:n.signal,onChange:_.makeOnChangeHandler(n,a),onBlur:_.makeOnBlurHandler(n,r)})},bn=t=>_.InputWrapper({...t,content:pt(t)});function Ue(t){const{items:n,placement:a="bottom-start",showDelay:r=0,hideDelay:l=100,mainAxisOffset:i=4,crossAxisOffset:s=0,showOn:u="click",closable:c=!0,onClose:o,onAction:p,ariaLabel:f,ariaLabelledBy:C}=t,g=_.sessionId("menu"),v=e.prop(-1),b=e.prop([]);let w=null;return e.Fragment(fe({content:()=>e.WithElement(m=>{w=document.activeElement;const d=(T,S,$)=>{if(S.length===0)return-1;let L=T+$,N=0;for(;N<S.length;){L>=S.length&&(L=0),L<0&&(L=S.length-1);const M=S[L];if(M&&M.getAttribute("aria-disabled")!=="true")return L;L+=$,N++}return T},y=T=>{const S=b.value,$=v.value;switch(T.key){case"ArrowDown":T.preventDefault(),T.stopPropagation();const L=d($,S,1);x(L,S);break;case"ArrowUp":T.preventDefault(),T.stopPropagation();const N=d($,S,-1);x(N,S);break;case"Enter":case" ":if(T.preventDefault(),T.stopPropagation(),$>=0&&S[$]){const M=S[$];if(M.getAttribute("aria-disabled")==="true")return;const z=M.getAttribute("data-key");z&&p&&p(z),M.click(),o?.()}break;case"Escape":o?.();break;case"Home":T.preventDefault(),T.stopPropagation(),S.length>0&&x(0,S);break;case"End":T.preventDefault(),T.stopPropagation(),S.length>0&&x(S.length-1,S);break;case"ArrowRight":if(T.preventDefault(),T.stopPropagation(),$>=0&&S[$]){const M=S[$];M.classList.contains("bc-menu-item--has-submenu")&&M.dispatchEvent(new Event("mouseenter"))}break;case"ArrowLeft":T.preventDefault(),T.stopPropagation(),o?.();break}},x=(T,S)=>{v.value>=0&&S[v.value]&&(S[v.value].classList.remove("bc-menu-item--focused"),S[v.value].removeAttribute("aria-selected")),T>=0&&S[T]&&(S[T].classList.add("bc-menu-item--focused"),S[T].setAttribute("aria-selected","true"),v.set(T),typeof S[T].scrollIntoView=="function"&&S[T].scrollIntoView({block:"nearest"}))},k=()=>{const T=Array.from(m.querySelectorAll('[role="menuitem"]'));if(b.set(T),T.length>0){const S=T.findIndex($=>$.getAttribute("aria-disabled")!=="true");S>=0&&x(S,T)}},I=new MutationObserver(k);return I.observe(m,{childList:!0,subtree:!0}),setTimeout(()=>{k(),m.focus()},0),document.addEventListener("keydown",y,!0),e.Fragment(e.OnDispose(()=>{I.disconnect(),document.removeEventListener("keydown",y,!0),w&&w.focus()}),e.attr.class("bc-menu"),e.attr.id(g),e.attr.role("menu"),e.attr.tabindex(-1),e.aria.orientation("vertical"),f?e.aria.label(f):e.Fragment(),C?e.aria.labelledby(C):e.Fragment(),e.aria.activedescendant(v.map(T=>{const S=b.value;return T>=0&&S[T]?S[T].id||`${g}-item-${T}`:""})),e.on.click(T=>{const $=T.target.closest('[role="menuitem"]');if($&&$.getAttribute("aria-disabled")!=="true"){const L=$.getAttribute("data-key");L&&p&&p(L)}}),e.html.div(e.attr.class("sr-only"),e.aria.live("polite"),e.aria.atomic(!0),v.map(T=>{const S=b.value;if(T>=0&&S[T]){const $=S[T].textContent||"";return S[T].getAttribute("aria-disabled")==="true"?`${$}, disabled`:`${$}, ${T+1} of ${S.length}`}return""})),...n())}),placement:a,showDelay:r,hideDelay:l,mainAxisOffset:i,crossAxisOffset:s,showOn:u,closable:c,role:"menu"}))}function hn(t){const{key:n,content:a,startContent:r,endContent:l,disabled:i=!1,onClick:s,ariaLabel:u,submenu:c,submenuPlacement:o="right-start"}=t,p=n??_.sessionId("menu-item"),f=`menu-item-${p}`,C=c!=null;return e.html.div(e.attr.class(e.computedOf(i)(g=>`bc-menu-item ${g?"bc-menu-item--disabled":""} ${C?"bc-menu-item--has-submenu":""}`)),e.attr.id(f),e.attr.role("menuitem"),e.attr.tabindex(-1),e.dataAttr.key(p),e.aria.disabled(i),e.aria.selected(!1),C?e.aria.expanded(!1):e.Fragment(),u?e.aria.label(u):e.Fragment(),e.on.click(g=>{if(e.Value.get(i)){g.preventDefault(),g.stopPropagation();return}s?.()}),r&&e.html.span(e.attr.class("bc-menu-item__start"),r),e.html.span(e.attr.class("bc-menu-item__content"),a),l&&e.html.span(e.attr.class("bc-menu-item__end"),l),C&&c?fe({content:()=>e.Fragment(e.attr.class("bc-menu bc-submenu"),e.attr.role("menu"),...c()),placement:o,showOn:"hover",hasPopup:"menu",showDelay:100,hideDelay:300,mainAxisOffset:0,crossAxisOffset:0,role:"menu"}):e.Fragment())}function Re(t={}){const{label:n}=t;return e.html.div(e.attr.class("bc-menu-separator"),e.attr.role("separator"),e.aria.orientation("horizontal"),n&&e.html.span(e.attr.class("bc-menu-separator__label"),n))}function mt(t,n,a){return t.some(l=>a(l,n))?t.filter(l=>!a(l,n)):[...t,n]}function ft(t,n,a){return t.filter(r=>!a(r,n))}function gt(t,n,a){return t.some(r=>a(r,n))}function bt(t,n,a){for(const r of t)if(r.type==="value"){if(a(r.value,n))return{label:r.label}}else if(r.type==="group"){const l=bt(r.options,n,a);if(l!=null)return l}}function yn(t,n,a){return bt(t,n,a)?.label??String(n)}function ht(t,n,a){const r=n.trim().toLowerCase(),l=a??((s,u)=>u.label.toLowerCase().includes(s));if(r==="")return t;const i=[];for(const s of t)if(s.type==="value")l(r,{label:s.label})&&i.push(s);else if(s.type==="group"){const u=ht(s.options,r,l);u.length>0&&i.push({...s,options:u})}return i}function We(t){const{values:n,options:a,equality:r,disabled:l,onRemove:i}=t;return e.NotEmpty(n,()=>e.ForEach(n,s=>Ne({value:e.computedOf(s,a)((u,c)=>yn(c,u,r)),onClose:()=>i(s.value),disabled:l})),()=>e.html.span(e.attr.class("bc-input-container__placeholder"),t.placeholder))}function He(t){const{value:n,options:a,equality:r=(o,p)=>o===p,placeholder:l}=t,i=o=>{const p=e.Value.get(n);t.onChange?.(ft(p,o,r))},s=o=>{const p=e.Value.get(n);t.onChange?.(mt(p,o,r))},u=o=>e.computedOf(n)(p=>gt(p,o,r)),c=Ue({items:()=>{const o=e.Value.get(a),p=[];for(const f of o)if(f.type==="value"){const C=u(f.value);p.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(f.disabled===!0),e.aria.checked(C),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),f.label),e.on.click(()=>s(f.value))))}else f.type==="group"?p.push(e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),f.group),...f.options.map(C=>{if(C.type==="value"){const g=u(C.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(C.disabled===!0),e.aria.checked(g),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),C.label),e.on.click(()=>s(C.value)))}return e.Fragment()}))):p.push(Re());return p},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:"click",closable:!0});return h.InputContainer({...t,before:t.before??h.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),c,We({values:n,placeholder:l,options:a,equality:r,disabled:t.disabled,onRemove:i})),after:h.InputIcon({icon:"line-md:plus",color:"neutral",size:"sm"})})}function vn(t){return _.BaseControl(He,t)}function wn(t){return _.Control(He,t)}function je(t){const{value:n,options:a,equality:r=(g,v)=>g===v,placeholder:l,searchPlaceholder:i,filter:s}=t,u=e.prop(""),c=g=>{const v=e.Value.get(n);t.onChange?.(ft(v,g,r))},o=g=>{const v=e.Value.get(n);t.onChange?.(mt(v,g,r))},p=g=>e.computedOf(n)(v=>gt(v,g,r)),f=e.computedOf(a,u)((g,v)=>ht(g,v,s)),C=Ue({items:()=>{const g=[],v=e.Value.get(f);if(v.length===0)return g.push(e.html.div(e.attr.class("bc-dropdown__empty"),e.Use(h.BeatUII18n,b=>b.$.noResults))),g;for(const b of v)if(b.type==="value"){const w=p(b.value);g.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(b.disabled===!0),e.aria.checked(w),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),b.label),e.on.click(()=>o(b.value))))}else b.type==="group"?g.push(e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),b.group),...b.options.map(w=>{if(w.type==="value"){const m=p(w.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(w.disabled===!0),e.aria.checked(m),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),w.label),e.on.click(()=>o(w.value)))}return e.Fragment()}))):g.push(Re());return g},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:(g,v)=>e.WithElement(b=>{const w=b.querySelector(".bc-dropdown__search-input");if(w){const m=()=>g();return w.addEventListener("focus",m),e.OnDispose(()=>{w.removeEventListener("focus",m)})}return e.Fragment()}),closable:!0});return h.InputContainer({...t,before:t.before??h.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),We({values:n,options:a,placeholder:l,equality:r,disabled:t.disabled,onRemove:c}),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(i,l)((g,v)=>g??v??"")),e.attr.value(u),e.on.input(g=>{const v=g.target;u.set(v.value)}),e.on.keydown(g=>{(g.key==="ArrowUp"||g.key==="ArrowDown"||g.key==="Enter"||g.key===" ")&&g.stopPropagation()})),C))})}function Cn(t){return _.BaseControl(je,t)}function Vn(t){return _.Control(je,t)}const Sn=t=>{const{value:n,onBlur:a,onChange:r}=t;return h.InputContainer({...t,input:e.input.date(h.CommonInputAttributes(t),e.attr.valueAsDate(n),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValueAsDate(r)):e.Empty)})},xn=t=>{const n=t.getFullYear(),a=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),l=t.getHours().toString().padStart(2,"0"),i=t.getMinutes().toString().padStart(2,"0");return`${n}-${a}-${r}T${l}:${i}`},kn=t=>{const{value:n,onBlur:a,onChange:r}=t;return h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,xn)),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(l=>r(new Date(l)))):e.Empty)})},In=t=>{const{value:n,onInput:a,onChange:r,...l}=t;return V.FilesInput({...l,maxFiles:1,value:e.Value.map(n,i=>i==null?[]:[i]),onChange:i=>{r?.(i[0])},onInput:i=>{a?.(i[0])}})},Tn=t=>q.Query({request:t.request,load:t.load,convertError:String,success:({value:n})=>{const a=n.map(r=>r.map(l=>typeof l=="object"&&"id"in l&&"label"in l?ne.value(l.id,l.label):l));return V.NativeSelect({...t,options:a,unselectedLabel:t.unselectedLabel,equality:t.equality})},pending:()=>e.Use(h.BeatUII18n,n=>e.html.span(h.Icon({icon:"line-md:loading-twotone-loop",title:n.$.loadingShort})))}),On=t=>{const{value:n,onBlur:a,onChange:r,onInput:l,after:i,disabled:s,...u}=t,c=V.NullableResetAfter(n,s,r);return V.MaskInput({...u,value:e.Value.map(n,V.nullToEmpty),onChange:r!=null?o=>r(V.emptyToNull(o)):void 0,onInput:l!=null?o=>l(V.emptyToNull(o)):void 0,onBlur:a,after:i!=null?e.Fragment(c,i):c})},Ke=t=>{try{return BigInt(t)}catch{return null}},Pn=t=>{const{value:n,step:a,min:r,max:l,onChange:i,onInput:s,after:u}=t,c=g=>{const v=r!=null?e.Value.get(r):void 0,b=l!=null?e.Value.get(l):void 0;return v!=null&&g<v?v:b!=null&&g>b?b:g},o=a!=null?e.Use(h.BeatUII18n,g=>{const v=e.computedOf(n,r)((m,d)=>d==null?!0:(m??0n)>d),b=e.computedOf(n,l)((m,d)=>d==null?!0:(m??0n)<d),w=(m,d)=>{const y=e.Value.get(n)??0n,x=e.Value.get(a),k=d?.shiftKey?10n:1n,I=y+x*k*m,T=r!=null?e.Value.get(r):void 0,S=l!=null?e.Value.get(l):void 0;if(m<0n&&T!=null&&I<T||m>0n&&S!=null&&I>S)return;const $=c(I);$!==y&&i&&i($)};return _.Stack(e.attr.class("bc-number-input-steppers"),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),e.attr.disabled(e.computedOf(b,t.disabled??!1)((m,d)=>!m||d)),e.on.click(m=>w(1n,m)),e.aria.label(g.$.incrementValue),h.Icon({icon:"line-md:plus",size:"xs"})),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),e.attr.disabled(e.computedOf(v,t.disabled??!1)((m,d)=>!m||d)),e.on.click(m=>w(-1n,m)),e.aria.label(g.$.decrementValue),h.Icon({icon:"line-md:minus",size:"xs"})))}):null,p=u!=null&&o!=null?e.Fragment(o,u):u??o,f=i?g=>{const v=Ke(g);v!=null&&i(c(v))}:void 0,C=s?g=>{const v=Ke(g);v!=null&&s(c(v))}:void 0;return V.MaskInput({...t,value:e.Value.map(n,g=>g.toString()),onChange:f,onInput:C,after:p,mask:null,allowMode:"digits",class:"bc-number-input"})},Qe=t=>{if(t==null||t==="")return null;try{return BigInt(t)}catch{return null}},Dn=t=>{const{value:n,step:a,min:r,max:l,onChange:i,onInput:s,after:u}=t,c=v=>{const b=r!=null?e.Value.get(r):void 0,w=l!=null?e.Value.get(l):void 0;return b!=null&&v<b?b:w!=null&&v>w?w:v},o=a!=null?e.Use(h.BeatUII18n,v=>{const b=e.computedOf(n,r)((d,y)=>{const x=d??0n;return y==null?!0:x>y}),w=e.computedOf(n,l)((d,y)=>{const x=d??0n;return y==null?!0:x<y}),m=(d,y)=>{const x=e.Value.get(n)??0n,k=e.Value.get(a),I=y?.shiftKey?10n:1n,T=x+k*I*d,S=r!=null?e.Value.get(r):void 0,$=l!=null?e.Value.get(l):void 0;if(d<0n&&S!=null&&T<S||d>0n&&$!=null&&T>$)return;const L=c(T);L!==x&&i&&i(L)};return _.Stack(e.attr.class("bc-number-input-steppers"),e.attr.type("button"),e.html.button(e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),e.attr.disabled(e.computedOf(w,t.disabled??!1)((d,y)=>!d||y)),e.on.click(d=>m(1n,d)),e.aria.label(v.$.incrementValue),h.Icon({icon:"line-md:plus",size:"xs"})),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),e.attr.disabled(e.computedOf(b,t.disabled??!1)((d,y)=>!d||y)),e.on.click(d=>m(-1n,d)),e.aria.label(v.$.decrementValue),h.Icon({icon:"line-md:minus",size:"xs"})))}):null,p=V.NullableResetAfter(n,t.disabled,i),f=u!=null&&o!=null?e.Fragment(o,p,u):u!=null?e.Fragment(p,u):o!=null?e.Fragment(o,p):p,C=i?v=>{const b=Qe(v);i(b===null?null:c(b))}:void 0,g=s?v=>{const b=Qe(v);s(b===null?null:c(b))}:void 0;return V.MaskInput({...t,value:e.Value.map(n,v=>v==null?"":v.toString()),onChange:C,onInput:g,after:f,mask:null,allowMode:"digits",class:"bc-number-input"})},_n=t=>{const{value:n,onChange:a,onBlur:r,before:l}=t,i=e.prop(""),s=c=>{a?.(e.Value.get(n).filter(o=>o!==c))},u=()=>{const c=i.value.trim(),o=e.Value.get(n);c===""||o.includes(c)||(i.set(""),a?.([...o,c]))};return h.InputContainer({...t,before:l??h.InputIcon({icon:"tabler:tag",size:t.size,color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),e.ForEach(n,c=>Ne({value:c,onClose:()=>s(c.value),disabled:t.disabled})),e.input.text(h.CommonInputAttributes(t),e.attr.value(i),e.attr.class("bc-input bc-input-container__tags-input"),e.on.input(e.emitValue(i.set)),a!=null?e.on.change(u):e.Empty,r!=null?e.on.blur(r):e.Empty))})};function Ve(t){return n=>{const{value:a,onBlur:r,onChange:l}=n;return V.WithTemporal(i=>h.InputContainer({...n,input:e.input[t.inputType](h.CommonInputAttributes(n),e.attr.value(e.Value.map(a,t.valueToString)),e.attr.class("bc-input"),r!=null?e.on.blur(e.emitValue(r)):e.Empty,l!=null?e.on.change(e.emitValue(s=>l(t.parseValue(i,s)))):e.Empty)}))}}function Se(t){return n=>{const{value:a,onBlur:r,onChange:l,after:i,disabled:s}=n,u=V.NullableResetAfter(a,s,l);return V.WithTemporal(c=>h.InputContainer({...n,input:e.input[t.inputType](h.CommonInputAttributes(n),e.attr.value(e.Value.map(a,o=>o==null?"":t.valueToString(o))),e.attr.class("bc-input"),r!=null?e.on.blur(e.emitValue(r)):e.Empty,l!=null?e.on.change(e.emitValue(o=>l(o===""?null:t.parseValue(c,o)))):e.Empty),after:i!=null?e.Fragment(u,i):u}))}}const $n=Ve({inputType:"date",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainDate.from(n)}),Bn=Se({inputType:"date",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainDate.from(n)}),Ln=Ve({inputType:"time",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainTime.from(n)}),En=Se({inputType:"time",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainTime.from(n)}),An=Ve({inputType:"datetime-local",valueToString:t=>t.toJSON(),parseValue:(t,n)=>t.PlainDateTime.from(n)}),Nn=Se({inputType:"datetime-local",valueToString:t=>t.toJSON(),parseValue:(t,n)=>t.PlainDateTime.from(n)}),Fn=t=>{const n=new Date(t),a=n.getFullYear().toString().padStart(4,"0"),r=(n.getMonth()+1).toString().padStart(2,"0"),l=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0");return`${a}-${r}-${l}T${i}:${s}`},Mn=t=>{const{value:n,onBlur:a,onChange:r}=t;return V.WithTemporal(l=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,i=>Fn(Number(i.epochMilliseconds)))),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(i=>r(l.Instant.from(new Date(i).toISOString())))):e.Empty)}))},Un=t=>{const n=new Date(t),a=n.getFullYear().toString().padStart(4,"0"),r=(n.getMonth()+1).toString().padStart(2,"0"),l=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0");return`${a}-${r}-${l}T${i}:${s}`},Rn=t=>{const{value:n,onBlur:a,onChange:r,after:l,disabled:i}=t,s=V.NullableResetAfter(n,i,r);return V.WithTemporal(u=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,c=>c==null?null:Un(Number(c.epochMilliseconds)))),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(c=>r(c===""?null:u.Instant.from(new Date(c).toISOString())))):e.Empty),after:l!=null?e.Fragment(s,l):s}))},Wn=t=>{const{value:n,onBlur:a,onChange:r}=t;return V.WithTemporal(l=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,i=>i.toJSON())),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(i=>{const s=l.PlainDateTime.from(i),u=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(l.ZonedDateTime.from({...s,timeZone:u}))})):e.Empty)}))},Hn=t=>{const{value:n,onBlur:a,onChange:r,after:l,disabled:i}=t,s=V.NullableResetAfter(n,i,r);return V.WithTemporal(u=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,c=>c?.toJSON())),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(c=>{if(c==="")return r(null);const o=u.PlainDateTime.from(c),p=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(u.ZonedDateTime.from({...o,timeZone:p}))})):e.Empty),after:l!=null?e.Fragment(s,l):s}))},jn=Ve({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainYearMonth.from(n)}),zn=Se({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainYearMonth.from(n)}),Gn=t=>{const{value:n,onChange:a}=t;return V.WithTemporal(r=>V.MaskInput({...t,value:e.Value.map(n,l=>l.toString()),onChange:a!=null?l=>a(r.PlainMonthDay.from(`--${l}`)):void 0,onInput:void 0,mask:"99-99",placeholder:"MM-DD"}))},Yn=t=>{const{value:n,onChange:a,after:r,disabled:l}=t,i=V.NullableResetAfter(n,l,a);return V.WithTemporal(s=>V.MaskInput({...t,value:e.Value.map(n,u=>u?.toString()??""),onChange:a!=null?u=>a(u===""?null:s.PlainMonthDay.from(`--${u}`)):void 0,onInput:void 0,mask:"99-99",placeholder:"MM-DD",after:r!=null?e.Fragment(i,r):i}))},Zn=t=>{const{value:n,onChange:a}=t;return V.WithTemporal(r=>V.MaskInput({...t,value:e.Value.map(n,l=>l.toString()),onChange:a?l=>a(r.Duration.from(l)):void 0,onInput:void 0,...V.durationMaskConfig(r.Duration.from),placeholder:"P0DT0H0M0S"}))};function qn(t,n,a){return e.Ensure(t.signal,()=>{const r=t.transform(l=>l,l=>l);return n(r)},a)}const Jn={filling:{type:"filling"},submitting:{type:"submitting"},error:t=>({type:"error",error:t}),success:{type:"success"}};class yt extends _.Controller{constructor(n,a,r,l,i){super(n,a,r,l,i)}isValidColor=this.signal.map(V.isValidColor);isValidHex=this.signal.map(V.isValidHexColor);normalizedHex=this.signal.map(n=>V.normalizeHexColor(n)??n);setColor=n=>{if(V.isValidHexColor(n)){const a=V.normalizeHexColor(n);if(a){this.change(a);return}}this.change(n)};setHex=n=>{const a=V.normalizeHexColor(n);a&&this.change(a)};setRgb=(n,a,r)=>{const l=s=>{const u=Math.round(Math.max(0,Math.min(255,s))).toString(16);return u.length===1?"0"+u:u},i=`#${l(n)}${l(a)}${l(r)}`;this.change(i)};getRgb=()=>{const n=this.signal.value,a=V.normalizeHexColor(n);if(!a)return null;const r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null};withFormat=n=>{const a=l=>{switch(n){case"hex":return V.normalizeHexColor(l)??l;case"rgb":const i=this.getRgb();return i?`rgb(${i.r}, ${i.g}, ${i.b})`:l;case"hsl":return l;default:return l}},r=l=>V.normalizeHexColor(l)??l;return this.transform(a,r,[`format-${n}`])}}function Kn(t){return new yt(t.path,t.change,t.signal,t.status,{disabled:t.disabled})}function Qn(t){return{id:t.name,disabled:t.disabled,value:t.normalizedHex,hasError:t.errorVisible,onChange:t.setColor,onInput:t.setColor}}function Xn({locales:t,onChange:n,updateLocale:a=!0}){return e.Use(h.BeatUII18n,r=>e.Use(h.Locale,({locale:l,setLocale:i})=>_.InputWrapper({layout:"horizontal",content:V.Group(e.attr.class("bc-group--align-center bc-group--gap-2"),h.Icon({icon:"ic:twotone-language",size:"lg",color:"neutral",title:r.$.locale}),V.NativeSelect({options:e.Value.map(t,s=>s.map(u=>{let c=u.name;return u.nativeName!=null&&u.nativeName!==u.name&&(c+=` (${u.nativeName})`),ne.value(u.code,c)})),value:l,onChange:s=>{a&&i(s),n?.(s)}}))})))}const ea=()=>e.Use(h.Locale,({direction:t})=>e.Portal("body",e.attr.class(t.map(n=>`b-${n}`))));function vt(t,n,a,r,l){const i=["bc-notification"];return t&&i.push("bc-notification--bordered"),n&&i.push("bc-notification--has-icon"),a&&i.push("bc-notification--closable"),r&&i.push("bc-notification--loading"),l&&l.length>0&&i.push(l),i.join(" ")}function wt(t,n){return[`--notification-accent-color: ${Z.getColorVar(t,500)}`,`--notification-radius: ${O.getRadiusVar(n)}`].join("; ")}function Ct({loading:t=!1,withCloseButton:n=!1,withBorder:a=!1,color:r="primary",radius:l="md",title:i,icon:s,onClose:u,class:c}={},...o){const p=e.Value.map(s,f=>f!=null);return e.html.section(e.attr.class(e.computedOf(a,p,n,t,c)((f,C,g,v,b)=>[vt(f,C,g,v,b)].join(" "))),e.attr.style(e.computedOf(r,l)((f,C)=>wt(f,C))),e.aria.live("polite"),e.aria.busy(t),e.When(t,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__loader"),h.Icon({icon:"line-md:loading-twotone-loop",size:"lg",color:r,accessibility:"decorative"})),()=>e.When(p,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__icon"),h.Icon({icon:s,size:"lg",color:r})),()=>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"),i!=null?e.html.div(e.attr.class("bc-notification__title"),i):null,e.html.div(e.attr.class("bc-notification__content"),...o)),e.When(n,()=>e.html.div(e.attr.class("bc-notification__meta"),_.CloseButton({size:"sm",color:r,onClick:u}))))}class ta{handles=[];attach(n){return this.detach(n),this.handles.push(n),()=>this.detach(n)}detach(n){const a=this.handles.lastIndexOf(n);a>=0&&this.handles.splice(a,1)}get current(){const n=this.handles[this.handles.length-1];if(!n)throw new Error("NotificationService: no provider attached. Ensure BeatUI includes notifications or attach the provider manually.");return n}show(n,...a){return this.current.show(n,...a)}clear(){this.current.clear()}}const Vt=new ta,ze={mark:e.makeProviderMark("NotificationProvider"),create:({position:t="bottom-end"}={})=>{const n=e.prop(0),a=[];function r(c){return a.push(c),()=>{const o=a.lastIndexOf(c);o>=0&&a.splice(o,1)}}const l=[],i=({dismissAfter:c,onClose:o,animation:p={fade:!0},...f},...C)=>{n.update(b=>b+1);const g=c!=null?typeof c=="number"?Lt(c*1e3):c:void 0,v={animation:p,class:e.Value.toSignal(f.class),loading:e.Value.toSignal(f.loading??!1),withCloseButton:e.Value.toSignal(f.withCloseButton==null&&c==null?!0:f.withCloseButton??!0),withBorder:e.Value.toSignal(f.withBorder??!1),color:e.Value.toSignal(f.color??"primary"),radius:e.Value.toSignal(f.radius??"md"),title:f.title??e.Empty,icon:e.Value.toSignal(f.icon),children:C,listenRequestClose:b=>(l.push(b),o?.(),()=>{}),delayedClose:g};a.forEach(b=>b(v))},s=()=>{l.forEach(c=>c()),l.length=0},u=Vt.attach({show:i,clear:s});return{value:{activeNotifications:n,show:i,clear:s,position:t,listenOnShow:r},dispose:()=>{u(),s()}}}};function St(){return e.Use(ze,({listenOnShow:t,position:n})=>e.html.div(e.attr.class("bc-notification-viewport"),e.attr.class(`bc-notification-viewport--${n}`),e.WithBrowserCtx(a=>e.OnDispose(t(r=>{const l=[],i=e.html.div(W.AnimatedToggle({animation:r.animation,initialStatus:"start-opening"},({close:s,listenOnClosed:u})=>(r.delayedClose?.finally(s),u(()=>{l.forEach(c=>c())}),Ct({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))));l.push(e.renderWithContext(i,a))})))))}function na({includeAuthI18n:t=!1,enableAppearance:n=!0,defaultAppearance:a="system",appearancePreferenceKey:r="bui-appearance",includeNotifications:l=!0,notificationPosition:i="bottom-end"},...s){return e.WithProvider(({set:u,use:c})=>{u(q.Location,{}),u(h.Locale,{}),u(h.BeatUII18n,{}),u(pe.Theme,{defaultAppearance:n?a:"light",appearancePreferenceKey:r}),l&&u(ze,{position:i}),q.NavigationService.attach(c(q.Location));const o=e.Fragment(n?pe.ThemeAppearance():e.Empty,ea(),l?St():e.Empty,...s);return t?e.Task(()=>Promise.resolve().then(()=>require("./translations-BRRDPpLp.cjs")),({AuthI18n:p})=>e.Provide(p,{},()=>o)):o})}function aa({content:t,toolbar:n=!0,page:a,zoom:r,view:l,pagemode:i,scrollbar:s=!0,navpanes:u=!0,search:c,nameddest:o,viewrect:p,highlight:f,allowfullscreen:C=!1}){const g=e.Value.toSignal(t).mapAsync(async b=>{if(b instanceof Blob){const w=await b.arrayBuffer(),m=new Blob([w],{type:"application/pdf"});return URL.createObjectURL(m)}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 m=await(await fetch(b)).arrayBuffer(),d=new Blob([m],{type:"application/pdf"});return URL.createObjectURL(d)}}},null),v=e.computedOf(g,n,a,r,l,i,s,u,c,o,p,f)((b,w,m,d,y,x,k,I,T,S,$,L)=>{if(b==null)return null;const N=[];w===!1&&N.push("toolbar=0"),m!=null&&m>0&&N.push(`page=${m}`),d!=null&&d>0&&N.push(`zoom=${d}`),y!=null&&N.push(`view=${y}`),x!=null&&N.push(`pagemode=${x}`),k===!1&&N.push("scrollbar=0"),I===!1&&N.push("navpanes=0"),T!=null&&N.push(`search=${encodeURIComponent(T)}`),S!=null&&N.push(`nameddest=${encodeURIComponent(S)}`),$!=null&&N.push(`viewrect=${encodeURIComponent($)}`),L!=null&&N.push(`highlight=${encodeURIComponent(L)}`);const M=N.join("&");return M?`${b}#${M}`:b});return g.on((b,w)=>{w!=null&&URL.revokeObjectURL(w)}),e.html.div(e.OnDispose(()=>{const b=g.value;b!=null&&URL.revokeObjectURL(b)}),e.attr.class("h-full w-full"),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(C),e.attr.title("PDF Preview"),e.attr.loading("lazy"),e.WithElement(b=>{const w=b;let m=!0;return v.on(d=>{d!=null&&(m?(w.src=d,m=!1):(w.src="about:blank",setTimeout(()=>{w.src=d},50)))}),e.Empty})))}function ra({content:t,page:n,zoom:a,pagemode:r,nameddest:l,search:i,textLayerMode:s,sidebarViewOnLoad:u,scrollModeOnLoad:c,spreadModeOnLoad:o,enableScripting:p,enablePrinting:f,viewerUrl:C=null,allowfullscreen:g=!0,class:v=null}){const b=e.Value.toSignal(t).mapAsync(async m=>{if(m instanceof Blob)return URL.createObjectURL(m);if(m instanceof ArrayBuffer)return URL.createObjectURL(new Blob([m],{type:"application/pdf"}));if(m instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(m)],{type:"application/pdf"}));if(typeof m=="string")return m},null),w=e.computedOf(b,C,n,a,r,l,i,s,u,c,o,p,f)((m,d,y,x,k,I,T,S,$,L,N,M,z)=>{if(m==null)return null;const H=d??"https://mozilla.github.io/pdf.js/web/viewer.html",A=new URLSearchParams;A.set("file",encodeURIComponent(m));const Y=[];y!=null&&y>0&&Y.push(`page=${y}`),x!=null&&(typeof x=="string"?Y.push(`zoom=${x}`):Y.push(`zoom=${x}`)),k!=null&&Y.push(`pagemode=${k}`),I!=null&&Y.push(`nameddest=${encodeURIComponent(I)}`),T!=null&&Y.push(`search=${encodeURIComponent(T)}`),S!=null&&Y.push(`textLayer=${S}`),$!=null&&Y.push(`sidebar=${$}`),L!=null&&Y.push(`scrollMode=${L}`),N!=null&&Y.push(`spreadMode=${N}`),M!=null&&Y.push(`enableScripting=${M?"1":"0"}`),z!=null&&Y.push(`enablePrinting=${z?"1":"0"}`);const K=Y.length>0?`#${Y.join("&")}`:"";return`${H}?${A.toString()}${K}`});return b.on((m,d)=>{d!=null&&d.startsWith("blob:")&&URL.revokeObjectURL(d)}),e.html.div(e.OnDispose(()=>{const m=b.value;m!=null&&m.startsWith("blob:")&&URL.revokeObjectURL(m)}),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(g),e.attr.title("PDF Preview"),e.attr.loading("lazy"),e.attr.src(w)))}const la=({id:t,css:n})=>e.Portal("head",e.html.style(e.attr.id(t),e.attr.innerHTML(n)));function ee(t,n){return n==null?null:e.html.meta(e.attr.name(t),e.attr.content(e.Value.map(n,a=>String(a))))}function R(t,n){return n==null?null:e.html.meta(e.attr.property(t),e.attr.content(e.Value.map(n,a=>String(a))))}function Ce(t,n){return n==null?null:e.ForEach(n,a=>R(t,a))}function oa(t,n){return n==null?null:e.When(e.Value.map(n,a=>Array.isArray(a)),()=>Ce(t,n),()=>R(t,n))}const ia=t=>{const n=[];if(n.push(R("og:title",t.title)),n.push(R("og:type",t.type)),n.push(R("og:url",t.url)),n.push(R("og:image",t.image)),n.push(R("og:description",t.description)),n.push(R("og:site_name",t.siteName)),n.push(R("og:locale",t.locale)),t.localeAlternate!=null){const a=Ce("og:locale:alternate",t.localeAlternate);a!=null&&n.push(a)}if(n.push(R("og:image:alt",t.imageAlt)),n.push(R("og:image:width",t.imageWidth)),n.push(R("og:image:height",t.imageHeight)),n.push(R("og:image:type",t.imageType)),t.images!=null){const a=Ce("og:image",t.images);a!=null&&n.push(a)}if(n.push(R("og:video",t.video)),n.push(R("og:video:type",t.videoType)),n.push(R("og:video:width",t.videoWidth)),n.push(R("og:video:height",t.videoHeight)),n.push(R("og:video:secure_url",t.videoSecureUrl)),n.push(R("og:audio",t.audio)),n.push(R("og:audio:type",t.audioType)),n.push(R("og:audio:secure_url",t.audioSecureUrl)),n.push(R("article:published_time",t.publishedTime)),n.push(R("article:modified_time",t.modifiedTime)),n.push(R("article:expiration_time",t.expirationTime)),n.push(oa("article:author",t.author)),n.push(R("article:section",t.section)),t.tags!=null){const a=Ce("article:tag",t.tags);a!=null&&n.push(a)}return n.push(R("profile:first_name",t.firstName)),n.push(R("profile:last_name",t.lastName)),n.push(R("profile:username",t.username)),n.push(R("profile:gender",t.gender)),n.push(ee("twitter:card",t.twitterCard)),n.push(ee("twitter:site",t.twitterSite)),n.push(ee("twitter:creator",t.twitterCreator)),n.push(ee("twitter:title",e.coalesce(t.twitterTitle,t.title))),n.push(ee("twitter:description",e.coalesce(t.twitterDescription,t.description))),n.push(ee("twitter:image",e.coalesce(t.twitterImage,t.image))),n.push(ee("twitter:image:alt",e.coalesce(t.twitterImageAlt,t.imageAlt))),t.canonical!=null&&e.Value.get(t.canonical)!=null&&n.push(e.html.link(e.attr.rel("canonical"),e.attr.href(t.canonical))),n.push(ee("robots",t.robots)),n.push(ee("keywords",t.keywords)),n.push(ee("author",t.metaAuthor)),e.Portal("head",n.filter(a=>a!=null).flat())},Ge=({viewTransition:t,state:n,scroll:a,replace:r})=>{const l={};return n!==void 0&&(l.state=n),a!==void 0&&(l.scroll=a),r!==void 0&&(l.replace=r),t!==void 0&&(l.viewTransition=t),l};function Le(t,n){const a=["bc-link"];if(n)a.push("bc-link--disabled");else switch(t){case"plain":a.push("bc-link--plain");break;case"hover":a.push("bc-link--hover");break;case"default":default:a.push("bc-link--default");break}return a.join(" ")}function Ee(t){const n=h.textColorValue(t,"light"),a=h.textColorValue(t,"dark");return[`--link-color: ${n}`,`--link-color-dark: ${a}`,`--link-hover-color: ${n}`,`--link-hover-color-dark: ${a}`].join("; ")}function xt({href:t,variant:n="default",color:a="primary",colorDisabled:r="base",disabled:l=!1,viewTransition:i=!0,state:s,scroll:u,replace:c,target:o,rel:p},...f){return e.When(l,()=>e.html.span(e.attr.class(e.computedOf(n,l)((C,g)=>Le(C,g))),e.attr.style(e.computedOf(r)(C=>Ee(C??"base"))),...f),()=>q.Anchor({href:t,...Ge({viewTransition:i,state:s,scroll:u,replace:c})},e.attr.class(e.computedOf(n,l)((C,g)=>Le(C,g))),e.attr.style(e.computedOf(a)(C=>Ee(C??"primary"))),o?e.attr.target(o):null,p?e.attr.rel(p):null,...f))}const sa=t=>t?t.startsWith("#")?t:`#${t}`:"",ua=t=>{if(!t)return new URLSearchParams;if(typeof t=="string"){const n=t.startsWith("?")?t.slice(1):t;return new URLSearchParams(n)}return t instanceof URLSearchParams?new URLSearchParams(t):new URLSearchParams(t)};function kt(t,n,a){const r=ua(t.search),l=r.toString(),i=l?`?${l}`:"",s=sa(t.hash);switch(a){case"exact":return t.pathname+i+s===n;case"prefix":return t.pathname.startsWith(n)||(t.pathname+i).startsWith(n);case"params":try{const u=typeof document<"u"&&document.baseURI?document.baseURI:"http://localhost/",c=new URL(n,u);if(t.pathname!==c.pathname)return!1;const o=Array.from(new URLSearchParams(c.search).entries()).sort(),p=Array.from(r.entries()).sort();return o.length!==p.length?!1:o.every(([f,C],g)=>{const[v,b]=p[g];return f===v&&C===b})}catch{return t.pathname===n}default:return!1}}function xe(t,n){return n==="exact"?e.computedOf(t)(a=>a):e.computedOf(t)(a=>r=>kt(r,a,n))}function ca({href:t,matchMode:n="exact",disableWhenActive:a=!0,...r},...l){return e.Use(q.Location,i=>{const s=i.matchSignal(xe(t,n)),u=e.computedOf(s,a)((c,o)=>o??!0?c:!1);return xt({...r,href:t,disabled:u},...l)})}function da({href:t,viewTransition:n=!0,state:a,scroll:r,replace:l,target:i,rel:s,matchMode:u,disableWhenActive:c,variant:o="filled",size:p="md",color:f="base",roundedness:C="sm",disabled:g=!1},...v){return u!==void 0||c!==void 0?e.Use(q.Location,b=>{const w=u!==void 0?b.matchSignal(xe(t,u)):e.computedOf(b.location)(()=>!1),m=e.computedOf(w,c)((y,x)=>!(x??!0)||!u?!1:y),d=e.computedOf(g,m)((y,x)=>y||x);return Xe({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:o,size:p,color:f,roundedness:C,disabled:d},...v)}):Xe({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:o,size:p,color:f,roundedness:C,disabled:g},...v)}function Xe({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:u="default",size:c="md",color:o="base",roundedness:p="sm",disabled:f=!1,fullWidth:C=!1,loading:g=!1},...v){return e.When(f??!1,()=>e.html.span(e.attr.class(e.computedOf(c,p,g,C)(h.generateButtonClasses)),e.attr.style(e.computedOf(u,o,f)((b,w,m)=>h.generateButtonStyles(b??"filled",w??"base",m))),...v),()=>q.Anchor({href:t,...Ge({viewTransition:n,state:a,scroll:r,replace:l})},e.attr.class(e.computedOf(c,p,g,C)(h.generateButtonClasses)),e.attr.style(e.computedOf(u,o,f)((b,w,m)=>h.generateButtonStyles(b??"filled",w??"base",m))),i?e.attr.target(i):null,s?e.attr.rel(s):null,...v))}const It={mark:e.makeProviderMark("SidebarContext"),create:t=>({value:{backgroundMode:"light"},dispose:()=>{}})};function pa({backgroundMode:t="light"},...n){return e.Provide(It,e.Value.map(t,a=>({backgroundMode:a})),()=>e.html.div(e.attr.class("bc-sidebar"),e.attr.class(e.Value.map(t,a=>a==="dark"?"bc-sidebar--dark-bg":"")),...n))}function Ae({rail:t,header:n},...a){return _.Stack(n!=null?e.html.div(e.attr.class("bc-sidebar-group__header"),n):null,e.html.div(e.attr.class(e.Value.map(t??!1,r=>r?"bc-sidebar-group--rail":"")),e.attr.class("bc-sidebar-group"),...a))}function Tt(t,...n){const a=Ge({viewTransition:t.viewTransition??!0,state:t.state,scroll:t.scroll,replace:t.replace});return q.Anchor({href:t.href,...a},...n)}function Ot(...t){return e.html.span(...t)}function Pt(t,...n){return e.html.button(e.attr.type("button"),e.on.click(t.onClick),t.ariaExpanded!=null?e.aria.expanded(e.Value.map(t.ariaExpanded,a=>a)):null,t.ariaControls!=null?e.aria.controls(t.ariaControls):null,t.ariaLabel!=null?e.aria.label(t.ariaLabel):null,...n)}function Dt(t){const n=[e.attr.class("bc-sidebar-link")];return t.icon!=null&&n.push(e.html.span(e.attr.class("bc-sidebar-link--icon"),h.Icon({icon:t.icon}))),n.push(e.html.span(e.attr.class("bc-sidebar-link__content"),t.content)),t.right!=null&&n.push(e.html.span(e.attr.class("bc-sidebar-link__right"),t.right)),t.action!=null&&n.push(e.html.button(e.attr.type("button"),e.attr.class("bc-sidebar-link--action"),e.on.click((a,r)=>{t.action?.onClick?.(r)}),h.Icon({icon:t.action?.icon}))),"onClick"in t?Pt(t,...n):e.Use(q.Location,a=>{const r=a.matchSignal(xe(t.href,"exact"),{includeSearch:!1,includeHash:!1});return e.When(r,()=>Ot(...n),()=>Tt(t,...n))})}function ma({rail:t=!0,icon:n,header:a,startOpen:r=!0},...l){const i=e.Value.deriveProp(r),s=_.sessionId("sidebar-group"),u=`${s}-content`;return Ae({},e.attr.class("bc-sidebar-group-collapsible"),e.attr.class(i.map(c=>c?"bc-sidebar-group-collapsible--open":"bc-sidebar-group-collapsible--closed")),e.attr.role("group"),e.attr.id(s),Dt({icon:n,onClick:()=>i.update(c=>!c),ariaExpanded:i,ariaControls:u,right:e.html.span(e.attr.class("bc-sidebar-group-collapsible-indicator"),h.Icon({icon:"lucide:chevron-down",color:"base"})),content:a}),Ae({rail:t},e.attr.id(u),ot({open:i},...l)))}function fa(){return e.html.hr(e.attr.class("bc-sidebar-separator"))}function ga(t,n,a,r){const l=["bc-tabs",`bc-tabs--${t}`,`bc-tabs--${n}`];return a&&l.push("bc-tabs--disabled"),r!=null&&r!=="default"&&l.push(`bc-tabs--variant-${r}`),l.join(" ")}function ba(t,n){if(t!=="filled")return"";const a=new Map,r=h.backgroundValue(n,"solid","light"),l=h.backgroundValue(n,"solid","dark");a.set("--tabs-filled-inactive-bg",r.backgroundColor),a.set("--tabs-filled-inactive-text","var(--color-white)");const i=h.hoverBackgroundValue(n,"solid","light");a.set("--tabs-filled-inactive-bg-hover",i.backgroundColor);const s=h.hoverBackgroundValue(n,"solid","dark");a.set("--tabs-filled-inactive-bg-dark-hover",s.backgroundColor),a.set("--tabs-filled-inactive-bg-dark",l.backgroundColor),a.set("--tabs-filled-inactive-text-dark",l.textColor),a.set("--tabs-filled-active-bg","var(--color-white)"),a.set("--tabs-filled-active-text","var(--color-base-800)"),a.set("--tabs-filled-active-bg-dark","var(--color-base-900)");const u=n==="white"||n==="black"||n==="transparent"?"var(--color-white)":Z.getColorVar(n,400);return a.set("--tabs-filled-active-text-dark",u),Array.from(a.entries()).map(([c,o])=>`${c}: ${o}`).join("; ")}function ha(t,n,a){const r=["bc-tab",`bc-tab--${t}`];return n&&r.push("bc-tab--active"),a&&r.push("bc-tab--disabled"),r.join(" ")}function ve(t,n,a){const r=n.length;let l=t+a;l>=r?l=0:l<0&&(l=r-1);let i=0;for(;i<r;){const s=n[l];if(!e.Value.get(s.disabled??!1))return l;l+=a,l>=r?l=0:l<0&&(l=r-1),i++}return t}function ya(t){const{items:n,value:a,onChange:r,size:l="md",variant:i="default",color:s="primary",disabled:u=!1,orientation:c="horizontal",showContent:o=!0,ariaLabel:p}=t,f=_.sessionId("tablist"),C=e.prop(-1),g=e.computedOf(a)(b=>n.find(w=>w.key===b)),v=b=>{if(e.Value.get(u))return;const m=C.value,d=e.Value.get(c)==="horizontal";let y=m;switch(b.key){case(d?"ArrowRight":"ArrowDown"):b.preventDefault(),y=ve(m,n,1);break;case(d?"ArrowLeft":"ArrowUp"):b.preventDefault(),y=ve(m,n,-1);break;case"Home":b.preventDefault(),y=ve(-1,n,1);break;case"End":b.preventDefault(),y=ve(n.length,n,-1);break;case"Enter":case" ":if(b.preventDefault(),m>=0&&m<n.length){const x=n[m];e.Value.get(x.disabled??!1)||r?.(x.key)}break}y!==m&&y>=0&&y<n.length&&(C.set(y),setTimeout(()=>{const x=document.querySelector(`[data-tab-index="${y}"]`);x&&x.focus()},0))};return e.html.div(e.attr.class(e.computedOf(l,c,u,i)((b,w,m,d)=>ga(b??"md",w??"horizontal",m??!1,d??"default"))),e.attr.style(e.computedOf(i,s)((b,w)=>ba(b??"default",w??"primary"))),e.html.div(e.attr.class("bc-tabs__list"),e.attr.role("tablist"),e.attr.id(f),e.aria.orientation(c??"horizontal"),p?e.aria.label(p):e.Fragment(),e.on.keydown(v),...n.map((b,w)=>{const m=e.computedOf(a)(k=>k===b.key),d=e.computedOf(u,b.disabled)((k,I)=>k||I),y=`${f}-tab-${b.key}`,x=`${f}-panel-${b.key}`;return e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(l,m,d)((k,I,T)=>ha(k??"md",I??!1,T??!1))),e.attr.id(y),e.attr.role("tab"),e.attr.tabindex(e.computedOf(m,C)((k,I)=>k||I===w?0:-1)),e.aria.selected(m),e.aria.controls(x),e.aria.disabled(d),e.attr.disabled(d),e.dataAttr["tab-index"](String(w)),b.ariaLabel?e.aria.label(b.ariaLabel):e.Fragment(),e.on.click(k=>{k.preventDefault(),e.Value.get(b.disabled??!1)||e.Value.get(u)||(r?.(b.key),C.set(w))}),e.on.focus(()=>{C.set(w)}),b.label)})),e.When(o??!0,()=>e.Ensure(g,b=>{const w=b.$.key,m=w.map(y=>`${f}-tab-${y}`),d=w.map(y=>`${f}-panel-${y}`);return e.html.div(e.attr.class("bc-tabs__panels"),e.html.div(e.attr.class("bc-tabs__panel"),e.attr.id(d),e.attr.role("tabpanel"),e.attr.tabindex(0),e.aria.labelledby(m),e.MapSignal(b,y=>y.content())))})))}function va(t){return W.Overlay((n,a)=>{let r=a;const l=()=>r();return t(u=>{const{size:c="md",side:o="right",dismissable:p=!0,showCloseButton:f=!0,onClose:C,overlayEffect:g="opaque",container:v="body",header:b,body:w,footer:m}=u;r=a;const d=e.prop("capturing");e.Value.on(p,k=>{d.set(k?"capturing":"non-capturing")});const y=e.computedOf(b!=null,f)((k,I)=>k||I),x=e.WithElement(k=>{const I=W.useAnimatedElementToggle({initialStatus:"closed",element:k});I.listenOnClosed(()=>{a()}),r=()=>{I.close()},ce.g(()=>I.open());const S=_.sessionId("drawer"),$=b!=null?`${S}-header`:void 0,L=`${S}-body`;return e.html.div(e.attr.class(e.computedOf(c,o,I.status)((N,M,z)=>`bc-drawer bc-drawer--size-${N} bc-drawer--container-${v} bc-drawer--side-${M} bc-drawer--status-${z}`)),e.attr.role("dialog"),e.aria.modal(!0),...$?[e.aria.labelledby($)]:[],e.aria.describedby(L),e.attr.tabindex(-1),e.attr.id(S),e.dataAttr.focusTrap("true"),W.FocusTrap({active:!0,escapeDeactivates:!1,initialFocus:()=>document.querySelector(`#${S} [aria-label="Close drawer"]`)||null}),e.on.mousedown(N=>N.stopPropagation()),e.MapSignal(y,N=>Be(N?{header:e.html.div(e.attr.class("bc-drawer__header"),e.html.div(e.attr.id($),b),e.When(f,()=>e.Use(h.BeatUII18n,M=>_.CloseButton({size:"sm",onClick:l,label:M.$.closeDrawer})))),body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(L),w),footer:m&&e.html.div(e.attr.class("bc-drawer__footer"),m)}:{body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(L),w),footer:m&&e.html.div(e.attr.class("bc-drawer__footer"),m)})))});n({mode:d,effect:g??"opaque",container:v,content:x,onClickOutside:()=>{C?.(),l()},onEscape:()=>{C?.(),l()}})},()=>{l()})})}function wa(t){const n={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(a=>n[a]))))}function Ca(t){const{content:n,placement:a="top",showDelay:r=250,hideDelay:l=500,mainAxisOffset:i=8,crossAxisOffset:s=0,showOn:u="hover-focus"}=t,c=_.sessionId("tooltip");return e.Fragment(e.aria.describedby(c),fe({content:()=>e.Fragment(e.attr.class("bc-tooltip"),e.attr.role("tooltip"),e.attr.id(c),n),placement:a,showDelay:r,hideDelay:l,mainAxisOffset:i,crossAxisOffset:s,showOn:u,closable:!0,role:"tooltip",arrow:o=>{const p=o.map(({placement:f})=>f.includes("top")?"down":f.includes("bottom")?"up":f.includes("left")?"right":f.includes("right")?"left":"up");return e.Fragment(e.attr.class("bc-tooltip__arrow"),e.attr.class(p.map(f=>`bc-tooltip__arrow-${f}`)),e.style.transform(o.map(({x:f,y:C})=>f==null&&C==null?"":f!=null?`translate(${f}px, 0)`:`translate(0, ${C}px)`)),wa(p))}}))}function Va(t,n,a,r,l,i){const s=h.backgroundValue(t,"solid","light"),u=h.backgroundValue(t,"solid","dark");return[`--ribbon-bg: ${s.backgroundColor}`,`--ribbon-text: ${s.textColor}`,`--ribbon-bg-dark: ${u.backgroundColor}`,`--ribbon-text-dark: ${u.textColor}`,`--ribbon-inset: ${_e(n)}`,`--ribbon-offset: ${_e(a)}`,`--ribbon-width: ${_e(r)}`,`--ribbon-angle: ${l}deg`,`--ribbon-corner: ${i}`].join("; ")}function _e(t){return t==null?null:typeof t=="number"?`${t}px`:t}function Sa({color:t="primary",class:n,inset:a=0,offset:r=40,width:l=100,angle:i=45,corner:s="top-end"},...u){return e.html.div(e.attr.class("bc-ribbon"),e.attr.style(e.computedOf(t,a,r,l,i,s)(Va)),e.attr.class(n),...u)}function xa(t,n){const{dismissable:a=!0,showCloseButton:r=!0,overlayEffect:l="opaque",container:i="body",padding:s=32}=t;return W.Overlay((u,c)=>{let o=()=>{};return n(C=>{o=c;const g=e.prop(typeof a!="boolean"||a?"capturing":"non-capturing");let v=typeof a=="boolean"?a:!0;e.Value.on(a,w=>{v=w,g.set(w?"capturing":"non-capturing")});const b=e.html.div(e.attr.class("bc-lightbox"),e.When(r,()=>e.Use(h.BeatUII18n,w=>e.html.div(e.attr.class("bc-lightbox__close"),_.CloseButton({size:"md",label:w.$.closeModal,onClick:()=>{o(),c()}}))),()=>null),e.html.div(e.attr.class("bc-lightbox__viewport"),e.attr.style(e.computedOf(s)(w=>`padding:${typeof w=="number"?w+"px":w}`)),e.html.div(e.attr.class("bc-lightbox__content"),C)));u({mode:g,effect:l??"opaque",container:i,content:b,onClickOutside:()=>{v&&(o(),c())},onEscape:()=>{v&&(o(),c())}})},()=>{o(),c()})})}function ka(t,n){const a=["bc-announcement-bar"];return t&&a.push("bc-announcement-bar--dismissible"),n&&n.length>0&&a.push(n),a.join(" ")}function Ia(t){return`--announcement-bar-bg-color: ${Z.getColorVar(t,600)}`}function Ta({color:t="primary",icon:n,closable:a=!1,onDismiss:r,class:l},...i){const s=e.prop(!0);return e.When(s,()=>{const u=e.Value.map(a,c=>!!c||r!=null);return e.html.div(e.attr.class(e.computedOf(u,l)((c,o)=>ka(c,o))),e.attr.style(e.Value.map(t,c=>Ia(c))),e.html.div(e.attr.class("bc-announcement-bar__content"),e.When(e.Value.map(n,c=>c!=null),()=>e.html.div(e.attr.class("bc-announcement-bar__icon"),h.Icon({icon:n,size:"sm",accessibility:"decorative"}))),e.html.div(e.attr.class("bc-announcement-bar__text"),...i),e.When(u,()=>e.html.div(e.attr.class("bc-announcement-bar__close"),_.CloseButton({size:"xs",color:"white",onClick:()=>{s.set(!1),r?.()}})))))})}function Oa(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\//i.test(t)}let we=null;function Pa(){return typeof window<"u"&&window.YT?.Player?Promise.resolve(window.YT):we||(we=new Promise(t=>{const n=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{n?.(),t(window.YT)};const a=document.createElement("script");a.src="https://www.youtube.com/iframe_api",a.async=!0,document.head.appendChild(a)}),we)}function Da(t){const{url:n,playing:a=!1,loop:r=!1,controls:l=!1,volume:i=1,muted:s=!1,playbackRate:u=1,pip:c=!1,playsinline:o=!0,width:p,height:f,progressInterval:C=1e3,seekTo:g,config:v,onReady:b,onStart:w,onPlay:m,onPause:d,onBuffer:y,onBufferEnd:x,onEnded:k,onError:I,onDuration:T,onSeek:S,onProgress:$,onPlaybackRateChange:L,onPlaybackQualityChange:N}=t;function M(P){return/\.m3u8(\?|$)/i.test(P)}function z(P){try{const B=P.canPlayType("application/vnd.apple.mpegurl");return B==="probably"||B==="maybe"}catch{return!1}}const H=e.prop("file");let A=null,Y=null,K=null;function ke(){try{K?.destroy()}catch{}K=null}const Q=[];Q.push(e.Value.on(n,P=>{typeof P=="string"&&P.length>0&&Oa(P)?H.value="youtube":(H.value="file",A&&ge())}));async function ge(){const P=A;if(!P)return;const B=e.Value.get(n);if(typeof B!="string"||B.length===0)return;ke();const F=v?.file?.forceHLS??!1;if(M(B)||F){if(z(P)){P.setAttribute("src",B);try{P.load()}catch{}return}if(typeof window>"u")return;try{const j=await Promise.resolve().then(()=>require("./hls.light.min-D3hUMpII.cjs")).then(ae=>ae.hls_light_min),de=j;let se=de.default??de.Hls??j;for(let ae=0;ae<3&&(typeof se=="object"&&se!=null&&"default"in se);ae++)se=se.default;if(typeof se=="function"){const ae=se;if(typeof ae.isSupported=="function"&&ae.isSupported()){P.removeAttribute("src");try{P.load()}catch{}const Te=new ae(v?.hls);K=Te,Te.attachMedia(P),Te.loadSource(B)}else{P.setAttribute("src",B);try{P.load()}catch{}}}else{P.setAttribute("src",B);try{P.load()}catch{}}}catch(j){I?.(j),P.setAttribute("src",B);try{P.load()}catch{}}return}P.setAttribute("src",B);try{P.load()}catch{}}function be(){Y?.();const P=e.Value.get(C)??1e3;Y=ce.x(()=>{const B=A;if(!B)return;const F=B.duration||0,j=B.currentTime||0,de=B.buffered?.length?B.buffered.end(B.buffered.length-1):0;$?.({played:F>0?j/F:0,playedSeconds:j,loaded:F>0?Math.min(de,F)/F:0,loadedSeconds:Math.min(de,F)})},P)}function le(P){if(P!=null)return typeof P=="number"?`${P}px`:P}const he=e.html.video(e.WithElement(P=>{A=P,b?.();try{A.playbackRate=e.Value.get(u)??1}catch{}A.muted=!!(e.Value.get(s)??!1),A.loop=!!(e.Value.get(r)??!1),A.controls=!!(e.Value.get(l)??!1),A.playsInline!=null&&(!!(e.Value.get(o)??!0)?A.setAttribute("playsinline",""):A.removeAttribute("playsinline")),e.Value.get(a)&&(A.play?.().catch(()=>{}),w?.());try{const B=!!(e.Value.get(c)??!1),F=document,j=A;B?typeof j.requestPictureInPicture=="function"&&F.pictureInPictureElement!==A&&j.requestPictureInPicture().catch(()=>{}):F.pictureInPictureElement===A&&typeof F.exitPictureInPicture=="function"&&F.exitPictureInPicture().catch(()=>{})}catch{}be(),ge()}),e.style.width(e.Value.map(p,le)),e.style.height(e.Value.map(f,le)),e.on.play(()=>m?.()),e.on.playing(()=>{w?.(),x?.()}),e.on.pause(()=>d?.()),e.on.waiting(()=>y?.()),e.on.canplay(()=>{const P=A?.duration;P!=null&&Number.isFinite(P)&&T?.(P)}),e.on.ended(()=>k?.()),e.on.error(P=>{K||I?.(P)}));let ue=null,U=null,oe=null;function ie(){const P=e.Value.get(n);!ue||typeof P!="string"||Pa().then(B=>{const F=_t(P);if(F){if(U){U.loadVideoById({videoId:F});return}U=new B.Player(ue,{videoId:F,playerVars:_a(t),events:{onReady:()=>{b?.(),D(),e.Value.get(a)&&w?.(),Ie()},onStateChange:j=>{switch(j.data){case B.PlayerState.PLAYING:m?.(),x?.();break;case B.PlayerState.PAUSED:d?.();break;case B.PlayerState.BUFFERING:y?.();break;case B.PlayerState.ENDED:k?.();break}},onError:j=>I?.(j),onPlaybackRateChange:j=>L?.(j.data),onPlaybackQualityChange:j=>N?.(j.data)}})}})}function Ie(){oe?.();const P=e.Value.get(C)??1e3;oe=ce.x(()=>{if(!U)return;const B=U.getDuration?.()??0,F=U.getCurrentTime?.()??0,j=U.getVideoLoadedFraction?.()??0;$?.({played:B>0?F/B:0,playedSeconds:F,loaded:j,loadedSeconds:j*B})},P)}function D(){if(!U)return;try{const F=e.Value.get(u)??1;U.setPlaybackRate?.(F)}catch{}try{const F=Math.round(Math.min(Math.max(e.Value.get(i)??1,0),1)*100);U.setVolume?.(F)}catch{}try{e.Value.get(s)??!1?U.mute?.():U.unMute?.()}catch{}e.Value.get(a)??!1?U.playVideo?.():U.pauseVideo?.();const B=e.Value.get(g);typeof B=="number"&&Number.isFinite(B)&&(U.seekTo?.(B,!0),S?.(B))}const E=e.html.div(e.WithElement(P=>{ue=P,ie(),b?.()}));Q.push(e.Value.on(n,()=>{H.value==="youtube"&&ie()})),Q.push(e.Value.on(a,()=>{H.value==="file"&&A?e.Value.get(a)?A.play?.().catch(()=>{}):A.pause?.():H.value==="youtube"&&U&&(e.Value.get(a)?U.playVideo?.():U.pauseVideo?.())})),Q.push(e.Value.on(i,()=>{if(H.value==="file"&&A)A.volume=Math.min(Math.max(e.Value.get(i)??1,0),1);else if(H.value==="youtube"&&U){const P=Math.round(Math.min(Math.max(e.Value.get(i)??1,0),1)*100);U.setVolume?.(P)}})),Q.push(e.Value.on(s,()=>{H.value==="file"&&A?A.muted=!!e.Value.get(s):H.value==="youtube"&&U&&(e.Value.get(s)?U.mute?.():U.unMute?.())})),Q.push(e.Value.on(u,()=>{if(H.value==="file"&&A)try{A.playbackRate=e.Value.get(u)??1}catch{}else H.value==="youtube"&&U&&U.setPlaybackRate?.(e.Value.get(u)??1)})),Q.push(e.Value.on(c,async()=>{if(!(H.value!=="file"||!A))try{const P=!!(e.Value.get(c)??!1),B=document,F=A;P?typeof F.requestPictureInPicture=="function"&&B.pictureInPictureElement!==A&&await F.requestPictureInPicture()?.catch(()=>{}):B.pictureInPictureElement===A&&typeof B.exitPictureInPicture=="function"&&await B.exitPictureInPicture()?.catch(()=>{})}catch{}})),Q.push(e.Value.on(g??null,()=>{const P=e.Value.get(g);if(P!=null)if(H.value==="file"&&A)try{A.currentTime=P,S?.(P)}catch{}else H.value==="youtube"&&U&&(U.seekTo?.(P,!0),S?.(P))}));const G=e.html.div(e.attr.class("bc-base-video"),e.style.width(e.Value.map(p,le)),e.style.height(e.Value.map(f,le)),e.When(e.Value.map(H,P=>P==="youtube"),()=>E,()=>he));return e.Fragment(e.OnDispose(...Q),G)}function _t(t){const n=/[?&]v=([^&#]+)/.exec(t);if(n)return n[1];const a=/youtu\.be\/([^?&#]+)/.exec(t);if(a)return a[1];const r=/youtube\.com\/embed\/([^?&#]+)/.exec(t);return r?r[1]:null}function _a(t){const n={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},a=e.Value.get(t.loop)??!1,r=e.Value.get(t.url),l=typeof r=="string"?_t(r):null;return a&&l&&(n.loop=1,n.playlist=l),n}const Ye="https://cdn.jsdelivr.net/npm/pdfjs-dist@5.4.394/",$a=t=>{if(!t||typeof t!="object")return!1;const n=t;return!!(n.getDocument&&typeof n.getDocument=="function")};function Ba(){if(typeof window>"u")return;const n=window.pdfjsLib;n?.GlobalWorkerOptions?.workerSrc||n?.GlobalWorkerOptions&&(n.GlobalWorkerOptions.workerSrc=`${Ye}build/pdf.worker.min.mjs`)}const La=t=>new Promise((n,a)=>{const r=document.createElement("script");r.type="module",r.src=t,r.onload=()=>n(),r.onerror=()=>a(new Error(`Failed to load script: ${t}`)),document.head.appendChild(r)}),Ea=async()=>{const t=window;if(t.pdfjsLib&&$a(t.pdfjsLib))return t.pdfjsLib;if(await La(`${Ye}build/pdf.min.mjs`),await new Promise(n=>setTimeout(n,100)),!t.pdfjsLib)throw new Error("PDF.js failed to initialize after loading");return t.pdfjsLib};let $e=null,et=!1;async function Aa(){if($e)return $e;!et&&typeof window<"u"&&(Ba(),et=!0);const t=await Ea();return $e=t,t.GlobalWorkerOptions&&(t.GlobalWorkerOptions.workerSrc=`${Ye}build/pdf.worker.min.mjs`),t}function Na(t,n){if(t.byteLength!==n.byteLength)return!1;const a=t.byteLength,r=new DataView(t.buffer,t.byteOffset,a),l=new DataView(n.buffer,n.byteOffset,a),i=a>>>2,s=a&3;for(let u=0;u<i;u++)if(r.getUint32(u*4)!==l.getUint32(u*4))return!1;for(let u=a-s;u<a;u++)if(t[u]!==n[u])return!1;return!0}function Fa(t,n){if(t.byteLength!==n.byteLength)return!1;const a=t.byteLength,r=a>>>2,l=new Uint32Array(t,0,r),i=new Uint32Array(n,0,r);for(let o=0;o<r;o++)if(l[o]!==i[o])return!1;const s=a&3,u=new Uint8Array(t,r*4,s),c=new Uint8Array(n,r*4,s);for(let o=0;o<s;o++)if(u[o]!==c[o])return!1;return!0}function Ma(t,n){return typeof t=="string"&&typeof n=="string"?t===n:t instanceof Uint8Array&&n instanceof Uint8Array?Na(t,n):t instanceof ArrayBuffer&&n instanceof ArrayBuffer?Fa(t,n):!1}function Ua({source:t,page:n=1,fit:a="width",scale:r=1,rotation:l=0,quality:i=2,renderTextLayer:s=!0,renderAnnotationLayer:u=!1,onPageChange:c,onLoadComplete:o},...p){const f=Aa();let C=e.Value.get(t),g=null,v=e.Value.get(n);return e.Use(h.BeatUII18n,b=>e.Fragment(e.OnDispose(()=>{g!=null&&(g.destroy(),g=null)}),q.ElementRect(w=>q.Query({request:e.computedOf(t,n,a,r,l,i,s,u,w)((m,d,y,x,k,I,T,S,$)=>({source:m,page:d,fit:y,scale:x,rotation:k,quality:I,renderTextLayer:T,renderAnnotationLayer:S,containerWidth:$.width,containerHeight:$.height})),load:async({request:m})=>{const d=await f;(g==null||!Ma(C,m.source))&&(g!=null&&(g.destroy(),g=null),C=m.source,g=await d.getDocument(m.source).promise,o?.({numPages:g.numPages}));const y=m.page<1||m.page>g.numPages?1:m.page;c!=null&&y!==v&&(v=y,c(y));const x=await g.getPage(y);let k;if(m.fit==="none")k=m.scale;else{const S=x.getViewport({scale:1,rotation:m.rotation}),$=S.width/S.height,L=m.containerWidth/m.containerHeight;switch(m.fit){case"width":k=m.containerWidth/S.width;break;case"height":k=m.containerHeight/S.height;break;case"contain":k=Math.min(m.containerWidth/S.width,m.containerHeight/S.height);break;case"cover":$>L?k=m.containerHeight/S.height:k=m.containerWidth/S.width;break}}const I=x.getViewport({scale:k,rotation:m.rotation}),T=x.getViewport({scale:k*m.quality,rotation:m.rotation});return{pdfWidth:I.width,pdfHeight:I.height,canvasWidth:Math.floor(I.width),canvasHeight:Math.floor(I.height),highResWidth:Math.floor(T.width),highResHeight:Math.floor(T.height),render:async(S,$,L)=>{if(S.width=T.width,S.height=T.height,S.style.width=`${I.width}px`,S.style.height=`${I.height}px`,!S.getContext("2d"))throw new Error("Failed to get canvas context");if(await x.render({canvas:S,viewport:T}).promise,m.renderTextLayer&&$!=null){$.innerHTML="";try{const z=await x.getTextContent(),H=d.TextLayer;H!=null&&await new H({textContentSource:z,container:$,viewport:I}).render()}catch(z){console.warn("Failed to render text layer:",z)}}if(m.renderAnnotationLayer&&L!=null){L.innerHTML="",L.style.width=`${I.width}px`,L.style.height=`${I.height}px`;try{const z=await x.getAnnotations(),H=d.AnnotationLayer;if(H!=null&&z.length>0){const A={getDestinationHash:()=>"",getAnchorUrl:K=>K,executeNamedAction:()=>{},executeSetOCGState:()=>{},cachePageRef:()=>{}};await new H({div:L,page:x,viewport:I,linkService:A,annotationStorage:null}).render({viewport:I,div:L,annotations:z,page:x,linkService:A,renderForms:!0})}}catch(z){console.warn("Failed to render annotation layer:",z)}}}}},convertError:m=>{if(m instanceof Error){const d=m.message;return d.includes("Invalid PDF")?e.Value.get(b).pdfPageViewer.invalidPdf:d.includes("page")?d:e.Value.get(b).pdfPageViewer.loadFailed}return e.Value.get(b).pdfPageViewer.loadFailed},pending:()=>e.html.div(e.attr.class("bc-pdf-page-viewer__loading"),h.Icon({icon:"line-md:loading-twotone-loop",size:"lg"}),e.html.span(e.attr.class("bc-pdf-page-viewer__loading-text"),b.map(m=>m.pdfPageViewer.loading))),failure:({error:m})=>e.html.div(e.attr.class("bc-pdf-page-viewer__error"),h.Icon({icon:"line-md:alert-circle",size:"lg",color:"danger"}),e.html.span(e.attr.class("bc-pdf-page-viewer__error-text"),m)),success:({value:m})=>e.html.div(e.attr.class(e.Value.map(a,d=>d==="none"?"bc-pdf-page-viewer":`bc-pdf-page-viewer bc-pdf-page-viewer--fit-${d}`)),e.html.div(e.attr.class("bc-pdf-page-viewer__content"),e.When(e.Value.map(a,d=>d==="none"),()=>e.attr.style(m.$.canvasWidth.map(d=>`width: ${d}px; height: ${m.value.canvasHeight}px;`)),()=>e.Fragment()),e.html.canvas(e.attr.class("bc-pdf-page-viewer__canvas"),e.attr.width(m.$.canvasWidth.map(String)),e.attr.height(m.$.canvasHeight.map(String)),...p),e.html.div(e.attr.class("bc-pdf-page-viewer__text-layer")),e.html.div(e.attr.class("bc-pdf-page-viewer__annotation-layer"))),e.WithElement(d=>{const y=d.querySelector(".bc-pdf-page-viewer__canvas"),x=d.querySelector(".bc-pdf-page-viewer__text-layer"),k=d.querySelector(".bc-pdf-page-viewer__annotation-layer");return e.Value.on(m,async I=>{await I.render(y,x,k)}),e.Empty}))}))))}Object.defineProperty(exports,"Use",{enumerable:!0,get:()=>e.Use});exports.BeatUII18n=h.BeatUII18n;exports.Button=h.Button;exports.CommonInputAttributes=h.CommonInputAttributes;exports.Icon=h.Icon;exports.InputContainer=h.InputContainer;exports.InputIcon=h.InputIcon;exports.LOGICAL_PROPERTY_MAP=h.LOGICAL_PROPERTY_MAP;exports.Locale=h.Locale;exports.TextInput=h.TextInput;exports.defaultLocale=h.defaultLocale;exports.defaultMessages=h.defaultMessages;exports.formatFileSize=h.formatFileSize;exports.generateButtonClasses=h.generateButtonClasses;exports.generateButtonStyles=h.generateButtonStyles;exports.generateInputContainerInputClasses=h.generateInputContainerInputClasses;exports.getDirectionClassName=h.getDirectionClassName;exports.getDirectionFromLocale=h.getDirectionFromLocale;exports.getIconLocally=h.getIconLocally;exports.getOppositeDirection=h.getOppositeDirection;exports.getPhysicalProperty=h.getPhysicalProperty;exports.isIndexedDBAvailable=h.isIndexedDBAvailable;exports.isRTLLocale=h.isRTLLocale;exports.makeI18nProvider=h.makeI18nProvider;exports.makeMessages=h.makeMessages;exports.resolveDirection=h.resolveDirection;exports.storeIconLocally=h.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.baseSpacing=O.baseSpacing;exports.beatuiPreset=O.beatuiPreset;exports.breakpoints=O.breakpoints;exports.changeFontSize=O.changeFontSize;exports.createBeatuiPreset=O.createBeatuiPreset;exports.fontFamily=O.fontFamily;exports.fontSize=O.fontSize;exports.fontWeight=O.fontWeight;exports.generateAllTokenVariables=O.generateAllTokenVariables;exports.generateBreakpointVariables=O.generateBreakpointVariables;exports.generateCoreTokenVariables=O.generateCoreTokenVariables;exports.generateFontFamilyOverrideVariables=O.generateFontFamilyOverrideVariables;exports.generateMotionVariables=O.generateMotionVariables;exports.generateRadiusVariables=O.generateRadiusVariables;exports.generateSemanticFontVariables=O.generateSemanticFontVariables;exports.generateSemanticMotionVariables=O.generateSemanticMotionVariables;exports.generateSemanticRadiusVariables=O.generateSemanticRadiusVariables;exports.generateSemanticShadowVariables=O.generateSemanticShadowVariables;exports.generateSemanticSpacingVariables=O.generateSemanticSpacingVariables;exports.generateSemanticTextShadowVariables=O.generateSemanticTextShadowVariables;exports.generateSemanticTokenVariables=O.generateSemanticTokenVariables;exports.generateShadowVariables=O.generateShadowVariables;exports.generateSpacingVariables=O.generateSpacingVariables;exports.generateTextShadowVariables=O.generateTextShadowVariables;exports.generateTypographyVariables=O.generateTypographyVariables;exports.generateZIndexVariables=O.generateZIndexVariables;exports.getBreakpointMediaQuery=O.getBreakpointMediaQuery;exports.getBreakpointVar=O.getBreakpointVar;exports.getBreakpointVarName=O.getBreakpointVarName;exports.getFontFamilyVar=O.getFontFamilyVar;exports.getFontFamilyVarName=O.getFontFamilyVarName;exports.getFontSizeVar=O.getFontSizeVar;exports.getFontSizeVarName=O.getFontSizeVarName;exports.getFontWeightVar=O.getFontWeightVar;exports.getFontWeightVarName=O.getFontWeightVarName;exports.getLetterSpacingVar=O.getLetterSpacingVar;exports.getLetterSpacingVarName=O.getLetterSpacingVarName;exports.getLineHeightVar=O.getLineHeightVar;exports.getLineHeightVarName=O.getLineHeightVarName;exports.getMotionDurationVar=O.getMotionDurationVar;exports.getMotionDurationVarName=O.getMotionDurationVarName;exports.getMotionEasingVar=O.getMotionEasingVar;exports.getMotionEasingVarName=O.getMotionEasingVarName;exports.getRadiusMediaQuery=O.getRadiusMediaQuery;exports.getRadiusVar=O.getRadiusVar;exports.getRadiusVarName=O.getRadiusVarName;exports.getSemanticFontVar=O.getSemanticFontVar;exports.getSemanticFontVarName=O.getSemanticFontVarName;exports.getSemanticMotionVarName=O.getSemanticMotionVarName;exports.getSemanticRadiusVarName=O.getSemanticRadiusVarName;exports.getSemanticShadowVarName=O.getSemanticShadowVarName;exports.getSemanticSpacingVarName=O.getSemanticSpacingVarName;exports.getSemanticTextShadowVarName=O.getSemanticTextShadowVarName;exports.getShadowVar=O.getShadowVar;exports.getShadowVarName=O.getShadowVarName;exports.getSpacingVar=O.getSpacingVar;exports.getSpacingVarName=O.getSpacingVarName;exports.getTextShadowVar=O.getTextShadowVar;exports.getTextShadowVarName=O.getTextShadowVarName;exports.getTokenValue=O.getTokenValue;exports.getZIndexVar=O.getZIndexVar;exports.getZIndexVarName=O.getZIndexVarName;exports.letterSpacing=O.letterSpacing;exports.lineHeight=O.lineHeight;exports.motionDurations=O.motionDurations;exports.motionEasings=O.motionEasings;exports.radius=O.radius;exports.semanticFontNames=O.semanticFontNames;exports.semanticMotionNames=O.semanticMotionNames;exports.semanticRadiusNames=O.semanticRadiusNames;exports.semanticShadowNames=O.semanticShadowNames;exports.semanticSpacingNames=O.semanticSpacingNames;exports.semanticTextShadowNames=O.semanticTextShadowNames;exports.shadows=O.shadows;exports.spacing=O.spacing;exports.textShadows=O.textShadows;exports.zIndex=O.zIndex;exports.ArrayController=_.ArrayController;exports.BaseControl=_.BaseControl;exports.BaseMappedControl=_.BaseMappedControl;exports.CheckboxInput=_.CheckboxInput;exports.CloseButton=_.CloseButton;exports.Control=_.Control;exports.Controller=_.Controller;exports.DangerLabel=_.DangerLabel;exports.EmailInput=_.EmailInput;exports.EmphasisLabel=_.EmphasisLabel;exports.InputWrapper=_.InputWrapper;exports.Label=_.Label;exports.MappedControl=_.MappedControl;exports.MutedLabel=_.MutedLabel;exports.Notice=_.Notice;exports.ObjectController=_.ObjectController;exports.PasswordInput=_.PasswordInput;exports.RequiredSymbol=_.RequiredSymbol;exports.Stack=_.Stack;exports.connectCommonAttributes=_.connectCommonAttributes;exports.connectNumberInput=_.connectNumberInput;exports.connectStringInput=_.connectStringInput;exports.convertStandardSchemaIssues=_.convertStandardSchemaIssues;exports.convertStandardSchemaPathToPath=_.convertStandardSchemaPathToPath;exports.makeMapValidation=_.makeMapValidation;exports.makeOnBlurHandler=_.makeOnBlurHandler;exports.makeOnChangeHandler=_.makeOnChangeHandler;exports.parsePath=_.parsePath;exports.pathToString=_.pathToString;exports.sessionId=_.sessionId;exports.standardSchemaResultToValidation=_.standardSchemaResultToValidation;exports.taskToValidation=_.taskToValidation;exports.useController=_.useController;exports.useForm=_.useForm;exports.wrapSegment=_.wrapSegment;exports.AnimatedToggle=W.AnimatedToggle;exports.AnimatedToggleClass=W.AnimatedToggleClass;exports.BooleanValidator=W.BooleanValidator;exports.ConfirmModal=W.ConfirmModal;exports.FocusTrap=W.FocusTrap;exports.Modal=W.Modal;exports.ObjectValidator=W.ObjectValidator;exports.Overlay=W.Overlay;exports.StringValidator=W.StringValidator;exports.boolean=W.boolean;exports.createStandardSchema=W.createStandardSchema;exports.object=W.object;exports.string=W.string;exports.useAnimatedElementToggle=W.useAnimatedElementToggle;exports.useAnimatedToggle=W.useAnimatedToggle;exports.useFocusTrap=W.useFocusTrap;exports.useTimedToggle=W.useTimedToggle;exports.Theme=pe.Theme;exports.ThemeAppearance=pe.ThemeAppearance;exports.Base64Input=V.Base64Input;exports.Base64sInput=V.Base64sInput;exports.BaseListControl=V.BaseListControl;exports.BaseNativeSelectControl=V.BaseNativeSelectControl;exports.Card=V.Card;exports.ColorSwatchInput=V.ColorSwatchInput;exports.EditableText=V.EditableText;exports.Expando=V.Expando;exports.FilesInput=V.FilesInput;exports.Group=V.Group;exports.ListControl=V.ListControl;exports.ListInput=V.ListInput;exports.MaskInput=V.MaskInput;exports.NativeSelect=V.NativeSelect;exports.NativeSelectControl=V.NativeSelectControl;exports.NullableDateInput=V.NullableDateInput;exports.NullableDateTimeInput=V.NullableDateTimeInput;exports.NullableDurationInput=V.NullableDurationInput;exports.NullableEmailInput=V.NullableEmailInput;exports.NullableNumberInput=V.NullableNumberInput;exports.NullablePasswordInput=V.NullablePasswordInput;exports.NullableRatingInput=V.NullableRatingInput;exports.NullableSliderInput=V.NullableSliderInput;exports.NullableTextArea=V.NullableTextArea;exports.NullableTextInput=V.NullableTextInput;exports.NullableUUIDInput=V.NullableUUIDInput;exports.NullableUrlInput=V.NullableUrlInput;exports.NumberInput=V.NumberInput;exports.RatingInput=V.RatingInput;exports.SegmentedInput=V.SegmentedInput;exports.SliderInput=V.SliderInput;exports.Switch=V.Switch;exports.TextArea=V.TextArea;exports.UUIDInput=V.UUIDInput;exports.UnionController=V.UnionController;exports.UnstyledDropZone=V.UnstyledDropZone;exports.UrlInput=V.UrlInput;exports.WithTemporal=V.WithTemporal;exports.emitExpando=V.emitExpando;exports.emitOptionExpando=V.emitOptionExpando;exports.emptyToNull=V.emptyToNull;exports.ensureTemporal=V.ensureTemporal;exports.fileToBase64=V.fileToBase64;exports.formatColor=V.formatColor;exports.getContrastRatio=V.getContrastRatio;exports.hexToRgb=V.hexToRgb;exports.hslToRgb=V.hslToRgb;exports.hwbToRgb=V.hwbToRgb;exports.isValidColor=V.isValidColor;exports.isValidHexColor=V.isValidHexColor;exports.isValidHslColor=V.isValidHslColor;exports.isValidRgbColor=V.isValidRgbColor;exports.isValidRgbaColor=V.isValidRgbaColor;exports.linearToSrgb=V.linearToSrgb;exports.mulberry32=V.mulberry32;exports.normalizeHexColor=V.normalizeHexColor;exports.nullToEmpty=V.nullToEmpty;exports.oklchToRgb=V.oklchToRgb;exports.parseAnyColor=V.parseAnyColor;exports.resolveEffectiveFormat=V.resolveEffectiveFormat;exports.rgbToHex=V.rgbToHex;exports.rgbToHsl=V.rgbToHsl;exports.rgbToHwb=V.rgbToHwb;exports.rgbToOklch=V.rgbToOklch;exports.srgbToLinear=V.srgbToLinear;exports.toRgbaString=V.toRgbaString;exports.transformEmptyStringToUndefined=V.transformEmptyStringToUndefined;exports.transformNullToUndefined=V.transformNullToUndefined;exports.transformUndefinedToNull=V.transformUndefinedToNull;exports.LinkPortal=$t.LinkPortal;exports.Toolbar=me.Toolbar;exports.ToolbarButton=me.ToolbarButton;exports.ToolbarDivider=me.ToolbarDivider;exports.ToolbarGroup=me.ToolbarGroup;exports.ToolbarSpacer=me.ToolbarSpacer;exports.ActionCard=qt;exports.AnnouncementBar=Ta;exports.AppShell=on;exports.AppearanceSelector=at;exports.Badge=At;exports.BaseComboboxControl=pt;exports.BaseComboboxTagsControl=Cn;exports.BaseDropdownControl=ut;exports.BaseSelectTagsControl=vn;exports.BaseVideoPlayer=Da;exports.BeatUI=na;exports.BigintInput=Pn;exports.ButtonLink=da;exports.Center=cn;exports.CenterH=sn;exports.Chips=We;exports.Collapse=ot;exports.CollapsibleSidebarGroup=ma;exports.ColorController=yt;exports.ColorInput=zt;exports.ComboboxControl=bn;exports.ComboboxInput=dt;exports.ComboboxTagsControl=Vn;exports.ComboboxTagsInput=je;exports.DateInput=Sn;exports.DateTimeInput=kn;exports.Drawer=va;exports.DropdownBase=Me;exports.DropdownControl=gn;exports.DropdownInput=st;exports.DurationInput=Zn;exports.EnsureControl=qn;exports.FileInput=In;exports.Flyout=fe;exports.FormStatus=Jn;exports.InstantInput=Mn;exports.LazyNativeSelect=Tn;exports.Lightbox=xa;exports.Link=xt;exports.LocaleSelector=Xn;exports.Menu=Ue;exports.MenuItem=hn;exports.MenuSeparator=Re;exports.NativePdfPreview=aa;exports.NavigationLink=ca;exports.NineSliceScrollView=pn;exports.Notification=Ct;exports.NotificationProvider=ze;exports.NotificationService=Vt;exports.NotificationViewport=St;exports.NullableBigintInput=Dn;exports.NullableInstantInput=Rn;exports.NullableMaskInput=On;exports.NullablePlainDateInput=Bn;exports.NullablePlainDateTimeInput=Nn;exports.NullablePlainMonthDayInput=Yn;exports.NullablePlainTimeInput=En;exports.NullablePlainYearMonthInput=zn;exports.NullableZonedDateTimeInput=Hn;exports.OpenGraph=ia;exports.Option=ne;exports.PDFJSPreview=ra;exports.PageDropZone=Nt;exports.PdfPageViewer=Ua;exports.PlainDateInput=$n;exports.PlainDateTimeInput=An;exports.PlainMonthDayInput=Gn;exports.PlainTimeInput=Ln;exports.PlainYearMonthInput=jn;exports.Ribbon=Sa;exports.ScrollablePanel=Be;exports.SelectTagsControl=wn;exports.SelectTagsInput=He;exports.Sidebar=pa;exports.SidebarActiveLink=Ot;exports.SidebarClickLink=Pt;exports.SidebarContext=It;exports.SidebarGroup=Ae;exports.SidebarLink=Dt;exports.SidebarSeparator=fa;exports.SidebarUrlLink=Tt;exports.Sink=fn;exports.StandaloneAppearanceSelector=Ht;exports.StylePortal=la;exports.Table=Ut;exports.Tabs=ya;exports.Tag=Ne;exports.TagsInput=_n;exports.Tooltip=Ca;exports.WithBeatUIBreakpoint=lt;exports.WithBeatUIElementBreakpoint=en;exports.WithBreakpoint=Fe;exports.ZonedDateTimeInput=Wn;exports.colorInputOptionsFromController=Qn;exports.compareBreakpoint=rt;exports.createColorController=Kn;exports.createLocationMatcher=xe;exports.delaySignal=Bt;exports.findBreakpoint=Qt;exports.generateBadgeClasses=tt;exports.generateBadgeStyles=nt;exports.generateLinkClasses=Le;exports.generateLinkStyles=Ee;exports.generateNotificationClasses=vt;exports.generateNotificationStyles=wt;exports.increaseSize=Et;exports.isUrlMatch=kt;
4
+ `),displayMenu:!0,displayAside:!0,menuWidth:te.menu[c]+"px",asideWidth:te.aside[c]+"px"}}return({width:c,breakpoint:o})=>l(`<=${t}`,c)?i(o):l(`<=${n}`,c)?s(o):u(o)}const nn=["menu","aside"],an=["banner","header","mainHeader","mainFooter","footer"];function rn(t,{displayMenu:n},a){return t?n?"block":a?"float":"none":"none"}function ln(t,{displayAside:n},a){return t?n?"block":a?"float":"none":"none"}function on({smallBreakpoint:t="sm",mediumBreakpoint:n="md",...a}){const r=Object.fromEntries(nn.filter(i=>a[i]).map(i=>[i,qe(a[i].width??{},te[i])])),l=Object.fromEntries(an.filter(i=>a[i]).map(i=>[i,qe(a[i].height??{},te[i])]));return e.Use(h.BeatUII18n,i=>lt(({value:s,is:u})=>{const c=tn({smallBreakpoint:t,mediumBreakpoint:n,vertical:r,horizontal:l,is:u}),o=s.map(c),p=l.header!=null||r.menu!=null||r.aside!=null,f=e.computedOf(r.aside!=null,o)((d,{displayAside:y})=>d&&!y),C=e.computedOf(r.menu!=null,o)((d,{displayMenu:y})=>d&&!y),g=H.useAnimatedElementToggle(),v=H.useAnimatedElementToggle(),b=e.prop(0),w=e.computedOf(r.menu!=null,o,g.display)(rn),m=e.computedOf(r.aside!=null,o,v.display)(ln);return e.html.div(e.style.display("grid"),e.style.height("100%"),e.style.width("100%"),e.style.gridTemplateColumns(o.$.columns),e.style.gridTemplateRows(o.$.rows),e.style.gridTemplateAreas(o.$.areas),e.style.gridColumnGap("0"),e.style.gridRowGap("0"),a.banner?e.html.header(e.attr.class(X("none",a.banner.shadow??"none")),re(a.banner.color??"white"),e.style.height("100%"),e.style.gridArea("banner"),a.banner.content):null,e.html.header(e.attr.class(X("bottom",a.header?.shadow??"none")),re(a.header?.color??"white"),e.style.zIndex("20"),e.style.display(p?"block":"none"),e.style.gridArea("header"),q.ElementRect(d=>(d.$.bottom.feedProp(b),null)),e.html.div(e.style.display("flex"),e.style.height("100%"),e.html.div(e.style.display(C.map(d=>d?"flex":"none")),e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),h.Button({onClick:()=>g.toggle(),variant:"light",color:"base"},e.aria.label(i.$.toggleMenu),h.Icon({icon:g.display.map(d=>d?"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"),a.header?.content),e.html.div(e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),e.style.display(f.map(d=>d?"flex":"none")),h.Button({onClick:()=>v.toggle(),roundedness:"full",variant:"light",color:"base"},e.aria.label(i.$.toggleAside),h.Icon({icon:"line-md/chevron-left"},e.attr.style("transition: transform 0.2s ease-in-out"),e.attr.style(v.display.map(d=>`transform: rotate(${d?180:0}deg)`))))))),a.menu?e.html.nav(e.WithElement(d=>g.setElement(d)),e.style.zIndex("10"),e.aria.label(i.$.mainNavigation),e.attr.role("navigation"),e.style.overflow("hidden"),e.attr.class(w.map(d=>d==="float"?X("right",a.menu?.shadow??"md"):X("right",a.menu?.shadow??"none"))),re(a.menu?.color??"white"),e.style.height(w.map(d=>d==="float"?"auto":"100%")),e.style.overflow("hidden"),e.style.gridArea("menu"),e.style.display(e.computedOf(w,g.status)((d,y)=>d==="none"&&y==="closed"?"none":"block")),e.style.position(e.computedOf(w,g.status)((d,y)=>d==="float"||d==="none"&&y!=="closed"?"fixed":"initial")),e.style.top(b.map(d=>`${d}px`)),H.AnimatedToggleClass({animation:{slide:"right"},status:e.computedOf(w,g.status)((d,y)=>d==="block"?"opened":y)}),e.style.width(e.coalesce(a.menu?.width,o.$.menuWidth)),e.style.bottom("0"),a.menu?.content):null,a.mainHeader?e.html.header(e.style.height("100%"),e.style.gridArea("mainHeader"),e.attr.class(X("none",a.mainHeader?.shadow??"none")),re(a.mainHeader?.color??"white"),a.mainHeader.content):null,e.html.main(e.style.height("100%"),e.style.overflow("hidden"),e.style.gridArea("main"),e.attr.class(X("none",a.main?.shadow??"none")),re(a.main?.color??"white"),a.main.content),a.mainFooter?e.html.footer(e.style.height("100%"),e.style.gridArea("mainFooter"),e.attr.class(X("none",a.mainFooter?.shadow??"none")),re(a.mainFooter?.color??"white"),a.mainFooter.content):null,a.aside?e.html.aside(e.WithElement(d=>{v.setElement(d)}),e.style.zIndex("10"),e.aria.label(i.$.sidebar),e.attr.role("complementary"),e.attr.class(m.map(d=>d==="float"?X("left","md"):X("left","none"))),re("white"),e.style.height("100%"),e.style.gridArea("aside"),e.style.display(e.computedOf(m,v.status)((d,y)=>d==="none"&&y==="closed"?"none":"block")),e.style.position(e.computedOf(m,v.status)((d,y)=>d==="float"||d==="none"&&y!=="closed"?"fixed":"initial")),e.style.top(b.map(d=>`${d}px`)),H.AnimatedToggleClass({animation:{slide:"left"},status:e.computedOf(m,v.status)((d,y)=>d==="block"?"opened":y)}),e.style.width(e.coalesce(a.aside?.width,o.$.asideWidth)),e.style.bottom(b.map(d=>`${d}px`)),a.aside.content):null,a.footer?e.html.footer(e.attr.class(X("top","none")),re("white"),e.style.height("100%"),e.style.gridArea("footer"),a.footer.content):null)}))}function sn(...t){return e.html.div(e.attr.class("bc-center-h"),e.html.div(e.attr.class("bc-center__content"),...t))}function un(t){const n=["bc-center"];return t!=="lg"&&n.push(`bc-center--gap-${t}`),n.join(" ")}function cn({gap:t="lg"}={},...n){return e.html.div(e.attr.class(e.computedOf(t)(a=>un(a??"lg"))),...n)}function ot({open:t},...n){return e.WithElement(a=>{const{status:r,setOpen:l,dispose:i}=H.useAnimatedElementToggle({initialStatus:e.Value.get(t)?"opened":"closed",element:a});return e.Value.on(t,l),q.ElementRect(s=>{const u=e.prop(null);return e.computedOf(r,s.$.height)((o,p)=>o==="opened"&&p>0?p:null).on(o=>{o!=null&&u.set(o)}),r.on(o=>{if(a&&o==="start-opening"){const p=a.style.height,f=a.style.transition;a.style.transition="none",a.style.height="auto",a.offsetHeight;const C=a.scrollHeight;C>0&&u.set(C),a.style.height=p,a.style.transition=f,a.offsetHeight}}),e.Fragment(e.OnDispose(i),e.attr.style(u.map(o=>`--collapse-height: ${o!=null?`${o}px`:"auto"}`)),e.attr.class(r.map(o=>`bc-collapse bc-collapse--${o}`)),...n)})})}function dn(t){return`${t}px`}function Je(t){return e.Value.map(t,dn)}function pn({body:t,contentWidth:n,contentHeight:a,header:r,headerHeight:l=0,topStart:i,topEnd:s,footer:u,footerHeight:c=0,bottomStart:o,bottomEnd:p,sidebarStart:f,sidebarStartWidth:C=0,sidebarEnd:g,sidebarEndWidth:v=0,anchorMode:b="container-edge"}){const w=e.prop(0n),m=e.prop(0n),d=Je(l),y=Je(C),x=e.prop(16);return e.html.div(e.attr.class("bc-nine-slice-container"),q.ElementRect(k=>{const I=e.computedOf(k.$.width,C,v)((_,A,G)=>_-A-G),T=e.computedOf(k.$.height,l,c)((_,A,G)=>_-A-G),S=e.computedOf(n,I)((_,A)=>_>BigInt(A)),D=e.computedOf(a,T)((_,A)=>_>BigInt(A)),N=e.computedOf(I,D,x)((_,A,G)=>A?_-G:_),L=e.computedOf(T,S,x)((_,A,G)=>A?_-G:_),M=e.computedOf(n,N)((_,A)=>Number(_/BigInt(Math.max(1,A)))),Z=e.computedOf(a,L)((_,A)=>Number(_/BigInt(Math.max(1,A)))),U=e.Value.map(b,_=>_==="body-end"||_==="body-end-bottom"),E=e.When(U,()=>e.style.left(e.computedOf(C,n,N,v)((_,A,G,P)=>{const B=_+Number(A),F=_+G,z=Math.min(B,F);return`${Math.max(_+P,z)}px`})),()=>e.style.right("0")),j=e.Value.map(b,_=>_==="body-bottom"||_==="body-end-bottom"),K=e.When(j,()=>e.style.top(e.computedOf(l,a,L,c)((_,A,G,P)=>{const B=_+Number(A),F=_+G,z=Math.min(B,F);return`${Math.max(_+P,z)}px`})),()=>e.style.bottom("0")),de=e.computedOf(D,x)((_,A)=>_?`${A}px`:"0"),Q=e.computedOf(S,x)((_,A)=>_?`${A}px`:"0"),be=e.style.transform(e.computedOf(m,w,S,D)((_,A,G,P)=>{const B=G?`translateX(-${_}px)`:"",F=P?`translateY(-${A}px)`:"";return`${B} ${F}`.trim()||"none"})),he=e.style.transform(m.map(_=>`translateX(-${_}px)`)),le=e.style.transform(w.map(_=>`translateY(-${_}px)`)),ye=e.computedOf(a,L)((_,A)=>_-BigInt(Math.max(1,A))),ue=e.computedOf(n,N)((_,A)=>_-BigInt(Math.max(1,A)));let R=null,oe=0,ie=0;const Ie=()=>{const _=ye.value,A=ue.value,G=D.value,P=S.value;if(G&&ie!==0){const B=Ze(ve(0n,_),ve(0n,w.value+BigInt(Math.round(ie))));w.set(B)}if(P&&oe!==0){const B=Ze(ve(0n,A),ve(0n,m.value+BigInt(Math.round(oe))));m.set(B)}oe=0,ie=0,R=null};return S.on(_=>{_||m.set(0n)}),D.on(_=>{_||w.set(0n)}),e.Fragment(e.OnDispose(()=>{R&&clearTimeout(R)}),e.on.wheel(_=>{_.preventDefault();const{deltaX:A,deltaY:G}=_;oe+=A,ie+=G,R||(R=setTimeout(Ie,16))}),e.html.div(e.attr.class("bc-nine-slice-pane-container"),e.style.right(de),e.style.bottom(Q),i!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-start"),e.style.top("0"),e.style.left("0"),i):null,r!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-header"),e.style.top("0"),e.style.left(y),e.html.div(e.attr.class("bc-nine-slice-pane-content"),he,r)):null,s!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-end"),e.style.top("0"),E,s):null,f!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-start"),e.style.left("0"),e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),le,f)):null,e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-body"),e.style.left(y),e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),be,t)),g!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),E,e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),le,g)):null,o!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-start"),e.style.left("0"),K,o):null,u!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-footer"),e.style.left(y),K,e.html.div(e.attr.class("bc-nine-slice-pane-content"),he,u)):null,p!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-end"),E,K,p):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(D,x)((_,A)=>_?`${A}px`:"0")),e.style.bottom("0"),e.style.height(S.map(_=>_?"16px":"0")),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar-thumb"),e.style.width(M.map(_=>`${100/Math.max(1,_)}%`)),e.style.height("100%"),e.style.backgroundColor("#ff000066")),e.on.scroll(_=>{const A=_.target,G=A.scrollLeft,P=A.scrollWidth-A.clientWidth;if(P>0){const B=G/P,F=ue.value;m.set(BigInt(Math.round(Number(F)*B)))}})),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(S,x)((_,A)=>_?`${A}px`:"0")),e.style.right("0"),e.style.width(D.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(l,c,a,Z)((_,A,G,P)=>`${100/Math.max(1,P)}%`)),e.style.backgroundColor("#ff000066")),e.on.scroll(_=>{const A=_.target,G=A.scrollTop,P=A.scrollHeight-A.clientHeight;if(P>0){const B=G/P,F=ye.value;w.set(BigInt(Math.round(Number(F)*B)))}})))}))}function Be({header:t,footer:n,body:a,shadowOnScroll:r=!0},...l){const i=e.prop("none");function s(c){const o=c.scrollTop===0,p=c.scrollTop+c.clientHeight>=c.scrollHeight-1;o&&p?i.set("none"):o?i.set("bottom"):p?i.set("top"):i.set("both")}return e.html.div(e.attr.class("bc-scrollable-panel"),e.attr.class(e.computedOf(i,r)((c,o)=>{if(!o)return"";switch(c){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(c=>e.OnDispose(ce.g(()=>s(c)))),e.on.scroll(c=>{const o=c.target;s(o)}),a),e.html.div(e.attr.class("bc-scrollable-panel--footer-shadow"),e.html.div()),n&&e.html.div(e.attr.class("bc-scrollable-panel__footer"),n),...l)}function mn(t,n,a){const r=["bc-sink"];return t!=="default"&&r.push(`bc-sink--${t}`),n!=="md"&&r.push(`bc-sink--padding-${n}`),a!=="lg"&&r.push(`bc-sink--rounded-${a}`),r.join(" ")}function fn({variant:t="default",size:n="md",roundedness:a="lg"}={},...r){return e.html.div(e.attr.class(e.computedOf(t,n,a)((l,i,s)=>mn(l??"default",i??"md",s??"lg"))),...r)}const ne={value:(t,n,{disabled:a,before:r,after:l}={})=>({type:"value",value:t,label:n,disabled:a,before:r,after:l}),group:(t,n,{disabled:a,before:r,after:l}={})=>({type:"group",group:t,options:n,disabled:a,before:r,after:l}),break:{type:"break"},getValues:t=>t.flatMap(n=>n.type==="group"?ne.getValues(n.options):n.type==="break"?[]:[n.value]),contains:(t,n,a=(r,l)=>r===l)=>ne.getValues(t).some(r=>a(r,n))},Me=t=>{const{onChange:n,onBlur:a,role:r,display:l,optionsSource:i,allowSpaceToggle:s=!1,onBeforeOpen:u,onAfterOpen:c,buildListboxContent:o}=t,p=e.prop(!1),f=e.prop(-1),C=e.prop(null),g=$.sessionId("dropdown"),v=$.sessionId("listbox");let b,w;const m=y=>{n?.(y),p.set(!1),f.set(-1),C.set(null),b?.focus()},d=y=>{const x=ne.getValues(e.Value.get(i));switch(y.key){case"ArrowDown":{if(y.preventDefault(),!p.value)p.set(!0),x.length>0&&(f.set(0),C.set(x[0]));else{const k=Math.min(f.value+1,x.length-1);f.set(k),C.set(x[k]??null)}break}case"ArrowUp":{if(y.preventDefault(),p.value){const k=Math.max(f.value-1,0);f.set(k),C.set(x[k]??null)}break}case"Enter":{if(y.preventDefault(),p.value&&f.value>=0){const k=x[f.value];k!=null&&m(k)}else{u?.();const k=ne.getValues(e.Value.get(i));p.set(!0),k.length>0&&(f.set(0),C.set(k[0])),setTimeout(()=>c?.(),0)}break}case"Escape":{p.value&&(y.preventDefault(),p.set(!1),f.set(-1),C.set(null),b?.focus());break}case" ":{if(e.Value.get(s)){y.preventDefault();const k=ne.getValues(e.Value.get(i));p.set(!p.value),p.value&&k.length>0&&(f.set(0),C.set(k[0]))}break}}};return h.InputContainer({...t,input:V.Group(e.attr.class("bc-dropdown__trigger"),e.html.span(e.attr.class("bc-dropdown__display"),l),h.Icon({icon:"ph:caret-up-down-bold",color:"neutral"},e.attr.class("bc-dropdown__arrow")))},q.ElementRect(y=>e.Fragment(e.WithElement(x=>(b=x,x.addEventListener("keydown",d),e.OnDispose(()=>x.removeEventListener("keydown",d)))),h.CommonInputAttributes(t),e.attr.id(g),e.attr.tabindex(0),e.aria.controls(v),e.aria.expanded(p),e.attr.class("bc-dropdown"),e.attr.role(r),e.aria.activedescendant(e.computedOf(p,C)((x,k)=>x&&k!=null?`dropdown-option-${String(k)}`:"")),a!=null?e.on.blur(()=>{setTimeout(()=>{w?.contains(document.activeElement)||(p.set(!1),f.set(-1),a())},100)}):e.Empty,ge({content:()=>e.html.div(e.WithElement(x=>{w=x}),e.style.minWidth(y.$.width.map(x=>`${x-10}px`)),e.attr.class("bc-dropdown__listbox"),e.attr.role("listbox"),e.attr.id(v),e.aria.labelledby(g),o({dropdownId:g,listboxId:v,focusedValue:C,handleKeyDown:d,onSelect:m})),mainAxisOffset:0,placement:"bottom-start",hasPopup:"listbox",showOn:(x,k)=>{const I=k;k=()=>{p.set(!1),f.set(-1),C.set(null),I()};const T=()=>{if(p.value)k();else{u?.();const S=ne.getValues(e.Value.get(i));p.set(!0),S.length>0&&(f.set(0),C.set(S[0])),x(),setTimeout(()=>c?.(),0)}};return e.on.click(T)},showDelay:0,hideDelay:0,closable:!0}))))},it=(t,n,a,r,l)=>e.Ensure(t,i=>e.OneOfType(i,{value:s=>{const u=e.computedOf(s,a)((o,p)=>n(o.value,p)),c=e.computedOf(s,l)((o,p)=>p!=null&&n(o.value,p));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(u,c,s)((o,p,f)=>{const C=[];return o&&C.push("bc-dropdown__option--selected"),p&&C.push("bc-dropdown__option--focused"),f.disabled&&C.push("bc-dropdown__option--disabled"),C.join(" ")})),e.attr.role("option"),e.attr.id(s.map(o=>`dropdown-option-${String(o.value)}`)),e.aria.selected(u),V.Expando("value",s.$.value),e.When(s.map(o=>!o.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,u=>it(u,n,a,r,l))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),st=t=>{const{value:n,options:a,unselectedLabel:r,equality:l=(o,p)=>o===p,placeholder:i,searchable:s=!1}=t,u=e.computedOf(n,a)((o,p)=>{if(o==null)return"";const f=C=>{for(const g of C){if(g.type==="value"&&l(g.value,o))return g.label;if(g.type==="group"){const v=f(g.options);if(v)return v}}};return f(p)||String(o)}),c=e.computedOf(s)(o=>!o);return Me({...t,role:"dropdown",display:e.When(u.map(o=>o.length>0),()=>u,()=>e.Use(h.BeatUII18n,o=>e.coalesce(i,r,o.$.selectOne))),optionsSource:a,allowSpaceToggle:c,buildListboxContent:({focusedValue:o,onSelect:p})=>e.ForEach(a,f=>it(f,l,n,p,o))})},ut=t=>{const{controller:n,onChange:a,onBlur:r,...l}=t;return st({...l,value:n.signal,onChange:$.makeOnChangeHandler(n,a),onBlur:$.makeOnBlurHandler(n,r)})},gn=t=>$.InputWrapper({...t,content:ut(t)}),ct=(t,n,a,r,l,i)=>e.Ensure(t,s=>e.OneOfType(s,{value:u=>{const c=e.computedOf(u,a)((p,f)=>n(p.value,f)),o=e.computedOf(u,l)((p,f)=>f!=null&&n(p.value,f));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(c,o,u)((p,f,C)=>{const g=[];return p&&g.push("bc-dropdown__option--selected"),f&&g.push("bc-dropdown__option--focused"),C.disabled&&g.push("bc-dropdown__option--disabled"),g.join(" ")})),e.attr.role("option"),e.attr.id(u.map(p=>`dropdown-option-${String(p.value)}`)),e.aria.selected(c),e.When(u.map(p=>!p.disabled),()=>e.on.click(()=>r(u.value.value)),()=>e.Empty),e.html.div(e.attr.class("bc-dropdown__option-content"),u.value.before&&e.html.span(e.attr.class("bc-dropdown__option-before"),u.value.before),e.html.span(e.attr.class("bc-dropdown__option-label"),i(u.$.value)),u.value.after&&e.html.span(e.attr.class("bc-dropdown__option-after"),u.value.after)))},group:u=>e.html.div(e.attr.class("bc-dropdown__group"),e.attr.role("group"),e.aria.label(u.$.group),e.html.div(e.attr.class("bc-dropdown__group-label"),u.$.group),e.ForEach(u.$.options,c=>ct(c,n,a,r,l,i))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),dt=t=>{const{value:n,loadOptions:a,renderOption:r,renderValue:l,equality:i=(d,y)=>d===y,placeholder:s,searchPlaceholder:u,debounceMs:c=150}=t,o=e.prop(""),p=e.prop(!1),f=e.prop([]);let C;const g=e.Value.toSignal(n),v=()=>(l??r)(g);let b=null;const w=d=>{p.set(!0),Promise.resolve(a(d)).then(y=>{f.set(y??[])}).catch(()=>{f.set([])}).finally(()=>p.set(!1))},m=d=>{b!=null&&(clearTimeout(b),b=null),b=setTimeout(()=>{w(d)},Math.max(0,c))};return Me({...t,role:"combobox",display:e.When(e.computedOf(n)(d=>d!=null),v,()=>e.Use(h.BeatUII18n,d=>d.$.selectOne)),optionsSource:f,onBeforeOpen:()=>{const d=e.Value.get(o);m(d)},onAfterOpen:()=>{C?.focus()},buildListboxContent:({focusedValue:d,handleKeyDown:y,onSelect:x})=>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(u,s)((k,I)=>k??I??"Search")),e.attr.value(o),e.WithElement(k=>(C=k,e.Empty)),e.on.input(k=>{const I=k.target;o.set(I.value),m(I.value)}),e.on.keydown(y))),e.When(p,()=>e.html.div(e.attr.class("bc-dropdown__loading"),h.Icon({icon:"ph:spinner-bold",color:"neutral"})),()=>e.ForEach(f,k=>ct(k,i,g,x,d,r))))})},pt=t=>{const{controller:n,onChange:a,onBlur:r,...l}=t;return dt({...l,value:n.signal,onChange:$.makeOnChangeHandler(n,a),onBlur:$.makeOnBlurHandler(n,r)})},bn=t=>$.InputWrapper({...t,content:pt(t)});function Ue(t){const{items:n,placement:a="bottom-start",showDelay:r=0,hideDelay:l=100,mainAxisOffset:i=4,crossAxisOffset:s=0,showOn:u="click",closable:c=!0,onClose:o,onAction:p,ariaLabel:f,ariaLabelledBy:C}=t,g=$.sessionId("menu"),v=e.prop(-1),b=e.prop([]);let w=null;return e.Fragment(ge({content:()=>e.WithElement(m=>{w=document.activeElement;const d=(T,S,D)=>{if(S.length===0)return-1;let N=T+D,L=0;for(;L<S.length;){N>=S.length&&(N=0),N<0&&(N=S.length-1);const M=S[N];if(M&&M.getAttribute("aria-disabled")!=="true")return N;N+=D,L++}return T},y=T=>{const S=b.value,D=v.value;switch(T.key){case"ArrowDown":T.preventDefault(),T.stopPropagation();const N=d(D,S,1);x(N,S);break;case"ArrowUp":T.preventDefault(),T.stopPropagation();const L=d(D,S,-1);x(L,S);break;case"Enter":case" ":if(T.preventDefault(),T.stopPropagation(),D>=0&&S[D]){const M=S[D];if(M.getAttribute("aria-disabled")==="true")return;const Z=M.getAttribute("data-key");Z&&p&&p(Z),M.click(),o?.()}break;case"Escape":o?.();break;case"Home":T.preventDefault(),T.stopPropagation(),S.length>0&&x(0,S);break;case"End":T.preventDefault(),T.stopPropagation(),S.length>0&&x(S.length-1,S);break;case"ArrowRight":if(T.preventDefault(),T.stopPropagation(),D>=0&&S[D]){const M=S[D];M.classList.contains("bc-menu-item--has-submenu")&&M.dispatchEvent(new Event("mouseenter"))}break;case"ArrowLeft":T.preventDefault(),T.stopPropagation(),o?.();break}},x=(T,S)=>{v.value>=0&&S[v.value]&&(S[v.value].classList.remove("bc-menu-item--focused"),S[v.value].removeAttribute("aria-selected")),T>=0&&S[T]&&(S[T].classList.add("bc-menu-item--focused"),S[T].setAttribute("aria-selected","true"),v.set(T),typeof S[T].scrollIntoView=="function"&&S[T].scrollIntoView({block:"nearest"}))},k=()=>{const T=Array.from(m.querySelectorAll('[role="menuitem"]'));if(b.set(T),T.length>0){const S=T.findIndex(D=>D.getAttribute("aria-disabled")!=="true");S>=0&&x(S,T)}},I=new MutationObserver(k);return I.observe(m,{childList:!0,subtree:!0}),setTimeout(()=>{k(),m.focus()},0),document.addEventListener("keydown",y,!0),e.Fragment(e.OnDispose(()=>{I.disconnect(),document.removeEventListener("keydown",y,!0),w&&w.focus()}),e.attr.class("bc-menu"),e.attr.id(g),e.attr.role("menu"),e.attr.tabindex(-1),e.aria.orientation("vertical"),f?e.aria.label(f):e.Fragment(),C?e.aria.labelledby(C):e.Fragment(),e.aria.activedescendant(v.map(T=>{const S=b.value;return T>=0&&S[T]?S[T].id||`${g}-item-${T}`:""})),e.on.click(T=>{const D=T.target.closest('[role="menuitem"]');if(D&&D.getAttribute("aria-disabled")!=="true"){const N=D.getAttribute("data-key");N&&p&&p(N)}}),e.html.div(e.attr.class("sr-only"),e.aria.live("polite"),e.aria.atomic(!0),v.map(T=>{const S=b.value;if(T>=0&&S[T]){const D=S[T].textContent||"";return S[T].getAttribute("aria-disabled")==="true"?`${D}, disabled`:`${D}, ${T+1} of ${S.length}`}return""})),...n())}),placement:a,showDelay:r,hideDelay:l,mainAxisOffset:i,crossAxisOffset:s,showOn:u,closable:c,role:"menu"}))}function hn(t){const{key:n,content:a,startContent:r,endContent:l,disabled:i=!1,onClick:s,ariaLabel:u,submenu:c,submenuPlacement:o="right-start"}=t,p=n??$.sessionId("menu-item"),f=`menu-item-${p}`,C=c!=null;return e.html.div(e.attr.class(e.computedOf(i)(g=>`bc-menu-item ${g?"bc-menu-item--disabled":""} ${C?"bc-menu-item--has-submenu":""}`)),e.attr.id(f),e.attr.role("menuitem"),e.attr.tabindex(-1),e.dataAttr.key(p),e.aria.disabled(i),e.aria.selected(!1),C?e.aria.expanded(!1):e.Fragment(),u?e.aria.label(u):e.Fragment(),e.on.click(g=>{if(e.Value.get(i)){g.preventDefault(),g.stopPropagation();return}s?.()}),r&&e.html.span(e.attr.class("bc-menu-item__start"),r),e.html.span(e.attr.class("bc-menu-item__content"),a),l&&e.html.span(e.attr.class("bc-menu-item__end"),l),C&&c?ge({content:()=>e.Fragment(e.attr.class("bc-menu bc-submenu"),e.attr.role("menu"),...c()),placement:o,showOn:"hover",hasPopup:"menu",showDelay:100,hideDelay:300,mainAxisOffset:0,crossAxisOffset:0,role:"menu"}):e.Fragment())}function Re(t={}){const{label:n}=t;return e.html.div(e.attr.class("bc-menu-separator"),e.attr.role("separator"),e.aria.orientation("horizontal"),n&&e.html.span(e.attr.class("bc-menu-separator__label"),n))}function mt(t,n,a){return t.some(l=>a(l,n))?t.filter(l=>!a(l,n)):[...t,n]}function ft(t,n,a){return t.filter(r=>!a(r,n))}function gt(t,n,a){return t.some(r=>a(r,n))}function bt(t,n,a){for(const r of t)if(r.type==="value"){if(a(r.value,n))return{label:r.label}}else if(r.type==="group"){const l=bt(r.options,n,a);if(l!=null)return l}}function yn(t,n,a){return bt(t,n,a)?.label??String(n)}function ht(t,n,a){const r=n.trim().toLowerCase(),l=a??((s,u)=>u.label.toLowerCase().includes(s));if(r==="")return t;const i=[];for(const s of t)if(s.type==="value")l(r,{label:s.label})&&i.push(s);else if(s.type==="group"){const u=ht(s.options,r,l);u.length>0&&i.push({...s,options:u})}return i}function We(t){const{values:n,options:a,equality:r,disabled:l,onRemove:i}=t;return e.NotEmpty(n,()=>e.ForEach(n,s=>Ne({value:e.computedOf(s,a)((u,c)=>yn(c,u,r)),onClose:()=>i(s.value),disabled:l})),()=>e.html.span(e.attr.class("bc-input-container__placeholder"),t.placeholder))}function He(t){const{value:n,options:a,equality:r=(o,p)=>o===p,placeholder:l}=t,i=o=>{const p=e.Value.get(n);t.onChange?.(ft(p,o,r))},s=o=>{const p=e.Value.get(n);t.onChange?.(mt(p,o,r))},u=o=>e.computedOf(n)(p=>gt(p,o,r)),c=Ue({items:()=>{const o=e.Value.get(a),p=[];for(const f of o)if(f.type==="value"){const C=u(f.value);p.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(f.disabled===!0),e.aria.checked(C),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),f.label),e.on.click(()=>s(f.value))))}else f.type==="group"?p.push(e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),f.group),...f.options.map(C=>{if(C.type==="value"){const g=u(C.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(C.disabled===!0),e.aria.checked(g),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),C.label),e.on.click(()=>s(C.value)))}return e.Fragment()}))):p.push(Re());return p},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:"click",closable:!0});return h.InputContainer({...t,before:t.before??h.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),c,We({values:n,placeholder:l,options:a,equality:r,disabled:t.disabled,onRemove:i})),after:h.InputIcon({icon:"line-md:plus",color:"neutral",size:"sm"})})}function vn(t){return $.BaseControl(He,t)}function wn(t){return $.Control(He,t)}function je(t){const{value:n,options:a,equality:r=(g,v)=>g===v,placeholder:l,searchPlaceholder:i,filter:s}=t,u=e.prop(""),c=g=>{const v=e.Value.get(n);t.onChange?.(ft(v,g,r))},o=g=>{const v=e.Value.get(n);t.onChange?.(mt(v,g,r))},p=g=>e.computedOf(n)(v=>gt(v,g,r)),f=e.computedOf(a,u)((g,v)=>ht(g,v,s)),C=Ue({items:()=>{const g=[],v=e.Value.get(f);if(v.length===0)return g.push(e.html.div(e.attr.class("bc-dropdown__empty"),e.Use(h.BeatUII18n,b=>b.$.noResults))),g;for(const b of v)if(b.type==="value"){const w=p(b.value);g.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(b.disabled===!0),e.aria.checked(w),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),b.label),e.on.click(()=>o(b.value))))}else b.type==="group"?g.push(e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),b.group),...b.options.map(w=>{if(w.type==="value"){const m=p(w.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(w.disabled===!0),e.aria.checked(m),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),w.label),e.on.click(()=>o(w.value)))}return e.Fragment()}))):g.push(Re());return g},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:(g,v)=>e.WithElement(b=>{const w=b.querySelector(".bc-dropdown__search-input");if(w){const m=()=>g();return w.addEventListener("focus",m),e.OnDispose(()=>{w.removeEventListener("focus",m)})}return e.Fragment()}),closable:!0});return h.InputContainer({...t,before:t.before??h.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),We({values:n,options:a,placeholder:l,equality:r,disabled:t.disabled,onRemove:c}),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(i,l)((g,v)=>g??v??"")),e.attr.value(u),e.on.input(g=>{const v=g.target;u.set(v.value)}),e.on.keydown(g=>{(g.key==="ArrowUp"||g.key==="ArrowDown"||g.key==="Enter"||g.key===" ")&&g.stopPropagation()})),C))})}function Cn(t){return $.BaseControl(je,t)}function Vn(t){return $.Control(je,t)}const Sn=t=>{const{value:n,onBlur:a,onChange:r}=t;return h.InputContainer({...t,input:e.input.date(h.CommonInputAttributes(t),e.attr.valueAsDate(n),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValueAsDate(r)):e.Empty)})},xn=t=>{const n=t.getFullYear(),a=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),l=t.getHours().toString().padStart(2,"0"),i=t.getMinutes().toString().padStart(2,"0");return`${n}-${a}-${r}T${l}:${i}`},kn=t=>{const{value:n,onBlur:a,onChange:r}=t;return h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,xn)),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(l=>r(new Date(l)))):e.Empty)})},In=t=>{const{value:n,onInput:a,onChange:r,...l}=t;return V.FilesInput({...l,maxFiles:1,value:e.Value.map(n,i=>i==null?[]:[i]),onChange:i=>{r?.(i[0])},onInput:i=>{a?.(i[0])}})},Tn=t=>q.Query({request:t.request,load:t.load,convertError:String,success:({value:n})=>{const a=n.map(r=>r.map(l=>typeof l=="object"&&"id"in l&&"label"in l?ne.value(l.id,l.label):l));return V.NativeSelect({...t,options:a,unselectedLabel:t.unselectedLabel,equality:t.equality})},pending:()=>e.Use(h.BeatUII18n,n=>e.html.span(h.Icon({icon:"line-md:loading-twotone-loop",title:n.$.loadingShort})))}),On=t=>{const{value:n,onBlur:a,onChange:r,onInput:l,after:i,disabled:s,...u}=t,c=V.NullableResetAfter(n,s,r);return V.MaskInput({...u,value:e.Value.map(n,V.nullToEmpty),onChange:r!=null?o=>r(V.emptyToNull(o)):void 0,onInput:l!=null?o=>l(V.emptyToNull(o)):void 0,onBlur:a,after:i!=null?e.Fragment(c,i):c})},Ke=t=>{try{return BigInt(t)}catch{return null}},Pn=t=>{const{value:n,step:a,min:r,max:l,onChange:i,onInput:s,after:u}=t,c=g=>{const v=r!=null?e.Value.get(r):void 0,b=l!=null?e.Value.get(l):void 0;return v!=null&&g<v?v:b!=null&&g>b?b:g},o=a!=null?e.Use(h.BeatUII18n,g=>{const v=e.computedOf(n,r)((m,d)=>d==null?!0:(m??0n)>d),b=e.computedOf(n,l)((m,d)=>d==null?!0:(m??0n)<d),w=(m,d)=>{const y=e.Value.get(n)??0n,x=e.Value.get(a),k=d?.shiftKey?10n:1n,I=y+x*k*m,T=r!=null?e.Value.get(r):void 0,S=l!=null?e.Value.get(l):void 0;if(m<0n&&T!=null&&I<T||m>0n&&S!=null&&I>S)return;const D=c(I);D!==y&&i&&i(D)};return $.Stack(e.attr.class("bc-number-input-steppers"),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),e.attr.disabled(e.computedOf(b,t.disabled??!1)((m,d)=>!m||d)),e.on.click(m=>w(1n,m)),e.aria.label(g.$.incrementValue),h.Icon({icon:"line-md:plus",size:"xs"})),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),e.attr.disabled(e.computedOf(v,t.disabled??!1)((m,d)=>!m||d)),e.on.click(m=>w(-1n,m)),e.aria.label(g.$.decrementValue),h.Icon({icon:"line-md:minus",size:"xs"})))}):null,p=u!=null&&o!=null?e.Fragment(o,u):u??o,f=i?g=>{const v=Ke(g);v!=null&&i(c(v))}:void 0,C=s?g=>{const v=Ke(g);v!=null&&s(c(v))}:void 0;return V.MaskInput({...t,value:e.Value.map(n,g=>g.toString()),onChange:f,onInput:C,after:p,mask:null,allowMode:"digits",class:"bc-number-input"})},Qe=t=>{if(t==null||t==="")return null;try{return BigInt(t)}catch{return null}},Dn=t=>{const{value:n,step:a,min:r,max:l,onChange:i,onInput:s,after:u}=t,c=v=>{const b=r!=null?e.Value.get(r):void 0,w=l!=null?e.Value.get(l):void 0;return b!=null&&v<b?b:w!=null&&v>w?w:v},o=a!=null?e.Use(h.BeatUII18n,v=>{const b=e.computedOf(n,r)((d,y)=>{const x=d??0n;return y==null?!0:x>y}),w=e.computedOf(n,l)((d,y)=>{const x=d??0n;return y==null?!0:x<y}),m=(d,y)=>{const x=e.Value.get(n)??0n,k=e.Value.get(a),I=y?.shiftKey?10n:1n,T=x+k*I*d,S=r!=null?e.Value.get(r):void 0,D=l!=null?e.Value.get(l):void 0;if(d<0n&&S!=null&&T<S||d>0n&&D!=null&&T>D)return;const N=c(T);N!==x&&i&&i(N)};return $.Stack(e.attr.class("bc-number-input-steppers"),e.attr.type("button"),e.html.button(e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),e.attr.disabled(e.computedOf(w,t.disabled??!1)((d,y)=>!d||y)),e.on.click(d=>m(1n,d)),e.aria.label(v.$.incrementValue),h.Icon({icon:"line-md:plus",size:"xs"})),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),e.attr.disabled(e.computedOf(b,t.disabled??!1)((d,y)=>!d||y)),e.on.click(d=>m(-1n,d)),e.aria.label(v.$.decrementValue),h.Icon({icon:"line-md:minus",size:"xs"})))}):null,p=V.NullableResetAfter(n,t.disabled,i),f=u!=null&&o!=null?e.Fragment(o,p,u):u!=null?e.Fragment(p,u):o!=null?e.Fragment(o,p):p,C=i?v=>{const b=Qe(v);i(b===null?null:c(b))}:void 0,g=s?v=>{const b=Qe(v);s(b===null?null:c(b))}:void 0;return V.MaskInput({...t,value:e.Value.map(n,v=>v==null?"":v.toString()),onChange:C,onInput:g,after:f,mask:null,allowMode:"digits",class:"bc-number-input"})},_n=t=>{const{value:n,onChange:a,onBlur:r,before:l}=t,i=e.prop(""),s=c=>{a?.(e.Value.get(n).filter(o=>o!==c))},u=()=>{const c=i.value.trim(),o=e.Value.get(n);c===""||o.includes(c)||(i.set(""),a?.([...o,c]))};return h.InputContainer({...t,before:l??h.InputIcon({icon:"tabler:tag",size:t.size,color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),e.ForEach(n,c=>Ne({value:c,onClose:()=>s(c.value),disabled:t.disabled})),e.input.text(h.CommonInputAttributes(t),e.attr.value(i),e.attr.class("bc-input bc-input-container__tags-input"),e.on.input(e.emitValue(i.set)),a!=null?e.on.change(u):e.Empty,r!=null?e.on.blur(r):e.Empty))})};function Se(t){return n=>{const{value:a,onBlur:r,onChange:l}=n;return V.WithTemporal(i=>h.InputContainer({...n,input:e.input[t.inputType](h.CommonInputAttributes(n),e.attr.value(e.Value.map(a,t.valueToString)),e.attr.class("bc-input"),r!=null?e.on.blur(e.emitValue(r)):e.Empty,l!=null?e.on.change(e.emitValue(s=>l(t.parseValue(i,s)))):e.Empty)}))}}function xe(t){return n=>{const{value:a,onBlur:r,onChange:l,after:i,disabled:s}=n,u=V.NullableResetAfter(a,s,l);return V.WithTemporal(c=>h.InputContainer({...n,input:e.input[t.inputType](h.CommonInputAttributes(n),e.attr.value(e.Value.map(a,o=>o==null?"":t.valueToString(o))),e.attr.class("bc-input"),r!=null?e.on.blur(e.emitValue(r)):e.Empty,l!=null?e.on.change(e.emitValue(o=>l(o===""?null:t.parseValue(c,o)))):e.Empty),after:i!=null?e.Fragment(u,i):u}))}}const $n=Se({inputType:"date",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainDate.from(n)}),Bn=xe({inputType:"date",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainDate.from(n)}),Ln=Se({inputType:"time",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainTime.from(n)}),En=xe({inputType:"time",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainTime.from(n)}),An=Se({inputType:"datetime-local",valueToString:t=>t.toJSON(),parseValue:(t,n)=>t.PlainDateTime.from(n)}),Nn=xe({inputType:"datetime-local",valueToString:t=>t.toJSON(),parseValue:(t,n)=>t.PlainDateTime.from(n)}),Fn=t=>{const n=new Date(t),a=n.getFullYear().toString().padStart(4,"0"),r=(n.getMonth()+1).toString().padStart(2,"0"),l=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0");return`${a}-${r}-${l}T${i}:${s}`},Mn=t=>{const{value:n,onBlur:a,onChange:r}=t;return V.WithTemporal(l=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,i=>Fn(Number(i.epochMilliseconds)))),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(i=>r(l.Instant.from(new Date(i).toISOString())))):e.Empty)}))},Un=t=>{const n=new Date(t),a=n.getFullYear().toString().padStart(4,"0"),r=(n.getMonth()+1).toString().padStart(2,"0"),l=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0");return`${a}-${r}-${l}T${i}:${s}`},Rn=t=>{const{value:n,onBlur:a,onChange:r,after:l,disabled:i}=t,s=V.NullableResetAfter(n,i,r);return V.WithTemporal(u=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,c=>c==null?null:Un(Number(c.epochMilliseconds)))),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(c=>r(c===""?null:u.Instant.from(new Date(c).toISOString())))):e.Empty),after:l!=null?e.Fragment(s,l):s}))},Wn=t=>{const{value:n,onBlur:a,onChange:r}=t;return V.WithTemporal(l=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,i=>i.toJSON())),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(i=>{const s=l.PlainDateTime.from(i),u=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(l.ZonedDateTime.from({...s,timeZone:u}))})):e.Empty)}))},Hn=t=>{const{value:n,onBlur:a,onChange:r,after:l,disabled:i}=t,s=V.NullableResetAfter(n,i,r);return V.WithTemporal(u=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,c=>c?.toJSON())),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(c=>{if(c==="")return r(null);const o=u.PlainDateTime.from(c),p=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(u.ZonedDateTime.from({...o,timeZone:p}))})):e.Empty),after:l!=null?e.Fragment(s,l):s}))},jn=Se({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainYearMonth.from(n)}),zn=xe({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainYearMonth.from(n)}),Gn=t=>{const{value:n,onChange:a}=t;return V.WithTemporal(r=>V.MaskInput({...t,value:e.Value.map(n,l=>l.toString()),onChange:a!=null?l=>a(r.PlainMonthDay.from(`--${l}`)):void 0,onInput:void 0,mask:"99-99",placeholder:"MM-DD"}))},Yn=t=>{const{value:n,onChange:a,after:r,disabled:l}=t,i=V.NullableResetAfter(n,l,a);return V.WithTemporal(s=>V.MaskInput({...t,value:e.Value.map(n,u=>u?.toString()??""),onChange:a!=null?u=>a(u===""?null:s.PlainMonthDay.from(`--${u}`)):void 0,onInput:void 0,mask:"99-99",placeholder:"MM-DD",after:r!=null?e.Fragment(i,r):i}))},Zn=t=>{const{value:n,onChange:a}=t;return V.WithTemporal(r=>V.MaskInput({...t,value:e.Value.map(n,l=>l.toString()),onChange:a?l=>a(r.Duration.from(l)):void 0,onInput:void 0,...V.durationMaskConfig(r.Duration.from),placeholder:"P0DT0H0M0S"}))};function qn(t,n,a){return e.Ensure(t.signal,()=>{const r=t.transform(l=>l,l=>l);return n(r)},a)}const Jn={filling:{type:"filling"},submitting:{type:"submitting"},error:t=>({type:"error",error:t}),success:{type:"success"}};class yt extends $.Controller{constructor(n,a,r,l,i){super(n,a,r,l,i)}isValidColor=this.signal.map(V.isValidColor);isValidHex=this.signal.map(V.isValidHexColor);normalizedHex=this.signal.map(n=>V.normalizeHexColor(n)??n);setColor=n=>{if(V.isValidHexColor(n)){const a=V.normalizeHexColor(n);if(a){this.change(a);return}}this.change(n)};setHex=n=>{const a=V.normalizeHexColor(n);a&&this.change(a)};setRgb=(n,a,r)=>{const l=s=>{const u=Math.round(Math.max(0,Math.min(255,s))).toString(16);return u.length===1?"0"+u:u},i=`#${l(n)}${l(a)}${l(r)}`;this.change(i)};getRgb=()=>{const n=this.signal.value,a=V.normalizeHexColor(n);if(!a)return null;const r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null};withFormat=n=>{const a=l=>{switch(n){case"hex":return V.normalizeHexColor(l)??l;case"rgb":const i=this.getRgb();return i?`rgb(${i.r}, ${i.g}, ${i.b})`:l;case"hsl":return l;default:return l}},r=l=>V.normalizeHexColor(l)??l;return this.transform(a,r,[`format-${n}`])}}function Kn(t){return new yt(t.path,t.change,t.signal,t.status,{disabled:t.disabled})}function Qn(t){return{id:t.name,disabled:t.disabled,value:t.normalizedHex,hasError:t.errorVisible,onChange:t.setColor,onInput:t.setColor}}function Xn({locales:t,onChange:n,updateLocale:a=!0}){return e.Use(h.BeatUII18n,r=>e.Use(h.Locale,({locale:l,setLocale:i})=>$.InputWrapper({layout:"horizontal",content:V.Group(e.attr.class("bc-group--align-center bc-group--gap-2"),h.Icon({icon:"ic:twotone-language",size:"lg",color:"neutral",title:r.$.locale}),V.NativeSelect({options:e.Value.map(t,s=>s.map(u=>{let c=u.name;return u.nativeName!=null&&u.nativeName!==u.name&&(c+=` (${u.nativeName})`),ne.value(u.code,c)})),value:l,onChange:s=>{a&&i(s),n?.(s)}}))})))}const ea=()=>e.Use(h.Locale,({direction:t})=>e.Portal("body",e.attr.class(t.map(n=>`b-${n}`))));function vt(t,n,a,r,l){const i=["bc-notification"];return t&&i.push("bc-notification--bordered"),n&&i.push("bc-notification--has-icon"),a&&i.push("bc-notification--closable"),r&&i.push("bc-notification--loading"),l&&l.length>0&&i.push(l),i.join(" ")}function wt(t,n){return[`--notification-accent-color: ${Y.getColorVar(t,500)}`,`--notification-radius: ${O.getRadiusVar(n)}`].join("; ")}function Ct({loading:t=!1,withCloseButton:n=!1,withBorder:a=!1,color:r="primary",radius:l="md",title:i,icon:s,onClose:u,class:c}={},...o){const p=e.Value.map(s,f=>f!=null);return e.html.section(e.attr.class(e.computedOf(a,p,n,t,c)((f,C,g,v,b)=>[vt(f,C,g,v,b)].join(" "))),e.attr.style(e.computedOf(r,l)((f,C)=>wt(f,C))),e.aria.live("polite"),e.aria.busy(t),e.When(t,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__loader"),h.Icon({icon:"line-md:loading-twotone-loop",size:"lg",color:r,accessibility:"decorative"})),()=>e.When(p,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__icon"),h.Icon({icon:s,size:"lg",color:r})),()=>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"),i!=null?e.html.div(e.attr.class("bc-notification__title"),i):null,e.html.div(e.attr.class("bc-notification__content"),...o)),e.When(n,()=>e.html.div(e.attr.class("bc-notification__meta"),$.CloseButton({size:"sm",color:r,onClick:u}))))}class ta{handles=[];attach(n){return this.detach(n),this.handles.push(n),()=>this.detach(n)}detach(n){const a=this.handles.lastIndexOf(n);a>=0&&this.handles.splice(a,1)}get current(){const n=this.handles[this.handles.length-1];if(!n)throw new Error("NotificationService: no provider attached. Ensure BeatUI includes notifications or attach the provider manually.");return n}show(n,...a){return this.current.show(n,...a)}clear(){this.current.clear()}}const Vt=new ta,ze={mark:e.makeProviderMark("NotificationProvider"),create:({position:t="bottom-end"}={})=>{const n=e.prop(0),a=[];function r(c){return a.push(c),()=>{const o=a.lastIndexOf(c);o>=0&&a.splice(o,1)}}const l=[],i=({dismissAfter:c,onClose:o,animation:p={fade:!0},...f},...C)=>{n.update(b=>b+1);const g=c!=null?typeof c=="number"?Lt(c*1e3):c:void 0,v={animation:p,class:e.Value.toSignal(f.class),loading:e.Value.toSignal(f.loading??!1),withCloseButton:e.Value.toSignal(f.withCloseButton==null&&c==null?!0:f.withCloseButton??!0),withBorder:e.Value.toSignal(f.withBorder??!1),color:e.Value.toSignal(f.color??"primary"),radius:e.Value.toSignal(f.radius??"md"),title:f.title??e.Empty,icon:e.Value.toSignal(f.icon),children:C,listenRequestClose:b=>(l.push(b),o?.(),()=>{}),delayedClose:g};a.forEach(b=>b(v))},s=()=>{l.forEach(c=>c()),l.length=0},u=Vt.attach({show:i,clear:s});return{value:{activeNotifications:n,show:i,clear:s,position:t,listenOnShow:r},dispose:()=>{u(),s()}}}};function St(){return e.Use(ze,({listenOnShow:t,position:n})=>e.html.div(e.attr.class("bc-notification-viewport"),e.attr.class(`bc-notification-viewport--${n}`),e.WithBrowserCtx(a=>e.OnDispose(t(r=>{const l=[],i=e.html.div(H.AnimatedToggle({animation:r.animation,initialStatus:"start-opening"},({close:s,listenOnClosed:u})=>(r.delayedClose?.finally(s),u(()=>{l.forEach(c=>c())}),Ct({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))));l.push(e.renderWithContext(i,a))})))))}function na({includeAuthI18n:t=!1,enableAppearance:n=!0,defaultAppearance:a="system",appearancePreferenceKey:r="bui-appearance",includeNotifications:l=!0,notificationPosition:i="bottom-end"},...s){return e.WithProvider(({set:u,use:c})=>{u(q.Location,{}),u(h.Locale,{}),u(h.BeatUII18n,{}),u(me.Theme,{defaultAppearance:n?a:"light",appearancePreferenceKey:r}),l&&u(ze,{position:i}),q.NavigationService.attach(c(q.Location));const o=e.Fragment(n?me.ThemeAppearance():e.Empty,ea(),l?St():e.Empty,...s);return t?e.Task(()=>Promise.resolve().then(()=>require("./translations-BRRDPpLp.cjs")),({AuthI18n:p})=>e.Provide(p,{},()=>o)):o})}function aa({content:t,toolbar:n=!0,page:a,zoom:r,view:l,pagemode:i,scrollbar:s=!0,navpanes:u=!0,search:c,nameddest:o,viewrect:p,highlight:f,allowfullscreen:C=!1}){const g=e.Value.toSignal(t).mapAsync(async b=>{if(b instanceof Blob){const w=await b.arrayBuffer(),m=new Blob([w],{type:"application/pdf"});return URL.createObjectURL(m)}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 m=await(await fetch(b)).arrayBuffer(),d=new Blob([m],{type:"application/pdf"});return URL.createObjectURL(d)}}},null),v=e.computedOf(g,n,a,r,l,i,s,u,c,o,p,f)((b,w,m,d,y,x,k,I,T,S,D,N)=>{if(b==null)return null;const L=[];w===!1&&L.push("toolbar=0"),m!=null&&m>0&&L.push(`page=${m}`),d!=null&&d>0&&L.push(`zoom=${d}`),y!=null&&L.push(`view=${y}`),x!=null&&L.push(`pagemode=${x}`),k===!1&&L.push("scrollbar=0"),I===!1&&L.push("navpanes=0"),T!=null&&L.push(`search=${encodeURIComponent(T)}`),S!=null&&L.push(`nameddest=${encodeURIComponent(S)}`),D!=null&&L.push(`viewrect=${encodeURIComponent(D)}`),N!=null&&L.push(`highlight=${encodeURIComponent(N)}`);const M=L.join("&");return M?`${b}#${M}`:b});return g.on((b,w)=>{w!=null&&URL.revokeObjectURL(w)}),e.html.div(e.OnDispose(()=>{const b=g.value;b!=null&&URL.revokeObjectURL(b)}),e.attr.class("h-full w-full"),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(C),e.attr.title("PDF Preview"),e.attr.loading("lazy"),e.WithElement(b=>{const w=b;let m=!0;return v.on(d=>{d!=null&&(m?(w.src=d,m=!1):(w.src="about:blank",setTimeout(()=>{w.src=d},50)))}),e.Empty})))}function ra({content:t,page:n,zoom:a,pagemode:r,nameddest:l,search:i,textLayerMode:s,sidebarViewOnLoad:u,scrollModeOnLoad:c,spreadModeOnLoad:o,enableScripting:p,enablePrinting:f,viewerUrl:C=null,allowfullscreen:g=!0,class:v=null}){const b=e.Value.toSignal(t).mapAsync(async m=>{if(m instanceof Blob)return URL.createObjectURL(m);if(m instanceof ArrayBuffer)return URL.createObjectURL(new Blob([m],{type:"application/pdf"}));if(m instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(m)],{type:"application/pdf"}));if(typeof m=="string")return m},null),w=e.computedOf(b,C,n,a,r,l,i,s,u,c,o,p,f)((m,d,y,x,k,I,T,S,D,N,L,M,Z)=>{if(m==null)return null;const U=d??"https://mozilla.github.io/pdf.js/web/viewer.html",E=new URLSearchParams;E.set("file",encodeURIComponent(m));const j=[];y!=null&&y>0&&j.push(`page=${y}`),x!=null&&(typeof x=="string"?j.push(`zoom=${x}`):j.push(`zoom=${x}`)),k!=null&&j.push(`pagemode=${k}`),I!=null&&j.push(`nameddest=${encodeURIComponent(I)}`),T!=null&&j.push(`search=${encodeURIComponent(T)}`),S!=null&&j.push(`textLayer=${S}`),D!=null&&j.push(`sidebar=${D}`),N!=null&&j.push(`scrollMode=${N}`),L!=null&&j.push(`spreadMode=${L}`),M!=null&&j.push(`enableScripting=${M?"1":"0"}`),Z!=null&&j.push(`enablePrinting=${Z?"1":"0"}`);const K=j.length>0?`#${j.join("&")}`:"";return`${U}?${E.toString()}${K}`});return b.on((m,d)=>{d!=null&&d.startsWith("blob:")&&URL.revokeObjectURL(d)}),e.html.div(e.OnDispose(()=>{const m=b.value;m!=null&&m.startsWith("blob:")&&URL.revokeObjectURL(m)}),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(g),e.attr.title("PDF Preview"),e.attr.loading("lazy"),e.attr.src(w)))}const la=({id:t,css:n})=>e.Portal("head",e.html.style(e.attr.id(t),e.attr.innerHTML(n)));function ee(t,n){return n==null?null:e.html.meta(e.attr.name(t),e.attr.content(e.Value.map(n,a=>String(a))))}function W(t,n){return n==null?null:e.html.meta(e.attr.property(t),e.attr.content(e.Value.map(n,a=>String(a))))}function Ve(t,n){return n==null?null:e.ForEach(n,a=>W(t,a))}function oa(t,n){return n==null?null:e.When(e.Value.map(n,a=>Array.isArray(a)),()=>Ve(t,n),()=>W(t,n))}const ia=t=>{const n=[];if(n.push(W("og:title",t.title)),n.push(W("og:type",t.type)),n.push(W("og:url",t.url)),n.push(W("og:image",t.image)),n.push(W("og:description",t.description)),n.push(W("og:site_name",t.siteName)),n.push(W("og:locale",t.locale)),t.localeAlternate!=null){const a=Ve("og:locale:alternate",t.localeAlternate);a!=null&&n.push(a)}if(n.push(W("og:image:alt",t.imageAlt)),n.push(W("og:image:width",t.imageWidth)),n.push(W("og:image:height",t.imageHeight)),n.push(W("og:image:type",t.imageType)),t.images!=null){const a=Ve("og:image",t.images);a!=null&&n.push(a)}if(n.push(W("og:video",t.video)),n.push(W("og:video:type",t.videoType)),n.push(W("og:video:width",t.videoWidth)),n.push(W("og:video:height",t.videoHeight)),n.push(W("og:video:secure_url",t.videoSecureUrl)),n.push(W("og:audio",t.audio)),n.push(W("og:audio:type",t.audioType)),n.push(W("og:audio:secure_url",t.audioSecureUrl)),n.push(W("article:published_time",t.publishedTime)),n.push(W("article:modified_time",t.modifiedTime)),n.push(W("article:expiration_time",t.expirationTime)),n.push(oa("article:author",t.author)),n.push(W("article:section",t.section)),t.tags!=null){const a=Ve("article:tag",t.tags);a!=null&&n.push(a)}return n.push(W("profile:first_name",t.firstName)),n.push(W("profile:last_name",t.lastName)),n.push(W("profile:username",t.username)),n.push(W("profile:gender",t.gender)),n.push(ee("twitter:card",t.twitterCard)),n.push(ee("twitter:site",t.twitterSite)),n.push(ee("twitter:creator",t.twitterCreator)),n.push(ee("twitter:title",e.coalesce(t.twitterTitle,t.title))),n.push(ee("twitter:description",e.coalesce(t.twitterDescription,t.description))),n.push(ee("twitter:image",e.coalesce(t.twitterImage,t.image))),n.push(ee("twitter:image:alt",e.coalesce(t.twitterImageAlt,t.imageAlt))),t.canonical!=null&&e.Value.get(t.canonical)!=null&&n.push(e.html.link(e.attr.rel("canonical"),e.attr.href(t.canonical))),n.push(ee("robots",t.robots)),n.push(ee("keywords",t.keywords)),n.push(ee("author",t.metaAuthor)),e.Portal("head",n.filter(a=>a!=null).flat())},Ge=({viewTransition:t,state:n,scroll:a,replace:r})=>{const l={};return n!==void 0&&(l.state=n),a!==void 0&&(l.scroll=a),r!==void 0&&(l.replace=r),t!==void 0&&(l.viewTransition=t),l};function Le(t,n){const a=["bc-link"];if(n)a.push("bc-link--disabled");else switch(t){case"plain":a.push("bc-link--plain");break;case"hover":a.push("bc-link--hover");break;case"default":default:a.push("bc-link--default");break}return a.join(" ")}function Ee(t){const n=h.textColorValue(t,"light"),a=h.textColorValue(t,"dark");return[`--link-color: ${n}`,`--link-color-dark: ${a}`,`--link-hover-color: ${n}`,`--link-hover-color-dark: ${a}`].join("; ")}function xt({href:t,variant:n="default",color:a="primary",colorDisabled:r="base",disabled:l=!1,viewTransition:i=!0,state:s,scroll:u,replace:c,target:o,rel:p},...f){return e.When(l,()=>e.html.span(e.attr.class(e.computedOf(n,l)((C,g)=>Le(C,g))),e.attr.style(e.computedOf(r)(C=>Ee(C??"base"))),...f),()=>q.Anchor({href:t,...Ge({viewTransition:i,state:s,scroll:u,replace:c})},e.attr.class(e.computedOf(n,l)((C,g)=>Le(C,g))),e.attr.style(e.computedOf(a)(C=>Ee(C??"primary"))),o?e.attr.target(o):null,p?e.attr.rel(p):null,...f))}const sa=t=>t?t.startsWith("#")?t:`#${t}`:"",ua=t=>{if(!t)return new URLSearchParams;if(typeof t=="string"){const n=t.startsWith("?")?t.slice(1):t;return new URLSearchParams(n)}return t instanceof URLSearchParams?new URLSearchParams(t):new URLSearchParams(t)};function kt(t,n,a){const r=ua(t.search),l=r.toString(),i=l?`?${l}`:"",s=sa(t.hash);switch(a){case"exact":return t.pathname+i+s===n;case"prefix":return t.pathname.startsWith(n)||(t.pathname+i).startsWith(n);case"params":try{const u=typeof document<"u"&&document.baseURI?document.baseURI:"http://localhost/",c=new URL(n,u);if(t.pathname!==c.pathname)return!1;const o=Array.from(new URLSearchParams(c.search).entries()).sort(),p=Array.from(r.entries()).sort();return o.length!==p.length?!1:o.every(([f,C],g)=>{const[v,b]=p[g];return f===v&&C===b})}catch{return t.pathname===n}default:return!1}}function ke(t,n){return n==="exact"?e.computedOf(t)(a=>a):e.computedOf(t)(a=>r=>kt(r,a,n))}function ca({href:t,matchMode:n="exact",disableWhenActive:a=!0,...r},...l){return e.Use(q.Location,i=>{const s=i.matchSignal(ke(t,n)),u=e.computedOf(s,a)((c,o)=>o??!0?c:!1);return xt({...r,href:t,disabled:u},...l)})}function da({href:t,viewTransition:n=!0,state:a,scroll:r,replace:l,target:i,rel:s,matchMode:u,disableWhenActive:c,variant:o="filled",size:p="md",color:f="base",roundedness:C="sm",disabled:g=!1},...v){return u!==void 0||c!==void 0?e.Use(q.Location,b=>{const w=u!==void 0?b.matchSignal(ke(t,u)):e.computedOf(b.location)(()=>!1),m=e.computedOf(w,c)((y,x)=>!(x??!0)||!u?!1:y),d=e.computedOf(g,m)((y,x)=>y||x);return Xe({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:o,size:p,color:f,roundedness:C,disabled:d},...v)}):Xe({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:o,size:p,color:f,roundedness:C,disabled:g},...v)}function Xe({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:u="default",size:c="md",color:o="base",roundedness:p="sm",disabled:f=!1,fullWidth:C=!1,loading:g=!1},...v){return e.When(f??!1,()=>e.html.span(e.attr.class(e.computedOf(c,p,g,C)(h.generateButtonClasses)),e.attr.style(e.computedOf(u,o,f)((b,w,m)=>h.generateButtonStyles(b??"filled",w??"base",m))),...v),()=>q.Anchor({href:t,...Ge({viewTransition:n,state:a,scroll:r,replace:l})},e.attr.class(e.computedOf(c,p,g,C)(h.generateButtonClasses)),e.attr.style(e.computedOf(u,o,f)((b,w,m)=>h.generateButtonStyles(b??"filled",w??"base",m))),i?e.attr.target(i):null,s?e.attr.rel(s):null,...v))}const It={mark:e.makeProviderMark("SidebarContext"),create:t=>({value:{backgroundMode:"light"},dispose:()=>{}})};function pa({backgroundMode:t="light"},...n){return e.Provide(It,e.Value.map(t,a=>({backgroundMode:a})),()=>e.html.div(e.attr.class("bc-sidebar"),e.attr.class(e.Value.map(t,a=>a==="dark"?"bc-sidebar--dark-bg":"")),...n))}function Ae({rail:t,header:n},...a){return $.Stack(n!=null?e.html.div(e.attr.class("bc-sidebar-group__header"),n):null,e.html.div(e.attr.class(e.Value.map(t??!1,r=>r?"bc-sidebar-group--rail":"")),e.attr.class("bc-sidebar-group"),...a))}function Tt(t,...n){const a=Ge({viewTransition:t.viewTransition??!0,state:t.state,scroll:t.scroll,replace:t.replace});return q.Anchor({href:t.href,...a},...n)}function Ot(...t){return e.html.span(...t)}function Pt(t,...n){return e.html.button(e.attr.type("button"),e.on.click(t.onClick),t.ariaExpanded!=null?e.aria.expanded(e.Value.map(t.ariaExpanded,a=>a)):null,t.ariaControls!=null?e.aria.controls(t.ariaControls):null,t.ariaLabel!=null?e.aria.label(t.ariaLabel):null,...n)}function Dt(t){const n=[e.attr.class("bc-sidebar-link")];return t.icon!=null&&n.push(e.html.span(e.attr.class("bc-sidebar-link--icon"),h.Icon({icon:t.icon}))),n.push(e.html.span(e.attr.class("bc-sidebar-link__content"),t.content)),t.right!=null&&n.push(e.html.span(e.attr.class("bc-sidebar-link__right"),t.right)),t.action!=null&&n.push(e.html.button(e.attr.type("button"),e.attr.class("bc-sidebar-link--action"),e.on.click((a,r)=>{t.action?.onClick?.(r)}),h.Icon({icon:t.action?.icon}))),"onClick"in t?Pt(t,...n):e.Use(q.Location,a=>{const r=a.matchSignal(ke(t.href,"exact"),{includeSearch:!1,includeHash:!1});return e.When(r,()=>Ot(...n),()=>Tt(t,...n))})}function ma({rail:t=!0,icon:n,header:a,startOpen:r=!0},...l){const i=e.Value.deriveProp(r),s=$.sessionId("sidebar-group"),u=`${s}-content`;return Ae({},e.attr.class("bc-sidebar-group-collapsible"),e.attr.class(i.map(c=>c?"bc-sidebar-group-collapsible--open":"bc-sidebar-group-collapsible--closed")),e.attr.role("group"),e.attr.id(s),Dt({icon:n,onClick:()=>i.update(c=>!c),ariaExpanded:i,ariaControls:u,right:e.html.span(e.attr.class("bc-sidebar-group-collapsible-indicator"),h.Icon({icon:"lucide:chevron-down",color:"base"})),content:a}),Ae({rail:t},e.attr.id(u),ot({open:i},...l)))}function fa(){return e.html.hr(e.attr.class("bc-sidebar-separator"))}function ga(t,n,a,r){const l=["bc-tabs",`bc-tabs--${t}`,`bc-tabs--${n}`];return a&&l.push("bc-tabs--disabled"),r!=null&&r!=="default"&&l.push(`bc-tabs--variant-${r}`),l.join(" ")}function ba(t,n){if(t!=="filled")return"";const a=new Map,r=h.backgroundValue(n,"solid","light"),l=h.backgroundValue(n,"solid","dark");a.set("--tabs-filled-inactive-bg",r.backgroundColor),a.set("--tabs-filled-inactive-text","var(--color-white)");const i=h.hoverBackgroundValue(n,"solid","light");a.set("--tabs-filled-inactive-bg-hover",i.backgroundColor);const s=h.hoverBackgroundValue(n,"solid","dark");a.set("--tabs-filled-inactive-bg-dark-hover",s.backgroundColor),a.set("--tabs-filled-inactive-bg-dark",l.backgroundColor),a.set("--tabs-filled-inactive-text-dark",l.textColor),a.set("--tabs-filled-active-bg","var(--color-white)"),a.set("--tabs-filled-active-text","var(--color-base-800)"),a.set("--tabs-filled-active-bg-dark","var(--color-base-900)");const u=n==="white"||n==="black"||n==="transparent"?"var(--color-white)":Y.getColorVar(n,400);return a.set("--tabs-filled-active-text-dark",u),Array.from(a.entries()).map(([c,o])=>`${c}: ${o}`).join("; ")}function ha(t,n,a){const r=["bc-tab",`bc-tab--${t}`];return n&&r.push("bc-tab--active"),a&&r.push("bc-tab--disabled"),r.join(" ")}function we(t,n,a){const r=n.length;let l=t+a;l>=r?l=0:l<0&&(l=r-1);let i=0;for(;i<r;){const s=n[l];if(!e.Value.get(s.disabled??!1))return l;l+=a,l>=r?l=0:l<0&&(l=r-1),i++}return t}function ya(t){const{items:n,value:a,onChange:r,size:l="md",variant:i="default",color:s="primary",disabled:u=!1,orientation:c="horizontal",showContent:o=!0,ariaLabel:p}=t,f=$.sessionId("tablist"),C=e.prop(-1),g=e.computedOf(a)(b=>n.find(w=>w.key===b)),v=b=>{if(e.Value.get(u))return;const m=C.value,d=e.Value.get(c)==="horizontal";let y=m;switch(b.key){case(d?"ArrowRight":"ArrowDown"):b.preventDefault(),y=we(m,n,1);break;case(d?"ArrowLeft":"ArrowUp"):b.preventDefault(),y=we(m,n,-1);break;case"Home":b.preventDefault(),y=we(-1,n,1);break;case"End":b.preventDefault(),y=we(n.length,n,-1);break;case"Enter":case" ":if(b.preventDefault(),m>=0&&m<n.length){const x=n[m];e.Value.get(x.disabled??!1)||r?.(x.key)}break}y!==m&&y>=0&&y<n.length&&(C.set(y),setTimeout(()=>{const x=document.querySelector(`[data-tab-index="${y}"]`);x&&x.focus()},0))};return e.html.div(e.attr.class(e.computedOf(l,c,u,i)((b,w,m,d)=>ga(b??"md",w??"horizontal",m??!1,d??"default"))),e.attr.style(e.computedOf(i,s)((b,w)=>ba(b??"default",w??"primary"))),e.html.div(e.attr.class("bc-tabs__list"),e.attr.role("tablist"),e.attr.id(f),e.aria.orientation(c??"horizontal"),p?e.aria.label(p):e.Fragment(),e.on.keydown(v),...n.map((b,w)=>{const m=e.computedOf(a)(k=>k===b.key),d=e.computedOf(u,b.disabled)((k,I)=>k||I),y=`${f}-tab-${b.key}`,x=`${f}-panel-${b.key}`;return e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(l,m,d)((k,I,T)=>ha(k??"md",I??!1,T??!1))),e.attr.id(y),e.attr.role("tab"),e.attr.tabindex(e.computedOf(m,C)((k,I)=>k||I===w?0:-1)),e.aria.selected(m),e.aria.controls(x),e.aria.disabled(d),e.attr.disabled(d),e.dataAttr["tab-index"](String(w)),b.ariaLabel?e.aria.label(b.ariaLabel):e.Fragment(),e.on.click(k=>{k.preventDefault(),e.Value.get(b.disabled??!1)||e.Value.get(u)||(r?.(b.key),C.set(w))}),e.on.focus(()=>{C.set(w)}),b.label)})),e.When(o??!0,()=>e.Ensure(g,b=>{const w=b.$.key,m=w.map(y=>`${f}-tab-${y}`),d=w.map(y=>`${f}-panel-${y}`);return e.html.div(e.attr.class("bc-tabs__panels"),e.html.div(e.attr.class("bc-tabs__panel"),e.attr.id(d),e.attr.role("tabpanel"),e.attr.tabindex(0),e.aria.labelledby(m),e.MapSignal(b,y=>y.content())))})))}function va(t){return H.Overlay((n,a)=>{let r=a;const l=()=>r();return t(u=>{const{size:c="md",side:o="right",dismissable:p=!0,showCloseButton:f=!0,onClose:C,overlayEffect:g="opaque",container:v="body",header:b,body:w,footer:m}=u;r=a;const d=e.prop("capturing");e.Value.on(p,k=>{d.set(k?"capturing":"non-capturing")});const y=e.computedOf(b!=null,f)((k,I)=>k||I),x=e.WithElement(k=>{const I=H.useAnimatedElementToggle({initialStatus:"closed",element:k});I.listenOnClosed(()=>{a()}),r=()=>{I.close()},ce.g(()=>I.open());const S=$.sessionId("drawer"),D=b!=null?`${S}-header`:void 0,N=`${S}-body`;return e.html.div(e.attr.class(e.computedOf(c,o,I.status)((L,M,Z)=>`bc-drawer bc-drawer--size-${L} bc-drawer--container-${v} bc-drawer--side-${M} bc-drawer--status-${Z}`)),e.attr.role("dialog"),e.aria.modal(!0),...D?[e.aria.labelledby(D)]:[],e.aria.describedby(N),e.attr.tabindex(-1),e.attr.id(S),e.dataAttr.focusTrap("true"),H.FocusTrap({active:!0,escapeDeactivates:!1,initialFocus:()=>document.querySelector(`#${S} [aria-label="Close drawer"]`)||null}),e.on.mousedown(L=>L.stopPropagation()),e.MapSignal(y,L=>Be(L?{header:e.html.div(e.attr.class("bc-drawer__header"),e.html.div(e.attr.id(D),b),e.When(f,()=>e.Use(h.BeatUII18n,M=>$.CloseButton({size:"sm",onClick:l,label:M.$.closeDrawer})))),body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(N),w),footer:m&&e.html.div(e.attr.class("bc-drawer__footer"),m)}:{body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(N),w),footer:m&&e.html.div(e.attr.class("bc-drawer__footer"),m)})))});n({mode:d,effect:g??"opaque",container:v,content:x,onClickOutside:()=>{C?.(),l()},onEscape:()=>{C?.(),l()}})},()=>{l()})})}function wa(t){const n={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(a=>n[a]))))}function Ca(t){const{content:n,placement:a="top",showDelay:r=250,hideDelay:l=500,mainAxisOffset:i=8,crossAxisOffset:s=0,showOn:u="hover-focus"}=t,c=$.sessionId("tooltip");return e.Fragment(e.aria.describedby(c),ge({content:()=>e.Fragment(e.attr.class("bc-tooltip"),e.attr.role("tooltip"),e.attr.id(c),n),placement:a,showDelay:r,hideDelay:l,mainAxisOffset:i,crossAxisOffset:s,showOn:u,closable:!0,role:"tooltip",arrow:o=>{const p=o.map(({placement:f})=>f.includes("top")?"down":f.includes("bottom")?"up":f.includes("left")?"right":f.includes("right")?"left":"up");return e.Fragment(e.attr.class("bc-tooltip__arrow"),e.attr.class(p.map(f=>`bc-tooltip__arrow-${f}`)),e.style.transform(o.map(({x:f,y:C})=>f==null&&C==null?"":f!=null?`translate(${f}px, 0)`:`translate(0, ${C}px)`)),wa(p))}}))}function Va(t,n,a,r,l,i){const s=h.backgroundValue(t,"solid","light"),u=h.backgroundValue(t,"solid","dark");return[`--ribbon-bg: ${s.backgroundColor}`,`--ribbon-text: ${s.textColor}`,`--ribbon-bg-dark: ${u.backgroundColor}`,`--ribbon-text-dark: ${u.textColor}`,`--ribbon-inset: ${_e(n)}`,`--ribbon-offset: ${_e(a)}`,`--ribbon-width: ${_e(r)}`,`--ribbon-angle: ${l}deg`,`--ribbon-corner: ${i}`].join("; ")}function _e(t){return t==null?null:typeof t=="number"?`${t}px`:t}function Sa({color:t="primary",class:n,inset:a=0,offset:r=40,width:l=100,angle:i=45,corner:s="top-end"},...u){return e.html.div(e.attr.class("bc-ribbon"),e.attr.style(e.computedOf(t,a,r,l,i,s)(Va)),e.attr.class(n),...u)}function xa(t,n){const{dismissable:a=!0,showCloseButton:r=!0,overlayEffect:l="opaque",container:i="body",padding:s=32}=t;return H.Overlay((u,c)=>{let o=()=>{};return n(C=>{o=c;const g=e.prop(typeof a!="boolean"||a?"capturing":"non-capturing");let v=typeof a=="boolean"?a:!0;e.Value.on(a,w=>{v=w,g.set(w?"capturing":"non-capturing")});const b=e.html.div(e.attr.class("bc-lightbox"),e.When(r,()=>e.Use(h.BeatUII18n,w=>e.html.div(e.attr.class("bc-lightbox__close"),$.CloseButton({size:"md",label:w.$.closeModal,onClick:()=>{o(),c()}}))),()=>null),e.html.div(e.attr.class("bc-lightbox__viewport"),e.attr.style(e.computedOf(s)(w=>`padding:${typeof w=="number"?w+"px":w}`)),e.html.div(e.attr.class("bc-lightbox__content"),C)));u({mode:g,effect:l??"opaque",container:i,content:b,onClickOutside:()=>{v&&(o(),c())},onEscape:()=>{v&&(o(),c())}})},()=>{o(),c()})})}function ka(t,n){const a=["bc-announcement-bar"];return t&&a.push("bc-announcement-bar--dismissible"),n&&n.length>0&&a.push(n),a.join(" ")}function Ia(t){return`--announcement-bar-bg-color: ${Y.getColorVar(t,600)}`}function Ta({color:t="primary",icon:n,closable:a=!1,onDismiss:r,class:l},...i){const s=e.prop(!0);return e.When(s,()=>{const u=e.Value.map(a,c=>!!c||r!=null);return e.html.div(e.attr.class(e.computedOf(u,l)((c,o)=>ka(c,o))),e.attr.style(e.Value.map(t,c=>Ia(c))),e.html.div(e.attr.class("bc-announcement-bar__content"),e.When(e.Value.map(n,c=>c!=null),()=>e.html.div(e.attr.class("bc-announcement-bar__icon"),h.Icon({icon:n,size:"sm",accessibility:"decorative"}))),e.html.div(e.attr.class("bc-announcement-bar__text"),...i),e.When(u,()=>e.html.div(e.attr.class("bc-announcement-bar__close"),$.CloseButton({size:"xs",color:"white",onClick:()=>{s.set(!1),r?.()}})))))})}function Oa(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\//i.test(t)}let Ce=null;function Pa(){return typeof window<"u"&&window.YT?.Player?Promise.resolve(window.YT):Ce||(Ce=new Promise(t=>{const n=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{n?.(),t(window.YT)};const a=document.createElement("script");a.src="https://www.youtube.com/iframe_api",a.async=!0,document.head.appendChild(a)}),Ce)}function Da(t){const{url:n,playing:a=!1,loop:r=!1,controls:l=!1,volume:i=1,muted:s=!1,playbackRate:u=1,pip:c=!1,playsinline:o=!0,width:p,height:f,progressInterval:C=1e3,seekTo:g,config:v,onReady:b,onStart:w,onPlay:m,onPause:d,onBuffer:y,onBufferEnd:x,onEnded:k,onError:I,onDuration:T,onSeek:S,onProgress:D,onPlaybackRateChange:N,onPlaybackQualityChange:L}=t;function M(P){return/\.m3u8(\?|$)/i.test(P)}function Z(P){try{const B=P.canPlayType("application/vnd.apple.mpegurl");return B==="probably"||B==="maybe"}catch{return!1}}const U=e.prop("file");let E=null,j=null,K=null;function de(){try{K?.destroy()}catch{}K=null}const Q=[];Q.push(e.Value.on(n,P=>{typeof P=="string"&&P.length>0&&Oa(P)?U.value="youtube":(U.value="file",E&&be())}));async function be(){const P=E;if(!P)return;const B=e.Value.get(n);if(typeof B!="string"||B.length===0)return;de();const F=v?.file?.forceHLS??!1;if(M(B)||F){if(Z(P)){P.setAttribute("src",B);try{P.load()}catch{}return}if(typeof window>"u")return;try{const z=await Promise.resolve().then(()=>require("./hls.light.min-D3hUMpII.cjs")).then(ae=>ae.hls_light_min),pe=z;let se=pe.default??pe.Hls??z;for(let ae=0;ae<3&&(typeof se=="object"&&se!=null&&"default"in se);ae++)se=se.default;if(typeof se=="function"){const ae=se;if(typeof ae.isSupported=="function"&&ae.isSupported()){P.removeAttribute("src");try{P.load()}catch{}const Te=new ae(v?.hls);K=Te,Te.attachMedia(P),Te.loadSource(B)}else{P.setAttribute("src",B);try{P.load()}catch{}}}else{P.setAttribute("src",B);try{P.load()}catch{}}}catch(z){I?.(z),P.setAttribute("src",B);try{P.load()}catch{}}return}P.setAttribute("src",B);try{P.load()}catch{}}function he(){j?.();const P=e.Value.get(C)??1e3;j=ce.x(()=>{const B=E;if(!B)return;const F=B.duration||0,z=B.currentTime||0,pe=B.buffered?.length?B.buffered.end(B.buffered.length-1):0;D?.({played:F>0?z/F:0,playedSeconds:z,loaded:F>0?Math.min(pe,F)/F:0,loadedSeconds:Math.min(pe,F)})},P)}function le(P){if(P!=null)return typeof P=="number"?`${P}px`:P}const ye=e.html.video(e.WithElement(P=>{E=P,b?.();try{E.playbackRate=e.Value.get(u)??1}catch{}E.muted=!!(e.Value.get(s)??!1),E.loop=!!(e.Value.get(r)??!1),E.controls=!!(e.Value.get(l)??!1),E.playsInline!=null&&(!!(e.Value.get(o)??!0)?E.setAttribute("playsinline",""):E.removeAttribute("playsinline")),e.Value.get(a)&&(E.play?.().catch(()=>{}),w?.());try{const B=!!(e.Value.get(c)??!1),F=document,z=E;B?typeof z.requestPictureInPicture=="function"&&F.pictureInPictureElement!==E&&z.requestPictureInPicture().catch(()=>{}):F.pictureInPictureElement===E&&typeof F.exitPictureInPicture=="function"&&F.exitPictureInPicture().catch(()=>{})}catch{}he(),be()}),e.style.width(e.Value.map(p,le)),e.style.height(e.Value.map(f,le)),e.on.play(()=>m?.()),e.on.playing(()=>{w?.(),x?.()}),e.on.pause(()=>d?.()),e.on.waiting(()=>y?.()),e.on.canplay(()=>{const P=E?.duration;P!=null&&Number.isFinite(P)&&T?.(P)}),e.on.ended(()=>k?.()),e.on.error(P=>{K||I?.(P)}));let ue=null,R=null,oe=null;function ie(){const P=e.Value.get(n);!ue||typeof P!="string"||Pa().then(B=>{const F=_t(P);if(F){if(R){R.loadVideoById({videoId:F});return}R=new B.Player(ue,{videoId:F,playerVars:_a(t),events:{onReady:()=>{b?.(),_(),e.Value.get(a)&&w?.(),Ie()},onStateChange:z=>{switch(z.data){case B.PlayerState.PLAYING:m?.(),x?.();break;case B.PlayerState.PAUSED:d?.();break;case B.PlayerState.BUFFERING:y?.();break;case B.PlayerState.ENDED:k?.();break}},onError:z=>I?.(z),onPlaybackRateChange:z=>N?.(z.data),onPlaybackQualityChange:z=>L?.(z.data)}})}})}function Ie(){oe?.();const P=e.Value.get(C)??1e3;oe=ce.x(()=>{if(!R)return;const B=R.getDuration?.()??0,F=R.getCurrentTime?.()??0,z=R.getVideoLoadedFraction?.()??0;D?.({played:B>0?F/B:0,playedSeconds:F,loaded:z,loadedSeconds:z*B})},P)}function _(){if(!R)return;try{const F=e.Value.get(u)??1;R.setPlaybackRate?.(F)}catch{}try{const F=Math.round(Math.min(Math.max(e.Value.get(i)??1,0),1)*100);R.setVolume?.(F)}catch{}try{e.Value.get(s)??!1?R.mute?.():R.unMute?.()}catch{}e.Value.get(a)??!1?R.playVideo?.():R.pauseVideo?.();const B=e.Value.get(g);typeof B=="number"&&Number.isFinite(B)&&(R.seekTo?.(B,!0),S?.(B))}const A=e.html.div(e.WithElement(P=>{ue=P,ie(),b?.()}));Q.push(e.Value.on(n,()=>{U.value==="youtube"&&ie()})),Q.push(e.Value.on(a,()=>{U.value==="file"&&E?e.Value.get(a)?E.play?.().catch(()=>{}):E.pause?.():U.value==="youtube"&&R&&(e.Value.get(a)?R.playVideo?.():R.pauseVideo?.())})),Q.push(e.Value.on(i,()=>{if(U.value==="file"&&E)E.volume=Math.min(Math.max(e.Value.get(i)??1,0),1);else if(U.value==="youtube"&&R){const P=Math.round(Math.min(Math.max(e.Value.get(i)??1,0),1)*100);R.setVolume?.(P)}})),Q.push(e.Value.on(s,()=>{U.value==="file"&&E?E.muted=!!e.Value.get(s):U.value==="youtube"&&R&&(e.Value.get(s)?R.mute?.():R.unMute?.())})),Q.push(e.Value.on(u,()=>{if(U.value==="file"&&E)try{E.playbackRate=e.Value.get(u)??1}catch{}else U.value==="youtube"&&R&&R.setPlaybackRate?.(e.Value.get(u)??1)})),Q.push(e.Value.on(c,async()=>{if(!(U.value!=="file"||!E))try{const P=!!(e.Value.get(c)??!1),B=document,F=E;P?typeof F.requestPictureInPicture=="function"&&B.pictureInPictureElement!==E&&await F.requestPictureInPicture()?.catch(()=>{}):B.pictureInPictureElement===E&&typeof B.exitPictureInPicture=="function"&&await B.exitPictureInPicture()?.catch(()=>{})}catch{}})),Q.push(e.Value.on(g??null,()=>{const P=e.Value.get(g);if(P!=null)if(U.value==="file"&&E)try{E.currentTime=P,S?.(P)}catch{}else U.value==="youtube"&&R&&(R.seekTo?.(P,!0),S?.(P))}));const G=e.html.div(e.attr.class("bc-base-video"),e.style.width(e.Value.map(p,le)),e.style.height(e.Value.map(f,le)),e.When(e.Value.map(U,P=>P==="youtube"),()=>A,()=>ye));return e.Fragment(e.OnDispose(...Q),G)}function _t(t){const n=/[?&]v=([^&#]+)/.exec(t);if(n)return n[1];const a=/youtu\.be\/([^?&#]+)/.exec(t);if(a)return a[1];const r=/youtube\.com\/embed\/([^?&#]+)/.exec(t);return r?r[1]:null}function _a(t){const n={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},a=e.Value.get(t.loop)??!1,r=e.Value.get(t.url),l=typeof r=="string"?_t(r):null;return a&&l&&(n.loop=1,n.playlist=l),n}const Ye="https://cdn.jsdelivr.net/npm/pdfjs-dist@5.4.394/",$a=t=>{if(!t||typeof t!="object")return!1;const n=t;return!!(n.getDocument&&typeof n.getDocument=="function")};function Ba(){if(typeof window>"u")return;const n=window.pdfjsLib;n?.GlobalWorkerOptions?.workerSrc||n?.GlobalWorkerOptions&&(n.GlobalWorkerOptions.workerSrc=`${Ye}build/pdf.worker.min.mjs`)}const La=t=>new Promise((n,a)=>{const r=document.createElement("script");r.type="module",r.src=t,r.onload=()=>n(),r.onerror=()=>a(new Error(`Failed to load script: ${t}`)),document.head.appendChild(r)}),Ea=async()=>{const t=window;if(t.pdfjsLib&&$a(t.pdfjsLib))return t.pdfjsLib;if(await La(`${Ye}build/pdf.min.mjs`),await new Promise(n=>setTimeout(n,100)),!t.pdfjsLib)throw new Error("PDF.js failed to initialize after loading");return t.pdfjsLib};let $e=null,et=!1;async function Aa(){if($e)return $e;!et&&typeof window<"u"&&(Ba(),et=!0);const t=await Ea();return $e=t,t.GlobalWorkerOptions&&(t.GlobalWorkerOptions.workerSrc=`${Ye}build/pdf.worker.min.mjs`),t}function Na(t,n){if(t.byteLength!==n.byteLength)return!1;const a=t.byteLength,r=new DataView(t.buffer,t.byteOffset,a),l=new DataView(n.buffer,n.byteOffset,a),i=a>>>2,s=a&3;for(let u=0;u<i;u++)if(r.getUint32(u*4)!==l.getUint32(u*4))return!1;for(let u=a-s;u<a;u++)if(t[u]!==n[u])return!1;return!0}function Fa(t,n){if(t.byteLength!==n.byteLength)return!1;const a=t.byteLength,r=a>>>2,l=new Uint32Array(t,0,r),i=new Uint32Array(n,0,r);for(let o=0;o<r;o++)if(l[o]!==i[o])return!1;const s=a&3,u=new Uint8Array(t,r*4,s),c=new Uint8Array(n,r*4,s);for(let o=0;o<s;o++)if(u[o]!==c[o])return!1;return!0}function Ma(t,n){return typeof t=="string"&&typeof n=="string"?t===n:t instanceof Uint8Array&&n instanceof Uint8Array?Na(t,n):t instanceof ArrayBuffer&&n instanceof ArrayBuffer?Fa(t,n):!1}function Ua({source:t,page:n=1,fit:a="width",scale:r=1,rotation:l=0,quality:i=2,renderTextLayer:s=!0,renderAnnotationLayer:u=!1,onPageChange:c,onLoadComplete:o},...p){const f=Aa();let C=e.Value.get(t),g=null,v=e.Value.get(n);return e.Use(h.BeatUII18n,b=>e.Fragment(e.OnDispose(()=>{g!=null&&(g.destroy(),g=null)}),q.ElementRect(w=>q.Query({request:e.computedOf(t,n,a,r,l,i,s,u,w)((m,d,y,x,k,I,T,S,D)=>({source:m,page:d,fit:y,scale:x,rotation:k,quality:I,renderTextLayer:T,renderAnnotationLayer:S,containerWidth:D.width,containerHeight:D.height})),load:async({request:m})=>{const d=await f;(g==null||!Ma(C,m.source))&&(g!=null&&(g.destroy(),g=null),C=m.source,g=await d.getDocument(m.source).promise,o?.({numPages:g.numPages}));const y=m.page<1||m.page>g.numPages?1:m.page;c!=null&&y!==v&&(v=y,c(y));const x=await g.getPage(y);let k;if(m.fit==="none")k=m.scale;else{const D=x.getViewport({scale:1,rotation:m.rotation}),N=D.width/D.height,L=m.containerWidth/m.containerHeight;switch(m.fit){case"width":k=m.containerWidth/D.width;break;case"height":k=m.containerHeight/D.height;break;case"contain":k=Math.min(m.containerWidth/D.width,m.containerHeight/D.height);break;case"cover":N>L?k=m.containerHeight/D.height:k=m.containerWidth/D.width;break}}const I=x.getViewport({scale:k,rotation:m.rotation}),T=x.getViewport({scale:k*m.quality,rotation:m.rotation});let S=null;return{pdfWidth:I.width,pdfHeight:I.height,canvasWidth:Math.floor(I.width),canvasHeight:Math.floor(I.height),highResWidth:Math.floor(T.width),highResHeight:Math.floor(T.height),render:async(D,N,L)=>{if(S)try{S.cancel(),await S.promise.catch(()=>{})}catch{}D.width=T.width,D.height=T.height,D.style.width=`${I.width}px`,D.style.height=`${I.height}px`;const M=D.getContext("2d");if(!M)throw new Error("Failed to get canvas context");const Z=x.render({canvasContext:M,canvas:D,viewport:T});S=Z;try{await Z.promise}catch(U){if((U instanceof Error?U.name:U?.name)!=="RenderingCancelledException")throw U;return}finally{S===Z&&(S=null)}if(m.renderTextLayer&&N!=null){N.innerHTML="";try{const U=await x.getTextContent(),E=d.TextLayer;E!=null&&await new E({textContentSource:U,container:N,viewport:I}).render()}catch(U){console.warn("Failed to render text layer:",U)}}if(m.renderAnnotationLayer&&L!=null){L.innerHTML="",L.style.width=`${I.width}px`,L.style.height=`${I.height}px`;try{const U=await x.getAnnotations(),E=d.AnnotationLayer;if(E!=null&&U.length>0){const j={getDestinationHash:()=>"",getAnchorUrl:de=>de,executeNamedAction:()=>{},executeSetOCGState:()=>{},cachePageRef:()=>{}};await new E({div:L,page:x,viewport:I,linkService:j,annotationStorage:null}).render({viewport:I,div:L,annotations:U,page:x,linkService:j,renderForms:!0})}}catch(U){console.warn("Failed to render annotation layer:",U)}}}}},convertError:m=>{if(m instanceof Error){const d=m.message;return d.includes("Invalid PDF")?e.Value.get(b).pdfPageViewer.invalidPdf:d.includes("page")?d:e.Value.get(b).pdfPageViewer.loadFailed}return e.Value.get(b).pdfPageViewer.loadFailed},pending:()=>e.html.div(e.attr.class("bc-pdf-page-viewer__loading"),h.Icon({icon:"line-md:loading-twotone-loop",size:"lg"}),e.html.span(e.attr.class("bc-pdf-page-viewer__loading-text"),b.map(m=>m.pdfPageViewer.loading))),failure:({error:m})=>e.html.div(e.attr.class("bc-pdf-page-viewer__error"),h.Icon({icon:"line-md:alert-circle",size:"lg",color:"danger"}),e.html.span(e.attr.class("bc-pdf-page-viewer__error-text"),m)),success:({value:m})=>e.html.div(e.attr.class(e.Value.map(a,d=>d==="none"?"bc-pdf-page-viewer":`bc-pdf-page-viewer bc-pdf-page-viewer--fit-${d}`)),e.html.div(e.attr.class("bc-pdf-page-viewer__content"),e.When(e.Value.map(a,d=>d==="none"),()=>e.attr.style(m.$.canvasWidth.map(d=>`width: ${d}px; height: ${m.value.canvasHeight}px;`)),()=>e.Fragment()),e.html.canvas(e.attr.class("bc-pdf-page-viewer__canvas"),e.attr.width(m.$.canvasWidth.map(String)),e.attr.height(m.$.canvasHeight.map(String)),...p),e.html.div(e.attr.class("bc-pdf-page-viewer__text-layer")),e.html.div(e.attr.class("bc-pdf-page-viewer__annotation-layer"))),e.WithElement(d=>{const y=d.querySelector(".bc-pdf-page-viewer__canvas"),x=d.querySelector(".bc-pdf-page-viewer__text-layer"),k=d.querySelector(".bc-pdf-page-viewer__annotation-layer");return e.Value.on(m,async I=>{await I.render(y,x,k)}),e.Empty}))}))))}Object.defineProperty(exports,"Use",{enumerable:!0,get:()=>e.Use});exports.BeatUII18n=h.BeatUII18n;exports.Button=h.Button;exports.CommonInputAttributes=h.CommonInputAttributes;exports.Icon=h.Icon;exports.InputContainer=h.InputContainer;exports.InputIcon=h.InputIcon;exports.LOGICAL_PROPERTY_MAP=h.LOGICAL_PROPERTY_MAP;exports.Locale=h.Locale;exports.TextInput=h.TextInput;exports.defaultLocale=h.defaultLocale;exports.defaultMessages=h.defaultMessages;exports.formatFileSize=h.formatFileSize;exports.generateButtonClasses=h.generateButtonClasses;exports.generateButtonStyles=h.generateButtonStyles;exports.generateInputContainerInputClasses=h.generateInputContainerInputClasses;exports.getDirectionClassName=h.getDirectionClassName;exports.getDirectionFromLocale=h.getDirectionFromLocale;exports.getIconLocally=h.getIconLocally;exports.getOppositeDirection=h.getOppositeDirection;exports.getPhysicalProperty=h.getPhysicalProperty;exports.isIndexedDBAvailable=h.isIndexedDBAvailable;exports.isRTLLocale=h.isRTLLocale;exports.makeI18nProvider=h.makeI18nProvider;exports.makeMessages=h.makeMessages;exports.resolveDirection=h.resolveDirection;exports.storeIconLocally=h.storeIconLocally;exports.backgroundConfig=Y.backgroundConfig;exports.bgColors=Y.bgColors;exports.borderColors=Y.borderColors;exports.colorShades=Y.colorShades;exports.colors=Y.colors;exports.generateColorVariables=Y.generateColorVariables;exports.generateCoreColorVariables=Y.generateCoreColorVariables;exports.generateSemanticColorVariables=Y.generateSemanticColorVariables;exports.getColorVar=Y.getColorVar;exports.getColorVarName=Y.getColorVarName;exports.interactiveColors=Y.interactiveColors;exports.normalizeColorName=Y.normalizeColorName;exports.resolveSemanticColorMap=Y.resolveSemanticColorMap;exports.semanticColorNames=Y.semanticColorNames;exports.semanticColors=Y.semanticColors;exports.textColors=Y.textColors;exports.themeColorNames=Y.themeColorNames;exports.baseSpacing=O.baseSpacing;exports.beatuiPreset=O.beatuiPreset;exports.breakpoints=O.breakpoints;exports.changeFontSize=O.changeFontSize;exports.createBeatuiPreset=O.createBeatuiPreset;exports.fontFamily=O.fontFamily;exports.fontSize=O.fontSize;exports.fontWeight=O.fontWeight;exports.generateAllTokenVariables=O.generateAllTokenVariables;exports.generateBreakpointVariables=O.generateBreakpointVariables;exports.generateCoreTokenVariables=O.generateCoreTokenVariables;exports.generateFontFamilyOverrideVariables=O.generateFontFamilyOverrideVariables;exports.generateMotionVariables=O.generateMotionVariables;exports.generateRadiusVariables=O.generateRadiusVariables;exports.generateSemanticFontVariables=O.generateSemanticFontVariables;exports.generateSemanticMotionVariables=O.generateSemanticMotionVariables;exports.generateSemanticRadiusVariables=O.generateSemanticRadiusVariables;exports.generateSemanticShadowVariables=O.generateSemanticShadowVariables;exports.generateSemanticSpacingVariables=O.generateSemanticSpacingVariables;exports.generateSemanticTextShadowVariables=O.generateSemanticTextShadowVariables;exports.generateSemanticTokenVariables=O.generateSemanticTokenVariables;exports.generateShadowVariables=O.generateShadowVariables;exports.generateSpacingVariables=O.generateSpacingVariables;exports.generateTextShadowVariables=O.generateTextShadowVariables;exports.generateTypographyVariables=O.generateTypographyVariables;exports.generateZIndexVariables=O.generateZIndexVariables;exports.getBreakpointMediaQuery=O.getBreakpointMediaQuery;exports.getBreakpointVar=O.getBreakpointVar;exports.getBreakpointVarName=O.getBreakpointVarName;exports.getFontFamilyVar=O.getFontFamilyVar;exports.getFontFamilyVarName=O.getFontFamilyVarName;exports.getFontSizeVar=O.getFontSizeVar;exports.getFontSizeVarName=O.getFontSizeVarName;exports.getFontWeightVar=O.getFontWeightVar;exports.getFontWeightVarName=O.getFontWeightVarName;exports.getLetterSpacingVar=O.getLetterSpacingVar;exports.getLetterSpacingVarName=O.getLetterSpacingVarName;exports.getLineHeightVar=O.getLineHeightVar;exports.getLineHeightVarName=O.getLineHeightVarName;exports.getMotionDurationVar=O.getMotionDurationVar;exports.getMotionDurationVarName=O.getMotionDurationVarName;exports.getMotionEasingVar=O.getMotionEasingVar;exports.getMotionEasingVarName=O.getMotionEasingVarName;exports.getRadiusMediaQuery=O.getRadiusMediaQuery;exports.getRadiusVar=O.getRadiusVar;exports.getRadiusVarName=O.getRadiusVarName;exports.getSemanticFontVar=O.getSemanticFontVar;exports.getSemanticFontVarName=O.getSemanticFontVarName;exports.getSemanticMotionVarName=O.getSemanticMotionVarName;exports.getSemanticRadiusVarName=O.getSemanticRadiusVarName;exports.getSemanticShadowVarName=O.getSemanticShadowVarName;exports.getSemanticSpacingVarName=O.getSemanticSpacingVarName;exports.getSemanticTextShadowVarName=O.getSemanticTextShadowVarName;exports.getShadowVar=O.getShadowVar;exports.getShadowVarName=O.getShadowVarName;exports.getSpacingVar=O.getSpacingVar;exports.getSpacingVarName=O.getSpacingVarName;exports.getTextShadowVar=O.getTextShadowVar;exports.getTextShadowVarName=O.getTextShadowVarName;exports.getTokenValue=O.getTokenValue;exports.getZIndexVar=O.getZIndexVar;exports.getZIndexVarName=O.getZIndexVarName;exports.letterSpacing=O.letterSpacing;exports.lineHeight=O.lineHeight;exports.motionDurations=O.motionDurations;exports.motionEasings=O.motionEasings;exports.radius=O.radius;exports.semanticFontNames=O.semanticFontNames;exports.semanticMotionNames=O.semanticMotionNames;exports.semanticRadiusNames=O.semanticRadiusNames;exports.semanticShadowNames=O.semanticShadowNames;exports.semanticSpacingNames=O.semanticSpacingNames;exports.semanticTextShadowNames=O.semanticTextShadowNames;exports.shadows=O.shadows;exports.spacing=O.spacing;exports.textShadows=O.textShadows;exports.zIndex=O.zIndex;exports.ArrayController=$.ArrayController;exports.BaseControl=$.BaseControl;exports.BaseMappedControl=$.BaseMappedControl;exports.CheckboxInput=$.CheckboxInput;exports.CloseButton=$.CloseButton;exports.Control=$.Control;exports.Controller=$.Controller;exports.DangerLabel=$.DangerLabel;exports.EmailInput=$.EmailInput;exports.EmphasisLabel=$.EmphasisLabel;exports.InputWrapper=$.InputWrapper;exports.Label=$.Label;exports.MappedControl=$.MappedControl;exports.MutedLabel=$.MutedLabel;exports.Notice=$.Notice;exports.ObjectController=$.ObjectController;exports.PasswordInput=$.PasswordInput;exports.RequiredSymbol=$.RequiredSymbol;exports.Stack=$.Stack;exports.connectCommonAttributes=$.connectCommonAttributes;exports.connectNumberInput=$.connectNumberInput;exports.connectStringInput=$.connectStringInput;exports.convertStandardSchemaIssues=$.convertStandardSchemaIssues;exports.convertStandardSchemaPathToPath=$.convertStandardSchemaPathToPath;exports.makeMapValidation=$.makeMapValidation;exports.makeOnBlurHandler=$.makeOnBlurHandler;exports.makeOnChangeHandler=$.makeOnChangeHandler;exports.parsePath=$.parsePath;exports.pathToString=$.pathToString;exports.sessionId=$.sessionId;exports.standardSchemaResultToValidation=$.standardSchemaResultToValidation;exports.taskToValidation=$.taskToValidation;exports.useController=$.useController;exports.useForm=$.useForm;exports.wrapSegment=$.wrapSegment;exports.AnimatedToggle=H.AnimatedToggle;exports.AnimatedToggleClass=H.AnimatedToggleClass;exports.BooleanValidator=H.BooleanValidator;exports.ConfirmModal=H.ConfirmModal;exports.FocusTrap=H.FocusTrap;exports.Modal=H.Modal;exports.ObjectValidator=H.ObjectValidator;exports.Overlay=H.Overlay;exports.StringValidator=H.StringValidator;exports.boolean=H.boolean;exports.createStandardSchema=H.createStandardSchema;exports.object=H.object;exports.string=H.string;exports.useAnimatedElementToggle=H.useAnimatedElementToggle;exports.useAnimatedToggle=H.useAnimatedToggle;exports.useFocusTrap=H.useFocusTrap;exports.useTimedToggle=H.useTimedToggle;exports.Theme=me.Theme;exports.ThemeAppearance=me.ThemeAppearance;exports.Base64Input=V.Base64Input;exports.Base64sInput=V.Base64sInput;exports.BaseListControl=V.BaseListControl;exports.BaseNativeSelectControl=V.BaseNativeSelectControl;exports.Card=V.Card;exports.ColorSwatchInput=V.ColorSwatchInput;exports.EditableText=V.EditableText;exports.Expando=V.Expando;exports.FilesInput=V.FilesInput;exports.Group=V.Group;exports.ListControl=V.ListControl;exports.ListInput=V.ListInput;exports.MaskInput=V.MaskInput;exports.NativeSelect=V.NativeSelect;exports.NativeSelectControl=V.NativeSelectControl;exports.NullableDateInput=V.NullableDateInput;exports.NullableDateTimeInput=V.NullableDateTimeInput;exports.NullableDurationInput=V.NullableDurationInput;exports.NullableEmailInput=V.NullableEmailInput;exports.NullableNumberInput=V.NullableNumberInput;exports.NullablePasswordInput=V.NullablePasswordInput;exports.NullableRatingInput=V.NullableRatingInput;exports.NullableSliderInput=V.NullableSliderInput;exports.NullableTextArea=V.NullableTextArea;exports.NullableTextInput=V.NullableTextInput;exports.NullableUUIDInput=V.NullableUUIDInput;exports.NullableUrlInput=V.NullableUrlInput;exports.NumberInput=V.NumberInput;exports.RatingInput=V.RatingInput;exports.SegmentedInput=V.SegmentedInput;exports.SliderInput=V.SliderInput;exports.Switch=V.Switch;exports.TextArea=V.TextArea;exports.UUIDInput=V.UUIDInput;exports.UnionController=V.UnionController;exports.UnstyledDropZone=V.UnstyledDropZone;exports.UrlInput=V.UrlInput;exports.WithTemporal=V.WithTemporal;exports.emitExpando=V.emitExpando;exports.emitOptionExpando=V.emitOptionExpando;exports.emptyToNull=V.emptyToNull;exports.ensureTemporal=V.ensureTemporal;exports.fileToBase64=V.fileToBase64;exports.formatColor=V.formatColor;exports.getContrastRatio=V.getContrastRatio;exports.hexToRgb=V.hexToRgb;exports.hslToRgb=V.hslToRgb;exports.hwbToRgb=V.hwbToRgb;exports.isValidColor=V.isValidColor;exports.isValidHexColor=V.isValidHexColor;exports.isValidHslColor=V.isValidHslColor;exports.isValidRgbColor=V.isValidRgbColor;exports.isValidRgbaColor=V.isValidRgbaColor;exports.linearToSrgb=V.linearToSrgb;exports.mulberry32=V.mulberry32;exports.normalizeHexColor=V.normalizeHexColor;exports.nullToEmpty=V.nullToEmpty;exports.oklchToRgb=V.oklchToRgb;exports.parseAnyColor=V.parseAnyColor;exports.resolveEffectiveFormat=V.resolveEffectiveFormat;exports.rgbToHex=V.rgbToHex;exports.rgbToHsl=V.rgbToHsl;exports.rgbToHwb=V.rgbToHwb;exports.rgbToOklch=V.rgbToOklch;exports.srgbToLinear=V.srgbToLinear;exports.toRgbaString=V.toRgbaString;exports.transformEmptyStringToUndefined=V.transformEmptyStringToUndefined;exports.transformNullToUndefined=V.transformNullToUndefined;exports.transformUndefinedToNull=V.transformUndefinedToNull;exports.LinkPortal=$t.LinkPortal;exports.Toolbar=fe.Toolbar;exports.ToolbarButton=fe.ToolbarButton;exports.ToolbarDivider=fe.ToolbarDivider;exports.ToolbarGroup=fe.ToolbarGroup;exports.ToolbarSpacer=fe.ToolbarSpacer;exports.ActionCard=qt;exports.AnnouncementBar=Ta;exports.AppShell=on;exports.AppearanceSelector=at;exports.Badge=At;exports.BaseComboboxControl=pt;exports.BaseComboboxTagsControl=Cn;exports.BaseDropdownControl=ut;exports.BaseSelectTagsControl=vn;exports.BaseVideoPlayer=Da;exports.BeatUI=na;exports.BigintInput=Pn;exports.ButtonLink=da;exports.Center=cn;exports.CenterH=sn;exports.Chips=We;exports.Collapse=ot;exports.CollapsibleSidebarGroup=ma;exports.ColorController=yt;exports.ColorInput=zt;exports.ComboboxControl=bn;exports.ComboboxInput=dt;exports.ComboboxTagsControl=Vn;exports.ComboboxTagsInput=je;exports.DateInput=Sn;exports.DateTimeInput=kn;exports.Drawer=va;exports.DropdownBase=Me;exports.DropdownControl=gn;exports.DropdownInput=st;exports.DurationInput=Zn;exports.EnsureControl=qn;exports.FileInput=In;exports.Flyout=ge;exports.FormStatus=Jn;exports.InstantInput=Mn;exports.LazyNativeSelect=Tn;exports.Lightbox=xa;exports.Link=xt;exports.LocaleSelector=Xn;exports.Menu=Ue;exports.MenuItem=hn;exports.MenuSeparator=Re;exports.NativePdfPreview=aa;exports.NavigationLink=ca;exports.NineSliceScrollView=pn;exports.Notification=Ct;exports.NotificationProvider=ze;exports.NotificationService=Vt;exports.NotificationViewport=St;exports.NullableBigintInput=Dn;exports.NullableInstantInput=Rn;exports.NullableMaskInput=On;exports.NullablePlainDateInput=Bn;exports.NullablePlainDateTimeInput=Nn;exports.NullablePlainMonthDayInput=Yn;exports.NullablePlainTimeInput=En;exports.NullablePlainYearMonthInput=zn;exports.NullableZonedDateTimeInput=Hn;exports.OpenGraph=ia;exports.Option=ne;exports.PDFJSPreview=ra;exports.PageDropZone=Nt;exports.PdfPageViewer=Ua;exports.PlainDateInput=$n;exports.PlainDateTimeInput=An;exports.PlainMonthDayInput=Gn;exports.PlainTimeInput=Ln;exports.PlainYearMonthInput=jn;exports.Ribbon=Sa;exports.ScrollablePanel=Be;exports.SelectTagsControl=wn;exports.SelectTagsInput=He;exports.Sidebar=pa;exports.SidebarActiveLink=Ot;exports.SidebarClickLink=Pt;exports.SidebarContext=It;exports.SidebarGroup=Ae;exports.SidebarLink=Dt;exports.SidebarSeparator=fa;exports.SidebarUrlLink=Tt;exports.Sink=fn;exports.StandaloneAppearanceSelector=Ht;exports.StylePortal=la;exports.Table=Ut;exports.Tabs=ya;exports.Tag=Ne;exports.TagsInput=_n;exports.Tooltip=Ca;exports.WithBeatUIBreakpoint=lt;exports.WithBeatUIElementBreakpoint=en;exports.WithBreakpoint=Fe;exports.ZonedDateTimeInput=Wn;exports.colorInputOptionsFromController=Qn;exports.compareBreakpoint=rt;exports.createColorController=Kn;exports.createLocationMatcher=ke;exports.delaySignal=Bt;exports.findBreakpoint=Qt;exports.generateBadgeClasses=tt;exports.generateBadgeStyles=nt;exports.generateLinkClasses=Le;exports.generateLinkStyles=Ee;exports.generateNotificationClasses=vt;exports.generateNotificationStyles=wt;exports.increaseSize=Et;exports.isUrlMatch=kt;