@ahrowe/ui 0.47.0 → 0.47.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -8,5 +8,5 @@
8
8
  While dragging, use the arrow keys to move it — for a card, between positions and columns;
9
9
  for a column, left/right to reorder it.
10
10
  Press space or enter again to drop it, or press escape to cancel.
11
- `};function Lc({columns:e,items:t,renderItem:n,onChange:r,dragHandle:i,getItemLabel:a=Mc,getItemDisabled:o,renderEmptyColumn:s,renderColumnActions:c,reorderableColumns:d,collapseEmptyColumns:f=!1,columnMaxHeight:m,onLoadMore:_,loadMoreThreshold:v,onKeyDown:y,className:b,style:x,classNames:S,styles:C,...w}){let[T,E]=(0,l.useState)(null),[D,O]=(0,l.useState)(!1),[k,A]=(0,l.useState)(null),j=(0,l.useRef)(null),M=(0,l.useRef)(null),N=(0,l.useRef)(null),P=(0,l.useCallback)(e=>{let t=M.current,n=N.current?.current.translated;return!t||!n||t.contains(e)?!0:Sc(e===document.scrollingElement?{top:0,bottom:window.innerHeight}:e.getBoundingClientRect(),t.getBoundingClientRect(),n)},[]),[,F]=(0,l.useState)(0),I=T!==null;(0,l.useEffect)(()=>{if(!I)return;let e=({target:e})=>{let t=M.current;if(!t||!(e instanceof Node)||!(e.contains(t)||t.contains(e)))return;j.current=null;let n=e===document?document.scrollingElement:e;n instanceof Element&&!P(n)&&F(e=>e+1)};return window.addEventListener(`scroll`,e,{capture:!0,passive:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})},[I,P]);let L=(0,h.useSensors)((0,h.useSensor)(h.MouseSensor,Nc),(0,h.useSensor)(h.TouchSensor,Pc),(0,h.useSensor)(h.KeyboardSensor,Fc)),R=(0,l.useMemo)(()=>Ec(e,k),[e,k]),z=(0,l.useMemo)(()=>R.map(e=>e.id),[R]),B=(0,l.useMemo)(()=>new Set(f?e.filter(e=>e.itemIds.length===0).map(e=>e.id):[]),[e,f]),V=(0,l.useMemo)(()=>kc(R,t,a),[R,t,a]),H=(0,l.useMemo)(()=>({announcements:V,screenReaderInstructions:Ic}),[V]);function U(e){if(y?.(e),e.defaultPrevented||T!==null||!M.current||!(e.target instanceof HTMLElement)||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;let t=Oc(M.current,e.target,e.key);t&&(e.preventDefault(),t.focus())}function W({active:e}){E(String(e.id)),O(yc(e.data.current)),N.current=e.rect,j.current=null}function G({active:t,over:n}){if(!n)return;if(yc(t.data.current)){let r=String(t.id),i=String(n.id);A(t=>{let n=Ec(e,t),a=bc(n,r,i);return a===n?t:Tc(a,r,!0)});return}let r=String(t.id),i=String(n.id),a=t.rect.current.translated??t.rect.current.initial,o=a?`${a.top}:${a.left}`:null;(o===null||o!==j.current)&&(j.current=o,A(t=>{let o=Ec(e,t),s=wc(o,r,i,{activeRect:a,overRect:n.rect});return s===o?t:Tc(s,r,!1)}))}function ee({over:t}){K(),t&&!_c(R,e)&&r(R)}function K(){E(null),O(!1),A(null)}let te=T&&D?R.find(e=>e.id===T):void 0;return(0,p.jsxs)(h.DndContext,{sensors:L,collisionDetection:xc,onDragStart:W,onDragOver:G,onDragEnd:ee,onDragCancel:K,accessibility:H,autoScroll:{canScroll:e=>P(e)},children:[(0,p.jsx)(g.SortableContext,{id:`kanban-columns`,items:z,strategy:g.horizontalListSortingStrategy,children:(0,p.jsx)(`div`,{...w,ref:M,className:(0,u.default)(lc.board,b),style:x,onKeyDown:U,children:R.map(e=>(0,p.jsx)(gc,{id:e.id,title:e.title,itemIds:e.itemIds,maxItems:e.maxItems,disabled:e.disabled,getItemDisabled:o,getItemLabel:a,emptyPlaceholder:s?.(e),actions:c?.(e),reorderable:d,activeIsColumn:T!==null&&D,collapsed:B.has(e.id),columnMaxHeight:m,hasMore:e.hasMore,onLoadMore:_?()=>_(e.id):void 0,loadMoreThreshold:v,items:t,renderItem:n,dragHandle:i},e.id))})}),(0,p.jsx)(h.DragOverlay,{children:te?(0,p.jsx)(`div`,{className:(0,u.default)(lc.column,lc.columnDragOverlay),inert:!0,children:(0,p.jsx)(`div`,{className:lc.columnHeader,children:(0,p.jsx)(hc,{title:te.title,count:te.itemIds.length,maxItems:te.maxItems,actions:c?.(te)})})}):T&&!D&&t[T]!==void 0?(0,p.jsx)(`div`,{className:(0,u.default)(lc.dragOverlay,S?.dragOverlay),style:C?.dragOverlay,children:n(t[T],T)}):null})]})}var Rc=`https://api.klipy.com/v2`,zc=class{constructor(e){this.key=e}async search(e,t={}){let n=new URLSearchParams({q:e,key:this.key});return t.limit!=null&&n.set(`limit`,String(t.limit)),t.contentfilter!=null&&n.set(`contentfilter`,t.contentfilter),t.pos!=null&&n.set(`pos`,t.pos),(await fetch(`${Rc}/search?${n}`)).json()}async searchSuggestions(e){let t=new URLSearchParams({q:e,key:this.key});return(await fetch(`${Rc}/search_suggestions?${t}`)).json()}registerShare(e,t){let n=new URLSearchParams({id:t,q:e,key:this.key});fetch(`${Rc}/registershare?${n}`).catch(()=>null)}},Bc={resultCount:`resultCount_Sn48Q`},Vc={results:e=>`${e} ${e===1?`result`:`results`}`};function Hc({value:e,onChange:t,onDebounce:n,placeholder:r,label:i,debounceMs:a=500,totalAmount:o,showAmount:s=!0,className:c,width:d,style:f,classNames:m,styles:h,labels:g,ref:_,...v}){let y=D(`SearchInput`,g,Vc),b=(0,l.useRef)(null);(0,l.useEffect)(()=>()=>{b.current!==null&&clearTimeout(b.current)},[]);function x(e){let r=e==null?``:String(e),i=r.trim()===``?``:r;t(i),b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{n?.(i)},a)}let S=s&&typeof o==`number`&&!Number.isNaN(o);return(0,p.jsxs)(`div`,{...v,className:(0,u.default)(c,m?.root),style:{...d==null?void 0:{width:d},...f,...h?.root},children:[(0,p.jsx)(Aa,{ref:_,autoComplete:`off`,className:m?.input,style:h?.input,type:Ta.Search,label:i,placeholder:r,value:e,onChange:x}),S&&(0,p.jsx)(`p`,{className:(0,u.default)(Bc.resultCount,m?.resultCount),style:h?.resultCount,children:y.results(o)})]})}var Uc={gifPreview:`gifPreview_jAXT2`,"gifPreview-image":`gifPreview-image_41bwm`,gifPreviewImage:`gifPreview-image_41bwm`,"gifPreview-image-container":`gifPreview-image-container_5hAjJ`,gifPreviewImageContainer:`gifPreview-image-container_5hAjJ`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_9EI0A`};function Wc({className:e,previewItems:t=[],onSelect:n,onLoadAdditional:r}){function i(e){let t=e.currentTarget,n=t.scrollHeight-t.clientHeight*1.5;t.scrollTop>=n&&r?.()}return(0,p.jsx)(p.Fragment,{children:t.length>0&&(0,p.jsx)(`div`,{className:(0,u.default)(Uc.gifPreview,e),onScroll:i,children:t.map((e,t)=>(0,p.jsx)(Ot,{className:Uc.gifPreviewImageContainer,onClick:()=>n?.(e),children:(0,p.jsx)(`div`,{className:Uc.gifPreviewImage,style:{backgroundImage:`url(${e.media_formats.tinygif.url})`}})},`${e.id}_${t}`))})})}var Gc={gifView:`gifView_YUeLK`,"gifView-loading":`gifView-loading_N1Lzx`,gifViewLoading:`gifView-loading_N1Lzx`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_OmJUc`};function Kc({className:e,src:t=``}){let[n,r]=(0,l.useState)(null),i=n!==t;return(0,p.jsxs)(`div`,{className:(0,u.default)(Gc.gifView,e),children:[(0,p.jsx)(`img`,{className:Gc.klipyPickerSelected,src:t,onLoad:()=>r(t)}),i&&(0,p.jsx)(`div`,{className:Gc.gifViewLoading})]})}var qc={"klipyPicker-selected":`klipyPicker-selected_Watxl`,klipyPickerSelected:`klipyPicker-selected_Watxl`,"klipyPicker-modal-content":`klipyPicker-modal-content_3CBV9`,klipyPickerModalContent:`klipyPicker-modal-content_3CBV9`,"klipyPicker-suggestions-container":`klipyPicker-suggestions-container_-csDI`,klipyPickerSuggestionsContainer:`klipyPicker-suggestions-container_-csDI`,"klipyPicker-suggestions-item":`klipyPicker-suggestions-item_nHHSA`,klipyPickerSuggestionsItem:`klipyPicker-suggestions-item_nHHSA`},Jc={search:`Pick gif`};function Yc({className:e,token:t=``,isModal:n=!1,onSelect:r=()=>void 0,selected:i=null,labels:a}){let o=D(`KlipyPicker`,a,Jc),s=(0,l.useMemo)(()=>new zc(t),[t]),[c,d]=(0,l.useState)(``),[f,m]=(0,l.useState)([]),[h,g]=(0,l.useState)([]),[_,v]=(0,l.useState)(null),[y,b]=(0,l.useState)(!1);async function x(e){if(d(e),!e.trim()){m([]),g([]),v(null);return}let[{results:t=[],next:n=null},{results:r=[]}]=await Promise.all([s.search(e,{limit:18,contentfilter:`medium`}),s.searchSuggestions(e)]);m(t),v(n),g(r)}async function S(){let{results:e=[],next:t=null}=await s.search(c,{limit:36,pos:_??void 0,contentfilter:`medium`});v(t),m(t=>[...t,...e])}async function C(e){await r(e),b(!1),e&&s.registerShare(c,e.id)}function w(){return(0,p.jsx)(ha,{inline:!0,className:qc.klipyPickerSuggestionsContainer,children:h.map(e=>(0,p.jsx)(ma,{className:qc.klipyPickerSuggestionsItem,text:e,onClick:()=>x(e)},e))})}function T(){return(0,p.jsx)(Wc,{previewItems:f,onSelect:C,onLoadAdditional:S})}function E(){return(0,p.jsx)(Hc,{label:o.search,value:c,onDebounce:x,onChange:d})}return n?(0,p.jsxs)(`div`,{className:(0,u.default)(qc.klipyPicker,e),children:[(0,p.jsxs)(`div`,{className:W.actionButtons,children:[(0,p.jsx)(he,{onClick:()=>b(!0),children:`Pick gif`}),i&&(0,p.jsx)(he,{styleType:J.Filled,color:j.Error,onClick:()=>C(null),children:`Remove gif`})]}),i&&(0,p.jsx)(Kc,{className:qc.klipyPickerSelected,src:i}),(0,p.jsx)(ro,{isOpen:y,onClose:()=>b(!1),children:(0,p.jsxs)(`div`,{className:qc.klipyPickerModalContent,children:[E(),w(),T()]})})]}):(0,p.jsxs)(`div`,{className:(0,u.default)(qc.klipyPicker,e),children:[(0,p.jsx)(On,{placement:Rt.Bottom,align:zt.Start,isOpen:f.length>0&&y,onOpenChange:b,closeOnTriggerClick:!1,constrainWidth:!1,content:(0,p.jsxs)(p.Fragment,{children:[w(),T()]}),children:E()}),i&&(0,p.jsx)(he,{styleType:J.Filled,color:j.Error,onClick:()=>C(null),children:`Remove gif`}),i&&(0,p.jsx)(Kc,{className:qc.klipyPickerSelected,src:i})]})}var Xc={loadingOverlay:`loadingOverlay_B-hL-`,"loadingOverlay-content":`loadingOverlay-content_vLj-j`,loadingOverlayContent:`loadingOverlay-content_vLj-j`,"loadingOverlay-backdrop":`loadingOverlay-backdrop_5cssk`,loadingOverlayBackdrop:`loadingOverlay-backdrop_5cssk`,loadingOverlayFade:`loadingOverlayFade_r6R92`,"loadingOverlay-backdrop-leaving":`loadingOverlay-backdrop-leaving_0OV9m`,loadingOverlayBackdropLeaving:`loadingOverlay-backdrop-leaving_0OV9m`,"loadingOverlay-panel":`loadingOverlay-panel_2dDYB`,loadingOverlayPanel:`loadingOverlay-panel_2dDYB`,loadingOverlayRise:`loadingOverlayRise_Hsje2`,"loadingOverlay-message":`loadingOverlay-message_JcJjt`,loadingOverlayMessage:`loadingOverlay-message_JcJjt`,loadingOverlayShimmer:`loadingOverlayShimmer_0BbGN`},Zc=400,Qc=200;function $c(e,t){let[n,r]=(0,l.useState)(()=>e&&t<=0?`shown`:`hidden`),i=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let a,o;if(e){if(n===`shown`){i.current??=Date.now();return}a=`shown`,o=n===`leaving`?0:t}else if(n===`shown`)a=`leaving`,o=Math.max(0,(i.current??0)+Zc-Date.now());else if(n===`leaving`)a=`hidden`,o=Qc;else return;let s=setTimeout(()=>{a===`shown`&&(i.current=Date.now()),r(a)},o);return()=>clearTimeout(s)},[e,n,t]),n}function el(e){let{isLoading:t=!1,children:n,loader:r,message:i,delay:a=200,className:o,style:s,classNames:c,styles:d,...f}=E(`LoadingOverlay`,e),m=$c(t,a),h=(0,l.useId)(),g=i!=null&&typeof i!=`boolean`&&i!==``;return(0,p.jsxs)(`div`,{...f,className:(0,u.default)(Xc.loadingOverlay,o),style:s,children:[(0,p.jsx)(`div`,{"aria-busy":t||void 0,className:(0,u.default)(Xc.loadingOverlayContent,c?.content),style:d?.content,children:n}),m!==`hidden`&&(0,p.jsx)(`div`,{className:(0,u.default)(Xc.loadingOverlayBackdrop,m===`leaving`&&Xc.loadingOverlayBackdropLeaving,c?.backdrop),style:d?.backdrop,children:(0,p.jsxs)(`div`,{className:(0,u.default)(Xc.loadingOverlayPanel,c?.panel),style:d?.panel,children:[r??(0,p.jsx)(ae,{"aria-labelledby":g?h:void 0}),g&&(0,p.jsx)(`div`,{id:h,className:(0,u.default)(Xc.loadingOverlayMessage,c?.message),style:d?.message,children:i})]})})]})}var tl={menuPanel:`menuPanel_ldsja`,menu:`menu_QNY8D`,"menu-trigger":`menu-trigger_YbVFX`,menuTrigger:`menu-trigger_YbVFX`,"menu-item":`menu-item_-dxHx`,menuItem:`menu-item_-dxHx`,"menu-item-danger":`menu-item-danger_sztTU`,menuItemDanger:`menu-item-danger_sztTU`,"menu-item-icon":`menu-item-icon_BM1Ks`,menuItemIcon:`menu-item-icon_BM1Ks`,"menu-item-label":`menu-item-label_sK5Z5`,menuItemLabel:`menu-item-label_sK5Z5`,"menu-item-shortcut":`menu-item-shortcut_lRTZF`,menuItemShortcut:`menu-item-shortcut_lRTZF`,"menu-separator":`menu-separator_HfNOp`,menuSeparator:`menu-separator_HfNOp`,"menu-heading":`menu-heading_QSu4U`,menuHeading:`menu-heading_QSu4U`},nl=600;function rl(e,t,n){for(let r=1;r<=e.length;r++){let i=(t+n*r+e.length*r)%e.length,a=e[i];if(Co(a)&&!a.disabled)return i}return-1}function il(e){return e.findIndex(e=>Co(e)&&!e.disabled)}function al(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Co(n)&&!n.disabled)return t}return-1}function ol({items:e,children:t,onAction:n,isOpen:r,onOpenChange:i,placement:a=Rt.Bottom,align:o=zt.Start,presentation:s,className:c,style:d,classNames:f,styles:m,...h}){let g=r!==void 0,[_,v]=(0,l.useState)(!1),y=g?r:_,[b,x]=(0,l.useState)(-1),S=(0,l.useRef)([]),C=(0,l.useRef)(null),w=(0,l.useRef)(null),{restoreFocusToTrigger:T,focusAfterTrigger:E}=on({triggerRef:C,contentRef:w}),D=(0,l.useId)(),O=(0,l.useRef)(`first`),k=(0,l.useRef)({query:``,timer:void 0}),A=(0,l.useRef)(!1);function j(e,t=!1){e&&(A.current=t),g||v(e),i?.(e)}let M=(0,l.useRef)(e);(0,l.useEffect)(()=>{M.current=e}),(0,l.useEffect)(()=>{if(!y)return;if(!A.current){x(-1);return}let e=M.current,t=O.current===`last`?al(e):il(e);x(t);let n=requestAnimationFrame(()=>{S.current[t]?.focus()});return()=>{cancelAnimationFrame(n),O.current=`first`}},[y]),(0,l.useEffect)(()=>()=>clearTimeout(k.current.timer),[]);function N(e){e<0||(x(e),S.current[e]?.focus())}function P(e){j(!1),e&&T()}function F(t){if(t.length!==1||!t.trim())return!1;clearTimeout(k.current.timer),k.current.query+=t.toLowerCase(),k.current.timer=setTimeout(()=>{k.current.query=``},nl);let n=k.current.query,r=n.length>1&&[...n].every(e=>e===n[0]),i=r?n[0]:n,a=r||n.length===1?b:b-1;for(let t=1;t<=e.length;t++){let n=(a+t+e.length)%e.length,r=e[n];if(Co(r)&&!r.disabled&&(S.current[n]?.textContent?.trim().toLowerCase()??``).startsWith(i))return N(n),!0}return!1}function I(t){if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(t.preventDefault(),t.stopPropagation(),y){N(t.key===`ArrowUp`?al(e):il(e));return}O.current=t.key===`ArrowUp`?`last`:`first`,j(!0,!0)}}function L(t){switch(t.key){case`ArrowDown`:N(rl(e,b,1));break;case`ArrowUp`:N(b<0?al(e):rl(e,b,-1));break;case`Home`:N(il(e));break;case`End`:N(al(e));break;case`Escape`:P(!0);break;case`Tab`:P(!1),t.shiftKey?T():E();break;default:if(!F(t.key))return}t.preventDefault(),t.stopPropagation()}function R(t){let r=e[t];Co(r)&&!r.disabled&&(r.onClick?.(),n?.(r.id),P(!0))}let z=(0,l.isValidElement)(t)?(0,l.cloneElement)(t,{"aria-haspopup":t.props[`aria-haspopup`]??`menu`,"aria-expanded":t.props[`aria-expanded`]??y,"aria-controls":y?t.props[`aria-controls`]??D:t.props[`aria-controls`]}):t,B=(0,p.jsx)(`div`,{ref:w,id:D,role:`menu`,className:(0,u.default)(tl.menu,f?.menu),style:m?.menu,onKeyDown:L,children:e.map((e,t)=>xo(e)?(0,p.jsx)(`div`,{role:`separator`,className:(0,u.default)(tl.menuSeparator,f?.separator),style:m?.separator},`separator-${t}`):So(e)?(0,p.jsx)(`div`,{role:`presentation`,className:(0,u.default)(tl.menuHeading,f?.heading),style:m?.heading,children:e.heading},`heading-${t}`):(0,p.jsxs)(`button`,{ref:e=>{S.current[t]=e},type:`button`,role:`menuitem`,disabled:e.disabled,tabIndex:t===b?0:-1,className:(0,u.default)(tl.menuItem,e.danger&&tl.menuItemDanger,f?.item),style:m?.item,onClick:()=>R(t),onMouseEnter:()=>x(t),children:[e.icon!=null&&X(e.icon,{className:(0,u.default)(tl.menuItemIcon,f?.itemIcon),style:m?.itemIcon}),(0,p.jsx)(`span`,{className:(0,u.default)(tl.menuItemLabel,f?.itemLabel),style:m?.itemLabel,children:e.label}),e.shortcut!=null&&(0,p.jsx)(`span`,{className:(0,u.default)(tl.menuItemShortcut,f?.itemShortcut),style:m?.itemShortcut,children:ho(e.shortcut)})]},e.id))});return(0,p.jsx)(On,{...h,isOpen:y,onOpenChange:(e,{fromKeyboard:t})=>j(e,t),placement:a,align:o,presentation:s,content:B,focusOnOpen:!1,constrainWidth:!1,classNames:{panel:tl.menuPanel},className:(0,u.default)(c,f?.root),style:{...d,...m?.root},children:(0,p.jsx)(`span`,{ref:C,className:(0,u.default)(tl.menuTrigger,f?.trigger),style:m?.trigger,onKeyDown:I,children:z})})}function sl(e,t){let n={};for(let r of e)Co(r)&&!r.disabled&&r.shortcut&&(n[r.shortcut]=()=>{r.onClick?.(),t?.(r.id)});return n}var cl={multiSelect:`multiSelect_fmViY`,"multiSelect-label":`multiSelect-label_asHZ1`,multiSelectLabel:`multiSelect-label_asHZ1`,"multiSelect-label-floating":`multiSelect-label-floating_d4-Om`,multiSelectLabelFloating:`multiSelect-label-floating_d4-Om`,"multiSelect-fieldset":`multiSelect-fieldset_Eo29l`,multiSelectFieldset:`multiSelect-fieldset_Eo29l`,"multiSelect-fieldset-focused":`multiSelect-fieldset-focused_ZC2P6`,multiSelectFieldsetFocused:`multiSelect-fieldset-focused_ZC2P6`,"multiSelect-fieldset-error":`multiSelect-fieldset-error_CWzEo`,multiSelectFieldsetError:`multiSelect-fieldset-error_CWzEo`,"multiSelect-fieldset-legend":`multiSelect-fieldset-legend_p-6nh`,multiSelectFieldsetLegend:`multiSelect-fieldset-legend_p-6nh`,"multiSelect-fieldset-legend-active":`multiSelect-fieldset-legend-active_M0L7g`,multiSelectFieldsetLegendActive:`multiSelect-fieldset-legend-active_M0L7g`,"multiSelect-control":`multiSelect-control_zLb7t`,multiSelectControl:`multiSelect-control_zLb7t`,"multiSelect-values":`multiSelect-values_k1Q8x`,multiSelectValues:`multiSelect-values_k1Q8x`,"multiSelect-chip":`multiSelect-chip_xqe8Q`,multiSelectChip:`multiSelect-chip_xqe8Q`,"multiSelect-placeholder":`multiSelect-placeholder_Tjrmh`,multiSelectPlaceholder:`multiSelect-placeholder_Tjrmh`,"multiSelect-placeholder-shown":`multiSelect-placeholder-shown_8v36t`,multiSelectPlaceholderShown:`multiSelect-placeholder-shown_8v36t`,multiSelectFadeIn:`multiSelectFadeIn_rOplX`,"multiSelect-placeholder-instant":`multiSelect-placeholder-instant_r9-TD`,multiSelectPlaceholderInstant:`multiSelect-placeholder-instant_r9-TD`,"multiSelect-clearButton":`multiSelect-clearButton_FKs0m`,multiSelectClearButton:`multiSelect-clearButton_FKs0m`,"multiSelect-icon":`multiSelect-icon_ovLu-`,multiSelectIcon:`multiSelect-icon_ovLu-`,"multiSelect-icon-open":`multiSelect-icon-open_h8VAu`,multiSelectIconOpen:`multiSelect-icon-open_h8VAu`,"multiSelect-disabled":`multiSelect-disabled_Hm8mv`,multiSelectDisabled:`multiSelect-disabled_Hm8mv`,"multiSelect-panel":`multiSelect-panel_VX7gU`,multiSelectPanel:`multiSelect-panel_VX7gU`,"multiSelect-search":`multiSelect-search_g4OHX`,multiSelectSearch:`multiSelect-search_g4OHX`,"multiSelect-options":`multiSelect-options_MGZCv`,multiSelectOptions:`multiSelect-options_MGZCv`,"multiSelect-option":`multiSelect-option_hbvPY`,multiSelectOption:`multiSelect-option_hbvPY`,"multiSelect-option-active":`multiSelect-option-active_mSWFG`,multiSelectOptionActive:`multiSelect-option-active_mSWFG`,"multiSelect-option-selected":`multiSelect-option-selected_mjPq-`,multiSelectOptionSelected:`multiSelect-option-selected_mjPq-`,"multiSelect-option-disabled":`multiSelect-option-disabled_qSgYz`,multiSelectOptionDisabled:`multiSelect-option-disabled_qSgYz`,"multiSelect-optionCheck":`multiSelect-optionCheck_-YKoj`,multiSelectOptionCheck:`multiSelect-optionCheck_-YKoj`,"multiSelect-optionLabel":`multiSelect-optionLabel_CFZke`,multiSelectOptionLabel:`multiSelect-optionLabel_CFZke`,"multiSelect-empty":`multiSelect-empty_MjABY`,multiSelectEmpty:`multiSelect-empty_MjABY`},ll=[],ul={clearSelection:`Clear selection`,create:e=>`Add "${e}"`,searchPlaceholder:`Search…`,empty:`No matches`};function dl(e){let{items:t,value:n,defaultValue:r=[],onChange:i=()=>{},label:a=``,alwaysFloatLabel:o=!1,placeholder:s=``,searchable:c=!1,allowCustomValues:m=!1,maxSelected:h,clearable:g=!0,disabled:_=!1,readOnly:v=!1,presentation:y,formValidator:b=null,errorMessage:x=``,isValid:S=!0,className:C,style:w,classNames:T,styles:O,onMouseEnter:k,onMouseLeave:A,onFocus:j,onBlur:M,labels:N,...P}=E(`MultiSelect`,e),F=D(`MultiSelect`,N,ul),I=(0,l.useRef)(null),L=(0,l.useRef)(null),R=(0,l.useRef)(null),z=(0,l.useRef)(null),B=(0,l.useId)(),[V,H]=(0,l.useState)(r),[U,W]=(0,l.useState)(!1),[G,ee]=(0,l.useState)(``),[K,te]=(0,l.useState)(0),[ne,re]=(0,l.useState)(!1),[q,ie]=(0,l.useState)(!1),[ae,J]=(0,l.useState)(),oe=(0,l.useRef)(b),[,se]=(0,l.useState)(0);(0,l.useEffect)(()=>{oe.current=b;let e=oe.current;if(!e)return;e.label=a,e.validate();let t=()=>se(e=>e+1);return e.registerOnUpdateListener(t),()=>{e.removeOnUpdateListener(t)}},[b,a]);let ce=n!==void 0&&!b,le=b?b.value:ce?n:V,Y=Array.isArray(le)?le:ll,ue=b?b.touched&&b.hasError():!S||!!x,de=b?b.getCurrentErrorMessage():x||``,X=!_&&!v,fe=h!==void 0&&Y.length>=h,pe=o||U||ne||Y.length>0,me=c||m,he=G.trim(),ge=me?he.toLowerCase():``,_e=ge?t.filter(e=>e.label.toLowerCase().includes(ge)):t,ve=m&&he.length>0&&!fe&&!t.some(e=>e.label.toLowerCase()===ge||String(e.key).toLowerCase()===ge)&&!Y.some(e=>String(e).toLowerCase()===ge),ye=ve?[..._e,{key:he,label:F.create(he)}]:_e,be=Y.map(e=>t.find(t=>t.key===e)??(m?{key:e,label:String(e)}:void 0)).filter(e=>e!==void 0);function xe(e){b?b.set(e):ce||H(e),i(e)}function Z(e){X&&!e.disabled&&(Y.includes(e.key)?xe(Y.filter(t=>t!==e.key)):fe||xe([...Y,e.key]),ve&&e.key===he&&ee(``))}function Se(){I.current?.contains(document.activeElement)&&L.current?.focus()}function Ce(e){(!e||X)&&(W(e),e?(J(L.current?.offsetWidth),te(0)):(ee(``),oe.current&&(oe.current.touched=!0)))}(0,l.useEffect)(()=>{U&&me&&R.current?.querySelector(`input`)?.focus()},[U,me]),(0,l.useEffect)(()=>{U&&bo(z.current,document.getElementById(`${B}-${K}`))},[U,K,B]);let we={isDisabled:e=>{let t=ye[e];return!!t.disabled||fe&&!Y.includes(t.key)}};function Te(e){if(X){if(!U){e.key===`ArrowDown`||e.key===`Enter`||e.key===` `?(e.preventDefault(),Ce(!0)):e.key===`Backspace`&&Y.length>0&&xe(Y.slice(0,-1));return}if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),te(vo(K,e.key===`ArrowDown`?1:-1,ye.length,we)??0);else if(e.key===`Home`||e.key===`End`)e.preventDefault(),te(yo(e.key===`Home`?`first`:`last`,ye.length,we)??0);else if(e.key===`Enter`){e.preventDefault();let t=ye[K];t&&Z(t)}else e.key===`Backspace`&&!G&&Y.length>0&&xe(Y.slice(0,-1))}}let Ee=(0,p.jsxs)(`div`,{className:(0,u.default)(cl.multiSelectPanel,T?.panel),style:O?.panel,children:[me&&(0,p.jsx)(`div`,{ref:R,className:(0,u.default)(cl.multiSelectSearch,T?.search),style:O?.search,children:(0,p.jsx)(Hc,{value:G,onChange:e=>{ee(e),te(0)},placeholder:F.searchPlaceholder,onKeyDown:Te})}),(0,p.jsx)(`div`,{ref:z,id:B,role:`listbox`,"aria-multiselectable":`true`,"aria-label":a||void 0,className:(0,u.default)(cl.multiSelectOptions,T?.options),style:O?.options,children:ye.length===0?(0,p.jsx)(`div`,{className:(0,u.default)(cl.multiSelectEmpty,T?.empty),style:O?.empty,children:F.empty}):ye.map((e,t)=>{let n=Y.includes(e.key),r=e.disabled||fe&&!n;return(0,p.jsxs)(`div`,{id:`${B}-${t}`,role:`option`,"aria-selected":n,"aria-disabled":r||void 0,className:(0,u.default)(cl.multiSelectOption,t===K&&cl.multiSelectOptionActive,n&&cl.multiSelectOptionSelected,r&&cl.multiSelectOptionDisabled,T?.option),style:O?.option,onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>te(t),onClick:()=>Z(e),children:[(0,p.jsx)(`span`,{className:(0,u.default)(cl.multiSelectOptionCheck,T?.optionCheck),style:O?.optionCheck,children:n&&(0,p.jsx)(d.FontAwesomeIcon,{icon:f.faCheck})}),(0,p.jsx)(`span`,{className:(0,u.default)(cl.multiSelectOptionLabel,T?.optionLabel),style:O?.optionLabel,children:e.label})]},e.key)})})]});return(0,p.jsxs)(`div`,{...P,ref:I,className:(0,u.default)(cl.multiSelect,_&&cl.multiSelectDisabled,T?.root,C),style:{...w,...O?.root},onMouseEnter:e=>{ie(!0),k?.(e)},onMouseLeave:e=>{ie(!1),A?.(e)},onFocus:e=>{re(!0),j?.(e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(re(!1),M?.(e))},children:[(0,p.jsx)(On,{isOpen:U,onOpenChange:Ce,trigger:Bt.Click,placement:Rt.Bottom,align:zt.Start,offset:4,withArrow:!1,focusOnOpen:me,constrainWidth:!1,width:`trigger`,disabled:!X,presentation:y,content:Ee,styles:{panel:ae?{minWidth:ae}:void 0},children:(0,p.jsxs)(`div`,{ref:L,role:`combobox`,tabIndex:_?-1:0,"aria-expanded":U,"aria-haspopup":`listbox`,"aria-controls":B,"aria-activedescendant":U&&ye.length>0?`${B}-${K}`:void 0,"aria-disabled":_||void 0,"aria-readonly":v||void 0,className:(0,u.default)(cl.multiSelectControl,T?.control),style:O?.control,onKeyDown:Te,children:[s&&be.length===0&&(0,p.jsx)(`span`,{className:(0,u.default)(cl.multiSelectPlaceholder,(!a||pe)&&cl.multiSelectPlaceholderShown,!a&&cl.multiSelectPlaceholderInstant,T?.placeholder),style:O?.placeholder,children:s}),(0,p.jsx)(`div`,{className:(0,u.default)(cl.multiSelectValues,T?.values),style:O?.values,children:be.map(e=>(0,p.jsx)(ma,{text:e.label,showRemoveIcon:X,labels:{remove:`Remove ${e.label}`},onMouseDown:e=>e.preventDefault(),onRemove:()=>{Z(e),Se()},className:(0,u.default)(cl.multiSelectChip,T?.chip),style:O?.chip},e.key))}),g&&X&&Y.length>0&&(0,p.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":F.clearSelection,className:(0,u.default)(cl.multiSelectClearButton,T?.clearButton),style:O?.clearButton,onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),xe([]),Se()},children:(0,p.jsx)(d.FontAwesomeIcon,{icon:f.faXmark})}),(0,p.jsx)(d.FontAwesomeIcon,{icon:f.faChevronDown,className:(0,u.default)(cl.multiSelectIcon,U&&cl.multiSelectIconOpen,T?.icon),style:O?.icon}),a&&(0,p.jsx)(`div`,{className:(0,u.default)(cl.multiSelectLabel,pe&&cl.multiSelectLabelFloating,T?.label),style:O?.label,children:a}),(0,p.jsx)(`fieldset`,{className:(0,u.default)(cl.multiSelectFieldset,(ne||U)&&cl.multiSelectFieldsetFocused,ue&&cl.multiSelectFieldsetError,T?.fieldset),style:O?.fieldset,children:(0,p.jsx)(`legend`,{className:(0,u.default)(cl.multiSelectFieldsetLegend,pe&&cl.multiSelectFieldsetLegendActive),children:(0,p.jsx)(`span`,{children:a})})})]})}),(0,p.jsx)(ya,{variant:`error`,message:de,isVisible:ue&&(ne||q)})]})}var fl={"numberInput-split":`numberInput-split_1kFLr`,numberInputSplit:`numberInput-split_1kFLr`,arrowSuffix:`arrowSuffix_QECPG`,arrows:`arrows_yjRlc`,arrowBtn:`arrowBtn_DbJoa`,split:`split_FYvfQ`,splitBtn:`splitBtn_MquuB`,"split-invalid":`split-invalid_F94dA`,splitInvalid:`split-invalid_F94dA`},pl=400,ml=120,hl=50,gl=1e3;function _l(e){let t=(0,l.useRef)(null),n=(0,l.useRef)(null),r=(0,l.useRef)(e);r.current=e;let i=(0,l.useRef)(null),a=(0,l.useCallback)(()=>{if(t.current!==null&&(clearTimeout(t.current),t.current=null),n.current!==null&&(clearInterval(n.current),n.current=null),typeof window>`u`)return;let{onEndEvent:e}=i.current;window.removeEventListener(`pointerup`,e),window.removeEventListener(`pointercancel`,e),window.removeEventListener(`pointermove`,e),window.removeEventListener(`blur`,e),document.removeEventListener(`visibilitychange`,e)},[]);i.current={stop:a,onEndEvent:e=>{(e.type!==`pointermove`||e.buttons===0)&&(e.type!==`visibilitychange`||document.hidden)&&i.current.stop()}};let o=(0,l.useCallback)((e,o)=>{a();let{onEndEvent:s}=i.current;window.addEventListener(`pointerup`,s),window.addEventListener(`pointercancel`,s),window.addEventListener(`pointermove`,s),window.addEventListener(`blur`,s),document.addEventListener(`visibilitychange`,s);let c=()=>{r.current(e*o)||a()};c(),t.current=setTimeout(()=>{t.current=null;let e=Date.now(),r=!1,i=()=>{c(),n.current!==null&&!r&&Date.now()-e>=gl&&(r=!0,n.current!==null&&clearInterval(n.current),n.current=setInterval(i,hl))};n.current=setInterval(i,ml)},pl)},[a]);return(0,l.useEffect)(()=>a,[a]),{start:o,stop:a}}var vl={increase:`Increase`,decrease:`Decrease`};function yl({label:e,disabled:t,direction:n,onStart:r,onStop:i}){return{tabIndex:-1,disabled:t,"aria-label":e,onPointerDown:e=>{(e.button===0||e.pointerType!==`mouse`)&&(e.preventDefault(),r(n,e.shiftKey?10:1))},onPointerUp:i,onPointerCancel:i,onContextMenu:e=>e.preventDefault()}}function bl(e){return(0,p.jsx)(`button`,{type:`button`,...yl(e),className:(0,u.default)(fl.arrowBtn,e.className),style:e.style,children:(0,p.jsx)(d.FontAwesomeIcon,{icon:e.icon,"aria-hidden":`true`})})}function xl(e){let{disabled:t,...n}=yl(e);return(0,p.jsx)(he,{...n,className:(0,u.default)(fl.splitBtn,e.className),style:e.style,color:j.Neutral,size:oe.Icon,disabled:t,icon:e.icon})}function Sl(e){let t=l.default.useRef(void 0),{value:n,onChange:r,formValidator:i,label:a,error:o,className:s,style:c,classNames:d,styles:m,allowNegative:h=!1,decimalSeparator:g,thousandSeparator:_,prefix:y,suffix:b,decimalScale:x,fixedDecimalScale:S=!0,placeholder:C,sign:w,showArrows:T=!1,step:O=1,min:k,max:A,arrowsLayout:j=`auto`,labels:M,readOnly:N=!1,disabled:P=!1,isRequired:F=!1,onKeyDown:I,ref:L,...R}=E(`NumberInput`,e),z=D(`NumberInput`,M,vl),[,B]=l.default.useState(0);l.default.useEffect(()=>{if(t.current=i,!i)return;let e=()=>B(e=>e+1);return i.registerOnUpdateListener(e),()=>{i.removeOnUpdateListener(e)}},[i]);let V=F||!!i?.validators.find(e=>e.validatorId===`required`),H=i==null?n:i.value,U=w!=null&&H!=null?Math.abs(Number(H)):H,W=U==null?``:String(U);function G(e){let t=e;t!==void 0&&(w===`-`&&(t=-Math.abs(t)),w===`+`&&(t=Math.abs(t))),i?.set(t??null),r?.(t)}function ee(e){let t=e;return!h&&w!==`-`&&(t=Math.max(0,t)),w===`-`&&(t=Math.min(0,t)),k!==void 0&&(t=Math.max(k,t)),A!==void 0&&(t=Math.min(A,t)),t}let K=H!=null&&H!==``?Number(H):0;function te(){if(N||P||H==null||H===``)return;let e=Number(H);if(!Number.isFinite(e))return;let t=ee(e);t!==e&&G(t)}function ne(e){if(N||P)return!1;let t=ee(K+e);return t!==K&&(G(t),!0)}let{start:re,stop:q}=_l(e=>ne(e*O));function ie(e){if(e.key===`Enter`){te(),I?.(e);return}if(!oe){I?.(e);return}if(e.key===`ArrowUp`){e.preventDefault(),ne(e.shiftKey?O*10:O);return}if(e.key===`ArrowDown`){e.preventDefault(),ne(e.shiftKey?-O*10:-O);return}I?.(e)}let ae=w===`-`?`-`:w===`+`?`+`:y,J=Pe(),oe=T&&!N&&!P,se=j===`split`||j===`auto`&&J,ce=ee(K+O)!==K,le=ee(K-O)!==K,Y={onStart:re,onStop:q},ue=oe&&!se?(0,p.jsxs)(`div`,{className:(0,u.default)(fl.arrows,d?.arrows),style:m?.arrows,children:[(0,p.jsx)(bl,{className:d?.increaseButton,style:m?.increaseButton,label:z.increase,icon:f.faChevronUp,disabled:!ce,direction:1,...Y}),(0,p.jsx)(bl,{className:d?.decreaseButton,style:m?.decreaseButton,label:z.decrease,icon:f.faChevronDown,disabled:!le,direction:-1,...Y})]}):null,de=oe?{role:`spinbutton`,"aria-valuenow":Number.isFinite(K)?K:void 0,"aria-valuemin":k,"aria-valuemax":A,"aria-valuetext":W||void 0}:{},X=i?!i.touched||!i.hasError():!o,fe=oe&&se,pe=(0,p.jsx)(Aa,{label:a,className:(0,u.default)(fl.numberInput,{[fl.numberInputSplit]:fe},fe?void 0:s,fe?void 0:d?.root,d?.input),style:{...fe?void 0:c,...fe?void 0:m?.root,...m?.input},value:W,onChange:()=>{},formValidator:null,isRequired:V,onBlur:()=>{te(),t.current&&(t.current.touched=!0)},isValid:X,errorMessage:i?i.touched?i.getCurrentErrorMessage()??``:``:o??``,placeholder:C,readOnly:N,disabled:P,suffix:ue,classNames:ue?{suffix:fl.arrowSuffix}:void 0,inputMode:x===0?`numeric`:`decimal`,customInput:(0,p.jsx)(v.NumericFormat,{onValueChange:e=>G(e.floatValue),allowNegative:w==null&&h,decimalSeparator:g,thousandSeparator:_,decimalScale:x,fixedDecimalScale:S,prefix:ae,suffix:b,onKeyDown:ie,getInputRef:L,...de,...R})});return fe?(0,p.jsxs)(In,{className:(0,u.default)(fl.split,{[fl.splitInvalid]:!X},s,d?.root),style:{...c,...m?.root},children:[(0,p.jsx)(xl,{className:d?.decreaseButton,style:m?.decreaseButton,label:z.decrease,icon:f.faMinus,disabled:!le,direction:-1,...Y}),pe,(0,p.jsx)(xl,{className:d?.increaseButton,style:m?.increaseButton,label:z.increase,icon:f.faPlus,disabled:!ce,direction:1,...Y})]}):pe}var Cl=Sl,wl=function(e){return e.Numeric=`numeric`,e.Alphanumeric=`alphanumeric`,e}({}),Tl={otpInput:`otpInput_5-tug`,"otpInput-label":`otpInput-label_T9X7O`,otpInputLabel:`otpInput-label_T9X7O`,"otpInput-requiredMark":`otpInput-requiredMark_FNY2c`,otpInputRequiredMark:`otpInput-requiredMark_FNY2c`,"otpInput-boxes":`otpInput-boxes_FhhIF`,otpInputBoxes:`otpInput-boxes_FhhIF`,"otpInput-boxes-shake":`otpInput-boxes-shake_c50KX`,otpInputBoxesShake:`otpInput-boxes-shake_c50KX`,otpInputShake:`otpInputShake_TljCu`,"otpInput-boxWrapper":`otpInput-boxWrapper_ezHbo`,otpInputBoxWrapper:`otpInput-boxWrapper_ezHbo`,"otpInput-box":`otpInput-box_AB6Kx`,otpInputBox:`otpInput-box_AB6Kx`,"otpInput-box-filled":`otpInput-box-filled_npNOF`,otpInputBoxFilled:`otpInput-box-filled_npNOF`,"otpInput-box-error":`otpInput-box-error_8kLDb`,otpInputBoxError:`otpInput-box-error_8kLDb`,"otpInput-separator":`otpInput-separator_SArCq`,otpInputSeparator:`otpInput-separator_SArCq`,"otpInput-disabled":`otpInput-disabled_bzwE9`,otpInputDisabled:`otpInput-disabled_bzwE9`},El=/[0-9]/g,Dl=/[a-zA-Z0-9]/g,Ol={field:`One-time code`,digit:(e,t)=>`Digit ${e} of ${t}`};function kl(e,t){let n=t===wl.Alphanumeric?Dl:El;return(e.match(n)||[]).join(``)}function Al(e){let{length:t=6,value:n,onChange:r=()=>{},onComplete:i=()=>{},formValidator:a=null,charset:o=wl.Numeric,masked:s=!1,groupAfter:c=[],label:d=``,isValid:f=!0,errorMessage:m=``,isRequired:h=!1,clearOnError:g=!1,clearErrorDelay:_=900,disabled:v=!1,autoFocus:y=!1,className:b=``,style:x,classNames:S,styles:C,labels:w,...T}=E(`OtpInput`,e),O=D(`OtpInput`,w,Ol),k=(a?a.value:n)??``,[,A]=(0,l.useState)(0),[j,M]=(0,l.useState)(!1),[N,P]=(0,l.useState)(!1),[F,I]=(0,l.useState)(!1),[L,R]=(0,l.useState)(!1),[z,B]=(0,l.useState)(!1),V=(0,l.useRef)([]);(0,l.useEffect)(()=>{if(!a)return;a.validate();let e=()=>A(e=>e+1);return a.registerOnUpdateListener(e),()=>a.removeOnUpdateListener(e)},[a]),(0,l.useEffect)(()=>{if(!y)return;let e=Math.min(k.length,t-1);V.current[e]?.focus()},[]);let H=a?a.touched&&a.hasError():!f||!!m,U=a?a.getCurrentErrorMessage():m||``;H!==z&&(B(H),H&&M(!0),R(H&&g)),(0,l.useEffect)(()=>{if(!j)return;let e=window.setTimeout(()=>M(!1),400);return()=>window.clearTimeout(e)},[j]),(0,l.useEffect)(()=>{if(!L||!g)return;let e=window.setTimeout(()=>{R(!1),W(``),V.current[0]?.focus()},_);return()=>window.clearTimeout(e)},[L,g,_]);function W(e){let n=k.length===t,s=kl(e,o).slice(0,t);a&&a.set(s),r?.(s),s.length===t&&!n&&i?.(s)}function G(e,t){let n=k.split(``);n[e]=t,W(n.join(``))}function ee(e,n){if(v)return;if(n===``){G(e,``);return}let r=kl(n,o);if(!r)return;let i=Math.min(e,k.length);if(n.length>1){K(i,r);return}G(i,r),i<t-1?V.current[i+1]?.focus():V.current[i]?.blur()}function K(e,n){let r=kl(n,o);if(!r)return;let i=k.padEnd(t,` `).split(``),a=e;for(let e of r){if(a>=t)break;i[a]=e,a+=1}W(i.join(``).trimEnd());let s=Math.min(a,t-1);V.current[s]?.focus(),a>=t&&V.current[t-1]?.blur()}function te(e,t){if(v)return;let n=t.clipboardData.getData(`text`);n&&(t.preventDefault(),K(Math.min(e,k.length),n))}function ne(e,n){if(!v){if(n.key.length===1&&!n.ctrlKey&&!n.metaKey&&!n.altKey){let r=kl(n.key,o);if(r&&k[e]===r){n.preventDefault(),G(e,r),e<t-1?V.current[e+1]?.focus():V.current[e]?.blur();return}}if(n.key===`Backspace`){if(k[e]){G(e,``);return}e>0&&(n.preventDefault(),G(e-1,``),V.current[e-1]?.focus());return}if(n.key===`Delete`){k[e]&&G(e,``);return}if(n.key===`ArrowLeft`&&e>0){n.preventDefault(),V.current[e-1]?.focus();return}n.key===`ArrowRight`&&e<t-1&&(n.preventDefault(),V.current[e+1]?.focus())}}function re(e){e.target.select()}function q(){P(!0)}function ie(e){e.currentTarget.contains(e.relatedTarget)||(P(!1),a&&(a.touched=!0))}return(0,p.jsxs)(`div`,{...T,className:(0,u.default)(Tl.otpInput,v&&Tl.otpInputDisabled,b),style:x,children:[d&&(0,p.jsxs)(`div`,{className:(0,u.default)(Tl.otpInputLabel,S?.label),style:C?.label,children:[d,h&&(0,p.jsx)(`span`,{className:Tl.otpInputRequiredMark,children:` *`})]}),(0,p.jsx)(`div`,{role:`group`,"aria-label":d||O.field,className:(0,u.default)(Tl.otpInputBoxes,j&&Tl.otpInputBoxesShake,S?.inputs),style:C?.inputs,onFocus:q,onBlur:ie,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),children:Array.from({length:t},(e,n)=>{let r=k[n]||``;return(0,p.jsxs)(`div`,{className:Tl.otpInputBoxWrapper,children:[(0,p.jsx)(`input`,{ref:e=>{V.current[n]=e},type:s?`password`:`text`,inputMode:o===wl.Numeric?`numeric`:`text`,pattern:o===wl.Numeric?`[0-9]*`:void 0,autoComplete:n===0?`one-time-code`:`off`,maxLength:1,disabled:v,value:r,"aria-label":O.digit(n+1,t),"aria-invalid":H||void 0,className:(0,u.default)(Tl.otpInputBox,H&&Tl.otpInputBoxError,r&&Tl.otpInputBoxFilled,S?.input),style:C?.input,onChange:e=>ee(n,e.target.value),onKeyDown:e=>ne(n,e),onPaste:e=>te(n,e),onFocus:re}),c.includes(n+1)&&n<t-1&&(0,p.jsx)(`span`,{className:(0,u.default)(Tl.otpInputSeparator,S?.separator),style:C?.separator})]},n)})}),(0,p.jsx)(ya,{variant:`error`,message:U,isVisible:H&&(N||F)})]})}var jl=768;function Ml(){let[e,t]=(0,l.useState)(()=>({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<jl}));return(0,l.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<jl})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var Nl={overscroll:`overscroll_Ij750`,"overscroll-header":`overscroll-header_S6vYc`,overscrollHeader:`overscroll-header_S6vYc`,"overscroll-header-centered":`overscroll-header-centered_8VlsP`,overscrollHeaderCentered:`overscroll-header-centered_8VlsP`,"overscroll-header-container":`overscroll-header-container_iignp`,overscrollHeaderContainer:`overscroll-header-container_iignp`};function Pl({children:e=null,overscrollContent:t=null,overscrollContentDesktop:n=null,centerHeader:r=!0,min:i=10,max:a=80,start:o=30,unit:s=`%`,mobileOnly:c=!0,onScrollChange:d=()=>{},scrollDisabled:f=!1}){let{isMobileSize:m,height:h}=Ml(),g=(0,l.useRef)(null),_=(0,l.useRef)(null),v=(0,l.useRef)(null),y=(0,l.useRef)(!1),b=(0,l.useRef)(null),x=(0,l.useRef)(d);(0,l.useEffect)(()=>{x.current=d});let S=(0,l.useCallback)(e=>{let t;if(s===`%`){if(!v.current)return;let n=v.current.clientHeight;t=Math.max(n*i/100,n-e)}else t=Math.max(i,a-e);_.current&&(_.current.style.height=`${t}px`)},[i,a,s]),C=(0,l.useCallback)(()=>{let e;if(s===`%`){if(!v.current)return;let t=v.current.clientHeight/a*100;e=v.current.clientHeight-o/100*t}else e=a-o;g.current&&(g.current.scrollTop=e,S(e))},[a,o,s,S]);(0,l.useEffect)(()=>{let e=setTimeout(C,100);return()=>clearTimeout(e)},[C]),(0,l.useEffect)(()=>{g.current&&(g.current.style.overflow=f?`hidden`:`auto`)},[f]);let w=(0,l.useRef)(m);(0,l.useEffect)(()=>{m&&!w.current&&C(),w.current=m},[m,C]);let T=(0,l.useRef)(c);(0,l.useEffect)(()=>{!c&&T.current&&C(),T.current=c},[c,C]);let E=(0,l.useRef)(h);(0,l.useEffect)(()=>{m&&h!==E.current&&g.current&&S(g.current.scrollTop),E.current=h},[h,m,S]);function D(e){S(e.currentTarget.scrollTop),y.current||(y.current=!0,x.current(!0)),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{b.current=null,y.current=!1,x.current(!1)},500)}if(c&&!m)return n?(0,p.jsxs)(`div`,{children:[n,e]}):(0,p.jsx)(p.Fragment,{children:e});let O=s===`%`?`${100-i}%`:`calc(100% - ${i}px)`;return(0,p.jsxs)(`div`,{className:Nl.overscroll,ref:g,onScroll:D,children:[(0,p.jsx)(`div`,{className:Nl.overscrollHeaderContainer,style:{height:`${a}${s}`},ref:v,children:(0,p.jsx)(`div`,{className:(0,u.default)(Nl.overscrollHeader,r&&Nl.overscrollHeaderCentered),ref:_,children:t})}),(0,p.jsx)(`div`,{style:{minHeight:O},children:e})]})}var Fl={pagination:`pagination_Pbz1I`,"pagination-item":`pagination-item_2SyYK`,paginationItem:`pagination-item_2SyYK`,"pagination-control":`pagination-control_T0gUc`,paginationControl:`pagination-control_T0gUc`,"pagination-item-active":`pagination-item-active_MgtgT`,paginationItemActive:`pagination-item-active_MgtgT`,"pagination-ellipsis":`pagination-ellipsis_jU--t`,paginationEllipsis:`pagination-ellipsis_jU--t`},Il=`dots`,Ll={goToPage:e=>`Go to page ${e}`,first:`Go to first page`,previous:`Go to previous page`,next:`Go to next page`,last:`Go to last page`};function Rl(e,t){return t<e?[]:Array.from({length:t-e+1},(t,n)=>e+n)}function zl(e,t){return Math.max(1,Math.min(t,Math.round(e)))}function Bl(e,t,n,r){if(n*2+r*2+3>=t)return Rl(1,t);let i=Rl(1,r),a=Rl(t-r+1,t),o=i.length>0?[Il]:[],s=a.length>0?[Il]:[],c=Math.max(e-n,r+1),l=Math.min(e+n,t-r),u=c>r+2,d=l<t-r-1;return!u&&d?[...Rl(1,r+n*2+2),...s,...a]:u&&!d?[...i,...o,...Rl(t-r-n*2-1,t)]:[...i,...o,...Rl(c,l),...s,...a]}function Vl(e){let{total:t,page:n,defaultPage:r=1,onChange:i=()=>{},siblings:a=1,boundaries:o=1,showControls:s=!0,showEdges:c=!1,disabled:d=!1,previousIcon:m=f.faChevronLeft,nextIcon:h=f.faChevronRight,firstIcon:g=f.faAnglesLeft,lastIcon:_=f.faAnglesRight,"aria-label":v=`Pagination`,className:y,style:b,classNames:x,styles:S,labels:C,...w}=E(`Pagination`,e),T=D(`Pagination`,C,Ll),O=n!==void 0,[k,A]=(0,l.useState)(r),j=zl(O?n:k,t);if(t<1)return null;function M(e){let n=zl(e,t);n!==j&&(O||A(n),i(n))}let N=(0,u.default)(Fl.paginationControl,x?.control);function P(e,t,n,r,i){return(0,p.jsx)(`button`,{type:`button`,className:N,style:S?.control,"aria-label":t,disabled:d||i,onClick:()=>M(r),children:X(n)},e)}let F=j<=1,I=j>=t;return(0,p.jsxs)(`nav`,{...w,"aria-label":v,className:(0,u.default)(Fl.pagination,x?.root,y),style:{...b,...S?.root},children:[c&&P(`first`,T.first,g,1,F),s&&P(`previous`,T.previous,m,j-1,F),Bl(j,t,a,o).map((e,t)=>e===Il?(0,p.jsx)(`span`,{"aria-hidden":`true`,className:(0,u.default)(Fl.paginationEllipsis,x?.ellipsis),style:S?.ellipsis,children:`…`},`dots-${t}`):(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Fl.paginationItem,e===j&&Fl.paginationItemActive,x?.item),style:S?.item,"aria-label":T.goToPage(e),"aria-current":e===j?`page`:void 0,disabled:d,onClick:()=>M(e),children:e},e)),s&&P(`next`,T.next,h,j+1,I),c&&P(`last`,T.last,_,t,I)]})}var Hl={progressBar:`progressBar_LO0sX`,"progressBar-fill":`progressBar-fill_rt32j`,progressBarFill:`progressBar-fill_rt32j`,"progressBar-fill-end":`progressBar-fill-end_71wL3`,progressBarFillEnd:`progressBar-fill-end_71wL3`,"progressBar-fill-toned":`progressBar-fill-toned_cM4yE`,progressBarFillToned:`progressBar-fill-toned_cM4yE`,"progressBar-label":`progressBar-label_jWud2`,progressBarLabel:`progressBar-label_jWud2`};function Ul({className:e=void 0,total:t=100,progress:n=0,style:r=void 0,classNames:i,styles:a,...o}){let s=Array.isArray(n)?n:typeof n==`object`?[n]:[{amount:n}];R(`ProgressBar`,s.map(e=>e.color));function c(){return s.map((e,n)=>{let r=t?e.amount/t*100:0,o=e.color?F(e.color):void 0;return(0,p.jsx)(`div`,{className:(0,u.default)(Hl.progressBarFill,o&&[o.className,Hl.progressBarFillToned],n===s.length-1&&Hl.progressBarFillEnd,e.class,i?.fill),style:{width:`${r}%`,...o?.style,...a?.fill},title:e.label?`${e.label}: ${e.amount}`:void 0,children:e.label&&(0,p.jsx)(`div`,{className:(0,u.default)(Hl.progressBarLabel,i?.label),style:a?.label,children:e.label})},n)})}return(0,p.jsx)(`div`,{...o,className:(0,u.default)(Hl.progressBar,e,i?.root),style:{...r,...a?.root},children:c()})}var Wl=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),Gl={radioGroup:`radioGroup_5PUYO`,"radioGroup-horizontal":`radioGroup-horizontal_cfCch`,radioGroupHorizontal:`radioGroup-horizontal_cfCch`,"radioGroup-disabled":`radioGroup-disabled_O2hKy`,radioGroupDisabled:`radioGroup-disabled_O2hKy`,"radioGroup-error":`radioGroup-error_HVUcn`,radioGroupError:`radioGroup-error_HVUcn`,"radioGroup-radio":`radioGroup-radio_XLU2j`,radioGroupRadio:`radioGroup-radio_XLU2j`,"radioGroup-radio-checked":`radioGroup-radio-checked_AOEJu`,radioGroupRadioChecked:`radioGroup-radio-checked_AOEJu`,"radioGroup-option":`radioGroup-option_QxMeW`,radioGroupOption:`radioGroup-option_QxMeW`,"radioGroup-option-disabled":`radioGroup-option-disabled_Q0y35`,radioGroupOptionDisabled:`radioGroup-option-disabled_Q0y35`,"radioGroup-dot":`radioGroup-dot_Q-4Ge`,radioGroupDot:`radioGroup-dot_Q-4Ge`,"radioGroup-dot-checked":`radioGroup-dot-checked_7djgv`,radioGroupDotChecked:`radioGroup-dot-checked_7djgv`,"radioGroup-text":`radioGroup-text_8ekBs`,radioGroupText:`radioGroup-text_8ekBs`,"radioGroup-label":`radioGroup-label_hJD2S`,radioGroupLabel:`radioGroup-label_hJD2S`,"radioGroup-description":`radioGroup-description_xZSLE`,radioGroupDescription:`radioGroup-description_xZSLE`};function Kl(e){let{options:t=[],value:n,defaultValue:r,onChange:i=()=>{},orientation:a=Wl.Vertical,disabled:o=!1,size:s,tabIndex:c=0,formValidator:d=null,errorMessage:f=``,isValid:m=!0,className:h,style:g,classNames:_,styles:v,...y}=E(`RadioGroup`,e),b=(0,l.useRef)([]),x=(0,l.useRef)(d);(0,l.useEffect)(()=>{x.current=d});let[,S]=(0,l.useState)(0),[C,w]=(0,l.useState)(r),[T,D]=(0,l.useState)(!1),[O,k]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(!d)return;d.validate();let e=()=>S(e=>e+1);return d.registerOnUpdateListener(e),()=>d.removeOnUpdateListener(e)},[d]);let A=d?d.touched&&d.hasError():!m||!!f,j=d?d.getCurrentErrorMessage():f||``,M=n!==void 0&&!d,N=d?d.value:M?n:C;function P(e,t){d?d.set(e):M||w(e),i(e,t)}function F(e){e.currentTarget.contains(e.relatedTarget)||(D(!1),x.current&&(x.current.touched=!0))}let I=t.findIndex(e=>e.value===N),L=t.findIndex(e=>!e.disabled),R=I>=0?I:L;function z(e){b.current[e]?.focus()}function B(e,n,r){if(o||t.length===0)return;let i=n;for(let n=0;n<t.length;n++)if(i=(i+e+t.length)%t.length,!t[i].disabled){z(i),P(t[i].value,r);return}}function V(e,n){let r=t[n];switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),B(1,n,e);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),B(-1,n,e);break;case` `:case`Enter`:e.preventDefault(),!o&&!r.disabled&&P(r.value,e)}}return(0,p.jsxs)(`div`,{...y,role:`radiogroup`,"aria-orientation":a,"aria-disabled":o||void 0,"aria-invalid":A||void 0,className:(0,u.default)(Gl.radioGroup,a===Wl.Horizontal&&Gl.radioGroupHorizontal,o&&Gl.radioGroupDisabled,A&&Gl.radioGroupError,h,_?.root),style:{...s?{"--radio-size":s}:null,...g,...v?.root},onFocus:()=>D(!0),onBlur:F,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),children:[t.map((e,t)=>{let n=e.value===N,r=o||!!e.disabled;return(0,p.jsxs)(`div`,{ref:e=>{b.current[t]=e},role:`radio`,"aria-checked":n,"aria-disabled":r||void 0,tabIndex:r?-1:t===R?c:-1,className:(0,u.default)(Gl.radioGroupOption,n&&Gl.radioGroupOptionChecked,r&&Gl.radioGroupOptionDisabled,_?.option),style:v?.option,onClick:()=>{r||P(e.value)},onKeyDown:e=>V(e,t),children:[(0,p.jsx)(`div`,{className:(0,u.default)(Gl.radioGroupRadio,n&&Gl.radioGroupRadioChecked,_?.radio),style:v?.radio,children:(0,p.jsx)(`div`,{className:(0,u.default)(Gl.radioGroupDot,n&&Gl.radioGroupDotChecked,_?.dot),style:v?.dot})}),(e.label??e.value)!==``&&(0,p.jsxs)(`div`,{className:Gl.radioGroupText,children:[(0,p.jsx)(`div`,{className:(0,u.default)(Gl.radioGroupLabel,_?.label),style:v?.label,children:e.label??e.value}),e.description!=null&&(0,p.jsx)(`div`,{className:(0,u.default)(Gl.radioGroupDescription,_?.description),style:v?.description,children:e.description})]})]},String(e.value))}),(0,p.jsx)(ya,{variant:`error`,message:j,isVisible:A&&(T||O)})]})}var ql={rating:`rating_eDKeX`,"rating-disabled":`rating-disabled_Xk0cI`,ratingDisabled:`rating-disabled_Xk0cI`,"rating-readOnly":`rating-readOnly_o8Kx1`,ratingReadOnly:`rating-readOnly_o8Kx1`,"rating-item":`rating-item_4tqx2`,ratingItem:`rating-item_4tqx2`,"rating-iconEmpty":`rating-iconEmpty_3uk2A`,ratingIconEmpty:`rating-iconEmpty_3uk2A`,"rating-iconFilledClip":`rating-iconFilledClip_4aNxG`,ratingIconFilledClip:`rating-iconFilledClip_4aNxG`,"rating-iconFilled":`rating-iconFilled_-rQ58`,ratingIconFilled:`rating-iconFilled_-rQ58`},Jl=4;function Yl(e,t){return Math.max(0,Math.min(t,e))}function Xl(e){let{value:t,defaultValue:n=0,onChange:r=()=>{},max:i=5,allowHalf:a=!1,allowClear:o=!0,readOnly:s=!1,disabled:c=!1,icon:d=f.faStar,"aria-label":m=`Rating`,className:h,style:g,classNames:_,styles:v,...y}=E(`Rating`,e),b=t!==void 0,[x,S]=(0,l.useState)(n),C=Yl(b?t:x,i),[w,T]=(0,l.useState)(null),D=!s&&!c,O=w??C,k=(0,l.useRef)(null),A=(0,l.useRef)(C),j=(0,l.useRef)(!1),M=(0,l.useRef)(0),N=(0,l.useRef)(!1);function P(e){let t=Yl(e,i);b||S(t),r(t)}function F(e){let t=k.current?.getBoundingClientRect();if(!t||t.width===0)return null;let n=Yl((e-t.left)/t.width,1)*i;return a?Math.round(n*2)/2:Math.ceil(n)}function I(e){if(!D)return;e.currentTarget.setPointerCapture?.(e.pointerId),j.current=!0,N.current=!1,M.current=e.clientX,A.current=C;let t=F(e.clientX);t!==null&&T(t)}function L(e){if(!D)return;let t=F(e.clientX);t!==null&&(j.current&&(e.preventDefault(),Math.abs(e.clientX-M.current)>Jl&&(N.current=!0)),T(t))}function R(e){if(!D||!j.current)return;e.currentTarget.releasePointerCapture?.(e.pointerId),j.current=!1;let t=F(e.clientX)??w;t!==null&&P(!N.current&&o&&t===A.current?0:t),T(null)}function z(){D&&!j.current&&T(null)}function B(e){let t=a?.5:1;e.key===`ArrowRight`||e.key===`ArrowUp`?(e.preventDefault(),P(C+t)):e.key===`ArrowLeft`||e.key===`ArrowDown`?(e.preventDefault(),P(C-t)):e.key===`Home`?(e.preventDefault(),P(0)):e.key===`End`&&(e.preventDefault(),P(i))}return(0,p.jsx)(`div`,{...y,ref:k,role:`slider`,"aria-label":m,"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":C,"aria-valuetext":`${C} out of ${i}`,"aria-readonly":s||void 0,"aria-disabled":c||void 0,tabIndex:D?0:-1,className:(0,u.default)(ql.rating,c&&ql.ratingDisabled,s&&ql.ratingReadOnly,_?.root,h),style:{...g,...v?.root},onKeyDown:D?B:void 0,onPointerDown:D?I:void 0,onPointerMove:D?L:void 0,onPointerUp:D?R:void 0,onPointerCancel:D?R:void 0,onPointerLeave:D?z:void 0,children:Array.from({length:i},(e,t)=>{let n=Math.round(Math.max(0,Math.min(1,O-t))*100);return(0,p.jsxs)(`div`,{className:(0,u.default)(ql.ratingItem,_?.item),style:v?.item,children:[X(d,{className:(0,u.default)(ql.ratingIconEmpty,_?.iconEmpty),style:v?.iconEmpty}),(0,p.jsx)(`div`,{className:ql.ratingIconFilledClip,style:{width:`${n}%`},children:X(d,{className:(0,u.default)(ql.ratingIconFilled,_?.iconFilled),style:v?.iconFilled})})]},t)})})}var Zl={revealLens:`revealLens_V3Kkk`,"revealLens-background":`revealLens-background_pQyK9`,revealLensBackground:`revealLens-background_pQyK9`,"revealLens-overlay":`revealLens-overlay_NOUoj`,revealLensOverlay:`revealLens-overlay_NOUoj`,"revealLens-overlay-transitioning":`revealLens-overlay-transitioning_-co2e`,revealLensOverlayTransitioning:`revealLens-overlay-transitioning_-co2e`};function Ql(e,t,n,r){let i=Math.max(n-r,0);return`radial-gradient(circle ${n}px at ${e}px ${t}px, transparent ${i}px, transparent ${i}px, white ${n}px)`}function $l(e,t){e.style.setProperty(`mask-image`,t),e.style.setProperty(`-webkit-mask-image`,t)}function eu(e){e.style.removeProperty(`mask-image`),e.style.removeProperty(`-webkit-mask-image`)}function tu(e){let{background:t,overlay:n,radius:r=120,feather:i=24,shape:a=`circle`,maskImage:o,disabled:s=!1,className:c,style:d,classNames:f,styles:m,...h}=E(`RevealLens`,e),g=(0,l.useRef)(null),_=(0,l.useRef)(null),v=(e,t)=>{let n=g.current,a=_.current;if(!n||!a)return;let s=n.getBoundingClientRect(),c=e-s.left,l=t-s.top;a.classList.remove(Zl.revealLensOverlayTransitioning),$l(a,o??Ql(c,l,r,i))},y=()=>{let e=_.current;e&&(e.classList.add(Zl.revealLensOverlayTransitioning),eu(e))},b=e=>{s||(e.currentTarget.setPointerCapture?.(e.pointerId),v(e.clientX,e.clientY))},x=e=>{s||v(e.clientX,e.clientY)},S=e=>{s||e.pointerType===`mouse`||y()},C=e=>{if(s)return;let t=g.current;if(t){let n=t.getBoundingClientRect();if(e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom)return;if(typeof document.elementFromPoint==`function`){let n=document.elementFromPoint(e.clientX,e.clientY);if(n&&t.contains(n))return}}y()};return(0,p.jsxs)(`div`,{...h,ref:g,className:(0,u.default)(Zl.revealLens,c,f?.root),style:{...d,...m?.root},"data-reveal-shape":a,onPointerDown:b,onPointerMove:x,onPointerUp:S,onPointerCancel:C,onPointerLeave:C,children:[(0,p.jsx)(`div`,{className:(0,u.default)(Zl.revealLensBackground,f?.background),style:m?.background,children:t}),(0,p.jsx)(`div`,{ref:_,className:(0,u.default)(Zl.revealLensOverlay,f?.overlay),style:m?.overlay,children:n})]})}var nu={planCanvas:`planCanvas_7XTdG`,"planCanvas-screen":`planCanvas-screen_lk83X`,planCanvasScreen:`planCanvas-screen_lk83X`,"planCanvas-underlay":`planCanvas-underlay_rpzSl`,planCanvasUnderlay:`planCanvas-underlay_rpzSl`,"planCanvas-grid":`planCanvas-grid_49CmH`,planCanvasGrid:`planCanvas-grid_49CmH`,"planCanvas-rooms":`planCanvas-rooms_UyjEC`,planCanvasRooms:`planCanvas-rooms_UyjEC`,"planCanvas-roomFill":`planCanvas-roomFill_LXlOf`,planCanvasRoomFill:`planCanvas-roomFill_LXlOf`,"planCanvas-roomFill-interactive":`planCanvas-roomFill-interactive_JSU1E`,planCanvasRoomFillInteractive:`planCanvas-roomFill-interactive_JSU1E`,"planCanvas-roomFill-hovered":`planCanvas-roomFill-hovered_7ZXgf`,planCanvasRoomFillHovered:`planCanvas-roomFill-hovered_7ZXgf`,"planCanvas-roomLabel":`planCanvas-roomLabel_GrzE3`,planCanvasRoomLabel:`planCanvas-roomLabel_GrzE3`,"planCanvas-roomName":`planCanvas-roomName_kHAtD`,planCanvasRoomName:`planCanvas-roomName_kHAtD`,"planCanvas-roomArea":`planCanvas-roomArea_X1Tal`,planCanvasRoomArea:`planCanvas-roomArea_X1Tal`,"planCanvas-walls":`planCanvas-walls_G9vXB`,planCanvasWalls:`planCanvas-walls_G9vXB`,"planCanvas-wallOutline":`planCanvas-wallOutline_eWEN-`,planCanvasWallOutline:`planCanvas-wallOutline_eWEN-`,"planCanvas-wallFill":`planCanvas-wallFill_iKHyE`,planCanvasWallFill:`planCanvas-wallFill_iKHyE`,"planCanvas-roomEdgeSelected":`planCanvas-roomEdgeSelected_wQk6B`,planCanvasRoomEdgeSelected:`planCanvas-roomEdgeSelected_wQk6B`,"planCanvas-wallCaps":`planCanvas-wallCaps_ZpLG4`,planCanvasWallCaps:`planCanvas-wallCaps_ZpLG4`,"planCanvas-roomEdgeCaps":`planCanvas-roomEdgeCaps_5Y7lq`,planCanvasRoomEdgeCaps:`planCanvas-roomEdgeCaps_5Y7lq`,"planCanvas-roomEdgeOutline":`planCanvas-roomEdgeOutline_Y1ZwL`,planCanvasRoomEdgeOutline:`planCanvas-roomEdgeOutline_Y1ZwL`,"planCanvas-roomEdgeFill":`planCanvas-roomEdgeFill_Qr9p-`,planCanvasRoomEdgeFill:`planCanvas-roomEdgeFill_Qr9p-`,"planCanvas-wallSelected":`planCanvas-wallSelected_vFNw8`,planCanvasWallSelected:`planCanvas-wallSelected_vFNw8`,"planCanvas-wallHovered":`planCanvas-wallHovered_CFIAR`,planCanvasWallHovered:`planCanvas-wallHovered_CFIAR`,"planCanvas-openings":`planCanvas-openings_1fyX4`,planCanvasOpenings:`planCanvas-openings_1fyX4`,"planCanvas-opening-selected":`planCanvas-opening-selected_Wgl4r`,planCanvasOpeningSelected:`planCanvas-opening-selected_Wgl4r`,"planCanvas-doorLeaf":`planCanvas-doorLeaf_1BEkI`,planCanvasDoorLeaf:`planCanvas-doorLeaf_1BEkI`,"planCanvas-doorSwing":`planCanvas-doorSwing_QCc5i`,planCanvasDoorSwing:`planCanvas-doorSwing_QCc5i`,"planCanvas-windowPane":`planCanvas-windowPane_5q9oQ`,planCanvasWindowPane:`planCanvas-windowPane_5q9oQ`,"planCanvas-opening-hovered":`planCanvas-opening-hovered_NGK0O`,planCanvasOpeningHovered:`planCanvas-opening-hovered_NGK0O`,"planCanvas-opening-hit":`planCanvas-opening-hit_frRch`,planCanvasOpeningHit:`planCanvas-opening-hit_frRch`,"planCanvas-opening-hit-interactive":`planCanvas-opening-hit-interactive_D4ZUY`,planCanvasOpeningHitInteractive:`planCanvas-opening-hit-interactive_D4ZUY`,"planCanvas-opening-outline":`planCanvas-opening-outline_HS2wY`,planCanvasOpeningOutline:`planCanvas-opening-outline_HS2wY`,"planCanvas-jamb":`planCanvas-jamb_e-I9r`,planCanvasJamb:`planCanvas-jamb_e-I9r`,"planCanvas-jamb-highlighted":`planCanvas-jamb-highlighted_rWYxZ`,planCanvasJambHighlighted:`planCanvas-jamb-highlighted_rWYxZ`,"planCanvas-selection":`planCanvas-selection_0a31R`,planCanvasSelection:`planCanvas-selection_0a31R`},ru=1,iu=[];function au(e){let t=e/1e6;return`${t.toFixed(+(t<10))} m²`}function ou(e){return e.length===0?``:`${e.map((e,t)=>`${t===0?`M`:`L`} ${e.x},${e.y}`).join(` `)} Z`}function su(e){return[ou(e.outer),...e.holes.map(ou)].filter(Boolean).join(` `)}function cu(e){let{ref:t,floor:n,underlay:r,rooms:i,view:a,selection:o=iu,hovered:s=null,interactiveRooms:d=!1,interactiveOpenings:f=!1,showGrid:m=!1,gridSize:h=100,showRoomLabels:g=!0,showOpeningSymbols:_=!0,getRoomColor:v,renderRoomLabel:y,getRoomLabel:b,formatArea:x=au,onRoomActivate:S,onOpeningActivate:C,onBackgroundActivate:w,onHoverChange:T,overlay:E,worldOverlay:D,size:O,className:k,style:A,classNames:j,styles:M,"aria-label":N}=e,P=a.zoom>0?1/a.zoom:1,F=ru*P,I=(0,l.useMemo)(()=>c.m(n),[n]),L=(0,l.useMemo)(()=>r?Object.values(r.walls).flatMap(e=>{let t=r.nodes[e.a],n=r.nodes[e.b];return t&&n?[{id:e.id,x1:t.x,y1:t.y,x2:n.x,y2:n.y}]:[]}):[],[r]),R=e=>({x:(e.x-a.x)*a.zoom,y:(e.y-a.y)*a.zoom}),z=(0,l.useMemo)(()=>{if(!m||h<=0)return null;let e=O.width*P,t=O.height*P,n=h*Math.max(1,10**Math.ceil(Math.log10(e/h/60))),r=Math.floor(a.x/n)*n,i=Math.floor(a.y/n)*n,o=[],s=[];for(let t=r;t<=a.x+e;t+=n)o.push(t);for(let e=i;e<=a.y+t;e+=n)s.push(e);return{verticals:o,horizontals:s,step:n,worldW:e,worldH:t}},[m,h,O.width,O.height,P,a.x,a.y]),B=(e,t)=>o.some(n=>n.type===e&&n.id===t),V=(e,t)=>s?.type===e&&s.id===t,H=(0,l.useMemo)(()=>{let e=new Set(o.filter(e=>e.type===`room`).map(e=>e.id)),t=new Set;for(let n of i)if(n.roomId&&e.has(n.roomId))for(let e of n.wallIds)t.add(e);return t},[i,o]),U=(0,l.useMemo)(()=>H.size>0?c.m(n,{wallIds:H}):{groups:[],caps:[]},[n,H]);function W(e){let t=c.h(n,e);if(!t)return null;let r=n.walls[e.wallId],i=r?r.thickness/2:50,{p1:a,p2:o,normal:s,dir:l,centre:d}=t,m=B(`opening`,e.id),h=V(`opening`,e.id),g=Math.hypot(o.x-a.x,o.y-a.y),v=[];if(_&&e.kind===c.ot.Door){let t=e.swing!==`endLeft`&&e.swing!==`endRight`,n=t?a:o,r=t?1:-1,i={x:n.x+s.x*g,y:n.y+s.y*g},c={x:n.x+l.x*g*r,y:n.y+l.y*g*r};v.push((0,p.jsx)(`path`,{className:nu.planCanvasDoorLeaf,d:`M ${n.x},${n.y} L ${i.x},${i.y}`,strokeWidth:F},`leaf`),(0,p.jsx)(`path`,{className:nu.planCanvasDoorSwing,d:`M ${i.x},${i.y} A ${g},${g} 0 0,${+!t} ${c.x},${c.y}`,strokeWidth:F},`swing`))}_&&e.kind===c.ot.Window&&v.push((0,p.jsx)(`path`,{className:nu.planCanvasWindowPane,d:`M ${a.x},${a.y} L ${o.x},${o.y}`,strokeWidth:F*2},`pane`));let y=`M ${a.x+s.x*i},${a.y+s.y*i} L ${o.x+s.x*i},${o.y+s.y*i} L ${o.x-s.x*i},${o.y-s.y*i} L ${a.x-s.x*i},${a.y-s.y*i} Z`;return(0,p.jsxs)(`g`,{className:(0,u.default)(m&&nu.planCanvasOpeningSelected,h&&nu.planCanvasOpeningHovered,j?.opening),style:M?.opening,"data-opening-kind":e.kind,children:[v,(0,p.jsx)(`path`,{className:(0,u.default)(nu.planCanvasOpeningHit,f&&nu.planCanvasOpeningHitInteractive),d:y,onClick:f&&C?t=>{t.stopPropagation(),C(e.id)}:void 0,onPointerEnter:T?()=>T({type:`opening`,id:e.id}):void 0,children:f&&(0,p.jsx)(`title`,{children:e.kind})}),(m||h)&&(0,p.jsx)(`path`,{className:nu.planCanvasOpeningOutline,d:y,vectorEffect:`non-scaling-stroke`}),(0,p.jsx)(`path`,{className:(0,u.default)(nu.planCanvasJamb,H.has(e.wallId)&&nu.planCanvasJambHighlighted),d:`M ${a.x-s.x*i},${a.y-s.y*i} L ${a.x+s.x*i},${a.y+s.y*i} M ${o.x-s.x*i},${o.y-s.y*i} L ${o.x+s.x*i},${o.y+s.y*i}`,strokeWidth:F}),d&&null]},e.id)}return(0,p.jsxs)(`svg`,{ref:t,className:(0,u.default)(nu.planCanvas,k,j?.canvas),style:{...A,...M?.canvas},viewBox:`0 0 ${Math.max(1,O.width)} ${Math.max(1,O.height)}`,width:O.width,height:O.height,role:`img`,"aria-label":N,onClick:w?()=>w():void 0,onPointerLeave:T?()=>T(null):void 0,children:[(0,p.jsxs)(`g`,{transform:`translate(${-a.x*a.zoom} ${-a.y*a.zoom}) scale(${a.zoom})`,children:[z&&(0,p.jsxs)(`g`,{className:(0,u.default)(nu.planCanvasGrid,j?.grid),style:M?.grid,"aria-hidden":`true`,children:[z.verticals.map(e=>(0,p.jsx)(`line`,{x1:e,y1:a.y,x2:e,y2:a.y+z.worldH,strokeWidth:P},`v${e}`)),z.horizontals.map(e=>(0,p.jsx)(`line`,{x1:a.x,y1:e,x2:a.x+z.worldW,y2:e,strokeWidth:P},`h${e}`))]}),L.length>0&&(0,p.jsx)(`g`,{className:(0,u.default)(nu.planCanvasUnderlay,j?.underlay),style:M?.underlay,"aria-hidden":`true`,children:L.map(e=>(0,p.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,strokeWidth:1.5},e.id))}),(0,p.jsx)(`g`,{className:(0,u.default)(nu.planCanvasRooms,j?.rooms),style:M?.rooms,children:i.map(e=>{let t=e.roomId?B(`room`,e.roomId):!1,n=e.roomId?V(`room`,e.roomId):!1,r=e.meta?v?.(e.meta,e.area):void 0,i=b?.(e.meta,{area:e.area});return(0,p.jsx)(`path`,{className:(0,u.default)(nu.planCanvasRoomFill,n&&nu.planCanvasRoomFillHovered,d&&nu.planCanvasRoomFillInteractive,j?.roomFill),"data-state":t?`selected`:n?`hovered`:void 0,style:{...M?.roomFill,...r?{fill:r}:null},d:su(e),fillRule:`evenodd`,tabIndex:d?0:void 0,role:d?`button`:void 0,"aria-pressed":d?t:void 0,onClick:d&&S&&e.roomId?t=>{t.stopPropagation(),S(e.roomId)}:void 0,onKeyDown:d&&S&&e.roomId?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),S(e.roomId))}:void 0,onPointerEnter:T&&e.roomId?()=>T({type:`room`,id:e.roomId}):void 0,children:d&&i&&(0,p.jsx)(`title`,{children:i})},e.id)})}),(0,p.jsxs)(`g`,{className:(0,u.default)(nu.planCanvasWalls,j?.walls),style:M?.walls,"aria-hidden":`true`,children:[(0,p.jsx)(`g`,{className:nu.planCanvasWallOutline,children:I.groups.map(e=>(0,p.jsx)(`path`,{className:j?.wallBody,style:M?.wallBody,d:e.d,strokeWidth:e.thickness},`o${e.thickness}`))}),(0,p.jsx)(`g`,{className:nu.planCanvasWallFill,children:I.groups.map(e=>{let t=e.thickness-2*F;return t<=0?null:(0,p.jsx)(`path`,{d:e.d,strokeWidth:t},`f${e.thickness}`)})}),(0,p.jsxs)(`g`,{className:nu.planCanvasRoomEdgeSelected,children:[U.groups.map(e=>(0,p.jsx)(`path`,{className:nu.planCanvasRoomEdgeOutline,d:e.d,strokeWidth:e.thickness},`o${e.thickness}`)),U.groups.map(e=>{let t=e.thickness-2*F;return t<=0?null:(0,p.jsx)(`path`,{className:nu.planCanvasRoomEdgeFill,d:e.d,strokeWidth:t},`f${e.thickness}`)})]}),(0,p.jsx)(`g`,{className:nu.planCanvasWallCaps,children:I.caps.filter(e=>!H.has(e.wallId)).map((e,t)=>(0,p.jsx)(`line`,{x1:e.a.x,y1:e.a.y,x2:e.b.x,y2:e.b.y,strokeWidth:F},`${e.wallId}-${e.reason}-${t}`))}),(0,p.jsx)(`g`,{className:nu.planCanvasRoomEdgeCaps,children:U.caps.map((e,t)=>(0,p.jsx)(`line`,{x1:e.a.x,y1:e.a.y,x2:e.b.x,y2:e.b.y,strokeWidth:F},`${e.wallId}-${e.reason}-${t}`))})]}),(0,p.jsx)(`g`,{className:(0,u.default)(nu.planCanvasOpenings,j?.openings),style:M?.openings,children:Object.values(n.openings).map(W)}),(0,p.jsxs)(`g`,{className:nu.planCanvasSelection,"aria-hidden":`true`,children:[o.filter(e=>e.type===`wall`).map(e=>{let t=n.walls[e.id];if(!t)return null;let r=n.nodes[t.a],i=n.nodes[t.b];return!r||!i?null:(0,p.jsx)(`line`,{x1:r.x,y1:r.y,x2:i.x,y2:i.y,strokeWidth:t.thickness,className:nu.planCanvasWallSelected},e.id)}),s?.type===`wall`&&!B(`wall`,s.id)&&(()=>{let e=n.walls[s.id];if(!e)return null;let t=n.nodes[e.a],r=n.nodes[e.b];return!t||!r?null:(0,p.jsx)(`line`,{x1:t.x,y1:t.y,x2:r.x,y2:r.y,strokeWidth:e.thickness,className:nu.planCanvasWallHovered})})()]}),D]}),(0,p.jsxs)(`g`,{className:(0,u.default)(nu.planCanvasScreen,j?.overlay),style:M?.overlay,children:[g&&i.map(e=>{let t=R(e.anchor);if(t.x<-200||t.y<-200||t.x>O.width+200||t.y>O.height+200)return null;let n=y?.(e.meta,{area:e.area,faceId:e.id});return n===null?null:(0,p.jsx)(`g`,{className:(0,u.default)(nu.planCanvasRoomLabel,j?.roomLabel),style:M?.roomLabel,transform:`translate(${t.x} ${t.y})`,"aria-hidden":`true`,children:n===void 0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`text`,{className:nu.planCanvasRoomName,textAnchor:`middle`,children:e.meta?.name??``}),(0,p.jsx)(`text`,{className:nu.planCanvasRoomArea,textAnchor:`middle`,dy:`1.2em`,children:x(e.area)})]}):n},e.id)}),E]})]})}var lu=500;function uu(e,t=50){let[n,r]=(0,l.useState)(e),i=(0,l.useRef)([]),a=(0,l.useRef)([]),o=(0,l.useRef)(null),s=(0,l.useRef)(e),c=(0,l.useRef)(null),[,u]=(0,l.useState)(0),d=(0,l.useCallback)(e=>{s.current=e,r(e)},[]),f=(0,l.useCallback)(e=>{i.current=[...i.current,e].slice(-t),a.current=[]},[t]),p=(0,l.useCallback)(()=>{o.current=s.current},[]),m=(0,l.useCallback)(e=>{d(e)},[d]),h=(0,l.useCallback)(()=>{let e=o.current;return o.current=null,!e||e===s.current?!1:(f(e),c.current=null,u(e=>e+1),!0)},[f]),g=(0,l.useCallback)(()=>{let e=o.current;return o.current=null,e?(d(e),e):null},[d]),_=(0,l.useCallback)((e,t,n=[])=>{if(e===s.current)return;let r=n.join(`,`),o=Date.now(),l=c.current;l!==null&&l.reason===t&&l.targets===r&&o-l.at<lu&&i.current.length>0?a.current=[]:f(s.current),c.current={reason:t,targets:r,at:o},d(e),u(e=>e+1)},[f,d]),v=(0,l.useCallback)(e=>{d(e)},[d]),y=(0,l.useCallback)(()=>{let e=i.current;if(e.length===0)return null;let t=e[e.length-1];return i.current=e.slice(0,-1),a.current=[s.current,...a.current],c.current=null,d(t),u(e=>e+1),t},[d]),b=(0,l.useCallback)(()=>{let e=a.current;if(e.length===0)return null;let n=e[0];return a.current=e.slice(1),i.current=[...i.current,s.current].slice(-t),c.current=null,d(n),u(e=>e+1),n},[t,d]),x=(0,l.useCallback)(()=>{i.current=[],a.current=[],c.current=null,u(e=>e+1)},[]),S=(0,l.useCallback)(()=>o.current!==null,[]);return{present:n,canUndo:i.current.length>0,canRedo:a.current.length>0,beginGesture:p,updateGesture:m,endGesture:h,cancelGesture:g,commit:_,replace:v,undo:y,redo:b,clearHistory:x,isGestureActive:S}}var $={roomDrawer:`roomDrawer_SJj4-`,"roomDrawer-disabled":`roomDrawer-disabled_VRaTX`,roomDrawerDisabled:`roomDrawer-disabled_VRaTX`,"roomDrawer-toolbar":`roomDrawer-toolbar_55H5p`,roomDrawerToolbar:`roomDrawer-toolbar_55H5p`,"roomDrawer-toolbar-separator":`roomDrawer-toolbar-separator_z-eRp`,roomDrawerToolbarSeparator:`roomDrawer-toolbar-separator_z-eRp`,"roomDrawer-toolButton":`roomDrawer-toolButton_4GtjR`,roomDrawerToolButton:`roomDrawer-toolButton_4GtjR`,"roomDrawer-viewButton":`roomDrawer-viewButton_OnZR6`,roomDrawerViewButton:`roomDrawer-viewButton_OnZR6`,"roomDrawer-toolButtonActive":`roomDrawer-toolButtonActive_-BXua`,roomDrawerToolButtonActive:`roomDrawer-toolButtonActive_-BXua`,"roomDrawer-toolIcon":`roomDrawer-toolIcon_mJ0vT`,roomDrawerToolIcon:`roomDrawer-toolIcon_mJ0vT`,"roomDrawer-viewControls":`roomDrawer-viewControls_TKUQ1`,roomDrawerViewControls:`roomDrawer-viewControls_TKUQ1`,"roomDrawer-zoomLabel":`roomDrawer-zoomLabel_xGvgk`,roomDrawerZoomLabel:`roomDrawer-zoomLabel_xGvgk`,"roomDrawer-floorBar":`roomDrawer-floorBar_PMWOg`,roomDrawerFloorBar:`roomDrawer-floorBar_PMWOg`,"roomDrawer-floorTab":`roomDrawer-floorTab_lvLY-`,roomDrawerFloorTab:`roomDrawer-floorTab_lvLY-`,"roomDrawer-floorTab-active":`roomDrawer-floorTab-active_pB7Oz`,roomDrawerFloorTabActive:`roomDrawer-floorTab-active_pB7Oz`,"roomDrawer-floorTab-add":`roomDrawer-floorTab-add_F46eU`,roomDrawerFloorTabAdd:`roomDrawer-floorTab-add_F46eU`,"roomDrawer-canvasWrapper":`roomDrawer-canvasWrapper_ctjFw`,roomDrawerCanvasWrapper:`roomDrawer-canvasWrapper_ctjFw`,"roomDrawer-canvasWrapper-drawing":`roomDrawer-canvasWrapper-drawing_8kVH2`,roomDrawerCanvasWrapperDrawing:`roomDrawer-canvasWrapper-drawing_8kVH2`,"roomDrawer-preview":`roomDrawer-preview_vqJGn`,roomDrawerPreview:`roomDrawer-preview_vqJGn`,"roomDrawer-marquee":`roomDrawer-marquee_Vbm28`,roomDrawerMarquee:`roomDrawer-marquee_Vbm28`,"roomDrawer-handle":`roomDrawer-handle_AFyj0`,roomDrawerHandle:`roomDrawer-handle_AFyj0`,"roomDrawer-handle-active":`roomDrawer-handle-active_rfh4M`,roomDrawerHandleActive:`roomDrawer-handle-active_rfh4M`,"roomDrawer-toolButtonOn":`roomDrawer-toolButtonOn_et-K9`,roomDrawerToolButtonOn:`roomDrawer-toolButtonOn_et-K9`,"roomDrawer-guide":`roomDrawer-guide_cg7gP`,roomDrawerGuide:`roomDrawer-guide_cg7gP`,"roomDrawer-guide-angle":`roomDrawer-guide-angle_3SLun`,roomDrawerGuideAngle:`roomDrawer-guide-angle_3SLun`,"roomDrawer-snapMarker":`roomDrawer-snapMarker_2SDhf`,roomDrawerSnapMarker:`roomDrawer-snapMarker_2SDhf`,"roomDrawer-measureLine":`roomDrawer-measureLine_Htenn`,roomDrawerMeasureLine:`roomDrawer-measureLine_Htenn`,"roomDrawer-measureLine-hovered":`roomDrawer-measureLine-hovered_f6U9P`,roomDrawerMeasureLineHovered:`roomDrawer-measureLine-hovered_f6U9P`,"roomDrawer-measureGrip":`roomDrawer-measureGrip_OGY0c`,roomDrawerMeasureGrip:`roomDrawer-measureGrip_OGY0c`,"roomDrawer-midHandle":`roomDrawer-midHandle_rJVzW`,roomDrawerMidHandle:`roomDrawer-midHandle_rJVzW`,"roomDrawer-measure":`roomDrawer-measure_N-cse`,roomDrawerMeasure:`roomDrawer-measure_N-cse`,"roomDrawer-measure-locked":`roomDrawer-measure-locked_FiNSg`,roomDrawerMeasureLocked:`roomDrawer-measure-locked_FiNSg`,"roomDrawer-measure-offset":`roomDrawer-measure-offset_IdBYD`,roomDrawerMeasureOffset:`roomDrawer-measure-offset_IdBYD`,"roomDrawer-measure-secondary":`roomDrawer-measure-secondary_DgNzz`,roomDrawerMeasureSecondary:`roomDrawer-measure-secondary_DgNzz`,"roomDrawer-inspector":`roomDrawer-inspector_hOVUl`,roomDrawerInspector:`roomDrawer-inspector_hOVUl`,"roomDrawer-inspector-action":`roomDrawer-inspector-action_zMwML`,roomDrawerInspectorAction:`roomDrawer-inspector-action_zMwML`,"roomDrawer-inspector-label":`roomDrawer-inspector-label_yA6NE`,roomDrawerInspectorLabel:`roomDrawer-inspector-label_yA6NE`,"roomDrawer-inspector-kind":`roomDrawer-inspector-kind_ebNzr`,roomDrawerInspectorKind:`roomDrawer-inspector-kind_ebNzr`,"roomDrawer-inspector-kindEmpty":`roomDrawer-inspector-kindEmpty_JIx7s`,roomDrawerInspectorKindEmpty:`roomDrawer-inspector-kindEmpty_JIx7s`,"roomDrawer-inspector-field":`roomDrawer-inspector-field_-c8za`,roomDrawerInspectorField:`roomDrawer-inspector-field_-c8za`,"roomDrawer-inspector-name":`roomDrawer-inspector-name_3xHLm`,roomDrawerInspectorName:`roomDrawer-inspector-name_3xHLm`,"roomDrawer-inspector-delete":`roomDrawer-inspector-delete_MzEl2`,roomDrawerInspectorDelete:`roomDrawer-inspector-delete_MzEl2`,"roomDrawer-hint":`roomDrawer-hint_3WTFa`,roomDrawerHint:`roomDrawer-hint_3WTFa`,"roomDrawer-hint-report":`roomDrawer-hint-report_oFtGt`,roomDrawerHintReport:`roomDrawer-hint-report_oFtGt`,"roomDrawer-fileInput":`roomDrawer-fileInput_EAZw-`,roomDrawerFileInput:`roomDrawer-fileInput_EAZw-`},du=[`select`,`wall`,`rect`,`door`,`window`,`archway`,`measure`],fu={v:`select`,w:`wall`,r:`rect`,d:`door`,n:`window`,a:`archway`,m:`measure`},pu={door:c.ot.Door,window:c.ot.Window,archway:c.ot.Archway},mu={[c.ot.Door]:{width:900,sill:0,head:2100},[c.ot.Window]:{width:1200,sill:900,head:2100},[c.ot.Archway]:{width:1200,sill:0,head:2100},[c.ot.Gap]:{width:1e3,sill:0,head:2500}},hu=1,gu=4,_u=[];function vu(e){return e>=1e3?`${(e/1e3).toFixed(2)} m`:`${Math.round(e)} mm`}function yu(e){let t=e/1e6;return`${t.toFixed(+(t<10))} m²`}function bu(e){return`${Math.round(e*10)/10}°`}function xu(e){return`${Math.round(e*1e3)/10}%`}function Su(e){let t=(e*180/Math.PI%360+360)%360;return t>180?t-360:t}var Cu={tools:`Drawing tools`,storeyHeightHint:`Storey height. The floors above move to sit on top of it.`,sillHeightHint:`How far above the floor the opening starts. Stored for a 3D view; it does not change the plan.`,select:`Select and edit`,wall:`Draw walls`,rect:`Draw a room`,measure:`Measure`,door:`Add a door`,window:`Add a window`,archway:`Add an archway`,undo:`Undo`,redo:`Redo`,download:`Download plan`,upload:`Open a plan file`,underlay:`Show the floor below`,addFloor:`Add a floor above`,floorName:`Floor name`,duplicateFloor:`Copy this floor to a new one above`,deleteFloor:`Delete this floor`,floorHeight:`Height (mm)`,moveFloorUp:`Move this floor up`,moveFloorDown:`Move this floor down`,newRoomName:e=>`Room ${e}`,newFloorName:e=>`Floor ${e}`,copiedFloorName:e=>`${e} copy`,initialFloorName:`Ground floor`,selectedFloor:`Floor`,importFailed:`That file could not be read as a floor plan`,snap:`Snap to grid and geometry`,angleLock:e=>`Lock to ${e}° angles`,grid:`Show grid`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,fit:`Fit to content`,roomName:`Room name`,addCorner:`Add corner`,thickness:`Thickness (mm)`,width:`Width (mm)`,sill:`Sill (mm)`,deleteSelection:`Delete selection`,selectedCount:e=>`${e} selected`,selectedRoom:`Room`,selectedWall:`Wall`,selectedCorner:`Corner`,selectedDoor:`Door`,selectedWindow:`Window`,selectedArchway:`Archway`,selectedGap:`Gap`,hintSelect:`Drag a corner to reshape · Drag a wall to push it, and the room next door moves with it · Ctrl-click or drag a box to select several · Delete to remove`,hintSelectSingle:`Drag a corner to reshape · Drag a wall to push it, and the room next door moves with it · Drag the dot on a selected wall to add a corner · Delete to remove`,hintWall:`Click to place corners · Shift for a fixed angle, L to latch it · Click the first corner or press Enter to close`,hintRect:`Drag to draw a room`,hintMeasure:`Drag to measure · Drag an end or the line to adjust it · Delete removes one, Escape clears them`,hintOpening:`Click a wall to cut an opening into it`,relativeAngle:e=>`${e} rel`};function wu(e){let{ref:t,value:n,defaultValue:r,onChange:i,onChangeEnd:a,floorId:o,defaultFloorId:s,onFloorChange:d,showFloorBar:m=!0,showUnderlay:h=!0,tool:g,defaultTool:_=`select`,onToolChange:v,tools:y=du,selection:b,defaultSelection:x,onSelectionChange:S,multiSelect:C=!0,onHoverChange:w,view:T,defaultView:O,onViewChange:k,minZoom:A=.005,maxZoom:M=2,fitOnMount:N=!0,gridSize:P=100,showGrid:F=!0,snap:I=!0,angleLock:L=!1,constrainAngle:R=45,showSnapGuides:z=!0,wallThickness:B=c.R.thickness,wallHeight:V,openingDefaults:H,showMeasurements:U=!0,formatLength:W=vu,formatArea:G=yu,formatAngle:ee=bu,formatZoom:K=xu,showToolbar:te=!0,showInspector:ne=!0,showHint:re=!0,showHistoryControls:q=!0,showFileControls:ie=!0,fileName:ae,onImport:J,historyMode:oe=`internal`,historyLimit:se=50,onHistoryChange:ce,readOnly:le=!1,disabled:Y=!1,canvasHeight:ue=`420px`,getRoomColor:de,renderRoomLabel:fe,labels:pe,icons:me,"aria-label":he,className:ge,style:_e,classNames:ve,styles:be,...xe}=E(`RoomDrawer`,e),Z=D(`RoomDrawer`,pe,Cu),{newRoomName:Se,newFloorName:Ce,copiedFloorName:we,initialFloorName:Te,relativeAngle:Ee}=Z,De=Pe(),Oe=De?c.u:c.l,ke=(0,l.useRef)(null),Ae=(0,l.useRef)(null),je=(0,l.useRef)(null),Me=(0,l.useRef)(null),Ne=(0,l.useRef)({kind:`none`}),Fe=(0,l.useRef)(new Map),Ie=(0,l.useRef)(null),Le=(0,l.useRef)(!1),Re=(0,l.useRef)(!1),ze=(0,l.useRef)(!1),Be=uu((0,l.useMemo)(()=>r??n??c.D({floorLabel:Te}),[]),se),Ve=n!==void 0,He=Ve?n:Be.present;(0,l.useEffect)(()=>{if(Ve&&n){if(n===Me.current){Be.replace(n);return}Be.commit(n,`external`)}},[n,Ve]);let[Ue,We]=(0,l.useState)(s),Ge=o??Ue??He.floors[0]?.id,Q=(0,l.useMemo)(()=>c.j(He,Ge)??c.j(He)??c.D().floors[0],[He,Ge]),[Ke,qe]=(0,l.useState)(h);(0,l.useEffect)(()=>qe(h),[h]);let Je=(0,l.useMemo)(()=>Ke?c.O(He,Q.id):null,[Ke,He,Q.id]),Ye=(0,l.useCallback)(e=>{e!==Q.id&&(o===void 0&&We(e),d?.(e))},[Q.id,o,d]),Xe=(0,l.useMemo)(()=>c.v(Q),[Q]).rooms,[Ze,Qe]=(0,l.useState)(_),$e=g??Ze,et=(0,l.useCallback)(e=>{g===void 0&&Qe(e),v?.(e)},[g,v]),[tt,nt]=(0,l.useState)(x??_u),rt=b===void 0?tt:b,it=(0,l.useRef)(rt);it.current=rt;let at=(0,l.useCallback)(e=>{let t=e===null?_u:Array.isArray(e)?e:[e];it.current=t,b===void 0&&nt(t),S?.([...t])},[b,S]),ot=(0,l.useCallback)(e=>{let t=it.current,n=t.filter(t=>t.type!==e.type||t.id!==e.id);at(n.length===t.length?[...t,e]:n)},[at]),st=rt.length===1?rt[0]:null,ct=(0,l.useCallback)(e=>{let t=new Set;for(let n of e)if(n.type===`node`)t.add(n.id);else if(n.type===`wall`){let e=Q.walls[n.id];e&&(t.add(e.a),t.add(e.b))}else if(n.type===`room`){let e=Xe.find(e=>e.roomId===n.id);for(let n of e?.nodeIds??[])t.add(n)}return t},[Q.walls,Xe]),lt=(0,l.useMemo)(()=>ct(rt),[ct,rt]),[ut,dt]=(0,l.useState)(null),[ft,pt]=(0,l.useState)(O??{x:0,y:0,zoom:.05}),mt=T??ft,ht=(0,l.useCallback)(e=>{T===void 0&&pt(e),k?.(e)},[T,k]),[gt,_t]=(0,l.useState)({width:800,height:420}),[vt,yt]=(0,l.useState)([]),[bt,xt]=(0,l.useState)(null),[St,Ct]=(0,l.useState)(I),[wt,Tt]=(0,l.useState)(L);(0,l.useEffect)(()=>Ct(I),[I]),(0,l.useEffect)(()=>Tt(L),[L]);let[Et,Dt]=(0,l.useState)(F);(0,l.useEffect)(()=>Dt(F),[F]);let Ot=(0,l.useRef)(null),[kt,At]=(0,l.useState)(null),[jt,Mt]=(0,l.useState)([]),Nt=(0,l.useRef)(0),[Pt,Ft]=(0,l.useState)(null),It=(0,l.useRef)(null),Lt=(0,l.useCallback)(e=>{let t=c.p(Oe,mt.zoom);for(let n=jt.length-1;n>=0;n--){let r=jt[n];if(Math.hypot(e.x-r.a.x,e.y-r.a.y)<=t.node)return{id:r.id,end:`a`};if(Math.hypot(e.x-r.b.x,e.y-r.b.y)<=t.node)return{id:r.id,end:`b`}}for(let n=jt.length-1;n>=0;n--){let r=jt[n];if(c.it(e,r.a,r.b).dist<=t.wall)return{id:r.id}}return null},[jt,Oe,mt.zoom]),[Rt,zt]=(0,l.useState)(null),Bt=!le&&!Y,Vt=(0,l.useMemo)(()=>{if(vt.length<2)return;let e=vt[vt.length-2],t=vt[vt.length-1];return Math.atan2(t.y-e.y,t.x-e.x)},[vt]);(0,l.useEffect)(()=>{let e=Ae.current;if(!e)return;let t=new ResizeObserver(()=>{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&_t({width:Math.round(t.width),height:Math.round(t.height)})});t.observe(e);let n=e.getBoundingClientRect();return n.width>0&&n.height>0&&_t({width:Math.round(n.width),height:Math.round(n.height)}),()=>t.disconnect()},[]);let Ht=(0,l.useCallback)((e,t)=>{let n=Ae.current?.getBoundingClientRect()??{left:0,top:0};return c.s(e,t,n,mt)},[mt]),Ut=(0,l.useCallback)(e=>({x:(e.x-mt.x)*mt.zoom,y:(e.y-mt.y)*mt.zoom}),[mt]),Wt=(0,l.useCallback)((e,t,n,r,i)=>{let a=St!==Re.current,o=wt!==ze.current,s=c.c(e,{floor:Q,pxToWorld:mt.zoom>0?1/mt.zoom:1,origin:t,referenceAngle:r,excludeNodeIds:n,excludeWallIds:i,options:{enabled:a?[c.o.Node,c.o.Intersection,c.o.Wall,c.o.Angle,c.o.Extension,c.o.Alignment,c.o.Grid]:[],gridSize:P,angleStepDeg:o?R:0,toleranceScreenPx:De?16:10}});return Ot.current=s,s},[Q,mt.zoom,St,wt,P,R,De]),Gt=(0,l.useCallback)(e=>{let t=Object.values(Q.walls).filter(t=>t.a===e||t.b===e),n=new Set(t.map(e=>e.id)),r=Q.nodes[e];if(!r)return{excludeWallIds:n};let i={x:r.x,y:r.y},a,o=t[0];if(o){let t=o.a===e?o.b:o.a,n=Q.nodes[t];n&&(a=Math.atan2(n.y-r.y,n.x-r.x))}return{origin:i,referenceAngle:a,excludeWallIds:n}},[Q]),Kt=(0,l.useCallback)((e={})=>{let t=e.padding??24,n=c.k(Q);if(!n||n.width<=0||n.height<=0){ht({x:-1e3,y:-1e3,zoom:.05});return}let r=Math.min((gt.width-t*2)/n.width,(gt.height-t*2)/n.height),i=Math.max(A,Math.min(M,r));ht({x:n.minX-(gt.width/i-n.width)/2,y:n.minY-(gt.height/i-n.height)/2,zoom:i})},[Q,gt.width,gt.height,A,M,ht]),qt=(0,l.useRef)(!1);(0,l.useEffect)(()=>{N&&!qt.current&&Object.keys(Q.nodes).length!==0&&(gt.width<=1||(qt.current=!0,Kt()))},[N,Q,gt.width,Kt]);let Jt=(0,l.useCallback)((e,t,n,r=[],o={})=>{if(e===Q)return He;let s=c.F(He,e);Me.current=s,n?o.push===!1?Be.replace(s):Be.commit(s,t,r):Be.updateGesture(s);let l={reason:t,committed:n,targetIds:r};return i?.(s,l),n&&a?.(s,l),s},[Q,He,Be,i,a]),Yt=(0,l.useCallback)((e,t,n=[],r={})=>{let i=c._(c.tt(e).floor,{nameFor:Se}).floor;return Jt(i,t,!0,n,r)},[Jt,Se]);(0,l.useEffect)(()=>{ce?.({canUndo:Be.canUndo,canRedo:Be.canRedo})},[Be.canUndo,Be.canRedo,ce]);let Xt=(0,l.useMemo)(()=>st?.type===`room`?Xe.find(e=>e.roomId===st.id)??null:null,[st,Xe]),Zt=st?.type===`wall`?Q.walls[st.id]:void 0,Qt=st?.type===`opening`?Q.openings[st.id]:void 0,$t=(0,l.useMemo)(()=>{if(!Zt)return null;let e=Q.nodes[Zt.a],t=Q.nodes[Zt.b];return!e||!t?null:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}},[Zt,Q.nodes]),en=(0,l.useCallback)(()=>{if(!Bt||!Zt)return;let e=c.X(Q,Zt.id,.5);e.result.wallIds&&(Yt(e.floor,`edit-wall`,[e.result.nodeId]),at({type:`node`,id:e.result.nodeId}))},[Bt,Zt,Q,Yt,at]),tn=(0,l.useCallback)((e,t,n=new Set)=>{if(e.type===`wall`)return{floor:c.J(t,e.id).floor};if(e.type===`opening`)return{floor:c.q(t,e.id).floor};if(e.type===`node`){let n=c.W(t,e.id,{force:!0});if(n.result)return{floor:n.floor,reselect:{type:`wall`,id:n.result.wallId}};let r=t;for(let n of Object.values(t.walls))(n.a===e.id||n.b===e.id)&&(r=c.J(r,n.id,{dissolveCollinear:!1}).floor);return{floor:r}}let r=Xe.find(t=>t.roomId===e.id);if(!r)return{floor:t};let i=new Set;for(let t of Xe)if(t.roomId!==e.id&&!(t.roomId&&n.has(t.roomId)))for(let e of t.wallIds)i.add(e);let a=t;for(let e of new Set(r.wallIds))i.has(e)||(a=c.J(a,e,{dissolveCollinear:!1}).floor);let o={...a.rooms};return delete o[e.id],{floor:{...a,rooms:o}}},[Xe]),nn=(0,l.useCallback)(()=>{let e=it.current;if(!Bt||e.length===0)return;let t={room:0,opening:1,wall:2,node:3},n=[...e].sort((e,n)=>t[e.type]-t[n.type]),r=new Set(n.filter(e=>e.type===`room`).map(e=>e.id)),i=Q,a;for(let e of n){let t=tn(e,i,r);i=t.floor,n.length===1&&(a=t.reselect)}i!==Q&&(Yt(i,`delete`,n.map(e=>e.id)),at(a??null))},[Bt,Q,tn,Yt,at]),rn=(0,l.useCallback)(()=>{yt(e=>e.length===0?e:[]),At(null)},[]);(0,l.useEffect)(()=>{rn()},[$e,rn]);let an=(0,l.useCallback)(e=>{if(Y)return;if(ke.current?.focus(),zt(null),Fe.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),e.currentTarget.setPointerCapture?.(e.pointerId),Fe.current.size===2){let[e,t]=[...Fe.current.values()];Ne.current.kind!==`none`&&Ne.current.kind!==`pan`&&Be.cancelGesture(),Ne.current={kind:`pinch`,startDist:Math.hypot(t.x-e.x,t.y-e.y),startView:mt,startMid:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}};return}if(Fe.current.size>2)return;if(Ie.current={client:{x:e.clientX,y:e.clientY},moved:!1},e.button===1||Le.current){Ne.current={kind:`pan`,startClient:{x:e.clientX,y:e.clientY},startView:mt};return}if(e.button!==0)return;let t=Ht(e.clientX,e.clientY);if(!Bt){let e=c.d(Q,Xe,t,c.p(Oe,mt.zoom));at(e);return}if($e===`rect`){let e=Wt(t).point;Ne.current={kind:`rect`,start:e,current:e},Be.beginGesture();return}if($e===`measure`){let e=Lt(t);if(e){let n=jt.find(t=>t.id===e.id);Ne.current=e.end?{kind:`measureEnd`,id:e.id,end:e.end}:{kind:`measureMove`,id:e.id,startWorld:t,origA:n.a,origB:n.b};return}let n=Wt(t).point;Ne.current={kind:`measure`,start:n,current:n};return}if($e===`wall`){let e=vt[vt.length-1],n=Wt(t,e,void 0,Vt).point;if(vt.length===0){yt([n]);return}let r=vt[vt.length-1],i=c.V(Q,r,n,{thickness:B,type:c.lt.Interior,height:V},c.p(Oe,mt.zoom).node);i.result.wallIds.length>0&&Yt(i.floor,`draw-wall`,i.result.wallIds),vt.length>=2&&Math.hypot(n.x-vt[0].x,n.y-vt[0].y)<c.p(Oe,mt.zoom).node?rn():yt(e=>[...e,n]);return}let n=pu[$e];if(n){let e=c.p(Oe,mt.zoom),r=c.d(Q,Xe,t,e,{accept:[`wall`]});if(r?.type!==`wall`)return;let i=Q.walls[r.id],a=Q.nodes[i.a],o=Q.nodes[i.b],s=Math.hypot(o.x-a.x,o.y-a.y),l=((t.x-a.x)*(o.x-a.x)+(t.y-a.y)*(o.y-a.y))/(s*s||1),u={...mu[n],...H?.[n]},d=c.z(Q,{wallId:i.id,kind:n,offset:Math.min(Math.max(l,0),1)*s,width:u.width,sill:u.sill,head:u.head});d.result.openingId&&(Yt(d.floor,`add-opening`,[d.result.openingId]),at({type:`opening`,id:d.result.openingId}));return}let r=c.p(Oe,mt.zoom);if($t&&st?.type===`wall`&&Math.hypot(t.x-$t.x,t.y-$t.y)<=r.node){Be.beginGesture(),Ne.current={kind:`wallSplit`,wallId:st.id,at:$t};return}let i=c.d(Q,Xe,t,r),a=C&&(e.ctrlKey||e.metaKey);if(!i){a||at(null),Ne.current=C?{kind:`marquee`,start:t,current:t,additive:a,base:it.current}:{kind:`none`};return}if((e.ctrlKey||e.metaKey)&&i.type===`wall`&&Q.walls[i.id]){let e=Q.walls[i.id];a||at(i),Be.beginGesture(),Ne.current={kind:`wall`,wallId:i.id,startWorld:t,origA:{...Q.nodes[e.a]},origB:{...Q.nodes[e.b]},moved:!1,detach:!0,toggle:a};return}if(a){ot(i),Ne.current={kind:`none`};return}if(it.current.some(e=>e.type===i.type&&e.id===i.id)||at(i),Be.beginGesture(),it.current.length>1){let e=[...ct(it.current)],n={};for(let t of e){let e=Q.nodes[t];e&&(n[t]={x:e.x,y:e.y})}Ne.current={kind:`room`,nodeIds:e,startWorld:t,orig:n,moved:!1};return}if(i.type===`node`)Ne.current={kind:`node`,nodeId:i.id,moved:!1,...Gt(i.id)};else if(i.type===`wall`){let e=Q.walls[i.id];Ne.current={kind:`wall`,wallId:i.id,startWorld:t,origA:{...Q.nodes[e.a]},origB:{...Q.nodes[e.b]},moved:!1}}else if(i.type===`opening`)Ne.current={kind:`opening`,openingId:i.id,moved:!1};else{let e=Xe.find(e=>e.roomId===i.id),n=e?[...new Set(e.nodeIds)]:[],r={};for(let e of n){let t=Q.nodes[e];t&&(r[e]={x:t.x,y:t.y})}Ne.current={kind:`room`,nodeIds:n,startWorld:t,orig:r,moved:!1}}},[Y,Bt,mt,$e,Q,Xe,Oe,Ht,Wt,vt,B,V,H,Yt,at,$t,st,Vt,Gt,ct,C,ot,Be,rn,Lt,jt]),on=(0,l.useCallback)(e=>{if(Y)return;Fe.current.has(e.pointerId)&&Fe.current.set(e.pointerId,{x:e.clientX,y:e.clientY});let t=Ne.current;if(t.kind===`pinch`&&Fe.current.size>=2){let[e,n]=[...Fe.current.values()],r=Math.hypot(n.x-e.x,n.y-e.y);if(t.startDist<=0)return;let i=Math.max(A,Math.min(M,t.startView.zoom*(r/t.startDist))),a=Ae.current?.getBoundingClientRect()??{left:0,top:0},o={x:(e.x+n.x)/2,y:(e.y+n.y)/2},s=c.s(t.startMid.x,t.startMid.y,a,t.startView);ht({x:s.x-(o.x-a.left)/i,y:s.y-(o.y-a.top)/i,zoom:i});return}if(Ie.current){let t=e.clientX-Ie.current.client.x,n=e.clientY-Ie.current.client.y;Math.hypot(t,n)>gu&&(Ie.current.moved=!0)}if(t.kind===`pan`){ht({x:t.startView.x-(e.clientX-t.startClient.x)/t.startView.zoom,y:t.startView.y-(e.clientY-t.startClient.y)/t.startView.zoom,zoom:t.startView.zoom});return}let n=Ht(e.clientX,e.clientY);if(xt(n),t.kind===`none`){if(!Bt)return;if($e===`wall`&&vt.length>0){let e=Wt(n,vt[vt.length-1],void 0,Vt);xt(e.point),At(e);return}if($e===`select`){let e=c.d(Q,Xe,n,c.p(Oe,mt.zoom));c.f(e,ut)||(dt(e),w?.(e))}$e===`measure`&&Ft(Lt(n)?.id??null);return}if(Ie.current?.moved){if(t.kind===`measureEnd`){let e=Wt(n).point;Mt(n=>n.map(n=>n.id===t.id?{...n,[t.end]:e}:n)),xt(e);return}if(t.kind===`measureMove`){let e=n.x-t.startWorld.x,r=n.y-t.startWorld.y;Mt(n=>n.map(n=>n.id===t.id?{...n,a:{x:t.origA.x+e,y:t.origA.y+r},b:{x:t.origB.x+e,y:t.origB.y+r}}:n));return}if(t.kind===`rect`||t.kind===`measure`){Ne.current={...t,current:Wt(n).point},xt(Wt(n).point);return}if(t.kind===`marquee`){Ne.current={...t,current:n},xt(n);return}if(t.kind===`wallSplit`){let e=c.X(Q,t.wallId,t.at);if(!e.result.wallIds){Ne.current={kind:`none`};return}let r=e.result.nodeId,i=Q.walls[t.wallId],a=i?e.floor.nodes[i.a]:void 0,o=i?e.floor.nodes[i.b]:void 0,s={origin:a?{x:a.x,y:a.y}:void 0,referenceAngle:a&&o?Math.atan2(o.y-a.y,o.x-a.x):void 0,excludeWallIds:new Set(e.result.wallIds)},l=Wt(n,s.origin,new Set([r]),s.referenceAngle,s.excludeWallIds).point;Ne.current={kind:`node`,nodeId:r,moved:!0,...s},at({type:`node`,id:r}),At(Ot.current),Jt(c.K(e.floor,r,l).floor,`move-node`,!1,[r]);return}if(t.kind===`node`){let e=Wt(n,t.origin,new Set([t.nodeId]),t.referenceAngle,t.excludeWallIds).point;At(Ot.current),Ne.current={...t,moved:!0},Jt(c.K(Q,t.nodeId,e).floor,`move-node`,!1,[t.nodeId]);return}if(t.kind===`wall`){let e=Q.walls[t.wallId];if(!e)return;let r=t.origB.x-t.origA.x,i=t.origB.y-t.origA.y,a=Math.hypot(r,i);if(a<1e-6)return;let o={x:-i/a,y:r/a},s=(n.x-t.startWorld.x)*o.x+(n.y-t.startWorld.y)*o.y,l=I!==Re.current&&P>0?P:1,u=Math.round(s/l)*l,d=Math.max(l,10);if(t.detach){if(Math.abs(u)<d)return;let e=c.U(Q,t.wallId,{x:o.x*u,y:o.y*u});if(!e.result)return;Ne.current={...t,detach:!1,toggle:!1,detachedSign:Math.sign(u),moved:!0},at({type:`wall`,id:t.wallId}),Jt(e.floor,`move-wall`,!1,[t.wallId]);return}let f=c.K(Q,e.a,{x:t.origA.x+o.x*u,y:t.origA.y+o.y*u}).floor;f=c.K(f,e.b,{x:t.origB.x+o.x*u,y:t.origB.y+o.y*u}).floor,t.detachedSign&&Math.abs(u)<10?(f=c.tt(f).floor,Ne.current={...t,detachedSign:void 0,moved:!0}):Ne.current={...t,moved:!0},Jt(f,`move-wall`,!1,[t.wallId]);return}if(t.kind===`opening`){let e=Q.openings[t.openingId];if(!e)return;let r=Q.walls[e.wallId],i=Q.nodes[r.a],a=Q.nodes[r.b],o=Math.hypot(a.x-i.x,a.y-i.y),s=((n.x-i.x)*(a.x-i.x)+(n.y-i.y)*(a.y-i.y))/(o*o||1);Ne.current={...t,moved:!0},Jt(c.Q(Q,t.openingId,{offset:Math.min(Math.max(s,0),1)*o}).floor,`move-opening`,!1,[t.openingId]);return}if(t.kind===`room`){let e=n.x-t.startWorld.x,r=n.y-t.startWorld.y,i=I!==Re.current&&P>0?P:1,a=Math.round(e/i)*i,o=Math.round(r/i)*i,s=Q;for(let e of t.nodeIds){let n=t.orig[e];n&&(s=c.K(s,e,{x:n.x+a,y:n.y+o}).floor)}Ne.current={...t,moved:!0},Jt(s,`move-room`,!1,t.nodeIds)}}},[Y,Bt,$e,Q,Xe,ut,Oe,mt.zoom,A,M,P,I,Ht,Wt,Jt,ht,at,vt,Vt,w,Lt]),sn=(0,l.useCallback)((e,t)=>{Fe.current.delete(e.pointerId);let n=Ne.current;Ne.current={kind:`none`};let r=Ie.current?.moved??!1;if(Ie.current=null,At(null),n.kind===`none`||n.kind===`pan`||n.kind===`pinch`)return;if(n.kind===`marquee`){if(t||!r){t&&at([...n.base]);return}let e=Math.min(n.start.x,n.current.x),i=Math.max(n.start.x,n.current.x),a=Math.min(n.start.y,n.current.y),o=Math.max(n.start.y,n.current.y),s=[];for(let t of Object.values(Q.nodes))t.x>=e&&t.x<=i&&t.y>=a&&t.y<=o&&s.push({type:`node`,id:t.id});if(n.additive){let e=new Set(n.base.map(e=>`${e.type}:${e.id}`));at([...n.base,...s.filter(t=>!e.has(`${t.type}:${t.id}`))])}else at(s);return}if(t){let e=Be.cancelGesture();e&&i?.(e,{reason:`external`,committed:!1,targetIds:[]});return}if(n.kind===`measureEnd`||n.kind===`measureMove`)return;if(n.kind===`measure`){let e=Math.hypot(n.current.x-n.start.x,n.current.y-n.start.y);r&&e>hu&&(Nt.current+=1,Mt(e=>[...e,{id:Nt.current,a:n.start,b:n.current}]));return}if(n.kind===`rect`){if(!r){Be.cancelGesture();return}let e=c.B(Q,n.start,n.current,{thickness:B,type:c.lt.Interior,height:V},c.p(Oe,mt.zoom).node);if(e.result.wallIds.length===0){Be.cancelGesture();return}let t=Be.endGesture();Yt(e.floor,`draw-rect`,e.result.wallIds,{push:!t});return}if(!r){Be.cancelGesture(),n.kind===`wall`&&n.toggle&&ot({type:`wall`,id:n.wallId});return}if(n.kind===`node`){let e=Q.nodes[n.nodeId];if(e){let t=c.p(Oe,mt.zoom).node,r=Object.values(Q.nodes).find(r=>r.id!==n.nodeId&&Math.hypot(r.x-e.x,r.y-e.y)<=t);if(r){let e=Be.endGesture();Yt(c.G(Q,r.id,n.nodeId).floor,`move-node`,[r.id],{push:!e}),at({type:`node`,id:r.id});return}}}let a=Be.endGesture(),o=n.kind===`wall`?`move-wall`:n.kind===`opening`?`move-opening`:n.kind===`room`?`move-room`:`move-node`;Yt(Q,o,[],{push:!a})},[Q,Be,Oe,mt.zoom,B,V,Yt,at,ot,i]);(0,l.useEffect)(()=>{let e=Ae.current;if(!e||Y)return;function t(t){t.preventDefault();let n=e.getBoundingClientRect(),r=Math.exp(-t.deltaY*.002);ht((()=>{let e=cn.current,i=Math.max(A,Math.min(M,e.zoom*r)),a=c.s(t.clientX,t.clientY,n,e);return{x:a.x-(t.clientX-n.left)/i,y:a.y-(t.clientY-n.top)/i,zoom:i}})())}return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[Y,A,M,ht]);let cn=(0,l.useRef)(mt);cn.current=mt;let ln=(0,l.useCallback)(e=>{let t=Math.max(A,Math.min(M,mt.zoom*e)),n={x:mt.x+gt.width/2/mt.zoom,y:mt.y+gt.height/2/mt.zoom};ht({x:n.x-gt.width/2/t,y:n.y-gt.height/2/t,zoom:t})},[mt,gt,A,M,ht]),un=(0,l.useCallback)(()=>{if(oe===`none`)return;let e=Be.undo();e&&(Me.current=e,i?.(e,{reason:`undo`,committed:!0,targetIds:[]}),a?.(e,{reason:`undo`,committed:!0,targetIds:[]}))},[oe,Be,i,a]),dn=(0,l.useCallback)(()=>{if(oe===`none`)return;let e=Be.redo();e&&(Me.current=e,i?.(e,{reason:`redo`,committed:!0,targetIds:[]}),a?.(e,{reason:`redo`,committed:!0,targetIds:[]}))},[oe,Be,i,a]),fn=(0,l.useCallback)(()=>{let e=Xe.filter(e=>e.roomId).map(e=>({type:`room`,id:e.roomId}));if(e.length>0){at(e);return}at(Object.keys(Q.nodes).map(e=>({type:`node`,id:e})))},[Xe,Q.nodes,at]),pn=(0,l.useCallback)((e,t)=>{if(!Bt||lt.size===0)return;let n=P>0?P:100,r=ze.current?n*10:n,i=Q;for(let n of lt){let a=i.nodes[n];a&&(i=c.K(i,n,{x:a.x+e*r,y:a.y+t*r}).floor)}Yt(i,`nudge`,[...lt])},[Bt,lt,Q,P,Yt]),mn=(0,l.useCallback)(e=>{if(Y)return;let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){e.key===`Escape`&&t.blur();return}if(e.key===`Shift`&&(ze.current=!0),e.key===`Alt`&&(Re.current=!0),e.key===` `&&!Le.current){Le.current=!0,e.preventDefault();return}let n=e.metaKey||e.ctrlKey;if(n&&e.key.toLowerCase()===`z`){e.preventDefault(),e.shiftKey?dn():un();return}if(n&&e.key.toLowerCase()===`a`){e.preventDefault(),C&&fn();return}if(n&&e.key.toLowerCase()===`y`){e.preventDefault(),dn();return}if(e.key===`Escape`){vt.length>0?rn():jt.length>0?Mt([]):at(null);return}if(e.key===`Enter`&&$e===`wall`){rn();return}if(e.key===`Delete`||e.key===`Backspace`){if(e.preventDefault(),$e===`measure`){Pt!==null&&(Mt(e=>e.filter(e=>e.id!==Pt)),Ft(null));return}nn();return}if(e.key===`+`||e.key===`=`){ln(1.25);return}if(e.key===`-`){ln(1/1.25);return}if(e.key===`0`){Kt();return}if(e.key.startsWith(`Arrow`)){e.preventDefault();let t={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[e.key];t&&pn(t[0],t[1]);return}let r=e.key.toLowerCase();if(r===`s`){Ct(e=>!e);return}if(r===`l`){Tt(e=>!e);return}if(r===`g`){Dt(e=>!e);return}let i=fu[e.key.toLowerCase()];i&&Bt&&y.includes(i)&&(et(i),rn())},[Y,Bt,y,$e,vt,jt.length,Pt,dn,un,at,rn,nn,ln,Kt,pn,et,C,fn]),hn=(0,l.useCallback)((e,t,n)=>{Me.current=e,n?.resetHistory?(Be.clearHistory(),Be.replace(e)):Be.commit(e,t);let r={reason:t,committed:!0,targetIds:[]};i?.(e,r),a?.(e,r)},[Be,i,a]),gn=(0,l.useCallback)((e={})=>{let{plan:t,floor:n}=c.w(He,{nameFor:Ce,...e,index:c.A(He,Q.id)+1});return hn(t,`add-floor`),Ye(n.id),n.id},[He,Q.id,hn,Ye,Ce]),_n=(0,l.useCallback)(()=>{let{plan:e,floor:t}=c.T(He,Q.id,{label:we(Q.label)});return t?(hn(e,`duplicate-floor`),Ye(t.id),t.id):null},[He,Q.id,Q.label,hn,Ye,we]),vn=(0,l.useCallback)(e=>{let t=e??Q.id,n=c.N(He,t);if(n!==He&&(hn(n,`remove-floor`),t===Q.id)){let e=c.A(He,t);Ye(n.floors[Math.max(0,e-1)].id)}},[He,Q.id,hn,Ye]),yn=(0,l.useCallback)((e,t)=>{let n=c.M(He,e,t);n!==He&&hn(n,`move-floor`)},[He,hn]),bn=(0,l.useCallback)((e,t)=>{let n=c.I(He,e,t);n!==He&&hn(n,`edit-floor`)},[He,hn]),xn=(0,l.useCallback)((e,t)=>{let n=c.P(He,e,t);n!==He&&hn(n,`rename-floor`)},[He,hn]),Sn=(0,l.useCallback)(e=>{let t=(e??ae??He.name??``).trim()||`floor-plan`,n=URL.createObjectURL(new Blob([c.i(He)],{type:`application/json`})),r=document.createElement(`a`);r.href=n,r.download=t.endsWith(`.json`)?t:`${t}.json`,r.click(),setTimeout(()=>URL.revokeObjectURL(n),0)},[ae,He]),Cn=(0,l.useCallback)(e=>{let t=c.r(e);return t.plan&&hn(t.plan,`import`),zt(t.plan&&t.issues.length===0?null:t.issues),J?.(t),t},[J,hn]),wn=(0,l.useCallback)(e=>{e.text().then(e=>Cn(e)).catch(e=>{let t=[`Could not read that file: ${e.message}`];zt(t),J?.({plan:null,issues:t})})},[Cn,J]),Tn=(0,l.useCallback)(()=>Mt([]),[]),En=(0,l.useCallback)(e=>{e.key===`Shift`&&(ze.current=!1),e.key===`Alt`&&(Re.current=!1),e.key===` `&&(Le.current=!1)},[]);(0,l.useImperativeHandle)(t,()=>({getPlan:()=>He,setPlan:(e,t)=>hn(e,`import`,t),clear:()=>hn(c.D({floorLabel:Te}),`clear`),getFloorId:()=>Q.id,setFloorId:Ye,addFloor:e=>gn(e),duplicateFloor:_n,removeFloor:vn,renameFloor:xn,moveFloor:yn,setFloorHeight:bn,clearMeasurements:Tn,download:Sn,loadJson:Cn,undo:un,redo:dn,canUndo:()=>oe!==`none`&&Be.canUndo,canRedo:()=>oe!==`none`&&Be.canRedo,clearHistory:Be.clearHistory,getSelection:()=>[...it.current],select:at,addToSelection:e=>{let t=Array.isArray(e)?e:[e],n=new Set(it.current.map(e=>`${e.type}:${e.id}`));at([...it.current,...t.filter(e=>!n.has(`${e.type}:${e.id}`))])},toggleSelection:ot,selectAll:fn,deleteSelection:nn,getView:()=>mt,setView:ht,zoomBy:ln,fitToContent:Kt,toWorld:Ht,toScreen:Ut,getSvgElement:()=>je.current}),[He,Be,hn,Te,Q,Ye,gn,_n,vn,xn,yn,bn,Tn,Sn,Cn,un,dn,oe,at,ot,fn,nn,mt,ht,ln,Kt,Ht,Ut]);let Dn=Ne.current,On=(0,l.useMemo)(()=>{if(!Bt)return null;let e=[],t=[...jt,...Dn.kind===`measure`?[{id:-1,a:Dn.start,b:Dn.current}]:[]];for(let n of t){let t=Ut(n.a),r=Ut(n.b),i=Math.hypot(n.b.x-n.a.x,n.b.y-n.a.y);if(i<hu)continue;let a=Math.atan2(n.b.y-n.a.y,n.b.x-n.a.x),o=-Math.sin(a)*5,s=Math.cos(a)*5,c={x:(t.x+r.x)/2,y:(t.y+r.y)/2};if(e.push((0,p.jsxs)(`g`,{className:(0,u.default)($.roomDrawerMeasureLine,Pt===n.id&&$.roomDrawerMeasureLineHovered,ve?.measureLine),children:[(0,p.jsx)(`line`,{x1:t.x,y1:t.y,x2:r.x,y2:r.y}),(0,p.jsx)(`line`,{x1:t.x-o,y1:t.y-s,x2:t.x+o,y2:t.y+s}),(0,p.jsx)(`line`,{x1:r.x-o,y1:r.y-s,x2:r.x+o,y2:r.y+s})]},`measure-${n.id}`)),$e===`measure`&&n.id>=0)for(let[i,a]of[[`a`,t],[`b`,r]])e.push((0,p.jsx)(`circle`,{className:$.roomDrawerMeasureGrip,cx:a.x,cy:a.y,r:4},`measure-grip-${n.id}-${i}`));e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,ve?.measureLine),x:c.x,y:c.y-8,textAnchor:`middle`,children:`${W(i)} · ${ee(Su(a))}`},`measure-label-${n.id}`))}if(z&&kt&&(kt.guides.forEach((t,n)=>{let r=Ut(t.a),i=Ut(t.b);e.push((0,p.jsx)(`line`,{className:(0,u.default)($.roomDrawerGuide,t.kind===c.o.Angle&&$.roomDrawerGuideAngle),x1:r.x,y1:r.y,x2:i.x,y2:i.y},`guide-${n}`))}),kt.kind!==c.o.None&&kt.kind!==c.o.Grid)){let t=Ut(kt.point);e.push((0,p.jsx)(`rect`,{className:$.roomDrawerSnapMarker,x:t.x-4,y:t.y-4,width:8,height:8},`snap-marker`))}if(Dn.kind===`rect`){let t=Ut(Dn.start),n=Ut(Dn.current),r=Math.min(t.x,n.x),i=Math.min(t.y,n.y),a=Math.max(t.x,n.x),o=Math.max(t.y,n.y);e.push((0,p.jsx)(`rect`,{className:$.roomDrawerPreview,x:r,y:i,width:a-r,height:o-i},`rect-preview`));let s=Math.abs(Dn.current.x-Dn.start.x),c=Math.abs(Dn.current.y-Dn.start.y);U&&(s>0||c>0)&&(e.push((0,p.jsx)(`text`,{className:$.roomDrawerMeasure,x:(r+a)/2,y:i-8,textAnchor:`middle`,children:W(s)},`rect-width`),(0,p.jsx)(`text`,{className:$.roomDrawerMeasure,x:r-8,y:(i+o)/2,textAnchor:`end`,dominantBaseline:`central`,children:W(c)},`rect-height`)),s>0&&c>0&&e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,$.roomDrawerMeasureSecondary),x:(r+a)/2,y:(i+o)/2,textAnchor:`middle`,dominantBaseline:`central`,children:G(s*c)},`rect-area`)))}if($e===`wall`&&vt.length>0){let t=[...vt,bt].filter(Boolean).map(Ut);if(e.push((0,p.jsx)(`polyline`,{className:$.roomDrawerPreview,points:t.map(e=>`${e.x},${e.y}`).join(` `),fill:`none`},`chain`)),t.forEach((t,n)=>{e.push((0,p.jsx)(`circle`,{className:$.roomDrawerHandle,cx:t.x,cy:t.y,r:4},`chain-dot-${n}`))}),U&&bt&&vt.length>0){let t=vt[vt.length-1],n=Math.hypot(bt.x-t.x,bt.y-t.y),r=Ut({x:(t.x+bt.x)/2,y:(t.y+bt.y)/2}),i=kt?.kind===c.o.Angle;e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,i&&$.roomDrawerMeasureLocked),x:r.x,y:r.y-8,textAnchor:`middle`,children:`${W(n)} · ${kt?.angleRelativeTo===`reference`&&Vt!==void 0?Ee(ee(Su(Math.atan2(bt.y-t.y,bt.x-t.x)-Vt))):ee(Su(Math.atan2(bt.y-t.y,bt.x-t.x)))}`},`chain-len`))}}let n=new Set(rt.filter(e=>e.type===`node`).map(e=>e.id));for(let t of lt){let r=Q.nodes[t];if(!r)continue;let i=Ut(r);e.push((0,p.jsx)(`circle`,{className:(0,u.default)($.roomDrawerHandle,n.has(t)&&$.roomDrawerHandleActive),cx:i.x,cy:i.y,r:5},`handle-${t}`))}if(Dn.kind===`marquee`&&Ie.current?.moved){let t=Ut(Dn.start),n=Ut(Dn.current);e.push((0,p.jsx)(`rect`,{className:$.roomDrawerMarquee,x:Math.min(t.x,n.x),y:Math.min(t.y,n.y),width:Math.abs(n.x-t.x),height:Math.abs(n.y-t.y)},`marquee`))}if($t&&Dn.kind!==`node`){let t=Ut($t);e.push((0,p.jsx)(`circle`,{className:$.roomDrawerMidHandle,cx:t.x,cy:t.y,r:4},`midpoint`))}if(U&&Dn.kind===`room`&&Dn.moved){let t=new Set(Dn.nodeIds),n=Dn.nodeIds.find(e=>Q.nodes[e]&&Dn.orig[e]);if(n){let t=Q.nodes[n],r=Dn.orig[n],i=t.x-r.x,a=t.y-r.y,o=st?.type===`room`?Xe.find(e=>e.roomId===st.id):void 0,s=Ut(o?o.anchor:t);e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,$.roomDrawerMeasureOffset),x:s.x,y:s.y-26,textAnchor:`middle`,children:`${W(Math.hypot(i,a))} · ${ee(Su(Math.atan2(a,i)))}`},`room-offset`))}for(let n of Object.values(Q.walls)){if(t.has(n.a)===t.has(n.b))continue;let r=Q.nodes[n.a],i=Q.nodes[n.b];if(!r||!i)continue;let a=t.has(n.a)?r:i,o=t.has(n.a)?i:r,s=Ut({x:(r.x+i.x)/2,y:(r.y+i.y)/2});e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,$.roomDrawerMeasureSecondary),x:s.x,y:s.y-8,textAnchor:`middle`,children:`${W(Math.hypot(o.x-a.x,o.y-a.y))} · ${ee(Su(Math.atan2(o.y-a.y,o.x-a.x)))}`},`room-stretch-${n.id}`))}}if(U&&(st?.type===`node`||st?.type===`wall`)){let t=[],n=new Set,r=(e,r,i)=>{if(n.has(e))return;let a=Q.walls[e];a&&(n.add(e),t.push({wall:a,from:r,primary:i}))};if(st.type===`node`)for(let e of Object.values(Q.walls))(e.a===st.id||e.b===st.id)&&r(e.id,st.id,!0);else{let e=Q.walls[st.id];if(e){r(e.id,e.a,!0);for(let t of Object.values(Q.walls))if(t.id!==e.id)for(let n of[e.a,e.b])(t.a===n||t.b===n)&&r(t.id,n,!1)}}let i=kt?.kind===c.o.Angle&&Dn.kind!==`none`;for(let{wall:n,from:r,primary:a}of t){let t=Q.nodes[n.a],o=Q.nodes[n.b];if(!t||!o)continue;let s=n.a===r?t:o,c=n.a===r?o:t,l=Ut({x:(t.x+o.x)/2,y:(t.y+o.y)/2});e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,!a&&$.roomDrawerMeasureSecondary,a&&i&&$.roomDrawerMeasureLocked),x:l.x,y:l.y-8,textAnchor:`middle`,children:`${W(Math.hypot(c.x-s.x,c.y-s.y))} · ${ee(Su(Math.atan2(c.y-s.y,c.x-s.x)))}`},`measure-${n.id}`))}}return(0,p.jsx)(p.Fragment,{children:e})},[Bt,Dn,$e,vt,bt,rt,Q,Xe,st,lt,$t,U,z,kt,Vt,W,G,ee,Ee,jt,Pt,ve?.measureLine,Ut]),kn={select:{icon:f.faArrowPointer,label:Z.select,key:`V`},wall:{icon:f.faMinus,label:Z.wall,key:`W`},rect:{icon:f.faSquare,label:Z.rect,key:`R`},door:{icon:f.faDoorOpen,label:Z.door,key:`D`},window:{icon:f.faWindowMaximize,label:Z.window,key:`N`},archway:{icon:f.faExpand,label:Z.archway,key:`A`},measure:{icon:f.faRulerCombined,label:Z.measure,key:`M`}},An=Bt?$e===`wall`?Z.hintWall:$e===`rect`?Z.hintRect:$e===`measure`?Z.hintMeasure:pu[$e]?Z.hintOpening:C?Z.hintSelect:Z.hintSelectSingle:``,jn=rt.length===0?Z.selectedFloor:rt.length>1?Z.selectedCount(rt.length):Qt?{[c.ot.Door]:Z.selectedDoor,[c.ot.Window]:Z.selectedWindow,[c.ot.Archway]:Z.selectedArchway,[c.ot.Gap]:Z.selectedGap}[Qt.kind]:Zt?Z.selectedWall:st?.type===`room`?Z.selectedRoom:Z.selectedCorner,Mn=Bt?y:[];return(0,p.jsxs)(`div`,{...xe,ref:ke,className:(0,u.default)($.roomDrawer,Y&&$.roomDrawerDisabled,ge,ve?.root),style:{..._e,...be?.root},role:`application`,"aria-label":he??`Floor plan editor`,tabIndex:Y?-1:0,onKeyDown:mn,onKeyUp:En,children:[te&&(0,p.jsxs)(`div`,{className:(0,u.default)($.roomDrawerToolbar,ve?.toolbar),style:be?.toolbar,role:`toolbar`,"aria-label":Z.tools,children:[Mn.map(e=>{let t=kn[e];return(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerToolButton,e===$e&&$.roomDrawerToolButtonActive,ve?.toolButton),style:be?.toolButton,title:`${t.label} (${t.key})`,"aria-label":t.label,"aria-pressed":e===$e,onClick:()=>{et(e),rn()},children:X(me?.[e]??t.icon,{className:(0,u.default)($.roomDrawerToolIcon,ve?.toolIcon),style:be?.toolIcon})},e)}),Mn.length>0&&(0,p.jsx)(`span`,{className:$.roomDrawerToolbarSeparator}),Bt&&(0,p.jsxs)(p.Fragment,{children:[[{on:St,toggle:()=>Ct(e=>!e),icon:me?.snap??f.faMagnet,label:Z.snap,key:`S`},{on:wt,toggle:()=>Tt(e=>!e),icon:me?.angleLock??f.faDraftingCompass,label:Z.angleLock(R),key:`L`},{on:Et,toggle:()=>Dt(e=>!e),icon:me?.grid??f.faBorderAll,label:Z.grid,key:`G`},...c.O(He,Q.id)?[{on:Ke,toggle:()=>qe(e=>!e),icon:me?.underlay??f.faLayerGroup,label:Z.underlay,key:`B`}]:[]].map(e=>(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerToolButton,e.on&&$.roomDrawerToolButtonOn,ve?.toolButton),style:be?.toolButton,title:`${e.label} (${e.key})`,"aria-label":e.label,"aria-pressed":e.on,onClick:e.toggle,children:X(e.icon,{className:(0,u.default)($.roomDrawerToolIcon,ve?.toolIcon),style:be?.toolIcon})},e.key)),(0,p.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),q&&oe!==`none`&&Bt&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.undo,"aria-label":Z.undo,disabled:!Be.canUndo,onClick:un,children:X(me?.undo??f.faArrowRotateLeft)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.redo,"aria-label":Z.redo,disabled:!Be.canRedo,onClick:dn,children:X(me?.redo??f.faArrowRotateRight)}),(0,p.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),ie&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.download,"aria-label":Z.download,onClick:()=>Sn(),children:X(me?.download??f.faDownload)}),Bt&&(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.upload,"aria-label":Z.upload,onClick:()=>It.current?.click(),children:X(me?.upload??f.faUpload)}),(0,p.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),(0,p.jsxs)(`div`,{className:(0,u.default)($.roomDrawerViewControls,ve?.viewControls),style:be?.viewControls,children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.zoomOut,"aria-label":Z.zoomOut,onClick:()=>ln(1/1.25),children:X(me?.zoomOut??f.faMagnifyingGlassMinus)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerZoomLabel,ve?.zoomLabel),style:be?.zoomLabel,title:Z.fit,onClick:()=>Kt(),children:K(mt.zoom)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.zoomIn,"aria-label":Z.zoomIn,onClick:()=>ln(1.25),children:X(me?.zoomIn??f.faMagnifyingGlassPlus)})]})]}),m&&He.floors.length>0&&(0,p.jsxs)(`div`,{className:(0,u.default)($.roomDrawerFloorBar,ve?.floorBar),style:be?.floorBar,role:`tablist`,"aria-label":Z.selectedFloor,children:[[...He.floors].reverse().map(e=>(0,p.jsx)(`button`,{type:`button`,role:`tab`,className:(0,u.default)($.roomDrawerFloorTab,e.id===Q.id&&$.roomDrawerFloorTabActive,ve?.floorTab),style:be?.floorTab,"aria-selected":e.id===Q.id,onClick:()=>Ye(e.id),children:e.label},e.id)),Bt&&(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerFloorTab,$.roomDrawerFloorTabAdd),title:Z.addFloor,"aria-label":Z.addFloor,onClick:()=>gn(),children:X(me?.addFloor??f.faPlus)})]}),(0,p.jsx)(`div`,{ref:Ae,className:(0,u.default)($.roomDrawerCanvasWrapper,Bt&&$e!==`select`&&$.roomDrawerCanvasWrapperDrawing,ve?.canvasWrapper),style:{height:ue,...be?.canvasWrapper},onPointerDown:an,onPointerMove:on,onPointerUp:e=>sn(e,!1),onPointerCancel:e=>sn(e,!0),children:(0,p.jsx)(cu,{ref:je,floor:Q,underlay:Je,rooms:Xe,view:mt,size:gt,selection:rt,hovered:ut,interactiveRooms:!1,showGrid:Et,gridSize:P,showRoomLabels:!0,formatArea:G,getRoomColor:de,renderRoomLabel:fe,overlay:On,classNames:ve,styles:be})}),ne&&Bt&&(0,p.jsxs)(`div`,{className:(0,u.default)($.roomDrawerInspector,ve?.inspector),style:be?.inspector,children:[(0,p.jsx)(`span`,{className:(0,u.default)($.roomDrawerInspectorKind,rt.length===0&&$.roomDrawerInspectorKindEmpty,ve?.inspectorLabel),children:jn}),rt.length===0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Aa,{className:(0,u.default)($.roomDrawerInspectorName,ve?.inspectorField),style:be?.inspectorField,label:Z.floorName,value:Q.label,onChange:e=>xn(Q.id,e)}),(0,p.jsx)(Cl,{className:(0,u.default)($.roomDrawerInspectorField,ve?.inspectorField),style:be?.inspectorField,label:Z.floorHeight,title:Z.storeyHeightHint,value:Q.height,decimalScale:0,min:500,step:100,showArrows:!0,onChange:e=>{e!==void 0&&bn(Q.id,e)}}),He.floors.length>1&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerInspectorAction,ve?.inspectorField),style:be?.inspectorField,title:Z.moveFloorUp,"aria-label":Z.moveFloorUp,disabled:c.A(He,Q.id)>=He.floors.length-1,onClick:()=>yn(Q.id,c.A(He,Q.id)+1),children:X(me?.moveFloorUp??f.faAngleUp)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerInspectorAction,ve?.inspectorField),style:be?.inspectorField,title:Z.moveFloorDown,"aria-label":Z.moveFloorDown,disabled:c.A(He,Q.id)<=0,onClick:()=>yn(Q.id,c.A(He,Q.id)-1),children:X(me?.moveFloorDown??f.faAngleDown)})]}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerInspectorAction,ve?.inspectorField),style:be?.inspectorField,title:Z.duplicateFloor,onClick:()=>_n(),children:X(me?.duplicateFloor??f.faClone)}),He.floors.length>1&&(0,p.jsx)(ye,{color:j.Error,className:$.roomDrawerInspectorDelete,icon:me?.delete??f.faTrash,title:Z.deleteFloor,onClick:()=>vn()})]}),Xt?.meta&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Aa,{className:(0,u.default)($.roomDrawerInspectorName,ve?.inspectorField),style:be?.inspectorField,label:Z.roomName,value:Xt.meta.name,onChange:e=>{let t=Xt.meta;Yt({...Q,rooms:{...Q.rooms,[t.id]:{...t,name:e}}},`edit-room`,[t.id])}}),(0,p.jsx)(`span`,{className:(0,u.default)($.roomDrawerInspectorLabel,ve?.inspectorLabel),children:G(Xt.area)})]}),Zt&&(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerInspectorAction,ve?.inspectorField),style:be?.inspectorField,onClick:en,children:Z.addCorner}),Zt&&(0,p.jsx)(Cl,{className:(0,u.default)($.roomDrawerInspectorField,ve?.inspectorField),style:be?.inspectorField,label:Z.thickness,value:Zt.thickness,decimalScale:0,min:10,showArrows:!0,step:10,onChange:e=>{e!==void 0&&Yt({...Q,walls:{...Q.walls,[Zt.id]:{...Zt,thickness:e}}},`edit-wall`,[Zt.id])}}),Qt&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Cl,{className:(0,u.default)($.roomDrawerInspectorField,ve?.inspectorField),style:be?.inspectorField,label:Z.width,value:Qt.width,decimalScale:0,min:100,step:50,showArrows:!0,onChange:e=>{e!==void 0&&Yt(c.Q(Q,Qt.id,{width:e}).floor,`edit-opening`,[Qt.id])}}),(0,p.jsx)(Cl,{className:(0,u.default)($.roomDrawerInspectorField,ve?.inspectorField),style:be?.inspectorField,label:Z.sill,title:Z.sillHeightHint,showArrows:!0,value:Qt.sill,decimalScale:0,min:0,step:50,onChange:e=>{e!==void 0&&Yt(c.Q(Q,Qt.id,{sill:e}).floor,`edit-opening`,[Qt.id])}})]}),rt.length>0&&(0,p.jsx)(ye,{color:j.Error,className:$.roomDrawerInspectorDelete,icon:me?.delete??f.faTrash,title:Z.deleteSelection,onClick:nn})]}),ie&&Bt&&(0,p.jsx)(`input`,{ref:It,type:`file`,accept:`application/json,.json`,className:$.roomDrawerFileInput,tabIndex:-1,"aria-hidden":`true`,onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t&&wn(t)}}),re&&(Rt!==null||An)&&(0,p.jsx)(`div`,{className:(0,u.default)($.roomDrawerHint,Rt!==null&&$.roomDrawerHintReport,ve?.hint),style:be?.hint,role:Rt===null?void 0:`status`,children:Rt===null?An:Rt.length===0?Z.importFailed:Rt.join(` · `)})]})}var Tu={roomViewer:`roomViewer_JtBDo`,"roomViewer-floorBar":`roomViewer-floorBar_Svfsf`,roomViewerFloorBar:`roomViewer-floorBar_Svfsf`,"roomViewer-floorTab":`roomViewer-floorTab_eH3Nl`,roomViewerFloorTab:`roomViewer-floorTab_eH3Nl`,"roomViewer-floorTab-active":`roomViewer-floorTab-active_3ZQv9`,roomViewerFloorTabActive:`roomViewer-floorTab-active_3ZQv9`,"roomViewer-canvasWrapper":`roomViewer-canvasWrapper_UopaD`,roomViewerCanvasWrapper:`roomViewer-canvasWrapper_UopaD`,"roomViewer-canvasWrapper-pannable":`roomViewer-canvasWrapper-pannable_-Knr7`,roomViewerCanvasWrapperPannable:`roomViewer-canvasWrapper-pannable_-Knr7`,"roomViewer-viewControls":`roomViewer-viewControls_XNVTI`,roomViewerViewControls:`roomViewer-viewControls_XNVTI`,"roomViewer-viewButton":`roomViewer-viewButton_Q-o9G`,roomViewerViewButton:`roomViewer-viewButton_Q-o9G`,"roomViewer-empty":`roomViewer-empty_LL-4L`,roomViewerEmpty:`roomViewer-empty_LL-4L`,"roomViewer-live":`roomViewer-live_WSwUx`,roomViewerLive:`roomViewer-live_WSwUx`},Eu=.002,Du=4,Ou=4;function ku(e){let t=e/1e6;return`${t<10?t.toFixed(1):Math.round(t)} m²`}var Au={floors:`Floors`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,fit:`Fit to view`,empty:`Nothing to show`,unnamedRoom:`Unnamed room`,selectedRoom:(e,t)=>`${e} selected, ${t}`,noRoomSelected:`No room selected`};function ju(e){let{ref:t,plan:n,activeFloorId:r,defaultActiveFloorId:i,onFloorChange:a,selectedRoomId:o,defaultSelectedRoomId:s=null,onSelect:d,hoveredRoomId:m,onHoverChange:h,view:g,defaultView:_,onViewChange:v,interactive:y=!0,pannable:b=!0,fitOnMount:x=!0,showFloorBar:S=!0,showViewControls:C=!0,showGrid:w=!1,showRoomLabels:T=!0,showOpeningSymbols:O=!0,getRoomColor:k,renderRoomLabel:A,getRoomLabel:j,formatArea:M=ku,height:N=360,emptyState:P,labels:F,icons:I,className:L,style:R,classNames:z,styles:B,"aria-label":V,...H}=E(`RoomViewer`,e),U=D(`RoomViewer`,F,Au),W=(0,l.useRef)(null),G=(0,l.useRef)(null),ee=(0,l.useId)().replace(/:/g,``),K=n?.floors??[],[te,ne]=(0,l.useState)(i),re=r??te??K[0]?.id,q=(0,l.useMemo)(()=>n?c.j(n,re)??c.j(n):null,[n,re]),ie=(0,l.useCallback)(e=>{r===void 0&&ne(e),a?.(e)},[r,a]),ae=(0,l.useMemo)(()=>q?c.v(q).rooms:[],[q]),[J,oe]=(0,l.useState)(s),se=o===void 0?J:o,[ce,le]=(0,l.useState)(null),Y=m===void 0?ce:m,ue=(0,l.useCallback)(e=>{o===void 0&&oe(e);let t=e?ae.find(t=>t.roomId===e)??null:null;d?.(e,t,q?.id??``)},[o,ae,d,q?.id]),de=(0,l.useCallback)(e=>{m===void 0&&le(e),h?.(e)},[m,h]),fe=(()=>{let e=se?ae.find(e=>e.roomId===se):void 0;return e?U.selectedRoom(e.meta?.name||U.unnamedRoom,M(e.area)):U.noRoomSelected})(),[pe,me]=(0,l.useState)(_??{x:0,y:0,zoom:.05}),he=g??pe,ge=(0,l.useRef)(he);ge.current=he;let _e=(0,l.useCallback)(e=>{g===void 0&&me(e),v?.(e)},[g,v]),ve=(0,l.useRef)(!1),[ye,be]=(0,l.useState)({width:800,height:360});(0,l.useEffect)(()=>{let e=W.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&be({width:Math.round(t.width),height:Math.round(t.height)})},n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[]);let xe=(0,l.useCallback)((e={})=>{let t=e.padding??24,n=q?c.k(q):null;if(!n||n.width<=0||n.height<=0){_e({x:-1e3,y:-1e3,zoom:.05});return}let r=Math.max(Eu,Math.min(Du,Math.min((ye.width-t*2)/n.width,(ye.height-t*2)/n.height)));_e({x:n.minX-(ye.width/r-n.width)/2,y:n.minY-(ye.height/r-n.height)/2,zoom:r})},[q,ye.width,ye.height,_e]);(0,l.useEffect)(()=>{x&&!ve.current&&(!q||ye.width<=0||Object.keys(q.nodes).length===0||xe())},[x,q,ye.width,ye.height,xe]);let Z=(0,l.useCallback)((e,t)=>{ve.current=!0;let n=ge.current,r=Math.max(Eu,Math.min(Du,n.zoom*e));if(r===n.zoom)return;let i=t?.x??ye.width/2,a=t?.y??ye.height/2;_e({x:n.x+i/n.zoom-i/r,y:n.y+a/n.zoom-a/r,zoom:r})},[_e,ye.width,ye.height]),Se=(0,l.useRef)(new Map),Ce=(0,l.useRef)(null),we=(0,l.useRef)(null),Te=(0,l.useCallback)(e=>{if(b){if(Se.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),Se.current.size===2){let[e,t]=[...Se.current.values()];we.current={dist:Math.hypot(t.x-e.x,t.y-e.y),view:ge.current,mid:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}},Ce.current=null;return}Ce.current={startClient:{x:e.clientX,y:e.clientY},startView:ge.current,moved:!1}}},[b]),Ee=(0,l.useCallback)(e=>{Se.current.has(e.pointerId)&&Se.current.set(e.pointerId,{x:e.clientX,y:e.clientY});let t=we.current;if(t&&Se.current.size>=2){let[e,n]=[...Se.current.values()],r=Math.hypot(n.x-e.x,n.y-e.y);if(t.dist<=0)return;let i=Math.max(Eu,Math.min(Du,t.view.zoom*(r/t.dist))),a=W.current?.getBoundingClientRect()??{left:0,top:0},o={x:(e.x+n.x)/2,y:(e.y+n.y)/2};ve.current=!0;let s=c.s(t.mid.x,t.mid.y,a,t.view);_e({x:s.x-(o.x-a.left)/i,y:s.y-(o.y-a.top)/i,zoom:i});return}let n=Ce.current;if(!n)return;let r=e.clientX-n.startClient.x,i=e.clientY-n.startClient.y;!n.moved&&Math.hypot(r,i)<=Ou||(n.moved||e.currentTarget.setPointerCapture?.(e.pointerId),n.moved=!0,ve.current=!0,_e({x:n.startView.x-r/n.startView.zoom,y:n.startView.y-i/n.startView.zoom,zoom:n.startView.zoom}))},[_e]),De=(0,l.useCallback)(e=>{Se.current.delete(e.pointerId),Se.current.size<2&&(we.current=null),Ce.current=null},[]);(0,l.useEffect)(()=>{let e=W.current;if(!e||!b)return;let t=t=>{t.preventDefault();let n=e.getBoundingClientRect();Z(t.deltaY<0?1.1:1/1.1,{x:t.clientX-n.left,y:t.clientY-n.top})};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[b,Z]),(0,l.useImperativeHandle)(t,()=>({fitToContent:xe,getView:()=>ge.current,setView:_e,zoomBy:e=>Z(e),select:ue,getFloorId:()=>q?.id??null,setFloorId:ie,getSvgElement:()=>G.current}),[xe,_e,Z,ue,q?.id,ie]);let Oe=(0,l.useMemo)(()=>se?[{type:`room`,id:se}]:[],[se]),ke=(0,l.useMemo)(()=>Y?{type:`room`,id:Y}:null,[Y]),Ae=!q||Object.keys(q.walls).length===0;return(0,p.jsxs)(`div`,{...H,className:(0,u.default)(Tu.roomViewer,L,z?.root),style:{...R,...B?.root},"aria-label":V??`Floor plan`,children:[S&&K.length>1&&(0,p.jsx)(`div`,{className:(0,u.default)(Tu.roomViewerFloorBar,z?.floorBar),style:B?.floorBar,role:`tablist`,"aria-label":U.floors,children:[...K].reverse().map(e=>(0,p.jsx)(`button`,{type:`button`,role:`tab`,className:(0,u.default)(Tu.roomViewerFloorTab,e.id===q?.id&&Tu.roomViewerFloorTabActive,z?.floorTab),style:B?.floorTab,"aria-selected":e.id===q?.id,onClick:()=>ie(e.id),children:e.label},e.id))}),(0,p.jsxs)(`div`,{ref:W,className:(0,u.default)(Tu.roomViewerCanvasWrapper,b&&Tu.roomViewerCanvasWrapperPannable,z?.canvasWrapper),style:{height:N,...B?.canvasWrapper},onPointerDown:Te,onPointerMove:Ee,onPointerUp:De,onPointerCancel:De,children:[Ae?(0,p.jsx)(`div`,{className:(0,u.default)(Tu.roomViewerEmpty,z?.empty),style:B?.empty,children:P??U.empty}):(0,p.jsx)(cu,{ref:G,floor:q,rooms:ae,view:he,size:ye,selection:Oe,hovered:ke,interactiveRooms:y,showGrid:w,showRoomLabels:T,showOpeningSymbols:O,getRoomColor:k,renderRoomLabel:A,getRoomLabel:j??((e,{area:t})=>`${e?.name||U.unnamedRoom}, ${M(t)}`),formatArea:M,onRoomActivate:y?e=>ue(e):void 0,onBackgroundActivate:y?()=>ue(null):void 0,onHoverChange:y?e=>de(e?.type===`room`?e.id:null):void 0,classNames:{canvas:z?.canvas,grid:z?.grid,rooms:z?.rooms,roomFill:z?.roomFill,roomLabel:z?.roomLabel,walls:z?.walls,wallBody:z?.wallBody,openings:z?.openings,opening:z?.opening},styles:{canvas:B?.canvas,grid:B?.grid,rooms:B?.rooms,roomFill:B?.roomFill,roomLabel:B?.roomLabel,walls:B?.walls,wallBody:B?.wallBody,openings:B?.openings,opening:B?.opening},"aria-label":V??`Floor plan`}),C&&!Ae&&(0,p.jsxs)(`div`,{className:(0,u.default)(Tu.roomViewerViewControls,z?.viewControls),style:B?.viewControls,children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Tu.roomViewerViewButton,z?.viewButton),style:B?.viewButton,title:U.zoomOut,"aria-label":U.zoomOut,onClick:()=>Z(1/1.2),children:X(I?.zoomOut??f.faMagnifyingGlassMinus)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Tu.roomViewerViewButton,z?.viewButton),style:B?.viewButton,title:U.fit,"aria-label":U.fit,onClick:()=>{ve.current=!1,xe()},children:X(I?.fit??f.faExpand)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Tu.roomViewerViewButton,z?.viewButton),style:B?.viewButton,title:U.zoomIn,"aria-label":U.zoomIn,onClick:()=>Z(1.2),children:X(I?.zoomIn??f.faMagnifyingGlassPlus)})]})]}),(0,p.jsx)(`div`,{id:ee,className:Tu.roomViewerLive,role:`status`,"aria-live":`polite`,children:fe})]})}var Mu=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),Nu={"scrollFade-vertical":`scrollFade-vertical_48p38`,scrollFadeVertical:`scrollFade-vertical_48p38`,"scrollFade-horizontal":`scrollFade-horizontal_nX2dg`,scrollFadeHorizontal:`scrollFade-horizontal_nX2dg`};function Pu({children:e=null,axis:t=Mu.Vertical,fadeLength:n,isAlwaysFaded:r=!1,className:i,style:a,ref:o,...s}){let c=(0,l.useRef)(null),d=t===Mu.Horizontal,{hasStart:f,hasEnd:m}=to(c,{axis:t,isEnabled:!r});return(0,p.jsx)(`div`,{...s,ref:Ln(c,o),className:(0,u.default)(d?Nu.scrollFadeHorizontal:Nu.scrollFadeVertical,ea.scrollFade,d?ea.scrollFadeX:ea.scrollFadeY,(r||f)&&ea.scrollFadeFadedStart,(r||m)&&ea.scrollFadeFadedEnd,i),style:{...n?{"--custom-scroll-fade-length":n}:void 0,...a},children:e})}var Fu=function(e){return e.Small=`small`,e.Medium=`medium`,e.Large=`large`,e}({}),Iu={sectionHeader:`sectionHeader_X3bNj`,"sectionHeader-leading":`sectionHeader-leading_d6opV`,sectionHeaderLeading:`sectionHeader-leading_d6opV`,"sectionHeader-identity":`sectionHeader-identity_Qmlpt`,sectionHeaderIdentity:`sectionHeader-identity_Qmlpt`,"sectionHeader-titles":`sectionHeader-titles_iN9dT`,sectionHeaderTitles:`sectionHeader-titles_iN9dT`,"sectionHeader-title":`sectionHeader-title_wH--S`,sectionHeaderTitle:`sectionHeader-title_wH--S`,"sectionHeader-subtitle":`sectionHeader-subtitle_WRK3Y`,sectionHeaderSubtitle:`sectionHeader-subtitle_WRK3Y`,"sectionHeader-trailing":`sectionHeader-trailing_ewWDV`,sectionHeaderTrailing:`sectionHeader-trailing_ewWDV`,"sectionHeader-left":`sectionHeader-left_ZUuWs`,sectionHeaderLeft:`sectionHeader-left_ZUuWs`,"sectionHeader-center":`sectionHeader-center_MzSev`,sectionHeaderCenter:`sectionHeader-center_MzSev`,"sectionHeader-actions":`sectionHeader-actions_E40ZS`,sectionHeaderActions:`sectionHeader-actions_E40ZS`,"sectionHeader-divider":`sectionHeader-divider_Ovpev`,sectionHeaderDivider:`sectionHeader-divider_Ovpev`,"sectionHeader-size-small":`sectionHeader-size-small_6OVWE`,sectionHeaderSizeSmall:`sectionHeader-size-small_6OVWE`,"sectionHeader-size-medium":`sectionHeader-size-medium_BVSe6`,sectionHeaderSizeMedium:`sectionHeader-size-medium_BVSe6`,"sectionHeader-size-large":`sectionHeader-size-large_bOZDP`,sectionHeaderSizeLarge:`sectionHeader-size-large_bOZDP`},Lu={[Fu.Small]:Iu.sectionHeaderSizeSmall,[Fu.Medium]:Iu.sectionHeaderSizeMedium,[Fu.Large]:Iu.sectionHeaderSizeLarge};function Ru(e){let{title:t,subtitle:n,icon:r,thumbnail:i,left:a,center:o,actions:s,level:c=2,size:l=Fu.Medium,divider:d=!1,className:f,style:m,classNames:h,styles:g,..._}=E(`SectionHeader`,e),v=typeof i==`string`&&i.startsWith(`http`)?i:void 0,y=i!=null&&i!==``,b=y||r!=null,x=`h${c}`;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{..._,className:(0,u.default)(Iu.sectionHeader,Lu[l],f,h?.root),style:{...m,...g?.root},children:[(0,p.jsxs)(`div`,{className:(0,u.default)(Iu.sectionHeaderIdentity,h?.identity),style:g?.identity,children:[b&&(0,p.jsx)(`div`,{className:(0,u.default)(Iu.sectionHeaderLeading,h?.leading),style:{...v?{backgroundImage:`url(${v})`}:{},...g?.leading},children:y?!v&&i:r?X(r):null}),(0,p.jsxs)(`div`,{className:(0,u.default)(Iu.sectionHeaderTitles,h?.titles),style:g?.titles,children:[(0,p.jsx)(x,{className:(0,u.default)(Iu.sectionHeaderTitle,h?.title),style:g?.title,title:typeof t==`string`?t:void 0,children:t}),n!=null&&n!==``&&(0,p.jsx)(`div`,{className:(0,u.default)(Iu.sectionHeaderSubtitle,h?.subtitle),style:g?.subtitle,children:n})]})]}),(0,p.jsxs)(`div`,{className:(0,u.default)(Iu.sectionHeaderTrailing,h?.trailing),style:g?.trailing,children:[(0,p.jsx)(`div`,{className:(0,u.default)(Iu.sectionHeaderLeft,h?.left),style:g?.left,children:a}),(0,p.jsx)(`div`,{className:(0,u.default)(Iu.sectionHeaderCenter,h?.center),style:g?.center,children:o}),(0,p.jsx)(`div`,{className:(0,u.default)(Iu.sectionHeaderActions,h?.actions),style:g?.actions,children:Array.isArray(s)?s.map((e,t)=>(0,p.jsx)(ye,{title:e.title,onClick:e.onClick?t=>{t.stopPropagation(),e.onClick?.(t)}:void 0,icon:e.icon},t)):s})]})]}),d&&(0,p.jsx)(Os,{className:Iu.sectionHeaderDivider})]})}var zu=function(e){return e.Text=`text`,e.Circle=`circle`,e.Rectangular=`rectangular`,e}({}),Bu=function(e){return e.Shimmer=`shimmer`,e.Pulse=`pulse`,e.None=`none`,e}({}),Vu={skeleton:`skeleton_TSg1y`,"skeleton-lines":`skeleton-lines_-Z-gf`,skeletonLines:`skeleton-lines_-Z-gf`,"skeleton-line-last":`skeleton-line-last_UFw21`,skeletonLineLast:`skeleton-line-last_UFw21`,"skeleton-text":`skeleton-text_Jlefj`,skeletonText:`skeleton-text_Jlefj`,"skeleton-circle":`skeleton-circle_t0bbj`,skeletonCircle:`skeleton-circle_t0bbj`,"skeleton-rectangular":`skeleton-rectangular_UtIyN`,skeletonRectangular:`skeleton-rectangular_UtIyN`,"skeleton-animation-pulse":`skeleton-animation-pulse_wGbPg`,skeletonAnimationPulse:`skeleton-animation-pulse_wGbPg`,skeletonPulse:`skeletonPulse_06yjn`,"skeleton-animation-shimmer":`skeleton-animation-shimmer_a0nwc`,skeletonAnimationShimmer:`skeleton-animation-shimmer_a0nwc`,skeletonShimmer:`skeletonShimmer_wLPXR`},Hu={[zu.Text]:Vu.skeletonText,[zu.Circle]:Vu.skeletonCircle,[zu.Rectangular]:Vu.skeletonRectangular},Uu={[Bu.Shimmer]:Vu.skeletonAnimationShimmer,[Bu.Pulse]:Vu.skeletonAnimationPulse,[Bu.None]:void 0};function Wu(e){let{variant:t=zu.Text,animation:n=Bu.Shimmer,lines:r=1,className:i,style:a,classNames:o,styles:s,...c}=E(`Skeleton`,e),l=Hu[t],d=Uu[n];return t!==zu.Text||r<=1?(0,p.jsx)(`span`,{...c,className:(0,u.default)(Vu.skeleton,l,d,i),style:a}):(0,p.jsx)(`span`,{...c,className:(0,u.default)(Vu.skeletonLines,i),style:a,children:Array.from({length:r},(e,t)=>(0,p.jsx)(`span`,{className:(0,u.default)(Vu.skeleton,l,d,t===r-1&&Vu.skeletonLineLast,o?.line),style:s?.line},t))})}var Gu={slider:`slider_qmg2W`,"slider-thumb":`slider-thumb_CHuJN`,sliderThumb:`slider-thumb_CHuJN`,"slider-disabled":`slider-disabled_T0o2S`,sliderDisabled:`slider-disabled_T0o2S`,"slider-has-mark-labels":`slider-has-mark-labels_Xw6ZJ`,sliderHasMarkLabels:`slider-has-mark-labels_Xw6ZJ`,"slider-track":`slider-track_UyKYc`,sliderTrack:`slider-track_UyKYc`,"slider-range":`slider-range_exAs9`,sliderRange:`slider-range_exAs9`,"slider-dragging":`slider-dragging_htPFH`,sliderDragging:`slider-dragging_htPFH`,"slider-mark":`slider-mark_fvw-n`,sliderMark:`slider-mark_fvw-n`,"slider-mark-label":`slider-mark-label_iDtU2`,sliderMarkLabel:`slider-mark-label_iDtU2`,"slider-value":`slider-value_3rQgd`,sliderValue:`slider-value_3rQgd`};function Ku(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}function qu(e){let{min:t=0,max:n=100,step:r=1,disabled:i=!1,marks:a,showValue:o=!1,formatValue:s,size:c,tabIndex:d=0,className:f,style:m,classNames:h,styles:g,"aria-label":_,range:v,value:y,defaultValue:b,onChange:x,onChangeEnd:S,minRange:C=0,thumbLabels:w,...T}=e,E=x,D=S,O=v===!0,k=(0,l.useRef)(null),A=(0,l.useRef)(null),j=(0,l.useRef)([]),M=(0,l.useRef)(null),[N,P]=(0,l.useState)(!1),F=Ku(r);function I(e){return Math.min(n,Math.max(t,e))}function L(e){let n=Math.round((e-t)/r)*r+t;return Number(I(n).toFixed(F))}function R(e){if(O){let r=e??[t,n];return[I(r[0]),I(r[1])]}return[I(e??t)]}function z(e){let t=O?2:1;return e.length===t?e:O?[e[0],n]:[e[0]]}let B=y!==void 0,[V,H]=(0,l.useState)(()=>R(b)),U=B?R(y):z(V),W=(0,l.useRef)(U);(0,l.useEffect)(()=>{W.current=U},[U]);function G(e){return O?[e[0],e[1]]:e[0]}function ee(e,r){return O?e===0?[t,r[1]-C]:[r[0]+C,n]:[t,n]}function K(e,r,i){let a=W.current,[o,s]=ee(e,a),c=L(r);if(c<o&&(c=Number(Math.max(t,o).toFixed(F))),c>s&&(c=Number(Math.min(n,s).toFixed(F))),c===a[e]){i&&D?.(G(a));return}let l=[...a];l[e]=c,W.current=l,B||H(l),E?.(G(l)),i&&D?.(G(l))}function te(e){let r=k.current;if(!r)return W.current[0];let i=r.getBoundingClientRect(),a=i.width?(e-i.left)/i.width:0;return t+Math.min(1,Math.max(0,a))*(n-t)}function ne(e){if(!O)return 0;let[t,n]=W.current,r=Math.abs(e-t),i=Math.abs(e-n);return r===i?+(e>n):r<i?0:1}function re(e){if(i)return;e.preventDefault();let t=te(e.clientX),n=ne(t);(O?j.current[n]:A.current)?.focus(),A.current?.setPointerCapture?.(e.pointerId),M.current=n,P(!0),K(n,t,!1)}function q(e){let t=M.current;t!==null&&K(t,te(e.clientX),!1)}function ie(e){M.current!==null&&(M.current=null,P(!1),A.current?.releasePointerCapture?.(e.pointerId),D?.(G(W.current)))}function ae(e,a){if(i)return;let o=r*10,s=U[a],c=null;switch(e.key){case`ArrowRight`:case`ArrowUp`:c=s+r;break;case`ArrowLeft`:case`ArrowDown`:c=s-r;break;case`PageUp`:c=s+o;break;case`PageDown`:c=s-o;break;case`Home`:c=t;break;case`End`:c=n;break;default:return}e.preventDefault(),K(a,c,!0)}let J=e=>n>t?(I(e)-t)/(n-t):0,oe=e=>`${J(e)*100}%`,se=O?{left:oe(U[0]),width:`${(J(U[1])-J(U[0]))*100}%`}:{width:oe(U[0])},ce=!!a?.some(e=>e.label!=null),le=e=>s?s(e):e;function Y(e){let r=U[e],a=le(r),[o,s]=ee(e,U);return{role:`slider`,"aria-valuemin":Number(Math.max(t,o).toFixed(F)),"aria-valuemax":Number(Math.min(n,s).toFixed(F)),"aria-valuenow":r,"aria-valuetext":typeof a==`string`||typeof a==`number`?String(a):void 0,"aria-orientation":`horizontal`,"aria-disabled":i||void 0}}let ue=O?{role:`group`,"aria-label":_,"aria-disabled":i||void 0}:{...Y(0),"aria-label":_,tabIndex:i?-1:d};return(0,p.jsx)(`div`,{...T,...ue,ref:A,className:(0,u.default)(Gu.slider,i&&Gu.sliderDisabled,N&&Gu.sliderDragging,ce&&Gu.sliderHasMarkLabels,f,h?.root),style:{...c?{"--slider-thumb-size":c}:null,...m,...g?.root},onPointerDown:re,onPointerMove:q,onPointerUp:ie,onKeyDown:O?void 0:e=>ae(e,0),children:(0,p.jsxs)(`div`,{ref:k,className:(0,u.default)(Gu.sliderTrack,h?.track),style:g?.track,children:[(0,p.jsx)(`div`,{className:(0,u.default)(Gu.sliderRange,h?.range),style:{...se,...g?.range}}),a?.map(e=>{let t=oe(e.value);return(0,p.jsxs)(l.default.Fragment,{children:[(0,p.jsx)(`span`,{className:(0,u.default)(Gu.sliderMark,h?.mark),style:{left:t,...g?.mark}}),e.label!=null&&(0,p.jsx)(`span`,{className:(0,u.default)(Gu.sliderMarkLabel,h?.markLabel),style:{left:t,...g?.markLabel},children:e.label})]},e.value)}),U.map((e,t)=>(0,p.jsx)(`div`,{ref:e=>{j.current[t]=e},className:(0,u.default)(Gu.sliderThumb,h?.thumb),style:{left:oe(e),...g?.thumb},...O?{...Y(t),"aria-label":w?.[t]??(t===0?`From`:`To`),tabIndex:i?-1:d,onKeyDown:e=>ae(e,t)}:{},children:o&&(0,p.jsx)(`span`,{className:(0,u.default)(Gu.sliderValue,h?.value),style:g?.value,children:le(e)})},t))]})})}var Ju={splitButton:`splitButton_5ak5W`,splitButtonPrimary:`splitButtonPrimary_4mVy8`,splitButtonTrigger:`splitButtonTrigger_32cQA`},Yu={moreActions:`More actions`};function Xu(e){let{children:t,onClick:n=()=>{},actions:r=[],styleType:i=J.Filled,color:a=j.Primary,size:o=oe.Medium,disabled:s=!1,isLoading:c=!1,align:d=zt.End,className:m,style:h,classNames:g,styles:_,labels:v,...y}=E(`SplitButton`,e),b=D(`SplitButton`,v,Yu),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)(s);return s!==C&&(w(s),s&&S(!1)),(0,p.jsxs)(In,{...y,className:(0,u.default)(Ju.splitButton,g?.root,m),style:{...h,..._?.root},children:[(0,p.jsx)(he,{styleType:i,color:a,size:o,disabled:s,isLoading:c,onClick:n,className:(0,u.default)(Ju.splitButtonPrimary,g?.primaryButton),style:_?.primaryButton,children:t}),(0,p.jsx)(ol,{items:r,isOpen:x,onOpenChange:S,placement:Rt.Bottom,align:d,classNames:{menu:g?.menu,item:g?.menuItem},styles:{menu:_?.menu,item:_?.menuItem},children:(0,p.jsx)(he,{styleType:i,color:a,size:o,disabled:s,icon:f.faChevronDown,"aria-label":b.moreActions,className:(0,u.default)(Ju.splitButtonTrigger,g?.triggerButton),style:_?.triggerButton})})]})}var Zu={stepper:`stepper_kiS2A`,"stepper-vertical":`stepper-vertical_2y9rg`,stepperVertical:`stepper-vertical_2y9rg`,"stepper-step":`stepper-step_nUfsV`,stepperStep:`stepper-step_nUfsV`,"stepper-entry":`stepper-entry_KD4JJ`,stepperEntry:`stepper-entry_KD4JJ`,"stepper-clickable":`stepper-clickable_Nm6fP`,stepperClickable:`stepper-clickable_Nm6fP`,"stepper-entry-disabled":`stepper-entry-disabled_T9S5R`,stepperEntryDisabled:`stepper-entry-disabled_T9S5R`,"stepper-entry-number":`stepper-entry-number_J168Q`,stepperEntryNumber:`stepper-entry-number_J168Q`,"stepper-entry-reached":`stepper-entry-reached_VCUw4`,stepperEntryReached:`stepper-entry-reached_VCUw4`,"stepper-entry-done":`stepper-entry-done_M3wb5`,stepperEntryDone:`stepper-entry-done_M3wb5`,"stepper-entry-error":`stepper-entry-error_xjGSr`,stepperEntryError:`stepper-entry-error_xjGSr`,"stepper-checkmark":`stepper-checkmark_iKCap`,stepperCheckmark:`stepper-checkmark_iKCap`,showCheckmark:`showCheckmark_Rd0oW`,"stepper-entry-labels":`stepper-entry-labels_nQT8D`,stepperEntryLabels:`stepper-entry-labels_nQT8D`,"stepper-entry-label":`stepper-entry-label_b94eg`,stepperEntryLabel:`stepper-entry-label_b94eg`,"stepper-description":`stepper-description_5Q0YP`,stepperDescription:`stepper-description_5Q0YP`,"stepper-optional":`stepper-optional_N8mkW`,stepperOptional:`stepper-optional_N8mkW`,"stepper-visually-hidden":`stepper-visually-hidden_AOd1K`,stepperVisuallyHidden:`stepper-visually-hidden_AOd1K`,"stepper-connector":`stepper-connector_J2FwZ`,stepperConnector:`stepper-connector_J2FwZ`,"stepper-connector-filled":`stepper-connector-filled_W8UZS`,stepperConnectorFilled:`stepper-connector-filled_W8UZS`,"stepper-label-top":`stepper-label-top_sBw4-`,stepperLabelTop:`stepper-label-top_sBw4-`,"stepper-marker-cell":`stepper-marker-cell_reOS7`,stepperMarkerCell:`stepper-marker-cell_reOS7`,"stepper-rail-segment":`stepper-rail-segment_U-ZgF`,stepperRailSegment:`stepper-rail-segment_U-ZgF`,"stepper-rail-filled":`stepper-rail-filled_wCImi`,stepperRailFilled:`stepper-rail-filled_wCImi`,"stepper-rail-hidden":`stepper-rail-hidden_l17t6`,stepperRailHidden:`stepper-rail-hidden_l17t6`,"stepper-content":`stepper-content_yjlFH`,stepperContent:`stepper-content_yjlFH`,"stepper-label-left":`stepper-label-left_yGbjC`,stepperLabelLeft:`stepper-label-left_yGbjC`,"stepper-content-inner":`stepper-content-inner_0w2wP`,stepperContentInner:`stepper-content-inner_0w2wP`,"stepper-outlined":`stepper-outlined_V7UjP`,stepperOutlined:`stepper-outlined_V7UjP`,"stepper-dots":`stepper-dots_s4cgN`,stepperDots:`stepper-dots_s4cgN`},Qu=function(e){return e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),$u=function(e){return e.Filled=`filled`,e.Outlined=`outlined`,e.Dots=`dots`,e}({}),ed=function(e){return e.None=`none`,e.ActiveOnly=`activeOnly`,e.Completed=`completed`,e}({}),td=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({}),nd={[$u.Filled]:Zu.stepperFilled,[$u.Outlined]:Zu.stepperOutlined,[$u.Dots]:Zu.stepperDots},rd={[td.Top]:Zu.stepperLabelTop,[td.Bottom]:Zu.stepperLabelBottom,[td.Left]:Zu.stepperLabelLeft,[td.Right]:Zu.stepperLabelRight},id={optional:`Optional`,completed:`Completed`,notCompleted:`Not completed`,error:`Error`},ad=F(j.Error);function od(){return(0,p.jsx)(`svg`,{className:Zu.stepperCheckmark,strokeLinejoin:`round`,strokeLinecap:`round`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`-0.2 -1.2 3.4 2`,children:(0,p.jsx)(`path`,{d:`M 0 0 l 1 1 l 2 -2`,strokeWidth:`0.4`,fill:`none`})})}function sd({open:e,className:t,style:n,children:r}){let i=(0,l.useRef)(null),[a,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(()=>o(e.offsetHeight));return t.observe(e),()=>t.disconnect()},[]),(0,p.jsx)(`div`,{className:(0,u.default)(Zu.stepperContent,t),style:{...n,height:e?a??`auto`:0},inert:!e,children:(0,p.jsx)(`div`,{ref:i,className:Zu.stepperContentInner,children:r})})}function cd(e,t){let n=[td.Left,td.Right];return t?e&&n.includes(e)?e:td.Right:e&&!n.includes(e)?e:td.Bottom}function ld(e){let{steps:t=[],currentStep:n=0,orientation:r=Qu.Horizontal,onStepClicked:i=null,nonLinear:a=!1,hideLabels:o=!1,styleType:s=$u.Filled,color:c=j.Primary,collapse:l=ed.None,labelPlacement:d,labels:f,className:m,style:h,classNames:g,styles:_,...v}=E(`Stepper`,e),y=D(`Stepper`,f,id),b=F(c);R(`Stepper`,[c]);let x=r===Qu.Vertical,S=cd(d,x);return(0,p.jsx)(`ol`,{...v,role:`list`,className:(0,u.default)(Zu.stepper,b.className,nd[s],rd[S],{[Zu.stepperVertical]:x},g?.root,m),style:{...b.style,..._?.root,...h},children:t.map((e,r)=>{let s=r===n,c=r<n,d=r<=n,f=!!e.error,m=!!i&&!e.disabled&&(a?!s:c),h=m||!!i&&!e.disabled&&s,v=f?y.error:c?y.completed:s?null:y.notCompleted,b=e.icon?X(e.icon,{className:g?.icon,style:_?.icon}):c&&!f?(0,p.jsx)(od,{}):r+1,S=(0,p.jsx)(`span`,{"aria-hidden":!0,className:(0,u.default)(Zu.stepperEntryNumber,f&&ad.className,g?.entryNumber),style:_?.entryNumber,children:b}),C=e.optional===!0?y.optional:e.optional===!1?null:e.optional,w=(0,p.jsxs)(`span`,{className:(0,u.default)(Zu.stepperEntryLabels,{[Zu.stepperVisuallyHidden]:o}),children:[(0,p.jsx)(`span`,{className:(0,u.default)(Zu.stepperEntryLabel,g?.entryLabel),style:_?.entryLabel,children:e.label}),e.description!=null&&(0,p.jsxs)(p.Fragment,{children:[` `,(0,p.jsx)(`span`,{className:(0,u.default)(Zu.stepperDescription,g?.description),style:_?.description,children:e.description})]}),C!=null&&(0,p.jsxs)(p.Fragment,{children:[` `,(0,p.jsx)(`span`,{className:(0,u.default)(Zu.stepperOptional,g?.optional),style:_?.optional,children:C})]}),v!=null&&(0,p.jsxs)(p.Fragment,{children:[` `,(0,p.jsx)(`span`,{className:Zu.stepperVisuallyHidden,children:v})]})]}),T=e=>{let n=e===`lead`?r===0:r===t.length-1,i=e===`lead`?d:c;return(0,p.jsx)(`span`,{className:(0,u.default)(Zu.stepperRailSegment,{[Zu.stepperRailFilled]:!n&&i,[Zu.stepperRailHidden]:n})})},E=(0,p.jsxs)(p.Fragment,{children:[x?(0,p.jsxs)(`span`,{className:Zu.stepperMarkerCell,children:[T(`lead`),S,T(`trail`)]}):S,w]}),D=(0,u.default)(Zu.stepperEntry,{[Zu.stepperEntryReached]:d},{[Zu.stepperEntryDone]:c&&!f},{[Zu.stepperEntryError]:f},{[Zu.stepperEntryDisabled]:e.disabled},{[Zu.stepperClickable]:m},g?.entry);return(0,p.jsxs)(`li`,{className:Zu.stepperStep,"aria-current":s&&!h?`step`:void 0,children:[h?(0,p.jsx)(`button`,{type:`button`,className:D,style:_?.entry,"aria-current":s?`step`:void 0,"aria-disabled":!m||void 0,onClick:m?()=>i?.(r):void 0,children:E}):(0,p.jsx)(`div`,{className:D,style:_?.entry,children:E}),r<t.length-1&&(0,p.jsx)(`div`,{className:(0,u.default)(Zu.stepperConnector,{[Zu.stepperConnectorFilled]:c},g?.connector),style:_?.connector}),x&&e.content!=null&&(0,p.jsx)(sd,{open:l===ed.None||(l===ed.ActiveOnly?s:!c),className:g?.content,style:_?.content,children:e.content})]},r)})})}function ud(e,t,n,r){return e<r&&n<t}function dd(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}var fd=new class{constructor(){this.entries=new Map,this.listeners=new Map,this.results=new Map,this.rafId=0,this.listenerCount=0,this.schedule=()=>{cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(this.recompute)},this.recompute=()=>{let e=[...this.entries.entries()].sort(([,e],[,t])=>dd(e.node,t.node)),t=new Map,n=[];for(let[r,i]of e){let e=i.getMetrics();if(!e)continue;let a=t.get(e.container);a||(a=[],t.set(e.container,a));let o=a.filter(t=>ud(t.left,t.right,e.left,e.left+e.width)).reduce((e,t)=>Math.max(e,t.bottom),i.offsetTop),s=!i.disabled&&e.top<=o;if(s){let t=o+e.contentHeight;a.push({left:e.left,right:e.left+e.width,bottom:e.boundaryBottom==null?t:Math.min(t,e.boundaryBottom)})}n.push({id:r,metrics:e,baseTop:s?o:i.offsetTop,isStuck:s})}let r=new Map;for(let{metrics:e,baseTop:t,isStuck:i}of n){let{boundary:n,boundaryBottom:a,contentHeight:o}=e;if(!i||n==null||a==null)continue;let s=Math.min(0,a-(t+o)),c=r.get(n);(c==null||s<c)&&r.set(n,s)}for(let{id:e,metrics:t,baseTop:i,isStuck:a}of n){let n={isStuck:a,top:i+(a&&t.boundary?r.get(t.boundary)??0:0)},o=this.results.get(e);o&&o.isStuck===n.isStuck&&o.top===n.top||(this.results.set(e,n),this.listeners.get(e)?.(n))}}}register(e,t){let n=Symbol(`sticky`);return this.entries.set(n,e),this.listeners.set(n,t),this.startListening(),n}updateEntry(e,t){let n=this.entries.get(e);n&&Object.assign(n,t)}unregister(e){this.entries.has(e)&&(this.entries.delete(e),this.listeners.delete(e),this.results.delete(e),this.stopListening())}startListening(){this.listenerCount===0&&(window.addEventListener(`scroll`,this.schedule,{passive:!0,capture:!0}),window.addEventListener(`resize`,this.schedule)),this.listenerCount++}stopListening(){this.listenerCount--,this.listenerCount===0&&(window.removeEventListener(`scroll`,this.schedule,{capture:!0}),window.removeEventListener(`resize`,this.schedule))}},pd={sticky:`sticky_L6zO2`,"sticky-content":`sticky-content_ZaXTD`,stickyContent:`sticky-content_ZaXTD`,"sticky-content-stuck":`sticky-content-stuck_w-gRW`,stickyContentStuck:`sticky-content-stuck_w-gRW`,"sticky-placeholder":`sticky-placeholder_aJ3Sb`,stickyPlaceholder:`sticky-placeholder_aJ3Sb`};function md({children:e,offsetTop:t=0,offsetElement:n,stickToScrollParent:r=!1,boundary:i,boundaryInset:a=0,zIndex:o=20,disabled:s=!1,onStuckChange:c,className:d,style:f,classNames:m,styles:h,...g}){let _=(0,l.useRef)(null),v=(0,l.useRef)(null),y=(0,l.useRef)(null),b=(0,l.useRef)(null),[x,S]=(0,l.useState)({width:0,left:0,height:0}),[C,w]=(0,l.useState)(null),[T,E]=(0,l.useState)(0),D=n?.current?C??n.current.offsetHeight:t,[O,k]=(0,l.useState)({isStuck:!1,top:D}),A=(0,l.useRef)(c);(0,l.useEffect)(()=>{A.current=c},[c]);let j=(0,l.useRef)(i),M=(0,l.useRef)(a);(0,l.useLayoutEffect)(()=>{j.current=i,M.current=a});let N=(0,l.useCallback)(()=>{let e=_.current,t=v.current;if(!e||!t)return;let n=e.getBoundingClientRect();S({width:e.clientWidth,left:n.left,height:t.offsetHeight}),fd.schedule()},[]);(0,l.useEffect)(()=>{let e=n?.current;if(!e)return;let t=()=>w(e.offsetHeight);t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[n]),(0,l.useLayoutEffect)(()=>{b.current=r?Ft(_.current):null},[r]),(0,l.useLayoutEffect)(()=>{let e=fd.register({node:_.current,offsetTop:D,disabled:s,getMetrics:()=>{let e=_.current,t=v.current;if(!e||!t)return null;let n=e.getBoundingClientRect(),r=b.current?.getBoundingClientRect(),i=r?.top??0;E(e=>e===i?e:i);let a=r?n.top-r.top:n.top,o=r?n.left-r.left:n.left,s=j.current?.current??null,c=s?.getBoundingClientRect();return{top:a,left:o,width:e.clientWidth,contentHeight:t.offsetHeight,container:b.current,boundary:s,boundaryBottom:c?c.bottom-i-M.current:null}}},k);return y.current=e,()=>{fd.unregister(e),y.current=null}},[]),(0,l.useEffect)(()=>{y.current&&fd.updateEntry(y.current,{offsetTop:D,disabled:s}),fd.schedule()},[D,s]),(0,l.useLayoutEffect)(()=>{N()},[N,e]),(0,l.useEffect)(()=>{let e=new ResizeObserver(N);return _.current&&e.observe(_.current),v.current&&e.observe(v.current),b.current&&e.observe(b.current),()=>e.disconnect()},[N,r]);let P=(0,l.useRef)(!0);(0,l.useEffect)(()=>{if(P.current){P.current=!1;return}A.current?.(O.isStuck)},[O.isStuck]);let F=O.isStuck?{position:`fixed`,top:T+O.top,left:x.left,width:x.width,zIndex:o,...h?.content}:h?.content;return(0,p.jsxs)(`div`,{ref:_,className:(0,u.default)(pd.sticky,d,m?.root),style:{...h?.root,...f},...g,children:[O.isStuck&&(0,p.jsx)(`div`,{"aria-hidden":!0,className:(0,u.default)(pd.stickyPlaceholder,m?.placeholder),style:{height:x.height,...h?.placeholder}}),(0,p.jsx)(`div`,{ref:v,className:(0,u.default)(pd.stickyContent,O.isStuck&&pd.stickyContentStuck,m?.content),style:F,children:e})]})}var hd={switch:`switch_9TG2Y`,"switch-disabled":`switch-disabled_UL-F-`,switchDisabled:`switch-disabled_UL-F-`,"switch-track":`switch-track_awA-t`,switchTrack:`switch-track_awA-t`,"switch-track-checked":`switch-track-checked_boZKe`,switchTrackChecked:`switch-track-checked_boZKe`,"switch-thumb":`switch-thumb_4fUTo`,switchThumb:`switch-thumb_4fUTo`,"switch-thumb-checked":`switch-thumb-checked_GU--w`,switchThumbChecked:`switch-thumb-checked_GU--w`,"switch-label":`switch-label_3pLBQ`,switchLabel:`switch-label_3pLBQ`};function gd(e){let{label:t=``,selected:n=!1,onToggle:r=()=>{},className:i=``,style:a,disabled:o=!1,title:s=``,tabIndex:c=0,formValidator:d=null,children:f=null,classNames:m,styles:h,...g}=E(`Switch`,e),[,_]=(0,l.useState)(0);(0,l.useEffect)(()=>{if(!d)return;let e=()=>_(e=>e+1);return d.registerOnUpdateListener(e),()=>d.removeOnUpdateListener(e)},[d]);function v(e){o||(d&&d.set(!d.value),r(!y,e))}let y=d?d.value:n;return(0,p.jsxs)(`div`,{...g,title:s,className:(0,u.default)(hd.switch,{[hd.switchDisabled]:o},i),style:a,onClick:v,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(e))},role:`switch`,"aria-checked":y,tabIndex:o?-1:c,children:[(0,p.jsx)(`div`,{className:(0,u.default)(hd.switchTrack,y&&hd.switchTrackChecked,m?.track),style:h?.track,children:(0,p.jsx)(`div`,{className:(0,u.default)(hd.switchThumb,y&&hd.switchThumbChecked,m?.thumb),style:h?.thumb})}),(f||t)&&(0,p.jsx)(`div`,{className:(0,u.default)(hd.switchLabel,m?.label),style:h?.label,children:f||t})]})}var _d={tabHeader:`tabHeader_C-b9d`,"tabHeader-tab":`tabHeader-tab_Wbyt-`,tabHeaderTab:`tabHeader-tab_Wbyt-`,"tabHeader-tab-active":`tabHeader-tab-active_IExSo`,tabHeaderTabActive:`tabHeader-tab-active_IExSo`,"tabHeader-tab-disabled":`tabHeader-tab-disabled_yWJxS`,tabHeaderTabDisabled:`tabHeader-tab-disabled_yWJxS`,"tabHeader-icon":`tabHeader-icon_ryEHB`,tabHeaderIcon:`tabHeader-icon_ryEHB`,"tabHeader-labels":`tabHeader-labels_q5Af5`,tabHeaderLabels:`tabHeader-labels_q5Af5`,"tabHeader-title":`tabHeader-title_Jq2Vy`,tabHeaderTitle:`tabHeader-title_Jq2Vy`,"tabHeader-subtitle":`tabHeader-subtitle_4lhSa`,tabHeaderSubtitle:`tabHeader-subtitle_4lhSa`};function vd({tabs:e=[],currentTab:t,onChange:n,className:r,style:i,classNames:a,styles:o,...s}){return(0,p.jsx)(`div`,{...s,role:`tablist`,className:(0,u.default)(_d.tabHeader,a?.root,r),style:{...o?.root,...i},children:e.map(e=>{let r=e.id===t,i=!!e.title||!!e.subtitle;return(0,p.jsxs)(Ot,{role:`tab`,"aria-selected":r,"aria-disabled":e.disabled||void 0,tabIndex:e.disabled?-1:0,className:(0,u.default)(_d.tabHeaderTab,{[_d.tabHeaderTabActive]:r},{[_d.tabHeaderTabDisabled]:e.disabled},a?.tab),style:o?.tab,onClick:()=>{e.disabled||r||n(e.id)},children:[X(e.icon,{className:(0,u.default)(_d.tabHeaderIcon,a?.icon),style:o?.icon}),i&&(0,p.jsxs)(`div`,{className:(0,u.default)(_d.tabHeaderLabels,a?.labels),style:o?.labels,children:[e.title&&(0,p.jsx)(`span`,{className:(0,u.default)(_d.tabHeaderTitle,a?.title),style:o?.title,children:e.title}),e.subtitle&&(0,p.jsx)(`span`,{className:(0,u.default)(_d.tabHeaderSubtitle,a?.subtitle),style:o?.subtitle,children:e.subtitle})]})]},e.id)})})}function yd(e){return(0,p.jsx)(Aa,{...E(`Textarea`,e),multiline:!0})}function bd(e=`default`){let[t,n]=(0,l.useState)(localStorage.getItem(`theme`)||e);return{currentThemeId:t,setCurrentThemeId:e=>{n(e),localStorage.setItem(`theme`,e)}}}var xd=(0,l.createContext)(null);function Sd(){return(0,l.useContext)(xd)}function Cd({children:e,className:t,style:n,...r}){let i=(0,l.useRef)(null),a=(0,l.useRef)(void 0),o=(0,l.useRef)(!1),s=(0,l.useRef)(null),[c,u]=(0,l.useState)({pointer:null,rect:null}),d=()=>{o.current||(o.current=!0,a.current=requestAnimationFrame(()=>{o.current=!1,a.current=void 0;let e=i.current,t=s.current;if(!e||!t)return;let n=e.getBoundingClientRect();u({pointer:{x:t.x-n.left,y:t.y-n.top},rect:n})}))},f=e=>{s.current={x:e.clientX,y:e.clientY},d()},m=()=>{s.current=null,o.current&&a.current!==void 0&&(cancelAnimationFrame(a.current),o.current=!1,a.current=void 0),u({pointer:null,rect:null})};return(0,p.jsx)(`div`,{...r,ref:i,className:t,style:n,onPointerMove:f,onPointerLeave:m,children:(0,p.jsx)(xd.Provider,{value:c,children:e})})}function wd(e){let t=Math.max(-1,Math.min(1,e));return Math.sign(t)*Math.abs(t)**1.6}function Td(e,t){return Math.max(-t,Math.min(t,e))}function Ed(e,t,n,{maxTiltX:r,maxTiltY:i,easing:a,lockAxis:o}){let s=n.width>0?e/n.width*2-1:0,c=n.height>0?t/n.height*2-1:0;return{rotateX:o===`x`?0:Td(-a(c)*r,r),rotateY:o===`y`?0:Td(a(s)*i,i)}}var Dd={tilt:`tilt_gbX2b`,"tilt-perspective":`tilt-perspective_CFdP6`,tiltPerspective:`tilt-perspective_CFdP6`,"tilt-surface":`tilt-surface_Jyzwe`,tiltSurface:`tilt-surface_Jyzwe`};function Od(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}var kd=.3,Ad=.05;function jd(e){let{ref:t,children:n,maxTilt:r=15,maxTiltX:i,maxTiltY:a,perspective:o=800,easing:s=wd,lockAxis:c=`none`,scaleOnHover:d=1,trackingMode:f=`self`,disabled:m=!1,onTiltChange:h,className:g,style:_,classNames:v,styles:y,...b}=E(`Tilt`,e),x=(0,l.useRef)(null),S=(0,l.useRef)(null),C=(0,l.useRef)(void 0),w=(0,l.useRef)(!1),T=(0,l.useRef)(!1),D=(0,l.useRef)(!1),O=(0,l.useRef)(null),k=(0,l.useRef)({rotateX:0,rotateY:0}),A=Sd(),j=f===`group`,N=j&&A!==null;(0,l.useEffect)(()=>{j&&A===null&&M()&&console.warn(`Tilt: trackingMode="group" was set with no ancestor TiltGroup, falling back to self tracking.`)},[j,A===null]);let P=i??r,F=a??r;function I(e,t,n){let r=S.current;r&&(r.style.transform=`rotateX(${e}deg) rotateY(${t}deg)`+(n===1?``:` scale(${n})`))}function L(){C.current!==void 0&&(cancelAnimationFrame(C.current),C.current=void 0),w.current=!1}function R(){if(C.current=void 0,!S.current){w.current=!1;return}let e=T.current&&!m&&!Od(),t=0,n=0;if(e){let e=O.current,r=x.current?.getBoundingClientRect();if(e&&r){let i=Ed(e.x-r.left,e.y-r.top,r,{maxTiltX:P,maxTiltY:F,easing:s,lockAxis:c});t=i.rotateX,n=i.rotateY}}let r=k.current,i,a;if(D.current?(i=r.rotateX+(t-r.rotateX)*kd,a=r.rotateY+(n-r.rotateY)*kd,Math.abs(t-i)<Ad&&Math.abs(n-a)<Ad&&(i=t,a=n,D.current=!1)):(i=t,a=n),k.current={rotateX:i,rotateY:a},I(i,a,e?d:1),h?.(i,a),!D.current){w.current=!1;return}C.current=requestAnimationFrame(R)}function z(){w.current||(w.current=!0,C.current=requestAnimationFrame(R))}function B(e){T.current!==e&&(D.current=!0),T.current=e,z()}let V=e=>{m||N||Od()||(O.current={x:e.clientX,y:e.clientY},B(!0))},H=()=>{N||B(!1)};return(0,l.useEffect)(()=>{if(N){if(m||Od()){B(!1);return}A?.pointer&&A.rect?(O.current={x:A.rect.left+A.pointer.x,y:A.rect.top+A.pointer.y},B(!0)):B(!1)}},[N,m,A?.pointer,A?.rect]),(0,l.useEffect)(()=>()=>{L()},[]),(0,l.useImperativeHandle)(t,()=>({setTilt(e,t){let n={rotateX:Math.max(-P,Math.min(P,e)),rotateY:Math.max(-F,Math.min(F,t))};L(),T.current=!1,D.current=!1,k.current=n,I(n.rotateX,n.rotateY,d),h?.(n.rotateX,n.rotateY)},reset(){L(),T.current=!1,D.current=!1,k.current={rotateX:0,rotateY:0},I(0,0,1)}})),(0,p.jsx)(`div`,{...b,ref:x,className:(0,u.default)(Dd.tilt,g,v?.root),style:{..._,...y?.root},onPointerMove:V,onPointerLeave:H,onPointerCancel:H,children:(0,p.jsx)(`div`,{className:(0,u.default)(Dd.tiltPerspective,v?.perspective),style:{perspective:`${o}px`,...y?.perspective},children:(0,p.jsx)(`div`,{ref:S,className:(0,u.default)(Dd.tiltSurface,v?.surface),style:y?.surface,children:n})})})}var Md=e=>(Math.trunc(e)%24+24)%24,Nd=e=>(Math.trunc(e)%60+60)%60;function Pd(e){if(!e)return null;let t=e.match(/^(\d{1,2}):(\d{1,2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return n>23||r>59?null:{hours:n,minutes:r}}function Fd(e){return e?`${String(Md(e.hours)).padStart(2,`0`)}:${String(Nd(e.minutes)).padStart(2,`0`)}`:``}function Id(e,t){return Nd(!t||t<=1?e:Math.round(Nd(e)/t)*t)}var Ld=e=>e.hours*60+e.minutes;function Rd(e,t,n){let r=Ld(e),i=Pd(t),a=Pd(n);return i&&(r=Math.max(r,Ld(i))),a&&(r=Math.min(r,Ld(a))),{hours:Math.floor(r/60),minutes:r%60}}function zd(e,t,n,r,i){let a=r*i*Math.PI/180;return{x:e+n*Math.sin(a),y:t-n*Math.cos(a)}}function Bd(e,t){return(Math.atan2(e,-t)*180/Math.PI+360)%360}var Vd=(e,t)=>Math.sqrt(e*e+t*t),Hd={clockFace:`clockFace_LbXIa`,clockHand:`clockHand_E9nTw`,"clockHand-line":`clockHand-line_iOipC`,clockHandLine:`clockHand-line_iOipC`,"clockHand-center":`clockHand-center_VElxx`,clockHandCenter:`clockHand-center_VElxx`,"clockHand-knob":`clockHand-knob_Mb2Fx`,clockHandKnob:`clockHand-knob_Mb2Fx`,clockNumber:`clockNumber_qHDO8`,"clockNumber-inner":`clockNumber-inner_x2XR1`,clockNumberInner:`clockNumber-inner_x2XR1`,"clockNumber-selected":`clockNumber-selected_rPVlV`,clockNumberSelected:`clockNumber-selected_rPVlV`},Ud=50,Wd=40,Gd=25.5,Kd=65.5/2,qd=30,Jd=6,Yd=e=>(e+11)%12+1;function Xd(e,t){if(e===`minutes`)return Array.from({length:12},(e,t)=>{let n=t*5;return{label:String(n).padStart(2,`0`),slot:t,value:n,ring:`outer`}});if(!t)return Array.from({length:12},(e,t)=>{let n=t===0?12:t;return{label:String(n),slot:t,value:n,ring:`outer`}});let n=Array.from({length:12},(e,t)=>{let n=t===0?12:t;return{label:String(n),slot:t,value:n,ring:`outer`}}),r=Array.from({length:12},(e,t)=>{let n=t===0?0:t+12;return{label:String(n).padStart(2,`0`),slot:t,value:n,ring:`inner`}});return[...n,...r]}function Zd({time:e,mode:t,use24Hour:n,minuteStep:r,onChange:i,onCommit:a,classNames:o,styles:s}){let c=(0,l.useRef)(null),d=(0,l.useRef)(!1),f=Xd(t,n),m=e.hours>=12,h=Yd(e.hours),g=t===`minutes`?{slot:e.minutes,radius:Wd}:n?e.hours===0?{slot:0,radius:Gd}:e.hours<=12?{slot:e.hours%12,radius:Wd}:{slot:(e.hours-12)%12,radius:Gd}:{slot:h%12,radius:Wd},_=zd(Ud,Ud,g.radius,g.slot,t===`minutes`?Jd:qd),v=i=>t===`minutes`?Id(e.minutes,r)===i.value||e.minutes===i.value:n?e.hours===i.value:h===i.value,y=(i,a)=>{let o=c.current?.getBoundingClientRect();if(!o)return e;let s=i-(o.left+o.width/2),l=a-(o.top+o.height/2),u=Bd(s,l);if(t===`minutes`){let t=Id(Math.round(u/Jd),r);return{hours:e.hours,minutes:t}}let d=Math.round(u/qd)%12;if(!n){let t=d===0?12:d;return{hours:Md(m?t%12+12:t%12),minutes:e.minutes}}return{hours:Md(Vd(s,l)/(o.width/2)*Ud<Kd?d===0?0:d+12:d===0?12:d),minutes:e.minutes}};return(0,p.jsxs)(`div`,{ref:c,className:(0,u.default)(Hd.clockFace,o?.clockFace),style:s?.clockFace,onPointerDown:e=>{d.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),i(y(e.clientX,e.clientY))},onPointerMove:e=>{d.current&&i(y(e.clientX,e.clientY))},onPointerUp:e=>{d.current&&(d.current=!1,a(y(e.clientX,e.clientY)))},role:`slider`,"aria-label":t===`minutes`?`Minutes`:`Hours`,"aria-valuetext":t===`minutes`?`${e.minutes} minutes`:`${e.hours} hours`,children:[(0,p.jsxs)(`svg`,{className:Hd.clockHand,viewBox:`0 0 100 100`,"aria-hidden":!0,children:[(0,p.jsx)(`circle`,{cx:Ud,cy:Ud,r:1.8,className:Hd.clockHandCenter}),(0,p.jsx)(`line`,{x1:Ud,y1:Ud,x2:_.x,y2:_.y,className:Hd.clockHandLine}),(0,p.jsx)(`circle`,{cx:_.x,cy:_.y,r:7,className:(0,u.default)(Hd.clockHandKnob,o?.clockHand),style:s?.clockHand})]}),f.map(e=>{let t=zd(Ud,Ud,e.ring===`inner`?Gd:Wd,e.slot,qd),n=v(e);return(0,p.jsx)(`div`,{className:(0,u.default)(Hd.clockNumber,e.ring===`inner`&&Hd.clockNumberInner,n&&Hd.clockNumberSelected,o?.clockNumber),style:{left:`${t.x}%`,top:`${t.y}%`,...s?.clockNumber},children:e.label},`${e.ring}-${e.value}`)})]})}var Qd={timeInput:`timeInput_EbsZN`,"timeInput-clock":`timeInput-clock_D1-dk`,timeInputClock:`timeInput-clock_D1-dk`,"timeInput-clockHeader":`timeInput-clockHeader_bsYNW`,timeInputClockHeader:`timeInput-clockHeader_bsYNW`,"timeInput-headerSegment":`timeInput-headerSegment_Oiu7e`,timeInputHeaderSegment:`timeInput-headerSegment_Oiu7e`,"timeInput-headerSegment-active":`timeInput-headerSegment-active_-Funz`,timeInputHeaderSegmentActive:`timeInput-headerSegment-active_-Funz`,"timeInput-headerColon":`timeInput-headerColon_LwyQH`,timeInputHeaderColon:`timeInput-headerColon_LwyQH`,"timeInput-meridiem":`timeInput-meridiem_tk9km`,timeInputMeridiem:`timeInput-meridiem_tk9km`,"timeInput-meridiem-active":`timeInput-meridiem-active_40uHm`,timeInputMeridiemActive:`timeInput-meridiem-active_40uHm`,"timeInput-footer":`timeInput-footer_NCXsB`,timeInputFooter:`timeInput-footer_NCXsB`};function $d({value:e,selected:t,onChange:n=()=>null,onSelect:r=()=>null,formValidator:i=null,isInline:a=!1,isModal:o=!1,noInput:s=!1,noHeader:c=!1,showClearButton:m=!1,showNowButton:h=!1,minuteStep:g=1,use24Hour:_=!0,minTime:v=null,maxTime:y=null,label:b=``,isValid:x=!0,errorMessage:S=``,isRequired:C=!1,disabled:w=!1,className:T=``,style:E,classNames:D,styles:O,...k}){let A=()=>i?i.value||``:e??t??``,[j,M]=(0,l.useState)(A),[N,P]=(0,l.useState)(!1),[F,I]=(0,l.useState)(`hours`),[L,R]=(0,l.useState)(!1),[z,B]=(0,l.useState)(!1),[,V]=(0,l.useState)(0),H=A(),[U,W]=(0,l.useState)(H),G=(0,l.useRef)(i);!i&&U!==H&&(W(H),M(H)),(0,l.useEffect)(()=>{if(G.current=i,!i)return;let e=()=>{M(i.value||``),V(e=>e+1)};return i.registerOnUpdateListener(e),()=>i.removeOnUpdateListener(e)},[i]);let ee=()=>i?i.touched&&i.hasError():!x||!!S,K=()=>!!(C||i?.validators.find(e=>e.validatorId===`required`)),te=e=>{let t=e?Fd(e):null;i&&i.set(t),n?.(t)},ne=e=>{M(e?Fd(e):``),te(e)},re=Pd(j),q=re??{hours:12,minutes:0},ie=e=>{let t={hours:e.hours,minutes:Id(e.minutes,g)};ne(Rd(t,v,y))},ae=e=>{let t=Rd({hours:e.hours,minutes:Id(e.minutes,g)},v,y);if(ne(t),F===`hours`){I(`minutes`);return}r?.(Fd(t)),a||P(!1)},J=()=>{w||(I(`hours`),P(!0))},oe=({previousState:e,nextState:t})=>{if(t.value===e.value)return t;let n=t.value,r=n.slice(0,2);/^\d\d$/.test(r)&&Number(r)>23&&(n=`23${n.slice(2)}`);let i=n.slice(3,5);return/^\d\d$/.test(i)&&Number(i)>59&&(n=`${n.slice(0,3)}59`),n===t.value?t:{...t,value:n}},se=e=>{M(e);let t=Pd(e);t&&te(t)},ce=()=>{G.current&&(G.current.touched=!0),R(!1),te(Pd(j))},le=e=>{e!==q.hours>=12&&ne({hours:Md(q.hours+(e?12:-12)),minutes:q.minutes})},Y=ee(),ue=re?String(_?re.hours:(re.hours+11)%12+1).padStart(2,`0`):`--`,de=re?String(re.minutes).padStart(2,`0`):`--`,X=c?null:(0,p.jsxs)(`div`,{className:(0,u.default)(Qd.timeInputClockHeader,D?.clockHeader),style:O?.clockHeader,children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Qd.timeInputHeaderSegment,F===`hours`&&Qd.timeInputHeaderSegmentActive,D?.headerSegment),style:O?.headerSegment,onClick:()=>I(`hours`),children:ue}),(0,p.jsx)(`span`,{className:Qd.timeInputHeaderColon,children:`:`}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Qd.timeInputHeaderSegment,F===`minutes`&&Qd.timeInputHeaderSegmentActive,D?.headerSegment),style:O?.headerSegment,onClick:()=>I(`minutes`),children:de}),!_&&(0,p.jsxs)(`div`,{className:(0,u.default)(Qd.timeInputMeridiem,D?.meridiem),style:O?.meridiem,children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(q.hours<12&&Qd.timeInputMeridiemActive),onClick:()=>le(!1),children:`AM`}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(q.hours>=12&&Qd.timeInputMeridiemActive),onClick:()=>le(!0),children:`PM`})]})]}),fe=m||h?(0,p.jsxs)(`div`,{className:(0,u.default)(Qd.timeInputFooter,D?.footer),style:O?.footer,children:[h&&(0,p.jsx)(he,{onClick:()=>{let e=new Date;ie({hours:e.getHours(),minutes:e.getMinutes()})},children:`Now`}),m&&(0,p.jsx)(he,{onClick:()=>{ne(null),r?.(null)},children:`Clear`})]}):null,pe=(0,p.jsxs)(`div`,{className:(0,u.default)(Qd.timeInputClock,D?.clock),style:O?.clock,children:[X,(0,p.jsx)(Zd,{time:q,mode:F,use24Hour:_,minuteStep:g,onChange:ie,onCommit:ae,classNames:D,styles:O}),fe]}),me=s?null:(0,p.jsx)(Aa,{autoComplete:`off`,label:`${b}${K()?` *`:``}`,value:j,icon:(0,p.jsx)(d.FontAwesomeIcon,{icon:f.faClock}),onIconClick:J,onClick:J,readOnly:o,disabled:w,isValid:!Y,customInput:(0,p.jsx)(bs,{mask:`99:99`,beforeMaskedStateChange:oe}),onChange:e=>se(e),onBlur:ce,onFocus:()=>R(!0),onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1)}),ge=a?pe:o?(0,p.jsx)(ro,{hideHeader:!0,isOpen:N,onClose:()=>P(!1),children:pe}):(0,p.jsx)(On,{isOpen:N,onOpenChange:P,content:pe,placement:Rt.Bottom,align:zt.Start,closeOnTriggerClick:!1,constrainWidth:!1,children:me});return(0,p.jsxs)(`div`,{className:(0,u.default)(Qd.timeInput,D?.root,T),style:{...O?.root,...E},...k,children:[(o||a)&&me,ge,(0,p.jsx)(ya,{variant:`error`,message:i?i.getCurrentErrorMessage()??``:S||``,isVisible:Y&&(L||z)})]})}var ef={timeline:`timeline_VtQdt`,"timeline-item":`timeline-item_s8-U2`,timelineItem:`timeline-item_s8-U2`,"timeline-item-connector":`timeline-item-connector_06FQ0`,timelineItemConnector:`timeline-item-connector_06FQ0`,"timeline-item-clickable":`timeline-item-clickable_0w8zK`,timelineItemClickable:`timeline-item-clickable_0w8zK`,"timeline-item-disabled":`timeline-item-disabled_EkWVA`,timelineItemDisabled:`timeline-item-disabled_EkWVA`,"timeline-marker":`timeline-marker_u6jDA`,timelineMarker:`timeline-marker_u6jDA`,"timeline-dot":`timeline-dot_l-s7C`,timelineDot:`timeline-dot_l-s7C`,"timeline-dot-with-icon":`timeline-dot-with-icon_6JK7D`,timelineDotWithIcon:`timeline-dot-with-icon_6JK7D`,"timeline-dot-toned":`timeline-dot-toned_h1Cso`,timelineDotToned:`timeline-dot-toned_h1Cso`,"timeline-with-icons":`timeline-with-icons_ylDAw`,timelineWithIcons:`timeline-with-icons_ylDAw`,"timeline-connector":`timeline-connector_VuXnH`,timelineConnector:`timeline-connector_VuXnH`,"timeline-content":`timeline-content_K4Ztg`,timelineContent:`timeline-content_K4Ztg`,"timeline-header":`timeline-header_xr4Tw`,timelineHeader:`timeline-header_xr4Tw`,"timeline-title":`timeline-title_MZ26k`,timelineTitle:`timeline-title_MZ26k`,"timeline-timestamp":`timeline-timestamp_-0w-N`,timelineTimestamp:`timeline-timestamp_-0w-N`,"timeline-description":`timeline-description_WcWIu`,timelineDescription:`timeline-description_WcWIu`,"timeline-right":`timeline-right_fZEKn`,timelineRight:`timeline-right_fZEKn`,"timeline-alternate":`timeline-alternate_Kv9LY`,timelineAlternate:`timeline-alternate_Kv9LY`,"timeline-item-right":`timeline-item-right_s5ELB`,timelineItemRight:`timeline-item-right_s5ELB`},tf=function(e){return e.Left=`left`,e.Right=`right`,e.Alternate=`alternate`,e}({});function nf({items:e=[],alignment:t=tf.Left,className:n,style:r,classNames:i,styles:a,...o}){let s=e.some(e=>!!e.icon);return R(`Timeline`,e.map(e=>e.color)),(0,p.jsx)(`div`,{...o,className:(0,u.default)(ef.timeline,{[ef.timelineRight]:t===tf.Right,[ef.timelineAlternate]:t===tf.Alternate,[ef.timelineWithIcons]:s},i?.root,n),style:{...a?.root,...r},children:e.map((n,r)=>{let o=n.id??r,s=r===e.length-1,c=t===tf.Alternate&&r%2==1,l=!!n.onClick&&!n.disabled,d=n.color?F(n.color):void 0,f=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{className:(0,u.default)(ef.timelineMarker,i?.marker),style:a?.marker,children:[(0,p.jsx)(`div`,{className:(0,u.default)(ef.timelineDot,{[ef.timelineDotWithIcon]:!!n.icon},d&&[d.className,ef.timelineDotToned],i?.dot),style:{...d?.style,...a?.dot},children:n.icon?X(n.icon):null}),!s&&(0,p.jsx)(`div`,{className:(0,u.default)(ef.timelineConnector,i?.connector),style:a?.connector})]}),(0,p.jsxs)(`div`,{className:(0,u.default)(ef.timelineContent,i?.content),style:a?.content,children:[(0,p.jsxs)(`div`,{className:ef.timelineHeader,children:[(0,p.jsx)(`div`,{className:(0,u.default)(ef.timelineTitle,i?.title),style:a?.title,children:n.title}),n.timestamp!=null&&(0,p.jsx)(`div`,{className:(0,u.default)(ef.timelineTimestamp,i?.timestamp),style:a?.timestamp,children:n.timestamp})]}),n.description!=null&&(0,p.jsx)(`div`,{className:(0,u.default)(ef.timelineDescription,i?.description),style:a?.description,children:n.description}),n.content]})]}),m=(0,u.default)(ef.timelineItem,{[ef.timelineItemRight]:c},{[ef.timelineItemClickable]:l},{[ef.timelineItemDisabled]:n.disabled},i?.item);return l?(0,p.jsx)(Ot,{className:m,style:a?.item,onClick:n.onClick,children:f},o):(0,p.jsx)(`div`,{className:m,style:a?.item,"aria-disabled":n.disabled||void 0,children:f},o)})})}var rf={timer:`timer_cqe3R`,"timer-ringWrapper":`timer-ringWrapper_OydlE`,timerRingWrapper:`timer-ringWrapper_OydlE`,"timer-ringSvg":`timer-ringSvg_qsV1X`,timerRingSvg:`timer-ringSvg_qsV1X`,"timer-ripples":`timer-ripples_2Slkv`,timerRipples:`timer-ripples_2Slkv`,"timer-ripple":`timer-ripple_TLdSx`,timerRipple:`timer-ripple_TLdSx`,timerRippleHalo:`timerRippleHalo_oEcXJ`,"timer-ringTrack":`timer-ringTrack_pGGs1`,timerRingTrack:`timer-ringTrack_pGGs1`,"timer-ringProgress":`timer-ringProgress_LL8uQ`,timerRingProgress:`timer-ringProgress_LL8uQ`,"timer-ringProgress-urgent":`timer-ringProgress-urgent_MwwU2`,timerRingProgressUrgent:`timer-ringProgress-urgent_MwwU2`,"timer-display":`timer-display_es2IX`,timerDisplay:`timer-display_es2IX`,"timer-time":`timer-time_oMZ5O`,timerTime:`timer-time_oMZ5O`,"timer-label":`timer-label_GknS-`,timerLabel:`timer-label_GknS-`,"timer-controls":`timer-controls_LHM4q`,timerControls:`timer-controls_LHM4q`,"timer-controlsRow":`timer-controlsRow_42JyZ`,timerControlsRow:`timer-controlsRow_42JyZ`,"timer-cancelButton":`timer-cancelButton_ObL4-`,timerCancelButton:`timer-cancelButton_ObL4-`,"timer-pulsing":`timer-pulsing_795m4`,timerPulsing:`timer-pulsing_795m4`,timerHeartbeat:`timerHeartbeat_N40Zt`,"timer-critical":`timer-critical_q-JzB`,timerCritical:`timer-critical_q-JzB`},af=200,of=1e3,sf={cancel:`Cancel timer`};function cf(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}function lf(e){let t=Math.ceil(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=String(r).padStart(2,`0`),o=String(i).padStart(2,`0`);return n>0?`${n}:${a}:${o}`:`${a}:${o}`}function uf(e){let{ref:t,durationSeconds:n,autoStart:r=!0,resetOnDurationChange:i=!0,onTick:a,onComplete:o,onStart:s,onPause:c,onResume:d,onCancel:m,onAddTime:h,onRemoveTime:g,showControls:_=!0,hideAddButton:v=!1,hideRemoveButton:y=!1,hidePauseButton:b=!1,hideCancelButton:x=!1,adjustSeconds:S=30,maxSeconds:C,label:w,formatTime:T=lf,size:O,strokeWidth:k=10,counterClockwise:A=!1,urgentThreshold:j=.1,urgentMinSeconds:M=3,pulseOnUrgent:N=!0,showRunningRipples:P=!1,playSoundOnComplete:F=!1,soundUrl:I,soundVolume:L=.5,notifyOnComplete:R=!1,notificationTitle:z,notificationBody:B,className:V,style:H,classNames:U,styles:W,labels:G,...ee}=E(`Timer`,e),K=D(`Timer`,G,sf),te=n*1e3,[ne,re]=(0,l.useState)(r?`running`:`idle`),[q,ie]=(0,l.useState)(te),[ae,J]=(0,l.useState)(0),[se,ce]=(0,l.useState)([]),le=(0,l.useRef)(q),Y=(0,l.useRef)(ne),ue=(0,l.useRef)(te),de=(0,l.useRef)(!1),X=(0,l.useRef)(!1),fe=(0,l.useRef)(!1),pe=(0,l.useRef)(0);function me(e){le.current=e,ie(e)}function ge(e){Y.current=e,re(e)}function _e(){J(e=>e+1)}(0,l.useEffect)(()=>{if(ne!==`running`)return;let e=Date.now(),t=le.current,n=setInterval(()=>{let n=Math.max(0,t-(Date.now()-e));me(n),a?.(n),n<=0&&ge(`completed`)},af);return()=>clearInterval(n)},[ne,ae]),(0,l.useEffect)(()=>{if(ne===`completed`&&!de.current){if(de.current=!0,o?.(),F)try{let e=new Audio(I||`data:audio/wav;base64,UklGRkYeAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YSIeAAAAAAkAIAA4AEQANwAPANH/jv9b/07/cf/F/zkAsAAJAScB+QCCANv/K/+h/mX+j/4d//P/3QChAQkC8QFZAV0AOP80/pb9i/0g/jj/kgDaAbsC9gJzAkwBwv82/gz9k/zz/Bz+y/+ZARMD1QOoA44CxQC6/u782PvD+778kv7SAO8CYQTGBPwDLALE/1j9hfvD+kz7Bf2J/zwCcgSbBWUF1QNGAVX+vPsk+vj5TPvU/fYA7QP6BZYGkAUjA+D/k/wP+vj4nPna+y3/xQK+BVkHKActBeABC/6h+nz4LPjN+QD9AAHTBIQHYggvBy4EFgDn+6v4NPfm9576uP4zA/YGDAnsCJUGkgLc/Zz54vZh9kL4FfzvAKAF/AgqCtYITQVmAFX7W/d49Sv2Ufkq/ocDFgizCrIKCQhaA8f9sPhY9Zr0rfYW+8QAUwZiCuoLgwp9BtAA3voh9sjzb/T194T9wAMgCUwMdQyJCTgEzv3d9+Dz2fIR9QT6fwDsBrMLoQ00DL4HUgGC+v30JPKy8o32yPzeAxAK1A01DhILKwXu/ST3evIf8W/z4PghAGsH7wxMD+YNDQnrAUH68fOP8PjwGfX2++ED6ApKD+4PowwxBin+hfYq8W/vyfGs96r/zgcTDusQmQ9pCpwCGvr+8gvvQu+d8xD7ygOkC60QoBE5DkcHff4C9u/vy+0i8Gr2HP8WCCAPeRJIEc8LYgMP+iXyme2S7RnyF/qYA0YM+hFHE9IPbgjp/pn1zO407HzuHPV3/kIIEhD3E/MSPg07BB/6ZvE87OvrkPAN+U4DzQwxE+EUbBGjCW3/TfXC7a7q2ezD87z9UwjrEGEVlhS0DigFSfrD8PTqT+oF7/P36gI4DVAUbhYEE+QKCAAc9dLsOek862Hy7vxKCKkRuBYxFi8QJgaM+jzww+nA6Hnty/ZvAocNVhXqF5kULwy5AAf1/OvY56Xp+vAM/CYISxL4F8AXrBE0B+j60O+r6EDn7+uY9d0Bug1BFlQZKRaDDX0BDPVB64vmGOiN7xr76AfREiAZQxkpE08IXPuB76zn0OVo6lr0NQHSDRIXqhqxF90OVAIs9aPqVeWX5h/uGPqSBzsTMBq2GqUUdgnn+07vx+Zy5OfoFPN6AM4NxxfrGzAZOxA8A2b1Ieo35CPlsOwI+SMHiBMmGxgcHRanCof8Nu/+5SnjbufH8av/sA1gGBUdohqbETQEufW76TLjvuND6+z3nga5EwEcaB2OF+ELPP0671Hl9eH/5XfwzP53DdwYJx4HHPsSOgUk9nLpR+Jr4tvpx/YDBs4TwRyjHvcYIA0D/lnvwOTY4J3kJe/d/SYNOxkgH1wdWRRLBqb2Rul34SvheeiZ9VMFxxNkHcgfVhpjDtz+ku9N5NTfSOPT7eD8vAx9Gf4fnx6yFWYHPvc26cPg/98f52b0kQSlE+od1SCpG6gPxP/l7/bj6t4D4oPs1/s7DKMZwSDPHwUXiQjr90HpLODq3tDlL/O9A2kTVB7KIe0c7RC6AFDwveMa3tHgOOvF+qMLrBlnIeogTxiyCar4aemy3+3djeT18doCExOfHqUiIh4vErsB0/Cg42bdsd/06ar5+AqZGfEh7iGPGd8Ke/mr6VXfCN1Z473w6QGkEs4eZCNEH20TxwJr8aHjz9yn3rjoivg5CmoZXSLbIsIaDgxb+gbqFt8+3DXih+/sAB4S3x4IJFIgpBTbAxnyvuNV3LTdh+dm92kJIBmrIq4j5xs8DUr7e+r03o/bJOFV7uX/ghHTHpAkSyHSFfQE2fL24/jb2Nxj5kD2iQi8GNwiZyT7HGgORPwH6/De/Nom4Crt1v7QEKoe+SQuIvUWEgar80rkudsW3E3lG/WbB0AY7yIFJfwdjw9I/anrCd+G2j3fCOzC/QwQZh5GJfgiDBgxB430uOSY22/bSOT486EGqxfkIoYl6h6vEFX+Yew/3y3abN7x6qn8Ng8HHnQlqCMTGU8IffU+5ZXb49pW49nynQUBF7wi6yXCH8YRZ/8s7ZHf8tmz3efpjvtQDo0dhCU+JAsabAl59t3lsNtz2nfiwvGQBEEWeCIyJoQg0xJ+AAju/t/W2RPd7Oh0+lwN+hx2Jbkk8BqDCn/3kubo2yHaruGz8H4DbhUXIlsmLSHSE5YB9e6G4NfZjtwB6Fz5WwxPHEslFyXAG5QLjvhc5z3c7Nn84K/vaAKJFJshZia8IcMUrgLv7ybh9tkl3CjnSfhRC44bAiVYJXwcnAyi+TrortzU2WLguO5QAZMTBCFTJjEipBXDA/bw3+E02tjbY+Y99z4KtxqcJHslIB2ZDbv6Kuk63dvZ4t/Q7TgAkBJUICEmiiJyFtQECPKu4o7aqNu05Tn2JQnNGRokgSWsHYoO1fsp6uHdANp83/jsIv+AEY0f0iXHIiwX3gUh85LjBtuV2xzlQPUHCNEYfCNpJR8ebA/v/DfroN5D2jHfMuwR/mYQrh5mJeci0RfgBkH0iuSZ26DbnORU9OgGxRfFIjIldx49EAf+Uux436TaA9+B6wf9RA+7Hd0k6iJfGNcHZfWU5Ujcyds15HbzyQWrFvQh3iS0Hv0QG/927WfgItvy3uTqBfwcDrQcOCTPItUYwQiL9q7mEd0Q3OnjqfKtBIUVCyFsJNUeqREoAKPuauG92/7eXuoO++8Mmxt3I5YiMhmdCbD31efz3XXcuOPt8ZUDVBQMIN0j2R4/EiwB1u+B4nPcJ9/w6SP6wAtzGp0iPyJ0GWkK1PgK6e3e+Nyi40bxgwIbE/geMiPAHr8SJgIN8anjRd1v35vpRvmSCjwZqiHLIZwZIwvz+Ujq/d+X3arjs/B6AdwR0R1qIooeJxMUA0by4uQw3tPfYel6+GYJ+RefIDohpxnJCwv7j+si4VLezuM28HsAmBCYHIghNh52E/MDf/Mo5jTfVeBB6cD3PgisFn4fjCCXGVoMG/zb7FniKd8P5NLviP9TD1AbjSDFHawTwgS29HrnT+D04DzpGPcdB1cVSR7BH2oZ1Qwh/Szuo+Mb4G3khu+k/g4O+Rl5HzcdxhN/Bej11+iB4bDhVOmG9gQG/BMAHdweHxk5DRr+fu/75Cbh6eRT79D9zAyXGE0ejBzGEyoGFPc76sbih+KI6Qr29gSeEqcb3R24GIQNBf/Q8GLmSeKB5TzvDv2OCysXDR3EG6kTvwY3+KXrHuR549nppfX0Az0RPhrEHDUYtg3h/x/y1OeC4zbmP+9e/FcKuBW4G+IacRM/B0/5Eu2H5YXkRupZ9QAD3Q/IGJMblBfNDaoAavNP6dHkB+de78T7KAk/FFEa5RkcE6cHXPqB7v/mquXQ6ib1HAKADkcXTBrYFskNYQGu9NLqNObz55nvP/sECMIS2RjOGKoS9wda++/vhOjn5nbrDfVKASgNvRXwGAAWqg0DAur1Wuyp5/no8O/R+uwGRRFTF58XHRIuCEj8W/EU6jnoOOwO9YoA1gsrFIEXDRVvDY8CG/fl7S7pGOpj8Hv64gXID8AVWRZzEUsIJf3B8q3roOkV7Sv14P+NCpUSARYAFBkNBAM/+HHvwepP6/LwP/rpBE4OIxT9FK4QTQju/SH0TO0a6w3uZPVL/08J+xBwFNsSpwxhA1X5/PBg7J3snPEc+gEE2gx9Eo0Tzw80CKP+d/Xw7qXsHe+39c3+HghhD9ISnhEZDKUDW/qD8gnuAO5i8hT6LANtC9EQCxLVDgEIQv/C9pfwP+5H8Cf2Z/77BskNKBFLEG8LzwNP+wX0u+9370LzJvpsAgkKIQ94EMINsgfK/wH4PfLm74fxsfYZ/ukFNAx0D+MOqwrgAzD8gPVy8f/wO/RT+sEBsAhuDdYOlwxHBzsAMfni85nx3vJX9+b96ASmCrkNZw3NCdUD/Pzx9i3zmPJO9Zz6LgFlB7wLJw1WC8IGkgBQ+oP1VfNI9Bf4zP37Ax4J+AvaC9YIsAOy/Vb46vRA9Hj2//qyACgGDAptC/8JIgbRAF37HvcZ9cb18fjN/SIDoQc0Cj4KxgdwA1L+rvmn9vT1uPd9+08A/ARgCKsJlAhnBfUAV/yw+OH2VPfk+ej9XwIwBm4IkwifBhUD2f73+mD4svcO+Rb8BgDjA7sG4gcWB5ME/gA8/Tj6rfjy+O/6H/60Ac0EqgbdBmMFoAJI/y/8Ffp4+Xb6yfzX/90CHwUUBogFpwPtAAv+tPt4+p36Efxw/iABeQPoBB0FEQQQAp3/VP3D+0X78fuV/cH/7AGNA0QE7AOjAsIAwv4i/UP8VPxI/dv+pgA2Ai0DVQOtAmYB2P9l/mf9Fv18/Xn+x/8RAQgCdAJCAogBfABi/4D+Cv4U/pP+Yf9FAAYBeAGHATcBpAD5/2H/Af/o/hX/dP/n/04AkQClAI4AWQAbAOj/zf/L/9v/8v8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANACUAKwAKAMr/kv+R/9n/TwCxALwAVwCs/xb/8/5p/0YAFgFfAeYA3f/N/lP+wP7s/zwB9QGiAV4Azv7O/ff9Rf8RAWACcQImASb/g/0s/WH+jACEAjADIALY/4v9gfxZ/bD/TAK/AzAD2gD2/Rb8S/yN/q4B/wMyBBkCyP4H/F77Ov2qANgDAgV3A/r/aPyz+tr7Tf87A34F0AR7AUH9bfqS+rD9JQKJBfsFLAOQ/qP6jPn1+6EADgXSBucERQBk++74RvrE/gYEMQeABkECs/zW+M74svx1AvwGygdeBIH+Wvm795b6bwAmBpwIbQa2AIP6NPeg+BX+rATSCD0IKgNK/FX3A/eU+50CVQibCawFmv4w+O71HvkWABwHXAoHCE0Bx/mJ9ez2Q/0sBWAKAgo0BAr87PU19Vj6nQKRCWkLFAfa/ib3KfSR95f/7gcQDLEJCQIv+fDzLfVO/IUF1wvNC1wF8fuf9GbzAPl2Aq8KMg2TCEH/PvZv8vL18v6cCLMNaAvoAr/4bPJn8zn7tgUzDZoNogYA/HDznPGR9ycCqwvxDiUKzv979cTwRfQq/iQJQg8oDegDdvgB8ZzxBvq/BXQOZg8BCDf8YfLY7wz2sQGDDKQQyAuBANz0Ku+M8j79hAm6EO4OCAVU+LDv0u+4+KEFlQ8rEXgJlfx08SDudfQWATgNRxJ5DVYBZfSm7cvwM/y+CRkStxBEBlv4fu4L7lH3WgWWEOgSAgsZ/avwduzO8lYAxg3WEzIPTQIU9DnsBu8J+88JXBN9EpsHifhr7Uvs1PXuBHMRmRSdDML9B/Dd6hzxdP8tDk8V8hBkA+zz5+pB7cT5uAmAFD8UCQnf+HrslepF9FsELBI6FkYOjv6J71npYu9y/mwOrha1EpcE6/Oz6X/rZfh6CYQV+RWLClv5revu6KbypAO/EsgX+Q99/zPv7eek7VH9hA7yF3cU5QUS9J7ow+nx9hUJZBamFx8M/PkF61fn/PDKAisTQBmzEYsABe+b5uTrE/x0DhcZNBZLB2H0q+cR6Gn1iQggF0QZwA3A+oTq1eVI79ABbxOeGm8TtgH/7mblJ+q9+jwOGxroF8YI1vTc5m3m0vPaB7YXzxpsD6f7Kupq5JDttwCME+EbKxX9AiDvUeRw6FD53Q39GpEZUgpw9TLm2uQv8gcHJRhEHB8Rrvz36Rrj1+uB/4ETBh3iFlsEae9e48Pm0PdYDbsbLBvsCy72ruVb44LwFAZtGKEd1RLS/e3p5+Ef6jL+TRMKHpIYzgXZ747iJOVA9q4MUhyzHJEND/dR5fPh0O4BBY0Y4h6LFBL/CurT4G7ozPzzEuweNxpTB27w4+GV46P04QvDHCUePQ8P+BzlpeAd7dIDhRgFID0WagBP6uDfxuZS+3MSqR/MG+cIJ/Fe4Rni/fLzCg0dfx/uEC75EOV032vriQJVGAgh5xfXAbvqEd8r5cj5zRFBIFAdhgoD8gHhteBR8eYJLh29IJ4SaPor5WLev+koAf4X6SGHGVYDTetm3qDjMfgFEbMgvh4tDP/yy+Bq36PvuwgoHd4hSxS6+23lcd0c6LT/gBelIhgb5QQC7OLdKeKR9hoQ/CAUINgNGfS94Dze9+13B/oc3yLwFSP91+Wj3IXmL/7dFjwjlxx/BtvshN3I4Or0EA8eIVAhgw9P9dfgLN1P7BsGpBy9I4sXnv5m5vrb/+Sd/BcWrCMCHiEI1O1P3YHfQPPpDRghbSIrEZ72GeE+3LHqqwQoHHgkGBkoABrnd9uL4wD7LxX1I1Ufxwnr7kHdVd6Y8agM6iBrI80SA/iC4XLbHukpA4YbDSWUGr4B8ecb2y7iXfknFBYkjSBvCx/wXN1J3fTvTwuUIEckZBR7+RHiy9qb55oBwRp8JfsbXQPp6Ofa6uC39wITDySoIRQNbPGe3V3cWe7hCRggACXuFQP7xOJK2ivmAADaGcMlSx0BBf/p2trB3xL2whHgI6Misg7P8gfelNvK7GEIdx+TJWcXl/yb4/DZ0ORf/tMY4iWAHqYGMuv22rfecfRqEIojfCNHEEb0l97v2knr0waxHv8lyxg0/pLkvdmP47v8rhfaJZgfSQh+7Drbzt3Y8v0ODSMyJM4RzfVL33Da2+k7BckdRSYZGtb/qeWz2WniGPttFqklkSDlCeHtpdsH3Urxfg1qIsMkRRNg9yPgGNqD6JsDwRxiJkwbegHc5tDZYeF4+RUVUSVpIXkLWO823GTcy+/wC6MhLiWoFP34HOHn2UPn9wGbG1gmYhwcAyroFtp54N/3pxPSJB0i/wzg8Ozc59te7lcKuSBxJfQVn/o04t/ZHuZUAFoaJSZaHbkEjumD2rTfUvYnEi0krCJ2DnTyxd2R2wbttgivH40lJhdE/Gnj/9kX5bP+/xjLJTAeTAYH6xbbE9/T9JgQZCMVI9gPEvTA3mLbx+sSB4cegCU8GOf9uORG2jHkGv2PF0kl4x7UB5DsztuX3mbz/Q54IlcjJRG29dvfXNui6mwFQx1MJTMZhf8f5rXabOOM+w0WoiRxH0sJJ+6q3ELeDfJaDWwhcSNXEl33E+F925vpygPmG+8kCRobAZvnStvL4gv6exTXI9kfrwrI76jdFN7N8LILQSBjI24TA/ll4sbbtOguAnMabCS8GqQCJ+kF3FDinPjdEugiGyD9C2/xxd4P3qfvCgr6Hi0jZhSk+s/jN9zv550A7RjDI0sbHgTB6uTc++FB9zYR2SE0IDINGfMA4DHenu5kCJkdzyI9FT38TuXO3E3nGf9YF/UitBuFBWbs5N3N4f71iw+rICYgSw7D9Fbhe9617cUGIxxLIvIVyv3e5ovd0eam/bUVBCL1G9YGEu4E38jh1fTeDWEf7x9FD2j2xOLt3u3sLwWZGqAhghZI/33obN575kj8ChTyIBAcDwjB70Pg6uHJ8zQM/R2RHx8QBvhH5IbfSeynA/4Y0CDtFrMAJupv30zmAPtaEsEfAhwrCW/xnOE04tzyjwqCHAsf1xCY+dzlRODL6y8CVxfdHzAXCQLX65LgRebT+agQdB7MGyoKGvMO46biEfL0CPMaYB5rERv7f+cm4XLrywCnFckeTBdHA4zt0+Fm5sL4+A4MHW4bCQu+9JXkP+Np8WYHVRmPHdgRjfwu6SriQOt+//ETlR1BF2kEQO8v46/m0PdNDY0b6RrFC1b2Lub94+bw5wWpF5scIBLp/eTqT+M260r+ORJFHA0XbgXx8KTkH+cA96sL+xk+Gl0M4PfW59/kifB9BPMVhhs/Ei3/nuyS5FXrM/2DENsasRZSBpvyL+a351L2FgpYGG4Z0AxY+Yrp5OVT8CkDNxRRGjcSVgBZ7vHlm+s7/NEOWRkuFhUHO/TM53ToyvWRCKcWehgdDbz6ResK50Xw7gF5Ev8YBxJiARHwaecI7GT7KQ3DF4UVswfM9XnpVeln9R8H7BRlF0INCPwG7U7oXvDPALwQkxevEU4CwvH26J3sr/qMCxwWtxQtCEz3MetZ6iv1wwUrEzAWPw05/cfurumg8M//BA8PFjARGANp85fqV+0f+v8JZxTFE4AIuPjy7H7rFvWABGcR3RQUDUz+hfAn6wnx8P5UDXYUihC+AwL1R+w27rX5hQioErESrAgM+rjuwuwq9VkDpA9wE8IMQf898rfsmfEz/rALzBLAD0AEivYD7jjvcvkgB+IQfRGwCEb7f/Ai7mX1UALlDesRSAwUAOzzWe5P8pv9GwoUEdEOmwT+98jvW/BW+dQFGA8sEIwIYvxD8pvvyfVoAS4MUhCnC8MAjPUM8CrzKP2YCFEPwA3PBFv5k/Gc8WL5pARPDcAOQAhg/QL0K/FT9qIAggqmDuEKTQEd98vxKPTc/CsHhw2PDNsEnvpf8/rylvmSA4oLPA3NBzz+t/XO8gP3AADlCOwM+AmxAZn4k/NH9bf81gW6C0ELvwTE+yj1cvTx+aACzQmiCzMH9f5f94H02PeE/1sHJwvsCO4B//lh9YX2u/ydBOwJ1wl8BMv87fYA9nT60QEbCPYJdAaJ//f4QvbQ+C7/5QVaCb8HBAJK+zH33/fm/IIDIghVCBEEsf2o+KP3HPslAXcGPAiRBff/e/oM+On5AP+IBIoHdQbyAXr8//hU+Tj9hgJgBr0GfwN0/lb6Vvnq+58A5QR2BosEPgDp+9z5Ivv5/kYDuQUQBbcBiv3H+t/6sv2tAagEEwXIAhL/9fsW+9v8PwBoA6kEZQNeAD39rvt3/Bv/IQLsA5EDVgF6/of8f/xS/vcA/gJaA+0Biv+A/eD87f0HAAMC1wIhAlUAdf5+/ef9ZP8cASUC/QHNAEb/O/4w/hf/ZwBlAZUB7wDb//X+sP4f//b/uAAEAcEAJQCO/0r/bv/U/zkAaQBXAB8A7v/f/+7/`);e.volume=L,e.play()?.catch(()=>{})}catch{}if(R&&typeof Notification<`u`&&Notification.permission===`granted`)try{new Notification(z??`Timer done`,{body:B??(typeof w==`string`?w:void 0)})}catch{}}ne!==`completed`&&(de.current=!1)},[ne]),(0,l.useEffect)(()=>{if(!fe.current){fe.current=!0;return}let e=n*1e3;ue.current=e,me(e),de.current=!1,_e(),i&&ge(r?`running`:`idle`)},[n]),(0,l.useEffect)(()=>{if(!P||ne!==`running`||cf())return;function e(){let e=++pe.current;ce(t=>[...t,e])}let t=setTimeout(e,0),n=setInterval(e,of);return()=>{clearTimeout(t),clearInterval(n)}},[P,ne]);function ve(e){ce(t=>t.filter(t=>t!==e))}function be(){R&&!X.current&&typeof Notification<`u`&&Notification.permission==="default"&&(X.current=!0,Notification.requestPermission().catch(()=>{}))}function xe(){be(),(Y.current===`completed`||Y.current===`cancelled`)&&(me(ue.current),de.current=!1),_e(),ge(`running`),s?.()}function Z(){Y.current===`running`&&(ge(`paused`),c?.())}function Se(){Y.current===`paused`&&(_e(),ge(`running`),d?.())}function Ce(e){let t=C==null?1/0:C*1e3,n=Math.min(le.current+e*1e3,t);me(n),_e(),h?.(e,Math.round(n/1e3)),Y.current===`completed`&&n>0&&(de.current=!1,ge(`running`))}function we(e){let t=Math.max(0,le.current-e*1e3);me(t),_e(),g?.(e,Math.round(t/1e3)),t<=0&&Y.current===`running`&&ge(`completed`)}function Te(){me(ue.current),ge(`cancelled`),m?.()}function Ee(){me(ue.current),de.current=!1,ge(`idle`)}(0,l.useImperativeHandle)(t,()=>({start:xe,pause:Z,resume:Se,addTime:Ce,removeTime:we,cancel:Te,reset:Ee,getStatus:()=>Y.current,getRemainingMs:()=>le.current}));let De=50-k/2,Oe=(0,l.useMemo)(()=>2*Math.PI*De,[De]),ke=Oe*(1-(ue.current>0?Math.min(1,q/ue.current):0)),Ae=Math.max(ue.current*j,M*1e3),je=ne===`running`&&q<=Ae,Me=je&&q<=Math.min(5e3,Ae),Ne=ne===`paused`,Pe=_&&!v,Fe=_&&!y,Ie=_&&!b,Le=ne===`running`?f.faPause:f.faPlay,Re=ne===`running`?`Pause`:Ne?`Resume`:ne===`idle`?`Start`:`Restart`,ze=ne===`running`?Z:Ne?Se:xe,Be=_&&!x;return(0,p.jsxs)(`div`,{...ee,className:(0,u.default)(rf.timer,N&&je&&rf.timerPulsing,Me&&rf.timerCritical,V,U?.root),style:{...O?{"--timer-size":O}:null,"--timer-stroke-width":`${k}px`,...H,...W?.root},children:[(0,p.jsxs)(`div`,{className:(0,u.default)(rf.timerRingWrapper,U?.ringWrapper),style:W?.ringWrapper,children:[se.length>0&&(0,p.jsx)(`div`,{className:(0,u.default)(rf.timerRipples,U?.ripples),style:W?.ripples,children:se.map(e=>(0,p.jsx)(`span`,{className:(0,u.default)(rf.timerRipple,U?.ripple),style:W?.ripple,onAnimationEnd:()=>ve(e)},e))}),(0,p.jsxs)(`svg`,{className:(0,u.default)(rf.timerRingSvg,U?.ringSvg),viewBox:`0 0 100 100`,style:W?.ringSvg,children:[(0,p.jsx)(`circle`,{className:(0,u.default)(rf.timerRingTrack,U?.ringTrack),cx:`50`,cy:`50`,r:De,style:W?.ringTrack}),(0,p.jsx)(`circle`,{className:(0,u.default)(rf.timerRingProgress,je&&rf.timerRingProgressUrgent,U?.ringProgress),cx:`50`,cy:`50`,r:De,strokeDasharray:Oe,strokeDashoffset:ke,style:{transition:Ne?`none`:void 0,transform:A?`rotate(-90deg)`:void 0,...W?.ringProgress}})]}),(0,p.jsxs)(`div`,{className:(0,u.default)(rf.timerDisplay,U?.display),style:W?.display,children:[(0,p.jsx)(`span`,{className:(0,u.default)(rf.timerTime,U?.time),style:W?.time,children:T(q)}),w&&(0,p.jsx)(`span`,{className:(0,u.default)(rf.timerLabel,U?.label),style:W?.label,children:w})]})]}),_&&(0,p.jsxs)(`div`,{className:(0,u.default)(rf.timerControls,U?.controls),style:W?.controls,children:[(0,p.jsxs)(`div`,{className:rf.timerControlsRow,children:[Fe&&(0,p.jsx)(ye,{icon:f.faMinus,title:`Remove ${S}s`,onClick:()=>we(S),className:U?.removeButton,style:W?.removeButton}),Ie&&(0,p.jsx)(he,{size:oe.Small,icon:Le,title:Re,onClick:ze,className:U?.pauseButton,style:W?.pauseButton}),Pe&&(0,p.jsx)(ye,{icon:f.faPlus,title:`Add ${S}s`,onClick:()=>Ce(S),className:U?.addButton,style:W?.addButton})]}),Be&&(0,p.jsx)(ye,{icon:f.faXmark,title:K.cancel,onClick:Te,className:(0,u.default)(rf.timerCancelButton,U?.cancelButton),style:W?.cancelButton})]})]})}var df={virtualList:`virtualList_qBPNc`,"virtualList-drag-clone":`virtualList-drag-clone_artnC`,virtualListDragClone:`virtualList-drag-clone_artnC`,"virtualList-header":`virtualList-header_0Ellb`,virtualListHeader:`virtualList-header_0Ellb`,"virtualList-header-cell":`virtualList-header-cell_c8NGV`,virtualListHeaderCell:`virtualList-header-cell_c8NGV`,"virtualList-header-resize":`virtualList-header-resize_cbYFc`,virtualListHeaderResize:`virtualList-header-resize_cbYFc`,"virtualList-header-sort":`virtualList-header-sort_Cdpe3`,virtualListHeaderSort:`virtualList-header-sort_Cdpe3`,"virtualList-header-sort-label":`virtualList-header-sort-label_6MaZ3`,virtualListHeaderSortLabel:`virtualList-header-sort-label_6MaZ3`,"virtualList-header-sort-icon":`virtualList-header-sort-icon_Z-Nrd`,virtualListHeaderSortIcon:`virtualList-header-sort-icon_Z-Nrd`,"virtualList-header-sort-icon-active":`virtualList-header-sort-icon-active_g7qrb`,virtualListHeaderSortIconActive:`virtualList-header-sort-icon-active_g7qrb`,"virtualList-header-toggle":`virtualList-header-toggle_pYFxD`,virtualListHeaderToggle:`virtualList-header-toggle_pYFxD`,"virtualList-toggle-panel":`virtualList-toggle-panel_Uksmk`,virtualListTogglePanel:`virtualList-toggle-panel_Uksmk`,"virtualList-toggle-wrapper":`virtualList-toggle-wrapper_JP32M`,virtualListToggleWrapper:`virtualList-toggle-wrapper_JP32M`,"virtualList-toggle-popover":`virtualList-toggle-popover_gbpd7`,virtualListTogglePopover:`virtualList-toggle-popover_gbpd7`,"virtualList-toggle-item":`virtualList-toggle-item_5gu5d`,virtualListToggleItem:`virtualList-toggle-item_5gu5d`,"virtualList-toggle-reset":`virtualList-toggle-reset_3UANJ`,virtualListToggleReset:`virtualList-toggle-reset_3UANJ`,"virtualList-column-chip":`virtualList-column-chip_nOqr6`,virtualListColumnChip:`virtualList-column-chip_nOqr6`,"virtualList-select-cell":`virtualList-select-cell_s9kAy`,virtualListSelectCell:`virtualList-select-cell_s9kAy`,"virtualList-body":`virtualList-body_k-fRr`,virtualListBody:`virtualList-body_k-fRr`,"virtualList-row-active":`virtualList-row-active_H5r5-`,virtualListRowActive:`virtualList-row-active_H5r5-`,"virtualList-resizing":`virtualList-resizing_28Mn4`,virtualListResizing:`virtualList-resizing_28Mn4`,"virtualList-row":`virtualList-row_TTY50`,virtualListRow:`virtualList-row_TTY50`,"virtualList-row-no-divider":`virtualList-row-no-divider_Ct0gV`,virtualListRowNoDivider:`virtualList-row-no-divider_Ct0gV`,"virtualList-row-no-hover":`virtualList-row-no-hover_2d3mH`,virtualListRowNoHover:`virtualList-row-no-hover_2d3mH`,"virtualList-row-selected":`virtualList-row-selected_hwEN-`,virtualListRowSelected:`virtualList-row-selected_hwEN-`,"virtualList-row-draggable":`virtualList-row-draggable_I86ha`,virtualListRowDraggable:`virtualList-row-draggable_I86ha`,"virtualList-row-dragging":`virtualList-row-dragging_6T5tQ`,virtualListRowDragging:`virtualList-row-dragging_6T5tQ`,"virtualList-row-drop-inside":`virtualList-row-drop-inside_Uhi9n`,virtualListRowDropInside:`virtualList-row-drop-inside_Uhi9n`,"virtualList-drop-line":`virtualList-drop-line_EM-g4`,virtualListDropLine:`virtualList-drop-line_EM-g4`,"virtualList-drop-line-before":`virtualList-drop-line-before_n-0iZ`,virtualListDropLineBefore:`virtualList-drop-line-before_n-0iZ`,"virtualList-drop-line-after":`virtualList-drop-line-after_2dld-`,virtualListDropLineAfter:`virtualList-drop-line-after_2dld-`,"virtualList-reordering":`virtualList-reordering_Rt9E3`,virtualListReordering:`virtualList-reordering_Rt9E3`,"virtualList-cell":`virtualList-cell_H0zBv`,virtualListCell:`virtualList-cell_H0zBv`,"virtualList-loading-full":`virtualList-loading-full_wzZNM`,virtualListLoadingFull:`virtualList-loading-full_wzZNM`,"virtualList-loading-indicator":`virtualList-loading-indicator_EJced`,virtualListLoadingIndicator:`virtualList-loading-indicator_EJced`,"virtualList-windowed":`virtualList-windowed_riUyT`,virtualListWindowed:`virtualList-windowed_riUyT`};function ff(e,t,n,r=0){let i=e.length,a=Array(i+1);a[0]=0;for(let o=0;o<i;o++){let s=o<i-1?r:0;a[o+1]=a[o]+(t.get(e[o])??n)+s}return{offsets:a,totalHeight:a[i]}}function pf(e,t,n){if(n<=0)return 0;let r=0,i=n-1;for(;r<i;){let n=r+i>>1;e[n+1]<=t?r=n+1:i=n}return r}function mf(e,t,n,r,i){if(i===0)return{startIndex:0,endIndex:-1};let a=pf(e,t,i),o=a;for(;o<i&&e[o]<t+n;)o++;return{startIndex:Math.max(0,a-r),endIndex:Math.min(i-1,o+r-1)}}function hf(e,t,n,r,i){if(e===-1||e===t)return null;let a=r+i/2;return(t>e?n>=a:n<=a)?t:null}function gf(e,t,n,r){if(n<=0)return`before`;let i=(e-t)/n;return r?i<1/3?`before`:i>2/3?`after`:`inside`:i<.5?`before`:`after`}function _f(e,t){let n=t[e],r=e+1;for(;r<t.length&&t[r]>n;)r++;return r-1}function vf(e,t){return e.length===0?`1fr`:e.map(e=>{switch(e.width.type){case`fixed`:return`${e.width.px}px`;case`flex`:return`${e.width.weight??1}fr`;case`fit`:{let n=t?.[e.key];return n==null?`fit-content(100%)`:`${n}px`}}}).join(` `)}var yf=`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`,bf=`data-vl-parked`,xf=`${yf}, [${bf}]`;function Sf(e){let t=e.scrollWidth>e.clientWidth,n=e.scrollWidth;if(!t&&!e.firstElementChild)return n;let r=getComputedStyle(e),i=parseFloat(r.paddingLeft)||0,a=parseFloat(r.paddingRight)||0;if(t&&(n+=a),e.firstElementChild&&!t&&e.scrollWidth<=i+a+1){let t=1/0,r=-1/0;if(e.querySelectorAll(`*`).forEach(e=>{let n=e.getBoundingClientRect();n.left<t&&(t=n.left),n.right>r&&(r=n.right)}),r>t){let e=Math.ceil(r-t)+i+a;e>n&&(n=e)}}return n}function Cf(e){return`[data-col-key="${e.replace(/["\\]/g,`\\$&`)}"]`}function wf(e){return`--vl-col-${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}`}function Tf(e){return e.width.type===`fixed`?e.width.px:e.width.type===`fit`?160:160*(e.width.weight??1)}function Ef(e){return e.length===0?`1fr`:e.map(e=>`var(${wf(e.key)}, 160px)`).join(` `)}var Df=`ahroweui:virtuallist:columns:`;function Of(e){if(!e||typeof window>`u`)return null;try{let t=window.localStorage.getItem(Df+e);if(!t)return null;let n=JSON.parse(t);if(n&&Array.isArray(n.visible)&&Array.isArray(n.known)){let e={};if(n.widths&&typeof n.widths==`object`)for(let[t,r]of Object.entries(n.widths))typeof r==`number`&&Number.isFinite(r)&&r>0&&(e[t]=r);return{visible:n.visible.filter(e=>typeof e==`string`),known:n.known.filter(e=>typeof e==`string`),widths:e}}}catch{}return null}function kf(e,t){return e.lockVisible?!0:t&&t.known.includes(e.key)?t.visible.includes(e.key):!e.defaultHidden}var Af;function jf(){return Af??=new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`}),Af}function Mf(e){return e==null||typeof e==`number`&&Number.isNaN(e)}function Nf(e,t){let n=e instanceof Date?e.getTime():typeof e==`boolean`?Number(e):e,r=t instanceof Date?t.getTime():typeof t==`boolean`?Number(t):t;return typeof n==`string`||typeof r==`string`?jf().compare(String(n),String(r)):n<r?-1:+(n>r)}function Pf(e){return e.sortValue!=null||e.compare!=null||e.sortable===!0}function Ff(e,t){return!e||e.key!==t?{key:t,direction:`asc`}:e.direction===`asc`?{key:t,direction:`desc`}:null}function If(e,t,n){if(!t||!n)return e;let r=n.find(e=>e.key===t.key);if(!r||r.compare==null&&r.sortValue==null)return e;let i=t.direction===`asc`?1:-1,{compare:a,sortValue:o}=r,s=e.map((e,t)=>({item:e,index:t}));return s.sort((e,t)=>{let n;if(a)n=i*a(e.item,t.item);else{let r=o(e.item),a=o(t.item),s=Mf(r),c=Mf(a);n=s||c?s===c?0:s?1:-1:i*Nf(r,a)}return n===0?e.index-t.index:n}),s.map(e=>e.item)}function Lf({index:e,id:t,top:n,padding:r,columnTemplate:i,isSelected:a,isActive:o,manageTabStops:s,isEntered:c,activeClassName:d,activeStyle:f,showDivider:m,hover:h,onClick:g,observer:_,ariaRowIndex:v,ariaPosInSet:y,ariaSetSize:b,rowRole:x,reorderable:S,mouseDragEnabled:C,draggable:w,isDragging:T,reserveToggleGutter:E,onMouseDown:D,onMouseOver:O,onMouseLeave:k,onDragStart:A,onDragOver:j,onDragEnd:M,onDrop:N,onTouchStart:P,dropPosition:F,dropIndentPx:I,dropIndicatorClassName:L,dropIndicatorStyle:R,rowClassName:z,rowStyle:B,children:V}){let H=(0,l.useRef)(null);return(0,l.useLayoutEffect)(()=>{let e=H.current;if(e&&_)return _.observe(e),()=>_.unobserve(e)},[_]),(0,l.useLayoutEffect)(()=>{let e=H.current;if(!e||!s||c)return;let t=[];return e.querySelectorAll(yf).forEach(e=>{t.push([e,e.getAttribute(`tabindex`)]),e.setAttribute(`tabindex`,`-1`),e.setAttribute(bf,``)}),()=>{for(let[e,n]of t)n===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,n),e.removeAttribute(bf)}}),(0,p.jsxs)(`div`,{ref:H,id:t,"data-index":e,className:(0,u.default)(df.virtualListRow,a&&df.virtualListRowSelected,o&&df.virtualListRowActive,o&&d,!m&&df.virtualListRowNoDivider,!h&&df.virtualListRowNoHover,S&&df.virtualListRowDraggable,T&&df.virtualListRowDragging,F===`inside`&&df.virtualListRowDropInside,z),style:{position:`absolute`,top:0,left:0,right:0,transform:`translateY(${n}px)`,...r==null?{}:{padding:r},...i?{display:`grid`,gridTemplateColumns:i}:{},...E?{paddingRight:32}:{},...B,...o?f:void 0},onClick:g,draggable:w,onMouseDown:D,onMouseOver:O,onMouseLeave:k,onDragStart:A,onDragOver:j,onDragEnd:M,onDrop:N??(C?e=>e.preventDefault():void 0),onTouchStart:P,onContextMenu:C?e=>e.preventDefault():void 0,"aria-selected":a,"aria-rowindex":v,"aria-posinset":y,"aria-setsize":b,role:x,children:[(F===`before`||F===`after`)&&(0,p.jsx)(`div`,{"data-drop-line":F,"aria-hidden":!0,className:(0,u.default)(df.virtualListDropLine,F===`before`?df.virtualListDropLineBefore:df.virtualListDropLineAfter,L),style:{left:I??0,...R}}),V]})}function Rf(e){let[t,n]=(0,l.useState)(0),r=(0,l.useRef)([]),i=Math.min(t,Math.max(0,e-1));i!==t&&n(i);function a(t){let i=Math.max(0,Math.min(t,e-1));n(i),r.current[i]?.focus()}function o(e){return{tabIndex:e===i?0:-1,ref:t=>{r.current[e]=t},onFocus:()=>n(e)}}function s(t,n){if(t.altKey||t.ctrlKey||t.metaKey)return!1;switch(t.key){case`ArrowRight`:a(n+1);break;case`ArrowLeft`:a(n-1);break;case`Home`:a(0);break;case`End`:a(e-1);break;default:return!1}return t.preventDefault(),t.stopPropagation(),!0}return{getStationProps:o,handleNavigationKey:s}}var zf=10;function Bf({headerRef:e,columns:t,cols:n,resize:r,sort:i,onSort:a,multiSelect:o,allSelected:s,someSelected:c,onSelectAll:l,labels:m,classNames:h,styles:g}){let _=+!!o,v=_+n.visibleColumns.length+ +!!n.shouldShowToggle,y=Rf(v);return(0,p.jsxs)(`div`,{ref:e,className:(0,u.default)(df.virtualListHeader,h?.header),style:{gridTemplateColumns:n.columnTemplate,...n.shouldShowToggle?{paddingRight:32}:{},...g?.header},role:`row`,"aria-rowindex":1,children:[o&&(0,p.jsx)(`div`,{...y.getStationProps(0),className:(0,u.default)(df.virtualListSelectCell,h?.selectCell),style:g?.selectCell,role:`columnheader`,onKeyDown:e=>{y.handleNavigationKey(e,0)||e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l())},children:(0,p.jsx)(la,{selected:s||c,onToggle:l,"aria-label":m.selectAllRows,tabIndex:-1})}),n.visibleColumns.map((e,t)=>{let n=Pf(e),o=i&&i.key===e.key?i.direction:null,s=r.getHandleProps(e),c=_+t;return(0,p.jsxs)(`div`,{...y.getStationProps(c),onKeyDown:t=>{if(!y.handleNavigationKey(t,c)){if(t.altKey&&r.isResizable(e)){let n=t.shiftKey?1:zf;if(t.key===`ArrowRight`)r.resizeBy(e.key,n);else if(t.key===`ArrowLeft`)r.resizeBy(e.key,-n);else if(t.key===`Home`)r.resizeToMin(e.key);else if(t.key===`End`)r.autoFit(e.key);else return;t.preventDefault();return}n&&t.target===t.currentTarget&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),a(e.key))}},className:(0,u.default)(df.virtualListHeaderCell,h?.headerCell),style:g?.headerCell,role:`columnheader`,"data-col-key":e.key,"aria-sort":n?o===`asc`?`ascending`:o===`desc`?`descending`:`none`:void 0,"data-fit-key":e.width.type===`fit`?e.key:void 0,children:[n?(0,p.jsxs)(`button`,{type:`button`,className:(0,u.default)(df.virtualListHeaderSort,h?.headerSort),style:g?.headerSort,onClick:()=>a(e.key),tabIndex:-1,children:[(0,p.jsx)(`span`,{className:df.virtualListHeaderSortLabel,children:e.label}),(0,p.jsx)(d.FontAwesomeIcon,{className:(0,u.default)(df.virtualListHeaderSortIcon,o&&df.virtualListHeaderSortIconActive,h?.sortIcon),style:g?.sortIcon,icon:o===`asc`?f.faSortUp:o===`desc`?f.faSortDown:f.faSort})]}):e.label,s&&(0,p.jsx)(`div`,{...s,className:(0,u.default)(df.virtualListHeaderResize,h?.resizeHandle),style:g?.resizeHandle})]},e.key)}),n.shouldShowToggle&&(0,p.jsx)(Vf,{station:v-1,nav:y,columns:t,cols:n,resize:r,labels:m,classNames:h,styles:g})]})}function Vf({station:e,nav:t,columns:n,cols:r,resize:i,labels:a,classNames:o,styles:s}){return(0,p.jsxs)(`div`,{className:df.virtualListToggleWrapper,children:[(0,p.jsx)(On,{isOpen:r.toggleOpen,onOpenChange:r.setToggleOpen,placement:Rt.Bottom,align:zt.End,constrainWidth:!1,classNames:{panel:df.virtualListTogglePanel},content:(0,p.jsxs)(`div`,{className:(0,u.default)(df.virtualListTogglePopover,o?.togglePopover),style:s?.togglePopover,children:[n.filter(e=>!e.hideFromToggle).map(e=>(0,p.jsx)(la,{className:(0,u.default)(df.virtualListToggleItem,o?.toggleItem),style:s?.toggleItem,selected:r.effectiveVisible.has(e.key),onToggle:()=>r.handleToggleColumn(e.key),disabled:e.lockVisible,cursorDefault:!1,children:e.toggleLabel??e.label},e.key)),i.isFrozen&&(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(df.virtualListToggleReset,o?.toggleReset),style:s?.toggleReset,onClick:()=>{i.reset(),r.setToggleOpen(!1)},children:a.resetColumnWidths})]}),children:(0,p.jsx)(`button`,{...t.getStationProps(e),type:`button`,className:(0,u.default)(df.virtualListHeaderToggle,o?.headerToggle),style:s?.headerToggle,"aria-label":a.toggleColumns,onKeyDown:n=>t.handleNavigationKey(n,e),children:(0,p.jsx)(d.FontAwesomeIcon,{icon:f.faGear,style:s?.headerToggle})})}),r.manuallyHiddenCount>0&&(0,p.jsx)(`span`,{className:(0,u.default)(df.virtualListColumnChip,o?.columnChip),style:s?.columnChip,"data-column-hidden-count":r.manuallyHiddenCount,"aria-label":a.columnsHidden(r.manuallyHiddenCount),children:r.manuallyHiddenCount})]})}function Hf(e){return!(`nodeType`in e)}function Uf(e){return e==null||typeof window>`u`?null:e===`window`?window:typeof e==`function`?e()??window:e}function Wf(e){return Hf(e)?{top:0,height:e.innerHeight}:{top:e.getBoundingClientRect().top+e.clientTop,height:e.clientHeight}}function Gf(e,t){let n=e.clientWidth;if(!t){let t=e.clientHeight;return{rel:e.scrollTop,visibleHeight:t,viewportHeight:t,distanceToEnd:e.scrollHeight-e.scrollTop-t,width:n}}let r=e.getBoundingClientRect(),{top:i,height:a}=Wf(t),o=i+a;return{rel:i-r.top,visibleHeight:Math.max(0,Math.min(o,r.bottom)-Math.max(i,r.top)),viewportHeight:a,distanceToEnd:r.bottom-o,width:n}}function Kf(e,t){if(typeof e==`number`)return e;let n=e.trim();if(n===``)return 0;let r=Number(n);if(!Number.isNaN(r))return r;let i=/^(-?\d*\.?\d+)px$/.exec(n);if(i)return parseFloat(i[1]);if(typeof document>`u`||!t)return 0;let a=document.createElement(`div`);a.style.cssText=`position:absolute;visibility:hidden;height:${n};`,t.appendChild(a);let o=a.getBoundingClientRect().height;return t.removeChild(a),Number.isFinite(o)?o:0}var qf=100,Jf=20;function Yf({items:e,keys:t,getItemKey:n,estimatedRowHeight:r,rowGap:i,overscan:a,onLoadMore:o,loadMoreThreshold:s,isLoading:c,scrollParent:u}){let[d,f]=(0,l.useState)(0),[p,m]=(0,l.useState)(0),[h,g]=(0,l.useState)(0),[_,v]=(0,l.useState)(0),[y,b]=(0,l.useState)(()=>Kf(i,null)),[x,S]=(0,l.useState)(new Map),[C,w]=(0,l.useState)(!1),T=(0,l.useRef)(!1),E=(0,l.useRef)(null),D=(0,l.useRef)(null),O=(0,l.useRef)([]),k=(0,l.useRef)(null),A=(0,l.useRef)([]),j=u!=null,M=(0,l.useRef)(null),N=(0,l.useRef)(null),[P,F]=(0,l.useState)(null);(0,l.useLayoutEffect)(()=>{let e;if(u===`nearest`){let t=N.current;(!t||!Hf(t)&&!t.isConnected)&&(N.current=E.current?Ft(E.current)??window:null),e=N.current}else e=Uf(u);M.current=e,F(t=>t===e?t:e)});let[I]=(0,l.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(e=>{S(t=>{let n=null;for(let r of e){let e=r.target,i=Number(e.dataset.index);if(Number.isNaN(i))continue;let a=A.current[i];if(a===void 0)continue;let o=r.borderBoxSize?.[0],s=o?Math.round(o.blockSize):e.offsetHeight;t.get(a)!==s&&(n||=new Map(t),n.set(a,s))}return n??t})}));(0,l.useEffect)(()=>()=>I?.disconnect(),[I]);let L=(0,l.useCallback)(e=>{let t=Math.max(0,e.rel);f(e=>e===t?e:t),m(t=>t===e.visibleHeight?t:e.visibleHeight),g(t=>t===e.viewportHeight?t:e.viewportHeight),v(t=>t===e.width?t:e.width)},[]),R=(0,l.useCallback)(()=>{let e=E.current;e&&L(Gf(e,M.current))},[L]),z=(0,l.useCallback)(()=>{let e=E.current;if(!e)return{top:0,height:0};let t=Gf(e,M.current);return{top:Math.max(0,t.rel),height:t.visibleHeight}},[]),B=(0,l.useCallback)(()=>{let e=E.current;if(!e)return null;let t=e.getBoundingClientRect(),n=M.current;if(!n)return{top:t.top,bottom:t.bottom,left:t.left,right:t.right};let{top:r,height:i}=Wf(n);return{top:Math.max(t.top,r),bottom:Math.min(t.bottom,r+i),left:t.left,right:t.right}},[]),V=(0,l.useCallback)(e=>{let t=E.current;if(!t)return;let n=M.current;n?Hf(n)?n.scrollBy(0,e):n.scrollTop+=e:t.scrollTop+=e},[]);(0,l.useLayoutEffect)(()=>{let e=E.current;if(!e)return;R();let t=typeof ResizeObserver>`u`?null:new ResizeObserver(()=>R());return t?.observe(e),P?(t?.observe(Hf(P)?document.documentElement:P),window.addEventListener(`resize`,R),()=>{t?.disconnect(),window.removeEventListener(`resize`,R)}):()=>t?.disconnect()},[P,R]);let H=(0,l.useRef)(o);(0,l.useLayoutEffect)(()=>{H.current=o});let U=(0,l.useCallback)(()=>{let e=H.current;e&&!T.current&&(T.current=!0,w(!0),e().finally(()=>{T.current=!1,w(!1)}))},[]),W=(0,l.useRef)(-1),G=(0,l.useCallback)(()=>{let e=E.current;if(!e)return;let t=Gf(e,M.current);k.current??=requestAnimationFrame(()=>{k.current=null,R()}),t.distanceToEnd<=s&&W.current!==A.current.length&&(W.current=A.current.length,U())},[R,s,U]);(0,l.useEffect)(()=>{let e=P??E.current;if(e)return e.addEventListener(`scroll`,G,{passive:!0}),()=>e.removeEventListener(`scroll`,G)},[P,G]),(0,l.useEffect)(()=>()=>{k.current!=null&&cancelAnimationFrame(k.current)},[]),(0,l.useLayoutEffect)(()=>{A.current=t}),(0,l.useLayoutEffect)(()=>{let e=Kf(i,E.current);b(t=>t===e?t:e)},[i,_,p]);let ee=(0,l.useMemo)(()=>{if(x.size===0)return r;let e=0;for(let t of x.values())e+=t;return e/x.size},[x,r]),{offsets:K,totalHeight:te}=(0,l.useMemo)(()=>ff(t,x,ee,y),[t,x,ee,y]),ne=(0,l.useRef)(``),re=j?h:p;(0,l.useEffect)(()=>{if(!o||c||C||re===0)return;let t=D.current?.offsetHeight??0;if(te>=re-t)return;let n=`${e.length}:${re}`;ne.current!==n&&(ne.current=n,U())},[o,c,C,e.length,te,re,U]);let q=(0,l.useCallback)((e,t)=>{let n=E.current;if(!n)return;let r=M.current;if(!r){let r=Math.max(0,e);t&&typeof n.scrollTo==`function`?n.scrollTo({top:r,behavior:t}):n.scrollTop=r;return}let{rel:i}=Gf(n,r);if(Hf(r)){r.scrollTo({top:Math.max(0,r.scrollY+e-i),behavior:t??`auto`});return}let a=Math.max(0,r.scrollTop+e-i);t&&typeof r.scrollTo==`function`?r.scrollTo({top:a,behavior:t}):r.scrollTop=a},[]);(0,l.useLayoutEffect)(()=>{let t=E.current,n=O.current;if(O.current=K,!t||n.length===0||ae.current)return;let r=z().top;if(r<=0)return;let i=pf(n,r,n.length-1);if(i>=e.length)return;let a=r-n[i],o=K[i]+a;Math.abs(o-r)>.5&&(q(o),f(o))},[K,e.length,z,q]);let ie=(0,l.useCallback)((t,n)=>{let r=E.current;if(!r||e.length===0)return null;let i=Math.max(0,Math.min(t,e.length-1)),a=K[i]??0,o=(K[i+1]??a)-a,s=D.current?.offsetHeight??0,c=Math.max(0,Gf(r,M.current).viewportHeight-s),l=n?.align??`start`,u=a;return l===`center`?u-=(c-o)/2:l===`end`&&(u-=c-o),u},[e.length,K]),ae=(0,l.useRef)(null);(0,l.useLayoutEffect)(()=>{let t=ae.current,n=E.current;if(!t)return;let r=t.items===e&&n?ie(t.index,t.options):null;if(r==null){ae.current=null;return}let i=Math.abs(r-t.lastTarget)<=1;if(i&&Math.abs(z().top-r)<=1||t.attempts>=Jf){ae.current=null;return}i||(t.lastTarget=r,t.attempts+=1,q(r,t.options?.behavior))}),(0,l.useEffect)(()=>{let e=E.current;if(!e)return;let t=()=>{ae.current=null},n=P??e;return n.addEventListener(`wheel`,t,{passive:!0}),n.addEventListener(`touchstart`,t,{passive:!0}),e.addEventListener(`keydown`,t),()=>{n.removeEventListener(`wheel`,t),n.removeEventListener(`touchstart`,t),e.removeEventListener(`keydown`,t)}},[P]);let J=(0,l.useMemo)(()=>{function t(t,n){let r=ie(t,n);r!=null&&(ae.current={index:t,options:n,lastTarget:r,attempts:0,items:e},q(r,n?.behavior))}return{scrollToIndex:t,scrollToKey(r,i){let a=e.findIndex((e,t)=>(n?n(e,t):t)===r);a>=0&&t(a,i)},scrollToTop(e){ae.current=null,q(0,e?.behavior)},getScrollElement:()=>{let e=M.current;return e?Hf(e)?null:e:E.current},remeasure:R}},[e,n,ie,q,R]),{startIndex:oe,endIndex:se}=(0,l.useMemo)(()=>mf(K,d,p,a,e.length),[K,d,p,a,e.length]),ce=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{ce.current||p===0||e.length<qf||se-oe+1<e.length||(ce.current=!0,console.warn(`VirtualList: rendering all ${e.length} rows, so nothing is being virtualized. Its viewport is as tall as its content. Give the list a definite height, or pass scrollParent to have it ride a scrollport it does not own.`))},[p,e.length,oe,se]),{rootRef:E,headerRef:D,rowObserver:I,keysRef:A,offsets:K,totalHeight:te,containerHeight:p,viewportHeight:h,containerWidth:_,startIndex:oe,endIndex:se,showLoadMoreSpinner:C,isWindowed:j,getVisibleSlice:z,getVisibleRect:B,scrollBy:V,scrollApi:J}}function Xf({items:e,getKey:t,multiSelect:n,selectedKeys:r,onSelectionChange:i}){let a=r!==void 0,[o,s]=(0,l.useState)(new Set),c=a?r:o;function u(e){a||s(e),i?.(e)}function d(e){let t=new Set(c);t.has(e)?t.delete(e):t.add(e),u(t)}function f(){let n=e.map((e,n)=>t(e,n));u(n.every(e=>c.has(e))?new Set:new Set(n))}let{allSelected:p,someSelected:m}=(0,l.useMemo)(()=>{if(!n||e.length===0)return{allSelected:!1,someSelected:!1};let r=e.every((e,n)=>c.has(t(e,n)));return{allSelected:r,someSelected:!r&&e.some((e,n)=>c.has(t(e,n)))}},[n,e,c,t]);return{effectiveSelectedKeys:c,handleRowSelect:d,handleSelectAll:f,allSelected:p,someSelected:m}}function Zf({columns:e,items:t,multiSelect:n,visibleColumnKeys:r,onVisibleColumnsChange:i,persistColumnsKey:a,showColumnToggle:o,userWidths:s,isFrozen:c,rootRef:u,startIndex:d,endIndex:f,containerHeight:p,containerWidth:m,isLoading:h}){let g=r!==void 0,[_,v]=(0,l.useState)(!1),[y,b]=(0,l.useState)({}),[x,S]=(0,l.useState)(()=>{let t=Of(a);return new Set((e??[]).filter(e=>kf(e,t)).map(e=>e.key))}),C=(0,l.useRef)(new Set((e??[]).map(e=>e.key)));(0,l.useEffect)(()=>{if(g)return;let t=e??[],n=new Set(t.map(e=>e.key)),r=C.current,i=n.size===r.size;if(i){for(let e of n)if(!r.has(e)){i=!1;break}}if(i)return;C.current=n;let o=Of(a);S(e=>{let n=new Set;for(let i of t)r.has(i.key)?e.has(i.key)&&n.add(i.key):kf(i,o)&&n.add(i.key);return n})},[e,g,a]),(0,l.useEffect)(()=>{if(g||!a||typeof window>`u`)return;let t=e??[];if(t.length!==0&&x.size!==0)try{window.localStorage.setItem(Df+a,JSON.stringify({visible:[...x],known:t.map(e=>e.key),widths:s}))}catch{}},[x,e,g,a,s]);let w=g?new Set(r):x,T=(e??[]).filter(e=>e.lockVisible).map(e=>e.key),E=T.some(e=>!w.has(e))?new Set([...w,...T]):w,D=!!e?.length,O=D?e.filter(e=>E.has(e.key)):[],k=D?e.filter(e=>!e.defaultHidden&&!E.has(e.key)).length:0,A=D?`${n&&D?`40px `:``}${c?Ef(O):vf(O,y)}`:void 0,j=o!==!1&&D&&e.some(e=>!e.hideFromToggle),M={};if(c&&D){let e=O.map(e=>`var(${wf(e.key)}, 160px)`);n&&e.unshift(`40px`),j&&e.push(`32px`),M[`--vl-total`]=`calc(${e.join(` + `)})`}let N=O.filter(e=>e.width.type===`fit`),P=!c&&N.length>0,F=N.map(e=>e.key).join(`|`),[I,L]=(0,l.useState)({key:F,items:t});(I.key!==F||I.items!==t)&&(L({key:F,items:t}),Object.keys(y).length>0&&b({}));let R=(0,l.useCallback)(()=>{let e=u.current;if(!e)return;let t=new Map;e.querySelectorAll(`[data-fit-key]`).forEach(e=>{let n=e,r=n.getAttribute(`data-fit-key`);if(!r)return;let i=Sf(n);i>(t.get(r)??0)&&t.set(r,i)}),t.size!==0&&b(n=>{let r=!1,i={...n};for(let[a,o]of t){if(o<=0)continue;let t=Math.min(Math.ceil(o),e.clientWidth);t>(n[a]??0)&&(i[a]=t,r=!0)}return r?i:n})},[u]),[z]=(0,l.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(()=>R())),B=(0,l.useRef)(new Set);(0,l.useEffect)(()=>()=>{z?.disconnect(),B.current.clear()},[z]),(0,l.useLayoutEffect)(()=>{if(!P)return;let e=u.current;if(!e||(R(),!z))return;let t=new Set(e.querySelectorAll(`[data-fit-key]`)),n=B.current;for(let e of n)t.has(e)||(z.unobserve(e),n.delete(e));for(let e of t)n.has(e)||(z.observe(e),n.add(e))},[u,P,F,y,d,f,p,m,t,h,R,z]),(0,l.useEffect)(()=>{if(!P)return;let e=0,t=requestAnimationFrame(()=>{R(),e=requestAnimationFrame(()=>R())});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},[P,F,t,h,R]);let V=(0,l.useCallback)(()=>b({}),[]);function H(t){if(e?.find(e=>e.key===t)?.lockVisible)return;let n=new Set(E);if(n.has(t)){if(n.size<=1)return;n.delete(t)}else n.add(t);let r=[...n];g||S(n),i?.(r)}return{hasColumns:D,visibleColumns:O,columnTemplate:A,widthVars:M,shouldShowToggle:j,effectiveVisible:E,manuallyHiddenCount:k,toggleOpen:_,setToggleOpen:v,handleToggleColumn:H,recalculateColumns:V}}function Qf({reorderable:e,treeReorder:t,onReorder:n,onTreeDrop:r,longPressDelay:i,dragHandle:a,treeIndentPx:o,keys:s,depths:c,isGroupAt:u,rootRef:d,keysRef:f,getVisibleRect:p,scrollBy:m}){let h=(0,l.useRef)(null),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(null),b=(0,l.useRef)(null),x=(0,l.useRef)(n),S=(0,l.useRef)(r),C=(0,l.useRef)(t),w=(0,l.useRef)(c),T=(0,l.useRef)(u),E=(0,l.useRef)(!0),D=(0,l.useRef)(null),[O,k]=(0,l.useState)(null),A=(0,l.useRef)(null),j=(0,l.useRef)(!1),M=(0,l.useRef)(null),N=(0,l.useRef)(0),P=(0,l.useRef)(0),F=(0,l.useRef)(null),I=(0,l.useRef)(!1),L=(0,l.useRef)(null),R=(0,l.useRef)(0),z=(0,l.useRef)(0),B=(0,l.useRef)(0),[V]=(0,l.useState)(()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(pointer: coarse)`).matches);(0,l.useLayoutEffect)(()=>{x.current=n,S.current=r,C.current=t,w.current=c,b.current=v,T.current=u});function H(e){V||D.current!==e&&(D.current=e,k(e))}function U(e,t){t.buttons===0&&H(t.target.closest(`[data-drag-handle]`)?e:null)}function W(e){e.buttons===0&&H(null)}function G(e,t){if(t.button!==0)return;let n=!!t.target.closest(`[data-drag-handle]`);E.current=n,n&&H(e)}function ee(e,n){if(a&&!E.current){n.preventDefault();return}h.current=e,_(e),t&&y(null)}function K(e,t,n){let r=h.current;if(r==null)return null;let i=s.indexOf(r);if(i!==-1&&e>=i&&e<=_f(i,c))return null;let a=gf(t,n.top,n.height,u(e));return{key:s[e],position:a}}function te(e,t){t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=K(e,t.clientY,n);y(e=>e?.key===r?.key&&e?.position===r?.position?e:r)}function ne(){let e=h.current,t=b.current;e!=null&&t&&t.key!==e&&r?.(e,t)}function re(e){e.preventDefault(),ne(),y(null),h.current=null,_(null),H(null)}function q(){y(null),h.current=null,_(null),H(null)}function ie(e,t){t.preventDefault();let r=h.current;if(r==null)return;let i=s.indexOf(r),a=t.currentTarget.getBoundingClientRect(),o=hf(i,e,t.clientY,a.top,a.height);o!=null&&n?.(i,o)}function ae(){h.current=null,_(null),H(null)}let J=(0,l.useCallback)(e=>{let t=h.current,n=d.current;if(t==null||!n)return;let r=L.current?P.current-R.current+B.current/2:P.current,i=document.elementFromPoint(e,r),a=i&&n.contains(i)?i.closest(`[data-index]`):null;if(!a)return;let o=Number(a.dataset.index);if(Number.isNaN(o))return;let s=f.current.indexOf(t),c=a.getBoundingClientRect();if(C.current){let e=f.current,t=w.current;if(s!==-1&&o>=s&&o<=_f(s,t)){y(null);return}let n=gf(r,c.top,c.height,T.current(o)),i={key:e[o],position:n};y(e=>e?.key===i.key&&e?.position===i.position?e:i);return}let l=hf(s,o,r,c.top,c.height);l!=null&&x.current?.(s,l)},[d,f]),oe=(0,l.useCallback)(()=>{let e=L.current;e&&(e.style.transform=`translate(${z.current}px, ${P.current-R.current}px)`)},[]),se=(0,l.useCallback)(()=>{let e=j.current?p():null;if(!e){F.current=null;return}let t=N.current,n=P.current,r=0;t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom&&(n<e.top+48?r=-Math.min(18,Math.ceil((e.top+48-n)/3)):n>e.bottom-48&&(r=Math.min(18,Math.ceil((n-(e.bottom-48))/3)))),r!==0&&(m(r),J(t)),F.current=requestAnimationFrame(se)},[J,p,m]),ce=(0,l.useCallback)(()=>{if(A.current!=null&&(clearTimeout(A.current),A.current=null),window.removeEventListener(`touchmove`,le),window.removeEventListener(`touchend`,ce),window.removeEventListener(`touchcancel`,ce),F.current!=null&&(cancelAnimationFrame(F.current),F.current=null),L.current&&=(L.current.remove(),null),document.body.style.touchAction=``,document.body.style.overscrollBehavior=``,j.current&&(I.current=!0,setTimeout(()=>{I.current=!1},350),C.current)){let e=h.current,t=b.current;e!=null&&t&&t.key!==e&&S.current?.(e,t)}y(null),j.current=!1,M.current=null,h.current=null,_(null)},[]),le=(0,l.useCallback)(e=>{let t=e.touches[0];if(t){if(N.current=t.clientX,P.current=t.clientY,!j.current){let e=M.current;e!=null&&Math.abs(t.clientY-e)>10&&A.current!=null&&(clearTimeout(A.current),A.current=null);return}e.cancelable&&e.preventDefault(),oe(),J(t.clientX)}},[J,oe]);function Y(n,r){if(!e&&!t||a&&!r.target.closest(`[data-drag-handle]`)||A.current!=null||j.current)return;let o=r.touches[0];o&&(M.current=o.clientY,N.current=o.clientX,P.current=o.clientY,window.addEventListener(`touchmove`,le,{passive:!1}),window.addEventListener(`touchend`,ce),window.addEventListener(`touchcancel`,ce),A.current=window.setTimeout(()=>{A.current=null,j.current=!0,h.current=n,_(n),navigator.vibrate?.(10),document.body.style.touchAction=`none`,document.body.style.overscrollBehavior=`none`,ue(n),F.current??=requestAnimationFrame(se)},i))}function ue(e){let t=d.current;if(!t)return;let n=f.current.indexOf(e),r=t.querySelector(`[data-index="${n}"]`);if(!r)return;let i=r.getBoundingClientRect();R.current=P.current-i.top,z.current=i.left,B.current=i.height;let a=r.cloneNode(!0);a.removeAttribute(`data-index`),a.setAttribute(`data-drag-clone`,`true`),a.setAttribute(`aria-hidden`,`true`),a.classList.add(df.virtualListDragClone),Object.assign(a.style,{position:`fixed`,left:`0`,top:`0`,width:`${i.width}px`,height:`${i.height}px`,margin:`0`,opacity:`1`,pointerEvents:`none`,zIndex:`3`,background:`var(--background)`,boxShadow:`var(--card-shadow)`,borderRadius:`var(--default-border-radius)`}),t.appendChild(a),L.current=a,oe()}(0,l.useEffect)(()=>ce,[ce]);let de=e||t,X=de&&!V;function fe(n,r){let i=t&&v?.key===r?v.position:void 0;return{reorderable:de&&!a,mouseDragEnabled:X,draggable:X&&(!a||r===O)||void 0,isDragging:de&&r===g,onMouseDown:de&&a?e=>G(r,e):void 0,onMouseOver:de&&a?e=>U(r,e):void 0,onMouseLeave:de&&a?W:void 0,onDragStart:de?e=>ee(r,e):void 0,onDragOver:t?e=>te(n,e):e?e=>ie(n,e):void 0,onDragEnd:t?q:e?ae:void 0,onDrop:t?re:void 0,onTouchStart:de?e=>Y(r,e):void 0,dropPosition:i,dropIndentPx:i?(c[n]??0)*o:void 0}}function pe(){return I.current?(I.current=!1,!0):!1}return{draggingKey:g,dragEnabled:de,getRowDragProps:fe,consumeSuppressedClick:pe}}function $f({items:e,columns:t,sort:n,defaultSort:r=null,onSortChange:i}){let a=n!==void 0,[o,s]=(0,l.useState)(r),c=a?n:o,u=(0,l.useMemo)(()=>If(e,c,t),[e,c,t]);function d(e){let t=Ff(c,e);a||s(t),i?.(t)}return{rows:u,effectiveSort:c,isSorted:u!==e,handleHeaderSort:d}}function ep(e){return Math.max(1,e?.minWidth??48)}function tp({columns:e,visibleColumnsRef:t,resizableColumns:n,columnWidths:r,onColumnWidthsChange:i,persistColumnsKey:a,rootRef:o}){let s=r!==void 0,[c,u]=(0,l.useState)(()=>Of(a)?.widths??{}),[d,f]=(0,l.useState)(!1),p=s?r:c,m=(0,l.useRef)(p);m.current=p;let h=(0,l.useCallback)(e=>{s||u(e),i?.(e)},[s,i]),g=(0,l.useCallback)(()=>{let e=o.current,n={...m.current};for(let r of t.current){if(n[r.key]!=null)continue;let t=e?.querySelector(`[aria-rowindex="1"] ${Cf(r.key)}`),i=t?Math.round(t.getBoundingClientRect().width):0;n[r.key]=i>0?i:Tf(r)}return n},[o,t]);(0,l.useLayoutEffect)(()=>{let e=o.current;if(e)for(let[t,n]of Object.entries(p))e.style.setProperty(wf(t),`${n}px`)},[p,o]);let _=(0,l.useCallback)((e,t)=>{o.current?.style.setProperty(wf(e),`${t}px`)},[o]),v=(0,l.useCallback)(()=>{s&&requestAnimationFrame(()=>{for(let[e,t]of Object.entries(m.current))_(e,t)})},[_,s]),y=(0,l.useCallback)((t,n)=>{let r=g(),i=ep(e?.find(e=>e.key===t)),a={...r,[t]:Math.max(i,Math.round(n(r[t])))};_(t,a[t]),h(a),v()},[_,e,h,g,v]),b=(0,l.useCallback)((t,n)=>{if(t.button!==0)return;t.preventDefault(),t.stopPropagation();let r=t.currentTarget,i=g(),a=i[n],o=t.clientX,s=ep(e?.find(e=>e.key===n)),c=a,l=0,u=()=>{l=0,_(n,c)};function d(e){if(l&&cancelAnimationFrame(l),r.releasePointerCapture?.(t.pointerId),r.removeEventListener(`pointermove`,p),r.removeEventListener(`pointerup`,y),r.removeEventListener(`pointercancel`,b),r.removeEventListener(`lostpointercapture`,b),window.removeEventListener(`keydown`,x,!0),document.body.style.cursor=``,document.body.style.userSelect=``,f(!1),e==null){_(n,a);return}e!==a&&h({...i,[n]:e}),v()}function p(e){c=Math.max(s,Math.round(a+e.clientX-o)),l||=requestAnimationFrame(u)}function y(){d(c)}function b(){d(null)}function x(e){e.key===`Escape`&&(e.preventDefault(),d(null))}r.setPointerCapture?.(t.pointerId),r.addEventListener(`pointermove`,p),r.addEventListener(`pointerup`,y),r.addEventListener(`pointercancel`,b),r.addEventListener(`lostpointercapture`,b),window.addEventListener(`keydown`,x,!0),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,f(!0),Object.keys(m.current).length===0&&h(i)},[_,e,h,g,v]),x=(0,l.useCallback)(e=>{let t=o.current;if(!t)return 0;let n=wf(e),r=t.style.getPropertyValue(n),i=t.style.getPropertyValue(`--vl-total`);t.style.setProperty(n,`max-content`),t.style.removeProperty(`--vl-total`);let a=0;return t.querySelectorAll(Cf(e)).forEach(e=>{let t=Math.ceil(e.getBoundingClientRect().width);t>a&&(a=t)}),t.style.setProperty(n,r),i&&t.style.setProperty(`--vl-total`,i),Math.min(a,t.clientWidth)},[o]),S=(0,l.useCallback)(e=>{let t=()=>{let t=x(e);t>0&&y(e,()=>t)};Object.keys(m.current).length>0?t():(h(g()),requestAnimationFrame(t))},[h,g,x,y]),C=(0,l.useCallback)(()=>{let e=o.current;if(e)for(let t of Object.keys(m.current))e.style.removeProperty(wf(t));h({})},[h,o]),w=(0,l.useCallback)(e=>n&&e.resizable!==!1,[n]),T=(0,l.useCallback)((e,t)=>y(e,e=>e+t),[y]),E=(0,l.useCallback)(t=>y(t,()=>ep(e?.find(e=>e.key===t))),[e,y]),D=(0,l.useCallback)(e=>w(e)?{"aria-hidden":!0,onPointerDown:t=>b(t,e.key),onDoubleClick:t=>{t.stopPropagation(),S(e.key)},onClick:e=>e.stopPropagation()}:null,[S,b,w]);return{widths:p,isFrozen:Object.keys(p).length>0,isResizing:d,reset:C,isResizable:w,resizeBy:T,resizeToMin:E,autoFit:S,getHandleProps:D}}function np({enabled:e,tabAcrossRows:t,rowCount:n,offsets:r,rootRef:i,headerRef:a,getVisibleSlice:o,viewportHeight:s,scrollToIndex:c,initialIndex:u,multiSelect:d,onActivate:f,onToggleSelect:p}){let[m,h]=(0,l.useState)(u),[g,_]=(0,l.useState)(-1),v=(0,l.useRef)(r);v.current=r;let y=e&&n>0?Math.min(Math.max(m,0),n-1):-1;y>=0&&y!==m&&h(y);let b=y>=0;function x(e){let t=a.current?.offsetHeight??0,n=v.current[e]??0,r=v.current[e+1]??n,{top:i,height:s}=o();n<i+t?c(e,{align:`start`}):r>i+s&&c(e,{align:`end`})}function S(e){let t=Math.max(0,Math.min(e,n-1));h(t),x(t)}function C(e){let t=Math.max(0,s-(a.current?.offsetHeight??0)),r=pf(v.current,(v.current[e]??0)+t,n);return Math.max(1,r-e)}function w(e){return i.current?.querySelector(`[data-index="${e}"]`)??null}function T(e){let t=w(e)?.querySelector(xf);return t?(_(e),t.focus(),!0):!1}let E=(0,l.useRef)(null),D=(0,l.useRef)(!1);(0,l.useLayoutEffect)(()=>{let e=E.current;if(!e)return;E.current=null;let t=w(e.index)?.querySelectorAll(xf);if(t?.length){(e.edge===`first`?t[0]:t[t.length-1]).focus();return}let r=e.index+(e.edge===`first`?1:-1);if(r>=0&&r<n){E.current={index:r,edge:e.edge},_(r),x(r);return}_(-1),D.current=b&&e.edge===`first`,b&&i.current?.focus()});function O(e){let t=e?.closest?.(`[data-index]`),n=Number(t?.dataset.index);return Number.isFinite(n)?n:-1}function k(e){if(e.target===e.currentTarget)return;let t=O(e.target);t<0||(_(t),h(t))}function A(e){e.currentTarget.contains(e.relatedTarget)||(D.current=!1),O(e.relatedTarget)!==g&&_(-1)}function j(e){if(e.key!==`Escape`||e.defaultPrevented||!b)return;let t=O(e.target);t>=0&&h(t),_(-1),i.current?.focus(),e.preventDefault()}function M(e){if(!t||e.key!==`Tab`||e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey)return;let r=O(e.target);if(r<0)return;let i=w(r)?.querySelectorAll(yf);if(!i?.length)return;let a=Array.prototype.indexOf.call(i,e.target);if(a<0)return;let o=e.shiftKey;if(o?a>0:a<i.length-1)return;let s=o?r-1:r+1;s<0||s>=n||(e.preventDefault(),_(s),x(s),E.current={index:s,edge:o?`last`:`first`})}function N(e){if(e.target!==e.currentTarget){M(e),j(e);return}if(!b||e.defaultPrevented)return;let r=D.current;switch(D.current=!1,e.key){case`ArrowDown`:S(y+1);break;case`ArrowUp`:S(y-1);break;case`Home`:S(0);break;case`End`:S(n-1);break;case`PageDown`:S(y+C(y));break;case`PageUp`:S(y-C(Math.max(0,y-1)));break;case`Enter`:if(f)f(y);else if(!T(y))return;break;case`F2`:if(!T(y))return;break;case`Tab`:if(!t||e.shiftKey||r||!T(y))return;break;case` `:if(!d)return;p(y);break;default:return}e.preventDefault()}if(!b&&!t)return{activeIndex:y,enteredIndex:-1,setActiveIndex:h,containerProps:{}};let P={onKeyDown:N,onFocus:k,onBlur:A};return b&&(P.tabIndex=0),{activeIndex:y,enteredIndex:g,setActiveIndex:h,containerProps:P}}var rp={selectRow:`Select row`,selectAllRows:`Select all rows`,toggleColumns:`Toggle column visibility`,columnsHidden:e=>`${e} columns hidden`,resetColumnWidths:`Reset column widths`};function ip(e,t){return!e||!t?e??t:n=>{e(n),t(n)}}function ap(e){let{ref:t,items:n,renderRow:r,ariaRoles:i,columns:a,height:o=`100%`,estimatedRowHeight:s=40,overscan:c=3,rowGap:d=0,rowPadding:f,selectedKey:m,getItemKey:h,onRowClick:g,keyboardNavigation:_=!0,tabAcrossRows:v=!1,scrollParent:y,visibleColumnKeys:b,onVisibleColumnsChange:x,persistColumnsKey:S,resizableColumns:C=!1,columnWidths:w,onColumnWidthsChange:T,labels:E,sort:O,defaultSort:k,onSortChange:A,showColumnToggle:j,onLoadMore:M,loadMoreThreshold:N=100,isLoading:P=!1,multiSelect:F=!1,selectedKeys:I,onSelectionChange:L,reorderable:R=!1,onReorder:z,longPressDelay:B=400,treeReorder:V=!1,getItemDepth:H,isGroup:U,onTreeDrop:W,treeIndentPx:G=24,dragHandle:ee=!1,showDivider:K=!0,rowHover:te=!0,className:ne,style:re,classNames:q,styles:ie,...J}=e,oe=e.scrollParent!=null&&e.height!==void 0,se=(0,l.useRef)(!1);(0,l.useEffect)(()=>{oe&&!se.current&&(se.current=!0,console.warn("VirtualList: `height` is ignored alongside `scrollParent`, which leaves the list no viewport to size."))},[oe]);let ce=D(`VirtualList`,E,rp),{rows:le,effectiveSort:Y,isSorted:ue,handleHeaderSort:de}=$f({items:n,columns:a,sort:O,defaultSort:k,onSortChange:A}),X=(0,l.useCallback)((e,t)=>h?h(e,t):t,[h]),fe=(0,l.useMemo)(()=>le.map((e,t)=>X(e,t)),[le,X]),pe=(0,l.useMemo)(()=>H?le.map((e,t)=>H(e,t)):[],[le,H]),me=(0,l.useCallback)(e=>U?U(le[e],e):!1,[U,le]),he=Yf({items:le,keys:fe,getItemKey:h,estimatedRowHeight:s,rowGap:d,overscan:c,onLoadMore:M,loadMoreThreshold:N,isLoading:P,scrollParent:y}),{rootRef:ge,headerRef:_e,rowObserver:ve,keysRef:ye,offsets:be,totalHeight:xe,startIndex:Z,endIndex:Se}=he,Ce=(0,l.useRef)([]),we=tp({columns:a,visibleColumnsRef:Ce,resizableColumns:C,columnWidths:w,onColumnWidthsChange:T,persistColumnsKey:S,rootRef:ge}),Te=Xf({items:le,getKey:X,multiSelect:F,selectedKeys:I,onSelectionChange:L}),{effectiveSelectedKeys:Ee}=Te,De=Zf({columns:a,items:le,multiSelect:F,visibleColumnKeys:b,onVisibleColumnsChange:x,persistColumnsKey:S,showColumnToggle:j,userWidths:we.widths,isFrozen:we.isFrozen,rootRef:ge,startIndex:Z,endIndex:Se,containerHeight:he.containerHeight,containerWidth:he.containerWidth,isLoading:P}),{hasColumns:Oe,visibleColumns:ke,columnTemplate:Ae,widthVars:je,shouldShowToggle:Me,recalculateColumns:Ne}=De;Ce.current=ke,(0,l.useImperativeHandle)(t,()=>({...he.scrollApi,recalculateColumns:Ne,resetColumnWidths:we.reset}),[he.scrollApi,Ne,we.reset]);let Pe=ue&&(R||V),Fe=(0,l.useRef)(!1);(0,l.useEffect)(()=>{Pe&&!Fe.current&&(Fe.current=!0,console.warn(`VirtualList: row reordering is disabled while the list is sorted. Clear the sort to drag rows.`))},[Pe]);let Ie=Qf({reorderable:R&&!ue,treeReorder:V&&!ue,onReorder:z,onTreeDrop:W,longPressDelay:B,dragHandle:ee,treeIndentPx:G,keys:fe,depths:pe,isGroupAt:me,rootRef:ge,keysRef:ye,getVisibleRect:he.getVisibleRect,scrollBy:he.scrollBy}),Le=(0,l.useId)(),Re=e=>`${Le}-row-${e}`,ze=np({enabled:_,tabAcrossRows:v,rowCount:le.length,offsets:be,rootRef:ge,headerRef:_e,getVisibleSlice:he.getVisibleSlice,viewportHeight:he.viewportHeight,scrollToIndex:he.scrollApi.scrollToIndex,initialIndex:m==null?0:Math.max(0,fe.indexOf(m)),multiSelect:F,onActivate:g&&(e=>g(le[e],e)),onToggleSelect:e=>Te.handleRowSelect(fe[e])}),Be=typeof f==`number`?`${f}px`:f,Ve=e=>{let t=le[e],n=X(t,e),a=m!=null&&n===m||Ee.has(n),o=Ie.getRowDragProps(e,n);return(0,p.jsx)(Lf,{id:Re(e),index:e,top:be[e],padding:Be,columnTemplate:Ae,isSelected:a,isActive:e===ze.activeIndex,manageTabStops:_,isEntered:e===ze.enteredIndex,activeClassName:q?.activeRow,activeStyle:ie?.activeRow,showDivider:K,hover:te,onClick:()=>{Ie.consumeSuppressedClick()||(ze.setActiveIndex(e),g?.(t,e))},observer:ve,ariaRowIndex:Oe?e+2:void 0,ariaPosInSet:Oe?void 0:e+1,ariaSetSize:Oe?void 0:le.length,rowRole:i?.row??(Oe?`row`:`listitem`),reserveToggleGutter:Me,...o,dropIndicatorClassName:q?.dropIndicator,dropIndicatorStyle:ie?.dropIndicator,rowClassName:q?.row,rowStyle:ie?.row,children:Oe?(0,p.jsxs)(p.Fragment,{children:[F&&(0,p.jsx)(`div`,{className:(0,u.default)(df.virtualListSelectCell,q?.selectCell),style:ie?.selectCell,role:`gridcell`,onClick:e=>e.stopPropagation(),children:(0,p.jsx)(la,{selected:Ee.has(n),onToggle:()=>Te.handleRowSelect(n),"aria-label":ce.selectRow,tabIndex:-1})}),ke.map(n=>(0,p.jsx)(`div`,{className:(0,u.default)(df.virtualListCell,q?.cell),style:ie?.cell,role:`gridcell`,"data-col-key":n.key,"data-fit-key":n.width.type===`fit`?n.key:void 0,children:n.renderCell(t,e)},n.key))]}):r?.(t,e)},n)},He=[];for(let e=Z;e<=Se;e++)He.push(Ve(e));let Ue=Ie.draggingKey==null?-1:fe.indexOf(Ie.draggingKey);Ue>=0&&(Ue<Z||Ue>Se)&&He.push(Ve(Ue)),ze.enteredIndex>=0&&(ze.enteredIndex<Z||ze.enteredIndex>Se)&&He.push(Ve(ze.enteredIndex));let We={...ze.containerProps,onKeyDown:ip(J.onKeyDown,ze.containerProps.onKeyDown),onFocus:ip(J.onFocus,ze.containerProps.onFocus),onBlur:ip(J.onBlur,ze.containerProps.onBlur)};return(0,p.jsxs)(`div`,{...J,...We,ref:ge,className:(0,u.default)(df.virtualList,he.isWindowed&&df.virtualListWindowed,Ie.draggingKey!=null&&df.virtualListReordering,we.isResizing&&df.virtualListResizing,ne,q?.root),style:{...he.isWindowed?null:{height:o},...je,...re,...ie?.root},role:i?.container??(Oe?`grid`:`list`),"aria-rowcount":Oe?le.length+1:void 0,"aria-busy":P||he.showLoadMoreSpinner||J[`aria-busy`]||void 0,"aria-activedescendant":ze.activeIndex>=0&&(i?.container??(Oe?`grid`:`list`))!==`list`?Re(ze.activeIndex):void 0,children:[Oe&&(0,p.jsx)(Bf,{headerRef:_e,columns:a,cols:De,resize:we,sort:Y,onSort:de,multiSelect:F,allSelected:Te.allSelected,someSelected:Te.someSelected,onSelectAll:Te.handleSelectAll,labels:ce,classNames:q,styles:ie}),P?(0,p.jsx)(`div`,{className:df.virtualListLoadingFull,"aria-hidden":`true`,children:(0,p.jsx)(ae,{size:32})}):(0,p.jsx)(`div`,{className:(0,u.default)(df.virtualListBody,q?.body),style:{height:xe,...ie?.body},children:He}),he.showLoadMoreSpinner&&(0,p.jsx)(`div`,{className:(0,u.default)(df.virtualListLoadingIndicator,q?.loadingIndicator),style:ie?.loadingIndicator,"aria-hidden":`true`,children:(0,p.jsx)(ae,{size:32})})]})}function op(e,t,n=0,r=null){return e.flatMap((i,a)=>{let o=i.children!==void 0,s=o&&t.includes(i.key),c={node:i,level:n,parentKey:r,isBranch:o,isExpanded:s,setSize:e.length,posInSet:a+1};return!s||!i.children?.length?[c]:[c,...op(i.children,t,n+1,i.key)]})}var sp={tree:`tree_bHT4K`,"tree-disabled":`tree-disabled_bIFfs`,treeDisabled:`tree-disabled_bIFfs`,"tree-node":`tree-node_XUWMs`,treeNode:`tree-node_XUWMs`,"tree-node-selected":`tree-node-selected_j05ku`,treeNodeSelected:`tree-node-selected_j05ku`,"tree-node-disabled":`tree-node-disabled_FMox6`,treeNodeDisabled:`tree-node-disabled_FMox6`,"tree-toggle":`tree-toggle_hmqtx`,treeToggle:`tree-toggle_hmqtx`,"tree-toggle-open":`tree-toggle-open_gTfYS`,treeToggleOpen:`tree-toggle-open_gTfYS`,"tree-toggle-hidden":`tree-toggle-hidden_nYrlV`,treeToggleHidden:`tree-toggle-hidden_nYrlV`,"tree-icon":`tree-icon_0dxsy`,treeIcon:`tree-icon_0dxsy`,"tree-label":`tree-label_BOShA`,treeLabel:`tree-label_BOShA`,"tree-empty":`tree-empty_Eb3vv`,treeEmpty:`tree-empty_Eb3vv`},cp=[],lp={empty:`Nothing here`};function up(e){let{nodes:t,expandedKeys:n,defaultExpandedKeys:r=cp,onExpandedChange:i=()=>{},selectedKey:a,defaultSelectedKey:o,onSelect:s=()=>{},expandOnSelect:c=!0,indent:d=20,toggleIcon:m=f.faChevronRight,height:h,estimatedRowHeight:g=32,labels:_,disabled:v=!1,"aria-label":y=`Tree`,className:b,style:x,classNames:S,styles:C,...w}=E(`Tree`,e),T=D(`Tree`,_,lp),O=(0,l.useRef)(new Map),k=(0,l.useRef)(null),A=(0,l.useRef)(null),j=h!==void 0,M=n!==void 0,[N,P]=(0,l.useState)(r),F=M?n:N,I=a!==void 0,[L,R]=(0,l.useState)(o??null),z=I?a:L,B=op(t,F),V=Math.max(0,B.findIndex(e=>e.node.key===z)),H=B[V]?.node.key;function U(e){M||P(e),i(e)}function W(e){U(F.includes(e)?F.filter(t=>t!==e):[...F,e])}function G(e){v||e.node.disabled||(I||R(e.node.key),s(e.node.key,e.node),c&&e.isBranch&&W(e.node.key))}function ee(e){let t=B[e]?.node.key;if(t===void 0)return;let n=O.current.get(t);if(n){n.focus();return}A.current=t,k.current?.scrollToIndex(e,{align:`center`})}(0,l.useEffect)(()=>{let e=A.current;if(e===null)return;let t=O.current.get(e);t&&(t.focus(),A.current=null)});function K(e,t,n){if(!v)switch(e.key){case`ArrowDown`:e.preventDefault(),ee(Math.min(n+1,B.length-1));break;case`ArrowUp`:e.preventDefault(),ee(Math.max(n-1,0));break;case`ArrowRight`:if(e.preventDefault(),!t.isBranch)break;t.isExpanded?ee(n+1):W(t.node.key);break;case`ArrowLeft`:{if(e.preventDefault(),t.isBranch&&t.isExpanded){W(t.node.key);break}let n=B.findIndex(e=>e.node.key===t.parentKey);n>=0&&ee(n);break}case`Home`:e.preventDefault(),ee(0);break;case`End`:e.preventDefault(),ee(B.length-1);break;case`Enter`:case` `:e.preventDefault(),G(t)}}function te(e,t){let{node:n,level:r,isBranch:i,isExpanded:a}=e,o=n.key===z,s=v||n.disabled;return(0,p.jsxs)(`div`,{ref:e=>{e?O.current.set(n.key,e):O.current.delete(n.key)},role:`treeitem`,"aria-level":r+1,"aria-setsize":e.setSize,"aria-posinset":e.posInSet,"aria-expanded":i?a:void 0,"aria-selected":o,"aria-disabled":s||void 0,tabIndex:n.key===H&&!s?0:-1,className:(0,u.default)(sp.treeNode,o&&sp.treeNodeSelected,s&&sp.treeNodeDisabled,S?.node),style:{paddingLeft:r*d,...C?.node},onClick:()=>G(e),onKeyDown:n=>K(n,e,t),children:[(0,p.jsx)(`span`,{className:(0,u.default)(sp.treeToggle,a&&sp.treeToggleOpen,!i&&sp.treeToggleHidden,S?.toggle),style:C?.toggle,"aria-hidden":`true`,onClick:e=>{e.stopPropagation(),!s&&i&&W(n.key)},children:i&&X(m)}),n.icon&&X(n.icon,{className:(0,u.default)(sp.treeIcon,S?.icon),style:C?.icon}),(0,p.jsx)(`span`,{className:(0,u.default)(sp.treeLabel,S?.label),style:C?.label,children:n.label})]},n.key)}return(0,p.jsx)(`div`,{...w,role:`tree`,"aria-label":y,"aria-disabled":v||void 0,tabIndex:j&&!v?0:void 0,onFocus:e=>{e.target===e.currentTarget&&ee(V)},className:(0,u.default)(sp.tree,v&&sp.treeDisabled,S?.root,b),style:{...x,...C?.root},children:B.length===0?(0,p.jsx)(`div`,{className:(0,u.default)(sp.treeEmpty,S?.empty),style:C?.empty,children:T.empty}):j?(0,p.jsx)(ap,{ref:k,items:B,height:h,estimatedRowHeight:g,getItemKey:e=>e.node.key,getItemDepth:e=>e.level,ariaRoles:{container:`none`,row:`none`},keyboardNavigation:!1,renderRow:te}):B.map(te)})}var dp=function(e){return e.Sunny=`sunny`,e.ClearNight=`clearNight`,e.Cloudy=`cloudy`,e.PartlyCloudy=`partlyCloudy`,e.PartlyCloudyNight=`partlyCloudyNight`,e.RainyLight=`rainyLight`,e.Rainy=`rainy`,e.RainyHeavy=`rainyHeavy`,e.Snowy=`snowy`,e.Hail=`hail`,e.Foggy=`foggy`,e.Thunderstorm=`thunderstorm`,e}({}),fp={weatherIcon:`weatherIcon_FrcJF`,"weatherIcon-behind":`weatherIcon-behind_e2VOz`,weatherIconBehind:`weatherIcon-behind_e2VOz`,"weatherIcon-cloudBehind":`weatherIcon-cloudBehind_MZlmZ`,weatherIconCloudBehind:`weatherIcon-cloudBehind_MZlmZ`,"weatherIcon-cloud":`weatherIcon-cloud_KW-i7`,weatherIconCloud:`weatherIcon-cloud_KW-i7`,weatherIconCloudDrift:`weatherIconCloudDrift_0thIg`,"weatherIcon-cloudDelayed":`weatherIcon-cloudDelayed_bI1iH`,weatherIconCloudDelayed:`weatherIcon-cloudDelayed_bI1iH`,"weatherIcon-sunRays":`weatherIcon-sunRays_PBW93`,weatherIconSunRays:`weatherIcon-sunRays_PBW93`,weatherIconRotate:`weatherIconRotate_Hp9YK`,"weatherIcon-sunRay":`weatherIcon-sunRay_ODCJR`,weatherIconSunRay:`weatherIcon-sunRay_ODCJR`,weatherIconRayPulse:`weatherIconRayPulse_57eG4`,"weatherIcon-sunCore":`weatherIcon-sunCore_Ucxlh`,weatherIconSunCore:`weatherIcon-sunCore_Ucxlh`,"weatherIcon-moonCore":`weatherIcon-moonCore_USwOg`,weatherIconMoonCore:`weatherIcon-moonCore_USwOg`,weatherIconGlow:`weatherIconGlow_W2Qxf`,"weatherIcon-star":`weatherIcon-star_3CMD1`,weatherIconStar:`weatherIcon-star_3CMD1`,weatherIconTwinkle:`weatherIconTwinkle_8DkMV`,"weatherIcon-rain":`weatherIcon-rain_A9qFe`,weatherIconRain:`weatherIcon-rain_A9qFe`,"weatherIcon-drop":`weatherIcon-drop_SdkW9`,weatherIconDrop:`weatherIcon-drop_SdkW9`,weatherIconFall:`weatherIconFall_NlqDE`,"weatherIcon-splash":`weatherIcon-splash_DF4Wc`,weatherIconSplash:`weatherIcon-splash_DF4Wc`,weatherIconRing:`weatherIconRing_kr1SP`,"weatherIcon-snow":`weatherIcon-snow_95z-c`,weatherIconSnow:`weatherIcon-snow_95z-c`,"weatherIcon-flake":`weatherIcon-flake_LGzkw`,weatherIconFlake:`weatherIcon-flake_LGzkw`,weatherIconSnowFall:`weatherIconSnowFall_I2EGa`,"weatherIcon-stone":`weatherIcon-stone_U0daF`,weatherIconStone:`weatherIcon-stone_U0daF`,weatherIconHailFall:`weatherIconHailFall_U-AE4`,"weatherIcon-impact":`weatherIcon-impact_kCHtC`,weatherIconImpact:`weatherIcon-impact_kCHtC`,"weatherIcon-fog":`weatherIcon-fog_GC8wj`,weatherIconFog:`weatherIcon-fog_GC8wj`,weatherIconSway:`weatherIconSway_-CD1q`,"weatherIcon-bolt":`weatherIcon-bolt_S9sie`,weatherIconBolt:`weatherIcon-bolt_S9sie`,weatherIconFlash:`weatherIconFlash_GIecz`,"weatherIcon-still":`weatherIcon-still_lr-Nl`,weatherIconStill:`weatherIcon-still_lr-Nl`},pp=`M 26.3 62.9 C 15.4 65.0 15.0 48.5 27.8 49.8 C 23.9 43.9 34.2 34.0 43.0 39.6 C 46.0 26.2 73.9 32.0 68.9 46.3 C 85.0 44.3 84.6 64.2 72.4 62.5 Z`;function mp(e,t,n,r){return{animationDuration:`${t}s`,animationDelay:`${e?n:-r*t}s`}}function hp({className:e,delayed:t=!1}){return(0,p.jsx)(`path`,{className:(0,u.default)(fp.weatherIconCloud,t&&fp.weatherIconCloudDelayed,e),d:pp})}var gp=12;function _p({className:e}){return(0,p.jsxs)(`g`,{className:e,children:[(0,p.jsx)(`g`,{className:fp.weatherIconSunRays,children:Array.from({length:gp},(e,t)=>(0,p.jsx)(`g`,{transform:`rotate(${t/gp*360} 50 50)`,children:(0,p.jsx)(`line`,{className:fp.weatherIconSunRay,x1:50,y1:23,x2:50,y2:t%2==0?16:11})},t))}),(0,p.jsx)(`circle`,{className:fp.weatherIconSunCore,cx:50,cy:50,r:18})]})}var vp=[{x:74,y:32,size:2.2,duration:2.4,delay:0},{x:28,y:30,size:2.6,duration:3.1,delay:.4},{x:80,y:60,size:1.8,duration:2.7,delay:.9},{x:22,y:66,size:2.4,duration:3.6,delay:.2},{x:58,y:82,size:2,duration:2.9,delay:1.3},{x:34,y:80,size:2.5,duration:3.3,delay:.6}];function yp({className:e}){return(0,p.jsxs)(`g`,{className:e,children:[vp.map(e=>(0,p.jsx)(`g`,{transform:`translate(${e.x}, ${e.y})`,children:(0,p.jsx)(`g`,{className:fp.weatherIconStar,style:{animationDuration:`${e.duration}s`,animationDelay:`${e.delay}s`},children:(0,p.jsx)(`path`,{d:`M 0 ${-e.size} L 0 ${e.size} M ${-e.size} 0 L ${e.size} 0`})})},`${e.x}-${e.y}`)),(0,p.jsx)(`circle`,{className:fp.weatherIconMoonCore,cx:50,cy:50,r:18})]})}var bp=function(e){return e.Light=`light`,e.Medium=`medium`,e.Heavy=`heavy`,e}({}),xp={light:{lanes:4,duration:1.5},medium:{lanes:6,duration:.95},heavy:{lanes:10,duration:.55}},Sp=[.85,1.1,.95,1.2,.9,1.05,1.15,.8,1,1.08],Cp=[.05,.62,.31,.85,.18,.5,.74,.1,.43,.95],wp=2,Tp=.65;function Ep(e,t=Cp,n=.8){return .1+n*t[e%t.length]}function Dp({animated:e,intensity:t=`medium`}){let{lanes:n,duration:r}=xp[t];return(0,p.jsx)(`g`,{className:fp.weatherIconRain,children:Array.from({length:n},(t,i)=>{let a=26+50*i/(n-1),o=r*Sp[i],s=o*Cp[i];return Array.from({length:wp},(t,n)=>{let r=mp(e,o,s+n*o/wp,Ep(i*wp+n,Cp,Tp));return(0,p.jsxs)(`g`,{children:[(0,p.jsx)(`line`,{className:fp.weatherIconDrop,style:r,x1:a,y1:68,x2:a-2.4,y2:92}),(0,p.jsx)(`ellipse`,{className:fp.weatherIconSplash,style:r,cx:a-2.4,cy:92,rx:`1.4`,ry:`0.7`})]},`${i}-${n}`)})})})}var Op=[.65,1.5,.85,1.25,1.65,.75,1.1],kp=[.15,.7,.35,.9,.05,.55,.8],Ap=7;function jp({animated:e}){return(0,p.jsx)(`g`,{className:fp.weatherIconSnow,children:Array.from({length:Ap},(t,n)=>{let r=24+54*n/6,i=7*Op[n],a=i*kp[n];return Array.from({length:wp},(t,o)=>(0,p.jsx)(`g`,{transform:`translate(${r}, 68)`,children:(0,p.jsx)(`g`,{className:fp.weatherIconFlake,style:mp(e,i,a+o*i*.7,Ep(n*wp+o,kp)),children:(0,p.jsx)(`path`,{d:`M 0 -2 L 0 2 M -1.7 -1 L 1.7 1 M -1.7 1 L 1.7 -1`})})},`${n}-${o}`))})})}var Mp=[{x:34,y:66,dx:-1,dy:18,duration:.6,delay:.05},{x:47,y:68,dx:-2,dy:17,duration:.7,delay:.3},{x:58,y:65,dx:1,dy:18,duration:.55,delay:.15},{x:40,y:70,dx:-1,dy:16,duration:.75,delay:.45},{x:65,y:67,dx:-2,dy:17,duration:.65,delay:0},{x:52,y:71,dx:1,dy:16,duration:.7,delay:.35}];function Np({animated:e}){let t=Mp.length*wp;return(0,p.jsx)(`g`,{className:fp.weatherIconHail,children:Mp.flatMap((n,r)=>Array.from({length:wp},(i,a)=>{let o=r*wp+a,s=mp(e,n.duration,n.delay+a*n.duration/wp,.1+.8*(o+.5)/t);return(0,p.jsxs)(`g`,{children:[(0,p.jsx)(`g`,{transform:`translate(${n.x}, ${n.y})`,children:(0,p.jsx)(`g`,{className:fp.weatherIconStone,style:{...s,"--weather-icon-dx":n.dx,"--weather-icon-dy":n.dy},children:(0,p.jsx)(`circle`,{r:`2`})})}),(0,p.jsx)(`ellipse`,{className:fp.weatherIconImpact,style:s,cx:n.x+n.dx,cy:n.y+n.dy,rx:`1.8`,ry:`0.9`})]},o)}))})}function Pp(){return(0,p.jsxs)(`g`,{className:fp.weatherIconFog,children:[(0,p.jsx)(`line`,{x1:`32`,y1:`40`,x2:`68`,y2:`40`}),(0,p.jsx)(`line`,{x1:`20`,y1:`52`,x2:`80`,y2:`52`}),(0,p.jsx)(`line`,{x1:`26`,y1:`64`,x2:`74`,y2:`64`}),(0,p.jsx)(`line`,{x1:`34`,y1:`76`,x2:`66`,y2:`76`})]})}function Fp(){return(0,p.jsx)(`path`,{className:fp.weatherIconBolt,d:`M 54 52 L 44 72 H 52 L 46 90 L 62 66 H 54 L 60 52 Z`})}var Ip={[dp.Sunny]:`Sunny`,[dp.ClearNight]:`Clear night`,[dp.Cloudy]:`Cloudy`,[dp.PartlyCloudy]:`Partly cloudy`,[dp.PartlyCloudyNight]:`Partly cloudy night`,[dp.RainyLight]:`Light rain`,[dp.Rainy]:`Rain`,[dp.RainyHeavy]:`Heavy rain`,[dp.Snowy]:`Snow`,[dp.Hail]:`Hail`,[dp.Foggy]:`Fog`,[dp.Thunderstorm]:`Thunderstorm`};function Lp(e){let{type:t,size:n=64,animated:r=!0,labels:i,className:a,style:o,...s}=E(`WeatherIcon`,e),c=D(`WeatherIcon`,i,Ip),d=r&&!Ne(`(prefers-reduced-motion: reduce)`),f=`weather-icon-clip-${(0,l.useId)().replace(/[^\w-]/g,``)}`,m=e=>(0,p.jsx)(`g`,{clipPath:`url(#${f})`,children:e});function h(){switch(t){case dp.ClearNight:return(0,p.jsx)(yp,{});case dp.Cloudy:return(0,p.jsxs)(p.Fragment,{children:[m((0,p.jsx)(`g`,{className:fp.weatherIconCloudBehind,children:(0,p.jsx)(hp,{delayed:!0})})),(0,p.jsx)(hp,{})]});case dp.PartlyCloudy:return(0,p.jsxs)(p.Fragment,{children:[m((0,p.jsx)(_p,{className:fp.weatherIconBehind})),(0,p.jsx)(hp,{})]});case dp.PartlyCloudyNight:return(0,p.jsxs)(p.Fragment,{children:[m((0,p.jsx)(yp,{className:fp.weatherIconBehind})),(0,p.jsx)(hp,{})]});case dp.RainyLight:case dp.Rainy:case dp.RainyHeavy:return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(hp,{}),(0,p.jsx)(Dp,{animated:d,intensity:t===dp.RainyLight?bp.Light:t===dp.RainyHeavy?bp.Heavy:bp.Medium})]});case dp.Snowy:return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(hp,{}),(0,p.jsx)(jp,{animated:d})]});case dp.Hail:return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(hp,{}),(0,p.jsx)(Np,{animated:d})]});case dp.Foggy:return(0,p.jsx)(Pp,{});case dp.Thunderstorm:return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(hp,{}),m((0,p.jsx)(Fp,{}))]});default:return(0,p.jsx)(_p,{})}}return(0,p.jsxs)(`svg`,{...s,role:`img`,"aria-label":c[t]??c[dp.Sunny],className:(0,u.default)(fp.weatherIcon,!d&&fp.weatherIconStill,a),style:{width:n,height:n,...o},viewBox:`0 0 100 100`,children:[(0,p.jsx)(`defs`,{children:(0,p.jsx)(`clipPath`,{id:f,clipRule:`evenodd`,children:(0,p.jsx)(`path`,{d:`M -20 -20 H 120 V 120 H -20 Z ${pp}`})})}),h()]})}var Rp={wizard:`wizard_uRBAN`,"wizard-content":`wizard-content_lcl4C`,wizardContent:`wizard-content_lcl4C`,"wizard-content-outOfFrame":`wizard-content-outOfFrame_Eks4Y`,wizardContentOutOfFrame:`wizard-content-outOfFrame_Eks4Y`,"wizard-content-container":`wizard-content-container_yxbCJ`,wizardContentContainer:`wizard-content-container_yxbCJ`};function zp({currentStep:e=0,stepCount:t=0,renderStep:n=()=>null,className:r,style:i,classNames:a,styles:o,...s}){let[c,d]=(0,l.useState)(void 0),[f,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(e),_=(0,l.useRef)([]),v=(0,l.useRef)(null);e!==h&&(g(e),m(!0)),(0,l.useEffect)(()=>{if(!f)return;let e=setTimeout(()=>m(!1),400);return()=>clearTimeout(e)},[f]),(0,l.useEffect)(()=>{v.current?.disconnect();let t=_.current[e];if(t)return d(t.clientHeight),v.current=new ResizeObserver(()=>{d(t.clientHeight)}),v.current.observe(t),()=>v.current?.disconnect()},[e,t]);let y={...c===void 0?{}:{height:`${c}px`},...o?.root,...i};return(0,p.jsx)(`div`,{...s,className:(0,u.default)(Rp.wizard,a?.root,r),style:y,children:(0,p.jsx)(`div`,{className:(0,u.default)(Rp.wizardContentContainer,a?.container),style:{width:`${t*100}%`,marginLeft:`-${e*100}%`,...o?.container},children:Array.from({length:t},(r,i)=>(0,p.jsx)(`div`,{ref:e=>{_.current[i]=e},className:(0,u.default)(Rp.wizardContent,a?.step),style:{width:`${100/t}%`,marginLeft:`${100/t*i}%`,...o?.step},children:(0,p.jsx)(`div`,{className:(0,u.default)({[Rp.wizardContentOutOfFrame]:e!==i&&!f},a?.stepContent),style:o?.stepContent,inert:e!==i||void 0,children:n(i)})},`wizardStep${i}`))})})}var Bp=e=>{Ue(e[0].message,{color:j.Error})},Vp=class extends y.FormValidatorGroup{constructor(e,t=null,n){super(e,t,{...n,onSubmitError:n?.onSubmitError??Bp}),this.Form=(0,y.createFormComponent)(this)}},Hp=class extends l.PureComponent{static{this.defaultProps={formValidator:null,onMouseEnter:null,onMouseLeave:null,onFocus:null,onBlur:null,onChange:null,errorMessage:``,isValid:!1,isRequired:!1,label:``}}constructor(e){super(e);let{formValidator:t}=e;t&&(t.label=e.label??``,t.validate(),t.registerOnUpdateListener(()=>{this.forceUpdate()})),this.state={isFocused:!1,isHovered:!1},this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.hasError=this.hasError.bind(this),this.renderTooltip=this.renderTooltip.bind(this),this.onChange=this.onChange.bind(this)}componentDidMount(){setTimeout(()=>this.setState({isFocused:!1,isHovered:!1}),1)}componentDidUpdate(e){let{formValidator:t}=this.props;e.formValidator&&t&&e.formValidator!==t&&t.registerOnUpdateListener(()=>{this.forceUpdate()})}onMouseEnter(e){let{onMouseEnter:t}=this.props;this.setState({isHovered:!0}),t&&t(e)}onMouseLeave(e){let{onMouseLeave:t}=this.props;this.setState({isHovered:!1}),t&&t(e)}onFocus(e){let{onFocus:t}=this.props;this.setState({isFocused:!0}),t&&t(e)}onBlur(e){let{formValidator:t,onBlur:n}=this.props;t&&(t.touched=!0),this.setState({isFocused:!1}),n&&n(e)}hasError(){let{errorMessage:e,isValid:t,formValidator:n}=this.props;return n?n.touched&&n.hasError():!t||!!e}isRequired(){let{isRequired:e,formValidator:t}=this.props;return!!(e||t&&t.validators.find(e=>e.validatorId===`required`))}renderTooltip(){let{errorMessage:e,formValidator:t}=this.props,{isHovered:n,isFocused:r}=this.state;return(0,p.jsx)(ya,{variant:`error`,message:t?t.getCurrentErrorMessage():e||``,isVisible:this.hasError()&&(r||n)})}onChange(e){let{onChange:t,formValidator:n}=this.props;if(n){let t=e;e&&e.target&&(t=e.target.value),n.set(t)}t&&t(e)}};function Up(e,{initialValues:t,onSubmit:n,onValidate:r,errorParser:i,onSubmitError:a}={}){return(0,y.useFormValidatorGroupInstance)(()=>new Vp(e,null,{initialValues:t,errorParser:i,onSubmitError:a}),n,r)}exports.Accordion=U,exports.AccordionStyleType=b,exports.ActionButtons=_e,exports.ActionIcon=ye,exports.AhroweProvider=Je,exports.Alert=Qe,exports.AnimatedLogo=nt,exports.AnimatedText=mt,exports.AnimatedTextUnit=it,exports.AnimatedTextVariant=rt,exports.Avatar=wt,exports.AvatarGroup=Tt,exports.Badge=bt,exports.BadgePosition=gt,exports.BadgeStyleType=ht,exports.BodyEnd=Ae,exports.Breadcrumb=Mn,exports.Button=he,exports.ButtonGroup=In,exports.ButtonGroupOrientation=Pn,exports.ButtonSize=oe,exports.ButtonStyleType=J,exports.ButtonType=se,exports.Calendar=Wi,exports.CalendarView=Jn,exports.Card=Ji,exports.CardActions=Qi,exports.CardContent=Zi,exports.CardHeader=Yi,exports.CardMedia=Xi,exports.CardStyleType=Gi,exports.Carousel=aa,exports.Checkbox=la,exports.Chip=ma,exports.ChipContainer=ha,exports.ChipStyleType=ua,exports.ColorPicker=Qa,exports.CommandPalette=Ao,exports.ConfigProvider=T,exports.ConfirmModal=Mo,exports.CopyButton=Io,exports.DEFAULT_SNAP_OPTIONS=c.a,exports.DEFAULT_WALL_ATTRS=c.R,exports.DatePicker=Cs,exports.Divider=Os,exports.DividerOrientation=Ts,exports.DividerTextPosition=ws,exports.DoorSwing=c.at,exports.Drawer=As,exports.DropZone=Rs,exports.DropZoneReturnType=Ms,exports.DropZoneStatus=js,exports.Dropdown=cs,exports.EmptyState=Yr,exports.ErrorBoundary=Hs,exports.Fab=qs,exports.Flip=Xs,Object.defineProperty(exports,"FormValidator",{enumerable:!0,get:function(){return y.FormValidator}}),exports.FormValidatorGroup=Vp,exports.HIT_PX=c.l,exports.HIT_PX_COARSE=c.u,exports.IconPicker=ec,exports.IdleManager=nc,exports.Input=Aa,exports.InputDropdown=cc,exports.InputIconPosition=Ea,exports.InputType=Ta,exports.InteractableDiv=Ot,exports.KanbanBoard=Lc,exports.KanbanColumn=gc,exports.KlipyPicker=Yc,exports.Loader=ae,exports.LoaderType=ee,exports.LoadingOverlay=el,exports.MIN_FLOOR_HEIGHT=c.C,exports.MIN_OPENING_WIDTH=c.nt,exports.MIN_WALL_LENGTH=c.rt,exports.Menu=ol,exports.Modal=ro,exports.MultiSelect=dl,exports.NumberInput=Cl,exports.OpeningKind=c.ot,exports.OptionPicker=di,exports.OtpInput=Al,exports.OtpInputCharset=wl,exports.Overscroll=Pl,exports.PLAN_FORMAT_VERSION=c.n,exports.Pagination=Vl,exports.PlanIssueKind=c.st,exports.PlanUnitSystem=c.ct,exports.Popover=On,exports.PopoverAlign=zt,exports.PopoverPlacement=Rt,exports.PopoverTrigger=Bt,exports.Presentation=k,exports.ProgressBar=Ul,exports.RadioGroup=Kl,exports.RadioGroupOrientation=Wl,exports.Rating=Xl,exports.RevealLens=tu,exports.Ripple=ue,exports.RoomDrawer=wu,exports.RoomViewer=ju,exports.ScrollFade=Pu,exports.ScrollFadeAxis=Mu,exports.ScrollbarProvider=Z,exports.SearchInput=Hc,exports.SectionHeader=Ru,exports.SectionHeaderSize=Fu,exports.Skeleton=Wu,exports.SkeletonAnimation=Bu,exports.SkeletonVariant=zu,exports.Slider=qu,exports.SnapKind=c.o,exports.SplitButton=Xu,exports.Stepper=ld,exports.StepperCollapse=ed,exports.StepperLabelPlacement=td,exports.StepperOrientation=Qu,exports.StepperStyleType=$u,exports.Sticky=md,exports.Switch=gd,exports.TabHeader=vd,exports.Textarea=yd,exports.ThemeColor=j,exports.ThemeProvider=De,exports.Tilt=jd,exports.TiltGroup=Cd,exports.TiltGroupContext=xd,exports.TimeInput=$d,exports.Timeline=nf,exports.TimelineAlignment=tf,exports.Timer=uf,exports.Tooltip=ya,exports.Tree=up,exports.ValidatableComponent=Hp,Object.defineProperty(exports,"Validators",{enumerable:!0,get:function(){return y.Validators}}),exports.VirtualList=ap,exports.WallType=c.lt,exports.WeatherIcon=Lp,exports.WeatherType=dp,exports.Wizard=zp,exports.addFloor=c.w,exports.addOpening=c.z,exports.addRect=c.B,exports.addWall=c.V,exports.buildPlanMesh=c.t,exports.buildWallPaths=c.m,exports.cleanupPlan=c.H,exports.clientToWorld=c.s,exports.commitDerivation=c._,exports.dateToDay=Un,exports.dateToTime=Kn,exports.dayTimeToDate=qn,exports.dayToDate=Wn,exports.defaultTheme=Se,exports.defaultTiltEasing=wd,exports.deriveFaces=c.x,exports.derivePlan=c.v,exports.detachWall=c.U,exports.dissolveNode=c.W,exports.duplicateFloor=c.T,exports.emptyFloor=c.E,exports.emptyFloorPlan=c.D,exports.flattenTree=op,exports.floorBelow=c.O,exports.floorBounds=c.k,exports.floorIndex=c.A,exports.formatHotkey=ho,exports.getFloor=c.j,exports.getLocale=Wo,Object.defineProperty(exports,"hasEightPasswordChars",{enumerable:!0,get:function(){return y.hasEightPasswordChars}}),Object.defineProperty(exports,"hasOnePasswordDigit",{enumerable:!0,get:function(){return y.hasOnePasswordDigit}}),Object.defineProperty(exports,"hasOnePasswordLetter",{enumerable:!0,get:function(){return y.hasOnePasswordLetter}}),exports.hitTest=c.d,Object.defineProperty(exports,"isBic",{enumerable:!0,get:function(){return y.isBic}}),Object.defineProperty(exports,"isDate",{enumerable:!0,get:function(){return y.isDate}}),Object.defineProperty(exports,"isDay",{enumerable:!0,get:function(){return y.isDay}}),Object.defineProperty(exports,"isEmail",{enumerable:!0,get:function(){return y.isEmail}}),Object.defineProperty(exports,"isISODate",{enumerable:!0,get:function(){return y.isISODate}}),exports.isMenuAction=Co,exports.isMenuHeading=So,exports.isMenuSeparator=xo,Object.defineProperty(exports,"isNumber",{enumerable:!0,get:function(){return y.isNumber}}),Object.defineProperty(exports,"isPassword",{enumerable:!0,get:function(){return y.isPassword}}),Object.defineProperty(exports,"isURL",{enumerable:!0,get:function(){return y.isURL}}),exports.lightTheme=Oe,exports.mapLocale=Vo,exports.menuHotkeys=sl,exports.mergeNodes=c.G,exports.moveFloor=c.M,exports.moveNode=c.K,exports.nodeDegrees=c.S,exports.openingGeometry=c.h,exports.planFromJson=c.r,exports.planToJson=c.i,exports.pruneUnmatchedRooms=c.y,exports.removeFloor=c.N,exports.removeOpening=c.q,exports.removeWall=c.J,exports.renameFloor=c.P,exports.resolveSnap=c.c,exports.roomAtPoint=c.b,exports.scalePlan=c.Y,exports.selectionsEqual=c.f,exports.setFloor=c.F,exports.setFloorHeight=c.I,exports.setLocale=Uo,exports.showToast=Ue,exports.splitWall=c.X,exports.tabbablesIn=rn,exports.transformPlan=c.Z,exports.updateFloor=c.L,exports.updateOpening=c.Q,exports.useClipboard=No,exports.useCoarsePointer=Pe,exports.useComponentDefaults=E,Object.defineProperty(exports,"useFormValidator",{enumerable:!0,get:function(){return y.useFormValidator}}),exports.useFormValidatorGroup=Up,exports.useHotkeys=_o,exports.useLabels=D,exports.useMediaQuery=Ne,exports.useOverlay=dn,exports.usePresentationDefault=O,exports.useScrollEdges=to,exports.useSwipeDismiss=Le,exports.useTheme=bd,exports.useTiltGroup=Sd,exports.useVisualViewportSize=sn,exports.validatePlan=c.$,exports.wallCentrelineSpans=c.g,exports.wallLength=c.et,exports.weldShortWalls=c.tt,exports.worldTolerances=c.p;
11
+ `};function Lc({columns:e,items:t,renderItem:n,onChange:r,dragHandle:i,getItemLabel:a=Mc,getItemDisabled:o,renderEmptyColumn:s,renderColumnActions:c,reorderableColumns:d,collapseEmptyColumns:f=!1,columnMaxHeight:m,onLoadMore:_,loadMoreThreshold:v,onKeyDown:y,className:b,style:x,classNames:S,styles:C,...w}){let[T,E]=(0,l.useState)(null),[D,O]=(0,l.useState)(!1),[k,A]=(0,l.useState)(null),j=(0,l.useRef)(null),M=(0,l.useRef)(null),N=(0,l.useRef)(null),P=(0,l.useCallback)(e=>{let t=M.current,n=N.current?.current.translated;return!t||!n||t.contains(e)?!0:Sc(e===document.scrollingElement?{top:0,bottom:window.innerHeight}:e.getBoundingClientRect(),t.getBoundingClientRect(),n)},[]),[,F]=(0,l.useState)(0),I=T!==null;(0,l.useEffect)(()=>{if(!I)return;let e=({target:e})=>{let t=M.current;if(!t||!(e instanceof Node)||!(e.contains(t)||t.contains(e)))return;j.current=null;let n=e===document?document.scrollingElement:e;n instanceof Element&&!P(n)&&F(e=>e+1)};return window.addEventListener(`scroll`,e,{capture:!0,passive:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})},[I,P]);let L=(0,h.useSensors)((0,h.useSensor)(h.MouseSensor,Nc),(0,h.useSensor)(h.TouchSensor,Pc),(0,h.useSensor)(h.KeyboardSensor,Fc)),R=(0,l.useMemo)(()=>Ec(e,k),[e,k]),z=(0,l.useMemo)(()=>R.map(e=>e.id),[R]),B=(0,l.useMemo)(()=>new Set(f?e.filter(e=>e.itemIds.length===0).map(e=>e.id):[]),[e,f]),V=(0,l.useMemo)(()=>kc(R,t,a),[R,t,a]),H=(0,l.useMemo)(()=>({announcements:V,screenReaderInstructions:Ic}),[V]);function U(e){if(y?.(e),e.defaultPrevented||T!==null||!M.current||!(e.target instanceof HTMLElement)||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;let t=Oc(M.current,e.target,e.key);t&&(e.preventDefault(),t.focus())}function W({active:e}){E(String(e.id)),O(yc(e.data.current)),N.current=e.rect,j.current=null}function G({active:t,over:n}){if(!n)return;if(yc(t.data.current)){let r=String(t.id),i=String(n.id);A(t=>{let n=Ec(e,t),a=bc(n,r,i);return a===n?t:Tc(a,r,!0)});return}let r=String(t.id),i=String(n.id),a=t.rect.current.translated??t.rect.current.initial,o=a?`${a.top}:${a.left}`:null;(o===null||o!==j.current)&&(j.current=o,A(t=>{let o=Ec(e,t),s=wc(o,r,i,{activeRect:a,overRect:n.rect});return s===o?t:Tc(s,r,!1)}))}function ee({over:t}){K(),t&&!_c(R,e)&&r(R)}function K(){E(null),O(!1),A(null)}let te=T&&D?R.find(e=>e.id===T):void 0;return(0,p.jsxs)(h.DndContext,{sensors:L,collisionDetection:xc,onDragStart:W,onDragOver:G,onDragEnd:ee,onDragCancel:K,accessibility:H,autoScroll:{canScroll:e=>P(e)},children:[(0,p.jsx)(g.SortableContext,{id:`kanban-columns`,items:z,strategy:g.horizontalListSortingStrategy,children:(0,p.jsx)(`div`,{...w,ref:M,className:(0,u.default)(lc.board,b),style:x,onKeyDown:U,children:R.map(e=>(0,p.jsx)(gc,{id:e.id,title:e.title,itemIds:e.itemIds,maxItems:e.maxItems,disabled:e.disabled,getItemDisabled:o,getItemLabel:a,emptyPlaceholder:s?.(e),actions:c?.(e),reorderable:d,activeIsColumn:T!==null&&D,collapsed:B.has(e.id),columnMaxHeight:m,hasMore:e.hasMore,onLoadMore:_?()=>_(e.id):void 0,loadMoreThreshold:v,items:t,renderItem:n,dragHandle:i},e.id))})}),(0,p.jsx)(h.DragOverlay,{children:te?(0,p.jsx)(`div`,{className:(0,u.default)(lc.column,lc.columnDragOverlay),inert:!0,children:(0,p.jsx)(`div`,{className:lc.columnHeader,children:(0,p.jsx)(hc,{title:te.title,count:te.itemIds.length,maxItems:te.maxItems,actions:c?.(te)})})}):T&&!D&&t[T]!==void 0?(0,p.jsx)(`div`,{className:(0,u.default)(lc.dragOverlay,S?.dragOverlay),style:C?.dragOverlay,children:n(t[T],T)}):null})]})}var Rc=`https://api.klipy.com/v2`,zc=class{constructor(e){this.key=e}async search(e,t={}){let n=new URLSearchParams({q:e,key:this.key});return t.limit!=null&&n.set(`limit`,String(t.limit)),t.contentfilter!=null&&n.set(`contentfilter`,t.contentfilter),t.pos!=null&&n.set(`pos`,t.pos),(await fetch(`${Rc}/search?${n}`)).json()}async searchSuggestions(e){let t=new URLSearchParams({q:e,key:this.key});return(await fetch(`${Rc}/search_suggestions?${t}`)).json()}registerShare(e,t){let n=new URLSearchParams({id:t,q:e,key:this.key});fetch(`${Rc}/registershare?${n}`).catch(()=>null)}},Bc={resultCount:`resultCount_Sn48Q`},Vc={results:e=>`${e} ${e===1?`result`:`results`}`};function Hc({value:e,onChange:t,onDebounce:n,placeholder:r,label:i,debounceMs:a=500,totalAmount:o,showAmount:s=!0,className:c,width:d,style:f,classNames:m,styles:h,labels:g,ref:_,...v}){let y=D(`SearchInput`,g,Vc),b=(0,l.useRef)(null);(0,l.useEffect)(()=>()=>{b.current!==null&&clearTimeout(b.current)},[]);function x(e){let r=e==null?``:String(e),i=r.trim()===``?``:r;t(i),b.current!==null&&clearTimeout(b.current),b.current=setTimeout(()=>{n?.(i)},a)}let S=s&&typeof o==`number`&&!Number.isNaN(o);return(0,p.jsxs)(`div`,{...v,className:(0,u.default)(c,m?.root),style:{...d==null?void 0:{width:d},...f,...h?.root},children:[(0,p.jsx)(Aa,{ref:_,autoComplete:`off`,className:m?.input,style:h?.input,type:Ta.Search,label:i,placeholder:r,value:e,onChange:x}),S&&(0,p.jsx)(`p`,{className:(0,u.default)(Bc.resultCount,m?.resultCount),style:h?.resultCount,children:y.results(o)})]})}var Uc={gifPreview:`gifPreview_jAXT2`,"gifPreview-image":`gifPreview-image_41bwm`,gifPreviewImage:`gifPreview-image_41bwm`,"gifPreview-image-container":`gifPreview-image-container_5hAjJ`,gifPreviewImageContainer:`gifPreview-image-container_5hAjJ`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_9EI0A`};function Wc({className:e,previewItems:t=[],onSelect:n,onLoadAdditional:r}){function i(e){let t=e.currentTarget,n=t.scrollHeight-t.clientHeight*1.5;t.scrollTop>=n&&r?.()}return(0,p.jsx)(p.Fragment,{children:t.length>0&&(0,p.jsx)(`div`,{className:(0,u.default)(Uc.gifPreview,e),onScroll:i,children:t.map((e,t)=>(0,p.jsx)(Ot,{className:Uc.gifPreviewImageContainer,onClick:()=>n?.(e),children:(0,p.jsx)(`div`,{className:Uc.gifPreviewImage,style:{backgroundImage:`url(${e.media_formats.tinygif.url})`}})},`${e.id}_${t}`))})})}var Gc={gifView:`gifView_YUeLK`,"gifView-loading":`gifView-loading_N1Lzx`,gifViewLoading:`gifView-loading_N1Lzx`,gradientBottomLeftToTopRight:`gradientBottomLeftToTopRight_OmJUc`};function Kc({className:e,src:t=``}){let[n,r]=(0,l.useState)(null),i=n!==t;return(0,p.jsxs)(`div`,{className:(0,u.default)(Gc.gifView,e),children:[(0,p.jsx)(`img`,{className:Gc.klipyPickerSelected,src:t,onLoad:()=>r(t)}),i&&(0,p.jsx)(`div`,{className:Gc.gifViewLoading})]})}var qc={"klipyPicker-selected":`klipyPicker-selected_Watxl`,klipyPickerSelected:`klipyPicker-selected_Watxl`,"klipyPicker-modal-content":`klipyPicker-modal-content_3CBV9`,klipyPickerModalContent:`klipyPicker-modal-content_3CBV9`,"klipyPicker-suggestions-container":`klipyPicker-suggestions-container_-csDI`,klipyPickerSuggestionsContainer:`klipyPicker-suggestions-container_-csDI`,"klipyPicker-suggestions-item":`klipyPicker-suggestions-item_nHHSA`,klipyPickerSuggestionsItem:`klipyPicker-suggestions-item_nHHSA`},Jc={search:`Pick gif`};function Yc({className:e,token:t=``,isModal:n=!1,onSelect:r=()=>void 0,selected:i=null,labels:a}){let o=D(`KlipyPicker`,a,Jc),s=(0,l.useMemo)(()=>new zc(t),[t]),[c,d]=(0,l.useState)(``),[f,m]=(0,l.useState)([]),[h,g]=(0,l.useState)([]),[_,v]=(0,l.useState)(null),[y,b]=(0,l.useState)(!1);async function x(e){if(d(e),!e.trim()){m([]),g([]),v(null);return}let[{results:t=[],next:n=null},{results:r=[]}]=await Promise.all([s.search(e,{limit:18,contentfilter:`medium`}),s.searchSuggestions(e)]);m(t),v(n),g(r)}async function S(){let{results:e=[],next:t=null}=await s.search(c,{limit:36,pos:_??void 0,contentfilter:`medium`});v(t),m(t=>[...t,...e])}async function C(e){await r(e),b(!1),e&&s.registerShare(c,e.id)}function w(){return(0,p.jsx)(ha,{inline:!0,className:qc.klipyPickerSuggestionsContainer,children:h.map(e=>(0,p.jsx)(ma,{className:qc.klipyPickerSuggestionsItem,text:e,onClick:()=>x(e)},e))})}function T(){return(0,p.jsx)(Wc,{previewItems:f,onSelect:C,onLoadAdditional:S})}function E(){return(0,p.jsx)(Hc,{label:o.search,value:c,onDebounce:x,onChange:d})}return n?(0,p.jsxs)(`div`,{className:(0,u.default)(qc.klipyPicker,e),children:[(0,p.jsxs)(`div`,{className:W.actionButtons,children:[(0,p.jsx)(he,{onClick:()=>b(!0),children:`Pick gif`}),i&&(0,p.jsx)(he,{styleType:J.Filled,color:j.Error,onClick:()=>C(null),children:`Remove gif`})]}),i&&(0,p.jsx)(Kc,{className:qc.klipyPickerSelected,src:i}),(0,p.jsx)(ro,{isOpen:y,onClose:()=>b(!1),children:(0,p.jsxs)(`div`,{className:qc.klipyPickerModalContent,children:[E(),w(),T()]})})]}):(0,p.jsxs)(`div`,{className:(0,u.default)(qc.klipyPicker,e),children:[(0,p.jsx)(On,{placement:Rt.Bottom,align:zt.Start,isOpen:f.length>0&&y,onOpenChange:b,closeOnTriggerClick:!1,constrainWidth:!1,content:(0,p.jsxs)(p.Fragment,{children:[w(),T()]}),children:E()}),i&&(0,p.jsx)(he,{styleType:J.Filled,color:j.Error,onClick:()=>C(null),children:`Remove gif`}),i&&(0,p.jsx)(Kc,{className:qc.klipyPickerSelected,src:i})]})}var Xc={loadingOverlay:`loadingOverlay_B-hL-`,"loadingOverlay-content":`loadingOverlay-content_vLj-j`,loadingOverlayContent:`loadingOverlay-content_vLj-j`,"loadingOverlay-backdrop":`loadingOverlay-backdrop_5cssk`,loadingOverlayBackdrop:`loadingOverlay-backdrop_5cssk`,loadingOverlayFade:`loadingOverlayFade_r6R92`,"loadingOverlay-backdrop-leaving":`loadingOverlay-backdrop-leaving_0OV9m`,loadingOverlayBackdropLeaving:`loadingOverlay-backdrop-leaving_0OV9m`,"loadingOverlay-panel":`loadingOverlay-panel_2dDYB`,loadingOverlayPanel:`loadingOverlay-panel_2dDYB`,loadingOverlayRise:`loadingOverlayRise_Hsje2`,"loadingOverlay-message":`loadingOverlay-message_JcJjt`,loadingOverlayMessage:`loadingOverlay-message_JcJjt`,loadingOverlayShimmer:`loadingOverlayShimmer_0BbGN`},Zc=400,Qc=200;function $c(e,t){let[n,r]=(0,l.useState)(()=>e&&t<=0?`shown`:`hidden`),i=(0,l.useRef)(null);return(0,l.useEffect)(()=>{let a,o;if(e){if(n===`shown`){i.current??=Date.now();return}a=`shown`,o=n===`leaving`?0:t}else if(n===`shown`)a=`leaving`,o=Math.max(0,(i.current??0)+Zc-Date.now());else if(n===`leaving`)a=`hidden`,o=Qc;else return;let s=setTimeout(()=>{a===`shown`&&(i.current=Date.now()),r(a)},o);return()=>clearTimeout(s)},[e,n,t]),n}function el(e){let{isLoading:t=!1,children:n,loader:r,message:i,delay:a=200,className:o,style:s,classNames:c,styles:d,...f}=E(`LoadingOverlay`,e),m=$c(t,a),h=(0,l.useId)(),g=i!=null&&typeof i!=`boolean`&&i!==``;return(0,p.jsxs)(`div`,{...f,className:(0,u.default)(Xc.loadingOverlay,o),style:s,children:[(0,p.jsx)(`div`,{"aria-busy":t||void 0,className:(0,u.default)(Xc.loadingOverlayContent,c?.content),style:d?.content,children:n}),m!==`hidden`&&(0,p.jsx)(`div`,{className:(0,u.default)(Xc.loadingOverlayBackdrop,m===`leaving`&&Xc.loadingOverlayBackdropLeaving,c?.backdrop),style:d?.backdrop,children:(0,p.jsxs)(`div`,{className:(0,u.default)(Xc.loadingOverlayPanel,c?.panel),style:d?.panel,children:[r??(0,p.jsx)(ae,{"aria-labelledby":g?h:void 0}),g&&(0,p.jsx)(`div`,{id:h,className:(0,u.default)(Xc.loadingOverlayMessage,c?.message),style:d?.message,children:i})]})})]})}var tl={menuPanel:`menuPanel_ldsja`,menu:`menu_QNY8D`,"menu-trigger":`menu-trigger_YbVFX`,menuTrigger:`menu-trigger_YbVFX`,"menu-item":`menu-item_-dxHx`,menuItem:`menu-item_-dxHx`,"menu-item-danger":`menu-item-danger_sztTU`,menuItemDanger:`menu-item-danger_sztTU`,"menu-item-icon":`menu-item-icon_BM1Ks`,menuItemIcon:`menu-item-icon_BM1Ks`,"menu-item-label":`menu-item-label_sK5Z5`,menuItemLabel:`menu-item-label_sK5Z5`,"menu-item-shortcut":`menu-item-shortcut_lRTZF`,menuItemShortcut:`menu-item-shortcut_lRTZF`,"menu-separator":`menu-separator_HfNOp`,menuSeparator:`menu-separator_HfNOp`,"menu-heading":`menu-heading_QSu4U`,menuHeading:`menu-heading_QSu4U`},nl=600;function rl(e,t,n){for(let r=1;r<=e.length;r++){let i=(t+n*r+e.length*r)%e.length,a=e[i];if(Co(a)&&!a.disabled)return i}return-1}function il(e){return e.findIndex(e=>Co(e)&&!e.disabled)}function al(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Co(n)&&!n.disabled)return t}return-1}function ol({items:e,children:t,onAction:n,isOpen:r,onOpenChange:i,placement:a=Rt.Bottom,align:o=zt.Start,presentation:s,className:c,style:d,classNames:f,styles:m,...h}){let g=r!==void 0,[_,v]=(0,l.useState)(!1),y=g?r:_,[b,x]=(0,l.useState)(-1),S=(0,l.useRef)([]),C=(0,l.useRef)(null),w=(0,l.useRef)(null),{restoreFocusToTrigger:T,focusAfterTrigger:E}=on({triggerRef:C,contentRef:w}),D=(0,l.useId)(),O=(0,l.useRef)(`first`),k=(0,l.useRef)({query:``,timer:void 0}),A=(0,l.useRef)(!1);function j(e,t=!1){e&&(A.current=t),g||v(e),i?.(e)}let M=(0,l.useRef)(e);(0,l.useEffect)(()=>{M.current=e}),(0,l.useEffect)(()=>{if(!y)return;if(!A.current){x(-1);return}let e=M.current,t=O.current===`last`?al(e):il(e);x(t);let n=requestAnimationFrame(()=>{S.current[t]?.focus()});return()=>{cancelAnimationFrame(n),O.current=`first`}},[y]),(0,l.useEffect)(()=>()=>clearTimeout(k.current.timer),[]);function N(e){e<0||(x(e),S.current[e]?.focus())}function P(e){j(!1),e&&T()}function F(t){if(t.length!==1||!t.trim())return!1;clearTimeout(k.current.timer),k.current.query+=t.toLowerCase(),k.current.timer=setTimeout(()=>{k.current.query=``},nl);let n=k.current.query,r=n.length>1&&[...n].every(e=>e===n[0]),i=r?n[0]:n,a=r||n.length===1?b:b-1;for(let t=1;t<=e.length;t++){let n=(a+t+e.length)%e.length,r=e[n];if(Co(r)&&!r.disabled&&(S.current[n]?.textContent?.trim().toLowerCase()??``).startsWith(i))return N(n),!0}return!1}function I(t){if(t.key===`ArrowDown`||t.key===`ArrowUp`){if(t.preventDefault(),t.stopPropagation(),y){N(t.key===`ArrowUp`?al(e):il(e));return}O.current=t.key===`ArrowUp`?`last`:`first`,j(!0,!0)}}function L(t){switch(t.key){case`ArrowDown`:N(rl(e,b,1));break;case`ArrowUp`:N(b<0?al(e):rl(e,b,-1));break;case`Home`:N(il(e));break;case`End`:N(al(e));break;case`Escape`:P(!0);break;case`Tab`:P(!1),t.shiftKey?T():E();break;default:if(!F(t.key))return}t.preventDefault(),t.stopPropagation()}function R(t){let r=e[t];Co(r)&&!r.disabled&&(r.onClick?.(),n?.(r.id),P(!0))}let z=(0,l.isValidElement)(t)?(0,l.cloneElement)(t,{"aria-haspopup":t.props[`aria-haspopup`]??`menu`,"aria-expanded":t.props[`aria-expanded`]??y,"aria-controls":y?t.props[`aria-controls`]??D:t.props[`aria-controls`]}):t,B=(0,p.jsx)(`div`,{ref:w,id:D,role:`menu`,className:(0,u.default)(tl.menu,f?.menu),style:m?.menu,onKeyDown:L,children:e.map((e,t)=>xo(e)?(0,p.jsx)(`div`,{role:`separator`,className:(0,u.default)(tl.menuSeparator,f?.separator),style:m?.separator},`separator-${t}`):So(e)?(0,p.jsx)(`div`,{role:`presentation`,className:(0,u.default)(tl.menuHeading,f?.heading),style:m?.heading,children:e.heading},`heading-${t}`):(0,p.jsxs)(`button`,{ref:e=>{S.current[t]=e},type:`button`,role:`menuitem`,disabled:e.disabled,tabIndex:t===b?0:-1,className:(0,u.default)(tl.menuItem,e.danger&&tl.menuItemDanger,f?.item),style:m?.item,onClick:()=>R(t),onMouseEnter:()=>x(t),children:[e.icon!=null&&X(e.icon,{className:(0,u.default)(tl.menuItemIcon,f?.itemIcon),style:m?.itemIcon}),(0,p.jsx)(`span`,{className:(0,u.default)(tl.menuItemLabel,f?.itemLabel),style:m?.itemLabel,children:e.label}),e.shortcut!=null&&(0,p.jsx)(`span`,{className:(0,u.default)(tl.menuItemShortcut,f?.itemShortcut),style:m?.itemShortcut,children:ho(e.shortcut)})]},e.id))});return(0,p.jsx)(On,{...h,isOpen:y,onOpenChange:(e,{fromKeyboard:t})=>j(e,t),placement:a,align:o,presentation:s,content:B,focusOnOpen:!1,constrainWidth:!1,classNames:{panel:tl.menuPanel},className:(0,u.default)(c,f?.root),style:{...d,...m?.root},children:(0,p.jsx)(`span`,{ref:C,className:(0,u.default)(tl.menuTrigger,f?.trigger),style:m?.trigger,onKeyDown:I,children:z})})}function sl(e,t){let n={};for(let r of e)Co(r)&&!r.disabled&&r.shortcut&&(n[r.shortcut]=()=>{r.onClick?.(),t?.(r.id)});return n}var cl={multiSelect:`multiSelect_fmViY`,"multiSelect-label":`multiSelect-label_asHZ1`,multiSelectLabel:`multiSelect-label_asHZ1`,"multiSelect-label-floating":`multiSelect-label-floating_d4-Om`,multiSelectLabelFloating:`multiSelect-label-floating_d4-Om`,"multiSelect-fieldset":`multiSelect-fieldset_Eo29l`,multiSelectFieldset:`multiSelect-fieldset_Eo29l`,"multiSelect-fieldset-focused":`multiSelect-fieldset-focused_ZC2P6`,multiSelectFieldsetFocused:`multiSelect-fieldset-focused_ZC2P6`,"multiSelect-fieldset-error":`multiSelect-fieldset-error_CWzEo`,multiSelectFieldsetError:`multiSelect-fieldset-error_CWzEo`,"multiSelect-fieldset-legend":`multiSelect-fieldset-legend_p-6nh`,multiSelectFieldsetLegend:`multiSelect-fieldset-legend_p-6nh`,"multiSelect-fieldset-legend-active":`multiSelect-fieldset-legend-active_M0L7g`,multiSelectFieldsetLegendActive:`multiSelect-fieldset-legend-active_M0L7g`,"multiSelect-control":`multiSelect-control_zLb7t`,multiSelectControl:`multiSelect-control_zLb7t`,"multiSelect-values":`multiSelect-values_k1Q8x`,multiSelectValues:`multiSelect-values_k1Q8x`,"multiSelect-chip":`multiSelect-chip_xqe8Q`,multiSelectChip:`multiSelect-chip_xqe8Q`,"multiSelect-placeholder":`multiSelect-placeholder_Tjrmh`,multiSelectPlaceholder:`multiSelect-placeholder_Tjrmh`,"multiSelect-placeholder-shown":`multiSelect-placeholder-shown_8v36t`,multiSelectPlaceholderShown:`multiSelect-placeholder-shown_8v36t`,multiSelectFadeIn:`multiSelectFadeIn_rOplX`,"multiSelect-placeholder-instant":`multiSelect-placeholder-instant_r9-TD`,multiSelectPlaceholderInstant:`multiSelect-placeholder-instant_r9-TD`,"multiSelect-clearButton":`multiSelect-clearButton_FKs0m`,multiSelectClearButton:`multiSelect-clearButton_FKs0m`,"multiSelect-icon":`multiSelect-icon_ovLu-`,multiSelectIcon:`multiSelect-icon_ovLu-`,"multiSelect-icon-open":`multiSelect-icon-open_h8VAu`,multiSelectIconOpen:`multiSelect-icon-open_h8VAu`,"multiSelect-disabled":`multiSelect-disabled_Hm8mv`,multiSelectDisabled:`multiSelect-disabled_Hm8mv`,"multiSelect-panel":`multiSelect-panel_VX7gU`,multiSelectPanel:`multiSelect-panel_VX7gU`,"multiSelect-search":`multiSelect-search_g4OHX`,multiSelectSearch:`multiSelect-search_g4OHX`,"multiSelect-options":`multiSelect-options_MGZCv`,multiSelectOptions:`multiSelect-options_MGZCv`,"multiSelect-option":`multiSelect-option_hbvPY`,multiSelectOption:`multiSelect-option_hbvPY`,"multiSelect-option-active":`multiSelect-option-active_mSWFG`,multiSelectOptionActive:`multiSelect-option-active_mSWFG`,"multiSelect-option-selected":`multiSelect-option-selected_mjPq-`,multiSelectOptionSelected:`multiSelect-option-selected_mjPq-`,"multiSelect-option-disabled":`multiSelect-option-disabled_qSgYz`,multiSelectOptionDisabled:`multiSelect-option-disabled_qSgYz`,"multiSelect-optionCheck":`multiSelect-optionCheck_-YKoj`,multiSelectOptionCheck:`multiSelect-optionCheck_-YKoj`,"multiSelect-optionLabel":`multiSelect-optionLabel_CFZke`,multiSelectOptionLabel:`multiSelect-optionLabel_CFZke`,"multiSelect-empty":`multiSelect-empty_MjABY`,multiSelectEmpty:`multiSelect-empty_MjABY`},ll=[],ul={clearSelection:`Clear selection`,create:e=>`Add "${e}"`,searchPlaceholder:`Search…`,empty:`No matches`};function dl(e){let{items:t,value:n,defaultValue:r=[],onChange:i=()=>{},label:a=``,alwaysFloatLabel:o=!1,placeholder:s=``,searchable:c=!1,allowCustomValues:m=!1,maxSelected:h,clearable:g=!0,disabled:_=!1,readOnly:v=!1,presentation:y,formValidator:b=null,errorMessage:x=``,isValid:S=!0,className:C,style:w,classNames:T,styles:O,onMouseEnter:k,onMouseLeave:A,onFocus:j,onBlur:M,labels:N,...P}=E(`MultiSelect`,e),F=D(`MultiSelect`,N,ul),I=(0,l.useRef)(null),L=(0,l.useRef)(null),R=(0,l.useRef)(null),z=(0,l.useRef)(null),B=(0,l.useId)(),[V,H]=(0,l.useState)(r),[U,W]=(0,l.useState)(!1),[G,ee]=(0,l.useState)(``),[K,te]=(0,l.useState)(0),[ne,re]=(0,l.useState)(!1),[q,ie]=(0,l.useState)(!1),[ae,J]=(0,l.useState)(),oe=(0,l.useRef)(b),[,se]=(0,l.useState)(0);(0,l.useEffect)(()=>{oe.current=b;let e=oe.current;if(!e)return;e.label=a,e.validate();let t=()=>se(e=>e+1);return e.registerOnUpdateListener(t),()=>{e.removeOnUpdateListener(t)}},[b,a]);let ce=n!==void 0&&!b,le=b?b.value:ce?n:V,Y=Array.isArray(le)?le:ll,ue=b?b.touched&&b.hasError():!S||!!x,de=b?b.getCurrentErrorMessage():x||``,X=!_&&!v,fe=h!==void 0&&Y.length>=h,pe=o||U||ne||Y.length>0,me=c||m,he=G.trim(),ge=me?he.toLowerCase():``,_e=ge?t.filter(e=>e.label.toLowerCase().includes(ge)):t,ve=m&&he.length>0&&!fe&&!t.some(e=>e.label.toLowerCase()===ge||String(e.key).toLowerCase()===ge)&&!Y.some(e=>String(e).toLowerCase()===ge),ye=ve?[..._e,{key:he,label:F.create(he)}]:_e,be=Y.map(e=>t.find(t=>t.key===e)??(m?{key:e,label:String(e)}:void 0)).filter(e=>e!==void 0);function xe(e){b?b.set(e):ce||H(e),i(e)}function Z(e){X&&!e.disabled&&(Y.includes(e.key)?xe(Y.filter(t=>t!==e.key)):fe||xe([...Y,e.key]),ve&&e.key===he&&ee(``))}function Se(){I.current?.contains(document.activeElement)&&L.current?.focus()}function Ce(e){(!e||X)&&(W(e),e?(J(L.current?.offsetWidth),te(0)):(ee(``),oe.current&&(oe.current.touched=!0)))}(0,l.useEffect)(()=>{U&&me&&R.current?.querySelector(`input`)?.focus()},[U,me]),(0,l.useEffect)(()=>{U&&bo(z.current,document.getElementById(`${B}-${K}`))},[U,K,B]);let we={isDisabled:e=>{let t=ye[e];return!!t.disabled||fe&&!Y.includes(t.key)}};function Te(e){if(X){if(!U){e.key===`ArrowDown`||e.key===`Enter`||e.key===` `?(e.preventDefault(),Ce(!0)):e.key===`Backspace`&&Y.length>0&&xe(Y.slice(0,-1));return}if(e.key===`ArrowDown`||e.key===`ArrowUp`)e.preventDefault(),te(vo(K,e.key===`ArrowDown`?1:-1,ye.length,we)??0);else if(e.key===`Home`||e.key===`End`)e.preventDefault(),te(yo(e.key===`Home`?`first`:`last`,ye.length,we)??0);else if(e.key===`Enter`){e.preventDefault();let t=ye[K];t&&Z(t)}else e.key===`Backspace`&&!G&&Y.length>0&&xe(Y.slice(0,-1))}}let Ee=(0,p.jsxs)(`div`,{className:(0,u.default)(cl.multiSelectPanel,T?.panel),style:O?.panel,children:[me&&(0,p.jsx)(`div`,{ref:R,className:(0,u.default)(cl.multiSelectSearch,T?.search),style:O?.search,children:(0,p.jsx)(Hc,{value:G,onChange:e=>{ee(e),te(0)},placeholder:F.searchPlaceholder,onKeyDown:Te})}),(0,p.jsx)(`div`,{ref:z,id:B,role:`listbox`,"aria-multiselectable":`true`,"aria-label":a||void 0,className:(0,u.default)(cl.multiSelectOptions,T?.options),style:O?.options,children:ye.length===0?(0,p.jsx)(`div`,{className:(0,u.default)(cl.multiSelectEmpty,T?.empty),style:O?.empty,children:F.empty}):ye.map((e,t)=>{let n=Y.includes(e.key),r=e.disabled||fe&&!n;return(0,p.jsxs)(`div`,{id:`${B}-${t}`,role:`option`,"aria-selected":n,"aria-disabled":r||void 0,className:(0,u.default)(cl.multiSelectOption,t===K&&cl.multiSelectOptionActive,n&&cl.multiSelectOptionSelected,r&&cl.multiSelectOptionDisabled,T?.option),style:O?.option,onMouseDown:e=>e.preventDefault(),onMouseEnter:()=>te(t),onClick:()=>Z(e),children:[(0,p.jsx)(`span`,{className:(0,u.default)(cl.multiSelectOptionCheck,T?.optionCheck),style:O?.optionCheck,children:n&&(0,p.jsx)(d.FontAwesomeIcon,{icon:f.faCheck})}),(0,p.jsx)(`span`,{className:(0,u.default)(cl.multiSelectOptionLabel,T?.optionLabel),style:O?.optionLabel,children:e.label})]},e.key)})})]});return(0,p.jsxs)(`div`,{...P,ref:I,className:(0,u.default)(cl.multiSelect,_&&cl.multiSelectDisabled,T?.root,C),style:{...w,...O?.root},onMouseEnter:e=>{ie(!0),k?.(e)},onMouseLeave:e=>{ie(!1),A?.(e)},onFocus:e=>{re(!0),j?.(e)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(re(!1),M?.(e))},children:[(0,p.jsx)(On,{isOpen:U,onOpenChange:Ce,trigger:Bt.Click,placement:Rt.Bottom,align:zt.Start,offset:4,withArrow:!1,focusOnOpen:me,constrainWidth:!1,width:`trigger`,disabled:!X,presentation:y,content:Ee,styles:{panel:ae?{minWidth:ae}:void 0},children:(0,p.jsxs)(`div`,{ref:L,role:`combobox`,tabIndex:_?-1:0,"aria-expanded":U,"aria-haspopup":`listbox`,"aria-controls":B,"aria-activedescendant":U&&ye.length>0?`${B}-${K}`:void 0,"aria-disabled":_||void 0,"aria-readonly":v||void 0,className:(0,u.default)(cl.multiSelectControl,T?.control),style:O?.control,onKeyDown:Te,children:[s&&be.length===0&&(0,p.jsx)(`span`,{className:(0,u.default)(cl.multiSelectPlaceholder,(!a||pe)&&cl.multiSelectPlaceholderShown,!a&&cl.multiSelectPlaceholderInstant,T?.placeholder),style:O?.placeholder,children:s}),(0,p.jsx)(`div`,{className:(0,u.default)(cl.multiSelectValues,T?.values),style:O?.values,children:be.map(e=>(0,p.jsx)(ma,{text:e.label,showRemoveIcon:X,labels:{remove:`Remove ${e.label}`},onMouseDown:e=>e.preventDefault(),onRemove:()=>{Z(e),Se()},className:(0,u.default)(cl.multiSelectChip,T?.chip),style:O?.chip},e.key))}),g&&X&&Y.length>0&&(0,p.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":F.clearSelection,className:(0,u.default)(cl.multiSelectClearButton,T?.clearButton),style:O?.clearButton,onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),xe([]),Se()},children:(0,p.jsx)(d.FontAwesomeIcon,{icon:f.faXmark})}),(0,p.jsx)(d.FontAwesomeIcon,{icon:f.faChevronDown,className:(0,u.default)(cl.multiSelectIcon,U&&cl.multiSelectIconOpen,T?.icon),style:O?.icon}),a&&(0,p.jsx)(`div`,{className:(0,u.default)(cl.multiSelectLabel,pe&&cl.multiSelectLabelFloating,T?.label),style:O?.label,children:a}),(0,p.jsx)(`fieldset`,{className:(0,u.default)(cl.multiSelectFieldset,(ne||U)&&cl.multiSelectFieldsetFocused,ue&&cl.multiSelectFieldsetError,T?.fieldset),style:O?.fieldset,children:(0,p.jsx)(`legend`,{className:(0,u.default)(cl.multiSelectFieldsetLegend,pe&&cl.multiSelectFieldsetLegendActive),children:(0,p.jsx)(`span`,{children:a})})})]})}),(0,p.jsx)(ya,{variant:`error`,message:de,isVisible:ue&&(ne||q)})]})}var fl={"numberInput-split":`numberInput-split_1kFLr`,numberInputSplit:`numberInput-split_1kFLr`,numberInput:`numberInput_7p2O3`,arrowSuffix:`arrowSuffix_QECPG`,arrows:`arrows_yjRlc`,arrowBtn:`arrowBtn_DbJoa`,split:`split_FYvfQ`,splitBtn:`splitBtn_MquuB`,"split-invalid":`split-invalid_F94dA`,splitInvalid:`split-invalid_F94dA`},pl=400,ml=120,hl=50,gl=1e3;function _l(e){let t=(0,l.useRef)(null),n=(0,l.useRef)(null),r=(0,l.useRef)(e);r.current=e;let i=(0,l.useRef)(null),a=(0,l.useCallback)(()=>{if(t.current!==null&&(clearTimeout(t.current),t.current=null),n.current!==null&&(clearInterval(n.current),n.current=null),typeof window>`u`)return;let{onEndEvent:e}=i.current;window.removeEventListener(`pointerup`,e),window.removeEventListener(`pointercancel`,e),window.removeEventListener(`pointermove`,e),window.removeEventListener(`blur`,e),document.removeEventListener(`visibilitychange`,e)},[]);i.current={stop:a,onEndEvent:e=>{(e.type!==`pointermove`||e.buttons===0)&&(e.type!==`visibilitychange`||document.hidden)&&i.current.stop()}};let o=(0,l.useCallback)((e,o)=>{a();let{onEndEvent:s}=i.current;window.addEventListener(`pointerup`,s),window.addEventListener(`pointercancel`,s),window.addEventListener(`pointermove`,s),window.addEventListener(`blur`,s),document.addEventListener(`visibilitychange`,s);let c=()=>{r.current(e*o)||a()};c(),t.current=setTimeout(()=>{t.current=null;let e=Date.now(),r=!1,i=()=>{c(),n.current!==null&&!r&&Date.now()-e>=gl&&(r=!0,n.current!==null&&clearInterval(n.current),n.current=setInterval(i,hl))};n.current=setInterval(i,ml)},pl)},[a]);return(0,l.useEffect)(()=>a,[a]),{start:o,stop:a}}var vl={increase:`Increase`,decrease:`Decrease`};function yl({label:e,disabled:t,direction:n,onStart:r,onStop:i}){return{tabIndex:-1,disabled:t,"aria-label":e,onPointerDown:e=>{(e.button===0||e.pointerType!==`mouse`)&&(e.preventDefault(),r(n,e.shiftKey?10:1))},onPointerUp:i,onPointerCancel:i,onContextMenu:e=>e.preventDefault()}}function bl(e){return(0,p.jsx)(`button`,{type:`button`,...yl(e),className:(0,u.default)(fl.arrowBtn,e.className),style:e.style,children:(0,p.jsx)(d.FontAwesomeIcon,{icon:e.icon,"aria-hidden":`true`})})}function xl(e){let{disabled:t,...n}=yl(e);return(0,p.jsx)(he,{...n,className:(0,u.default)(fl.splitBtn,e.className),style:e.style,color:j.Neutral,size:oe.Icon,disabled:t,icon:e.icon})}function Sl(e){let t=l.default.useRef(void 0),{value:n,onChange:r,formValidator:i,label:a,error:o,className:s,style:c,classNames:d,styles:m,allowNegative:h=!1,decimalSeparator:g,thousandSeparator:_,prefix:y,suffix:b,decimalScale:x,fixedDecimalScale:S=!0,placeholder:C,sign:w,showArrows:T=!1,step:O=1,min:k,max:A,arrowsLayout:j=`auto`,labels:M,readOnly:N=!1,disabled:P=!1,isRequired:F=!1,onKeyDown:I,ref:L,...R}=E(`NumberInput`,e),z=D(`NumberInput`,M,vl),[,B]=l.default.useState(0);l.default.useEffect(()=>{if(t.current=i,!i)return;let e=()=>B(e=>e+1);return i.registerOnUpdateListener(e),()=>{i.removeOnUpdateListener(e)}},[i]);let V=F||!!i?.validators.find(e=>e.validatorId===`required`),H=i==null?n:i.value,U=w!=null&&H!=null?Math.abs(Number(H)):H,W=U==null?``:String(U);function G(e){let t=e;t!==void 0&&(w===`-`&&(t=-Math.abs(t)),w===`+`&&(t=Math.abs(t))),i?.set(t??null),r?.(t)}function ee(e){let t=e;return!h&&w!==`-`&&(t=Math.max(0,t)),w===`-`&&(t=Math.min(0,t)),k!==void 0&&(t=Math.max(k,t)),A!==void 0&&(t=Math.min(A,t)),t}let K=H!=null&&H!==``?Number(H):0;function te(){if(N||P||H==null||H===``)return;let e=Number(H);if(!Number.isFinite(e))return;let t=ee(e);t!==e&&G(t)}function ne(e){if(N||P)return!1;let t=ee(K+e);return t!==K&&(G(t),!0)}let{start:re,stop:q}=_l(e=>ne(e*O));function ie(e){if(e.key===`Enter`){te(),I?.(e);return}if(!oe){I?.(e);return}if(e.key===`ArrowUp`){e.preventDefault(),ne(e.shiftKey?O*10:O);return}if(e.key===`ArrowDown`){e.preventDefault(),ne(e.shiftKey?-O*10:-O);return}I?.(e)}let ae=w===`-`?`-`:w===`+`?`+`:y,J=Pe(),oe=T&&!N&&!P,se=j===`split`||j===`auto`&&J,ce=ee(K+O)!==K,le=ee(K-O)!==K,Y={onStart:re,onStop:q},ue=oe&&!se?(0,p.jsxs)(`div`,{className:(0,u.default)(fl.arrows,d?.arrows),style:m?.arrows,children:[(0,p.jsx)(bl,{className:d?.increaseButton,style:m?.increaseButton,label:z.increase,icon:f.faChevronUp,disabled:!ce,direction:1,...Y}),(0,p.jsx)(bl,{className:d?.decreaseButton,style:m?.decreaseButton,label:z.decrease,icon:f.faChevronDown,disabled:!le,direction:-1,...Y})]}):null,de=oe?{role:`spinbutton`,"aria-valuenow":Number.isFinite(K)?K:void 0,"aria-valuemin":k,"aria-valuemax":A,"aria-valuetext":W||void 0}:{},X=i?!i.touched||!i.hasError():!o,fe=oe&&se,pe=(0,p.jsx)(Aa,{label:a,className:(0,u.default)(fl.numberInput,{[fl.numberInputSplit]:fe},fe?void 0:s,fe?void 0:d?.root,d?.input),style:{...fe?void 0:c,...fe?void 0:m?.root,...m?.input},value:W,onChange:()=>{},formValidator:null,isRequired:V,onBlur:()=>{te(),t.current&&(t.current.touched=!0)},isValid:X,errorMessage:i?i.touched?i.getCurrentErrorMessage()??``:``:o??``,placeholder:C,readOnly:N,disabled:P,suffix:ue,classNames:ue?{suffix:fl.arrowSuffix}:void 0,inputMode:x===0?`numeric`:`decimal`,customInput:(0,p.jsx)(v.NumericFormat,{onValueChange:e=>G(e.floatValue),allowNegative:w==null&&h,decimalSeparator:g,thousandSeparator:_,decimalScale:x,fixedDecimalScale:S,prefix:ae,suffix:b,onKeyDown:ie,getInputRef:L,...de,...R})});return fe?(0,p.jsxs)(In,{className:(0,u.default)(fl.split,{[fl.splitInvalid]:!X},s,d?.root),style:{...c,...m?.root},children:[(0,p.jsx)(xl,{className:d?.decreaseButton,style:m?.decreaseButton,label:z.decrease,icon:f.faMinus,disabled:!le,direction:-1,...Y}),pe,(0,p.jsx)(xl,{className:d?.increaseButton,style:m?.increaseButton,label:z.increase,icon:f.faPlus,disabled:!ce,direction:1,...Y})]}):pe}var Cl=Sl,wl=function(e){return e.Numeric=`numeric`,e.Alphanumeric=`alphanumeric`,e}({}),Tl={otpInput:`otpInput_5-tug`,"otpInput-label":`otpInput-label_T9X7O`,otpInputLabel:`otpInput-label_T9X7O`,"otpInput-requiredMark":`otpInput-requiredMark_FNY2c`,otpInputRequiredMark:`otpInput-requiredMark_FNY2c`,"otpInput-boxes":`otpInput-boxes_FhhIF`,otpInputBoxes:`otpInput-boxes_FhhIF`,"otpInput-boxes-shake":`otpInput-boxes-shake_c50KX`,otpInputBoxesShake:`otpInput-boxes-shake_c50KX`,otpInputShake:`otpInputShake_TljCu`,"otpInput-boxWrapper":`otpInput-boxWrapper_ezHbo`,otpInputBoxWrapper:`otpInput-boxWrapper_ezHbo`,"otpInput-box":`otpInput-box_AB6Kx`,otpInputBox:`otpInput-box_AB6Kx`,"otpInput-box-filled":`otpInput-box-filled_npNOF`,otpInputBoxFilled:`otpInput-box-filled_npNOF`,"otpInput-box-error":`otpInput-box-error_8kLDb`,otpInputBoxError:`otpInput-box-error_8kLDb`,"otpInput-separator":`otpInput-separator_SArCq`,otpInputSeparator:`otpInput-separator_SArCq`,"otpInput-disabled":`otpInput-disabled_bzwE9`,otpInputDisabled:`otpInput-disabled_bzwE9`},El=/[0-9]/g,Dl=/[a-zA-Z0-9]/g,Ol={field:`One-time code`,digit:(e,t)=>`Digit ${e} of ${t}`};function kl(e,t){let n=t===wl.Alphanumeric?Dl:El;return(e.match(n)||[]).join(``)}function Al(e){let{length:t=6,value:n,onChange:r=()=>{},onComplete:i=()=>{},formValidator:a=null,charset:o=wl.Numeric,masked:s=!1,groupAfter:c=[],label:d=``,isValid:f=!0,errorMessage:m=``,isRequired:h=!1,clearOnError:g=!1,clearErrorDelay:_=900,disabled:v=!1,autoFocus:y=!1,className:b=``,style:x,classNames:S,styles:C,labels:w,...T}=E(`OtpInput`,e),O=D(`OtpInput`,w,Ol),k=(a?a.value:n)??``,[,A]=(0,l.useState)(0),[j,M]=(0,l.useState)(!1),[N,P]=(0,l.useState)(!1),[F,I]=(0,l.useState)(!1),[L,R]=(0,l.useState)(!1),[z,B]=(0,l.useState)(!1),V=(0,l.useRef)([]);(0,l.useEffect)(()=>{if(!a)return;a.validate();let e=()=>A(e=>e+1);return a.registerOnUpdateListener(e),()=>a.removeOnUpdateListener(e)},[a]),(0,l.useEffect)(()=>{if(!y)return;let e=Math.min(k.length,t-1);V.current[e]?.focus()},[]);let H=a?a.touched&&a.hasError():!f||!!m,U=a?a.getCurrentErrorMessage():m||``;H!==z&&(B(H),H&&M(!0),R(H&&g)),(0,l.useEffect)(()=>{if(!j)return;let e=window.setTimeout(()=>M(!1),400);return()=>window.clearTimeout(e)},[j]),(0,l.useEffect)(()=>{if(!L||!g)return;let e=window.setTimeout(()=>{R(!1),W(``),V.current[0]?.focus()},_);return()=>window.clearTimeout(e)},[L,g,_]);function W(e){let n=k.length===t,s=kl(e,o).slice(0,t);a&&a.set(s),r?.(s),s.length===t&&!n&&i?.(s)}function G(e,t){let n=k.split(``);n[e]=t,W(n.join(``))}function ee(e,n){if(v)return;if(n===``){G(e,``);return}let r=kl(n,o);if(!r)return;let i=Math.min(e,k.length);if(n.length>1){K(i,r);return}G(i,r),i<t-1?V.current[i+1]?.focus():V.current[i]?.blur()}function K(e,n){let r=kl(n,o);if(!r)return;let i=k.padEnd(t,` `).split(``),a=e;for(let e of r){if(a>=t)break;i[a]=e,a+=1}W(i.join(``).trimEnd());let s=Math.min(a,t-1);V.current[s]?.focus(),a>=t&&V.current[t-1]?.blur()}function te(e,t){if(v)return;let n=t.clipboardData.getData(`text`);n&&(t.preventDefault(),K(Math.min(e,k.length),n))}function ne(e,n){if(!v){if(n.key.length===1&&!n.ctrlKey&&!n.metaKey&&!n.altKey){let r=kl(n.key,o);if(r&&k[e]===r){n.preventDefault(),G(e,r),e<t-1?V.current[e+1]?.focus():V.current[e]?.blur();return}}if(n.key===`Backspace`){if(k[e]){G(e,``);return}e>0&&(n.preventDefault(),G(e-1,``),V.current[e-1]?.focus());return}if(n.key===`Delete`){k[e]&&G(e,``);return}if(n.key===`ArrowLeft`&&e>0){n.preventDefault(),V.current[e-1]?.focus();return}n.key===`ArrowRight`&&e<t-1&&(n.preventDefault(),V.current[e+1]?.focus())}}function re(e){e.target.select()}function q(){P(!0)}function ie(e){e.currentTarget.contains(e.relatedTarget)||(P(!1),a&&(a.touched=!0))}return(0,p.jsxs)(`div`,{...T,className:(0,u.default)(Tl.otpInput,v&&Tl.otpInputDisabled,b),style:x,children:[d&&(0,p.jsxs)(`div`,{className:(0,u.default)(Tl.otpInputLabel,S?.label),style:C?.label,children:[d,h&&(0,p.jsx)(`span`,{className:Tl.otpInputRequiredMark,children:` *`})]}),(0,p.jsx)(`div`,{role:`group`,"aria-label":d||O.field,className:(0,u.default)(Tl.otpInputBoxes,j&&Tl.otpInputBoxesShake,S?.inputs),style:C?.inputs,onFocus:q,onBlur:ie,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),children:Array.from({length:t},(e,n)=>{let r=k[n]||``;return(0,p.jsxs)(`div`,{className:Tl.otpInputBoxWrapper,children:[(0,p.jsx)(`input`,{ref:e=>{V.current[n]=e},type:s?`password`:`text`,inputMode:o===wl.Numeric?`numeric`:`text`,pattern:o===wl.Numeric?`[0-9]*`:void 0,autoComplete:n===0?`one-time-code`:`off`,maxLength:1,disabled:v,value:r,"aria-label":O.digit(n+1,t),"aria-invalid":H||void 0,className:(0,u.default)(Tl.otpInputBox,H&&Tl.otpInputBoxError,r&&Tl.otpInputBoxFilled,S?.input),style:C?.input,onChange:e=>ee(n,e.target.value),onKeyDown:e=>ne(n,e),onPaste:e=>te(n,e),onFocus:re}),c.includes(n+1)&&n<t-1&&(0,p.jsx)(`span`,{className:(0,u.default)(Tl.otpInputSeparator,S?.separator),style:C?.separator})]},n)})}),(0,p.jsx)(ya,{variant:`error`,message:U,isVisible:H&&(N||F)})]})}var jl=768;function Ml(){let[e,t]=(0,l.useState)(()=>({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<jl}));return(0,l.useEffect)(()=>{function e(){t({width:window.innerWidth,height:window.innerHeight,isMobileSize:window.innerWidth<jl})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var Nl={overscroll:`overscroll_Ij750`,"overscroll-header":`overscroll-header_S6vYc`,overscrollHeader:`overscroll-header_S6vYc`,"overscroll-header-centered":`overscroll-header-centered_8VlsP`,overscrollHeaderCentered:`overscroll-header-centered_8VlsP`,"overscroll-header-container":`overscroll-header-container_iignp`,overscrollHeaderContainer:`overscroll-header-container_iignp`};function Pl({children:e=null,overscrollContent:t=null,overscrollContentDesktop:n=null,centerHeader:r=!0,min:i=10,max:a=80,start:o=30,unit:s=`%`,mobileOnly:c=!0,onScrollChange:d=()=>{},scrollDisabled:f=!1}){let{isMobileSize:m,height:h}=Ml(),g=(0,l.useRef)(null),_=(0,l.useRef)(null),v=(0,l.useRef)(null),y=(0,l.useRef)(!1),b=(0,l.useRef)(null),x=(0,l.useRef)(d);(0,l.useEffect)(()=>{x.current=d});let S=(0,l.useCallback)(e=>{let t;if(s===`%`){if(!v.current)return;let n=v.current.clientHeight;t=Math.max(n*i/100,n-e)}else t=Math.max(i,a-e);_.current&&(_.current.style.height=`${t}px`)},[i,a,s]),C=(0,l.useCallback)(()=>{let e;if(s===`%`){if(!v.current)return;let t=v.current.clientHeight/a*100;e=v.current.clientHeight-o/100*t}else e=a-o;g.current&&(g.current.scrollTop=e,S(e))},[a,o,s,S]);(0,l.useEffect)(()=>{let e=setTimeout(C,100);return()=>clearTimeout(e)},[C]),(0,l.useEffect)(()=>{g.current&&(g.current.style.overflow=f?`hidden`:`auto`)},[f]);let w=(0,l.useRef)(m);(0,l.useEffect)(()=>{m&&!w.current&&C(),w.current=m},[m,C]);let T=(0,l.useRef)(c);(0,l.useEffect)(()=>{!c&&T.current&&C(),T.current=c},[c,C]);let E=(0,l.useRef)(h);(0,l.useEffect)(()=>{m&&h!==E.current&&g.current&&S(g.current.scrollTop),E.current=h},[h,m,S]);function D(e){S(e.currentTarget.scrollTop),y.current||(y.current=!0,x.current(!0)),b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{b.current=null,y.current=!1,x.current(!1)},500)}if(c&&!m)return n?(0,p.jsxs)(`div`,{children:[n,e]}):(0,p.jsx)(p.Fragment,{children:e});let O=s===`%`?`${100-i}%`:`calc(100% - ${i}px)`;return(0,p.jsxs)(`div`,{className:Nl.overscroll,ref:g,onScroll:D,children:[(0,p.jsx)(`div`,{className:Nl.overscrollHeaderContainer,style:{height:`${a}${s}`},ref:v,children:(0,p.jsx)(`div`,{className:(0,u.default)(Nl.overscrollHeader,r&&Nl.overscrollHeaderCentered),ref:_,children:t})}),(0,p.jsx)(`div`,{style:{minHeight:O},children:e})]})}var Fl={pagination:`pagination_Pbz1I`,"pagination-item":`pagination-item_2SyYK`,paginationItem:`pagination-item_2SyYK`,"pagination-control":`pagination-control_T0gUc`,paginationControl:`pagination-control_T0gUc`,"pagination-item-active":`pagination-item-active_MgtgT`,paginationItemActive:`pagination-item-active_MgtgT`,"pagination-ellipsis":`pagination-ellipsis_jU--t`,paginationEllipsis:`pagination-ellipsis_jU--t`},Il=`dots`,Ll={goToPage:e=>`Go to page ${e}`,first:`Go to first page`,previous:`Go to previous page`,next:`Go to next page`,last:`Go to last page`};function Rl(e,t){return t<e?[]:Array.from({length:t-e+1},(t,n)=>e+n)}function zl(e,t){return Math.max(1,Math.min(t,Math.round(e)))}function Bl(e,t,n,r){if(n*2+r*2+3>=t)return Rl(1,t);let i=Rl(1,r),a=Rl(t-r+1,t),o=i.length>0?[Il]:[],s=a.length>0?[Il]:[],c=Math.max(e-n,r+1),l=Math.min(e+n,t-r),u=c>r+2,d=l<t-r-1;return!u&&d?[...Rl(1,r+n*2+2),...s,...a]:u&&!d?[...i,...o,...Rl(t-r-n*2-1,t)]:[...i,...o,...Rl(c,l),...s,...a]}function Vl(e){let{total:t,page:n,defaultPage:r=1,onChange:i=()=>{},siblings:a=1,boundaries:o=1,showControls:s=!0,showEdges:c=!1,disabled:d=!1,previousIcon:m=f.faChevronLeft,nextIcon:h=f.faChevronRight,firstIcon:g=f.faAnglesLeft,lastIcon:_=f.faAnglesRight,"aria-label":v=`Pagination`,className:y,style:b,classNames:x,styles:S,labels:C,...w}=E(`Pagination`,e),T=D(`Pagination`,C,Ll),O=n!==void 0,[k,A]=(0,l.useState)(r),j=zl(O?n:k,t);if(t<1)return null;function M(e){let n=zl(e,t);n!==j&&(O||A(n),i(n))}let N=(0,u.default)(Fl.paginationControl,x?.control);function P(e,t,n,r,i){return(0,p.jsx)(`button`,{type:`button`,className:N,style:S?.control,"aria-label":t,disabled:d||i,onClick:()=>M(r),children:X(n)},e)}let F=j<=1,I=j>=t;return(0,p.jsxs)(`nav`,{...w,"aria-label":v,className:(0,u.default)(Fl.pagination,x?.root,y),style:{...b,...S?.root},children:[c&&P(`first`,T.first,g,1,F),s&&P(`previous`,T.previous,m,j-1,F),Bl(j,t,a,o).map((e,t)=>e===Il?(0,p.jsx)(`span`,{"aria-hidden":`true`,className:(0,u.default)(Fl.paginationEllipsis,x?.ellipsis),style:S?.ellipsis,children:`…`},`dots-${t}`):(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Fl.paginationItem,e===j&&Fl.paginationItemActive,x?.item),style:S?.item,"aria-label":T.goToPage(e),"aria-current":e===j?`page`:void 0,disabled:d,onClick:()=>M(e),children:e},e)),s&&P(`next`,T.next,h,j+1,I),c&&P(`last`,T.last,_,t,I)]})}var Hl={progressBar:`progressBar_LO0sX`,"progressBar-fill":`progressBar-fill_rt32j`,progressBarFill:`progressBar-fill_rt32j`,"progressBar-fill-end":`progressBar-fill-end_71wL3`,progressBarFillEnd:`progressBar-fill-end_71wL3`,"progressBar-fill-toned":`progressBar-fill-toned_cM4yE`,progressBarFillToned:`progressBar-fill-toned_cM4yE`,"progressBar-label":`progressBar-label_jWud2`,progressBarLabel:`progressBar-label_jWud2`};function Ul({className:e=void 0,total:t=100,progress:n=0,style:r=void 0,classNames:i,styles:a,...o}){let s=Array.isArray(n)?n:typeof n==`object`?[n]:[{amount:n}];R(`ProgressBar`,s.map(e=>e.color));function c(){return s.map((e,n)=>{let r=t?e.amount/t*100:0,o=e.color?F(e.color):void 0;return(0,p.jsx)(`div`,{className:(0,u.default)(Hl.progressBarFill,o&&[o.className,Hl.progressBarFillToned],n===s.length-1&&Hl.progressBarFillEnd,e.class,i?.fill),style:{width:`${r}%`,...o?.style,...a?.fill},title:e.label?`${e.label}: ${e.amount}`:void 0,children:e.label&&(0,p.jsx)(`div`,{className:(0,u.default)(Hl.progressBarLabel,i?.label),style:a?.label,children:e.label})},n)})}return(0,p.jsx)(`div`,{...o,className:(0,u.default)(Hl.progressBar,e,i?.root),style:{...r,...a?.root},children:c()})}var Wl=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),Gl={radioGroup:`radioGroup_5PUYO`,"radioGroup-horizontal":`radioGroup-horizontal_cfCch`,radioGroupHorizontal:`radioGroup-horizontal_cfCch`,"radioGroup-disabled":`radioGroup-disabled_O2hKy`,radioGroupDisabled:`radioGroup-disabled_O2hKy`,"radioGroup-error":`radioGroup-error_HVUcn`,radioGroupError:`radioGroup-error_HVUcn`,"radioGroup-radio":`radioGroup-radio_XLU2j`,radioGroupRadio:`radioGroup-radio_XLU2j`,"radioGroup-radio-checked":`radioGroup-radio-checked_AOEJu`,radioGroupRadioChecked:`radioGroup-radio-checked_AOEJu`,"radioGroup-option":`radioGroup-option_QxMeW`,radioGroupOption:`radioGroup-option_QxMeW`,"radioGroup-option-disabled":`radioGroup-option-disabled_Q0y35`,radioGroupOptionDisabled:`radioGroup-option-disabled_Q0y35`,"radioGroup-dot":`radioGroup-dot_Q-4Ge`,radioGroupDot:`radioGroup-dot_Q-4Ge`,"radioGroup-dot-checked":`radioGroup-dot-checked_7djgv`,radioGroupDotChecked:`radioGroup-dot-checked_7djgv`,"radioGroup-text":`radioGroup-text_8ekBs`,radioGroupText:`radioGroup-text_8ekBs`,"radioGroup-label":`radioGroup-label_hJD2S`,radioGroupLabel:`radioGroup-label_hJD2S`,"radioGroup-description":`radioGroup-description_xZSLE`,radioGroupDescription:`radioGroup-description_xZSLE`};function Kl(e){let{options:t=[],value:n,defaultValue:r,onChange:i=()=>{},orientation:a=Wl.Vertical,disabled:o=!1,size:s,tabIndex:c=0,formValidator:d=null,errorMessage:f=``,isValid:m=!0,className:h,style:g,classNames:_,styles:v,...y}=E(`RadioGroup`,e),b=(0,l.useRef)([]),x=(0,l.useRef)(d);(0,l.useEffect)(()=>{x.current=d});let[,S]=(0,l.useState)(0),[C,w]=(0,l.useState)(r),[T,D]=(0,l.useState)(!1),[O,k]=(0,l.useState)(!1);(0,l.useEffect)(()=>{if(!d)return;d.validate();let e=()=>S(e=>e+1);return d.registerOnUpdateListener(e),()=>d.removeOnUpdateListener(e)},[d]);let A=d?d.touched&&d.hasError():!m||!!f,j=d?d.getCurrentErrorMessage():f||``,M=n!==void 0&&!d,N=d?d.value:M?n:C;function P(e,t){d?d.set(e):M||w(e),i(e,t)}function F(e){e.currentTarget.contains(e.relatedTarget)||(D(!1),x.current&&(x.current.touched=!0))}let I=t.findIndex(e=>e.value===N),L=t.findIndex(e=>!e.disabled),R=I>=0?I:L;function z(e){b.current[e]?.focus()}function B(e,n,r){if(o||t.length===0)return;let i=n;for(let n=0;n<t.length;n++)if(i=(i+e+t.length)%t.length,!t[i].disabled){z(i),P(t[i].value,r);return}}function V(e,n){let r=t[n];switch(e.key){case`ArrowDown`:case`ArrowRight`:e.preventDefault(),B(1,n,e);break;case`ArrowUp`:case`ArrowLeft`:e.preventDefault(),B(-1,n,e);break;case` `:case`Enter`:e.preventDefault(),!o&&!r.disabled&&P(r.value,e)}}return(0,p.jsxs)(`div`,{...y,role:`radiogroup`,"aria-orientation":a,"aria-disabled":o||void 0,"aria-invalid":A||void 0,className:(0,u.default)(Gl.radioGroup,a===Wl.Horizontal&&Gl.radioGroupHorizontal,o&&Gl.radioGroupDisabled,A&&Gl.radioGroupError,h,_?.root),style:{...s?{"--radio-size":s}:null,...g,...v?.root},onFocus:()=>D(!0),onBlur:F,onMouseEnter:()=>k(!0),onMouseLeave:()=>k(!1),children:[t.map((e,t)=>{let n=e.value===N,r=o||!!e.disabled;return(0,p.jsxs)(`div`,{ref:e=>{b.current[t]=e},role:`radio`,"aria-checked":n,"aria-disabled":r||void 0,tabIndex:r?-1:t===R?c:-1,className:(0,u.default)(Gl.radioGroupOption,n&&Gl.radioGroupOptionChecked,r&&Gl.radioGroupOptionDisabled,_?.option),style:v?.option,onClick:()=>{r||P(e.value)},onKeyDown:e=>V(e,t),children:[(0,p.jsx)(`div`,{className:(0,u.default)(Gl.radioGroupRadio,n&&Gl.radioGroupRadioChecked,_?.radio),style:v?.radio,children:(0,p.jsx)(`div`,{className:(0,u.default)(Gl.radioGroupDot,n&&Gl.radioGroupDotChecked,_?.dot),style:v?.dot})}),(e.label??e.value)!==``&&(0,p.jsxs)(`div`,{className:Gl.radioGroupText,children:[(0,p.jsx)(`div`,{className:(0,u.default)(Gl.radioGroupLabel,_?.label),style:v?.label,children:e.label??e.value}),e.description!=null&&(0,p.jsx)(`div`,{className:(0,u.default)(Gl.radioGroupDescription,_?.description),style:v?.description,children:e.description})]})]},String(e.value))}),(0,p.jsx)(ya,{variant:`error`,message:j,isVisible:A&&(T||O)})]})}var ql={rating:`rating_eDKeX`,"rating-disabled":`rating-disabled_Xk0cI`,ratingDisabled:`rating-disabled_Xk0cI`,"rating-readOnly":`rating-readOnly_o8Kx1`,ratingReadOnly:`rating-readOnly_o8Kx1`,"rating-item":`rating-item_4tqx2`,ratingItem:`rating-item_4tqx2`,"rating-iconEmpty":`rating-iconEmpty_3uk2A`,ratingIconEmpty:`rating-iconEmpty_3uk2A`,"rating-iconFilledClip":`rating-iconFilledClip_4aNxG`,ratingIconFilledClip:`rating-iconFilledClip_4aNxG`,"rating-iconFilled":`rating-iconFilled_-rQ58`,ratingIconFilled:`rating-iconFilled_-rQ58`},Jl=4;function Yl(e,t){return Math.max(0,Math.min(t,e))}function Xl(e){let{value:t,defaultValue:n=0,onChange:r=()=>{},max:i=5,allowHalf:a=!1,allowClear:o=!0,readOnly:s=!1,disabled:c=!1,icon:d=f.faStar,"aria-label":m=`Rating`,className:h,style:g,classNames:_,styles:v,...y}=E(`Rating`,e),b=t!==void 0,[x,S]=(0,l.useState)(n),C=Yl(b?t:x,i),[w,T]=(0,l.useState)(null),D=!s&&!c,O=w??C,k=(0,l.useRef)(null),A=(0,l.useRef)(C),j=(0,l.useRef)(!1),M=(0,l.useRef)(0),N=(0,l.useRef)(!1);function P(e){let t=Yl(e,i);b||S(t),r(t)}function F(e){let t=k.current?.getBoundingClientRect();if(!t||t.width===0)return null;let n=Yl((e-t.left)/t.width,1)*i;return a?Math.round(n*2)/2:Math.ceil(n)}function I(e){if(!D)return;e.currentTarget.setPointerCapture?.(e.pointerId),j.current=!0,N.current=!1,M.current=e.clientX,A.current=C;let t=F(e.clientX);t!==null&&T(t)}function L(e){if(!D)return;let t=F(e.clientX);t!==null&&(j.current&&(e.preventDefault(),Math.abs(e.clientX-M.current)>Jl&&(N.current=!0)),T(t))}function R(e){if(!D||!j.current)return;e.currentTarget.releasePointerCapture?.(e.pointerId),j.current=!1;let t=F(e.clientX)??w;t!==null&&P(!N.current&&o&&t===A.current?0:t),T(null)}function z(){D&&!j.current&&T(null)}function B(e){let t=a?.5:1;e.key===`ArrowRight`||e.key===`ArrowUp`?(e.preventDefault(),P(C+t)):e.key===`ArrowLeft`||e.key===`ArrowDown`?(e.preventDefault(),P(C-t)):e.key===`Home`?(e.preventDefault(),P(0)):e.key===`End`&&(e.preventDefault(),P(i))}return(0,p.jsx)(`div`,{...y,ref:k,role:`slider`,"aria-label":m,"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":C,"aria-valuetext":`${C} out of ${i}`,"aria-readonly":s||void 0,"aria-disabled":c||void 0,tabIndex:D?0:-1,className:(0,u.default)(ql.rating,c&&ql.ratingDisabled,s&&ql.ratingReadOnly,_?.root,h),style:{...g,...v?.root},onKeyDown:D?B:void 0,onPointerDown:D?I:void 0,onPointerMove:D?L:void 0,onPointerUp:D?R:void 0,onPointerCancel:D?R:void 0,onPointerLeave:D?z:void 0,children:Array.from({length:i},(e,t)=>{let n=Math.round(Math.max(0,Math.min(1,O-t))*100);return(0,p.jsxs)(`div`,{className:(0,u.default)(ql.ratingItem,_?.item),style:v?.item,children:[X(d,{className:(0,u.default)(ql.ratingIconEmpty,_?.iconEmpty),style:v?.iconEmpty}),(0,p.jsx)(`div`,{className:ql.ratingIconFilledClip,style:{width:`${n}%`},children:X(d,{className:(0,u.default)(ql.ratingIconFilled,_?.iconFilled),style:v?.iconFilled})})]},t)})})}var Zl={revealLens:`revealLens_V3Kkk`,"revealLens-background":`revealLens-background_pQyK9`,revealLensBackground:`revealLens-background_pQyK9`,"revealLens-overlay":`revealLens-overlay_NOUoj`,revealLensOverlay:`revealLens-overlay_NOUoj`,"revealLens-overlay-transitioning":`revealLens-overlay-transitioning_-co2e`,revealLensOverlayTransitioning:`revealLens-overlay-transitioning_-co2e`};function Ql(e,t,n,r){let i=Math.max(n-r,0);return`radial-gradient(circle ${n}px at ${e}px ${t}px, transparent ${i}px, transparent ${i}px, white ${n}px)`}function $l(e,t){e.style.setProperty(`mask-image`,t),e.style.setProperty(`-webkit-mask-image`,t)}function eu(e){e.style.removeProperty(`mask-image`),e.style.removeProperty(`-webkit-mask-image`)}function tu(e){let{background:t,overlay:n,radius:r=120,feather:i=24,shape:a=`circle`,maskImage:o,disabled:s=!1,className:c,style:d,classNames:f,styles:m,...h}=E(`RevealLens`,e),g=(0,l.useRef)(null),_=(0,l.useRef)(null),v=(e,t)=>{let n=g.current,a=_.current;if(!n||!a)return;let s=n.getBoundingClientRect(),c=e-s.left,l=t-s.top;a.classList.remove(Zl.revealLensOverlayTransitioning),$l(a,o??Ql(c,l,r,i))},y=()=>{let e=_.current;e&&(e.classList.add(Zl.revealLensOverlayTransitioning),eu(e))},b=e=>{s||(e.currentTarget.setPointerCapture?.(e.pointerId),v(e.clientX,e.clientY))},x=e=>{s||v(e.clientX,e.clientY)},S=e=>{s||e.pointerType===`mouse`||y()},C=e=>{if(s)return;let t=g.current;if(t){let n=t.getBoundingClientRect();if(e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom)return;if(typeof document.elementFromPoint==`function`){let n=document.elementFromPoint(e.clientX,e.clientY);if(n&&t.contains(n))return}}y()};return(0,p.jsxs)(`div`,{...h,ref:g,className:(0,u.default)(Zl.revealLens,c,f?.root),style:{...d,...m?.root},"data-reveal-shape":a,onPointerDown:b,onPointerMove:x,onPointerUp:S,onPointerCancel:C,onPointerLeave:C,children:[(0,p.jsx)(`div`,{className:(0,u.default)(Zl.revealLensBackground,f?.background),style:m?.background,children:t}),(0,p.jsx)(`div`,{ref:_,className:(0,u.default)(Zl.revealLensOverlay,f?.overlay),style:m?.overlay,children:n})]})}var nu={planCanvas:`planCanvas_7XTdG`,"planCanvas-screen":`planCanvas-screen_lk83X`,planCanvasScreen:`planCanvas-screen_lk83X`,"planCanvas-underlay":`planCanvas-underlay_rpzSl`,planCanvasUnderlay:`planCanvas-underlay_rpzSl`,"planCanvas-grid":`planCanvas-grid_49CmH`,planCanvasGrid:`planCanvas-grid_49CmH`,"planCanvas-rooms":`planCanvas-rooms_UyjEC`,planCanvasRooms:`planCanvas-rooms_UyjEC`,"planCanvas-roomFill":`planCanvas-roomFill_LXlOf`,planCanvasRoomFill:`planCanvas-roomFill_LXlOf`,"planCanvas-roomFill-interactive":`planCanvas-roomFill-interactive_JSU1E`,planCanvasRoomFillInteractive:`planCanvas-roomFill-interactive_JSU1E`,"planCanvas-roomFill-hovered":`planCanvas-roomFill-hovered_7ZXgf`,planCanvasRoomFillHovered:`planCanvas-roomFill-hovered_7ZXgf`,"planCanvas-roomLabel":`planCanvas-roomLabel_GrzE3`,planCanvasRoomLabel:`planCanvas-roomLabel_GrzE3`,"planCanvas-roomName":`planCanvas-roomName_kHAtD`,planCanvasRoomName:`planCanvas-roomName_kHAtD`,"planCanvas-roomArea":`planCanvas-roomArea_X1Tal`,planCanvasRoomArea:`planCanvas-roomArea_X1Tal`,"planCanvas-walls":`planCanvas-walls_G9vXB`,planCanvasWalls:`planCanvas-walls_G9vXB`,"planCanvas-wallOutline":`planCanvas-wallOutline_eWEN-`,planCanvasWallOutline:`planCanvas-wallOutline_eWEN-`,"planCanvas-wallFill":`planCanvas-wallFill_iKHyE`,planCanvasWallFill:`planCanvas-wallFill_iKHyE`,"planCanvas-roomEdgeSelected":`planCanvas-roomEdgeSelected_wQk6B`,planCanvasRoomEdgeSelected:`planCanvas-roomEdgeSelected_wQk6B`,"planCanvas-wallCaps":`planCanvas-wallCaps_ZpLG4`,planCanvasWallCaps:`planCanvas-wallCaps_ZpLG4`,"planCanvas-roomEdgeCaps":`planCanvas-roomEdgeCaps_5Y7lq`,planCanvasRoomEdgeCaps:`planCanvas-roomEdgeCaps_5Y7lq`,"planCanvas-roomEdgeOutline":`planCanvas-roomEdgeOutline_Y1ZwL`,planCanvasRoomEdgeOutline:`planCanvas-roomEdgeOutline_Y1ZwL`,"planCanvas-roomEdgeFill":`planCanvas-roomEdgeFill_Qr9p-`,planCanvasRoomEdgeFill:`planCanvas-roomEdgeFill_Qr9p-`,"planCanvas-wallSelected":`planCanvas-wallSelected_vFNw8`,planCanvasWallSelected:`planCanvas-wallSelected_vFNw8`,"planCanvas-wallHovered":`planCanvas-wallHovered_CFIAR`,planCanvasWallHovered:`planCanvas-wallHovered_CFIAR`,"planCanvas-openings":`planCanvas-openings_1fyX4`,planCanvasOpenings:`planCanvas-openings_1fyX4`,"planCanvas-opening-selected":`planCanvas-opening-selected_Wgl4r`,planCanvasOpeningSelected:`planCanvas-opening-selected_Wgl4r`,"planCanvas-doorLeaf":`planCanvas-doorLeaf_1BEkI`,planCanvasDoorLeaf:`planCanvas-doorLeaf_1BEkI`,"planCanvas-doorSwing":`planCanvas-doorSwing_QCc5i`,planCanvasDoorSwing:`planCanvas-doorSwing_QCc5i`,"planCanvas-windowPane":`planCanvas-windowPane_5q9oQ`,planCanvasWindowPane:`planCanvas-windowPane_5q9oQ`,"planCanvas-opening-hovered":`planCanvas-opening-hovered_NGK0O`,planCanvasOpeningHovered:`planCanvas-opening-hovered_NGK0O`,"planCanvas-opening-hit":`planCanvas-opening-hit_frRch`,planCanvasOpeningHit:`planCanvas-opening-hit_frRch`,"planCanvas-opening-hit-interactive":`planCanvas-opening-hit-interactive_D4ZUY`,planCanvasOpeningHitInteractive:`planCanvas-opening-hit-interactive_D4ZUY`,"planCanvas-opening-outline":`planCanvas-opening-outline_HS2wY`,planCanvasOpeningOutline:`planCanvas-opening-outline_HS2wY`,"planCanvas-jamb":`planCanvas-jamb_e-I9r`,planCanvasJamb:`planCanvas-jamb_e-I9r`,"planCanvas-jamb-highlighted":`planCanvas-jamb-highlighted_rWYxZ`,planCanvasJambHighlighted:`planCanvas-jamb-highlighted_rWYxZ`,"planCanvas-selection":`planCanvas-selection_0a31R`,planCanvasSelection:`planCanvas-selection_0a31R`},ru=1,iu=[];function au(e){let t=e/1e6;return`${t.toFixed(+(t<10))} m²`}function ou(e){return e.length===0?``:`${e.map((e,t)=>`${t===0?`M`:`L`} ${e.x},${e.y}`).join(` `)} Z`}function su(e){return[ou(e.outer),...e.holes.map(ou)].filter(Boolean).join(` `)}function cu(e){let{ref:t,floor:n,underlay:r,rooms:i,view:a,selection:o=iu,hovered:s=null,interactiveRooms:d=!1,interactiveOpenings:f=!1,showGrid:m=!1,gridSize:h=100,showRoomLabels:g=!0,showOpeningSymbols:_=!0,getRoomColor:v,renderRoomLabel:y,getRoomLabel:b,formatArea:x=au,onRoomActivate:S,onOpeningActivate:C,onBackgroundActivate:w,onHoverChange:T,overlay:E,worldOverlay:D,size:O,className:k,style:A,classNames:j,styles:M,"aria-label":N}=e,P=a.zoom>0?1/a.zoom:1,F=ru*P,I=(0,l.useMemo)(()=>c.m(n),[n]),L=(0,l.useMemo)(()=>r?Object.values(r.walls).flatMap(e=>{let t=r.nodes[e.a],n=r.nodes[e.b];return t&&n?[{id:e.id,x1:t.x,y1:t.y,x2:n.x,y2:n.y}]:[]}):[],[r]),R=e=>({x:(e.x-a.x)*a.zoom,y:(e.y-a.y)*a.zoom}),z=(0,l.useMemo)(()=>{if(!m||h<=0)return null;let e=O.width*P,t=O.height*P,n=h*Math.max(1,10**Math.ceil(Math.log10(e/h/60))),r=Math.floor(a.x/n)*n,i=Math.floor(a.y/n)*n,o=[],s=[];for(let t=r;t<=a.x+e;t+=n)o.push(t);for(let e=i;e<=a.y+t;e+=n)s.push(e);return{verticals:o,horizontals:s,step:n,worldW:e,worldH:t}},[m,h,O.width,O.height,P,a.x,a.y]),B=(e,t)=>o.some(n=>n.type===e&&n.id===t),V=(e,t)=>s?.type===e&&s.id===t,H=(0,l.useMemo)(()=>{let e=new Set(o.filter(e=>e.type===`room`).map(e=>e.id)),t=new Set;for(let n of i)if(n.roomId&&e.has(n.roomId))for(let e of n.wallIds)t.add(e);return t},[i,o]),U=(0,l.useMemo)(()=>H.size>0?c.m(n,{wallIds:H}):{groups:[],caps:[]},[n,H]);function W(e){let t=c.h(n,e);if(!t)return null;let r=n.walls[e.wallId],i=r?r.thickness/2:50,{p1:a,p2:o,normal:s,dir:l,centre:d}=t,m=B(`opening`,e.id),h=V(`opening`,e.id),g=Math.hypot(o.x-a.x,o.y-a.y),v=[];if(_&&e.kind===c.ot.Door){let t=e.swing!==`endLeft`&&e.swing!==`endRight`,n=t?a:o,r=t?1:-1,i={x:n.x+s.x*g,y:n.y+s.y*g},c={x:n.x+l.x*g*r,y:n.y+l.y*g*r};v.push((0,p.jsx)(`path`,{className:nu.planCanvasDoorLeaf,d:`M ${n.x},${n.y} L ${i.x},${i.y}`,strokeWidth:F},`leaf`),(0,p.jsx)(`path`,{className:nu.planCanvasDoorSwing,d:`M ${i.x},${i.y} A ${g},${g} 0 0,${+!t} ${c.x},${c.y}`,strokeWidth:F},`swing`))}_&&e.kind===c.ot.Window&&v.push((0,p.jsx)(`path`,{className:nu.planCanvasWindowPane,d:`M ${a.x},${a.y} L ${o.x},${o.y}`,strokeWidth:F*2},`pane`));let y=`M ${a.x+s.x*i},${a.y+s.y*i} L ${o.x+s.x*i},${o.y+s.y*i} L ${o.x-s.x*i},${o.y-s.y*i} L ${a.x-s.x*i},${a.y-s.y*i} Z`;return(0,p.jsxs)(`g`,{className:(0,u.default)(m&&nu.planCanvasOpeningSelected,h&&nu.planCanvasOpeningHovered,j?.opening),style:M?.opening,"data-opening-kind":e.kind,children:[v,(0,p.jsx)(`path`,{className:(0,u.default)(nu.planCanvasOpeningHit,f&&nu.planCanvasOpeningHitInteractive),d:y,onClick:f&&C?t=>{t.stopPropagation(),C(e.id)}:void 0,onPointerEnter:T?()=>T({type:`opening`,id:e.id}):void 0,children:f&&(0,p.jsx)(`title`,{children:e.kind})}),(m||h)&&(0,p.jsx)(`path`,{className:nu.planCanvasOpeningOutline,d:y,vectorEffect:`non-scaling-stroke`}),(0,p.jsx)(`path`,{className:(0,u.default)(nu.planCanvasJamb,H.has(e.wallId)&&nu.planCanvasJambHighlighted),d:`M ${a.x-s.x*i},${a.y-s.y*i} L ${a.x+s.x*i},${a.y+s.y*i} M ${o.x-s.x*i},${o.y-s.y*i} L ${o.x+s.x*i},${o.y+s.y*i}`,strokeWidth:F}),d&&null]},e.id)}return(0,p.jsxs)(`svg`,{ref:t,className:(0,u.default)(nu.planCanvas,k,j?.canvas),style:{...A,...M?.canvas},viewBox:`0 0 ${Math.max(1,O.width)} ${Math.max(1,O.height)}`,width:O.width,height:O.height,role:`img`,"aria-label":N,onClick:w?()=>w():void 0,onPointerLeave:T?()=>T(null):void 0,children:[(0,p.jsxs)(`g`,{transform:`translate(${-a.x*a.zoom} ${-a.y*a.zoom}) scale(${a.zoom})`,children:[z&&(0,p.jsxs)(`g`,{className:(0,u.default)(nu.planCanvasGrid,j?.grid),style:M?.grid,"aria-hidden":`true`,children:[z.verticals.map(e=>(0,p.jsx)(`line`,{x1:e,y1:a.y,x2:e,y2:a.y+z.worldH,strokeWidth:P},`v${e}`)),z.horizontals.map(e=>(0,p.jsx)(`line`,{x1:a.x,y1:e,x2:a.x+z.worldW,y2:e,strokeWidth:P},`h${e}`))]}),L.length>0&&(0,p.jsx)(`g`,{className:(0,u.default)(nu.planCanvasUnderlay,j?.underlay),style:M?.underlay,"aria-hidden":`true`,children:L.map(e=>(0,p.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,strokeWidth:1.5},e.id))}),(0,p.jsx)(`g`,{className:(0,u.default)(nu.planCanvasRooms,j?.rooms),style:M?.rooms,children:i.map(e=>{let t=e.roomId?B(`room`,e.roomId):!1,n=e.roomId?V(`room`,e.roomId):!1,r=e.meta?v?.(e.meta,e.area):void 0,i=b?.(e.meta,{area:e.area});return(0,p.jsx)(`path`,{className:(0,u.default)(nu.planCanvasRoomFill,n&&nu.planCanvasRoomFillHovered,d&&nu.planCanvasRoomFillInteractive,j?.roomFill),"data-state":t?`selected`:n?`hovered`:void 0,style:{...M?.roomFill,...r?{fill:r}:null},d:su(e),fillRule:`evenodd`,tabIndex:d?0:void 0,role:d?`button`:void 0,"aria-pressed":d?t:void 0,onClick:d&&S&&e.roomId?t=>{t.stopPropagation(),S(e.roomId)}:void 0,onKeyDown:d&&S&&e.roomId?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),S(e.roomId))}:void 0,onPointerEnter:T&&e.roomId?()=>T({type:`room`,id:e.roomId}):void 0,children:d&&i&&(0,p.jsx)(`title`,{children:i})},e.id)})}),(0,p.jsxs)(`g`,{className:(0,u.default)(nu.planCanvasWalls,j?.walls),style:M?.walls,"aria-hidden":`true`,children:[(0,p.jsx)(`g`,{className:nu.planCanvasWallOutline,children:I.groups.map(e=>(0,p.jsx)(`path`,{className:j?.wallBody,style:M?.wallBody,d:e.d,strokeWidth:e.thickness},`o${e.thickness}`))}),(0,p.jsx)(`g`,{className:nu.planCanvasWallFill,children:I.groups.map(e=>{let t=e.thickness-2*F;return t<=0?null:(0,p.jsx)(`path`,{d:e.d,strokeWidth:t},`f${e.thickness}`)})}),(0,p.jsxs)(`g`,{className:nu.planCanvasRoomEdgeSelected,children:[U.groups.map(e=>(0,p.jsx)(`path`,{className:nu.planCanvasRoomEdgeOutline,d:e.d,strokeWidth:e.thickness},`o${e.thickness}`)),U.groups.map(e=>{let t=e.thickness-2*F;return t<=0?null:(0,p.jsx)(`path`,{className:nu.planCanvasRoomEdgeFill,d:e.d,strokeWidth:t},`f${e.thickness}`)})]}),(0,p.jsx)(`g`,{className:nu.planCanvasWallCaps,children:I.caps.filter(e=>!H.has(e.wallId)).map((e,t)=>(0,p.jsx)(`line`,{x1:e.a.x,y1:e.a.y,x2:e.b.x,y2:e.b.y,strokeWidth:F},`${e.wallId}-${e.reason}-${t}`))}),(0,p.jsx)(`g`,{className:nu.planCanvasRoomEdgeCaps,children:U.caps.map((e,t)=>(0,p.jsx)(`line`,{x1:e.a.x,y1:e.a.y,x2:e.b.x,y2:e.b.y,strokeWidth:F},`${e.wallId}-${e.reason}-${t}`))})]}),(0,p.jsx)(`g`,{className:(0,u.default)(nu.planCanvasOpenings,j?.openings),style:M?.openings,children:Object.values(n.openings).map(W)}),(0,p.jsxs)(`g`,{className:nu.planCanvasSelection,"aria-hidden":`true`,children:[o.filter(e=>e.type===`wall`).map(e=>{let t=n.walls[e.id];if(!t)return null;let r=n.nodes[t.a],i=n.nodes[t.b];return!r||!i?null:(0,p.jsx)(`line`,{x1:r.x,y1:r.y,x2:i.x,y2:i.y,strokeWidth:t.thickness,className:nu.planCanvasWallSelected},e.id)}),s?.type===`wall`&&!B(`wall`,s.id)&&(()=>{let e=n.walls[s.id];if(!e)return null;let t=n.nodes[e.a],r=n.nodes[e.b];return!t||!r?null:(0,p.jsx)(`line`,{x1:t.x,y1:t.y,x2:r.x,y2:r.y,strokeWidth:e.thickness,className:nu.planCanvasWallHovered})})()]}),D]}),(0,p.jsxs)(`g`,{className:(0,u.default)(nu.planCanvasScreen,j?.overlay),style:M?.overlay,children:[g&&i.map(e=>{let t=R(e.anchor);if(t.x<-200||t.y<-200||t.x>O.width+200||t.y>O.height+200)return null;let n=y?.(e.meta,{area:e.area,faceId:e.id});return n===null?null:(0,p.jsx)(`g`,{className:(0,u.default)(nu.planCanvasRoomLabel,j?.roomLabel),style:M?.roomLabel,transform:`translate(${t.x} ${t.y})`,"aria-hidden":`true`,children:n===void 0?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`text`,{className:nu.planCanvasRoomName,textAnchor:`middle`,children:e.meta?.name??``}),(0,p.jsx)(`text`,{className:nu.planCanvasRoomArea,textAnchor:`middle`,dy:`1.2em`,children:x(e.area)})]}):n},e.id)}),E]})]})}var lu=500;function uu(e,t=50){let[n,r]=(0,l.useState)(e),i=(0,l.useRef)([]),a=(0,l.useRef)([]),o=(0,l.useRef)(null),s=(0,l.useRef)(e),c=(0,l.useRef)(null),[,u]=(0,l.useState)(0),d=(0,l.useCallback)(e=>{s.current=e,r(e)},[]),f=(0,l.useCallback)(e=>{i.current=[...i.current,e].slice(-t),a.current=[]},[t]),p=(0,l.useCallback)(()=>{o.current=s.current},[]),m=(0,l.useCallback)(e=>{d(e)},[d]),h=(0,l.useCallback)(()=>{let e=o.current;return o.current=null,!e||e===s.current?!1:(f(e),c.current=null,u(e=>e+1),!0)},[f]),g=(0,l.useCallback)(()=>{let e=o.current;return o.current=null,e?(d(e),e):null},[d]),_=(0,l.useCallback)((e,t,n=[])=>{if(e===s.current)return;let r=n.join(`,`),o=Date.now(),l=c.current;l!==null&&l.reason===t&&l.targets===r&&o-l.at<lu&&i.current.length>0?a.current=[]:f(s.current),c.current={reason:t,targets:r,at:o},d(e),u(e=>e+1)},[f,d]),v=(0,l.useCallback)(e=>{d(e)},[d]),y=(0,l.useCallback)(()=>{let e=i.current;if(e.length===0)return null;let t=e[e.length-1];return i.current=e.slice(0,-1),a.current=[s.current,...a.current],c.current=null,d(t),u(e=>e+1),t},[d]),b=(0,l.useCallback)(()=>{let e=a.current;if(e.length===0)return null;let n=e[0];return a.current=e.slice(1),i.current=[...i.current,s.current].slice(-t),c.current=null,d(n),u(e=>e+1),n},[t,d]),x=(0,l.useCallback)(()=>{i.current=[],a.current=[],c.current=null,u(e=>e+1)},[]),S=(0,l.useCallback)(()=>o.current!==null,[]);return{present:n,canUndo:i.current.length>0,canRedo:a.current.length>0,beginGesture:p,updateGesture:m,endGesture:h,cancelGesture:g,commit:_,replace:v,undo:y,redo:b,clearHistory:x,isGestureActive:S}}var $={roomDrawer:`roomDrawer_SJj4-`,"roomDrawer-disabled":`roomDrawer-disabled_VRaTX`,roomDrawerDisabled:`roomDrawer-disabled_VRaTX`,"roomDrawer-toolbar":`roomDrawer-toolbar_55H5p`,roomDrawerToolbar:`roomDrawer-toolbar_55H5p`,"roomDrawer-toolbar-separator":`roomDrawer-toolbar-separator_z-eRp`,roomDrawerToolbarSeparator:`roomDrawer-toolbar-separator_z-eRp`,"roomDrawer-toolButton":`roomDrawer-toolButton_4GtjR`,roomDrawerToolButton:`roomDrawer-toolButton_4GtjR`,"roomDrawer-viewButton":`roomDrawer-viewButton_OnZR6`,roomDrawerViewButton:`roomDrawer-viewButton_OnZR6`,"roomDrawer-toolButtonActive":`roomDrawer-toolButtonActive_-BXua`,roomDrawerToolButtonActive:`roomDrawer-toolButtonActive_-BXua`,"roomDrawer-toolIcon":`roomDrawer-toolIcon_mJ0vT`,roomDrawerToolIcon:`roomDrawer-toolIcon_mJ0vT`,"roomDrawer-viewControls":`roomDrawer-viewControls_TKUQ1`,roomDrawerViewControls:`roomDrawer-viewControls_TKUQ1`,"roomDrawer-zoomLabel":`roomDrawer-zoomLabel_xGvgk`,roomDrawerZoomLabel:`roomDrawer-zoomLabel_xGvgk`,"roomDrawer-floorBar":`roomDrawer-floorBar_PMWOg`,roomDrawerFloorBar:`roomDrawer-floorBar_PMWOg`,"roomDrawer-floorTab":`roomDrawer-floorTab_lvLY-`,roomDrawerFloorTab:`roomDrawer-floorTab_lvLY-`,"roomDrawer-floorTab-active":`roomDrawer-floorTab-active_pB7Oz`,roomDrawerFloorTabActive:`roomDrawer-floorTab-active_pB7Oz`,"roomDrawer-floorTab-add":`roomDrawer-floorTab-add_F46eU`,roomDrawerFloorTabAdd:`roomDrawer-floorTab-add_F46eU`,"roomDrawer-canvasWrapper":`roomDrawer-canvasWrapper_ctjFw`,roomDrawerCanvasWrapper:`roomDrawer-canvasWrapper_ctjFw`,"roomDrawer-canvasWrapper-drawing":`roomDrawer-canvasWrapper-drawing_8kVH2`,roomDrawerCanvasWrapperDrawing:`roomDrawer-canvasWrapper-drawing_8kVH2`,"roomDrawer-preview":`roomDrawer-preview_vqJGn`,roomDrawerPreview:`roomDrawer-preview_vqJGn`,"roomDrawer-marquee":`roomDrawer-marquee_Vbm28`,roomDrawerMarquee:`roomDrawer-marquee_Vbm28`,"roomDrawer-handle":`roomDrawer-handle_AFyj0`,roomDrawerHandle:`roomDrawer-handle_AFyj0`,"roomDrawer-handle-active":`roomDrawer-handle-active_rfh4M`,roomDrawerHandleActive:`roomDrawer-handle-active_rfh4M`,"roomDrawer-toolButtonOn":`roomDrawer-toolButtonOn_et-K9`,roomDrawerToolButtonOn:`roomDrawer-toolButtonOn_et-K9`,"roomDrawer-guide":`roomDrawer-guide_cg7gP`,roomDrawerGuide:`roomDrawer-guide_cg7gP`,"roomDrawer-guide-angle":`roomDrawer-guide-angle_3SLun`,roomDrawerGuideAngle:`roomDrawer-guide-angle_3SLun`,"roomDrawer-snapMarker":`roomDrawer-snapMarker_2SDhf`,roomDrawerSnapMarker:`roomDrawer-snapMarker_2SDhf`,"roomDrawer-measureLine":`roomDrawer-measureLine_Htenn`,roomDrawerMeasureLine:`roomDrawer-measureLine_Htenn`,"roomDrawer-measureLine-hovered":`roomDrawer-measureLine-hovered_f6U9P`,roomDrawerMeasureLineHovered:`roomDrawer-measureLine-hovered_f6U9P`,"roomDrawer-measureGrip":`roomDrawer-measureGrip_OGY0c`,roomDrawerMeasureGrip:`roomDrawer-measureGrip_OGY0c`,"roomDrawer-midHandle":`roomDrawer-midHandle_rJVzW`,roomDrawerMidHandle:`roomDrawer-midHandle_rJVzW`,"roomDrawer-measure":`roomDrawer-measure_N-cse`,roomDrawerMeasure:`roomDrawer-measure_N-cse`,"roomDrawer-measure-locked":`roomDrawer-measure-locked_FiNSg`,roomDrawerMeasureLocked:`roomDrawer-measure-locked_FiNSg`,"roomDrawer-measure-offset":`roomDrawer-measure-offset_IdBYD`,roomDrawerMeasureOffset:`roomDrawer-measure-offset_IdBYD`,"roomDrawer-measure-secondary":`roomDrawer-measure-secondary_DgNzz`,roomDrawerMeasureSecondary:`roomDrawer-measure-secondary_DgNzz`,"roomDrawer-inspector":`roomDrawer-inspector_hOVUl`,roomDrawerInspector:`roomDrawer-inspector_hOVUl`,"roomDrawer-inspector-action":`roomDrawer-inspector-action_zMwML`,roomDrawerInspectorAction:`roomDrawer-inspector-action_zMwML`,"roomDrawer-inspector-label":`roomDrawer-inspector-label_yA6NE`,roomDrawerInspectorLabel:`roomDrawer-inspector-label_yA6NE`,"roomDrawer-inspector-kind":`roomDrawer-inspector-kind_ebNzr`,roomDrawerInspectorKind:`roomDrawer-inspector-kind_ebNzr`,"roomDrawer-inspector-kindEmpty":`roomDrawer-inspector-kindEmpty_JIx7s`,roomDrawerInspectorKindEmpty:`roomDrawer-inspector-kindEmpty_JIx7s`,"roomDrawer-inspector-field":`roomDrawer-inspector-field_-c8za`,roomDrawerInspectorField:`roomDrawer-inspector-field_-c8za`,"roomDrawer-inspector-name":`roomDrawer-inspector-name_3xHLm`,roomDrawerInspectorName:`roomDrawer-inspector-name_3xHLm`,"roomDrawer-inspector-delete":`roomDrawer-inspector-delete_MzEl2`,roomDrawerInspectorDelete:`roomDrawer-inspector-delete_MzEl2`,"roomDrawer-hint":`roomDrawer-hint_3WTFa`,roomDrawerHint:`roomDrawer-hint_3WTFa`,"roomDrawer-hint-report":`roomDrawer-hint-report_oFtGt`,roomDrawerHintReport:`roomDrawer-hint-report_oFtGt`,"roomDrawer-fileInput":`roomDrawer-fileInput_EAZw-`,roomDrawerFileInput:`roomDrawer-fileInput_EAZw-`},du=[`select`,`wall`,`rect`,`door`,`window`,`archway`,`measure`],fu={v:`select`,w:`wall`,r:`rect`,d:`door`,n:`window`,a:`archway`,m:`measure`},pu={door:c.ot.Door,window:c.ot.Window,archway:c.ot.Archway},mu={[c.ot.Door]:{width:900,sill:0,head:2100},[c.ot.Window]:{width:1200,sill:900,head:2100},[c.ot.Archway]:{width:1200,sill:0,head:2100},[c.ot.Gap]:{width:1e3,sill:0,head:2500}},hu=1,gu=4,_u=[];function vu(e){return e>=1e3?`${(e/1e3).toFixed(2)} m`:`${Math.round(e)} mm`}function yu(e){let t=e/1e6;return`${t.toFixed(+(t<10))} m²`}function bu(e){return`${Math.round(e*10)/10}°`}function xu(e){return`${Math.round(e*1e3)/10}%`}function Su(e){let t=(e*180/Math.PI%360+360)%360;return t>180?t-360:t}var Cu={tools:`Drawing tools`,storeyHeightHint:`Storey height. The floors above move to sit on top of it.`,sillHeightHint:`How far above the floor the opening starts. Stored for a 3D view; it does not change the plan.`,select:`Select and edit`,wall:`Draw walls`,rect:`Draw a room`,measure:`Measure`,door:`Add a door`,window:`Add a window`,archway:`Add an archway`,undo:`Undo`,redo:`Redo`,download:`Download plan`,upload:`Open a plan file`,underlay:`Show the floor below`,addFloor:`Add a floor above`,floorName:`Floor name`,duplicateFloor:`Copy this floor to a new one above`,deleteFloor:`Delete this floor`,floorHeight:`Height (mm)`,moveFloorUp:`Move this floor up`,moveFloorDown:`Move this floor down`,newRoomName:e=>`Room ${e}`,newFloorName:e=>`Floor ${e}`,copiedFloorName:e=>`${e} copy`,initialFloorName:`Ground floor`,selectedFloor:`Floor`,importFailed:`That file could not be read as a floor plan`,snap:`Snap to grid and geometry`,angleLock:e=>`Lock to ${e}° angles`,grid:`Show grid`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,fit:`Fit to content`,roomName:`Room name`,addCorner:`Add corner`,thickness:`Thickness (mm)`,width:`Width (mm)`,sill:`Sill (mm)`,deleteSelection:`Delete selection`,selectedCount:e=>`${e} selected`,selectedRoom:`Room`,selectedWall:`Wall`,selectedCorner:`Corner`,selectedDoor:`Door`,selectedWindow:`Window`,selectedArchway:`Archway`,selectedGap:`Gap`,hintSelect:`Drag a corner to reshape · Drag a wall to push it, and the room next door moves with it · Ctrl-click or drag a box to select several · Delete to remove`,hintSelectSingle:`Drag a corner to reshape · Drag a wall to push it, and the room next door moves with it · Drag the dot on a selected wall to add a corner · Delete to remove`,hintWall:`Click to place corners · Shift for a fixed angle, L to latch it · Click the first corner or press Enter to close`,hintRect:`Drag to draw a room`,hintMeasure:`Drag to measure · Drag an end or the line to adjust it · Delete removes one, Escape clears them`,hintOpening:`Click a wall to cut an opening into it`,relativeAngle:e=>`${e} rel`};function wu(e){let{ref:t,value:n,defaultValue:r,onChange:i,onChangeEnd:a,floorId:o,defaultFloorId:s,onFloorChange:d,showFloorBar:m=!0,showUnderlay:h=!0,tool:g,defaultTool:_=`select`,onToolChange:v,tools:y=du,selection:b,defaultSelection:x,onSelectionChange:S,multiSelect:C=!0,onHoverChange:w,view:T,defaultView:O,onViewChange:k,minZoom:A=.005,maxZoom:M=2,fitOnMount:N=!0,gridSize:P=100,showGrid:F=!0,snap:I=!0,angleLock:L=!1,constrainAngle:R=45,showSnapGuides:z=!0,wallThickness:B=c.R.thickness,wallHeight:V,openingDefaults:H,showMeasurements:U=!0,formatLength:W=vu,formatArea:G=yu,formatAngle:ee=bu,formatZoom:K=xu,showToolbar:te=!0,showInspector:ne=!0,showHint:re=!0,showHistoryControls:q=!0,showFileControls:ie=!0,fileName:ae,onImport:J,historyMode:oe=`internal`,historyLimit:se=50,onHistoryChange:ce,readOnly:le=!1,disabled:Y=!1,canvasHeight:ue=`420px`,getRoomColor:de,renderRoomLabel:fe,labels:pe,icons:me,"aria-label":he,className:ge,style:_e,classNames:ve,styles:be,...xe}=E(`RoomDrawer`,e),Z=D(`RoomDrawer`,pe,Cu),{newRoomName:Se,newFloorName:Ce,copiedFloorName:we,initialFloorName:Te,relativeAngle:Ee}=Z,De=Pe(),Oe=De?c.u:c.l,ke=(0,l.useRef)(null),Ae=(0,l.useRef)(null),je=(0,l.useRef)(null),Me=(0,l.useRef)(null),Ne=(0,l.useRef)({kind:`none`}),Fe=(0,l.useRef)(new Map),Ie=(0,l.useRef)(null),Le=(0,l.useRef)(!1),Re=(0,l.useRef)(!1),ze=(0,l.useRef)(!1),Be=uu((0,l.useMemo)(()=>r??n??c.D({floorLabel:Te}),[]),se),Ve=n!==void 0,He=Ve?n:Be.present;(0,l.useEffect)(()=>{if(Ve&&n){if(n===Me.current){Be.replace(n);return}Be.commit(n,`external`)}},[n,Ve]);let[Ue,We]=(0,l.useState)(s),Ge=o??Ue??He.floors[0]?.id,Q=(0,l.useMemo)(()=>c.j(He,Ge)??c.j(He)??c.D().floors[0],[He,Ge]),[Ke,qe]=(0,l.useState)(h);(0,l.useEffect)(()=>qe(h),[h]);let Je=(0,l.useMemo)(()=>Ke?c.O(He,Q.id):null,[Ke,He,Q.id]),Ye=(0,l.useCallback)(e=>{e!==Q.id&&(o===void 0&&We(e),d?.(e))},[Q.id,o,d]),Xe=(0,l.useMemo)(()=>c.v(Q),[Q]).rooms,[Ze,Qe]=(0,l.useState)(_),$e=g??Ze,et=(0,l.useCallback)(e=>{g===void 0&&Qe(e),v?.(e)},[g,v]),[tt,nt]=(0,l.useState)(x??_u),rt=b===void 0?tt:b,it=(0,l.useRef)(rt);it.current=rt;let at=(0,l.useCallback)(e=>{let t=e===null?_u:Array.isArray(e)?e:[e];it.current=t,b===void 0&&nt(t),S?.([...t])},[b,S]),ot=(0,l.useCallback)(e=>{let t=it.current,n=t.filter(t=>t.type!==e.type||t.id!==e.id);at(n.length===t.length?[...t,e]:n)},[at]),st=rt.length===1?rt[0]:null,ct=(0,l.useCallback)(e=>{let t=new Set;for(let n of e)if(n.type===`node`)t.add(n.id);else if(n.type===`wall`){let e=Q.walls[n.id];e&&(t.add(e.a),t.add(e.b))}else if(n.type===`room`){let e=Xe.find(e=>e.roomId===n.id);for(let n of e?.nodeIds??[])t.add(n)}return t},[Q.walls,Xe]),lt=(0,l.useMemo)(()=>ct(rt),[ct,rt]),[ut,dt]=(0,l.useState)(null),[ft,pt]=(0,l.useState)(O??{x:0,y:0,zoom:.05}),mt=T??ft,ht=(0,l.useCallback)(e=>{T===void 0&&pt(e),k?.(e)},[T,k]),[gt,_t]=(0,l.useState)({width:800,height:420}),[vt,yt]=(0,l.useState)([]),[bt,xt]=(0,l.useState)(null),[St,Ct]=(0,l.useState)(I),[wt,Tt]=(0,l.useState)(L);(0,l.useEffect)(()=>Ct(I),[I]),(0,l.useEffect)(()=>Tt(L),[L]);let[Et,Dt]=(0,l.useState)(F);(0,l.useEffect)(()=>Dt(F),[F]);let Ot=(0,l.useRef)(null),[kt,At]=(0,l.useState)(null),[jt,Mt]=(0,l.useState)([]),Nt=(0,l.useRef)(0),[Pt,Ft]=(0,l.useState)(null),It=(0,l.useRef)(null),Lt=(0,l.useCallback)(e=>{let t=c.p(Oe,mt.zoom);for(let n=jt.length-1;n>=0;n--){let r=jt[n];if(Math.hypot(e.x-r.a.x,e.y-r.a.y)<=t.node)return{id:r.id,end:`a`};if(Math.hypot(e.x-r.b.x,e.y-r.b.y)<=t.node)return{id:r.id,end:`b`}}for(let n=jt.length-1;n>=0;n--){let r=jt[n];if(c.it(e,r.a,r.b).dist<=t.wall)return{id:r.id}}return null},[jt,Oe,mt.zoom]),[Rt,zt]=(0,l.useState)(null),Bt=!le&&!Y,Vt=(0,l.useMemo)(()=>{if(vt.length<2)return;let e=vt[vt.length-2],t=vt[vt.length-1];return Math.atan2(t.y-e.y,t.x-e.x)},[vt]);(0,l.useEffect)(()=>{let e=Ae.current;if(!e)return;let t=new ResizeObserver(()=>{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&_t({width:Math.round(t.width),height:Math.round(t.height)})});t.observe(e);let n=e.getBoundingClientRect();return n.width>0&&n.height>0&&_t({width:Math.round(n.width),height:Math.round(n.height)}),()=>t.disconnect()},[]);let Ht=(0,l.useCallback)((e,t)=>{let n=Ae.current?.getBoundingClientRect()??{left:0,top:0};return c.s(e,t,n,mt)},[mt]),Ut=(0,l.useCallback)(e=>({x:(e.x-mt.x)*mt.zoom,y:(e.y-mt.y)*mt.zoom}),[mt]),Wt=(0,l.useCallback)((e,t,n,r,i)=>{let a=St!==Re.current,o=wt!==ze.current,s=c.c(e,{floor:Q,pxToWorld:mt.zoom>0?1/mt.zoom:1,origin:t,referenceAngle:r,excludeNodeIds:n,excludeWallIds:i,options:{enabled:a?[c.o.Node,c.o.Intersection,c.o.Wall,c.o.Angle,c.o.Extension,c.o.Alignment,c.o.Grid]:[],gridSize:P,angleStepDeg:o?R:0,toleranceScreenPx:De?16:10}});return Ot.current=s,s},[Q,mt.zoom,St,wt,P,R,De]),Gt=(0,l.useCallback)(e=>{let t=Object.values(Q.walls).filter(t=>t.a===e||t.b===e),n=new Set(t.map(e=>e.id)),r=Q.nodes[e];if(!r)return{excludeWallIds:n};let i={x:r.x,y:r.y},a,o=t[0];if(o){let t=o.a===e?o.b:o.a,n=Q.nodes[t];n&&(a=Math.atan2(n.y-r.y,n.x-r.x))}return{origin:i,referenceAngle:a,excludeWallIds:n}},[Q]),Kt=(0,l.useCallback)((e={})=>{let t=e.padding??24,n=c.k(Q);if(!n||n.width<=0||n.height<=0){ht({x:-1e3,y:-1e3,zoom:.05});return}let r=Math.min((gt.width-t*2)/n.width,(gt.height-t*2)/n.height),i=Math.max(A,Math.min(M,r));ht({x:n.minX-(gt.width/i-n.width)/2,y:n.minY-(gt.height/i-n.height)/2,zoom:i})},[Q,gt.width,gt.height,A,M,ht]),qt=(0,l.useRef)(!1);(0,l.useEffect)(()=>{N&&!qt.current&&Object.keys(Q.nodes).length!==0&&(gt.width<=1||(qt.current=!0,Kt()))},[N,Q,gt.width,Kt]);let Jt=(0,l.useCallback)((e,t,n,r=[],o={})=>{if(e===Q)return He;let s=c.F(He,e);Me.current=s,n?o.push===!1?Be.replace(s):Be.commit(s,t,r):Be.updateGesture(s);let l={reason:t,committed:n,targetIds:r};return i?.(s,l),n&&a?.(s,l),s},[Q,He,Be,i,a]),Yt=(0,l.useCallback)((e,t,n=[],r={})=>{let i=c._(c.tt(e).floor,{nameFor:Se}).floor;return Jt(i,t,!0,n,r)},[Jt,Se]);(0,l.useEffect)(()=>{ce?.({canUndo:Be.canUndo,canRedo:Be.canRedo})},[Be.canUndo,Be.canRedo,ce]);let Xt=(0,l.useMemo)(()=>st?.type===`room`?Xe.find(e=>e.roomId===st.id)??null:null,[st,Xe]),Zt=st?.type===`wall`?Q.walls[st.id]:void 0,Qt=st?.type===`opening`?Q.openings[st.id]:void 0,$t=(0,l.useMemo)(()=>{if(!Zt)return null;let e=Q.nodes[Zt.a],t=Q.nodes[Zt.b];return!e||!t?null:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}},[Zt,Q.nodes]),en=(0,l.useCallback)(()=>{if(!Bt||!Zt)return;let e=c.X(Q,Zt.id,.5);e.result.wallIds&&(Yt(e.floor,`edit-wall`,[e.result.nodeId]),at({type:`node`,id:e.result.nodeId}))},[Bt,Zt,Q,Yt,at]),tn=(0,l.useCallback)((e,t,n=new Set)=>{if(e.type===`wall`)return{floor:c.J(t,e.id).floor};if(e.type===`opening`)return{floor:c.q(t,e.id).floor};if(e.type===`node`){let n=c.W(t,e.id,{force:!0});if(n.result)return{floor:n.floor,reselect:{type:`wall`,id:n.result.wallId}};let r=t;for(let n of Object.values(t.walls))(n.a===e.id||n.b===e.id)&&(r=c.J(r,n.id,{dissolveCollinear:!1}).floor);return{floor:r}}let r=Xe.find(t=>t.roomId===e.id);if(!r)return{floor:t};let i=new Set;for(let t of Xe)if(t.roomId!==e.id&&!(t.roomId&&n.has(t.roomId)))for(let e of t.wallIds)i.add(e);let a=t;for(let e of new Set(r.wallIds))i.has(e)||(a=c.J(a,e,{dissolveCollinear:!1}).floor);let o={...a.rooms};return delete o[e.id],{floor:{...a,rooms:o}}},[Xe]),nn=(0,l.useCallback)(()=>{let e=it.current;if(!Bt||e.length===0)return;let t={room:0,opening:1,wall:2,node:3},n=[...e].sort((e,n)=>t[e.type]-t[n.type]),r=new Set(n.filter(e=>e.type===`room`).map(e=>e.id)),i=Q,a;for(let e of n){let t=tn(e,i,r);i=t.floor,n.length===1&&(a=t.reselect)}i!==Q&&(Yt(i,`delete`,n.map(e=>e.id)),at(a??null))},[Bt,Q,tn,Yt,at]),rn=(0,l.useCallback)(()=>{yt(e=>e.length===0?e:[]),At(null)},[]);(0,l.useEffect)(()=>{rn()},[$e,rn]);let an=(0,l.useCallback)(e=>{if(Y)return;if(ke.current?.focus(),zt(null),Fe.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),e.currentTarget.setPointerCapture?.(e.pointerId),Fe.current.size===2){let[e,t]=[...Fe.current.values()];Ne.current.kind!==`none`&&Ne.current.kind!==`pan`&&Be.cancelGesture(),Ne.current={kind:`pinch`,startDist:Math.hypot(t.x-e.x,t.y-e.y),startView:mt,startMid:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}};return}if(Fe.current.size>2)return;if(Ie.current={client:{x:e.clientX,y:e.clientY},moved:!1},e.button===1||Le.current){Ne.current={kind:`pan`,startClient:{x:e.clientX,y:e.clientY},startView:mt};return}if(e.button!==0)return;let t=Ht(e.clientX,e.clientY);if(!Bt){let e=c.d(Q,Xe,t,c.p(Oe,mt.zoom));at(e);return}if($e===`rect`){let e=Wt(t).point;Ne.current={kind:`rect`,start:e,current:e},Be.beginGesture();return}if($e===`measure`){let e=Lt(t);if(e){let n=jt.find(t=>t.id===e.id);Ne.current=e.end?{kind:`measureEnd`,id:e.id,end:e.end}:{kind:`measureMove`,id:e.id,startWorld:t,origA:n.a,origB:n.b};return}let n=Wt(t).point;Ne.current={kind:`measure`,start:n,current:n};return}if($e===`wall`){let e=vt[vt.length-1],n=Wt(t,e,void 0,Vt).point;if(vt.length===0){yt([n]);return}let r=vt[vt.length-1],i=c.V(Q,r,n,{thickness:B,type:c.lt.Interior,height:V},c.p(Oe,mt.zoom).node);i.result.wallIds.length>0&&Yt(i.floor,`draw-wall`,i.result.wallIds),vt.length>=2&&Math.hypot(n.x-vt[0].x,n.y-vt[0].y)<c.p(Oe,mt.zoom).node?rn():yt(e=>[...e,n]);return}let n=pu[$e];if(n){let e=c.p(Oe,mt.zoom),r=c.d(Q,Xe,t,e,{accept:[`wall`]});if(r?.type!==`wall`)return;let i=Q.walls[r.id],a=Q.nodes[i.a],o=Q.nodes[i.b],s=Math.hypot(o.x-a.x,o.y-a.y),l=((t.x-a.x)*(o.x-a.x)+(t.y-a.y)*(o.y-a.y))/(s*s||1),u={...mu[n],...H?.[n]},d=c.z(Q,{wallId:i.id,kind:n,offset:Math.min(Math.max(l,0),1)*s,width:u.width,sill:u.sill,head:u.head});d.result.openingId&&(Yt(d.floor,`add-opening`,[d.result.openingId]),at({type:`opening`,id:d.result.openingId}));return}let r=c.p(Oe,mt.zoom);if($t&&st?.type===`wall`&&Math.hypot(t.x-$t.x,t.y-$t.y)<=r.node){Be.beginGesture(),Ne.current={kind:`wallSplit`,wallId:st.id,at:$t};return}let i=c.d(Q,Xe,t,r),a=C&&(e.ctrlKey||e.metaKey);if(!i){a||at(null),Ne.current=C?{kind:`marquee`,start:t,current:t,additive:a,base:it.current}:{kind:`none`};return}if((e.ctrlKey||e.metaKey)&&i.type===`wall`&&Q.walls[i.id]){let e=Q.walls[i.id];a||at(i),Be.beginGesture(),Ne.current={kind:`wall`,wallId:i.id,startWorld:t,origA:{...Q.nodes[e.a]},origB:{...Q.nodes[e.b]},moved:!1,detach:!0,toggle:a};return}if(a){ot(i),Ne.current={kind:`none`};return}if(it.current.some(e=>e.type===i.type&&e.id===i.id)||at(i),Be.beginGesture(),it.current.length>1){let e=[...ct(it.current)],n={};for(let t of e){let e=Q.nodes[t];e&&(n[t]={x:e.x,y:e.y})}Ne.current={kind:`room`,nodeIds:e,startWorld:t,orig:n,moved:!1};return}if(i.type===`node`)Ne.current={kind:`node`,nodeId:i.id,moved:!1,...Gt(i.id)};else if(i.type===`wall`){let e=Q.walls[i.id];Ne.current={kind:`wall`,wallId:i.id,startWorld:t,origA:{...Q.nodes[e.a]},origB:{...Q.nodes[e.b]},moved:!1}}else if(i.type===`opening`)Ne.current={kind:`opening`,openingId:i.id,moved:!1};else{let e=Xe.find(e=>e.roomId===i.id),n=e?[...new Set(e.nodeIds)]:[],r={};for(let e of n){let t=Q.nodes[e];t&&(r[e]={x:t.x,y:t.y})}Ne.current={kind:`room`,nodeIds:n,startWorld:t,orig:r,moved:!1}}},[Y,Bt,mt,$e,Q,Xe,Oe,Ht,Wt,vt,B,V,H,Yt,at,$t,st,Vt,Gt,ct,C,ot,Be,rn,Lt,jt]),on=(0,l.useCallback)(e=>{if(Y)return;Fe.current.has(e.pointerId)&&Fe.current.set(e.pointerId,{x:e.clientX,y:e.clientY});let t=Ne.current;if(t.kind===`pinch`&&Fe.current.size>=2){let[e,n]=[...Fe.current.values()],r=Math.hypot(n.x-e.x,n.y-e.y);if(t.startDist<=0)return;let i=Math.max(A,Math.min(M,t.startView.zoom*(r/t.startDist))),a=Ae.current?.getBoundingClientRect()??{left:0,top:0},o={x:(e.x+n.x)/2,y:(e.y+n.y)/2},s=c.s(t.startMid.x,t.startMid.y,a,t.startView);ht({x:s.x-(o.x-a.left)/i,y:s.y-(o.y-a.top)/i,zoom:i});return}if(Ie.current){let t=e.clientX-Ie.current.client.x,n=e.clientY-Ie.current.client.y;Math.hypot(t,n)>gu&&(Ie.current.moved=!0)}if(t.kind===`pan`){ht({x:t.startView.x-(e.clientX-t.startClient.x)/t.startView.zoom,y:t.startView.y-(e.clientY-t.startClient.y)/t.startView.zoom,zoom:t.startView.zoom});return}let n=Ht(e.clientX,e.clientY);if(xt(n),t.kind===`none`){if(!Bt)return;if($e===`wall`&&vt.length>0){let e=Wt(n,vt[vt.length-1],void 0,Vt);xt(e.point),At(e);return}if($e===`select`){let e=c.d(Q,Xe,n,c.p(Oe,mt.zoom));c.f(e,ut)||(dt(e),w?.(e))}$e===`measure`&&Ft(Lt(n)?.id??null);return}if(Ie.current?.moved){if(t.kind===`measureEnd`){let e=Wt(n).point;Mt(n=>n.map(n=>n.id===t.id?{...n,[t.end]:e}:n)),xt(e);return}if(t.kind===`measureMove`){let e=n.x-t.startWorld.x,r=n.y-t.startWorld.y;Mt(n=>n.map(n=>n.id===t.id?{...n,a:{x:t.origA.x+e,y:t.origA.y+r},b:{x:t.origB.x+e,y:t.origB.y+r}}:n));return}if(t.kind===`rect`||t.kind===`measure`){Ne.current={...t,current:Wt(n).point},xt(Wt(n).point);return}if(t.kind===`marquee`){Ne.current={...t,current:n},xt(n);return}if(t.kind===`wallSplit`){let e=c.X(Q,t.wallId,t.at);if(!e.result.wallIds){Ne.current={kind:`none`};return}let r=e.result.nodeId,i=Q.walls[t.wallId],a=i?e.floor.nodes[i.a]:void 0,o=i?e.floor.nodes[i.b]:void 0,s={origin:a?{x:a.x,y:a.y}:void 0,referenceAngle:a&&o?Math.atan2(o.y-a.y,o.x-a.x):void 0,excludeWallIds:new Set(e.result.wallIds)},l=Wt(n,s.origin,new Set([r]),s.referenceAngle,s.excludeWallIds).point;Ne.current={kind:`node`,nodeId:r,moved:!0,...s},at({type:`node`,id:r}),At(Ot.current),Jt(c.K(e.floor,r,l).floor,`move-node`,!1,[r]);return}if(t.kind===`node`){let e=Wt(n,t.origin,new Set([t.nodeId]),t.referenceAngle,t.excludeWallIds).point;At(Ot.current),Ne.current={...t,moved:!0},Jt(c.K(Q,t.nodeId,e).floor,`move-node`,!1,[t.nodeId]);return}if(t.kind===`wall`){let e=Q.walls[t.wallId];if(!e)return;let r=t.origB.x-t.origA.x,i=t.origB.y-t.origA.y,a=Math.hypot(r,i);if(a<1e-6)return;let o={x:-i/a,y:r/a},s=(n.x-t.startWorld.x)*o.x+(n.y-t.startWorld.y)*o.y,l=I!==Re.current&&P>0?P:1,u=Math.round(s/l)*l,d=Math.max(l,10);if(t.detach){if(Math.abs(u)<d)return;let e=c.U(Q,t.wallId,{x:o.x*u,y:o.y*u});if(!e.result)return;Ne.current={...t,detach:!1,toggle:!1,detachedSign:Math.sign(u),moved:!0},at({type:`wall`,id:t.wallId}),Jt(e.floor,`move-wall`,!1,[t.wallId]);return}let f=c.K(Q,e.a,{x:t.origA.x+o.x*u,y:t.origA.y+o.y*u}).floor;f=c.K(f,e.b,{x:t.origB.x+o.x*u,y:t.origB.y+o.y*u}).floor,t.detachedSign&&Math.abs(u)<10?(f=c.tt(f).floor,Ne.current={...t,detachedSign:void 0,moved:!0}):Ne.current={...t,moved:!0},Jt(f,`move-wall`,!1,[t.wallId]);return}if(t.kind===`opening`){let e=Q.openings[t.openingId];if(!e)return;let r=Q.walls[e.wallId],i=Q.nodes[r.a],a=Q.nodes[r.b],o=Math.hypot(a.x-i.x,a.y-i.y),s=((n.x-i.x)*(a.x-i.x)+(n.y-i.y)*(a.y-i.y))/(o*o||1);Ne.current={...t,moved:!0},Jt(c.Q(Q,t.openingId,{offset:Math.min(Math.max(s,0),1)*o}).floor,`move-opening`,!1,[t.openingId]);return}if(t.kind===`room`){let e=n.x-t.startWorld.x,r=n.y-t.startWorld.y,i=I!==Re.current&&P>0?P:1,a=Math.round(e/i)*i,o=Math.round(r/i)*i,s=Q;for(let e of t.nodeIds){let n=t.orig[e];n&&(s=c.K(s,e,{x:n.x+a,y:n.y+o}).floor)}Ne.current={...t,moved:!0},Jt(s,`move-room`,!1,t.nodeIds)}}},[Y,Bt,$e,Q,Xe,ut,Oe,mt.zoom,A,M,P,I,Ht,Wt,Jt,ht,at,vt,Vt,w,Lt]),sn=(0,l.useCallback)((e,t)=>{Fe.current.delete(e.pointerId);let n=Ne.current;Ne.current={kind:`none`};let r=Ie.current?.moved??!1;if(Ie.current=null,At(null),n.kind===`none`||n.kind===`pan`||n.kind===`pinch`)return;if(n.kind===`marquee`){if(t||!r){t&&at([...n.base]);return}let e=Math.min(n.start.x,n.current.x),i=Math.max(n.start.x,n.current.x),a=Math.min(n.start.y,n.current.y),o=Math.max(n.start.y,n.current.y),s=[];for(let t of Object.values(Q.nodes))t.x>=e&&t.x<=i&&t.y>=a&&t.y<=o&&s.push({type:`node`,id:t.id});if(n.additive){let e=new Set(n.base.map(e=>`${e.type}:${e.id}`));at([...n.base,...s.filter(t=>!e.has(`${t.type}:${t.id}`))])}else at(s);return}if(t){let e=Be.cancelGesture();e&&i?.(e,{reason:`external`,committed:!1,targetIds:[]});return}if(n.kind===`measureEnd`||n.kind===`measureMove`)return;if(n.kind===`measure`){let e=Math.hypot(n.current.x-n.start.x,n.current.y-n.start.y);r&&e>hu&&(Nt.current+=1,Mt(e=>[...e,{id:Nt.current,a:n.start,b:n.current}]));return}if(n.kind===`rect`){if(!r){Be.cancelGesture();return}let e=c.B(Q,n.start,n.current,{thickness:B,type:c.lt.Interior,height:V},c.p(Oe,mt.zoom).node);if(e.result.wallIds.length===0){Be.cancelGesture();return}let t=Be.endGesture();Yt(e.floor,`draw-rect`,e.result.wallIds,{push:!t});return}if(!r){Be.cancelGesture(),n.kind===`wall`&&n.toggle&&ot({type:`wall`,id:n.wallId});return}if(n.kind===`node`){let e=Q.nodes[n.nodeId];if(e){let t=c.p(Oe,mt.zoom).node,r=Object.values(Q.nodes).find(r=>r.id!==n.nodeId&&Math.hypot(r.x-e.x,r.y-e.y)<=t);if(r){let e=Be.endGesture();Yt(c.G(Q,r.id,n.nodeId).floor,`move-node`,[r.id],{push:!e}),at({type:`node`,id:r.id});return}}}let a=Be.endGesture(),o=n.kind===`wall`?`move-wall`:n.kind===`opening`?`move-opening`:n.kind===`room`?`move-room`:`move-node`;Yt(Q,o,[],{push:!a})},[Q,Be,Oe,mt.zoom,B,V,Yt,at,ot,i]);(0,l.useEffect)(()=>{let e=Ae.current;if(!e||Y)return;function t(t){t.preventDefault();let n=e.getBoundingClientRect(),r=Math.exp(-t.deltaY*.002);ht((()=>{let e=cn.current,i=Math.max(A,Math.min(M,e.zoom*r)),a=c.s(t.clientX,t.clientY,n,e);return{x:a.x-(t.clientX-n.left)/i,y:a.y-(t.clientY-n.top)/i,zoom:i}})())}return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[Y,A,M,ht]);let cn=(0,l.useRef)(mt);cn.current=mt;let ln=(0,l.useCallback)(e=>{let t=Math.max(A,Math.min(M,mt.zoom*e)),n={x:mt.x+gt.width/2/mt.zoom,y:mt.y+gt.height/2/mt.zoom};ht({x:n.x-gt.width/2/t,y:n.y-gt.height/2/t,zoom:t})},[mt,gt,A,M,ht]),un=(0,l.useCallback)(()=>{if(oe===`none`)return;let e=Be.undo();e&&(Me.current=e,i?.(e,{reason:`undo`,committed:!0,targetIds:[]}),a?.(e,{reason:`undo`,committed:!0,targetIds:[]}))},[oe,Be,i,a]),dn=(0,l.useCallback)(()=>{if(oe===`none`)return;let e=Be.redo();e&&(Me.current=e,i?.(e,{reason:`redo`,committed:!0,targetIds:[]}),a?.(e,{reason:`redo`,committed:!0,targetIds:[]}))},[oe,Be,i,a]),fn=(0,l.useCallback)(()=>{let e=Xe.filter(e=>e.roomId).map(e=>({type:`room`,id:e.roomId}));if(e.length>0){at(e);return}at(Object.keys(Q.nodes).map(e=>({type:`node`,id:e})))},[Xe,Q.nodes,at]),pn=(0,l.useCallback)((e,t)=>{if(!Bt||lt.size===0)return;let n=P>0?P:100,r=ze.current?n*10:n,i=Q;for(let n of lt){let a=i.nodes[n];a&&(i=c.K(i,n,{x:a.x+e*r,y:a.y+t*r}).floor)}Yt(i,`nudge`,[...lt])},[Bt,lt,Q,P,Yt]),mn=(0,l.useCallback)(e=>{if(Y)return;let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){e.key===`Escape`&&t.blur();return}if(e.key===`Shift`&&(ze.current=!0),e.key===`Alt`&&(Re.current=!0),e.key===` `&&!Le.current){Le.current=!0,e.preventDefault();return}let n=e.metaKey||e.ctrlKey;if(n&&e.key.toLowerCase()===`z`){e.preventDefault(),e.shiftKey?dn():un();return}if(n&&e.key.toLowerCase()===`a`){e.preventDefault(),C&&fn();return}if(n&&e.key.toLowerCase()===`y`){e.preventDefault(),dn();return}if(e.key===`Escape`){vt.length>0?rn():jt.length>0?Mt([]):at(null);return}if(e.key===`Enter`&&$e===`wall`){rn();return}if(e.key===`Delete`||e.key===`Backspace`){if(e.preventDefault(),$e===`measure`){Pt!==null&&(Mt(e=>e.filter(e=>e.id!==Pt)),Ft(null));return}nn();return}if(e.key===`+`||e.key===`=`){ln(1.25);return}if(e.key===`-`){ln(1/1.25);return}if(e.key===`0`){Kt();return}if(e.key.startsWith(`Arrow`)){e.preventDefault();let t={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[e.key];t&&pn(t[0],t[1]);return}let r=e.key.toLowerCase();if(r===`s`){Ct(e=>!e);return}if(r===`l`){Tt(e=>!e);return}if(r===`g`){Dt(e=>!e);return}let i=fu[e.key.toLowerCase()];i&&Bt&&y.includes(i)&&(et(i),rn())},[Y,Bt,y,$e,vt,jt.length,Pt,dn,un,at,rn,nn,ln,Kt,pn,et,C,fn]),hn=(0,l.useCallback)((e,t,n)=>{Me.current=e,n?.resetHistory?(Be.clearHistory(),Be.replace(e)):Be.commit(e,t);let r={reason:t,committed:!0,targetIds:[]};i?.(e,r),a?.(e,r)},[Be,i,a]),gn=(0,l.useCallback)((e={})=>{let{plan:t,floor:n}=c.w(He,{nameFor:Ce,...e,index:c.A(He,Q.id)+1});return hn(t,`add-floor`),Ye(n.id),n.id},[He,Q.id,hn,Ye,Ce]),_n=(0,l.useCallback)(()=>{let{plan:e,floor:t}=c.T(He,Q.id,{label:we(Q.label)});return t?(hn(e,`duplicate-floor`),Ye(t.id),t.id):null},[He,Q.id,Q.label,hn,Ye,we]),vn=(0,l.useCallback)(e=>{let t=e??Q.id,n=c.N(He,t);if(n!==He&&(hn(n,`remove-floor`),t===Q.id)){let e=c.A(He,t);Ye(n.floors[Math.max(0,e-1)].id)}},[He,Q.id,hn,Ye]),yn=(0,l.useCallback)((e,t)=>{let n=c.M(He,e,t);n!==He&&hn(n,`move-floor`)},[He,hn]),bn=(0,l.useCallback)((e,t)=>{let n=c.I(He,e,t);n!==He&&hn(n,`edit-floor`)},[He,hn]),xn=(0,l.useCallback)((e,t)=>{let n=c.P(He,e,t);n!==He&&hn(n,`rename-floor`)},[He,hn]),Sn=(0,l.useCallback)(e=>{let t=(e??ae??He.name??``).trim()||`floor-plan`,n=URL.createObjectURL(new Blob([c.i(He)],{type:`application/json`})),r=document.createElement(`a`);r.href=n,r.download=t.endsWith(`.json`)?t:`${t}.json`,r.click(),setTimeout(()=>URL.revokeObjectURL(n),0)},[ae,He]),Cn=(0,l.useCallback)(e=>{let t=c.r(e);return t.plan&&hn(t.plan,`import`),zt(t.plan&&t.issues.length===0?null:t.issues),J?.(t),t},[J,hn]),wn=(0,l.useCallback)(e=>{e.text().then(e=>Cn(e)).catch(e=>{let t=[`Could not read that file: ${e.message}`];zt(t),J?.({plan:null,issues:t})})},[Cn,J]),Tn=(0,l.useCallback)(()=>Mt([]),[]),En=(0,l.useCallback)(e=>{e.key===`Shift`&&(ze.current=!1),e.key===`Alt`&&(Re.current=!1),e.key===` `&&(Le.current=!1)},[]);(0,l.useImperativeHandle)(t,()=>({getPlan:()=>He,setPlan:(e,t)=>hn(e,`import`,t),clear:()=>hn(c.D({floorLabel:Te}),`clear`),getFloorId:()=>Q.id,setFloorId:Ye,addFloor:e=>gn(e),duplicateFloor:_n,removeFloor:vn,renameFloor:xn,moveFloor:yn,setFloorHeight:bn,clearMeasurements:Tn,download:Sn,loadJson:Cn,undo:un,redo:dn,canUndo:()=>oe!==`none`&&Be.canUndo,canRedo:()=>oe!==`none`&&Be.canRedo,clearHistory:Be.clearHistory,getSelection:()=>[...it.current],select:at,addToSelection:e=>{let t=Array.isArray(e)?e:[e],n=new Set(it.current.map(e=>`${e.type}:${e.id}`));at([...it.current,...t.filter(e=>!n.has(`${e.type}:${e.id}`))])},toggleSelection:ot,selectAll:fn,deleteSelection:nn,getView:()=>mt,setView:ht,zoomBy:ln,fitToContent:Kt,toWorld:Ht,toScreen:Ut,getSvgElement:()=>je.current}),[He,Be,hn,Te,Q,Ye,gn,_n,vn,xn,yn,bn,Tn,Sn,Cn,un,dn,oe,at,ot,fn,nn,mt,ht,ln,Kt,Ht,Ut]);let Dn=Ne.current,On=(0,l.useMemo)(()=>{if(!Bt)return null;let e=[],t=[...jt,...Dn.kind===`measure`?[{id:-1,a:Dn.start,b:Dn.current}]:[]];for(let n of t){let t=Ut(n.a),r=Ut(n.b),i=Math.hypot(n.b.x-n.a.x,n.b.y-n.a.y);if(i<hu)continue;let a=Math.atan2(n.b.y-n.a.y,n.b.x-n.a.x),o=-Math.sin(a)*5,s=Math.cos(a)*5,c={x:(t.x+r.x)/2,y:(t.y+r.y)/2};if(e.push((0,p.jsxs)(`g`,{className:(0,u.default)($.roomDrawerMeasureLine,Pt===n.id&&$.roomDrawerMeasureLineHovered,ve?.measureLine),children:[(0,p.jsx)(`line`,{x1:t.x,y1:t.y,x2:r.x,y2:r.y}),(0,p.jsx)(`line`,{x1:t.x-o,y1:t.y-s,x2:t.x+o,y2:t.y+s}),(0,p.jsx)(`line`,{x1:r.x-o,y1:r.y-s,x2:r.x+o,y2:r.y+s})]},`measure-${n.id}`)),$e===`measure`&&n.id>=0)for(let[i,a]of[[`a`,t],[`b`,r]])e.push((0,p.jsx)(`circle`,{className:$.roomDrawerMeasureGrip,cx:a.x,cy:a.y,r:4},`measure-grip-${n.id}-${i}`));e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,ve?.measureLine),x:c.x,y:c.y-8,textAnchor:`middle`,children:`${W(i)} · ${ee(Su(a))}`},`measure-label-${n.id}`))}if(z&&kt&&(kt.guides.forEach((t,n)=>{let r=Ut(t.a),i=Ut(t.b);e.push((0,p.jsx)(`line`,{className:(0,u.default)($.roomDrawerGuide,t.kind===c.o.Angle&&$.roomDrawerGuideAngle),x1:r.x,y1:r.y,x2:i.x,y2:i.y},`guide-${n}`))}),kt.kind!==c.o.None&&kt.kind!==c.o.Grid)){let t=Ut(kt.point);e.push((0,p.jsx)(`rect`,{className:$.roomDrawerSnapMarker,x:t.x-4,y:t.y-4,width:8,height:8},`snap-marker`))}if(Dn.kind===`rect`){let t=Ut(Dn.start),n=Ut(Dn.current),r=Math.min(t.x,n.x),i=Math.min(t.y,n.y),a=Math.max(t.x,n.x),o=Math.max(t.y,n.y);e.push((0,p.jsx)(`rect`,{className:$.roomDrawerPreview,x:r,y:i,width:a-r,height:o-i},`rect-preview`));let s=Math.abs(Dn.current.x-Dn.start.x),c=Math.abs(Dn.current.y-Dn.start.y);U&&(s>0||c>0)&&(e.push((0,p.jsx)(`text`,{className:$.roomDrawerMeasure,x:(r+a)/2,y:i-8,textAnchor:`middle`,children:W(s)},`rect-width`),(0,p.jsx)(`text`,{className:$.roomDrawerMeasure,x:r-8,y:(i+o)/2,textAnchor:`end`,dominantBaseline:`central`,children:W(c)},`rect-height`)),s>0&&c>0&&e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,$.roomDrawerMeasureSecondary),x:(r+a)/2,y:(i+o)/2,textAnchor:`middle`,dominantBaseline:`central`,children:G(s*c)},`rect-area`)))}if($e===`wall`&&vt.length>0){let t=[...vt,bt].filter(Boolean).map(Ut);if(e.push((0,p.jsx)(`polyline`,{className:$.roomDrawerPreview,points:t.map(e=>`${e.x},${e.y}`).join(` `),fill:`none`},`chain`)),t.forEach((t,n)=>{e.push((0,p.jsx)(`circle`,{className:$.roomDrawerHandle,cx:t.x,cy:t.y,r:4},`chain-dot-${n}`))}),U&&bt&&vt.length>0){let t=vt[vt.length-1],n=Math.hypot(bt.x-t.x,bt.y-t.y),r=Ut({x:(t.x+bt.x)/2,y:(t.y+bt.y)/2}),i=kt?.kind===c.o.Angle;e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,i&&$.roomDrawerMeasureLocked),x:r.x,y:r.y-8,textAnchor:`middle`,children:`${W(n)} · ${kt?.angleRelativeTo===`reference`&&Vt!==void 0?Ee(ee(Su(Math.atan2(bt.y-t.y,bt.x-t.x)-Vt))):ee(Su(Math.atan2(bt.y-t.y,bt.x-t.x)))}`},`chain-len`))}}let n=new Set(rt.filter(e=>e.type===`node`).map(e=>e.id));for(let t of lt){let r=Q.nodes[t];if(!r)continue;let i=Ut(r);e.push((0,p.jsx)(`circle`,{className:(0,u.default)($.roomDrawerHandle,n.has(t)&&$.roomDrawerHandleActive),cx:i.x,cy:i.y,r:5},`handle-${t}`))}if(Dn.kind===`marquee`&&Ie.current?.moved){let t=Ut(Dn.start),n=Ut(Dn.current);e.push((0,p.jsx)(`rect`,{className:$.roomDrawerMarquee,x:Math.min(t.x,n.x),y:Math.min(t.y,n.y),width:Math.abs(n.x-t.x),height:Math.abs(n.y-t.y)},`marquee`))}if($t&&Dn.kind!==`node`){let t=Ut($t);e.push((0,p.jsx)(`circle`,{className:$.roomDrawerMidHandle,cx:t.x,cy:t.y,r:4},`midpoint`))}if(U&&Dn.kind===`room`&&Dn.moved){let t=new Set(Dn.nodeIds),n=Dn.nodeIds.find(e=>Q.nodes[e]&&Dn.orig[e]);if(n){let t=Q.nodes[n],r=Dn.orig[n],i=t.x-r.x,a=t.y-r.y,o=st?.type===`room`?Xe.find(e=>e.roomId===st.id):void 0,s=Ut(o?o.anchor:t);e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,$.roomDrawerMeasureOffset),x:s.x,y:s.y-26,textAnchor:`middle`,children:`${W(Math.hypot(i,a))} · ${ee(Su(Math.atan2(a,i)))}`},`room-offset`))}for(let n of Object.values(Q.walls)){if(t.has(n.a)===t.has(n.b))continue;let r=Q.nodes[n.a],i=Q.nodes[n.b];if(!r||!i)continue;let a=t.has(n.a)?r:i,o=t.has(n.a)?i:r,s=Ut({x:(r.x+i.x)/2,y:(r.y+i.y)/2});e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,$.roomDrawerMeasureSecondary),x:s.x,y:s.y-8,textAnchor:`middle`,children:`${W(Math.hypot(o.x-a.x,o.y-a.y))} · ${ee(Su(Math.atan2(o.y-a.y,o.x-a.x)))}`},`room-stretch-${n.id}`))}}if(U&&(st?.type===`node`||st?.type===`wall`)){let t=[],n=new Set,r=(e,r,i)=>{if(n.has(e))return;let a=Q.walls[e];a&&(n.add(e),t.push({wall:a,from:r,primary:i}))};if(st.type===`node`)for(let e of Object.values(Q.walls))(e.a===st.id||e.b===st.id)&&r(e.id,st.id,!0);else{let e=Q.walls[st.id];if(e){r(e.id,e.a,!0);for(let t of Object.values(Q.walls))if(t.id!==e.id)for(let n of[e.a,e.b])(t.a===n||t.b===n)&&r(t.id,n,!1)}}let i=kt?.kind===c.o.Angle&&Dn.kind!==`none`;for(let{wall:n,from:r,primary:a}of t){let t=Q.nodes[n.a],o=Q.nodes[n.b];if(!t||!o)continue;let s=n.a===r?t:o,c=n.a===r?o:t,l=Ut({x:(t.x+o.x)/2,y:(t.y+o.y)/2});e.push((0,p.jsx)(`text`,{className:(0,u.default)($.roomDrawerMeasure,!a&&$.roomDrawerMeasureSecondary,a&&i&&$.roomDrawerMeasureLocked),x:l.x,y:l.y-8,textAnchor:`middle`,children:`${W(Math.hypot(c.x-s.x,c.y-s.y))} · ${ee(Su(Math.atan2(c.y-s.y,c.x-s.x)))}`},`measure-${n.id}`))}}return(0,p.jsx)(p.Fragment,{children:e})},[Bt,Dn,$e,vt,bt,rt,Q,Xe,st,lt,$t,U,z,kt,Vt,W,G,ee,Ee,jt,Pt,ve?.measureLine,Ut]),kn={select:{icon:f.faArrowPointer,label:Z.select,key:`V`},wall:{icon:f.faMinus,label:Z.wall,key:`W`},rect:{icon:f.faSquare,label:Z.rect,key:`R`},door:{icon:f.faDoorOpen,label:Z.door,key:`D`},window:{icon:f.faWindowMaximize,label:Z.window,key:`N`},archway:{icon:f.faExpand,label:Z.archway,key:`A`},measure:{icon:f.faRulerCombined,label:Z.measure,key:`M`}},An=Bt?$e===`wall`?Z.hintWall:$e===`rect`?Z.hintRect:$e===`measure`?Z.hintMeasure:pu[$e]?Z.hintOpening:C?Z.hintSelect:Z.hintSelectSingle:``,jn=rt.length===0?Z.selectedFloor:rt.length>1?Z.selectedCount(rt.length):Qt?{[c.ot.Door]:Z.selectedDoor,[c.ot.Window]:Z.selectedWindow,[c.ot.Archway]:Z.selectedArchway,[c.ot.Gap]:Z.selectedGap}[Qt.kind]:Zt?Z.selectedWall:st?.type===`room`?Z.selectedRoom:Z.selectedCorner,Mn=Bt?y:[];return(0,p.jsxs)(`div`,{...xe,ref:ke,className:(0,u.default)($.roomDrawer,Y&&$.roomDrawerDisabled,ge,ve?.root),style:{..._e,...be?.root},role:`application`,"aria-label":he??`Floor plan editor`,tabIndex:Y?-1:0,onKeyDown:mn,onKeyUp:En,children:[te&&(0,p.jsxs)(`div`,{className:(0,u.default)($.roomDrawerToolbar,ve?.toolbar),style:be?.toolbar,role:`toolbar`,"aria-label":Z.tools,children:[Mn.map(e=>{let t=kn[e];return(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerToolButton,e===$e&&$.roomDrawerToolButtonActive,ve?.toolButton),style:be?.toolButton,title:`${t.label} (${t.key})`,"aria-label":t.label,"aria-pressed":e===$e,onClick:()=>{et(e),rn()},children:X(me?.[e]??t.icon,{className:(0,u.default)($.roomDrawerToolIcon,ve?.toolIcon),style:be?.toolIcon})},e)}),Mn.length>0&&(0,p.jsx)(`span`,{className:$.roomDrawerToolbarSeparator}),Bt&&(0,p.jsxs)(p.Fragment,{children:[[{on:St,toggle:()=>Ct(e=>!e),icon:me?.snap??f.faMagnet,label:Z.snap,key:`S`},{on:wt,toggle:()=>Tt(e=>!e),icon:me?.angleLock??f.faDraftingCompass,label:Z.angleLock(R),key:`L`},{on:Et,toggle:()=>Dt(e=>!e),icon:me?.grid??f.faBorderAll,label:Z.grid,key:`G`},...c.O(He,Q.id)?[{on:Ke,toggle:()=>qe(e=>!e),icon:me?.underlay??f.faLayerGroup,label:Z.underlay,key:`B`}]:[]].map(e=>(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerToolButton,e.on&&$.roomDrawerToolButtonOn,ve?.toolButton),style:be?.toolButton,title:`${e.label} (${e.key})`,"aria-label":e.label,"aria-pressed":e.on,onClick:e.toggle,children:X(e.icon,{className:(0,u.default)($.roomDrawerToolIcon,ve?.toolIcon),style:be?.toolIcon})},e.key)),(0,p.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),q&&oe!==`none`&&Bt&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.undo,"aria-label":Z.undo,disabled:!Be.canUndo,onClick:un,children:X(me?.undo??f.faArrowRotateLeft)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.redo,"aria-label":Z.redo,disabled:!Be.canRedo,onClick:dn,children:X(me?.redo??f.faArrowRotateRight)}),(0,p.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),ie&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.download,"aria-label":Z.download,onClick:()=>Sn(),children:X(me?.download??f.faDownload)}),Bt&&(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.upload,"aria-label":Z.upload,onClick:()=>It.current?.click(),children:X(me?.upload??f.faUpload)}),(0,p.jsx)(`span`,{className:$.roomDrawerToolbarSeparator})]}),(0,p.jsxs)(`div`,{className:(0,u.default)($.roomDrawerViewControls,ve?.viewControls),style:be?.viewControls,children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.zoomOut,"aria-label":Z.zoomOut,onClick:()=>ln(1/1.25),children:X(me?.zoomOut??f.faMagnifyingGlassMinus)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerZoomLabel,ve?.zoomLabel),style:be?.zoomLabel,title:Z.fit,onClick:()=>Kt(),children:K(mt.zoom)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerViewButton,ve?.viewButton),style:be?.viewButton,title:Z.zoomIn,"aria-label":Z.zoomIn,onClick:()=>ln(1.25),children:X(me?.zoomIn??f.faMagnifyingGlassPlus)})]})]}),m&&He.floors.length>0&&(0,p.jsxs)(`div`,{className:(0,u.default)($.roomDrawerFloorBar,ve?.floorBar),style:be?.floorBar,role:`tablist`,"aria-label":Z.selectedFloor,children:[[...He.floors].reverse().map(e=>(0,p.jsx)(`button`,{type:`button`,role:`tab`,className:(0,u.default)($.roomDrawerFloorTab,e.id===Q.id&&$.roomDrawerFloorTabActive,ve?.floorTab),style:be?.floorTab,"aria-selected":e.id===Q.id,onClick:()=>Ye(e.id),children:e.label},e.id)),Bt&&(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerFloorTab,$.roomDrawerFloorTabAdd),title:Z.addFloor,"aria-label":Z.addFloor,onClick:()=>gn(),children:X(me?.addFloor??f.faPlus)})]}),(0,p.jsx)(`div`,{ref:Ae,className:(0,u.default)($.roomDrawerCanvasWrapper,Bt&&$e!==`select`&&$.roomDrawerCanvasWrapperDrawing,ve?.canvasWrapper),style:{height:ue,...be?.canvasWrapper},onPointerDown:an,onPointerMove:on,onPointerUp:e=>sn(e,!1),onPointerCancel:e=>sn(e,!0),children:(0,p.jsx)(cu,{ref:je,floor:Q,underlay:Je,rooms:Xe,view:mt,size:gt,selection:rt,hovered:ut,interactiveRooms:!1,showGrid:Et,gridSize:P,showRoomLabels:!0,formatArea:G,getRoomColor:de,renderRoomLabel:fe,overlay:On,classNames:ve,styles:be})}),ne&&Bt&&(0,p.jsxs)(`div`,{className:(0,u.default)($.roomDrawerInspector,ve?.inspector),style:be?.inspector,children:[(0,p.jsx)(`span`,{className:(0,u.default)($.roomDrawerInspectorKind,rt.length===0&&$.roomDrawerInspectorKindEmpty,ve?.inspectorLabel),children:jn}),rt.length===0&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Aa,{className:(0,u.default)($.roomDrawerInspectorName,ve?.inspectorField),style:be?.inspectorField,label:Z.floorName,value:Q.label,onChange:e=>xn(Q.id,e)}),(0,p.jsx)(Cl,{className:(0,u.default)($.roomDrawerInspectorField,ve?.inspectorField),style:be?.inspectorField,label:Z.floorHeight,title:Z.storeyHeightHint,value:Q.height,decimalScale:0,min:500,step:100,showArrows:!0,onChange:e=>{e!==void 0&&bn(Q.id,e)}}),He.floors.length>1&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerInspectorAction,ve?.inspectorField),style:be?.inspectorField,title:Z.moveFloorUp,"aria-label":Z.moveFloorUp,disabled:c.A(He,Q.id)>=He.floors.length-1,onClick:()=>yn(Q.id,c.A(He,Q.id)+1),children:X(me?.moveFloorUp??f.faAngleUp)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerInspectorAction,ve?.inspectorField),style:be?.inspectorField,title:Z.moveFloorDown,"aria-label":Z.moveFloorDown,disabled:c.A(He,Q.id)<=0,onClick:()=>yn(Q.id,c.A(He,Q.id)-1),children:X(me?.moveFloorDown??f.faAngleDown)})]}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerInspectorAction,ve?.inspectorField),style:be?.inspectorField,title:Z.duplicateFloor,onClick:()=>_n(),children:X(me?.duplicateFloor??f.faClone)}),He.floors.length>1&&(0,p.jsx)(ye,{color:j.Error,className:$.roomDrawerInspectorDelete,icon:me?.delete??f.faTrash,title:Z.deleteFloor,onClick:()=>vn()})]}),Xt?.meta&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Aa,{className:(0,u.default)($.roomDrawerInspectorName,ve?.inspectorField),style:be?.inspectorField,label:Z.roomName,value:Xt.meta.name,onChange:e=>{let t=Xt.meta;Yt({...Q,rooms:{...Q.rooms,[t.id]:{...t,name:e}}},`edit-room`,[t.id])}}),(0,p.jsx)(`span`,{className:(0,u.default)($.roomDrawerInspectorLabel,ve?.inspectorLabel),children:G(Xt.area)})]}),Zt&&(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)($.roomDrawerInspectorAction,ve?.inspectorField),style:be?.inspectorField,onClick:en,children:Z.addCorner}),Zt&&(0,p.jsx)(Cl,{className:(0,u.default)($.roomDrawerInspectorField,ve?.inspectorField),style:be?.inspectorField,label:Z.thickness,value:Zt.thickness,decimalScale:0,min:10,showArrows:!0,step:10,onChange:e=>{e!==void 0&&Yt({...Q,walls:{...Q.walls,[Zt.id]:{...Zt,thickness:e}}},`edit-wall`,[Zt.id])}}),Qt&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Cl,{className:(0,u.default)($.roomDrawerInspectorField,ve?.inspectorField),style:be?.inspectorField,label:Z.width,value:Qt.width,decimalScale:0,min:100,step:50,showArrows:!0,onChange:e=>{e!==void 0&&Yt(c.Q(Q,Qt.id,{width:e}).floor,`edit-opening`,[Qt.id])}}),(0,p.jsx)(Cl,{className:(0,u.default)($.roomDrawerInspectorField,ve?.inspectorField),style:be?.inspectorField,label:Z.sill,title:Z.sillHeightHint,showArrows:!0,value:Qt.sill,decimalScale:0,min:0,step:50,onChange:e=>{e!==void 0&&Yt(c.Q(Q,Qt.id,{sill:e}).floor,`edit-opening`,[Qt.id])}})]}),rt.length>0&&(0,p.jsx)(ye,{color:j.Error,className:$.roomDrawerInspectorDelete,icon:me?.delete??f.faTrash,title:Z.deleteSelection,onClick:nn})]}),ie&&Bt&&(0,p.jsx)(`input`,{ref:It,type:`file`,accept:`application/json,.json`,className:$.roomDrawerFileInput,tabIndex:-1,"aria-hidden":`true`,onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t&&wn(t)}}),re&&(Rt!==null||An)&&(0,p.jsx)(`div`,{className:(0,u.default)($.roomDrawerHint,Rt!==null&&$.roomDrawerHintReport,ve?.hint),style:be?.hint,role:Rt===null?void 0:`status`,children:Rt===null?An:Rt.length===0?Z.importFailed:Rt.join(` · `)})]})}var Tu={roomViewer:`roomViewer_JtBDo`,"roomViewer-floorBar":`roomViewer-floorBar_Svfsf`,roomViewerFloorBar:`roomViewer-floorBar_Svfsf`,"roomViewer-floorTab":`roomViewer-floorTab_eH3Nl`,roomViewerFloorTab:`roomViewer-floorTab_eH3Nl`,"roomViewer-floorTab-active":`roomViewer-floorTab-active_3ZQv9`,roomViewerFloorTabActive:`roomViewer-floorTab-active_3ZQv9`,"roomViewer-canvasWrapper":`roomViewer-canvasWrapper_UopaD`,roomViewerCanvasWrapper:`roomViewer-canvasWrapper_UopaD`,"roomViewer-canvasWrapper-pannable":`roomViewer-canvasWrapper-pannable_-Knr7`,roomViewerCanvasWrapperPannable:`roomViewer-canvasWrapper-pannable_-Knr7`,"roomViewer-viewControls":`roomViewer-viewControls_XNVTI`,roomViewerViewControls:`roomViewer-viewControls_XNVTI`,"roomViewer-viewButton":`roomViewer-viewButton_Q-o9G`,roomViewerViewButton:`roomViewer-viewButton_Q-o9G`,"roomViewer-empty":`roomViewer-empty_LL-4L`,roomViewerEmpty:`roomViewer-empty_LL-4L`,"roomViewer-live":`roomViewer-live_WSwUx`,roomViewerLive:`roomViewer-live_WSwUx`},Eu=.002,Du=4,Ou=4;function ku(e){let t=e/1e6;return`${t<10?t.toFixed(1):Math.round(t)} m²`}var Au={floors:`Floors`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,fit:`Fit to view`,empty:`Nothing to show`,unnamedRoom:`Unnamed room`,selectedRoom:(e,t)=>`${e} selected, ${t}`,noRoomSelected:`No room selected`};function ju(e){let{ref:t,plan:n,activeFloorId:r,defaultActiveFloorId:i,onFloorChange:a,selectedRoomId:o,defaultSelectedRoomId:s=null,onSelect:d,hoveredRoomId:m,onHoverChange:h,view:g,defaultView:_,onViewChange:v,interactive:y=!0,pannable:b=!0,fitOnMount:x=!0,showFloorBar:S=!0,showViewControls:C=!0,showGrid:w=!1,showRoomLabels:T=!0,showOpeningSymbols:O=!0,getRoomColor:k,renderRoomLabel:A,getRoomLabel:j,formatArea:M=ku,height:N=360,emptyState:P,labels:F,icons:I,className:L,style:R,classNames:z,styles:B,"aria-label":V,...H}=E(`RoomViewer`,e),U=D(`RoomViewer`,F,Au),W=(0,l.useRef)(null),G=(0,l.useRef)(null),ee=(0,l.useId)().replace(/:/g,``),K=n?.floors??[],[te,ne]=(0,l.useState)(i),re=r??te??K[0]?.id,q=(0,l.useMemo)(()=>n?c.j(n,re)??c.j(n):null,[n,re]),ie=(0,l.useCallback)(e=>{r===void 0&&ne(e),a?.(e)},[r,a]),ae=(0,l.useMemo)(()=>q?c.v(q).rooms:[],[q]),[J,oe]=(0,l.useState)(s),se=o===void 0?J:o,[ce,le]=(0,l.useState)(null),Y=m===void 0?ce:m,ue=(0,l.useCallback)(e=>{o===void 0&&oe(e);let t=e?ae.find(t=>t.roomId===e)??null:null;d?.(e,t,q?.id??``)},[o,ae,d,q?.id]),de=(0,l.useCallback)(e=>{m===void 0&&le(e),h?.(e)},[m,h]),fe=(()=>{let e=se?ae.find(e=>e.roomId===se):void 0;return e?U.selectedRoom(e.meta?.name||U.unnamedRoom,M(e.area)):U.noRoomSelected})(),[pe,me]=(0,l.useState)(_??{x:0,y:0,zoom:.05}),he=g??pe,ge=(0,l.useRef)(he);ge.current=he;let _e=(0,l.useCallback)(e=>{g===void 0&&me(e),v?.(e)},[g,v]),ve=(0,l.useRef)(!1),[ye,be]=(0,l.useState)({width:800,height:360});(0,l.useEffect)(()=>{let e=W.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect();t.width>0&&t.height>0&&be({width:Math.round(t.width),height:Math.round(t.height)})},n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[]);let xe=(0,l.useCallback)((e={})=>{let t=e.padding??24,n=q?c.k(q):null;if(!n||n.width<=0||n.height<=0){_e({x:-1e3,y:-1e3,zoom:.05});return}let r=Math.max(Eu,Math.min(Du,Math.min((ye.width-t*2)/n.width,(ye.height-t*2)/n.height)));_e({x:n.minX-(ye.width/r-n.width)/2,y:n.minY-(ye.height/r-n.height)/2,zoom:r})},[q,ye.width,ye.height,_e]);(0,l.useEffect)(()=>{x&&!ve.current&&(!q||ye.width<=0||Object.keys(q.nodes).length===0||xe())},[x,q,ye.width,ye.height,xe]);let Z=(0,l.useCallback)((e,t)=>{ve.current=!0;let n=ge.current,r=Math.max(Eu,Math.min(Du,n.zoom*e));if(r===n.zoom)return;let i=t?.x??ye.width/2,a=t?.y??ye.height/2;_e({x:n.x+i/n.zoom-i/r,y:n.y+a/n.zoom-a/r,zoom:r})},[_e,ye.width,ye.height]),Se=(0,l.useRef)(new Map),Ce=(0,l.useRef)(null),we=(0,l.useRef)(null),Te=(0,l.useCallback)(e=>{if(b){if(Se.current.set(e.pointerId,{x:e.clientX,y:e.clientY}),Se.current.size===2){let[e,t]=[...Se.current.values()];we.current={dist:Math.hypot(t.x-e.x,t.y-e.y),view:ge.current,mid:{x:(e.x+t.x)/2,y:(e.y+t.y)/2}},Ce.current=null;return}Ce.current={startClient:{x:e.clientX,y:e.clientY},startView:ge.current,moved:!1}}},[b]),Ee=(0,l.useCallback)(e=>{Se.current.has(e.pointerId)&&Se.current.set(e.pointerId,{x:e.clientX,y:e.clientY});let t=we.current;if(t&&Se.current.size>=2){let[e,n]=[...Se.current.values()],r=Math.hypot(n.x-e.x,n.y-e.y);if(t.dist<=0)return;let i=Math.max(Eu,Math.min(Du,t.view.zoom*(r/t.dist))),a=W.current?.getBoundingClientRect()??{left:0,top:0},o={x:(e.x+n.x)/2,y:(e.y+n.y)/2};ve.current=!0;let s=c.s(t.mid.x,t.mid.y,a,t.view);_e({x:s.x-(o.x-a.left)/i,y:s.y-(o.y-a.top)/i,zoom:i});return}let n=Ce.current;if(!n)return;let r=e.clientX-n.startClient.x,i=e.clientY-n.startClient.y;!n.moved&&Math.hypot(r,i)<=Ou||(n.moved||e.currentTarget.setPointerCapture?.(e.pointerId),n.moved=!0,ve.current=!0,_e({x:n.startView.x-r/n.startView.zoom,y:n.startView.y-i/n.startView.zoom,zoom:n.startView.zoom}))},[_e]),De=(0,l.useCallback)(e=>{Se.current.delete(e.pointerId),Se.current.size<2&&(we.current=null),Ce.current=null},[]);(0,l.useEffect)(()=>{let e=W.current;if(!e||!b)return;let t=t=>{t.preventDefault();let n=e.getBoundingClientRect();Z(t.deltaY<0?1.1:1/1.1,{x:t.clientX-n.left,y:t.clientY-n.top})};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[b,Z]),(0,l.useImperativeHandle)(t,()=>({fitToContent:xe,getView:()=>ge.current,setView:_e,zoomBy:e=>Z(e),select:ue,getFloorId:()=>q?.id??null,setFloorId:ie,getSvgElement:()=>G.current}),[xe,_e,Z,ue,q?.id,ie]);let Oe=(0,l.useMemo)(()=>se?[{type:`room`,id:se}]:[],[se]),ke=(0,l.useMemo)(()=>Y?{type:`room`,id:Y}:null,[Y]),Ae=!q||Object.keys(q.walls).length===0;return(0,p.jsxs)(`div`,{...H,className:(0,u.default)(Tu.roomViewer,L,z?.root),style:{...R,...B?.root},"aria-label":V??`Floor plan`,children:[S&&K.length>1&&(0,p.jsx)(`div`,{className:(0,u.default)(Tu.roomViewerFloorBar,z?.floorBar),style:B?.floorBar,role:`tablist`,"aria-label":U.floors,children:[...K].reverse().map(e=>(0,p.jsx)(`button`,{type:`button`,role:`tab`,className:(0,u.default)(Tu.roomViewerFloorTab,e.id===q?.id&&Tu.roomViewerFloorTabActive,z?.floorTab),style:B?.floorTab,"aria-selected":e.id===q?.id,onClick:()=>ie(e.id),children:e.label},e.id))}),(0,p.jsxs)(`div`,{ref:W,className:(0,u.default)(Tu.roomViewerCanvasWrapper,b&&Tu.roomViewerCanvasWrapperPannable,z?.canvasWrapper),style:{height:N,...B?.canvasWrapper},onPointerDown:Te,onPointerMove:Ee,onPointerUp:De,onPointerCancel:De,children:[Ae?(0,p.jsx)(`div`,{className:(0,u.default)(Tu.roomViewerEmpty,z?.empty),style:B?.empty,children:P??U.empty}):(0,p.jsx)(cu,{ref:G,floor:q,rooms:ae,view:he,size:ye,selection:Oe,hovered:ke,interactiveRooms:y,showGrid:w,showRoomLabels:T,showOpeningSymbols:O,getRoomColor:k,renderRoomLabel:A,getRoomLabel:j??((e,{area:t})=>`${e?.name||U.unnamedRoom}, ${M(t)}`),formatArea:M,onRoomActivate:y?e=>ue(e):void 0,onBackgroundActivate:y?()=>ue(null):void 0,onHoverChange:y?e=>de(e?.type===`room`?e.id:null):void 0,classNames:{canvas:z?.canvas,grid:z?.grid,rooms:z?.rooms,roomFill:z?.roomFill,roomLabel:z?.roomLabel,walls:z?.walls,wallBody:z?.wallBody,openings:z?.openings,opening:z?.opening},styles:{canvas:B?.canvas,grid:B?.grid,rooms:B?.rooms,roomFill:B?.roomFill,roomLabel:B?.roomLabel,walls:B?.walls,wallBody:B?.wallBody,openings:B?.openings,opening:B?.opening},"aria-label":V??`Floor plan`}),C&&!Ae&&(0,p.jsxs)(`div`,{className:(0,u.default)(Tu.roomViewerViewControls,z?.viewControls),style:B?.viewControls,children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Tu.roomViewerViewButton,z?.viewButton),style:B?.viewButton,title:U.zoomOut,"aria-label":U.zoomOut,onClick:()=>Z(1/1.2),children:X(I?.zoomOut??f.faMagnifyingGlassMinus)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Tu.roomViewerViewButton,z?.viewButton),style:B?.viewButton,title:U.fit,"aria-label":U.fit,onClick:()=>{ve.current=!1,xe()},children:X(I?.fit??f.faExpand)}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Tu.roomViewerViewButton,z?.viewButton),style:B?.viewButton,title:U.zoomIn,"aria-label":U.zoomIn,onClick:()=>Z(1.2),children:X(I?.zoomIn??f.faMagnifyingGlassPlus)})]})]}),(0,p.jsx)(`div`,{id:ee,className:Tu.roomViewerLive,role:`status`,"aria-live":`polite`,children:fe})]})}var Mu=function(e){return e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),Nu={"scrollFade-vertical":`scrollFade-vertical_48p38`,scrollFadeVertical:`scrollFade-vertical_48p38`,"scrollFade-horizontal":`scrollFade-horizontal_nX2dg`,scrollFadeHorizontal:`scrollFade-horizontal_nX2dg`};function Pu({children:e=null,axis:t=Mu.Vertical,fadeLength:n,isAlwaysFaded:r=!1,className:i,style:a,ref:o,...s}){let c=(0,l.useRef)(null),d=t===Mu.Horizontal,{hasStart:f,hasEnd:m}=to(c,{axis:t,isEnabled:!r});return(0,p.jsx)(`div`,{...s,ref:Ln(c,o),className:(0,u.default)(d?Nu.scrollFadeHorizontal:Nu.scrollFadeVertical,ea.scrollFade,d?ea.scrollFadeX:ea.scrollFadeY,(r||f)&&ea.scrollFadeFadedStart,(r||m)&&ea.scrollFadeFadedEnd,i),style:{...n?{"--custom-scroll-fade-length":n}:void 0,...a},children:e})}var Fu=function(e){return e.Small=`small`,e.Medium=`medium`,e.Large=`large`,e}({}),Iu={sectionHeader:`sectionHeader_X3bNj`,"sectionHeader-leading":`sectionHeader-leading_d6opV`,sectionHeaderLeading:`sectionHeader-leading_d6opV`,"sectionHeader-identity":`sectionHeader-identity_Qmlpt`,sectionHeaderIdentity:`sectionHeader-identity_Qmlpt`,"sectionHeader-titles":`sectionHeader-titles_iN9dT`,sectionHeaderTitles:`sectionHeader-titles_iN9dT`,"sectionHeader-title":`sectionHeader-title_wH--S`,sectionHeaderTitle:`sectionHeader-title_wH--S`,"sectionHeader-subtitle":`sectionHeader-subtitle_WRK3Y`,sectionHeaderSubtitle:`sectionHeader-subtitle_WRK3Y`,"sectionHeader-trailing":`sectionHeader-trailing_ewWDV`,sectionHeaderTrailing:`sectionHeader-trailing_ewWDV`,"sectionHeader-left":`sectionHeader-left_ZUuWs`,sectionHeaderLeft:`sectionHeader-left_ZUuWs`,"sectionHeader-center":`sectionHeader-center_MzSev`,sectionHeaderCenter:`sectionHeader-center_MzSev`,"sectionHeader-actions":`sectionHeader-actions_E40ZS`,sectionHeaderActions:`sectionHeader-actions_E40ZS`,"sectionHeader-divider":`sectionHeader-divider_Ovpev`,sectionHeaderDivider:`sectionHeader-divider_Ovpev`,"sectionHeader-size-small":`sectionHeader-size-small_6OVWE`,sectionHeaderSizeSmall:`sectionHeader-size-small_6OVWE`,"sectionHeader-size-medium":`sectionHeader-size-medium_BVSe6`,sectionHeaderSizeMedium:`sectionHeader-size-medium_BVSe6`,"sectionHeader-size-large":`sectionHeader-size-large_bOZDP`,sectionHeaderSizeLarge:`sectionHeader-size-large_bOZDP`},Lu={[Fu.Small]:Iu.sectionHeaderSizeSmall,[Fu.Medium]:Iu.sectionHeaderSizeMedium,[Fu.Large]:Iu.sectionHeaderSizeLarge};function Ru(e){let{title:t,subtitle:n,icon:r,thumbnail:i,left:a,center:o,actions:s,level:c=2,size:l=Fu.Medium,divider:d=!1,className:f,style:m,classNames:h,styles:g,..._}=E(`SectionHeader`,e),v=typeof i==`string`&&i.startsWith(`http`)?i:void 0,y=i!=null&&i!==``,b=y||r!=null,x=`h${c}`;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{..._,className:(0,u.default)(Iu.sectionHeader,Lu[l],f,h?.root),style:{...m,...g?.root},children:[(0,p.jsxs)(`div`,{className:(0,u.default)(Iu.sectionHeaderIdentity,h?.identity),style:g?.identity,children:[b&&(0,p.jsx)(`div`,{className:(0,u.default)(Iu.sectionHeaderLeading,h?.leading),style:{...v?{backgroundImage:`url(${v})`}:{},...g?.leading},children:y?!v&&i:r?X(r):null}),(0,p.jsxs)(`div`,{className:(0,u.default)(Iu.sectionHeaderTitles,h?.titles),style:g?.titles,children:[(0,p.jsx)(x,{className:(0,u.default)(Iu.sectionHeaderTitle,h?.title),style:g?.title,title:typeof t==`string`?t:void 0,children:t}),n!=null&&n!==``&&(0,p.jsx)(`div`,{className:(0,u.default)(Iu.sectionHeaderSubtitle,h?.subtitle),style:g?.subtitle,children:n})]})]}),(0,p.jsxs)(`div`,{className:(0,u.default)(Iu.sectionHeaderTrailing,h?.trailing),style:g?.trailing,children:[(0,p.jsx)(`div`,{className:(0,u.default)(Iu.sectionHeaderLeft,h?.left),style:g?.left,children:a}),(0,p.jsx)(`div`,{className:(0,u.default)(Iu.sectionHeaderCenter,h?.center),style:g?.center,children:o}),(0,p.jsx)(`div`,{className:(0,u.default)(Iu.sectionHeaderActions,h?.actions),style:g?.actions,children:Array.isArray(s)?s.map((e,t)=>(0,p.jsx)(ye,{title:e.title,onClick:e.onClick?t=>{t.stopPropagation(),e.onClick?.(t)}:void 0,icon:e.icon},t)):s})]})]}),d&&(0,p.jsx)(Os,{className:Iu.sectionHeaderDivider})]})}var zu=function(e){return e.Text=`text`,e.Circle=`circle`,e.Rectangular=`rectangular`,e}({}),Bu=function(e){return e.Shimmer=`shimmer`,e.Pulse=`pulse`,e.None=`none`,e}({}),Vu={skeleton:`skeleton_TSg1y`,"skeleton-lines":`skeleton-lines_-Z-gf`,skeletonLines:`skeleton-lines_-Z-gf`,"skeleton-line-last":`skeleton-line-last_UFw21`,skeletonLineLast:`skeleton-line-last_UFw21`,"skeleton-text":`skeleton-text_Jlefj`,skeletonText:`skeleton-text_Jlefj`,"skeleton-circle":`skeleton-circle_t0bbj`,skeletonCircle:`skeleton-circle_t0bbj`,"skeleton-rectangular":`skeleton-rectangular_UtIyN`,skeletonRectangular:`skeleton-rectangular_UtIyN`,"skeleton-animation-pulse":`skeleton-animation-pulse_wGbPg`,skeletonAnimationPulse:`skeleton-animation-pulse_wGbPg`,skeletonPulse:`skeletonPulse_06yjn`,"skeleton-animation-shimmer":`skeleton-animation-shimmer_a0nwc`,skeletonAnimationShimmer:`skeleton-animation-shimmer_a0nwc`,skeletonShimmer:`skeletonShimmer_wLPXR`},Hu={[zu.Text]:Vu.skeletonText,[zu.Circle]:Vu.skeletonCircle,[zu.Rectangular]:Vu.skeletonRectangular},Uu={[Bu.Shimmer]:Vu.skeletonAnimationShimmer,[Bu.Pulse]:Vu.skeletonAnimationPulse,[Bu.None]:void 0};function Wu(e){let{variant:t=zu.Text,animation:n=Bu.Shimmer,lines:r=1,className:i,style:a,classNames:o,styles:s,...c}=E(`Skeleton`,e),l=Hu[t],d=Uu[n];return t!==zu.Text||r<=1?(0,p.jsx)(`span`,{...c,className:(0,u.default)(Vu.skeleton,l,d,i),style:a}):(0,p.jsx)(`span`,{...c,className:(0,u.default)(Vu.skeletonLines,i),style:a,children:Array.from({length:r},(e,t)=>(0,p.jsx)(`span`,{className:(0,u.default)(Vu.skeleton,l,d,t===r-1&&Vu.skeletonLineLast,o?.line),style:s?.line},t))})}var Gu={slider:`slider_qmg2W`,"slider-thumb":`slider-thumb_CHuJN`,sliderThumb:`slider-thumb_CHuJN`,"slider-disabled":`slider-disabled_T0o2S`,sliderDisabled:`slider-disabled_T0o2S`,"slider-has-mark-labels":`slider-has-mark-labels_Xw6ZJ`,sliderHasMarkLabels:`slider-has-mark-labels_Xw6ZJ`,"slider-track":`slider-track_UyKYc`,sliderTrack:`slider-track_UyKYc`,"slider-range":`slider-range_exAs9`,sliderRange:`slider-range_exAs9`,"slider-dragging":`slider-dragging_htPFH`,sliderDragging:`slider-dragging_htPFH`,"slider-mark":`slider-mark_fvw-n`,sliderMark:`slider-mark_fvw-n`,"slider-mark-label":`slider-mark-label_iDtU2`,sliderMarkLabel:`slider-mark-label_iDtU2`,"slider-value":`slider-value_3rQgd`,sliderValue:`slider-value_3rQgd`};function Ku(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}function qu(e){let{min:t=0,max:n=100,step:r=1,disabled:i=!1,marks:a,showValue:o=!1,formatValue:s,size:c,tabIndex:d=0,className:f,style:m,classNames:h,styles:g,"aria-label":_,range:v,value:y,defaultValue:b,onChange:x,onChangeEnd:S,minRange:C=0,thumbLabels:w,...T}=e,E=x,D=S,O=v===!0,k=(0,l.useRef)(null),A=(0,l.useRef)(null),j=(0,l.useRef)([]),M=(0,l.useRef)(null),[N,P]=(0,l.useState)(!1),F=Ku(r);function I(e){return Math.min(n,Math.max(t,e))}function L(e){let n=Math.round((e-t)/r)*r+t;return Number(I(n).toFixed(F))}function R(e){if(O){let r=e??[t,n];return[I(r[0]),I(r[1])]}return[I(e??t)]}function z(e){let t=O?2:1;return e.length===t?e:O?[e[0],n]:[e[0]]}let B=y!==void 0,[V,H]=(0,l.useState)(()=>R(b)),U=B?R(y):z(V),W=(0,l.useRef)(U);(0,l.useEffect)(()=>{W.current=U},[U]);function G(e){return O?[e[0],e[1]]:e[0]}function ee(e,r){return O?e===0?[t,r[1]-C]:[r[0]+C,n]:[t,n]}function K(e,r,i){let a=W.current,[o,s]=ee(e,a),c=L(r);if(c<o&&(c=Number(Math.max(t,o).toFixed(F))),c>s&&(c=Number(Math.min(n,s).toFixed(F))),c===a[e]){i&&D?.(G(a));return}let l=[...a];l[e]=c,W.current=l,B||H(l),E?.(G(l)),i&&D?.(G(l))}function te(e){let r=k.current;if(!r)return W.current[0];let i=r.getBoundingClientRect(),a=i.width?(e-i.left)/i.width:0;return t+Math.min(1,Math.max(0,a))*(n-t)}function ne(e){if(!O)return 0;let[t,n]=W.current,r=Math.abs(e-t),i=Math.abs(e-n);return r===i?+(e>n):r<i?0:1}function re(e){if(i)return;e.preventDefault();let t=te(e.clientX),n=ne(t);(O?j.current[n]:A.current)?.focus(),A.current?.setPointerCapture?.(e.pointerId),M.current=n,P(!0),K(n,t,!1)}function q(e){let t=M.current;t!==null&&K(t,te(e.clientX),!1)}function ie(e){M.current!==null&&(M.current=null,P(!1),A.current?.releasePointerCapture?.(e.pointerId),D?.(G(W.current)))}function ae(e,a){if(i)return;let o=r*10,s=U[a],c=null;switch(e.key){case`ArrowRight`:case`ArrowUp`:c=s+r;break;case`ArrowLeft`:case`ArrowDown`:c=s-r;break;case`PageUp`:c=s+o;break;case`PageDown`:c=s-o;break;case`Home`:c=t;break;case`End`:c=n;break;default:return}e.preventDefault(),K(a,c,!0)}let J=e=>n>t?(I(e)-t)/(n-t):0,oe=e=>`${J(e)*100}%`,se=O?{left:oe(U[0]),width:`${(J(U[1])-J(U[0]))*100}%`}:{width:oe(U[0])},ce=!!a?.some(e=>e.label!=null),le=e=>s?s(e):e;function Y(e){let r=U[e],a=le(r),[o,s]=ee(e,U);return{role:`slider`,"aria-valuemin":Number(Math.max(t,o).toFixed(F)),"aria-valuemax":Number(Math.min(n,s).toFixed(F)),"aria-valuenow":r,"aria-valuetext":typeof a==`string`||typeof a==`number`?String(a):void 0,"aria-orientation":`horizontal`,"aria-disabled":i||void 0}}let ue=O?{role:`group`,"aria-label":_,"aria-disabled":i||void 0}:{...Y(0),"aria-label":_,tabIndex:i?-1:d};return(0,p.jsx)(`div`,{...T,...ue,ref:A,className:(0,u.default)(Gu.slider,i&&Gu.sliderDisabled,N&&Gu.sliderDragging,ce&&Gu.sliderHasMarkLabels,f,h?.root),style:{...c?{"--slider-thumb-size":c}:null,...m,...g?.root},onPointerDown:re,onPointerMove:q,onPointerUp:ie,onKeyDown:O?void 0:e=>ae(e,0),children:(0,p.jsxs)(`div`,{ref:k,className:(0,u.default)(Gu.sliderTrack,h?.track),style:g?.track,children:[(0,p.jsx)(`div`,{className:(0,u.default)(Gu.sliderRange,h?.range),style:{...se,...g?.range}}),a?.map(e=>{let t=oe(e.value);return(0,p.jsxs)(l.default.Fragment,{children:[(0,p.jsx)(`span`,{className:(0,u.default)(Gu.sliderMark,h?.mark),style:{left:t,...g?.mark}}),e.label!=null&&(0,p.jsx)(`span`,{className:(0,u.default)(Gu.sliderMarkLabel,h?.markLabel),style:{left:t,...g?.markLabel},children:e.label})]},e.value)}),U.map((e,t)=>(0,p.jsx)(`div`,{ref:e=>{j.current[t]=e},className:(0,u.default)(Gu.sliderThumb,h?.thumb),style:{left:oe(e),...g?.thumb},...O?{...Y(t),"aria-label":w?.[t]??(t===0?`From`:`To`),tabIndex:i?-1:d,onKeyDown:e=>ae(e,t)}:{},children:o&&(0,p.jsx)(`span`,{className:(0,u.default)(Gu.sliderValue,h?.value),style:g?.value,children:le(e)})},t))]})})}var Ju={splitButton:`splitButton_5ak5W`,splitButtonPrimary:`splitButtonPrimary_4mVy8`,splitButtonTrigger:`splitButtonTrigger_32cQA`},Yu={moreActions:`More actions`};function Xu(e){let{children:t,onClick:n=()=>{},actions:r=[],styleType:i=J.Filled,color:a=j.Primary,size:o=oe.Medium,disabled:s=!1,isLoading:c=!1,align:d=zt.End,className:m,style:h,classNames:g,styles:_,labels:v,...y}=E(`SplitButton`,e),b=D(`SplitButton`,v,Yu),[x,S]=(0,l.useState)(!1),[C,w]=(0,l.useState)(s);return s!==C&&(w(s),s&&S(!1)),(0,p.jsxs)(In,{...y,className:(0,u.default)(Ju.splitButton,g?.root,m),style:{...h,..._?.root},children:[(0,p.jsx)(he,{styleType:i,color:a,size:o,disabled:s,isLoading:c,onClick:n,className:(0,u.default)(Ju.splitButtonPrimary,g?.primaryButton),style:_?.primaryButton,children:t}),(0,p.jsx)(ol,{items:r,isOpen:x,onOpenChange:S,placement:Rt.Bottom,align:d,classNames:{menu:g?.menu,item:g?.menuItem},styles:{menu:_?.menu,item:_?.menuItem},children:(0,p.jsx)(he,{styleType:i,color:a,size:o,disabled:s,icon:f.faChevronDown,"aria-label":b.moreActions,className:(0,u.default)(Ju.splitButtonTrigger,g?.triggerButton),style:_?.triggerButton})})]})}var Zu={stepper:`stepper_kiS2A`,"stepper-vertical":`stepper-vertical_2y9rg`,stepperVertical:`stepper-vertical_2y9rg`,"stepper-step":`stepper-step_nUfsV`,stepperStep:`stepper-step_nUfsV`,"stepper-entry":`stepper-entry_KD4JJ`,stepperEntry:`stepper-entry_KD4JJ`,"stepper-clickable":`stepper-clickable_Nm6fP`,stepperClickable:`stepper-clickable_Nm6fP`,"stepper-entry-disabled":`stepper-entry-disabled_T9S5R`,stepperEntryDisabled:`stepper-entry-disabled_T9S5R`,"stepper-entry-number":`stepper-entry-number_J168Q`,stepperEntryNumber:`stepper-entry-number_J168Q`,"stepper-entry-reached":`stepper-entry-reached_VCUw4`,stepperEntryReached:`stepper-entry-reached_VCUw4`,"stepper-entry-done":`stepper-entry-done_M3wb5`,stepperEntryDone:`stepper-entry-done_M3wb5`,"stepper-entry-error":`stepper-entry-error_xjGSr`,stepperEntryError:`stepper-entry-error_xjGSr`,"stepper-checkmark":`stepper-checkmark_iKCap`,stepperCheckmark:`stepper-checkmark_iKCap`,showCheckmark:`showCheckmark_Rd0oW`,"stepper-entry-labels":`stepper-entry-labels_nQT8D`,stepperEntryLabels:`stepper-entry-labels_nQT8D`,"stepper-entry-label":`stepper-entry-label_b94eg`,stepperEntryLabel:`stepper-entry-label_b94eg`,"stepper-description":`stepper-description_5Q0YP`,stepperDescription:`stepper-description_5Q0YP`,"stepper-optional":`stepper-optional_N8mkW`,stepperOptional:`stepper-optional_N8mkW`,"stepper-visually-hidden":`stepper-visually-hidden_AOd1K`,stepperVisuallyHidden:`stepper-visually-hidden_AOd1K`,"stepper-connector":`stepper-connector_J2FwZ`,stepperConnector:`stepper-connector_J2FwZ`,"stepper-connector-filled":`stepper-connector-filled_W8UZS`,stepperConnectorFilled:`stepper-connector-filled_W8UZS`,"stepper-label-top":`stepper-label-top_sBw4-`,stepperLabelTop:`stepper-label-top_sBw4-`,"stepper-marker-cell":`stepper-marker-cell_reOS7`,stepperMarkerCell:`stepper-marker-cell_reOS7`,"stepper-rail-segment":`stepper-rail-segment_U-ZgF`,stepperRailSegment:`stepper-rail-segment_U-ZgF`,"stepper-rail-filled":`stepper-rail-filled_wCImi`,stepperRailFilled:`stepper-rail-filled_wCImi`,"stepper-rail-hidden":`stepper-rail-hidden_l17t6`,stepperRailHidden:`stepper-rail-hidden_l17t6`,"stepper-content":`stepper-content_yjlFH`,stepperContent:`stepper-content_yjlFH`,"stepper-label-left":`stepper-label-left_yGbjC`,stepperLabelLeft:`stepper-label-left_yGbjC`,"stepper-content-inner":`stepper-content-inner_0w2wP`,stepperContentInner:`stepper-content-inner_0w2wP`,"stepper-outlined":`stepper-outlined_V7UjP`,stepperOutlined:`stepper-outlined_V7UjP`,"stepper-dots":`stepper-dots_s4cgN`,stepperDots:`stepper-dots_s4cgN`},Qu=function(e){return e.Horizontal=`horizontal`,e.Vertical=`vertical`,e}({}),$u=function(e){return e.Filled=`filled`,e.Outlined=`outlined`,e.Dots=`dots`,e}({}),ed=function(e){return e.None=`none`,e.ActiveOnly=`activeOnly`,e.Completed=`completed`,e}({}),td=function(e){return e.Top=`top`,e.Bottom=`bottom`,e.Left=`left`,e.Right=`right`,e}({}),nd={[$u.Filled]:Zu.stepperFilled,[$u.Outlined]:Zu.stepperOutlined,[$u.Dots]:Zu.stepperDots},rd={[td.Top]:Zu.stepperLabelTop,[td.Bottom]:Zu.stepperLabelBottom,[td.Left]:Zu.stepperLabelLeft,[td.Right]:Zu.stepperLabelRight},id={optional:`Optional`,completed:`Completed`,notCompleted:`Not completed`,error:`Error`},ad=F(j.Error);function od(){return(0,p.jsx)(`svg`,{className:Zu.stepperCheckmark,strokeLinejoin:`round`,strokeLinecap:`round`,xmlns:`http://www.w3.org/2000/svg`,viewBox:`-0.2 -1.2 3.4 2`,children:(0,p.jsx)(`path`,{d:`M 0 0 l 1 1 l 2 -2`,strokeWidth:`0.4`,fill:`none`})})}function sd({open:e,className:t,style:n,children:r}){let i=(0,l.useRef)(null),[a,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(()=>o(e.offsetHeight));return t.observe(e),()=>t.disconnect()},[]),(0,p.jsx)(`div`,{className:(0,u.default)(Zu.stepperContent,t),style:{...n,height:e?a??`auto`:0},inert:!e,children:(0,p.jsx)(`div`,{ref:i,className:Zu.stepperContentInner,children:r})})}function cd(e,t){let n=[td.Left,td.Right];return t?e&&n.includes(e)?e:td.Right:e&&!n.includes(e)?e:td.Bottom}function ld(e){let{steps:t=[],currentStep:n=0,orientation:r=Qu.Horizontal,onStepClicked:i=null,nonLinear:a=!1,hideLabels:o=!1,styleType:s=$u.Filled,color:c=j.Primary,collapse:l=ed.None,labelPlacement:d,labels:f,className:m,style:h,classNames:g,styles:_,...v}=E(`Stepper`,e),y=D(`Stepper`,f,id),b=F(c);R(`Stepper`,[c]);let x=r===Qu.Vertical,S=cd(d,x);return(0,p.jsx)(`ol`,{...v,role:`list`,className:(0,u.default)(Zu.stepper,b.className,nd[s],rd[S],{[Zu.stepperVertical]:x},g?.root,m),style:{...b.style,..._?.root,...h},children:t.map((e,r)=>{let s=r===n,c=r<n,d=r<=n,f=!!e.error,m=!!i&&!e.disabled&&(a?!s:c),h=m||!!i&&!e.disabled&&s,v=f?y.error:c?y.completed:s?null:y.notCompleted,b=e.icon?X(e.icon,{className:g?.icon,style:_?.icon}):c&&!f?(0,p.jsx)(od,{}):r+1,S=(0,p.jsx)(`span`,{"aria-hidden":!0,className:(0,u.default)(Zu.stepperEntryNumber,f&&ad.className,g?.entryNumber),style:_?.entryNumber,children:b}),C=e.optional===!0?y.optional:e.optional===!1?null:e.optional,w=(0,p.jsxs)(`span`,{className:(0,u.default)(Zu.stepperEntryLabels,{[Zu.stepperVisuallyHidden]:o}),children:[(0,p.jsx)(`span`,{className:(0,u.default)(Zu.stepperEntryLabel,g?.entryLabel),style:_?.entryLabel,children:e.label}),e.description!=null&&(0,p.jsxs)(p.Fragment,{children:[` `,(0,p.jsx)(`span`,{className:(0,u.default)(Zu.stepperDescription,g?.description),style:_?.description,children:e.description})]}),C!=null&&(0,p.jsxs)(p.Fragment,{children:[` `,(0,p.jsx)(`span`,{className:(0,u.default)(Zu.stepperOptional,g?.optional),style:_?.optional,children:C})]}),v!=null&&(0,p.jsxs)(p.Fragment,{children:[` `,(0,p.jsx)(`span`,{className:Zu.stepperVisuallyHidden,children:v})]})]}),T=e=>{let n=e===`lead`?r===0:r===t.length-1,i=e===`lead`?d:c;return(0,p.jsx)(`span`,{className:(0,u.default)(Zu.stepperRailSegment,{[Zu.stepperRailFilled]:!n&&i,[Zu.stepperRailHidden]:n})})},E=(0,p.jsxs)(p.Fragment,{children:[x?(0,p.jsxs)(`span`,{className:Zu.stepperMarkerCell,children:[T(`lead`),S,T(`trail`)]}):S,w]}),D=(0,u.default)(Zu.stepperEntry,{[Zu.stepperEntryReached]:d},{[Zu.stepperEntryDone]:c&&!f},{[Zu.stepperEntryError]:f},{[Zu.stepperEntryDisabled]:e.disabled},{[Zu.stepperClickable]:m},g?.entry);return(0,p.jsxs)(`li`,{className:Zu.stepperStep,"aria-current":s&&!h?`step`:void 0,children:[h?(0,p.jsx)(`button`,{type:`button`,className:D,style:_?.entry,"aria-current":s?`step`:void 0,"aria-disabled":!m||void 0,onClick:m?()=>i?.(r):void 0,children:E}):(0,p.jsx)(`div`,{className:D,style:_?.entry,children:E}),r<t.length-1&&(0,p.jsx)(`div`,{className:(0,u.default)(Zu.stepperConnector,{[Zu.stepperConnectorFilled]:c},g?.connector),style:_?.connector}),x&&e.content!=null&&(0,p.jsx)(sd,{open:l===ed.None||(l===ed.ActiveOnly?s:!c),className:g?.content,style:_?.content,children:e.content})]},r)})})}function ud(e,t,n,r){return e<r&&n<t}function dd(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}var fd=new class{constructor(){this.entries=new Map,this.listeners=new Map,this.results=new Map,this.rafId=0,this.listenerCount=0,this.schedule=()=>{cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(this.recompute)},this.recompute=()=>{let e=[...this.entries.entries()].sort(([,e],[,t])=>dd(e.node,t.node)),t=new Map,n=[];for(let[r,i]of e){let e=i.getMetrics();if(!e)continue;let a=t.get(e.container);a||(a=[],t.set(e.container,a));let o=a.filter(t=>ud(t.left,t.right,e.left,e.left+e.width)).reduce((e,t)=>Math.max(e,t.bottom),i.offsetTop),s=!i.disabled&&e.top<=o;if(s){let t=o+e.contentHeight;a.push({left:e.left,right:e.left+e.width,bottom:e.boundaryBottom==null?t:Math.min(t,e.boundaryBottom)})}n.push({id:r,metrics:e,baseTop:s?o:i.offsetTop,isStuck:s})}let r=new Map;for(let{metrics:e,baseTop:t,isStuck:i}of n){let{boundary:n,boundaryBottom:a,contentHeight:o}=e;if(!i||n==null||a==null)continue;let s=Math.min(0,a-(t+o)),c=r.get(n);(c==null||s<c)&&r.set(n,s)}for(let{id:e,metrics:t,baseTop:i,isStuck:a}of n){let n={isStuck:a,top:i+(a&&t.boundary?r.get(t.boundary)??0:0)},o=this.results.get(e);o&&o.isStuck===n.isStuck&&o.top===n.top||(this.results.set(e,n),this.listeners.get(e)?.(n))}}}register(e,t){let n=Symbol(`sticky`);return this.entries.set(n,e),this.listeners.set(n,t),this.startListening(),n}updateEntry(e,t){let n=this.entries.get(e);n&&Object.assign(n,t)}unregister(e){this.entries.has(e)&&(this.entries.delete(e),this.listeners.delete(e),this.results.delete(e),this.stopListening())}startListening(){this.listenerCount===0&&(window.addEventListener(`scroll`,this.schedule,{passive:!0,capture:!0}),window.addEventListener(`resize`,this.schedule)),this.listenerCount++}stopListening(){this.listenerCount--,this.listenerCount===0&&(window.removeEventListener(`scroll`,this.schedule,{capture:!0}),window.removeEventListener(`resize`,this.schedule))}},pd={sticky:`sticky_L6zO2`,"sticky-content":`sticky-content_ZaXTD`,stickyContent:`sticky-content_ZaXTD`,"sticky-content-stuck":`sticky-content-stuck_w-gRW`,stickyContentStuck:`sticky-content-stuck_w-gRW`,"sticky-placeholder":`sticky-placeholder_aJ3Sb`,stickyPlaceholder:`sticky-placeholder_aJ3Sb`};function md({children:e,offsetTop:t=0,offsetElement:n,stickToScrollParent:r=!1,boundary:i,boundaryInset:a=0,zIndex:o=20,disabled:s=!1,onStuckChange:c,className:d,style:f,classNames:m,styles:h,...g}){let _=(0,l.useRef)(null),v=(0,l.useRef)(null),y=(0,l.useRef)(null),b=(0,l.useRef)(null),[x,S]=(0,l.useState)({width:0,left:0,height:0}),[C,w]=(0,l.useState)(null),[T,E]=(0,l.useState)(0),D=n?.current?C??n.current.offsetHeight:t,[O,k]=(0,l.useState)({isStuck:!1,top:D}),A=(0,l.useRef)(c);(0,l.useEffect)(()=>{A.current=c},[c]);let j=(0,l.useRef)(i),M=(0,l.useRef)(a);(0,l.useLayoutEffect)(()=>{j.current=i,M.current=a});let N=(0,l.useCallback)(()=>{let e=_.current,t=v.current;if(!e||!t)return;let n=e.getBoundingClientRect();S({width:e.clientWidth,left:n.left,height:t.offsetHeight}),fd.schedule()},[]);(0,l.useEffect)(()=>{let e=n?.current;if(!e)return;let t=()=>w(e.offsetHeight);t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[n]),(0,l.useLayoutEffect)(()=>{b.current=r?Ft(_.current):null},[r]),(0,l.useLayoutEffect)(()=>{let e=fd.register({node:_.current,offsetTop:D,disabled:s,getMetrics:()=>{let e=_.current,t=v.current;if(!e||!t)return null;let n=e.getBoundingClientRect(),r=b.current?.getBoundingClientRect(),i=r?.top??0;E(e=>e===i?e:i);let a=r?n.top-r.top:n.top,o=r?n.left-r.left:n.left,s=j.current?.current??null,c=s?.getBoundingClientRect();return{top:a,left:o,width:e.clientWidth,contentHeight:t.offsetHeight,container:b.current,boundary:s,boundaryBottom:c?c.bottom-i-M.current:null}}},k);return y.current=e,()=>{fd.unregister(e),y.current=null}},[]),(0,l.useEffect)(()=>{y.current&&fd.updateEntry(y.current,{offsetTop:D,disabled:s}),fd.schedule()},[D,s]),(0,l.useLayoutEffect)(()=>{N()},[N,e]),(0,l.useEffect)(()=>{let e=new ResizeObserver(N);return _.current&&e.observe(_.current),v.current&&e.observe(v.current),b.current&&e.observe(b.current),()=>e.disconnect()},[N,r]);let P=(0,l.useRef)(!0);(0,l.useEffect)(()=>{if(P.current){P.current=!1;return}A.current?.(O.isStuck)},[O.isStuck]);let F=O.isStuck?{position:`fixed`,top:T+O.top,left:x.left,width:x.width,zIndex:o,...h?.content}:h?.content;return(0,p.jsxs)(`div`,{ref:_,className:(0,u.default)(pd.sticky,d,m?.root),style:{...h?.root,...f},...g,children:[O.isStuck&&(0,p.jsx)(`div`,{"aria-hidden":!0,className:(0,u.default)(pd.stickyPlaceholder,m?.placeholder),style:{height:x.height,...h?.placeholder}}),(0,p.jsx)(`div`,{ref:v,className:(0,u.default)(pd.stickyContent,O.isStuck&&pd.stickyContentStuck,m?.content),style:F,children:e})]})}var hd={switch:`switch_9TG2Y`,"switch-disabled":`switch-disabled_UL-F-`,switchDisabled:`switch-disabled_UL-F-`,"switch-track":`switch-track_awA-t`,switchTrack:`switch-track_awA-t`,"switch-track-checked":`switch-track-checked_boZKe`,switchTrackChecked:`switch-track-checked_boZKe`,"switch-thumb":`switch-thumb_4fUTo`,switchThumb:`switch-thumb_4fUTo`,"switch-thumb-checked":`switch-thumb-checked_GU--w`,switchThumbChecked:`switch-thumb-checked_GU--w`,"switch-label":`switch-label_3pLBQ`,switchLabel:`switch-label_3pLBQ`};function gd(e){let{label:t=``,selected:n=!1,onToggle:r=()=>{},className:i=``,style:a,disabled:o=!1,title:s=``,tabIndex:c=0,formValidator:d=null,children:f=null,classNames:m,styles:h,...g}=E(`Switch`,e),[,_]=(0,l.useState)(0);(0,l.useEffect)(()=>{if(!d)return;let e=()=>_(e=>e+1);return d.registerOnUpdateListener(e),()=>d.removeOnUpdateListener(e)},[d]);function v(e){o||(d&&d.set(!d.value),r(!y,e))}let y=d?d.value:n;return(0,p.jsxs)(`div`,{...g,title:s,className:(0,u.default)(hd.switch,{[hd.switchDisabled]:o},i),style:a,onClick:v,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(e))},role:`switch`,"aria-checked":y,tabIndex:o?-1:c,children:[(0,p.jsx)(`div`,{className:(0,u.default)(hd.switchTrack,y&&hd.switchTrackChecked,m?.track),style:h?.track,children:(0,p.jsx)(`div`,{className:(0,u.default)(hd.switchThumb,y&&hd.switchThumbChecked,m?.thumb),style:h?.thumb})}),(f||t)&&(0,p.jsx)(`div`,{className:(0,u.default)(hd.switchLabel,m?.label),style:h?.label,children:f||t})]})}var _d={tabHeader:`tabHeader_C-b9d`,"tabHeader-tab":`tabHeader-tab_Wbyt-`,tabHeaderTab:`tabHeader-tab_Wbyt-`,"tabHeader-tab-active":`tabHeader-tab-active_IExSo`,tabHeaderTabActive:`tabHeader-tab-active_IExSo`,"tabHeader-tab-disabled":`tabHeader-tab-disabled_yWJxS`,tabHeaderTabDisabled:`tabHeader-tab-disabled_yWJxS`,"tabHeader-icon":`tabHeader-icon_ryEHB`,tabHeaderIcon:`tabHeader-icon_ryEHB`,"tabHeader-labels":`tabHeader-labels_q5Af5`,tabHeaderLabels:`tabHeader-labels_q5Af5`,"tabHeader-title":`tabHeader-title_Jq2Vy`,tabHeaderTitle:`tabHeader-title_Jq2Vy`,"tabHeader-subtitle":`tabHeader-subtitle_4lhSa`,tabHeaderSubtitle:`tabHeader-subtitle_4lhSa`};function vd({tabs:e=[],currentTab:t,onChange:n,className:r,style:i,classNames:a,styles:o,...s}){return(0,p.jsx)(`div`,{...s,role:`tablist`,className:(0,u.default)(_d.tabHeader,a?.root,r),style:{...o?.root,...i},children:e.map(e=>{let r=e.id===t,i=!!e.title||!!e.subtitle;return(0,p.jsxs)(Ot,{role:`tab`,"aria-selected":r,"aria-disabled":e.disabled||void 0,tabIndex:e.disabled?-1:0,className:(0,u.default)(_d.tabHeaderTab,{[_d.tabHeaderTabActive]:r},{[_d.tabHeaderTabDisabled]:e.disabled},a?.tab),style:o?.tab,onClick:()=>{e.disabled||r||n(e.id)},children:[X(e.icon,{className:(0,u.default)(_d.tabHeaderIcon,a?.icon),style:o?.icon}),i&&(0,p.jsxs)(`div`,{className:(0,u.default)(_d.tabHeaderLabels,a?.labels),style:o?.labels,children:[e.title&&(0,p.jsx)(`span`,{className:(0,u.default)(_d.tabHeaderTitle,a?.title),style:o?.title,children:e.title}),e.subtitle&&(0,p.jsx)(`span`,{className:(0,u.default)(_d.tabHeaderSubtitle,a?.subtitle),style:o?.subtitle,children:e.subtitle})]})]},e.id)})})}function yd(e){return(0,p.jsx)(Aa,{...E(`Textarea`,e),multiline:!0})}function bd(e=`default`){let[t,n]=(0,l.useState)(localStorage.getItem(`theme`)||e);return{currentThemeId:t,setCurrentThemeId:e=>{n(e),localStorage.setItem(`theme`,e)}}}var xd=(0,l.createContext)(null);function Sd(){return(0,l.useContext)(xd)}function Cd({children:e,className:t,style:n,...r}){let i=(0,l.useRef)(null),a=(0,l.useRef)(void 0),o=(0,l.useRef)(!1),s=(0,l.useRef)(null),[c,u]=(0,l.useState)({pointer:null,rect:null}),d=()=>{o.current||(o.current=!0,a.current=requestAnimationFrame(()=>{o.current=!1,a.current=void 0;let e=i.current,t=s.current;if(!e||!t)return;let n=e.getBoundingClientRect();u({pointer:{x:t.x-n.left,y:t.y-n.top},rect:n})}))},f=e=>{s.current={x:e.clientX,y:e.clientY},d()},m=()=>{s.current=null,o.current&&a.current!==void 0&&(cancelAnimationFrame(a.current),o.current=!1,a.current=void 0),u({pointer:null,rect:null})};return(0,p.jsx)(`div`,{...r,ref:i,className:t,style:n,onPointerMove:f,onPointerLeave:m,children:(0,p.jsx)(xd.Provider,{value:c,children:e})})}function wd(e){let t=Math.max(-1,Math.min(1,e));return Math.sign(t)*Math.abs(t)**1.6}function Td(e,t){return Math.max(-t,Math.min(t,e))}function Ed(e,t,n,{maxTiltX:r,maxTiltY:i,easing:a,lockAxis:o}){let s=n.width>0?e/n.width*2-1:0,c=n.height>0?t/n.height*2-1:0;return{rotateX:o===`x`?0:Td(-a(c)*r,r),rotateY:o===`y`?0:Td(a(s)*i,i)}}var Dd={tilt:`tilt_gbX2b`,"tilt-perspective":`tilt-perspective_CFdP6`,tiltPerspective:`tilt-perspective_CFdP6`,"tilt-surface":`tilt-surface_Jyzwe`,tiltSurface:`tilt-surface_Jyzwe`};function Od(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}var kd=.3,Ad=.05;function jd(e){let{ref:t,children:n,maxTilt:r=15,maxTiltX:i,maxTiltY:a,perspective:o=800,easing:s=wd,lockAxis:c=`none`,scaleOnHover:d=1,trackingMode:f=`self`,disabled:m=!1,onTiltChange:h,className:g,style:_,classNames:v,styles:y,...b}=E(`Tilt`,e),x=(0,l.useRef)(null),S=(0,l.useRef)(null),C=(0,l.useRef)(void 0),w=(0,l.useRef)(!1),T=(0,l.useRef)(!1),D=(0,l.useRef)(!1),O=(0,l.useRef)(null),k=(0,l.useRef)({rotateX:0,rotateY:0}),A=Sd(),j=f===`group`,N=j&&A!==null;(0,l.useEffect)(()=>{j&&A===null&&M()&&console.warn(`Tilt: trackingMode="group" was set with no ancestor TiltGroup, falling back to self tracking.`)},[j,A===null]);let P=i??r,F=a??r;function I(e,t,n){let r=S.current;r&&(r.style.transform=`rotateX(${e}deg) rotateY(${t}deg)`+(n===1?``:` scale(${n})`))}function L(){C.current!==void 0&&(cancelAnimationFrame(C.current),C.current=void 0),w.current=!1}function R(){if(C.current=void 0,!S.current){w.current=!1;return}let e=T.current&&!m&&!Od(),t=0,n=0;if(e){let e=O.current,r=x.current?.getBoundingClientRect();if(e&&r){let i=Ed(e.x-r.left,e.y-r.top,r,{maxTiltX:P,maxTiltY:F,easing:s,lockAxis:c});t=i.rotateX,n=i.rotateY}}let r=k.current,i,a;if(D.current?(i=r.rotateX+(t-r.rotateX)*kd,a=r.rotateY+(n-r.rotateY)*kd,Math.abs(t-i)<Ad&&Math.abs(n-a)<Ad&&(i=t,a=n,D.current=!1)):(i=t,a=n),k.current={rotateX:i,rotateY:a},I(i,a,e?d:1),h?.(i,a),!D.current){w.current=!1;return}C.current=requestAnimationFrame(R)}function z(){w.current||(w.current=!0,C.current=requestAnimationFrame(R))}function B(e){T.current!==e&&(D.current=!0),T.current=e,z()}let V=e=>{m||N||Od()||(O.current={x:e.clientX,y:e.clientY},B(!0))},H=()=>{N||B(!1)};return(0,l.useEffect)(()=>{if(N){if(m||Od()){B(!1);return}A?.pointer&&A.rect?(O.current={x:A.rect.left+A.pointer.x,y:A.rect.top+A.pointer.y},B(!0)):B(!1)}},[N,m,A?.pointer,A?.rect]),(0,l.useEffect)(()=>()=>{L()},[]),(0,l.useImperativeHandle)(t,()=>({setTilt(e,t){let n={rotateX:Math.max(-P,Math.min(P,e)),rotateY:Math.max(-F,Math.min(F,t))};L(),T.current=!1,D.current=!1,k.current=n,I(n.rotateX,n.rotateY,d),h?.(n.rotateX,n.rotateY)},reset(){L(),T.current=!1,D.current=!1,k.current={rotateX:0,rotateY:0},I(0,0,1)}})),(0,p.jsx)(`div`,{...b,ref:x,className:(0,u.default)(Dd.tilt,g,v?.root),style:{..._,...y?.root},onPointerMove:V,onPointerLeave:H,onPointerCancel:H,children:(0,p.jsx)(`div`,{className:(0,u.default)(Dd.tiltPerspective,v?.perspective),style:{perspective:`${o}px`,...y?.perspective},children:(0,p.jsx)(`div`,{ref:S,className:(0,u.default)(Dd.tiltSurface,v?.surface),style:y?.surface,children:n})})})}var Md=e=>(Math.trunc(e)%24+24)%24,Nd=e=>(Math.trunc(e)%60+60)%60;function Pd(e){if(!e)return null;let t=e.match(/^(\d{1,2}):(\d{1,2})$/);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return n>23||r>59?null:{hours:n,minutes:r}}function Fd(e){return e?`${String(Md(e.hours)).padStart(2,`0`)}:${String(Nd(e.minutes)).padStart(2,`0`)}`:``}function Id(e,t){return Nd(!t||t<=1?e:Math.round(Nd(e)/t)*t)}var Ld=e=>e.hours*60+e.minutes;function Rd(e,t,n){let r=Ld(e),i=Pd(t),a=Pd(n);return i&&(r=Math.max(r,Ld(i))),a&&(r=Math.min(r,Ld(a))),{hours:Math.floor(r/60),minutes:r%60}}function zd(e,t,n,r,i){let a=r*i*Math.PI/180;return{x:e+n*Math.sin(a),y:t-n*Math.cos(a)}}function Bd(e,t){return(Math.atan2(e,-t)*180/Math.PI+360)%360}var Vd=(e,t)=>Math.sqrt(e*e+t*t),Hd={clockFace:`clockFace_LbXIa`,clockHand:`clockHand_E9nTw`,"clockHand-line":`clockHand-line_iOipC`,clockHandLine:`clockHand-line_iOipC`,"clockHand-center":`clockHand-center_VElxx`,clockHandCenter:`clockHand-center_VElxx`,"clockHand-knob":`clockHand-knob_Mb2Fx`,clockHandKnob:`clockHand-knob_Mb2Fx`,clockNumber:`clockNumber_qHDO8`,"clockNumber-inner":`clockNumber-inner_x2XR1`,clockNumberInner:`clockNumber-inner_x2XR1`,"clockNumber-selected":`clockNumber-selected_rPVlV`,clockNumberSelected:`clockNumber-selected_rPVlV`},Ud=50,Wd=40,Gd=25.5,Kd=65.5/2,qd=30,Jd=6,Yd=e=>(e+11)%12+1;function Xd(e,t){if(e===`minutes`)return Array.from({length:12},(e,t)=>{let n=t*5;return{label:String(n).padStart(2,`0`),slot:t,value:n,ring:`outer`}});if(!t)return Array.from({length:12},(e,t)=>{let n=t===0?12:t;return{label:String(n),slot:t,value:n,ring:`outer`}});let n=Array.from({length:12},(e,t)=>{let n=t===0?12:t;return{label:String(n),slot:t,value:n,ring:`outer`}}),r=Array.from({length:12},(e,t)=>{let n=t===0?0:t+12;return{label:String(n).padStart(2,`0`),slot:t,value:n,ring:`inner`}});return[...n,...r]}function Zd({time:e,mode:t,use24Hour:n,minuteStep:r,onChange:i,onCommit:a,classNames:o,styles:s}){let c=(0,l.useRef)(null),d=(0,l.useRef)(!1),f=Xd(t,n),m=e.hours>=12,h=Yd(e.hours),g=t===`minutes`?{slot:e.minutes,radius:Wd}:n?e.hours===0?{slot:0,radius:Gd}:e.hours<=12?{slot:e.hours%12,radius:Wd}:{slot:(e.hours-12)%12,radius:Gd}:{slot:h%12,radius:Wd},_=zd(Ud,Ud,g.radius,g.slot,t===`minutes`?Jd:qd),v=i=>t===`minutes`?Id(e.minutes,r)===i.value||e.minutes===i.value:n?e.hours===i.value:h===i.value,y=(i,a)=>{let o=c.current?.getBoundingClientRect();if(!o)return e;let s=i-(o.left+o.width/2),l=a-(o.top+o.height/2),u=Bd(s,l);if(t===`minutes`){let t=Id(Math.round(u/Jd),r);return{hours:e.hours,minutes:t}}let d=Math.round(u/qd)%12;if(!n){let t=d===0?12:d;return{hours:Md(m?t%12+12:t%12),minutes:e.minutes}}return{hours:Md(Vd(s,l)/(o.width/2)*Ud<Kd?d===0?0:d+12:d===0?12:d),minutes:e.minutes}};return(0,p.jsxs)(`div`,{ref:c,className:(0,u.default)(Hd.clockFace,o?.clockFace),style:s?.clockFace,onPointerDown:e=>{d.current=!0,e.currentTarget.setPointerCapture?.(e.pointerId),i(y(e.clientX,e.clientY))},onPointerMove:e=>{d.current&&i(y(e.clientX,e.clientY))},onPointerUp:e=>{d.current&&(d.current=!1,a(y(e.clientX,e.clientY)))},role:`slider`,"aria-label":t===`minutes`?`Minutes`:`Hours`,"aria-valuetext":t===`minutes`?`${e.minutes} minutes`:`${e.hours} hours`,children:[(0,p.jsxs)(`svg`,{className:Hd.clockHand,viewBox:`0 0 100 100`,"aria-hidden":!0,children:[(0,p.jsx)(`circle`,{cx:Ud,cy:Ud,r:1.8,className:Hd.clockHandCenter}),(0,p.jsx)(`line`,{x1:Ud,y1:Ud,x2:_.x,y2:_.y,className:Hd.clockHandLine}),(0,p.jsx)(`circle`,{cx:_.x,cy:_.y,r:7,className:(0,u.default)(Hd.clockHandKnob,o?.clockHand),style:s?.clockHand})]}),f.map(e=>{let t=zd(Ud,Ud,e.ring===`inner`?Gd:Wd,e.slot,qd),n=v(e);return(0,p.jsx)(`div`,{className:(0,u.default)(Hd.clockNumber,e.ring===`inner`&&Hd.clockNumberInner,n&&Hd.clockNumberSelected,o?.clockNumber),style:{left:`${t.x}%`,top:`${t.y}%`,...s?.clockNumber},children:e.label},`${e.ring}-${e.value}`)})]})}var Qd={timeInput:`timeInput_EbsZN`,"timeInput-clock":`timeInput-clock_D1-dk`,timeInputClock:`timeInput-clock_D1-dk`,"timeInput-clockHeader":`timeInput-clockHeader_bsYNW`,timeInputClockHeader:`timeInput-clockHeader_bsYNW`,"timeInput-headerSegment":`timeInput-headerSegment_Oiu7e`,timeInputHeaderSegment:`timeInput-headerSegment_Oiu7e`,"timeInput-headerSegment-active":`timeInput-headerSegment-active_-Funz`,timeInputHeaderSegmentActive:`timeInput-headerSegment-active_-Funz`,"timeInput-headerColon":`timeInput-headerColon_LwyQH`,timeInputHeaderColon:`timeInput-headerColon_LwyQH`,"timeInput-meridiem":`timeInput-meridiem_tk9km`,timeInputMeridiem:`timeInput-meridiem_tk9km`,"timeInput-meridiem-active":`timeInput-meridiem-active_40uHm`,timeInputMeridiemActive:`timeInput-meridiem-active_40uHm`,"timeInput-footer":`timeInput-footer_NCXsB`,timeInputFooter:`timeInput-footer_NCXsB`};function $d({value:e,selected:t,onChange:n=()=>null,onSelect:r=()=>null,formValidator:i=null,isInline:a=!1,isModal:o=!1,noInput:s=!1,noHeader:c=!1,showClearButton:m=!1,showNowButton:h=!1,minuteStep:g=1,use24Hour:_=!0,minTime:v=null,maxTime:y=null,label:b=``,isValid:x=!0,errorMessage:S=``,isRequired:C=!1,disabled:w=!1,className:T=``,style:E,classNames:D,styles:O,...k}){let A=()=>i?i.value||``:e??t??``,[j,M]=(0,l.useState)(A),[N,P]=(0,l.useState)(!1),[F,I]=(0,l.useState)(`hours`),[L,R]=(0,l.useState)(!1),[z,B]=(0,l.useState)(!1),[,V]=(0,l.useState)(0),H=A(),[U,W]=(0,l.useState)(H),G=(0,l.useRef)(i);!i&&U!==H&&(W(H),M(H)),(0,l.useEffect)(()=>{if(G.current=i,!i)return;let e=()=>{M(i.value||``),V(e=>e+1)};return i.registerOnUpdateListener(e),()=>i.removeOnUpdateListener(e)},[i]);let ee=()=>i?i.touched&&i.hasError():!x||!!S,K=()=>!!(C||i?.validators.find(e=>e.validatorId===`required`)),te=e=>{let t=e?Fd(e):null;i&&i.set(t),n?.(t)},ne=e=>{M(e?Fd(e):``),te(e)},re=Pd(j),q=re??{hours:12,minutes:0},ie=e=>{let t={hours:e.hours,minutes:Id(e.minutes,g)};ne(Rd(t,v,y))},ae=e=>{let t=Rd({hours:e.hours,minutes:Id(e.minutes,g)},v,y);if(ne(t),F===`hours`){I(`minutes`);return}r?.(Fd(t)),a||P(!1)},J=()=>{w||(I(`hours`),P(!0))},oe=({previousState:e,nextState:t})=>{if(t.value===e.value)return t;let n=t.value,r=n.slice(0,2);/^\d\d$/.test(r)&&Number(r)>23&&(n=`23${n.slice(2)}`);let i=n.slice(3,5);return/^\d\d$/.test(i)&&Number(i)>59&&(n=`${n.slice(0,3)}59`),n===t.value?t:{...t,value:n}},se=e=>{M(e);let t=Pd(e);t&&te(t)},ce=()=>{G.current&&(G.current.touched=!0),R(!1),te(Pd(j))},le=e=>{e!==q.hours>=12&&ne({hours:Md(q.hours+(e?12:-12)),minutes:q.minutes})},Y=ee(),ue=re?String(_?re.hours:(re.hours+11)%12+1).padStart(2,`0`):`--`,de=re?String(re.minutes).padStart(2,`0`):`--`,X=c?null:(0,p.jsxs)(`div`,{className:(0,u.default)(Qd.timeInputClockHeader,D?.clockHeader),style:O?.clockHeader,children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Qd.timeInputHeaderSegment,F===`hours`&&Qd.timeInputHeaderSegmentActive,D?.headerSegment),style:O?.headerSegment,onClick:()=>I(`hours`),children:ue}),(0,p.jsx)(`span`,{className:Qd.timeInputHeaderColon,children:`:`}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(Qd.timeInputHeaderSegment,F===`minutes`&&Qd.timeInputHeaderSegmentActive,D?.headerSegment),style:O?.headerSegment,onClick:()=>I(`minutes`),children:de}),!_&&(0,p.jsxs)(`div`,{className:(0,u.default)(Qd.timeInputMeridiem,D?.meridiem),style:O?.meridiem,children:[(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(q.hours<12&&Qd.timeInputMeridiemActive),onClick:()=>le(!1),children:`AM`}),(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(q.hours>=12&&Qd.timeInputMeridiemActive),onClick:()=>le(!0),children:`PM`})]})]}),fe=m||h?(0,p.jsxs)(`div`,{className:(0,u.default)(Qd.timeInputFooter,D?.footer),style:O?.footer,children:[h&&(0,p.jsx)(he,{onClick:()=>{let e=new Date;ie({hours:e.getHours(),minutes:e.getMinutes()})},children:`Now`}),m&&(0,p.jsx)(he,{onClick:()=>{ne(null),r?.(null)},children:`Clear`})]}):null,pe=(0,p.jsxs)(`div`,{className:(0,u.default)(Qd.timeInputClock,D?.clock),style:O?.clock,children:[X,(0,p.jsx)(Zd,{time:q,mode:F,use24Hour:_,minuteStep:g,onChange:ie,onCommit:ae,classNames:D,styles:O}),fe]}),me=s?null:(0,p.jsx)(Aa,{autoComplete:`off`,label:`${b}${K()?` *`:``}`,value:j,icon:(0,p.jsx)(d.FontAwesomeIcon,{icon:f.faClock}),onIconClick:J,onClick:J,readOnly:o,disabled:w,isValid:!Y,customInput:(0,p.jsx)(bs,{mask:`99:99`,beforeMaskedStateChange:oe}),onChange:e=>se(e),onBlur:ce,onFocus:()=>R(!0),onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1)}),ge=a?pe:o?(0,p.jsx)(ro,{hideHeader:!0,isOpen:N,onClose:()=>P(!1),children:pe}):(0,p.jsx)(On,{isOpen:N,onOpenChange:P,content:pe,placement:Rt.Bottom,align:zt.Start,closeOnTriggerClick:!1,constrainWidth:!1,children:me});return(0,p.jsxs)(`div`,{className:(0,u.default)(Qd.timeInput,D?.root,T),style:{...O?.root,...E},...k,children:[(o||a)&&me,ge,(0,p.jsx)(ya,{variant:`error`,message:i?i.getCurrentErrorMessage()??``:S||``,isVisible:Y&&(L||z)})]})}var ef={timeline:`timeline_VtQdt`,"timeline-item":`timeline-item_s8-U2`,timelineItem:`timeline-item_s8-U2`,"timeline-item-connector":`timeline-item-connector_06FQ0`,timelineItemConnector:`timeline-item-connector_06FQ0`,"timeline-item-clickable":`timeline-item-clickable_0w8zK`,timelineItemClickable:`timeline-item-clickable_0w8zK`,"timeline-item-disabled":`timeline-item-disabled_EkWVA`,timelineItemDisabled:`timeline-item-disabled_EkWVA`,"timeline-marker":`timeline-marker_u6jDA`,timelineMarker:`timeline-marker_u6jDA`,"timeline-dot":`timeline-dot_l-s7C`,timelineDot:`timeline-dot_l-s7C`,"timeline-dot-with-icon":`timeline-dot-with-icon_6JK7D`,timelineDotWithIcon:`timeline-dot-with-icon_6JK7D`,"timeline-dot-toned":`timeline-dot-toned_h1Cso`,timelineDotToned:`timeline-dot-toned_h1Cso`,"timeline-with-icons":`timeline-with-icons_ylDAw`,timelineWithIcons:`timeline-with-icons_ylDAw`,"timeline-connector":`timeline-connector_VuXnH`,timelineConnector:`timeline-connector_VuXnH`,"timeline-content":`timeline-content_K4Ztg`,timelineContent:`timeline-content_K4Ztg`,"timeline-header":`timeline-header_xr4Tw`,timelineHeader:`timeline-header_xr4Tw`,"timeline-title":`timeline-title_MZ26k`,timelineTitle:`timeline-title_MZ26k`,"timeline-timestamp":`timeline-timestamp_-0w-N`,timelineTimestamp:`timeline-timestamp_-0w-N`,"timeline-description":`timeline-description_WcWIu`,timelineDescription:`timeline-description_WcWIu`,"timeline-right":`timeline-right_fZEKn`,timelineRight:`timeline-right_fZEKn`,"timeline-alternate":`timeline-alternate_Kv9LY`,timelineAlternate:`timeline-alternate_Kv9LY`,"timeline-item-right":`timeline-item-right_s5ELB`,timelineItemRight:`timeline-item-right_s5ELB`},tf=function(e){return e.Left=`left`,e.Right=`right`,e.Alternate=`alternate`,e}({});function nf({items:e=[],alignment:t=tf.Left,className:n,style:r,classNames:i,styles:a,...o}){let s=e.some(e=>!!e.icon);return R(`Timeline`,e.map(e=>e.color)),(0,p.jsx)(`div`,{...o,className:(0,u.default)(ef.timeline,{[ef.timelineRight]:t===tf.Right,[ef.timelineAlternate]:t===tf.Alternate,[ef.timelineWithIcons]:s},i?.root,n),style:{...a?.root,...r},children:e.map((n,r)=>{let o=n.id??r,s=r===e.length-1,c=t===tf.Alternate&&r%2==1,l=!!n.onClick&&!n.disabled,d=n.color?F(n.color):void 0,f=(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`div`,{className:(0,u.default)(ef.timelineMarker,i?.marker),style:a?.marker,children:[(0,p.jsx)(`div`,{className:(0,u.default)(ef.timelineDot,{[ef.timelineDotWithIcon]:!!n.icon},d&&[d.className,ef.timelineDotToned],i?.dot),style:{...d?.style,...a?.dot},children:n.icon?X(n.icon):null}),!s&&(0,p.jsx)(`div`,{className:(0,u.default)(ef.timelineConnector,i?.connector),style:a?.connector})]}),(0,p.jsxs)(`div`,{className:(0,u.default)(ef.timelineContent,i?.content),style:a?.content,children:[(0,p.jsxs)(`div`,{className:ef.timelineHeader,children:[(0,p.jsx)(`div`,{className:(0,u.default)(ef.timelineTitle,i?.title),style:a?.title,children:n.title}),n.timestamp!=null&&(0,p.jsx)(`div`,{className:(0,u.default)(ef.timelineTimestamp,i?.timestamp),style:a?.timestamp,children:n.timestamp})]}),n.description!=null&&(0,p.jsx)(`div`,{className:(0,u.default)(ef.timelineDescription,i?.description),style:a?.description,children:n.description}),n.content]})]}),m=(0,u.default)(ef.timelineItem,{[ef.timelineItemRight]:c},{[ef.timelineItemClickable]:l},{[ef.timelineItemDisabled]:n.disabled},i?.item);return l?(0,p.jsx)(Ot,{className:m,style:a?.item,onClick:n.onClick,children:f},o):(0,p.jsx)(`div`,{className:m,style:a?.item,"aria-disabled":n.disabled||void 0,children:f},o)})})}var rf={timer:`timer_cqe3R`,"timer-ringWrapper":`timer-ringWrapper_OydlE`,timerRingWrapper:`timer-ringWrapper_OydlE`,"timer-ringSvg":`timer-ringSvg_qsV1X`,timerRingSvg:`timer-ringSvg_qsV1X`,"timer-ripples":`timer-ripples_2Slkv`,timerRipples:`timer-ripples_2Slkv`,"timer-ripple":`timer-ripple_TLdSx`,timerRipple:`timer-ripple_TLdSx`,timerRippleHalo:`timerRippleHalo_oEcXJ`,"timer-ringTrack":`timer-ringTrack_pGGs1`,timerRingTrack:`timer-ringTrack_pGGs1`,"timer-ringProgress":`timer-ringProgress_LL8uQ`,timerRingProgress:`timer-ringProgress_LL8uQ`,"timer-ringProgress-urgent":`timer-ringProgress-urgent_MwwU2`,timerRingProgressUrgent:`timer-ringProgress-urgent_MwwU2`,"timer-display":`timer-display_es2IX`,timerDisplay:`timer-display_es2IX`,"timer-time":`timer-time_oMZ5O`,timerTime:`timer-time_oMZ5O`,"timer-label":`timer-label_GknS-`,timerLabel:`timer-label_GknS-`,"timer-controls":`timer-controls_LHM4q`,timerControls:`timer-controls_LHM4q`,"timer-controlsRow":`timer-controlsRow_42JyZ`,timerControlsRow:`timer-controlsRow_42JyZ`,"timer-cancelButton":`timer-cancelButton_ObL4-`,timerCancelButton:`timer-cancelButton_ObL4-`,"timer-pulsing":`timer-pulsing_795m4`,timerPulsing:`timer-pulsing_795m4`,timerHeartbeat:`timerHeartbeat_N40Zt`,"timer-critical":`timer-critical_q-JzB`,timerCritical:`timer-critical_q-JzB`},af=200,of=1e3,sf={cancel:`Cancel timer`};function cf(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}function lf(e){let t=Math.ceil(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60,a=String(r).padStart(2,`0`),o=String(i).padStart(2,`0`);return n>0?`${n}:${a}:${o}`:`${a}:${o}`}function uf(e){let{ref:t,durationSeconds:n,autoStart:r=!0,resetOnDurationChange:i=!0,onTick:a,onComplete:o,onStart:s,onPause:c,onResume:d,onCancel:m,onAddTime:h,onRemoveTime:g,showControls:_=!0,hideAddButton:v=!1,hideRemoveButton:y=!1,hidePauseButton:b=!1,hideCancelButton:x=!1,adjustSeconds:S=30,maxSeconds:C,label:w,formatTime:T=lf,size:O,strokeWidth:k=10,counterClockwise:A=!1,urgentThreshold:j=.1,urgentMinSeconds:M=3,pulseOnUrgent:N=!0,showRunningRipples:P=!1,playSoundOnComplete:F=!1,soundUrl:I,soundVolume:L=.5,notifyOnComplete:R=!1,notificationTitle:z,notificationBody:B,className:V,style:H,classNames:U,styles:W,labels:G,...ee}=E(`Timer`,e),K=D(`Timer`,G,sf),te=n*1e3,[ne,re]=(0,l.useState)(r?`running`:`idle`),[q,ie]=(0,l.useState)(te),[ae,J]=(0,l.useState)(0),[se,ce]=(0,l.useState)([]),le=(0,l.useRef)(q),Y=(0,l.useRef)(ne),ue=(0,l.useRef)(te),de=(0,l.useRef)(!1),X=(0,l.useRef)(!1),fe=(0,l.useRef)(!1),pe=(0,l.useRef)(0);function me(e){le.current=e,ie(e)}function ge(e){Y.current=e,re(e)}function _e(){J(e=>e+1)}(0,l.useEffect)(()=>{if(ne!==`running`)return;let e=Date.now(),t=le.current,n=setInterval(()=>{let n=Math.max(0,t-(Date.now()-e));me(n),a?.(n),n<=0&&ge(`completed`)},af);return()=>clearInterval(n)},[ne,ae]),(0,l.useEffect)(()=>{if(ne===`completed`&&!de.current){if(de.current=!0,o?.(),F)try{let e=new Audio(I||`data:audio/wav;base64,UklGRkYeAABXQVZFZm10IBAAAAABAAEAESsAACJWAAACABAAZGF0YSIeAAAAAAkAIAA4AEQANwAPANH/jv9b/07/cf/F/zkAsAAJAScB+QCCANv/K/+h/mX+j/4d//P/3QChAQkC8QFZAV0AOP80/pb9i/0g/jj/kgDaAbsC9gJzAkwBwv82/gz9k/zz/Bz+y/+ZARMD1QOoA44CxQC6/u782PvD+778kv7SAO8CYQTGBPwDLALE/1j9hfvD+kz7Bf2J/zwCcgSbBWUF1QNGAVX+vPsk+vj5TPvU/fYA7QP6BZYGkAUjA+D/k/wP+vj4nPna+y3/xQK+BVkHKActBeABC/6h+nz4LPjN+QD9AAHTBIQHYggvBy4EFgDn+6v4NPfm9576uP4zA/YGDAnsCJUGkgLc/Zz54vZh9kL4FfzvAKAF/AgqCtYITQVmAFX7W/d49Sv2Ufkq/ocDFgizCrIKCQhaA8f9sPhY9Zr0rfYW+8QAUwZiCuoLgwp9BtAA3voh9sjzb/T194T9wAMgCUwMdQyJCTgEzv3d9+Dz2fIR9QT6fwDsBrMLoQ00DL4HUgGC+v30JPKy8o32yPzeAxAK1A01DhILKwXu/ST3evIf8W/z4PghAGsH7wxMD+YNDQnrAUH68fOP8PjwGfX2++ED6ApKD+4PowwxBin+hfYq8W/vyfGs96r/zgcTDusQmQ9pCpwCGvr+8gvvQu+d8xD7ygOkC60QoBE5DkcHff4C9u/vy+0i8Gr2HP8WCCAPeRJIEc8LYgMP+iXyme2S7RnyF/qYA0YM+hFHE9IPbgjp/pn1zO407HzuHPV3/kIIEhD3E/MSPg07BB/6ZvE87OvrkPAN+U4DzQwxE+EUbBGjCW3/TfXC7a7q2ezD87z9UwjrEGEVlhS0DigFSfrD8PTqT+oF7/P36gI4DVAUbhYEE+QKCAAc9dLsOek862Hy7vxKCKkRuBYxFi8QJgaM+jzww+nA6Hnty/ZvAocNVhXqF5kULwy5AAf1/OvY56Xp+vAM/CYISxL4F8AXrBE0B+j60O+r6EDn7+uY9d0Bug1BFlQZKRaDDX0BDPVB64vmGOiN7xr76AfREiAZQxkpE08IXPuB76zn0OVo6lr0NQHSDRIXqhqxF90OVAIs9aPqVeWX5h/uGPqSBzsTMBq2GqUUdgnn+07vx+Zy5OfoFPN6AM4NxxfrGzAZOxA8A2b1Ieo35CPlsOwI+SMHiBMmGxgcHRanCof8Nu/+5SnjbufH8av/sA1gGBUdohqbETQEufW76TLjvuND6+z3nga5EwEcaB2OF+ELPP0671Hl9eH/5XfwzP53DdwYJx4HHPsSOgUk9nLpR+Jr4tvpx/YDBs4TwRyjHvcYIA0D/lnvwOTY4J3kJe/d/SYNOxkgH1wdWRRLBqb2Rul34SvheeiZ9VMFxxNkHcgfVhpjDtz+ku9N5NTfSOPT7eD8vAx9Gf4fnx6yFWYHPvc26cPg/98f52b0kQSlE+od1SCpG6gPxP/l7/bj6t4D4oPs1/s7DKMZwSDPHwUXiQjr90HpLODq3tDlL/O9A2kTVB7KIe0c7RC6AFDwveMa3tHgOOvF+qMLrBlnIeogTxiyCar4aemy3+3djeT18doCExOfHqUiIh4vErsB0/Cg42bdsd/06ar5+AqZGfEh7iGPGd8Ke/mr6VXfCN1Z473w6QGkEs4eZCNEH20TxwJr8aHjz9yn3rjoivg5CmoZXSLbIsIaDgxb+gbqFt8+3DXih+/sAB4S3x4IJFIgpBTbAxnyvuNV3LTdh+dm92kJIBmrIq4j5xs8DUr7e+r03o/bJOFV7uX/ghHTHpAkSyHSFfQE2fL24/jb2Nxj5kD2iQi8GNwiZyT7HGgORPwH6/De/Nom4Crt1v7QEKoe+SQuIvUWEgar80rkudsW3E3lG/WbB0AY7yIFJfwdjw9I/anrCd+G2j3fCOzC/QwQZh5GJfgiDBgxB430uOSY22/bSOT486EGqxfkIoYl6h6vEFX+Yew/3y3abN7x6qn8Ng8HHnQlqCMTGU8IffU+5ZXb49pW49nynQUBF7wi6yXCH8YRZ/8s7ZHf8tmz3efpjvtQDo0dhCU+JAsabAl59t3lsNtz2nfiwvGQBEEWeCIyJoQg0xJ+AAju/t/W2RPd7Oh0+lwN+hx2Jbkk8BqDCn/3kubo2yHaruGz8H4DbhUXIlsmLSHSE5YB9e6G4NfZjtwB6Fz5WwxPHEslFyXAG5QLjvhc5z3c7Nn84K/vaAKJFJshZia8IcMUrgLv7ybh9tkl3CjnSfhRC44bAiVYJXwcnAyi+TrortzU2WLguO5QAZMTBCFTJjEipBXDA/bw3+E02tjbY+Y99z4KtxqcJHslIB2ZDbv6Kuk63dvZ4t/Q7TgAkBJUICEmiiJyFtQECPKu4o7aqNu05Tn2JQnNGRokgSWsHYoO1fsp6uHdANp83/jsIv+AEY0f0iXHIiwX3gUh85LjBtuV2xzlQPUHCNEYfCNpJR8ebA/v/DfroN5D2jHfMuwR/mYQrh5mJeci0RfgBkH0iuSZ26DbnORU9OgGxRfFIjIldx49EAf+Uux436TaA9+B6wf9RA+7Hd0k6iJfGNcHZfWU5Ujcyds15HbzyQWrFvQh3iS0Hv0QG/927WfgItvy3uTqBfwcDrQcOCTPItUYwQiL9q7mEd0Q3OnjqfKtBIUVCyFsJNUeqREoAKPuauG92/7eXuoO++8Mmxt3I5YiMhmdCbD31efz3XXcuOPt8ZUDVBQMIN0j2R4/EiwB1u+B4nPcJ9/w6SP6wAtzGp0iPyJ0GWkK1PgK6e3e+Nyi40bxgwIbE/geMiPAHr8SJgIN8anjRd1v35vpRvmSCjwZqiHLIZwZIwvz+Ujq/d+X3arjs/B6AdwR0R1qIooeJxMUA0by4uQw3tPfYel6+GYJ+RefIDohpxnJCwv7j+si4VLezuM28HsAmBCYHIghNh52E/MDf/Mo5jTfVeBB6cD3PgisFn4fjCCXGVoMG/zb7FniKd8P5NLviP9TD1AbjSDFHawTwgS29HrnT+D04DzpGPcdB1cVSR7BH2oZ1Qwh/Szuo+Mb4G3khu+k/g4O+Rl5HzcdxhN/Bej11+iB4bDhVOmG9gQG/BMAHdweHxk5DRr+fu/75Cbh6eRT79D9zAyXGE0ejBzGEyoGFPc76sbih+KI6Qr29gSeEqcb3R24GIQNBf/Q8GLmSeKB5TzvDv2OCysXDR3EG6kTvwY3+KXrHuR549nppfX0Az0RPhrEHDUYtg3h/x/y1OeC4zbmP+9e/FcKuBW4G+IacRM/B0/5Eu2H5YXkRupZ9QAD3Q/IGJMblBfNDaoAavNP6dHkB+de78T7KAk/FFEa5RkcE6cHXPqB7v/mquXQ6ib1HAKADkcXTBrYFskNYQGu9NLqNObz55nvP/sECMIS2RjOGKoS9wda++/vhOjn5nbrDfVKASgNvRXwGAAWqg0DAur1Wuyp5/no8O/R+uwGRRFTF58XHRIuCEj8W/EU6jnoOOwO9YoA1gsrFIEXDRVvDY8CG/fl7S7pGOpj8Hv64gXID8AVWRZzEUsIJf3B8q3roOkV7Sv14P+NCpUSARYAFBkNBAM/+HHvwepP6/LwP/rpBE4OIxT9FK4QTQju/SH0TO0a6w3uZPVL/08J+xBwFNsSpwxhA1X5/PBg7J3snPEc+gEE2gx9Eo0Tzw80CKP+d/Xw7qXsHe+39c3+HghhD9ISnhEZDKUDW/qD8gnuAO5i8hT6LANtC9EQCxLVDgEIQv/C9pfwP+5H8Cf2Z/77BskNKBFLEG8LzwNP+wX0u+9370LzJvpsAgkKIQ94EMINsgfK/wH4PfLm74fxsfYZ/ukFNAx0D+MOqwrgAzD8gPVy8f/wO/RT+sEBsAhuDdYOlwxHBzsAMfni85nx3vJX9+b96ASmCrkNZw3NCdUD/Pzx9i3zmPJO9Zz6LgFlB7wLJw1WC8IGkgBQ+oP1VfNI9Bf4zP37Ax4J+AvaC9YIsAOy/Vb46vRA9Hj2//qyACgGDAptC/8JIgbRAF37HvcZ9cb18fjN/SIDoQc0Cj4KxgdwA1L+rvmn9vT1uPd9+08A/ARgCKsJlAhnBfUAV/yw+OH2VPfk+ej9XwIwBm4IkwifBhUD2f73+mD4svcO+Rb8BgDjA7sG4gcWB5ME/gA8/Tj6rfjy+O/6H/60Ac0EqgbdBmMFoAJI/y/8Ffp4+Xb6yfzX/90CHwUUBogFpwPtAAv+tPt4+p36Efxw/iABeQPoBB0FEQQQAp3/VP3D+0X78fuV/cH/7AGNA0QE7AOjAsIAwv4i/UP8VPxI/dv+pgA2Ai0DVQOtAmYB2P9l/mf9Fv18/Xn+x/8RAQgCdAJCAogBfABi/4D+Cv4U/pP+Yf9FAAYBeAGHATcBpAD5/2H/Af/o/hX/dP/n/04AkQClAI4AWQAbAOj/zf/L/9v/8v8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANACUAKwAKAMr/kv+R/9n/TwCxALwAVwCs/xb/8/5p/0YAFgFfAeYA3f/N/lP+wP7s/zwB9QGiAV4Azv7O/ff9Rf8RAWACcQImASb/g/0s/WH+jACEAjADIALY/4v9gfxZ/bD/TAK/AzAD2gD2/Rb8S/yN/q4B/wMyBBkCyP4H/F77Ov2qANgDAgV3A/r/aPyz+tr7Tf87A34F0AR7AUH9bfqS+rD9JQKJBfsFLAOQ/qP6jPn1+6EADgXSBucERQBk++74RvrE/gYEMQeABkECs/zW+M74svx1AvwGygdeBIH+Wvm795b6bwAmBpwIbQa2AIP6NPeg+BX+rATSCD0IKgNK/FX3A/eU+50CVQibCawFmv4w+O71HvkWABwHXAoHCE0Bx/mJ9ez2Q/0sBWAKAgo0BAr87PU19Vj6nQKRCWkLFAfa/ib3KfSR95f/7gcQDLEJCQIv+fDzLfVO/IUF1wvNC1wF8fuf9GbzAPl2Aq8KMg2TCEH/PvZv8vL18v6cCLMNaAvoAr/4bPJn8zn7tgUzDZoNogYA/HDznPGR9ycCqwvxDiUKzv979cTwRfQq/iQJQg8oDegDdvgB8ZzxBvq/BXQOZg8BCDf8YfLY7wz2sQGDDKQQyAuBANz0Ku+M8j79hAm6EO4OCAVU+LDv0u+4+KEFlQ8rEXgJlfx08SDudfQWATgNRxJ5DVYBZfSm7cvwM/y+CRkStxBEBlv4fu4L7lH3WgWWEOgSAgsZ/avwduzO8lYAxg3WEzIPTQIU9DnsBu8J+88JXBN9EpsHifhr7Uvs1PXuBHMRmRSdDML9B/Dd6hzxdP8tDk8V8hBkA+zz5+pB7cT5uAmAFD8UCQnf+HrslepF9FsELBI6FkYOjv6J71npYu9y/mwOrha1EpcE6/Oz6X/rZfh6CYQV+RWLClv5revu6KbypAO/EsgX+Q99/zPv7eek7VH9hA7yF3cU5QUS9J7ow+nx9hUJZBamFx8M/PkF61fn/PDKAisTQBmzEYsABe+b5uTrE/x0DhcZNBZLB2H0q+cR6Gn1iQggF0QZwA3A+oTq1eVI79ABbxOeGm8TtgH/7mblJ+q9+jwOGxroF8YI1vTc5m3m0vPaB7YXzxpsD6f7Kupq5JDttwCME+EbKxX9AiDvUeRw6FD53Q39GpEZUgpw9TLm2uQv8gcHJRhEHB8Rrvz36Rrj1+uB/4ETBh3iFlsEae9e48Pm0PdYDbsbLBvsCy72ruVb44LwFAZtGKEd1RLS/e3p5+Ef6jL+TRMKHpIYzgXZ747iJOVA9q4MUhyzHJEND/dR5fPh0O4BBY0Y4h6LFBL/CurT4G7ozPzzEuweNxpTB27w4+GV46P04QvDHCUePQ8P+BzlpeAd7dIDhRgFID0WagBP6uDfxuZS+3MSqR/MG+cIJ/Fe4Rni/fLzCg0dfx/uEC75EOV032vriQJVGAgh5xfXAbvqEd8r5cj5zRFBIFAdhgoD8gHhteBR8eYJLh29IJ4SaPor5WLev+koAf4X6SGHGVYDTetm3qDjMfgFEbMgvh4tDP/yy+Bq36PvuwgoHd4hSxS6+23lcd0c6LT/gBelIhgb5QQC7OLdKeKR9hoQ/CAUINgNGfS94Dze9+13B/oc3yLwFSP91+Wj3IXmL/7dFjwjlxx/BtvshN3I4Or0EA8eIVAhgw9P9dfgLN1P7BsGpBy9I4sXnv5m5vrb/+Sd/BcWrCMCHiEI1O1P3YHfQPPpDRghbSIrEZ72GeE+3LHqqwQoHHgkGBkoABrnd9uL4wD7LxX1I1Ufxwnr7kHdVd6Y8agM6iBrI80SA/iC4XLbHukpA4YbDSWUGr4B8ecb2y7iXfknFBYkjSBvCx/wXN1J3fTvTwuUIEckZBR7+RHiy9qb55oBwRp8JfsbXQPp6Ofa6uC39wITDySoIRQNbPGe3V3cWe7hCRggACXuFQP7xOJK2ivmAADaGcMlSx0BBf/p2trB3xL2whHgI6Misg7P8gfelNvK7GEIdx+TJWcXl/yb4/DZ0ORf/tMY4iWAHqYGMuv22rfecfRqEIojfCNHEEb0l97v2knr0waxHv8lyxg0/pLkvdmP47v8rhfaJZgfSQh+7Drbzt3Y8v0ODSMyJM4RzfVL33Da2+k7BckdRSYZGtb/qeWz2WniGPttFqklkSDlCeHtpdsH3Urxfg1qIsMkRRNg9yPgGNqD6JsDwRxiJkwbegHc5tDZYeF4+RUVUSVpIXkLWO823GTcy+/wC6MhLiWoFP34HOHn2UPn9wGbG1gmYhwcAyroFtp54N/3pxPSJB0i/wzg8Ozc59te7lcKuSBxJfQVn/o04t/ZHuZUAFoaJSZaHbkEjumD2rTfUvYnEi0krCJ2DnTyxd2R2wbttgivH40lJhdE/Gnj/9kX5bP+/xjLJTAeTAYH6xbbE9/T9JgQZCMVI9gPEvTA3mLbx+sSB4cegCU8GOf9uORG2jHkGv2PF0kl4x7UB5DsztuX3mbz/Q54IlcjJRG29dvfXNui6mwFQx1MJTMZhf8f5rXabOOM+w0WoiRxH0sJJ+6q3ELeDfJaDWwhcSNXEl33E+F925vpygPmG+8kCRobAZvnStvL4gv6exTXI9kfrwrI76jdFN7N8LILQSBjI24TA/ll4sbbtOguAnMabCS8GqQCJ+kF3FDinPjdEugiGyD9C2/xxd4P3qfvCgr6Hi0jZhSk+s/jN9zv550A7RjDI0sbHgTB6uTc++FB9zYR2SE0IDINGfMA4DHenu5kCJkdzyI9FT38TuXO3E3nGf9YF/UitBuFBWbs5N3N4f71iw+rICYgSw7D9Fbhe9617cUGIxxLIvIVyv3e5ovd0eam/bUVBCL1G9YGEu4E38jh1fTeDWEf7x9FD2j2xOLt3u3sLwWZGqAhghZI/33obN575kj8ChTyIBAcDwjB70Pg6uHJ8zQM/R2RHx8QBvhH5IbfSeynA/4Y0CDtFrMAJupv30zmAPtaEsEfAhwrCW/xnOE04tzyjwqCHAsf1xCY+dzlRODL6y8CVxfdHzAXCQLX65LgRebT+agQdB7MGyoKGvMO46biEfL0CPMaYB5rERv7f+cm4XLrywCnFckeTBdHA4zt0+Fm5sL4+A4MHW4bCQu+9JXkP+Np8WYHVRmPHdgRjfwu6SriQOt+//ETlR1BF2kEQO8v46/m0PdNDY0b6RrFC1b2Lub94+bw5wWpF5scIBLp/eTqT+M260r+ORJFHA0XbgXx8KTkH+cA96sL+xk+Gl0M4PfW59/kifB9BPMVhhs/Ei3/nuyS5FXrM/2DENsasRZSBpvyL+a351L2FgpYGG4Z0AxY+Yrp5OVT8CkDNxRRGjcSVgBZ7vHlm+s7/NEOWRkuFhUHO/TM53ToyvWRCKcWehgdDbz6ResK50Xw7gF5Ev8YBxJiARHwaecI7GT7KQ3DF4UVswfM9XnpVeln9R8H7BRlF0INCPwG7U7oXvDPALwQkxevEU4CwvH26J3sr/qMCxwWtxQtCEz3MetZ6iv1wwUrEzAWPw05/cfurumg8M//BA8PFjARGANp85fqV+0f+v8JZxTFE4AIuPjy7H7rFvWABGcR3RQUDUz+hfAn6wnx8P5UDXYUihC+AwL1R+w27rX5hQioErESrAgM+rjuwuwq9VkDpA9wE8IMQf898rfsmfEz/rALzBLAD0AEivYD7jjvcvkgB+IQfRGwCEb7f/Ai7mX1UALlDesRSAwUAOzzWe5P8pv9GwoUEdEOmwT+98jvW/BW+dQFGA8sEIwIYvxD8pvvyfVoAS4MUhCnC8MAjPUM8CrzKP2YCFEPwA3PBFv5k/Gc8WL5pARPDcAOQAhg/QL0K/FT9qIAggqmDuEKTQEd98vxKPTc/CsHhw2PDNsEnvpf8/rylvmSA4oLPA3NBzz+t/XO8gP3AADlCOwM+AmxAZn4k/NH9bf81gW6C0ELvwTE+yj1cvTx+aACzQmiCzMH9f5f94H02PeE/1sHJwvsCO4B//lh9YX2u/ydBOwJ1wl8BMv87fYA9nT60QEbCPYJdAaJ//f4QvbQ+C7/5QVaCb8HBAJK+zH33/fm/IIDIghVCBEEsf2o+KP3HPslAXcGPAiRBff/e/oM+On5AP+IBIoHdQbyAXr8//hU+Tj9hgJgBr0GfwN0/lb6Vvnq+58A5QR2BosEPgDp+9z5Ivv5/kYDuQUQBbcBiv3H+t/6sv2tAagEEwXIAhL/9fsW+9v8PwBoA6kEZQNeAD39rvt3/Bv/IQLsA5EDVgF6/of8f/xS/vcA/gJaA+0Biv+A/eD87f0HAAMC1wIhAlUAdf5+/ef9ZP8cASUC/QHNAEb/O/4w/hf/ZwBlAZUB7wDb//X+sP4f//b/uAAEAcEAJQCO/0r/bv/U/zkAaQBXAB8A7v/f/+7/`);e.volume=L,e.play()?.catch(()=>{})}catch{}if(R&&typeof Notification<`u`&&Notification.permission===`granted`)try{new Notification(z??`Timer done`,{body:B??(typeof w==`string`?w:void 0)})}catch{}}ne!==`completed`&&(de.current=!1)},[ne]),(0,l.useEffect)(()=>{if(!fe.current){fe.current=!0;return}let e=n*1e3;ue.current=e,me(e),de.current=!1,_e(),i&&ge(r?`running`:`idle`)},[n]),(0,l.useEffect)(()=>{if(!P||ne!==`running`||cf())return;function e(){let e=++pe.current;ce(t=>[...t,e])}let t=setTimeout(e,0),n=setInterval(e,of);return()=>{clearTimeout(t),clearInterval(n)}},[P,ne]);function ve(e){ce(t=>t.filter(t=>t!==e))}function be(){R&&!X.current&&typeof Notification<`u`&&Notification.permission==="default"&&(X.current=!0,Notification.requestPermission().catch(()=>{}))}function xe(){be(),(Y.current===`completed`||Y.current===`cancelled`)&&(me(ue.current),de.current=!1),_e(),ge(`running`),s?.()}function Z(){Y.current===`running`&&(ge(`paused`),c?.())}function Se(){Y.current===`paused`&&(_e(),ge(`running`),d?.())}function Ce(e){let t=C==null?1/0:C*1e3,n=Math.min(le.current+e*1e3,t);me(n),_e(),h?.(e,Math.round(n/1e3)),Y.current===`completed`&&n>0&&(de.current=!1,ge(`running`))}function we(e){let t=Math.max(0,le.current-e*1e3);me(t),_e(),g?.(e,Math.round(t/1e3)),t<=0&&Y.current===`running`&&ge(`completed`)}function Te(){me(ue.current),ge(`cancelled`),m?.()}function Ee(){me(ue.current),de.current=!1,ge(`idle`)}(0,l.useImperativeHandle)(t,()=>({start:xe,pause:Z,resume:Se,addTime:Ce,removeTime:we,cancel:Te,reset:Ee,getStatus:()=>Y.current,getRemainingMs:()=>le.current}));let De=50-k/2,Oe=(0,l.useMemo)(()=>2*Math.PI*De,[De]),ke=Oe*(1-(ue.current>0?Math.min(1,q/ue.current):0)),Ae=Math.max(ue.current*j,M*1e3),je=ne===`running`&&q<=Ae,Me=je&&q<=Math.min(5e3,Ae),Ne=ne===`paused`,Pe=_&&!v,Fe=_&&!y,Ie=_&&!b,Le=ne===`running`?f.faPause:f.faPlay,Re=ne===`running`?`Pause`:Ne?`Resume`:ne===`idle`?`Start`:`Restart`,ze=ne===`running`?Z:Ne?Se:xe,Be=_&&!x;return(0,p.jsxs)(`div`,{...ee,className:(0,u.default)(rf.timer,N&&je&&rf.timerPulsing,Me&&rf.timerCritical,V,U?.root),style:{...O?{"--timer-size":O}:null,"--timer-stroke-width":`${k}px`,...H,...W?.root},children:[(0,p.jsxs)(`div`,{className:(0,u.default)(rf.timerRingWrapper,U?.ringWrapper),style:W?.ringWrapper,children:[se.length>0&&(0,p.jsx)(`div`,{className:(0,u.default)(rf.timerRipples,U?.ripples),style:W?.ripples,children:se.map(e=>(0,p.jsx)(`span`,{className:(0,u.default)(rf.timerRipple,U?.ripple),style:W?.ripple,onAnimationEnd:()=>ve(e)},e))}),(0,p.jsxs)(`svg`,{className:(0,u.default)(rf.timerRingSvg,U?.ringSvg),viewBox:`0 0 100 100`,style:W?.ringSvg,children:[(0,p.jsx)(`circle`,{className:(0,u.default)(rf.timerRingTrack,U?.ringTrack),cx:`50`,cy:`50`,r:De,style:W?.ringTrack}),(0,p.jsx)(`circle`,{className:(0,u.default)(rf.timerRingProgress,je&&rf.timerRingProgressUrgent,U?.ringProgress),cx:`50`,cy:`50`,r:De,strokeDasharray:Oe,strokeDashoffset:ke,style:{transition:Ne?`none`:void 0,transform:A?`rotate(-90deg)`:void 0,...W?.ringProgress}})]}),(0,p.jsxs)(`div`,{className:(0,u.default)(rf.timerDisplay,U?.display),style:W?.display,children:[(0,p.jsx)(`span`,{className:(0,u.default)(rf.timerTime,U?.time),style:W?.time,children:T(q)}),w&&(0,p.jsx)(`span`,{className:(0,u.default)(rf.timerLabel,U?.label),style:W?.label,children:w})]})]}),_&&(0,p.jsxs)(`div`,{className:(0,u.default)(rf.timerControls,U?.controls),style:W?.controls,children:[(0,p.jsxs)(`div`,{className:rf.timerControlsRow,children:[Fe&&(0,p.jsx)(ye,{icon:f.faMinus,title:`Remove ${S}s`,onClick:()=>we(S),className:U?.removeButton,style:W?.removeButton}),Ie&&(0,p.jsx)(he,{size:oe.Small,icon:Le,title:Re,onClick:ze,className:U?.pauseButton,style:W?.pauseButton}),Pe&&(0,p.jsx)(ye,{icon:f.faPlus,title:`Add ${S}s`,onClick:()=>Ce(S),className:U?.addButton,style:W?.addButton})]}),Be&&(0,p.jsx)(ye,{icon:f.faXmark,title:K.cancel,onClick:Te,className:(0,u.default)(rf.timerCancelButton,U?.cancelButton),style:W?.cancelButton})]})]})}var df={virtualList:`virtualList_qBPNc`,"virtualList-drag-clone":`virtualList-drag-clone_artnC`,virtualListDragClone:`virtualList-drag-clone_artnC`,"virtualList-header":`virtualList-header_0Ellb`,virtualListHeader:`virtualList-header_0Ellb`,"virtualList-header-cell":`virtualList-header-cell_c8NGV`,virtualListHeaderCell:`virtualList-header-cell_c8NGV`,"virtualList-header-resize":`virtualList-header-resize_cbYFc`,virtualListHeaderResize:`virtualList-header-resize_cbYFc`,"virtualList-header-sort":`virtualList-header-sort_Cdpe3`,virtualListHeaderSort:`virtualList-header-sort_Cdpe3`,"virtualList-header-sort-label":`virtualList-header-sort-label_6MaZ3`,virtualListHeaderSortLabel:`virtualList-header-sort-label_6MaZ3`,"virtualList-header-sort-icon":`virtualList-header-sort-icon_Z-Nrd`,virtualListHeaderSortIcon:`virtualList-header-sort-icon_Z-Nrd`,"virtualList-header-sort-icon-active":`virtualList-header-sort-icon-active_g7qrb`,virtualListHeaderSortIconActive:`virtualList-header-sort-icon-active_g7qrb`,"virtualList-header-toggle":`virtualList-header-toggle_pYFxD`,virtualListHeaderToggle:`virtualList-header-toggle_pYFxD`,"virtualList-toggle-panel":`virtualList-toggle-panel_Uksmk`,virtualListTogglePanel:`virtualList-toggle-panel_Uksmk`,"virtualList-toggle-wrapper":`virtualList-toggle-wrapper_JP32M`,virtualListToggleWrapper:`virtualList-toggle-wrapper_JP32M`,"virtualList-toggle-popover":`virtualList-toggle-popover_gbpd7`,virtualListTogglePopover:`virtualList-toggle-popover_gbpd7`,"virtualList-toggle-item":`virtualList-toggle-item_5gu5d`,virtualListToggleItem:`virtualList-toggle-item_5gu5d`,"virtualList-toggle-reset":`virtualList-toggle-reset_3UANJ`,virtualListToggleReset:`virtualList-toggle-reset_3UANJ`,"virtualList-column-chip":`virtualList-column-chip_nOqr6`,virtualListColumnChip:`virtualList-column-chip_nOqr6`,"virtualList-select-cell":`virtualList-select-cell_s9kAy`,virtualListSelectCell:`virtualList-select-cell_s9kAy`,"virtualList-body":`virtualList-body_k-fRr`,virtualListBody:`virtualList-body_k-fRr`,"virtualList-row-active":`virtualList-row-active_H5r5-`,virtualListRowActive:`virtualList-row-active_H5r5-`,"virtualList-resizing":`virtualList-resizing_28Mn4`,virtualListResizing:`virtualList-resizing_28Mn4`,"virtualList-row":`virtualList-row_TTY50`,virtualListRow:`virtualList-row_TTY50`,"virtualList-row-no-divider":`virtualList-row-no-divider_Ct0gV`,virtualListRowNoDivider:`virtualList-row-no-divider_Ct0gV`,"virtualList-row-no-hover":`virtualList-row-no-hover_2d3mH`,virtualListRowNoHover:`virtualList-row-no-hover_2d3mH`,"virtualList-row-selected":`virtualList-row-selected_hwEN-`,virtualListRowSelected:`virtualList-row-selected_hwEN-`,"virtualList-row-draggable":`virtualList-row-draggable_I86ha`,virtualListRowDraggable:`virtualList-row-draggable_I86ha`,"virtualList-row-dragging":`virtualList-row-dragging_6T5tQ`,virtualListRowDragging:`virtualList-row-dragging_6T5tQ`,"virtualList-row-drop-inside":`virtualList-row-drop-inside_Uhi9n`,virtualListRowDropInside:`virtualList-row-drop-inside_Uhi9n`,"virtualList-drop-line":`virtualList-drop-line_EM-g4`,virtualListDropLine:`virtualList-drop-line_EM-g4`,"virtualList-drop-line-before":`virtualList-drop-line-before_n-0iZ`,virtualListDropLineBefore:`virtualList-drop-line-before_n-0iZ`,"virtualList-drop-line-after":`virtualList-drop-line-after_2dld-`,virtualListDropLineAfter:`virtualList-drop-line-after_2dld-`,"virtualList-reordering":`virtualList-reordering_Rt9E3`,virtualListReordering:`virtualList-reordering_Rt9E3`,"virtualList-cell":`virtualList-cell_H0zBv`,virtualListCell:`virtualList-cell_H0zBv`,"virtualList-loading-full":`virtualList-loading-full_wzZNM`,virtualListLoadingFull:`virtualList-loading-full_wzZNM`,"virtualList-loading-indicator":`virtualList-loading-indicator_EJced`,virtualListLoadingIndicator:`virtualList-loading-indicator_EJced`,"virtualList-windowed":`virtualList-windowed_riUyT`,virtualListWindowed:`virtualList-windowed_riUyT`};function ff(e,t,n,r=0){let i=e.length,a=Array(i+1);a[0]=0;for(let o=0;o<i;o++){let s=o<i-1?r:0;a[o+1]=a[o]+(t.get(e[o])??n)+s}return{offsets:a,totalHeight:a[i]}}function pf(e,t,n){if(n<=0)return 0;let r=0,i=n-1;for(;r<i;){let n=r+i>>1;e[n+1]<=t?r=n+1:i=n}return r}function mf(e,t,n,r,i){if(i===0)return{startIndex:0,endIndex:-1};let a=pf(e,t,i),o=a;for(;o<i&&e[o]<t+n;)o++;return{startIndex:Math.max(0,a-r),endIndex:Math.min(i-1,o+r-1)}}function hf(e,t,n,r,i){if(e===-1||e===t)return null;let a=r+i/2;return(t>e?n>=a:n<=a)?t:null}function gf(e,t,n,r){if(n<=0)return`before`;let i=(e-t)/n;return r?i<1/3?`before`:i>2/3?`after`:`inside`:i<.5?`before`:`after`}function _f(e,t){let n=t[e],r=e+1;for(;r<t.length&&t[r]>n;)r++;return r-1}function vf(e,t){return e.length===0?`1fr`:e.map(e=>{switch(e.width.type){case`fixed`:return`${e.width.px}px`;case`flex`:return`${e.width.weight??1}fr`;case`fit`:{let n=t?.[e.key];return n==null?`fit-content(100%)`:`${n}px`}}}).join(` `)}var yf=`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`,bf=`data-vl-parked`,xf=`${yf}, [${bf}]`;function Sf(e){let t=e.scrollWidth>e.clientWidth,n=e.scrollWidth;if(!t&&!e.firstElementChild)return n;let r=getComputedStyle(e),i=parseFloat(r.paddingLeft)||0,a=parseFloat(r.paddingRight)||0;if(t&&(n+=a),e.firstElementChild&&!t&&e.scrollWidth<=i+a+1){let t=1/0,r=-1/0;if(e.querySelectorAll(`*`).forEach(e=>{let n=e.getBoundingClientRect();n.left<t&&(t=n.left),n.right>r&&(r=n.right)}),r>t){let e=Math.ceil(r-t)+i+a;e>n&&(n=e)}}return n}function Cf(e){return`[data-col-key="${e.replace(/["\\]/g,`\\$&`)}"]`}function wf(e){return`--vl-col-${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}`}function Tf(e){return e.width.type===`fixed`?e.width.px:e.width.type===`fit`?160:160*(e.width.weight??1)}function Ef(e){return e.length===0?`1fr`:e.map(e=>`var(${wf(e.key)}, 160px)`).join(` `)}var Df=`ahroweui:virtuallist:columns:`;function Of(e){if(!e||typeof window>`u`)return null;try{let t=window.localStorage.getItem(Df+e);if(!t)return null;let n=JSON.parse(t);if(n&&Array.isArray(n.visible)&&Array.isArray(n.known)){let e={};if(n.widths&&typeof n.widths==`object`)for(let[t,r]of Object.entries(n.widths))typeof r==`number`&&Number.isFinite(r)&&r>0&&(e[t]=r);return{visible:n.visible.filter(e=>typeof e==`string`),known:n.known.filter(e=>typeof e==`string`),widths:e}}}catch{}return null}function kf(e,t){return e.lockVisible?!0:t&&t.known.includes(e.key)?t.visible.includes(e.key):!e.defaultHidden}var Af;function jf(){return Af??=new Intl.Collator(void 0,{numeric:!0,sensitivity:`base`}),Af}function Mf(e){return e==null||typeof e==`number`&&Number.isNaN(e)}function Nf(e,t){let n=e instanceof Date?e.getTime():typeof e==`boolean`?Number(e):e,r=t instanceof Date?t.getTime():typeof t==`boolean`?Number(t):t;return typeof n==`string`||typeof r==`string`?jf().compare(String(n),String(r)):n<r?-1:+(n>r)}function Pf(e){return e.sortValue!=null||e.compare!=null||e.sortable===!0}function Ff(e,t){return!e||e.key!==t?{key:t,direction:`asc`}:e.direction===`asc`?{key:t,direction:`desc`}:null}function If(e,t,n){if(!t||!n)return e;let r=n.find(e=>e.key===t.key);if(!r||r.compare==null&&r.sortValue==null)return e;let i=t.direction===`asc`?1:-1,{compare:a,sortValue:o}=r,s=e.map((e,t)=>({item:e,index:t}));return s.sort((e,t)=>{let n;if(a)n=i*a(e.item,t.item);else{let r=o(e.item),a=o(t.item),s=Mf(r),c=Mf(a);n=s||c?s===c?0:s?1:-1:i*Nf(r,a)}return n===0?e.index-t.index:n}),s.map(e=>e.item)}function Lf({index:e,id:t,top:n,padding:r,columnTemplate:i,isSelected:a,isActive:o,manageTabStops:s,isEntered:c,activeClassName:d,activeStyle:f,showDivider:m,hover:h,onClick:g,observer:_,ariaRowIndex:v,ariaPosInSet:y,ariaSetSize:b,rowRole:x,reorderable:S,mouseDragEnabled:C,draggable:w,isDragging:T,reserveToggleGutter:E,onMouseDown:D,onMouseOver:O,onMouseLeave:k,onDragStart:A,onDragOver:j,onDragEnd:M,onDrop:N,onTouchStart:P,dropPosition:F,dropIndentPx:I,dropIndicatorClassName:L,dropIndicatorStyle:R,rowClassName:z,rowStyle:B,children:V}){let H=(0,l.useRef)(null);return(0,l.useLayoutEffect)(()=>{let e=H.current;if(e&&_)return _.observe(e),()=>_.unobserve(e)},[_]),(0,l.useLayoutEffect)(()=>{let e=H.current;if(!e||!s||c)return;let t=[];return e.querySelectorAll(yf).forEach(e=>{t.push([e,e.getAttribute(`tabindex`)]),e.setAttribute(`tabindex`,`-1`),e.setAttribute(bf,``)}),()=>{for(let[e,n]of t)n===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,n),e.removeAttribute(bf)}}),(0,p.jsxs)(`div`,{ref:H,id:t,"data-index":e,className:(0,u.default)(df.virtualListRow,a&&df.virtualListRowSelected,o&&df.virtualListRowActive,o&&d,!m&&df.virtualListRowNoDivider,!h&&df.virtualListRowNoHover,S&&df.virtualListRowDraggable,T&&df.virtualListRowDragging,F===`inside`&&df.virtualListRowDropInside,z),style:{position:`absolute`,top:0,left:0,right:0,transform:`translateY(${n}px)`,...r==null?{}:{padding:r},...i?{display:`grid`,gridTemplateColumns:i}:{},...E?{paddingRight:32}:{},...B,...o?f:void 0},onClick:g,draggable:w,onMouseDown:D,onMouseOver:O,onMouseLeave:k,onDragStart:A,onDragOver:j,onDragEnd:M,onDrop:N??(C?e=>e.preventDefault():void 0),onTouchStart:P,onContextMenu:C?e=>e.preventDefault():void 0,"aria-selected":a,"aria-rowindex":v,"aria-posinset":y,"aria-setsize":b,role:x,children:[(F===`before`||F===`after`)&&(0,p.jsx)(`div`,{"data-drop-line":F,"aria-hidden":!0,className:(0,u.default)(df.virtualListDropLine,F===`before`?df.virtualListDropLineBefore:df.virtualListDropLineAfter,L),style:{left:I??0,...R}}),V]})}function Rf(e){let[t,n]=(0,l.useState)(0),r=(0,l.useRef)([]),i=Math.min(t,Math.max(0,e-1));i!==t&&n(i);function a(t){let i=Math.max(0,Math.min(t,e-1));n(i),r.current[i]?.focus()}function o(e){return{tabIndex:e===i?0:-1,ref:t=>{r.current[e]=t},onFocus:()=>n(e)}}function s(t,n){if(t.altKey||t.ctrlKey||t.metaKey)return!1;switch(t.key){case`ArrowRight`:a(n+1);break;case`ArrowLeft`:a(n-1);break;case`Home`:a(0);break;case`End`:a(e-1);break;default:return!1}return t.preventDefault(),t.stopPropagation(),!0}return{getStationProps:o,handleNavigationKey:s}}var zf=10;function Bf({headerRef:e,columns:t,cols:n,resize:r,sort:i,onSort:a,multiSelect:o,allSelected:s,someSelected:c,onSelectAll:l,labels:m,classNames:h,styles:g}){let _=+!!o,v=_+n.visibleColumns.length+ +!!n.shouldShowToggle,y=Rf(v);return(0,p.jsxs)(`div`,{ref:e,className:(0,u.default)(df.virtualListHeader,h?.header),style:{gridTemplateColumns:n.columnTemplate,...n.shouldShowToggle?{paddingRight:32}:{},...g?.header},role:`row`,"aria-rowindex":1,children:[o&&(0,p.jsx)(`div`,{...y.getStationProps(0),className:(0,u.default)(df.virtualListSelectCell,h?.selectCell),style:g?.selectCell,role:`columnheader`,onKeyDown:e=>{y.handleNavigationKey(e,0)||e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l())},children:(0,p.jsx)(la,{selected:s||c,onToggle:l,"aria-label":m.selectAllRows,tabIndex:-1})}),n.visibleColumns.map((e,t)=>{let n=Pf(e),o=i&&i.key===e.key?i.direction:null,s=r.getHandleProps(e),c=_+t;return(0,p.jsxs)(`div`,{...y.getStationProps(c),onKeyDown:t=>{if(!y.handleNavigationKey(t,c)){if(t.altKey&&r.isResizable(e)){let n=t.shiftKey?1:zf;if(t.key===`ArrowRight`)r.resizeBy(e.key,n);else if(t.key===`ArrowLeft`)r.resizeBy(e.key,-n);else if(t.key===`Home`)r.resizeToMin(e.key);else if(t.key===`End`)r.autoFit(e.key);else return;t.preventDefault();return}n&&t.target===t.currentTarget&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),a(e.key))}},className:(0,u.default)(df.virtualListHeaderCell,h?.headerCell),style:g?.headerCell,role:`columnheader`,"data-col-key":e.key,"aria-sort":n?o===`asc`?`ascending`:o===`desc`?`descending`:`none`:void 0,"data-fit-key":e.width.type===`fit`?e.key:void 0,children:[n?(0,p.jsxs)(`button`,{type:`button`,className:(0,u.default)(df.virtualListHeaderSort,h?.headerSort),style:g?.headerSort,onClick:()=>a(e.key),tabIndex:-1,children:[(0,p.jsx)(`span`,{className:df.virtualListHeaderSortLabel,children:e.label}),(0,p.jsx)(d.FontAwesomeIcon,{className:(0,u.default)(df.virtualListHeaderSortIcon,o&&df.virtualListHeaderSortIconActive,h?.sortIcon),style:g?.sortIcon,icon:o===`asc`?f.faSortUp:o===`desc`?f.faSortDown:f.faSort})]}):e.label,s&&(0,p.jsx)(`div`,{...s,className:(0,u.default)(df.virtualListHeaderResize,h?.resizeHandle),style:g?.resizeHandle})]},e.key)}),n.shouldShowToggle&&(0,p.jsx)(Vf,{station:v-1,nav:y,columns:t,cols:n,resize:r,labels:m,classNames:h,styles:g})]})}function Vf({station:e,nav:t,columns:n,cols:r,resize:i,labels:a,classNames:o,styles:s}){return(0,p.jsxs)(`div`,{className:df.virtualListToggleWrapper,children:[(0,p.jsx)(On,{isOpen:r.toggleOpen,onOpenChange:r.setToggleOpen,placement:Rt.Bottom,align:zt.End,constrainWidth:!1,classNames:{panel:df.virtualListTogglePanel},content:(0,p.jsxs)(`div`,{className:(0,u.default)(df.virtualListTogglePopover,o?.togglePopover),style:s?.togglePopover,children:[n.filter(e=>!e.hideFromToggle).map(e=>(0,p.jsx)(la,{className:(0,u.default)(df.virtualListToggleItem,o?.toggleItem),style:s?.toggleItem,selected:r.effectiveVisible.has(e.key),onToggle:()=>r.handleToggleColumn(e.key),disabled:e.lockVisible,cursorDefault:!1,children:e.toggleLabel??e.label},e.key)),i.isFrozen&&(0,p.jsx)(`button`,{type:`button`,className:(0,u.default)(df.virtualListToggleReset,o?.toggleReset),style:s?.toggleReset,onClick:()=>{i.reset(),r.setToggleOpen(!1)},children:a.resetColumnWidths})]}),children:(0,p.jsx)(`button`,{...t.getStationProps(e),type:`button`,className:(0,u.default)(df.virtualListHeaderToggle,o?.headerToggle),style:s?.headerToggle,"aria-label":a.toggleColumns,onKeyDown:n=>t.handleNavigationKey(n,e),children:(0,p.jsx)(d.FontAwesomeIcon,{icon:f.faGear,style:s?.headerToggle})})}),r.manuallyHiddenCount>0&&(0,p.jsx)(`span`,{className:(0,u.default)(df.virtualListColumnChip,o?.columnChip),style:s?.columnChip,"data-column-hidden-count":r.manuallyHiddenCount,"aria-label":a.columnsHidden(r.manuallyHiddenCount),children:r.manuallyHiddenCount})]})}function Hf(e){return!(`nodeType`in e)}function Uf(e){return e==null||typeof window>`u`?null:e===`window`?window:typeof e==`function`?e()??window:e}function Wf(e){return Hf(e)?{top:0,height:e.innerHeight}:{top:e.getBoundingClientRect().top+e.clientTop,height:e.clientHeight}}function Gf(e,t){let n=e.clientWidth;if(!t){let t=e.clientHeight;return{rel:e.scrollTop,visibleHeight:t,viewportHeight:t,distanceToEnd:e.scrollHeight-e.scrollTop-t,width:n}}let r=e.getBoundingClientRect(),{top:i,height:a}=Wf(t),o=i+a;return{rel:i-r.top,visibleHeight:Math.max(0,Math.min(o,r.bottom)-Math.max(i,r.top)),viewportHeight:a,distanceToEnd:r.bottom-o,width:n}}function Kf(e,t){if(typeof e==`number`)return e;let n=e.trim();if(n===``)return 0;let r=Number(n);if(!Number.isNaN(r))return r;let i=/^(-?\d*\.?\d+)px$/.exec(n);if(i)return parseFloat(i[1]);if(typeof document>`u`||!t)return 0;let a=document.createElement(`div`);a.style.cssText=`position:absolute;visibility:hidden;height:${n};`,t.appendChild(a);let o=a.getBoundingClientRect().height;return t.removeChild(a),Number.isFinite(o)?o:0}var qf=100,Jf=20;function Yf({items:e,keys:t,getItemKey:n,estimatedRowHeight:r,rowGap:i,overscan:a,onLoadMore:o,loadMoreThreshold:s,isLoading:c,scrollParent:u}){let[d,f]=(0,l.useState)(0),[p,m]=(0,l.useState)(0),[h,g]=(0,l.useState)(0),[_,v]=(0,l.useState)(0),[y,b]=(0,l.useState)(()=>Kf(i,null)),[x,S]=(0,l.useState)(new Map),[C,w]=(0,l.useState)(!1),T=(0,l.useRef)(!1),E=(0,l.useRef)(null),D=(0,l.useRef)(null),O=(0,l.useRef)([]),k=(0,l.useRef)(null),A=(0,l.useRef)([]),j=u!=null,M=(0,l.useRef)(null),N=(0,l.useRef)(null),[P,F]=(0,l.useState)(null);(0,l.useLayoutEffect)(()=>{let e;if(u===`nearest`){let t=N.current;(!t||!Hf(t)&&!t.isConnected)&&(N.current=E.current?Ft(E.current)??window:null),e=N.current}else e=Uf(u);M.current=e,F(t=>t===e?t:e)});let[I]=(0,l.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(e=>{S(t=>{let n=null;for(let r of e){let e=r.target,i=Number(e.dataset.index);if(Number.isNaN(i))continue;let a=A.current[i];if(a===void 0)continue;let o=r.borderBoxSize?.[0],s=o?Math.round(o.blockSize):e.offsetHeight;t.get(a)!==s&&(n||=new Map(t),n.set(a,s))}return n??t})}));(0,l.useEffect)(()=>()=>I?.disconnect(),[I]);let L=(0,l.useCallback)(e=>{let t=Math.max(0,e.rel);f(e=>e===t?e:t),m(t=>t===e.visibleHeight?t:e.visibleHeight),g(t=>t===e.viewportHeight?t:e.viewportHeight),v(t=>t===e.width?t:e.width)},[]),R=(0,l.useCallback)(()=>{let e=E.current;e&&L(Gf(e,M.current))},[L]),z=(0,l.useCallback)(()=>{let e=E.current;if(!e)return{top:0,height:0};let t=Gf(e,M.current);return{top:Math.max(0,t.rel),height:t.visibleHeight}},[]),B=(0,l.useCallback)(()=>{let e=E.current;if(!e)return null;let t=e.getBoundingClientRect(),n=M.current;if(!n)return{top:t.top,bottom:t.bottom,left:t.left,right:t.right};let{top:r,height:i}=Wf(n);return{top:Math.max(t.top,r),bottom:Math.min(t.bottom,r+i),left:t.left,right:t.right}},[]),V=(0,l.useCallback)(e=>{let t=E.current;if(!t)return;let n=M.current;n?Hf(n)?n.scrollBy(0,e):n.scrollTop+=e:t.scrollTop+=e},[]);(0,l.useLayoutEffect)(()=>{let e=E.current;if(!e)return;R();let t=typeof ResizeObserver>`u`?null:new ResizeObserver(()=>R());return t?.observe(e),P?(t?.observe(Hf(P)?document.documentElement:P),window.addEventListener(`resize`,R),()=>{t?.disconnect(),window.removeEventListener(`resize`,R)}):()=>t?.disconnect()},[P,R]);let H=(0,l.useRef)(o);(0,l.useLayoutEffect)(()=>{H.current=o});let U=(0,l.useCallback)(()=>{let e=H.current;e&&!T.current&&(T.current=!0,w(!0),e().finally(()=>{T.current=!1,w(!1)}))},[]),W=(0,l.useRef)(-1),G=(0,l.useCallback)(()=>{let e=E.current;if(!e)return;let t=Gf(e,M.current);k.current??=requestAnimationFrame(()=>{k.current=null,R()}),t.distanceToEnd<=s&&W.current!==A.current.length&&(W.current=A.current.length,U())},[R,s,U]);(0,l.useEffect)(()=>{let e=P??E.current;if(e)return e.addEventListener(`scroll`,G,{passive:!0}),()=>e.removeEventListener(`scroll`,G)},[P,G]),(0,l.useEffect)(()=>()=>{k.current!=null&&cancelAnimationFrame(k.current)},[]),(0,l.useLayoutEffect)(()=>{A.current=t}),(0,l.useLayoutEffect)(()=>{let e=Kf(i,E.current);b(t=>t===e?t:e)},[i,_,p]);let ee=(0,l.useMemo)(()=>{if(x.size===0)return r;let e=0;for(let t of x.values())e+=t;return e/x.size},[x,r]),{offsets:K,totalHeight:te}=(0,l.useMemo)(()=>ff(t,x,ee,y),[t,x,ee,y]),ne=(0,l.useRef)(``),re=j?h:p;(0,l.useEffect)(()=>{if(!o||c||C||re===0)return;let t=D.current?.offsetHeight??0;if(te>=re-t)return;let n=`${e.length}:${re}`;ne.current!==n&&(ne.current=n,U())},[o,c,C,e.length,te,re,U]);let q=(0,l.useCallback)((e,t)=>{let n=E.current;if(!n)return;let r=M.current;if(!r){let r=Math.max(0,e);t&&typeof n.scrollTo==`function`?n.scrollTo({top:r,behavior:t}):n.scrollTop=r;return}let{rel:i}=Gf(n,r);if(Hf(r)){r.scrollTo({top:Math.max(0,r.scrollY+e-i),behavior:t??`auto`});return}let a=Math.max(0,r.scrollTop+e-i);t&&typeof r.scrollTo==`function`?r.scrollTo({top:a,behavior:t}):r.scrollTop=a},[]);(0,l.useLayoutEffect)(()=>{let t=E.current,n=O.current;if(O.current=K,!t||n.length===0||ae.current)return;let r=z().top;if(r<=0)return;let i=pf(n,r,n.length-1);if(i>=e.length)return;let a=r-n[i],o=K[i]+a;Math.abs(o-r)>.5&&(q(o),f(o))},[K,e.length,z,q]);let ie=(0,l.useCallback)((t,n)=>{let r=E.current;if(!r||e.length===0)return null;let i=Math.max(0,Math.min(t,e.length-1)),a=K[i]??0,o=(K[i+1]??a)-a,s=D.current?.offsetHeight??0,c=Math.max(0,Gf(r,M.current).viewportHeight-s),l=n?.align??`start`,u=a;return l===`center`?u-=(c-o)/2:l===`end`&&(u-=c-o),u},[e.length,K]),ae=(0,l.useRef)(null);(0,l.useLayoutEffect)(()=>{let t=ae.current,n=E.current;if(!t)return;let r=t.items===e&&n?ie(t.index,t.options):null;if(r==null){ae.current=null;return}let i=Math.abs(r-t.lastTarget)<=1;if(i&&Math.abs(z().top-r)<=1||t.attempts>=Jf){ae.current=null;return}i||(t.lastTarget=r,t.attempts+=1,q(r,t.options?.behavior))}),(0,l.useEffect)(()=>{let e=E.current;if(!e)return;let t=()=>{ae.current=null},n=P??e;return n.addEventListener(`wheel`,t,{passive:!0}),n.addEventListener(`touchstart`,t,{passive:!0}),e.addEventListener(`keydown`,t),()=>{n.removeEventListener(`wheel`,t),n.removeEventListener(`touchstart`,t),e.removeEventListener(`keydown`,t)}},[P]);let J=(0,l.useMemo)(()=>{function t(t,n){let r=ie(t,n);r!=null&&(ae.current={index:t,options:n,lastTarget:r,attempts:0,items:e},q(r,n?.behavior))}return{scrollToIndex:t,scrollToKey(r,i){let a=e.findIndex((e,t)=>(n?n(e,t):t)===r);a>=0&&t(a,i)},scrollToTop(e){ae.current=null,q(0,e?.behavior)},getScrollElement:()=>{let e=M.current;return e?Hf(e)?null:e:E.current},remeasure:R}},[e,n,ie,q,R]),{startIndex:oe,endIndex:se}=(0,l.useMemo)(()=>mf(K,d,p,a,e.length),[K,d,p,a,e.length]),ce=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{ce.current||p===0||e.length<qf||se-oe+1<e.length||(ce.current=!0,console.warn(`VirtualList: rendering all ${e.length} rows, so nothing is being virtualized. Its viewport is as tall as its content. Give the list a definite height, or pass scrollParent to have it ride a scrollport it does not own.`))},[p,e.length,oe,se]),{rootRef:E,headerRef:D,rowObserver:I,keysRef:A,offsets:K,totalHeight:te,containerHeight:p,viewportHeight:h,containerWidth:_,startIndex:oe,endIndex:se,showLoadMoreSpinner:C,isWindowed:j,getVisibleSlice:z,getVisibleRect:B,scrollBy:V,scrollApi:J}}function Xf({items:e,getKey:t,multiSelect:n,selectedKeys:r,onSelectionChange:i}){let a=r!==void 0,[o,s]=(0,l.useState)(new Set),c=a?r:o;function u(e){a||s(e),i?.(e)}function d(e){let t=new Set(c);t.has(e)?t.delete(e):t.add(e),u(t)}function f(){let n=e.map((e,n)=>t(e,n));u(n.every(e=>c.has(e))?new Set:new Set(n))}let{allSelected:p,someSelected:m}=(0,l.useMemo)(()=>{if(!n||e.length===0)return{allSelected:!1,someSelected:!1};let r=e.every((e,n)=>c.has(t(e,n)));return{allSelected:r,someSelected:!r&&e.some((e,n)=>c.has(t(e,n)))}},[n,e,c,t]);return{effectiveSelectedKeys:c,handleRowSelect:d,handleSelectAll:f,allSelected:p,someSelected:m}}function Zf({columns:e,items:t,multiSelect:n,visibleColumnKeys:r,onVisibleColumnsChange:i,persistColumnsKey:a,showColumnToggle:o,userWidths:s,isFrozen:c,rootRef:u,startIndex:d,endIndex:f,containerHeight:p,containerWidth:m,isLoading:h}){let g=r!==void 0,[_,v]=(0,l.useState)(!1),[y,b]=(0,l.useState)({}),[x,S]=(0,l.useState)(()=>{let t=Of(a);return new Set((e??[]).filter(e=>kf(e,t)).map(e=>e.key))}),C=(0,l.useRef)(new Set((e??[]).map(e=>e.key)));(0,l.useEffect)(()=>{if(g)return;let t=e??[],n=new Set(t.map(e=>e.key)),r=C.current,i=n.size===r.size;if(i){for(let e of n)if(!r.has(e)){i=!1;break}}if(i)return;C.current=n;let o=Of(a);S(e=>{let n=new Set;for(let i of t)r.has(i.key)?e.has(i.key)&&n.add(i.key):kf(i,o)&&n.add(i.key);return n})},[e,g,a]),(0,l.useEffect)(()=>{if(g||!a||typeof window>`u`)return;let t=e??[];if(t.length!==0&&x.size!==0)try{window.localStorage.setItem(Df+a,JSON.stringify({visible:[...x],known:t.map(e=>e.key),widths:s}))}catch{}},[x,e,g,a,s]);let w=g?new Set(r):x,T=(e??[]).filter(e=>e.lockVisible).map(e=>e.key),E=T.some(e=>!w.has(e))?new Set([...w,...T]):w,D=!!e?.length,O=D?e.filter(e=>E.has(e.key)):[],k=D?e.filter(e=>!e.defaultHidden&&!E.has(e.key)).length:0,A=D?`${n&&D?`40px `:``}${c?Ef(O):vf(O,y)}`:void 0,j=o!==!1&&D&&e.some(e=>!e.hideFromToggle),M={};if(c&&D){let e=O.map(e=>`var(${wf(e.key)}, 160px)`);n&&e.unshift(`40px`),j&&e.push(`32px`),M[`--vl-total`]=`calc(${e.join(` + `)})`}let N=O.filter(e=>e.width.type===`fit`),P=!c&&N.length>0,F=N.map(e=>e.key).join(`|`),[I,L]=(0,l.useState)({key:F,items:t});(I.key!==F||I.items!==t)&&(L({key:F,items:t}),Object.keys(y).length>0&&b({}));let R=(0,l.useCallback)(()=>{let e=u.current;if(!e)return;let t=new Map;e.querySelectorAll(`[data-fit-key]`).forEach(e=>{let n=e,r=n.getAttribute(`data-fit-key`);if(!r)return;let i=Sf(n);i>(t.get(r)??0)&&t.set(r,i)}),t.size!==0&&b(n=>{let r=!1,i={...n};for(let[a,o]of t){if(o<=0)continue;let t=Math.min(Math.ceil(o),e.clientWidth);t>(n[a]??0)&&(i[a]=t,r=!0)}return r?i:n})},[u]),[z]=(0,l.useState)(()=>typeof ResizeObserver>`u`?null:new ResizeObserver(()=>R())),B=(0,l.useRef)(new Set);(0,l.useEffect)(()=>()=>{z?.disconnect(),B.current.clear()},[z]),(0,l.useLayoutEffect)(()=>{if(!P)return;let e=u.current;if(!e||(R(),!z))return;let t=new Set(e.querySelectorAll(`[data-fit-key]`)),n=B.current;for(let e of n)t.has(e)||(z.unobserve(e),n.delete(e));for(let e of t)n.has(e)||(z.observe(e),n.add(e))},[u,P,F,y,d,f,p,m,t,h,R,z]),(0,l.useEffect)(()=>{if(!P)return;let e=0,t=requestAnimationFrame(()=>{R(),e=requestAnimationFrame(()=>R())});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},[P,F,t,h,R]);let V=(0,l.useCallback)(()=>b({}),[]);function H(t){if(e?.find(e=>e.key===t)?.lockVisible)return;let n=new Set(E);if(n.has(t)){if(n.size<=1)return;n.delete(t)}else n.add(t);let r=[...n];g||S(n),i?.(r)}return{hasColumns:D,visibleColumns:O,columnTemplate:A,widthVars:M,shouldShowToggle:j,effectiveVisible:E,manuallyHiddenCount:k,toggleOpen:_,setToggleOpen:v,handleToggleColumn:H,recalculateColumns:V}}function Qf({reorderable:e,treeReorder:t,onReorder:n,onTreeDrop:r,longPressDelay:i,dragHandle:a,treeIndentPx:o,keys:s,depths:c,isGroupAt:u,rootRef:d,keysRef:f,getVisibleRect:p,scrollBy:m}){let h=(0,l.useRef)(null),[g,_]=(0,l.useState)(null),[v,y]=(0,l.useState)(null),b=(0,l.useRef)(null),x=(0,l.useRef)(n),S=(0,l.useRef)(r),C=(0,l.useRef)(t),w=(0,l.useRef)(c),T=(0,l.useRef)(u),E=(0,l.useRef)(!0),D=(0,l.useRef)(null),[O,k]=(0,l.useState)(null),A=(0,l.useRef)(null),j=(0,l.useRef)(!1),M=(0,l.useRef)(null),N=(0,l.useRef)(0),P=(0,l.useRef)(0),F=(0,l.useRef)(null),I=(0,l.useRef)(!1),L=(0,l.useRef)(null),R=(0,l.useRef)(0),z=(0,l.useRef)(0),B=(0,l.useRef)(0),[V]=(0,l.useState)(()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(pointer: coarse)`).matches);(0,l.useLayoutEffect)(()=>{x.current=n,S.current=r,C.current=t,w.current=c,b.current=v,T.current=u});function H(e){V||D.current!==e&&(D.current=e,k(e))}function U(e,t){t.buttons===0&&H(t.target.closest(`[data-drag-handle]`)?e:null)}function W(e){e.buttons===0&&H(null)}function G(e,t){if(t.button!==0)return;let n=!!t.target.closest(`[data-drag-handle]`);E.current=n,n&&H(e)}function ee(e,n){if(a&&!E.current){n.preventDefault();return}h.current=e,_(e),t&&y(null)}function K(e,t,n){let r=h.current;if(r==null)return null;let i=s.indexOf(r);if(i!==-1&&e>=i&&e<=_f(i,c))return null;let a=gf(t,n.top,n.height,u(e));return{key:s[e],position:a}}function te(e,t){t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=K(e,t.clientY,n);y(e=>e?.key===r?.key&&e?.position===r?.position?e:r)}function ne(){let e=h.current,t=b.current;e!=null&&t&&t.key!==e&&r?.(e,t)}function re(e){e.preventDefault(),ne(),y(null),h.current=null,_(null),H(null)}function q(){y(null),h.current=null,_(null),H(null)}function ie(e,t){t.preventDefault();let r=h.current;if(r==null)return;let i=s.indexOf(r),a=t.currentTarget.getBoundingClientRect(),o=hf(i,e,t.clientY,a.top,a.height);o!=null&&n?.(i,o)}function ae(){h.current=null,_(null),H(null)}let J=(0,l.useCallback)(e=>{let t=h.current,n=d.current;if(t==null||!n)return;let r=L.current?P.current-R.current+B.current/2:P.current,i=document.elementFromPoint(e,r),a=i&&n.contains(i)?i.closest(`[data-index]`):null;if(!a)return;let o=Number(a.dataset.index);if(Number.isNaN(o))return;let s=f.current.indexOf(t),c=a.getBoundingClientRect();if(C.current){let e=f.current,t=w.current;if(s!==-1&&o>=s&&o<=_f(s,t)){y(null);return}let n=gf(r,c.top,c.height,T.current(o)),i={key:e[o],position:n};y(e=>e?.key===i.key&&e?.position===i.position?e:i);return}let l=hf(s,o,r,c.top,c.height);l!=null&&x.current?.(s,l)},[d,f]),oe=(0,l.useCallback)(()=>{let e=L.current;e&&(e.style.transform=`translate(${z.current}px, ${P.current-R.current}px)`)},[]),se=(0,l.useCallback)(()=>{let e=j.current?p():null;if(!e){F.current=null;return}let t=N.current,n=P.current,r=0;t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom&&(n<e.top+48?r=-Math.min(18,Math.ceil((e.top+48-n)/3)):n>e.bottom-48&&(r=Math.min(18,Math.ceil((n-(e.bottom-48))/3)))),r!==0&&(m(r),J(t)),F.current=requestAnimationFrame(se)},[J,p,m]),ce=(0,l.useCallback)(()=>{if(A.current!=null&&(clearTimeout(A.current),A.current=null),window.removeEventListener(`touchmove`,le),window.removeEventListener(`touchend`,ce),window.removeEventListener(`touchcancel`,ce),F.current!=null&&(cancelAnimationFrame(F.current),F.current=null),L.current&&=(L.current.remove(),null),document.body.style.touchAction=``,document.body.style.overscrollBehavior=``,j.current&&(I.current=!0,setTimeout(()=>{I.current=!1},350),C.current)){let e=h.current,t=b.current;e!=null&&t&&t.key!==e&&S.current?.(e,t)}y(null),j.current=!1,M.current=null,h.current=null,_(null)},[]),le=(0,l.useCallback)(e=>{let t=e.touches[0];if(t){if(N.current=t.clientX,P.current=t.clientY,!j.current){let e=M.current;e!=null&&Math.abs(t.clientY-e)>10&&A.current!=null&&(clearTimeout(A.current),A.current=null);return}e.cancelable&&e.preventDefault(),oe(),J(t.clientX)}},[J,oe]);function Y(n,r){if(!e&&!t||a&&!r.target.closest(`[data-drag-handle]`)||A.current!=null||j.current)return;let o=r.touches[0];o&&(M.current=o.clientY,N.current=o.clientX,P.current=o.clientY,window.addEventListener(`touchmove`,le,{passive:!1}),window.addEventListener(`touchend`,ce),window.addEventListener(`touchcancel`,ce),A.current=window.setTimeout(()=>{A.current=null,j.current=!0,h.current=n,_(n),navigator.vibrate?.(10),document.body.style.touchAction=`none`,document.body.style.overscrollBehavior=`none`,ue(n),F.current??=requestAnimationFrame(se)},i))}function ue(e){let t=d.current;if(!t)return;let n=f.current.indexOf(e),r=t.querySelector(`[data-index="${n}"]`);if(!r)return;let i=r.getBoundingClientRect();R.current=P.current-i.top,z.current=i.left,B.current=i.height;let a=r.cloneNode(!0);a.removeAttribute(`data-index`),a.setAttribute(`data-drag-clone`,`true`),a.setAttribute(`aria-hidden`,`true`),a.classList.add(df.virtualListDragClone),Object.assign(a.style,{position:`fixed`,left:`0`,top:`0`,width:`${i.width}px`,height:`${i.height}px`,margin:`0`,opacity:`1`,pointerEvents:`none`,zIndex:`3`,background:`var(--background)`,boxShadow:`var(--card-shadow)`,borderRadius:`var(--default-border-radius)`}),t.appendChild(a),L.current=a,oe()}(0,l.useEffect)(()=>ce,[ce]);let de=e||t,X=de&&!V;function fe(n,r){let i=t&&v?.key===r?v.position:void 0;return{reorderable:de&&!a,mouseDragEnabled:X,draggable:X&&(!a||r===O)||void 0,isDragging:de&&r===g,onMouseDown:de&&a?e=>G(r,e):void 0,onMouseOver:de&&a?e=>U(r,e):void 0,onMouseLeave:de&&a?W:void 0,onDragStart:de?e=>ee(r,e):void 0,onDragOver:t?e=>te(n,e):e?e=>ie(n,e):void 0,onDragEnd:t?q:e?ae:void 0,onDrop:t?re:void 0,onTouchStart:de?e=>Y(r,e):void 0,dropPosition:i,dropIndentPx:i?(c[n]??0)*o:void 0}}function pe(){return I.current?(I.current=!1,!0):!1}return{draggingKey:g,dragEnabled:de,getRowDragProps:fe,consumeSuppressedClick:pe}}function $f({items:e,columns:t,sort:n,defaultSort:r=null,onSortChange:i}){let a=n!==void 0,[o,s]=(0,l.useState)(r),c=a?n:o,u=(0,l.useMemo)(()=>If(e,c,t),[e,c,t]);function d(e){let t=Ff(c,e);a||s(t),i?.(t)}return{rows:u,effectiveSort:c,isSorted:u!==e,handleHeaderSort:d}}function ep(e){return Math.max(1,e?.minWidth??48)}function tp({columns:e,visibleColumnsRef:t,resizableColumns:n,columnWidths:r,onColumnWidthsChange:i,persistColumnsKey:a,rootRef:o}){let s=r!==void 0,[c,u]=(0,l.useState)(()=>Of(a)?.widths??{}),[d,f]=(0,l.useState)(!1),p=s?r:c,m=(0,l.useRef)(p);m.current=p;let h=(0,l.useCallback)(e=>{s||u(e),i?.(e)},[s,i]),g=(0,l.useCallback)(()=>{let e=o.current,n={...m.current};for(let r of t.current){if(n[r.key]!=null)continue;let t=e?.querySelector(`[aria-rowindex="1"] ${Cf(r.key)}`),i=t?Math.round(t.getBoundingClientRect().width):0;n[r.key]=i>0?i:Tf(r)}return n},[o,t]);(0,l.useLayoutEffect)(()=>{let e=o.current;if(e)for(let[t,n]of Object.entries(p))e.style.setProperty(wf(t),`${n}px`)},[p,o]);let _=(0,l.useCallback)((e,t)=>{o.current?.style.setProperty(wf(e),`${t}px`)},[o]),v=(0,l.useCallback)(()=>{s&&requestAnimationFrame(()=>{for(let[e,t]of Object.entries(m.current))_(e,t)})},[_,s]),y=(0,l.useCallback)((t,n)=>{let r=g(),i=ep(e?.find(e=>e.key===t)),a={...r,[t]:Math.max(i,Math.round(n(r[t])))};_(t,a[t]),h(a),v()},[_,e,h,g,v]),b=(0,l.useCallback)((t,n)=>{if(t.button!==0)return;t.preventDefault(),t.stopPropagation();let r=t.currentTarget,i=g(),a=i[n],o=t.clientX,s=ep(e?.find(e=>e.key===n)),c=a,l=0,u=()=>{l=0,_(n,c)};function d(e){if(l&&cancelAnimationFrame(l),r.releasePointerCapture?.(t.pointerId),r.removeEventListener(`pointermove`,p),r.removeEventListener(`pointerup`,y),r.removeEventListener(`pointercancel`,b),r.removeEventListener(`lostpointercapture`,b),window.removeEventListener(`keydown`,x,!0),document.body.style.cursor=``,document.body.style.userSelect=``,f(!1),e==null){_(n,a);return}e!==a&&h({...i,[n]:e}),v()}function p(e){c=Math.max(s,Math.round(a+e.clientX-o)),l||=requestAnimationFrame(u)}function y(){d(c)}function b(){d(null)}function x(e){e.key===`Escape`&&(e.preventDefault(),d(null))}r.setPointerCapture?.(t.pointerId),r.addEventListener(`pointermove`,p),r.addEventListener(`pointerup`,y),r.addEventListener(`pointercancel`,b),r.addEventListener(`lostpointercapture`,b),window.addEventListener(`keydown`,x,!0),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,f(!0),Object.keys(m.current).length===0&&h(i)},[_,e,h,g,v]),x=(0,l.useCallback)(e=>{let t=o.current;if(!t)return 0;let n=wf(e),r=t.style.getPropertyValue(n),i=t.style.getPropertyValue(`--vl-total`);t.style.setProperty(n,`max-content`),t.style.removeProperty(`--vl-total`);let a=0;return t.querySelectorAll(Cf(e)).forEach(e=>{let t=Math.ceil(e.getBoundingClientRect().width);t>a&&(a=t)}),t.style.setProperty(n,r),i&&t.style.setProperty(`--vl-total`,i),Math.min(a,t.clientWidth)},[o]),S=(0,l.useCallback)(e=>{let t=()=>{let t=x(e);t>0&&y(e,()=>t)};Object.keys(m.current).length>0?t():(h(g()),requestAnimationFrame(t))},[h,g,x,y]),C=(0,l.useCallback)(()=>{let e=o.current;if(e)for(let t of Object.keys(m.current))e.style.removeProperty(wf(t));h({})},[h,o]),w=(0,l.useCallback)(e=>n&&e.resizable!==!1,[n]),T=(0,l.useCallback)((e,t)=>y(e,e=>e+t),[y]),E=(0,l.useCallback)(t=>y(t,()=>ep(e?.find(e=>e.key===t))),[e,y]),D=(0,l.useCallback)(e=>w(e)?{"aria-hidden":!0,onPointerDown:t=>b(t,e.key),onDoubleClick:t=>{t.stopPropagation(),S(e.key)},onClick:e=>e.stopPropagation()}:null,[S,b,w]);return{widths:p,isFrozen:Object.keys(p).length>0,isResizing:d,reset:C,isResizable:w,resizeBy:T,resizeToMin:E,autoFit:S,getHandleProps:D}}function np({enabled:e,tabAcrossRows:t,rowCount:n,offsets:r,rootRef:i,headerRef:a,getVisibleSlice:o,viewportHeight:s,scrollToIndex:c,initialIndex:u,multiSelect:d,onActivate:f,onToggleSelect:p}){let[m,h]=(0,l.useState)(u),[g,_]=(0,l.useState)(-1),v=(0,l.useRef)(r);v.current=r;let y=e&&n>0?Math.min(Math.max(m,0),n-1):-1;y>=0&&y!==m&&h(y);let b=y>=0;function x(e){let t=a.current?.offsetHeight??0,n=v.current[e]??0,r=v.current[e+1]??n,{top:i,height:s}=o();n<i+t?c(e,{align:`start`}):r>i+s&&c(e,{align:`end`})}function S(e){let t=Math.max(0,Math.min(e,n-1));h(t),x(t)}function C(e){let t=Math.max(0,s-(a.current?.offsetHeight??0)),r=pf(v.current,(v.current[e]??0)+t,n);return Math.max(1,r-e)}function w(e){return i.current?.querySelector(`[data-index="${e}"]`)??null}function T(e){let t=w(e)?.querySelector(xf);return t?(_(e),t.focus(),!0):!1}let E=(0,l.useRef)(null),D=(0,l.useRef)(!1);(0,l.useLayoutEffect)(()=>{let e=E.current;if(!e)return;E.current=null;let t=w(e.index)?.querySelectorAll(xf);if(t?.length){(e.edge===`first`?t[0]:t[t.length-1]).focus();return}let r=e.index+(e.edge===`first`?1:-1);if(r>=0&&r<n){E.current={index:r,edge:e.edge},_(r),x(r);return}_(-1),D.current=b&&e.edge===`first`,b&&i.current?.focus()});function O(e){let t=e?.closest?.(`[data-index]`),n=Number(t?.dataset.index);return Number.isFinite(n)?n:-1}function k(e){if(e.target===e.currentTarget)return;let t=O(e.target);t<0||(_(t),h(t))}function A(e){e.currentTarget.contains(e.relatedTarget)||(D.current=!1),O(e.relatedTarget)!==g&&_(-1)}function j(e){if(e.key!==`Escape`||e.defaultPrevented||!b)return;let t=O(e.target);t>=0&&h(t),_(-1),i.current?.focus(),e.preventDefault()}function M(e){if(!t||e.key!==`Tab`||e.defaultPrevented||e.altKey||e.ctrlKey||e.metaKey)return;let r=O(e.target);if(r<0)return;let i=w(r)?.querySelectorAll(yf);if(!i?.length)return;let a=Array.prototype.indexOf.call(i,e.target);if(a<0)return;let o=e.shiftKey;if(o?a>0:a<i.length-1)return;let s=o?r-1:r+1;s<0||s>=n||(e.preventDefault(),_(s),x(s),E.current={index:s,edge:o?`last`:`first`})}function N(e){if(e.target!==e.currentTarget){M(e),j(e);return}if(!b||e.defaultPrevented)return;let r=D.current;switch(D.current=!1,e.key){case`ArrowDown`:S(y+1);break;case`ArrowUp`:S(y-1);break;case`Home`:S(0);break;case`End`:S(n-1);break;case`PageDown`:S(y+C(y));break;case`PageUp`:S(y-C(Math.max(0,y-1)));break;case`Enter`:if(f)f(y);else if(!T(y))return;break;case`F2`:if(!T(y))return;break;case`Tab`:if(!t||e.shiftKey||r||!T(y))return;break;case` `:if(!d)return;p(y);break;default:return}e.preventDefault()}if(!b&&!t)return{activeIndex:y,enteredIndex:-1,setActiveIndex:h,containerProps:{}};let P={onKeyDown:N,onFocus:k,onBlur:A};return b&&(P.tabIndex=0),{activeIndex:y,enteredIndex:g,setActiveIndex:h,containerProps:P}}var rp={selectRow:`Select row`,selectAllRows:`Select all rows`,toggleColumns:`Toggle column visibility`,columnsHidden:e=>`${e} columns hidden`,resetColumnWidths:`Reset column widths`};function ip(e,t){return!e||!t?e??t:n=>{e(n),t(n)}}function ap(e){let{ref:t,items:n,renderRow:r,ariaRoles:i,columns:a,height:o=`100%`,estimatedRowHeight:s=40,overscan:c=3,rowGap:d=0,rowPadding:f,selectedKey:m,getItemKey:h,onRowClick:g,keyboardNavigation:_=!0,tabAcrossRows:v=!1,scrollParent:y,visibleColumnKeys:b,onVisibleColumnsChange:x,persistColumnsKey:S,resizableColumns:C=!1,columnWidths:w,onColumnWidthsChange:T,labels:E,sort:O,defaultSort:k,onSortChange:A,showColumnToggle:j,onLoadMore:M,loadMoreThreshold:N=100,isLoading:P=!1,multiSelect:F=!1,selectedKeys:I,onSelectionChange:L,reorderable:R=!1,onReorder:z,longPressDelay:B=400,treeReorder:V=!1,getItemDepth:H,isGroup:U,onTreeDrop:W,treeIndentPx:G=24,dragHandle:ee=!1,showDivider:K=!0,rowHover:te=!0,className:ne,style:re,classNames:q,styles:ie,...J}=e,oe=e.scrollParent!=null&&e.height!==void 0,se=(0,l.useRef)(!1);(0,l.useEffect)(()=>{oe&&!se.current&&(se.current=!0,console.warn("VirtualList: `height` is ignored alongside `scrollParent`, which leaves the list no viewport to size."))},[oe]);let ce=D(`VirtualList`,E,rp),{rows:le,effectiveSort:Y,isSorted:ue,handleHeaderSort:de}=$f({items:n,columns:a,sort:O,defaultSort:k,onSortChange:A}),X=(0,l.useCallback)((e,t)=>h?h(e,t):t,[h]),fe=(0,l.useMemo)(()=>le.map((e,t)=>X(e,t)),[le,X]),pe=(0,l.useMemo)(()=>H?le.map((e,t)=>H(e,t)):[],[le,H]),me=(0,l.useCallback)(e=>U?U(le[e],e):!1,[U,le]),he=Yf({items:le,keys:fe,getItemKey:h,estimatedRowHeight:s,rowGap:d,overscan:c,onLoadMore:M,loadMoreThreshold:N,isLoading:P,scrollParent:y}),{rootRef:ge,headerRef:_e,rowObserver:ve,keysRef:ye,offsets:be,totalHeight:xe,startIndex:Z,endIndex:Se}=he,Ce=(0,l.useRef)([]),we=tp({columns:a,visibleColumnsRef:Ce,resizableColumns:C,columnWidths:w,onColumnWidthsChange:T,persistColumnsKey:S,rootRef:ge}),Te=Xf({items:le,getKey:X,multiSelect:F,selectedKeys:I,onSelectionChange:L}),{effectiveSelectedKeys:Ee}=Te,De=Zf({columns:a,items:le,multiSelect:F,visibleColumnKeys:b,onVisibleColumnsChange:x,persistColumnsKey:S,showColumnToggle:j,userWidths:we.widths,isFrozen:we.isFrozen,rootRef:ge,startIndex:Z,endIndex:Se,containerHeight:he.containerHeight,containerWidth:he.containerWidth,isLoading:P}),{hasColumns:Oe,visibleColumns:ke,columnTemplate:Ae,widthVars:je,shouldShowToggle:Me,recalculateColumns:Ne}=De;Ce.current=ke,(0,l.useImperativeHandle)(t,()=>({...he.scrollApi,recalculateColumns:Ne,resetColumnWidths:we.reset}),[he.scrollApi,Ne,we.reset]);let Pe=ue&&(R||V),Fe=(0,l.useRef)(!1);(0,l.useEffect)(()=>{Pe&&!Fe.current&&(Fe.current=!0,console.warn(`VirtualList: row reordering is disabled while the list is sorted. Clear the sort to drag rows.`))},[Pe]);let Ie=Qf({reorderable:R&&!ue,treeReorder:V&&!ue,onReorder:z,onTreeDrop:W,longPressDelay:B,dragHandle:ee,treeIndentPx:G,keys:fe,depths:pe,isGroupAt:me,rootRef:ge,keysRef:ye,getVisibleRect:he.getVisibleRect,scrollBy:he.scrollBy}),Le=(0,l.useId)(),Re=e=>`${Le}-row-${e}`,ze=np({enabled:_,tabAcrossRows:v,rowCount:le.length,offsets:be,rootRef:ge,headerRef:_e,getVisibleSlice:he.getVisibleSlice,viewportHeight:he.viewportHeight,scrollToIndex:he.scrollApi.scrollToIndex,initialIndex:m==null?0:Math.max(0,fe.indexOf(m)),multiSelect:F,onActivate:g&&(e=>g(le[e],e)),onToggleSelect:e=>Te.handleRowSelect(fe[e])}),Be=typeof f==`number`?`${f}px`:f,Ve=e=>{let t=le[e],n=X(t,e),a=m!=null&&n===m||Ee.has(n),o=Ie.getRowDragProps(e,n);return(0,p.jsx)(Lf,{id:Re(e),index:e,top:be[e],padding:Be,columnTemplate:Ae,isSelected:a,isActive:e===ze.activeIndex,manageTabStops:_,isEntered:e===ze.enteredIndex,activeClassName:q?.activeRow,activeStyle:ie?.activeRow,showDivider:K,hover:te,onClick:()=>{Ie.consumeSuppressedClick()||(ze.setActiveIndex(e),g?.(t,e))},observer:ve,ariaRowIndex:Oe?e+2:void 0,ariaPosInSet:Oe?void 0:e+1,ariaSetSize:Oe?void 0:le.length,rowRole:i?.row??(Oe?`row`:`listitem`),reserveToggleGutter:Me,...o,dropIndicatorClassName:q?.dropIndicator,dropIndicatorStyle:ie?.dropIndicator,rowClassName:q?.row,rowStyle:ie?.row,children:Oe?(0,p.jsxs)(p.Fragment,{children:[F&&(0,p.jsx)(`div`,{className:(0,u.default)(df.virtualListSelectCell,q?.selectCell),style:ie?.selectCell,role:`gridcell`,onClick:e=>e.stopPropagation(),children:(0,p.jsx)(la,{selected:Ee.has(n),onToggle:()=>Te.handleRowSelect(n),"aria-label":ce.selectRow,tabIndex:-1})}),ke.map(n=>(0,p.jsx)(`div`,{className:(0,u.default)(df.virtualListCell,q?.cell),style:ie?.cell,role:`gridcell`,"data-col-key":n.key,"data-fit-key":n.width.type===`fit`?n.key:void 0,children:n.renderCell(t,e)},n.key))]}):r?.(t,e)},n)},He=[];for(let e=Z;e<=Se;e++)He.push(Ve(e));let Ue=Ie.draggingKey==null?-1:fe.indexOf(Ie.draggingKey);Ue>=0&&(Ue<Z||Ue>Se)&&He.push(Ve(Ue)),ze.enteredIndex>=0&&(ze.enteredIndex<Z||ze.enteredIndex>Se)&&He.push(Ve(ze.enteredIndex));let We={...ze.containerProps,onKeyDown:ip(J.onKeyDown,ze.containerProps.onKeyDown),onFocus:ip(J.onFocus,ze.containerProps.onFocus),onBlur:ip(J.onBlur,ze.containerProps.onBlur)};return(0,p.jsxs)(`div`,{...J,...We,ref:ge,className:(0,u.default)(df.virtualList,he.isWindowed&&df.virtualListWindowed,Ie.draggingKey!=null&&df.virtualListReordering,we.isResizing&&df.virtualListResizing,ne,q?.root),style:{...he.isWindowed?null:{height:o},...je,...re,...ie?.root},role:i?.container??(Oe?`grid`:`list`),"aria-rowcount":Oe?le.length+1:void 0,"aria-busy":P||he.showLoadMoreSpinner||J[`aria-busy`]||void 0,"aria-activedescendant":ze.activeIndex>=0&&(i?.container??(Oe?`grid`:`list`))!==`list`?Re(ze.activeIndex):void 0,children:[Oe&&(0,p.jsx)(Bf,{headerRef:_e,columns:a,cols:De,resize:we,sort:Y,onSort:de,multiSelect:F,allSelected:Te.allSelected,someSelected:Te.someSelected,onSelectAll:Te.handleSelectAll,labels:ce,classNames:q,styles:ie}),P?(0,p.jsx)(`div`,{className:df.virtualListLoadingFull,"aria-hidden":`true`,children:(0,p.jsx)(ae,{size:32})}):(0,p.jsx)(`div`,{className:(0,u.default)(df.virtualListBody,q?.body),style:{height:xe,...ie?.body},children:He}),he.showLoadMoreSpinner&&(0,p.jsx)(`div`,{className:(0,u.default)(df.virtualListLoadingIndicator,q?.loadingIndicator),style:ie?.loadingIndicator,"aria-hidden":`true`,children:(0,p.jsx)(ae,{size:32})})]})}function op(e,t,n=0,r=null){return e.flatMap((i,a)=>{let o=i.children!==void 0,s=o&&t.includes(i.key),c={node:i,level:n,parentKey:r,isBranch:o,isExpanded:s,setSize:e.length,posInSet:a+1};return!s||!i.children?.length?[c]:[c,...op(i.children,t,n+1,i.key)]})}var sp={tree:`tree_bHT4K`,"tree-disabled":`tree-disabled_bIFfs`,treeDisabled:`tree-disabled_bIFfs`,"tree-node":`tree-node_XUWMs`,treeNode:`tree-node_XUWMs`,"tree-node-selected":`tree-node-selected_j05ku`,treeNodeSelected:`tree-node-selected_j05ku`,"tree-node-disabled":`tree-node-disabled_FMox6`,treeNodeDisabled:`tree-node-disabled_FMox6`,"tree-toggle":`tree-toggle_hmqtx`,treeToggle:`tree-toggle_hmqtx`,"tree-toggle-open":`tree-toggle-open_gTfYS`,treeToggleOpen:`tree-toggle-open_gTfYS`,"tree-toggle-hidden":`tree-toggle-hidden_nYrlV`,treeToggleHidden:`tree-toggle-hidden_nYrlV`,"tree-icon":`tree-icon_0dxsy`,treeIcon:`tree-icon_0dxsy`,"tree-label":`tree-label_BOShA`,treeLabel:`tree-label_BOShA`,"tree-empty":`tree-empty_Eb3vv`,treeEmpty:`tree-empty_Eb3vv`},cp=[],lp={empty:`Nothing here`};function up(e){let{nodes:t,expandedKeys:n,defaultExpandedKeys:r=cp,onExpandedChange:i=()=>{},selectedKey:a,defaultSelectedKey:o,onSelect:s=()=>{},expandOnSelect:c=!0,indent:d=20,toggleIcon:m=f.faChevronRight,height:h,estimatedRowHeight:g=32,labels:_,disabled:v=!1,"aria-label":y=`Tree`,className:b,style:x,classNames:S,styles:C,...w}=E(`Tree`,e),T=D(`Tree`,_,lp),O=(0,l.useRef)(new Map),k=(0,l.useRef)(null),A=(0,l.useRef)(null),j=h!==void 0,M=n!==void 0,[N,P]=(0,l.useState)(r),F=M?n:N,I=a!==void 0,[L,R]=(0,l.useState)(o??null),z=I?a:L,B=op(t,F),V=Math.max(0,B.findIndex(e=>e.node.key===z)),H=B[V]?.node.key;function U(e){M||P(e),i(e)}function W(e){U(F.includes(e)?F.filter(t=>t!==e):[...F,e])}function G(e){v||e.node.disabled||(I||R(e.node.key),s(e.node.key,e.node),c&&e.isBranch&&W(e.node.key))}function ee(e){let t=B[e]?.node.key;if(t===void 0)return;let n=O.current.get(t);if(n){n.focus();return}A.current=t,k.current?.scrollToIndex(e,{align:`center`})}(0,l.useEffect)(()=>{let e=A.current;if(e===null)return;let t=O.current.get(e);t&&(t.focus(),A.current=null)});function K(e,t,n){if(!v)switch(e.key){case`ArrowDown`:e.preventDefault(),ee(Math.min(n+1,B.length-1));break;case`ArrowUp`:e.preventDefault(),ee(Math.max(n-1,0));break;case`ArrowRight`:if(e.preventDefault(),!t.isBranch)break;t.isExpanded?ee(n+1):W(t.node.key);break;case`ArrowLeft`:{if(e.preventDefault(),t.isBranch&&t.isExpanded){W(t.node.key);break}let n=B.findIndex(e=>e.node.key===t.parentKey);n>=0&&ee(n);break}case`Home`:e.preventDefault(),ee(0);break;case`End`:e.preventDefault(),ee(B.length-1);break;case`Enter`:case` `:e.preventDefault(),G(t)}}function te(e,t){let{node:n,level:r,isBranch:i,isExpanded:a}=e,o=n.key===z,s=v||n.disabled;return(0,p.jsxs)(`div`,{ref:e=>{e?O.current.set(n.key,e):O.current.delete(n.key)},role:`treeitem`,"aria-level":r+1,"aria-setsize":e.setSize,"aria-posinset":e.posInSet,"aria-expanded":i?a:void 0,"aria-selected":o,"aria-disabled":s||void 0,tabIndex:n.key===H&&!s?0:-1,className:(0,u.default)(sp.treeNode,o&&sp.treeNodeSelected,s&&sp.treeNodeDisabled,S?.node),style:{paddingLeft:r*d,...C?.node},onClick:()=>G(e),onKeyDown:n=>K(n,e,t),children:[(0,p.jsx)(`span`,{className:(0,u.default)(sp.treeToggle,a&&sp.treeToggleOpen,!i&&sp.treeToggleHidden,S?.toggle),style:C?.toggle,"aria-hidden":`true`,onClick:e=>{e.stopPropagation(),!s&&i&&W(n.key)},children:i&&X(m)}),n.icon&&X(n.icon,{className:(0,u.default)(sp.treeIcon,S?.icon),style:C?.icon}),(0,p.jsx)(`span`,{className:(0,u.default)(sp.treeLabel,S?.label),style:C?.label,children:n.label})]},n.key)}return(0,p.jsx)(`div`,{...w,role:`tree`,"aria-label":y,"aria-disabled":v||void 0,tabIndex:j&&!v?0:void 0,onFocus:e=>{e.target===e.currentTarget&&ee(V)},className:(0,u.default)(sp.tree,v&&sp.treeDisabled,S?.root,b),style:{...x,...C?.root},children:B.length===0?(0,p.jsx)(`div`,{className:(0,u.default)(sp.treeEmpty,S?.empty),style:C?.empty,children:T.empty}):j?(0,p.jsx)(ap,{ref:k,items:B,height:h,estimatedRowHeight:g,getItemKey:e=>e.node.key,getItemDepth:e=>e.level,ariaRoles:{container:`none`,row:`none`},keyboardNavigation:!1,renderRow:te}):B.map(te)})}var dp=function(e){return e.Sunny=`sunny`,e.ClearNight=`clearNight`,e.Cloudy=`cloudy`,e.PartlyCloudy=`partlyCloudy`,e.PartlyCloudyNight=`partlyCloudyNight`,e.RainyLight=`rainyLight`,e.Rainy=`rainy`,e.RainyHeavy=`rainyHeavy`,e.Snowy=`snowy`,e.Hail=`hail`,e.Foggy=`foggy`,e.Thunderstorm=`thunderstorm`,e}({}),fp={weatherIcon:`weatherIcon_FrcJF`,"weatherIcon-behind":`weatherIcon-behind_e2VOz`,weatherIconBehind:`weatherIcon-behind_e2VOz`,"weatherIcon-cloudBehind":`weatherIcon-cloudBehind_MZlmZ`,weatherIconCloudBehind:`weatherIcon-cloudBehind_MZlmZ`,"weatherIcon-cloud":`weatherIcon-cloud_KW-i7`,weatherIconCloud:`weatherIcon-cloud_KW-i7`,weatherIconCloudDrift:`weatherIconCloudDrift_0thIg`,"weatherIcon-cloudDelayed":`weatherIcon-cloudDelayed_bI1iH`,weatherIconCloudDelayed:`weatherIcon-cloudDelayed_bI1iH`,"weatherIcon-sunRays":`weatherIcon-sunRays_PBW93`,weatherIconSunRays:`weatherIcon-sunRays_PBW93`,weatherIconRotate:`weatherIconRotate_Hp9YK`,"weatherIcon-sunRay":`weatherIcon-sunRay_ODCJR`,weatherIconSunRay:`weatherIcon-sunRay_ODCJR`,weatherIconRayPulse:`weatherIconRayPulse_57eG4`,"weatherIcon-sunCore":`weatherIcon-sunCore_Ucxlh`,weatherIconSunCore:`weatherIcon-sunCore_Ucxlh`,"weatherIcon-moonCore":`weatherIcon-moonCore_USwOg`,weatherIconMoonCore:`weatherIcon-moonCore_USwOg`,weatherIconGlow:`weatherIconGlow_W2Qxf`,"weatherIcon-star":`weatherIcon-star_3CMD1`,weatherIconStar:`weatherIcon-star_3CMD1`,weatherIconTwinkle:`weatherIconTwinkle_8DkMV`,"weatherIcon-rain":`weatherIcon-rain_A9qFe`,weatherIconRain:`weatherIcon-rain_A9qFe`,"weatherIcon-drop":`weatherIcon-drop_SdkW9`,weatherIconDrop:`weatherIcon-drop_SdkW9`,weatherIconFall:`weatherIconFall_NlqDE`,"weatherIcon-splash":`weatherIcon-splash_DF4Wc`,weatherIconSplash:`weatherIcon-splash_DF4Wc`,weatherIconRing:`weatherIconRing_kr1SP`,"weatherIcon-snow":`weatherIcon-snow_95z-c`,weatherIconSnow:`weatherIcon-snow_95z-c`,"weatherIcon-flake":`weatherIcon-flake_LGzkw`,weatherIconFlake:`weatherIcon-flake_LGzkw`,weatherIconSnowFall:`weatherIconSnowFall_I2EGa`,"weatherIcon-stone":`weatherIcon-stone_U0daF`,weatherIconStone:`weatherIcon-stone_U0daF`,weatherIconHailFall:`weatherIconHailFall_U-AE4`,"weatherIcon-impact":`weatherIcon-impact_kCHtC`,weatherIconImpact:`weatherIcon-impact_kCHtC`,"weatherIcon-fog":`weatherIcon-fog_GC8wj`,weatherIconFog:`weatherIcon-fog_GC8wj`,weatherIconSway:`weatherIconSway_-CD1q`,"weatherIcon-bolt":`weatherIcon-bolt_S9sie`,weatherIconBolt:`weatherIcon-bolt_S9sie`,weatherIconFlash:`weatherIconFlash_GIecz`,"weatherIcon-still":`weatherIcon-still_lr-Nl`,weatherIconStill:`weatherIcon-still_lr-Nl`},pp=`M 26.3 62.9 C 15.4 65.0 15.0 48.5 27.8 49.8 C 23.9 43.9 34.2 34.0 43.0 39.6 C 46.0 26.2 73.9 32.0 68.9 46.3 C 85.0 44.3 84.6 64.2 72.4 62.5 Z`;function mp(e,t,n,r){return{animationDuration:`${t}s`,animationDelay:`${e?n:-r*t}s`}}function hp({className:e,delayed:t=!1}){return(0,p.jsx)(`path`,{className:(0,u.default)(fp.weatherIconCloud,t&&fp.weatherIconCloudDelayed,e),d:pp})}var gp=12;function _p({className:e}){return(0,p.jsxs)(`g`,{className:e,children:[(0,p.jsx)(`g`,{className:fp.weatherIconSunRays,children:Array.from({length:gp},(e,t)=>(0,p.jsx)(`g`,{transform:`rotate(${t/gp*360} 50 50)`,children:(0,p.jsx)(`line`,{className:fp.weatherIconSunRay,x1:50,y1:23,x2:50,y2:t%2==0?16:11})},t))}),(0,p.jsx)(`circle`,{className:fp.weatherIconSunCore,cx:50,cy:50,r:18})]})}var vp=[{x:74,y:32,size:2.2,duration:2.4,delay:0},{x:28,y:30,size:2.6,duration:3.1,delay:.4},{x:80,y:60,size:1.8,duration:2.7,delay:.9},{x:22,y:66,size:2.4,duration:3.6,delay:.2},{x:58,y:82,size:2,duration:2.9,delay:1.3},{x:34,y:80,size:2.5,duration:3.3,delay:.6}];function yp({className:e}){return(0,p.jsxs)(`g`,{className:e,children:[vp.map(e=>(0,p.jsx)(`g`,{transform:`translate(${e.x}, ${e.y})`,children:(0,p.jsx)(`g`,{className:fp.weatherIconStar,style:{animationDuration:`${e.duration}s`,animationDelay:`${e.delay}s`},children:(0,p.jsx)(`path`,{d:`M 0 ${-e.size} L 0 ${e.size} M ${-e.size} 0 L ${e.size} 0`})})},`${e.x}-${e.y}`)),(0,p.jsx)(`circle`,{className:fp.weatherIconMoonCore,cx:50,cy:50,r:18})]})}var bp=function(e){return e.Light=`light`,e.Medium=`medium`,e.Heavy=`heavy`,e}({}),xp={light:{lanes:4,duration:1.5},medium:{lanes:6,duration:.95},heavy:{lanes:10,duration:.55}},Sp=[.85,1.1,.95,1.2,.9,1.05,1.15,.8,1,1.08],Cp=[.05,.62,.31,.85,.18,.5,.74,.1,.43,.95],wp=2,Tp=.65;function Ep(e,t=Cp,n=.8){return .1+n*t[e%t.length]}function Dp({animated:e,intensity:t=`medium`}){let{lanes:n,duration:r}=xp[t];return(0,p.jsx)(`g`,{className:fp.weatherIconRain,children:Array.from({length:n},(t,i)=>{let a=26+50*i/(n-1),o=r*Sp[i],s=o*Cp[i];return Array.from({length:wp},(t,n)=>{let r=mp(e,o,s+n*o/wp,Ep(i*wp+n,Cp,Tp));return(0,p.jsxs)(`g`,{children:[(0,p.jsx)(`line`,{className:fp.weatherIconDrop,style:r,x1:a,y1:68,x2:a-2.4,y2:92}),(0,p.jsx)(`ellipse`,{className:fp.weatherIconSplash,style:r,cx:a-2.4,cy:92,rx:`1.4`,ry:`0.7`})]},`${i}-${n}`)})})})}var Op=[.65,1.5,.85,1.25,1.65,.75,1.1],kp=[.15,.7,.35,.9,.05,.55,.8],Ap=7;function jp({animated:e}){return(0,p.jsx)(`g`,{className:fp.weatherIconSnow,children:Array.from({length:Ap},(t,n)=>{let r=24+54*n/6,i=7*Op[n],a=i*kp[n];return Array.from({length:wp},(t,o)=>(0,p.jsx)(`g`,{transform:`translate(${r}, 68)`,children:(0,p.jsx)(`g`,{className:fp.weatherIconFlake,style:mp(e,i,a+o*i*.7,Ep(n*wp+o,kp)),children:(0,p.jsx)(`path`,{d:`M 0 -2 L 0 2 M -1.7 -1 L 1.7 1 M -1.7 1 L 1.7 -1`})})},`${n}-${o}`))})})}var Mp=[{x:34,y:66,dx:-1,dy:18,duration:.6,delay:.05},{x:47,y:68,dx:-2,dy:17,duration:.7,delay:.3},{x:58,y:65,dx:1,dy:18,duration:.55,delay:.15},{x:40,y:70,dx:-1,dy:16,duration:.75,delay:.45},{x:65,y:67,dx:-2,dy:17,duration:.65,delay:0},{x:52,y:71,dx:1,dy:16,duration:.7,delay:.35}];function Np({animated:e}){let t=Mp.length*wp;return(0,p.jsx)(`g`,{className:fp.weatherIconHail,children:Mp.flatMap((n,r)=>Array.from({length:wp},(i,a)=>{let o=r*wp+a,s=mp(e,n.duration,n.delay+a*n.duration/wp,.1+.8*(o+.5)/t);return(0,p.jsxs)(`g`,{children:[(0,p.jsx)(`g`,{transform:`translate(${n.x}, ${n.y})`,children:(0,p.jsx)(`g`,{className:fp.weatherIconStone,style:{...s,"--weather-icon-dx":n.dx,"--weather-icon-dy":n.dy},children:(0,p.jsx)(`circle`,{r:`2`})})}),(0,p.jsx)(`ellipse`,{className:fp.weatherIconImpact,style:s,cx:n.x+n.dx,cy:n.y+n.dy,rx:`1.8`,ry:`0.9`})]},o)}))})}function Pp(){return(0,p.jsxs)(`g`,{className:fp.weatherIconFog,children:[(0,p.jsx)(`line`,{x1:`32`,y1:`40`,x2:`68`,y2:`40`}),(0,p.jsx)(`line`,{x1:`20`,y1:`52`,x2:`80`,y2:`52`}),(0,p.jsx)(`line`,{x1:`26`,y1:`64`,x2:`74`,y2:`64`}),(0,p.jsx)(`line`,{x1:`34`,y1:`76`,x2:`66`,y2:`76`})]})}function Fp(){return(0,p.jsx)(`path`,{className:fp.weatherIconBolt,d:`M 54 52 L 44 72 H 52 L 46 90 L 62 66 H 54 L 60 52 Z`})}var Ip={[dp.Sunny]:`Sunny`,[dp.ClearNight]:`Clear night`,[dp.Cloudy]:`Cloudy`,[dp.PartlyCloudy]:`Partly cloudy`,[dp.PartlyCloudyNight]:`Partly cloudy night`,[dp.RainyLight]:`Light rain`,[dp.Rainy]:`Rain`,[dp.RainyHeavy]:`Heavy rain`,[dp.Snowy]:`Snow`,[dp.Hail]:`Hail`,[dp.Foggy]:`Fog`,[dp.Thunderstorm]:`Thunderstorm`};function Lp(e){let{type:t,size:n=64,animated:r=!0,labels:i,className:a,style:o,...s}=E(`WeatherIcon`,e),c=D(`WeatherIcon`,i,Ip),d=r&&!Ne(`(prefers-reduced-motion: reduce)`),f=`weather-icon-clip-${(0,l.useId)().replace(/[^\w-]/g,``)}`,m=e=>(0,p.jsx)(`g`,{clipPath:`url(#${f})`,children:e});function h(){switch(t){case dp.ClearNight:return(0,p.jsx)(yp,{});case dp.Cloudy:return(0,p.jsxs)(p.Fragment,{children:[m((0,p.jsx)(`g`,{className:fp.weatherIconCloudBehind,children:(0,p.jsx)(hp,{delayed:!0})})),(0,p.jsx)(hp,{})]});case dp.PartlyCloudy:return(0,p.jsxs)(p.Fragment,{children:[m((0,p.jsx)(_p,{className:fp.weatherIconBehind})),(0,p.jsx)(hp,{})]});case dp.PartlyCloudyNight:return(0,p.jsxs)(p.Fragment,{children:[m((0,p.jsx)(yp,{className:fp.weatherIconBehind})),(0,p.jsx)(hp,{})]});case dp.RainyLight:case dp.Rainy:case dp.RainyHeavy:return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(hp,{}),(0,p.jsx)(Dp,{animated:d,intensity:t===dp.RainyLight?bp.Light:t===dp.RainyHeavy?bp.Heavy:bp.Medium})]});case dp.Snowy:return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(hp,{}),(0,p.jsx)(jp,{animated:d})]});case dp.Hail:return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(hp,{}),(0,p.jsx)(Np,{animated:d})]});case dp.Foggy:return(0,p.jsx)(Pp,{});case dp.Thunderstorm:return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(hp,{}),m((0,p.jsx)(Fp,{}))]});default:return(0,p.jsx)(_p,{})}}return(0,p.jsxs)(`svg`,{...s,role:`img`,"aria-label":c[t]??c[dp.Sunny],className:(0,u.default)(fp.weatherIcon,!d&&fp.weatherIconStill,a),style:{width:n,height:n,...o},viewBox:`0 0 100 100`,children:[(0,p.jsx)(`defs`,{children:(0,p.jsx)(`clipPath`,{id:f,clipRule:`evenodd`,children:(0,p.jsx)(`path`,{d:`M -20 -20 H 120 V 120 H -20 Z ${pp}`})})}),h()]})}var Rp={wizard:`wizard_uRBAN`,"wizard-content":`wizard-content_lcl4C`,wizardContent:`wizard-content_lcl4C`,"wizard-content-outOfFrame":`wizard-content-outOfFrame_Eks4Y`,wizardContentOutOfFrame:`wizard-content-outOfFrame_Eks4Y`,"wizard-content-container":`wizard-content-container_yxbCJ`,wizardContentContainer:`wizard-content-container_yxbCJ`};function zp({currentStep:e=0,stepCount:t=0,renderStep:n=()=>null,className:r,style:i,classNames:a,styles:o,...s}){let[c,d]=(0,l.useState)(void 0),[f,m]=(0,l.useState)(!1),[h,g]=(0,l.useState)(e),_=(0,l.useRef)([]),v=(0,l.useRef)(null);e!==h&&(g(e),m(!0)),(0,l.useEffect)(()=>{if(!f)return;let e=setTimeout(()=>m(!1),400);return()=>clearTimeout(e)},[f]),(0,l.useEffect)(()=>{v.current?.disconnect();let t=_.current[e];if(t)return d(t.clientHeight),v.current=new ResizeObserver(()=>{d(t.clientHeight)}),v.current.observe(t),()=>v.current?.disconnect()},[e,t]);let y={...c===void 0?{}:{height:`${c}px`},...o?.root,...i};return(0,p.jsx)(`div`,{...s,className:(0,u.default)(Rp.wizard,a?.root,r),style:y,children:(0,p.jsx)(`div`,{className:(0,u.default)(Rp.wizardContentContainer,a?.container),style:{width:`${t*100}%`,marginLeft:`-${e*100}%`,...o?.container},children:Array.from({length:t},(r,i)=>(0,p.jsx)(`div`,{ref:e=>{_.current[i]=e},className:(0,u.default)(Rp.wizardContent,a?.step),style:{width:`${100/t}%`,marginLeft:`${100/t*i}%`,...o?.step},children:(0,p.jsx)(`div`,{className:(0,u.default)({[Rp.wizardContentOutOfFrame]:e!==i&&!f},a?.stepContent),style:o?.stepContent,inert:e!==i||void 0,children:n(i)})},`wizardStep${i}`))})})}var Bp=e=>{Ue(e[0].message,{color:j.Error})},Vp=class extends y.FormValidatorGroup{constructor(e,t=null,n){super(e,t,{...n,onSubmitError:n?.onSubmitError??Bp}),this.Form=(0,y.createFormComponent)(this)}},Hp=class extends l.PureComponent{static{this.defaultProps={formValidator:null,onMouseEnter:null,onMouseLeave:null,onFocus:null,onBlur:null,onChange:null,errorMessage:``,isValid:!1,isRequired:!1,label:``}}constructor(e){super(e);let{formValidator:t}=e;t&&(t.label=e.label??``,t.validate(),t.registerOnUpdateListener(()=>{this.forceUpdate()})),this.state={isFocused:!1,isHovered:!1},this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.hasError=this.hasError.bind(this),this.renderTooltip=this.renderTooltip.bind(this),this.onChange=this.onChange.bind(this)}componentDidMount(){setTimeout(()=>this.setState({isFocused:!1,isHovered:!1}),1)}componentDidUpdate(e){let{formValidator:t}=this.props;e.formValidator&&t&&e.formValidator!==t&&t.registerOnUpdateListener(()=>{this.forceUpdate()})}onMouseEnter(e){let{onMouseEnter:t}=this.props;this.setState({isHovered:!0}),t&&t(e)}onMouseLeave(e){let{onMouseLeave:t}=this.props;this.setState({isHovered:!1}),t&&t(e)}onFocus(e){let{onFocus:t}=this.props;this.setState({isFocused:!0}),t&&t(e)}onBlur(e){let{formValidator:t,onBlur:n}=this.props;t&&(t.touched=!0),this.setState({isFocused:!1}),n&&n(e)}hasError(){let{errorMessage:e,isValid:t,formValidator:n}=this.props;return n?n.touched&&n.hasError():!t||!!e}isRequired(){let{isRequired:e,formValidator:t}=this.props;return!!(e||t&&t.validators.find(e=>e.validatorId===`required`))}renderTooltip(){let{errorMessage:e,formValidator:t}=this.props,{isHovered:n,isFocused:r}=this.state;return(0,p.jsx)(ya,{variant:`error`,message:t?t.getCurrentErrorMessage():e||``,isVisible:this.hasError()&&(r||n)})}onChange(e){let{onChange:t,formValidator:n}=this.props;if(n){let t=e;e&&e.target&&(t=e.target.value),n.set(t)}t&&t(e)}};function Up(e,{initialValues:t,onSubmit:n,onValidate:r,errorParser:i,onSubmitError:a}={}){return(0,y.useFormValidatorGroupInstance)(()=>new Vp(e,null,{initialValues:t,errorParser:i,onSubmitError:a}),n,r)}exports.Accordion=U,exports.AccordionStyleType=b,exports.ActionButtons=_e,exports.ActionIcon=ye,exports.AhroweProvider=Je,exports.Alert=Qe,exports.AnimatedLogo=nt,exports.AnimatedText=mt,exports.AnimatedTextUnit=it,exports.AnimatedTextVariant=rt,exports.Avatar=wt,exports.AvatarGroup=Tt,exports.Badge=bt,exports.BadgePosition=gt,exports.BadgeStyleType=ht,exports.BodyEnd=Ae,exports.Breadcrumb=Mn,exports.Button=he,exports.ButtonGroup=In,exports.ButtonGroupOrientation=Pn,exports.ButtonSize=oe,exports.ButtonStyleType=J,exports.ButtonType=se,exports.Calendar=Wi,exports.CalendarView=Jn,exports.Card=Ji,exports.CardActions=Qi,exports.CardContent=Zi,exports.CardHeader=Yi,exports.CardMedia=Xi,exports.CardStyleType=Gi,exports.Carousel=aa,exports.Checkbox=la,exports.Chip=ma,exports.ChipContainer=ha,exports.ChipStyleType=ua,exports.ColorPicker=Qa,exports.CommandPalette=Ao,exports.ConfigProvider=T,exports.ConfirmModal=Mo,exports.CopyButton=Io,exports.DEFAULT_SNAP_OPTIONS=c.a,exports.DEFAULT_WALL_ATTRS=c.R,exports.DatePicker=Cs,exports.Divider=Os,exports.DividerOrientation=Ts,exports.DividerTextPosition=ws,exports.DoorSwing=c.at,exports.Drawer=As,exports.DropZone=Rs,exports.DropZoneReturnType=Ms,exports.DropZoneStatus=js,exports.Dropdown=cs,exports.EmptyState=Yr,exports.ErrorBoundary=Hs,exports.Fab=qs,exports.Flip=Xs,Object.defineProperty(exports,"FormValidator",{enumerable:!0,get:function(){return y.FormValidator}}),exports.FormValidatorGroup=Vp,exports.HIT_PX=c.l,exports.HIT_PX_COARSE=c.u,exports.IconPicker=ec,exports.IdleManager=nc,exports.Input=Aa,exports.InputDropdown=cc,exports.InputIconPosition=Ea,exports.InputType=Ta,exports.InteractableDiv=Ot,exports.KanbanBoard=Lc,exports.KanbanColumn=gc,exports.KlipyPicker=Yc,exports.Loader=ae,exports.LoaderType=ee,exports.LoadingOverlay=el,exports.MIN_FLOOR_HEIGHT=c.C,exports.MIN_OPENING_WIDTH=c.nt,exports.MIN_WALL_LENGTH=c.rt,exports.Menu=ol,exports.Modal=ro,exports.MultiSelect=dl,exports.NumberInput=Cl,exports.OpeningKind=c.ot,exports.OptionPicker=di,exports.OtpInput=Al,exports.OtpInputCharset=wl,exports.Overscroll=Pl,exports.PLAN_FORMAT_VERSION=c.n,exports.Pagination=Vl,exports.PlanIssueKind=c.st,exports.PlanUnitSystem=c.ct,exports.Popover=On,exports.PopoverAlign=zt,exports.PopoverPlacement=Rt,exports.PopoverTrigger=Bt,exports.Presentation=k,exports.ProgressBar=Ul,exports.RadioGroup=Kl,exports.RadioGroupOrientation=Wl,exports.Rating=Xl,exports.RevealLens=tu,exports.Ripple=ue,exports.RoomDrawer=wu,exports.RoomViewer=ju,exports.ScrollFade=Pu,exports.ScrollFadeAxis=Mu,exports.ScrollbarProvider=Z,exports.SearchInput=Hc,exports.SectionHeader=Ru,exports.SectionHeaderSize=Fu,exports.Skeleton=Wu,exports.SkeletonAnimation=Bu,exports.SkeletonVariant=zu,exports.Slider=qu,exports.SnapKind=c.o,exports.SplitButton=Xu,exports.Stepper=ld,exports.StepperCollapse=ed,exports.StepperLabelPlacement=td,exports.StepperOrientation=Qu,exports.StepperStyleType=$u,exports.Sticky=md,exports.Switch=gd,exports.TabHeader=vd,exports.Textarea=yd,exports.ThemeColor=j,exports.ThemeProvider=De,exports.Tilt=jd,exports.TiltGroup=Cd,exports.TiltGroupContext=xd,exports.TimeInput=$d,exports.Timeline=nf,exports.TimelineAlignment=tf,exports.Timer=uf,exports.Tooltip=ya,exports.Tree=up,exports.ValidatableComponent=Hp,Object.defineProperty(exports,"Validators",{enumerable:!0,get:function(){return y.Validators}}),exports.VirtualList=ap,exports.WallType=c.lt,exports.WeatherIcon=Lp,exports.WeatherType=dp,exports.Wizard=zp,exports.addFloor=c.w,exports.addOpening=c.z,exports.addRect=c.B,exports.addWall=c.V,exports.buildPlanMesh=c.t,exports.buildWallPaths=c.m,exports.cleanupPlan=c.H,exports.clientToWorld=c.s,exports.commitDerivation=c._,exports.dateToDay=Un,exports.dateToTime=Kn,exports.dayTimeToDate=qn,exports.dayToDate=Wn,exports.defaultTheme=Se,exports.defaultTiltEasing=wd,exports.deriveFaces=c.x,exports.derivePlan=c.v,exports.detachWall=c.U,exports.dissolveNode=c.W,exports.duplicateFloor=c.T,exports.emptyFloor=c.E,exports.emptyFloorPlan=c.D,exports.flattenTree=op,exports.floorBelow=c.O,exports.floorBounds=c.k,exports.floorIndex=c.A,exports.formatHotkey=ho,exports.getFloor=c.j,exports.getLocale=Wo,Object.defineProperty(exports,"hasEightPasswordChars",{enumerable:!0,get:function(){return y.hasEightPasswordChars}}),Object.defineProperty(exports,"hasOnePasswordDigit",{enumerable:!0,get:function(){return y.hasOnePasswordDigit}}),Object.defineProperty(exports,"hasOnePasswordLetter",{enumerable:!0,get:function(){return y.hasOnePasswordLetter}}),exports.hitTest=c.d,Object.defineProperty(exports,"isBic",{enumerable:!0,get:function(){return y.isBic}}),Object.defineProperty(exports,"isDate",{enumerable:!0,get:function(){return y.isDate}}),Object.defineProperty(exports,"isDay",{enumerable:!0,get:function(){return y.isDay}}),Object.defineProperty(exports,"isEmail",{enumerable:!0,get:function(){return y.isEmail}}),Object.defineProperty(exports,"isISODate",{enumerable:!0,get:function(){return y.isISODate}}),exports.isMenuAction=Co,exports.isMenuHeading=So,exports.isMenuSeparator=xo,Object.defineProperty(exports,"isNumber",{enumerable:!0,get:function(){return y.isNumber}}),Object.defineProperty(exports,"isPassword",{enumerable:!0,get:function(){return y.isPassword}}),Object.defineProperty(exports,"isURL",{enumerable:!0,get:function(){return y.isURL}}),exports.lightTheme=Oe,exports.mapLocale=Vo,exports.menuHotkeys=sl,exports.mergeNodes=c.G,exports.moveFloor=c.M,exports.moveNode=c.K,exports.nodeDegrees=c.S,exports.openingGeometry=c.h,exports.planFromJson=c.r,exports.planToJson=c.i,exports.pruneUnmatchedRooms=c.y,exports.removeFloor=c.N,exports.removeOpening=c.q,exports.removeWall=c.J,exports.renameFloor=c.P,exports.resolveSnap=c.c,exports.roomAtPoint=c.b,exports.scalePlan=c.Y,exports.selectionsEqual=c.f,exports.setFloor=c.F,exports.setFloorHeight=c.I,exports.setLocale=Uo,exports.showToast=Ue,exports.splitWall=c.X,exports.tabbablesIn=rn,exports.transformPlan=c.Z,exports.updateFloor=c.L,exports.updateOpening=c.Q,exports.useClipboard=No,exports.useCoarsePointer=Pe,exports.useComponentDefaults=E,Object.defineProperty(exports,"useFormValidator",{enumerable:!0,get:function(){return y.useFormValidator}}),exports.useFormValidatorGroup=Up,exports.useHotkeys=_o,exports.useLabels=D,exports.useMediaQuery=Ne,exports.useOverlay=dn,exports.usePresentationDefault=O,exports.useScrollEdges=to,exports.useSwipeDismiss=Le,exports.useTheme=bd,exports.useTiltGroup=Sd,exports.useVisualViewportSize=sn,exports.validatePlan=c.$,exports.wallCentrelineSpans=c.g,exports.wallLength=c.et,exports.weldShortWalls=c.tt,exports.worldTolerances=c.p;
12
12
  //# sourceMappingURL=index.cjs.map