@thebase/ui 0.0.9 → 0.0.10

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/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [v0.0.10] - 2026-09-02
6
+
7
+ ### Fixed
8
+ - `TextEditor`/`b-ui="text-editor"`: found the actual root cause of the `MilkdownError: Context "editorState" not found, do you forget to inject it?` crash in collaborative mode (`collaborative="true"`), which the v0.0.9 fix below reduced the odds of but did not eliminate. `@milkdown/plugin-collab`'s own teardown only removes its Milkdown ctx slice — it never calls `CollabService.disconnect()` — so the y-prosemirror sync/cursor/undo plugins `.connect()` installs into the ProseMirror view were never uninstalled when a collaborative `TextEditor` was destroyed. Left connected, they kept reacting to further Yjs doc updates (from any peer sharing the doc/room) and kept dispatching transactions into the already-destroyed view, throwing `Context "..." not found` for whichever internal ctx slice the stale plugin happened to touch (`editorState`, `placeholderConfigCtx`, etc). Fixed by capturing the bound `CollabService` and explicitly calling `.disconnect()` on it before `crepe.destroy()` runs. Added a real (unmocked) regression test — `test/milkdown-collab-teardown.test.js` — exercising the actual Milkdown/Yjs teardown sequence with two synced docs standing in for two peers; it reproduces the exact reported crash when run against the pre-fix code.
9
+
5
10
  ## [v0.0.9] - 2026-09-02
6
11
 
7
12
  ### Fixed
