@riddix/hamh 2.1.0-alpha.438 → 2.1.0-alpha.439

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/README.md CHANGED
@@ -37,7 +37,7 @@ of port forwarding etc.
37
37
 
38
38
  | Channel | Branch | Current Version | Description |
39
39
  |---------|--------|-----------------|-------------|
40
- | **Stable** | `main` | v2.0.29 | Production-ready, recommended for most users |
40
+ | **Stable** | `main` | v2.0.30 | Production-ready, recommended for most users |
41
41
  | **Alpha** | `alpha` | v2.1.0-alpha.x | Pre-release with new features, for early adopters |
42
42
  | **Testing** | `testing` | v4.1.0-testing.x | ⚠️ **Highly unstable!** Experimental features, may break |
43
43
 
@@ -52,36 +52,30 @@ of port forwarding etc.
52
52
  ## 🎉 What's New
53
53
 
54
54
  <details>
55
- <summary><strong>📦 Stable Features (v2.0.29)</strong> - Click to expand</summary>
55
+ <summary><strong>📦 Stable Features (v2.0.30)</strong> - Click to expand</summary>
56
56
 
57
- **New in v2.0.29:**
57
+ **New in v2.0.30:**
58
58
 
59
59
  | Feature | Description |
60
60
  |---------|-------------|
