@deephaven/code-studio 0.82.1-beta.5 → 0.82.1-beta.6

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.
Files changed (43) hide show
  1. package/build/assets/{AppRoot-51525466.js → AppRoot-e0623c71.js} +3 -3
  2. package/build/assets/{AppRoot-51525466.js.map → AppRoot-e0623c71.js.map} +1 -1
  3. package/build/assets/{Chart-37481c88.js → Chart-e5224823.js} +2 -2
  4. package/build/assets/{Chart-37481c88.js.map → Chart-e5224823.js.map} +1 -1
  5. package/build/assets/{ControlType-2b4197fd.js → ControlType-ee9c672e.js} +13 -13
  6. package/build/assets/ControlType-ee9c672e.js.map +1 -0
  7. package/build/assets/{FontBootstrap-f8bc2b6d.js → FontBootstrap-4f906e56.js} +3 -3
  8. package/build/assets/{FontBootstrap-f8bc2b6d.js.map → FontBootstrap-4f906e56.js.map} +1 -1
  9. package/build/assets/{FormatterUtils-fe3b8652.js → FormatterUtils-aa7386ef.js} +2 -2
  10. package/build/assets/{FormatterUtils-fe3b8652.js.map → FormatterUtils-aa7386ef.js.map} +1 -1
  11. package/build/assets/{Grid-eff9aa93.js → Grid-4206eb66.js} +2 -2
  12. package/build/assets/{Grid-eff9aa93.js.map → Grid-4206eb66.js.map} +1 -1
  13. package/build/assets/{GridRenderer-cb63ac50.js → GridRenderer-bf66c0c9.js} +2 -2
  14. package/build/assets/{GridRenderer-cb63ac50.js.map → GridRenderer-bf66c0c9.js.map} +1 -1
  15. package/build/assets/{IrisGrid-d525e076.js → IrisGrid-c5f818f4.js} +2 -2
  16. package/build/assets/{IrisGrid-d525e076.js.map → IrisGrid-c5f818f4.js.map} +1 -1
  17. package/build/assets/{IrisGridModel-29b27b08.js → IrisGridModel-f63f94cc.js} +2 -2
  18. package/build/assets/{IrisGridModel-29b27b08.js.map → IrisGridModel-f63f94cc.js.map} +1 -1
  19. package/build/assets/{IrisGridShortcuts-e12bf0d8.js → IrisGridShortcuts-c8a512d6.js} +2 -2
  20. package/build/assets/{IrisGridShortcuts-e12bf0d8.js.map → IrisGridShortcuts-c8a512d6.js.map} +1 -1
  21. package/build/assets/{IrisGridThemeProvider-a72dea0c.js → IrisGridThemeProvider-ed895144.js} +2 -2
  22. package/build/assets/{IrisGridThemeProvider-a72dea0c.js.map → IrisGridThemeProvider-ed895144.js.map} +1 -1
  23. package/build/assets/{LocalWorkspaceStorage-79f086d0.js → LocalWorkspaceStorage-8e43291a.js} +2 -2
  24. package/build/assets/{LocalWorkspaceStorage-79f086d0.js.map → LocalWorkspaceStorage-8e43291a.js.map} +1 -1
  25. package/build/assets/{MarkdownEditor-bb0b1d96.js → MarkdownEditor-d90e4bef.js} +2 -2
  26. package/build/assets/{MarkdownEditor-bb0b1d96.js.map → MarkdownEditor-d90e4bef.js.map} +1 -1
  27. package/build/assets/{MarkdownNotebook-c6bd42d4.js → MarkdownNotebook-7c4e9125.js} +2 -2
  28. package/build/assets/{MarkdownNotebook-c6bd42d4.js.map → MarkdownNotebook-7c4e9125.js.map} +1 -1
  29. package/build/assets/{MissingPartitionError-aa20475a.js → MissingPartitionError-1e490bac.js} +2 -2
  30. package/build/assets/{MissingPartitionError-aa20475a.js.map → MissingPartitionError-1e490bac.js.map} +1 -1
  31. package/build/assets/{StyleGuideRoot-91a40d34.js → StyleGuideRoot-42855334.js} +2 -2
  32. package/build/assets/{StyleGuideRoot-91a40d34.js.map → StyleGuideRoot-42855334.js.map} +1 -1
  33. package/build/assets/index-0e1c1551.js +2 -0
  34. package/build/assets/index-0e1c1551.js.map +1 -0
  35. package/build/assets/{index-e2d3fd95.js → index-1f683a88.js} +3 -3
  36. package/build/assets/{index-e2d3fd95.js.map → index-1f683a88.js.map} +1 -1
  37. package/build/assets/{index-7a4a876f.js → index-2f2129be.js} +2 -2
  38. package/build/assets/{index-7a4a876f.js.map → index-2f2129be.js.map} +1 -1
  39. package/build/index.html +1 -1
  40. package/package.json +30 -30
  41. package/build/assets/ControlType-2b4197fd.js.map +0 -1
  42. package/build/assets/index-3f72c3f8.js +0 -2
  43. package/build/assets/index-3f72c3f8.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{r as c,I as d,b9 as ut,ah as lt,K as A,M as W,J as ct,V as K,ba as dt,L as ne,bb as ft,bc as ht,ag as vt,Z as de,bd as Ye,a0 as pt,T as mt}from"./vendor-6ba620f4.js";import{aS as gt,t as j,P as B,aJ as bt,aI as ie,ah as yt,u as wt,az as X,aZ as St,bw as Pt,c4 as Mt,bz as Ct,bB as Ot,c5 as xt,a7 as Et,X as Tt,W as Dt,bW as Rt,bY as ge,aj as _t,aY as It,aX as Lt,a4 as jt,c6 as L,c3 as At,c7 as Nt,c8 as $t,c9 as be,ca as ye,cb as we,cc as Se,b as Pe,a as Ft,I as Ut}from"./ControlType-2b4197fd.js";import{L as N,P as Kt,j as kt,af as Bt,ag as Wt,F as fe}from"./index-7a4a876f.js";import{a as Me}from"./IrisGridShortcuts-e12bf0d8.js";function Gt(r){var e=r;r instanceof CustomEvent&&(e=r.detail);var t="";if(e instanceof Error?t=e.message:e!=null&&(t="".concat(e)),t=t.trim(),t.length>0)return t}function Ze(r,e){c.useEffect(()=>{if(r!=null){var t=new window.ResizeObserver(e);return t.observe(r),()=>{r!=null&&t.unobserve(r)}}},[r,e])}function Pn(){var{selectedThemeKey:r,setSelectedThemeKey:e,themes:t}=gt(),n=c.useCallback(i=>{e(i)},[e]);return d.jsx(ut,{label:"Pick a color scheme",items:t,selectedKey:r,onSelectionChange:n,children:i=>d.jsx(lt,{children:i.name},i.themeKey)})}function Mn(r){var{className:e,style:t}=r;return d.jsx("div",{className:A("dh-logo",e),style:t})}function Ce(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function zt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ce(Object(t),!0).forEach(function(n){I(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function I(r,e,t){return e=Ht(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ht(r){var e=qt(r,"string");return typeof e=="symbol"?e:String(e)}function qt(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Oe=N.module("ContextMenu");class G extends c.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),I(this,"container",void 0),I(this,"oldFocus",void 0),I(this,"activeSubMenuRef",void 0),I(this,"subMenuTimer",void 0),I(this,"rAF",void 0),I(this,"initialPosition",void 0),this.handleBlur=this.handleBlur.bind(this),this.handleCloseSubMenu=this.handleCloseSubMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemContextMenu=this.handleMenuItemContextMenu.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.container=W.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=W.createRef(),this.subMenuTimer=0,this.rAF=0,this.initialPosition={top:e.top,left:e.left},this.state={menuItems:[],pendingItems:[],activeSubMenu:null,hasOverflow:!1,subMenuTop:null,subMenuLeft:null,subMenuParentWidth:0,subMenuParentHeight:0,keyboardIndex:-1,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.verifyPosition(),window.addEventListener("resize",this.handleWindowResize),this.rAF=window.requestAnimationFrame(()=>{var e;(e=this.container.current)===null||e===void 0||e.focus();var{onMenuOpened:t}=this.props;t(this)})}componentDidUpdate(e,t){var{actions:n}=this.props,{activeSubMenu:i}=this.state;if(i!==t.activeSubMenu)if(i==null){var o;(o=this.container.current)===null||o===void 0||o.focus()}else this.setActiveSubMenuPosition();if(e.actions!==n&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var s;(s=this.container.current)===null||s===void 0||s.focus()}this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var{options:e}=this.props;if(e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse){var{keyboardIndex:t}=this.state;return t}return this.getMouseIndex()}setKeyboardIndex(e){var{options:t}=this.props;t.separateKeyboardMouse!==void 0&&t.separateKeyboardMouse?this.setState({keyboardIndex:e}):this.setMouseIndex(e)}getMouseIndex(){var{mouseIndex:e}=this.state;return e}setMouseIndex(e){this.setState({mouseIndex:e})}initMenu(){this.cancelPromises(),cancelAnimationFrame(this.rAF);var{options:e}=this.props,t=e.initialKeyboardIndex;t===void 0&&(t=-1);for(var{actions:n}=this.props,i=j.getMenuItems(n),o=[],s=i.length-1;s>=0;s-=1){var a=i[s];a instanceof Promise?this.initMenuPromise(a):o.push(a)}this.setState({mouseIndex:-1,keyboardIndex:t,activeSubMenu:null,menuItems:j.sortActions(o)})}initMenuPromise(e){var t=B.makeCancelable(e);this.setState(n=>({pendingItems:n.pendingItems.concat(t)})),t.then(n=>{this.setState(i=>{var o=i.pendingItems.indexOf(t);if(o>=0){var s=i.pendingItems.slice();return s.splice(o,1),{menuItems:j.sortActions(i.menuItems.concat(n)),pendingItems:s}}return null})},n=>{B.isCanceled(n)||(this.setState(i=>{var o=i.pendingItems.indexOf(t);if(o>=0){var s=i.pendingItems.slice();return s.splice(o,1),{pendingItems:s}}return null}),Oe.error(n))})}cancelPromises(){var{pendingItems:e}=this.state;e.map(t=>t.cancel())}setActiveSubMenuPosition(){if(this.activeSubMenuRef.current!==null){var e=this.activeSubMenuRef.current.getBoundingClientRect();this.setState({subMenuTop:e.top,subMenuLeft:e.right,subMenuParentHeight:e.height,subMenuParentWidth:e.width})}}verifyPosition(){var e,t,n,i,{options:o,updatePosition:s,subMenuParentWidth:a,subMenuParentHeight:u,top:l,left:b}=this.props;if(!(!this.container.current||o.doNotVerifyPosition!=null&&o.doNotVerifyPosition)){var{top:f,left:g}=this.initialPosition,{width:y,height:m}=(e=(t=this.container.current)===null||t===void 0?void 0:t.getBoundingClientRect())!==null&&e!==void 0?e:{width:0,height:0},O=((n=(i=this.container.current)===null||i===void 0?void 0:i.scrollHeight)!==null&&n!==void 0?n:0)>window.innerHeight;m===0||y===0||(f+m>window.innerHeight&&(f-m-u>0?f-=m-u:f=window.innerHeight-m),g+y>window.innerWidth&&(g=g-y-a),(b!==g||l!==f)&&(this.setState({hasOverflow:O}),s(f,g)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){Oe.warn("Container is null!");return}if(!this.container.current.contains(e.relatedTarget)){for(var t=e.relatedTarget,n=!1;t&&!n;)n=t.hasAttribute("data-dh-context-menu"),t=t.parentElement;n||this.closeMenu(!0)}}isEscapeKey(e){var{left:t}=this.props;return e==="Escape"||t<0&&e==="ArrowRight"||e==="ArrowLeft"}handleKeyDown(e){var{menuItems:t}=this.state,n=this.getKeyboardIndex(),i=n,o=!1;if(e.key==="Enter"||e.key===" "){n>=0&&n<t.length&&this.handleMenuItemClick(t[n],e);return}if(e.key==="ArrowRight"?n>=0&&n<=t.length?o=!0:i=0:this.isEscapeKey(e.key)?i=null:e.key==="ArrowUp"||e.shiftKey&&e.key==="Tab"?i=j.getNextMenuItem(i,-1,t):(e.key==="ArrowDown"||e.key==="Tab")&&(i=j.getNextMenuItem(i,1,t)),o){this.openSubMenu(n),e.preventDefault(),e.stopPropagation();return}n!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}openSubMenu(e){var{menuItems:t,activeSubMenu:n}=this.state,i=t[e].actions?e:null;n!==i&&this.setState({activeSubMenu:i,subMenuTop:null,subMenuLeft:null})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,{closeMenu:t,onMenuClosed:n}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{t(e),n(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(e){e?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(e,t){t.preventDefault(),t.stopPropagation();var{menuItems:n}=this.state;e!=null&&(e.disabled===void 0||!e.disabled)&&(e.actions!=null?this.openSubMenu(n.indexOf(e)):e.action!=null&&(e.action(t.nativeEvent),this.closeMenu(!0)))}handleMenuItemContextMenu(e,t){t.metaKey||this.handleMenuItemClick(e,t)}handleMenuItemMouseMove(e){var{menuItems:t}=this.state,n=t.indexOf(e);this.setMouseIndex(n),n>=0&&n<t.length&&(e.disabled===void 0||!e.disabled)&&this.openSubMenu(n)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var e=[],{top:t,left:n}=this.props,{activeSubMenu:i,hasOverflow:o,keyboardIndex:s,menuItems:a,mouseIndex:u,pendingItems:l,subMenuTop:b,subMenuLeft:f,subMenuParentWidth:g,subMenuParentHeight:y}=this.state,m=0;m<a.length;m+=1){var O=a[m];m>0&&O.group!==a[m-1].group&&e.push(d.jsx("hr",{},"".concat(m,".separator")));var p=d.jsx(bt,{ref:i===m?this.activeSubMenuRef:null,isKeyboardSelected:s===m,isMouseSelected:u===m,menuItem:O,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},m);e.push(p)}var P=null;l.length>0&&(P=d.jsx("div",{className:"loading",children:d.jsx(Kt,{className:"loading-spinner-vertical-align"})}));var{menuStyle:U,"data-testid":H}=this.props,x=i!==null&&b!==null&&f!==null;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:A({"has-overflow":o},"context-menu-container"),style:zt({top:t,left:n},U),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:G.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":H,children:[e,P]}),x&&i!==null&&b!==null&&f!==null&&d.jsx(G,{actions:a[i].actions||[],closeMenu:this.handleCloseSubMenu,top:b,left:f,updatePosition:(M,R)=>{this.setState({subMenuTop:M,subMenuLeft:R})},subMenuParentWidth:g,subMenuParentHeight:y},"sub-".concat(i))]})}}I(G,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const Yt=G;function xe(r,e,t){return e=Zt(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Zt(r){var e=Xt(r,"string");return typeof e=="symbol"?e:String(e)}function Xt(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Jt extends c.Component{constructor(e){super(e),xe(this,"container",void 0),xe(this,"openMenu",void 0),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=W.createRef(),this.openMenu=W.createRef(),this.state={actions:null,left:0,top:0}}componentDidMount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu)}componentWillUnmount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu)}handleContextMenu(e){if(this.container.current){var t=this.container.current.getBoundingClientRect(),n=e.clientY-t.top,i=e.clientX-t.left,{actions:o}=this.state;if(o!=null&&e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{var a=document.elementFromPoint(i,n),u=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});a?.dispatchEvent(u)});return}if(j.isContextActionEvent(e)&&!(e.metaKey||e.ctrlKey)){var s=j.getMenuItems(e.contextActions);s.length!==0&&(e.preventDefault(),this.setState({actions:s,top:n,left:i}))}}}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){var e=null,{"data-testid":t}=this.props,{actions:n,top:i,left:o}=this.state;return n&&(e=d.jsx(Yt,{ref:this.openMenu,actions:n,onMenuClosed:this.handleMenuClose,top:i,left:o,updatePosition:(s,a)=>{this.setState({top:s,left:a})},"data-testid":t})),d.jsx("div",{className:A("context-menu-root",{active:n}),ref:this.container,children:e})}}const Cn=Jt;function Xe(r,e,t){return e=Qt(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Qt(r){var e=Vt(r,"string");return typeof e=="symbol"?e:String(e)}function Vt(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class D extends c.Component{static handleEnter(e){var t=e;t.style.height="0"}static handleEntering(e){var t=e;t.style.height="".concat(D.getHeight(t),"px")}static handleExiting(e){var t=e;t.style.height="0"}static handleExit(e){var t=e;t.style.height="".concat(D.getHeight(t),"px")}static getHeight(e){var t=e.scrollWidth-e.clientWidth;return e.scrollHeight-t}constructor(e){super(e),this.handleEntered=this.handleEntered.bind(this)}handleEntered(e){var t=e;t.style.height="";var{autoFocusOnShow:n}=this.props;if(n!==void 0&&n){var i=t.querySelector("input, select, textarea");i?.focus()}}render(){var{children:e,className:t,in:n,"data-testid":i}=this.props;return d.jsx(ct,{in:n,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:D.handleEnter,onEntering:D.handleEntering,onEntered:this.handleEntered,onExit:D.handleExit,onExiting:D.handleExiting,timeout:350,children:o=>d.jsx("div",{className:A({collapse:o==="exited"},t),"data-testid":i,children:e})})}}Xe(D,"propTypes",{className:K.string,in:K.bool.isRequired,children:K.node.isRequired,autoFocusOnShow:K.bool,"data-testid":K.string});Xe(D,"defaultProps",{className:"",autoFocusOnShow:!1,"data-testid":void 0});const On=D;function Ee(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function ee(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ee(Object(t),!0).forEach(function(n){er(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function er(r,e,t){return e=tr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function tr(r){var e=rr(r,"string");return typeof e=="symbol"?e:String(e)}function rr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Je=c.memo(r=>{var{tab:e,onClose:t,onSelect:n,isActive:i,activeRef:o,index:s,isDraggable:a,contextActions:u}=r,{key:l,isClosable:b=t!=null,title:f,icon:g}=e,y;return g!=null&&(y=W.isValidElement(g)?g:d.jsx(ne,{icon:g})),d.jsx(dt,{draggableId:l,index:s,isDragDisabled:!a,children:(m,O)=>d.jsxs("div",{className:"context-menu-wrapper",ref:i?o:null,children:[d.jsxs("div",ee(ee(ee({ref:m.innerRef},m.draggableProps),m.dragHandleProps),{},{className:A("btn btn-link btn-nav-tab",{active:i},{dragging:O.isDragging}),"data-testid":"btn-nav-tab-".concat(f),role:"tab",tabIndex:0,onAuxClick:p=>{b&&p.button===1&&p.buttons===0&&t?.(l)},onClick:p=>{if(b&&p.button===1&&p.buttons===0){t?.(l);return}p.button===0&&p.buttons===0&&(p.target.focus(),n(l))},onKeyPress:p=>{p.key==="Enter"&&n(l)},children:[y,f,b&&d.jsx(ie,{kind:"ghost",className:"btn-nav-tab-close",onClick:p=>{t?.(l),p.stopPropagation(),p.preventDefault()},icon:kt,tooltip:"Close"})]})),d.jsx(yt,{actions:u})]})},l)});Je.displayName="NavTab";const nr=Je;function Te(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function De(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Te(Object(t),!0).forEach(function(n){ir(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Te(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ir(r,e,t){return e=or(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function or(r){var e=ar(r,"string");return typeof e=="symbol"?e:String(e)}function ar(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var sr=500,ur=.01,lr=5e-4;function Re(r){return r.scrollLeft===0}function _e(r){return r.scrollLeft+r.clientWidth===r.scrollWidth||r.scrollWidth===0}function cr(r,e,t){var{isClosable:n=!1,key:i}=r,o=[];if(n&&t!=null){o.push({title:"Close",order:10,group:20,action:()=>{t(i)}});for(var s=!0,a=e.length-1;a>0&&e[a].key!==r.key;a-=1)if(e[a].isClosable===!0){s=!1;break}o.push({title:"Close to the Right",order:20,group:20,action:()=>{for(var u=e.length-1;u>0&&e[u].key!==i;u-=1)e[u].isClosable===!0&&t(e[u].key)},disabled:s}),o.push({title:"Close All",order:30,group:20,action:()=>{e.forEach(u=>{u.isClosable===!0&&t(u.key)})}})}return o}function xn(r){var{activeKey:e,tabs:t,onSelect:n,onReorder:i,onClose:o,makeContextActions:s}=r,a=c.useRef(),[u,l]=c.useState(!0),[b,f]=c.useState(!0),[g,y]=c.useState(!0),m=c.useCallback(()=>{a.current!=null&&(a.current.clientWidth<a.current.scrollWidth&&t.length>0?l(!0):l(!1),f(Re(a.current)),y(_e(a.current)))},[t]);Ze(a.current,m);var O=c.useCallback(h=>{Me.stopDragging(),h.destination&&i?.(h.source.index,h.destination.index)},[i]),p=c.useCallback(()=>{if(a.current!=null){var h=Re(a.current);h!==b&&f(h);var v=_e(a.current);v!==g&&y(v)}},[b,g]),P=c.useRef({cancelClick:!1}),U=c.useCallback(()=>{if(!(a.current==null||P.current.cancelClick))for(var{children:h}=a.current,v=h.length-1;v>=0;v-=1){var w=h[v];if(w.offsetLeft<a.current.scrollLeft-5){w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});return}}},[]),H=c.useCallback(()=>{if(!(a.current==null||P.current.cancelClick))for(var{children:h}=a.current,v=0;v<h.length;v+=1){var w=h[v];if(w.offsetLeft+5>a.current.scrollLeft+a.current.offsetWidth){w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"});return}}},[]),x=c.useCallback(function(h,v){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,S=arguments.length>3?arguments[3]:void 0,E=a.current;E!=null&&(P.current.cancelClick=!0,h==="left"?E.scrollLeft=v-w:h==="right"&&(E.scrollLeft=v+w),P.current.rAF=requestAnimationFrame(q=>{var pe=S??q,me=q-pe,V=ur*me+.5*lr*me**2;V=Math.min(V,E.scrollWidth),x(h,v,V,pe)}))},[]),M=c.useCallback(()=>{var{holdTimer:h,rAF:v}=P.current;h!=null&&(clearTimeout(h),P.current.holdTimer=void 0),v!=null&&(cancelAnimationFrame(v),P.current.rAF=void 0),window.removeEventListener("mouseup",M)},[]);c.useEffect(()=>()=>window.removeEventListener("mouseup",M),[M]);var R=c.useCallback(h=>{a.current!=null&&(P.current.holdTimer=window.setTimeout(x,sr,h,a.current.scrollLeft)),P.current.cancelClick=!1,window.addEventListener("mouseup",M)},[M,x]),nt=c.useCallback(()=>{R("left")},[R]),it=c.useCallback(()=>{R("right")},[R]);c.useEffect(function(){var v,w=S=>{S.stopPropagation(),S.preventDefault();var E=S.currentTarget,q=Math.abs(S.deltaY)>Math.abs(S.deltaX)?S.deltaY:S.deltaX;E.scrollLeft+=vt(q,-30,30)};return(v=a.current)===null||v===void 0||v.addEventListener("wheel",w),()=>{var S;(S=a.current)===null||S===void 0||S.removeEventListener("wheel",w)}},[]);var ot=c.useMemo(()=>{var h=new Map;return t.forEach(v=>{var{key:w}=v,S=[()=>cr(v,t,o),()=>{var E;return(E=s?.(v))!==null&&E!==void 0?E:[]}];h.set(w,S)}),h},[s,t,o]),Q=c.useRef(null),at=t.find(h=>h.key===e),st=t.map((h,v)=>{var{key:w}=h,S=h===at;return d.jsx(nr,{tab:h,index:v,isActive:S,activeRef:Q,onSelect:n,onClose:o,isDraggable:i!=null,contextActions:ot.get(w)},w)});return c.useEffect(function(){Q.current!=null&&Q.current.scrollIntoView({block:"nearest",inline:"nearest"})},[e]),d.jsxs("nav",{className:"nav-container",children:[u&&d.jsx(ie,{kind:"ghost",icon:d.jsx(ne,{icon:Bt,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-left",tooltip:"Scroll left",onClick:U,onMouseDown:nt,disabled:b}),d.jsx(ft,{onDragStart:Me.startDragging,onDragEnd:O,children:d.jsx(ht,{droppableId:"droppable-tab-navigation",direction:"horizontal",children:(h,v)=>d.jsxs("div",De(De({ref:w=>{w!=null&&(a.current=w,h.innerRef(w))}},h.droppableProps),{},{className:A("nav nav-tabs",{dragging:v.draggingFromThisWith}),role:"tablist",onScroll:p,children:[st,h.placeholder]}))})}),u&&d.jsx(ie,{kind:"ghost",icon:d.jsx(ne,{icon:Wt,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-right",tooltip:"Scroll right",onClick:H,onMouseDown:it,disabled:g})]})}function dr(r,e){var t=wt(),n=c.useMemo(()=>new t.CoreClient(r,e),[t,r,e]);return c.useEffect(()=>()=>{n.disconnect()},[n]),n}var Qe=c.createContext(null);function En(r){var{serverUrl:e,options:t,children:n}=r,i=dr(e,t);return d.jsx(Qe.Provider,{value:i,children:n})}function fr(){return X(Qe,"No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?")}function Ie(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function hr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){Ie(o,n,i,s,a,"next",u)}function a(u){Ie(o,n,i,s,a,"throw",u)}s(void 0)})}}var te=N.module("MessageUtils"),Tn="io.deephaven.message.LoginOptions.request",vr="io.deephaven.message.SessionDetails.request",Dn="io.deephaven.broadcast",pr="io.deephaven.broadcast.Login",mr="io.deephaven.broadcast.Logout";function Ve(r){var e=r;return e!=null&&typeof e.id=="string"&&typeof e.message=="string"}function Rn(r){return Ve(r)&&r.message===pr}function _n(r){return Ve(r)&&r.message===mr}function gr(r){var e=r;return e!=null&&typeof e.id=="string"}function br(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:de(),t=arguments.length>2?arguments[2]:void 0;return{message:r,id:e,payload:t}}function In(r,e){return{id:r,payload:e}}function yr(){return window.opener!=null?window.opener:window.parent!=null&&window.parent!==window?window.parent:null}function wr(r){return oe.apply(this,arguments)}function oe(){return oe=hr(function*(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e4,t=yr();if(t==null)throw new Error("window parent is null, unable to send request.");return new Promise((n,i)=>{var o,s=de(),a=u=>{var{data:l}=u;if(!gr(l)){te.debug("Ignoring non-deephaven response",l);return}if(te.debug("Received message",l),l?.id!==s){te.debug("Ignore message, id doesn't match",l);return}window.clearTimeout(o),window.removeEventListener("message",a),n(l.payload)};window.addEventListener("message",a),o=window.setTimeout(()=>{window.removeEventListener("message",a),i(new St("Request timed out"))},e),t.postMessage(br(r,s),"*")})}),oe.apply(this,arguments)}function Sr(r,e,t){return e=Pr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Pr(r){var e=Mr(r,"string");return typeof e=="symbol"?e:String(e)}function Mr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Cr extends Error{constructor(){super(...arguments),Sr(this,"isNoConsolesError",!0)}}function Or(r){return r.isNoConsolesError}function Le(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function J(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){Le(o,n,i,s,a,"next",u)}function a(u){Le(o,n,i,s,a,"throw",u)}s(void 0)})}}var F=N.module("SessionUtils");function Ln(r,e){return F.info("Starting connection to '".concat(e,"'...")),new r.IdeConnection(e)}function xr(r,e,t){return ae.apply(this,arguments)}function ae(){return ae=J(function*(r,e,t){F.info("Getting console types...");var n=yield e.getConsoleTypes();if(n.length===0)throw new Cr("No console types available");F.info("Available types:",n);var i=n[0];F.info("Starting session with type",i);var o=yield e.startSession(i),s={type:i,id:de()};return F.info("Console session established",s),{session:o,config:s,connection:e,details:t,dh:r}}),ae.apply(this,arguments)}function jn(r,e,t){return F.info("createCoreClient",e),new r.CoreClient(e,t)}function Er(r){return r!=null&&typeof r=="object"}function Tr(){return se.apply(this,arguments)}function se(){return se=J(function*(){var r=yield wr(vr);if(!Er(r))throw new Error("Unexpected session details response: ".concat(r));return r}),se.apply(this,arguments)}function An(){return ue.apply(this,arguments)}function ue(){return ue=J(function*(){var r=new URLSearchParams(window.location.search);switch(r.get("authProvider")){case"parent":return Tr()}return{}}),ue.apply(this,arguments)}function Nn(r,e,t){return le.apply(this,arguments)}function le(){return le=J(function*(r,e,t){var n;try{n=yield xr(r,e,t)}catch(i){if(!Or(i))throw i}return n}),le.apply(this,arguments)}function je(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Dr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?je(Object(t),!0).forEach(function(n){Rr(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):je(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Rr(r,e,t){return e=_r(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function _r(r){var e=Ir(r,"string");return typeof e=="symbol"?e:String(e)}function Ir(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Lr=100,re=()=>{},jr=Object.freeze({});function Ar(r){var{id:e="default",children:t,emptyDashboard:n,layoutConfig:i,layoutSettings:o=jr,onLayoutConfigChange:s=re,onGoldenLayoutChange:a=re,onLayoutInitialized:u=re,fallbackComponent:l=xt,hydrate:b,dehydrate:f,panelWrapper:g}=r,y=c.useRef(null),[m,O]=c.useState(!1),[p,P]=c.useState();c.useEffect(function(){if(!y.current){P(void 0);return}var x=Dr({},Pt.makeDefaultLayout());x.settings===void 0&&(x.settings={}),Object.assign(x.settings,o),x.content=[];var M=new Mt(x,y.current),R=()=>{M.off("initialised",R),O(!0)};return M.on("initialised",R),l!=null&&M.setFallbackComponent(l),M.init(),P(M),a(M),()=>{M.destroy()}},[o,l,a,O,P]);var U=c.useMemo(()=>Ye(()=>{p!=null&&p.isInitialised&&p?.updateSize()},Lr),[p]);return Ze(y.current,U),d.jsxs("div",{className:"dashboard-container w-100 h-100",children:[d.jsx("div",{className:"w-100 h-100",ref:y}),m&&p&&d.jsx(Ct.Provider,{value:p,children:d.jsx(Ot,{emptyDashboard:n,id:e,layout:p,layoutConfig:i,onLayoutChange:s,onLayoutInitialized:u,hydrate:b,dehydrate:f,panelWrapper:g,children:t})})]})}var he="CREATE_DASHBOARD";function Nr(r,e){try{r.off(he,e)}catch{}}function $n(r,e){return r.on(he,e),()=>Nr(r,e)}function Fn(r,e){r.emit(he,e)}var $r=["id","isActive","plugins"];function Ae(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ne(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ae(Object(t),!0).forEach(function(n){Fr(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ae(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Fr(r,e,t){return e=Ur(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ur(r){var e=Kr(r,"string");return typeof e=="symbol"?e:String(e)}function Kr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function kr(r,e){if(r==null)return{};var t=Br(r,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function Br(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function Wr(r){var{id:e,isActive:t,plugins:n}=r,i=kr(r,$r),[o,s]=c.useState(t),a=pt(),u=c.useCallback(l=>{a(e===Et?Tt({layoutConfig:l}):Dt(e,{layoutConfig:l}))},[e,a]);return!o&&t&&s(!0),o?d.jsx(Ar,Ne(Ne({id:e,onLayoutConfigChange:u},i),{},{children:n})):d.jsx(fe,{})}function Gr(r){var e=[...r.entries()].filter(t=>{var[,n]=t;return Rt(n)||ge(n)});return e.map(t=>{var[n,i]=t;if(ge(i)){var{DashboardPlugin:o}=i;return d.jsx(o,{},n)}var{component:s}=i;return d.jsx(s,{},n)})}function Un(){var r=_t(),e=c.useMemo(()=>Gr(r),[r]);return e}var Kn=c.createContext({}),kn=c.createContext({}),zr=c.createContext(null),Hr=c.createContext(null);function $e(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function qr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){$e(o,n,i,s,a,"next",u)}function a(u){$e(o,n,i,s,a,"throw",u)}s(void 0)})}}var et=c.createContext(null);function Bn(r){var{children:e}=r,t=fr(),[n,i]=c.useState(),[o,s]=c.useState();c.useEffect(function(){var l=!1;function b(){return f.apply(this,arguments)}function f(){return f=qr(function*(){try{var g=yield t.getServerConfigValues();l||i(new Map(g))}catch(y){l||s(y)}}),f.apply(this,arguments)}return b(),()=>{l=!0}},[t]);var a=n==null;return a||o!=null?d.jsx(fe,{isLoading:a&&o==null,errorMessage:Gt(o)}):d.jsx(et.Provider,{value:n,children:e})}function Wn(){return X(et,"No server config available in useServerConfig. Was code wrapped in ServerConfigBootstrap or ServerConfigContext.Provider?")}function Fe(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function Yr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){Fe(o,n,i,s,a,"next",u)}function a(u){Fe(o,n,i,s,a,"throw",u)}s(void 0)})}}function Ue(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ke(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ue(Object(t),!0).forEach(function(n){Zr(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ue(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Zr(r,e,t){return e=Xr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Xr(r){var e=Jr(r,"string");return typeof e=="symbol"?e:String(e)}function Jr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Gn(r){var{dashboards:e,activeDashboard:t,onLayoutInitialized:n,onGoldenLayoutChange:i,plugins:o,emptyDashboard:s=d.jsx(fe,{})}=r,a=It(),u=c.useCallback((l,b)=>{var{metadata:f}=l;try{if(f!=null){var g=Lt(f);return Ke(Ke({fetch:function(){var y=Yr(function*(){return a(g)});function m(){return y.apply(this,arguments)}return m}()},l),{},{localDashboardId:b})}}catch{}return jt.hydrate(l,b)},[a]);return d.jsx("div",{className:"tab-content",children:e.map(l=>d.jsx("div",{className:A("tab-pane",{active:l.id===t}),children:d.jsx(Wr,{id:l.id,isActive:l.id===t,emptyDashboard:s,layoutConfig:l.layoutConfig,layoutSettings:l.layoutSettings,onLayoutInitialized:n,onGoldenLayoutChange:i,hydrate:u,plugins:o},l.key)},l.id))})}function zn(){return X(Hr,"No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?")}function Hn(){return X(zr,"No user available in useUser. Was code wrapped in UserBootstrap or UserContext.Provider?")}function ke(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function Qr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){ke(o,n,i,s,a,"next",u)}function a(u){ke(o,n,i,s,a,"throw",u)}s(void 0)})}}function T(r,e,t){return e=Vr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Vr(r){var e=en(r,"string");return typeof e=="symbol"?e:String(e)}function en(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var k=N.module("GrpcFileStorageTable");class z{constructor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t;T(this,"storageService",void 0),T(this,"baseRoot",void 0),T(this,"root",void 0),T(this,"currentSize",0),T(this,"currentViewport",void 0),T(this,"listeners",[]),T(this,"viewportUpdatePromise",void 0),T(this,"currentViewportData",void 0),T(this,"childTables",new Map),this.storageService=e,this.baseRoot=t,this.root=n,n===t&&(this.doRefresh=mt(this.doRefresh.bind(this),z.REFRESH_DEBOUNCE))}removeBaseRoot(e){return L.removeRoot(this.baseRoot,e)}getViewportData(){var e;return this.viewportUpdatePromise||this.refreshInternal(),(e=this.viewportUpdatePromise)!==null&&e!==void 0?e:Promise.resolve({items:[],offset:0})}getSnapshot(e){throw new Error("Method not implemented.")}get size(){return this.currentSize}setExpanded(e,t){var n=e.split("/"),i=n.shift();if((i===void 0||i==="")&&(i=n.shift()),i===void 0||i==="")throw new Error("Invalid path: ".concat(e));var o=n.join("/");if(t){if(!this.childTables.has(i)){var s=new z(this.storageService,this.baseRoot,"".concat(this.root,"/").concat(i));this.childTables.set(i,s)}if(o){var a=this.childTables.get(i);a?.setExpanded(o,t)}}else if(this.childTables.has(i))if(o){var u=this.childTables.get(i);u?.setExpanded(o,t)}else this.childTables.delete(i);this.currentViewport&&this.refreshInternal()}collapseAll(){this.childTables.clear(),this.currentViewport&&this.refreshInternal()}setSearch(e){throw new Error("Method not implemented.")}setViewport(e){this.currentViewport=e,this.refreshInternal()}setFilters(){throw new Error("Method not implemented.")}setSorts(){throw new Error("Method not implemented.")}setReversed(){throw new Error("Method not implemented.")}close(){this.listeners=[]}onUpdate(e){return this.listeners=[...this.listeners,e],()=>{this.listeners=this.listeners.filter(t=>t!==e)}}doRefresh(e){k.debug2("doRefresh",this.root),e(this.fetchData())}refresh(){var e;k.debug2("refresh",this.root),(e=this.viewportUpdatePromise)===null||e===void 0||e.cancel();var t=new Promise(i=>{this.doRefresh(i)}),n=B.makeCancelable(t.then(i=>{if(this.viewportUpdatePromise!==n)throw new At;return this.currentViewportData=i,this.sendUpdate(),i}));n.catch(i=>{B.isCanceled(i)||k.error("Error updating viewport",i)}),this.viewportUpdatePromise=n}refreshInternal(){try{this.refresh()}catch(e){B.isCanceled(e)||k.error("Unable to refresh data",e)}}fetchData(){var e=this;return Qr(function*(){var{currentViewport:t}=e;if(!t)throw new Error("No viewport set");for(var n=yield e.storageService.listItems(e.root),i=n.map(f=>({type:f.type,filename:e.removeBaseRoot(f.filename),basename:f.basename,id:e.removeBaseRoot(f.filename),isExpanded:f.type==="directory"?e.childTables.has(f.basename):void 0})).sort((f,g)=>f.type!==g.type?f.type==="directory"?-1:1:f.basename.localeCompare(g.basename)),o=0;o<i.length;o+=1){var s=i[o],{basename:a,filename:u}=s;if(u===e.removeBaseRoot("".concat(e.root,"/").concat(a))&&s.type==="directory"){var l=e.childTables.get(a);if(l!=null){l.setViewport({top:0,bottom:t.bottom-o});var b=yield l.getViewportData();i.splice(o+1,0,...b.items)}}}return e.currentSize=i.length,k.debug2(e.root,"items",i,t),i=i.slice(t.top,t.bottom),{items:i,offset:t.top}})()}sendUpdate(){for(var e,{listeners:t}=this,n=(e=this.currentViewportData)!==null&&e!==void 0?e:{items:[],offset:0},i=0;i<t.length;i+=1)t[i](n)}}T(z,"REFRESH_DEBOUNCE",50);function Be(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function _(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){Be(o,n,i,s,a,"next",u)}function a(u){Be(o,n,i,s,a,"throw",u)}s(void 0)})}}function $(r,e,t){return e=tn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function tn(r){var e=rn(r,"string");return typeof e=="symbol"?e:String(e)}function rn(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var nn=N.module("GrpcFileStorage");class ve{constructor(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";$(this,"dh",void 0),$(this,"storageService",void 0),$(this,"tables",[]),$(this,"root",void 0),$(this,"refreshTables",Ye(()=>{this.tables.forEach(i=>i.refresh())},ve.REFRESH_THROTTLE)),this.dh=e,this.storageService=t,this.root=n}removeRoot(e){return L.removeRoot(this.root,e)}addRoot(e){return L.addRoot(this.root,e)}createDirectory(e){var t=this;return _(function*(){return yield t.storageService.createDirectory(t.addRoot(e)),t.refreshTables(),{type:"directory",id:e,filename:e,basename:L.getBaseName(e)}})()}getTable(){var e=this;return _(function*(){var t=new z(e.storageService,e.root);return e.tables.push(t),t})()}saveFile(e){var t=this;return _(function*(){var n=t.dh.storage.FileContents.text(e.content);return yield t.storageService.saveFile(t.addRoot(e.filename),n,!0),t.refreshTables(),e})()}loadFile(e){var t=this;return _(function*(){var n=yield t.storageService.loadFile(t.addRoot(e)),i=yield n.text();return{filename:e,basename:L.getBaseName(e),content:i}})()}copyFile(e,t){var n=this;return _(function*(){var i=yield n.storageService.loadFile(n.addRoot(e));yield n.storageService.saveFile(n.addRoot(t),i,!1),n.refreshTables()})()}deleteFile(e){var t=this;return _(function*(){yield t.storageService.deleteItem(t.addRoot(e)),t.refreshTables()})()}moveFile(e,t){var n=this;return _(function*(){yield n.storageService.moveItem(n.addRoot(e),n.addRoot(t)),n.refreshTables()})()}info(e){var t=this;return _(function*(){var n=yield t.storageService.listItems(t.addRoot(L.getPath(e)),L.getBaseName(e));if(n.length===0)throw new Nt;if(n.length>1)throw nn.error("More than one matching file found, should never happen.",n),new Error("More than one matching file found");var i=n[0];if(!$t(i.type))throw new Error("Unexpected file type: ".concat(i.type));return{filename:t.removeRoot(i.filename),basename:i.basename,id:t.removeRoot(i.filename),type:i.type}})()}}$(ve,"REFRESH_THROTTLE",150);function We(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function Ge(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){We(o,n,i,s,a,"next",u)}function a(u){We(o,n,i,s,a,"throw",u)}s(void 0)})}}function ze(r,e,t){return e=on(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function on(r){var e=an(r,"string");return typeof e=="symbol"?e:String(e)}function an(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class qn{constructor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";ze(this,"storageService",void 0),ze(this,"root",void 0),this.storageService=e,this.root=t}getLayouts(){var e=this;return Ge(function*(){var t=yield e.storageService.listItems(e.root,"*.json");return t.map(n=>n.basename)})()}getLayout(e){var t=this;return Ge(function*(){var n=yield t.storageService.loadFile("".concat(t.root,"/").concat(e)),i=yield n.text();return JSON.parse(i)})()}}function sn(r){return r.version===2}function un(r){return Array.isArray(r)}function He(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function ln(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){He(o,n,i,s,a,"next",u)}function a(u){He(o,n,i,s,a,"throw",u)}s(void 0)})}}var Y=N.module("UserLayoutUtils"),cn={layoutConfig:[{type:"column",content:[{type:"row",height:40,content:[{type:"stack",content:[{type:"react-component",component:be.COMPONENT,title:be.TITLE,isClosable:!1},{type:"react-component",component:ye.COMPONENT,title:ye.TITLE,isClosable:!1}]},{type:"stack",width:25,content:[{type:"react-component",component:we.COMPONENT,title:we.TITLE,isClosable:!1},{type:"react-component",component:Se.COMPONENT,title:Se.TITLE,isClosable:!1}]}]},{type:"row",content:[{type:"stack",title:"Notebooks",content:[]}]}]}],links:[],filterSets:[],version:2},dn={layoutConfig:[],links:[],filterSets:[],version:2};function tt(r){if(sn(r))return r;if(un(r)){var e=r;return{layoutConfig:e,links:[],filterSets:[],version:2}}throw new Error("Unexpected layout import format: ".concat(r))}function fn(r){return ce.apply(this,arguments)}function ce(){return ce=ln(function*(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;try{var t=yield r.getLayouts();if(t.length>0)try{var n=yield r.getLayout(t[0]);return tt(n)}catch(i){Y.error("Unable to load layout",t[0],":",i),Y.warn("No valid layouts found, falling back to default layout")}}catch(i){Y.error("Unable to fetch layout list",i),Y.warn("Falling back to default layout")}return e?cn:dn}),ce.apply(this,arguments)}function hn(r){var{filterSets:e,layoutConfig:t,links:n,pluginDataMap:i}=r,o={filterSets:e,layoutConfig:t,links:n,pluginDataMap:i,version:2};return o}const vn={exportLayout:hn,getDefaultLayout:fn,normalizeLayout:tt};function qe(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function Z(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){qe(o,n,i,s,a,"next",u)}function a(u){qe(o,n,i,s,a,"throw",u)}s(void 0)})}}function rt(r,e,t){return e=pn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function pn(r){var e=mn(r,"string");return typeof e=="symbol"?e:String(e)}function mn(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var gn=N.module("LocalWorkspaceStorage");class C{static getBooleanServerConfig(e,t){var n,i;if((e==null||(n=e.get(t))===null||n===void 0?void 0:n.toLowerCase())==="true")return!0;if((e==null||(i=e.get(t))===null||i===void 0?void 0:i.toLowerCase())==="false")return!1}static makeDefaultWorkspaceSettings(e){for(var t={defaultDateTimeFormat:Pe.DEFAULT_DATETIME_FORMAT_STRING,formatter:[],timeZone:Pe.DEFAULT_TIME_ZONE_ID,showTimeZone:!1,showTSeparator:!0,disableMoveConfirmation:!1,defaultDecimalFormatOptions:{defaultFormatString:Ft.DEFAULT_FORMAT_STRING},defaultIntegerFormatOptions:{defaultFormatString:Ut.DEFAULT_FORMAT_STRING},truncateNumbersWithPound:!1,showEmptyStrings:!0,showNullStrings:!0,defaultNotebookSettings:{isMinimapEnabled:!1}},n={defaultDateTimeFormat:e?.get("dateTimeFormat"),formatter:[],timeZone:e?.get("timeZone"),showTimeZone:C.getBooleanServerConfig(e,"showTimeZone"),showTSeparator:C.getBooleanServerConfig(e,"showTSeparator"),disableMoveConfirmation:C.getBooleanServerConfig(e,"disableMoveConfirmation"),defaultDecimalFormatOptions:e?.get("decimalFormat")!==void 0?{defaultFormatString:e?.get("decimalFormat")}:void 0,defaultIntegerFormatOptions:e?.get("integerFormat")!==void 0?{defaultFormatString:e?.get("integerFormat")}:void 0,truncateNumbersWithPound:C.getBooleanServerConfig(e,"truncateNumbersWithPound"),showEmptyStrings:C.getBooleanServerConfig(e,"showEmptyStrings"),showNullStrings:C.getBooleanServerConfig(e,"showNullStrings"),defaultNotebookSettings:e?.get("isMinimapEnabled")!==void 0?{isMinimapEnabled:C.getBooleanServerConfig(e,"isMinimapEnabled")}:void 0},i=Object.keys(n),o=0;o<i.length;o+=1){var s=i[o];n[s]!==void 0&&(t[s]=n[s])}return t}static makeWorkspaceData(e,t){return Z(function*(){var{filterSets:n,links:i,layoutConfig:o,pluginDataMap:s={}}=yield vn.getDefaultLayout(e,t?.isConsoleAvailable);return{settings:{},layoutConfig:o,closed:[{}],links:i,filterSets:n,pluginDataMap:s}})()}static makeDefaultWorkspace(e,t){return Z(function*(){return{data:yield C.makeWorkspaceData(e,t)}})()}constructor(e){rt(this,"layoutStorage",void 0),this.layoutStorage=e}load(e){var t=this;return Z(function*(){try{var n,i=JSON.parse((n=localStorage.getItem(C.STORAGE_KEY))!==null&&n!==void 0?n:"");return i}catch{return gn.info("Unable to load workspace data, initializing to default data"),C.makeDefaultWorkspace(t.layoutStorage,e)}})()}save(e){return Z(function*(){return localStorage.setItem(C.STORAGE_KEY,JSON.stringify(e)),e})()}}rt(C,"STORAGE_KEY","deephaven.WorkspaceStorage");export{un as $,Gn as A,Dn as B,On as C,Ve as D,Or as E,gr as F,qn as G,In as H,wr as I,Ar as J,he as K,Mn as L,Wr as M,xn as N,Fn as O,Un as P,Gt as Q,kn as R,vr as S,Pn as T,vn as U,zr as V,Kn as W,Hr as X,Bn as Y,z as Z,sn as _,mr as a,cn as a0,dn as a1,tt as a2,fn as a3,hn as a4,Cn as b,zn as c,Wn as d,Hn as e,An as f,Gr as g,Nn as h,ve as i,C as j,Ze as k,$n as l,br as m,En as n,Qe as o,pr as p,Tn as q,Cr as r,Nr as s,Ln as t,fr as u,jn as v,xr as w,yr as x,Rn as y,_n as z};
2
- //# sourceMappingURL=LocalWorkspaceStorage-79f086d0.js.map
1
+ import{r as c,I as d,b9 as ut,ah as lt,K as A,M as W,J as ct,V as K,ba as dt,L as ne,bb as ft,bc as ht,ag as vt,Z as de,bd as Ye,a0 as pt,T as mt}from"./vendor-6ba620f4.js";import{aT as gt,t as j,P as B,aJ as bt,aI as ie,ah as yt,u as wt,az as X,a_ as St,bx as Pt,c5 as Mt,bA as Ct,bC as Ot,c6 as xt,a7 as Et,X as Tt,W as Dt,bX as _t,bZ as ge,aj as Rt,aZ as It,aY as Lt,a4 as jt,c7 as L,c4 as At,c8 as Nt,c9 as $t,ca as be,cb as ye,cc as we,cd as Se,b as Pe,a as Ft,I as Ut}from"./ControlType-ee9c672e.js";import{L as N,P as Kt,j as kt,af as Bt,ag as Wt,F as fe}from"./index-2f2129be.js";import{a as Me}from"./IrisGridShortcuts-c8a512d6.js";function Gt(r){var e=r;r instanceof CustomEvent&&(e=r.detail);var t="";if(e instanceof Error?t=e.message:e!=null&&(t="".concat(e)),t=t.trim(),t.length>0)return t}function Ze(r,e){c.useEffect(()=>{if(r!=null){var t=new window.ResizeObserver(e);return t.observe(r),()=>{r!=null&&t.unobserve(r)}}},[r,e])}function Pn(){var{selectedThemeKey:r,setSelectedThemeKey:e,themes:t}=gt(),n=c.useCallback(i=>{e(i)},[e]);return d.jsx(ut,{label:"Pick a color scheme",items:t,selectedKey:r,onSelectionChange:n,children:i=>d.jsx(lt,{children:i.name},i.themeKey)})}function Mn(r){var{className:e,style:t}=r;return d.jsx("div",{className:A("dh-logo",e),style:t})}function Ce(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function zt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ce(Object(t),!0).forEach(function(n){I(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ce(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function I(r,e,t){return e=Ht(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ht(r){var e=qt(r,"string");return typeof e=="symbol"?e:String(e)}function qt(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Oe=N.module("ContextMenu");class G extends c.PureComponent{static handleContextMenu(e){e.metaKey||(e.stopPropagation(),e.preventDefault())}constructor(e){super(e),I(this,"container",void 0),I(this,"oldFocus",void 0),I(this,"activeSubMenuRef",void 0),I(this,"subMenuTimer",void 0),I(this,"rAF",void 0),I(this,"initialPosition",void 0),this.handleBlur=this.handleBlur.bind(this),this.handleCloseSubMenu=this.handleCloseSubMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemContextMenu=this.handleMenuItemContextMenu.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.container=W.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=W.createRef(),this.subMenuTimer=0,this.rAF=0,this.initialPosition={top:e.top,left:e.left},this.state={menuItems:[],pendingItems:[],activeSubMenu:null,hasOverflow:!1,subMenuTop:null,subMenuLeft:null,subMenuParentWidth:0,subMenuParentHeight:0,keyboardIndex:-1,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.verifyPosition(),window.addEventListener("resize",this.handleWindowResize),this.rAF=window.requestAnimationFrame(()=>{var e;(e=this.container.current)===null||e===void 0||e.focus();var{onMenuOpened:t}=this.props;t(this)})}componentDidUpdate(e,t){var{actions:n}=this.props,{activeSubMenu:i}=this.state;if(i!==t.activeSubMenu)if(i==null){var o;(o=this.container.current)===null||o===void 0||o.focus()}else this.setActiveSubMenuPosition();if(e.actions!==n&&(this.initMenu(),this.container.current==null||!this.container.current.contains(document.activeElement))){var s;(s=this.container.current)===null||s===void 0||s.focus()}this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){var{options:e}=this.props;if(e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse){var{keyboardIndex:t}=this.state;return t}return this.getMouseIndex()}setKeyboardIndex(e){var{options:t}=this.props;t.separateKeyboardMouse!==void 0&&t.separateKeyboardMouse?this.setState({keyboardIndex:e}):this.setMouseIndex(e)}getMouseIndex(){var{mouseIndex:e}=this.state;return e}setMouseIndex(e){this.setState({mouseIndex:e})}initMenu(){this.cancelPromises(),cancelAnimationFrame(this.rAF);var{options:e}=this.props,t=e.initialKeyboardIndex;t===void 0&&(t=-1);for(var{actions:n}=this.props,i=j.getMenuItems(n),o=[],s=i.length-1;s>=0;s-=1){var a=i[s];a instanceof Promise?this.initMenuPromise(a):o.push(a)}this.setState({mouseIndex:-1,keyboardIndex:t,activeSubMenu:null,menuItems:j.sortActions(o)})}initMenuPromise(e){var t=B.makeCancelable(e);this.setState(n=>({pendingItems:n.pendingItems.concat(t)})),t.then(n=>{this.setState(i=>{var o=i.pendingItems.indexOf(t);if(o>=0){var s=i.pendingItems.slice();return s.splice(o,1),{menuItems:j.sortActions(i.menuItems.concat(n)),pendingItems:s}}return null})},n=>{B.isCanceled(n)||(this.setState(i=>{var o=i.pendingItems.indexOf(t);if(o>=0){var s=i.pendingItems.slice();return s.splice(o,1),{pendingItems:s}}return null}),Oe.error(n))})}cancelPromises(){var{pendingItems:e}=this.state;e.map(t=>t.cancel())}setActiveSubMenuPosition(){if(this.activeSubMenuRef.current!==null){var e=this.activeSubMenuRef.current.getBoundingClientRect();this.setState({subMenuTop:e.top,subMenuLeft:e.right,subMenuParentHeight:e.height,subMenuParentWidth:e.width})}}verifyPosition(){var e,t,n,i,{options:o,updatePosition:s,subMenuParentWidth:a,subMenuParentHeight:u,top:l,left:b}=this.props;if(!(!this.container.current||o.doNotVerifyPosition!=null&&o.doNotVerifyPosition)){var{top:f,left:g}=this.initialPosition,{width:y,height:m}=(e=(t=this.container.current)===null||t===void 0?void 0:t.getBoundingClientRect())!==null&&e!==void 0?e:{width:0,height:0},O=((n=(i=this.container.current)===null||i===void 0?void 0:i.scrollHeight)!==null&&n!==void 0?n:0)>window.innerHeight;m===0||y===0||(f+m>window.innerHeight&&(f-m-u>0?f-=m-u:f=window.innerHeight-m),g+y>window.innerWidth&&(g=g-y-a),(b!==g||l!==f)&&(this.setState({hasOverflow:O}),s(f,g)))}}handleWindowResize(){this.container.current&&this.closeMenu(!0)}handleBlur(e){if(!this.container.current){Oe.warn("Container is null!");return}if(!this.container.current.contains(e.relatedTarget)){for(var t=e.relatedTarget,n=!1;t&&!n;)n=t.hasAttribute("data-dh-context-menu"),t=t.parentElement;n||this.closeMenu(!0)}}isEscapeKey(e){var{left:t}=this.props;return e==="Escape"||t<0&&e==="ArrowRight"||e==="ArrowLeft"}handleKeyDown(e){var{menuItems:t}=this.state,n=this.getKeyboardIndex(),i=n,o=!1;if(e.key==="Enter"||e.key===" "){n>=0&&n<t.length&&this.handleMenuItemClick(t[n],e);return}if(e.key==="ArrowRight"?n>=0&&n<=t.length?o=!0:i=0:this.isEscapeKey(e.key)?i=null:e.key==="ArrowUp"||e.shiftKey&&e.key==="Tab"?i=j.getNextMenuItem(i,-1,t):(e.key==="ArrowDown"||e.key==="Tab")&&(i=j.getNextMenuItem(i,1,t)),o){this.openSubMenu(n),e.preventDefault(),e.stopPropagation();return}n!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}openSubMenu(e){var{menuItems:t,activeSubMenu:n}=this.state,i=t[e].actions?e:null;n!==i&&this.setState({activeSubMenu:i,subMenuTop:null,subMenuLeft:null})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,{closeMenu:t,onMenuClosed:n}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{t(e),n(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(e){e?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(e,t){t.preventDefault(),t.stopPropagation();var{menuItems:n}=this.state;e!=null&&(e.disabled===void 0||!e.disabled)&&(e.actions!=null?this.openSubMenu(n.indexOf(e)):e.action!=null&&(e.action(t.nativeEvent),this.closeMenu(!0)))}handleMenuItemContextMenu(e,t){t.metaKey||this.handleMenuItemClick(e,t)}handleMenuItemMouseMove(e){var{menuItems:t}=this.state,n=t.indexOf(e);this.setMouseIndex(n),n>=0&&n<t.length&&(e.disabled===void 0||!e.disabled)&&this.openSubMenu(n)}handleMouseLeave(){this.setMouseIndex(-1)}render(){for(var e=[],{top:t,left:n}=this.props,{activeSubMenu:i,hasOverflow:o,keyboardIndex:s,menuItems:a,mouseIndex:u,pendingItems:l,subMenuTop:b,subMenuLeft:f,subMenuParentWidth:g,subMenuParentHeight:y}=this.state,m=0;m<a.length;m+=1){var O=a[m];m>0&&O.group!==a[m-1].group&&e.push(d.jsx("hr",{},"".concat(m,".separator")));var p=d.jsx(bt,{ref:i===m?this.activeSubMenuRef:null,isKeyboardSelected:s===m,isMouseSelected:u===m,menuItem:O,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},m);e.push(p)}var P=null;l.length>0&&(P=d.jsx("div",{className:"loading",children:d.jsx(Kt,{className:"loading-spinner-vertical-align"})}));var{menuStyle:U,"data-testid":H}=this.props,x=i!==null&&b!==null&&f!==null;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:A({"has-overflow":o},"context-menu-container"),style:zt({top:t,left:n},U),ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:G.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":H,children:[e,P]}),x&&i!==null&&b!==null&&f!==null&&d.jsx(G,{actions:a[i].actions||[],closeMenu:this.handleCloseSubMenu,top:b,left:f,updatePosition:(M,_)=>{this.setState({subMenuTop:M,subMenuLeft:_})},subMenuParentWidth:g,subMenuParentHeight:y},"sub-".concat(i))]})}}I(G,"defaultProps",{subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0});const Yt=G;function xe(r,e,t){return e=Zt(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Zt(r){var e=Xt(r,"string");return typeof e=="symbol"?e:String(e)}function Xt(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Jt extends c.Component{constructor(e){super(e),xe(this,"container",void 0),xe(this,"openMenu",void 0),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=W.createRef(),this.openMenu=W.createRef(),this.state={actions:null,left:0,top:0}}componentDidMount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu)}componentWillUnmount(){var e;(e=this.container.current)!==null&&e!==void 0&&e.parentElement&&this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu)}handleContextMenu(e){if(this.container.current){var t=this.container.current.getBoundingClientRect(),n=e.clientY-t.top,i=e.clientX-t.left,{actions:o}=this.state;if(o!=null&&e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{var a=document.elementFromPoint(i,n),u=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});a?.dispatchEvent(u)});return}if(j.isContextActionEvent(e)&&!(e.metaKey||e.ctrlKey)){var s=j.getMenuItems(e.contextActions);s.length!==0&&(e.preventDefault(),this.setState({actions:s,top:n,left:i}))}}}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){var e=null,{"data-testid":t}=this.props,{actions:n,top:i,left:o}=this.state;return n&&(e=d.jsx(Yt,{ref:this.openMenu,actions:n,onMenuClosed:this.handleMenuClose,top:i,left:o,updatePosition:(s,a)=>{this.setState({top:s,left:a})},"data-testid":t})),d.jsx("div",{className:A("context-menu-root",{active:n}),ref:this.container,children:e})}}const Cn=Jt;function Xe(r,e,t){return e=Qt(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Qt(r){var e=Vt(r,"string");return typeof e=="symbol"?e:String(e)}function Vt(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class D extends c.Component{static handleEnter(e){var t=e;t.style.height="0"}static handleEntering(e){var t=e;t.style.height="".concat(D.getHeight(t),"px")}static handleExiting(e){var t=e;t.style.height="0"}static handleExit(e){var t=e;t.style.height="".concat(D.getHeight(t),"px")}static getHeight(e){var t=e.scrollWidth-e.clientWidth;return e.scrollHeight-t}constructor(e){super(e),this.handleEntered=this.handleEntered.bind(this)}handleEntered(e){var t=e;t.style.height="";var{autoFocusOnShow:n}=this.props;if(n!==void 0&&n){var i=t.querySelector("input, select, textarea");i?.focus()}}render(){var{children:e,className:t,in:n,"data-testid":i}=this.props;return d.jsx(ct,{in:n,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:D.handleEnter,onEntering:D.handleEntering,onEntered:this.handleEntered,onExit:D.handleExit,onExiting:D.handleExiting,timeout:350,children:o=>d.jsx("div",{className:A({collapse:o==="exited"},t),"data-testid":i,children:e})})}}Xe(D,"propTypes",{className:K.string,in:K.bool.isRequired,children:K.node.isRequired,autoFocusOnShow:K.bool,"data-testid":K.string});Xe(D,"defaultProps",{className:"",autoFocusOnShow:!1,"data-testid":void 0});const On=D;function Ee(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function ee(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ee(Object(t),!0).forEach(function(n){er(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function er(r,e,t){return e=tr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function tr(r){var e=rr(r,"string");return typeof e=="symbol"?e:String(e)}function rr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Je=c.memo(r=>{var{tab:e,onClose:t,onSelect:n,isActive:i,activeRef:o,index:s,isDraggable:a,contextActions:u}=r,{key:l,isClosable:b=t!=null,title:f,icon:g}=e,y;return g!=null&&(y=W.isValidElement(g)?g:d.jsx(ne,{icon:g})),d.jsx(dt,{draggableId:l,index:s,isDragDisabled:!a,children:(m,O)=>d.jsxs("div",{className:"context-menu-wrapper",ref:i?o:null,children:[d.jsxs("div",ee(ee(ee({ref:m.innerRef},m.draggableProps),m.dragHandleProps),{},{className:A("btn btn-link btn-nav-tab",{active:i},{dragging:O.isDragging}),"data-testid":"btn-nav-tab-".concat(f),role:"tab",tabIndex:0,onAuxClick:p=>{b&&p.button===1&&p.buttons===0&&t?.(l)},onClick:p=>{if(b&&p.button===1&&p.buttons===0){t?.(l);return}p.button===0&&p.buttons===0&&(p.target.focus(),n(l))},onKeyPress:p=>{p.key==="Enter"&&n(l)},children:[y,f,b&&d.jsx(ie,{kind:"ghost",className:"btn-nav-tab-close",onClick:p=>{t?.(l),p.stopPropagation(),p.preventDefault()},icon:kt,tooltip:"Close"})]})),d.jsx(yt,{actions:u})]})},l)});Je.displayName="NavTab";const nr=Je;function Te(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function De(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Te(Object(t),!0).forEach(function(n){ir(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Te(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ir(r,e,t){return e=or(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function or(r){var e=ar(r,"string");return typeof e=="symbol"?e:String(e)}function ar(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var sr=500,ur=.01,lr=5e-4;function _e(r){return r.scrollLeft===0}function Re(r){return r.scrollLeft+r.clientWidth===r.scrollWidth||r.scrollWidth===0}function cr(r,e,t){var{isClosable:n=!1,key:i}=r,o=[];if(n&&t!=null){o.push({title:"Close",order:10,group:20,action:()=>{t(i)}});for(var s=!0,a=e.length-1;a>0&&e[a].key!==r.key;a-=1)if(e[a].isClosable===!0){s=!1;break}o.push({title:"Close to the Right",order:20,group:20,action:()=>{for(var u=e.length-1;u>0&&e[u].key!==i;u-=1)e[u].isClosable===!0&&t(e[u].key)},disabled:s}),o.push({title:"Close All",order:30,group:20,action:()=>{e.forEach(u=>{u.isClosable===!0&&t(u.key)})}})}return o}function xn(r){var{activeKey:e,tabs:t,onSelect:n,onReorder:i,onClose:o,makeContextActions:s}=r,a=c.useRef(),[u,l]=c.useState(!0),[b,f]=c.useState(!0),[g,y]=c.useState(!0),m=c.useCallback(()=>{a.current!=null&&(a.current.clientWidth<a.current.scrollWidth&&t.length>0?l(!0):l(!1),f(_e(a.current)),y(Re(a.current)))},[t]);Ze(a.current,m);var O=c.useCallback(h=>{Me.stopDragging(),h.destination&&i?.(h.source.index,h.destination.index)},[i]),p=c.useCallback(()=>{if(a.current!=null){var h=_e(a.current);h!==b&&f(h);var v=Re(a.current);v!==g&&y(v)}},[b,g]),P=c.useRef({cancelClick:!1}),U=c.useCallback(()=>{if(!(a.current==null||P.current.cancelClick))for(var{children:h}=a.current,v=h.length-1;v>=0;v-=1){var w=h[v];if(w.offsetLeft<a.current.scrollLeft-5){w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});return}}},[]),H=c.useCallback(()=>{if(!(a.current==null||P.current.cancelClick))for(var{children:h}=a.current,v=0;v<h.length;v+=1){var w=h[v];if(w.offsetLeft+5>a.current.scrollLeft+a.current.offsetWidth){w.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"});return}}},[]),x=c.useCallback(function(h,v){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,S=arguments.length>3?arguments[3]:void 0,E=a.current;E!=null&&(P.current.cancelClick=!0,h==="left"?E.scrollLeft=v-w:h==="right"&&(E.scrollLeft=v+w),P.current.rAF=requestAnimationFrame(q=>{var pe=S??q,me=q-pe,V=ur*me+.5*lr*me**2;V=Math.min(V,E.scrollWidth),x(h,v,V,pe)}))},[]),M=c.useCallback(()=>{var{holdTimer:h,rAF:v}=P.current;h!=null&&(clearTimeout(h),P.current.holdTimer=void 0),v!=null&&(cancelAnimationFrame(v),P.current.rAF=void 0),window.removeEventListener("mouseup",M)},[]);c.useEffect(()=>()=>window.removeEventListener("mouseup",M),[M]);var _=c.useCallback(h=>{a.current!=null&&(P.current.holdTimer=window.setTimeout(x,sr,h,a.current.scrollLeft)),P.current.cancelClick=!1,window.addEventListener("mouseup",M)},[M,x]),nt=c.useCallback(()=>{_("left")},[_]),it=c.useCallback(()=>{_("right")},[_]);c.useEffect(function(){var v,w=S=>{S.stopPropagation(),S.preventDefault();var E=S.currentTarget,q=Math.abs(S.deltaY)>Math.abs(S.deltaX)?S.deltaY:S.deltaX;E.scrollLeft+=vt(q,-30,30)};return(v=a.current)===null||v===void 0||v.addEventListener("wheel",w),()=>{var S;(S=a.current)===null||S===void 0||S.removeEventListener("wheel",w)}},[]);var ot=c.useMemo(()=>{var h=new Map;return t.forEach(v=>{var{key:w}=v,S=[()=>cr(v,t,o),()=>{var E;return(E=s?.(v))!==null&&E!==void 0?E:[]}];h.set(w,S)}),h},[s,t,o]),Q=c.useRef(null),at=t.find(h=>h.key===e),st=t.map((h,v)=>{var{key:w}=h,S=h===at;return d.jsx(nr,{tab:h,index:v,isActive:S,activeRef:Q,onSelect:n,onClose:o,isDraggable:i!=null,contextActions:ot.get(w)},w)});return c.useEffect(function(){Q.current!=null&&Q.current.scrollIntoView({block:"nearest",inline:"nearest"})},[e]),d.jsxs("nav",{className:"nav-container",children:[u&&d.jsx(ie,{kind:"ghost",icon:d.jsx(ne,{icon:Bt,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-left",tooltip:"Scroll left",onClick:U,onMouseDown:nt,disabled:b}),d.jsx(ft,{onDragStart:Me.startDragging,onDragEnd:O,children:d.jsx(ht,{droppableId:"droppable-tab-navigation",direction:"horizontal",children:(h,v)=>d.jsxs("div",De(De({ref:w=>{w!=null&&(a.current=w,h.innerRef(w))}},h.droppableProps),{},{className:A("nav nav-tabs",{dragging:v.draggingFromThisWith}),role:"tablist",onScroll:p,children:[st,h.placeholder]}))})}),u&&d.jsx(ie,{kind:"ghost",icon:d.jsx(ne,{icon:Wt,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-right",tooltip:"Scroll right",onClick:H,onMouseDown:it,disabled:g})]})}function dr(r,e){var t=wt(),n=c.useMemo(()=>new t.CoreClient(r,e),[t,r,e]);return c.useEffect(()=>()=>{n.disconnect()},[n]),n}var Qe=c.createContext(null);function En(r){var{serverUrl:e,options:t,children:n}=r,i=dr(e,t);return d.jsx(Qe.Provider,{value:i,children:n})}function fr(){return X(Qe,"No Client available in useClient. Was code wrapped in ClientBootstrap or ClientContext.Provider?")}function Ie(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function hr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){Ie(o,n,i,s,a,"next",u)}function a(u){Ie(o,n,i,s,a,"throw",u)}s(void 0)})}}var te=N.module("MessageUtils"),Tn="io.deephaven.message.LoginOptions.request",vr="io.deephaven.message.SessionDetails.request",Dn="io.deephaven.broadcast",pr="io.deephaven.broadcast.Login",mr="io.deephaven.broadcast.Logout";function Ve(r){var e=r;return e!=null&&typeof e.id=="string"&&typeof e.message=="string"}function _n(r){return Ve(r)&&r.message===pr}function Rn(r){return Ve(r)&&r.message===mr}function gr(r){var e=r;return e!=null&&typeof e.id=="string"}function br(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:de(),t=arguments.length>2?arguments[2]:void 0;return{message:r,id:e,payload:t}}function In(r,e){return{id:r,payload:e}}function yr(){return window.opener!=null?window.opener:window.parent!=null&&window.parent!==window?window.parent:null}function wr(r){return oe.apply(this,arguments)}function oe(){return oe=hr(function*(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e4,t=yr();if(t==null)throw new Error("window parent is null, unable to send request.");return new Promise((n,i)=>{var o,s=de(),a=u=>{var{data:l}=u;if(!gr(l)){te.debug("Ignoring non-deephaven response",l);return}if(te.debug("Received message",l),l?.id!==s){te.debug("Ignore message, id doesn't match",l);return}window.clearTimeout(o),window.removeEventListener("message",a),n(l.payload)};window.addEventListener("message",a),o=window.setTimeout(()=>{window.removeEventListener("message",a),i(new St("Request timed out"))},e),t.postMessage(br(r,s),"*")})}),oe.apply(this,arguments)}function Sr(r,e,t){return e=Pr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Pr(r){var e=Mr(r,"string");return typeof e=="symbol"?e:String(e)}function Mr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class Cr extends Error{constructor(){super(...arguments),Sr(this,"isNoConsolesError",!0)}}function Or(r){return r.isNoConsolesError}function Le(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function J(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){Le(o,n,i,s,a,"next",u)}function a(u){Le(o,n,i,s,a,"throw",u)}s(void 0)})}}var F=N.module("SessionUtils");function Ln(r,e){return F.info("Starting connection to '".concat(e,"'...")),new r.IdeConnection(e)}function xr(r,e,t){return ae.apply(this,arguments)}function ae(){return ae=J(function*(r,e,t){F.info("Getting console types...");var n=yield e.getConsoleTypes();if(n.length===0)throw new Cr("No console types available");F.info("Available types:",n);var i=n[0];F.info("Starting session with type",i);var o=yield e.startSession(i),s={type:i,id:de()};return F.info("Console session established",s),{session:o,config:s,connection:e,details:t,dh:r}}),ae.apply(this,arguments)}function jn(r,e,t){return F.info("createCoreClient",e),new r.CoreClient(e,t)}function Er(r){return r!=null&&typeof r=="object"}function Tr(){return se.apply(this,arguments)}function se(){return se=J(function*(){var r=yield wr(vr);if(!Er(r))throw new Error("Unexpected session details response: ".concat(r));return r}),se.apply(this,arguments)}function An(){return ue.apply(this,arguments)}function ue(){return ue=J(function*(){var r=new URLSearchParams(window.location.search);switch(r.get("authProvider")){case"parent":return Tr()}return{}}),ue.apply(this,arguments)}function Nn(r,e,t){return le.apply(this,arguments)}function le(){return le=J(function*(r,e,t){var n;try{n=yield xr(r,e,t)}catch(i){if(!Or(i))throw i}return n}),le.apply(this,arguments)}function je(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Dr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?je(Object(t),!0).forEach(function(n){_r(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):je(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function _r(r,e,t){return e=Rr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Rr(r){var e=Ir(r,"string");return typeof e=="symbol"?e:String(e)}function Ir(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var Lr=100,re=()=>{},jr=Object.freeze({});function Ar(r){var{id:e="default",children:t,emptyDashboard:n,layoutConfig:i,layoutSettings:o=jr,onLayoutConfigChange:s=re,onGoldenLayoutChange:a=re,onLayoutInitialized:u=re,fallbackComponent:l=xt,hydrate:b,dehydrate:f,panelWrapper:g}=r,y=c.useRef(null),[m,O]=c.useState(!1),[p,P]=c.useState();c.useEffect(function(){if(!y.current){P(void 0);return}var x=Dr({},Pt.makeDefaultLayout());x.settings===void 0&&(x.settings={}),Object.assign(x.settings,o),x.content=[];var M=new Mt(x,y.current),_=()=>{M.off("initialised",_),O(!0)};return M.on("initialised",_),l!=null&&M.setFallbackComponent(l),M.init(),P(M),a(M),()=>{M.destroy()}},[o,l,a,O,P]);var U=c.useMemo(()=>Ye(()=>{p!=null&&p.isInitialised&&p?.updateSize()},Lr),[p]);return Ze(y.current,U),d.jsxs("div",{className:"dashboard-container w-100 h-100",children:[d.jsx("div",{className:"w-100 h-100",ref:y}),m&&p&&d.jsx(Ct.Provider,{value:p,children:d.jsx(Ot,{emptyDashboard:n,id:e,layout:p,layoutConfig:i,onLayoutChange:s,onLayoutInitialized:u,hydrate:b,dehydrate:f,panelWrapper:g,children:t})})]})}var he="CREATE_DASHBOARD";function Nr(r,e){try{r.off(he,e)}catch{}}function $n(r,e){return r.on(he,e),()=>Nr(r,e)}function Fn(r,e){r.emit(he,e)}var $r=["id","isActive","plugins"];function Ae(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ne(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ae(Object(t),!0).forEach(function(n){Fr(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ae(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Fr(r,e,t){return e=Ur(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ur(r){var e=Kr(r,"string");return typeof e=="symbol"?e:String(e)}function Kr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function kr(r,e){if(r==null)return{};var t=Br(r,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function Br(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function Wr(r){var{id:e,isActive:t,plugins:n}=r,i=kr(r,$r),[o,s]=c.useState(t),a=pt(),u=c.useCallback(l=>{a(e===Et?Tt({layoutConfig:l}):Dt(e,{layoutConfig:l}))},[e,a]);return!o&&t&&s(!0),o?d.jsx(Ar,Ne(Ne({id:e,onLayoutConfigChange:u},i),{},{children:n})):d.jsx(fe,{})}function Gr(r){var e=[...r.entries()].filter(t=>{var[,n]=t;return _t(n)||ge(n)});return e.map(t=>{var[n,i]=t;if(ge(i)){var{DashboardPlugin:o}=i;return d.jsx(o,{},n)}var{component:s}=i;return d.jsx(s,{},n)})}function Un(){var r=Rt(),e=c.useMemo(()=>Gr(r),[r]);return e}var Kn=c.createContext({}),kn=c.createContext({}),zr=c.createContext(null),Hr=c.createContext(null);function $e(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function qr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){$e(o,n,i,s,a,"next",u)}function a(u){$e(o,n,i,s,a,"throw",u)}s(void 0)})}}var et=c.createContext(null);function Bn(r){var{children:e}=r,t=fr(),[n,i]=c.useState(),[o,s]=c.useState();c.useEffect(function(){var l=!1;function b(){return f.apply(this,arguments)}function f(){return f=qr(function*(){try{var g=yield t.getServerConfigValues();l||i(new Map(g))}catch(y){l||s(y)}}),f.apply(this,arguments)}return b(),()=>{l=!0}},[t]);var a=n==null;return a||o!=null?d.jsx(fe,{isLoading:a&&o==null,errorMessage:Gt(o)}):d.jsx(et.Provider,{value:n,children:e})}function Wn(){return X(et,"No server config available in useServerConfig. Was code wrapped in ServerConfigBootstrap or ServerConfigContext.Provider?")}function Fe(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function Yr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){Fe(o,n,i,s,a,"next",u)}function a(u){Fe(o,n,i,s,a,"throw",u)}s(void 0)})}}function Ue(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ke(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ue(Object(t),!0).forEach(function(n){Zr(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ue(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Zr(r,e,t){return e=Xr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Xr(r){var e=Jr(r,"string");return typeof e=="symbol"?e:String(e)}function Jr(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Gn(r){var{dashboards:e,activeDashboard:t,onLayoutInitialized:n,onGoldenLayoutChange:i,plugins:o,emptyDashboard:s=d.jsx(fe,{})}=r,a=It(),u=c.useCallback((l,b)=>{var{metadata:f}=l;try{if(f!=null){var g=Lt(f);return Ke(Ke({fetch:function(){var y=Yr(function*(){return a(g)});function m(){return y.apply(this,arguments)}return m}()},l),{},{localDashboardId:b})}}catch{}return jt.hydrate(l,b)},[a]);return d.jsx("div",{className:"tab-content",children:e.map(l=>d.jsx("div",{className:A("tab-pane",{active:l.id===t}),children:d.jsx(Wr,{id:l.id,isActive:l.id===t,emptyDashboard:s,layoutConfig:l.layoutConfig,layoutSettings:l.layoutSettings,onLayoutInitialized:n,onGoldenLayoutChange:i,hydrate:u,plugins:o},l.key)},l.id))})}function zn(){return X(Hr,"No IdeConnection available in useConnection. Was code wrapped in ConnectionContext.Provider?")}function Hn(){return X(zr,"No user available in useUser. Was code wrapped in UserBootstrap or UserContext.Provider?")}function ke(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function Qr(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){ke(o,n,i,s,a,"next",u)}function a(u){ke(o,n,i,s,a,"throw",u)}s(void 0)})}}function T(r,e,t){return e=Vr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Vr(r){var e=en(r,"string");return typeof e=="symbol"?e:String(e)}function en(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var k=N.module("GrpcFileStorageTable");class z{constructor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t;T(this,"storageService",void 0),T(this,"baseRoot",void 0),T(this,"root",void 0),T(this,"currentSize",0),T(this,"currentViewport",void 0),T(this,"listeners",[]),T(this,"viewportUpdatePromise",void 0),T(this,"currentViewportData",void 0),T(this,"childTables",new Map),this.storageService=e,this.baseRoot=t,this.root=n,n===t&&(this.doRefresh=mt(this.doRefresh.bind(this),z.REFRESH_DEBOUNCE))}removeBaseRoot(e){return L.removeRoot(this.baseRoot,e)}getViewportData(){var e;return this.viewportUpdatePromise||this.refreshInternal(),(e=this.viewportUpdatePromise)!==null&&e!==void 0?e:Promise.resolve({items:[],offset:0})}getSnapshot(e){throw new Error("Method not implemented.")}get size(){return this.currentSize}setExpanded(e,t){var n=e.split("/"),i=n.shift();if((i===void 0||i==="")&&(i=n.shift()),i===void 0||i==="")throw new Error("Invalid path: ".concat(e));var o=n.join("/");if(t){if(!this.childTables.has(i)){var s=new z(this.storageService,this.baseRoot,"".concat(this.root,"/").concat(i));this.childTables.set(i,s)}if(o){var a=this.childTables.get(i);a?.setExpanded(o,t)}}else if(this.childTables.has(i))if(o){var u=this.childTables.get(i);u?.setExpanded(o,t)}else this.childTables.delete(i);this.currentViewport&&this.refreshInternal()}collapseAll(){this.childTables.clear(),this.currentViewport&&this.refreshInternal()}setSearch(e){throw new Error("Method not implemented.")}setViewport(e){this.currentViewport=e,this.refreshInternal()}setFilters(){throw new Error("Method not implemented.")}setSorts(){throw new Error("Method not implemented.")}setReversed(){throw new Error("Method not implemented.")}close(){this.listeners=[]}onUpdate(e){return this.listeners=[...this.listeners,e],()=>{this.listeners=this.listeners.filter(t=>t!==e)}}doRefresh(e){k.debug2("doRefresh",this.root),e(this.fetchData())}refresh(){var e;k.debug2("refresh",this.root),(e=this.viewportUpdatePromise)===null||e===void 0||e.cancel();var t=new Promise(i=>{this.doRefresh(i)}),n=B.makeCancelable(t.then(i=>{if(this.viewportUpdatePromise!==n)throw new At;return this.currentViewportData=i,this.sendUpdate(),i}));n.catch(i=>{B.isCanceled(i)||k.error("Error updating viewport",i)}),this.viewportUpdatePromise=n}refreshInternal(){try{this.refresh()}catch(e){B.isCanceled(e)||k.error("Unable to refresh data",e)}}fetchData(){var e=this;return Qr(function*(){var{currentViewport:t}=e;if(!t)throw new Error("No viewport set");for(var n=yield e.storageService.listItems(e.root),i=n.map(f=>({type:f.type,filename:e.removeBaseRoot(f.filename),basename:f.basename,id:e.removeBaseRoot(f.filename),isExpanded:f.type==="directory"?e.childTables.has(f.basename):void 0})).sort((f,g)=>f.type!==g.type?f.type==="directory"?-1:1:f.basename.localeCompare(g.basename)),o=0;o<i.length;o+=1){var s=i[o],{basename:a,filename:u}=s;if(u===e.removeBaseRoot("".concat(e.root,"/").concat(a))&&s.type==="directory"){var l=e.childTables.get(a);if(l!=null){l.setViewport({top:0,bottom:t.bottom-o});var b=yield l.getViewportData();i.splice(o+1,0,...b.items)}}}return e.currentSize=i.length,k.debug2(e.root,"items",i,t),i=i.slice(t.top,t.bottom),{items:i,offset:t.top}})()}sendUpdate(){for(var e,{listeners:t}=this,n=(e=this.currentViewportData)!==null&&e!==void 0?e:{items:[],offset:0},i=0;i<t.length;i+=1)t[i](n)}}T(z,"REFRESH_DEBOUNCE",50);function Be(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function R(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){Be(o,n,i,s,a,"next",u)}function a(u){Be(o,n,i,s,a,"throw",u)}s(void 0)})}}function $(r,e,t){return e=tn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function tn(r){var e=rn(r,"string");return typeof e=="symbol"?e:String(e)}function rn(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var nn=N.module("GrpcFileStorage");class ve{constructor(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";$(this,"dh",void 0),$(this,"storageService",void 0),$(this,"tables",[]),$(this,"root",void 0),$(this,"refreshTables",Ye(()=>{this.tables.forEach(i=>i.refresh())},ve.REFRESH_THROTTLE)),this.dh=e,this.storageService=t,this.root=n}removeRoot(e){return L.removeRoot(this.root,e)}addRoot(e){return L.addRoot(this.root,e)}createDirectory(e){var t=this;return R(function*(){return yield t.storageService.createDirectory(t.addRoot(e)),t.refreshTables(),{type:"directory",id:e,filename:e,basename:L.getBaseName(e)}})()}getTable(){var e=this;return R(function*(){var t=new z(e.storageService,e.root);return e.tables.push(t),t})()}saveFile(e){var t=this;return R(function*(){var n=t.dh.storage.FileContents.text(e.content);return yield t.storageService.saveFile(t.addRoot(e.filename),n,!0),t.refreshTables(),e})()}loadFile(e){var t=this;return R(function*(){var n=yield t.storageService.loadFile(t.addRoot(e)),i=yield n.text();return{filename:e,basename:L.getBaseName(e),content:i}})()}copyFile(e,t){var n=this;return R(function*(){var i=yield n.storageService.loadFile(n.addRoot(e));yield n.storageService.saveFile(n.addRoot(t),i,!1),n.refreshTables()})()}deleteFile(e){var t=this;return R(function*(){yield t.storageService.deleteItem(t.addRoot(e)),t.refreshTables()})()}moveFile(e,t){var n=this;return R(function*(){yield n.storageService.moveItem(n.addRoot(e),n.addRoot(t)),n.refreshTables()})()}info(e){var t=this;return R(function*(){var n=yield t.storageService.listItems(t.addRoot(L.getPath(e)),L.getBaseName(e));if(n.length===0)throw new Nt;if(n.length>1)throw nn.error("More than one matching file found, should never happen.",n),new Error("More than one matching file found");var i=n[0];if(!$t(i.type))throw new Error("Unexpected file type: ".concat(i.type));return{filename:t.removeRoot(i.filename),basename:i.basename,id:t.removeRoot(i.filename),type:i.type}})()}}$(ve,"REFRESH_THROTTLE",150);function We(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function Ge(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){We(o,n,i,s,a,"next",u)}function a(u){We(o,n,i,s,a,"throw",u)}s(void 0)})}}function ze(r,e,t){return e=on(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function on(r){var e=an(r,"string");return typeof e=="symbol"?e:String(e)}function an(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}class qn{constructor(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";ze(this,"storageService",void 0),ze(this,"root",void 0),this.storageService=e,this.root=t}getLayouts(){var e=this;return Ge(function*(){var t=yield e.storageService.listItems(e.root,"*.json");return t.map(n=>n.basename)})()}getLayout(e){var t=this;return Ge(function*(){var n=yield t.storageService.loadFile("".concat(t.root,"/").concat(e)),i=yield n.text();return JSON.parse(i)})()}}function sn(r){return r.version===2}function un(r){return Array.isArray(r)}function He(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function ln(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){He(o,n,i,s,a,"next",u)}function a(u){He(o,n,i,s,a,"throw",u)}s(void 0)})}}var Y=N.module("UserLayoutUtils"),cn={layoutConfig:[{type:"column",content:[{type:"row",height:40,content:[{type:"stack",content:[{type:"react-component",component:be.COMPONENT,title:be.TITLE,isClosable:!1},{type:"react-component",component:ye.COMPONENT,title:ye.TITLE,isClosable:!1}]},{type:"stack",width:25,content:[{type:"react-component",component:we.COMPONENT,title:we.TITLE,isClosable:!1},{type:"react-component",component:Se.COMPONENT,title:Se.TITLE,isClosable:!1}]}]},{type:"row",content:[{type:"stack",title:"Notebooks",content:[]}]}]}],links:[],filterSets:[],version:2},dn={layoutConfig:[],links:[],filterSets:[],version:2};function tt(r){if(sn(r))return r;if(un(r)){var e=r;return{layoutConfig:e,links:[],filterSets:[],version:2}}throw new Error("Unexpected layout import format: ".concat(r))}function fn(r){return ce.apply(this,arguments)}function ce(){return ce=ln(function*(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;try{var t=yield r.getLayouts();if(t.length>0)try{var n=yield r.getLayout(t[0]);return tt(n)}catch(i){Y.error("Unable to load layout",t[0],":",i),Y.warn("No valid layouts found, falling back to default layout")}}catch(i){Y.error("Unable to fetch layout list",i),Y.warn("Falling back to default layout")}return e?cn:dn}),ce.apply(this,arguments)}function hn(r){var{filterSets:e,layoutConfig:t,links:n,pluginDataMap:i}=r,o={filterSets:e,layoutConfig:t,links:n,pluginDataMap:i,version:2};return o}const vn={exportLayout:hn,getDefaultLayout:fn,normalizeLayout:tt};function qe(r,e,t,n,i,o,s){try{var a=r[o](s),u=a.value}catch(l){t(l);return}a.done?e(u):Promise.resolve(u).then(n,i)}function Z(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var o=r.apply(e,t);function s(u){qe(o,n,i,s,a,"next",u)}function a(u){qe(o,n,i,s,a,"throw",u)}s(void 0)})}}function rt(r,e,t){return e=pn(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function pn(r){var e=mn(r,"string");return typeof e=="symbol"?e:String(e)}function mn(r,e){if(typeof r!="object"||r===null)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var gn=N.module("LocalWorkspaceStorage");class C{static getBooleanServerConfig(e,t){var n,i;if((e==null||(n=e.get(t))===null||n===void 0?void 0:n.toLowerCase())==="true")return!0;if((e==null||(i=e.get(t))===null||i===void 0?void 0:i.toLowerCase())==="false")return!1}static makeDefaultWorkspaceSettings(e){for(var t={defaultDateTimeFormat:Pe.DEFAULT_DATETIME_FORMAT_STRING,formatter:[],timeZone:Pe.DEFAULT_TIME_ZONE_ID,showTimeZone:!1,showTSeparator:!0,disableMoveConfirmation:!1,defaultDecimalFormatOptions:{defaultFormatString:Ft.DEFAULT_FORMAT_STRING},defaultIntegerFormatOptions:{defaultFormatString:Ut.DEFAULT_FORMAT_STRING},truncateNumbersWithPound:!1,showEmptyStrings:!0,showNullStrings:!0,defaultNotebookSettings:{isMinimapEnabled:!1}},n={defaultDateTimeFormat:e?.get("dateTimeFormat"),formatter:[],timeZone:e?.get("timeZone"),showTimeZone:C.getBooleanServerConfig(e,"showTimeZone"),showTSeparator:C.getBooleanServerConfig(e,"showTSeparator"),disableMoveConfirmation:C.getBooleanServerConfig(e,"disableMoveConfirmation"),defaultDecimalFormatOptions:e?.get("decimalFormat")!==void 0?{defaultFormatString:e?.get("decimalFormat")}:void 0,defaultIntegerFormatOptions:e?.get("integerFormat")!==void 0?{defaultFormatString:e?.get("integerFormat")}:void 0,truncateNumbersWithPound:C.getBooleanServerConfig(e,"truncateNumbersWithPound"),showEmptyStrings:C.getBooleanServerConfig(e,"showEmptyStrings"),showNullStrings:C.getBooleanServerConfig(e,"showNullStrings"),defaultNotebookSettings:e?.get("isMinimapEnabled")!==void 0?{isMinimapEnabled:C.getBooleanServerConfig(e,"isMinimapEnabled")}:void 0},i=Object.keys(n),o=0;o<i.length;o+=1){var s=i[o];n[s]!==void 0&&(t[s]=n[s])}return t}static makeWorkspaceData(e,t){return Z(function*(){var{filterSets:n,links:i,layoutConfig:o,pluginDataMap:s={}}=yield vn.getDefaultLayout(e,t?.isConsoleAvailable);return{settings:{},layoutConfig:o,closed:[{}],links:i,filterSets:n,pluginDataMap:s}})()}static makeDefaultWorkspace(e,t){return Z(function*(){return{data:yield C.makeWorkspaceData(e,t)}})()}constructor(e){rt(this,"layoutStorage",void 0),this.layoutStorage=e}load(e){var t=this;return Z(function*(){try{var n,i=JSON.parse((n=localStorage.getItem(C.STORAGE_KEY))!==null&&n!==void 0?n:"");return i}catch{return gn.info("Unable to load workspace data, initializing to default data"),C.makeDefaultWorkspace(t.layoutStorage,e)}})()}save(e){return Z(function*(){return localStorage.setItem(C.STORAGE_KEY,JSON.stringify(e)),e})()}}rt(C,"STORAGE_KEY","deephaven.WorkspaceStorage");export{un as $,Gn as A,Dn as B,On as C,Ve as D,Or as E,gr as F,qn as G,In as H,wr as I,Ar as J,he as K,Mn as L,Wr as M,xn as N,Fn as O,Un as P,Gt as Q,kn as R,vr as S,Pn as T,vn as U,zr as V,Kn as W,Hr as X,Bn as Y,z as Z,sn as _,mr as a,cn as a0,dn as a1,tt as a2,fn as a3,hn as a4,Cn as b,zn as c,Wn as d,Hn as e,An as f,Gr as g,Nn as h,ve as i,C as j,Ze as k,$n as l,br as m,En as n,Qe as o,pr as p,Tn as q,Cr as r,Nr as s,Ln as t,fr as u,jn as v,xr as w,yr as x,_n as y,Rn as z};
2
+ //# sourceMappingURL=LocalWorkspaceStorage-8e43291a.js.map