@@ -12,7 +12,7 @@ var mi=Object.defineProperty;var Ep=(t,e,s)=>e in t?mi(t,e,{enumerable:!0,config
12
12
  `),i=r.filter(p=>p.trim()).map(p=>p.match(/^\s*/)?.[0].length||0),a=i.length?Math.min(...i):0;return r.map(p=>p.slice(a)).join(`
13
13
  `)}function ep(t,e=0){let s=" ".repeat(e),r=[];for(let i of t.childNodes){if(i.nodeType===Node.TEXT_NODE){let l=i.textContent.trim();l&&r.push(`${s}${l}`);continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let a=[...i.attributes].map(l=>` ${l.name}="${l.value}"`).join("");if(![...i.childNodes].some(l=>l.nodeType===Node.ELEMENT_NODE||l.nodeType===Node.TEXT_NODE&&l.textContent.trim())){r.push(`${s}<${i.localName}${a}>${i.textContent.trim()}</${i.localName}>`);continue}r.push(`${s}<${i.localName}${a}>`),r.push(...ep(i,e+1)),r.push(`${s}</${i.localName}>`)}return r}async function sp(t){if(!t?.trim())return"";let{expandSelfClosingTags:e,extractTagCaseMap:s,normalizeOwlPreviewMarkup:r}=await Promise.resolve().then(()=>(va(),Gn)),i=document.createElement("div");return i.innerHTML=e(t),r(i,s(t)),ep(i).join(`
14
14
  `)}function op(t){t.querySelectorAll('[b-block="dashboard-01"], [b-block^="sidebar-"]').forEach(e=>{let s=e.querySelector("[b-block-sidebar-toggle], button[aria-label='Toggle sidebar']"),r=e.querySelector("[b-block-sidebar]");!s||!r||(e.setAttribute("b-att-sidebar",e.getAttribute("b-att-sidebar")||"open"),s.setAttribute("b-block-sidebar-toggle",""),s.setAttribute("aria-expanded",e.getAttribute("b-att-sidebar")==="open"?"true":"false"),s.addEventListener("click",()=>{let i=e.getAttribute("b-att-sidebar")!=="open";e.setAttribute("b-att-sidebar",i?"open":"collapsed"),s.setAttribute("aria-expanded",i?"true":"false")}))}),t.querySelectorAll('[b-block^="sidebar-"] [b-block-subnav]').forEach(e=>{let s=e.previousElementSibling;s&&(s.setAttribute("b-block-subnav-toggle",""),s.setAttribute("aria-expanded","true"),e.setAttribute("b-att-state","open"),s.addEventListener("click",r=>{r.preventDefault();let i=e.getAttribute("b-att-state")!=="open";e.setAttribute("b-att-state",i?"open":"collapsed"),s.setAttribute("aria-expanded",i?"true":"false")}))})}var rp=b(()=>{});var ap={};La(ap,{Accordion:()=>Hs,AccordionContent:()=>Ks,AccordionItem:()=>Ws,AccordionTrigger:()=>Tt,Alert:()=>ye,AlertAction:()=>xe,AlertDescription:()=>Se,AlertDialog:()=>ts,AlertDialogAction:()=>ls,AlertDialogCancel:()=>ps,AlertDialogContent:()=>ss,AlertDialogDescription:()=>ns,AlertDialogFooter:()=>rs,AlertDialogHeader:()=>os,AlertDialogMedia:()=>as,AlertDialogTitle:()=>is,AlertDialogTrigger:()=>es,AlertTitle:()=>ve,AspectRatio:()=>sr,Attachment:()=>Mo,AttachmentAction:()=>Ho,AttachmentActions:()=>_o,AttachmentContent:()=>Po,AttachmentDescription:()=>Fo,AttachmentDropzone:()=>Vo,AttachmentGroup:()=>Ko,AttachmentMedia:()=>zo,AttachmentTitle:()=>Do,AttachmentTrigger:()=>Wo,Avatar:()=>Zo,Badge:()=>pt,BaseUIComponents:()=>Fr,BlockViewer:()=>Gt,Breadcrumb:()=>Gs,BreadcrumbEllipsis:()=>qt,BreadcrumbItem:()=>Js,BreadcrumbLink:()=>Qs,BreadcrumbList:()=>Ys,BreadcrumbPage:()=>to,BreadcrumbSeparator:()=>Ut,Bubble:()=>or,Button:()=>K,ButtonGroup:()=>ir,ButtonGroupSeparator:()=>nr,ButtonGroupText:()=>pr,Calendar:()=>No,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>ae,CardFooter:()=>oe,CardHeader:()=>se,CardTitle:()=>re,Carousel:()=>Io,CarouselNext:()=>To,CarouselPrevious:()=>$o,CarouselSlide:()=>Ro,Chart:()=>Bo,Checkbox:()=>Te,ClipboardButton:()=>jt,Collapsible:()=>Vs,CollapsibleContent:()=>Xs,CollapsibleTrigger:()=>Zs,Combobox:()=>Oo,Command:()=>jo,ContextMenu:()=>Ps,ContextMenuContent:()=>Fs,ContextMenuItem:()=>_s,ContextMenuTrigger:()=>Ds,DataTable:()=>Kt,DatePicker:()=>ko,Dialog:()=>ue,DialogClose:()=>fe,DialogContent:()=>It,DialogDescription:()=>ge,DialogFooter:()=>he,DialogHeader:()=>be,DialogTitle:()=>me,DialogTrigger:()=>de,Direction:()=>rr,Drawer:()=>cs,DrawerClose:()=>fs,DrawerContent:()=>ds,DrawerDescription:()=>gs,DrawerFooter:()=>hs,DrawerHeader:()=>bs,DrawerTitle:()=>ms,DrawerTrigger:()=>us,DropdownMenu:()=>bt,DropdownMenuCheckboxItem:()=>Rt,DropdownMenuContent:()=>mt,DropdownMenuGroup:()=>Ts,DropdownMenuItem:()=>gt,DropdownMenuLabel:()=>Us,DropdownMenuRadioGroup:()=>qs,DropdownMenuRadioItem:()=>$t,DropdownMenuSeparator:()=>Ms,DropdownMenuShortcut:()=>zs,DropdownMenuSub:()=>ft,DropdownMenuSubContent:()=>yt,DropdownMenuSubTrigger:()=>ot,DropdownMenuTrigger:()=>ht,Empty:()=>we,EmptyContent:()=>Ne,EmptyDescription:()=>Le,EmptyHeader:()=>Ae,EmptyMedia:()=>Ee,EmptyTitle:()=>Ce,Field:()=>Ct,FieldContent:()=>ur,FieldDescription:()=>Nt,FieldError:()=>kt,FieldGroup:()=>Et,FieldLabel:()=>Lt,FieldLegend:()=>cr,FieldSeparator:()=>br,FieldSet:()=>lr,FieldTitle:()=>dr,Form:()=>Yt,HoverCard:()=>Bs,HoverCardContent:()=>Rs,HoverCardTrigger:()=>Is,Icon:()=>k,Input:()=>ie,InputGroup:()=>_e,InputGroupAddon:()=>He,InputGroupButton:()=>We,InputGroupInput:()=>Ve,InputGroupText:()=>Ke,InputGroupTextarea:()=>Ze,InputOtp:()=>Xe,Item:()=>ar,Kbd:()=>Be,Label:()=>hr,Markdown:()=>Zt,MarkdownTree:()=>Xt,MarkdownTreeNode:()=>Dr,Marker:()=>Ie,Menubar:()=>ao,Message:()=>Xo,MessageScroller:()=>Go,NativeSelect:()=>$e,NavigationMenu:()=>oo,NavigationMenuItem:()=>ro,Pagination:()=>eo,PaginationItem:()=>so,Popover:()=>ks,PopoverContent:()=>js,PopoverTrigger:()=>Os,Progress:()=>er,Pwa:()=>yr,PwaBody:()=>Er,PwaClose:()=>Nr,PwaContent:()=>Sr,PwaDescription:()=>Ar,PwaFooter:()=>Lr,PwaHeader:()=>xr,PwaSteps:()=>Cr,PwaTitle:()=>wr,PwaTrigger:()=>vr,Questionnaire:()=>Yo,QuestionnaireNext:()=>tr,QuestionnairePrevious:()=>Qo,QuestionnaireStep:()=>Jo,RadioGroup:()=>Ue,RadioGroupItem:()=>qe,Resizable:()=>Uo,ScrollArea:()=>qo,Select:()=>Ge,SelectContent:()=>Je,SelectItem:()=>Qe,SelectTrigger:()=>Ye,Separator:()=>ke,Sheet:()=>vs,SheetClose:()=>Ls,SheetContent:()=>xs,SheetDescription:()=>Cs,SheetFooter:()=>As,SheetHeader:()=>ws,SheetTitle:()=>Es,SheetTrigger:()=>Ss,Shell:()=>_t,ShellContent:()=>Wt,ShellHeader:()=>wo,ShellMain:()=>xo,ShellNav:()=>So,ShellSidebar:()=>Ht,ShellSidebarHeader:()=>vo,ShellUserMenu:()=>Ao,Sidebar:()=>at,SidebarClose:()=>zt,SidebarContent:()=>St,SidebarFooter:()=>no,SidebarGroup:()=>xt,SidebarGroupAction:()=>Pt,SidebarGroupCollapsible:()=>Dt,SidebarGroupContent:()=>bo,SidebarGroupLabel:()=>wt,SidebarHeader:()=>io,SidebarInput:()=>co,SidebarInset:()=>po,SidebarMenu:()=>it,SidebarMenuAction:()=>Ft,SidebarMenuBadge:()=>mo,SidebarMenuButton:()=>rt,SidebarMenuItem:()=>At,SidebarMenuSkeleton:()=>go,SidebarMenuSub:()=>ho,SidebarMenuSubButton:()=>yo,SidebarMenuSubItem:()=>fo,SidebarProvider:()=>Ur,SidebarRail:()=>lo,SidebarSeparator:()=>uo,SidebarTrigger:()=>Mt,Skeleton:()=>ut,Slider:()=>ze,Spinner:()=>Oe,Switch:()=>Me,TabContent:()=>Bt,TabTrigger:()=>ce,Table:()=>Eo,Tabs:()=>ne,TabsContainer:()=>pe,TabsList:()=>le,TextEditor:()=>kr,Textarea:()=>Re,ThemeButton:()=>nt,Toast:()=>vt,Toggle:()=>mr,ToggleGroup:()=>gr,ToggleGroupItem:()=>fr,Tooltip:()=>$s,Typography:()=>je,createNamedIcon:()=>Ra,findMarkdownTreeNode:()=>xa,iconComponentName:()=>Qa});var ip=b(()=>{m();Jr();Jr();sa(Fr)});function bc(){return document.querySelector("[b-block-code-template]")}function hc(t){return t.match(/<templates[^>]*>([\s\S]*)<\/templates>/)?.[1]||t}function mc(t){for(let e of t.querySelectorAll?.("[b-block] [b-icon], [b-block] [b-ui='icon']")||[])!e.hasAttribute("b-icon-base-url")&&!e.hasAttribute("b-att-base-url")&&e.setAttribute("b-icon-base-url",dc)}var wa,cc,uc,dc,Gt,np=b(()=>{m();Zr();jr();Y();si();rp();wa=Vt({storageKey:"baseui-example-theme",toggleSelector:"",labelSelector:""}),cc=[{key:"docs",label:"Docs",href:"/docs"},{key:"icons",label:"Icons",href:"/docs/icons"},{key:"examples",label:"Examples",href:"/examples/index.html"},{key:"blocks",label:"Blocks",href:"/blocks"}],uc={desktop:"",tablet:"768px",mobile:"390px"},dc="/dist/icons/lucide";Gt=class extends n{setup(){this.navItems=this.props.navItems||cc,this.previewFrame=S("previewFrame"),this.embedRoot=S("embedRoot"),this.code=tp(),this.state=g({mode:"preview",viewport:"desktop",copyLabel:"Copy code",embed:new URLSearchParams(globalThis.location.search).get("embed")==="1",codeVariant:"owl",staticTemplate:"",staticTemplateStatus:"idle"}),O(()=>this.mountPreview()),F(()=>this.mountStaticBaseUI())}get activeCode(){return this.state.codeVariant==="template"?this.state.staticTemplateStatus==="ready"?this.state.staticTemplate:"Converting to a static template...":this.code}async setCodeVariant(e){if(this.state.codeVariant=e,e==="template"&&this.state.staticTemplateStatus==="idle"){this.state.staticTemplateStatus="loading";let s=await sp(this.code);this.state.staticTemplate=s,this.state.staticTemplateStatus="ready"}}get title(){return document.body.dataset.blockTitle||document.title||"Block"}get description(){return document.body.dataset.blockDescription||"Preview and copy this BaseUI block."}get previewStyle(){let e=uc[this.state.viewport]||"";return e?`max-width:${e}`:""}setMode(e){this.state.mode=e}setViewport(e){this.state.viewport=e}async copyCode(){await globalThis.navigator?.clipboard?.writeText(this.activeCode),this.state.copyLabel="Copied"}mountPreview(){this.state.embed&&(document.body.className="m-0");let e=this.state.embed?this.embedRoot.el:this.previewFrame.el,s=bc();if(!(!e||!s)){if(s.tagName==="SCRIPT"){this.mountOwlPreview(e,s);return}e.replaceChildren(s.content.cloneNode(!0)),this.mountStaticBaseUI(e),op(e)}}async mountOwlPreview(e,s){e.replaceChildren();let r=await Promise.resolve().then(()=>(ip(),ap));class i extends n{setup(){this.state=g({collapsed:!1})}}o(i,"components",r),o(i,"template","examples.SidebarBlock");let a=[await Hr("/dist/baseui.templates.xml"),s.textContent].map(hc).join(`
15
- `);await oa(i,e,{templates:`<templates>${a}</templates>`}),wa.set(wa.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){mc(e),globalThis.BaseUI?.mountAll(e),wa.set(wa.current(),{skipStorage:!0})}};o(Gt,"template","baseui.BlockViewer"),o(Gt,"components",{Button:K,Icon:k,ThemeButton:nt}),o(Gt,"props",{navItems:{type:Array,optional:!0}})});var Ot,yr,vr,Sr,xr,wr,Ar,Er,Cr,Lr,Nr,pp=b(()=>{m();Vr();U();Ot={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},yr=class extends n{setup(){this.pwaState=g({open:$(this.props)}),A({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.pwaState.open=$(e))})}setOpen(e){T(this.props)||(this.pwaState.open=e),this.props.onOpenChange?.(e)}};o(yr,"template","baseui.Pwa"),o(yr,"props",{open:{type:Boolean,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});vr=class extends n{onClick(){this.env.setPwaOpen(!0)}};o(vr,"template","baseui.PwaTrigger"),o(vr,"props",Ot);Sr=class extends n{setup(){this.rootRef=S("root"),G(e=>{if(!e)return;let s=document.activeElement;return Tr(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(e){e.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(e){e.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};o(Sr,"template","baseui.PwaContent"),o(Sr,"props",Ot);xr=class extends n{};o(xr,"template","baseui.PwaHeader"),o(xr,"props",Ot);wr=class extends n{};o(wr,"template","baseui.PwaTitle"),o(wr,"props",Ot);Ar=class extends n{};o(Ar,"template","baseui.PwaDescription"),o(Ar,"props",Ot);Er=class extends n{};o(Er,"template","baseui.PwaBody"),o(Er,"props",Ot);Cr=class extends n{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};o(Cr,"template","baseui.PwaSteps"),o(Cr,"props",{...Ot,steps:{type:Array,optional:!0}});Lr=class extends n{};o(Lr,"template","baseui.PwaFooter"),o(Lr,"props",Ot);Nr=class extends n{onClick(){this.env.setPwaOpen(!1)}};o(Nr,"template","baseui.PwaClose"),o(Nr,"props",Ot)});function up(t,e){return typeof t=="string"?t:e}function gc(t){return{title:t.submitted&&t.title.trim().length>0&&t.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:t.submitted&&t.description.length>0&&t.description.length<20?"Description must be at least 20 characters.":""}}var lp,cp,Yt,dp=b(()=>{m();jr();U();Ja();lp="",cp="";Yt=class extends n{setup(){this.state=g({title:up(this.props.title,lp),description:up(this.props.description,cp),submitted:!1})}get classNames(){return W("baseui-form",this.props.className)}get titlePlaceholder(){return this.props.titlePlaceholder||"Login button not working on mobile"}get descriptionPlaceholder(){return this.props.descriptionPlaceholder||"I'm having an issue with the login button on mobile."}get maxDescriptionLength(){return this.props.maxDescriptionLength||100}get descriptionLength(){return this.state.description.length}get errors(){return gc(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=lp,this.state.description=cp,this.state.submitted=!1}submit(e){e.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};o(Yt,"template","baseui.Form"),o(Yt,"components",{Button:K,Field:Ct,FieldDescription:Nt,FieldError:kt,FieldGroup:Et,FieldLabel:Lt}),o(Yt,"props",{title:{type:String,optional:!0},description:{type:String,optional:!0},titlePlaceholder:{type:String,optional:!0},descriptionPlaceholder:{type:String,optional:!0},maxDescriptionLength:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onSubmit:{type:Function,optional:!0}})});function fc(){return ci??(ci=import("./runtime/milkdown/milkdown-text-editor.js")),ci}async function Aa(t){return(await fc()).createMilkdownTextEditor(t)}function Ea({collaborative:t,providerType:e,url:s}={}){return!!t||!!(e&&s)}var ci,ui=b(()=>{});var kr,bp=b(()=>{m();ui();kr=class extends n{setup(){this.editorRef=S("editor"),this.editorHandle=null,this.mountPromise=null,this.mountToken=0,this.isDestroyed=!1,this.state=g({content:"",status:"loading",error:""}),Qt(()=>this.load(this.props)),R(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),O(()=>this.mountEditor()),F(()=>this.mountEditor()),Wr(()=>{this.isDestroyed=!0,this.destroyEditor()})}get classNames(){let e=["baseui-text-editor"];return this.props.className&&e.push(this.props.className),e.join(" ")}get isCollaborative(){return Ea({collaborative:this.props.collaborative,providerType:this.props.provider,url:this.props.url})}get editorLabel(){return this.isCollaborative?"Collaborative rich text editor":"Rich text editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.collaborative!==this.props.collaborative||e.provider!==this.props.provider||e.room!==this.props.room||e.url!==this.props.url||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);s=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}this.state.content=s,this.state.status="ready"}async mountEditor(){let e=this.editorRef.el;if(this.isDestroyed||!e||this.editorHandle||this.mountPromise||this.state.status!=="ready")return;let s=++this.mountToken;return this.mountPromise=(async()=>{try{let r=await Aa({root:e,value:this.state.content,placeholder:this.props.placeholder,collaborative:this.isCollaborative,providerType:this.props.provider,room:this.props.room||"baseui-text-editor",url:this.props.url,password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(i,a,p)=>{this.state.content=i,this.props.onChange?.(i,a,p)}});if(s!==this.mountToken){r.destroy?.();return}this.editorHandle=r}catch(r){s===this.mountToken&&(this.state.status="error",this.state.error=r.message||String(r))}finally{this.mountPromise=null,this.isDestroyed||this.mountEditor()}})(),this.mountPromise}destroyEditor(){this.mountToken++,this.editorHandle?.destroy?.(),this.editorHandle=null}};o(kr,"template","baseui.TextEditor"),o(kr,"props",{content:{type:String,optional:!0},src:{type:String,optional:!0},placeholder:{type:String,optional:!0},collaborative:{type:Boolean,optional:!0},provider:{type:String,optional:!0},room:{type:String,optional:!0},url:{type:String,optional:!0},password:{type:String,optional:!0},signaling:{type:Array,optional:!0},user:{type:Object,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var Fr={};La(Fr,{Accordion:()=>Hs,AccordionContent:()=>Ks,AccordionItem:()=>Ws,AccordionTrigger:()=>Tt,Alert:()=>ye,AlertAction:()=>xe,AlertDescription:()=>Se,AlertDialog:()=>ts,AlertDialogAction:()=>ls,AlertDialogCancel:()=>ps,AlertDialogContent:()=>ss,AlertDialogDescription:()=>ns,AlertDialogFooter:()=>rs,AlertDialogHeader:()=>os,AlertDialogMedia:()=>as,AlertDialogTitle:()=>is,AlertDialogTrigger:()=>es,AlertTitle:()=>ve,AspectRatio:()=>sr,Attachment:()=>Mo,AttachmentAction:()=>Ho,AttachmentActions:()=>_o,AttachmentContent:()=>Po,AttachmentDescription:()=>Fo,AttachmentDropzone:()=>Vo,AttachmentGroup:()=>Ko,AttachmentMedia:()=>zo,AttachmentTitle:()=>Do,AttachmentTrigger:()=>Wo,Avatar:()=>Zo,Badge:()=>pt,BlockViewer:()=>Gt,Breadcrumb:()=>Gs,BreadcrumbEllipsis:()=>qt,BreadcrumbItem:()=>Js,BreadcrumbLink:()=>Qs,BreadcrumbList:()=>Ys,BreadcrumbPage:()=>to,BreadcrumbSeparator:()=>Ut,Bubble:()=>or,Button:()=>K,ButtonGroup:()=>ir,ButtonGroupSeparator:()=>nr,ButtonGroupText:()=>pr,Calendar:()=>No,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>ae,CardFooter:()=>oe,CardHeader:()=>se,CardTitle:()=>re,Carousel:()=>Io,CarouselNext:()=>To,CarouselPrevious:()=>$o,CarouselSlide:()=>Ro,Chart:()=>Bo,Checkbox:()=>Te,ClipboardButton:()=>jt,Collapsible:()=>Vs,CollapsibleContent:()=>Xs,CollapsibleTrigger:()=>Zs,Combobox:()=>Oo,Command:()=>jo,ContextMenu:()=>Ps,ContextMenuContent:()=>Fs,ContextMenuItem:()=>_s,ContextMenuTrigger:()=>Ds,DataTable:()=>Kt,DatePicker:()=>ko,Dialog:()=>ue,DialogClose:()=>fe,DialogContent:()=>It,DialogDescription:()=>ge,DialogFooter:()=>he,DialogHeader:()=>be,DialogTitle:()=>me,DialogTrigger:()=>de,Direction:()=>rr,Drawer:()=>cs,DrawerClose:()=>fs,DrawerContent:()=>ds,DrawerDescription:()=>gs,DrawerFooter:()=>hs,DrawerHeader:()=>bs,DrawerTitle:()=>ms,DrawerTrigger:()=>us,DropdownMenu:()=>bt,DropdownMenuCheckboxItem:()=>Rt,DropdownMenuContent:()=>mt,DropdownMenuGroup:()=>Ts,DropdownMenuItem:()=>gt,DropdownMenuLabel:()=>Us,DropdownMenuRadioGroup:()=>qs,DropdownMenuRadioItem:()=>$t,DropdownMenuSeparator:()=>Ms,DropdownMenuShortcut:()=>zs,DropdownMenuSub:()=>ft,DropdownMenuSubContent:()=>yt,DropdownMenuSubTrigger:()=>ot,DropdownMenuTrigger:()=>ht,Empty:()=>we,EmptyContent:()=>Ne,EmptyDescription:()=>Le,EmptyHeader:()=>Ae,EmptyMedia:()=>Ee,EmptyTitle:()=>Ce,Field:()=>Ct,FieldContent:()=>ur,FieldDescription:()=>Nt,FieldError:()=>kt,FieldGroup:()=>Et,FieldLabel:()=>Lt,FieldLegend:()=>cr,FieldSeparator:()=>br,FieldSet:()=>lr,FieldTitle:()=>dr,Form:()=>Yt,HoverCard:()=>Bs,HoverCardContent:()=>Rs,HoverCardTrigger:()=>Is,Icon:()=>k,Input:()=>ie,InputGroup:()=>_e,InputGroupAddon:()=>He,InputGroupButton:()=>We,InputGroupInput:()=>Ve,InputGroupText:()=>Ke,InputGroupTextarea:()=>Ze,InputOtp:()=>Xe,Item:()=>ar,Kbd:()=>Be,Label:()=>hr,Markdown:()=>Zt,MarkdownTree:()=>Xt,MarkdownTreeNode:()=>Dr,Marker:()=>Ie,Menubar:()=>ao,Message:()=>Xo,MessageScroller:()=>Go,NativeSelect:()=>$e,NavigationMenu:()=>oo,NavigationMenuItem:()=>ro,Pagination:()=>eo,PaginationItem:()=>so,Popover:()=>ks,PopoverContent:()=>js,PopoverTrigger:()=>Os,Progress:()=>er,Pwa:()=>yr,PwaBody:()=>Er,PwaClose:()=>Nr,PwaContent:()=>Sr,PwaDescription:()=>Ar,PwaFooter:()=>Lr,PwaHeader:()=>xr,PwaSteps:()=>Cr,PwaTitle:()=>wr,PwaTrigger:()=>vr,Questionnaire:()=>Yo,QuestionnaireNext:()=>tr,QuestionnairePrevious:()=>Qo,QuestionnaireStep:()=>Jo,RadioGroup:()=>Ue,RadioGroupItem:()=>qe,Resizable:()=>Uo,ScrollArea:()=>qo,Select:()=>Ge,SelectContent:()=>Je,SelectItem:()=>Qe,SelectTrigger:()=>Ye,Separator:()=>ke,Sheet:()=>vs,SheetClose:()=>Ls,SheetContent:()=>xs,SheetDescription:()=>Cs,SheetFooter:()=>As,SheetHeader:()=>ws,SheetTitle:()=>Es,SheetTrigger:()=>Ss,Shell:()=>_t,ShellContent:()=>Wt,ShellHeader:()=>wo,ShellMain:()=>xo,ShellNav:()=>So,ShellSidebar:()=>Ht,ShellSidebarHeader:()=>vo,ShellUserMenu:()=>Ao,Sidebar:()=>at,SidebarClose:()=>zt,SidebarContent:()=>St,SidebarFooter:()=>no,SidebarGroup:()=>xt,SidebarGroupAction:()=>Pt,SidebarGroupCollapsible:()=>Dt,SidebarGroupContent:()=>bo,SidebarGroupLabel:()=>wt,SidebarHeader:()=>io,SidebarInput:()=>co,SidebarInset:()=>po,SidebarMenu:()=>it,SidebarMenuAction:()=>Ft,SidebarMenuBadge:()=>mo,SidebarMenuButton:()=>rt,SidebarMenuItem:()=>At,SidebarMenuSkeleton:()=>go,SidebarMenuSub:()=>ho,SidebarMenuSubButton:()=>yo,SidebarMenuSubItem:()=>fo,SidebarProvider:()=>Ur,SidebarRail:()=>lo,SidebarSeparator:()=>uo,SidebarTrigger:()=>Mt,Skeleton:()=>ut,Slider:()=>ze,Spinner:()=>Oe,Switch:()=>Me,TabContent:()=>Bt,TabTrigger:()=>ce,Table:()=>Eo,Tabs:()=>ne,TabsContainer:()=>pe,TabsList:()=>le,TextEditor:()=>kr,Textarea:()=>Re,ThemeButton:()=>nt,Toast:()=>vt,Toggle:()=>mr,ToggleGroup:()=>gr,ToggleGroupItem:()=>fr,Tooltip:()=>$s,Typography:()=>je,createNamedIcon:()=>Ra,findMarkdownTreeNode:()=>xa,iconComponentName:()=>Qa});var Jr=b(()=>{jr();Ei();Ua();qa();Ci();Ni();ki();ji();Ii();Ri();Da();$i();Ti();Ui();qi();Mi();zi();Pi();Di();Fi();_i();Hi();Wi();Ki();Vi();Zi();Xi();Yi();Qi();tn();Ka();en();Za();sn();rn();an();nn();pn();ln();ha();dn();bn();hn();mn();gn();fn();yn();vn();Sn();xn();wn();Cn();Ln();Nn();kn();On();jn();Bn();In();Rn();$n();Tn();Ja();Y();Un();qn();si();Dn();Fn();Jn();Qn();np();pp();dp();bp()});y();var vi="0.0.9";m();Jr();y();Vr();function yc(t){let{open:e,close:s,destroy:r}=ba(t,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return t.setAttribute("role","alertdialog"),t.BaseUIAlertDialog={open:e,close:s},{destroy:()=>{r(),delete t.BaseUIAlertDialog}}}c.register("alert-dialog",{type:"owl",mount:yc});y();q();var di={default:"baseui-alert-default",destructive:"baseui-alert-destructive",info:"baseui-alert-default",success:"alert-success",warning:"alert-warning",danger:"baseui-alert-destructive"};function vc(t){t.classList.add("alert","baseui-alert",di[t.getAttribute("b-att-variant")||"default"]||di.default),t.setAttribute("role",t.getAttribute("role")||"alert");let e=null;if(!!t.getAttribute("b-att-dismissible")){if(t.classList.add("alert-dismissible","fade","show"),!t.querySelector('[data-bs-dismiss="alert"]')){let r=document.createElement("button");r.type="button",r.className="btn-close",r.setAttribute("data-bs-dismiss","alert"),r.setAttribute("aria-label","Close"),t.appendChild(r)}e=new(w()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","baseui-alert","alert-dismissible","fade","show",...Object.values(di))}}}c.register("alert",{type:"static",mount:vc});y();q();function Sc(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",r=new Map,i=new Map,a=new Map,p=(l,u)=>{let d=l.querySelector("[b-accordion-trigger]");l.setAttribute("b-att-state",u?"open":"closed"),d?.setAttribute("aria-expanded",String(u)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:u}}))};return t.setAttribute("role","presentation"),e.forEach((l,u)=>{let d=l.querySelector("[b-accordion-trigger]"),h=l.querySelector("[b-accordion-panel]");if(!h)return;let f=h.id||`baseui-accordion-panel-${u}`;h.id=f;let v=l.getAttribute("b-att-state")==="open";h.classList.add("collapse"),v&&h.classList.add("show");let E=new(w()).Collapse(h,{toggle:!1});a.set(l,E);let L=()=>p(l,!0),x=()=>p(l,!1);h.addEventListener("shown.bs.collapse",L),h.addEventListener("hidden.bs.collapse",x),i.set(l,{onShown:L,onHidden:x}),d?.setAttribute("aria-expanded",String(v)),d?.setAttribute("aria-controls",f);let B=()=>{let D=h.classList.contains("show");!s&&!D&&e.forEach(C=>{if(C===l)return;let H=a.get(C),X=C.querySelector("[b-accordion-panel]");H&&X?.classList.contains("show")&&H.hide()}),D?E.hide():E.show()};r.set(l,B),d?.addEventListener("click",B)}),{destroy:()=>{e.forEach(l=>{let u=l.querySelector("[b-accordion-trigger]"),d=l.querySelector("[b-accordion-panel]");u?.removeEventListener("click",r.get(l));let h=i.get(l);d&&h&&(d.removeEventListener("shown.bs.collapse",h.onShown),d.removeEventListener("hidden.bs.collapse",h.onHidden)),a.get(l)?.dispose()}),r.clear(),i.clear(),a.clear()}}}c.register("accordion",{type:"owl",mount:Sc});y();function xc(t){let e=t.getAttribute("b-att-ratio")||`${t.getAttribute("b-att-width")||16} / ${t.getAttribute("b-att-height")||9}`;return t.classList.add("baseui-aspect-ratio"),t.style.setProperty("--baseui-aspect-ratio",e),{destroy:()=>t.classList.remove("baseui-aspect-ratio")}}c.register("aspect-ratio",{type:"static",mount:xc});y();te();var wc=["idle","uploading","processing","error","done"],Ac=["default","sm","xs"],Ec=["content","title","description","actions"];function hp(t,e){t.classList.add(`baseui-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function Cc(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),r=wc.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",i=Ac.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",a=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("baseui-attachment"),t.classList.add(`baseui-attachment-${r}`,`baseui-attachment-${i}`,`baseui-attachment-${a}`),t.setAttribute("data-state",r),t.setAttribute("data-size",i),t.setAttribute("data-orientation",a),t.setAttribute("data-slot","attachment"),e&&t.classList.add("baseui-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(l=>{let u=l.getAttribute("b-att-variant")==="image"?"image":"icon";hp(l,"media"),l.classList.add(`baseui-attachment-media-${u}`),l.setAttribute("data-variant",u)}),Ec.forEach(l=>t.querySelectorAll(`[b-attachment-${l}]`).forEach(u=>hp(u,l))),t.querySelectorAll("[b-attachment-action]").forEach(l=>{let u=P[l.getAttribute("b-att-variant")]||P.ghost,d=M[l.getAttribute("b-att-size")]||M["icon-xs"];l.classList.add("btn","baseui-button",u,d,"baseui-button-icon","baseui-attachment-action"),l.setAttribute("data-slot","attachment-action"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),t.querySelectorAll("[b-attachment-trigger]").forEach(l=>{l.classList.add("baseui-attachment-trigger"),l.setAttribute("data-slot","attachment-trigger"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),e?.classList.add("form-control");let p=()=>{s&&(s.innerHTML=[...e.files].map(l=>`<li>${l.name}</li>`).join("")),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...e.files]}}))};return e?.addEventListener("change",p),{destroy:()=>e?.removeEventListener("change",p)}}function Lc(t){return t.classList.add("baseui-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("baseui-attachment-group")}}function Nc(t){let e=t.querySelector("input[type='file']");t.classList.add("baseui-attachment-dropzone"),t.setAttribute("data-slot","attachment-dropzone");let s=()=>e?.click(),r=u=>{u.preventDefault(),t.classList.add("baseui-attachment-dropzone-dragging")},i=()=>t.classList.remove("baseui-attachment-dropzone-dragging"),a=u=>{u.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:u}}))},p=u=>{u.preventDefault(),t.classList.remove("baseui-attachment-dropzone-dragging"),a([...u.dataTransfer?.files??[]])},l=()=>{a([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",r),t.addEventListener("dragleave",i),t.addEventListener("drop",p),e?.addEventListener("change",l),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",r),t.removeEventListener("dragleave",i),t.removeEventListener("drop",p),e?.removeEventListener("change",l)}}}c.register("attachment",{type:"owl",mount:Cc});c.register("attachment-group",{type:"static",mount:Lc});c.register("attachment-dropzone",{type:"static",mount:Nc});y();function kc(t){t.classList.add("baseui-avatar");let e=t.querySelector("img"),s=t.querySelector("[b-avatar-fallback]");if(e&&s){let r=()=>{e.hidden=!0,s.hidden=!1};return s.hidden=!!e.getAttribute("src"),e.addEventListener("error",r),{destroy:()=>e.removeEventListener("error",r)}}return{}}c.register("avatar",{type:"static",mount:kc});y();Ta();function Oc(t){let e=ee[t.getAttribute("b-att-variant")||"secondary"]||ee.secondary;return t.classList.add("badge",e),t.getAttribute("b-att-pill")==="true"&&t.classList.add("rounded-pill"),{destroy:()=>t.classList.remove("badge","rounded-pill",...Object.values(ee))}}c.register("badge",{type:"static",mount:Oc});y();st();function mp(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))}function fp(t,e,s){return z(t,e,{size:s}),t}function jc(){let t=document.createElement("li"),e=document.createElement("span");return t.setAttribute("b-breadcrumb-separator",""),t.setAttribute("data-slot","breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t.className="baseui-breadcrumb-separator",e.className="baseui-breadcrumb-separator-icon",t.append(fp(e,"chevron-right","var(--b3_5)")),t}function Bc(t){t.classList.add("baseui-breadcrumb-separator"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true")}function Ic(t){if(t.classList.add("baseui-breadcrumb-ellipsis"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-ellipsis"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),!t.querySelector(".baseui-icon")){let e=document.createElement("span");e.className="baseui-breadcrumb-ellipsis-icon",t.prepend(fp(e,"ellipsis","var(--b4)"))}if(!t.querySelector(".visually-hidden")){let e=document.createElement("span");e.className="visually-hidden",e.textContent="More",t.append(e)}}function gp(t){t.classList.add("baseui-breadcrumb-page"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-page"),t.setAttribute("role",t.getAttribute("role")||"link"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-current","page")}function Rc(t){let e=t.querySelector("ol, ul")||t;t.classList.add("baseui-breadcrumb"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb"),t.setAttribute("aria-label",t.getAttribute("aria-label")||"breadcrumb"),e.classList.add("breadcrumb","baseui-breadcrumb-list"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))Bc(r);for(let r of e.querySelectorAll("[b-breadcrumb-ellipsis], .baseui-breadcrumb-ellipsis"))Ic(r);for(let r of e.querySelectorAll("[b-breadcrumb-page], .baseui-breadcrumb-page"))gp(r);e.querySelector("[b-breadcrumb-separator], .baseui-breadcrumb-separator")||mp(e).slice(0,-1).forEach(i=>i.after(jc()));let s=mp(e);return s.forEach((r,i)=>{r.classList.add("baseui-breadcrumb-item"),r.setAttribute("data-slot",r.getAttribute("data-slot")||"breadcrumb-item");for(let a of r.querySelectorAll("a"))a.classList.add("baseui-breadcrumb-link"),a.setAttribute("data-slot",a.getAttribute("data-slot")||"breadcrumb-link");if(i===s.length-1){let a=r.querySelector("[b-breadcrumb-page], .baseui-breadcrumb-page");a?gp(a):(r.classList.add("baseui-breadcrumb-page"),r.setAttribute("aria-current",r.getAttribute("aria-current")||"page"))}}),{destroy:()=>{t.classList.remove("baseui-breadcrumb"),e.classList.remove("breadcrumb","baseui-breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator]"))r.remove()}}}c.register("breadcrumb",{type:"owl",mount:Rc});y();function $c(t){return t.classList.add("baseui-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("baseui-bubble")}}c.register("bubble",{type:"static",mount:$c});y();st();te();function Tc(t){return[...t.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).map(e=>{let s=document.createElement("span");return s.textContent=e.textContent.trim(),e.replaceWith(s),s})}function Uc(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",r=!!t.textContent.trim(),i=e&&r?Tc(t):[],a=null;return t.classList.add("btn","baseui-button",P[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),M[t.getAttribute("b-att-size")]&&t.classList.add(M[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(a=document.createElement("span"),a.setAttribute("b-icon",e),a.dataset.icon=`inline-${s}`,z(a,e,{label:""}),t.insertBefore(a,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,r||(t.dataset.iconOnly="true",t.classList.add("baseui-button-icon"))),{destroy:()=>{a?.remove();for(let p of i)p.replaceWith(document.createTextNode(p.textContent));t.classList.remove("btn","baseui-button","baseui-button-icon",...Object.values(P),...Object.values(M)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}c.register("button",{type:"static",mount:Uc});y();function qc(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),r=[...t.querySelectorAll("[b-button-group-separator]")],i=[...t.querySelectorAll("[b-button-group-text]")];return t.classList.add("baseui-button-group",e?"btn-group-vertical":"btn-group"),(s==="sm"||s==="lg")&&t.classList.add(`btn-group-${s}`),t.setAttribute("role",t.getAttribute("role")||"group"),r.forEach(a=>{let p=a.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";a.classList.add("baseui-button-group-separator",`baseui-button-group-separator-${p}`),a.setAttribute("data-orientation",p),a.setAttribute("role","separator")}),i.forEach(a=>{a.classList.add("baseui-button-group-text")}),{destroy:()=>{t.classList.remove("baseui-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}c.register("button-group",{type:"static",mount:qc});y();var Mc=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function zc(t){let e=t.getAttribute("b-att-selected")?new Date(`${t.getAttribute("b-att-selected")}T00:00:00`):new Date,s=Number(t.getAttribute("b-att-month")??e.getMonth()+1)-1,r=Number(t.getAttribute("b-att-year")??e.getFullYear()),i=new Date(r,s,1),a=new Date(r,s+1,0).getDate(),p=i.getDay();t.classList.add("baseui-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
15
+ `);await oa(i,e,{templates:`<templates>${a}</templates>`}),wa.set(wa.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){mc(e),globalThis.BaseUI?.mountAll(e),wa.set(wa.current(),{skipStorage:!0})}};o(Gt,"template","baseui.BlockViewer"),o(Gt,"components",{Button:K,Icon:k,ThemeButton:nt}),o(Gt,"props",{navItems:{type:Array,optional:!0}})});var Ot,yr,vr,Sr,xr,wr,Ar,Er,Cr,Lr,Nr,pp=b(()=>{m();Vr();U();Ot={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},yr=class extends n{setup(){this.pwaState=g({open:$(this.props)}),A({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.pwaState.open=$(e))})}setOpen(e){T(this.props)||(this.pwaState.open=e),this.props.onOpenChange?.(e)}};o(yr,"template","baseui.Pwa"),o(yr,"props",{open:{type:Boolean,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});vr=class extends n{onClick(){this.env.setPwaOpen(!0)}};o(vr,"template","baseui.PwaTrigger"),o(vr,"props",Ot);Sr=class extends n{setup(){this.rootRef=S("root"),G(e=>{if(!e)return;let s=document.activeElement;return Tr(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(e){e.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(e){e.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};o(Sr,"template","baseui.PwaContent"),o(Sr,"props",Ot);xr=class extends n{};o(xr,"template","baseui.PwaHeader"),o(xr,"props",Ot);wr=class extends n{};o(wr,"template","baseui.PwaTitle"),o(wr,"props",Ot);Ar=class extends n{};o(Ar,"template","baseui.PwaDescription"),o(Ar,"props",Ot);Er=class extends n{};o(Er,"template","baseui.PwaBody"),o(Er,"props",Ot);Cr=class extends n{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};o(Cr,"template","baseui.PwaSteps"),o(Cr,"props",{...Ot,steps:{type:Array,optional:!0}});Lr=class extends n{};o(Lr,"template","baseui.PwaFooter"),o(Lr,"props",Ot);Nr=class extends n{onClick(){this.env.setPwaOpen(!1)}};o(Nr,"template","baseui.PwaClose"),o(Nr,"props",Ot)});function up(t,e){return typeof t=="string"?t:e}function gc(t){return{title:t.submitted&&t.title.trim().length>0&&t.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:t.submitted&&t.description.length>0&&t.description.length<20?"Description must be at least 20 characters.":""}}var lp,cp,Yt,dp=b(()=>{m();jr();U();Ja();lp="",cp="";Yt=class extends n{setup(){this.state=g({title:up(this.props.title,lp),description:up(this.props.description,cp),submitted:!1})}get classNames(){return W("baseui-form",this.props.className)}get titlePlaceholder(){return this.props.titlePlaceholder||"Login button not working on mobile"}get descriptionPlaceholder(){return this.props.descriptionPlaceholder||"I'm having an issue with the login button on mobile."}get maxDescriptionLength(){return this.props.maxDescriptionLength||100}get descriptionLength(){return this.state.description.length}get errors(){return gc(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=lp,this.state.description=cp,this.state.submitted=!1}submit(e){e.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};o(Yt,"template","baseui.Form"),o(Yt,"components",{Button:K,Field:Ct,FieldDescription:Nt,FieldError:kt,FieldGroup:Et,FieldLabel:Lt}),o(Yt,"props",{title:{type:String,optional:!0},description:{type:String,optional:!0},titlePlaceholder:{type:String,optional:!0},descriptionPlaceholder:{type:String,optional:!0},maxDescriptionLength:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onSubmit:{type:Function,optional:!0}})});function fc(){return ci??(ci=import("./runtime/milkdown/milkdown-text-editor.js")),ci}async function Aa(t){return(await fc()).createMilkdownTextEditor(t)}function Ea({collaborative:t,providerType:e,url:s}={}){return!!t||!!(e&&s)}var ci,ui=b(()=>{});var kr,bp=b(()=>{m();ui();kr=class extends n{setup(){this.editorRef=S("editor"),this.editorHandle=null,this.mountPromise=null,this.mountToken=0,this.isDestroyed=!1,this.state=g({content:"",status:"loading",error:""}),Qt(()=>this.load(this.props)),R(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),O(()=>this.mountEditor()),F(()=>this.mountEditor()),Wr(()=>{this.isDestroyed=!0,this.destroyEditor()})}get classNames(){let e=["baseui-text-editor"];return this.props.className&&e.push(this.props.className),e.join(" ")}get isCollaborative(){return Ea({collaborative:this.props.collaborative,providerType:this.props.provider,url:this.props.url})}get editorLabel(){return this.isCollaborative?"Collaborative rich text editor":"Rich text editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.collaborative!==this.props.collaborative||e.provider!==this.props.provider||e.room!==this.props.room||e.url!==this.props.url||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);s=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}this.state.content=s,this.state.status="ready"}async mountEditor(){let e=this.editorRef.el;if(this.isDestroyed||!e||this.editorHandle||this.mountPromise||this.state.status!=="ready")return;let s=++this.mountToken;return this.mountPromise=(async()=>{try{let r=await Aa({root:e,value:this.state.content,placeholder:this.props.placeholder,collaborative:this.isCollaborative,providerType:this.props.provider,room:this.props.room||"baseui-text-editor",url:this.props.url,password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(i,a,p)=>{this.state.content=i,this.props.onChange?.(i,a,p)}});if(s!==this.mountToken){r.destroy?.();return}this.editorHandle=r}catch(r){s===this.mountToken&&(this.state.status="error",this.state.error=r.message||String(r))}finally{this.mountPromise=null,this.isDestroyed||this.mountEditor()}})(),this.mountPromise}destroyEditor(){this.mountToken++,this.editorHandle?.destroy?.(),this.editorHandle=null}};o(kr,"template","baseui.TextEditor"),o(kr,"props",{content:{type:String,optional:!0},src:{type:String,optional:!0},placeholder:{type:String,optional:!0},collaborative:{type:Boolean,optional:!0},provider:{type:String,optional:!0},room:{type:String,optional:!0},url:{type:String,optional:!0},password:{type:String,optional:!0},signaling:{type:Array,optional:!0},user:{type:Object,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var Fr={};La(Fr,{Accordion:()=>Hs,AccordionContent:()=>Ks,AccordionItem:()=>Ws,AccordionTrigger:()=>Tt,Alert:()=>ye,AlertAction:()=>xe,AlertDescription:()=>Se,AlertDialog:()=>ts,AlertDialogAction:()=>ls,AlertDialogCancel:()=>ps,AlertDialogContent:()=>ss,AlertDialogDescription:()=>ns,AlertDialogFooter:()=>rs,AlertDialogHeader:()=>os,AlertDialogMedia:()=>as,AlertDialogTitle:()=>is,AlertDialogTrigger:()=>es,AlertTitle:()=>ve,AspectRatio:()=>sr,Attachment:()=>Mo,AttachmentAction:()=>Ho,AttachmentActions:()=>_o,AttachmentContent:()=>Po,AttachmentDescription:()=>Fo,AttachmentDropzone:()=>Vo,AttachmentGroup:()=>Ko,AttachmentMedia:()=>zo,AttachmentTitle:()=>Do,AttachmentTrigger:()=>Wo,Avatar:()=>Zo,Badge:()=>pt,BlockViewer:()=>Gt,Breadcrumb:()=>Gs,BreadcrumbEllipsis:()=>qt,BreadcrumbItem:()=>Js,BreadcrumbLink:()=>Qs,BreadcrumbList:()=>Ys,BreadcrumbPage:()=>to,BreadcrumbSeparator:()=>Ut,Bubble:()=>or,Button:()=>K,ButtonGroup:()=>ir,ButtonGroupSeparator:()=>nr,ButtonGroupText:()=>pr,Calendar:()=>No,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>ae,CardFooter:()=>oe,CardHeader:()=>se,CardTitle:()=>re,Carousel:()=>Io,CarouselNext:()=>To,CarouselPrevious:()=>$o,CarouselSlide:()=>Ro,Chart:()=>Bo,Checkbox:()=>Te,ClipboardButton:()=>jt,Collapsible:()=>Vs,CollapsibleContent:()=>Xs,CollapsibleTrigger:()=>Zs,Combobox:()=>Oo,Command:()=>jo,ContextMenu:()=>Ps,ContextMenuContent:()=>Fs,ContextMenuItem:()=>_s,ContextMenuTrigger:()=>Ds,DataTable:()=>Kt,DatePicker:()=>ko,Dialog:()=>ue,DialogClose:()=>fe,DialogContent:()=>It,DialogDescription:()=>ge,DialogFooter:()=>he,DialogHeader:()=>be,DialogTitle:()=>me,DialogTrigger:()=>de,Direction:()=>rr,Drawer:()=>cs,DrawerClose:()=>fs,DrawerContent:()=>ds,DrawerDescription:()=>gs,DrawerFooter:()=>hs,DrawerHeader:()=>bs,DrawerTitle:()=>ms,DrawerTrigger:()=>us,DropdownMenu:()=>bt,DropdownMenuCheckboxItem:()=>Rt,DropdownMenuContent:()=>mt,DropdownMenuGroup:()=>Ts,DropdownMenuItem:()=>gt,DropdownMenuLabel:()=>Us,DropdownMenuRadioGroup:()=>qs,DropdownMenuRadioItem:()=>$t,DropdownMenuSeparator:()=>Ms,DropdownMenuShortcut:()=>zs,DropdownMenuSub:()=>ft,DropdownMenuSubContent:()=>yt,DropdownMenuSubTrigger:()=>ot,DropdownMenuTrigger:()=>ht,Empty:()=>we,EmptyContent:()=>Ne,EmptyDescription:()=>Le,EmptyHeader:()=>Ae,EmptyMedia:()=>Ee,EmptyTitle:()=>Ce,Field:()=>Ct,FieldContent:()=>ur,FieldDescription:()=>Nt,FieldError:()=>kt,FieldGroup:()=>Et,FieldLabel:()=>Lt,FieldLegend:()=>cr,FieldSeparator:()=>br,FieldSet:()=>lr,FieldTitle:()=>dr,Form:()=>Yt,HoverCard:()=>Bs,HoverCardContent:()=>Rs,HoverCardTrigger:()=>Is,Icon:()=>k,Input:()=>ie,InputGroup:()=>_e,InputGroupAddon:()=>He,InputGroupButton:()=>We,InputGroupInput:()=>Ve,InputGroupText:()=>Ke,InputGroupTextarea:()=>Ze,InputOtp:()=>Xe,Item:()=>ar,Kbd:()=>Be,Label:()=>hr,Markdown:()=>Zt,MarkdownTree:()=>Xt,MarkdownTreeNode:()=>Dr,Marker:()=>Ie,Menubar:()=>ao,Message:()=>Xo,MessageScroller:()=>Go,NativeSelect:()=>$e,NavigationMenu:()=>oo,NavigationMenuItem:()=>ro,Pagination:()=>eo,PaginationItem:()=>so,Popover:()=>ks,PopoverContent:()=>js,PopoverTrigger:()=>Os,Progress:()=>er,Pwa:()=>yr,PwaBody:()=>Er,PwaClose:()=>Nr,PwaContent:()=>Sr,PwaDescription:()=>Ar,PwaFooter:()=>Lr,PwaHeader:()=>xr,PwaSteps:()=>Cr,PwaTitle:()=>wr,PwaTrigger:()=>vr,Questionnaire:()=>Yo,QuestionnaireNext:()=>tr,QuestionnairePrevious:()=>Qo,QuestionnaireStep:()=>Jo,RadioGroup:()=>Ue,RadioGroupItem:()=>qe,Resizable:()=>Uo,ScrollArea:()=>qo,Select:()=>Ge,SelectContent:()=>Je,SelectItem:()=>Qe,SelectTrigger:()=>Ye,Separator:()=>ke,Sheet:()=>vs,SheetClose:()=>Ls,SheetContent:()=>xs,SheetDescription:()=>Cs,SheetFooter:()=>As,SheetHeader:()=>ws,SheetTitle:()=>Es,SheetTrigger:()=>Ss,Shell:()=>_t,ShellContent:()=>Wt,ShellHeader:()=>wo,ShellMain:()=>xo,ShellNav:()=>So,ShellSidebar:()=>Ht,ShellSidebarHeader:()=>vo,ShellUserMenu:()=>Ao,Sidebar:()=>at,SidebarClose:()=>zt,SidebarContent:()=>St,SidebarFooter:()=>no,SidebarGroup:()=>xt,SidebarGroupAction:()=>Pt,SidebarGroupCollapsible:()=>Dt,SidebarGroupContent:()=>bo,SidebarGroupLabel:()=>wt,SidebarHeader:()=>io,SidebarInput:()=>co,SidebarInset:()=>po,SidebarMenu:()=>it,SidebarMenuAction:()=>Ft,SidebarMenuBadge:()=>mo,SidebarMenuButton:()=>rt,SidebarMenuItem:()=>At,SidebarMenuSkeleton:()=>go,SidebarMenuSub:()=>ho,SidebarMenuSubButton:()=>yo,SidebarMenuSubItem:()=>fo,SidebarProvider:()=>Ur,SidebarRail:()=>lo,SidebarSeparator:()=>uo,SidebarTrigger:()=>Mt,Skeleton:()=>ut,Slider:()=>ze,Spinner:()=>Oe,Switch:()=>Me,TabContent:()=>Bt,TabTrigger:()=>ce,Table:()=>Eo,Tabs:()=>ne,TabsContainer:()=>pe,TabsList:()=>le,TextEditor:()=>kr,Textarea:()=>Re,ThemeButton:()=>nt,Toast:()=>vt,Toggle:()=>mr,ToggleGroup:()=>gr,ToggleGroupItem:()=>fr,Tooltip:()=>$s,Typography:()=>je,createNamedIcon:()=>Ra,findMarkdownTreeNode:()=>xa,iconComponentName:()=>Qa});var Jr=b(()=>{jr();Ei();Ua();qa();Ci();Ni();ki();ji();Ii();Ri();Da();$i();Ti();Ui();qi();Mi();zi();Pi();Di();Fi();_i();Hi();Wi();Ki();Vi();Zi();Xi();Yi();Qi();tn();Ka();en();Za();sn();rn();an();nn();pn();ln();ha();dn();bn();hn();mn();gn();fn();yn();vn();Sn();xn();wn();Cn();Ln();Nn();kn();On();jn();Bn();In();Rn();$n();Tn();Ja();Y();Un();qn();si();Dn();Fn();Jn();Qn();np();pp();dp();bp()});y();var vi="0.0.10";m();Jr();y();Vr();function yc(t){let{open:e,close:s,destroy:r}=ba(t,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return t.setAttribute("role","alertdialog"),t.BaseUIAlertDialog={open:e,close:s},{destroy:()=>{r(),delete t.BaseUIAlertDialog}}}c.register("alert-dialog",{type:"owl",mount:yc});y();q();var di={default:"baseui-alert-default",destructive:"baseui-alert-destructive",info:"baseui-alert-default",success:"alert-success",warning:"alert-warning",danger:"baseui-alert-destructive"};function vc(t){t.classList.add("alert","baseui-alert",di[t.getAttribute("b-att-variant")||"default"]||di.default),t.setAttribute("role",t.getAttribute("role")||"alert");let e=null;if(!!t.getAttribute("b-att-dismissible")){if(t.classList.add("alert-dismissible","fade","show"),!t.querySelector('[data-bs-dismiss="alert"]')){let r=document.createElement("button");r.type="button",r.className="btn-close",r.setAttribute("data-bs-dismiss","alert"),r.setAttribute("aria-label","Close"),t.appendChild(r)}e=new(w()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","baseui-alert","alert-dismissible","fade","show",...Object.values(di))}}}c.register("alert",{type:"static",mount:vc});y();q();function Sc(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",r=new Map,i=new Map,a=new Map,p=(l,u)=>{let d=l.querySelector("[b-accordion-trigger]");l.setAttribute("b-att-state",u?"open":"closed"),d?.setAttribute("aria-expanded",String(u)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:u}}))};return t.setAttribute("role","presentation"),e.forEach((l,u)=>{let d=l.querySelector("[b-accordion-trigger]"),h=l.querySelector("[b-accordion-panel]");if(!h)return;let f=h.id||`baseui-accordion-panel-${u}`;h.id=f;let v=l.getAttribute("b-att-state")==="open";h.classList.add("collapse"),v&&h.classList.add("show");let E=new(w()).Collapse(h,{toggle:!1});a.set(l,E);let L=()=>p(l,!0),x=()=>p(l,!1);h.addEventListener("shown.bs.collapse",L),h.addEventListener("hidden.bs.collapse",x),i.set(l,{onShown:L,onHidden:x}),d?.setAttribute("aria-expanded",String(v)),d?.setAttribute("aria-controls",f);let B=()=>{let D=h.classList.contains("show");!s&&!D&&e.forEach(C=>{if(C===l)return;let H=a.get(C),X=C.querySelector("[b-accordion-panel]");H&&X?.classList.contains("show")&&H.hide()}),D?E.hide():E.show()};r.set(l,B),d?.addEventListener("click",B)}),{destroy:()=>{e.forEach(l=>{let u=l.querySelector("[b-accordion-trigger]"),d=l.querySelector("[b-accordion-panel]");u?.removeEventListener("click",r.get(l));let h=i.get(l);d&&h&&(d.removeEventListener("shown.bs.collapse",h.onShown),d.removeEventListener("hidden.bs.collapse",h.onHidden)),a.get(l)?.dispose()}),r.clear(),i.clear(),a.clear()}}}c.register("accordion",{type:"owl",mount:Sc});y();function xc(t){let e=t.getAttribute("b-att-ratio")||`${t.getAttribute("b-att-width")||16} / ${t.getAttribute("b-att-height")||9}`;return t.classList.add("baseui-aspect-ratio"),t.style.setProperty("--baseui-aspect-ratio",e),{destroy:()=>t.classList.remove("baseui-aspect-ratio")}}c.register("aspect-ratio",{type:"static",mount:xc});y();te();var wc=["idle","uploading","processing","error","done"],Ac=["default","sm","xs"],Ec=["content","title","description","actions"];function hp(t,e){t.classList.add(`baseui-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function Cc(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),r=wc.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",i=Ac.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",a=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("baseui-attachment"),t.classList.add(`baseui-attachment-${r}`,`baseui-attachment-${i}`,`baseui-attachment-${a}`),t.setAttribute("data-state",r),t.setAttribute("data-size",i),t.setAttribute("data-orientation",a),t.setAttribute("data-slot","attachment"),e&&t.classList.add("baseui-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(l=>{let u=l.getAttribute("b-att-variant")==="image"?"image":"icon";hp(l,"media"),l.classList.add(`baseui-attachment-media-${u}`),l.setAttribute("data-variant",u)}),Ec.forEach(l=>t.querySelectorAll(`[b-attachment-${l}]`).forEach(u=>hp(u,l))),t.querySelectorAll("[b-attachment-action]").forEach(l=>{let u=P[l.getAttribute("b-att-variant")]||P.ghost,d=M[l.getAttribute("b-att-size")]||M["icon-xs"];l.classList.add("btn","baseui-button",u,d,"baseui-button-icon","baseui-attachment-action"),l.setAttribute("data-slot","attachment-action"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),t.querySelectorAll("[b-attachment-trigger]").forEach(l=>{l.classList.add("baseui-attachment-trigger"),l.setAttribute("data-slot","attachment-trigger"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),e?.classList.add("form-control");let p=()=>{s&&(s.innerHTML=[...e.files].map(l=>`<li>${l.name}</li>`).join("")),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...e.files]}}))};return e?.addEventListener("change",p),{destroy:()=>e?.removeEventListener("change",p)}}function Lc(t){return t.classList.add("baseui-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("baseui-attachment-group")}}function Nc(t){let e=t.querySelector("input[type='file']");t.classList.add("baseui-attachment-dropzone"),t.setAttribute("data-slot","attachment-dropzone");let s=()=>e?.click(),r=u=>{u.preventDefault(),t.classList.add("baseui-attachment-dropzone-dragging")},i=()=>t.classList.remove("baseui-attachment-dropzone-dragging"),a=u=>{u.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:u}}))},p=u=>{u.preventDefault(),t.classList.remove("baseui-attachment-dropzone-dragging"),a([...u.dataTransfer?.files??[]])},l=()=>{a([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",r),t.addEventListener("dragleave",i),t.addEventListener("drop",p),e?.addEventListener("change",l),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",r),t.removeEventListener("dragleave",i),t.removeEventListener("drop",p),e?.removeEventListener("change",l)}}}c.register("attachment",{type:"owl",mount:Cc});c.register("attachment-group",{type:"static",mount:Lc});c.register("attachment-dropzone",{type:"static",mount:Nc});y();function kc(t){t.classList.add("baseui-avatar");let e=t.querySelector("img"),s=t.querySelector("[b-avatar-fallback]");if(e&&s){let r=()=>{e.hidden=!0,s.hidden=!1};return s.hidden=!!e.getAttribute("src"),e.addEventListener("error",r),{destroy:()=>e.removeEventListener("error",r)}}return{}}c.register("avatar",{type:"static",mount:kc});y();Ta();function Oc(t){let e=ee[t.getAttribute("b-att-variant")||"secondary"]||ee.secondary;return t.classList.add("badge",e),t.getAttribute("b-att-pill")==="true"&&t.classList.add("rounded-pill"),{destroy:()=>t.classList.remove("badge","rounded-pill",...Object.values(ee))}}c.register("badge",{type:"static",mount:Oc});y();st();function mp(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))}function fp(t,e,s){return z(t,e,{size:s}),t}function jc(){let t=document.createElement("li"),e=document.createElement("span");return t.setAttribute("b-breadcrumb-separator",""),t.setAttribute("data-slot","breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t.className="baseui-breadcrumb-separator",e.className="baseui-breadcrumb-separator-icon",t.append(fp(e,"chevron-right","var(--b3_5)")),t}function Bc(t){t.classList.add("baseui-breadcrumb-separator"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true")}function Ic(t){if(t.classList.add("baseui-breadcrumb-ellipsis"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-ellipsis"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),!t.querySelector(".baseui-icon")){let e=document.createElement("span");e.className="baseui-breadcrumb-ellipsis-icon",t.prepend(fp(e,"ellipsis","var(--b4)"))}if(!t.querySelector(".visually-hidden")){let e=document.createElement("span");e.className="visually-hidden",e.textContent="More",t.append(e)}}function gp(t){t.classList.add("baseui-breadcrumb-page"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-page"),t.setAttribute("role",t.getAttribute("role")||"link"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-current","page")}function Rc(t){let e=t.querySelector("ol, ul")||t;t.classList.add("baseui-breadcrumb"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb"),t.setAttribute("aria-label",t.getAttribute("aria-label")||"breadcrumb"),e.classList.add("breadcrumb","baseui-breadcrumb-list"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))Bc(r);for(let r of e.querySelectorAll("[b-breadcrumb-ellipsis], .baseui-breadcrumb-ellipsis"))Ic(r);for(let r of e.querySelectorAll("[b-breadcrumb-page], .baseui-breadcrumb-page"))gp(r);e.querySelector("[b-breadcrumb-separator], .baseui-breadcrumb-separator")||mp(e).slice(0,-1).forEach(i=>i.after(jc()));let s=mp(e);return s.forEach((r,i)=>{r.classList.add("baseui-breadcrumb-item"),r.setAttribute("data-slot",r.getAttribute("data-slot")||"breadcrumb-item");for(let a of r.querySelectorAll("a"))a.classList.add("baseui-breadcrumb-link"),a.setAttribute("data-slot",a.getAttribute("data-slot")||"breadcrumb-link");if(i===s.length-1){let a=r.querySelector("[b-breadcrumb-page], .baseui-breadcrumb-page");a?gp(a):(r.classList.add("baseui-breadcrumb-page"),r.setAttribute("aria-current",r.getAttribute("aria-current")||"page"))}}),{destroy:()=>{t.classList.remove("baseui-breadcrumb"),e.classList.remove("breadcrumb","baseui-breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator]"))r.remove()}}}c.register("breadcrumb",{type:"owl",mount:Rc});y();function $c(t){return t.classList.add("baseui-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("baseui-bubble")}}c.register("bubble",{type:"static",mount:$c});y();st();te();function Tc(t){return[...t.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).map(e=>{let s=document.createElement("span");return s.textContent=e.textContent.trim(),e.replaceWith(s),s})}function Uc(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",r=!!t.textContent.trim(),i=e&&r?Tc(t):[],a=null;return t.classList.add("btn","baseui-button",P[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),M[t.getAttribute("b-att-size")]&&t.classList.add(M[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(a=document.createElement("span"),a.setAttribute("b-icon",e),a.dataset.icon=`inline-${s}`,z(a,e,{label:""}),t.insertBefore(a,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,r||(t.dataset.iconOnly="true",t.classList.add("baseui-button-icon"))),{destroy:()=>{a?.remove();for(let p of i)p.replaceWith(document.createTextNode(p.textContent));t.classList.remove("btn","baseui-button","baseui-button-icon",...Object.values(P),...Object.values(M)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}c.register("button",{type:"static",mount:Uc});y();function qc(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),r=[...t.querySelectorAll("[b-button-group-separator]")],i=[...t.querySelectorAll("[b-button-group-text]")];return t.classList.add("baseui-button-group",e?"btn-group-vertical":"btn-group"),(s==="sm"||s==="lg")&&t.classList.add(`btn-group-${s}`),t.setAttribute("role",t.getAttribute("role")||"group"),r.forEach(a=>{let p=a.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";a.classList.add("baseui-button-group-separator",`baseui-button-group-separator-${p}`),a.setAttribute("data-orientation",p),a.setAttribute("role","separator")}),i.forEach(a=>{a.classList.add("baseui-button-group-text")}),{destroy:()=>{t.classList.remove("baseui-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}c.register("button-group",{type:"static",mount:qc});y();var Mc=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function zc(t){let e=t.getAttribute("b-att-selected")?new Date(`${t.getAttribute("b-att-selected")}T00:00:00`):new Date,s=Number(t.getAttribute("b-att-month")??e.getMonth()+1)-1,r=Number(t.getAttribute("b-att-year")??e.getFullYear()),i=new Date(r,s,1),a=new Date(r,s+1,0).getDate(),p=i.getDay();t.classList.add("baseui-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
16
16
  <div class="baseui-calendar__header">${Mc.format(i)}</div>
17
17
  <div class="baseui-calendar__weekdays">${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(d=>`<span>${d}</span>`).join("")}</div>
18
18
  <div b-calendar-grid class="baseui-calendar__grid"></div>
@@ -12,7 +12,7 @@ var BaseUIBundle=(()=>{var Xp=Object.create;var Wr=Object.defineProperty;var Gp=
12
12
  `),i=r.filter(p=>p.trim()).map(p=>p.match(/^\s*/)?.[0].length||0),a=i.length?Math.min(...i):0;return r.map(p=>p.slice(a)).join(`
13
13
  `)}function Cp(t,e=0){let s=" ".repeat(e),r=[];for(let i of t.childNodes){if(i.nodeType===Node.TEXT_NODE){let l=i.textContent.trim();l&&r.push(`${s}${l}`);continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let a=[...i.attributes].map(l=>` ${l.name}="${l.value}"`).join("");if(![...i.childNodes].some(l=>l.nodeType===Node.ELEMENT_NODE||l.nodeType===Node.TEXT_NODE&&l.textContent.trim())){r.push(`${s}<${i.localName}${a}>${i.textContent.trim()}</${i.localName}>`);continue}r.push(`${s}<${i.localName}${a}>`),r.push(...Cp(i,e+1)),r.push(`${s}</${i.localName}>`)}return r}async function Lp(t){if(!t?.trim())return"";let{expandSelfClosingTags:e,extractTagCaseMap:s,normalizeOwlPreviewMarkup:r}=await Promise.resolve().then(()=>(ka(),Sp)),i=document.createElement("div");return i.innerHTML=e(t),r(i,s(t)),Cp(i).join(`
14
14
  `)}function Np(t){t.querySelectorAll('[b-block="dashboard-01"], [b-block^="sidebar-"]').forEach(e=>{let s=e.querySelector("[b-block-sidebar-toggle], button[aria-label='Toggle sidebar']"),r=e.querySelector("[b-block-sidebar]");!s||!r||(e.setAttribute("b-att-sidebar",e.getAttribute("b-att-sidebar")||"open"),s.setAttribute("b-block-sidebar-toggle",""),s.setAttribute("aria-expanded",e.getAttribute("b-att-sidebar")==="open"?"true":"false"),s.addEventListener("click",()=>{let i=e.getAttribute("b-att-sidebar")!=="open";e.setAttribute("b-att-sidebar",i?"open":"collapsed"),s.setAttribute("aria-expanded",i?"true":"false")}))}),t.querySelectorAll('[b-block^="sidebar-"] [b-block-subnav]').forEach(e=>{let s=e.previousElementSibling;s&&(s.setAttribute("b-block-subnav-toggle",""),s.setAttribute("aria-expanded","true"),e.setAttribute("b-att-state","open"),s.addEventListener("click",r=>{r.preventDefault();let i=e.getAttribute("b-att-state")!=="open";e.setAttribute("b-att-state",i?"open":"collapsed"),s.setAttribute("aria-expanded",i?"true":"false")}))})}var kp=b(()=>{});var Op={};aa(Op,{Accordion:()=>Us,AccordionContent:()=>Ms,AccordionItem:()=>qs,AccordionTrigger:()=>$t,Alert:()=>me,AlertAction:()=>ye,AlertDescription:()=>fe,AlertDialog:()=>Ze,AlertDialogAction:()=>os,AlertDialogCancel:()=>ss,AlertDialogContent:()=>Ge,AlertDialogDescription:()=>es,AlertDialogFooter:()=>Je,AlertDialogHeader:()=>Ye,AlertDialogMedia:()=>Qe,AlertDialogTitle:()=>ts,AlertDialogTrigger:()=>Xe,AlertTitle:()=>ge,AspectRatio:()=>Ko,Attachment:()=>ko,AttachmentAction:()=>$o,AttachmentActions:()=>Ro,AttachmentContent:()=>jo,AttachmentDescription:()=>Io,AttachmentDropzone:()=>qo,AttachmentGroup:()=>Uo,AttachmentMedia:()=>Oo,AttachmentTitle:()=>Bo,AttachmentTrigger:()=>To,Avatar:()=>Mo,Badge:()=>pt,BaseUIComponents:()=>Ir,BlockViewer:()=>Xt,Breadcrumb:()=>Fs,BreadcrumbEllipsis:()=>Ut,BreadcrumbItem:()=>Hs,BreadcrumbLink:()=>Ws,BreadcrumbList:()=>_s,BreadcrumbPage:()=>Ks,BreadcrumbSeparator:()=>Tt,Bubble:()=>Vo,Button:()=>K,ButtonGroup:()=>Go,ButtonGroupSeparator:()=>Yo,ButtonGroupText:()=>Jo,Calendar:()=>fo,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>se,CardFooter:()=>te,CardHeader:()=>Qt,CardTitle:()=>ee,Carousel:()=>wo,CarouselNext:()=>Co,CarouselPrevious:()=>Eo,CarouselSlide:()=>Ao,Chart:()=>xo,Checkbox:()=>Ie,ClipboardButton:()=>kt,Collapsible:()=>zs,CollapsibleContent:()=>Ds,CollapsibleTrigger:()=>Ps,Combobox:()=>vo,Command:()=>So,ContextMenu:()=>Is,ContextMenuContent:()=>$s,ContextMenuItem:()=>Ts,ContextMenuTrigger:()=>Rs,DataTable:()=>Wt,DatePicker:()=>yo,Dialog:()=>pe,DialogClose:()=>he,DialogContent:()=>jt,DialogDescription:()=>be,DialogFooter:()=>ue,DialogHeader:()=>ce,DialogTitle:()=>de,DialogTrigger:()=>le,Direction:()=>Zo,Drawer:()=>rs,DrawerClose:()=>us,DrawerContent:()=>is,DrawerDescription:()=>cs,DrawerFooter:()=>ps,DrawerHeader:()=>ns,DrawerTitle:()=>ls,DrawerTrigger:()=>as,DropdownMenu:()=>dt,DropdownMenuCheckboxItem:()=>It,DropdownMenuContent:()=>ht,DropdownMenuGroup:()=>Ns,DropdownMenuItem:()=>mt,DropdownMenuLabel:()=>ks,DropdownMenuRadioGroup:()=>Os,DropdownMenuRadioItem:()=>Rt,DropdownMenuSeparator:()=>js,DropdownMenuShortcut:()=>Bs,DropdownMenuSub:()=>gt,DropdownMenuSubContent:()=>ft,DropdownMenuSubTrigger:()=>et,DropdownMenuTrigger:()=>bt,Empty:()=>ve,EmptyContent:()=>Ee,EmptyDescription:()=>Ae,EmptyHeader:()=>Se,EmptyMedia:()=>xe,EmptyTitle:()=>we,Field:()=>Et,FieldContent:()=>er,FieldDescription:()=>Lt,FieldError:()=>Nt,FieldGroup:()=>At,FieldLabel:()=>Ct,FieldLegend:()=>tr,FieldSeparator:()=>or,FieldSet:()=>Qo,FieldTitle:()=>sr,Form:()=>Gt,HoverCard:()=>As,HoverCardContent:()=>Cs,HoverCardTrigger:()=>Es,Icon:()=>L,Input:()=>oe,InputGroup:()=>qe,InputGroupAddon:()=>Me,InputGroupButton:()=>ze,InputGroupInput:()=>De,InputGroupText:()=>Pe,InputGroupTextarea:()=>Fe,InputOtp:()=>_e,Item:()=>Xo,Kbd:()=>ke,Label:()=>rr,Markdown:()=>Vt,MarkdownTree:()=>Zt,MarkdownTreeNode:()=>Br,Marker:()=>Oe,Menubar:()=>Ys,Message:()=>zo,MessageScroller:()=>Po,NativeSelect:()=>Be,NavigationMenu:()=>Xs,NavigationMenuItem:()=>Gs,Pagination:()=>Vs,PaginationItem:()=>Zs,Popover:()=>Ss,PopoverContent:()=>ws,PopoverTrigger:()=>xs,Progress:()=>Wo,Pwa:()=>pr,PwaBody:()=>hr,PwaClose:()=>fr,PwaContent:()=>cr,PwaDescription:()=>br,PwaFooter:()=>gr,PwaHeader:()=>ur,PwaSteps:()=>mr,PwaTitle:()=>dr,PwaTrigger:()=>lr,Questionnaire:()=>Do,QuestionnaireNext:()=>Ho,QuestionnairePrevious:()=>_o,QuestionnaireStep:()=>Fo,RadioGroup:()=>Re,RadioGroupItem:()=>$e,Resizable:()=>Lo,ScrollArea:()=>No,Select:()=>He,SelectContent:()=>Ke,SelectItem:()=>Ve,SelectTrigger:()=>We,Separator:()=>Ce,Sheet:()=>ds,SheetClose:()=>vs,SheetContent:()=>hs,SheetDescription:()=>ys,SheetFooter:()=>gs,SheetHeader:()=>ms,SheetTitle:()=>fs,SheetTrigger:()=>bs,Shell:()=>Ft,ShellContent:()=>Ht,ShellHeader:()=>ho,ShellMain:()=>bo,ShellNav:()=>uo,ShellSidebar:()=>_t,ShellSidebarHeader:()=>co,ShellUserMenu:()=>mo,Sidebar:()=>rt,SidebarClose:()=>Mt,SidebarContent:()=>vt,SidebarFooter:()=>Qs,SidebarGroup:()=>St,SidebarGroupAction:()=>zt,SidebarGroupCollapsible:()=>Pt,SidebarGroupContent:()=>ro,SidebarGroupLabel:()=>xt,SidebarHeader:()=>Js,SidebarInput:()=>so,SidebarInset:()=>to,SidebarMenu:()=>at,SidebarMenuAction:()=>Dt,SidebarMenuBadge:()=>io,SidebarMenuButton:()=>ot,SidebarMenuItem:()=>wt,SidebarMenuSkeleton:()=>no,SidebarMenuSub:()=>ao,SidebarMenuSubButton:()=>lo,SidebarMenuSubItem:()=>po,SidebarProvider:()=>kr,SidebarRail:()=>eo,SidebarSeparator:()=>oo,SidebarTrigger:()=>qt,Skeleton:()=>ut,Slider:()=>Ue,Spinner:()=>Le,Switch:()=>Te,TabContent:()=>Ot,TabTrigger:()=>ne,Table:()=>go,Tabs:()=>re,TabsContainer:()=>ae,TabsList:()=>ie,TextEditor:()=>yr,Textarea:()=>je,ThemeButton:()=>it,Toast:()=>yt,Toggle:()=>ar,ToggleGroup:()=>ir,ToggleGroupItem:()=>nr,Tooltip:()=>Ls,Typography:()=>Ne,createNamedIcon:()=>da,findMarkdownTreeNode:()=>ea,iconComponentName:()=>Aa});var jp=b(()=>{m();sa();sa();Vr(Ir)});function Lc(){return document.querySelector("[b-block-code-template]")}function Nc(t){return t.match(/<templates[^>]*>([\s\S]*)<\/templates>/)?.[1]||t}function kc(t){for(let e of t.querySelectorAll?.("[b-block] [b-icon], [b-block] [b-ui='icon']")||[])!e.hasAttribute("b-icon-base-url")&&!e.hasAttribute("b-att-base-url")&&e.setAttribute("b-icon-base-url",Cc)}var ja,Ac,Ec,Cc,Xt,Bp=b(()=>{m();Yr();Tr();Y();ni();kp();ja=Kt({storageKey:"baseui-example-theme",toggleSelector:"",labelSelector:""}),Ac=[{key:"docs",label:"Docs",href:"/docs"},{key:"icons",label:"Icons",href:"/docs/icons"},{key:"examples",label:"Examples",href:"/examples/index.html"},{key:"blocks",label:"Blocks",href:"/blocks"}],Ec={desktop:"",tablet:"768px",mobile:"390px"},Cc="/dist/icons/lucide";Xt=class extends n{setup(){this.navItems=this.props.navItems||Ac,this.previewFrame=v("previewFrame"),this.embedRoot=v("embedRoot"),this.code=Ep(),this.state=g({mode:"preview",viewport:"desktop",copyLabel:"Copy code",embed:new URLSearchParams(globalThis.location.search).get("embed")==="1",codeVariant:"owl",staticTemplate:"",staticTemplateStatus:"idle"}),O(()=>this.mountPreview()),z(()=>this.mountStaticBaseUI())}get activeCode(){return this.state.codeVariant==="template"?this.state.staticTemplateStatus==="ready"?this.state.staticTemplate:"Converting to a static template...":this.code}async setCodeVariant(e){if(this.state.codeVariant=e,e==="template"&&this.state.staticTemplateStatus==="idle"){this.state.staticTemplateStatus="loading";let s=await Lp(this.code);this.state.staticTemplate=s,this.state.staticTemplateStatus="ready"}}get title(){return document.body.dataset.blockTitle||document.title||"Block"}get description(){return document.body.dataset.blockDescription||"Preview and copy this BaseUI block."}get previewStyle(){let e=Ec[this.state.viewport]||"";return e?`max-width:${e}`:""}setMode(e){this.state.mode=e}setViewport(e){this.state.viewport=e}async copyCode(){await globalThis.navigator?.clipboard?.writeText(this.activeCode),this.state.copyLabel="Copied"}mountPreview(){this.state.embed&&(document.body.className="m-0");let e=this.state.embed?this.embedRoot.el:this.previewFrame.el,s=Lc();if(!(!e||!s)){if(s.tagName==="SCRIPT"){this.mountOwlPreview(e,s);return}e.replaceChildren(s.content.cloneNode(!0)),this.mountStaticBaseUI(e),Np(e)}}async mountOwlPreview(e,s){e.replaceChildren();let r=await Promise.resolve().then(()=>(jp(),Op));class i extends n{setup(){this.state=g({collapsed:!1})}}o(i,"components",r),o(i,"template","examples.SidebarBlock");let a=[await Rr("/dist/baseui.templates.xml"),s.textContent].map(Nc).join(`
15
- `);await Zr(i,e,{templates:`<templates>${a}</templates>`}),ja.set(ja.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){kc(e),globalThis.BaseUI?.mountAll(e),ja.set(ja.current(),{skipStorage:!0})}};o(Xt,"template","baseui.BlockViewer"),o(Xt,"components",{Button:K,Icon:L,ThemeButton:it}),o(Xt,"props",{navItems:{type:Array,optional:!0}})});var Yt,pr,lr,cr,ur,dr,br,hr,mr,gr,fr,Ip=b(()=>{m();Gr();U();Yt={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},pr=class extends n{setup(){this.pwaState=g({open:$(this.props)}),A({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.pwaState.open=$(e))})}setOpen(e){T(this.props)||(this.pwaState.open=e),this.props.onOpenChange?.(e)}};o(pr,"template","baseui.Pwa"),o(pr,"props",{open:{type:Boolean,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});lr=class extends n{onClick(){this.env.setPwaOpen(!0)}};o(lr,"template","baseui.PwaTrigger"),o(lr,"props",Yt);cr=class extends n{setup(){this.rootRef=v("root"),X(e=>{if(!e)return;let s=document.activeElement;return Pr(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(e){e.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(e){e.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};o(cr,"template","baseui.PwaContent"),o(cr,"props",Yt);ur=class extends n{};o(ur,"template","baseui.PwaHeader"),o(ur,"props",Yt);dr=class extends n{};o(dr,"template","baseui.PwaTitle"),o(dr,"props",Yt);br=class extends n{};o(br,"template","baseui.PwaDescription"),o(br,"props",Yt);hr=class extends n{};o(hr,"template","baseui.PwaBody"),o(hr,"props",Yt);mr=class extends n{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};o(mr,"template","baseui.PwaSteps"),o(mr,"props",{...Yt,steps:{type:Array,optional:!0}});gr=class extends n{};o(gr,"template","baseui.PwaFooter"),o(gr,"props",Yt);fr=class extends n{onClick(){this.env.setPwaOpen(!1)}};o(fr,"template","baseui.PwaClose"),o(fr,"props",Yt)});function Tp(t,e){return typeof t=="string"?t:e}function Oc(t){return{title:t.submitted&&t.title.trim().length>0&&t.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:t.submitted&&t.description.length>0&&t.description.length<20?"Description must be at least 20 characters.":""}}var Rp,$p,Gt,Up=b(()=>{m();Tr();U();ri();Rp="",$p="";Gt=class extends n{setup(){this.state=g({title:Tp(this.props.title,Rp),description:Tp(this.props.description,$p),submitted:!1})}get classNames(){return W("baseui-form",this.props.className)}get titlePlaceholder(){return this.props.titlePlaceholder||"Login button not working on mobile"}get descriptionPlaceholder(){return this.props.descriptionPlaceholder||"I'm having an issue with the login button on mobile."}get maxDescriptionLength(){return this.props.maxDescriptionLength||100}get descriptionLength(){return this.state.description.length}get errors(){return Oc(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=Rp,this.state.description=$p,this.state.submitted=!1}submit(e){e.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};o(Gt,"template","baseui.Form"),o(Gt,"components",{Button:K,Field:Et,FieldDescription:Lt,FieldError:Nt,FieldGroup:At,FieldLabel:Ct}),o(Gt,"props",{title:{type:String,optional:!0},description:{type:String,optional:!0},titlePlaceholder:{type:String,optional:!0},descriptionPlaceholder:{type:String,optional:!0},maxDescriptionLength:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onSubmit:{type:Function,optional:!0}})});function jc(){return mi??(mi=import("./runtime/milkdown/milkdown-text-editor.js")),mi}async function Ba(t){return(await jc()).createMilkdownTextEditor(t)}function Ia({collaborative:t,providerType:e,url:s}={}){return!!t||!!(e&&s)}var mi,gi=b(()=>{});var yr,qp=b(()=>{m();gi();yr=class extends n{setup(){this.editorRef=v("editor"),this.editorHandle=null,this.mountPromise=null,this.mountToken=0,this.isDestroyed=!1,this.state=g({content:"",status:"loading",error:""}),Jt(()=>this.load(this.props)),R(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),O(()=>this.mountEditor()),z(()=>this.mountEditor()),$r(()=>{this.isDestroyed=!0,this.destroyEditor()})}get classNames(){let e=["baseui-text-editor"];return this.props.className&&e.push(this.props.className),e.join(" ")}get isCollaborative(){return Ia({collaborative:this.props.collaborative,providerType:this.props.provider,url:this.props.url})}get editorLabel(){return this.isCollaborative?"Collaborative rich text editor":"Rich text editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.collaborative!==this.props.collaborative||e.provider!==this.props.provider||e.room!==this.props.room||e.url!==this.props.url||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);s=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}this.state.content=s,this.state.status="ready"}async mountEditor(){let e=this.editorRef.el;if(this.isDestroyed||!e||this.editorHandle||this.mountPromise||this.state.status!=="ready")return;let s=++this.mountToken;return this.mountPromise=(async()=>{try{let r=await Ba({root:e,value:this.state.content,placeholder:this.props.placeholder,collaborative:this.isCollaborative,providerType:this.props.provider,room:this.props.room||"baseui-text-editor",url:this.props.url,password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(i,a,p)=>{this.state.content=i,this.props.onChange?.(i,a,p)}});if(s!==this.mountToken){r.destroy?.();return}this.editorHandle=r}catch(r){s===this.mountToken&&(this.state.status="error",this.state.error=r.message||String(r))}finally{this.mountPromise=null,this.isDestroyed||this.mountEditor()}})(),this.mountPromise}destroyEditor(){this.mountToken++,this.editorHandle?.destroy?.(),this.editorHandle=null}};o(yr,"template","baseui.TextEditor"),o(yr,"props",{content:{type:String,optional:!0},src:{type:String,optional:!0},placeholder:{type:String,optional:!0},collaborative:{type:Boolean,optional:!0},provider:{type:String,optional:!0},room:{type:String,optional:!0},url:{type:String,optional:!0},password:{type:String,optional:!0},signaling:{type:Array,optional:!0},user:{type:Object,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var Ir={};aa(Ir,{Accordion:()=>Us,AccordionContent:()=>Ms,AccordionItem:()=>qs,AccordionTrigger:()=>$t,Alert:()=>me,AlertAction:()=>ye,AlertDescription:()=>fe,AlertDialog:()=>Ze,AlertDialogAction:()=>os,AlertDialogCancel:()=>ss,AlertDialogContent:()=>Ge,AlertDialogDescription:()=>es,AlertDialogFooter:()=>Je,AlertDialogHeader:()=>Ye,AlertDialogMedia:()=>Qe,AlertDialogTitle:()=>ts,AlertDialogTrigger:()=>Xe,AlertTitle:()=>ge,AspectRatio:()=>Ko,Attachment:()=>ko,AttachmentAction:()=>$o,AttachmentActions:()=>Ro,AttachmentContent:()=>jo,AttachmentDescription:()=>Io,AttachmentDropzone:()=>qo,AttachmentGroup:()=>Uo,AttachmentMedia:()=>Oo,AttachmentTitle:()=>Bo,AttachmentTrigger:()=>To,Avatar:()=>Mo,Badge:()=>pt,BlockViewer:()=>Xt,Breadcrumb:()=>Fs,BreadcrumbEllipsis:()=>Ut,BreadcrumbItem:()=>Hs,BreadcrumbLink:()=>Ws,BreadcrumbList:()=>_s,BreadcrumbPage:()=>Ks,BreadcrumbSeparator:()=>Tt,Bubble:()=>Vo,Button:()=>K,ButtonGroup:()=>Go,ButtonGroupSeparator:()=>Yo,ButtonGroupText:()=>Jo,Calendar:()=>fo,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>se,CardFooter:()=>te,CardHeader:()=>Qt,CardTitle:()=>ee,Carousel:()=>wo,CarouselNext:()=>Co,CarouselPrevious:()=>Eo,CarouselSlide:()=>Ao,Chart:()=>xo,Checkbox:()=>Ie,ClipboardButton:()=>kt,Collapsible:()=>zs,CollapsibleContent:()=>Ds,CollapsibleTrigger:()=>Ps,Combobox:()=>vo,Command:()=>So,ContextMenu:()=>Is,ContextMenuContent:()=>$s,ContextMenuItem:()=>Ts,ContextMenuTrigger:()=>Rs,DataTable:()=>Wt,DatePicker:()=>yo,Dialog:()=>pe,DialogClose:()=>he,DialogContent:()=>jt,DialogDescription:()=>be,DialogFooter:()=>ue,DialogHeader:()=>ce,DialogTitle:()=>de,DialogTrigger:()=>le,Direction:()=>Zo,Drawer:()=>rs,DrawerClose:()=>us,DrawerContent:()=>is,DrawerDescription:()=>cs,DrawerFooter:()=>ps,DrawerHeader:()=>ns,DrawerTitle:()=>ls,DrawerTrigger:()=>as,DropdownMenu:()=>dt,DropdownMenuCheckboxItem:()=>It,DropdownMenuContent:()=>ht,DropdownMenuGroup:()=>Ns,DropdownMenuItem:()=>mt,DropdownMenuLabel:()=>ks,DropdownMenuRadioGroup:()=>Os,DropdownMenuRadioItem:()=>Rt,DropdownMenuSeparator:()=>js,DropdownMenuShortcut:()=>Bs,DropdownMenuSub:()=>gt,DropdownMenuSubContent:()=>ft,DropdownMenuSubTrigger:()=>et,DropdownMenuTrigger:()=>bt,Empty:()=>ve,EmptyContent:()=>Ee,EmptyDescription:()=>Ae,EmptyHeader:()=>Se,EmptyMedia:()=>xe,EmptyTitle:()=>we,Field:()=>Et,FieldContent:()=>er,FieldDescription:()=>Lt,FieldError:()=>Nt,FieldGroup:()=>At,FieldLabel:()=>Ct,FieldLegend:()=>tr,FieldSeparator:()=>or,FieldSet:()=>Qo,FieldTitle:()=>sr,Form:()=>Gt,HoverCard:()=>As,HoverCardContent:()=>Cs,HoverCardTrigger:()=>Es,Icon:()=>L,Input:()=>oe,InputGroup:()=>qe,InputGroupAddon:()=>Me,InputGroupButton:()=>ze,InputGroupInput:()=>De,InputGroupText:()=>Pe,InputGroupTextarea:()=>Fe,InputOtp:()=>_e,Item:()=>Xo,Kbd:()=>ke,Label:()=>rr,Markdown:()=>Vt,MarkdownTree:()=>Zt,MarkdownTreeNode:()=>Br,Marker:()=>Oe,Menubar:()=>Ys,Message:()=>zo,MessageScroller:()=>Po,NativeSelect:()=>Be,NavigationMenu:()=>Xs,NavigationMenuItem:()=>Gs,Pagination:()=>Vs,PaginationItem:()=>Zs,Popover:()=>Ss,PopoverContent:()=>ws,PopoverTrigger:()=>xs,Progress:()=>Wo,Pwa:()=>pr,PwaBody:()=>hr,PwaClose:()=>fr,PwaContent:()=>cr,PwaDescription:()=>br,PwaFooter:()=>gr,PwaHeader:()=>ur,PwaSteps:()=>mr,PwaTitle:()=>dr,PwaTrigger:()=>lr,Questionnaire:()=>Do,QuestionnaireNext:()=>Ho,QuestionnairePrevious:()=>_o,QuestionnaireStep:()=>Fo,RadioGroup:()=>Re,RadioGroupItem:()=>$e,Resizable:()=>Lo,ScrollArea:()=>No,Select:()=>He,SelectContent:()=>Ke,SelectItem:()=>Ve,SelectTrigger:()=>We,Separator:()=>Ce,Sheet:()=>ds,SheetClose:()=>vs,SheetContent:()=>hs,SheetDescription:()=>ys,SheetFooter:()=>gs,SheetHeader:()=>ms,SheetTitle:()=>fs,SheetTrigger:()=>bs,Shell:()=>Ft,ShellContent:()=>Ht,ShellHeader:()=>ho,ShellMain:()=>bo,ShellNav:()=>uo,ShellSidebar:()=>_t,ShellSidebarHeader:()=>co,ShellUserMenu:()=>mo,Sidebar:()=>rt,SidebarClose:()=>Mt,SidebarContent:()=>vt,SidebarFooter:()=>Qs,SidebarGroup:()=>St,SidebarGroupAction:()=>zt,SidebarGroupCollapsible:()=>Pt,SidebarGroupContent:()=>ro,SidebarGroupLabel:()=>xt,SidebarHeader:()=>Js,SidebarInput:()=>so,SidebarInset:()=>to,SidebarMenu:()=>at,SidebarMenuAction:()=>Dt,SidebarMenuBadge:()=>io,SidebarMenuButton:()=>ot,SidebarMenuItem:()=>wt,SidebarMenuSkeleton:()=>no,SidebarMenuSub:()=>ao,SidebarMenuSubButton:()=>lo,SidebarMenuSubItem:()=>po,SidebarProvider:()=>kr,SidebarRail:()=>eo,SidebarSeparator:()=>oo,SidebarTrigger:()=>qt,Skeleton:()=>ut,Slider:()=>Ue,Spinner:()=>Le,Switch:()=>Te,TabContent:()=>Ot,TabTrigger:()=>ne,Table:()=>go,Tabs:()=>re,TabsContainer:()=>ae,TabsList:()=>ie,TextEditor:()=>yr,Textarea:()=>je,ThemeButton:()=>it,Toast:()=>yt,Toggle:()=>ar,ToggleGroup:()=>ir,ToggleGroupItem:()=>nr,Tooltip:()=>Ls,Typography:()=>Ne,createNamedIcon:()=>da,findMarkdownTreeNode:()=>ea,iconComponentName:()=>Aa});var sa=b(()=>{Tr();Xi();Fa();_a();Gi();Ji();Qi();en();on();rn();Va();an();nn();pn();ln();cn();un();dn();bn();hn();mn();gn();fn();yn();vn();Sn();xn();An();Cn();Ln();Ja();Nn();ti();kn();jn();Bn();In();Rn();$n();xa();qn();Mn();zn();Pn();Dn();Fn();_n();Hn();Wn();Kn();Vn();Gn();Yn();Jn();Qn();tp();ep();sp();op();rp();ap();ip();ri();Y();np();pp();ni();up();dp();wp();Ap();Bp();Ip();Up();qp()});var Ad={};aa(Ad,{Accordion:()=>Us,AccordionContent:()=>Ms,AccordionItem:()=>qs,AccordionTrigger:()=>$t,Alert:()=>me,AlertAction:()=>ye,AlertDescription:()=>fe,AlertDialog:()=>Ze,AlertDialogAction:()=>os,AlertDialogCancel:()=>ss,AlertDialogContent:()=>Ge,AlertDialogDescription:()=>es,AlertDialogFooter:()=>Je,AlertDialogHeader:()=>Ye,AlertDialogMedia:()=>Qe,AlertDialogTitle:()=>ts,AlertDialogTrigger:()=>Xe,AlertTitle:()=>ge,App:()=>Ci,AspectRatio:()=>Ko,Attachment:()=>ko,AttachmentAction:()=>$o,AttachmentActions:()=>Ro,AttachmentContent:()=>jo,AttachmentDescription:()=>Io,AttachmentDropzone:()=>qo,AttachmentGroup:()=>Uo,AttachmentMedia:()=>Oo,AttachmentTitle:()=>Bo,AttachmentTrigger:()=>To,Avatar:()=>Mo,Badge:()=>pt,BaseUI:()=>c,BaseUIComponents:()=>Ir,BaseUITheme:()=>ai,BlockViewer:()=>Xt,Breadcrumb:()=>Fs,BreadcrumbEllipsis:()=>Ut,BreadcrumbItem:()=>Hs,BreadcrumbLink:()=>Ws,BreadcrumbList:()=>_s,BreadcrumbPage:()=>Ks,BreadcrumbSeparator:()=>Tt,Bubble:()=>Vo,Button:()=>K,ButtonGroup:()=>Go,ButtonGroupSeparator:()=>Yo,ButtonGroupText:()=>Jo,Calendar:()=>fo,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>se,CardFooter:()=>te,CardHeader:()=>Qt,CardTitle:()=>ee,Carousel:()=>wo,CarouselNext:()=>Co,CarouselPrevious:()=>Eo,CarouselSlide:()=>Ao,Chart:()=>xo,Checkbox:()=>Ie,ClipboardButton:()=>kt,Collapsible:()=>zs,CollapsibleContent:()=>Ds,CollapsibleTrigger:()=>Ps,Combobox:()=>vo,Command:()=>So,Component:()=>n,ContextMenu:()=>Is,ContextMenuContent:()=>$s,ContextMenuItem:()=>Ts,ContextMenuTrigger:()=>Rs,DataTable:()=>Wt,DatePicker:()=>yo,Dialog:()=>pe,DialogClose:()=>he,DialogContent:()=>jt,DialogDescription:()=>be,DialogFooter:()=>ue,DialogHeader:()=>ce,DialogTitle:()=>de,DialogTrigger:()=>le,Direction:()=>Zo,Drawer:()=>rs,DrawerClose:()=>us,DrawerContent:()=>is,DrawerDescription:()=>cs,DrawerFooter:()=>ps,DrawerHeader:()=>ns,DrawerTitle:()=>ls,DrawerTrigger:()=>as,DropdownMenu:()=>dt,DropdownMenuCheckboxItem:()=>It,DropdownMenuContent:()=>ht,DropdownMenuGroup:()=>Ns,DropdownMenuItem:()=>mt,DropdownMenuLabel:()=>ks,DropdownMenuRadioGroup:()=>Os,DropdownMenuRadioItem:()=>Rt,DropdownMenuSeparator:()=>js,DropdownMenuShortcut:()=>Bs,DropdownMenuSub:()=>gt,DropdownMenuSubContent:()=>ft,DropdownMenuSubTrigger:()=>et,DropdownMenuTrigger:()=>bt,Empty:()=>ve,EmptyContent:()=>Ee,EmptyDescription:()=>Ae,EmptyHeader:()=>Se,EmptyMedia:()=>xe,EmptyTitle:()=>we,EventBus:()=>Li,Field:()=>Et,FieldContent:()=>er,FieldDescription:()=>Lt,FieldError:()=>Nt,FieldGroup:()=>At,FieldLabel:()=>Ct,FieldLegend:()=>tr,FieldSeparator:()=>or,FieldSet:()=>Qo,FieldTitle:()=>sr,Form:()=>Gt,HoverCard:()=>As,HoverCardContent:()=>Cs,HoverCardTrigger:()=>Es,Icon:()=>L,Input:()=>oe,InputGroup:()=>qe,InputGroupAddon:()=>Me,InputGroupButton:()=>ze,InputGroupInput:()=>De,InputGroupText:()=>Pe,InputGroupTextarea:()=>Fe,InputOtp:()=>_e,Item:()=>Xo,Kbd:()=>ke,Label:()=>rr,Markdown:()=>Vt,MarkdownTree:()=>Zt,MarkdownTreeNode:()=>Br,Marker:()=>Oe,Menubar:()=>Ys,Message:()=>zo,MessageScroller:()=>Po,NativeSelect:()=>Be,NavigationMenu:()=>Xs,NavigationMenuItem:()=>Gs,OwlError:()=>Ni,Pagination:()=>Vs,PaginationItem:()=>Zs,Popover:()=>Ss,PopoverContent:()=>ws,PopoverTrigger:()=>xs,Progress:()=>Wo,Pwa:()=>pr,PwaBody:()=>hr,PwaClose:()=>fr,PwaContent:()=>cr,PwaDescription:()=>br,PwaFooter:()=>gr,PwaHeader:()=>ur,PwaSteps:()=>mr,PwaTitle:()=>dr,PwaTrigger:()=>lr,Questionnaire:()=>Do,QuestionnaireNext:()=>Ho,QuestionnairePrevious:()=>_o,QuestionnaireStep:()=>Fo,RadioGroup:()=>Re,RadioGroupItem:()=>$e,Resizable:()=>Lo,ScrollArea:()=>No,Select:()=>He,SelectContent:()=>Ke,SelectItem:()=>Ve,SelectTrigger:()=>We,Separator:()=>Ce,Sheet:()=>ds,SheetClose:()=>vs,SheetContent:()=>hs,SheetDescription:()=>ys,SheetFooter:()=>gs,SheetHeader:()=>ms,SheetTitle:()=>fs,SheetTrigger:()=>bs,Shell:()=>Ft,ShellContent:()=>Ht,ShellHeader:()=>ho,ShellMain:()=>bo,ShellNav:()=>uo,ShellSidebar:()=>_t,ShellSidebarHeader:()=>co,ShellUserMenu:()=>mo,Sidebar:()=>rt,SidebarClose:()=>Mt,SidebarContent:()=>vt,SidebarFooter:()=>Qs,SidebarGroup:()=>St,SidebarGroupAction:()=>zt,SidebarGroupCollapsible:()=>Pt,SidebarGroupContent:()=>ro,SidebarGroupLabel:()=>xt,SidebarHeader:()=>Js,SidebarInput:()=>so,SidebarInset:()=>to,SidebarMenu:()=>at,SidebarMenuAction:()=>Dt,SidebarMenuBadge:()=>io,SidebarMenuButton:()=>ot,SidebarMenuItem:()=>wt,SidebarMenuSkeleton:()=>no,SidebarMenuSub:()=>ao,SidebarMenuSubButton:()=>lo,SidebarMenuSubItem:()=>po,SidebarProvider:()=>kr,SidebarRail:()=>eo,SidebarSeparator:()=>oo,SidebarTrigger:()=>qt,Skeleton:()=>ut,Slider:()=>Ue,Spinner:()=>Le,Switch:()=>Te,TabContent:()=>Ot,TabTrigger:()=>ne,Table:()=>go,Tabs:()=>re,TabsContainer:()=>ae,TabsList:()=>ie,TextEditor:()=>yr,Textarea:()=>je,ThemeButton:()=>it,Toast:()=>yt,Toggle:()=>ar,ToggleGroup:()=>ir,ToggleGroupItem:()=>nr,Tooltip:()=>Ls,Typography:()=>Ne,__info__:()=>ki,batched:()=>Oi,blockDom:()=>ji,createNamedIcon:()=>da,createThemeController:()=>Kt,default:()=>Zp,findMarkdownTreeNode:()=>ea,htmlEscape:()=>Bi,iconComponentName:()=>Aa,loadFile:()=>Rr,loadTemplate:()=>Sl,markRaw:()=>Ii,markup:()=>pa,mount:()=>Zr,normalizeTheme:()=>Ea,onError:()=>Ri,onMounted:()=>O,onPatched:()=>z,onRendered:()=>$i,onWillDestroy:()=>$r,onWillPatch:()=>Ti,onWillRender:()=>Ui,onWillStart:()=>Jt,onWillUnmount:()=>j,onWillUpdateProps:()=>R,rawMount:()=>cl,rawXml:()=>ul,reactive:()=>qi,registerGlobalComponents:()=>Vr,status:()=>Mi,toRaw:()=>zi,useChildSubEnv:()=>A,useComponent:()=>Pi,useEffect:()=>X,useEnv:()=>Di,useExternalListener:()=>Sr,useRef:()=>v,useState:()=>g,useSubEnv:()=>Fi,validate:()=>_i,validateType:()=>Hi,whenReady:()=>Wi,xml:()=>Ma});y();var Ei="0.0.9";m();sa();y();Gr();function Bc(t){let{open:e,close:s,destroy:r}=Sa(t,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return t.setAttribute("role","alertdialog"),t.BaseUIAlertDialog={open:e,close:s},{destroy:()=>{r(),delete t.BaseUIAlertDialog}}}c.register("alert-dialog",{type:"owl",mount:Bc});y();q();var fi={default:"baseui-alert-default",destructive:"baseui-alert-destructive",info:"baseui-alert-default",success:"alert-success",warning:"alert-warning",danger:"baseui-alert-destructive"};function Ic(t){t.classList.add("alert","baseui-alert",fi[t.getAttribute("b-att-variant")||"default"]||fi.default),t.setAttribute("role",t.getAttribute("role")||"alert");let e=null;if(!!t.getAttribute("b-att-dismissible")){if(t.classList.add("alert-dismissible","fade","show"),!t.querySelector('[data-bs-dismiss="alert"]')){let r=document.createElement("button");r.type="button",r.className="btn-close",r.setAttribute("data-bs-dismiss","alert"),r.setAttribute("aria-label","Close"),t.appendChild(r)}e=new(w()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","baseui-alert","alert-dismissible","fade","show",...Object.values(fi))}}}c.register("alert",{type:"static",mount:Ic});y();q();function Rc(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",r=new Map,i=new Map,a=new Map,p=(l,u)=>{let d=l.querySelector("[b-accordion-trigger]");l.setAttribute("b-att-state",u?"open":"closed"),d?.setAttribute("aria-expanded",String(u)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:u}}))};return t.setAttribute("role","presentation"),e.forEach((l,u)=>{let d=l.querySelector("[b-accordion-trigger]"),h=l.querySelector("[b-accordion-panel]");if(!h)return;let f=h.id||`baseui-accordion-panel-${u}`;h.id=f;let S=l.getAttribute("b-att-state")==="open";h.classList.add("collapse"),S&&h.classList.add("show");let E=new(w()).Collapse(h,{toggle:!1});a.set(l,E);let N=()=>p(l,!0),x=()=>p(l,!1);h.addEventListener("shown.bs.collapse",N),h.addEventListener("hidden.bs.collapse",x),i.set(l,{onShown:N,onHidden:x}),d?.setAttribute("aria-expanded",String(S)),d?.setAttribute("aria-controls",f);let B=()=>{let F=h.classList.contains("show");!s&&!F&&e.forEach(C=>{if(C===l)return;let H=a.get(C),G=C.querySelector("[b-accordion-panel]");H&&G?.classList.contains("show")&&H.hide()}),F?E.hide():E.show()};r.set(l,B),d?.addEventListener("click",B)}),{destroy:()=>{e.forEach(l=>{let u=l.querySelector("[b-accordion-trigger]"),d=l.querySelector("[b-accordion-panel]");u?.removeEventListener("click",r.get(l));let h=i.get(l);d&&h&&(d.removeEventListener("shown.bs.collapse",h.onShown),d.removeEventListener("hidden.bs.collapse",h.onHidden)),a.get(l)?.dispose()}),r.clear(),i.clear(),a.clear()}}}c.register("accordion",{type:"owl",mount:Rc});y();function $c(t){let e=t.getAttribute("b-att-ratio")||`${t.getAttribute("b-att-width")||16} / ${t.getAttribute("b-att-height")||9}`;return t.classList.add("baseui-aspect-ratio"),t.style.setProperty("--baseui-aspect-ratio",e),{destroy:()=>t.classList.remove("baseui-aspect-ratio")}}c.register("aspect-ratio",{type:"static",mount:$c});y();xr();var Tc=["idle","uploading","processing","error","done"],Uc=["default","sm","xs"],qc=["content","title","description","actions"];function Mp(t,e){t.classList.add(`baseui-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function Mc(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),r=Tc.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",i=Uc.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",a=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("baseui-attachment"),t.classList.add(`baseui-attachment-${r}`,`baseui-attachment-${i}`,`baseui-attachment-${a}`),t.setAttribute("data-state",r),t.setAttribute("data-size",i),t.setAttribute("data-orientation",a),t.setAttribute("data-slot","attachment"),e&&t.classList.add("baseui-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(l=>{let u=l.getAttribute("b-att-variant")==="image"?"image":"icon";Mp(l,"media"),l.classList.add(`baseui-attachment-media-${u}`),l.setAttribute("data-variant",u)}),qc.forEach(l=>t.querySelectorAll(`[b-attachment-${l}]`).forEach(u=>Mp(u,l))),t.querySelectorAll("[b-attachment-action]").forEach(l=>{let u=D[l.getAttribute("b-att-variant")]||D.ghost,d=M[l.getAttribute("b-att-size")]||M["icon-xs"];l.classList.add("btn","baseui-button",u,d,"baseui-button-icon","baseui-attachment-action"),l.setAttribute("data-slot","attachment-action"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),t.querySelectorAll("[b-attachment-trigger]").forEach(l=>{l.classList.add("baseui-attachment-trigger"),l.setAttribute("data-slot","attachment-trigger"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),e?.classList.add("form-control");let p=()=>{s&&(s.innerHTML=[...e.files].map(l=>`<li>${l.name}</li>`).join("")),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...e.files]}}))};return e?.addEventListener("change",p),{destroy:()=>e?.removeEventListener("change",p)}}function zc(t){return t.classList.add("baseui-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("baseui-attachment-group")}}function Pc(t){let e=t.querySelector("input[type='file']");t.classList.add("baseui-attachment-dropzone"),t.setAttribute("data-slot","attachment-dropzone");let s=()=>e?.click(),r=u=>{u.preventDefault(),t.classList.add("baseui-attachment-dropzone-dragging")},i=()=>t.classList.remove("baseui-attachment-dropzone-dragging"),a=u=>{u.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:u}}))},p=u=>{u.preventDefault(),t.classList.remove("baseui-attachment-dropzone-dragging"),a([...u.dataTransfer?.files??[]])},l=()=>{a([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",r),t.addEventListener("dragleave",i),t.addEventListener("drop",p),e?.addEventListener("change",l),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",r),t.removeEventListener("dragleave",i),t.removeEventListener("drop",p),e?.removeEventListener("change",l)}}}c.register("attachment",{type:"owl",mount:Mc});c.register("attachment-group",{type:"static",mount:zc});c.register("attachment-dropzone",{type:"static",mount:Pc});y();function Dc(t){t.classList.add("baseui-avatar");let e=t.querySelector("img"),s=t.querySelector("[b-avatar-fallback]");if(e&&s){let r=()=>{e.hidden=!0,s.hidden=!1};return s.hidden=!!e.getAttribute("src"),e.addEventListener("error",r),{destroy:()=>e.removeEventListener("error",r)}}return{}}c.register("avatar",{type:"static",mount:Dc});y();Da();function Fc(t){let e=wr[t.getAttribute("b-att-variant")||"secondary"]||wr.secondary;return t.classList.add("badge",e),t.getAttribute("b-att-pill")==="true"&&t.classList.add("rounded-pill"),{destroy:()=>t.classList.remove("badge","rounded-pill",...Object.values(wr))}}c.register("badge",{type:"static",mount:Fc});y();nt();function zp(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))}function Dp(t,e,s){return P(t,e,{size:s}),t}function _c(){let t=document.createElement("li"),e=document.createElement("span");return t.setAttribute("b-breadcrumb-separator",""),t.setAttribute("data-slot","breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t.className="baseui-breadcrumb-separator",e.className="baseui-breadcrumb-separator-icon",t.append(Dp(e,"chevron-right","var(--b3_5)")),t}function Hc(t){t.classList.add("baseui-breadcrumb-separator"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true")}function Wc(t){if(t.classList.add("baseui-breadcrumb-ellipsis"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-ellipsis"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),!t.querySelector(".baseui-icon")){let e=document.createElement("span");e.className="baseui-breadcrumb-ellipsis-icon",t.prepend(Dp(e,"ellipsis","var(--b4)"))}if(!t.querySelector(".visually-hidden")){let e=document.createElement("span");e.className="visually-hidden",e.textContent="More",t.append(e)}}function Pp(t){t.classList.add("baseui-breadcrumb-page"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-page"),t.setAttribute("role",t.getAttribute("role")||"link"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-current","page")}function Kc(t){let e=t.querySelector("ol, ul")||t;t.classList.add("baseui-breadcrumb"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb"),t.setAttribute("aria-label",t.getAttribute("aria-label")||"breadcrumb"),e.classList.add("breadcrumb","baseui-breadcrumb-list"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))Hc(r);for(let r of e.querySelectorAll("[b-breadcrumb-ellipsis], .baseui-breadcrumb-ellipsis"))Wc(r);for(let r of e.querySelectorAll("[b-breadcrumb-page], .baseui-breadcrumb-page"))Pp(r);e.querySelector("[b-breadcrumb-separator], .baseui-breadcrumb-separator")||zp(e).slice(0,-1).forEach(i=>i.after(_c()));let s=zp(e);return s.forEach((r,i)=>{r.classList.add("baseui-breadcrumb-item"),r.setAttribute("data-slot",r.getAttribute("data-slot")||"breadcrumb-item");for(let a of r.querySelectorAll("a"))a.classList.add("baseui-breadcrumb-link"),a.setAttribute("data-slot",a.getAttribute("data-slot")||"breadcrumb-link");if(i===s.length-1){let a=r.querySelector("[b-breadcrumb-page], .baseui-breadcrumb-page");a?Pp(a):(r.classList.add("baseui-breadcrumb-page"),r.setAttribute("aria-current",r.getAttribute("aria-current")||"page"))}}),{destroy:()=>{t.classList.remove("baseui-breadcrumb"),e.classList.remove("breadcrumb","baseui-breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator]"))r.remove()}}}c.register("breadcrumb",{type:"owl",mount:Kc});y();function Vc(t){return t.classList.add("baseui-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("baseui-bubble")}}c.register("bubble",{type:"static",mount:Vc});y();nt();xr();function Zc(t){return[...t.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).map(e=>{let s=document.createElement("span");return s.textContent=e.textContent.trim(),e.replaceWith(s),s})}function Xc(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",r=!!t.textContent.trim(),i=e&&r?Zc(t):[],a=null;return t.classList.add("btn","baseui-button",D[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),M[t.getAttribute("b-att-size")]&&t.classList.add(M[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(a=document.createElement("span"),a.setAttribute("b-icon",e),a.dataset.icon=`inline-${s}`,P(a,e,{label:""}),t.insertBefore(a,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,r||(t.dataset.iconOnly="true",t.classList.add("baseui-button-icon"))),{destroy:()=>{a?.remove();for(let p of i)p.replaceWith(document.createTextNode(p.textContent));t.classList.remove("btn","baseui-button","baseui-button-icon",...Object.values(D),...Object.values(M)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}c.register("button",{type:"static",mount:Xc});y();function Gc(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),r=[...t.querySelectorAll("[b-button-group-separator]")],i=[...t.querySelectorAll("[b-button-group-text]")];return t.classList.add("baseui-button-group",e?"btn-group-vertical":"btn-group"),(s==="sm"||s==="lg")&&t.classList.add(`btn-group-${s}`),t.setAttribute("role",t.getAttribute("role")||"group"),r.forEach(a=>{let p=a.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";a.classList.add("baseui-button-group-separator",`baseui-button-group-separator-${p}`),a.setAttribute("data-orientation",p),a.setAttribute("role","separator")}),i.forEach(a=>{a.classList.add("baseui-button-group-text")}),{destroy:()=>{t.classList.remove("baseui-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}c.register("button-group",{type:"static",mount:Gc});y();var Yc=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function Jc(t){let e=t.getAttribute("b-att-selected")?new Date(`${t.getAttribute("b-att-selected")}T00:00:00`):new Date,s=Number(t.getAttribute("b-att-month")??e.getMonth()+1)-1,r=Number(t.getAttribute("b-att-year")??e.getFullYear()),i=new Date(r,s,1),a=new Date(r,s+1,0).getDate(),p=i.getDay();t.classList.add("baseui-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
15
+ `);await Zr(i,e,{templates:`<templates>${a}</templates>`}),ja.set(ja.current(),{skipStorage:!0})}mountStaticBaseUI(e=document){kc(e),globalThis.BaseUI?.mountAll(e),ja.set(ja.current(),{skipStorage:!0})}};o(Xt,"template","baseui.BlockViewer"),o(Xt,"components",{Button:K,Icon:L,ThemeButton:it}),o(Xt,"props",{navItems:{type:Array,optional:!0}})});var Yt,pr,lr,cr,ur,dr,br,hr,mr,gr,fr,Ip=b(()=>{m();Gr();U();Yt={className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},slots:{type:Object,optional:!0}},pr=class extends n{setup(){this.pwaState=g({open:$(this.props)}),A({pwa:this.pwaState,setPwaOpen:e=>this.setOpen(e)}),R(e=>{T(e)&&(this.pwaState.open=$(e))})}setOpen(e){T(this.props)||(this.pwaState.open=e),this.props.onOpenChange?.(e)}};o(pr,"template","baseui.Pwa"),o(pr,"props",{open:{type:Boolean,optional:!0},"default-open":{type:Boolean,optional:!0},defaultOpen:{type:Boolean,optional:!0},onOpenChange:{type:Function,optional:!0},slots:{type:Object,optional:!0}});lr=class extends n{onClick(){this.env.setPwaOpen(!0)}};o(lr,"template","baseui.PwaTrigger"),o(lr,"props",Yt);cr=class extends n{setup(){this.rootRef=v("root"),X(e=>{if(!e)return;let s=document.activeElement;return Pr(this.rootRef.el)[0]?.focus(),()=>s?.focus?.()},()=>[this.env.pwa.open])}get open(){return this.env.pwa.open}onKeyDown(e){e.key==="Escape"&&this.env.setPwaOpen(!1)}onBackdropClick(e){e.target===this.rootRef.el&&this.env.setPwaOpen(!1)}};o(cr,"template","baseui.PwaContent"),o(cr,"props",Yt);ur=class extends n{};o(ur,"template","baseui.PwaHeader"),o(ur,"props",Yt);dr=class extends n{};o(dr,"template","baseui.PwaTitle"),o(dr,"props",Yt);br=class extends n{};o(br,"template","baseui.PwaDescription"),o(br,"props",Yt);hr=class extends n{};o(hr,"template","baseui.PwaBody"),o(hr,"props",Yt);mr=class extends n{get steps(){return Array.isArray(this.props.steps)?this.props.steps:[]}};o(mr,"template","baseui.PwaSteps"),o(mr,"props",{...Yt,steps:{type:Array,optional:!0}});gr=class extends n{};o(gr,"template","baseui.PwaFooter"),o(gr,"props",Yt);fr=class extends n{onClick(){this.env.setPwaOpen(!1)}};o(fr,"template","baseui.PwaClose"),o(fr,"props",Yt)});function Tp(t,e){return typeof t=="string"?t:e}function Oc(t){return{title:t.submitted&&t.title.trim().length>0&&t.title.trim().length<5?"Bug title must be at least 5 characters.":"",description:t.submitted&&t.description.length>0&&t.description.length<20?"Description must be at least 20 characters.":""}}var Rp,$p,Gt,Up=b(()=>{m();Tr();U();ri();Rp="",$p="";Gt=class extends n{setup(){this.state=g({title:Tp(this.props.title,Rp),description:Tp(this.props.description,$p),submitted:!1})}get classNames(){return W("baseui-form",this.props.className)}get titlePlaceholder(){return this.props.titlePlaceholder||"Login button not working on mobile"}get descriptionPlaceholder(){return this.props.descriptionPlaceholder||"I'm having an issue with the login button on mobile."}get maxDescriptionLength(){return this.props.maxDescriptionLength||100}get descriptionLength(){return this.state.description.length}get errors(){return Oc(this.state)}get titleInvalid(){return!!this.errors.title}get descriptionInvalid(){return!!this.errors.description}reset(){this.state.title=Rp,this.state.description=$p,this.state.submitted=!1}submit(e){e.preventDefault(),this.state.submitted=!0,!this.titleInvalid&&!this.descriptionInvalid&&this.props.onSubmit?.({title:this.state.title.trim(),description:this.state.description})}};o(Gt,"template","baseui.Form"),o(Gt,"components",{Button:K,Field:Et,FieldDescription:Lt,FieldError:Nt,FieldGroup:At,FieldLabel:Ct}),o(Gt,"props",{title:{type:String,optional:!0},description:{type:String,optional:!0},titlePlaceholder:{type:String,optional:!0},descriptionPlaceholder:{type:String,optional:!0},maxDescriptionLength:{type:Number,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0},onSubmit:{type:Function,optional:!0}})});function jc(){return mi??(mi=import("./runtime/milkdown/milkdown-text-editor.js")),mi}async function Ba(t){return(await jc()).createMilkdownTextEditor(t)}function Ia({collaborative:t,providerType:e,url:s}={}){return!!t||!!(e&&s)}var mi,gi=b(()=>{});var yr,qp=b(()=>{m();gi();yr=class extends n{setup(){this.editorRef=v("editor"),this.editorHandle=null,this.mountPromise=null,this.mountToken=0,this.isDestroyed=!1,this.state=g({content:"",status:"loading",error:""}),Jt(()=>this.load(this.props)),R(e=>{if(this.shouldReload(e))return this.load(e);this.shouldRestartEditor(e)&&this.destroyEditor()}),O(()=>this.mountEditor()),z(()=>this.mountEditor()),$r(()=>{this.isDestroyed=!0,this.destroyEditor()})}get classNames(){let e=["baseui-text-editor"];return this.props.className&&e.push(this.props.className),e.join(" ")}get isCollaborative(){return Ia({collaborative:this.props.collaborative,providerType:this.props.provider,url:this.props.url})}get editorLabel(){return this.isCollaborative?"Collaborative rich text editor":"Rich text editor"}shouldReload(e){return e.content!==this.props.content||e.src!==this.props.src}shouldRestartEditor(e){return e.collaborative!==this.props.collaborative||e.provider!==this.props.provider||e.room!==this.props.room||e.url!==this.props.url||e.password!==this.props.password||e.signaling!==this.props.signaling}async load(e){this.destroyEditor(),this.state.status="loading",this.state.error="";let s=e.content??"";if(e.src)try{let r=await fetch(e.src);if(!r.ok)throw new Error(`${r.status} ${r.statusText}`);s=await r.text()}catch(r){this.state.status="error",this.state.error=r.message||String(r);return}this.state.content=s,this.state.status="ready"}async mountEditor(){let e=this.editorRef.el;if(this.isDestroyed||!e||this.editorHandle||this.mountPromise||this.state.status!=="ready")return;let s=++this.mountToken;return this.mountPromise=(async()=>{try{let r=await Ba({root:e,value:this.state.content,placeholder:this.props.placeholder,collaborative:this.isCollaborative,providerType:this.props.provider,room:this.props.room||"baseui-text-editor",url:this.props.url,password:this.props.password,signaling:this.props.signaling,user:this.props.user,onChange:(i,a,p)=>{this.state.content=i,this.props.onChange?.(i,a,p)}});if(s!==this.mountToken){r.destroy?.();return}this.editorHandle=r}catch(r){s===this.mountToken&&(this.state.status="error",this.state.error=r.message||String(r))}finally{this.mountPromise=null,this.isDestroyed||this.mountEditor()}})(),this.mountPromise}destroyEditor(){this.mountToken++,this.editorHandle?.destroy?.(),this.editorHandle=null}};o(yr,"template","baseui.TextEditor"),o(yr,"props",{content:{type:String,optional:!0},src:{type:String,optional:!0},placeholder:{type:String,optional:!0},collaborative:{type:Boolean,optional:!0},provider:{type:String,optional:!0},room:{type:String,optional:!0},url:{type:String,optional:!0},password:{type:String,optional:!0},signaling:{type:Array,optional:!0},user:{type:Object,optional:!0},onChange:{type:Function,optional:!0},className:{type:String,optional:!0},style:{type:[String,Object],optional:!0}})});var Ir={};aa(Ir,{Accordion:()=>Us,AccordionContent:()=>Ms,AccordionItem:()=>qs,AccordionTrigger:()=>$t,Alert:()=>me,AlertAction:()=>ye,AlertDescription:()=>fe,AlertDialog:()=>Ze,AlertDialogAction:()=>os,AlertDialogCancel:()=>ss,AlertDialogContent:()=>Ge,AlertDialogDescription:()=>es,AlertDialogFooter:()=>Je,AlertDialogHeader:()=>Ye,AlertDialogMedia:()=>Qe,AlertDialogTitle:()=>ts,AlertDialogTrigger:()=>Xe,AlertTitle:()=>ge,AspectRatio:()=>Ko,Attachment:()=>ko,AttachmentAction:()=>$o,AttachmentActions:()=>Ro,AttachmentContent:()=>jo,AttachmentDescription:()=>Io,AttachmentDropzone:()=>qo,AttachmentGroup:()=>Uo,AttachmentMedia:()=>Oo,AttachmentTitle:()=>Bo,AttachmentTrigger:()=>To,Avatar:()=>Mo,Badge:()=>pt,BlockViewer:()=>Xt,Breadcrumb:()=>Fs,BreadcrumbEllipsis:()=>Ut,BreadcrumbItem:()=>Hs,BreadcrumbLink:()=>Ws,BreadcrumbList:()=>_s,BreadcrumbPage:()=>Ks,BreadcrumbSeparator:()=>Tt,Bubble:()=>Vo,Button:()=>K,ButtonGroup:()=>Go,ButtonGroupSeparator:()=>Yo,ButtonGroupText:()=>Jo,Calendar:()=>fo,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>se,CardFooter:()=>te,CardHeader:()=>Qt,CardTitle:()=>ee,Carousel:()=>wo,CarouselNext:()=>Co,CarouselPrevious:()=>Eo,CarouselSlide:()=>Ao,Chart:()=>xo,Checkbox:()=>Ie,ClipboardButton:()=>kt,Collapsible:()=>zs,CollapsibleContent:()=>Ds,CollapsibleTrigger:()=>Ps,Combobox:()=>vo,Command:()=>So,ContextMenu:()=>Is,ContextMenuContent:()=>$s,ContextMenuItem:()=>Ts,ContextMenuTrigger:()=>Rs,DataTable:()=>Wt,DatePicker:()=>yo,Dialog:()=>pe,DialogClose:()=>he,DialogContent:()=>jt,DialogDescription:()=>be,DialogFooter:()=>ue,DialogHeader:()=>ce,DialogTitle:()=>de,DialogTrigger:()=>le,Direction:()=>Zo,Drawer:()=>rs,DrawerClose:()=>us,DrawerContent:()=>is,DrawerDescription:()=>cs,DrawerFooter:()=>ps,DrawerHeader:()=>ns,DrawerTitle:()=>ls,DrawerTrigger:()=>as,DropdownMenu:()=>dt,DropdownMenuCheckboxItem:()=>It,DropdownMenuContent:()=>ht,DropdownMenuGroup:()=>Ns,DropdownMenuItem:()=>mt,DropdownMenuLabel:()=>ks,DropdownMenuRadioGroup:()=>Os,DropdownMenuRadioItem:()=>Rt,DropdownMenuSeparator:()=>js,DropdownMenuShortcut:()=>Bs,DropdownMenuSub:()=>gt,DropdownMenuSubContent:()=>ft,DropdownMenuSubTrigger:()=>et,DropdownMenuTrigger:()=>bt,Empty:()=>ve,EmptyContent:()=>Ee,EmptyDescription:()=>Ae,EmptyHeader:()=>Se,EmptyMedia:()=>xe,EmptyTitle:()=>we,Field:()=>Et,FieldContent:()=>er,FieldDescription:()=>Lt,FieldError:()=>Nt,FieldGroup:()=>At,FieldLabel:()=>Ct,FieldLegend:()=>tr,FieldSeparator:()=>or,FieldSet:()=>Qo,FieldTitle:()=>sr,Form:()=>Gt,HoverCard:()=>As,HoverCardContent:()=>Cs,HoverCardTrigger:()=>Es,Icon:()=>L,Input:()=>oe,InputGroup:()=>qe,InputGroupAddon:()=>Me,InputGroupButton:()=>ze,InputGroupInput:()=>De,InputGroupText:()=>Pe,InputGroupTextarea:()=>Fe,InputOtp:()=>_e,Item:()=>Xo,Kbd:()=>ke,Label:()=>rr,Markdown:()=>Vt,MarkdownTree:()=>Zt,MarkdownTreeNode:()=>Br,Marker:()=>Oe,Menubar:()=>Ys,Message:()=>zo,MessageScroller:()=>Po,NativeSelect:()=>Be,NavigationMenu:()=>Xs,NavigationMenuItem:()=>Gs,Pagination:()=>Vs,PaginationItem:()=>Zs,Popover:()=>Ss,PopoverContent:()=>ws,PopoverTrigger:()=>xs,Progress:()=>Wo,Pwa:()=>pr,PwaBody:()=>hr,PwaClose:()=>fr,PwaContent:()=>cr,PwaDescription:()=>br,PwaFooter:()=>gr,PwaHeader:()=>ur,PwaSteps:()=>mr,PwaTitle:()=>dr,PwaTrigger:()=>lr,Questionnaire:()=>Do,QuestionnaireNext:()=>Ho,QuestionnairePrevious:()=>_o,QuestionnaireStep:()=>Fo,RadioGroup:()=>Re,RadioGroupItem:()=>$e,Resizable:()=>Lo,ScrollArea:()=>No,Select:()=>He,SelectContent:()=>Ke,SelectItem:()=>Ve,SelectTrigger:()=>We,Separator:()=>Ce,Sheet:()=>ds,SheetClose:()=>vs,SheetContent:()=>hs,SheetDescription:()=>ys,SheetFooter:()=>gs,SheetHeader:()=>ms,SheetTitle:()=>fs,SheetTrigger:()=>bs,Shell:()=>Ft,ShellContent:()=>Ht,ShellHeader:()=>ho,ShellMain:()=>bo,ShellNav:()=>uo,ShellSidebar:()=>_t,ShellSidebarHeader:()=>co,ShellUserMenu:()=>mo,Sidebar:()=>rt,SidebarClose:()=>Mt,SidebarContent:()=>vt,SidebarFooter:()=>Qs,SidebarGroup:()=>St,SidebarGroupAction:()=>zt,SidebarGroupCollapsible:()=>Pt,SidebarGroupContent:()=>ro,SidebarGroupLabel:()=>xt,SidebarHeader:()=>Js,SidebarInput:()=>so,SidebarInset:()=>to,SidebarMenu:()=>at,SidebarMenuAction:()=>Dt,SidebarMenuBadge:()=>io,SidebarMenuButton:()=>ot,SidebarMenuItem:()=>wt,SidebarMenuSkeleton:()=>no,SidebarMenuSub:()=>ao,SidebarMenuSubButton:()=>lo,SidebarMenuSubItem:()=>po,SidebarProvider:()=>kr,SidebarRail:()=>eo,SidebarSeparator:()=>oo,SidebarTrigger:()=>qt,Skeleton:()=>ut,Slider:()=>Ue,Spinner:()=>Le,Switch:()=>Te,TabContent:()=>Ot,TabTrigger:()=>ne,Table:()=>go,Tabs:()=>re,TabsContainer:()=>ae,TabsList:()=>ie,TextEditor:()=>yr,Textarea:()=>je,ThemeButton:()=>it,Toast:()=>yt,Toggle:()=>ar,ToggleGroup:()=>ir,ToggleGroupItem:()=>nr,Tooltip:()=>Ls,Typography:()=>Ne,createNamedIcon:()=>da,findMarkdownTreeNode:()=>ea,iconComponentName:()=>Aa});var sa=b(()=>{Tr();Xi();Fa();_a();Gi();Ji();Qi();en();on();rn();Va();an();nn();pn();ln();cn();un();dn();bn();hn();mn();gn();fn();yn();vn();Sn();xn();An();Cn();Ln();Ja();Nn();ti();kn();jn();Bn();In();Rn();$n();xa();qn();Mn();zn();Pn();Dn();Fn();_n();Hn();Wn();Kn();Vn();Gn();Yn();Jn();Qn();tp();ep();sp();op();rp();ap();ip();ri();Y();np();pp();ni();up();dp();wp();Ap();Bp();Ip();Up();qp()});var Ad={};aa(Ad,{Accordion:()=>Us,AccordionContent:()=>Ms,AccordionItem:()=>qs,AccordionTrigger:()=>$t,Alert:()=>me,AlertAction:()=>ye,AlertDescription:()=>fe,AlertDialog:()=>Ze,AlertDialogAction:()=>os,AlertDialogCancel:()=>ss,AlertDialogContent:()=>Ge,AlertDialogDescription:()=>es,AlertDialogFooter:()=>Je,AlertDialogHeader:()=>Ye,AlertDialogMedia:()=>Qe,AlertDialogTitle:()=>ts,AlertDialogTrigger:()=>Xe,AlertTitle:()=>ge,App:()=>Ci,AspectRatio:()=>Ko,Attachment:()=>ko,AttachmentAction:()=>$o,AttachmentActions:()=>Ro,AttachmentContent:()=>jo,AttachmentDescription:()=>Io,AttachmentDropzone:()=>qo,AttachmentGroup:()=>Uo,AttachmentMedia:()=>Oo,AttachmentTitle:()=>Bo,AttachmentTrigger:()=>To,Avatar:()=>Mo,Badge:()=>pt,BaseUI:()=>c,BaseUIComponents:()=>Ir,BaseUITheme:()=>ai,BlockViewer:()=>Xt,Breadcrumb:()=>Fs,BreadcrumbEllipsis:()=>Ut,BreadcrumbItem:()=>Hs,BreadcrumbLink:()=>Ws,BreadcrumbList:()=>_s,BreadcrumbPage:()=>Ks,BreadcrumbSeparator:()=>Tt,Bubble:()=>Vo,Button:()=>K,ButtonGroup:()=>Go,ButtonGroupSeparator:()=>Yo,ButtonGroupText:()=>Jo,Calendar:()=>fo,Card:()=>lt,CardBody:()=>ct,CardDescription:()=>se,CardFooter:()=>te,CardHeader:()=>Qt,CardTitle:()=>ee,Carousel:()=>wo,CarouselNext:()=>Co,CarouselPrevious:()=>Eo,CarouselSlide:()=>Ao,Chart:()=>xo,Checkbox:()=>Ie,ClipboardButton:()=>kt,Collapsible:()=>zs,CollapsibleContent:()=>Ds,CollapsibleTrigger:()=>Ps,Combobox:()=>vo,Command:()=>So,Component:()=>n,ContextMenu:()=>Is,ContextMenuContent:()=>$s,ContextMenuItem:()=>Ts,ContextMenuTrigger:()=>Rs,DataTable:()=>Wt,DatePicker:()=>yo,Dialog:()=>pe,DialogClose:()=>he,DialogContent:()=>jt,DialogDescription:()=>be,DialogFooter:()=>ue,DialogHeader:()=>ce,DialogTitle:()=>de,DialogTrigger:()=>le,Direction:()=>Zo,Drawer:()=>rs,DrawerClose:()=>us,DrawerContent:()=>is,DrawerDescription:()=>cs,DrawerFooter:()=>ps,DrawerHeader:()=>ns,DrawerTitle:()=>ls,DrawerTrigger:()=>as,DropdownMenu:()=>dt,DropdownMenuCheckboxItem:()=>It,DropdownMenuContent:()=>ht,DropdownMenuGroup:()=>Ns,DropdownMenuItem:()=>mt,DropdownMenuLabel:()=>ks,DropdownMenuRadioGroup:()=>Os,DropdownMenuRadioItem:()=>Rt,DropdownMenuSeparator:()=>js,DropdownMenuShortcut:()=>Bs,DropdownMenuSub:()=>gt,DropdownMenuSubContent:()=>ft,DropdownMenuSubTrigger:()=>et,DropdownMenuTrigger:()=>bt,Empty:()=>ve,EmptyContent:()=>Ee,EmptyDescription:()=>Ae,EmptyHeader:()=>Se,EmptyMedia:()=>xe,EmptyTitle:()=>we,EventBus:()=>Li,Field:()=>Et,FieldContent:()=>er,FieldDescription:()=>Lt,FieldError:()=>Nt,FieldGroup:()=>At,FieldLabel:()=>Ct,FieldLegend:()=>tr,FieldSeparator:()=>or,FieldSet:()=>Qo,FieldTitle:()=>sr,Form:()=>Gt,HoverCard:()=>As,HoverCardContent:()=>Cs,HoverCardTrigger:()=>Es,Icon:()=>L,Input:()=>oe,InputGroup:()=>qe,InputGroupAddon:()=>Me,InputGroupButton:()=>ze,InputGroupInput:()=>De,InputGroupText:()=>Pe,InputGroupTextarea:()=>Fe,InputOtp:()=>_e,Item:()=>Xo,Kbd:()=>ke,Label:()=>rr,Markdown:()=>Vt,MarkdownTree:()=>Zt,MarkdownTreeNode:()=>Br,Marker:()=>Oe,Menubar:()=>Ys,Message:()=>zo,MessageScroller:()=>Po,NativeSelect:()=>Be,NavigationMenu:()=>Xs,NavigationMenuItem:()=>Gs,OwlError:()=>Ni,Pagination:()=>Vs,PaginationItem:()=>Zs,Popover:()=>Ss,PopoverContent:()=>ws,PopoverTrigger:()=>xs,Progress:()=>Wo,Pwa:()=>pr,PwaBody:()=>hr,PwaClose:()=>fr,PwaContent:()=>cr,PwaDescription:()=>br,PwaFooter:()=>gr,PwaHeader:()=>ur,PwaSteps:()=>mr,PwaTitle:()=>dr,PwaTrigger:()=>lr,Questionnaire:()=>Do,QuestionnaireNext:()=>Ho,QuestionnairePrevious:()=>_o,QuestionnaireStep:()=>Fo,RadioGroup:()=>Re,RadioGroupItem:()=>$e,Resizable:()=>Lo,ScrollArea:()=>No,Select:()=>He,SelectContent:()=>Ke,SelectItem:()=>Ve,SelectTrigger:()=>We,Separator:()=>Ce,Sheet:()=>ds,SheetClose:()=>vs,SheetContent:()=>hs,SheetDescription:()=>ys,SheetFooter:()=>gs,SheetHeader:()=>ms,SheetTitle:()=>fs,SheetTrigger:()=>bs,Shell:()=>Ft,ShellContent:()=>Ht,ShellHeader:()=>ho,ShellMain:()=>bo,ShellNav:()=>uo,ShellSidebar:()=>_t,ShellSidebarHeader:()=>co,ShellUserMenu:()=>mo,Sidebar:()=>rt,SidebarClose:()=>Mt,SidebarContent:()=>vt,SidebarFooter:()=>Qs,SidebarGroup:()=>St,SidebarGroupAction:()=>zt,SidebarGroupCollapsible:()=>Pt,SidebarGroupContent:()=>ro,SidebarGroupLabel:()=>xt,SidebarHeader:()=>Js,SidebarInput:()=>so,SidebarInset:()=>to,SidebarMenu:()=>at,SidebarMenuAction:()=>Dt,SidebarMenuBadge:()=>io,SidebarMenuButton:()=>ot,SidebarMenuItem:()=>wt,SidebarMenuSkeleton:()=>no,SidebarMenuSub:()=>ao,SidebarMenuSubButton:()=>lo,SidebarMenuSubItem:()=>po,SidebarProvider:()=>kr,SidebarRail:()=>eo,SidebarSeparator:()=>oo,SidebarTrigger:()=>qt,Skeleton:()=>ut,Slider:()=>Ue,Spinner:()=>Le,Switch:()=>Te,TabContent:()=>Ot,TabTrigger:()=>ne,Table:()=>go,Tabs:()=>re,TabsContainer:()=>ae,TabsList:()=>ie,TextEditor:()=>yr,Textarea:()=>je,ThemeButton:()=>it,Toast:()=>yt,Toggle:()=>ar,ToggleGroup:()=>ir,ToggleGroupItem:()=>nr,Tooltip:()=>Ls,Typography:()=>Ne,__info__:()=>ki,batched:()=>Oi,blockDom:()=>ji,createNamedIcon:()=>da,createThemeController:()=>Kt,default:()=>Zp,findMarkdownTreeNode:()=>ea,htmlEscape:()=>Bi,iconComponentName:()=>Aa,loadFile:()=>Rr,loadTemplate:()=>Sl,markRaw:()=>Ii,markup:()=>pa,mount:()=>Zr,normalizeTheme:()=>Ea,onError:()=>Ri,onMounted:()=>O,onPatched:()=>z,onRendered:()=>$i,onWillDestroy:()=>$r,onWillPatch:()=>Ti,onWillRender:()=>Ui,onWillStart:()=>Jt,onWillUnmount:()=>j,onWillUpdateProps:()=>R,rawMount:()=>cl,rawXml:()=>ul,reactive:()=>qi,registerGlobalComponents:()=>Vr,status:()=>Mi,toRaw:()=>zi,useChildSubEnv:()=>A,useComponent:()=>Pi,useEffect:()=>X,useEnv:()=>Di,useExternalListener:()=>Sr,useRef:()=>v,useState:()=>g,useSubEnv:()=>Fi,validate:()=>_i,validateType:()=>Hi,whenReady:()=>Wi,xml:()=>Ma});y();var Ei="0.0.10";m();sa();y();Gr();function Bc(t){let{open:e,close:s,destroy:r}=Sa(t,{closeSelector:"[b-alert-dialog-cancel], [b-alert-dialog-action], [b-alert-dialog-close]",trapFocus:!0});return t.setAttribute("role","alertdialog"),t.BaseUIAlertDialog={open:e,close:s},{destroy:()=>{r(),delete t.BaseUIAlertDialog}}}c.register("alert-dialog",{type:"owl",mount:Bc});y();q();var fi={default:"baseui-alert-default",destructive:"baseui-alert-destructive",info:"baseui-alert-default",success:"alert-success",warning:"alert-warning",danger:"baseui-alert-destructive"};function Ic(t){t.classList.add("alert","baseui-alert",fi[t.getAttribute("b-att-variant")||"default"]||fi.default),t.setAttribute("role",t.getAttribute("role")||"alert");let e=null;if(!!t.getAttribute("b-att-dismissible")){if(t.classList.add("alert-dismissible","fade","show"),!t.querySelector('[data-bs-dismiss="alert"]')){let r=document.createElement("button");r.type="button",r.className="btn-close",r.setAttribute("data-bs-dismiss","alert"),r.setAttribute("aria-label","Close"),t.appendChild(r)}e=new(w()).Alert(t)}return{destroy:()=>{e?.dispose(),t.classList.remove("alert","baseui-alert","alert-dismissible","fade","show",...Object.values(fi))}}}c.register("alert",{type:"static",mount:Ic});y();q();function Rc(t){let e=[...t.querySelectorAll("[b-accordion-item]")],s=t.getAttribute("b-att-multiple")==="true",r=new Map,i=new Map,a=new Map,p=(l,u)=>{let d=l.querySelector("[b-accordion-trigger]");l.setAttribute("b-att-state",u?"open":"closed"),d?.setAttribute("aria-expanded",String(u)),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{open:u}}))};return t.setAttribute("role","presentation"),e.forEach((l,u)=>{let d=l.querySelector("[b-accordion-trigger]"),h=l.querySelector("[b-accordion-panel]");if(!h)return;let f=h.id||`baseui-accordion-panel-${u}`;h.id=f;let S=l.getAttribute("b-att-state")==="open";h.classList.add("collapse"),S&&h.classList.add("show");let E=new(w()).Collapse(h,{toggle:!1});a.set(l,E);let N=()=>p(l,!0),x=()=>p(l,!1);h.addEventListener("shown.bs.collapse",N),h.addEventListener("hidden.bs.collapse",x),i.set(l,{onShown:N,onHidden:x}),d?.setAttribute("aria-expanded",String(S)),d?.setAttribute("aria-controls",f);let B=()=>{let F=h.classList.contains("show");!s&&!F&&e.forEach(C=>{if(C===l)return;let H=a.get(C),G=C.querySelector("[b-accordion-panel]");H&&G?.classList.contains("show")&&H.hide()}),F?E.hide():E.show()};r.set(l,B),d?.addEventListener("click",B)}),{destroy:()=>{e.forEach(l=>{let u=l.querySelector("[b-accordion-trigger]"),d=l.querySelector("[b-accordion-panel]");u?.removeEventListener("click",r.get(l));let h=i.get(l);d&&h&&(d.removeEventListener("shown.bs.collapse",h.onShown),d.removeEventListener("hidden.bs.collapse",h.onHidden)),a.get(l)?.dispose()}),r.clear(),i.clear(),a.clear()}}}c.register("accordion",{type:"owl",mount:Rc});y();function $c(t){let e=t.getAttribute("b-att-ratio")||`${t.getAttribute("b-att-width")||16} / ${t.getAttribute("b-att-height")||9}`;return t.classList.add("baseui-aspect-ratio"),t.style.setProperty("--baseui-aspect-ratio",e),{destroy:()=>t.classList.remove("baseui-aspect-ratio")}}c.register("aspect-ratio",{type:"static",mount:$c});y();xr();var Tc=["idle","uploading","processing","error","done"],Uc=["default","sm","xs"],qc=["content","title","description","actions"];function Mp(t,e){t.classList.add(`baseui-attachment-${e}`),t.setAttribute("data-slot",`attachment-${e}`)}function Mc(t){let e=t.querySelector("input[type='file']"),s=t.querySelector("[b-attachment-list]"),r=Tc.includes(t.getAttribute("b-att-state"))?t.getAttribute("b-att-state"):"done",i=Uc.includes(t.getAttribute("b-att-size"))?t.getAttribute("b-att-size"):"default",a=t.getAttribute("b-att-orientation")==="vertical"?"vertical":"horizontal";t.classList.add("baseui-attachment"),t.classList.add(`baseui-attachment-${r}`,`baseui-attachment-${i}`,`baseui-attachment-${a}`),t.setAttribute("data-state",r),t.setAttribute("data-size",i),t.setAttribute("data-orientation",a),t.setAttribute("data-slot","attachment"),e&&t.classList.add("baseui-attachment-picker"),t.querySelectorAll("[b-attachment-media]").forEach(l=>{let u=l.getAttribute("b-att-variant")==="image"?"image":"icon";Mp(l,"media"),l.classList.add(`baseui-attachment-media-${u}`),l.setAttribute("data-variant",u)}),qc.forEach(l=>t.querySelectorAll(`[b-attachment-${l}]`).forEach(u=>Mp(u,l))),t.querySelectorAll("[b-attachment-action]").forEach(l=>{let u=D[l.getAttribute("b-att-variant")]||D.ghost,d=M[l.getAttribute("b-att-size")]||M["icon-xs"];l.classList.add("btn","baseui-button",u,d,"baseui-button-icon","baseui-attachment-action"),l.setAttribute("data-slot","attachment-action"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),t.querySelectorAll("[b-attachment-trigger]").forEach(l=>{l.classList.add("baseui-attachment-trigger"),l.setAttribute("data-slot","attachment-trigger"),!l.getAttribute("type")&&l.tagName==="BUTTON"&&l.setAttribute("type","button")}),e?.classList.add("form-control");let p=()=>{s&&(s.innerHTML=[...e.files].map(l=>`<li>${l.name}</li>`).join("")),t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:[...e.files]}}))};return e?.addEventListener("change",p),{destroy:()=>e?.removeEventListener("change",p)}}function zc(t){return t.classList.add("baseui-attachment-group"),t.setAttribute("data-slot","attachment-group"),{destroy:()=>t.classList.remove("baseui-attachment-group")}}function Pc(t){let e=t.querySelector("input[type='file']");t.classList.add("baseui-attachment-dropzone"),t.setAttribute("data-slot","attachment-dropzone");let s=()=>e?.click(),r=u=>{u.preventDefault(),t.classList.add("baseui-attachment-dropzone-dragging")},i=()=>t.classList.remove("baseui-attachment-dropzone-dragging"),a=u=>{u.length&&t.dispatchEvent(new CustomEvent("baseui:change",{bubbles:!0,detail:{files:u}}))},p=u=>{u.preventDefault(),t.classList.remove("baseui-attachment-dropzone-dragging"),a([...u.dataTransfer?.files??[]])},l=()=>{a([...e?.files??[]]),e&&(e.value="")};return t.addEventListener("click",s),t.addEventListener("dragover",r),t.addEventListener("dragleave",i),t.addEventListener("drop",p),e?.addEventListener("change",l),{destroy:()=>{t.removeEventListener("click",s),t.removeEventListener("dragover",r),t.removeEventListener("dragleave",i),t.removeEventListener("drop",p),e?.removeEventListener("change",l)}}}c.register("attachment",{type:"owl",mount:Mc});c.register("attachment-group",{type:"static",mount:zc});c.register("attachment-dropzone",{type:"static",mount:Pc});y();function Dc(t){t.classList.add("baseui-avatar");let e=t.querySelector("img"),s=t.querySelector("[b-avatar-fallback]");if(e&&s){let r=()=>{e.hidden=!0,s.hidden=!1};return s.hidden=!!e.getAttribute("src"),e.addEventListener("error",r),{destroy:()=>e.removeEventListener("error",r)}}return{}}c.register("avatar",{type:"static",mount:Dc});y();Da();function Fc(t){let e=wr[t.getAttribute("b-att-variant")||"secondary"]||wr.secondary;return t.classList.add("badge",e),t.getAttribute("b-att-pill")==="true"&&t.classList.add("rounded-pill"),{destroy:()=>t.classList.remove("badge","rounded-pill",...Object.values(wr))}}c.register("badge",{type:"static",mount:Fc});y();nt();function zp(t){return[...t.children].filter(e=>!e.matches("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))}function Dp(t,e,s){return P(t,e,{size:s}),t}function _c(){let t=document.createElement("li"),e=document.createElement("span");return t.setAttribute("b-breadcrumb-separator",""),t.setAttribute("data-slot","breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),t.className="baseui-breadcrumb-separator",e.className="baseui-breadcrumb-separator-icon",t.append(Dp(e,"chevron-right","var(--b3_5)")),t}function Hc(t){t.classList.add("baseui-breadcrumb-separator"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-separator"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true")}function Wc(t){if(t.classList.add("baseui-breadcrumb-ellipsis"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-ellipsis"),t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true"),!t.querySelector(".baseui-icon")){let e=document.createElement("span");e.className="baseui-breadcrumb-ellipsis-icon",t.prepend(Dp(e,"ellipsis","var(--b4)"))}if(!t.querySelector(".visually-hidden")){let e=document.createElement("span");e.className="visually-hidden",e.textContent="More",t.append(e)}}function Pp(t){t.classList.add("baseui-breadcrumb-page"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb-page"),t.setAttribute("role",t.getAttribute("role")||"link"),t.setAttribute("aria-disabled","true"),t.setAttribute("aria-current","page")}function Kc(t){let e=t.querySelector("ol, ul")||t;t.classList.add("baseui-breadcrumb"),t.setAttribute("data-slot",t.getAttribute("data-slot")||"breadcrumb"),t.setAttribute("aria-label",t.getAttribute("aria-label")||"breadcrumb"),e.classList.add("breadcrumb","baseui-breadcrumb-list"),e.setAttribute("data-slot",e.getAttribute("data-slot")||"breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator], .baseui-breadcrumb-separator"))Hc(r);for(let r of e.querySelectorAll("[b-breadcrumb-ellipsis], .baseui-breadcrumb-ellipsis"))Wc(r);for(let r of e.querySelectorAll("[b-breadcrumb-page], .baseui-breadcrumb-page"))Pp(r);e.querySelector("[b-breadcrumb-separator], .baseui-breadcrumb-separator")||zp(e).slice(0,-1).forEach(i=>i.after(_c()));let s=zp(e);return s.forEach((r,i)=>{r.classList.add("baseui-breadcrumb-item"),r.setAttribute("data-slot",r.getAttribute("data-slot")||"breadcrumb-item");for(let a of r.querySelectorAll("a"))a.classList.add("baseui-breadcrumb-link"),a.setAttribute("data-slot",a.getAttribute("data-slot")||"breadcrumb-link");if(i===s.length-1){let a=r.querySelector("[b-breadcrumb-page], .baseui-breadcrumb-page");a?Pp(a):(r.classList.add("baseui-breadcrumb-page"),r.setAttribute("aria-current",r.getAttribute("aria-current")||"page"))}}),{destroy:()=>{t.classList.remove("baseui-breadcrumb"),e.classList.remove("breadcrumb","baseui-breadcrumb-list");for(let r of e.querySelectorAll("[b-breadcrumb-separator]"))r.remove()}}}c.register("breadcrumb",{type:"owl",mount:Kc});y();function Vc(t){return t.classList.add("baseui-bubble"),t.getAttribute("role")||t.setAttribute("role","listitem"),{destroy:()=>t.classList.remove("baseui-bubble")}}c.register("bubble",{type:"static",mount:Vc});y();nt();xr();function Zc(t){return[...t.childNodes].filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).map(e=>{let s=document.createElement("span");return s.textContent=e.textContent.trim(),e.replaceWith(s),s})}function Xc(t){let e=t.getAttribute("b-att-icon"),s=t.getAttribute("b-att-icon-position")==="end"?"end":"start",r=!!t.textContent.trim(),i=e&&r?Zc(t):[],a=null;return t.classList.add("btn","baseui-button",D[t.getAttribute("b-att-variant")||"default"]||"btn-primary"),M[t.getAttribute("b-att-size")]&&t.classList.add(M[t.getAttribute("b-att-size")]),t.dataset.slot="button",e&&(a=document.createElement("span"),a.setAttribute("b-icon",e),a.dataset.icon=`inline-${s}`,P(a,e,{label:""}),t.insertBefore(a,s==="end"?null:t.firstChild),t.dataset.icon=`inline-${s}`,r||(t.dataset.iconOnly="true",t.classList.add("baseui-button-icon"))),{destroy:()=>{a?.remove();for(let p of i)p.replaceWith(document.createTextNode(p.textContent));t.classList.remove("btn","baseui-button","baseui-button-icon",...Object.values(D),...Object.values(M)),t.removeAttribute("data-slot"),t.removeAttribute("data-icon"),t.removeAttribute("data-icon-only")}}}c.register("button",{type:"static",mount:Xc});y();function Gc(t){let e=t.getAttribute("b-att-orientation")==="vertical",s=t.getAttribute("b-att-size"),r=[...t.querySelectorAll("[b-button-group-separator]")],i=[...t.querySelectorAll("[b-button-group-text]")];return t.classList.add("baseui-button-group",e?"btn-group-vertical":"btn-group"),(s==="sm"||s==="lg")&&t.classList.add(`btn-group-${s}`),t.setAttribute("role",t.getAttribute("role")||"group"),r.forEach(a=>{let p=a.getAttribute("b-att-orientation")==="horizontal"?"horizontal":"vertical";a.classList.add("baseui-button-group-separator",`baseui-button-group-separator-${p}`),a.setAttribute("data-orientation",p),a.setAttribute("role","separator")}),i.forEach(a=>{a.classList.add("baseui-button-group-text")}),{destroy:()=>{t.classList.remove("baseui-button-group","btn-group","btn-group-vertical","btn-group-sm","btn-group-lg")}}}c.register("button-group",{type:"static",mount:Gc});y();var Yc=new Intl.DateTimeFormat(void 0,{month:"long",year:"numeric"});function Jc(t){let e=t.getAttribute("b-att-selected")?new Date(`${t.getAttribute("b-att-selected")}T00:00:00`):new Date,s=Number(t.getAttribute("b-att-month")??e.getMonth()+1)-1,r=Number(t.getAttribute("b-att-year")??e.getFullYear()),i=new Date(r,s,1),a=new Date(r,s+1,0).getDate(),p=i.getDay();t.classList.add("baseui-calendar"),t.querySelector("[b-calendar-grid]")||(t.innerHTML=`
16
16
  <div class="baseui-calendar__header">${Yc.format(i)}</div>
17
17
  <div class="baseui-calendar__weekdays">${["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map(d=>`<span>${d}</span>`).join("")}</div>
18
18
  <div b-calendar-grid class="baseui-calendar__grid"></div>
@@ -1659,8 +1659,8 @@
1659
1659
  "integrity": {
1660
1660
  "baseui.min.css": "sha384-LFuHeAQ74vGzs1+0oJgRlIqNn1/9bhEFf2JzleYQq5O9a+6j+0j1U33aG/mrwKRp",
1661
1661
  "bootstrap.bundle.min.js": "sha384-RMbllTJcplkCRnELNTOc5Kz/3AvFDE/rNlJqWqfgmRWruobClBdfwvl10akQZkR1",
1662
- "baseui.min.js": "sha384-y4mi8FH4iT78nD74+9l7618aWkVYs+S6/UV8WtrydoK62NOl2y3NMVwA6gF26rdO",
1663
- "baseui.esm.js": "sha384-wK8+SWAVuGC+o74PrsDrXI8rF6+aTtQuIEkIFrDf8LRqWWac/e2jNt+xv9N0Bni0",
1662
+ "baseui.min.js": "sha384-2ZvnQnS4qakqTijwugZKUioIeMOVBlmMfXAwOhdeuglzGxO7vJIrn7B7Bi/wKWfg",
1663
+ "baseui.esm.js": "sha384-UbjG3npJrOrHNSfO9XyxE8t5ibz/nRwixAs6fnlCMBsD9JeFpIYLokEw5kZHuVfM",
1664
1664
  "baseui.icons.esm.js": "sha384-/ncqp5KPJqDzogr248aUjHhN2VSdx0YSTnIWuqK4MO+PkIk4G8Go6oom7Qz2mWyu",
1665
1665
  "baseui.templates.xml": "sha384-JTz48Lg+UCpZSNJDb3TKhHexLJlMhb75sxuYxioKcR1QK06bbdq/QrVTkUcAGWAT",
1666
1666
  "baseui.block-viewer.esm.js": "sha384-kcIT0dWUwv5B7Wq32V6HoybGi88xBwNxS6EsGWC7NtFmOl0BdSDCg6mjlVtRrljO",
@@ -1 +1 @@
1
- import"./chunk-23NN352E.js";var R;function ee(){return R??(R=new Promise((n,e)=>{if(document.getElementById("baseui-text-editor-crepe-theme")){n();return}let o=document.createElement("link");o.id="baseui-text-editor-crepe-theme",o.rel="stylesheet",o.href=new URL("./theme/common/style.css",import.meta.url).href,o.addEventListener("load",()=>n()),o.addEventListener("error",()=>e(new Error("BaseUI text editor: failed to load Crepe theme CSS."))),document.head.append(o)})),R}async function ae({root:n,value:e="",onChange:o,collaborative:t=!1,providerType:r="webrtc",room:i="baseui-text-editor",url:a,password:c,signaling:s,user:l,placeholder:m}={}){if(!n)throw new Error("BaseUI text editor: missing root element.");let[{Crepe:h},j,x,H,T,F]=await Promise.all([import("./esm-H2D66MX5.js"),import("./core-T2SC7EXQ.js"),import("./utils-H6AH4ARX.js"),import("./diff-K3BORLOX.js"),import("./streaming-S7JA52O3.js"),import("./lib-32AGHSKT.js"),ee()]),{editorViewCtx:k,schemaCtx:D}=j,{getHTML:p}=x,{diff:U,diffPluginKey:B,getPendingChanges:I,startDiffReviewCmd:z,startDiffReviewFromDocCmd:K,acceptAllDiffsCmd:O,acceptDiffChunkCmd:V,acceptDiffRangeCmd:W,rejectDiffChunkCmd:q,rejectDiffRangeCmd:N,clearDiffReviewCmd:G}=H,{streaming:J,startStreamingCmd:Q,pushChunkCmd:X,endStreamingCmd:Y,abortStreamingCmd:Z}=T,{emoji:_}=F,{callCommand:L}=x;n.replaceChildren();let b=document.createElement("div");b.className="baseui-text-editor-surface",n.append(b);let d=new h({root:b,defaultValue:t?"":{type:"html",dom:y(e)},features:{[h.Feature.Latex]:!1,[h.Feature.AI]:!1},featureConfigs:m?{[h.Feature.Placeholder]:{text:m}}:{}});d.editor.use(U).use(J).use(_);let C="";d.on(S=>{S.updated(w=>{let g=p()(w);if(g!==C){let v=C;C=g,o?.(g,v,w)}})});let A={callCommand:L,editorViewCtx:k,schemaCtx:D,diffPluginKey:B,getPendingChanges:I,startDiffReviewCmd:z,startDiffReviewFromDocCmd:K,acceptAllDiffsCmd:O,acceptDiffChunkCmd:V,acceptDiffRangeCmd:W,rejectDiffChunkCmd:q,rejectDiffRangeCmd:N,clearDiffReviewCmd:G},E={callCommand:L,startStreamingCmd:Q,pushChunkCmd:X,endStreamingCmd:Y,abortStreamingCmd:Z},P=[],u=null,f=null;if(t){let[{Doc:S},w]=await Promise.all([import("./yjs-H3MVN7TP.js"),import("./lib-QZEOHNSS.js")]),{collab:g,collabServiceCtx:v}=w;return f=new S,u=await re({providerType:r,ydoc:f,room:i,url:a,password:c,signaling:s}),u.awareness?.setLocalStateField("user",ie(l)),d.editor.use(g),P.push(()=>u.destroy?.(),()=>f.destroy()),await d.create(),d.editor.action($=>{$.get(v).bindDoc(f).setAwareness(u.awareness).applyTemplate({type:"html",dom:y(e)}).connect()}),C=d.editor.action(p()),u.connect?.(),M(d,A,E,P,n,u,f,k,p,D)}return await d.create(),C=d.editor.action(p()),M(d,A,E,P,n,u,f,k,p,D)}function y(n){let e=document.createElement("div");return e.innerHTML=String(n||"").trim()||"<p></p>",e}function M(n,e,o,t,r,i,a,c,s,l){return{editor:n.editor,provider:i,doc:a,focus:()=>n.editor.action(m=>m.get(c).focus()),getHTML:()=>n.editor.action(s()),setHTML:m=>te(n.editor,m,c,l),diff:ne(n.editor,e),streaming:oe(n.editor,o),destroy:()=>{for(let m of t)m();n.destroy(),r.replaceChildren()}}}async function te(n,e,o,t){let{DOMParser:r,Slice:i}=await import("./model-VKXPTJEQ.js");n.action(a=>{let c=a.get(t),s=a.get(o),l=r.fromSchema(c).parse(y(e));s.dispatch(s.state.tr.replace(0,s.state.doc.content.size,new i(l.content,0,0)))})}function ne(n,e){let o=(t,r)=>n.action(e.callCommand(t,r));return{startFromMarkdown:t=>o(e.startDiffReviewCmd.key,t),startFromHTML:async t=>{let{DOMParser:r}=await import("./model-VKXPTJEQ.js"),i=n.action(a=>r.fromSchema(a.get(e.schemaCtx)).parse(y(t)));return o(e.startDiffReviewFromDocCmd.key,i)},acceptAll:()=>o(e.acceptAllDiffsCmd.key),acceptChunk:t=>o(e.acceptDiffChunkCmd.key,t),rejectChunk:t=>o(e.rejectDiffChunkCmd.key,t),acceptRange:t=>o(e.acceptDiffRangeCmd.key,t),rejectRange:t=>o(e.rejectDiffRangeCmd.key,t),clear:()=>o(e.clearDiffReviewCmd.key),getPendingChanges:()=>n.action(t=>{let r=e.diffPluginKey.getState(t.get(e.editorViewCtx).state);return r?e.getPendingChanges(r):[]})}}function oe(n,e){let o=(t,r)=>n.action(e.callCommand(t,r));return{start:t=>o(e.startStreamingCmd.key,t),pushChunk:t=>o(e.pushChunkCmd.key,t),end:t=>o(e.endStreamingCmd.key,t),abort:()=>o(e.abortStreamingCmd.key)}}async function re({providerType:n,ydoc:e,room:o,url:t,password:r,signaling:i}){if(n==="websocket"){if(!t)throw new Error("BaseUI text editor: collaborative websocket mode requires a `url`.");let{WebsocketProvider:l}=await import("./y-websocket-YOL5ECIU.js");return new l(t,o,e,{connect:!1})}let{WebrtcProvider:a}=await import("./y-webrtc-VQGJXSXG.js"),c={};r&&(c.password=r),Array.isArray(i)&&i.length&&(c.signaling=i);let s=new a(o,e,c);return s.disconnect(),s}function ie(n){let e=n&&typeof n=="object"?n:{};return{name:e.name||"Anonymous",color:e.color||"#2563eb",...e}}export{ae as createMilkdownTextEditor};
1
+ import"./chunk-23NN352E.js";var R;function te(){return R??(R=new Promise((n,e)=>{if(document.getElementById("baseui-text-editor-crepe-theme")){n();return}let o=document.createElement("link");o.id="baseui-text-editor-crepe-theme",o.rel="stylesheet",o.href=new URL("./theme/common/style.css",import.meta.url).href,o.addEventListener("load",()=>n()),o.addEventListener("error",()=>e(new Error("BaseUI text editor: failed to load Crepe theme CSS."))),document.head.append(o)})),R}async function ce({root:n,value:e="",onChange:o,collaborative:t=!1,providerType:r="webrtc",room:i="baseui-text-editor",url:a,password:c,signaling:s,user:l,placeholder:m}={}){if(!n)throw new Error("BaseUI text editor: missing root element.");let[{Crepe:h},H,x,T,F,U]=await Promise.all([import("./esm-H2D66MX5.js"),import("./core-T2SC7EXQ.js"),import("./utils-H6AH4ARX.js"),import("./diff-K3BORLOX.js"),import("./streaming-S7JA52O3.js"),import("./lib-32AGHSKT.js"),te()]),{editorViewCtx:k,schemaCtx:D}=H,{getHTML:p}=x,{diff:B,diffPluginKey:I,getPendingChanges:z,startDiffReviewCmd:K,startDiffReviewFromDocCmd:O,acceptAllDiffsCmd:V,acceptDiffChunkCmd:W,acceptDiffRangeCmd:q,rejectDiffChunkCmd:N,rejectDiffRangeCmd:G,clearDiffReviewCmd:J}=T,{streaming:Q,startStreamingCmd:X,pushChunkCmd:Y,endStreamingCmd:Z,abortStreamingCmd:_}=F,{emoji:$}=U,{callCommand:L}=x;n.replaceChildren();let b=document.createElement("div");b.className="baseui-text-editor-surface",n.append(b);let d=new h({root:b,defaultValue:t?"":{type:"html",dom:y(e)},features:{[h.Feature.Latex]:!1,[h.Feature.AI]:!1},featureConfigs:m?{[h.Feature.Placeholder]:{text:m}}:{}});d.editor.use(B).use(Q).use($);let C="";d.on(S=>{S.updated(w=>{let g=p()(w);if(g!==C){let v=C;C=g,o?.(g,v,w)}})});let A={callCommand:L,editorViewCtx:k,schemaCtx:D,diffPluginKey:I,getPendingChanges:z,startDiffReviewCmd:K,startDiffReviewFromDocCmd:O,acceptAllDiffsCmd:V,acceptDiffChunkCmd:W,acceptDiffRangeCmd:q,rejectDiffChunkCmd:N,rejectDiffRangeCmd:G,clearDiffReviewCmd:J},E={callCommand:L,startStreamingCmd:X,pushChunkCmd:Y,endStreamingCmd:Z,abortStreamingCmd:_},P=[],u=null,f=null;if(t){let[{Doc:S},w]=await Promise.all([import("./yjs-H3MVN7TP.js"),import("./lib-QZEOHNSS.js")]),{collab:g,collabServiceCtx:v}=w;f=new S,u=await ie({providerType:r,ydoc:f,room:i,url:a,password:c,signaling:s}),u.awareness?.setLocalStateField("user",ae(l)),d.editor.use(g),await d.create();let M;return d.editor.action(ee=>{M=ee.get(v).bindDoc(f).setAwareness(u.awareness).applyTemplate({type:"html",dom:y(e)}).connect()}),P.push(()=>M?.disconnect(),()=>u.destroy?.(),()=>f.destroy()),C=d.editor.action(p()),u.connect?.(),j(d,A,E,P,n,u,f,k,p,D)}return await d.create(),C=d.editor.action(p()),j(d,A,E,P,n,u,f,k,p,D)}function y(n){let e=document.createElement("div");return e.innerHTML=String(n||"").trim()||"<p></p>",e}function j(n,e,o,t,r,i,a,c,s,l){return{editor:n.editor,provider:i,doc:a,focus:()=>n.editor.action(m=>m.get(c).focus()),getHTML:()=>n.editor.action(s()),setHTML:m=>ne(n.editor,m,c,l),diff:oe(n.editor,e),streaming:re(n.editor,o),destroy:()=>{for(let m of t)m();n.destroy(),r.replaceChildren()}}}async function ne(n,e,o,t){let{DOMParser:r,Slice:i}=await import("./model-VKXPTJEQ.js");n.action(a=>{let c=a.get(t),s=a.get(o),l=r.fromSchema(c).parse(y(e));s.dispatch(s.state.tr.replace(0,s.state.doc.content.size,new i(l.content,0,0)))})}function oe(n,e){let o=(t,r)=>n.action(e.callCommand(t,r));return{startFromMarkdown:t=>o(e.startDiffReviewCmd.key,t),startFromHTML:async t=>{let{DOMParser:r}=await import("./model-VKXPTJEQ.js"),i=n.action(a=>r.fromSchema(a.get(e.schemaCtx)).parse(y(t)));return o(e.startDiffReviewFromDocCmd.key,i)},acceptAll:()=>o(e.acceptAllDiffsCmd.key),acceptChunk:t=>o(e.acceptDiffChunkCmd.key,t),rejectChunk:t=>o(e.rejectDiffChunkCmd.key,t),acceptRange:t=>o(e.acceptDiffRangeCmd.key,t),rejectRange:t=>o(e.rejectDiffRangeCmd.key,t),clear:()=>o(e.clearDiffReviewCmd.key),getPendingChanges:()=>n.action(t=>{let r=e.diffPluginKey.getState(t.get(e.editorViewCtx).state);return r?e.getPendingChanges(r):[]})}}function re(n,e){let o=(t,r)=>n.action(e.callCommand(t,r));return{start:t=>o(e.startStreamingCmd.key,t),pushChunk:t=>o(e.pushChunkCmd.key,t),end:t=>o(e.endStreamingCmd.key,t),abort:()=>o(e.abortStreamingCmd.key)}}async function ie({providerType:n,ydoc:e,room:o,url:t,password:r,signaling:i}){if(n==="websocket"){if(!t)throw new Error("BaseUI text editor: collaborative websocket mode requires a `url`.");let{WebsocketProvider:l}=await import("./y-websocket-YOL5ECIU.js");return new l(t,o,e,{connect:!1})}let{WebrtcProvider:a}=await import("./y-webrtc-VQGJXSXG.js"),c={};r&&(c.password=r),Array.isArray(i)&&i.length&&(c.signaling=i);let s=new a(o,e,c);return s.disconnect(),s}function ae(n){let e=n&&typeof n=="object"?n:{};return{name:e.name||"Anonymous",color:e.color||"#2563eb",...e}}export{ce as createMilkdownTextEditor};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thebase/ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "CDN-installable Owl and Bootstrap 5 UI component library.",
5
5
  "type": "module",
6
6
  "main": "./dist/baseui.min.js",