@vuu-ui/vuu-layout 0.5.4 → 0.5.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.
- package/README.md +1 -0
- package/cjs/index.js +4 -7379
- package/cjs/index.js.map +7 -0
- package/esm/index.js +20 -0
- package/esm/index.js.map +7 -0
- package/index.css +1 -951
- package/index.css.map +3 -3
- package/package.json +5 -9
- package/src/Component.css +0 -2
- package/src/Component.tsx +0 -20
- package/src/DraggableLayout.css +0 -18
- package/src/DraggableLayout.tsx +0 -29
- package/src/__tests__/flexbox-utils.spec.js +0 -90
- package/src/action-buttons/index.ts +0 -1
- package/src/chest-of-drawers/Chest.css +0 -36
- package/src/chest-of-drawers/Chest.tsx +0 -42
- package/src/chest-of-drawers/Drawer.css +0 -159
- package/src/chest-of-drawers/Drawer.tsx +0 -118
- package/src/chest-of-drawers/index.ts +0 -2
- package/src/common-types.ts +0 -9
- package/src/debug.ts +0 -16
- package/src/dialog/Dialog.css +0 -16
- package/src/dialog/Dialog.tsx +0 -59
- package/src/dialog/index.ts +0 -1
- package/src/drag-drop/BoxModel.ts +0 -546
- package/src/drag-drop/DragState.ts +0 -222
- package/src/drag-drop/Draggable.ts +0 -282
- package/src/drag-drop/DropMenu.css +0 -71
- package/src/drag-drop/DropMenu.tsx +0 -61
- package/src/drag-drop/DropTarget.ts +0 -392
- package/src/drag-drop/DropTargetRenderer.css +0 -40
- package/src/drag-drop/DropTargetRenderer.tsx +0 -279
- package/src/drag-drop/dragDropTypes.ts +0 -49
- package/src/drag-drop/index.ts +0 -4
- package/src/editable-label/EditableLabel.css +0 -28
- package/src/editable-label/EditableLabel.tsx +0 -99
- package/src/editable-label/index.ts +0 -1
- package/src/flexbox/Flexbox.css +0 -45
- package/src/flexbox/Flexbox.tsx +0 -70
- package/src/flexbox/FlexboxLayout.jsx +0 -26
- package/src/flexbox/FluidGrid.css +0 -134
- package/src/flexbox/FluidGrid.tsx +0 -84
- package/src/flexbox/FluidGridLayout.tsx +0 -10
- package/src/flexbox/Splitter.css +0 -140
- package/src/flexbox/Splitter.tsx +0 -135
- package/src/flexbox/flexbox-utils.ts +0 -128
- package/src/flexbox/flexboxTypes.ts +0 -63
- package/src/flexbox/index.ts +0 -4
- package/src/flexbox/useResponsiveSizing.ts +0 -85
- package/src/flexbox/useSplitterResizing.ts +0 -272
- package/src/index.ts +0 -21
- package/src/layout-action.ts +0 -21
- package/src/layout-header/ActionButton.tsx +0 -23
- package/src/layout-header/Header.css +0 -8
- package/src/layout-header/Header.tsx +0 -222
- package/src/layout-header/index.ts +0 -1
- package/src/layout-provider/LayoutProvider.tsx +0 -160
- package/src/layout-provider/LayoutProviderContext.ts +0 -17
- package/src/layout-provider/index.ts +0 -2
- package/src/layout-provider/useLayoutDragDrop.ts +0 -241
- package/src/layout-reducer/flexUtils.ts +0 -281
- package/src/layout-reducer/index.ts +0 -4
- package/src/layout-reducer/insert-layout-element.ts +0 -365
- package/src/layout-reducer/layout-reducer.ts +0 -255
- package/src/layout-reducer/layoutTypes.ts +0 -151
- package/src/layout-reducer/layoutUtils.ts +0 -302
- package/src/layout-reducer/remove-layout-element.ts +0 -240
- package/src/layout-reducer/replace-layout-element.ts +0 -118
- package/src/layout-reducer/resize-flex-children.ts +0 -56
- package/src/layout-reducer/wrap-layout-element.ts +0 -317
- package/src/layout-view/View.css +0 -61
- package/src/layout-view/View.tsx +0 -149
- package/src/layout-view/ViewContext.ts +0 -31
- package/src/layout-view/index.ts +0 -4
- package/src/layout-view/useView.tsx +0 -104
- package/src/layout-view/useViewActionDispatcher.ts +0 -133
- package/src/layout-view/useViewResize.ts +0 -53
- package/src/layout-view/viewTypes.ts +0 -37
- package/src/menu/ContextMenu.css +0 -22
- package/src/menu/ContextMenu.jsx +0 -121
- package/src/menu/MenuList.css +0 -150
- package/src/menu/MenuList.jsx +0 -179
- package/src/menu/aim/aim.js +0 -92
- package/src/menu/aim/corners.js +0 -114
- package/src/menu/aim/point-in-polygon.js +0 -25
- package/src/menu/aim/utils.js +0 -19
- package/src/menu/context-menu-provider.jsx +0 -135
- package/src/menu/index.js +0 -4
- package/src/menu/key-code.js +0 -61
- package/src/menu/list-dom-utils.js +0 -22
- package/src/menu/use-cascade.js +0 -292
- package/src/menu/use-click-away.js +0 -22
- package/src/menu/use-items-with-ids.js +0 -75
- package/src/menu/use-keyboard-navigation.js +0 -162
- package/src/menu/utils.js +0 -5
- package/src/palette/Palette.css +0 -37
- package/src/palette/Palette.tsx +0 -140
- package/src/palette/PaletteSalt.css +0 -9
- package/src/palette/PaletteSalt.tsx +0 -79
- package/src/palette/index.ts +0 -2
- package/src/placeholder/Placeholder.css +0 -10
- package/src/placeholder/Placeholder.tsx +0 -39
- package/src/placeholder/index.ts +0 -1
- package/src/popup/index.js +0 -2
- package/src/popup/popup-provider.js +0 -0
- package/src/popup/popup-service.css +0 -15
- package/src/popup/popup-service.js +0 -281
- package/src/portal/Portal.jsx +0 -50
- package/src/portal/index.ts +0 -3
- package/src/portal/render-portal.jsx +0 -68
- package/src/portal/utils.js +0 -16
- package/src/registry/ComponentRegistry.ts +0 -35
- package/src/registry/index.ts +0 -1
- package/src/responsive/OverflowMenu.css +0 -31
- package/src/responsive/OverflowMenu.jsx +0 -56
- package/src/responsive/breakpoints.ts +0 -62
- package/src/responsive/index.ts +0 -4
- package/src/responsive/measureMinimumNodeSize.ts +0 -23
- package/src/responsive/overflowUtils.js +0 -14
- package/src/responsive/use-breakpoints.ts +0 -100
- package/src/responsive/useOverflowObserver.ts +0 -606
- package/src/responsive/useResizeObserver.ts +0 -154
- package/src/responsive/utils.ts +0 -37
- package/src/stack/Stack.css +0 -39
- package/src/stack/Stack.tsx +0 -161
- package/src/stack/StackLayout.tsx +0 -137
- package/src/stack/index.ts +0 -3
- package/src/stack/stackTypes.ts +0 -19
- package/src/tabs/TabPanel.css +0 -12
- package/src/tabs/TabPanel.tsx +0 -17
- package/src/tabs/index.ts +0 -1
- package/src/tools/config-wrapper/ConfigWrapper.jsx +0 -53
- package/src/tools/config-wrapper/index.js +0 -1
- package/src/tools/devtools-box/layout-configurator.css +0 -112
- package/src/tools/devtools-box/layout-configurator.jsx +0 -369
- package/src/tools/devtools-tree/layout-tree-viewer.css +0 -15
- package/src/tools/devtools-tree/layout-tree-viewer.jsx +0 -36
- package/src/tools/index.js +0 -3
- package/src/use-persistent-state.ts +0 -115
- package/src/utils/apply-handlers.js +0 -15
- package/src/utils/componentFromLayout.tsx +0 -30
- package/src/utils/index.ts +0 -6
- package/src/utils/pathUtils.ts +0 -294
- package/src/utils/propUtils.ts +0 -24
- package/src/utils/refUtils.ts +0 -16
- package/src/utils/styleUtils.ts +0 -14
- package/src/utils/typeOf.ts +0 -22
package/esm/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import ri from"classnames";import{useCallback as Qr}from"react";import Eo from"classnames";import{Button as So,useControlled as ei}from"@salt-ds/core";import{jsx as Le,jsxs as oi}from"react/jsx-runtime";var ae="vuuDrawer",wo=e=>typeof e=="string"?e:e+"px",ti=(e,t,o)=>{let n=t!==void 0,r=o!==void 0;if(!(!e&&!r&&!n))return!r&&!n?e:{...e,"--drawer-size":n?wo(t):void 0,"--drawer-peek-size":r?wo(o):void 0}},vo=({children:e,className:t,clickToOpen:o,defaultOpen:n,sizeOpen:r,sizeClosed:i,style:s,open:a,position:l="left",inline:c,onClick:p,peekaboo:m=!1,toggleButton:u,...d})=>{let[h,g]=ei({controlled:a,default:n!=null?n:!1,name:"Drawer",state:"open"}),y=Eo(ae,t,`${ae}-${l}`,{[`${ae}-open`]:h,[`${ae}-inline`]:c,[`${ae}-over`]:!c,[`${ae}-peekaboo`]:m}),f=Qr(()=>{console.log("toggleDrawer"),g(!h)},[h,g]),b=ti(s,r,i),R=o?f:p,E=()=>Le("div",{className:Eo("vuuToggleButton-container"),children:h?Le(So,{"aria-label":"close",onClick:f,"data-icon":"close",variant:"secondary"}):Le(So,{"aria-label":"open",onClick:f,"data-icon":"close",variant:"secondary"})});return oi("div",{...d,className:y,onClick:R,style:b,children:[u=="start"?E():null,Le("div",{className:`${ae}-liner`,children:Le("div",{className:`${ae}-content`,children:e})}),u=="end"?E():null]})};vo.displayName="Drawer";var Dt=vo;import{partition as Lo}from"@vuu-ui/vuu-utils";var Do={},To={},oe={};function F(e){return Do[e]===!0}function ni(e){return To[e]===!0}var Po=e=>F(e)||ni(e),vc=e=>!!oe[e];function B(e,t,o="component"){oe[e]=t,o==="container"?Do[e]=!0:o==="view"&&(To[e]=!0)}import{jsx as li,jsxs as ci}from"react/jsx-runtime";var ii=e=>e.type===Dt,si=({props:{position:e="left"}})=>e.match(/top|bottom/),Tt=e=>{let{children:t,className:o,id:n,style:r}=e,i="hwChest",[s,a]=Lo(t,ii),[l,c]=Lo(s,si),p=l.length===0?"horizontal":c.length===0?"vertical":"both",m=ri(i,o,`${i}-${p}`);return ci("div",{className:m,id:n,style:r,children:[s,li("div",{className:`${i}-content`,children:a})]})};Tt.displayName="Chest";var ai=Tt;B("Chest",Tt,"container");import{forwardRef as ui}from"react";import{jsx as pi}from"react/jsx-runtime";var Pt=ui(function({resizeable:t,...o},n){return pi("div",{...o,className:"Component",ref:n})});Pt.displayName="Component";var Lt=Pt;B("Component",Pt);import{useCallback as Oo,useRef as bi,useState as ko}from"react";import xi from"classnames";import{useLayoutEffect as zo,useMemo as yi}from"react";import*as Ao from"react-dom";import*as Mo from"react-dom";import{SaltProvider as mi}from"@salt-ds/core";import{jsx as gi}from"react/jsx-runtime";var di=1,fi=(e=0,t=0,o=window)=>{let n=o.document.createElement("div");return n.className="vuuPopup "+di++,n.style.cssText=`left:${e}px; top:${t}px;`,o.document.body.appendChild(n),n},hi=(e,t)=>fi(e,t),Xe=(e,t,o,n,r)=>{t.style.cssText=`left:${o}px; top:${n}px;position: absolute;`,Mo.render(gi(mi,{applyClassesTo:"child",children:e}),t,r)},Co=hi;var Io=function({children:t,x:o=0,y:n=0,onRender:r}){let i=yi(()=>Co(),[]);return zo(()=>{Xe(t,i,o,n,r)},[t,r,i,o,n]),zo(()=>()=>{var s;i&&(Ao.unmountComponentAtNode(i),i.classList.contains("vuuPopup")&&((s=i.parentElement)==null||s.removeChild(i)))},[i]),null};import{Scrim as Ri}from"@heswell/salt-lab";import{Text as Ei}from"@salt-ds/core";import{Toolbar as Si,ToolbarButton as wi}from"@heswell/salt-lab";import{jsx as Ye,jsxs as Bo}from"react/jsx-runtime";var Mt="vuuDialog",gu=({children:e,className:t,isOpen:o=!1,onClose:n,title:r,...i})=>{let s=bi(null),[a,l]=ko(0),[c,p]=ko(0),m=Oo(()=>{n==null||n()},[n]),u=Oo(()=>{},[]);return o?Ye(Io,{onRender:u,x:a,y:c,children:Ye(Ri,{className:`${Mt}-scrim`,open:o,children:Bo("div",{...i,className:xi(Mt,t),ref:s,children:[Bo(Si,{className:`${Mt}-header`,children:[Ye(Ei,{children:r}),Ye(wi,{onClick:m,"data-align-end":!0,"data-icon":"close"},"close")]}),e]})})}):null};import vi from"classnames";import{useRef as Di}from"react";import{jsx as Ti}from"react/jsx-runtime";var No=function(t){let o=Di();o.current=t;let{className:n,id:r,style:i}=t,s=vi("DraggableLayout",n);return Ti("div",{className:s,id:r,style:i,children:t.children})},Ho="DraggableLayout";No.displayName=Ho;B(Ho,No,"container");var Ct=e=>{if(typeof e=="number")return{flexBasis:0,flexGrow:1,flexShrink:1};throw Error(`"no support yet for flex value ${e}`)};import de from"react";var Pi={},A=(e,t)=>{var n;let o=z(e);return(n=o[t])!=null?n:o[`data-${t}`]},z=e=>(e==null?void 0:e.props)||e||Pi,$o=e=>{let t=z(e);if(t.children){let{children:[o,...n]}=t;return n.length>0&&console.warn(`getChild expected a single child, found ${n.length+1}`),o}};function I(e){var t;if(e){let o=e.type;if(typeof o=="function"||typeof o=="object"){let n=o.displayName||o.name||((t=o.type)==null?void 0:t.name);if(typeof n=="string")return n}else{if(typeof e.type=="string")return e.type;if(e.constructor)return e.constructor.displayName}throw Error("typeOf unable to determine type of element")}}var Au=(e,t)=>I(e)===t;var Li=e=>{let t=e.lastIndexOf(".");return t===-1?e:e.slice(0,t)};function re(e,t){let{"data-path":o,path:n=o}=z(e);return t==="0"||t===n?null:_(e,Li(t),!0)}function ie(e,t){let{children:o,...n}=z(e);if(t(n))return e;if(de.Children.count(o)>0){let r=de.isValidElement(o)?[o]:o;for(let i of r){let s=ie(i,t);if(s)return s}}}function Mi(e,t){if(t===e)return null;{let{path:o,children:n}=z(e),{idx:r,finalStep:i}=q(o,A(t,"path"));return i?e:n===void 0||n[r]===void 0?null:Mi(n[r],t)}}var Ci=(e,t)=>{if(de.isValidElement(e)&&t==0)return e;if(Array.isArray(e))return e[t]};function Fo(e,t){var o=t.split(".");let n=[e],r=i=>de.isValidElement(i.props.children)?[i.props.children]:i.props.children;for(let i=0;i<o.length;i++){let s=parseInt(o[i]),a=n[s];if(i===o.length-1)return a;n=r(a)}}function _(e,t,o=!1){let{"data-path":n,path:r=n}=z(e);if(t.indexOf(r)!==0)throw Error(`pathUtils.followPath path ${t} is not within source path ${r}`);let i=t.slice(r.length+1);if(i==="")return e;let s=e,a=i.split(".");for(var l=0;l<a.length;l++){if(de.Children.count(s.props.children)===0){let c=`element at 0.${a.slice(0,l).join(".")} has no children, so cannot fulfill rest of path ${a.slice(l).join(".")}`;if(o)throw Error(c);console.warn(c);return}if(s=Ci(s.props.children,parseInt(a[l])),s===void 0){let c=`model at 0.${a.slice(0,l).join(".")} has no children that fulfill next step of path ${a.slice(l).join(".")}`;if(o)throw Error(c);console.warn(c)}}return s}function $u(e,t){let o=re(e,t),n=t.split(".").map(r=>parseInt(r,10));if(o){let r=n.pop(),{children:i}=o.props;if(i.length-1>r)return Ze(i[r+1]);{let s=n.pop(),a=re(e,A(o,"path"));if(a&&typeof s=="number"&&(n=a.props.path.split(".").map(l=>parseInt(l,10)),a.props.children.length-1>s)){let l=a.props.children[s+1];return F(I(l))?Ze(l):l}}}return Ze(e)}function Fu(e,t){let o=t.split(".").map(i=>parseInt(i,10)),n=o.pop(),r=re(e,t);if(r!=null&&typeof n=="number"){let{children:i}=r.props;if(n>0)return qe(i[n-1]);for(;o.length>1;)if(n=o.pop(),r=re(e,A(r,"path")),n>0){let s=r.props.children[n-1];return F(I(s))?qe(s):s}}return qe(e)}function Ze(e){if(F(I(e))){let{children:t}=e.props||e;return Ze(t[0])}else return e}function qe(e){if(F(I(e))){let{children:t}=e.props||e;return qe(t[t.length-1])}else return e}function q(e,t,o=!1){if(e===t)return{idx:-1,finalStep:!0};let n=`${e}.`;if(!t.startsWith(n))throw Error("pathUtils nextStep has strayed from the path");let r=o?0:1,i=t.replace(n,"").split(".").map(s=>parseInt(s,10));return{idx:i[0],finalStep:i.length===r}}function H(e,t,o){if(A(e,"path")===t)return e;let n=[];de.Children.forEach(e.props.children,(i,s)=>{A(i,"path")?n.push(H(i,`${t}.${s}`)):n.push(i)});let r=e.props["data-path"]?"data-path":"path";return de.cloneElement(e,{[r]:t,...o},n)}import{createElement as Ai}from"react";function Vo(e){let{id:t,type:o,props:n,children:r}=e,i=zi(o),s=!r||r.length===0?null:r.length===1?Vo(r[0]):r.map(Vo);return Ai(i,{...n,key:t},s)}function zi(e){let t=oe[e];if(t===void 0)throw Error("componentFromLayout: unknown component type: "+e);return t}function Uu(e,t){typeof e=="function"?e(t):e&&(e.current=t)}var he={north:1,east:2,south:4,west:8,header:16,centre:32,absolute:64},Me={AFTER:"after",BEFORE:"before"},V=Object.freeze({North:fe("north"),East:fe("east"),South:fe("south"),West:fe("west"),Header:fe("header"),Centre:fe("centre"),Absolute:fe("absolute")});function fe(e){return Object.freeze({offset:e==="north"||e==="west"?0:e==="south"||e==="east"?1:NaN,valueOf:function(){return he[e]},toString:function(){return e},North:e==="north",South:e==="south",East:e==="east",West:e==="west",Header:e==="header",Centre:e==="centre",NorthOrSouth:e==="north"||e==="south",EastOrWest:e==="east"||e==="west",NorthOrWest:e==="north"||e==="west",SouthOrEast:e==="east"||e==="south",Absolute:e==="absolute"})}var Wo=V.North,_o=V.South,zt=V.East,At=V.West,Ii=V.Header,Oi=V.Centre,Re=class{static measure(t,o=[]){var n={};return Ni(t,n,o),n}static allBoxesContainingPoint(t,o,n,r,i){return Yo(t,o,n,r,i).reverse()}};function It(e,t,o,n=30){let r=o.right-o.left,i=o.bottom-o.top,s=e-o.left,a=t-o.top,l=0;return s<n&&(l+=8),s>r-n&&(l+=2),a<n&&(l+=1),a>i-n&&(l+=4),{pctX:s/r,pctY:a/i,closeToTheEdge:l}}function Ot(e,t,o,n){let{BEFORE:r,AFTER:i}=Me,{pctX:s,pctY:a,closeToTheEdge:l}=It(e,t,o),c,p;if(n==="row")c=s<.5?At:zt;else if(o.header&&Je(o.header,e,t))if(c=Ii,o.Stack){let m=o.Stack.length;if(m===0)p={index:-1,left:o.left,positionRelativeToTab:i,width:0};else{let u=o.Stack.find(({left:d,right:h})=>e>=d&&e<=h);if(u){let d=u.right-u.left;p={index:o.Stack.indexOf(u),left:u.left,positionRelativeToTab:(e-u.left)/d<.5?r:i,width:d}}else p={left:o.Stack[m-1].right,width:0,index:m,positionRelativeToTab:i}}}else if(o.header.titleWidth){let m=o.header.titleWidth;p={index:-1,left:o.left,positionRelativeToTab:(e-o.left)/m<.5?r:i,width:m}}else p={left:o.left,width:0,positionRelativeToTab:r,index:-1};else c=ki(e,t,o,s,a);return{position:c,x:e,y:t,closeToTheEdge:l,tab:p}}function ki(e,t,o,n,r){let i=Bi(o,.2);if(Je(i,e,t))return Oi;switch(`${r<.5?"north":"south"}${n<.5?"west":"east"}`){case"northwest":return n>r?Wo:At;case"northeast":return 1-n>r?Wo:zt;case"southeast":return n>r?zt:_o;case"southwest":return 1-n>r?At:_o;default:}}function Bi({right:e,left:t,top:o,bottom:n},r){let i=(1-r)/2,s=(e-t)*i,a=(n-o)*i;return{left:t+s,top:o+a,right:e-s,bottom:n-a}}function Ni(e,t,o){let{id:n,"data-path":r,path:i=r}=z(e),s=I(e);if(n&&i){let[a,l]=Xo(e);Go(e,a,l,t),F(s)&&Uo(e,t,o)}}function Go(e,t,o,n){let{"data-path":r,path:i=r,header:s}=z(e);n[i]=t;let a=I(e);if(s||a==="Stack"){let l=o.querySelector(".vuuHeader");if(l){let{top:c,left:p,right:m,bottom:u}=l.getBoundingClientRect();if(n[i].header={top:Math.round(c),left:Math.round(p),right:Math.round(m),bottom:Math.round(u)},a==="Stack")n[i].Stack=Array.from(l.querySelectorAll(".saltTab")).map(d=>d.getBoundingClientRect()).map(({left:d,right:h})=>({left:d,right:h}));else{let d=l.querySelector('[class^="vuuHeader-title"]'),{header:h}=n[i];d&&h&&(h.titleWidth=d.clientWidth)}}}return n[i]}function Uo(e,t,o,n=0,r=0,i=0,s=0){let{children:a,"data-path":l,path:c=l,style:p,active:m=0}=z(e),u=I(e),d=u==="Flexbox",h=u==="Stack",g=d&&p.flexDirection==="column",y=d&&p.flexDirection==="row",b=(h?a.filter((E,w)=>w===m):a.filter(Hi)).map(E=>{let[w,x]=Xo(E);return[{...w,top:w.top-i,right:w.right+r,bottom:w.bottom+s,left:w.left-n},x,E]}),R=b.map(([E,w,x],v,T)=>{let L,M,D,S,P,C,O=T.length-1;y?(P=v===0?0:E.left-T[v-1][0].right,C=v===O?0:T[v+1][0].left-E.right,L=v===0||P===0?0:P,M=v===O||C===0?0:C-C/2,E.left-=L,E.right+=M,D=i,S=s):g&&(P=v===0?0:E.top-T[v-1][0].bottom,C=v===O?0:T[v+1][0].top-E.bottom,D=v===0||P===0?0:P,S=v===O||C===0?0:C-C/2,E.top-=D,E.bottom+=S,L=n,M=r);let N=Go(x,E,w,t),k=I(x);return F(k)&&Uo(x,t,o,L,M,D,S),N});b.length&&(t[c].children=R)}function Hi(e){let{id:t}=z(e),o=document.getElementById(t);return o?o.dataset.dragging!=="true":(console.warn(`BoxModel: no element found with id #${t}`),!1)}function Xo(e){let{id:t}=z(e),o=I(e),n=document.getElementById(t);if(!n)throw Error(`No DOM for ${o} ${t}`);let{top:r,left:i,right:s,bottom:a,height:l,width:c}=n.getBoundingClientRect(),p;if(F(o)){let m=n.scrollHeight;m>l&&(p={id:t,scrollHeight:m,scrollTop:n.scrollTop})}return[{top:Math.round(r),left:Math.round(i),right:Math.round(s),bottom:Math.round(a),height:Math.round(l),width:Math.round(c),scrolling:p},n,e]}function Yo(e,t,o,n,r,i=[]){let{children:s,"data-path":a,path:l=a}=z(e),c=I(e);var p=t[l];if(!Je(p,o,n))return i;if(r&&r.length){if(r.includes(l))i.push(e);else if(!r.some(u=>u.startsWith(l)))return i}else i.push(e);if(!F(c)||p.header&&Je(p.header,o,n))return i;p.scrolling&&$i(p,o,n);for(var m=0;m<s.length;m++){if(c==="Stack"&&e.props.active!==m)continue;let u=Yo(s[m],t,o,n,r);if(u.length)return i.concat(u)}return i}function Je(e,t,o){if(e)return t>=e.left&&t<e.right&&o>=e.top&&o<e.bottom}function $i({top:e,bottom:t,scrolling:o},n,r){if(o){let{id:i,scrollTop:s,scrollHeight:a}=o,l=t-e;if(s===0&&t-r<50){let c=a-l;document.getElementById(i).scrollTo({left:0,top:c,behavior:"smooth"}),o.scrollTop=c}else if(s>0&&r-e<50)document.getElementById(i).scrollTo({left:0,top:0,behavior:"smooth"}),o.scrollTop=0;else return!1}else return!1}var Fi=.4,Ke=class{constructor(t,o,n,r,i){this.init(t,o,n,r,i)}init(t,o,n,r,i){var{left:s,top:a}=r,{pctX:l,pctY:c}=It(o,n,r),p=Fi,m=l*r.width,u=r.width-m,d=c*r.height,h=r.height-d,g=r.width*p,y=r.height*p,f=1-p,b=m*f,R=d*f,E=u*f,w=h*f;this.intrinsicSize=i,this.constraint={zone:{x:{lo:t.left,hi:t.right},y:{lo:t.top,hi:t.bottom}},pos:{x:{lo:t.left-b,hi:t.right-r.width+E},y:{lo:t.top-R,hi:t.bottom-r.height+w}},mouse:{x:{lo:t.left+g*l,hi:t.right-g*(1-l)},y:{lo:t.top+y*c,hi:t.bottom-y*(1-c)}}},this.x={pos:s,lo:!1,hi:!1,mousePos:o,mousePct:l},this.y={pos:a,lo:!1,hi:!1,mousePos:n,mousePct:c}}outOfBounds(){return this.x.lo||this.x.hi||this.y.lo||this.y.hi}inBounds(){return!this.outOfBounds()}dropX(){return this.dropXY("x")}dropY(){return this.dropXY("y")}hasIntrinsicSize(){var t,o;return((t=this==null?void 0:this.intrinsicSize)==null?void 0:t.height)&&((o=this==null?void 0:this.intrinsicSize)==null?void 0:o.width)}update(t,o){var n=this[t],r=this.constraint.mouse[t],i=this.constraint.pos[t],s=n.pos,a=o-n.mousePos;return a<0?n.lo||(o<r.lo?(n.lo=!0,n.pos=i.lo):n.hi?o<r.hi&&(n.hi=!1,n.pos+=a):n.pos+=a):a>0&&(n.hi||(o>r.hi?(n.hi=!0,n.pos=i.hi):n.lo?o>r.lo&&(n.lo=!1,n.pos+=a):n.pos+=a)),n.mousePos=o,s!==n.pos}dropXY(t){var o=this[t],n=this.constraint.zone[t];return o.lo?Math.max(n.lo,o.mousePos):o.hi?Math.min(o.mousePos,Math.round(n.hi)-1):o.mousePos}};var cp=e=>e.pos.tab&&I(e.component)==="Stack"&&e.pos.position.Header,{north:Vi,south:Wi,east:_i,west:Gi}=he,Ui=_i+Gi,Xi=Vi+Wi,le=class{constructor({component:t,pos:o,clientRect:n,nextDropTarget:r}){this.component=t,this.pos=o,this.clientRect=n,this.nextDropTarget=r,this.active=!1,this.dropRect=void 0}targetTabPos(t){let{left:o,width:n,positionRelativeToTab:r}=t;return r===Me.BEFORE?o:o+n}getTargetDropOutline(t,o){if(this.pos.tab)return this.getDropTabOutline(t,this.pos.tab);if(o&&o.hasIntrinsicSize())return this.getIntrinsicDropRect(o);{let[n,r,i,s]=this.getDropRectOutline(t,o);return{l:n,t:r,r:i,b:s}}}getDropTabOutline(t,o){let{clientRect:{top:n,left:r,right:i,bottom:s,header:a}}=this,l=0,c=Math.round(t/2)+l,p=Math.round(n),m=Math.round(r+c),u=Math.round(i-c),d=Math.round(s-c),h=this.targetTabPos(o),g=60,y=a.bottom-a.top;return{l:m,t:p,r:u,b:d,tabLeft:h,tabWidth:g,tabHeight:y}}getIntrinsicDropRect(t){var g,y,f,b;let{pos:o,clientRect:n}=this,{x:r,y:i}=t,s=(y=(g=t.intrinsicSize)==null?void 0:g.height)!=null?y:0,a=(b=(f=t.intrinsicSize)==null?void 0:f.height)!=null?b:0;s&&s>n.height?(console.log("DropTarget: we're going to blow the gaff"),s=n.height):a&&a>n.width&&(console.log("DropTarget: we're going to blow the gaff"),a=n.width);let l=Math.min(n.right-a,Math.max(n.left,Math.round(o.x-r.mousePct*a))),c=Math.min(n.bottom-s,Math.max(n.top,Math.round(o.y-i.mousePct*s))),[p,m,u,d]=this.dropRect=[l,c,l+a,c+s],h=o.position.EastOrWest?[p,n.top,p,n.bottom,u,n.top,u,n.bottom]:[n.left,m,n.right,m,n.left,d,n.right,d];return{l:p,r:u,t:m,b:d,guideLines:h}}getDropRectOutline(t,o){var b,R,E;let{pos:n,clientRect:r}=this,{width:i,height:s,position:a}=n,{width:l,height:c}=(b=o==null?void 0:o.intrinsicSize)!=null?b:{},p=(R=c!=null?c:s)!=null?R:0,m=(E=l!=null?l:i)!=null?E:0;this.dropRect=void 0;let{top:u,left:d,right:h,bottom:g}=r,y=0,f=Math.round(t/2)+y;switch(a){case V.North:case V.Header:{let w=Math.round((g-u)/2),x=p?Math.min(w,Math.round(p)):w;return m&&d+m<h?[d+f,u+f,d+m-f,u+f+x]:[d+f,u+f,h-f,u+f+x]}case V.West:{let w=Math.round((h-d)/2),x=m?Math.min(w,Math.round(m)):w;return p&&u+p<g?[d+f,u+f,d-f+x,u+p+f]:[d+f,u+f,d-f+x,g-f]}case V.East:{let w=Math.round((h-d)/2),x=m?Math.min(w,Math.round(m)):w;return p&&u+p<g?[h-f-x,u+f,h-f,u+p+f]:[h-f-x,u+f,h-f,g-f]}case V.South:{let w=Math.round((g-u)/2),x=p?Math.min(w,Math.round(p)):w;return m&&d+m<h?[d+f,g-f-x,d+m-f,g-f]:[d+f,g-f-x,h-f,g-f]}case V.Centre:return[d+f,u+f,h-f,g-f];default:return console.warn(`DropTarget does not recognize position ${a}`),null}}activate(){return this.active=!0,this}toArray(){let t=this,o=[t];for(;t=t.nextDropTarget;)o.push(t);return o}static getActiveDropTarget(t){return t===null?null:t!=null&&t.active?t:le.getActiveDropTarget(t.nextDropTarget)}};function kt(e,t,o,n,r,i){var l;let s=null,a=Re.allBoxesContainingPoint(o,n,e,t,i);if(a.length){let[c,...p]=a,{"data-path":m,path:u=m,"data-row-placeholder":d}=z(c),h=n[u],y=Ot(e,t,h,r&&d?"row":void 0),f=n[u],b=([R,...E])=>{var w,x;if(((w=y.position)==null?void 0:w.Header)||y.closeToTheEdge){let v=Yi(R,y,f,n,e,t);if(v){let[T,L]=v;return new le({component:R,pos:T,clientRect:L,nextDropTarget:(x=b(E))!=null?x:null})}else if(E.length)return b(E)}};s=new le({component:c,pos:y,clientRect:h,nextDropTarget:(l=b(p))!=null?l:null}).activate()}return s}function Yi(e,{closeToTheEdge:t,position:o},n,r,i,s){if(!e||e.type==="DraggableLayout")return;let a=r[e.props.path],l=t&he.north,c=t&he.east,p=t&he.south,m=t&he.west,u=(l||o.Header)&&Math.round(n.top)===Math.round(a.top),d=c&&Math.round(n.right)===Math.round(a.right),h=p&&Math.round(n.bottom)===Math.round(a.bottom),g=m&&Math.round(n.left)===Math.round(a.left);if(u||d||h||g){let{"data-path":y,path:f=y}=e.props,b=r[f],R=Ot(i,s,b);if((Zi(e)||Zo(e))&&t&Ui)return R.width=120,[R,b];if((qi(e)||Zo(e))&&(o.Header||t&Xi))return R.height=120,[R,b]}}function Zo(e){return I(e)==="Stack"}function Zi(e){return I(e)==="Flexbox"&&e.props.style.flexDirection==="column"}function qi(e){return I(e)==="Flexbox"&&e.props.style.flexDirection==="row"}import Ji from"classnames";import Ki,{createElement as qo,useEffect as hp,useRef as gp}from"react";import Bt from"react-dom";window.popupReact=Ki;var Nt=!1,J=[];function Jo(e){e.keyCode===27&&(J.length?jo():Nt&&Bt.unmountComponentAtNode(document.body.querySelector(".vuuDialog")))}function Ko(e){if(J.length){let t=document.body.querySelectorAll(".vuuPopup");for(let o=0;o<t.length;o++)if(t[o].contains(e.target))return;jo()}}function jo(){if(J.length){let e=document.body.querySelectorAll(".vuuPopup");for(let t=0;t<e.length;t++)Bt.unmountComponentAtNode(e[t]);Qo("*")}}function ji(e){J.indexOf(e)===-1&&(J.push(e),Nt===!1&&(window.addEventListener("keydown",Jo,!0),window.addEventListener("click",Ko,!0)))}function Qo(e){if(J.length){if(e==="*")J.length=0;else{let t=J.indexOf(e);t!==-1&&J.splice(t,1)}J.length===0&&Nt===!1&&(window.removeEventListener("keydown",Jo,!0),window.removeEventListener("click",Ko,!0))}}var Qi=({children:e,position:t,style:o})=>{let n=Ji("hwPopup","hwPopupContainer",t);return qo("div",{className:n,style:o},e)},es=1,ce=class{static showPopup({name:t="anon",group:o="all",position:n="",left:r=0,right:i="auto",top:s=0,width:a="auto",component:l}){if(!l)throw Error("PopupService showPopup, no component supplied");ji(t,o);let c=document.body.querySelector(".vuuPopup."+o);c===null&&(c=document.createElement("div"),c.className="vuuPopup "+o,document.body.appendChild(c));let p={width:a};Xe(qo(Qi,{key:es++,position:n,style:p},l),c,r,s,()=>{ce.keepWithinThePage(c,i)})}static hidePopup(t="anon",o="all"){J.indexOf(t)!==-1&&(Qo(t,o),Bt.unmountComponentAtNode(document.body.querySelector(`.vuuPopup.${o}`)))}static keepWithinThePage(t,o="auto"){let n=t.querySelector(".vuuPopupContainer > *");if(n){let{top:r,left:i,width:s,height:a,right:l}=n.getBoundingClientRect(),c=window.innerWidth,m=window.innerHeight-(r+a);m<0&&(n.style.top=parseInt(r,10)+m+"px");let u=c-(i+s);if(u<0&&(n.style.left=parseInt(i,10)+u+"px"),typeof o=="number"&&o!==l){let d=o-l;n.style.left=i+d+"px"}}}};import ts from"classnames";import{jsx as en}from"react/jsx-runtime";function tn(e,t=0,o=0){let{pos:n,clientRect:r}=e,i=20;return n.position.West?[r.left-o+i,n.y-t,"left"]:n.position.South?[n.x-o,r.bottom-t-i,"bottom"]:n.position.East?[r.right-o-i,n.y-t,"right"]:[n.x-o,r.top-t+i,"top"]}var Ht="vuuDropMenu",on=({className:e,dropTarget:t,onHover:o,orientation:n})=>{let r=t.toArray();return en("div",{className:ts(Ht,e,`${Ht}-${n}`),onMouseLeave:()=>o(null),children:r.map((i,s)=>en("div",{className:`${Ht}-item`,"data-icon":s===0?"column-2A":"column-2B",onMouseEnter:()=>o(i)},s))})};import{jsx as ls}from"react/jsx-runtime";var $t=!1,Ce=null,K=null,os=e=>Ce=e,ns=([e,t])=>`M${e},${t}`,rs=([e,t])=>`L${e},${t}`,nn=([e,...t])=>`${ns(e)} ${t.map(rs)}Z`,is=e=>{if(e){let[t,o,n,r,i,s,a,l]=e;return`M${t},${o} L${n},${r} M${i},${s} L${a},${l}`}else return""};function ss(){if(document.getElementById("hw-drag-canvas")===null){let e=document.getElementById("root"),t=document.createElement("div");t.id="hw-drag-canvas",t.innerHTML=`
|
|
2
|
+
<svg width="100%" height="100%">
|
|
3
|
+
<path id="hw-drop-guides" />
|
|
4
|
+
<path
|
|
5
|
+
id="vuu-drop-outline"
|
|
6
|
+
d="M300,132 L380,132 L380,100 L460,100 L460,132, L550,132 L550,350 L300,350z">
|
|
7
|
+
<animate
|
|
8
|
+
attributeName="d"
|
|
9
|
+
id="hw-drop-outline-animate"
|
|
10
|
+
begin="indefinite"
|
|
11
|
+
dur="300ms"
|
|
12
|
+
fill="freeze"
|
|
13
|
+
to="M255,33 L255,33,L255,1,L315,1,L315,1,L794,1,L794,164,L255,164Z"
|
|
14
|
+
/>
|
|
15
|
+
</path>
|
|
16
|
+
</svg>
|
|
17
|
+
`,document.body.insertBefore(t,e)}}var ze=class{constructor(){this.currentPath=null;this.tabMode=null;ss()}prepare(t,o="full-view"){document.body.classList.add("drawing"),this.currentPath=null,this.tabMode=o;let n=this.getPoints(0,0,0,0),r=nn(n),i=document.getElementById("vuu-drop-outline");i==null||i.setAttribute("d",r),this.currentPath=r}clear(){Ce=null,je(),document.body.classList.remove("drawing"),ce.hidePopup()}get hoverDropTarget(){return Ce}getPoints(t,o,n,r,i=0,s=0,a=0){let l=this.tabMode==="tab-only";if(s===0)return[[t,o+a],[t,o+a],[t,o],[t+s,o],[t+s,o],[t+n,o],[t+n,o+r],[t,o+r]];if(l){let c=i;return[[c,o],[c,o],[c+s,o],[c+s,o],[c+s,o+a],[c+s,o+a],[c,o+a],[c,o+a]]}else return i===0?[[t,o+a],[t,o+a],[t,o],[t+s,o],[t+s,o+a],[t+n,o+a],[t+n,o+r],[t,o+r]]:[[t,o+a],[t+i,o+a],[t+i,o],[t+i,o],[t+i,o+a],[t+n,o+a],[t+n,o+r],[t,o+r]]}draw(t,o){let r=$t;if(Ce!==null)this.drawTarget(Ce);else if($t=t.nextDropTarget!=null,t.pos.tab?as(t):K&&je(),this.drawTarget(t,o),$t){let[i,s,a]=tn(t);{let l=ls(on,{dropTarget:t,onHover:os,orientation:a});ce.showPopup({left:i,top:s,component:l})}}else ce.hidePopup()}drawTarget(t,o){let r=t.getTargetDropOutline(6,o);if(r){let{l:i,t:s,r:a,b:l,tabLeft:c,tabWidth:p,tabHeight:m,guideLines:u}=r,d=a-i,h=l-s;if(this.currentPath){let R=document.getElementById("vuu-drop-outline");R==null||R.setAttribute("d",this.currentPath)}let g=this.getPoints(i,s,d,h,c,p,m),y=nn(g),f=document.getElementById("hw-drop-outline-animate");f==null||f.setAttribute("to",y),f==null||f.beginElement(),this.currentPath=y;let b=document.getElementById("hw-drop-guides");b==null||b.setAttribute("d",is(u))}}},rn="transition:margin-left .4s ease-out;margin-left: 63px",sn="transition:margin-left .4s ease-out;margin-left: 0px";function as(e){var a,l;let{AFTER:t,BEFORE:o}=Me,{clientRect:{Stack:n},pos:{tab:r}}=e,{id:i}=e.component.props,s=null;if(n&&r&&r.positionRelativeToTab!==t){let c=r.positionRelativeToTab===o?1:2,p=`:scope .hwTabstrip > .hwTabstrip-inner > .hwTab:nth-child(${r.index+c})`;s=(a=document.getElementById(i))==null?void 0:a.querySelector(p),s?(K===null||K!==s)&&(s.style.cssText=rn,K&&(K.style.cssText=sn),K=s):je()}else if((r==null?void 0:r.positionRelativeToTab)===o){if(K===null){let c=".vuuHeader-title";s=(l=document.getElementById(i))==null?void 0:l.querySelector(c),s.style.cssText=rn,K=s}}else je()}function je(){K&&(K.style.cssText=sn,K=null)}var se,Ae,ue,ln,cn,ge,Qe,Ee=null,Vt,un,Ie,pn,Ft,et=null,cs=3,tt=new ze,an=.4;function us(e,t){return t?_(e,t):ie(e,o=>o.dropTarget)}var Wt={handleMousedown(e,t,o={}){se=t,un=o,ln=e.clientX,cn=e.clientY,Ft=o.dragThreshold===void 0?cs:o.dragThreshold,Ft===0?se(e,0,0):(window.addEventListener("mousemove",ot,!1),window.addEventListener("mouseup",nt,!1),et=window.setTimeout(()=>{console.log("mousedownTimer fires"),window.removeEventListener("mousemove",ot,!1),window.removeEventListener("mouseup",nt,!1),se==null||se(e,0,0)},500)),e.preventDefault()},initDrag(e,t,{top:o,left:n,right:r,bottom:i},s,a,l,c){return{drag:Ae,drop:ue}=a,ps(e,t,{top:o,left:n,right:r,bottom:i},s,l,c)}};function ot(e){var t=!0,o=!0;let n=t?e.clientX-ln:0,r=o?e.clientY-cn:0;Math.max(Math.abs(n),Math.abs(r))>Ft&&(window.removeEventListener("mousemove",ot,!1),window.removeEventListener("mouseup",nt,!1),se==null||se(e,n,r),se=null)}function nt(){et&&(window.clearTimeout(et),et=null),window.removeEventListener("mousemove",ot,!1),window.removeEventListener("mouseup",nt,!1)}function ps(e,t,o,n,r,i){ge=us(e,t);let{"data-path":s,path:a=s}=z(ge);i&&(Vt=i.map(u=>ie(e,d=>d.id===u)).map(u=>u.props.path)),Ie=Re.measure(ge,i),console.log({_measurements:Ie});let l=Ie[a];Qe=new Ke(l,n.x,n.y,o,r);let c=Math.round(Qe.x.mousePct*100),p=Math.round(Qe.y.mousePct*100);return window.addEventListener("mousemove",mn,!1),window.addEventListener("mouseup",dn,!1),pn=!1,tt.prepare(o,"tab-only"),un.DoNotTransform?"transform:none":`transform:scale(${an},${an});transform-origin:${c}% ${p}%;`}function mn(e){let t=e.clientX,o=e.clientY,n=Qe,r=Ee,i,s,a;n.update("x",t)&&(s=n.x.pos),n.update("y",o)&&(a=n.y.pos),s===void 0&&a===void 0||Ae==null||Ae(s,a),!pn&&(n.inBounds()?i=kt(t,o,ge,Ie,n.hasIntrinsicSize(),Vt):i=kt(n.dropX(),n.dropY(),ge,Ie),r&&(i==null||i.box!==r.box)&&(Ee=null),i&&(tt.draw(i,n),Ee=i))}function dn(){ms()}function ms(){if(Ee){let e=tt.hoverDropTarget||le.getActiveDropTarget(Ee);ue==null||ue(e),Ee=null}else ue==null||ue({component:ge,pos:{position:V.Absolute}});Ae=null,ue=null,ge=null,tt.clear(),Vt=null,window.removeEventListener("mousemove",mn,!1),window.removeEventListener("mouseup",dn,!1)}import{useForkRef as ks}from"@salt-ds/core";import Bs from"classnames";import{forwardRef as Ns}from"react";import He,{useCallback as lt,useMemo as Dn,useRef as ct,useState as Ls}from"react";import{getUniqueId as Ms}from"@vuu-ui/vuu-utils";import ds,{useCallback as Oe,useRef as rt,useState as fs}from"react";import hs from"classnames";import{jsx as fn}from"react/jsx-runtime";var hn=ds.memo(function({column:t,index:o,onDrag:n,onDragEnd:r,onDragStart:i,style:s}){let a=rt(),l=rt(null),c=rt(0),[p,m]=fs(!1),u=Oe(({key:v,shiftKey:T})=>{let L=T?10:1;t&&v==="ArrowDown"?n(o,L):t&&v==="ArrowUp"||!t&&v==="ArrowLeft"?n(o,-L):!t&&v==="ArrowRight"&&n(o,L)},[t,o,n]),d=Oe(v=>{let{key:T}=v;(t&&(T==="ArrowUp"||T==="ArrowDown")||!t&&(T==="ArrowLeft"||T==="ArrowRIght"))&&(i(o),u(v),h.current=u)},[t,u,o,i]),h=rt(d),g=v=>h.current(v),y=Oe(v=>{a.current=!0;let T=v[t?"clientY":"clientX"],L=T-c.current;T&&T!==c.current&&n(o,L),c.current=T},[t,o,n]),f=Oe(()=>{var v;window.removeEventListener("mousemove",y,!1),window.removeEventListener("mouseup",f,!1),r(),m(!1),(v=l.current)==null||v.focus()},[y,r,m]),b=Oe(v=>{c.current=t?v.clientY:v.clientX,i(o),window.addEventListener("mousemove",y,!1),window.addEventListener("mouseup",f,!1),v.preventDefault(),m(!0)},[t,y,f,o,i,m]),R=()=>{},E=()=>{var v;a.current?a.current=!1:(v=l.current)==null||v.focus()},w=()=>{h.current=d},x=hs("Splitter","focusable",{active:p,column:t});return fn("div",{className:x,"data-splitter":!0,ref:l,role:"separator",style:s,onBlur:w,onClick:E,onFocus:R,onKeyDown:g,onMouseDown:b,tabIndex:0,children:fn("div",{className:"grab-zone"})})});import gs from"classnames";import{jsx as ys}from"react/jsx-runtime";var gn="vuuPlaceholder",it=({className:e,closeable:t,flexFill:o,resizeable:n,shim:r,...i})=>ys("div",{className:gs(gn,e,{[`${gn}-shim`]:r}),...i,"data-placeholder":!0,"data-resizeable":!0});it.displayName="Placeholder";B("Placeholder",it);import yn from"react";import{uuid as bn}from"@vuu-ui/vuu-utils";var bs={"data-placeholder":!0,"data-resizeable":!0},st={},pe="auto",_t={flexBasis:0,flexGrow:1,flexShrink:1,height:pe,width:pe},xn={height:"width",width:"height"},Rn=(e="row")=>e==="row"?["width","height","column"]:["height","width","row"],xs=e=>typeof e=="string"&&e.endsWith("%"),U=e=>{let{style:{width:t=pe,height:o=pe}=st}=e.props,n=typeof o=="number",r=typeof t=="number";return n&&r?{height:o,width:t}:n?{height:o}:r?{width:t}:void 0};function Gt(e,t,o){let n=xn[t],{style:{[n]:r=pe,...i}=st}=e.props;return o&&o[t]?{...i,..._t,flexBasis:o[t],flexGrow:0,flexShrink:0}:{...i,..._t,[n]:r}}function En(e){let{style:{flex:t,flexGrow:o,flexShrink:n,flexBasis:r}=st}=e.props;return typeof t=="number"||r===0&&o===1&&n===1?!0:typeof r!="number"}function Ut(e,t,o){let n=xn[t],{style:{[t]:r=pe,[n]:i=pe,...s}=st}=e.props;return r!==pe?xs(r)?{flexBasis:0,flexGrow:1,flexShrink:1,[t]:void 0,[n]:i}:{flexBasis:r,flexGrow:0,flexShrink:0,[t]:r,[n]:i}:o&&o[t]?{...s,..._t,flexBasis:o[t],flexGrow:0,flexShrink:0}:{...s,[n]:i}}function ke(e,t,o,n,r){let i=[],s=0,a;if(n&&r){let p,[m,u,d,h]=r;[p,a]=t==="column"?[u-n.top,n.bottom-h]:[m-n.left,n.right-d],p&&i.push(ne(`${o}.${s++}`,p,{flexGrow:0,flexShrink:0}))}else a=!0;let{version:l=0,style:c}=z(e);return i.push(H(e,`${o}.${s++}`,{version:l+1,style:{...c,flexBasis:"auto",flexGrow:0,flexShrink:0}})),a&&i.push(ne(`${o}.${s++}`,0,void 0,{[`data-${t}-placeholder`]:!0})),Xt(t,{resizeable:!1,style:{flexBasis:"auto"}},i,o)}var Rs=(e,t)=>{if(!t)return e===0?1:0};function Xt(e,t,o,n){let r=bn(),{flexFill:i,style:s,resizeable:a=!0}=t,{flexBasis:l=i?void 0:"auto"}=s,c=Rs(l,i);return yn.createElement(oe.Flexbox,{id:r,key:r,path:n,flexFill:i,style:{...s,flexDirection:e,flexBasis:l,flexGrow:c,flexShrink:c},resizeable:a},o)}var Es={flexGrow:1,flexShrink:1};function ne(e,t,o,n){let r=bn();return yn.createElement("div",{...bs,...n,"data-path":e,id:r,key:r,style:{...Es,...o,flexBasis:t}})}var Ss={},Be=1,Ne=2,ws=e=>typeof e.intrinsicSize=="number",vs=(e,t)=>{let o={};return e.forEach(n=>{o[n]=A(t,n)}),o},at=(e,t,o)=>e.map((n,r)=>{var l;let i=A(n,"resizeable"),{[t]:s}=(l=U(n))!=null?l:Ss,a=En(n);return o?{index:r,flexOpen:a,intrinsicSize:s,resizeable:i,...vs(o,n)}:{index:r,flexOpen:a,intrinsicSize:s,resizeable:i}}),Sn=e=>{let t=e.length,o=e.every(ws),n=Array(t).fill(0);if(o&&(n[0]=Ne,n[t-1]=Ne),t<2)return n;for(let r=0,i=0;r<t-1;r++)e[r].resizeable&&!i&&(i=Be),n[r]+=i;for(let r=t-1;r>0&&(n[r]&Be&&(n[r]-=Be),!e[r].resizeable);r--);return n},wn=(e,t)=>{let o=Ts(e,t),n=Ps(e,t),r=o!==-1&&n!==-1?[o,n]:void 0,i=Ds(e,r);return[r,i]};function Ds(e,t){if(t){let o=[];for(let n=0;n<e.length;n++)e[n].flexOpen&&!t.includes(n)&&o.push(n);return o}}function Ts(e,t){let o=t,n=!1;for(;o>=1&&!n;)o=o-1,n=vn(e,o);return o}function Ps(e,t){let o=t,n=!1,r=e.length;for(;o<r&&!n;)o=o+1,n=vn(e,o);return o===r?-1:o}function vn(e,t){let{placeholder:o,splitter:n,resizeable:r,intrinsicSize:i}=e[t];return Boolean(!n&&!i&&(o||r))}var Cs=e=>!e.splitter&&!e.placeholder,Pn=({children:e,onSplitterMoved:t,style:o})=>{let n=ct(),r=ct(),i=ct(),s=ct([]),[,a]=Ls({}),l=y=>{i.current=y,a({})},c=(o==null?void 0:o.flexDirection)==="column",p=c?"height":"width",m=Dn(()=>Array.isArray(e)?e:He.isValidElement(e)?[e]:[],[e]),u=lt(y=>{let{current:f}=r;if(f){let[b,R]=wn(f,y);b&&(b.forEach(E=>{var x;let w=(x=n.current)==null?void 0:x.childNodes[E];if(w){let{size:v,minSize:T}=Os(w,p);f[E].currentSize=v,f[E].minSize=T}}),R&&R.forEach(E=>{var x;let w=(x=n.current)==null?void 0:x.childNodes[E];if(w){let{[p]:v}=w.getBoundingClientRect();f[E].flexBasis=v}}))}},[p]),d=lt((y,f)=>{i.current&&r.current&&l(As(i.current,r.current,f,p))},[p]),h=lt(()=>{let y=r.current;y&&(t==null||t(y.filter(Cs))),y==null||y.forEach(f=>{f.currentSize=void 0,f.flexBasis=void 0,f.flexOpen=!1})},[t]),g=lt(y=>He.createElement(hn,{column:c,index:y,key:`splitter-${y}`,onDrag:d,onDragEnd:h,onDragStart:u}),[d,h,u,c]);return Dn(()=>{let[y,f]=zs(m,p,g,s.current);r.current=f,i.current=y},[m,g,p]),{content:i.current||[],rootRef:n}};function zs(e,t,o,n){let r=at(e,t),i=Sn(r),s=[],a=[];for(let l=0;l<e.length;l++){let c=e[l];if(l===0&&i[l]&Ne&&(s.push(Tn(l)),a.push({placeholder:!0,shim:!0})),c.key==null){let p=n[l]||(n[l]=Ms());s.push(He.cloneElement(c,{key:p}))}else s.push(c);a.push(r[l]),l>0&&i[l]&Ne?(s.push(Tn(l)),a.push({placeholder:!0})):i[l]&Be&&(s.push(o(s.length)),a.push({splitter:!0}))}return[s,a]}function As(e,t,o,n){return Is(t,o)?e.map((i,s)=>{let a=t[s],{currentSize:l,flexOpen:c,flexBasis:p}=a,m=l!==void 0;if(m||c){let{flexBasis:u}=i.props.style||{},d=m?a.currentSize:p;return d!==u?He.cloneElement(i,{style:{...i.props.style,flexBasis:d,[n]:"auto"}}):i}else return i}):e}function Is(e,t){let o=[];e.forEach((p,m)=>{p.currentSize!==void 0&&o.push(m)});let n=t<0?o[0]:o[1],{currentSize:r=0,minSize:i=0}=e[n];if(r===i)return!1;if(Math.abs(t)>r-i){let p=t<0?-1:1;t=Math.max(0,r-i)*p}let s=e[o[0]],{currentSize:a=0}=s;s.currentSize=a+t;let l=e[o[1]],{currentSize:c=0}=l;return l.currentSize=c-t,!0}function Tn(e){return He.createElement(it,{shim:e===0,key:`placeholder-${e}`})}function Os(e,t){let{[t]:o}=e.getBoundingClientRect(),r=getComputedStyle(e).getPropertyValue(`min-${t}`),i=r.endsWith("px")?parseInt(r,10):0;return{size:o,minSize:i}}import{jsx as Hs}from"react/jsx-runtime";var Yt="hwFlexbox",Ln=Ns(function(t,o){let{breakPoints:n,children:r,column:i,className:s,flexFill:a,gap:l,fullPage:c,id:p,onSplitterMoved:m,resizeable:u,row:d,spacing:h,splitterSize:g,style:y,...f}=t,{content:b,rootRef:R}=Pn({children:r,onSplitterMoved:m,style:y}),E=Bs(Yt,s,{[`${Yt}-column`]:i,[`${Yt}-row`]:d,"flex-fill":a,"full-page":c});return Hs("div",{...f,className:E,"data-resizeable":u||void 0,id:p,ref:ks(R,o),style:{...y,gap:l,"--spacing":h},children:b})});Ln.displayName="Flexbox";var Zt=Ln;import{useCallback as Da}from"react";var Se={ADD:"add",BLUR:"blur",BLUR_SPLITTER:"blur-splitter",DRAG_START:"drag-start",DRAG_STARTED:"drag-started",DRAG_DROP:"drag-drop",FOCUS:"focus",FOCUS_SPLITTER:"focus-splitter",INITIALIZE:"initialize",MAXIMIZE:"maximize",MINIMIZE:"minimize",REMOVE:"remove",REPLACE:"replace",RESTORE:"restore",SAVE:"save",SET_TITLE:"set-title",SPLITTER_RESIZE:"splitter-resize",SWITCH_TAB:"switch-tab",TEAR_OUT:"tear-out"};import{useCallback as to,useContext as ir,useEffect as Ea,useRef as nr,useState as Sa}from"react";import Qn from"react";import Ve from"react";import{uuid as Bn}from"@vuu-ui/vuu-utils";import{uuid as An}from"@vuu-ui/vuu-utils";import $e,{cloneElement as $s}from"react";import{useCallback as we}from"react";var W=new Map,X=new Map,Mn=e=>W.get(e),Cn=e=>W.has(e),zn=(e,t)=>W.set(e,t),ve=()=>{let e=we((s,a)=>{let l=X.get(s);if(l)return a!==void 0&&l[a]!==void 0?l[a]:a!==void 0?void 0:l},[]),t=we((s,a,l)=>{if(a===void 0)X.set(s,l);else if(X.has(s)){let c=X.get(s);X.set(s,{...c,[a]:l})}else X.set(s,{[a]:l})},[]),o=we((s,a)=>{if(X.has(s)){if(a===void 0)X.delete(s);else if(X.get(s)[a]){let{[a]:c,...p}=X.get(s);Object.keys(p).length>0?X.set(s,p):X.delete(s)}}},[]),n=we((s,a)=>{let l=W.get(s);if(l)return a!==void 0?l[a]:l},[]),r=we((s,a,l)=>{if(a===void 0)W.set(s,l);else if(W.has(s)){let c=W.get(s);W.set(s,{...c,[a]:l})}else W.set(s,{[a]:l})},[]),i=we((s,a)=>{if(W.has(s)){if(a===void 0)W.delete(s);else if(W.get(s)[a]){let{[a]:c,...p}=W.get(s);Object.keys(p).length>0?W.set(s,p):W.delete(s)}}},[]);return{loadSessionState:e,loadState:n,saveSessionState:t,saveState:r,purgeState:i,purgeSessionState:o}};var In=e=>e.flexDirection==="column"?["height","width"]:["width","height"],Fs={},Fe=(e,t="0")=>{let[o,n]=Kt(I(e),e.props,t);return $e.cloneElement(e,o,n)},Jt=(e,t)=>{let o=I(e),[n,r]=Kt(o,e.props,"0",void 0,t);return $s(e,n,r)};function Vs(e,t,o="0",n=null,r){var g,y;let{active:i=0,"data-path":s,path:a=s,id:l,style:c}=z(r),p=I(r)===e&&o===a,m=p?l:(g=t.id)!=null?g:An(),u=e==="Stack"?(y=t.active)!=null?y:i:void 0,d=m,h=p?c:_s(e,t,n);return Po(e)?{id:m,key:d,path:o,style:h,type:e,active:u}:{id:m,key:d,style:h,"data-path":o}}function Kt(e,t,o,n=null,r){var c,p;let i=Vs(e,t,o,n,r);if(t.layout&&!r)return[i,[ut(t.layout,`${o}.0`)]];let s=(p=r==null?void 0:r.children)!=null?p:(c=r==null?void 0:r.props)==null?void 0:c.children,l=t.dropTarget&&s?s:Ws(e,t.children,o,s);return[i,l]}function Ws(e,t,o="0",n){let r=Array.isArray(t)?t:$e.isValidElement(t)?[t]:[];return F(e)?r.map((i,s)=>{let a=I(i),l=I(n==null?void 0:n[s]);if(!l||a===l){let[c,p]=Kt(a,i.props,`${o}.${s}`,e,n==null?void 0:n[s]);return $e.cloneElement(i,c,p)}else return n==null?void 0:n[s]}):t}var _s=(e,t,o)=>{let{style:n=Fs}=t;if(e==="Flexbox"&&(n={flexDirection:t.column?"column":"row",...n,display:"flex"}),n.flex){let{flex:r,...i}=n;n={...i,...Ct(r)}}else o==="Stack"?n={...n,...Ct(1)}:o==="Flexbox"&&(n.width||n.height)&&n.flexBasis===void 0&&(n={...n,flexBasis:"auto",flexGrow:0,flexShrink:0});return n};function ut({id:e=An(),type:t,children:o,props:n,state:r},i){let s=t.match(/^[a-z]/)?t:oe[t];if(s===void 0)throw Error(`Unable to create component from JSON, unknown type ${t}`);return r&&zn(e,r),$e.createElement(s,{...n,id:e,key:e,path:i},o?o.map((a,l)=>ut(a,`${i}.${l}`)):void 0)}function On(e){return kn(e)}function kn(e){let t=I(e),{id:o,children:n,type:r,...i}=z(e),s=Cn(o)?Mn(o):void 0;return{id:o,type:t,props:Gs(i),state:s,children:$e.Children.map(n,kn)}}function Gs(e){if(e){let{path:t,...o}=e,n={};for(let[r,i]of Object.entries(o))n[r]=qt(i);return n}}function qt(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e;if(Array.isArray(e))return e.map(qt);if(typeof e=="object"&&e!==null){let t={};for(let[o,n]of Object.entries(e))t[o]=qt(n);return t}}function Nn(e,t){var s;let o=e.props.children,n=o.length,{index:r=-1,positionRelativeToTab:i="after"}=t.tab||{};return r===-1||r>=n?[o[n-1],"after"]:[(s=o[r])!=null?s:null,i]}function pt(e,t,o){let{active:n,children:r=[],path:i}=z(e),s=A(t,"path"),{idx:a,finalStep:l}=q(i,s,!0),[c,p]=l?Us(e,r,o):[n,r==null?void 0:r.map((u,d)=>d===a?pt(u,t,o):u)],m=I(e)==="Stack"?Array.isArray(c)?c[0]:c:n;return Ve.cloneElement(e,{active:m},p)}function Us(e,t,o){let n=A(e,"path"),r=t==null?void 0:t.length,{id:i=Bn()}=z(o);return r?[r,t.concat(H(o,`${n}.${r}`,{id:i,key:i}))]:[0,[H(o,`${n}.0`,{id:i})]]}function mt(e,t,o,n,r,i,s){let{active:a,children:l,path:c}=z(e),p=A(t,"path"),{idx:m,finalStep:u}=q(c,p),[d,h]=u?Xs(e,l,m,o,n,r,i,s):[a,l.map((y,f)=>f===m?mt(y,t,o,n,r,i,s):y)],g=I(e)==="Stack"?d:a;return Ve.cloneElement(e,{active:g},h)}function Xs(e,t,o,n,r,i,s,a){let l=U(n);return(l==null?void 0:l.width)&&(l==null?void 0:l.height)?Zs(e,t,o,n,r,s,a):Hn(e,t,o,n,r,(i==null?void 0:i.width)||(i==null?void 0:i.height),s)}var Ys=(e,t,{top:o,right:n,bottom:r,left:i},[s,a,l,c])=>{if(e==="column"&&t==="before")return a-o;if(e==="column")return r-c;if(e==="row"&&t==="before")return s-i;if(e==="row")return n-l};function Zs(e,t,o,n,r,i,s){let{style:{flexDirection:a}}=z(e),[l,c,p]=Rn(a),{[c]:m,[l]:u}=U(n),d=A(t[o],"path"),h=Ys(a,r,i,s),[g,y]=m<i[c]?[ke(n,p,d,i,s),u]:[n,void 0],f=h?ne(d,h,{flexGrow:0,flexShrink:0}):void 0;return m>i[c]&&(t=t.map(b=>{if(A(b,"placeholder"))return b;{let{[c]:R}=U(b);return R&&R<m?ke(b,p,A(b,"path")):b}})),Hn(e,t,o,g,r,y,i,f)}function Hn(e,t,o,n,r,i,s,a){let l=A(e,"path"),c=0,p=!t||t.length===0?[n]:t.reduce((m,u,d)=>{if(o===d){let[h,g]=qs(e,u,n,s);r==="before"?a?m.push(a,g,h):m.push(g,h):a?m.push(h,g,a):m.push(h,g),c=m.indexOf(g)}else m.push(u);return m},[]).map((m,u)=>u<c?m:H(m,`${l}.${u}`));return[c,p]}function qs(e,t,o,n){let{id:r=Bn(),version:i=0}=z(o);if(i+=1,I(e)==="Flexbox"){let[s]=In(e.props.style),a=6,l={[s]:(n[s]-a)/2},c=Ut(t,s,l),p=Ut(o,s,l);return[Ve.cloneElement(t,{style:c}),Ve.cloneElement(o,{id:r,version:i,style:p})]}else{let{style:{left:s,top:a,flex:l,...c}={left:void 0,top:void 0,flex:void 0}}=z(o);return[t,Ve.cloneElement(o,{id:r,version:i,style:c})]}}var Y={ADD:"add",DRAG_START:"drag-start",DRAG_DROP:"drag-drop",MAXIMIZE:"maximize",MINIMIZE:"minimize",REMOVE:"remove",REPLACE:"replace",RESTORE:"restore",SAVE:"save",SET_TITLE:"set-title",SPLITTER_RESIZE:"splitter-resize",SWITCH_TAB:"switch-tab",TEAROUT:"tearout"};import ye from"react";import dt from"react";function $n(e,{target:t,replacement:o}){return jt(e,t,o)}function jt(e,t,o){let n=A(t,"path"),r=A(t,"resizeable"),{style:i}=z(t),s=Fe(dt.cloneElement(o,{resizeable:r,style:{...i,...o.props.style}}),n);return j(e,t,s)}function j(e,t,o,n){if(e===t)return o;{let{idx:r,finalStep:i}=q(A(e,"path"),A(t,"path")),s=e.props.children.slice();return i?n?n===Se.MINIMIZE?s[r]=Js(e,s[r]):n===Se.RESTORE&&(s[r]=Ks(s[r])):s[r]=o:s[r]=j(s[r],t,o,n),dt.cloneElement(e,void 0,s)}}function Js(e,t){let{style:o}=z(e),{style:n}=z(t),{width:r,height:i,flexBasis:s,flexShrink:a,flexGrow:l,...c}=n,p={width:r,height:i,flexBasis:s,flexShrink:a,flexGrow:l},m={...c,flexBasis:0,flexGrow:0,flexShrink:0},u=o.flexDirection==="row"?"vertical":o.flexDirection==="column"?"horizontal":!1;return u?dt.cloneElement(t,{collapsed:u,restoreStyle:p,style:m}):t}function Ks(e){let{style:t,restoreStyle:o}=z(e),{flexBasis:n,flexShrink:r,flexGrow:i,...s}=t,a={...s,...o};return dt.cloneElement(e,{collapsed:!1,style:a,restoreStyle:void 0})}function Qt(e,{path:t}){let o=_(e,t),n=re(e,t);if(n===null)return e;let{children:r}=z(n);if(r.length>1&&Vn(r,t)){let{style:{flexBasis:i,display:s,flexDirection:a,...l}}=z(n),c=A(n,"path"),p=j(e,n,ne(c,i,l));for(;(n=re(p,c))&&A(n,"path")!=="0";){let{children:m}=z(n);if(Vn(m)){c=A(n,"path");let{style:{flexBasis:u,display:d,flexDirection:h,...g}}=z(n);p=j(e,n,ne(c,u,g))}else if(ta(m))p=Gn(e,n);else break}return p}else return Wn(e,o)}function Wn(e,t){let{active:o,children:n,path:r,preserve:i}=z(e),{idx:s,finalStep:a}=q(r,A(t,"path")),l=I(e),c=n.slice();if(a){if(c.splice(s,1),o!==void 0&&o>=s&&(o=Math.max(0,o-1)),c.length===1&&!i&&r!=="0"&&l.match(/Flexbox|Stack/))return js(e,c[0]);!c.some(Qs)&&c.some(_n)&&(c=ea(c))}else c[s]=Wn(c[s],t);return c=c.map((p,m)=>H(p,`${r}.${m}`)),ye.cloneElement(e,{active:o},c)}function js(e,t){let o=I(e),{path:n,style:{flexBasis:r,flexGrow:i,flexShrink:s,width:a,height:l}}=z(e),c=H(t,n);if(n==="0")c=ye.cloneElement(c,{style:{...t.props.style,width:a,height:l}});else if(o==="Flexbox"){let p=e.props.style.flexDirection==="column"?"height":"width",{style:{[p]:m,...u}}=c.props;c=ye.cloneElement(c,{flexFill:void 0,style:{...u,flexGrow:i,flexShrink:s,flexBasis:r,width:a,height:l}})}return c}function Qs(e){return e.props.style.flexGrow>0}function _n(e){let{width:t,height:o,flexGrow:n}=e.props.style;return n===0&&typeof t!="number"&&typeof o!="number"}function ea(e){return e.map(t=>_n(t)?ye.cloneElement(t,{style:{...t.props.style,flexGrow:1}}):t)}var ta=e=>{if(e&&e.length>0){let t=A(e[0],"placeholder"),o=!1;for(let n=1;n<e.length;n++){if(o=A(e[n],"placeholder"),t&&o)return!0;t=o}}},Gn=(e,t)=>{let{children:o,path:n}=z(e),{idx:r,finalStep:i}=q(n,A(t,"path")),s=o.slice();return i?s[r]=oa(t):s[r]=Gn(s[r],t),s=s.map((a,l)=>H(a,`${n}.${l}`)),ye.cloneElement(e,void 0,s)},oa=e=>{let{children:t}=z(e),o=[],n=[];for(let i=0;i<t.length;i++)A(t[i],"placeholder")?n.push(t[i]):(n.length===1?o.push(n.pop()):n.length>0&&(o.push(Fn(n)),n.length=0),o.push(t[i]));n.length===1?o.push(n.pop()):n.length>0&&o.push(Fn(n));let r=A(e,"path");return ye.cloneElement(e,void 0,o.map((i,s)=>H(i,`${r}.${s}`)))},Fn=([e,...t])=>{let o=A(e,"style"),{flexBasis:n,flexGrow:r,flexShrink:i}=o;for(let{props:{style:s}}of t)n+=s.flexBasis,r=Math.max(r,s.flexGrow),i=Math.max(i,s.flexShrink);return ye.cloneElement(e,{style:{...o,flexBasis:n,flexGrow:r,flexShrink:i}})},Vn=(e,t)=>e.every(o=>A(o,"placeholder")||t&&A(o,"path")===t);import Un from"react";function Xn(e,{path:t,sizes:o}){let n=_(e,t,!0),{children:r,style:i}=z(n),s=i.flexDirection==="column"?"height":"width",a=na(r,o,s),l=Un.cloneElement(n,void 0,a);return j(e,n,l)}function na(e,t,o){return e.map((n,r)=>{let{style:{[o]:i,flexBasis:s}}=z(n),a=t[r],{currentSize:l,flexBasis:c}=a,m=l!==void 0?a.currentSize:c;return m===void 0||i===m||s===m?n:Un.cloneElement(n,{style:ra(n.props.style,o,m)})})}function ra(e,t,o){let n=typeof e[t]=="number",{flexShrink:r=1,flexGrow:i=1}=e;return{...e,[t]:n?o:"auto",flexBasis:n?"auto":o,flexShrink:r,flexGrow:i}}import ft from"react";import{uuid as ia}from"@vuu-ui/vuu-utils";var Yn=e=>{let[t]=I(e);return t===t.toLowerCase()};function We(e,t,o,n,r,i){let{children:s,path:a}=z(e),l=A(t,"path"),{idx:c,finalStep:p}=q(a,l),m=p?sa(e,s,t,o,n,r,i):s.map((u,d)=>d===c?We(u,t,o,n,r,i):u);return ft.cloneElement(e,void 0,m)}function sa(e,t,o,n,r,i,s){let a=U(n);if((a==null?void 0:a.width)&&(a==null?void 0:a.height)){if(i===void 0||s===void 0)throw Error("wrap-layout-element, updateChildren clientRect and dropRect must both be available");return la(t,o,n,r,i,s)}else return aa(e,t,o,n,r)}function aa(e,t,o,n,r){var x;let{version:i=0}=z(n),s=A(o,"path"),{type:a,flexDirection:l,showTabs:c}=qn(r),[p,m,u]=ca(a,o,n,l,r),d=Zn(r),h=d?1:0,g={resizeable:!0,style:u,version:i+1},f={[Yn(o)?"data-resizeable":"resizeable"]:!0,style:m},b=a==="Stack"?{showTabs:c}:void 0,R=a==="Flexbox"?{splitterSize:(x=I(e)==="Flexbox"&&e.props.splitterSize)!=null?x:void 0}:void 0,E=ia();var w=ft.createElement(oe[a],{active:h,id:E,key:E,path:A(o,"path"),flexFill:A(o,"flexFill"),...R,...b,style:p,resizeable:A(o,"resizeable")},d?[H(o,`${s}.0`,f),Fe(ft.cloneElement(n,g),`${s}.1`)]:[Fe(ft.cloneElement(n,g),`${s}.0`),H(o,`${s}.1`,f)]);return t.map(v=>v===o?w:v)}function la(e,t,o,n,r,i){let{flexDirection:s}=qn(n),a=s==="column"?"row":"column",l=Zn(n),[c,p,m,u]=i,[d,h]=s==="column"?[p-r.top,r.bottom-u]:[c-r.left,r.right-m],g=A(t,"path"),y=0,f=Yn(t)?"data-resizeable":"resizeable",b=[];d&&b.push(l?H(t,`${g}.${y++}`,{[f]:!0,style:{flexBasis:d,flexGrow:1,flexShrink:1}}):ne(`${g}.${y++}`,d,{flexGrow:0,flexShrink:0})),b.push(ke(o,a,`${g}.${y++}`,r,i)),h&&b.push(l?ne(`${g}.${y++}`,0):H(t,`${g}.${y++}`,{[f]:!0,style:{flexBasis:0,flexGrow:1,flexShrink:1}}));let R=Xt(s,t.props,b,g);return e.map(E=>E===t?R:E)}function ca(e,t,o,n,r){let i={...t.props.style,flexDirection:n},s=e==="Flexbox"&&n==="column"?"height":"width",a=Gt(o,s,r),l=Gt(t,s);return[i,l,a]}var Zn=e=>{var t;return e.position.SouthOrEast?!0:((t=e==null?void 0:e.tab)==null?void 0:t.positionRelativeToTab)==="before"?!1:!!e.position.Header};function qn(e){return e.position.Header?{type:"Stack",flexDirection:"column",showTabs:!0}:{type:"Flexbox",flexDirection:e.position.EastOrWest?"row":"column"}}var er=(e,t)=>{switch(t.type){case Y.ADD:return fa(e,t);case Y.DRAG_DROP:return da(e,t);case Y.MAXIMIZE:return ma(e,t);case Y.REMOVE:return Qt(e,t);case Y.REPLACE:return $n(e,t);case Y.SET_TITLE:return pa(e,t);case Y.SPLITTER_RESIZE:return Xn(e,t);case Y.SWITCH_TAB:return ua(e,t);default:return console.warn(`layoutActionHandlers. No handler for action.type ${t.type}`),e}};function ua(e,{path:t,nextIdx:o}){var n=_(e,t,!0);let r=Qn.cloneElement(n,{active:o});return j(e,n,r)}function pa(e,{path:t,title:o}){var n=_(e,t,!0);let r=Qn.cloneElement(n,{title:o});return j(e,n,r)}function ma(e,{path:t,type:o}){if(t){var n=_(e,t,!0);return j(e,n,n,o)}else return e}function da(e,t){var u,d;console.log("drag drop");let{draggedReactElement:o,dragInstructions:n,dropTarget:r}=t,i=r.component,{pos:s}=r,a=((u=s==null?void 0:s.position)==null?void 0:u.Header)&&I(i)==="Stack",{id:l,version:c}=z(o),p=U(o),m;if(a){let[h,g]=Nn(i,s);h===void 0?m=pt(e,i,o):m=mt(e,h,o,g)}else!p&&((d=s==null?void 0:s.position)==null?void 0:d.Centre)?m=jt(e,i,o):m=ha(e,r,o);if(n.DoNotRemove)return m;{let h=ie(m,y=>y.id===l&&y.version===c),g=A(h,"path");return Qt(m,{path:g,type:"remove"})}}function fa(e,{path:t,component:o}){return pt(e,_(e,t),o)}function ha(e,t,o){let{component:n,pos:r,clientRect:i,dropRect:s}=t,a=A(n,"path");if(a==="0.0")return We(e,n,o,r);var l=re(e,a);if(Jn(r,l)){let c=r.position.SouthOrEast?"after":"before";return mt(e,n,o,c,r,i,s)}else if(Jn(r,l)){if(F(I(l)))return We(e,n,o,r);throw Error(`no support right now for position = ${r.position}`)}else return We(e,n,o,r,i,s);return e}function Jn(e,t){return e.position.Centre?jn(t)||Kn(t):e.position.NorthOrSouth?Kn(t):e.position.EastOrWest?jn(t):!1}function Kn(e){return I(e)==="Flexbox"&&e.props.style.flexDirection==="column"}function jn(e){return I(e)==="Flexbox"&&e.props.style.flexDirection!=="column"}import{createContext as ga}from"react";var ya=e=>console.log(`dispatch ${e.type}, have you forgotten to provide a LayoutProvider ?`),_e=ga({dispatchLayoutProvider:ya,version:-1});import{useCallback as ht,useRef as eo}from"react";var ba={},tr=[0,0],xa=(e,t,o)=>{let n=document.createElement("div");n.className="vuuSimpleDraggableWrapper",n.classList.add("vuuSimpleDraggableWrapper","salt-theme","salt-density-medium"),n.dataset.dragging="true";let r=o!=null?o:document.createElement("div");r.id=t,n.appendChild(r),document.body.appendChild(n);let i=`top:${e.top}px;left:${e.left}px;width:${e.width}px;height:${e.height}px;`;return[n,i,e.left,e.top]},Ra=e=>{let{offsetParent:t}=e;if(t===null)return tr;{let{left:o,top:n}=t.getBoundingClientRect();return[o,n]}},or=(e,t)=>{let o=eo(),n=eo(),r=eo(),i=ht((c,p)=>{if(n.current&&r.current){let{dragOffsets:[m,u],targetPosition:d}=n.current,h=typeof c=="number"?c-m:d.left,g=typeof p=="number"?p-u:d.top;(h!==d.left||g!==d.top)&&(n.current.targetPosition.left=h,n.current.targetPosition.top=g,r.current.style.top=g+"px",r.current.style.left=h+"px")}},[]),s=ht(c=>{if(n.current){let{dragInstructions:p,payload:m,originalCSS:u}=n.current;t({type:"drag-drop",draggedReactElement:m,dragInstructions:p,dropTarget:c}),console.log("[useLayoutDragDrop]",{dragInstructions:p}),r.current&&(p.RemoveDraggableOnDragEnd?document.body.removeChild(r.current):(r.current.style.cssText=u,delete r.current.dataset.dragging)),o.current=void 0,n.current=void 0,r.current=void 0}},[]),a=ht(c=>{if(o.current){let{payload:p,dragContainerPath:m,dragElement:u,dragRect:d,instructions:h=ba,path:g}=o.current,{current:y}=e,f={x:c.clientX,y:c.clientY},b=p!=null?p:_(y,g,!0),{id:R}=b.props,E=U(b),w="",x="",v="",T=h,L=-1,M=-1,D=tr,S=document.getElementById(R);if(S===null)[S,x,L,M]=xa(d,R,u),T={...T,RemoveDraggableOnDragEnd:!0};else{D=Ra(S);let[P,C]=D,{width:O,height:N,left:k,top:G}=S.getBoundingClientRect();L=k-P,M=G-C,x=`width:${O}px;height:${N}px;left:${L}px;top:${M}px;z-index: 100;background-color:#ccc;opacity: 0.6;`,S.dataset.dragging="true",w=S.style.cssText}v=Wt.initDrag(e.current,m,d,f,{drag:i,drop:s},E),S.style.cssText=x+v,r.current=S,n.current={payload:b,originalCSS:w,dragRect:d,dragOffsets:D,dragInstructions:h,targetPosition:{left:L,top:M}}}},[i,s,e]);return ht(c=>{let{evt:p,...m}=c;console.log("prepare to drag",{options:m}),o.current={...m,dragContainerPath:""},Wt.handleMousedown(p,a,m.instructions)},[a])};import{jsx as sr}from"react/jsx-runtime";var rr=e=>e.dropTarget,wa=e=>["drag-drop","remove","set-title","splitter-resize","switch-tab"].includes(e.type),Lf=()=>{let e=va();return sr("div",{children:`Context: ${e} `})},Mf=e=>{let{children:t,layout:o,onLayoutChange:n}=e,r=nr(void 0),i=nr(t),[,s]=Sa(null),a=to(m=>{if(n){let u=ie(m,rr)||r.current,h=I(u)==="DraggableLayout"?z(u).children[0]:u,g=On(h);n(g,"drag-root")}},[n]),l=to((m,u=!1)=>{let d=er(r.current,m);d!==r.current&&(r.current=d,s({}),!u&&wa(m)&&a(d))},[a]),c=to(m=>{m.type==="drag-start"?p(m):m.type==="save"?a(r.current):r.current&&l(m)},[l,a]),p=or(r,c);return Ea(()=>{if(o){let m=ie(r.current,rr),u=$o(m),d=ut(o,`${m.props.path}.0`),h=u?{type:Y.REPLACE,target:u,replacement:d}:{type:Y.ADD,path:m.props.path,component:d};l(h,!0)}},[l,o]),r.current===void 0?r.current=Jt(t):t!==i.current&&(r.current=Jt(t,r.current),i.current=t),sr(_e.Provider,{value:{dispatchLayoutProvider:c,version:0},children:r.current})},Z=()=>{let{dispatchLayoutProvider:e}=ir(_e);return e},va=()=>{console.log({LayoutProviderContext:_e});let{version:e}=ir(_e);return e};import{jsx as Ta}from"react/jsx-runtime";var ar=function(t){let{path:o}=t,n=Z(),r=Da(i=>{n({type:Se.SPLITTER_RESIZE,path:o,sizes:i})},[n,o]);return Ta(Zt,{...t,onSplitterMoved:r})};ar.displayName="Flexbox";B("Flexbox",ar,"container");import{useForkRef as il}from"@salt-ds/core";import sl from"classnames";import{forwardRef as al}from"react";import{useCallback as mr,useEffect as Aa,useRef as ro,useState as Ia}from"react";import{useCallback as Pa,useLayoutEffect as lr,useRef as La}from"react";var Uf=["height","width"],Xf=["height"],Yf=["width"],be=new WeakMap,ur=(e,t,o)=>{switch(o){case"height":return t.height;case"scrollHeight":return e.scrollHeight;case"scrollWidth":return e.scrollWidth;case"width":return t.width;default:return 0}},cr=new ResizeObserver(e=>{for(let t of e){let{target:o,contentRect:n}=t,r=be.get(o);if(r){let{onResize:i,measurements:s}=r,a=!1;for(let[l,c]of Object.entries(s)){let p=ur(o,n,l);p!==c&&(a=!0,s[l]=p)}a&&i&&i(s)}}});function gt(e,t,o,n=!1){let r=La(t),i=Pa(s=>{let a=s.getBoundingClientRect();return r.current.reduce((l,c)=>(l[c]=ur(s,a,c),l),{})},[]);lr(()=>{let s=e.current,a=!1;async function l(){be.set(s,{measurements:{}}),a=!1;let{fonts:c}=document;if(c&&await c.ready,!a){let p=be.get(s);if(p){let m=i(s);p.measurements=m,cr.observe(s),n&&o(m)}}}if(s){if(be.has(s))throw Error("useResizeObserver attemping to observe same element twice");l()}return()=>{s&&be.has(s)&&(cr.unobserve(s),be.delete(s),a=!0)}},[e,i]),lr(()=>{let s=e.current,a=be.get(s);if(a){if(r.current!==t){r.current=t;let l=i(s);a.measurements=l}a.onResize=o}},[t,i,e,o])}function Ma(e,t){let o=document.body.querySelector(`.${e}`),n={get:function(r,i){let s=r.getPropertyValue(`--${e}-breakpoint-${i}`);return s?parseInt(s):void 0}};return o?new Proxy(getComputedStyle(o),n):t!=null?t:{}}var Ca=([,e],[,t])=>t-e,no=e=>Object.entries(e).sort(Ca).map(([t,o],n,r)=>[t,o,n<r.length-1?r[n+1][1]:9999]),oo=null,za=(e="salt")=>{let{xs:t,sm:o,md:n,lg:r,xl:i}=Ma(e);return no({xs:t,sm:o,md:n,lg:r,xl:i})},pr=e=>(oo===null&&(oo=za(e)),oo);var Oa=[],dr=({breakPoints:e,smallerThan:t},o)=>{let[n,r]=Ia(t?!1:"lg"),i=ro(document.body),s=ro(e?no(e):pr()),a=ro("lg"),l=mr(p=>{if(s.current){for(let[m,u]of s.current)if(p>=u)return m}},[s]),c=mr(p=>{if(t){let m=s.current.find(([u])=>u===t);if(m){let[,,u]=m;return p<u}}else return l(p);return p},[t,l]);return gt(o||i,s.current?["width"]:Oa,({width:p})=>{let m=c(p);m!==a.current&&(a.current=m,r(m))},!0),Aa(()=>{let p=o||i;if(p.current){let m=a.current;if(s.current){let{clientWidth:u}=p.current,d=c(u);a.current=d,d!==m&&r(d)}}},[r,c,o]),n};import{useCallback as te,useLayoutEffect as fr,useRef as ee,useState as hr}from"react";var ka=["left","right"],Ba=["top","bottom"];function Ge(e,t="width"){let{[t]:o}=e.getBoundingClientRect(),{padRight:n=!1,padLeft:r=!1}=e.dataset,i=getComputedStyle(e),[s,a]=t==="width"?ka:Ba,l=r?0:parseInt(i.getPropertyValue(`margin-${s}`),10),c=n?0:parseInt(i.getPropertyValue(`margin-${a}`),10),p=o;if(parseInt(i.getPropertyValue("flex-shrink"),10)>0){let u=parseInt(i.getPropertyValue("flex-basis"),10);isNaN(u)||(p=u)}return l+p+c}var Na={horizontal:["width","scrollHeight"],vertical:["height","scrollWidth"],none:[]},Ha={},xr={},$a='[data-collapsible="dynamic"]:not([data-collapsed="true"]):not([data-collapsing="true"])',io=(e,t)=>e+t.size,gr=(e,t)=>e+(t.isOverflowIndicator?0:t.size),Fa=e=>{for(let t=e.length-1;t>=0;t--){let o=e[t];if(!o.isOverflowIndicator)return o}return null},De=1e3,Va=e=>e>0&&e<1e3,ao=e=>e>=De,so=e=>e.current[e.current.length-1],Wa=e=>e.some(t=>t.collapsed&&t.fullWidth===null),_a=e=>e.current.querySelector($a)!==null,yr=(e,t)=>{let o=Fa(e.current);return o?(e.current=e.current.filter(n=>n!==o),t.current=t.current.concat(o),o):null},Rr=(e,t)=>{let o=e.priority-t.priority;return o===0&&(o=e.index-t.index),o},br=e=>e.current.find(t=>t.isOverflowIndicator),Ga={horizontal:{size:"clientWidth",depth:"clientHeight",scrollDepth:"scrollHeight"},vertical:{size:"clientHeight",depth:"clientWidth",scrollDepth:"scrollWidth"}},Ua=({current:e},t="horizontal")=>{let o=Ga[t],{[o.depth]:n}=e.parentNode,{[o.scrollDepth]:r,[o.size]:i}=e;return[n<r,i,n]},Xa=()=>{let[,e]=hr(null),[t,o]=hr(0),n=ee(0),r=te(s=>{o(n.current=s)},[o]),i=te((s,a)=>{Math.abs(s)===De?s>0&&!ao(n.current)||s<0&&ao(n.current)?r(n.current+s):e({}):s!==0?r(n.current+s):a&&e({})},[e,n,r]);return[n,t,i]},Ya=({current:e},t)=>Array.from(e.childNodes).reduce((n,r)=>{var u;let{collapsible:i,collapsed:s,collapsing:a,index:l,priority:c="1",overflowIndicator:p,overflowed:m}=(u=r==null?void 0:r.dataset)!=null?u:xr;if(l){let d=Ge(r,t);m&&delete r.dataset.overflowed,n.push({collapsible:i,collapsed:i?s==="true":void 0,collapsing:a,fullSize:null,index:parseInt(l,10),isOverflowIndicator:p,label:r.title||r.innerText,priority:parseInt(c,10),size:d})}return n},[]).sort(Rr),Q=(e,t)=>e.current.querySelector(`:scope > [data-idx='${t.index}']`);function sh(e="horizontal",t=""){let o=ee(null),[n,r,i]=Xa(),s=ee([]),a=ee([]),l=ee([]),c=ee(!1),p=ee(null),m=ee(null),u=ee(e==="horizontal"),d=ee(36),h=ee(0),g=te(T=>{let L=u.current;if(T===void 0){let D=L?"width":"height";({[D]:T}=o.current.getBoundingClientRect())}h.current=T;let M=L?"minWidth":"minHeight";o.current.style[M]=T+"px"},[o]),y=te((T,L)=>{let M=0;if(s.current.some(D=>D.collapsible&&!D.collapsed))for(let D=s.current.length-1;D>=0;D--){let S=s.current[D];if(S.collapsible==="instant"&&!S.collapsed){S.collapsed=!0;let P=Q(o,S);return P.dataset.collapsed=!0,l.current.push(S),1}else if(S.collapsible==="dynamic"&&!S.collapsed&&!S.collapsing){S.collapsing=!0;let P=Q(o,S);return P.dataset.collapsing=!0,l.current.push(S),o.current.dataset.collapsing=!0,1}}for(;T>L;){let D=yr(s,a);if(D===null){g(T);break}T-=D.size;let S=Q(o,D);S.dataset.overflowed=!0,M=De}return M},[g]),f=te(T=>{let L=0,M=s.current.reduce(gr,0),D=T-M;if(Va(n.current)){for(;l.current.length;){let S=so(l),P=S.fullSize-S.size;if(D>=P){S.collapsed=!1,S.size=S.fullSize,delete S.fullSize;let C=Q(o,S);l.current.pop(),delete C.dataset.collapsed,D=D-P,L+=1}else break}return L}else for(;a.current.length>0;){let{size:S}=so(a);if(D>=S){let{size:P=0}=br(s)||Ha;if(a.current.length===1||D>=S+P){let C=yr(a,s);M+=C.size;let O=Q(o,C);delete O.dataset.overflowed,D=D-C.size,L=De}else break}else break}return L},[n]),b=te(()=>{let L=s.current.reduce(io,0)-m.current;for(let M=s.current.length-1;M>=0;M--){let D=s.current[M];if(D.collapsible&&!D.collapsed){let S=Q(o,D);if(L>D.size-36)S.dataset.collapsed=D.collapsed=!0,L-=D.size;else{S.dataset.collapsing=D.collapsing=!0;break}}}},[m,o,s]),R=te((T,L)=>{L.dataset.collapsing=T.collapsing=!1,L.dataset.collapsed=T.collapsed=!0;let D=s.current.filter(({collapsible:S,collapsed:P})=>S==="dynamic"&&!P).pop();if(D){let S=Q(o,D);S.dataset.collapsing=D.collapsing=!0}else g()},[g]),E=te((T,L)=>{L.dataset.collapsing=T.collapsing=!1},[]),w=te(T=>{let L=s.current.find(({collapsible:P,collapsing:C})=>P==="dynamic"&&C),M=s.current.find(({collapsible:P,collapsed:C})=>P==="dynamic"&&C);if(L===void 0&&M===void 0)return;if(L===void 0){let P=Q(o,M);P.dataset.collapsed=M.collapsed=!1,P.dataset.collapsing=M.collapsing=!0;return}let D=Q(o,L),S=u.current?"width":"height";if(T&&M){let P=Ge(D,S);M&&P===L.size&&E(L,D)}else{let{[S]:P}=D.getBoundingClientRect(),C=getComputedStyle(D),O=parseInt(C.getPropertyValue(`min-${S}`));P===O&&R(L,D)}},[R,E]),x=te(()=>{let[T,L,M]=Ua(o,e);m.current=L,p.current=M;let D=_a(o);if(D||T){let S=u.current?"width":"height",P=Ya(o,S);s.current=P,a.current=[]}if(D)if(c.current=!0,o.current.dataset.collapsing=!0,T)b();else{let S=so(s),P=Q(o,S);P.dataset.collapsing=S.collapsing=!0}else if(T){let S=s.current.reduce(gr,0),P=y(S,L-d.current);i(+P)}},[b,y,e,i]),v=te(({scrollHeight:T,height:L=T,scrollWidth:M,width:D=M})=>{let[S,P]=u.current?[D,L]:[L,D],C=n.current===0,O=P>p.current,N=S>m.current;if(m.current=S,!(N&&S===h.current)){if(c.current)w(N);else if(!C&&N){let k=f(S);k!==De||a.current.length===0?i(-k):k===De&&i(0,!0)}else if(C&&O)x();else if(!C&&O){let k=s.current.reduce(io,0);if(S<k){let G=y(k,S);i(+G)}}}},[w,f,x,y,n,i]);return fr(()=>{var L;let T=u.current?"width":"height";if(Wa(s.current)){let[M]=s.current.filter(D=>D.collapsed);if(M.fullSize===null){let D=Q(o,M);if(D){let S=Ge(D,T);M.fullSize=M.size,M.size=S;let P=s.current.reduce(io,0);if(P>m.current){let C=y(P,m.current-d.current);i(+C)}}}}else if(ao(r)){let M=o.current.querySelector(":scope > [data-overflow-indicator='true']");if(M){let{index:D,priority:S="1"}=(L=M==null?void 0:M.dataset)!=null?L:xr,P={index:parseInt(D,10),isOverflowIndicator:!0,priority:parseInt(S,10),label:M.innerText,size:Ge(M,T)};d.current=P.size,s.current=s.current.concat(P).sort(Rr)}}else br(s)&&(s.current=s.current.filter(M=>!M.isOverflowIndicator))},[y,r,o,i,s]),fr(()=>{async function T(){await document.fonts.ready,o.current!==null&&x()}e!=="none"&&T()},[t,e,x]),gt(o,Na[e],v),[o,a.current,l.current,x]}var Er="data-collapsible",Za={[Er]:!0,"data-pad-start":!0,"data-pad-end":!0},qa=e=>{var t;return(t=Za[e])!=null?t:!1},Ja=e=>e===Er,Ka={dynamic:"dynamic",instant:"instant",true:"instant"},ja=e=>{var t;return(t=Ka[e])!=null?t:"none"},lh=e=>Object.keys(e).reduce((t,o)=>{let[n,r]=t;if(qa(o)){let i=Ja(o)?ja(e[o]):e[o];n[o]=i,r[o]=void 0}return t},[{},{}]);import{cloneElement as Qa,isValidElement as el,useCallback as tl,useMemo as Sr,useRef as lo}from"react";import{getUniqueId as ol}from"@vuu-ui/vuu-utils";var nl=["xs","sm","md","lg","xl"],rl=12,wr=({children:e,cols:t,style:o})=>{let n=lo(null),r=lo(null),i=lo(),s=t!=null?t:rl,l=(o==null?void 0:o.flexDirection)==="column"?"height":"width",c=Sr(()=>Array.isArray(e)?e:el(e)?[e]:[],[e]),p=tl((m,u)=>{let d=at(m,u,nl),h=[],g=[];for(let y=0;y<m.length;y++){let f=m[y],{style:{flex:b,...R}}=f.props;h.push(Qa(f,{key:ol(),style:{...R,"--parent-col-count":s}})),g.push(d[y])}return[h,g]},[s]);return Sr(()=>{let[m,u]=p(c,l);r.current=u,i.current=m},[p,c,l]),{cols:s,content:i.current,rootRef:n}};import{jsx as ll}from"react/jsx-runtime";var yt="hwFluidGrid",co=al(function(t,o){let{breakPoints:n,children:r,column:i,cols:s=12,className:a,flexFill:l,gap:c=3,fullPage:p,id:m,onSplitterMoved:u,resizeable:d,row:h,showGrid:g,spacing:y,splitterSize:f,style:b,...R}=t,{cols:E,content:w,rootRef:x}=wr({children:r,cols:s,style:b}),v=dr({breakPoints:n},x),T=sl(yt,a,{[`${yt}-column`]:i,[`${yt}-row`]:h,[`${yt}-show-grid`]:g,"flex-fill":l,"full-page":p}),L={...b,"--spacing":y,"--grid-col-count":E,"--grid-gap":c};return ll("div",{...R,className:T,"data-breakpoint":v,"data-cols":E,"data-resizeable":d||void 0,id:m,ref:il(x,o),style:L,children:w})});co.displayName="FluidGrid";import{jsx as cl}from"react/jsx-runtime";var vr=function(t){return cl(co,{...t})};vr.displayName="FluidGrid";B("FluidGrid",vr,"container");import Sl from"classnames";import wl,{useRef as vl,useState as kr}from"react";import ul,{useContext as Dr}from"react";var pl={dispatch:null},bt=ul.createContext(pl),Tr=()=>{var t;let e=Dr(bt);return(t=e==null?void 0:e.dispatch)!=null?t:null},Gh=()=>Dr(bt);import{useForkRef as gl,useIdMemo as yl}from"@salt-ds/core";import bl from"classnames";import po,{forwardRef as xl,useMemo as Rl,useRef as Ar}from"react";import{useCallback as xe,useMemo as Pr}from"react";import{useCallback as Ue,useState as ml}from"react";var xt=(e,t,o,n)=>{var y;let{loadSessionState:r,purgeSessionState:i,purgeState:s,saveSessionState:a}=ve(),[l,c]=ml((y=r(e,"contributions"))!=null?y:[]),p=Z(),m=Ue((f,b)=>{let R=l.concat([{location:f,content:b}]);a(e,"contributions",R),c(R)},[l,e,a]),u=Ue(()=>{i(e,"contributions"),c([])},[e,i]),d=Ue(()=>{let f=r(e,"data-source");f&&f.unsubscribe(),i(e),s(e),p({type:"remove",path:o})},[p,e,r,i,s,o]),h=Ue(async(f,b,R)=>{var w;f.stopPropagation();let E=(w=t.current)==null?void 0:w.getBoundingClientRect();return new Promise((x,v)=>{p({type:"drag-start",evt:f,path:b===void 0?o:`${o}.${b}`,dragRect:E,preDragActivity:R,dropTargets:n,resolveDragStart:x,rejectDragStart:v})})},[t,p,o,n]);return[Ue(async(f,b)=>{var E;let{type:R}=f;switch(R){case"maximize":case"minimize":case"restore":return p({type:R,path:(E=f.path)!=null?E:o});case"remove":return d();case"mousedown":return console.log("2) ViewActionDispatch Hook dispatch Action mousedown"),h(b,f.index,f.preDragActivity);case"add-toolbar-contribution":return m(f.location,f.content);case"remove-toolbar-contribution":return u();default:return}},[p,o,d,h,m,u]),l]};var Lr=({id:e,rootRef:t,path:o,dropTargets:n,title:r})=>{let i=Z(),{loadState:s,loadSessionState:a,purgeState:l,saveState:c,saveSessionState:p}=ve(),[m,u]=xt(e,t,o,n),d=Pr(()=>{var x;return(x=s("view-title"))!=null?x:r},[s,r]),h=xe(x=>{o&&i({type:"set-title",path:o,title:x})},[i,o]),g=Pr(()=>s(e),[e,s]),y=xe(x=>s(e,x),[e,s]),f=xe(x=>{l(e,x),i({type:"save"})},[e,l]),b=xe((x,v)=>{c(e,v,x),i({type:"save"})},[e,i,c]),R=xe(x=>a(e,x),[e,a]),E=xe((x,v)=>p(e,v,x),[e,p]),w=xe(({type:x,...v})=>{let{[x]:T}=v;b(T,x)},[b]);return{contributions:u,dispatchViewAction:m,load:y,loadSession:R,onConfigChange:w,onEditTitle:h,purge:f,restoredState:g,save:b,saveSession:E,title:d}};import{useResizeObserver as dl,WidthHeight as fl}from"@heswell/salt-lab";import{useCallback as Mr,useRef as Cr}from"react";var hl=[],zr=({mainRef:e,resize:t="responsive",rootRef:o})=>{let n=t==="defer",r=Cr({}),i=Cr(),s=Mr(()=>{e.current&&(e.current.style.height=r.current.height+"px",e.current.style.width=r.current.width+"px"),i.current=void 0},[]),a=Mr(({height:l,width:c})=>{r.current.height=l,r.current.width=c,i.current!==null&&clearTimeout(i.current),i.current=window.setTimeout(s,40)},[s]);dl(o,n?fl:hl,a,n)};import{jsx as uo,jsxs as El}from"react/jsx-runtime";var Ir=xl(function(t,o){let{children:n,className:r,collapsed:i,closeable:s,"data-resizeable":a,dropTargets:l,expanded:c,flexFill:p,id:m,header:u,orientation:d="horizontal",path:h,resize:g="responsive",resizeable:y=a,tearOut:f,style:b={},title:R,...E}=t,w=yl(m),x=Ar(null),v=Ar(null),{contributions:T,dispatchViewAction:L,load:M,loadSession:D,onConfigChange:S,onEditTitle:P,purge:C,restoredState:O,save:N,saveSession:k,title:G}=Lr({id:w,rootRef:x,path:h,dropTargets:l,title:R});zr({mainRef:v,resize:g,rootRef:x});let Pe="vuuView",Jr=()=>po.isValidElement(n)&&O?po.cloneElement(n,O):n,Kr=Rl(()=>({dispatch:L,id:w,path:h,title:G,load:M,loadSession:D,onConfigChange:S,purge:C,save:N,saveSession:k}),[L,w,M,D,S,h,C,N,k,G]),jr=typeof u=="object"?u:{};return uo("div",{...E,className:bl(Pe,r,{[`${Pe}-collapsed`]:i,[`${Pe}-expanded`]:c,[`${Pe}-resize-defer`]:g==="defer"}),"data-resizeable":y,id:w,ref:gl(o,x),style:b,tabIndex:-1,children:El(bt.Provider,{value:Kr,children:[u?uo(Or,{...jr,collapsed:i,contributions:T,expanded:c,closeable:s,onEditTitle:P,orientation:d,tearOut:f,title:G}):null,uo("div",{className:`${Pe}-main`,ref:v,children:Jr()})]})})});Ir.displayName="View";var me=po.memo(Ir);me.displayName="View";B("View",me,"view");import{EditableLabel as Dl,Toolbar as Tl,ToolbarButton as Pl,ToolbarField as Ll,Tooltray as Br}from"@heswell/salt-lab";import{CloseIcon as Ml}from"@salt-ds/icons";import{jsx as Te,jsxs as Cl}from"react/jsx-runtime";var Or=({className:e,contributions:t,collapsed:o,expanded:n,closeable:r,onEditTitle:i,orientation:s="horizontal",style:a,tearOut:l,title:c="Untitled"})=>{let p=vl(null),[m,u]=kr(c),[d,h]=kr(!1),g=Tr(),y=(C,O)=>g==null?void 0:g({type:O},C),f=C=>g==null?void 0:g({type:"remove"},C),b="vuuHeader",R=C=>{var O;(O=p.current)==null||O.focus()},E=C=>{C.stopPropagation()},x=Sl(b,e,`${b}-${o||s}`),v=()=>{h(!0)},T=C=>{C.key==="Enter"&&h(!0)},L=(C="",O="",N=!0,k=!1)=>{var G;h(!1),k?u(C):O!==C&&(u(O),i==null||i(O)),N===!1&&((G=p.current)==null||G.focus())},M=C=>{g==null||g({type:"mousedown"},C)},D=[],S=[],P=[];return c&&D.push(Te(Ll,{className:"vuuHeader-title",children:Te(Dl,{editing:d,value:m,onChange:u,onMouseDownCapture:R,onEnterEditMode:v,onExitEditMode:L,onKeyDown:T,ref:p,tabIndex:0},"title")},"title")),t==null||t.forEach((C,O)=>{S.push(wl.cloneElement(C.content,{key:O}))}),r&&P.push(Cl(Pl,{onClick:f,onMouseDown:E,children:[Te(Ml,{})," Close"]},"close")),S.length>0&&D.push(Te(Br,{"data-align-end":!0,children:S},"contributions")),P.length>0&&D.push(Te(Br,{"data-align-end":!0,children:P},"actions")),Te(Tl,{className:x,orientation:s,style:a,onMouseDown:M,children:D})};import{List as zl,ListItem as Al}from"@heswell/salt-lab";import{uuid as Il}from"@vuu-ui/vuu-utils";import Nr from"classnames";import{cloneElement as Ol,memo as kl}from"react";import{jsx as mo}from"react/jsx-runtime";var Bl=e=>{let t=e.cloneNode(!0);return t.id="",delete t.dataset.idx,t},Hr=kl(({className:e,children:t,idx:o,resizeable:n,header:r,closeable:i,...s})=>mo(Al,{className:Nr("vuuPaletteItem",e),"data-icon":"grab-handle",...s}));Hr.displayName="PaletteItem";var Nl=({children:e,className:t,orientation:o="horizontal",...n})=>{let r=Z(),i="vuuPalette";function s(a){var x;let c=a.target.closest(".vuuPaletteItem"),p=parseInt((x=c.dataset.idx)!=null?x:"-1");p!==-1&&console.log({children:e,idx:p,listItemElement:c});let{props:{caption:m,children:u,template:d,...h}}=e[p],{height:g,left:y,top:f,width:b}=c.getBoundingClientRect(),R=Il(),w=d?u:mo(me,{...{id:R,key:R},...h,title:h.label,children:u});r({dragRect:{left:y,top:f,right:y+b,bottom:f+150,width:b,height:g},dragElement:Bl(c),evt:a.nativeEvent,instructions:{DoNotRemove:!0,DoNotTransform:!0,RemoveDraggableOnDragEnd:!0,dragThreshold:10},path:"*",payload:w,type:"drag-start"})}return mo(zl,{...n,borderless:!0,className:Nr(i,t,`${i}-${o}`),maxHeight:800,selected:null,children:e.map((a,l)=>a.type===Hr?Ol(a,{key:l,onMouseDown:s}):a)})};B("Palette",Nl,"view");import{List as Hl,ListItem as $l}from"@heswell/salt-lab";import{uuid as Fl}from"@vuu-ui/vuu-utils";import Vl from"classnames";import{jsx as fo}from"react/jsx-runtime";var Wl="vuuPalette",by=e=>{let{children:t,ViewProps:o,label:n,onMouseDown:r,template:i,...s}=e,a=Z();return fo($l,{onMouseDown:c=>{let{left:p,top:m,width:u}=c.currentTarget.getBoundingClientRect(),d=Fl(),g=i?t:fo(me,{...{id:d,key:d},...o,title:e.label,children:t});a({type:"drag-start",evt:c.nativeEvent,path:"*",payload:g,instructions:{DoNotRemove:!0,DoNotTransform:!0,RemoveDraggableOnDragEnd:!0,dragThreshold:10},dragRect:{left:p,top:m,right:p+u,bottom:m+150,width:u,height:100}})},...s,children:n})},_l=({className:e,...t})=>fo(Hl,{...t,className:Vl(Wl,e),height:"100%",selectionStrategy:"none"});B("PaletteSalt",_l,"view");import{useIdMemo as Gl}from"@salt-ds/core";import Ul from"classnames";import{Tab as Xl,Tabstrip as Yl,Toolbar as Zl,ToolbarField as ql}from"@heswell/salt-lab";import Et,{forwardRef as Jl,useCallback as Kl}from"react";import{jsx as Rt,jsxs as tc}from"react/jsx-runtime";var $r="Tabs",jl=(e,t)=>{},Ql=(e,t)=>{var o,n;return(n=(o=e.props)==null?void 0:o.title)!=null?n:`Tab ${t+1}`},ec=e=>{let t=[];return Et.Children.forEach(e,o=>{Et.isValidElement(o)?t.push(o):console.warn("Stack has unexpected child element type")}),t},ho=Jl(function({active:t=0,children:o,className:n,enableAddTab:r,enableCloseTabs:i,getTabIcon:s=jl,getTabLabel:a=Ql,id:l,keyBoardActivation:c="manual",onMouseDown:p,onTabAdd:m,onTabClose:u,onTabEdit:d,onTabSelectionChanged:h,showTabs:g,style:y,TabstripProps:f},b){var S;let R=Gl(l),E=P=>{h==null||h(P)},w=P=>{u==null||u(P)},x=()=>{m==null||m(Et.Children.count(o))},v=P=>{var k;let O=P.target.closest('[role^="tab"]'),N=O==null?void 0:O.getAttribute("role");if(N==="tab"){let G=parseInt((k=O.dataset.idx)!=null?k:"-1");if(G!==-1)p==null||p(P,G);else throw Error("Stack: mousedown on tab with unknown index")}else N==="tablist"&&console.log("Stack mousedown on tabstrip")},T=Kl((P,C,O,N)=>{d==null||d(N,C)},[d]),L=()=>{var P;return Et.isValidElement(o)?o:Array.isArray(o)&&(P=o[t])!=null?P:null},M=()=>ec(o).map((P,C)=>{let O=`${R}-${C}`,{closeable:N,id:k}=P.props;return Rt(Xl,{ariaControls:`${O}-tab`,"data-icon":s(P,C),draggable:!0,id:O,label:a(P,C),closeable:N,editable:(f==null?void 0:f.enableRenameTab)!==!1},k!=null?k:C)}),D=L();return tc("div",{className:Ul($r,n,{[`${$r}-horizontal`]:(f==null?void 0:f.orientation)==="vertical"}),style:y,id:R,ref:b,children:[g?Rt(Zl,{className:"vuuTabHeader vuuHeader",orientation:f==null?void 0:f.orientation,children:Rt(ql,{disableFocusRing:!0,"data-collapsible":"dynamic","data-priority":"3",style:{alignSelf:"flex-end"},children:Rt(Yl,{...f,enableRenameTab:(f==null?void 0:f.enableRenameTab)!==!1,enableAddTab:r,enableCloseTab:i,keyBoardActivation:c,onActiveChange:E,onAddTab:x,onCloseTab:w,onExitEditMode:T,onMouseDown:v,activeTabIndex:(S=f==null?void 0:f.activeTabIndex)!=null?S:D===null?-1:t,children:M()})})}):null,D]})});ho.displayName="Stack";import{useIdMemo as oc}from"@salt-ds/core";import nc,{useRef as rc}from"react";import{jsx as go}from"react/jsx-runtime";var ic=e=>go(me,{resizeable:!0,title:`Tab ${e}`,style:{flexGrow:1,flexShrink:0,flexBasis:0},header:!0,closeable:!0,children:go(Lt,{style:{flex:1}})}),Fr=e=>{let t=rc(null),o=Z(),{loadState:n,saveState:r}=ve(),{createNewChild:i=ic,id:s,onTabSelectionChanged:a,path:l,...c}=e,{children:p}=e,m=oc(s),[u]=xt(m,t,l);return go(ho,{...c,id:m,getTabLabel:(R,E)=>{let{id:w,title:x}=R.props;return n(w,"view-title")||x||`Tab ${E+1}`},onMouseDown:async(R,E)=>{let w;await u({type:"mousedown",index:E,preDragActivity:async()=>new Promise(T=>{console.log("preDragActivity: Ok, gonna release the drag"),w=T})},R)&&(w==null||w(void 0))},onTabAdd:(R,E=nc.Children.count(p))=>{if(l){console.log("[StackLayout] handleTabAdd");let w=i(E);console.log({component:w}),o({type:"add",path:l,component:w})}},onTabClose:R=>{if(Array.isArray(p)){let{props:{"data-path":E,path:w=E}}=p[R];o({type:"remove",path:w})}},onTabEdit:(R,E)=>{o({type:"set-title",path:`${l}.${R}`,title:E})},onTabSelectionChanged:R=>{console.log(`StackLayout handleTabSelection nextTab = ${R}`),l&&(o({type:"switch-tab",path:l,nextIdx:R}),a==null||a(R))},ref:t})};Fr.displayName="Stack";B("Stack",Fr,"container");import Vr,{useState as Wr}from"react";import{jsx as yo,jsxs as _r}from"react/jsx-runtime";var rb=({children:e})=>{let[o,n]=Wr(e),[r,i]=Wr(e),s=l=>{let c=Fo(o,l);i(c)},a=(l,c)=>{console.log(`change ${l} -> ${c}`);let p=Vr.cloneElement(r,{style:{...r.props.style,[l]:c}});i(p),n(Vr.cloneElement(o,null,p))};return _r("div",{"data-design-mode":`${!1}`,children:[o,yo("br",{}),_r("div",{style:{display:"flex"},children:[yo(Gr,{height:300,managedStyle:r.props.style,width:300,onChange:a}),yo(Ur,{layout:o,onSelect:s,style:{width:300,height:300,backgroundColor:"#ccc"}})]})]})};import{FormField as St,Input as wt}from"@heswell/salt-lab";import{jsx as $,jsxs as xo}from"react/jsx-runtime";var Ro={},sc={margin:{top:"marginTop",right:"marginRight",bottom:"marginBottom",left:"marginLeft"},border:{top:"borderTopWidth",right:"borderRightWidth",bottom:"borderBottomWidth",left:"borderLeftWidth"},padding:{top:"paddingTop",right:"paddingRight",bottom:"paddingBottom",left:"paddingLeft"}},bo=({feature:e,children:t,style:o,onChange:n})=>xo("div",{className:`LayoutBox layout-${e} layout-outer`,children:[xo("div",{className:"layout-top",children:[$("span",{className:"layout-title",children:e}),$(St,{className:"layout-input",style:{width:30},children:$(wt,{value:o.top,onChange:(r,i)=>n(e,"top",i)})})]}),xo("div",{className:"layout-inner",children:[$("div",{className:"layout-left",children:$(St,{className:"layout-input",style:{width:30},children:$(wt,{value:o.left,onChange:(r,i)=>n(e,"left",i)})})}),t,$("div",{className:"layout-right",children:$(St,{className:"layout-input",style:{width:30},children:$(wt,{value:o.right,onChange:(r,i)=>n(e,"right",i)})})})]}),$("div",{className:"layout-bottom",children:$(St,{className:"layout-input",style:{width:30},children:$(wt,{value:o.bottom,onChange:(r,i)=>n(e,"bottom",i)})})})]}),db={margin:!0,marginTop:!0,marginRight:!0,marginBottom:!0,marginLeft:!0},fb={padding:!0,paddingTop:!0,paddingRight:!0,paddingBottom:!0,paddingLeft:!0},hb={border:!0,borderColor:!0,borderWidth:!0,borderTopWidth:!0,borderRightWidth:!0,borderBottomWidth:!0,borderLeftWidth:!0},vt="(\\d+)(?:px)?",ac=`^(?:${vt}(?:\\s${vt}(?:\\s${vt}(?:\\s${vt})?)?)?)$`,Xr=new RegExp(ac),lc=/^(?:(\d+)(?:px)\ssolid\s([a-zA-Z,0-9().]+))$/,Gr=({height:e,managedStyle:t,onChange:o,style:n,width:r})=>{let i=Yr(t),s=(R,E,w)=>{let x=parseInt(w||"0",10),v=sc[R][E];o(v,x)},{marginTop:a=0,marginRight:l=0,marginBottom:c=0,marginLeft:p=0}=i,{borderTopWidth:m=0,borderRightWidth:u=0,borderBottomWidth:d=0,borderLeftWidth:h=0}=i,{paddingTop:g=0,paddingRight:y=0,paddingBottom:f=0,paddingLeft:b=0}=i;return $("div",{className:"LayoutConfigurator",style:{width:r,height:e,...n},children:$(bo,{feature:"margin",style:{top:a,right:l,bottom:c,left:p},onChange:s,children:$(bo,{feature:"border",style:{top:m,right:u,bottom:d,left:h},onChange:s,children:$(bo,{feature:"padding",style:{top:g,right:y,bottom:f,left:b},onChange:s,children:$("div",{className:"layout-content"})})})})})};function gb(e=Ro,t=Ro){let{margin:o,marginTop:n,marginRight:r,marginBottom:i,marginLeft:s,padding:a,paddingTop:l,paddingRight:c,paddingBottom:p,paddingLeft:m,...u}=e;if(typeof o=="number")u.marginTop=u.marginRight=u.marginBottom=u.marginLeft=o;else if(typeof o=="string"){let d=Xr.exec(o);if(d===null)console.error(`Invalid css value for margin '${o}'`);else{let[,h,g,y,f]=d,b=h&&g&&y;b&&f?(u.marginTop=parseInt(h,10),u.marginRight=parseInt(g,10),u.marginBottom=parseInt(y,10),u.marginLeft=parseInt(f,10)):b?(u.marginTop=parseInt(h,10),u.marginRight=u.marginLeft=parseInt(g,10),u.marginBottom=parseInt(y,10)):h&&g?(u.marginTop=u.marginBottom=parseInt(h,10),u.marginRight=u.marginLeft=parseInt(g,10)):u.marginTop=u.marginRight=u.marginBottom=u.marginLeft=parseInt(h,10)}}if(typeof n=="number"&&(u.marginTop=n),typeof r=="number"&&(u.marginRight=r),typeof i=="number"&&(u.marginBottom=i),typeof s=="number"&&(u.marginLeft=s),typeof a=="number")u.paddingTop=u.paddingRight=u.paddingBottom=u.paddingLeft=a;else if(typeof a=="string"){let d=Xr.exec(a);if(d===null)console.error(`Invalid css value for padding '${a}'`);else{let[,h,g,y,f]=d,b=h&&g&&y;b&&f?(u.paddingTop=parseInt(h,10),u.paddingRight=parseInt(g,10),u.paddingBottom=parseInt(y,10),u.paddingLeft=parseInt(f,10)):b?(u.paddingTop=parseInt(h,10),u.paddingRight=u.paddingLeft=parseInt(g,10),u.paddingBottom=parseInt(y,10)):h&&g?(u.paddingTop=u.paddingBottom=parseInt(h,10),u.paddingRight=u.paddingLeft=parseInt(g,10)):u.paddingTop=u.paddingRight=u.paddingBottom=u.paddinggLeft=parseInt(h,10)}}return typeof l=="number"&&(u.paddingTop=l),typeof c=="number"&&(u.paddingRight=c),typeof p=="number"&&(u.paddingBottom=p),typeof m=="number"&&(u.paddingLeft=m),Yr(u,t)}function Yr(e=Ro){let t={...e},o,{border:n,borderWidth:r,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:a,borderLeftWidth:l,borderColor:c,margin:p,marginTop:m,marginRight:u,marginBottom:d,marginLeft:h,padding:g,paddingTop:y,paddingRight:f,paddingBottom:b,paddingLeft:R,...E}=t,w={},x={};if(typeof p=="number"&&(t.marginTop=t.marginRight=t.marginBottom=t.marginLeft=p,w={marginTop:p,marginRight:p,marginBottom:p,marginLeft:p}),typeof g=="number"&&(t.paddingTop=t.paddingRight=t.paddingBottom=t.paddingLeft=g,x={paddingTop:g,paddingRight:g,paddingBottom:g,paddingLeft:g}),n||r||i||s||a||l){typeof n=="string"&&(o=lc.exec(n))&&([,r,c]=o,r=parseInt(r,10)),r&&(i=i===void 0?r:i,s=s===void 0?r:s,a=a===void 0?r:a,l=l===void 0?r:l),c=c||"black";let v=`
|
|
18
|
+
${c} ${l||0}px ${i||0}px 0 0 inset,
|
|
19
|
+
${c} ${-s||0}px ${-a||0}px 0 0 inset`;return{...E,...w,...x,borderTopWidth:i,borderRightWidth:s,borderBottomWidth:a,borderLeftWidth:l,borderColor:c,borderStyle:"solid",boxShadow:v}}else return t}import cc from"react";import uc from"classnames";import{Tree as pc}from"@heswell/salt-lab";import{jsx as Zr}from"react/jsx-runtime";var mc="hwLayoutTreeViewer",qr=(e,t="0")=>({label:I(e),path:t,childNodes:cc.Children.map(e.props.children,(o,n)=>qr(o,t?`${t}.${n}`:`${n}`))}),Ur=({layout:e,onSelect:t,style:o})=>{let n=[qr(e)],r=(i,[{path:s}])=>{t(s)};return Zr("div",{className:uc(mc),style:o,children:Zr(pc,{source:n,groupSelection:"single",onSelectionChange:r})})};export{Se as Action,hb as BORDER_STYLES,ai as Chest,Lt as Component,oe as ComponentRegistry,rb as ConfigWrapper,gu as Dialog,Wt as Draggable,No as DraggableLayout,Dt as Drawer,on as DropMenu,le as DropTarget,Zt as Flexbox,ar as FlexboxLayout,co as FluidGrid,vr as FluidGridLayout,Or as Header,Xf as HeightOnly,Gr as LayoutConfigurator,Mf as LayoutProvider,_e as LayoutProviderContext,Lf as LayoutProviderVersion,Ur as LayoutTreeViewer,db as MARGIN_STYLES,fb as PADDING_STYLES,Nl as Palette,Hr as PaletteItem,by as PaletteListItem,_l as PaletteSalt,it as Placeholder,ho as Stack,Fr as StackLayout,me as View,bt as ViewContext,Uf as WidthHeight,Yf as WidthOnly,gb as XXXnormalizeStyles,Vo as componentFromLayout,tn as computeMenuPosition,Mi as containerOf,Ct as expandFlex,lh as extractResponsiveProps,ie as findTarget,_ as followPath,Fo as followPathToComponent,re as followPathToParent,Ci as getChild,$o as getChildProp,Mn as getPersistentState,A as getProp,z as getProps,Cn as hasPersistentState,kt as identifyDropTarget,F as isContainer,Po as isLayoutComponent,vc as isRegistered,qa as isResponsiveAttribute,cp as isTabstrip,Au as isTypeOf,ni as isView,$u as nextLeaf,q as nextStep,Fu as previousLeaf,B as registerComponent,H as resetPath,zn as setPersistentState,Uu as setRef,I as typeOf,dr as useBreakpoints,Z as useLayoutProviderDispatch,va as useLayoutProviderVersion,sh as useOverflowObserver,ve as usePersistentState,gt as useResizeObserver,xt as useViewActionDispatcher,Gh as useViewContext,Tr as useViewDispatch};
|
|
20
|
+
//# sourceMappingURL=index.js.map
|