61
- | **💡 Light currentLevel Fix** | Retain light currentLevel when off to prevent Apple Home 100% brightness on turn-on ([#225](https://github.com/RiDDiX/home-assistant-matter-hub/issues/225)) |
62
- | **🖥️ Bridge Config Save Fix** | Decouple save button from RJSF schema validation errors save works even with optional field warnings ([#232](https://github.com/RiDDiX/home-assistant-matter-hub/issues/232)) |
63
- | **🌀 Fan Device Feature Fix** | Correct FanDeviceFeature TURN_ON/TURN_OFF enum values to match Home Assistant |
64
- | **🌡️ Humidity Auto-Mapping Fix** | Correct autoHumidityMapping schema default to match runtime behavior |
61
+ | **� Mapped Entity Propagation Fix** | Propagate mapped entity changes (battery, humidity, etc.) to Matter endpoints fixes stale sensor readings |
62
+ | **🖥️ API Error Surfacing** | Surface API errors instead of silently swallowing them ([#232](https://github.com/RiDDiX/home-assistant-matter-hub/issues/232)) |
65
63
 
66
- **Previously in v2.0.28:**
64
+ **Previously in v2.0.29:**
67
65
 
68
66
  | Feature | Description |
69
67
  |---------|-------------|
70
- | **🖼️ Device Image Support** | Device cards show images from Zigbee2MQTT or custom uploads ([#221](https://github.com/RiDDiX/home-assistant-matter-hub/issues/221)) |
71
- | **🌀 Custom Fan Speed Mapping** | Define custom fan speed levels with named presets ([#226](https://github.com/RiDDiX/home-assistant-matter-hub/pull/226)) |
72
- | **📺 TV Source Selection** | MediaInput cluster added to VideoPlayerDevice for input switching ([#231](https://github.com/RiDDiX/home-assistant-matter-hub/issues/231)) |
73
- | **🔀 Reverse Proxy Base Path** | `--http-base-path` option for subfolder reverse proxy support ([#228](https://github.com/RiDDiX/home-assistant-matter-hub/issues/228)) |
74
- | **🌀 On/Off-Only Fans** | Fans without speed control correctly use OnOffPlugInUnit ([#229](https://github.com/RiDDiX/home-assistant-matter-hub/issues/229)) |
75
- | **💡 Light Brightness Fix** | Prevent brightness reset on turn-on by setting onLevel to null ([#225](https://github.com/RiDDiX/home-assistant-matter-hub/issues/225)) |
76
- | **🌀 Fan Speed Fixes** | speedMax cap raised from 10 to 100 (Matter spec max), retain speed when off ([#225](https://github.com/RiDDiX/home-assistant-matter-hub/issues/225)) |
77
- | **🌡️ Composed Air Purifier Fix** | Flatten to single endpoint for correct Apple Home primary tile ([#218](https://github.com/RiDDiX/home-assistant-matter-hub/issues/218)) |
68
+ | **� Light currentLevel Fix** | Retain light currentLevel when off to prevent Apple Home 100% brightness on turn-on ([#225](https://github.com/RiDDiX/home-assistant-matter-hub/issues/225)) |
69
+ | **�️ Bridge Config Save Fix** | Decouple save button from RJSF schema validation errors ([#232](https://github.com/RiDDiX/home-assistant-matter-hub/issues/232)) |
70
+ | **🌀 Fan Device Feature Fix** | Correct FanDeviceFeature TURN_ON/TURN_OFF enum values to match Home Assistant |
71
+ | **🌡️ Humidity Auto-Mapping Fix** | Correct autoHumidityMapping schema default to match runtime behavior |
78
72
 
79
73
  </details>
80
74
 
81
75
  <details>
82
76
  <summary><strong>🧪 Alpha Features (v2.1.0-alpha.x)</strong> - Click to expand</summary>
83
77
 
84
- **Alpha is currently in sync with Stable (v2.0.29).** All alpha features have been promoted to stable. New alpha features will appear here as development continues.
78
+ **Alpha is currently in sync with Stable (v2.0.30).** All alpha features have been promoted to stable. New alpha features will appear here as development continues.
85
79
 
86
80
  </details>
87
81
 
@@ -107,6 +101,9 @@ of port forwarding etc.
107
101
  <details>
108
102
  <summary><strong>📜 Previous Stable Versions</strong> - Click to expand</summary>
109
103
 
104
+ ### v2.0.29
105
+ Light currentLevel Fix, Bridge Config Save Fix, Fan Device Feature Fix, Humidity Auto-Mapping Fix
106
+
110
107
  ### v2.0.28
111
108
  Device Image Support, Custom Fan Speed Mapping, TV Source Selection, Reverse Proxy Base Path, On/Off-Only Fans, Light Brightness Fix, Fan Speed Fixes, Composed Air Purifier Fix, Dreame Multi-Floor Fix, Optimistic State Updates, Frontend Improvements
112
109
 
@@ -496,4 +496,4 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
496
496
  To pick up a draggable item, press the space bar.
497
497
  While dragging, use the arrow keys to move the item.
498
498
  Press space again to drop the item in its new position, or press escape to cancel.
499
- `},Gat={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Kat(e){let{announcements:t=Gat,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=qat}=e;const{announce:o,announcement:s}=Uat(),a=av("DndLiveRegion"),[l,c]=_.useState(!1);if(_.useEffect(()=>{c(!0)},[]),Vat(_.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:g}=f;t.onDragMove&&o(t.onDragMove({active:h,over:g}))},onDragOver(f){let{active:h,over:g}=f;o(t.onDragOver({active:h,over:g}))},onDragEnd(f){let{active:h,over:g}=f;o(t.onDragEnd({active:h,over:g}))},onDragCancel(f){let{active:h,over:g}=f;o(t.onDragCancel({active:h,over:g}))}}),[o,t])),!l)return null;const u=qt.createElement(qt.Fragment,null,qt.createElement(zat,{id:r,value:i.draggable}),qt.createElement(Hat,{id:a,announcement:s}));return n?Dd.createPortal(u,n):u}var Li;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Li||(Li={}));function CS(){}function kK(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Yat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const sl=Object.freeze({x:0,y:0});function Cle(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ele(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Xat(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function _K(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Ale(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function DK(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Zat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=DK(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=Cle(DK(l),i);o.push({id:a,data:{droppableContainer:s,value:c}})}}return o.sort(Ele)},Jat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=_K(t),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=_K(l),u=i.reduce((h,g,y)=>h+Cle(c[y],g),0),f=Number((u/4).toFixed(4));o.push({id:a,data:{droppableContainer:s,value:f}})}}return o.sort(Ele)};function Qat(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const l=t.width*t.height,c=e.width*e.height,u=s*a,f=u/(l+c-u);return Number(f.toFixed(4))}return 0}const elt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:s}=o,a=n.get(s);if(a){const l=Qat(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(Xat)};function tlt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function kle(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:sl}function nlt(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const rlt=nlt(1);function ilt(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function olt(e,t,n){const r=ilt(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}const slt={ignoreTransform:!1};function pg(e,t){t===void 0&&(t=slt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=fs(e).getComputedStyle(e);c&&(n=olt(n,c,u))}const{top:r,left:i,width:o,height:s,bottom:a,right:l}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:l}}function OK(e){return pg(e,{ignoreTransform:!0})}function alt(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function llt(e,t){return t===void 0&&(t=fs(e).getComputedStyle(e)),t.position==="fixed"}function clt(e,t){t===void 0&&(t=fs(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function qC(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(xI(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ov(i)||xle(i)||n.includes(i))return n;const o=fs(e).getComputedStyle(i);return i!==e&&clt(i,o)&&n.push(i),llt(i,o)?n:r(i.parentNode)}return e?r(e):n}function _le(e){const[t]=qC(e,1);return t??null}function XA(e){return!WC||!e?null:fg(e)?e:vI(e)?xI(e)||e===hg(e).scrollingElement?window:ov(e)?e:null:null}function Dle(e){return fg(e)?e.scrollX:e.scrollLeft}function Ole(e){return fg(e)?e.scrollY:e.scrollTop}function XD(e){return{x:Dle(e),y:Ole(e)}}var Xi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Xi||(Xi={}));function Tle(e){return!WC||!e?!1:e===document.scrollingElement}function Mle(e){const t={x:0,y:0},n=Tle(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const ult={x:.2,y:.2};function dlt(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=ult);const{isTop:c,isBottom:u,isLeft:f,isRight:h}=Mle(e),g={x:0,y:0},y={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+b.height?(g.y=Xi.Backward,y.y=r*Math.abs((t.top+b.height-o)/b.height)):!u&&l>=t.bottom-b.height&&(g.y=Xi.Forward,y.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!h&&a>=t.right-b.width?(g.x=Xi.Forward,y.x=r*Math.abs((t.right-b.width-a)/b.width)):!f&&s<=t.left+b.width&&(g.x=Xi.Backward,y.x=r*Math.abs((t.left+b.width-s)/b.width)),{direction:g,speed:y}}function flt(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Rle(e){return e.reduce((t,n)=>nm(t,XD(n)),sl)}function hlt(e){return e.reduce((t,n)=>t+Dle(n),0)}function plt(e){return e.reduce((t,n)=>t+Ole(n),0)}function mlt(e,t){if(t===void 0&&(t=pg),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);_le(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const glt=[["x",["left","right"],hlt],["y",["top","bottom"],plt]];class CI{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=qC(n),i=Rle(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of glt)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=i[o]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Iy{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function ylt(e){const{EventTarget:t}=fs(e);return e instanceof t?e:hg(e)}function ZA(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var na;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(na||(na={}));function TK(e){e.preventDefault()}function blt(e){e.stopPropagation()}var Ln;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ln||(Ln={}));const Ile={start:[Ln.Space,Ln.Enter],cancel:[Ln.Esc],end:[Ln.Space,Ln.Enter,Ln.Tab]},vlt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ln.Right:return{...n,x:n.x+25};case Ln.Left:return{...n,x:n.x-25};case Ln.Down:return{...n,y:n.y+25};case Ln.Up:return{...n,y:n.y-25}}};class EI{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Iy(hg(n)),this.windowListeners=new Iy(fs(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(na.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&mlt(r),n(sl)}handleKeyDown(t){if(wI(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Ile,coordinateGetter:s=vlt,scrollBehavior:a="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:sl;this.referenceCoordinates||(this.referenceCoordinates=u);const f=s(t,{active:n,context:r.current,currentCoordinates:u});if(f){const h=nb(f,u),g={x:0,y:0},{scrollableAncestors:y}=r.current;for(const b of y){const v=t.code,{isTop:S,isRight:C,isLeft:w,isBottom:A,maxScroll:E,minScroll:D}=Mle(b),O=flt(b),T={x:Math.min(v===Ln.Right?O.right-O.width/2:O.right,Math.max(v===Ln.Right?O.left:O.left+O.width/2,f.x)),y:Math.min(v===Ln.Down?O.bottom-O.height/2:O.bottom,Math.max(v===Ln.Down?O.top:O.top+O.height/2,f.y))},I=v===Ln.Right&&!C||v===Ln.Left&&!w,N=v===Ln.Down&&!A||v===Ln.Up&&!S;if(I&&T.x!==f.x){const $=b.scrollLeft+h.x,R=v===Ln.Right&&$<=E.x||v===Ln.Left&&$>=D.x;if(R&&!h.y){b.scrollTo({left:$,behavior:a});return}R?g.x=b.scrollLeft-$:g.x=v===Ln.Right?b.scrollLeft-E.x:b.scrollLeft-D.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(N&&T.y!==f.y){const $=b.scrollTop+h.y,R=v===Ln.Down&&$<=E.y||v===Ln.Up&&$>=D.y;if(R&&!h.x){b.scrollTo({top:$,behavior:a});return}R?g.y=b.scrollTop-$:g.y=v===Ln.Down?b.scrollTop-E.y:b.scrollTop-D.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,nm(nb(f,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}EI.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ile,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function MK(e){return!!(e&&"distance"in e)}function RK(e){return!!(e&&"delay"in e)}class AI{constructor(t,n,r){var i;r===void 0&&(r=ylt(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=hg(s),this.documentListeners=new Iy(this.document),this.listeners=new Iy(r),this.windowListeners=new Iy(fs(s)),this.initialCoordinates=(i=YD(o))!=null?i:sl,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.DragStart,TK),this.windowListeners.add(na.VisibilityChange,this.handleCancel),this.windowListeners.add(na.ContextMenu,TK),this.documentListeners.add(na.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(RK(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(MK(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(na.Click,blt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(na.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(n=YD(t))!=null?n:sl,c=nb(i,l);if(!r&&a){if(MK(a)){if(a.tolerance!=null&&ZA(c,a.tolerance))return this.handleCancel();if(ZA(c,a.distance))return this.handleStart()}if(RK(a)&&ZA(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Ln.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const xlt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class kI extends AI{constructor(t){const{event:n}=t,r=hg(n.target);super(t,xlt,r)}}kI.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Slt={move:{name:"mousemove"},end:{name:"mouseup"}};var ZD;(function(e){e[e.RightClick=2]="RightClick"})(ZD||(ZD={}));class wlt extends AI{constructor(t){super(t,Slt,hg(t.event.target))}}wlt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ZD.RightClick?!1:(r?.({event:n}),!0)}}];const JA={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Clt extends AI{constructor(t){super(t,JA)}static setup(){return window.addEventListener(JA.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(JA.move.name,t)};function t(){}}}Clt.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Py;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Py||(Py={}));var ES;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ES||(ES={}));function Elt(e){let{acceleration:t,activator:n=Py.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=ES.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:f,threshold:h}=e;const g=klt({delta:f,disabled:!o}),[y,b]=$at(),v=_.useRef({x:0,y:0}),S=_.useRef({x:0,y:0}),C=_.useMemo(()=>{switch(n){case Py.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Py.DraggableRect:return i}},[n,i,l]),w=_.useRef(null),A=_.useCallback(()=>{const D=w.current;if(!D)return;const O=v.current.x*S.current.x,T=v.current.y*S.current.y;D.scrollBy(O,T)},[]),E=_.useMemo(()=>a===ES.TreeOrder?[...c].reverse():c,[a,c]);_.useEffect(()=>{if(!o||!c.length||!C){b();return}for(const D of E){if(r?.(D)===!1)continue;const O=c.indexOf(D),T=u[O];if(!T)continue;const{direction:I,speed:N}=dlt(D,T,C,t,h);for(const $ of["x","y"])g[$][I[$]]||(N[$]=0,I[$]=0);if(N.x>0||N.y>0){b(),w.current=D,y(A,s),v.current=N,S.current=I;return}}v.current={x:0,y:0},S.current={x:0,y:0},b()},[t,A,r,b,o,s,JSON.stringify(C),JSON.stringify(g),y,c,E,u,JSON.stringify(h)])}const Alt={x:{[Xi.Backward]:!1,[Xi.Forward]:!1},y:{[Xi.Backward]:!1,[Xi.Forward]:!1}};function klt(e){let{delta:t,disabled:n}=e;const r=KD(t);return sv(i=>{if(n||!r||!i)return Alt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Xi.Backward]:i.x[Xi.Backward]||o.x===-1,[Xi.Forward]:i.x[Xi.Forward]||o.x===1},y:{[Xi.Backward]:i.y[Xi.Backward]||o.y===-1,[Xi.Forward]:i.y[Xi.Forward]||o.y===1}}},[n,t,r])}function _lt(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return sv(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function Dlt(e,t){return _.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var ib;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ib||(ib={}));var JD;(function(e){e.Optimized="optimized"})(JD||(JD={}));const IK=new Map;function Olt(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=_.useState(null),{frequency:a,measure:l,strategy:c}=i,u=_.useRef(e),f=v(),h=tb(f),g=_.useCallback(function(S){S===void 0&&(S=[]),!h.current&&s(C=>C===null?S:C.concat(S.filter(w=>!C.includes(w))))},[h]),y=_.useRef(null),b=sv(S=>{if(f&&!n)return IK;if(!S||S===IK||u.current!==e||o!=null){const C=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const A=w.node.current,E=A?new CI(l(A),A):null;w.rect.current=E,E&&C.set(w.id,E)}return C}return S},[e,o,n,f,l]);return _.useEffect(()=>{u.current=e},[e]),_.useEffect(()=>{f||g()},[n,f]),_.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),_.useEffect(()=>{f||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},a))},[a,f,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:o!=null};function v(){switch(c){case ib.Always:return!1;case ib.BeforeDragging:return n;default:return!n}}}function Ple(e,t){return sv(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Tlt(e,t){return Ple(e,t)}function Mlt(e){let{callback:t,disabled:n}=e;const r=SI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function GC(e){let{callback:t,disabled:n}=e;const r=SI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function Rlt(e){return new CI(pg(e),e)}function PK(e,t,n){t===void 0&&(t=Rlt);const[r,i]=_.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const s=Mlt({callback(l){if(e)for(const c of l){const{type:u,target:f}=c;if(u==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=GC({callback:o});return yc(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function Ilt(e){const t=Ple(e);return kle(e,t)}const jK=[];function Plt(e){const t=_.useRef(e),n=sv(r=>e?r&&r!==jK&&e&&t.current&&e.parentNode===t.current.parentNode?r:qC(e):jK,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function jlt(e){const[t,n]=_.useState(null),r=_.useRef(e),i=_.useCallback(o=>{const s=XA(o.target);s&&n(a=>a?(a.set(s,XD(s)),new Map(a)):null)},[]);return _.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const c=XA(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,XD(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const c=XA(l);c?.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>nm(o,s),sl):Rle(e):sl,[e,t])}function $K(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const r=e!==sl;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?nb(e,n.current):sl}function $lt(e){_.useEffect(()=>{if(!WC)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function Llt(e,t){return _.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function jle(e){return _.useMemo(()=>e?alt(e):null,[e])}const LK=[];function Nlt(e,t){t===void 0&&(t=pg);const[n]=e,r=jle(n?fs(n):null),[i,o]=_.useState(LK);function s(){o(()=>e.length?e.map(l=>Tle(l)?r:new CI(t(l),l)):LK)}const a=GC({callback:s});return yc(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function Flt(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ov(t)?t:e}function Blt(e){let{measure:t}=e;const[n,r]=_.useState(null),i=_.useCallback(c=>{for(const{target:u}of c)if(ov(u)){r(f=>{const h=t(u);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=GC({callback:i}),s=_.useCallback(c=>{const u=Flt(c);o?.disconnect(),u&&o?.observe(u),r(u?t(u):null)},[t,o]),[a,l]=wS(s);return _.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const zlt=[{sensor:kI,options:{}},{sensor:EI,options:{}}],Hlt={current:{}},k4={draggable:{measure:OK},droppable:{measure:OK,strategy:ib.WhileDragging,frequency:JD.Optimized},dragOverlay:{measure:pg}};class jy extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Ult={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jy,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:CS},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:k4,measureDroppableContainers:CS,windowRect:null,measuringScheduled:!1},Vlt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:CS,draggableNodes:new Map,over:null,measureDroppableContainers:CS},KC=_.createContext(Vlt),$le=_.createContext(Ult);function Wlt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jy}}}function qlt(e,t){switch(t.type){case Li.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Li.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Li.DragEnd:case Li.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Li.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new jy(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Li.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new jy(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Li.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new jy(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Glt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=_.useContext(KC),o=KD(r),s=KD(n?.id);return _.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!wI(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const f=Fat(u);if(f){f.focus();break}}})}},[r,t,i,s,o]),null}function Klt(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function Ylt(e){return _.useMemo(()=>({draggable:{...k4.draggable,...e?.draggable},droppable:{...k4.droppable,...e?.droppable},dragOverlay:{...k4.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Xlt(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=_.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;yc(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const u=n(c),f=kle(u,r);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=_le(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,r,n])}const Lle=_.createContext({...sl,scaleX:1,scaleY:1});var xd;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(xd||(xd={}));const Zlt=_.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:u=zlt,collisionDetection:f=elt,measuring:h,modifiers:g,...y}=t;const b=_.useReducer(qlt,void 0,Wlt),[v,S]=b,[C,w]=Wat(),[A,E]=_.useState(xd.Uninitialized),D=A===xd.Initialized,{draggable:{active:O,nodes:T,translate:I},droppable:{containers:N}}=v,$=O!=null?T.get(O):null,R=_.useRef({initial:null,translated:null}),F=_.useMemo(()=>{var Dt;return O!=null?{id:O,data:(Dt=$?.data)!=null?Dt:Hlt,rect:R}:null},[O,$]),j=_.useRef(null),[z,L]=_.useState(null),[q,V]=_.useState(null),U=tb(y,Object.values(y)),K=av("DndDescribedBy",s),B=_.useMemo(()=>N.getEnabled(),[N]),W=Ylt(h),{droppableRects:X,measureDroppableContainers:H,measuringScheduled:Y}=Olt(B,{dragging:D,dependencies:[I.x,I.y],config:W.droppable}),J=_lt(T,O),ne=_.useMemo(()=>q?YD(q):null,[q]),ee=yr(),se=Tlt(J,W.draggable.measure);Xlt({activeNode:O!=null?T.get(O):null,config:ee.layoutShiftCompensation,initialRect:se,measure:W.draggable.measure});const ue=PK(J,W.draggable.measure,se),te=PK(J?J.parentElement:null),Z=_.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=N.getNodeFor((n=Z.current.over)==null?void 0:n.id),oe=Blt({measure:W.dragOverlay.measure}),fe=(r=oe.nodeRef.current)!=null?r:J,be=D?(i=oe.rect)!=null?i:ue:null,De=!!(oe.nodeRef.current&&oe.rect),Oe=Ilt(De?null:ue),Ke=jle(fe?fs(fe):null),xe=Plt(D?re??J:null),Le=Nlt(xe),Me=Klt(g,{transform:{x:I.x-Oe.x,y:I.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:q,active:F,activeNodeRect:ue,containerNodeRect:te,draggingNodeRect:be,over:Z.current.over,overlayNodeRect:oe.rect,scrollableAncestors:xe,scrollableAncestorRects:Le,windowRect:Ke}),ht=ne?nm(ne,I):null,mt=jlt(xe),ze=$K(mt),Pe=$K(mt,[ue]),He=nm(Me,ze),Je=be?rlt(be,Me):null,nt=F&&Je?f({active:F,collisionRect:Je,droppableRects:X,droppableContainers:B,pointerCoordinates:ht}):null,ot=Ale(nt,"id"),[Xe,Lt]=_.useState(null),Nt=De?Me:nm(Me,Pe),Ot=tlt(Nt,(o=Xe?.rect)!=null?o:null,ue),Xn=_.useRef(null),rn=_.useCallback((Dt,jt)=>{let{sensor:Jt,options:jn}=jt;if(j.current==null)return;const on=T.get(j.current);if(!on)return;const St=Dt.nativeEvent,mn=new Jt({active:j.current,activeNode:on,event:St,options:jn,context:Z,onAbort(br){if(!T.get(br))return;const{onDragAbort:le}=U.current,pe={id:br};le?.(pe),C({type:"onDragAbort",event:pe})},onPending(br,ei,le,pe){if(!T.get(br))return;const{onDragPending:Fe}=U.current,Ue={id:br,constraint:ei,initialCoordinates:le,offset:pe};Fe?.(Ue),C({type:"onDragPending",event:Ue})},onStart(br){const ei=j.current;if(ei==null)return;const le=T.get(ei);if(!le)return;const{onDragStart:pe}=U.current,Se={activatorEvent:St,active:{id:ei,data:le.data,rect:R}};Dd.unstable_batchedUpdates(()=>{pe?.(Se),E(xd.Initializing),S({type:Li.DragStart,initialCoordinates:br,active:ei}),C({type:"onDragStart",event:Se}),L(Xn.current),V(St)})},onMove(br){S({type:Li.DragMove,coordinates:br})},onEnd:Qr(Li.DragEnd),onCancel:Qr(Li.DragCancel)});Xn.current=mn;function Qr(br){return async function(){const{active:le,collisions:pe,over:Se,scrollAdjustedTranslate:Fe}=Z.current;let Ue=null;if(le&&Fe){const{cancelDrop:yt}=U.current;Ue={activatorEvent:St,active:le,collisions:pe,delta:Fe,over:Se},br===Li.DragEnd&&typeof yt=="function"&&await Promise.resolve(yt(Ue))&&(br=Li.DragCancel)}j.current=null,Dd.unstable_batchedUpdates(()=>{S({type:br}),E(xd.Uninitialized),Lt(null),L(null),V(null),Xn.current=null;const yt=br===Li.DragEnd?"onDragEnd":"onDragCancel";if(Ue){const rt=U.current[yt];rt?.(Ue),C({type:yt,event:Ue})}})}}},[T]),at=_.useCallback((Dt,jt)=>(Jt,jn)=>{const on=Jt.nativeEvent,St=T.get(jn);if(j.current!==null||!St||on.dndKit||on.defaultPrevented)return;const mn={active:St};Dt(Jt,jt.options,mn)===!0&&(on.dndKit={capturedBy:jt.sensor},j.current=jn,rn(Jt,jt))},[T,rn]),Ht=Dlt(u,at);$lt(u),yc(()=>{ue&&A===xd.Initializing&&E(xd.Initialized)},[ue,A]),_.useEffect(()=>{const{onDragMove:Dt}=U.current,{active:jt,activatorEvent:Jt,collisions:jn,over:on}=Z.current;if(!jt||!Jt)return;const St={active:jt,activatorEvent:Jt,collisions:jn,delta:{x:He.x,y:He.y},over:on};Dd.unstable_batchedUpdates(()=>{Dt?.(St),C({type:"onDragMove",event:St})})},[He.x,He.y]),_.useEffect(()=>{const{active:Dt,activatorEvent:jt,collisions:Jt,droppableContainers:jn,scrollAdjustedTranslate:on}=Z.current;if(!Dt||j.current==null||!jt||!on)return;const{onDragOver:St}=U.current,mn=jn.get(ot),Qr=mn&&mn.rect.current?{id:mn.id,rect:mn.rect.current,data:mn.data,disabled:mn.disabled}:null,br={active:Dt,activatorEvent:jt,collisions:Jt,delta:{x:on.x,y:on.y},over:Qr};Dd.unstable_batchedUpdates(()=>{Lt(Qr),St?.(br),C({type:"onDragOver",event:br})})},[ot]),yc(()=>{Z.current={activatorEvent:q,active:F,activeNode:J,collisionRect:Je,collisions:nt,droppableRects:X,draggableNodes:T,draggingNode:fe,draggingNodeRect:be,droppableContainers:N,over:Xe,scrollableAncestors:xe,scrollAdjustedTranslate:He},R.current={initial:be,translated:Je}},[F,J,nt,Je,T,fe,be,X,N,Xe,xe,He]),Elt({...ee,delta:I,draggingRect:Je,pointerCoordinates:ht,scrollableAncestors:xe,scrollableAncestorRects:Le});const Dn=_.useMemo(()=>({active:F,activeNode:J,activeNodeRect:ue,activatorEvent:q,collisions:nt,containerNodeRect:te,dragOverlay:oe,draggableNodes:T,droppableContainers:N,droppableRects:X,over:Xe,measureDroppableContainers:H,scrollableAncestors:xe,scrollableAncestorRects:Le,measuringConfiguration:W,measuringScheduled:Y,windowRect:Ke}),[F,J,ue,q,nt,te,oe,T,N,X,Xe,H,xe,Le,W,Y,Ke]),Gn=_.useMemo(()=>({activatorEvent:q,activators:Ht,active:F,activeNodeRect:ue,ariaDescribedById:{draggable:K},dispatch:S,draggableNodes:T,over:Xe,measureDroppableContainers:H}),[q,Ht,F,ue,S,K,T,Xe,H]);return qt.createElement(wle.Provider,{value:w},qt.createElement(KC.Provider,{value:Gn},qt.createElement($le.Provider,{value:Dn},qt.createElement(Lle.Provider,{value:Ot},c)),qt.createElement(Glt,{disabled:a?.restoreFocus===!1})),qt.createElement(Kat,{...a,hiddenTextDescribedById:K}));function yr(){const Dt=z?.autoScrollEnabled===!1,jt=typeof l=="object"?l.enabled===!1:l===!1,Jt=D&&!Dt&&!jt;return typeof l=="object"?{...l,enabled:Jt}:{enabled:Jt}}}),Jlt=_.createContext(null),NK="button",Qlt="Draggable";function ect(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=av(Qlt),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:f,over:h}=_.useContext(KC),{role:g=NK,roleDescription:y="draggable",tabIndex:b=0}=i??{},v=l?.id===t,S=_.useContext(v?Lle:Jlt),[C,w]=wS(),[A,E]=wS(),D=Llt(s,t),O=tb(n);yc(()=>(f.set(t,{id:t,key:o,node:C,activatorNode:A,data:O}),()=>{const I=f.get(t);I&&I.key===o&&f.delete(t)}),[f,t]);const T=_.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":v&&g===NK?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[r,g,b,v,y,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:T,isDragging:v,listeners:r?void 0:D,node:C,over:h,setNodeRef:w,setActivatorNodeRef:E,transform:S}}function tct(){return _.useContext($le)}const nct="Droppable",rct={timeout:25};function ict(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=av(nct),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=_.useContext(KC),u=_.useRef({disabled:n}),f=_.useRef(!1),h=_.useRef(null),g=_.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:v}={...rct,...i},S=tb(b??r),C=_.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),g.current=null},v)},[v]),w=GC({callback:C,disabled:y||!s}),A=_.useCallback((T,I)=>{w&&(I&&(w.unobserve(I),f.current=!1),T&&w.observe(T))},[w]),[E,D]=wS(A),O=tb(t);return _.useEffect(()=>{!w||!E.current||(w.disconnect(),f.current=!1,w.observe(E.current))},[E,w]),_.useEffect(()=>(a({type:Li.RegisterDroppable,element:{id:r,key:o,disabled:n,node:E,rect:h,data:O}}),()=>a({type:Li.UnregisterDroppable,key:o,id:r})),[r]),_.useEffect(()=>{n!==u.current.disabled&&(a({type:Li.SetDroppableDisabled,id:r,key:o,disabled:n}),u.current.disabled=n)},[r,o,n,a]),{active:s,rect:h,isOver:l?.id===r,node:E,over:l,setNodeRef:D}}function _I(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function oct(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function A5(e){return e!==null&&e>=0}function sct(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function act(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Nle=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=_I(t,r,n),s=t[i],a=o[i];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},k5={scaleX:1,scaleY:1},lct=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:s}=e;const a=(t=o[n])!=null?t:r;if(!a)return null;if(i===n){const c=o[s];return c?{x:0,y:n<s?c.top+c.height-(a.top+a.height):c.top-a.top,...k5}:null}const l=cct(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...k5}:i<n&&i>=s?{x:0,y:a.height+l,...k5}:{x:0,y:0,...k5}};function cct(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const Fle="Sortable",Ble=qt.createContext({activeIndex:-1,containerId:Fle,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Nle,disabled:{draggable:!1,droppable:!1}});function uct(e){let{children:t,id:n,items:r,strategy:i=Nle,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=tct(),f=av(Fle,n),h=a.rect!==null,g=_.useMemo(()=>r.map(D=>typeof D=="object"&&"id"in D?D.id:D),[r]),y=s!=null,b=s?g.indexOf(s.id):-1,v=c?g.indexOf(c.id):-1,S=_.useRef(g),C=!sct(g,S.current),w=v!==-1&&b===-1||C,A=act(o);yc(()=>{C&&y&&u(g)},[C,g,y,u]),_.useEffect(()=>{S.current=g},[g]);const E=_.useMemo(()=>({activeIndex:b,containerId:f,disabled:A,disableTransforms:w,items:g,overIndex:v,useDragOverlay:h,sortedRects:oct(g,l),strategy:i}),[b,f,A.draggable,A.droppable,w,g,v,l,h,i]);return qt.createElement(Ble.Provider,{value:E},t)}const dct=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return _I(n,r,i).indexOf(t)},fct=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===l},hct={duration:200,easing:"ease"},zle="transform",pct=rb.Transition.toString({property:zle,duration:0,easing:"linear"}),mct={roleDescription:"sortable"};function gct(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=_.useState(null),a=_.useRef(n);return yc(()=>{if(!t&&n!==a.current&&r.current){const l=i.current;if(l){const c=pg(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u)}}n!==a.current&&(a.current=n)},[t,n,r,i]),_.useEffect(()=>{o&&s(null)},[o]),o}function yct(e){let{animateLayoutChanges:t=fct,attributes:n,disabled:r,data:i,getNewIndex:o=dct,id:s,strategy:a,resizeObserverConfig:l,transition:c=hct}=e;const{items:u,containerId:f,activeIndex:h,disabled:g,disableTransforms:y,sortedRects:b,overIndex:v,useDragOverlay:S,strategy:C}=_.useContext(Ble),w=bct(r,g),A=u.indexOf(s),E=_.useMemo(()=>({sortable:{containerId:f,index:A,items:u},...i}),[f,i,A,u]),D=_.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:O,node:T,isOver:I,setNodeRef:N}=ict({id:s,data:E,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...l}}),{active:$,activatorEvent:R,activeNodeRect:F,attributes:j,setNodeRef:z,listeners:L,isDragging:q,over:V,setActivatorNodeRef:U,transform:K}=ect({id:s,data:E,attributes:{...mct,...n},disabled:w.draggable}),B=jat(N,z),W=!!$,X=W&&!y&&A5(h)&&A5(v),H=!S&&q,Y=H&&X?K:null,ne=X?Y??(a??C)({rects:b,activeNodeRect:F,activeIndex:h,overIndex:v,index:A}):null,ee=A5(h)&&A5(v)?o({id:s,items:u,activeIndex:h,overIndex:v}):A,se=$?.id,ue=_.useRef({activeId:se,items:u,newIndex:ee,containerId:f}),te=u!==ue.current.items,Z=t({active:$,containerId:f,isDragging:q,isSorting:W,id:s,index:A,items:u,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:c,wasDragging:ue.current.activeId!=null}),re=gct({disabled:!Z,index:A,node:T,rect:O});return _.useEffect(()=>{W&&ue.current.newIndex!==ee&&(ue.current.newIndex=ee),f!==ue.current.containerId&&(ue.current.containerId=f),u!==ue.current.items&&(ue.current.items=u)},[W,ee,f,u]),_.useEffect(()=>{if(se===ue.current.activeId)return;if(se!=null&&ue.current.activeId==null){ue.current.activeId=se;return}const fe=setTimeout(()=>{ue.current.activeId=se},50);return()=>clearTimeout(fe)},[se]),{active:$,activeIndex:h,attributes:j,data:E,rect:O,index:A,newIndex:ee,items:u,isOver:I,isSorting:W,isDragging:q,listeners:L,node:T,overIndex:v,over:V,setNodeRef:B,setActivatorNodeRef:U,setDroppableNodeRef:N,setDraggableNodeRef:z,transform:re??ne,transition:oe()};function oe(){if(re||te&&ue.current.newIndex===A)return pct;if(!(H&&!wI(R)||!c)&&(W||Z))return rb.Transition.toString({...c,property:zle})}}function bct(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function AS(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const vct=[Ln.Down,Ln.Right,Ln.Up,Ln.Left],xct=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:s,scrollableAncestors:a}}=t;if(vct.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case Ln.Down:r.top<h.top&&l.push(f);break;case Ln.Up:r.top>h.top&&l.push(f);break;case Ln.Left:r.left>h.left&&l.push(f);break;case Ln.Right:r.left<h.left&&l.push(f);break}});const c=Jat({collisionRect:r,droppableRects:i,droppableContainers:l});let u=Ale(c,"id");if(u===s?.id&&c.length>1&&(u=c[1].id),u!=null){const f=o.get(n.id),h=o.get(u),g=h?i.get(h.id):null,y=h?.node.current;if(y&&g&&f&&h){const v=qC(y).some((D,O)=>a[O]!==D),S=Hle(f,h),C=Sct(f,h),w=v||!S?{x:0,y:0}:{x:C?r.width-g.width:0,y:C?r.height-g.height:0},A={x:g.left,y:g.top};return w.x&&w.y?A:nb(A,w)}}}};function Hle(e,t){return!AS(e)||!AS(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Sct(e,t){return!AS(e)||!AS(t)||!Hle(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const wct=({bridge:e,index:t})=>{const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:a}=yct({id:e.id}),[l,c]=_.useState(!1);_.useEffect(()=>{_w(e.id).then(c)},[e.id]);const u={transform:rb.Transform.toString(o),transition:s,opacity:a?.5:1};return m.jsx(tr,{ref:i,style:u,variant:"outlined",sx:{cursor:"grab","&:active":{cursor:"grabbing"},bgcolor:a?"action.selected":"background.paper",width:"fit-content"},children:m.jsxs(gr,{sx:{display:"flex",alignItems:"center",gap:1.5,py:1,"&:last-child":{pb:1}},children:[m.jsx(ce,{...n,...r,sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:m.jsx(QCe,{})}),m.jsx(Et,{label:t+1,size:"small",color:"primary",sx:{minWidth:32,fontWeight:"bold"}}),l?m.jsx(ce,{component:"img",src:t2(e.id),alt:e.name,sx:{width:40,height:40,borderRadius:"50%",objectFit:"cover",boxShadow:2}}):m.jsx(rl,{sx:{bgcolor:MT(e),width:40,height:40,boxShadow:2},children:(()=>{const f=TT(e);return m.jsx(f,{sx:{fontSize:24}})})()}),m.jsxs(ce,{sx:{flex:1},children:[m.jsx(ie,{variant:"subtitle1",fontWeight:500,children:e.name}),m.jsxs(ie,{variant:"caption",color:"text.secondary",children:["Port: ",e.port," • Priority: ",e.priority??100]})]})]})})},Cct=()=>{const e=Tu(),{content:t,isLoading:n}=Vm(),r=SCe(),[i,o]=_.useState([]),[s,a]=_.useState(!1);_.useEffect(()=>{if(t){const h=[...t].sort((g,y)=>{const b=g.priority??100,v=y.priority??100;return b-v});o(h),a(!1)}},[t]);const l=Yat(kK(kI),kK(EI,{coordinateGetter:xct})),c=_.useCallback(h=>{const{active:g,over:y}=h;y&&g.id!==y.id&&(o(b=>{const v=b.findIndex(C=>C.id===g.id),S=b.findIndex(C=>C.id===y.id);return _I(b,v,S)}),a(!0))},[]),u=_.useCallback(async()=>{const h=i.map((g,y)=>({id:g.id,priority:(y+1)*10}));try{await r(h),e.show({message:"Startup order saved successfully",severity:"success"}),a(!1)}catch(g){e.show({message:g instanceof Error?g.message:"Failed to save startup order",severity:"error"})}},[i,r,e]),f=_.useMemo(()=>i.map(h=>h.id),[i]);return n?m.jsx(ie,{children:"Loading..."}):m.jsxs(zt,{spacing:3,children:[m.jsx(lw,{items:[{name:"Bridges",to:Pt.bridges},{name:"Startup Order",to:Pt.startup}]}),m.jsxs(ce,{display:"flex",alignItems:"center",gap:2,children:[m.jsx(yb,{color:"primary",fontSize:"large"}),m.jsxs(ce,{children:[m.jsx(ie,{variant:"h5",fontWeight:600,children:"Startup Order"}),m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Drag and drop bridges to set the startup order. Lower positions start first."})]})]}),s&&m.jsx(vn,{severity:"info",action:m.jsx(kt,{color:"inherit",size:"small",startIcon:m.jsx(n6,{}),onClick:u,children:"Save Changes"}),children:"You have unsaved changes to the startup order."}),m.jsx(Zlt,{sensors:l,collisionDetection:Zat,onDragEnd:c,children:m.jsx(uct,{items:f,strategy:lct,children:m.jsx(zt,{spacing:1,children:i.map((h,g)=>m.jsx(wct,{bridge:h,index:g},h.id))})})}),i.length===0&&m.jsx(ie,{color:"text.secondary",textAlign:"center",py:4,children:"No bridges configured yet."}),s&&i.length>0&&m.jsx(ce,{display:"flex",justifyContent:"flex-end",children:m.jsx(kt,{variant:"contained",startIcon:m.jsx(n6,{}),onClick:u,children:"Save Startup Order"})})]})},QA="https://riddix.github.io/home-assistant-matter-hub",Pt={dashboard:"/",bridges:"/bridges",bridge:e=>`/bridges/${e}`,createBridge:"/bridges/create",editBridge:e=>`/bridges/${e}/edit`,devices:"/devices",networkMap:"/network-map",health:"/health",labels:"/labels",lockCredentials:"/lock-credentials",settings:"/settings",startup:"/startup",githubRepository:"https://github.com/riddix/home-assistant-matter-hub/",documentation:QA,faq:{multiFabric:`${QA}/connect-multiple-fabrics`,bridgeConfig:`${QA}/bridge-configuration`}},Ect=[{path:"",element:m.jsx(_2e,{}),children:[{path:"",element:m.jsx(u9e,{})},{path:Pt.bridges,element:m.jsx(a9e,{})},{path:Pt.createBridge,element:m.jsx(JQe,{})},{path:Pt.bridge(":bridgeId"),element:m.jsx(ICe,{})},{path:Pt.editBridge(":bridgeId"),element:m.jsx(QQe,{})},{path:Pt.devices,element:m.jsx(D9e,{})},{path:Pt.networkMap,element:m.jsx(Tat,{})},{path:Pt.health,element:m.jsx(aet,{})},{path:Pt.labels,element:m.jsx(fet,{})},{path:Pt.lockCredentials,element:m.jsx(bet,{})},{path:Pt.settings,element:m.jsx(Pat,{})},{path:Pt.startup,element:m.jsx(Cct,{})},{path:"*",element:m.jsx(vet,{})}]}],Act={items:{isInitialized:!1,isLoading:!1}},kct=FO(Act,e=>{e.addCase(Bo.pending,t=>{t.items.isLoading=!0}).addCase(Bo.rejected,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=void 0,t.items.error=n.error}).addCase(Bo.fulfilled,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(zX.fulfilled,(t,n)=>{t.items.content?.push(n.payload)}).addCase(UX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(VX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(HX.fulfilled,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.meta.arg);r!==-1&&t.items.content.splice(r,1)}}).addCase(WX,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(qX,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.payload.id);r!==-1?t.items.content[r]=n.payload:t.items.content.push(n.payload)}})}),_ct={byBridge:{}},Dct=FO(_ct,e=>{e.addCase(du.pending,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)}).addCase(du.rejected,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)}).addCase(du.fulfilled,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)})}),Oct={isInitialized:!1,isLoading:!1,content:void 0,error:void 0},ek=FO(Oct,e=>{e.addCase(du.pending,t=>{t.isLoading=!0}).addCase(du.rejected,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=void 0,t.error=n.error}).addCase(du.fulfilled,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=n.payload,t.error=void 0})}),Tct=l2e({reducer:{bridges:kct,devices:Dct}}),DI=Wme({createStyledComponent:me("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ye(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>it({props:e,name:"MuiContainer"})});function Mct(e){return Qe("MuiToolbar",e)}tt("MuiToolbar",["root","gutters","regular","dense"]);const Rct=e=>{const{classes:t,disableGutters:n,variant:r}=e;return et({root:["root",!n&&"gutters",r]},Mct,t)},Ict=me("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ge(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),Ule=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular",...l}=r,c={...r,component:o,disableGutters:s,variant:a},u=Rct(c);return m.jsx(Ict,{as:o,className:Te(u.root,i),ref:n,ownerState:c,...l})});class Pct extends _.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught:",t,n.componentStack)}render(){return this.state.hasError?m.jsxs(ce,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"60vh",gap:2,p:4,children:[m.jsx(KO,{color:"error",sx:{fontSize:64}}),m.jsx(ie,{variant:"h5",fontWeight:600,children:"Something went wrong"}),m.jsx(ie,{variant:"body2",color:"text.secondary",textAlign:"center",maxWidth:480,children:this.state.error?.message??"An unexpected error occurred."}),m.jsx(kt,{variant:"contained",onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},children:"Reload Page"})]}):this.props.children}}const jct=[{name:"GitHub",url:Pt.githubRepository},{name:"Documentation",url:Pt.documentation}],$ct=()=>m.jsxs(DI,{sx:{mt:16,mb:4},children:[m.jsx(gi,{sx:{mt:4,mb:4}}),m.jsx(dt,{container:!0,spacing:2,justifyContent:"center",children:jct.map((e,t)=>m.jsx(dt,{size:{xs:12,sm:"auto"},children:m.jsx(kt,{fullWidth:!0,size:"small",variant:"outlined",component:aw,href:e.url,target:"_blank",children:e.name})},t.toString()))})]});function Lct(e){return Qe("MuiAppBar",e)}tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Nct=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ye(t)}`,`position${ye(n)}`]};return et(i,Lct,r)},FK=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,Fct=me(Ur,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ye(n.position)}`],t[`color${ye(n.color)}`]]}})(Ge(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Fn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?FK(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?FK(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),Bct=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=r,c={...r,color:o,position:a,enableColorOnDark:s},u=Nct(c);return m.jsx(Fct,{square:!0,component:"header",ownerState:c,elevation:4,className:Te(u.root,i,a==="fixed"&&"mui-fixed"),ref:n,...l})});function zct(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=tl(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function Hct(e){return typeof e=="function"?e():e}function _5(e,t,n){const r=Hct(n),i=zct(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const Uct=_.forwardRef(function(t,n){const r=ro(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:f=i,in:h,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:S,onExiting:C,style:w,timeout:A=o,TransitionComponent:E=Ta,...D}=t,O=_.useRef(null),T=Tr(gf(l),O,n),I=V=>U=>{V&&(U===void 0?V(O.current):V(O.current,U))},N=I((V,U)=>{_5(u,V,c),IO(V),g&&g(V,U)}),$=I((V,U)=>{const K=Kd({timeout:A,style:w,easing:f},{mode:"enter"});V.style.webkitTransition=r.transitions.create("-webkit-transform",{...K}),V.style.transition=r.transitions.create("transform",{...K}),V.style.webkitTransform="none",V.style.transform="none",b&&b(V,U)}),R=I(y),F=I(C),j=I(V=>{const U=Kd({timeout:A,style:w,easing:f},{mode:"exit"});V.style.webkitTransition=r.transitions.create("-webkit-transform",U),V.style.transition=r.transitions.create("transform",U),_5(u,V,c),v&&v(V)}),z=I(V=>{V.style.webkitTransition="",V.style.transition="",S&&S(V)}),L=V=>{s&&s(O.current,V)},q=_.useCallback(()=>{O.current&&_5(u,O.current,c)},[u,c]);return _.useEffect(()=>{if(h||u==="down"||u==="right")return;const V=OO(()=>{O.current&&_5(u,O.current,c)}),U=tl(O.current);return U.addEventListener("resize",V),()=>{V.clear(),U.removeEventListener("resize",V)}},[u,h,c]),_.useEffect(()=>{h||q()},[h,q]),m.jsx(E,{nodeRef:O,onEnter:N,onEntered:R,onEntering:$,onExit:j,onExited:z,onExiting:F,addEndListener:L,appear:a,in:h,timeout:A,...D,children:(V,{ownerState:U,...K})=>_.cloneElement(l,{ref:T,style:{visibility:V==="exited"&&!h?"hidden":void 0,...w,...l.props.style},...K})})});function Vct(e){return Qe("MuiDrawer",e)}tt("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Vle=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},Wct=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${ye(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ye(n)}`,r!=="temporary"&&`paperAnchorDocked${ye(n)}`]};return et(i,Vct,t)},qct=me(ZO,{name:"MuiDrawer",slot:"Root",overridesResolver:Vle})(Ge(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),Gct=me("div",{shouldForwardProp:io,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Vle})({flex:"0 0 auto"}),Kct=me(Ur,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ye(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ye(n.anchor)}`]]}})(Ge(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Wle={left:"right",right:"left",top:"down",bottom:"up"};function Yct(e){return["left","right"].includes(e)}function Xct({direction:e},t){return e==="rtl"&&Yct(t)?Wle[t]:t}const Zct=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiDrawer"}),i=ro(),o=mf(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:g,...y}={},onClose:b,open:v=!1,PaperProps:S={},SlideProps:C,TransitionComponent:w,transitionDuration:A=s,variant:E="temporary",slots:D={},slotProps:O={},...T}=r,I=_.useRef(!1);_.useEffect(()=>{I.current=!0},[]);const N=Xct({direction:o?"rtl":"ltr"},a),R={...r,anchor:a,elevation:f,open:v,variant:E,...T},F=Wct(R),j={slots:{transition:w,...D},slotProps:{paper:S,transition:C,...O,backdrop:TO(O.backdrop||{...l,...g},{transitionDuration:A})}},[z,L]=lt("root",{ref:n,elementType:qct,className:Te(F.root,F.modal,u),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...j,...T,...y},additionalProps:{open:v,onClose:b,hideBackdrop:h,slots:{backdrop:j.slots.backdrop},slotProps:{backdrop:j.slotProps.backdrop}}}),[q,V]=lt("paper",{elementType:Kct,shouldForwardComponentProp:!0,className:Te(F.paper,S.className),ownerState:R,externalForwardedProps:j,additionalProps:{elevation:E==="temporary"?f:0,square:!0,...E==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[U,K]=lt("docked",{elementType:Gct,ref:n,className:Te(F.root,F.docked,u),ownerState:R,externalForwardedProps:j,additionalProps:T}),[B,W]=lt("transition",{elementType:Uct,ownerState:R,externalForwardedProps:j,additionalProps:{in:v,direction:Wle[N],timeout:A,appear:I.current}}),X=m.jsx(q,{...V,children:c});if(E==="permanent")return m.jsx(U,{...K,children:X});const H=m.jsx(B,{...W,children:X});return E==="persistent"?m.jsx(U,{...K,children:H}):m.jsx(z,{...L,children:H})}),Jct=XY({themeId:da}),Qct={error:vf,warn:iw,info:YO,debug:Aw},eut=({open:e,onClose:t})=>{const n=ro(),r=_.useMemo(()=>({error:n.palette.error.main,warn:n.palette.warning.main,info:n.palette.info.main,debug:n.palette.secondary.main}),[n]),[i,o]=_.useState([]),[s,a]=_.useState(!0),[l,c]=_.useState("error,warn,info".split(",")),[u,f]=_.useState(""),[h,g]=_.useState(!0),y=_.useCallback(async()=>{try{const w=new URLSearchParams({level:l.join(","),limit:"500",...u&&{search:u}}),A=await fetch(`api/logs?${w}`);if(A.ok){const E=await A.json();o(E.entries)}}catch(w){console.error("Failed to fetch logs:",w)}finally{a(!1)}},[l,u]);_.useEffect(()=>{e&&y()},[e,y]),_.useEffect(()=>{if(!h||!e)return;const w=setInterval(y,5e3);return()=>clearInterval(w)},[h,e,y]);const b=w=>{c(Array.isArray(w.target.value)?w.target.value:[w.target.value])},v=w=>{f(w.target.value)},S=async()=>{try{await fetch("api/logs",{method:"DELETE"}),o([])}catch(w){console.error("Failed to clear logs:",w)}},C=w=>{const A=Qct[w]||YO;return m.jsx(A,{sx:{fontSize:16,color:r[w]}})};return m.jsxs(vu,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,children:[m.jsxs(Su,{sx:{display:"flex",alignItems:"center",gap:1},children:[m.jsx(Aw,{}),"System Logs",m.jsx(ce,{sx:{flexGrow:1}}),m.jsx(cn,{title:"Auto Refresh",children:m.jsx(Et,{label:h?"Auto":"Manual",color:h?"success":"default",size:"small",onClick:()=>g(!h),sx:{cursor:"pointer"}})}),m.jsx(_n,{onClick:t,children:m.jsx(qCe,{})})]}),m.jsxs(xu,{children:[m.jsx(zt,{spacing:2,sx:{mb:2},children:m.jsxs(zt,{direction:"row",spacing:2,alignItems:"center",children:[m.jsxs(pa,{size:"small",sx:{minWidth:200},children:[m.jsx(sc,{children:"Log Level"}),m.jsxs(sa,{value:l,label:"Log Level",onChange:b,multiple:!0,renderValue:w=>m.jsx(ce,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(Array.isArray(w)?w:[w]).map(A=>m.jsx(Et,{label:A.toUpperCase(),size:"small",sx:{backgroundColor:r[A],color:"white"}},A))}),children:[m.jsx(er,{value:"error",children:"Error"}),m.jsx(er,{value:"warn",children:"Warning"}),m.jsx(er,{value:"info",children:"Info"}),m.jsx(er,{value:"debug",children:"Debug"})]})]}),m.jsx(Lr,{size:"small",placeholder:"Search logs...",value:u,onChange:v,sx:{flexGrow:1}}),m.jsx(kt,{variant:"outlined",onClick:y,children:"Refresh"}),m.jsx(kt,{variant:"outlined",color:"error",onClick:S,children:"Clear"})]})}),m.jsx(ce,{sx:{height:400,overflow:"auto",backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1},children:s?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(ie,{children:"Loading logs..."})}):i.length===0?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(ie,{color:"text.secondary",children:"No logs found"})}):m.jsx(zt,{spacing:1,children:i.map((w,A)=>m.jsxs(ce,{sx:{p:1,borderRadius:1,backgroundColor:"action.hover",fontFamily:"monospace",fontSize:"0.875rem",wordBreak:"break-all"},children:[m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[C(w.level),m.jsx(ie,{variant:"caption",color:"text.secondary",children:new Date(w.timestamp).toLocaleString()}),m.jsx(Et,{label:w.level.toUpperCase(),size:"small",sx:{backgroundColor:r[w.level],color:n.palette.getContrastText(r[w.level]??n.palette.grey[500]),fontSize:"0.7rem",height:20}})]}),m.jsx(ie,{sx:{ml:3},children:w.message}),w.context&&m.jsx(ie,{sx:{ml:3,color:"text.secondary",fontSize:"0.8rem"},children:JSON.stringify(w.context,null,2)})]},`${w.timestamp}-${w.level}-${A}`))})})]}),m.jsx(Xd,{children:m.jsx(kt,{onClick:t,children:"Close"})})]})};function BK(){const{isConnected:e}=A2e(),[t,n]=_.useState(null),[r,i]=_.useState(!1);_.useEffect(()=>{const y=async()=>{try{const v=await fetch("api/health");if(v.ok){const S=await v.json();n(S),i(!1)}else i(!0)}catch{i(!0)}};y();const b=setInterval(y,3e4);return()=>clearInterval(b)},[]);const o=y=>{const b=Math.floor(y/3600),v=Math.floor(y%3600/60);return b>0?`${b}h ${v}m`:`${v}m`},s=t?.status==="healthy"&&!r,a=t?.services?.bridges,l=a&&a.total>0&&a.running===a.total,c=a&&a.total===0,u=t?m.jsxs(ce,{sx:{p:.5},children:[m.jsxs("div",{children:[m.jsx("strong",{children:"Version:"})," ",t.version??"Unknown"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"Uptime:"})," ",o(t.uptime??0)]}),t.services?.bridges&&m.jsxs("div",{children:[m.jsx("strong",{children:"Bridges:"})," ",t.services.bridges.running??0,"/",t.services.bridges.total??0," running",(t.services.bridges.stopped??0)>0&&` (${t.services.bridges.stopped} stopped)`]}),t.services?.homeAssistant&&m.jsxs("div",{children:[m.jsx("strong",{children:"Home Assistant:"})," ",t.services.homeAssistant.connected?"Connected":"Disconnected"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"WebSocket:"})," ",e?"Connected":"Disconnected"]})]}):"Loading health status...",f=()=>r||!s?m.jsx(vf,{fontSize:"small"}):l?m.jsx(Mu,{fontSize:"small"}):m.jsx(dw,{fontSize:"small"}),h=()=>r||!s?"error":!l||!e?"warning":"success",g=()=>r?"Error":s?e?c?"No Bridges":l?"Online":"Starting":"Offline":"Unhealthy";return m.jsx(cn,{title:u,arrow:!0,children:m.jsx(Et,{icon:f(),label:g(),color:h(),size:"small",variant:"filled",sx:{borderRadius:1,fontWeight:600,"& .MuiChip-icon":{color:"inherit"}}})})}const tut=e=>_.createElement("svg",{viewBox:"0 0 91 89",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{style:{display:"inline"}},_.createElement("path",{style:{fill:"#18bcf2",fillOpacity:1,strokeWidth:.266194},d:"m 49.149143,1.473171 38.513568,38.536435 c 0,0 1.248354,1.186052 2.207681,3.092371 0.959329,1.906323 1.10864,4.600698 1.10864,4.600698 v 36.786372 c 0,0 -0.01549,1.748506 -1.49842,3.050572 -1.482931,1.302064 -3.333077,1.362947 -3.333077,1.362947 l -81.325658,7.7e-5 c 0,0 -1.7523855,-0.0091 -3.17112,-1.352526 C -0.07808495,85.913164 0.05953025,84.487808 0.05953025,84.487808 V 47.704546 c 0,0 -0.0018381,-2.218618 0.95921785,-4.315832 0.9610554,-2.097209 2.3010618,-3.355005 2.3010618,-3.355005 L 41.545959,1.4719546 c 0,0 1.465224,-1.46837077 3.753488,-1.46837077 2.288268,0 3.849696,1.46958717 3.849696,1.46958717 z"}),_.createElement("path",{style:{fill:"#ffffff",fillOpacity:1,strokeWidth:.175841},d:"m 31.689717,32.051124 c 2.813363,2.331095 6.157331,3.89845 9.721813,4.556421 V 17.180647 l 3.873694,-2.282955 3.870527,2.282955 V 36.60772 c 3.565364,-0.658847 6.910387,-2.226204 9.725159,-4.556417 l 7.032345,4.154609 c -11.437354,11.557779 -29.852321,11.557779 -41.290025,0 z m 8.546732,49.60988 C 44.314996,65.760441 35.09933,49.470196 19.574984,45.139543 v 8.312381 c 3.383916,1.32244 6.386113,3.496288 8.728705,6.320026 L 11.83076,69.485301 v 4.56907 l 3.873697,2.270836 16.469936,-9.713534 c 1.224356,3.48294 1.56683,7.225375 0.996449,10.879778 z M 70.977694,45.139543 c -15.515726,4.34014 -24.72189,20.626696 -20.643519,36.521461 l 7.047658,-4.15742 c -0.569325,-3.654411 -0.2265,-7.3965 0.996449,-10.87979 l 16.457611,9.701233 3.870711,-2.283125 v -4.55677 L 62.233673,59.77195 c 2.342772,-2.822684 5.34497,-4.996533 8.728708,-6.320026 z"}))),nut="home-assistant-matter-hub",rut={name:nut};function iut(){const[e,t]=_.useState("2.1.0-alpha.438");return _.useEffect(()=>{fetch("api/health").then(n=>n.ok?n.json():null).then(n=>{n?.version&&t(n.version)}).catch(()=>{})},[]),_.useMemo(()=>({name:rut.name,version:e}),[e])}const out=e=>{const t=iut();return m.jsxs(ce,{component:Du,to:Pt.dashboard,sx:{display:"flex",alignItems:"center",justifyContent:e.large?"flex-start":"center",flexGrow:1,textDecoration:"none",color:"inherit"},children:[m.jsx(tut,{style:{height:"40px"}}),m.jsx(ie,{variant:"inherit",component:"span",sx:{mr:1,ml:1},children:t.name.split("-").map(ye).join("-")}),e.large&&m.jsx(ie,{variant:"caption",component:"span",children:t.version})]})},sut=()=>{const e=Jct("(min-width:600px)"),{mode:t,setMode:n}=KS(),[r,i]=_.useState(!1),[o,s]=_.useState(!1),a=hf(),l=()=>{n(t==="dark"?"light":"dark")},c=[{label:"Dashboard",icon:m.jsx(CT,{}),to:Pt.dashboard},{label:"Bridges",icon:m.jsx(t6,{}),to:Pt.bridges},{label:"All Devices",icon:m.jsx(Fs,{}),to:Pt.devices},{label:"Network Map",icon:m.jsx(bT,{}),to:Pt.networkMap},{label:"Startup Order",icon:m.jsx(yb,{}),to:Pt.startup},{label:"Lock Credentials",icon:m.jsx(uu,{}),to:Pt.lockCredentials},{label:"Filter Reference",icon:m.jsx(ET,{}),to:Pt.labels},{label:"Settings",icon:m.jsx(wb,{}),to:Pt.settings},{label:t==="dark"?"Light Mode":"Dark Mode",icon:t==="dark"?m.jsx(a8e,{}):m.jsx(YCe,{}),onClick:l},{label:"System Logs",icon:m.jsx(Aw,{}),onClick:()=>i(!0)},{label:"Health Dashboard",icon:m.jsx(QO,{}),to:Pt.health}],u=f=>{s(!1),f.onClick?f.onClick():f.to&&a(f.to)};return m.jsxs(ce,{children:[m.jsx(Bct,{sx:{height:"72px"},children:m.jsx(Ule,{sx:{paddingLeft:"0 !important",paddingRight:"0 !important"},children:m.jsxs(DI,{sx:{padding:2,height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m.jsx(out,{large:e}),e?m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.map(f=>f.to?m.jsx(cn,{title:f.label,children:m.jsx(_n,{component:Du,to:f.to,sx:{color:"inherit"},children:f.icon})},f.label):m.jsx(cn,{title:f.label,children:m.jsx(_n,{onClick:f.onClick,sx:{color:"inherit"},children:f.icon})},f.label)),m.jsx(BK,{})]}):m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:.5},children:[m.jsx(BK,{}),m.jsx(_n,{onClick:()=>s(!0),sx:{color:"inherit"},children:m.jsx(l8e,{})})]})]})})}),m.jsx(Zct,{anchor:"right",open:o,onClose:()=>s(!1),children:m.jsx(bc,{sx:{width:250},children:c.map(f=>m.jsxs(obe,{onClick:()=>u(f),children:[m.jsx(Ul,{children:f.icon}),m.jsx(Va,{primary:f.label})]},f.label))})}),m.jsx(eut,{open:r,onClose:()=>i(!1)})]})},aut=()=>m.jsxs(ce,{children:[m.jsx(sut,{}),m.jsx(Ule,{}),m.jsx(DI,{sx:{p:2},children:m.jsx(Pct,{children:m.jsx(yY,{})})}),m.jsx($ct,{})]}),lut=WS({colorSchemes:{light:{palette:{primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2"},background:{default:"#f5f5f5",paper:"#ffffff"}}},dark:{palette:{primary:{main:"#90caf9",light:"#e3f2fd",dark:"#42a5f5"},secondary:{main:"#ce93d8",light:"#f3e5f5",dark:"#ab47bc"},background:{default:"#121212",paper:"#1e1e1e"}}}},typography:{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',h1:{fontSize:"2.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h3:{fontSize:"1.75rem",fontWeight:500},h4:{fontSize:"1.5rem",fontWeight:500},h5:{fontSize:"1.25rem",fontWeight:500},h6:{fontSize:"1rem",fontWeight:500}},shape:{borderRadius:8},components:{MuiCard:{styleOverrides:{root:{transition:"transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 20px rgba(0,0,0,0.12)"}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",fontWeight:500}}},MuiChip:{styleOverrides:{root:{fontWeight:500}}},MuiAppBar:{styleOverrides:{root:{backgroundImage:"none"}}}}});let _4=document.getElementsByTagName("base")[0]?.href?.replace(/\/$/,"");_4?.startsWith("http")&&(_4=new URL(_4).pathname);const cut=Hhe([{path:"/",element:m.jsx(aut,{}),children:Ect}],{basename:_4});sde.createRoot(document.getElementById("root")).render(m.jsx(_.StrictMode,{children:m.jsx(Cde,{store:Tct,children:m.jsxs(n1e,{theme:lut,children:[m.jsx(Zge,{}),m.jsx(dX,{styles:{".rjsf-field-array > .MuiFormControl-root > .MuiPaper-root > .MuiBox-root > .MuiGrid-root > .MuiGrid-root:has(> .MuiBox-root > .MuiPaper-root > .MuiBox-root > .rjsf-field)":{overflow:"initial !important",flexGrow:1}}}),m.jsx(k2e,{children:m.jsx(yye,{children:m.jsx(epe,{router:cut})})})]})})}));
499
+ `},Gat={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Kat(e){let{announcements:t=Gat,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=qat}=e;const{announce:o,announcement:s}=Uat(),a=av("DndLiveRegion"),[l,c]=_.useState(!1);if(_.useEffect(()=>{c(!0)},[]),Vat(_.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:g}=f;t.onDragMove&&o(t.onDragMove({active:h,over:g}))},onDragOver(f){let{active:h,over:g}=f;o(t.onDragOver({active:h,over:g}))},onDragEnd(f){let{active:h,over:g}=f;o(t.onDragEnd({active:h,over:g}))},onDragCancel(f){let{active:h,over:g}=f;o(t.onDragCancel({active:h,over:g}))}}),[o,t])),!l)return null;const u=qt.createElement(qt.Fragment,null,qt.createElement(zat,{id:r,value:i.draggable}),qt.createElement(Hat,{id:a,announcement:s}));return n?Dd.createPortal(u,n):u}var Li;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Li||(Li={}));function CS(){}function kK(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Yat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const sl=Object.freeze({x:0,y:0});function Cle(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ele(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Xat(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function _K(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Ale(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function DK(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Zat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=DK(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=Cle(DK(l),i);o.push({id:a,data:{droppableContainer:s,value:c}})}}return o.sort(Ele)},Jat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=_K(t),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=_K(l),u=i.reduce((h,g,y)=>h+Cle(c[y],g),0),f=Number((u/4).toFixed(4));o.push({id:a,data:{droppableContainer:s,value:f}})}}return o.sort(Ele)};function Qat(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const l=t.width*t.height,c=e.width*e.height,u=s*a,f=u/(l+c-u);return Number(f.toFixed(4))}return 0}const elt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:s}=o,a=n.get(s);if(a){const l=Qat(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(Xat)};function tlt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function kle(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:sl}function nlt(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const rlt=nlt(1);function ilt(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function olt(e,t,n){const r=ilt(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}const slt={ignoreTransform:!1};function pg(e,t){t===void 0&&(t=slt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=fs(e).getComputedStyle(e);c&&(n=olt(n,c,u))}const{top:r,left:i,width:o,height:s,bottom:a,right:l}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:l}}function OK(e){return pg(e,{ignoreTransform:!0})}function alt(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function llt(e,t){return t===void 0&&(t=fs(e).getComputedStyle(e)),t.position==="fixed"}function clt(e,t){t===void 0&&(t=fs(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function qC(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(xI(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ov(i)||xle(i)||n.includes(i))return n;const o=fs(e).getComputedStyle(i);return i!==e&&clt(i,o)&&n.push(i),llt(i,o)?n:r(i.parentNode)}return e?r(e):n}function _le(e){const[t]=qC(e,1);return t??null}function XA(e){return!WC||!e?null:fg(e)?e:vI(e)?xI(e)||e===hg(e).scrollingElement?window:ov(e)?e:null:null}function Dle(e){return fg(e)?e.scrollX:e.scrollLeft}function Ole(e){return fg(e)?e.scrollY:e.scrollTop}function XD(e){return{x:Dle(e),y:Ole(e)}}var Xi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Xi||(Xi={}));function Tle(e){return!WC||!e?!1:e===document.scrollingElement}function Mle(e){const t={x:0,y:0},n=Tle(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const ult={x:.2,y:.2};function dlt(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=ult);const{isTop:c,isBottom:u,isLeft:f,isRight:h}=Mle(e),g={x:0,y:0},y={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+b.height?(g.y=Xi.Backward,y.y=r*Math.abs((t.top+b.height-o)/b.height)):!u&&l>=t.bottom-b.height&&(g.y=Xi.Forward,y.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!h&&a>=t.right-b.width?(g.x=Xi.Forward,y.x=r*Math.abs((t.right-b.width-a)/b.width)):!f&&s<=t.left+b.width&&(g.x=Xi.Backward,y.x=r*Math.abs((t.left+b.width-s)/b.width)),{direction:g,speed:y}}function flt(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Rle(e){return e.reduce((t,n)=>nm(t,XD(n)),sl)}function hlt(e){return e.reduce((t,n)=>t+Dle(n),0)}function plt(e){return e.reduce((t,n)=>t+Ole(n),0)}function mlt(e,t){if(t===void 0&&(t=pg),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);_le(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const glt=[["x",["left","right"],hlt],["y",["top","bottom"],plt]];class CI{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=qC(n),i=Rle(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of glt)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=i[o]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Iy{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function ylt(e){const{EventTarget:t}=fs(e);return e instanceof t?e:hg(e)}function ZA(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var na;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(na||(na={}));function TK(e){e.preventDefault()}function blt(e){e.stopPropagation()}var Ln;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ln||(Ln={}));const Ile={start:[Ln.Space,Ln.Enter],cancel:[Ln.Esc],end:[Ln.Space,Ln.Enter,Ln.Tab]},vlt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ln.Right:return{...n,x:n.x+25};case Ln.Left:return{...n,x:n.x-25};case Ln.Down:return{...n,y:n.y+25};case Ln.Up:return{...n,y:n.y-25}}};class EI{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Iy(hg(n)),this.windowListeners=new Iy(fs(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(na.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&mlt(r),n(sl)}handleKeyDown(t){if(wI(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Ile,coordinateGetter:s=vlt,scrollBehavior:a="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:sl;this.referenceCoordinates||(this.referenceCoordinates=u);const f=s(t,{active:n,context:r.current,currentCoordinates:u});if(f){const h=nb(f,u),g={x:0,y:0},{scrollableAncestors:y}=r.current;for(const b of y){const v=t.code,{isTop:S,isRight:C,isLeft:w,isBottom:A,maxScroll:E,minScroll:D}=Mle(b),O=flt(b),T={x:Math.min(v===Ln.Right?O.right-O.width/2:O.right,Math.max(v===Ln.Right?O.left:O.left+O.width/2,f.x)),y:Math.min(v===Ln.Down?O.bottom-O.height/2:O.bottom,Math.max(v===Ln.Down?O.top:O.top+O.height/2,f.y))},I=v===Ln.Right&&!C||v===Ln.Left&&!w,N=v===Ln.Down&&!A||v===Ln.Up&&!S;if(I&&T.x!==f.x){const $=b.scrollLeft+h.x,R=v===Ln.Right&&$<=E.x||v===Ln.Left&&$>=D.x;if(R&&!h.y){b.scrollTo({left:$,behavior:a});return}R?g.x=b.scrollLeft-$:g.x=v===Ln.Right?b.scrollLeft-E.x:b.scrollLeft-D.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(N&&T.y!==f.y){const $=b.scrollTop+h.y,R=v===Ln.Down&&$<=E.y||v===Ln.Up&&$>=D.y;if(R&&!h.x){b.scrollTo({top:$,behavior:a});return}R?g.y=b.scrollTop-$:g.y=v===Ln.Down?b.scrollTop-E.y:b.scrollTop-D.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,nm(nb(f,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}EI.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ile,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function MK(e){return!!(e&&"distance"in e)}function RK(e){return!!(e&&"delay"in e)}class AI{constructor(t,n,r){var i;r===void 0&&(r=ylt(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=hg(s),this.documentListeners=new Iy(this.document),this.listeners=new Iy(r),this.windowListeners=new Iy(fs(s)),this.initialCoordinates=(i=YD(o))!=null?i:sl,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.DragStart,TK),this.windowListeners.add(na.VisibilityChange,this.handleCancel),this.windowListeners.add(na.ContextMenu,TK),this.documentListeners.add(na.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(RK(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(MK(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(na.Click,blt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(na.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(n=YD(t))!=null?n:sl,c=nb(i,l);if(!r&&a){if(MK(a)){if(a.tolerance!=null&&ZA(c,a.tolerance))return this.handleCancel();if(ZA(c,a.distance))return this.handleStart()}if(RK(a)&&ZA(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Ln.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const xlt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class kI extends AI{constructor(t){const{event:n}=t,r=hg(n.target);super(t,xlt,r)}}kI.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Slt={move:{name:"mousemove"},end:{name:"mouseup"}};var ZD;(function(e){e[e.RightClick=2]="RightClick"})(ZD||(ZD={}));class wlt extends AI{constructor(t){super(t,Slt,hg(t.event.target))}}wlt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ZD.RightClick?!1:(r?.({event:n}),!0)}}];const JA={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Clt extends AI{constructor(t){super(t,JA)}static setup(){return window.addEventListener(JA.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(JA.move.name,t)};function t(){}}}Clt.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Py;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Py||(Py={}));var ES;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ES||(ES={}));function Elt(e){let{acceleration:t,activator:n=Py.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=ES.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:f,threshold:h}=e;const g=klt({delta:f,disabled:!o}),[y,b]=$at(),v=_.useRef({x:0,y:0}),S=_.useRef({x:0,y:0}),C=_.useMemo(()=>{switch(n){case Py.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Py.DraggableRect:return i}},[n,i,l]),w=_.useRef(null),A=_.useCallback(()=>{const D=w.current;if(!D)return;const O=v.current.x*S.current.x,T=v.current.y*S.current.y;D.scrollBy(O,T)},[]),E=_.useMemo(()=>a===ES.TreeOrder?[...c].reverse():c,[a,c]);_.useEffect(()=>{if(!o||!c.length||!C){b();return}for(const D of E){if(r?.(D)===!1)continue;const O=c.indexOf(D),T=u[O];if(!T)continue;const{direction:I,speed:N}=dlt(D,T,C,t,h);for(const $ of["x","y"])g[$][I[$]]||(N[$]=0,I[$]=0);if(N.x>0||N.y>0){b(),w.current=D,y(A,s),v.current=N,S.current=I;return}}v.current={x:0,y:0},S.current={x:0,y:0},b()},[t,A,r,b,o,s,JSON.stringify(C),JSON.stringify(g),y,c,E,u,JSON.stringify(h)])}const Alt={x:{[Xi.Backward]:!1,[Xi.Forward]:!1},y:{[Xi.Backward]:!1,[Xi.Forward]:!1}};function klt(e){let{delta:t,disabled:n}=e;const r=KD(t);return sv(i=>{if(n||!r||!i)return Alt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Xi.Backward]:i.x[Xi.Backward]||o.x===-1,[Xi.Forward]:i.x[Xi.Forward]||o.x===1},y:{[Xi.Backward]:i.y[Xi.Backward]||o.y===-1,[Xi.Forward]:i.y[Xi.Forward]||o.y===1}}},[n,t,r])}function _lt(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return sv(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function Dlt(e,t){return _.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var ib;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ib||(ib={}));var JD;(function(e){e.Optimized="optimized"})(JD||(JD={}));const IK=new Map;function Olt(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=_.useState(null),{frequency:a,measure:l,strategy:c}=i,u=_.useRef(e),f=v(),h=tb(f),g=_.useCallback(function(S){S===void 0&&(S=[]),!h.current&&s(C=>C===null?S:C.concat(S.filter(w=>!C.includes(w))))},[h]),y=_.useRef(null),b=sv(S=>{if(f&&!n)return IK;if(!S||S===IK||u.current!==e||o!=null){const C=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const A=w.node.current,E=A?new CI(l(A),A):null;w.rect.current=E,E&&C.set(w.id,E)}return C}return S},[e,o,n,f,l]);return _.useEffect(()=>{u.current=e},[e]),_.useEffect(()=>{f||g()},[n,f]),_.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),_.useEffect(()=>{f||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},a))},[a,f,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:o!=null};function v(){switch(c){case ib.Always:return!1;case ib.BeforeDragging:return n;default:return!n}}}function Ple(e,t){return sv(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Tlt(e,t){return Ple(e,t)}function Mlt(e){let{callback:t,disabled:n}=e;const r=SI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function GC(e){let{callback:t,disabled:n}=e;const r=SI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function Rlt(e){return new CI(pg(e),e)}function PK(e,t,n){t===void 0&&(t=Rlt);const[r,i]=_.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const s=Mlt({callback(l){if(e)for(const c of l){const{type:u,target:f}=c;if(u==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=GC({callback:o});return yc(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function Ilt(e){const t=Ple(e);return kle(e,t)}const jK=[];function Plt(e){const t=_.useRef(e),n=sv(r=>e?r&&r!==jK&&e&&t.current&&e.parentNode===t.current.parentNode?r:qC(e):jK,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function jlt(e){const[t,n]=_.useState(null),r=_.useRef(e),i=_.useCallback(o=>{const s=XA(o.target);s&&n(a=>a?(a.set(s,XD(s)),new Map(a)):null)},[]);return _.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const c=XA(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,XD(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const c=XA(l);c?.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>nm(o,s),sl):Rle(e):sl,[e,t])}function $K(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const r=e!==sl;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?nb(e,n.current):sl}function $lt(e){_.useEffect(()=>{if(!WC)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function Llt(e,t){return _.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function jle(e){return _.useMemo(()=>e?alt(e):null,[e])}const LK=[];function Nlt(e,t){t===void 0&&(t=pg);const[n]=e,r=jle(n?fs(n):null),[i,o]=_.useState(LK);function s(){o(()=>e.length?e.map(l=>Tle(l)?r:new CI(t(l),l)):LK)}const a=GC({callback:s});return yc(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function Flt(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ov(t)?t:e}function Blt(e){let{measure:t}=e;const[n,r]=_.useState(null),i=_.useCallback(c=>{for(const{target:u}of c)if(ov(u)){r(f=>{const h=t(u);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=GC({callback:i}),s=_.useCallback(c=>{const u=Flt(c);o?.disconnect(),u&&o?.observe(u),r(u?t(u):null)},[t,o]),[a,l]=wS(s);return _.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const zlt=[{sensor:kI,options:{}},{sensor:EI,options:{}}],Hlt={current:{}},k4={draggable:{measure:OK},droppable:{measure:OK,strategy:ib.WhileDragging,frequency:JD.Optimized},dragOverlay:{measure:pg}};class jy extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Ult={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jy,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:CS},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:k4,measureDroppableContainers:CS,windowRect:null,measuringScheduled:!1},Vlt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:CS,draggableNodes:new Map,over:null,measureDroppableContainers:CS},KC=_.createContext(Vlt),$le=_.createContext(Ult);function Wlt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jy}}}function qlt(e,t){switch(t.type){case Li.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Li.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Li.DragEnd:case Li.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Li.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new jy(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Li.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new jy(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Li.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new jy(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Glt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=_.useContext(KC),o=KD(r),s=KD(n?.id);return _.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!wI(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const f=Fat(u);if(f){f.focus();break}}})}},[r,t,i,s,o]),null}function Klt(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function Ylt(e){return _.useMemo(()=>({draggable:{...k4.draggable,...e?.draggable},droppable:{...k4.droppable,...e?.droppable},dragOverlay:{...k4.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Xlt(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=_.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;yc(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const u=n(c),f=kle(u,r);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=_le(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,r,n])}const Lle=_.createContext({...sl,scaleX:1,scaleY:1});var xd;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(xd||(xd={}));const Zlt=_.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:u=zlt,collisionDetection:f=elt,measuring:h,modifiers:g,...y}=t;const b=_.useReducer(qlt,void 0,Wlt),[v,S]=b,[C,w]=Wat(),[A,E]=_.useState(xd.Uninitialized),D=A===xd.Initialized,{draggable:{active:O,nodes:T,translate:I},droppable:{containers:N}}=v,$=O!=null?T.get(O):null,R=_.useRef({initial:null,translated:null}),F=_.useMemo(()=>{var Dt;return O!=null?{id:O,data:(Dt=$?.data)!=null?Dt:Hlt,rect:R}:null},[O,$]),j=_.useRef(null),[z,L]=_.useState(null),[q,V]=_.useState(null),U=tb(y,Object.values(y)),K=av("DndDescribedBy",s),B=_.useMemo(()=>N.getEnabled(),[N]),W=Ylt(h),{droppableRects:X,measureDroppableContainers:H,measuringScheduled:Y}=Olt(B,{dragging:D,dependencies:[I.x,I.y],config:W.droppable}),J=_lt(T,O),ne=_.useMemo(()=>q?YD(q):null,[q]),ee=yr(),se=Tlt(J,W.draggable.measure);Xlt({activeNode:O!=null?T.get(O):null,config:ee.layoutShiftCompensation,initialRect:se,measure:W.draggable.measure});const ue=PK(J,W.draggable.measure,se),te=PK(J?J.parentElement:null),Z=_.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=N.getNodeFor((n=Z.current.over)==null?void 0:n.id),oe=Blt({measure:W.dragOverlay.measure}),fe=(r=oe.nodeRef.current)!=null?r:J,be=D?(i=oe.rect)!=null?i:ue:null,De=!!(oe.nodeRef.current&&oe.rect),Oe=Ilt(De?null:ue),Ke=jle(fe?fs(fe):null),xe=Plt(D?re??J:null),Le=Nlt(xe),Me=Klt(g,{transform:{x:I.x-Oe.x,y:I.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:q,active:F,activeNodeRect:ue,containerNodeRect:te,draggingNodeRect:be,over:Z.current.over,overlayNodeRect:oe.rect,scrollableAncestors:xe,scrollableAncestorRects:Le,windowRect:Ke}),ht=ne?nm(ne,I):null,mt=jlt(xe),ze=$K(mt),Pe=$K(mt,[ue]),He=nm(Me,ze),Je=be?rlt(be,Me):null,nt=F&&Je?f({active:F,collisionRect:Je,droppableRects:X,droppableContainers:B,pointerCoordinates:ht}):null,ot=Ale(nt,"id"),[Xe,Lt]=_.useState(null),Nt=De?Me:nm(Me,Pe),Ot=tlt(Nt,(o=Xe?.rect)!=null?o:null,ue),Xn=_.useRef(null),rn=_.useCallback((Dt,jt)=>{let{sensor:Jt,options:jn}=jt;if(j.current==null)return;const on=T.get(j.current);if(!on)return;const St=Dt.nativeEvent,mn=new Jt({active:j.current,activeNode:on,event:St,options:jn,context:Z,onAbort(br){if(!T.get(br))return;const{onDragAbort:le}=U.current,pe={id:br};le?.(pe),C({type:"onDragAbort",event:pe})},onPending(br,ei,le,pe){if(!T.get(br))return;const{onDragPending:Fe}=U.current,Ue={id:br,constraint:ei,initialCoordinates:le,offset:pe};Fe?.(Ue),C({type:"onDragPending",event:Ue})},onStart(br){const ei=j.current;if(ei==null)return;const le=T.get(ei);if(!le)return;const{onDragStart:pe}=U.current,Se={activatorEvent:St,active:{id:ei,data:le.data,rect:R}};Dd.unstable_batchedUpdates(()=>{pe?.(Se),E(xd.Initializing),S({type:Li.DragStart,initialCoordinates:br,active:ei}),C({type:"onDragStart",event:Se}),L(Xn.current),V(St)})},onMove(br){S({type:Li.DragMove,coordinates:br})},onEnd:Qr(Li.DragEnd),onCancel:Qr(Li.DragCancel)});Xn.current=mn;function Qr(br){return async function(){const{active:le,collisions:pe,over:Se,scrollAdjustedTranslate:Fe}=Z.current;let Ue=null;if(le&&Fe){const{cancelDrop:yt}=U.current;Ue={activatorEvent:St,active:le,collisions:pe,delta:Fe,over:Se},br===Li.DragEnd&&typeof yt=="function"&&await Promise.resolve(yt(Ue))&&(br=Li.DragCancel)}j.current=null,Dd.unstable_batchedUpdates(()=>{S({type:br}),E(xd.Uninitialized),Lt(null),L(null),V(null),Xn.current=null;const yt=br===Li.DragEnd?"onDragEnd":"onDragCancel";if(Ue){const rt=U.current[yt];rt?.(Ue),C({type:yt,event:Ue})}})}}},[T]),at=_.useCallback((Dt,jt)=>(Jt,jn)=>{const on=Jt.nativeEvent,St=T.get(jn);if(j.current!==null||!St||on.dndKit||on.defaultPrevented)return;const mn={active:St};Dt(Jt,jt.options,mn)===!0&&(on.dndKit={capturedBy:jt.sensor},j.current=jn,rn(Jt,jt))},[T,rn]),Ht=Dlt(u,at);$lt(u),yc(()=>{ue&&A===xd.Initializing&&E(xd.Initialized)},[ue,A]),_.useEffect(()=>{const{onDragMove:Dt}=U.current,{active:jt,activatorEvent:Jt,collisions:jn,over:on}=Z.current;if(!jt||!Jt)return;const St={active:jt,activatorEvent:Jt,collisions:jn,delta:{x:He.x,y:He.y},over:on};Dd.unstable_batchedUpdates(()=>{Dt?.(St),C({type:"onDragMove",event:St})})},[He.x,He.y]),_.useEffect(()=>{const{active:Dt,activatorEvent:jt,collisions:Jt,droppableContainers:jn,scrollAdjustedTranslate:on}=Z.current;if(!Dt||j.current==null||!jt||!on)return;const{onDragOver:St}=U.current,mn=jn.get(ot),Qr=mn&&mn.rect.current?{id:mn.id,rect:mn.rect.current,data:mn.data,disabled:mn.disabled}:null,br={active:Dt,activatorEvent:jt,collisions:Jt,delta:{x:on.x,y:on.y},over:Qr};Dd.unstable_batchedUpdates(()=>{Lt(Qr),St?.(br),C({type:"onDragOver",event:br})})},[ot]),yc(()=>{Z.current={activatorEvent:q,active:F,activeNode:J,collisionRect:Je,collisions:nt,droppableRects:X,draggableNodes:T,draggingNode:fe,draggingNodeRect:be,droppableContainers:N,over:Xe,scrollableAncestors:xe,scrollAdjustedTranslate:He},R.current={initial:be,translated:Je}},[F,J,nt,Je,T,fe,be,X,N,Xe,xe,He]),Elt({...ee,delta:I,draggingRect:Je,pointerCoordinates:ht,scrollableAncestors:xe,scrollableAncestorRects:Le});const Dn=_.useMemo(()=>({active:F,activeNode:J,activeNodeRect:ue,activatorEvent:q,collisions:nt,containerNodeRect:te,dragOverlay:oe,draggableNodes:T,droppableContainers:N,droppableRects:X,over:Xe,measureDroppableContainers:H,scrollableAncestors:xe,scrollableAncestorRects:Le,measuringConfiguration:W,measuringScheduled:Y,windowRect:Ke}),[F,J,ue,q,nt,te,oe,T,N,X,Xe,H,xe,Le,W,Y,Ke]),Gn=_.useMemo(()=>({activatorEvent:q,activators:Ht,active:F,activeNodeRect:ue,ariaDescribedById:{draggable:K},dispatch:S,draggableNodes:T,over:Xe,measureDroppableContainers:H}),[q,Ht,F,ue,S,K,T,Xe,H]);return qt.createElement(wle.Provider,{value:w},qt.createElement(KC.Provider,{value:Gn},qt.createElement($le.Provider,{value:Dn},qt.createElement(Lle.Provider,{value:Ot},c)),qt.createElement(Glt,{disabled:a?.restoreFocus===!1})),qt.createElement(Kat,{...a,hiddenTextDescribedById:K}));function yr(){const Dt=z?.autoScrollEnabled===!1,jt=typeof l=="object"?l.enabled===!1:l===!1,Jt=D&&!Dt&&!jt;return typeof l=="object"?{...l,enabled:Jt}:{enabled:Jt}}}),Jlt=_.createContext(null),NK="button",Qlt="Draggable";function ect(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=av(Qlt),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:f,over:h}=_.useContext(KC),{role:g=NK,roleDescription:y="draggable",tabIndex:b=0}=i??{},v=l?.id===t,S=_.useContext(v?Lle:Jlt),[C,w]=wS(),[A,E]=wS(),D=Llt(s,t),O=tb(n);yc(()=>(f.set(t,{id:t,key:o,node:C,activatorNode:A,data:O}),()=>{const I=f.get(t);I&&I.key===o&&f.delete(t)}),[f,t]);const T=_.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":v&&g===NK?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[r,g,b,v,y,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:T,isDragging:v,listeners:r?void 0:D,node:C,over:h,setNodeRef:w,setActivatorNodeRef:E,transform:S}}function tct(){return _.useContext($le)}const nct="Droppable",rct={timeout:25};function ict(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=av(nct),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=_.useContext(KC),u=_.useRef({disabled:n}),f=_.useRef(!1),h=_.useRef(null),g=_.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:v}={...rct,...i},S=tb(b??r),C=_.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),g.current=null},v)},[v]),w=GC({callback:C,disabled:y||!s}),A=_.useCallback((T,I)=>{w&&(I&&(w.unobserve(I),f.current=!1),T&&w.observe(T))},[w]),[E,D]=wS(A),O=tb(t);return _.useEffect(()=>{!w||!E.current||(w.disconnect(),f.current=!1,w.observe(E.current))},[E,w]),_.useEffect(()=>(a({type:Li.RegisterDroppable,element:{id:r,key:o,disabled:n,node:E,rect:h,data:O}}),()=>a({type:Li.UnregisterDroppable,key:o,id:r})),[r]),_.useEffect(()=>{n!==u.current.disabled&&(a({type:Li.SetDroppableDisabled,id:r,key:o,disabled:n}),u.current.disabled=n)},[r,o,n,a]),{active:s,rect:h,isOver:l?.id===r,node:E,over:l,setNodeRef:D}}function _I(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function oct(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function A5(e){return e!==null&&e>=0}function sct(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function act(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Nle=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=_I(t,r,n),s=t[i],a=o[i];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},k5={scaleX:1,scaleY:1},lct=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:s}=e;const a=(t=o[n])!=null?t:r;if(!a)return null;if(i===n){const c=o[s];return c?{x:0,y:n<s?c.top+c.height-(a.top+a.height):c.top-a.top,...k5}:null}const l=cct(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...k5}:i<n&&i>=s?{x:0,y:a.height+l,...k5}:{x:0,y:0,...k5}};function cct(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const Fle="Sortable",Ble=qt.createContext({activeIndex:-1,containerId:Fle,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Nle,disabled:{draggable:!1,droppable:!1}});function uct(e){let{children:t,id:n,items:r,strategy:i=Nle,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=tct(),f=av(Fle,n),h=a.rect!==null,g=_.useMemo(()=>r.map(D=>typeof D=="object"&&"id"in D?D.id:D),[r]),y=s!=null,b=s?g.indexOf(s.id):-1,v=c?g.indexOf(c.id):-1,S=_.useRef(g),C=!sct(g,S.current),w=v!==-1&&b===-1||C,A=act(o);yc(()=>{C&&y&&u(g)},[C,g,y,u]),_.useEffect(()=>{S.current=g},[g]);const E=_.useMemo(()=>({activeIndex:b,containerId:f,disabled:A,disableTransforms:w,items:g,overIndex:v,useDragOverlay:h,sortedRects:oct(g,l),strategy:i}),[b,f,A.draggable,A.droppable,w,g,v,l,h,i]);return qt.createElement(Ble.Provider,{value:E},t)}const dct=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return _I(n,r,i).indexOf(t)},fct=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===l},hct={duration:200,easing:"ease"},zle="transform",pct=rb.Transition.toString({property:zle,duration:0,easing:"linear"}),mct={roleDescription:"sortable"};function gct(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=_.useState(null),a=_.useRef(n);return yc(()=>{if(!t&&n!==a.current&&r.current){const l=i.current;if(l){const c=pg(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u)}}n!==a.current&&(a.current=n)},[t,n,r,i]),_.useEffect(()=>{o&&s(null)},[o]),o}function yct(e){let{animateLayoutChanges:t=fct,attributes:n,disabled:r,data:i,getNewIndex:o=dct,id:s,strategy:a,resizeObserverConfig:l,transition:c=hct}=e;const{items:u,containerId:f,activeIndex:h,disabled:g,disableTransforms:y,sortedRects:b,overIndex:v,useDragOverlay:S,strategy:C}=_.useContext(Ble),w=bct(r,g),A=u.indexOf(s),E=_.useMemo(()=>({sortable:{containerId:f,index:A,items:u},...i}),[f,i,A,u]),D=_.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:O,node:T,isOver:I,setNodeRef:N}=ict({id:s,data:E,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...l}}),{active:$,activatorEvent:R,activeNodeRect:F,attributes:j,setNodeRef:z,listeners:L,isDragging:q,over:V,setActivatorNodeRef:U,transform:K}=ect({id:s,data:E,attributes:{...mct,...n},disabled:w.draggable}),B=jat(N,z),W=!!$,X=W&&!y&&A5(h)&&A5(v),H=!S&&q,Y=H&&X?K:null,ne=X?Y??(a??C)({rects:b,activeNodeRect:F,activeIndex:h,overIndex:v,index:A}):null,ee=A5(h)&&A5(v)?o({id:s,items:u,activeIndex:h,overIndex:v}):A,se=$?.id,ue=_.useRef({activeId:se,items:u,newIndex:ee,containerId:f}),te=u!==ue.current.items,Z=t({active:$,containerId:f,isDragging:q,isSorting:W,id:s,index:A,items:u,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:c,wasDragging:ue.current.activeId!=null}),re=gct({disabled:!Z,index:A,node:T,rect:O});return _.useEffect(()=>{W&&ue.current.newIndex!==ee&&(ue.current.newIndex=ee),f!==ue.current.containerId&&(ue.current.containerId=f),u!==ue.current.items&&(ue.current.items=u)},[W,ee,f,u]),_.useEffect(()=>{if(se===ue.current.activeId)return;if(se!=null&&ue.current.activeId==null){ue.current.activeId=se;return}const fe=setTimeout(()=>{ue.current.activeId=se},50);return()=>clearTimeout(fe)},[se]),{active:$,activeIndex:h,attributes:j,data:E,rect:O,index:A,newIndex:ee,items:u,isOver:I,isSorting:W,isDragging:q,listeners:L,node:T,overIndex:v,over:V,setNodeRef:B,setActivatorNodeRef:U,setDroppableNodeRef:N,setDraggableNodeRef:z,transform:re??ne,transition:oe()};function oe(){if(re||te&&ue.current.newIndex===A)return pct;if(!(H&&!wI(R)||!c)&&(W||Z))return rb.Transition.toString({...c,property:zle})}}function bct(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function AS(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const vct=[Ln.Down,Ln.Right,Ln.Up,Ln.Left],xct=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:s,scrollableAncestors:a}}=t;if(vct.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case Ln.Down:r.top<h.top&&l.push(f);break;case Ln.Up:r.top>h.top&&l.push(f);break;case Ln.Left:r.left>h.left&&l.push(f);break;case Ln.Right:r.left<h.left&&l.push(f);break}});const c=Jat({collisionRect:r,droppableRects:i,droppableContainers:l});let u=Ale(c,"id");if(u===s?.id&&c.length>1&&(u=c[1].id),u!=null){const f=o.get(n.id),h=o.get(u),g=h?i.get(h.id):null,y=h?.node.current;if(y&&g&&f&&h){const v=qC(y).some((D,O)=>a[O]!==D),S=Hle(f,h),C=Sct(f,h),w=v||!S?{x:0,y:0}:{x:C?r.width-g.width:0,y:C?r.height-g.height:0},A={x:g.left,y:g.top};return w.x&&w.y?A:nb(A,w)}}}};function Hle(e,t){return!AS(e)||!AS(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Sct(e,t){return!AS(e)||!AS(t)||!Hle(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const wct=({bridge:e,index:t})=>{const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:a}=yct({id:e.id}),[l,c]=_.useState(!1);_.useEffect(()=>{_w(e.id).then(c)},[e.id]);const u={transform:rb.Transform.toString(o),transition:s,opacity:a?.5:1};return m.jsx(tr,{ref:i,style:u,variant:"outlined",sx:{cursor:"grab","&:active":{cursor:"grabbing"},bgcolor:a?"action.selected":"background.paper",width:"fit-content"},children:m.jsxs(gr,{sx:{display:"flex",alignItems:"center",gap:1.5,py:1,"&:last-child":{pb:1}},children:[m.jsx(ce,{...n,...r,sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:m.jsx(QCe,{})}),m.jsx(Et,{label:t+1,size:"small",color:"primary",sx:{minWidth:32,fontWeight:"bold"}}),l?m.jsx(ce,{component:"img",src:t2(e.id),alt:e.name,sx:{width:40,height:40,borderRadius:"50%",objectFit:"cover",boxShadow:2}}):m.jsx(rl,{sx:{bgcolor:MT(e),width:40,height:40,boxShadow:2},children:(()=>{const f=TT(e);return m.jsx(f,{sx:{fontSize:24}})})()}),m.jsxs(ce,{sx:{flex:1},children:[m.jsx(ie,{variant:"subtitle1",fontWeight:500,children:e.name}),m.jsxs(ie,{variant:"caption",color:"text.secondary",children:["Port: ",e.port," • Priority: ",e.priority??100]})]})]})})},Cct=()=>{const e=Tu(),{content:t,isLoading:n}=Vm(),r=SCe(),[i,o]=_.useState([]),[s,a]=_.useState(!1);_.useEffect(()=>{if(t){const h=[...t].sort((g,y)=>{const b=g.priority??100,v=y.priority??100;return b-v});o(h),a(!1)}},[t]);const l=Yat(kK(kI),kK(EI,{coordinateGetter:xct})),c=_.useCallback(h=>{const{active:g,over:y}=h;y&&g.id!==y.id&&(o(b=>{const v=b.findIndex(C=>C.id===g.id),S=b.findIndex(C=>C.id===y.id);return _I(b,v,S)}),a(!0))},[]),u=_.useCallback(async()=>{const h=i.map((g,y)=>({id:g.id,priority:(y+1)*10}));try{await r(h),e.show({message:"Startup order saved successfully",severity:"success"}),a(!1)}catch(g){e.show({message:g instanceof Error?g.message:"Failed to save startup order",severity:"error"})}},[i,r,e]),f=_.useMemo(()=>i.map(h=>h.id),[i]);return n?m.jsx(ie,{children:"Loading..."}):m.jsxs(zt,{spacing:3,children:[m.jsx(lw,{items:[{name:"Bridges",to:Pt.bridges},{name:"Startup Order",to:Pt.startup}]}),m.jsxs(ce,{display:"flex",alignItems:"center",gap:2,children:[m.jsx(yb,{color:"primary",fontSize:"large"}),m.jsxs(ce,{children:[m.jsx(ie,{variant:"h5",fontWeight:600,children:"Startup Order"}),m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Drag and drop bridges to set the startup order. Lower positions start first."})]})]}),s&&m.jsx(vn,{severity:"info",action:m.jsx(kt,{color:"inherit",size:"small",startIcon:m.jsx(n6,{}),onClick:u,children:"Save Changes"}),children:"You have unsaved changes to the startup order."}),m.jsx(Zlt,{sensors:l,collisionDetection:Zat,onDragEnd:c,children:m.jsx(uct,{items:f,strategy:lct,children:m.jsx(zt,{spacing:1,children:i.map((h,g)=>m.jsx(wct,{bridge:h,index:g},h.id))})})}),i.length===0&&m.jsx(ie,{color:"text.secondary",textAlign:"center",py:4,children:"No bridges configured yet."}),s&&i.length>0&&m.jsx(ce,{display:"flex",justifyContent:"flex-end",children:m.jsx(kt,{variant:"contained",startIcon:m.jsx(n6,{}),onClick:u,children:"Save Startup Order"})})]})},QA="https://riddix.github.io/home-assistant-matter-hub",Pt={dashboard:"/",bridges:"/bridges",bridge:e=>`/bridges/${e}`,createBridge:"/bridges/create",editBridge:e=>`/bridges/${e}/edit`,devices:"/devices",networkMap:"/network-map",health:"/health",labels:"/labels",lockCredentials:"/lock-credentials",settings:"/settings",startup:"/startup",githubRepository:"https://github.com/riddix/home-assistant-matter-hub/",documentation:QA,faq:{multiFabric:`${QA}/connect-multiple-fabrics`,bridgeConfig:`${QA}/bridge-configuration`}},Ect=[{path:"",element:m.jsx(_2e,{}),children:[{path:"",element:m.jsx(u9e,{})},{path:Pt.bridges,element:m.jsx(a9e,{})},{path:Pt.createBridge,element:m.jsx(JQe,{})},{path:Pt.bridge(":bridgeId"),element:m.jsx(ICe,{})},{path:Pt.editBridge(":bridgeId"),element:m.jsx(QQe,{})},{path:Pt.devices,element:m.jsx(D9e,{})},{path:Pt.networkMap,element:m.jsx(Tat,{})},{path:Pt.health,element:m.jsx(aet,{})},{path:Pt.labels,element:m.jsx(fet,{})},{path:Pt.lockCredentials,element:m.jsx(bet,{})},{path:Pt.settings,element:m.jsx(Pat,{})},{path:Pt.startup,element:m.jsx(Cct,{})},{path:"*",element:m.jsx(vet,{})}]}],Act={items:{isInitialized:!1,isLoading:!1}},kct=FO(Act,e=>{e.addCase(Bo.pending,t=>{t.items.isLoading=!0}).addCase(Bo.rejected,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=void 0,t.items.error=n.error}).addCase(Bo.fulfilled,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(zX.fulfilled,(t,n)=>{t.items.content?.push(n.payload)}).addCase(UX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(VX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(HX.fulfilled,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.meta.arg);r!==-1&&t.items.content.splice(r,1)}}).addCase(WX,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(qX,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.payload.id);r!==-1?t.items.content[r]=n.payload:t.items.content.push(n.payload)}})}),_ct={byBridge:{}},Dct=FO(_ct,e=>{e.addCase(du.pending,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)}).addCase(du.rejected,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)}).addCase(du.fulfilled,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)})}),Oct={isInitialized:!1,isLoading:!1,content:void 0,error:void 0},ek=FO(Oct,e=>{e.addCase(du.pending,t=>{t.isLoading=!0}).addCase(du.rejected,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=void 0,t.error=n.error}).addCase(du.fulfilled,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=n.payload,t.error=void 0})}),Tct=l2e({reducer:{bridges:kct,devices:Dct}}),DI=Wme({createStyledComponent:me("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ye(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>it({props:e,name:"MuiContainer"})});function Mct(e){return Qe("MuiToolbar",e)}tt("MuiToolbar",["root","gutters","regular","dense"]);const Rct=e=>{const{classes:t,disableGutters:n,variant:r}=e;return et({root:["root",!n&&"gutters",r]},Mct,t)},Ict=me("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ge(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),Ule=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular",...l}=r,c={...r,component:o,disableGutters:s,variant:a},u=Rct(c);return m.jsx(Ict,{as:o,className:Te(u.root,i),ref:n,ownerState:c,...l})});class Pct extends _.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught:",t,n.componentStack)}render(){return this.state.hasError?m.jsxs(ce,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"60vh",gap:2,p:4,children:[m.jsx(KO,{color:"error",sx:{fontSize:64}}),m.jsx(ie,{variant:"h5",fontWeight:600,children:"Something went wrong"}),m.jsx(ie,{variant:"body2",color:"text.secondary",textAlign:"center",maxWidth:480,children:this.state.error?.message??"An unexpected error occurred."}),m.jsx(kt,{variant:"contained",onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},children:"Reload Page"})]}):this.props.children}}const jct=[{name:"GitHub",url:Pt.githubRepository},{name:"Documentation",url:Pt.documentation}],$ct=()=>m.jsxs(DI,{sx:{mt:16,mb:4},children:[m.jsx(gi,{sx:{mt:4,mb:4}}),m.jsx(dt,{container:!0,spacing:2,justifyContent:"center",children:jct.map((e,t)=>m.jsx(dt,{size:{xs:12,sm:"auto"},children:m.jsx(kt,{fullWidth:!0,size:"small",variant:"outlined",component:aw,href:e.url,target:"_blank",children:e.name})},t.toString()))})]});function Lct(e){return Qe("MuiAppBar",e)}tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Nct=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ye(t)}`,`position${ye(n)}`]};return et(i,Lct,r)},FK=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,Fct=me(Ur,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ye(n.position)}`],t[`color${ye(n.color)}`]]}})(Ge(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Fn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?FK(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?FK(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),Bct=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=r,c={...r,color:o,position:a,enableColorOnDark:s},u=Nct(c);return m.jsx(Fct,{square:!0,component:"header",ownerState:c,elevation:4,className:Te(u.root,i,a==="fixed"&&"mui-fixed"),ref:n,...l})});function zct(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=tl(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function Hct(e){return typeof e=="function"?e():e}function _5(e,t,n){const r=Hct(n),i=zct(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const Uct=_.forwardRef(function(t,n){const r=ro(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:f=i,in:h,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:S,onExiting:C,style:w,timeout:A=o,TransitionComponent:E=Ta,...D}=t,O=_.useRef(null),T=Tr(gf(l),O,n),I=V=>U=>{V&&(U===void 0?V(O.current):V(O.current,U))},N=I((V,U)=>{_5(u,V,c),IO(V),g&&g(V,U)}),$=I((V,U)=>{const K=Kd({timeout:A,style:w,easing:f},{mode:"enter"});V.style.webkitTransition=r.transitions.create("-webkit-transform",{...K}),V.style.transition=r.transitions.create("transform",{...K}),V.style.webkitTransform="none",V.style.transform="none",b&&b(V,U)}),R=I(y),F=I(C),j=I(V=>{const U=Kd({timeout:A,style:w,easing:f},{mode:"exit"});V.style.webkitTransition=r.transitions.create("-webkit-transform",U),V.style.transition=r.transitions.create("transform",U),_5(u,V,c),v&&v(V)}),z=I(V=>{V.style.webkitTransition="",V.style.transition="",S&&S(V)}),L=V=>{s&&s(O.current,V)},q=_.useCallback(()=>{O.current&&_5(u,O.current,c)},[u,c]);return _.useEffect(()=>{if(h||u==="down"||u==="right")return;const V=OO(()=>{O.current&&_5(u,O.current,c)}),U=tl(O.current);return U.addEventListener("resize",V),()=>{V.clear(),U.removeEventListener("resize",V)}},[u,h,c]),_.useEffect(()=>{h||q()},[h,q]),m.jsx(E,{nodeRef:O,onEnter:N,onEntered:R,onEntering:$,onExit:j,onExited:z,onExiting:F,addEndListener:L,appear:a,in:h,timeout:A,...D,children:(V,{ownerState:U,...K})=>_.cloneElement(l,{ref:T,style:{visibility:V==="exited"&&!h?"hidden":void 0,...w,...l.props.style},...K})})});function Vct(e){return Qe("MuiDrawer",e)}tt("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Vle=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},Wct=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${ye(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ye(n)}`,r!=="temporary"&&`paperAnchorDocked${ye(n)}`]};return et(i,Vct,t)},qct=me(ZO,{name:"MuiDrawer",slot:"Root",overridesResolver:Vle})(Ge(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),Gct=me("div",{shouldForwardProp:io,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Vle})({flex:"0 0 auto"}),Kct=me(Ur,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ye(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ye(n.anchor)}`]]}})(Ge(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Wle={left:"right",right:"left",top:"down",bottom:"up"};function Yct(e){return["left","right"].includes(e)}function Xct({direction:e},t){return e==="rtl"&&Yct(t)?Wle[t]:t}const Zct=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiDrawer"}),i=ro(),o=mf(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:g,...y}={},onClose:b,open:v=!1,PaperProps:S={},SlideProps:C,TransitionComponent:w,transitionDuration:A=s,variant:E="temporary",slots:D={},slotProps:O={},...T}=r,I=_.useRef(!1);_.useEffect(()=>{I.current=!0},[]);const N=Xct({direction:o?"rtl":"ltr"},a),R={...r,anchor:a,elevation:f,open:v,variant:E,...T},F=Wct(R),j={slots:{transition:w,...D},slotProps:{paper:S,transition:C,...O,backdrop:TO(O.backdrop||{...l,...g},{transitionDuration:A})}},[z,L]=lt("root",{ref:n,elementType:qct,className:Te(F.root,F.modal,u),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...j,...T,...y},additionalProps:{open:v,onClose:b,hideBackdrop:h,slots:{backdrop:j.slots.backdrop},slotProps:{backdrop:j.slotProps.backdrop}}}),[q,V]=lt("paper",{elementType:Kct,shouldForwardComponentProp:!0,className:Te(F.paper,S.className),ownerState:R,externalForwardedProps:j,additionalProps:{elevation:E==="temporary"?f:0,square:!0,...E==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[U,K]=lt("docked",{elementType:Gct,ref:n,className:Te(F.root,F.docked,u),ownerState:R,externalForwardedProps:j,additionalProps:T}),[B,W]=lt("transition",{elementType:Uct,ownerState:R,externalForwardedProps:j,additionalProps:{in:v,direction:Wle[N],timeout:A,appear:I.current}}),X=m.jsx(q,{...V,children:c});if(E==="permanent")return m.jsx(U,{...K,children:X});const H=m.jsx(B,{...W,children:X});return E==="persistent"?m.jsx(U,{...K,children:H}):m.jsx(z,{...L,children:H})}),Jct=XY({themeId:da}),Qct={error:vf,warn:iw,info:YO,debug:Aw},eut=({open:e,onClose:t})=>{const n=ro(),r=_.useMemo(()=>({error:n.palette.error.main,warn:n.palette.warning.main,info:n.palette.info.main,debug:n.palette.secondary.main}),[n]),[i,o]=_.useState([]),[s,a]=_.useState(!0),[l,c]=_.useState("error,warn,info".split(",")),[u,f]=_.useState(""),[h,g]=_.useState(!0),y=_.useCallback(async()=>{try{const w=new URLSearchParams({level:l.join(","),limit:"500",...u&&{search:u}}),A=await fetch(`api/logs?${w}`);if(A.ok){const E=await A.json();o(E.entries)}}catch(w){console.error("Failed to fetch logs:",w)}finally{a(!1)}},[l,u]);_.useEffect(()=>{e&&y()},[e,y]),_.useEffect(()=>{if(!h||!e)return;const w=setInterval(y,5e3);return()=>clearInterval(w)},[h,e,y]);const b=w=>{c(Array.isArray(w.target.value)?w.target.value:[w.target.value])},v=w=>{f(w.target.value)},S=async()=>{try{await fetch("api/logs",{method:"DELETE"}),o([])}catch(w){console.error("Failed to clear logs:",w)}},C=w=>{const A=Qct[w]||YO;return m.jsx(A,{sx:{fontSize:16,color:r[w]}})};return m.jsxs(vu,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,children:[m.jsxs(Su,{sx:{display:"flex",alignItems:"center",gap:1},children:[m.jsx(Aw,{}),"System Logs",m.jsx(ce,{sx:{flexGrow:1}}),m.jsx(cn,{title:"Auto Refresh",children:m.jsx(Et,{label:h?"Auto":"Manual",color:h?"success":"default",size:"small",onClick:()=>g(!h),sx:{cursor:"pointer"}})}),m.jsx(_n,{onClick:t,children:m.jsx(qCe,{})})]}),m.jsxs(xu,{children:[m.jsx(zt,{spacing:2,sx:{mb:2},children:m.jsxs(zt,{direction:"row",spacing:2,alignItems:"center",children:[m.jsxs(pa,{size:"small",sx:{minWidth:200},children:[m.jsx(sc,{children:"Log Level"}),m.jsxs(sa,{value:l,label:"Log Level",onChange:b,multiple:!0,renderValue:w=>m.jsx(ce,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(Array.isArray(w)?w:[w]).map(A=>m.jsx(Et,{label:A.toUpperCase(),size:"small",sx:{backgroundColor:r[A],color:"white"}},A))}),children:[m.jsx(er,{value:"error",children:"Error"}),m.jsx(er,{value:"warn",children:"Warning"}),m.jsx(er,{value:"info",children:"Info"}),m.jsx(er,{value:"debug",children:"Debug"})]})]}),m.jsx(Lr,{size:"small",placeholder:"Search logs...",value:u,onChange:v,sx:{flexGrow:1}}),m.jsx(kt,{variant:"outlined",onClick:y,children:"Refresh"}),m.jsx(kt,{variant:"outlined",color:"error",onClick:S,children:"Clear"})]})}),m.jsx(ce,{sx:{height:400,overflow:"auto",backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1},children:s?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(ie,{children:"Loading logs..."})}):i.length===0?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(ie,{color:"text.secondary",children:"No logs found"})}):m.jsx(zt,{spacing:1,children:i.map((w,A)=>m.jsxs(ce,{sx:{p:1,borderRadius:1,backgroundColor:"action.hover",fontFamily:"monospace",fontSize:"0.875rem",wordBreak:"break-all"},children:[m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[C(w.level),m.jsx(ie,{variant:"caption",color:"text.secondary",children:new Date(w.timestamp).toLocaleString()}),m.jsx(Et,{label:w.level.toUpperCase(),size:"small",sx:{backgroundColor:r[w.level],color:n.palette.getContrastText(r[w.level]??n.palette.grey[500]),fontSize:"0.7rem",height:20}})]}),m.jsx(ie,{sx:{ml:3},children:w.message}),w.context&&m.jsx(ie,{sx:{ml:3,color:"text.secondary",fontSize:"0.8rem"},children:JSON.stringify(w.context,null,2)})]},`${w.timestamp}-${w.level}-${A}`))})})]}),m.jsx(Xd,{children:m.jsx(kt,{onClick:t,children:"Close"})})]})};function BK(){const{isConnected:e}=A2e(),[t,n]=_.useState(null),[r,i]=_.useState(!1);_.useEffect(()=>{const y=async()=>{try{const v=await fetch("api/health");if(v.ok){const S=await v.json();n(S),i(!1)}else i(!0)}catch{i(!0)}};y();const b=setInterval(y,3e4);return()=>clearInterval(b)},[]);const o=y=>{const b=Math.floor(y/3600),v=Math.floor(y%3600/60);return b>0?`${b}h ${v}m`:`${v}m`},s=t?.status==="healthy"&&!r,a=t?.services?.bridges,l=a&&a.total>0&&a.running===a.total,c=a&&a.total===0,u=t?m.jsxs(ce,{sx:{p:.5},children:[m.jsxs("div",{children:[m.jsx("strong",{children:"Version:"})," ",t.version??"Unknown"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"Uptime:"})," ",o(t.uptime??0)]}),t.services?.bridges&&m.jsxs("div",{children:[m.jsx("strong",{children:"Bridges:"})," ",t.services.bridges.running??0,"/",t.services.bridges.total??0," running",(t.services.bridges.stopped??0)>0&&` (${t.services.bridges.stopped} stopped)`]}),t.services?.homeAssistant&&m.jsxs("div",{children:[m.jsx("strong",{children:"Home Assistant:"})," ",t.services.homeAssistant.connected?"Connected":"Disconnected"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"WebSocket:"})," ",e?"Connected":"Disconnected"]})]}):"Loading health status...",f=()=>r||!s?m.jsx(vf,{fontSize:"small"}):l?m.jsx(Mu,{fontSize:"small"}):m.jsx(dw,{fontSize:"small"}),h=()=>r||!s?"error":!l||!e?"warning":"success",g=()=>r?"Error":s?e?c?"No Bridges":l?"Online":"Starting":"Offline":"Unhealthy";return m.jsx(cn,{title:u,arrow:!0,children:m.jsx(Et,{icon:f(),label:g(),color:h(),size:"small",variant:"filled",sx:{borderRadius:1,fontWeight:600,"& .MuiChip-icon":{color:"inherit"}}})})}const tut=e=>_.createElement("svg",{viewBox:"0 0 91 89",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{style:{display:"inline"}},_.createElement("path",{style:{fill:"#18bcf2",fillOpacity:1,strokeWidth:.266194},d:"m 49.149143,1.473171 38.513568,38.536435 c 0,0 1.248354,1.186052 2.207681,3.092371 0.959329,1.906323 1.10864,4.600698 1.10864,4.600698 v 36.786372 c 0,0 -0.01549,1.748506 -1.49842,3.050572 -1.482931,1.302064 -3.333077,1.362947 -3.333077,1.362947 l -81.325658,7.7e-5 c 0,0 -1.7523855,-0.0091 -3.17112,-1.352526 C -0.07808495,85.913164 0.05953025,84.487808 0.05953025,84.487808 V 47.704546 c 0,0 -0.0018381,-2.218618 0.95921785,-4.315832 0.9610554,-2.097209 2.3010618,-3.355005 2.3010618,-3.355005 L 41.545959,1.4719546 c 0,0 1.465224,-1.46837077 3.753488,-1.46837077 2.288268,0 3.849696,1.46958717 3.849696,1.46958717 z"}),_.createElement("path",{style:{fill:"#ffffff",fillOpacity:1,strokeWidth:.175841},d:"m 31.689717,32.051124 c 2.813363,2.331095 6.157331,3.89845 9.721813,4.556421 V 17.180647 l 3.873694,-2.282955 3.870527,2.282955 V 36.60772 c 3.565364,-0.658847 6.910387,-2.226204 9.725159,-4.556417 l 7.032345,4.154609 c -11.437354,11.557779 -29.852321,11.557779 -41.290025,0 z m 8.546732,49.60988 C 44.314996,65.760441 35.09933,49.470196 19.574984,45.139543 v 8.312381 c 3.383916,1.32244 6.386113,3.496288 8.728705,6.320026 L 11.83076,69.485301 v 4.56907 l 3.873697,2.270836 16.469936,-9.713534 c 1.224356,3.48294 1.56683,7.225375 0.996449,10.879778 z M 70.977694,45.139543 c -15.515726,4.34014 -24.72189,20.626696 -20.643519,36.521461 l 7.047658,-4.15742 c -0.569325,-3.654411 -0.2265,-7.3965 0.996449,-10.87979 l 16.457611,9.701233 3.870711,-2.283125 v -4.55677 L 62.233673,59.77195 c 2.342772,-2.822684 5.34497,-4.996533 8.728708,-6.320026 z"}))),nut="home-assistant-matter-hub",rut={name:nut};function iut(){const[e,t]=_.useState("2.1.0-alpha.439");return _.useEffect(()=>{fetch("api/health").then(n=>n.ok?n.json():null).then(n=>{n?.version&&t(n.version)}).catch(()=>{})},[]),_.useMemo(()=>({name:rut.name,version:e}),[e])}const out=e=>{const t=iut();return m.jsxs(ce,{component:Du,to:Pt.dashboard,sx:{display:"flex",alignItems:"center",justifyContent:e.large?"flex-start":"center",flexGrow:1,textDecoration:"none",color:"inherit"},children:[m.jsx(tut,{style:{height:"40px"}}),m.jsx(ie,{variant:"inherit",component:"span",sx:{mr:1,ml:1},children:t.name.split("-").map(ye).join("-")}),e.large&&m.jsx(ie,{variant:"caption",component:"span",children:t.version})]})},sut=()=>{const e=Jct("(min-width:600px)"),{mode:t,setMode:n}=KS(),[r,i]=_.useState(!1),[o,s]=_.useState(!1),a=hf(),l=()=>{n(t==="dark"?"light":"dark")},c=[{label:"Dashboard",icon:m.jsx(CT,{}),to:Pt.dashboard},{label:"Bridges",icon:m.jsx(t6,{}),to:Pt.bridges},{label:"All Devices",icon:m.jsx(Fs,{}),to:Pt.devices},{label:"Network Map",icon:m.jsx(bT,{}),to:Pt.networkMap},{label:"Startup Order",icon:m.jsx(yb,{}),to:Pt.startup},{label:"Lock Credentials",icon:m.jsx(uu,{}),to:Pt.lockCredentials},{label:"Filter Reference",icon:m.jsx(ET,{}),to:Pt.labels},{label:"Settings",icon:m.jsx(wb,{}),to:Pt.settings},{label:t==="dark"?"Light Mode":"Dark Mode",icon:t==="dark"?m.jsx(a8e,{}):m.jsx(YCe,{}),onClick:l},{label:"System Logs",icon:m.jsx(Aw,{}),onClick:()=>i(!0)},{label:"Health Dashboard",icon:m.jsx(QO,{}),to:Pt.health}],u=f=>{s(!1),f.onClick?f.onClick():f.to&&a(f.to)};return m.jsxs(ce,{children:[m.jsx(Bct,{sx:{height:"72px"},children:m.jsx(Ule,{sx:{paddingLeft:"0 !important",paddingRight:"0 !important"},children:m.jsxs(DI,{sx:{padding:2,height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m.jsx(out,{large:e}),e?m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.map(f=>f.to?m.jsx(cn,{title:f.label,children:m.jsx(_n,{component:Du,to:f.to,sx:{color:"inherit"},children:f.icon})},f.label):m.jsx(cn,{title:f.label,children:m.jsx(_n,{onClick:f.onClick,sx:{color:"inherit"},children:f.icon})},f.label)),m.jsx(BK,{})]}):m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:.5},children:[m.jsx(BK,{}),m.jsx(_n,{onClick:()=>s(!0),sx:{color:"inherit"},children:m.jsx(l8e,{})})]})]})})}),m.jsx(Zct,{anchor:"right",open:o,onClose:()=>s(!1),children:m.jsx(bc,{sx:{width:250},children:c.map(f=>m.jsxs(obe,{onClick:()=>u(f),children:[m.jsx(Ul,{children:f.icon}),m.jsx(Va,{primary:f.label})]},f.label))})}),m.jsx(eut,{open:r,onClose:()=>i(!1)})]})},aut=()=>m.jsxs(ce,{children:[m.jsx(sut,{}),m.jsx(Ule,{}),m.jsx(DI,{sx:{p:2},children:m.jsx(Pct,{children:m.jsx(yY,{})})}),m.jsx($ct,{})]}),lut=WS({colorSchemes:{light:{palette:{primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2"},background:{default:"#f5f5f5",paper:"#ffffff"}}},dark:{palette:{primary:{main:"#90caf9",light:"#e3f2fd",dark:"#42a5f5"},secondary:{main:"#ce93d8",light:"#f3e5f5",dark:"#ab47bc"},background:{default:"#121212",paper:"#1e1e1e"}}}},typography:{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',h1:{fontSize:"2.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h3:{fontSize:"1.75rem",fontWeight:500},h4:{fontSize:"1.5rem",fontWeight:500},h5:{fontSize:"1.25rem",fontWeight:500},h6:{fontSize:"1rem",fontWeight:500}},shape:{borderRadius:8},components:{MuiCard:{styleOverrides:{root:{transition:"transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 20px rgba(0,0,0,0.12)"}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",fontWeight:500}}},MuiChip:{styleOverrides:{root:{fontWeight:500}}},MuiAppBar:{styleOverrides:{root:{backgroundImage:"none"}}}}});let _4=document.getElementsByTagName("base")[0]?.href?.replace(/\/$/,"");_4?.startsWith("http")&&(_4=new URL(_4).pathname);const cut=Hhe([{path:"/",element:m.jsx(aut,{}),children:Ect}],{basename:_4});sde.createRoot(document.getElementById("root")).render(m.jsx(_.StrictMode,{children:m.jsx(Cde,{store:Tct,children:m.jsxs(n1e,{theme:lut,children:[m.jsx(Zge,{}),m.jsx(dX,{styles:{".rjsf-field-array > .MuiFormControl-root > .MuiPaper-root > .MuiBox-root > .MuiGrid-root > .MuiGrid-root:has(> .MuiBox-root > .MuiPaper-root > .MuiBox-root > .rjsf-field)":{overflow:"initial !important",flexGrow:1}}}),m.jsx(k2e,{children:m.jsx(yye,{children:m.jsx(epe,{router:cut})})})]})})}));
@@ -8,7 +8,7 @@
8
8
  <!-- BASE -->
9
9
  <base href="/" />
10
10
  <!-- /BASE -->
11
- <script type="module" crossorigin src="./assets/index-Dqt8pBMF.js"></script>
11
+ <script type="module" crossorigin src="./assets/index-B9o5KwGN.js"></script>
12
12
  <link rel="stylesheet" crossorigin href="./assets/index-BNdBOwwe.css">
13
13
  </head>
14
14
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riddix/hamh",
3
3
  "description": "",
4
- "version": "2.1.0-alpha.438",
4
+ "version": "2.1.0-alpha.439",
5
5
  "private": false,
6
6
  "type": "module",
7
7
  "bin": {
@@ -57,9 +57,9 @@
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/lodash-es": "^4.17.12",
60
- "@home-assistant-matter-hub/backend": "2.1.0-alpha.438",
61
- "@home-assistant-matter-hub/common": "2.1.0-alpha.438",
62
- "@home-assistant-matter-hub/frontend": "2.1.0-alpha.438"
60
+ "@home-assistant-matter-hub/backend": "2.1.0-alpha.439",
61
+ "@home-assistant-matter-hub/frontend": "2.1.0-alpha.439",
62
+ "@home-assistant-matter-hub/common": "2.1.0-alpha.439"
63
63
  },
64
64
  "nx": {
65
65
  "targets": {