@fugood/bricks-cli 2.23.0-beta.25 → 2.23.0-beta.29
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 +2 -2
- package/lib/391.index.js +1 -0
- package/lib/index.js +2488 -70
- package/package.json +5 -5
- package/lib/676.index.js +0 -1
- package/lib/803.index.js +0 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Command-line interface for BRICKS Workspace API with interactive mode support.
|
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
# From the monorepo root
|
|
9
|
-
|
|
9
|
+
bun install
|
|
10
10
|
|
|
11
11
|
# Or install globally (after publishing)
|
|
12
12
|
npm install -g @fugood/bricks-cli
|
|
@@ -258,7 +258,7 @@ Use `bricks config show` to view current settings or `bricks config endpoint` to
|
|
|
258
258
|
node bin/bricks.js
|
|
259
259
|
|
|
260
260
|
# Run with file watching
|
|
261
|
-
|
|
261
|
+
bun dev
|
|
262
262
|
```
|
|
263
263
|
|
|
264
264
|
## License
|
package/lib/391.index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const __webpack_esm_id__=391;export const __webpack_esm_ids__=[391];export const __webpack_esm_modules__={8391:(e,l,n)=>{n.d(l,{App:()=>te,AppDetail:()=>$,AppList:()=>F,CONTROL_ACTIONS:()=>x,DeviceControl:()=>N,DeviceDetail:()=>P,DeviceList:()=>M,DeviceScreenshot:()=>V,DeviceStatus:()=>b,Footer:()=>j,GroupDetail:()=>X,GroupList:()=>G,Header:()=>D,Loading:()=>T,MainMenu:()=>O,MediaBoxDetail:()=>W,MediaBoxList:()=>Y,MediaFileDetail:()=>Q,MediaFileList:()=>K,ModuleDetail:()=>q,ModuleList:()=>H,ONLINE_THRESHOLD_MS:()=>h,ShortEditEditor:()=>oe,VIEWS:()=>u,runInteractiveMode:()=>ie}),n.r(l);var o=n(1649),t=n(8498),i=n(9557),r=n(9436),c=n(8832),a=n(7742),s=n(8765),d=n(7336),u={MAIN:"main",DEVICES:"devices",DEVICE_DETAIL:"device_detail",DEVICE_CONTROL:"device_control",DEVICE_SCREENSHOT:"device_screenshot",APPS:"apps",APP_DETAIL:"app_detail",APP_SHORT_EDIT:"app_short_edit",MODULES:"modules",MODULE_DETAIL:"module_detail",MODULE_SHORT_EDIT:"module_short_edit",GROUPS:"groups",GROUP_DETAIL:"group_detail",MEDIA_BOXES:"media_boxes",MEDIA_BOX_DETAIL:"media_box_detail",MEDIA_FILES:"media_files",MEDIA_FILE_DETAIL:"media_file_detail"},x=[{label:"Refresh Application",value:"refresh"},{label:"Clear Cache",value:"clear-cache"},{label:"Take Screenshot",value:"take-screenshot"},{label:"Open System Menu",value:"system-menu-open"},{label:"Close System Menu",value:"system-menu-close"},{label:"Open Debug Panel",value:"debug-panel-open"},{label:"Close Debug Panel",value:"debug-panel-close"},{label:"Enable Logging",value:"logging-on"},{label:"Disable Logging",value:"logging-off"},{label:"← Back",value:"back"}],h=3e5,f=n(7661);const g=function({type:e="dots"}){const[l,n]=(0,o.useState)(0),i=f[e];return(0,o.useEffect)(()=>{const e=setInterval(()=>{n(e=>e===i.frames.length-1?0:e+1)},i.interval);return()=>{clearInterval(e)}},[i]),o.default.createElement(t.Text,null,i.frames[l])};var m=n(1178),p=function(e){var l=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=Math.floor(60),t=(0,o.useState)(n),i=c(t,2),r=i[0],a=i[1],s=(0,o.useState)(null),d=c(s,2),u=d[0],x=d[1],h=(0,o.useRef)(e);(0,o.useEffect)(function(){h.current=e},[e]);var f=(0,o.useCallback)(function(){a(n),x(Date.now())},[n]);return(0,o.useEffect)(function(){if(l){var e=setInterval(function(){a(function(e){return e<=1?(null==h.current||h.current(),x(Date.now()),n):e-1})},1e3);return function(){return clearInterval(e)}}},[l,n]),(0,o.useEffect)(function(){l&&(a(n),x(Date.now()))},[l,n]),{countdown:r,lastRefreshTime:u,resetCountdown:f}},v=function(e){var l=e.countdown,n=e.lastRefreshTime;return(0,m.jsx)(t.Box,{children:(0,m.jsxs)(t.Text,{color:"gray",children:["Next refresh in ",(0,m.jsxs)(t.Text,{color:"cyan",children:[l,"s"]}),n&&(0,m.jsxs)(t.Text,{color:"gray",children:[" (last: ",n?new Date(n).toLocaleTimeString():null,")"]})]})})},D=function(e){var l=e.workspace,n=e.view;return(0,m.jsxs)(t.Box,{flexDirection:"column",marginBottom:1,children:[(0,m.jsxs)(t.Box,{children:[(0,m.jsx)(t.Text,{bold:!0,color:"cyan",children:"BRICKS CLI"}),(0,m.jsx)(t.Text,{color:"gray",children:" - Interactive Mode"})]}),(0,m.jsxs)(t.Box,{children:[(0,m.jsx)(t.Text,{color:"gray",children:"Workspace: "}),(0,m.jsx)(t.Text,{color:"green",children:(null==l?void 0:l.name)||"Not connected"}),(0,m.jsx)(t.Text,{color:"gray",children:" | View: "}),(0,m.jsx)(t.Text,{color:"yellow",children:n})]}),(0,m.jsx)(t.Text,{color:"gray",children:"─".repeat(60)})]})},j=function(){return(0,m.jsxs)(t.Box,{marginTop:1,flexDirection:"column",children:[(0,m.jsx)(t.Text,{color:"gray",children:"─".repeat(60)}),(0,m.jsxs)(t.Text,{color:"gray",children:["Press ",(0,m.jsx)(t.Text,{color:"cyan",children:"q"})," to quit, ",(0,m.jsx)(t.Text,{color:"cyan",children:"Esc"})," to go back"]})]})},T=function(e){var l=e.text;return(0,m.jsxs)(t.Box,{children:[(0,m.jsx)(t.Text,{color:"green",children:(0,m.jsx)(g,{type:"dots"})}),(0,m.jsxs)(t.Text,{children:[" ",l||"Loading..."]})]})},b=function(e){var l=e.lastAliveTime;if(!l)return(0,m.jsx)(t.Text,{color:"gray",children:"○ Unknown"});var n=Date.now()-new Date(l).getTime();if(n<=h)return(0,m.jsx)(t.Text,{color:"green",children:"● Online"});var o=Math.floor(n/6e4);if(o<60)return(0,m.jsxs)(t.Text,{color:"yellow",children:["○ Offline (",o,"m ago)"]});var i=Math.floor(o/60);if(i<24)return(0,m.jsxs)(t.Text,{color:"red",children:["○ Offline (",i,"h ago)"]});var r=Math.floor(i/24);return(0,m.jsxs)(t.Text,{color:"red",children:["○ Offline (",r,"d ago)"]})},_=n(147),B=n(9122);const y={circleQuestionMark:"(?)",questionMarkPrefix:"(?)",square:"█",squareDarkShade:"▓",squareMediumShade:"▒",squareLightShade:"░",squareTop:"▀",squareBottom:"▄",squareLeft:"▌",squareRight:"▐",squareCenter:"■",bullet:"●",dot:"․",ellipsis:"…",pointerSmall:"›",triangleUp:"▲",triangleUpSmall:"▴",triangleDown:"▼",triangleDownSmall:"▾",triangleLeftSmall:"◂",triangleRightSmall:"▸",home:"⌂",heart:"♥",musicNote:"♪",musicNoteBeamed:"♫",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",arrowLeftRight:"↔",arrowUpDown:"↕",almostEqual:"≈",notEqual:"≠",lessOrEqual:"≤",greaterOrEqual:"≥",identical:"≡",infinity:"∞",subscriptZero:"₀",subscriptOne:"₁",subscriptTwo:"₂",subscriptThree:"₃",subscriptFour:"₄",subscriptFive:"₅",subscriptSix:"₆",subscriptSeven:"₇",subscriptEight:"₈",subscriptNine:"₉",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneEighth:"⅛",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞",line:"─",lineBold:"━",lineDouble:"═",lineDashed0:"┄",lineDashed1:"┅",lineDashed2:"┈",lineDashed3:"┉",lineDashed4:"╌",lineDashed5:"╍",lineDashed6:"╴",lineDashed7:"╶",lineDashed8:"╸",lineDashed9:"╺",lineDashed10:"╼",lineDashed11:"╾",lineDashed12:"−",lineDashed13:"–",lineDashed14:"‐",lineDashed15:"⁃",lineVertical:"│",lineVerticalBold:"┃",lineVerticalDouble:"║",lineVerticalDashed0:"┆",lineVerticalDashed1:"┇",lineVerticalDashed2:"┊",lineVerticalDashed3:"┋",lineVerticalDashed4:"╎",lineVerticalDashed5:"╏",lineVerticalDashed6:"╵",lineVerticalDashed7:"╷",lineVerticalDashed8:"╹",lineVerticalDashed9:"╻",lineVerticalDashed10:"╽",lineVerticalDashed11:"╿",lineDownLeft:"┐",lineDownLeftArc:"╮",lineDownBoldLeftBold:"┓",lineDownBoldLeft:"┒",lineDownLeftBold:"┑",lineDownDoubleLeftDouble:"╗",lineDownDoubleLeft:"╖",lineDownLeftDouble:"╕",lineDownRight:"┌",lineDownRightArc:"╭",lineDownBoldRightBold:"┏",lineDownBoldRight:"┎",lineDownRightBold:"┍",lineDownDoubleRightDouble:"╔",lineDownDoubleRight:"╓",lineDownRightDouble:"╒",lineUpLeft:"┘",lineUpLeftArc:"╯",lineUpBoldLeftBold:"┛",lineUpBoldLeft:"┚",lineUpLeftBold:"┙",lineUpDoubleLeftDouble:"╝",lineUpDoubleLeft:"╜",lineUpLeftDouble:"╛",lineUpRight:"└",lineUpRightArc:"╰",lineUpBoldRightBold:"┗",lineUpBoldRight:"┖",lineUpRightBold:"┕",lineUpDoubleRightDouble:"╚",lineUpDoubleRight:"╙",lineUpRightDouble:"╘",lineUpDownLeft:"┤",lineUpBoldDownBoldLeftBold:"┫",lineUpBoldDownBoldLeft:"┨",lineUpDownLeftBold:"┥",lineUpBoldDownLeftBold:"┩",lineUpDownBoldLeftBold:"┪",lineUpDownBoldLeft:"┧",lineUpBoldDownLeft:"┦",lineUpDoubleDownDoubleLeftDouble:"╣",lineUpDoubleDownDoubleLeft:"╢",lineUpDownLeftDouble:"╡",lineUpDownRight:"├",lineUpBoldDownBoldRightBold:"┣",lineUpBoldDownBoldRight:"┠",lineUpDownRightBold:"┝",lineUpBoldDownRightBold:"┡",lineUpDownBoldRightBold:"┢",lineUpDownBoldRight:"┟",lineUpBoldDownRight:"┞",lineUpDoubleDownDoubleRightDouble:"╠",lineUpDoubleDownDoubleRight:"╟",lineUpDownRightDouble:"╞",lineDownLeftRight:"┬",lineDownBoldLeftBoldRightBold:"┳",lineDownLeftBoldRightBold:"┯",lineDownBoldLeftRight:"┰",lineDownBoldLeftBoldRight:"┱",lineDownBoldLeftRightBold:"┲",lineDownLeftRightBold:"┮",lineDownLeftBoldRight:"┭",lineDownDoubleLeftDoubleRightDouble:"╦",lineDownDoubleLeftRight:"╥",lineDownLeftDoubleRightDouble:"╤",lineUpLeftRight:"┴",lineUpBoldLeftBoldRightBold:"┻",lineUpLeftBoldRightBold:"┷",lineUpBoldLeftRight:"┸",lineUpBoldLeftBoldRight:"┹",lineUpBoldLeftRightBold:"┺",lineUpLeftRightBold:"┶",lineUpLeftBoldRight:"┵",lineUpDoubleLeftDoubleRightDouble:"╩",lineUpDoubleLeftRight:"╨",lineUpLeftDoubleRightDouble:"╧",lineUpDownLeftRight:"┼",lineUpBoldDownBoldLeftBoldRightBold:"╋",lineUpDownBoldLeftBoldRightBold:"╈",lineUpBoldDownLeftBoldRightBold:"╇",lineUpBoldDownBoldLeftRightBold:"╊",lineUpBoldDownBoldLeftBoldRight:"╉",lineUpBoldDownLeftRight:"╀",lineUpDownBoldLeftRight:"╁",lineUpDownLeftBoldRight:"┽",lineUpDownLeftRightBold:"┾",lineUpBoldDownBoldLeftRight:"╂",lineUpDownLeftBoldRightBold:"┿",lineUpBoldDownLeftBoldRight:"╃",lineUpBoldDownLeftRightBold:"╄",lineUpDownBoldLeftBoldRight:"╅",lineUpDownBoldLeftRightBold:"╆",lineUpDoubleDownDoubleLeftDoubleRightDouble:"╬",lineUpDoubleDownDoubleLeftRight:"╫",lineUpDownLeftDoubleRightDouble:"╪",lineCross:"╳",lineBackslash:"╲",lineSlash:"╱"},S={tick:"✔",info:"ℹ",warning:"⚠",cross:"✘",squareSmall:"◻",squareSmallFilled:"◼",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",pointer:"❯",triangleUpOutline:"△",triangleLeft:"◀",triangleRight:"▶",lozenge:"◆",lozengeOutline:"◇",hamburger:"☰",smiley:"㋡",mustache:"෴",star:"★",play:"▶",nodejs:"⬢",oneSeventh:"⅐",oneNinth:"⅑",oneTenth:"⅒"},E={...y,...S},w={...y,tick:"√",info:"i",warning:"‼",cross:"×",squareSmall:"□",squareSmallFilled:"■",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",pointer:">",triangleUpOutline:"∆",triangleLeft:"◄",triangleRight:"►",lozenge:"♦",lozengeOutline:"◊",hamburger:"≡",smiley:"☺",mustache:"┌─┐",star:"✶",play:"►",nodejs:"♦",oneSeventh:"1/7",oneNinth:"1/9",oneTenth:"1/10"},L=(0,B.A)(),R=L?E:w;Object.entries(S);const I=function({isSelected:e=!1}){return o.default.createElement(t.Box,{marginRight:1},e?o.default.createElement(t.Text,{color:"blue"},R.pointer):o.default.createElement(t.Text,null," "))};const k=function({isSelected:e=!1,label:l}){return o.createElement(t.Text,{color:e?"blue":void 0},l)};var A=n(7975);function C(e,l){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);if(!Number.isSafeInteger(l))throw new TypeError(`The \`steps\` parameter must be an integer, got ${l}.`);const{length:n}=e;if(0===n)return[...e];const o=(l%n+n)%n;return 0===o?[...e]:[...e.slice(-o),...e.slice(0,-o)]}const U=function({items:e=[],isFocused:l=!0,initialIndex:n=0,indicatorComponent:i=I,itemComponent:r=k,limit:c,onSelect:a,onHighlight:s}){const d="number"==typeof c&&e.length>c,u=d?Math.min(c,e.length):e.length,x=u-1,[h,f]=(0,o.useState)(n>x?x-n:0),[g,m]=(0,o.useState)(n?n>x?x:n:0),p=(0,o.useRef)(e);(0,o.useEffect)(()=>{(0,A.isDeepStrictEqual)(p.current.map(e=>e.value),e.map(e=>e.value))||(f(0),m(0)),p.current=e},[e]),(0,t.useInput)((0,o.useCallback)((l,n)=>{if("k"===l||n.upArrow){const l=(d?u:e.length)-1,n=0===g,o=n?h+1:h,t=n?d?g:l:g-1;f(o),m(t);const i=d?C(e,o).slice(0,u):e;"function"==typeof s&&s(i[t])}if("j"===l||n.downArrow){const l=g===(d?u:e.length)-1,n=l?h-1:h,o=l?d?g:0:g+1;f(n),m(o);const t=d?C(e,n).slice(0,u):e;"function"==typeof s&&s(t[o])}if(/^[1-9]$/.test(l)){const n=Number.parseInt(l,10)-1,o=d?C(e,h).slice(0,u):e;if(n>=0&&n<o.length){const e=o[n];e&&a?.(e)}}if(n.return){const l=d?C(e,h).slice(0,u):e;"function"==typeof a&&a(l[g])}},[d,u,h,g,e,a,s]),{isActive:l});const v=d?C(e,h).slice(0,u):e;return o.default.createElement(t.Box,{flexDirection:"column"},v.map((e,l)=>{const n=l===g;return o.default.createElement(t.Box,{key:e.key??e.value},o.default.createElement(i,{isSelected:n}),o.default.createElement(r,{...e,isSelected:n}))}))};var O=function(e){var l=e.onSelect,n=e.mediaEnabled,o=[{label:"Devices",value:u.DEVICES},{label:"Applications",value:u.APPS},{label:"Modules",value:u.MODULES},{label:"Device Groups",value:u.GROUPS}].concat(_(n?[{label:"Media Flow",value:u.MEDIA_BOXES}]:[]),[{label:"Exit",value:"exit"}]);return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Text,{bold:!0,marginBottom:1,children:"Main Menu"}),(0,m.jsx)(U,{items:o,onSelect:l})]})},M=function(e){var l=e.devices,n=e.loading,o=e.onSelect,i=e.countdown,r=e.lastRefreshTime;if(n)return(0,m.jsx)(T,{text:"Loading devices..."});if(null==l||!l.length)return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Text,{color:"yellow",children:"No devices found"}),(0,m.jsx)(v,{countdown:i,lastRefreshTime:r})]});var c=[].concat(_(l.map(function(e){var l;return{label:`${function(e){if(!e)return"○ Unknown";var l=Date.now()-new Date(e).getTime();if(l<=h)return"● Online";var n=Math.floor(l/6e4);if(n<60)return`○ ${n}m ago`;var o=Math.floor(n/60);return o<24?`○ ${o}h ago`:`○ ${Math.floor(o/24)}d ago`}(null==(l=e.entry_detail)||null==(l=l.watch_dog_timer)?void 0:l.last_alive_time)} - ${e.name||e.device_name}`,value:e._id,device:e}})),[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}]);return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Box,{marginBottom:1,children:[(0,m.jsxs)(t.Text,{bold:!0,children:["Devices (",l.length,")"]}),(0,m.jsx)(t.Text,{color:"gray",children:" - "}),(0,m.jsx)(v,{countdown:i,lastRefreshTime:r})]}),(0,m.jsx)(U,{items:c,onSelect:o})]})},P=function(e){var l,n,o,i,r,c=e.device,a=e.loading,s=e.error,d=e.onSelect,u=e.mediaEnabled,x=e.countdown,h=e.lastRefreshTime;if(a)return(0,m.jsx)(T,{text:"Loading device..."});if(s)return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"red",children:["Error: ",s]}),(0,m.jsx)(U,{items:[{label:"← Back",value:"back"}],onSelect:d})]});if(!c)return(0,m.jsx)(t.Text,{color:"red",children:"Device not found"});var f=[{label:"Control Device",value:"control"}].concat(_(u?[{label:"View Screenshot",value:"screenshot"}]:[]),[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}]),g=c.entry_detail,p=null==g?void 0:g.screen,D=null==g?void 0:g.update,j=null==g?void 0:g.local_sync;return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Box,{children:[(0,m.jsx)(t.Text,{bold:!0,color:"cyan",children:c.name||c.device_name}),(0,m.jsx)(t.Text,{color:"gray",children:" - "}),(0,m.jsx)(v,{countdown:x,lastRefreshTime:h})]}),c.description&&(0,m.jsx)(t.Text,{color:"gray",children:c.description}),(0,m.jsxs)(t.Box,{marginY:1,flexDirection:"column",children:[(0,m.jsxs)(t.Box,{children:[(0,m.jsx)(t.Text,{color:"gray",children:"Status: "}),(0,m.jsx)(b,{lastAliveTime:null==g||null==(l=g.watch_dog_timer)?void 0:l.last_alive_time})]}),(0,m.jsxs)(t.Text,{color:"gray",children:["ID: ",c._id]}),(null==(n=c.tags)?void 0:n.length)>0&&(0,m.jsxs)(t.Text,{color:"gray",children:["Tags: ",c.tags.join(", ")]}),(null==g?void 0:g.application)&&(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Application"}),(0,m.jsxs)(t.Text,{color:"gray",children:[" Name: ",g.application.name]}),(0,m.jsxs)(t.Text,{color:"gray",children:[" Mode: ",g.operation_mode||"N/A"]})]}),p&&(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Screen"}),p.resolution&&(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Resolution: ",p.resolution.width,"x",p.resolution.height,p.resolution.scale&&` @${p.resolution.scale}x`]}),p.orientation&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Orientation: ",p.orientation]}),p.touch&&(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Touch:"," ",p.touch.available?`Yes (${p.touch.touch_point} points)`:"No"]})]}),((null==g?void 0:g.memory_usage)||(null==g?void 0:g.disk_usage))&&(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"System"}),g.memory_usage&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Memory: ",Math.round(100*g.memory_usage),"%"]}),g.disk_usage&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Disk: ",Math.round(100*g.disk_usage),"%"]})]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Capabilities"}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Sound: ",null!=g&&null!=(o=g.sound)&&o.available?"✓":"✗"," | ","Camera: ",null!=g&&null!=(i=g.camera)&&i.available?"✓":"✗"," | ","Audio In: ",null!=g&&null!=(r=g.audio_in)&&r.available?"✓":"✗"]})]}),j&&(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Local Sync"}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Role: ",j.is_main?"Main":"Peer",j.peer_count>0&&` | Peers: ${j.peer_count}`,j.mean_latency&&` | Latency: ${j.mean_latency}ms`]})]}),D&&(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Update"}),(0,m.jsxs)(t.Text,{color:D.need_update?"yellow":"gray",children:[" ","Status: ",D.need_update?"⚠ Update available":"✓ Up to date"]}),D.current_version&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Version: ",D.current_version]})]})]}),(0,m.jsx)(U,{items:f,onSelect:d})]})},N=function(e){var l=e.device,n=e.onSelect,o=e.controlling,i=e.controlResult;return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{bold:!0,color:"cyan",children:["Control: ",(null==l?void 0:l.name)||(null==l?void 0:l.device_name)]}),o&&(0,m.jsx)(T,{text:"Sending command..."}),i&&(0,m.jsx)(t.Text,{color:i.success?"green":"red",children:i.message}),(0,m.jsx)(t.Box,{marginTop:1,children:(0,m.jsx)(U,{items:x,onSelect:n})})]})},V=function(e){var l,n,o=e.device,r=e.screenshot,c=e.loading,a=e.error,s=e.onSelect,d=null==r||null==(l=r.file)?void 0:l.meta,u=null!=(null==d?void 0:d.originalWidth)&&null!=(null==d?void 0:d.originalHeight),x=null!=(null==d?void 0:d.originalFileSize);return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{bold:!0,color:"cyan",children:["Screenshot: ",(null==o?void 0:o.name)||(null==o?void 0:o.device_name)||"Unknown"]}),c&&(0,m.jsx)(T,{text:"Loading screenshot..."}),a&&(0,m.jsx)(t.Box,{marginY:1,children:(0,m.jsx)(t.Text,{color:"red",children:String(a)})}),!c&&!a&&r&&(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Box,{height:30,children:(0,m.jsx)(i.default,{src:r.path,width:80,alt:"Device screenshot"})}),(0,m.jsxs)(t.Box,{marginY:1,flexDirection:"column",children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Screenshot Details"}),(0,m.jsxs)(t.Box,{marginY:1,children:[(0,m.jsx)(t.Text,{color:"green",children:"Screenshot saved to: "}),(0,m.jsx)(t.Text,{color:"cyan",children:String(r.path||"")})]}),u&&(0,m.jsxs)(t.Text,{color:"gray",children:["Size: ",String(d.originalWidth),"x",String(d.originalHeight)]}),x&&(0,m.jsxs)(t.Text,{color:"gray",children:["File: ",(Number(d.originalFileSize)/1024).toFixed(1)," KB"]}),(null==(n=r.file)?void 0:n.updatedAt)&&(0,m.jsxs)(t.Text,{color:"gray",children:["Updated: ",new Date(r.file.updatedAt).toLocaleString()]})]})]}),!c&&!a&&!r&&(0,m.jsx)(t.Box,{marginY:1,children:(0,m.jsx)(t.Text,{color:"yellow",children:"No screenshot available. Try taking a new one."})}),(0,m.jsx)(t.Box,{marginTop:1,children:(0,m.jsx)(U,{items:[{label:"Take New Screenshot",value:"take"},{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}],onSelect:s})})]})},F=function(e){var l=e.apps,n=e.loading,o=e.onSelect;if(n)return(0,m.jsx)(T,{text:"Loading applications..."});if(null==l||!l.length)return(0,m.jsx)(t.Text,{color:"yellow",children:"No applications found"});var i=[].concat(_(l.map(function(e){return{label:`${e.has_unreleased_changes?"●":"○"} ${e.name}`,value:e._id,app:e}})),[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}]);return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{bold:!0,marginBottom:1,children:["Applications (",l.length,")"]}),(0,m.jsx)(U,{items:i,onSelect:o})]})},$=function(e){var l,n,o,i,r,c,a,s,d,u=e.app,x=e.loading,h=e.error,f=e.onSelect;if(x)return(0,m.jsx)(T,{text:"Loading application..."});if(h)return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"red",children:["Error: ",h]}),(0,m.jsx)(U,{items:[{label:"← Back",value:"back"}],onSelect:f})]});if(!u)return(0,m.jsx)(t.Text,{color:"red",children:"Application not found"});var g=(null==(l=u.short_edit)?void 0:l.enabled)&&u.short_edit.ref_map,p=[].concat(_(g?[{label:"Short Edit",value:"short_edit"}]:[]),[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}]),v=(null==(n=u.devices)?void 0:n.length)||0,D=(null==(o=u.devices)||null==(o=o.filter(function(e){return"online"===e.status}))?void 0:o.length)||0;return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Text,{bold:!0,color:"cyan",children:u.name}),u.description&&(0,m.jsx)(t.Text,{color:"gray",children:u.description}),(0,m.jsxs)(t.Box,{marginY:1,flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"gray",children:["ID: ",u._id]}),(null==(i=u.tags)?void 0:i.length)>0&&(0,m.jsxs)(t.Text,{color:"gray",children:["Tags: ",u.tags.join(", ")]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Version"}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Current: ",u.current_version?`v${u.current_version}`:"N/A"]}),(0,m.jsxs)(t.Text,{color:u.has_unreleased_changes?"yellow":"gray",children:[" ","Changes:"," ",u.has_unreleased_changes?"● Unreleased changes":"○ No pending changes"]}),u.current_version_details&&(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Released: v",u.current_version_details.version||"N/A"]})]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Devices"}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Total: ",v,v>0&&` (${D} online)`]})]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Features"}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Short Edit: ",null!=(r=u.short_edit)&&r.enabled?"✓ Enabled":"✗ Disabled"]}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Canvas Control: ",null!=(c=u.canvas_control)&&c.enabled?"✓ Enabled":"✗ Disabled"]}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Device Control: ",null!=(a=u.device_control)&&a.enabled?"✓ Enabled":"✗ Disabled"]}),(0,m.jsxs)(t.Text,{color:null!=(s=u.lock)&&s.enabled?"yellow":"gray",children:[" ","Lock: ",null!=(d=u.lock)&&d.enabled?"🔒 Locked":"🔓 Unlocked"]})]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Timestamps"}),u.create_datetime&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Created: ",new Date(u.create_datetime).toLocaleString()]}),u.last_modify_datetime&&(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Modified: ",new Date(u.last_modify_datetime).toLocaleString()]})]})]}),(0,m.jsx)(U,{items:p,onSelect:f})]})},H=function(e){var l=e.modules,n=e.loading,o=e.onSelect;if(n)return(0,m.jsx)(T,{text:"Loading modules..."});var i=(l||[]).map(function(e){return{label:`${e.current_version?"●":"○"} ${e.name}`,value:e._id,module:e}}),r=[].concat(_(i),[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}]);return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{bold:!0,marginBottom:1,children:["Modules (",(null==l?void 0:l.length)||0,")"]}),!(null!=l&&l.length)&&(0,m.jsx)(t.Text,{color:"yellow",children:"No modules found"}),(0,m.jsx)(U,{items:r,onSelect:o})]})},q=function(e){var l,n,o,i,r,c=e.module,a=e.loading,s=e.error,d=e.onSelect;if(a)return(0,m.jsx)(T,{text:"Loading module..."});if(s)return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"red",children:["Error: ",s]}),(0,m.jsx)(U,{items:[{label:"← Back",value:"back"}],onSelect:d})]});if(!c)return(0,m.jsx)(t.Text,{color:"red",children:"Module not found"});var u=(null==(l=c.short_edit)?void 0:l.enabled)&&c.short_edit.ref_map,x=[].concat(_(u?[{label:"Short Edit",value:"short_edit"}]:[]),[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}]);return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Text,{bold:!0,color:"cyan",children:c.name}),c.description&&(0,m.jsx)(t.Text,{color:"gray",children:c.description}),(0,m.jsxs)(t.Box,{marginY:1,flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"gray",children:["ID: ",c._id]}),(null==(n=c.tags)?void 0:n.length)>0&&(0,m.jsxs)(t.Text,{color:"gray",children:["Tags: ",c.tags.join(", ")]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Version"}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Current: ",c.current_version?`v${c.current_version}`:"N/A"]}),(0,m.jsxs)(t.Text,{color:c.has_unreleased_changes?"yellow":"gray",children:[" ","Changes:"," ",c.has_unreleased_changes?"● Unreleased changes":"○ No pending changes"]})]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Usage"}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Used in: ",(null==(o=c.use_count)?void 0:o.total_count)||0," application(s)"]})]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Settings"}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Public: ",c.is_public?"✓ Yes":"✗ No"]}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Modifiable: ",c.is_allow_modify?"✓ Yes":"✗ No"]}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Short Edit: ",null!=(i=c.short_edit)&&i.enabled?"✓ Enabled":"✗ Disabled"]})]}),(null==(r=c.expose_properties)?void 0:r.length)>0&&(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Exposed Properties"}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ",c.expose_properties.length," properties exposed"]})]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Timestamps"}),c.create_datetime&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Created: ",new Date(c.create_datetime).toLocaleString()]}),c.last_modify_datetime&&(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Modified: ",new Date(c.last_modify_datetime).toLocaleString()]})]})]}),(0,m.jsx)(U,{items:x,onSelect:d})]})},G=function(e){var l=e.groups,n=e.loading,o=e.onSelect,i=e.countdown,r=e.lastRefreshTime;if(n)return(0,m.jsx)(T,{text:"Loading device groups..."});var c=(l||[]).map(function(e){var l;return{label:`📁 ${e.name} (${(null==(l=e.devices)?void 0:l.length)||0} devices)`,value:e._id,group:e}}),a=[].concat(_(c),[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}]);return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Box,{marginBottom:1,children:[(0,m.jsxs)(t.Text,{bold:!0,children:["Device Groups (",(null==l?void 0:l.length)||0,")"]}),(0,m.jsx)(t.Text,{color:"gray",children:" - "}),(0,m.jsx)(v,{countdown:i,lastRefreshTime:r})]}),!(null!=l&&l.length)&&(0,m.jsx)(t.Text,{color:"yellow",children:"No device groups found"}),(0,m.jsx)(U,{items:a,onSelect:o})]})},z=function(e){var l=e.loading,n=e.groupDevices;return l?(0,m.jsx)(T,{text:"Loading devices..."}):null!=n&&n.length?(0,m.jsxs)(m.Fragment,{children:[n.slice(0,10).map(function(e){var l;return(0,m.jsxs)(t.Box,{children:[(0,m.jsx)(t.Text,{color:"gray",children:" "}),(0,m.jsx)(b,{lastAliveTime:null==(l=e.entry_detail)||null==(l=l.watch_dog_timer)?void 0:l.last_alive_time}),(0,m.jsxs)(t.Text,{color:"gray",children:[" ",e.name||e.device_name]}),e.device_target_name&&(0,m.jsxs)(t.Text,{color:"gray",dimColor:!0,children:[" ","(",e.device_target_name,")"]})]},e._id)}),n.length>10&&(0,m.jsxs)(t.Text,{color:"gray",dimColor:!0,children:[" ","... and ",n.length-10," more"]})]}):(0,m.jsx)(t.Text,{color:"gray",children:" No devices in this group"})},X=function(e){var l,n,o=e.group,i=e.groupDevices,r=e.loading,c=e.error,a=e.onSelect,s=e.countdown,d=e.lastRefreshTime;if(r&&!o)return(0,m.jsx)(T,{text:"Loading device group..."});if(c)return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"red",children:["Error: ",c]}),(0,m.jsx)(U,{items:[{label:"← Back",value:"back"}],onSelect:a})]});if(!o)return(0,m.jsx)(t.Text,{color:"red",children:"Device group not found"});return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Box,{children:[(0,m.jsx)(t.Text,{bold:!0,color:"cyan",children:o.name}),(0,m.jsx)(t.Text,{color:"gray",children:" - "}),(0,m.jsx)(v,{countdown:s,lastRefreshTime:d})]}),o.description&&(0,m.jsx)(t.Text,{color:"gray",children:o.description}),(0,m.jsxs)(t.Box,{marginY:1,flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"gray",children:["ID: ",o._id]}),(null==(l=o.tags)?void 0:l.length)>0&&(0,m.jsxs)(t.Text,{color:"gray",children:["Tags: ",o.tags.join(", ")]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsxs)(t.Text,{bold:!0,color:"white",children:["Devices (",(null==(n=o.devices)?void 0:n.length)||0,")"]}),(0,m.jsx)(z,{loading:r,groupDevices:i})]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Timestamps"}),o.create_datetime&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Created: ",new Date(o.create_datetime).toLocaleString()]}),o.last_modify_datetime&&(0,m.jsxs)(t.Text,{color:"gray",children:[" ","Modified: ",new Date(o.last_modify_datetime).toLocaleString()]})]})]}),(0,m.jsx)(U,{items:[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}],onSelect:a})]})},Y=function(e){var l=e.boxes,n=e.loading,o=e.onSelect;if(n)return(0,m.jsx)(T,{text:"Loading media boxes..."});if(null==l||!l.length)return(0,m.jsx)(t.Text,{color:"yellow",children:"No media boxes found"});var i=[].concat(_(l.map(function(e){return{label:`📦 ${e.name||"Unnamed"}`,value:e.id,box:e}})),[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}]);return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{bold:!0,marginBottom:1,children:["Media Boxes (",l.length,")"]}),(0,m.jsx)(U,{items:i,onSelect:o})]})},W=function(e){var l,n,o=e.box,i=e.loading,r=e.error,c=e.onSelect;if(i&&!o)return(0,m.jsx)(T,{text:"Loading media box..."});if(r)return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"red",children:["Error: ",r]}),(0,m.jsx)(U,{items:[{label:"← Back",value:"back"}],onSelect:c})]});if(!o)return(0,m.jsx)(t.Text,{color:"red",children:"Media box not found"});return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Text,{bold:!0,color:"cyan",children:o.name||"Unnamed"}),o.description&&(0,m.jsx)(t.Text,{color:"gray",children:o.description}),(0,m.jsxs)(t.Box,{marginY:1,flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"gray",children:["ID: ",o.id]}),(null==(l=o.tags)?void 0:l.length)>0&&(0,m.jsxs)(t.Text,{color:"gray",children:["Tags: ",o.tags.join(", ")]}),null!=o.size&&(0,m.jsxs)(t.Text,{color:"gray",children:["Size: ",o.size]}),(null==(n=o.passcodes)?void 0:n.length)>0&&(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsxs)(t.Text,{bold:!0,color:"white",children:["Passcodes (",o.passcodes.length,")"]}),o.passcodes.slice(0,5).map(function(e){return(0,m.jsxs)(t.Text,{color:"gray",children:[" ",e.name||"Passcode",": ",e.code]},e.id)}),o.passcodes.length>5&&(0,m.jsxs)(t.Text,{color:"gray",dimColor:!0,children:[" ","... and ",o.passcodes.length-5," more"]})]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Timestamps"}),o.createdAt&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Created: ",new Date(o.createdAt).toLocaleString()]}),o.updatedAt&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Modified: ",new Date(o.updatedAt).toLocaleString()]})]})]}),(0,m.jsx)(U,{items:[{label:"List Files",value:"files"},{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}],onSelect:c})]})},K=function(e){var l=e.files,n=e.loading,o=e.onSelect,i=e.box;if(n)return(0,m.jsx)(T,{text:"Loading media files..."});if(null==l||!l.length)return(0,m.jsx)(t.Text,{color:"yellow",children:"No media files found"});var r=[].concat(_(l.map(function(e){return{label:`${l=e.fileType,"Image"===l?"🖼":"Video"===l?"🎞":"Audio"===l?"🎵":"📄"} ${e.name||"Unnamed"}`,value:e.id,file:e};var l})),[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}]);return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{bold:!0,marginBottom:1,children:["Media Files (",l.length,")",null!=i&&i.name?` - ${i.name}`:""]}),(0,m.jsx)(U,{items:r,onSelect:o})]})},Q=function(e){var l,n=e.file,o=e.loading,i=e.error,r=e.onSelect;if(o&&!n)return(0,m.jsx)(T,{text:"Loading media file..."});if(i)return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"red",children:["Error: ",i]}),(0,m.jsx)(U,{items:[{label:"← Back",value:"back"}],onSelect:r})]});if(!n)return(0,m.jsx)(t.Text,{color:"red",children:"Media file not found"});var c=n.meta,a=(0,d.Gu)(n),s=(0,d.Gu)(n,{preferThumbnail:!0}),u=Boolean(s&&s!==a);return(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Text,{bold:!0,color:"cyan",children:n.name||"Unnamed"}),n.description&&(0,m.jsx)(t.Text,{color:"gray",children:n.description}),(0,m.jsxs)(t.Box,{marginY:1,flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"gray",children:["ID: ",n.id]}),(0,m.jsxs)(t.Text,{color:"gray",children:["Box ID: ",n.boxId]}),(0,m.jsxs)(t.Text,{color:"gray",children:["Type: ",n.fileType]}),(null==(l=n.userTags)?void 0:l.length)>0&&(0,m.jsxs)(t.Text,{color:"gray",children:["Tags: ",n.userTags.join(", ")]}),null!=(null==c?void 0:c.originalWidth)&&null!=(null==c?void 0:c.originalHeight)&&(0,m.jsxs)(t.Text,{color:"gray",children:["Size: ",c.originalWidth,"x",c.originalHeight]}),null!=(null==c?void 0:c.originalFileSize)&&(0,m.jsxs)(t.Text,{color:"gray",children:["File: ",(Number(c.originalFileSize)/1024).toFixed(1)," KB"]}),a&&(0,m.jsxs)(t.Text,{color:"gray",children:["Original URL: ",a]}),u&&(0,m.jsxs)(t.Text,{color:"gray",children:["Thumbnail URL: ",s]}),(0,m.jsxs)(t.Box,{flexDirection:"column",marginTop:1,children:[(0,m.jsx)(t.Text,{bold:!0,color:"white",children:"Timestamps"}),n.createdAt&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Created: ",new Date(n.createdAt).toLocaleString()]}),n.updatedAt&&(0,m.jsxs)(t.Text,{color:"gray",children:[" Modified: ",new Date(n.updatedAt).toLocaleString()]})]})]}),(0,m.jsx)(U,{items:[{label:"↻ Refresh",value:"refresh"},{label:"← Back",value:"back"}],onSelect:r})]})},J=n(1897);function Z({value:e,placeholder:l="",focus:n=!0,mask:i,highlightPastedText:r=!1,showCursor:c=!0,onChange:a,onSubmit:s}){const[d,u]=(0,o.useState)({cursorOffset:(e||"").length,cursorWidth:0}),{cursorOffset:x,cursorWidth:h}=d;(0,o.useEffect)(()=>{u(l=>{if(!n||!c)return l;const o=e||"";return l.cursorOffset>o.length-1?{cursorOffset:o.length,cursorWidth:0}:l})},[e,n,c]);const f=r?h:0,g=i?i.repeat(e.length):e;let m=g,p=l?J.Ay.grey(l):void 0;if(c&&n){p=l.length>0?J.Ay.inverse(l[0])+J.Ay.grey(l.slice(1)):J.Ay.inverse(" "),m=g.length>0?"":J.Ay.inverse(" ");let e=0;for(const l of g)m+=e>=x-f&&e<=x?J.Ay.inverse(l):l,e++;g.length>0&&x===g.length&&(m+=J.Ay.inverse(" "))}return(0,t.useInput)((l,n)=>{if(n.upArrow||n.downArrow||n.ctrl&&"c"===l||n.tab||n.shift&&n.tab)return;if(n.return)return void(s&&s(e));let o=x,t=e,i=0;n.leftArrow?c&&o--:n.rightArrow?c&&o++:n.backspace||n.delete?x>0&&(t=e.slice(0,x-1)+e.slice(x,e.length),o--):(t=e.slice(0,x)+l+e.slice(x,e.length),o+=l.length,l.length>1&&(i=l.length)),x<0&&(o=0),x>e.length&&(o=e.length),u({cursorOffset:o,cursorWidth:i}),t!==e&&a(t)},{isActive:n}),o.default.createElement(t.Text,null,l?g.length>0?m:p:m)}const ee=Z;var le=n(5704),ne=["B","C","G","D"],oe=function(e){var l,n,i=e.instanceType,a=e.instance,s=e.client,d=e.onDone,u=e.onCancel,x=(0,t.useApp)().exit,h=(0,o.useState)("select_ref"),f=c(h,2),g=f[0],p=f[1],v=(0,o.useState)(""),D=c(v,2),j=D[0],b=D[1],B=(0,o.useState)("search"),y=c(B,2),S=y[0],E=y[1],w=(0,o.useState)(null),L=c(w,2),R=L[0],I=L[1],k=(0,o.useState)(null),A=c(k,2),C=A[0],O=A[1],M=(0,o.useState)(""),P=c(M,2),N=P[0],V=P[1],F=(0,o.useState)(""),$=c(F,2),H=$[0],q=$[1],G=(0,o.useState)(null),z=c(G,2),X=z[0],Y=z[1],W=(null==a||null==(l=a.short_edit)?void 0:l.ref_map)||{},K=Object.entries(W).filter(function(e){var l=c(e,2)[1];return l&&!l.hide}),Q=(0,le.V)(W,{keyword:j,types:ne}),J=Q.flatMap(function(e){return[{label:e.label,value:`__header_${e.prefix}__`,isHeader:!0}].concat(_(e.refs.map(function(e){var l=e.shortId,n=e.ref;return{label:`${n.title||l} (${l})`,value:l,ref:n}})))}),Z=[].concat(_(j?[{label:"↻ Clear Search",value:"__clear_search__"}]:[]),[{label:"← Back",value:"__back__"}]),oe=J.length>0?[].concat(_(J),_(Z)):Z,te=oe.findIndex(function(e){var l;return!(e.isHeader||null!=(l=e.value)&&l.startsWith("__"))});(0,t.useInput)(function(e,l){l.tab&&"select_ref"===g?E(function(e){return"search"===e?"list":"search"}):(l.escape&&("select_ref"===g&&u(),"input_path"===g&&p("select_ref"),"input_content"===g&&p("input_path"),"confirm"===g&&p("input_content"),"done"===g&&u()),"q"!==e||("input_path"===g||"input_content"===g)||"select_ref"===g&&"search"===S||x())},{isActive:!0});var ie,re=function(e){var l=e.trim();if(""===l)return null;try{return JSON.parse(l)}catch(e){return l}},ce=(ie=r(function*(){if(s&&null!=a&&a._id&&R){p("submitting"),Y(null);try{var e,l={shortId:R,path:N.trim(),content:re(H),forwardDataLink:!0};null!=C&&null!=(e=C.inner_ref)&&e.pid&&(l.innerRefParentShortId=C.inner_ref.pid),"application"===i?yield s.shortEditApplication({id:a._id,list:[l]}):yield s.shortEditModule({id:a._id,list:[l]}),yield d(),p("done")}catch(e){Y(e.message),p("confirm")}}}),function(){return ie.apply(this,arguments)});return null!=a&&null!=(n=a.short_edit)&&n.enabled?0===K.length?(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Text,{color:"yellow",children:"No Short Edit references found."}),(0,m.jsx)(U,{items:[{label:"← Back",value:"back"}],onSelect:u})]}):"select_ref"===g?(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Text,{bold:!0,children:"Short Edit References"}),(0,m.jsx)(t.Text,{color:"gray",dimColor:!0,children:"Showing: Brick, Canvas, Generator, Data"}),(0,m.jsxs)(t.Box,{marginTop:1,flexDirection:"column",children:[(0,m.jsx)(t.Text,{color:"gray",children:"Search (title or shortId)"}),(0,m.jsx)(ee,{value:j,placeholder:"type to filter, Enter to focus list",onChange:function(e){return b(e)},onSubmit:function(){return E("list")},focus:"search"===S}),(0,m.jsx)(t.Text,{color:"gray",dimColor:!0,children:"Press Tab to switch focus"})]}),(0,m.jsxs)(t.Box,{marginTop:1,children:[0===Q.length&&(0,m.jsx)(t.Text,{color:"yellow",children:"No references match your search."}),(0,m.jsx)(U,{items:oe,isFocused:"list"===S,initialIndex:te>-1?te:0,indicatorComponent:function(){return null},itemComponent:function(e){var l=e.label,n=e.isSelected;return e.isHeader?(0,m.jsx)(t.Box,{marginTop:1,children:(0,m.jsx)(t.Text,{bold:!0,color:"white",children:l})}):(0,m.jsxs)(t.Text,{color:n?"blue":void 0,children:[n?"❯":" "," ",l]})},onSelect:function(e){if("__back__"!==e.value)return"__clear_search__"===e.value?(b(""),void E("search")):void(e.isHeader||(I(e.value),O(e.ref),p("input_path")));u()}})]})]}):"input_path"===g?(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{children:["Reference:"," ",(0,m.jsxs)(t.Text,{color:"cyan",children:[(null==C?void 0:C.title)||R," (",R,")"]})]}),(0,m.jsx)(t.Text,{marginTop:1,children:"Enter property path (e.g. title, property.backgroundColor)"}),X&&(0,m.jsxs)(t.Text,{color:"red",children:["Error: ",X]}),(0,m.jsx)(ee,{value:N,placeholder:"path",onChange:function(e){V(e),X&&Y(null)},onSubmit:function(e){var l=e.trim();l?(V(l),p("input_content")):Y("Path is required")},focus:!0})]}):"input_content"===g?(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{children:["Path: ",(0,m.jsx)(t.Text,{color:"cyan",children:N})]}),(0,m.jsx)(t.Text,{marginTop:1,children:"Enter new content (JSON or plain text). Empty to clear."}),X&&(0,m.jsxs)(t.Text,{color:"red",children:["Error: ",X]}),(0,m.jsx)(ee,{value:H,placeholder:"content",onChange:function(e){q(e),X&&Y(null)},onSubmit:function(){return p("confirm")},focus:!0})]}):"submitting"===g?(0,m.jsx)(T,{text:"Applying short edit..."}):"done"===g?(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Text,{color:"green",children:"Short edit applied successfully."}),(0,m.jsx)(U,{items:[{label:"Edit another property",value:"again"},{label:"← Back",value:"back"}],onSelect:function(e){"again"===e.value?(p("select_ref"),I(null),O(null),V(""),q(""),Y(null)):u()}})]}):(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(t.Text,{bold:!0,marginBottom:1,children:"Confirm Short Edit"}),(0,m.jsxs)(t.Text,{children:["Reference:"," ",(0,m.jsxs)(t.Text,{color:"cyan",children:[(null==C?void 0:C.title)||R," (",R,")"]})]}),(0,m.jsxs)(t.Text,{children:["Path: ",(0,m.jsx)(t.Text,{color:"cyan",children:N})]}),(0,m.jsxs)(t.Text,{children:["Content: ",(0,m.jsx)(t.Text,{color:"cyan",children:H||"<empty>"})]}),X&&(0,m.jsxs)(t.Text,{color:"red",children:["Error: ",X]}),(0,m.jsx)(U,{items:[{label:"Apply",value:"apply"},{label:"Edit Path",value:"edit_path"},{label:"Edit Content",value:"edit_content"},{label:"← Back",value:"back"}],onSelect:function(e){"apply"===e.value&&ce(),"edit_path"===e.value&&p("input_path"),"edit_content"===e.value&&p("input_content"),"back"===e.value&&u()}})]}):(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsxs)(t.Text,{color:"yellow",children:["Short Edit is not enabled for this ",i,"."]}),(0,m.jsx)(U,{items:[{label:"← Back",value:"back"}],onSelect:u})]})};const te=function(){var e=(0,t.useApp)().exit,l=(0,o.useState)(u.MAIN),n=c(l,2),i=n[0],x=n[1],h=(0,o.useState)(null),f=c(h,2),g=f[0],v=f[1],b=(0,o.useState)(null),_=c(b,2),B=_[0],y=_[1],S=(0,o.useState)(!0),E=c(S,2),w=E[0],L=E[1],R=(0,o.useState)(null),I=c(R,2),k=I[0],A=I[1],C=(0,o.useState)([]),U=c(C,2),z=U[0],J=U[1],Z=(0,o.useState)(null),ee=c(Z,2),le=ee[0],ne=ee[1],te=(0,o.useState)([]),ie=c(te,2),re=ie[0],ce=ie[1],ae=(0,o.useState)(null),se=c(ae,2),de=se[0],ue=se[1],xe=(0,o.useState)([]),he=c(xe,2),fe=he[0],ge=he[1],me=(0,o.useState)(null),pe=c(me,2),ve=pe[0],De=pe[1],je=(0,o.useState)([]),Te=c(je,2),be=Te[0],_e=Te[1],Be=(0,o.useState)(null),ye=c(Be,2),Se=ye[0],Ee=ye[1],we=(0,o.useState)([]),Le=c(we,2),Re=Le[0],Ie=Le[1],ke=(0,o.useState)(!1),Ae=c(ke,2),Ce=Ae[0],Ue=Ae[1],Oe=(0,o.useState)(null),Me=c(Oe,2),Pe=Me[0],Ne=Me[1],Ve=(0,o.useState)(null),Fe=c(Ve,2),$e=Fe[0],He=Fe[1],qe=(0,o.useState)(null),Ge=c(qe,2),ze=Ge[0],Xe=Ge[1],Ye=(0,o.useState)(null),We=c(Ye,2),Ke=We[0],Qe=We[1],Je=(0,o.useState)([]),Ze=c(Je,2),el=Ze[0],ll=Ze[1],nl=(0,o.useState)(null),ol=c(nl,2),tl=ol[0],il=ol[1],rl=(0,o.useState)([]),cl=c(rl,2),al=cl[0],sl=cl[1],dl=(0,o.useState)(null),ul=c(dl,2),xl=ul[0],hl=ul[1],fl=i===u.DEVICES,gl=i===u.DEVICE_DETAIL,ml=i===u.GROUPS,pl=i===u.GROUP_DETAIL;(0,o.useEffect)(function(){var e=(0,s.getCurrentProfile)(),l=(0,s.getToken)(e);if(!l)return A("Not logged in. Run `bricks auth login` first."),void L(!1);var n=(0,a.createClient)((0,s.getBaseUrl)(),l);v(n),n.workspace().then(function(e){y(e),L(!1)}).catch(function(e){A(e.message),L(!1)})},[]),(0,t.useInput)(function(l,n){"q"===l&&e(),n.escape&&(i===u.DEVICE_CONTROL?(x(u.DEVICE_DETAIL),Ne(null)):i===u.DEVICE_SCREENSHOT?(x(u.DEVICE_DETAIL),Xe(null),Qe(null)):i===u.DEVICE_DETAIL?(x(u.DEVICES),ne(null)):i===u.APP_DETAIL?(x(u.APPS),ue(null)):i===u.MODULE_DETAIL?(x(u.MODULES),De(null)):i===u.GROUP_DETAIL?(x(u.GROUPS),Ee(null),Ie([])):i===u.MEDIA_FILE_DETAIL?(x(u.MEDIA_FILES),hl(null)):i===u.MEDIA_FILES?(x(u.MEDIA_BOX_DETAIL),hl(null)):i===u.MEDIA_BOX_DETAIL?(x(u.MEDIA_BOXES),il(null),sl([])):(i===u.MEDIA_BOXES||i!==u.MAIN)&&x(u.MAIN))},{isActive:i!==u.APP_SHORT_EDIT&&i!==u.MODULE_SHORT_EDIT});var vl,Dl,jl,Tl,bl,_l,Bl,yl,Sl=(0,o.useCallback)(r(function*(){if(g){L(!0);try{var e=yield g.devices({});J(e||[])}catch(e){A(e.message)}L(!1)}}),[g]),El=(0,o.useCallback)((vl=r(function*(e){if(g){L(!0),He(null);try{var l=yield g.device({id:e});ne(l)}catch(e){He(e.message)}L(!1)}}),function(e){return vl.apply(this,arguments)}),[g]),wl=(0,o.useCallback)(r(function*(){if(g){L(!0);try{var e=yield g.applications({});ce(e||[])}catch(e){A(e.message)}L(!1)}}),[g]),Ll=(0,o.useCallback)((Dl=r(function*(e){if(g){L(!0),He(null);try{var l=yield g.application({id:e});ue(l)}catch(e){He(e.message)}L(!1)}}),function(e){return Dl.apply(this,arguments)}),[g]),Rl=(0,o.useCallback)(r(function*(){if(g){L(!0);try{var e=yield g.modules({});ge(e||[])}catch(e){A(e.message)}L(!1)}}),[g]),Il=(0,o.useCallback)((jl=r(function*(e){if(g){L(!0),He(null);try{var l=yield g.module({id:e});De(l)}catch(e){He(e.message)}L(!1)}}),function(e){return jl.apply(this,arguments)}),[g]),kl=(0,o.useCallback)(r(function*(){if(g){L(!0);try{var e=yield g.deviceGroups({});_e(e||[])}catch(e){A(e.message)}L(!1)}}),[g]),Al=(0,o.useCallback)((Tl=r(function*(e){if(g){L(!0),He(null);try{var l=yield Promise.all([g.deviceGroup({id:e}),g.devicesByGroup({id:e})]),n=c(l,2),o=n[0],t=n[1];Ee(o),Ie(t||[])}catch(e){He(e.message)}L(!1)}}),function(e){return Tl.apply(this,arguments)}),[g]),Cl=(0,o.useCallback)(r(function*(){if(g){L(!0);try{var e=yield g.mediaBoxes();ll(e||[])}catch(e){A(e.message)}L(!1)}}),[g]),Ul=(0,o.useCallback)((bl=r(function*(e){if(g){L(!0),He(null);try{var l=yield g.mediaBox({id:e});il(l)}catch(e){He(e.message)}L(!1)}}),function(e){return bl.apply(this,arguments)}),[g]),Ol=(0,o.useCallback)((_l=r(function*(e){if(g){L(!0);try{var l=yield g.mediaFiles({boxId:e});sl(l||[])}catch(e){A(e.message)}L(!1)}}),function(e){return _l.apply(this,arguments)}),[g]),Ml=(0,o.useCallback)((Bl=r(function*(e){if(g){L(!0),He(null);try{var l=yield g.mediaFile({id:e});hl(l)}catch(e){He(e.message)}L(!1)}}),function(e){return Bl.apply(this,arguments)}),[g]),Pl=(0,o.useCallback)((yl=r(function*(e){if(g&&le){Ue(!0),Ne(null);try{yield g.controlDevice({id:le._id,type:e}),Ne({success:!0,message:`Command sent: ${e}`})}catch(e){Ne({success:!1,message:e.message})}Ue(!1)}}),function(e){return yl.apply(this,arguments)}),[g,le]),Nl=(0,o.useCallback)(r(function*(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(g&&le&&B){L(!0),Qe(null),Xe(null);try{e&&(yield g.controlDevice({id:le._id,type:"take-screenshot"}),yield new Promise(function(e){return setTimeout(e,3e3)}));var l=yield(0,d.he)(g,B,le._id,null,{preferThumbnail:!0});l.error?Qe(l.error):Xe(l)}catch(e){Qe(e.message)}L(!1)}}),[g,le,B]),Vl=p((0,o.useCallback)(function(){g&&Sl()},[g,Sl]),fl),Fl=p((0,o.useCallback)(function(){g&&le&&El(le._id)},[g,le,El]),gl),$l=p((0,o.useCallback)(function(){g&&kl()},[g,kl]),ml),Hl=p((0,o.useCallback)(function(){g&&Se&&Al(Se._id)},[g,Se,Al]),pl);return w&&!B?(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(D,{workspace:B,view:i}),(0,m.jsx)(T,{text:"Connecting to workspace..."})]}):k&&!B?(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(D,{workspace:B,view:i}),(0,m.jsxs)(t.Text,{color:"red",children:["Error: ",k]}),(0,m.jsx)(j,{})]}):(0,m.jsxs)(t.Box,{flexDirection:"column",children:[(0,m.jsx)(D,{workspace:B,view:i}),i===u.MAIN&&(0,m.jsx)(O,{onSelect:function(l){"exit"!==l.value?(x(l.value),l.value===u.DEVICES?Sl():l.value===u.APPS?wl():l.value===u.MODULES?Rl():l.value===u.GROUPS?kl():l.value===u.MEDIA_BOXES&&Cl()):e()},mediaEnabled:(0,d.wR)(B)}),i===u.DEVICES&&(0,m.jsx)(M,{devices:z,loading:w,onSelect:function(e){if("back"!==e.value){if("refresh"===e.value)return Sl(),void Vl.resetCountdown();ne(null),L(!0),x(u.DEVICE_DETAIL),El(e.value)}else x(u.MAIN)},countdown:Vl.countdown,lastRefreshTime:Vl.lastRefreshTime}),i===u.DEVICE_DETAIL&&(0,m.jsx)(P,{device:le,loading:w,error:$e,onSelect:function(e){return"back"===e.value?(x(u.DEVICES),void ne(null)):"refresh"===e.value?(El(le._id),void Fl.resetCountdown()):("control"===e.value&&(x(u.DEVICE_CONTROL),Ne(null)),void("screenshot"===e.value&&(x(u.DEVICE_SCREENSHOT),Xe(null),Qe(null),Nl(!1))))},mediaEnabled:(0,d.wR)(B),countdown:Fl.countdown,lastRefreshTime:Fl.lastRefreshTime}),i===u.DEVICE_CONTROL&&(0,m.jsx)(N,{device:le,onSelect:function(e){if("back"===e.value)return x(u.DEVICE_DETAIL),void Ne(null);Pl(e.value)},controlling:Ce,controlResult:Pe}),i===u.DEVICE_SCREENSHOT&&(0,m.jsx)(V,{device:le,screenshot:ze,loading:w,error:Ke,onSelect:function(e){if("back"===e.value)return x(u.DEVICE_DETAIL),Xe(null),void Qe(null);"refresh"!==e.value?"take"===e.value&&Nl(!0):Nl(!1)}}),i===u.APPS&&(0,m.jsx)(F,{apps:re,loading:w,onSelect:function(e){"back"!==e.value?"refresh"!==e.value?(ue(null),L(!0),x(u.APP_DETAIL),Ll(e.value)):wl():x(u.MAIN)}}),i===u.APP_DETAIL&&(0,m.jsx)($,{app:de,loading:w,error:$e,onSelect:function(e){if("back"===e.value)return x(u.APPS),void ue(null);"refresh"!==e.value?"short_edit"===e.value&&(x(u.APP_SHORT_EDIT),He(null)):Ll(de._id)}}),i===u.APP_SHORT_EDIT&&(0,m.jsx)(oe,{instanceType:"application",instance:de,client:g,onDone:r(function*(){return Ll(de._id)}),onCancel:function(){return x(u.APP_DETAIL)}}),i===u.MODULES&&(0,m.jsx)(H,{modules:fe,loading:w,onSelect:function(e){"back"!==e.value?"refresh"!==e.value?(De(null),L(!0),x(u.MODULE_DETAIL),Il(e.value)):Rl():x(u.MAIN)}}),i===u.MODULE_DETAIL&&(0,m.jsx)(q,{module:ve,loading:w,error:$e,onSelect:function(e){if("back"===e.value)return x(u.MODULES),void De(null);"refresh"!==e.value?"short_edit"===e.value&&(x(u.MODULE_SHORT_EDIT),He(null)):Il(ve._id)}}),i===u.MODULE_SHORT_EDIT&&(0,m.jsx)(oe,{instanceType:"module",instance:ve,client:g,onDone:r(function*(){return Il(ve._id)}),onCancel:function(){return x(u.MODULE_DETAIL)}}),i===u.GROUPS&&(0,m.jsx)(G,{groups:be,loading:w,onSelect:function(e){if("back"!==e.value){if("refresh"===e.value)return kl(),void $l.resetCountdown();Ee(null),Ie([]),L(!0),x(u.GROUP_DETAIL),Al(e.value)}else x(u.MAIN)},countdown:$l.countdown,lastRefreshTime:$l.lastRefreshTime}),i===u.GROUP_DETAIL&&(0,m.jsx)(X,{group:Se,groupDevices:Re,loading:w,error:$e,onSelect:function(e){if("back"===e.value)return x(u.GROUPS),Ee(null),void Ie([]);"refresh"===e.value&&(Al(Se._id),Hl.resetCountdown())},countdown:Hl.countdown,lastRefreshTime:Hl.lastRefreshTime}),i===u.MEDIA_BOXES&&(0,m.jsx)(Y,{boxes:el,loading:w,onSelect:function(e){"back"!==e.value?"refresh"!==e.value?(il(null),sl([]),L(!0),x(u.MEDIA_BOX_DETAIL),Ul(e.value)):Cl():x(u.MAIN)}}),i===u.MEDIA_BOX_DETAIL&&(0,m.jsx)(W,{box:tl,loading:w,error:$e,onSelect:function(e){if("back"===e.value)return x(u.MEDIA_BOXES),il(null),void sl([]);"refresh"!==e.value?"files"===e.value&&(sl([]),hl(null),x(u.MEDIA_FILES),Ol(tl.id)):Ul(tl.id)}}),i===u.MEDIA_FILES&&(0,m.jsx)(K,{files:al,box:tl,loading:w,onSelect:function(e){if("back"===e.value)return x(u.MEDIA_BOX_DETAIL),void hl(null);"refresh"!==e.value?(hl(null),L(!0),x(u.MEDIA_FILE_DETAIL),Ml(e.value)):Ol(tl.id)}}),i===u.MEDIA_FILE_DETAIL&&(0,m.jsx)(Q,{file:xl,loading:w,error:$e,onSelect:function(e){if("back"===e.value)return x(u.MEDIA_FILES),void hl(null);"refresh"===e.value&&Ml(xl.id)}}),(0,m.jsx)(j,{})]})};var ie=function(){(0,t.render)((0,m.jsx)(i.TerminalInfoProvider,{children:(0,m.jsx)(te,{})}))}}};
|