efficient-shell 4.149.0 → 4.151.0
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 +62 -0
- package/dist/{Browser-X7A3FHG7.js → Browser-4KP2EJ6P.js} +14 -14
- package/dist/Calculator-7DABIXU2.js +29 -0
- package/dist/ConfirmDialog-RT2NZKCU.js +1 -0
- package/dist/{CurrencyConverter-KWNYRYOZ.js → CurrencyConverter-QYYYKDMG.js} +6 -6
- package/dist/{Documents-UGRUMAU6.js → Documents-OKKZEZXI.js} +15 -15
- package/dist/{Files-2QJVZTEH.js → Files-KYP3GPFG.js} +82 -82
- package/dist/{Notepad-RPB76OQY.js → Notepad-PFP4FBTH.js} +11 -11
- package/dist/PdfViewer-TO5NCBES.js +1 -0
- package/dist/{PomodoroTimer-EOQDA5J7.js → PomodoroTimer-UITFAFW5.js} +33 -33
- package/dist/{Preview-BNEOTMJL.js → Preview-QEUH2XB5.js} +14 -14
- package/dist/Sidebar-RHD3UIDL.js +44 -0
- package/dist/{Spreadsheet-XWOKXVPA.js → Spreadsheet-3XQFNZBQ.js} +13 -13
- package/dist/{Stock-VVM7GK4C.js → Stock-7XHWH3QY.js} +3 -3
- package/dist/{Weather-4LJTQLDL.js → Weather-H4UP3B3H.js} +20 -20
- package/dist/{WorldClock-AHTVTAI7.js → WorldClock-L544XDSO.js} +6 -6
- package/dist/apps/index.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/{chunk-IH3W7GR5.js → chunk-2GQ6QERX.js} +336 -357
- package/dist/chunk-2OLPYYXJ.js +18 -0
- package/dist/{chunk-KKOHUQPF.js → chunk-4DFRGAYO.js} +1 -1
- package/dist/{chunk-SLCR26NK.js → chunk-6JM25HQ2.js} +4 -4
- package/dist/chunk-6UXY7MPY.js +2 -0
- package/dist/{chunk-L7TEFXIS.js → chunk-7ADDECUS.js} +14 -14
- package/dist/{chunk-L2ZO76TC.js → chunk-BBKISBOG.js} +1 -1
- package/dist/{chunk-V453E4KU.js → chunk-CCL2BIIV.js} +4 -4
- package/dist/{chunk-UB22J6EF.js → chunk-E3F2TEYY.js} +1 -1
- package/dist/{chunk-MU5H2CDL.js → chunk-EJVQF6CM.js} +2 -2
- package/dist/chunk-ERGOI2JO.js +29 -0
- package/dist/{chunk-I55UMU3R.js → chunk-F7R2KC4G.js} +1 -1
- package/dist/chunk-J7LKJIZC.js +9 -0
- package/dist/{chunk-FHTLC7HH.js → chunk-JGHRZYNV.js} +1 -1
- package/dist/{chunk-TFKB2WEB.js → chunk-KR5QH7M4.js} +8 -8
- package/dist/{chunk-NPJH5MD7.js → chunk-KZPQW6UL.js} +2 -2
- package/dist/chunk-M23KUZFK.js +1 -0
- package/dist/{chunk-4FS742BM.js → chunk-M5A7HUXG.js} +1 -1
- package/dist/chunk-MVLIXV7C.js +2 -0
- package/dist/chunk-OSJ3ADF2.js +1 -0
- package/dist/{chunk-ZSDLYYQA.js → chunk-QOT7I3G2.js} +1 -1
- package/dist/chunk-T63C3VVZ.js +1 -0
- package/dist/chunk-VJGGZVVY.js +22 -0
- package/dist/{chunk-CVTOZCM3.js → chunk-XCMMHOSW.js} +11 -11
- package/dist/chunk-Z2MLREMC.js +113 -0
- package/dist/file-intake/index.js +1 -1
- package/dist/{index-BMISANa_.d.ts → index-BZVLC4rC.d.ts} +53 -1
- package/dist/index.d.ts +56 -5
- package/dist/index.js +645 -638
- package/dist/map/index.js +1 -1
- package/dist/page-tabs/index.d.ts +2 -0
- package/dist/page-tabs/index.js +5 -21
- package/dist/pdf/index.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-4CLXMBA4.js +0 -29
- package/dist/ConfirmDialog-DUYZA2FE.js +0 -1
- package/dist/PdfViewer-ZCT3PYXU.js +0 -1
- package/dist/Sidebar-CVF7C6BO.js +0 -23
- package/dist/chunk-2Q3T5CT3.js +0 -1
- package/dist/chunk-57MIENLJ.js +0 -1
- package/dist/chunk-ET5HXDOR.js +0 -106
- package/dist/chunk-LVDRBRYU.js +0 -1
- package/dist/chunk-OCSOMMY2.js +0 -1
- package/dist/chunk-QOXIUJTN.js +0 -29
- package/dist/chunk-TR6PLN7W.js +0 -1
- package/dist/chunk-UB4JIOLD.js +0 -2
- package/dist/chunk-ZBIWNVJS.js +0 -9
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import{isStaleChunkError as e,CMD_Z as t,CMD_SHIFT_Z as n,LoadingSpinner as r,Result as o,useIsMobile as i,useShellPrefs as a}from"./chunk-CCL2BIIV.js";import{computeMaximizedBox as l,isSidebarStripReserved as s,boxFillsWorkArea as c,readAlwaysMaximizedFlag as d,WORK_AREA_CHANGED_EVENT as u,useShellAuth as h,scrollerIsFluid as m,growBoxToWidth as p,widthToFit as f,navIcons as w}from"./chunk-6UXY7MPY.js";import{Button_default as y}from"./chunk-PH3PRIFP.js";import{confirm as g}from"./chunk-ERGOI2JO.js";import{PopupMenu as v,PopupMenuItem as b,PopupMenuDivider as x,PopupMenuLabel as k}from"./chunk-J7LKJIZC.js";import{Z_LAYERS as L,runEscapeInterceptors as C}from"./chunk-OSJ3ADF2.js";import{useShellStrings as M}from"./chunk-T63C3VVZ.js";import{createContext as E,Component as N,useContext as T,useLayoutEffect as z,useRef as A,useEffect as S,useState as P,useSyncExternalStore as I,useCallback as D,useMemo as $,isValidElement as K,cloneElement as W,useReducer as R,useId as O,Suspense as j}from"react";import{jsxs as B,jsx as H,Fragment as F}from"react/jsx-runtime";import{createPortal as q}from"react-dom";import{XMarkIcon as V}from"@heroicons/react/24/outline";import{useLocation as Y}from"react-router-dom";import{useQueryClient as U,useQuery as X}from"@tanstack/react-query";function _(e){return"component"in e}function J(e){return"endpoint"in e}var G={};function Z(e){G=e}var Q=new Proxy({},{get:(e,t)=>G[t],has:(e,t)=>t in G,ownKeys:()=>Object.keys(G),getOwnPropertyDescriptor(e,t){if(t in G)return{configurable:!0,enumerable:!0,value:G[t]}}}),ee=null;function te(e){ee=e}function ne(){return null!==ee}var re=/* @__PURE__ */new Set(["get","post","put","patch","delete","head","options","request"]),oe=new Proxy({},{get:(e,t)=>ee?ee[t]:"string"==typeof t&&re.has(t)?()=>Promise.resolve({data:null,status:0,statusText:"",headers:{},config:{}}):void 0});function ie({error:t,onReload:n}){const r=e(t);/* @__PURE__ */
|
|
2
|
+
return B("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 py-12 text-center",children:[
|
|
3
|
+
/* @__PURE__ */H("svg",{className:"h-8 w-8 text-amber-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})}),
|
|
4
|
+
/* @__PURE__ */B("div",{className:"min-w-0",children:[
|
|
5
|
+
/* @__PURE__ */H("p",{className:"text-sm font-medium text-gray-700",children:r?"This window needs the latest version of the app":"This window crashed"}),
|
|
6
|
+
/* @__PURE__ */H("p",{className:"mt-1 text-xs text-gray-400 max-w-sm break-words",children:r?"A new version was deployed while this tab was open. Reload the page to pick it up.":t.message||String(t)})]}),
|
|
7
|
+
/* @__PURE__ */H("button",{type:"button",onClick:r?()=>window.location.reload():n,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 text-sm font-medium rounded-lg",children:r?"Reload page":"Reload window"})]})}var ae=class extends N{state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}componentDidCatch(e,t){console.error("[efficient-shell] window content crashed:",e,t.componentStack)}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):/* @__PURE__ */H(ie,{error:e,onReload:this.reset}):this.props.children}},le=E(null),se="text-xs text-gray-500 hover:text-gray-700 disabled:opacity-40 disabled:hover:text-gray-500 disabled:cursor-default";function ce({className:e="",auto:r=!1}){const o=T(le),i=o?.claimOwnMount;if(z(()=>{if(!r&&i)return i(!0),()=>i(!1)},[r,i]),!o||!o.enabled)return null;const{undo:a,redo:l,canUndo:s,canRedo:c,undoLabel:d,redoLabel:u}=o;/* @__PURE__ */
|
|
8
|
+
return B("div",{className:`flex items-center gap-2 ${e}`,"data-undo-controls":r?"shell":"form",children:[
|
|
9
|
+
/* @__PURE__ */H("button",{type:"button",onClick:a,disabled:!s,title:s?`Undo ${d} (${t})`:"Nothing to undo",className:se,children:"Undo"}),
|
|
10
|
+
/* @__PURE__ */H("button",{type:"button",onClick:l,disabled:!c,title:c?`Redo ${u} (${n})`:"Nothing to redo",className:se,children:"Redo"})]})}var de=/* @__PURE__ */new Set([408,429]);function ue(e){const t=e?.response?.status;return"number"==typeof t?t:void 0}function he(e){const t=ue(e);return null!=t&&(t>=400&&t<500&&!de.has(t))}function me(e,t){return!he(t)&&e<3}var pe=E(null),fe=null,we=/* @__PURE__ */new Set;function ye(e){fe!==e&&(fe=e,we.forEach(e=>e()))}function ge(){return fe}function ve(e){return we.add(e),()=>{we.delete(e)}}function be(){/* @__PURE__ */
|
|
11
|
+
return H("div",{className:"flex items-center justify-center p-8 text-sm text-gray-400",children:"Loading..."})}var xe="flex-1 min-h-0";function ke(){/* @__PURE__ */
|
|
12
|
+
return H(r,{label:"Loading record…",padding:"",className:xe})}function Le(e){return e??void 0}function Ce({isPending:e,isFetching:t,enabled:n=!0,error:r,onRetry:i}){if(t||e&&n)/* @__PURE__ */return H(ke,{});if(r){const e=ue(r);if(401===e)/* @__PURE__ */
|
|
13
|
+
return H(o,{status:"warning",title:"Sign in required",subTitle:"Your session may have expired. Sign in again to open this record.",className:xe});if(403===e)/* @__PURE__ */
|
|
14
|
+
return H(o,{status:"403",className:xe});if(404===e||410===e)/* @__PURE__ */
|
|
15
|
+
return H(o,{status:"404",title:"Record not found",className:xe});const t=null==e||408===e||429===e||e>=500;/* @__PURE__ */
|
|
16
|
+
return H(o,{status:"500",title:"Couldn't load record",subTitle:t?"Check your connection and try again.":"The server rejected this request.",extra:t?/* @__PURE__ */H(y,{variant:"secondary",size:"sm",onClick:i,children:"Try again"}):void 0,className:xe})}/* @__PURE__ */
|
|
17
|
+
return H(o,{status:"404",title:"Record not found",className:xe})}function Me({entity:e,children:t,...n}){return null!=e?/* @__PURE__ */H(F,{children:t(e)}):/* @__PURE__ */H(Ce,{...n})}var Ee=/^[a-z]+(?:-[a-z]+)*-\d{13}$/;function Ne(e){return"string"==typeof e&&(e.startsWith("new-")||Ee.test(e))}function Te(e){if(Ne(e.entityId))return!0;const t=e.entitySnapshot;return!(!t||"object"!=typeof t||!t._new&&!t._duplicate)}var ze=E({openWindows:[],openEntity:()=>{},openPage:()=>{},closeEntity:()=>{},minimize:()=>{},items:[],restore:()=>{},remove:()=>{},restoreIfMinimized:()=>!1,openItems:[]}),Ae=E(null);function Se(e){const t=T(Ae),n=A(null);null===n.current&&(n.current=/* @__PURE__ */Symbol("window-dirty")),z(()=>{if(t)return t(n.current,e)},[t,e]),S(()=>{if(!t||!e)return;const n=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[t,e])}function Pe(){const e=A(/* @__PURE__ */new Map),[t,n]=P(!1);return{dirty:t,registerDirty:D((t,r)=>{const o=()=>{const t=Array.from(e.current.values()).some(Boolean);n(e=>e===t?e:t)};return e.current.set(t,r),o(),()=>{e.current.delete(t),o()}},[])}}function Ie(){return T(ze)}function De(e){if("page"!==e.type&&Te(e))return null;const t="page"===e.type?"page":e.entityType||"",n="page"===e.type?e.route||"":e.entityId||"";return t&&n?{entityType:t,entityId:n,label:e.label}:null}function $e({item:e,onClose:t,accentRgb:n}){const{dirty:r,registerDirty:o}=Pe(),i=Q[e.route];if(!i||!_(i))return null;const a=i,l=a.component;/* @__PURE__ */
|
|
18
|
+
return H(mr,{open:!0,onClose:t,icon:w[e.route],title:a.label,size:a.size||"2xl",dirty:r,allowPinOnTop:a.allowPinOnTop,initialPosition:a.initialPosition,widget:a.widget,compact:a.compact,appStyle:a.appStyle,flushBody:a.flushBody,autoHeight:a.autoHeight,autoMinHeight:a.autoMinHeight,autoWidth:a.autoWidth,dimensions:a.dimensions,windowKey:e.id,openedFromKey:e.openedFrom,accentRgb:n,children:/* @__PURE__ */H(Ae.Provider,{value:o,children:/* @__PURE__ */H(j,{fallback:/* @__PURE__ */H("div",{className:"flex items-center justify-center py-12",children:/* @__PURE__ */H(be,{})}),children:/* @__PURE__ */H(l,{})})})})}function Ke({entityType:e,entityId:t,label:n}){const r=M(),o=U(),{data:i}=X({queryKey:["my-profile-sidebar"],enabled:ne(),queryFn:()=>oe.get("/auth/me/").then(e=>e.data)}),a=(i?.preferences||{}).favorite_documents||[],l=a.some(n=>n.entityType===e&&n.entityId===t);/* @__PURE__ */
|
|
19
|
+
return H("button",{onClick:()=>{const r=l?a.filter(n=>!(n.entityType===e&&n.entityId===t)):[...a,{entityType:e,entityId:t,label:n}];oe.patch("/auth/me/",{preferences:{favorite_documents:r}}).then(()=>{o.invalidateQueries({queryKey:["my-profile-sidebar"]})})},title:l?r.taskbar.removeFromDesktop:r.taskbar.addToDesktop,className:"shrink-0 transition-colors "+(l?"text-yellow-500 hover:text-yellow-600":"text-gray-300 hover:text-yellow-400"),children:/* @__PURE__ */H("svg",{className:"h-4 w-4",fill:l?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})})})}function We({item:e,onClose:t,onMinimize:n,accentRgb:r}){const o=Q[e.entityType];if(!o||!J(o))return null;const i=o,[a,l]=P(!1),{dirty:s,registerDirty:c}=Pe(),d=i.queryKey||i.endpoint.replace(/^\/|\/$/g,"").split("/").pop()||e.entityType,u=e.entitySnapshot?._duplicate,h=Ne(e.entityId),m=!i.selfFetching&&!u&&!h&&ne(),p=X({queryKey:[d,e.entityId],queryFn:()=>{return oe.get((t=i.endpoint,n=String(e.entityId),`${t}${encodeURIComponent(n)}/`)).then(e=>e.data);var t,n},initialData:Le(e.entitySnapshot),initialDataUpdatedAt:0,enabled:m,staleTime:0,refetchOnWindowFocus:!0,refetchOnMount:"always",refetchInterval:e=>!he(e.state.error)&&6e4,refetchIntervalInBackground:!1,retry:me}),f=p.data,y=p.refetch;S(()=>{if(i.selfFetching||u||h)return;const e=()=>{y()};return window.addEventListener("modal-reorder",e),()=>window.removeEventListener("modal-reorder",e)},[y,i.selfFetching,u,h]);const g=D(()=>{a&&!s?l(!1):t()},[a,s,t]),v=i.selfFetching?e.label:f?i.title(f,a,l):e.label,b=i.icon,x=b?w[b]:null,k=v,L=!i.selfFetching&&f&&i.footer&&!u?i.footer(f):void 0;return i.rendersOwnModal?i.selfFetching?/* @__PURE__ */H(j,{fallback:/* @__PURE__ */H(be,{}),children:i.render(f??e.entitySnapshot,t,e.entityId,a,l)}):null!=f?/* @__PURE__ */H(j,{fallback:/* @__PURE__ */H(mr,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */H(ke,{})}),children:i.render(f,t,e.entityId,a,l)}):/* @__PURE__ */H(mr,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */H(Ce,{isPending:p.isPending,isFetching:p.isFetching,enabled:m,error:p.error,onRetry:y})}):/* @__PURE__ */H(mr,{open:!0,onClose:g,onMinimize:n,initialBox:e.savedBox,icon:x,title:k,footer:L,copyText:e.label,windowKey:e.id,openedFromKey:e.openedFrom,size:i.size||"2xl",dirty:s,editing:a||h||u,dimensions:i.dimensions,autoHeight:i.autoHeight,autoMinHeight:i.autoMinHeight,autoWidth:i.autoWidth,appStyle:i.appStyle,flushBody:i.flushBody,accentRgb:r,children:/* @__PURE__ */H(Ae.Provider,{value:c,children:/* @__PURE__ */H(j,{fallback:/* @__PURE__ */H(ke,{}),children:i.selfFetching?i.render(null,t,e.entityId,a,l):/* @__PURE__ */H(Me,{entity:f,isPending:p.isPending,isFetching:p.isFetching,enabled:m,error:p.error,onRetry:y,children:n=>i.render(n,t,e.entityId,a,l)})})})})}function Re(e){return document.querySelector(`[data-modal-panel][data-window-key="${e}"]`)}function Oe(e){return document.querySelector(`[data-modal-panel][data-window-root][data-window-owner="${e}"]`)}function je(e){const t=Re(e),n=t??Oe(e);if(!n)return;if(t&&!zn(t))return r=e,void window.dispatchEvent(new CustomEvent("modal-reveal",{detail:{windowKey:r}}));var r;const o=n.getAttribute("data-modal-id");o&&gn(o)}function Be(e){if("page"!==e.type)return!0;const t=e.route?Q[e.route]:void 0;if(!t||!_(t))return!0;const n=t;return!n.widget&&!n.utility}function He(){const e=Fn();if(!e)return;const t=document.querySelector(`[data-modal-panel][data-modal-id="${e}"]`);return t?.getAttribute("data-window-key")??void 0}var Fe=/* @__PURE__ */new Map;function qe(){const e=He();if(e)return Fe.get(e)}function Ve(e){const t=document.querySelectorAll("[data-modal-panel]");for(const n of Array.from(t)){const t=n.querySelector("[data-window-title]");if(t?.textContent?.includes(e))return n}return null}var Ye="rosh-peek-style";function Ue(e){"undefined"!=typeof document&&(!function(){if("undefined"==typeof document||document.getElementById(Ye))return;const e=document.createElement("style");e.id=Ye,e.textContent="body.rosh-peeking [data-modal-panel]{transition:opacity .18s ease}body.rosh-peeking [data-modal-panel]:not([data-peek-focus]){opacity:.4}body.rosh-peeking [data-modal-panel][data-peek-focus]{opacity:1}body.rosh-peeking [data-modal-panel][data-peek-focus]:not([data-pinned-top]){z-index:249!important}html.rosh-reduce-transparency body.rosh-peeking [data-modal-panel]:not([data-peek-focus]){opacity:.92}@media (prefers-reduced-motion:reduce){body.rosh-peeking [data-modal-panel]{transition:none}}",document.head.appendChild(e)}(),document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach(e=>e.removeAttribute("data-peek-focus")),e&&e.setAttribute("data-peek-focus",""),document.body.classList.toggle("rosh-peeking",!!e))}function Xe(){"undefined"!=typeof document&&(document.body.classList.remove("rosh-peeking"),document.querySelectorAll("[data-modal-panel][data-peek-focus]").forEach(e=>e.removeAttribute("data-peek-focus")))}function _e({id:e,label:t,maxW:n,maxH:r,titleAbove:o=!1,onClick:i,onClose:a}){const l=M(),s=A(null),[c,d]=P({w:n,h:Math.round(.75*r)}),[u,h]=P(!1);return z(()=>{const o=s.current;if(!o)return;const i=Re(e)??Ve(t);if(!i)return void h(!1);const a=i.getBoundingClientRect();if(0===a.width||0===a.height)return void h(!1);const l=Math.min(n/a.width,r/a.height),c=Math.max(80,Math.round(a.width*l)),u=Math.max(60,Math.round(a.height*l));d({w:c,h:u}),h(!0);const m=i.cloneNode(!0);return m.style.position="absolute",m.style.top="0",m.style.left="0",m.style.right="auto",m.style.bottom="auto",m.style.width=a.width+"px",m.style.height=a.height+"px",m.style.transform=`scale(${l})`,m.style.transformOrigin="top left",m.style.pointerEvents="none",m.style.animation="none",m.style.zIndex="auto",m.removeAttribute("data-modal-panel"),m.removeAttribute("data-modal-id"),m.removeAttribute("data-window-key"),m.querySelectorAll('[role="dialog"], [data-portal]').forEach(e=>{e.style.display="none"}),o.innerHTML="",o.appendChild(m),()=>{o.innerHTML=""}},[e,t,n,r]),/* @__PURE__ */B("div",{style:{width:c.w,height:c.h},className:"relative rounded-md overflow-hidden bg-white/95 border border-gray-300 shadow-md cursor-pointer ring-2 ring-transparent group-hover:ring-blue-400 transition shrink-0",onClick:i,children:[
|
|
20
|
+
/* @__PURE__ */H("div",{ref:s,className:"absolute inset-0 z-0 overflow-hidden"}),!u&&/* @__PURE__ */B("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-gray-400 bg-gray-50",children:[
|
|
21
|
+
/* @__PURE__ */H("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75A2.25 2.25 0 016 4.5h12a2.25 2.25 0 012.25 2.25v10.5A2.25 2.25 0 0118 19.5H6a2.25 2.25 0 01-2.25-2.25V6.75z M3.75 9h16.5"})}),
|
|
22
|
+
/* @__PURE__ */H("span",{className:"mt-1 text-[10px] uppercase tracking-wide",children:"Hidden"})]}),!o&&/* @__PURE__ */H("div",{className:"absolute bottom-0 left-0 right-0 z-10 px-2 py-1 text-[10px] font-medium text-white bg-gradient-to-t from-black/80 to-transparent truncate pointer-events-none",children:t}),a&&/* @__PURE__ */H("button",{onClick:e=>{e.stopPropagation(),a()},className:"absolute top-1 right-1 z-20 h-5 w-5 rounded-full bg-gray-900/90 ring-1 ring-white/80 shadow-sm hover:bg-red-500 text-white flex items-center justify-center",title:l.taskbar.closeWindow,children:/* @__PURE__ */H("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]})}function Je({items:e,anchorEl:t,onActivate:n,onClose:r,onMouseEnter:o,onMouseLeave:i}){const a=M(),l=e.length>1,s=A(null),[c,d]=P({left:-9999,top:-9999,ready:!1}),[u,h]=P(()=>"undefined"!=typeof document&&getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom");z(()=>{const e=s.current;if(!e)return;const n=()=>{const n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom";h(o);let i,a=n.left+n.width/2-r.width/2;"top"===o?i=n.bottom+8:"left"===o?(a=n.right+8,i=n.top+n.height/2-r.height/2):"right"===o?(a=n.left-r.width-8,i=n.top+n.height/2-r.height/2):i=n.top-r.height-8,a=Math.max(8,Math.min(a,window.innerWidth-r.width-8)),i=Math.max(8,Math.min(i,window.innerHeight-r.height-8)),d({left:a,top:i,ready:!0})};n();const r=new ResizeObserver(n);return r.observe(e),()=>r.disconnect()},[t,e.length]),S(()=>Xe,[]);const m="top"===u,p=(m?"mt-1":"mb-1")+" max-w-[240px] truncate text-[11px] font-medium text-gray-900 bg-white/80 px-2 py-0.5 rounded shadow-sm ring-2 ring-transparent transition group-hover:ring-blue-400";return q(
|
|
23
|
+
/* @__PURE__ */H("div",{ref:s,"data-taskbar-preview":"",style:{position:"fixed",left:c.left,top:c.top,zIndex:300,maxWidth:"calc(100vw - 16px)",opacity:c.ready?1:0},className:l?"flex gap-2 flex-wrap":"",onMouseEnter:o,onMouseLeave:()=>{Xe(),i()},children:e.map(e=>{const t=Re(e.id)??Ve(e.label),o=t?function(e){if(zn(e))return null;const t=e.getBoundingClientRect(),n=Ln(),r=t.left+t.width/2-(n.x+n.w/2),o=t.top+t.height/2-(n.y+n.h/2);return 180*Math.atan2(o,r)/Math.PI}(t):null;/* @__PURE__ */
|
|
24
|
+
return B("div",{className:"group flex flex-col items-center",onMouseEnter:()=>Ue(t),children:[!m&&/* @__PURE__ */H("span",{className:p,children:e.label}),
|
|
25
|
+
/* @__PURE__ */H(_e,{id:e.id,label:e.label,maxW:240,maxH:160,titleAbove:!0,onClick:()=>n(e.id),onClose:()=>r(e.id)}),m&&/* @__PURE__ */H("span",{className:p,children:e.label}),null!==o&&/* @__PURE__ */B("span",{title:a.taskbar.offscreenHint,className:"mt-1 inline-flex items-center gap-1 rounded bg-amber-500 px-1.5 py-0.5 text-[10px] font-semibold text-white shadow-sm",children:[
|
|
26
|
+
/* @__PURE__ */H("svg",{className:"h-3 w-3",style:{transform:`rotate(${o}deg)`},viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14m0 0l-5-5m5 5l-5 5"})}),"Off screen"]})]},e.id)})}),document.body)}function Ge(e,t){const n=getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom";return"top"===n?{left:Math.min(e,window.innerWidth-220),top:t+4}:"left"===n?{left:e+4,top:Math.min(t,window.innerHeight-160)}:"right"===n?{right:window.innerWidth-e+4,top:Math.min(t,window.innerHeight-160)}:{left:Math.min(e,window.innerWidth-220),bottom:window.innerHeight-t+4}}function Ze({openWindows:e,onRemove:t,onSplitView:n,onActivate:r,onActivateById:o}){const i=M(),[a,l]=P(null);S(()=>{let e,t;const n=()=>{clearInterval(e),clearTimeout(t),e=void 0},r=()=>{const e=document.getElementById("taskbar-windows");return l(t=>t===e?t:e),!!e},o=()=>{n(),r()||(e=setInterval(()=>{r()&&n()},100),t=setTimeout(n,5e3))};return o(),window.addEventListener("react-os-shell:layout-mode-changed",o),()=>{n(),window.removeEventListener("react-os-shell:layout-mode-changed",o)}},[]);const s=I(qn,Fn),[,c]=P(0);S(()=>{const e=()=>c(e=>e+1);return window.addEventListener("modal-geometry",e),window.addEventListener("resize",e),()=>{window.removeEventListener("modal-geometry",e),window.removeEventListener("resize",e)}},[]);const[,d]=P(0);S(()=>{const e=()=>d(e=>e+1);return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[]);const u=e=>{const t=Ve(e),n=t?.querySelector("[data-window-title]");return n?.textContent?.trim()||e},[h,m]=P(null),[p,f]=P(null),[y,g]=P(null),L=A(null),C=()=>{L.current&&(clearTimeout(L.current),L.current=null),L.current=setTimeout(()=>{m(null),f(null)},150)},E=e.filter(e=>!e.route||!Q[e.route]?.utility);if(!a||!a.isConnected||0===E.length)return null;const N=[],T=/* @__PURE__ */new Map;for(const e of E){const t=e.route?Q[e.route]:void 0,n=t?.taskbarGroup,r=n?.key??e.route??`entity:${e.id}`,o=T.get(r);if(void 0!==o)N[o].items.push(e);else{T.set(r,N.length);const o=n?.label??t?.label??e.label;N.push({key:r,route:n?.icon??e.route,label:o,items:[e]})}}return q(
|
|
27
|
+
/* @__PURE__ */B(F,{children:[N.map(e=>{const n=e.route?w[e.route]:null,r=e.items[e.items.length-1];let a=!1;if(s){const t=document.querySelector(`[data-modal-id="${s}"]`);if(t){const n=t.querySelector("[data-window-title]"),r=n?.textContent??"";a=e.items.some(e=>r.includes(e.label))}}const l=e.items.length>1,c=e.items.some(e=>{const t=Re(e.id)??Ve(e.label);return!!t&&!zn(t)});/* @__PURE__ */
|
|
28
|
+
return B("button",{onClick:()=>o(r.id),onMouseEnter:t=>{return n=e.items,r=t.currentTarget,void(y||(L.current&&(clearTimeout(L.current),L.current=null),L.current=setTimeout(()=>{m(n),f(r)},350)));var n,r},onMouseLeave:C,onDoubleClick:e=>{e.stopPropagation(),window.dispatchEvent(new CustomEvent("modal-center",{detail:{windowKey:r.id,label:r.label}}))},onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),L.current&&(clearTimeout(L.current),L.current=null),m(null),f(null),l?g({x:t.clientX,y:t.clientY,items:e.items,label:e.label}):window.dispatchEvent(new CustomEvent("modal-context-menu",{detail:{windowKey:r.id,label:r.label,x:t.clientX,y:t.clientY}}))},style:{width:"var(--window-tab-width, 200px)",fontSize:"var(--window-tab-font-size, 12px)"},"data-tab-group":e.key,className:"group relative flex items-center gap-1.5 rounded-lg px-3 py-2 font-medium transition-all min-w-0 shrink "+(a?"bg-blue-100/60 border border-blue-400/60 text-blue-700":"bg-gray-50/40 border border-gray-200/40 text-gray-700 hover:bg-gray-200/40"),children:[n&&K(n)?W(n,{className:"h-3.5 w-3.5 shrink-0 "+(a?"text-blue-600":"text-gray-400")}):/* @__PURE__ */H("svg",{className:"h-3.5 w-3.5 shrink-0 "+(a?"text-blue-600":"text-gray-400"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})}),
|
|
29
|
+
/* @__PURE__ */H("span",{className:"truncate flex-1",children:l?e.label:u(r.label)}),c&&/* @__PURE__ */H("span",{title:i.taskbar.offscreenDot,className:"shrink-0 h-1.5 w-1.5 rounded-full bg-amber-500"}),l&&/* @__PURE__ */H("span",{className:"shrink-0 px-1.5 py-0.5 rounded-full bg-blue-500/80 text-white text-[10px] font-bold leading-none",children:e.items.length}),!l&&/* @__PURE__ */H("span",{role:"button",onClick:e=>{e.stopPropagation(),t(r.id)},className:"ml-auto text-gray-400 hover:text-red-500 shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:/* @__PURE__ */H("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]},e.key)}),
|
|
30
|
+
/* @__PURE__ */H("div",{className:"flex-1"}),E.length>=2&&/* @__PURE__ */B("button",{onClick:n,title:i.taskbar.expose,className:"flex items-center gap-1 rounded px-2 py-1 text-[11px] font-medium text-blue-600 border border-blue-300 hover:bg-blue-50 transition-colors shrink-0",children:[
|
|
31
|
+
/* @__PURE__ */B("svg",{className:"h-3 w-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[
|
|
32
|
+
/* @__PURE__ */H("rect",{x:"3.5",y:"3.5",width:"7",height:"7",rx:"1"}),
|
|
33
|
+
/* @__PURE__ */H("rect",{x:"13.5",y:"3.5",width:"7",height:"7",rx:"1"}),
|
|
34
|
+
/* @__PURE__ */H("rect",{x:"3.5",y:"13.5",width:"7",height:"7",rx:"1"}),
|
|
35
|
+
/* @__PURE__ */H("rect",{x:"13.5",y:"13.5",width:"7",height:"7",rx:"1"})]}),"Exposé"]}),y&&/* @__PURE__ */B(v,{portal:!0,minWidth:200,style:Ge(y.x,y.y),onClose:()=>g(null),children:[
|
|
36
|
+
/* @__PURE__ */H(k,{children:y.label}),
|
|
37
|
+
/* @__PURE__ */B(b,{onClick:()=>{g(null),y.items.forEach(e=>function(e){const t=ln.get(e);t&&vn(t)}(e.id))},children:[
|
|
38
|
+
/* @__PURE__ */H("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 12h-15"})}),i.taskbar.minimizeAllWindows]}),
|
|
39
|
+
/* @__PURE__ */B(b,{onClick:()=>{g(null),y.items.forEach(e=>o(e.id))},children:[
|
|
40
|
+
/* @__PURE__ */H("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75h6.5v6.5h-6.5zM13.75 8.75h6.5v6.5h-6.5z"})}),i.taskbar.restoreAllWindows]}),
|
|
41
|
+
/* @__PURE__ */H(x,{}),
|
|
42
|
+
/* @__PURE__ */B(b,{danger:!0,onClick:()=>{g(null),y.items.forEach(e=>t(e.id))},children:[
|
|
43
|
+
/* @__PURE__ */H("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),`${i.taskbar.closeAllWindows} (${y.items.length})`]})]}),h&&p&&/* @__PURE__ */H(Je,{items:h,anchorEl:p,onActivate:e=>{o(e),m(null),f(null)},onClose:e=>{t(e),m(null),f(null)},onMouseEnter:()=>{L.current&&(clearTimeout(L.current),L.current=null)},onMouseLeave:C})]}),a)}var Qe=["/login","/forgot-password","/reset-password","/force-change-password"];function et({children:e,windowAccentForRoute:t}){const n=Y(),r=Qe.some(e=>n.pathname.startsWith(e)),[o,i]=P([]),a=A(o);z(()=>{a.current=o},[o]);const l=I(ve,ge,ge),s=A(/* @__PURE__ */new Map),c=e=>{const t=Be(e),n=!!l&&"page"===e.type&&e.route===l,r=s.current.get(e.id);if(r&&r.tab===t&&r.home===n)return r;const o={key:e.id,tab:t,home:n};return s.current.set(e.id,o),o};S(()=>{Fe.clear();for(const e of o)e.route&&Fe.set(e.id,e.route)},[o]);const d=D(e=>{i(t=>t.filter(t=>t.id!==e))},[]),u=D(e=>{var t;Re(e)||Oe(e)?(t=e,window.dispatchEvent(new CustomEvent(Vn,{detail:{windowKey:t}}))):d(e)},[d]),h=e=>{setTimeout(()=>{const t=document.querySelector(`[data-modal-panel][data-window-key="${e}"]`),n=t?.getAttribute("data-modal-id");n&&gn(n)},50)},m=D((e,t,n,r,o)=>{if(!Q[e]||!J(Q[e]))return;const a=`${e}:${t}`,l=He();i(i=>{const s=i.find(n=>n.entityType===e&&String(n.entityId)===String(t));return s?(h(s.id),i):(h(a),[...i,{id:a,type:"modal",label:r||t,route:o||window.location.pathname,entityType:e,entityId:t,entitySnapshot:Le(n),openedFrom:l}])})},[]),p=D((e,t={})=>{if(!Q[e]||!_(Q[e]))return;const n=Q[e],{reuse:r=!1,background:o=!1,shellOwned:l}=t,s=e=>{var t;o?(t=e,hn.add(t)):h(e)};if(n.widget){const t=a.current.find(t=>"page"===t.type&&t.route===e);if(t)return void u(t.id)}const c=He();i(t=>{if(n.multiInstance){const i=t.filter(t=>"page"===t.type&&t.route===e);if(r&&i.length>0)return o||h(i[i.length-1].id),t;const a=`page:${e}:${Math.random().toString(36).slice(2,8)}`;return s(a),[...t,{id:a,type:"page",label:n.label,route:e,openedFrom:c,...l?{shellOwned:l}:{}}]}const i=t.find(t=>"page"===t.type&&t.route===e);if(i)return n.widget||o||h(i.id),t;const a=`page:${e}`;return s(a),[...t,{id:a,type:"page",label:n.label,route:e,openedFrom:c,...l?{shellOwned:l}:{}}]})},[u]),f=D(()=>{},[]),w=D(()=>{},[]),y=u,g=u;/* @__PURE__ */
|
|
44
|
+
return B(ze.Provider,{value:{openWindows:o,openEntity:m,openPage:p,closeEntity:y,minimize:f,items:[],openItems:o,restore:w,remove:g,restoreIfMinimized:()=>!1},children:[e,
|
|
45
|
+
/* @__PURE__ */H(Ze,{openWindows:o,onRemove:u,onSplitView:ur,onActivate:e=>{document.querySelectorAll("[data-modal-panel]").forEach(t=>{const n=t.querySelector("[data-window-title]");if(n?.textContent?.includes(e)){const e=t.getAttribute("data-modal-id");e&&gn(e)}})},onActivateById:je}),
|
|
46
|
+
/* @__PURE__ */H(hr,{}),!r&&o.map(e=>{const n=e.route?t?.(e.route):void 0;
|
|
47
|
+
/* @__PURE__ */
|
|
48
|
+
return H(pe.Provider,{value:c(e),children:/* @__PURE__ */H(ae,{fallback:(t,n)=>/* @__PURE__ */H(mr,{open:!0,onClose:()=>d(e.id),title:e.label,size:"md",autoHeight:!0,windowKey:e.id,children:/* @__PURE__ */H(ie,{error:t,onReload:n})}),children:/* @__PURE__ */H(kt,{spec:De(e),children:/* @__PURE__ */H(br,{windowId:e.id,children:"page"===e.type?/* @__PURE__ */H($e,{item:e,onClose:()=>d(e.id),accentRgb:n}):/* @__PURE__ */H(We,{item:e,onClose:()=>d(e.id),onMinimize:()=>{},accentRgb:n})})})})},e.id)})]})}var tt=null,nt=/* @__PURE__ */new Set;function rt(){return tt}function ot(e){if(tt!==e){tt=e;for(const e of nt)e()}}function it(e){return nt.add(e),()=>{nt.delete(e)}}var at=!1,lt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},st=()=>{};function ct(e){at=e,lt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0}}function dt(e,t){at&&("submenu"===e?lt.submenus++:lt.menus++,lt.menuKey=t)}function ut(e){if(!at)return st;const t=performance.now();let n=!1;return()=>{if(n)return;if(n=!0,!at)return;const r=performance.now()-t;"move"===e?lt.moveMs+=r:lt.resizeMs+=r}}function ht(){const e=lt;return lt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},e}var mt=/* @__PURE__ */new Map,pt=/* @__PURE__ */new Set,ft=0;function wt(){ft++,pt.forEach(e=>e())}function yt(e){return mt.get(e)}function gt(e){return pt.add(e),()=>{pt.delete(e)}}function vt(){return ft}var bt=E(""),xt=E(null);function kt({spec:e,children:t}){/* @__PURE__ */
|
|
49
|
+
return H(xt.Provider,{value:e,children:t})}var Lt=/* @__PURE__ */new Set(["button","input","textarea","select","kbd","svg"]),Ct='button[type="submit"], button[data-submit], button.btn-submit, button.bg-green-600, button.bg-blue-600';function Mt(e){return Et(e).replace(/\s+/g," ").trim()}function Et(e){if(null==e||"boolean"==typeof e)return"";if("string"==typeof e)return e;if("number"==typeof e)return String(e);if(Array.isArray(e))return e.map(Et).join("");if(K(e)){const t=e,n="string"==typeof t.type?t.type:"";return Lt.has(n)?"":` ${Et(t.props?.children)} `}return""}function Nt(e){const t=T(bt);S(()=>{if(!t)return;const n=n=>{n.detail===t&&e()};return window.addEventListener("widget-open-settings",n),()=>window.removeEventListener("widget-open-settings",n)},[e,t])}var Tt={};function zt(e,t,n){const r=T(bt);S(()=>{if(!r)return;Tt[r]||(Tt[r]=[]);const o={label:e,icon:n,onClick:t};return Tt[r].push(o),()=>{Tt[r]=(Tt[r]||[]).filter(e=>e!==o)}},[r,e,t,n])}function At({title:e}){const t=A(null);return S(()=>{const n=setTimeout(()=>{const n=t.current?.closest("[data-modal-id]"),r=n?.getAttribute("data-modal-id");r&&window.dispatchEvent(new CustomEvent("window-title-update",{detail:{id:r,title:e}}))},0);return()=>clearTimeout(n)},[e]),/* @__PURE__ */H("span",{ref:t,style:{display:"none"},"aria-hidden":"true"})}function St(e){}function Pt({text:e}){const[t,n]=P(!1);/* @__PURE__ */
|
|
50
|
+
return H("button",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),1500)})},title:t?"Copied!":`Copy ${e}`,className:"shrink-0 text-gray-400 hover:text-gray-600 transition-colors",children:/* @__PURE__ */H("svg",t?{className:"w-4 h-4 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}:{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})})}var It=E(null);function Dt(){return T(bt)}function $t(){const e=I(qn,Fn),t=T(It);return t?.active??(en.length<=1||null!=e)}function Kt({children:e,position:t="right",quiet:n=!1}){const r=T(It),[o,i]=P(null);return S(()=>{if(!r)return;const e="left"===t?r.leftRef:r.rightRef,o=()=>!!e.current&&(i(e.current),n||r.notify(),!0);if(o())return;const a=setInterval(()=>{o()&&clearInterval(a)},50),l=setTimeout(()=>clearInterval(a),2e3);return()=>{clearInterval(a),clearTimeout(l)}},[r,t,n]),o?q(e,o):null}function Wt({onClick:e,children:t,className:n}){const r=T(It);/* @__PURE__ */
|
|
51
|
+
return H("button",{type:"button",onClick:async()=>{if(r?.isDirty){const{confirm:e}=await(import("./ConfirmDialog-RT2NZKCU.js"));if(!await e({title:"Discard changes?",message:"You have unsaved changes. Are you sure you want to cancel? All changes will be lost.",confirmLabel:"Discard",cancelLabel:"Keep Editing",variant:"warning"}))return}e()},className:n||"bg-white text-gray-700 border border-gray-300 px-4 py-2 text-sm font-medium rounded-lg hover:bg-gray-50",children:t||"Cancel"})}var Rt="erp_window_positions",Ot={};try{const e=localStorage.getItem(Rt);e&&(Ot=JSON.parse(e))}catch{}var jt=null;function Bt(){jt&&clearTimeout(jt),jt=setTimeout(()=>{try{localStorage.setItem(Rt,JSON.stringify(Ot))}catch{}},500)}var Ht="erp_activation_order",Ft=[];try{const e=localStorage.getItem(Ht),t=e?JSON.parse(e):null;Array.isArray(t)&&t.every(e=>"string"==typeof e)&&(Ft=t)}catch{}var qt=null;function Vt(){qt&&clearTimeout(qt),qt=setTimeout(()=>{try{localStorage.setItem(Ht,JSON.stringify(Ft))}catch{}},500)}function Yt(e,t){Ot[e]||(Ot[e]=t,Bt())}function Ut(e){return Ot[e]?{...Ot[e]}:null}function Xt(e,t){Ot[e]=t,Bt()}function _t(){const e=l(),t=s();let n=!1;for(const r of Object.keys(Ot))c(Ot[r],e,t)&&(delete Ot[r],n=!0);n&&Bt()}var Jt={sm:384,md:512,lg:672,xl:896,"2xl":1152,"3xl":1408},Gt=4e3,Zt=()=>{if("undefined"==typeof document)return"large";const e=getComputedStyle(document.documentElement).getPropertyValue("--default-window-size")?.trim();return"small"===e||"medium"===e||"maximized"===e?e:"large"},Qt={small:.8,medium:1,large:1.25,maximized:1.25},en=[],tn=/* @__PURE__ */new Set,nn=/* @__PURE__ */new Set,rn=0;function on(){return rn}function an(){rn++,tn.forEach(e=>e())}var ln=/* @__PURE__ */new Map,sn=/* @__PURE__ */new Map,cn=/* @__PURE__ */new Map;function dn(){for(let e=en.length-1;e>=0;e--){const t=cn.get(en[e]);if(t?.tab)return t.owner}return null}function un(){return I(qn,dn,()=>null)}var hn=/* @__PURE__ */new Set;var mn=null;function pn(e){mn=null,gn(e)}function fn(e){mn=e;const t=ln.get(e);t&&pn(t)}function wn(e){mn===e&&(mn=null)}function yn(e,t,n){if(n&&cn.set(e,n),t)if(ln.set(t,e),sn.set(e,t),hn.delete(t)){en.unshift(e);const n=Ft.indexOf(t);-1!==n&&Ft.splice(n,1),Ft.unshift(t),Vt()}else!function(e,t){const n=Ft.indexOf(t);if(-1===n)return void en.push(e);let r=en.length;for(let e=0;e<en.length;e++){const t=sn.get(en[e]);if(t&&Ft.indexOf(t)>n){r=e;break}}en.splice(r,0,e)}(e,t),-1===Ft.indexOf(t)&&(Ft.push(t),Vt());else en.push(e);an(),window.dispatchEvent(new CustomEvent("modal-reorder")),t&&mn===t&&pn(e)}function gn(e){const t=en.indexOf(e);-1!==t&&en.splice(t,1),en.push(e);const n=cn.get(e);if(n?.root&&n.tab&&d()){const e=en.filter(e=>{const t=cn.get(e);return!!t&&!t.root&&t.owner===n.owner});for(const t of e)en.splice(en.indexOf(t),1),en.push(t)}nn.delete(e);const r=sn.get(e);if(r){const e=Ft.indexOf(r);-1!==e&&Ft.splice(e,1),Ft.push(r),Vt(),mn&&mn!==r&&(mn=null)}an(),window.dispatchEvent(new CustomEvent("modal-reorder"))}function vn(e){const t=en.indexOf(e);-1!==t&&en.splice(t,1),nn.add(e);const n=sn.get(e);if(n){const e=Ft.indexOf(n);-1!==e&&(Ft.splice(e,1),Vt())}an(),window.dispatchEvent(new CustomEvent("modal-reorder"))}var bn=/* @__PURE__ */new Set;var xn=8,kn=32;function Ln(){return l()}var Cn=40,Mn=80,En=384,Nn=400;function Tn(e,t=Ln()){const n=Math.min(Math.max(e.x,t.x+Mn-e.w),t.x+t.w-Mn),r=Math.min(Math.max(e.y,t.y),t.y+t.h-Cn);return n===e.x&&r===e.y?e:{...e,x:n,y:r}}function zn(e){const t=e.getBoundingClientRect();if(0===t.width||0===t.height)return!0;const n=Ln();return t.left>=n.x-1&&t.top>=n.y-1&&t.right<=n.x+n.w+1&&t.bottom<=n.y+n.h+1}function An(e){const t=Ln(),n=Math.floor(t.w/2),r=Math.floor(t.h/2);switch(e){case"top":return{x:t.x,y:t.y,w:t.w,h:t.h};case"left":return{x:t.x,y:t.y,w:n,h:t.h};case"right":return{x:t.x+n,y:t.y,w:t.w-n,h:t.h};case"tl":return{x:t.x,y:t.y,w:n,h:r};case"tr":return{x:t.x+n,y:t.y,w:t.w-n,h:r};case"bl":return{x:t.x,y:t.y+r,w:n,h:t.h-r};case"br":return{x:t.x+n,y:t.y+r,w:t.w-n,h:t.h-r}}}var Sn=null;function Pn(e){const t=(Sn||((Sn=document.createElement("div")).style.cssText=["position: fixed","pointer-events: none","z-index: 40","border-radius: 8px","background: rgba(59, 130, 246, 0.18)","border: 2px solid rgb(59, 130, 246)","transition: left 120ms ease, top 120ms ease, width 120ms ease, height 120ms ease, opacity 120ms ease","opacity: 0","display: none"].join(";"),document.body.appendChild(Sn)),Sn);t.style.display="block",t.style.left=`${e.x}px`,t.style.top=`${e.y}px`,t.style.width=`${e.w}px`,t.style.height=`${e.h}px`,t.style.opacity="1"}function In(){Sn&&(Sn.style.opacity="0",Sn.style.display="none")}var Dn=[{zone:"left",labelKey:"snapLeft",region:"inset-y-0 left-0 w-1/2"},{zone:"right",labelKey:"snapRight",region:"inset-y-0 right-0 w-1/2"},{zone:"tl",labelKey:"snapTopLeft",region:"top-0 left-0 h-1/2 w-1/2"},{zone:"tr",labelKey:"snapTopRight",region:"top-0 right-0 h-1/2 w-1/2"},{zone:"bl",labelKey:"snapBottomLeft",region:"bottom-0 left-0 h-1/2 w-1/2"},{zone:"br",labelKey:"snapBottomRight",region:"bottom-0 right-0 h-1/2 w-1/2"}],$n=350,Kn=200;function Wn({maximized:e,onToggleMax:t,onSnap:n,buttonClassName:r,strings:o}){const[i,a]=P(!1),l=A(void 0),s=A(void 0);S(()=>()=>{clearTimeout(l.current),clearTimeout(s.current)},[]);const c=()=>{clearTimeout(s.current),l.current=setTimeout(()=>a(!0),$n)},d=()=>{clearTimeout(l.current),s.current=setTimeout(()=>a(!1),Kn)};/* @__PURE__ */
|
|
52
|
+
return B("span",{className:"relative inline-flex",onMouseEnter:c,onMouseLeave:d,children:[
|
|
53
|
+
/* @__PURE__ */H("button",{onClick:t,onFocus:c,onBlur:d,title:e?o.windowed:o.maximize,className:r,children:e?"❐":"⤢"}),i&&/* @__PURE__ */H("div",{role:"group","aria-label":o.snapLayouts,onMouseEnter:()=>clearTimeout(s.current),onMouseLeave:d,className:"absolute right-0 top-full z-30 mt-1 grid w-max grid-cols-2 gap-1 rounded-lg border border-gray-200 bg-white p-1.5 shadow-lg",children:Dn.map(({zone:e,labelKey:t,region:r})=>/* @__PURE__ */H("button",{type:"button","aria-label":o[t],title:o[t],onClick:()=>{a(!1),n(e)},onFocus:()=>clearTimeout(s.current),onBlur:d,className:"relative h-7 w-11 rounded border border-gray-300 bg-gray-50 hover:border-blue-400 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-400",children:/* @__PURE__ */H("span",{"aria-hidden":"true",className:`absolute rounded-sm bg-blue-500/70 ${r}`,style:{margin:2}})},e))})]})}var Rn="rosh-gesture-style";var On={se:"nwse-resize",nw:"nwse-resize",sw:"nesw-resize",ne:"nesw-resize",n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize"},jn=4;function Bn(e,t,n,r){!function(){if("undefined"==typeof document||document.getElementById(Rn))return;const e=document.createElement("style");e.id=Rn,e.textContent="body.rosh-gesturing [data-modal-panel]{will-change:transform}",document.head.appendChild(e)}();try{e.setPointerCapture(t)}catch{}document.body.classList.add("rosh-gesturing");const o=document.createElement("div");o.setAttribute("data-drag-shield",""),o.style.cssText=`position:fixed;inset:0;z-index:2147483647;cursor:${n};background:transparent;touch-action:none`,document.body.appendChild(o);const i=ut(r);let a=!1;return()=>{if(!a){a=!0,i();try{e.releasePointerCapture(t)}catch{}o.remove(),document.body.classList.remove("rosh-gesturing")}}}function Hn(e){const t=en.indexOf(e);if(-1===t)return-1;const n=L.window+t*L.windowStep,r=cn.get(e);if(!r||r.root||!r.tab||!d())return n;let o=-1;for(const[e,t]of cn){if(!t.root||t.owner!==r.owner)continue;const n=en.indexOf(e);-1!==n&&(o=Math.max(o,L.window+n*L.windowStep))}return o>=n?o+2+Math.min(t,7):n}function Fn(){return en[en.length-1]||null}function qn(e){return tn.add(e),()=>{tn.delete(e)}}"undefined"!=typeof window&&window.addEventListener("deactivate-all-modals",function(){for(let e=en.length-1;e>=0;e--)bn.has(en[e])||en.splice(e,1);Ft=Ft.filter(e=>{const t=ln.get(e);return null!=t&&bn.has(t)}),Vt(),an(),window.dispatchEvent(new CustomEvent("modal-reorder"))});var Vn="modal-close-request";function Yn(e){I(qn,on);const t=T(It);if(en.length<=1)return!0;if(e){const t=ln.get(e);if(null!=t)return Fn()===t}return t?.active??null!=Fn()}var Un=!1,Xn=/* @__PURE__ */new Set;function _n(e){return Xn.add(e),()=>Xn.delete(e)}function Jn(){return Un}function Gn(e){Un!==e&&(Un=e,Xn.forEach(e=>e()))}function Zn(){Gn(!Un)}function Qn(){Gn(!1)}var er=null,tr=/* @__PURE__ */new Set;function nr(e){return tr.add(e),()=>tr.delete(e)}function rr(){return er}function or(e){er!==e&&(er=e,tr.forEach(e=>e()))}var ir=null,ar=/* @__PURE__ */new Set;function lr(e){return ar.add(e),()=>ar.delete(e)}function sr(){return ir}function cr(e){ir!==e&&(ir=e,ar.forEach(e=>e()))}function dr(){if(!ir)return void Gn(!1);or(ir),cr(null),Gn(!1)}function ur(){Gn(!Un),window.dispatchEvent(new CustomEvent("modal-split-view"))}function hr(){const e=I(_n,Jn),[t,n]=P(e),[r,o]=P(e);return S(()=>{if(e){n(!0);const e=requestAnimationFrame(()=>o(!0));return()=>cancelAnimationFrame(e)}o(!1);const t=setTimeout(()=>n(!1),280);return()=>clearTimeout(t)},[e]),t&&"undefined"!=typeof document?q(
|
|
54
|
+
/* @__PURE__ */H("div",{onMouseDown:e=>{e.stopPropagation(),Gn(!1)},style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",zIndex:2e3,cursor:"pointer",opacity:r?1:0,transition:"opacity 260ms cubic-bezier(0.2, 0.8, 0.2, 1)",pointerEvents:r?"auto":"none"}}),document.body):null}function mr({open:e,onClose:t,title:n,icon:r,copyText:o,size:s="lg",dirty:h=!1,onNext:w,onPrev:y,footer:k,bodyScroll:E,onMinimize:N,initialBox:R,actions:O,actionsLeft:j,editing:Y=!1,allowPinOnTop:U,initialPosition:X,widget:_,compact:J,appStyle:G,flushBody:Z,autoHeight:Q,autoMinHeight:ee,autoWidth:te,widgetMenu:ne,dimensions:re,windowKey:oe,openedFromKey:ie,accentRgb:se,children:de}){const ue=i(),[he,me]=P(0),[fe,we]=P(!1),ye=A(null),ge=A(0);S(()=>{ge.current=he},[he]);const ve=D(e=>{ue&&(ye.current={startX:e.clientX,startY:e.clientY,pointerId:e.pointerId},we(!0),ot(ie??null))},[ue,ie]),be=I(it,rt);S(()=>{if(!fe)return;const e=e=>{if(!ye.current)return;const t=e.clientX-ye.current.startX;if(Math.abs(e.clientY-ye.current.startY)>Math.abs(t)+12)return ye.current=null,we(!1),me(0),void ot(null);me(Math.max(0,t))},n=()=>{if(!ye.current)return;const e=.3*window.innerWidth,n=ge.current>e;ye.current=null,we(!1),n?(me(window.innerWidth),setTimeout(()=>{t(),me(0),ot(null)},180)):(me(0),ot(null))};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",n),window.addEventListener("pointercancel",n),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",n),window.removeEventListener("pointercancel",n)}},[fe]);const[xe,ke]=P(n),Le=M(),Ce=Le.window;S(()=>{ke(n)},[n]);const Me=$(()=>Mt(xe).trim()||void 0,[xe]),[Ee,Ne]=P(!1),Te=A(!1),[ze,Ae]=P(!1),[Pe,De]=P(null),$e=T(xt),Ke=T(pe),{prefs:We,save:Re}=a(),Oe=!!We.window_accent_stripe,je=We.favorite_documents||[],Be=!!$e&&je.some(e=>e.entityType===$e.entityType&&e.entityId===$e.entityId),He=D(()=>{if(!$e)return;const e=Be?je.filter(e=>!(e.entityType===$e.entityType&&e.entityId===$e.entityId)):[...je,{entityType:$e.entityType,entityId:$e.entityId,label:$e.label}];Re({favorite_documents:e})},[$e,Be,je,Re]),[Fe,qe]=P(null),[Ve,Ye]=P("top-right"===X?"right":"left"),Ue=A(!1),Xe=A(null);z(()=>{const e=Xe.current;e&&(se?e.style.setProperty("--window-accent-rgb",se):e.style.removeProperty("--window-accent-rgb"))},[se]);const _e=A(!1),Je=A(null),Ge=A(null),Ze=A(null),[Qe,et]=P(!1),tt=A(null),nt=!!(k||O||j)||Qe,at=T(le),lt=""!==T(bt),st=A(null);st.current=Ke?{owner:Ke.key,tab:Ke.tab,root:!lt}:null;const ct=oe||(Ke&&!lt?Ke.key:null),dt=!!at&&!lt&&at.enabled&&at.hasState&&(Y||at.declaredEditable)&&!at.handMounted&&nt&&!_&&!J&&!G&&!ue,ut=/* @__PURE__ */H("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75A2.25 2.25 0 016 4.5h12a2.25 2.25 0 012.25 2.25v10.5A2.25 2.25 0 0118 19.5H6a2.25 2.25 0 01-2.25-2.25V6.75z M3.75 9h16.5"})}),ht=r&&K(r)?W(r,{className:`h-4 w-4 ${r.props?.className??""}`.trim()}):r??ut,pt=()=>/* @__PURE__ */H("button",{onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation();const t=e.currentTarget.getBoundingClientRect();De(e=>e?null:{x:t.left,y:t.bottom+4})},className:"shrink-0 p-0.5 rounded hover:bg-gray-200/50 transition-colors",title:"Window menu",children:ht}),ft=40,{minimize:yt,items:gt,restoreIfMinimized:vt,openWindows:kt}=Ie(),Lt=A(`modal-${Math.random().toString(36).slice(2,8)}`).current;S(()=>{if(_)return bn.add(Lt),()=>{bn.delete(Lt)}},[_,Lt]),S(()=>{const e=e=>{const t=e.detail;t?.id===Lt&&ke(t.title)};return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[Lt]);const[Et,Nt]=P(L.window),zt=function(e){const t=I(qn,Fn);return en.length<=1||t===e}(Lt),At=function(e){return I(qn,()=>nn.has(e))}(Lt),St=I(_n,Jn),Pt=I(nr,rr),Dt=I(lr,sr),$t=!U&&!_,Kt=St&&$t,[Wt,Rt]=P(!1),jt=Kt&&Dt===Lt,[Ht,Ft]=P(!1),qt=Ht&&$t&&Pt===Lt?"picked":null,Vt=A(Kt);S(()=>{if(Vt.current&&!Kt){Ft(!0);const e=setTimeout(()=>{Ft(!1),er===Lt&&or(null)},700);return Vt.current=Kt,()=>clearTimeout(e)}Vt.current=Kt},[Kt,Lt]),S(()=>{Kt||Rt(!1)},[Kt]),S(()=>{const e=Ge.current,t=Ze.current;if(!e&&!t)return;const n=e=>e?Array.from(e.children).filter(e=>"shell"!==e.dataset.undoControls).length:0,r=()=>et(n(e)+n(t)>0);r();const o=new MutationObserver(r);return e&&o.observe(e,{childList:!0}),t&&o.observe(t,{childList:!0}),()=>o.disconnect()},[e]),S(()=>{const e=e=>{if(e.target.closest('button[type="submit"]')&&Xe.current){const t=Xe.current.querySelector("form");t&&(e.preventDefault(),t.requestSubmit())}},t=Ge.current,n=Ze.current;return t&&t.addEventListener("click",e),n&&n.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e),n&&n.removeEventListener("click",e)}},[e]);const Yt=A(!1),Ut=D(l,[]),Xt=D(()=>{const e=l(),t=re?re[0]:Jt[s]||672,n=e.w-80,r=e.h-80,o=Math.min(t,n),i=Qt[Zt()],a=re?Math.min(re[1],r):(()=>{const t=("sm"===s?500:"md"===s?600:"lg"===s?700:"xl"===s?800:920)*i;return Math.max(320,Math.min(t,e.h-80))})(),c="cascade"!==(getComputedStyle(document.documentElement).getPropertyValue("--window-position")?.trim()||"cascade")||d()?0:30*(en.length-1),u=Math.max(ft,(r-a)/2),h=(n-o)/2,m=e.h-ft-a-u;return"top-right"===X?{x:e.x+e.w-o-ft,y:e.y+ft,w:o,h:a}:"top-left"===X?{x:e.x+ft,y:e.y+ft,w:o,h:a}:{x:e.x+Math.max(ft,(n-o)/2+ft)+Math.min(c,Math.max(0,h)),y:e.y+u+Math.min(c,Math.max(0,m)),w:o,h:a}},[s]),_t=A(!1);e||(_t.current=!1);const tn=oe||o||null;S(()=>{if(!e)return;yn(Lt,tn,st.current??void 0),oe||gn(Lt),Yt.current=!1,Nt(Hn(Lt));const t=()=>{Nt(Hn(Lt))},n=()=>{},r=e=>{if(!e)return!1;if(e.windowKey)return e.windowKey===oe;if(!e.label)return!1;const t=Xe.current?.querySelector("[data-window-title]");return!!t?.textContent?.includes(e.label)},o=e=>{if(!r(e.detail))return;if(gn(Lt),Sn.current)return;const t=Ln(),n=Math.min(Yn.current.w,t.w-40),o=Math.min(Yn.current.h,t.h-40),i=t.x+(t.w-n)/2,a=t.y+(t.h-o)/2;dn({x:i,y:a,w:n,h:o}),Rn(!1)},i=e=>{const t=e.detail;r(t)&&(gn(Lt),De({x:t.x,y:t.y}))},a=e=>{if(e.detail?.windowKey!==oe)return;gn(Lt);const t=Yn.current,n=function(e,t=Ln()){const n=Math.min(e.w,t.w),r=Math.min(e.h,t.h);return{w:n,h:r,x:Math.min(Math.max(e.x,t.x),t.x+t.w-n),y:Math.min(Math.max(e.y,t.y),t.y+t.h-r)}}(t);if(n.x===t.x&&n.y===t.y&&n.w===t.w&&n.h===t.h)return;const r=Xe.current,o="function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(r&&!o){let e=!1;const t=()=>{e||(e=!0,r.style.transition="",window.dispatchEvent(new CustomEvent("modal-geometry")))};r.style.transition="left .28s ease, top .28s ease, width .28s ease, height .28s ease",r.addEventListener("transitionend",t,{once:!0}),window.setTimeout(t,400)}dn(n)};return window.addEventListener("modal-reorder",t),window.addEventListener("modal-split-view",n),window.addEventListener("modal-center",o),window.addEventListener("modal-reveal",a),window.addEventListener("modal-context-menu",i),()=>{!function(e){const t=en.indexOf(e);-1!==t&&(en.splice(t,1),an()),nn.delete(e),cn.delete(e);const n=sn.get(e);n&&(sn.delete(e),ln.delete(n))}(Lt),window.removeEventListener("modal-reorder",t),window.removeEventListener("modal-split-view",n),window.removeEventListener("modal-center",o),window.removeEventListener("modal-reveal",a),window.removeEventListener("modal-context-menu",i),window.dispatchEvent(new CustomEvent("modal-reorder"))}},[e,Lt,tn,Ut]);const rn=!_&&"maximized"===Zt(),[on,dn]=P(()=>{if(tn&&Ot[tn]){const e={...Ot[tn]};return re&&(e.w=re[0],Q||(e.h=re[1])),Tn(e)}return R?{x:R.x,y:R.y,w:R.w,h:R.h}:rn?Ut():Xt()}),[hn,mn]=P(()=>!Q),[pn,fn]=P(()=>d()),wn=A(pn),Cn=A(null);S(()=>{const e=()=>{const e=d();e!==wn.current&&Cn.current?.(e),wn.current=e,fn(e),Nt(Hn(Lt))};return window.addEventListener("react-os-shell:layout-mode-changed",e),()=>window.removeEventListener("react-os-shell:layout-mode-changed",e)},[Lt]);const Mn=pn&&!!Ke?.tab&&!lt&&!_&&!ue,zn=Mn,Sn=A(zn);Sn.current=zn;const Dn=un(),$n=pn&&!!Ke?.tab&&!_&&!ue&&!St&&Dn!==Ke.key,[Kn,Rn]=P(()=>tn&&Ot[tn]||R?zn:zn||rn),Yn=A(on);Yn.current=on;const Un=A(Kn);z(()=>{Un.current=Kn},[Kn]),z(()=>{if(hn||Mn)return;const e=Xe.current,t=Je.current;if(!e||!t)return;const n=ee??(_?0:240),r=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0;let o=0,i=null,a=null;const l=()=>{const c=t.firstElementChild;if(!c||e.offsetHeight<=0)return;c!==a&&(a&&s.unobserve(a),s.observe(c),a=c);const d=e.offsetHeight-t.offsetHeight,u=t.style.flex,h=t.style.overflowY,m=t.style.height;t.style.flex="0 0 auto",t.style.height="auto",t.style.overflowY="visible";const p=t.offsetHeight,f=c.offsetHeight;t.style.flex=u,t.style.height=m,t.style.overflowY=h;const w=c.offsetHeight>f+4,y=Math.max(n,window.innerHeight-r-Math.max(0,Yn.current.y)-24),g=w?Math.min(Yn.current.h,y):Math.min(Math.max(n,d+p),y),v=Math.abs(g-o)>1;v&&(o=g,dn(e=>Math.abs(e.h-g)>1?{...e,h:g}:e)),_||(g<=n?i&&(clearTimeout(i),i=null):(v||null===i)&&(i&&clearTimeout(i),i=setTimeout(()=>{const e=o;l(),o===e&&mn(!0)},160)))},s=new ResizeObserver(l);l(),tt.current&&s.observe(tt.current);const c=new MutationObserver(l);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{s.disconnect(),c.disconnect(),i&&clearTimeout(i)}},[hn,_,ee,nt,Mn]),z(()=>{if(!Q||!hn||_||!e)return;const t=tt.current;if(!t)return;let n=t.offsetHeight;const r=new ResizeObserver(()=>{if(!t.isConnected)return;const e=t.offsetHeight,r=e-n,o=e>0!=n>0;if(n=e,!o||0===r||Kn)return;if(document.body.classList.contains("rosh-gesturing"))return;const i=ee??240,a=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,l=Math.max(i,window.innerHeight-a-Math.max(0,Yn.current.y)-24);dn(e=>({...e,h:Math.min(Math.max(i,e.h+r),l)}))});return r.observe(t),()=>r.disconnect()},[Q,hn,_,e,Kn,ee]);const Xn=!1!==te&&!_&&!G&&!ue,[Zn,Qn]=P(()=>!Xn);z(()=>{if(Zn||!e)return;if(!Xn||Kn)return void Qn(!0);const t=Xe.current,n=Je.current;if(!t||!n)return;const r=/* @__PURE__ */new WeakSet;let o=Yn.current.w,i=0;const a=()=>Qn(!0),s=()=>{i=0;const e=Yn.current;if(Math.abs(e.w-o)>1||document.body.classList.contains("rosh-gesturing"))return void a();const s=l(),c=s.w-80;if(e.w>=c)return void a();const d=[],u=[];for(const e of[n,...Array.from(n.querySelectorAll("*"))]){const t=e.scrollWidth-e.clientWidth;if(t<=4||r.has(e))continue;const n=getComputedStyle(e).overflowX;"auto"!==n&&"scroll"!==n||(d.push(e),u.push(t))}if(!d.length)return;const h=Math.min(c,e.w+Math.max(...u)),w=h-e.w,y=t.style.width;t.style.width=`${h}px`;const g=d.map((e,t)=>({over:u[t],residual:e.scrollWidth-e.clientWidth}));t.style.width=y,g.forEach((e,t)=>{m(e,w)||r.add(d[t])});const v=p(e,f(e.w,w,g),s,ft);v!==e&&(o=v.w,dn(v))};s();const c=new MutationObserver(()=>{i||(i=requestAnimationFrame(s))});c.observe(n,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["style","class","hidden"]});const d=setTimeout(a,Gt);return()=>{c.disconnect(),i&&cancelAnimationFrame(i),clearTimeout(d)}},[Zn,e,Xn,Kn]);const tr=A(null),ir=!(!Ke?.tab||lt||_||ue);Cn.current=e=>{if(!ir)return;if(e)return tr.current||(tr.current={box:{...Yn.current},maximized:Un.current}),void(Un.current=!0);const t=tr.current;tr.current=null;const n=l();if(t?.maximized)return Un.current=!0,Rn(!0),void dn(n);const r=t?.box??(tn?Ot[tn]:void 0);if(Un.current=!1,Rn(!1),r&&!c(r,n,!1)){const e={...r};re&&(e.w=re[0],Q||(e.h=re[1])),dn(Tn(e))}else dn(Xt())},S(()=>{zn&&(Un.current=!0,Rn(!0),dn(Ut()))},[zn,Ut]),S(()=>{if(_)return;const e=()=>{const e=tn?Ot[tn]:void 0;if(Un.current=!1,Rn(!1),e){const t={...e};re&&(t.w=re[0],Q||(t.h=re[1])),dn(Tn(t))}else dn(Xt())};return window.addEventListener("react-os-shell:restore-windowed",e),()=>window.removeEventListener("react-os-shell:restore-windowed",e)},[_,Xt,tn]),S(()=>{e&&tn&&!Mn&&(Ot[tn]=on,Bt()),e&&window.dispatchEvent(new CustomEvent("modal-geometry"))},[on,e,tn,Mn]),S(()=>{if(!e)return;const t=()=>{Un.current?dn(Ut()):document.body.classList.contains("rosh-gesturing")||dn(Tn)};window.addEventListener("resize",t),window.addEventListener(u,t);let n=null;return Kn&&(n=new MutationObserver(t),n.observe(document.body,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["class"]})),()=>{window.removeEventListener("resize",t),window.removeEventListener(u,t),n?.disconnect()}},[e,Kn,Ut]),S(()=>{if(e&&(Ne(!1),Te.current=!1,Ue.current=!1,Qn(!Xn),!Sn.current)){if(tn&&Ot[tn]){const e=Ot[tn];return void dn(t=>Tn({...e,...Q?{h:t.h}:{},...Xn?{x:t.x,w:t.w}:{}}))}R&&(dn({x:R.x,y:R.y,w:R.w,h:R.h}),Rn(R.maximized))}},[e]),S(()=>{if(!e||"auto"!==h)return;let t;const n=e=>{Xe.current?.contains(e.target)&&!Te.current&&(Te.current=!0,t=setTimeout(()=>Ne(!0),0))};return document.addEventListener("input",n,!0),document.addEventListener("change",n,!0),()=>{clearTimeout(t),document.removeEventListener("input",n,!0),document.removeEventListener("change",n,!0)}},[e,h]);const ar="auto"===h?Ee:!0===h,cr=Ke&&!lt?Ke.key:null;S(()=>{e&&cr&&function(e,t){const n=mt.get(e);n&&n.title===t.title&&n.dirty===t.dirty||(mt.set(e,t),wt())}(cr,{title:Me,dirty:ar})},[e,cr,Me,ar]),S(()=>{if(e&&cr)return()=>{return e=cr,void(mt.delete(e)&&wt());var e}},[e,cr]),Se(!(oe||!e)&&ar);const dr=D(async()=>{if(!Ue.current){if(ar||"auto"===h&&Te.current){Ue.current=!0;const e=Me,t=await g({title:"Discard changes?",message:e?`“${e}” has unsaved changes. Are you sure you want to close? All changes will be lost.`:"You have unsaved changes. Are you sure you want to close? All changes will be lost.",confirmLabel:"Discard",cancelLabel:"Keep Editing",variant:"warning"});if(Ue.current=!1,!t)return}t()}},[ar,h,t,Me]);z(()=>{if(!e||!ct)return;const t=e=>{e.detail?.windowKey===ct&&dr()};return window.addEventListener(Vn,t),()=>window.removeEventListener(Vn,t)},[e,ct,dr]);const ur=A(null),hr=D(e=>{if(0!==e.button)return;if(e.target.closest("button, input, a, kbd, select, textarea"))return;if(De(null),gn(Lt),Sn.current)return void e.preventDefault();e.preventDefault();const t=e.currentTarget,n=e.pointerId;let r=null;const o=e.clientX,i=e.clientY,a=Xe.current,l=a?.getBoundingClientRect();let s,c,d,u;if(ur.current){const t=ur.current;ur.current=null,u=t.w,d=t.h;const n=l?Math.min(Math.max(20,e.clientX-l.left),t.w-20):t.w/2;s=e.clientX-n,c=e.clientY-12,a&&(a.style.width=`${u}px`,a.style.height=`${d}px`,a.style.left=`${s}px`,a.style.top=`${c}px`)}else s=l?l.left:Yn.current.x,c=l?l.top:Yn.current.y,d=l?l.height:Yn.current.h,u=l?l.width:Yn.current.w;Rn(!1),dn(e=>({...e,x:s,y:c,w:u,h:d}));let h=null;const m=e=>{if(!r){if(Math.abs(e.clientX-o)<jn&&Math.abs(e.clientY-i)<jn)return;r=Bn(t,n,"move","move"),a&&(a.style.transition="none")}const l=s+e.clientX-o,d=Math.max(0,c+e.clientY-i);if(a&&(a.style.transform=`translate(${l-s}px, ${d-c}px)`),Yn.current={...Yn.current,x:l,y:d},!_){const t=function(e,t){const n=Ln(),r=e<=n.x+xn,o=e>=n.x+n.w-xn,i=t<=n.y+xn,a=t>=n.y+n.h-xn,l=e<=n.x+kn,s=e>=n.x+n.w-kn,c=t<=n.y+kn,d=t>=n.y+n.h-kn;return i&&l?"tl":i&&s?"tr":a&&l?"bl":a&&s?"br":c&&r?"tl":c&&o?"tr":d&&r?"bl":d&&o?"br":i?"top":r?"left":o?"right":null}(e.clientX,e.clientY);t!==h&&(h=t,t?Pn(An(t)):In())}},p=()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",p),r?.(),In();const e=Tn({...Yn.current});if(Yn.current=e,!_&&h){ur.current={x:s,y:c,w:u,h:d};const e=An(h);return a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.width=`${e.w}px`,a.style.height=`${e.h}px`,a.style.transform="",a.style.transition=""),void dn(e)}if(_){const t=e.x+e.w/2,n=window.innerWidth/2;Ye(t>n?"right":"left")}a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.transform="",a.style.transition=""),dn(e)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",p)},[]),mr=D((e,t)=>{if(0!==e.button)return;e.preventDefault(),e.stopPropagation();const n=e.currentTarget,r=e.pointerId;let o=null;const i=e.clientX,a=e.clientY,l=Xe.current,s=l?.getBoundingClientRect(),c=s?s.left:Yn.current.x,d=s?s.top:Yn.current.y,u=s?s.width:Yn.current.w,h=s?s.height:Yn.current.h,m="sw"===t||"nw"===t||"w"===t,p="ne"===t||"nw"===t||"n"===t,f="se"===t||"ne"===t||"e"===t,w="se"===t||"sw"===t||"s"===t;Rn(!1),dn({x:c,y:d,w:u,h:h}),Yn.current={x:c,y:d,w:u,h:h};let y=0,g=null;const v=()=>{if(y=0,!g)return;const e=g;g=null,Yn.current=e,l&&(l.style.left=`${e.x}px`,l.style.top=`${e.y}px`,l.style.width=`${e.w}px`,l.style.height=`${e.h}px`)},b=e=>{if(!o){if(Math.abs(e.clientX-i)<jn&&Math.abs(e.clientY-a)<jn)return;o=Bn(n,r,On[t],"resize")}g=((e,t)=>{let n=c,r=d,o=u,i=h;if(f&&(o=Math.max(En,u+e)),w&&(i=Math.max(Nn,h+t)),m){const t=Math.max(En,u-e);n=c+u-t,o=t}if(p){const e=Math.max(Nn,h-t);r=d+h-e,i=e}return{x:n,y:r,w:o,h:i}})(e.clientX-i,e.clientY-a),y||(y=requestAnimationFrame(v))},x=()=>{window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",x),y&&cancelAnimationFrame(y),v(),o?.(),dn({...Yn.current})};window.addEventListener("pointermove",b),window.addEventListener("pointerup",x)},[]),pr=D(e=>{if(e.target.closest("button, input, a, kbd, select, textarea"))return;const t={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]}[e.key];if(!t&&"Enter"!==e.key)return;if(e.preventDefault(),e.stopPropagation(),gn(Lt),"Enter"===e.key)return void(Kn?(Rn(!1),dn(Xt())):(Rn(!0),dn(Ut())));const[n,r]=t;if(e.ctrlKey||e.metaKey){const e=()=>{ur.current||(ur.current={...Yn.current})};if(r<0)return e(),Rn(!0),void dn(Ut());if(r>0){if(Kn)return Rn(!1),void dn(Xt());if(ur.current){const e=Tn(ur.current);return ur.current=null,Yn.current=e,void dn(e)}return void vn(Lt)}e(),Rn(!1);const t=An(n<0?"left":"right");return Yn.current=t,void dn(t)}if(Kn)return;const o=Yn.current,i=e.shiftKey?{...o,w:Math.max(En,o.w+24*n),h:Math.max(Nn,o.h+24*r)}:Tn({...o,x:o.x+24*n,y:Math.max(0,o.y+24*r)});Yn.current=i,dn(i)},[Lt,Kn,Xt,Ut]),fr=D(e=>{ur.current||(ur.current={...Yn.current}),Rn(!1);const t=An(e);Yn.current=t,dn(t),gn(Lt)},[Lt]),wr=zn||Kt?{}:{tabIndex:0,role:"group","aria-label":Me?`${Me} — ${Ce.windowSuffix}`:Ce.windowSuffix,"aria-keyshortcuts":"ArrowUp ArrowDown ArrowLeft ArrowRight Shift+ArrowUp Shift+ArrowDown Shift+ArrowLeft Shift+ArrowRight Control+ArrowUp Control+ArrowDown Control+ArrowLeft Control+ArrowRight Enter",onKeyDown:pr},yr=()=>{Rn(!0),dn(Ut())},gr=D(()=>{const e=Xe.current;if(!e)return;const t=e.querySelector("form");if(t)t.requestSubmit();else{const t=e.querySelector(Ct);t&&!t.disabled&&t.click()}},[]);S(()=>{if(!e)return;const t=e=>{if(en[en.length-1]===Lt&&"Enter"===e.key){const t=e.target;if("TEXTAREA"===t.tagName||t.isContentEditable)return;if(e.metaKey||e.ctrlKey)e.preventDefault(),gr();else{if("INPUT"===t.tagName&&t.closest("form"))return;e.preventDefault()}}};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[e,gr,Lt]),S(()=>{if(!e)return;const t=e=>{en[en.length-1]===Lt&&((e.metaKey||e.ctrlKey)&&"s"===e.key?(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-save",{detail:{modalId:Lt}})),Te.current=!1,Ne(!1)):e.altKey&&e.shiftKey&&("KeyD"===e.code||"D"===e.key||"d"===e.key)&&(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-duplicate",{detail:{modalId:Lt}}))))};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[e]),S(()=>{if(!e)return;if(_)return;const t=e=>{if("Escape"===e.key&&en[en.length-1]===Lt){if(C(e))return e.preventDefault(),void e.stopPropagation();if(Mn&&!Y)return;e.preventDefault(),e.stopPropagation(),dr()}};return window.addEventListener("keydown",t,!0),()=>window.removeEventListener("keydown",t,!0)},[e,dr,Lt,_,Mn,Y]);const vr=e&&(void 0!==w||void 0!==y),br=D(e=>{const t=document.getElementById("nav-boundary-toast");t&&t.remove();const n="bottom"===e?["That's the last one, chief.","You've hit rock bottom... of the list.","End of the line, buddy.","Nothing left. Go outside.","Congratulations, you scrolled to the void.","There's no more. I checked.","You've reached the edge of the known universe.","Plot twist: there is no next one.","Even scrolling has limits. Unlike your ambition.","Last one. Time to touch grass."]:["Already at the top. Overachiever.","There is no item above this. Trust me.","You're #1. Literally.","Can't go higher. You've peaked.","This is it. The summit. The top.","First item. No VIP lounge above this.","Going up? Nope. Elevator's broken.","You want negative indexes? Bold.","Top of the list. Top of the world.","The only way is down from here."],r=n[Math.floor(Math.random()*n.length)],o=document.createElement("div");o.id="nav-boundary-toast",o.className="fixed bottom-6 left-1/2 -translate-x-1/2 z-[9999] bg-gray-900 text-white px-5 py-2.5 rounded-lg shadow-lg text-sm font-medium transition-opacity duration-300",o.textContent=r,document.body.appendChild(o),setTimeout(()=>{o.style.opacity="0",setTimeout(()=>o.remove(),300)},2e3)},[]);if(S(()=>{if(!e)return;const t=e=>{if(en[en.length-1]!==Lt)return;const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.target.isContentEditable||("j"===e.key&&vr&&(e.preventDefault(),w?w():br("bottom")),"k"===e.key&&vr&&(e.preventDefault(),y?y():br("top"))))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,w,y,vr,br,Lt]),!e||_t.current)return null;const xr=Kt?function(e){if("undefined"==typeof document)return null;const t=Array.from(document.querySelectorAll("[data-modal-panel]")).filter(e=>{const t=e;return!t.hasAttribute("data-utility")&&!t.hasAttribute("data-widget")&&"none"!==t.style.display});t.sort((e,t)=>(e.getAttribute("data-modal-id")||"").localeCompare(t.getAttribute("data-modal-id")||""));const n=t.findIndex(t=>t.getAttribute("data-modal-id")===e),r=t.length;if(n<0||r<1)return null;const o=Math.ceil(Math.sqrt(r)),i=Math.ceil(r/o),a=Math.floor(n/o),l=n%o,s=r-o*(i-1),c=a===i-1&&s<o,d=Ln(),u=(d.w-20*(o+1))/o,h=(d.h-14*(i+1)-22*i)/i,m=c?(o-s)*(u+20)/2:0;return{x:d.x+20+l*(u+20)+m,y:d.y+14+a*(h+14+22),w:u,h:h}}(Lt):null,kr=Kt&&xr?Math.min(xr.w/on.w,xr.h/on.h):1,Lr=(()=>{if(Kt&&xr){const e=kr,t=on.w*e,n=on.h*e,r=xr.x+(xr.w-t)/2-on.x,o=xr.y+(xr.h-n)/2-on.y,i=Wt||jt;return{transform:`translate(${r}px, ${o}px) scale(${e})`,transformOrigin:"top left",transition:"transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 280ms",cursor:"pointer",zIndex:i?2020:2010,boxShadow:i?"0 24px 72px rgba(0,0,0,0.6), 0 0 0 2px rgba(255,255,255,0.55), 0 0 36px 12px rgba(96,165,250,0.85), 0 0 96px 28px rgba(96,165,250,0.55)":"0 16px 48px rgba(0,0,0,0.55)",pointerEvents:"auto"}}if(Ht&&$t){const e="picked"===qt;return{transition:e?"transform 640ms cubic-bezier(0.34, 1.42, 0.64, 1), box-shadow 600ms":"transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 600ms",...e?{zIndex:2030}:{}}}return null})(),Cr=/* @__PURE__ */B("div",{children:[
|
|
55
|
+
/* @__PURE__ */B("div",{ref:Xe,"data-modal-panel":!0,"data-modal-id":Lt,"data-window-key":oe||void 0,...U?{"data-utility":""}:{},...ze?{"data-pinned-top":""}:{},..._?{"data-widget":""}:{},...Ke?{"data-window-owner":Ke.key}:{},...Ke&&!lt?{"data-window-root":""}:{},...Mn?{"data-window-tab":""}:{},className:Mn?"fixed flex flex-col overflow-hidden":"fixed rounded-2xl flex flex-col overflow-hidden "+(_?zt?"shadow-2xl":"shadow-lg":"border "+(zt?"shadow-2xl border-gray-200":"shadow-lg border-gray-300")),onMouseDownCapture:e=>{if(_e.current=!1,Kt){if(e.target.closest("[data-expose-close]"))return;return e.preventDefault(),e.stopPropagation(),or(Lt),Gn(!1),void gn(Lt)}if(!zt&&!_&&!ze&&0===e.button){const t=e.target;t.closest("[data-modal-panel]")===Xe.current&&t.closest("button, input, a, select, textarea")&&!t.closest("[data-window-chrome]")&&(e.preventDefault(),e.stopPropagation(),_e.current=!0,De(null),gn(Lt),window.addEventListener("mouseup",()=>{setTimeout(()=>{_e.current=!1},0)},{once:!0}))}},onClickCapture:e=>{_e.current&&(_e.current=!1,e.preventDefault(),e.stopPropagation())},onMouseDown:e=>{if(Kt)return;De(null);e.target.closest("[data-modal-panel]")===Xe.current&&(e.target.closest("button, input, a, select, textarea")||gn(Lt))},style:ue?{zIndex:Et+1,top:0,left:0,right:0,bottom:"var(--mobile-bottom-nav, 56px)",width:"auto",height:"auto",transform:`translateX(${he}px)`,transition:fe?"none":"transform 180ms ease-out",..._?{display:"none"}:{},...Et<0?{display:"none"}:{},...zt||ze||be&&oe===be?{}:{display:"none"}}:{zIndex:ze?L.pinnedWindow:Et+1,width:on.w,height:on.h,top:on.y,..._&&"right"===Ve?{right:window.innerWidth-on.x-on.w}:{left:on.x},...Et<0&&!ze?{display:"none"}:{},...$n?{visibility:"hidden",pointerEvents:"none"}:{},...Lr??{}},children:[ue&&!_&&/* @__PURE__ */H("div",{onPointerDown:ve,className:"absolute top-0 bottom-0 left-0 w-[22px] z-[5]",style:{touchAction:"pan-y"},"aria-hidden":"true"}),_?null:Mn?Ke?.home?null:/* @__PURE__ */B("div",{"data-window-chrome":"",className:"flex items-center gap-3 px-4 py-2 border-b border-gray-200 shrink-0 select-none",style:{backgroundColor:"rgb(var(--window-content-rgb))"},children:[
|
|
56
|
+
/* @__PURE__ */B("div",{"data-window-title":!0,title:Me,className:"text-sm font-semibold text-gray-900 min-w-0 flex-1 truncate flex items-center gap-2",children:[pt(),
|
|
57
|
+
/* @__PURE__ */H("span",{className:"truncate",children:xe})]}),vr&&/* @__PURE__ */B("span",{className:"flex items-center gap-1 shrink-0 text-[10px] text-gray-400",children:[
|
|
58
|
+
/* @__PURE__ */H("kbd",{className:"rounded border border-gray-300 bg-gray-100 px-1.5 py-0.5 font-medium text-gray-500",children:"K"}),
|
|
59
|
+
/* @__PURE__ */H("span",{children:Ce.prev}),
|
|
60
|
+
/* @__PURE__ */H("kbd",{className:"rounded border border-gray-300 bg-gray-100 px-1.5 py-0.5 font-medium ml-1 text-gray-500",children:"J"}),
|
|
61
|
+
/* @__PURE__ */H("span",{children:Ce.next})]})]}):ue?null:
|
|
62
|
+
/* @__PURE__ */B("div",J?{onPointerDown:hr,"data-window-chrome":"",...wr,className:"flex items-center justify-between px-3 py-1.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(zt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:zt?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
63
|
+
/* @__PURE__ */B("div",{"data-window-title":!0,title:Me,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-1.5",style:{color:zt?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!Kt&&pt(),
|
|
64
|
+
/* @__PURE__ */H("span",{className:"truncate",children:Kt?Mt(xe):xe})]}),!Kt&&/* @__PURE__ */B("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[U&&/* @__PURE__ */H("button",{onClick:()=>Ae(e=>!e),title:ze?Ce.unpin:Ce.pinOnTop,className:"p-0.5 rounded hover:bg-gray-200 "+(ze?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */H("svg",{className:"h-3 w-3",fill:ze?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9"})})}),
|
|
65
|
+
/* @__PURE__ */H("button",{type:"button",onClick:dr,className:"rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */H(V,{className:"h-4 w-4"})})]})]}:G?{onPointerDown:hr,"data-window-chrome":"",...wr,className:"flex items-center justify-between px-3 py-1.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(zt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:zt?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
66
|
+
/* @__PURE__ */B("div",{"data-window-title":!0,title:Me,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-1.5",style:{color:zt?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!Kt&&pt(),
|
|
67
|
+
/* @__PURE__ */H("span",{className:"truncate",children:Kt?Mt(xe):xe})]}),!Kt&&/* @__PURE__ */B("div",{className:"flex items-center gap-0.5 shrink-0 ml-2",children:[U&&/* @__PURE__ */H("button",{onClick:()=>Ae(e=>!e),title:ze?Ce.unpin:Ce.pinOnTop,className:"p-0.5 rounded hover:bg-gray-200 "+(ze?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */H("svg",{className:"h-3 w-3",fill:ze?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9"})})}),
|
|
68
|
+
/* @__PURE__ */H("button",{onClick:()=>vn(Lt),title:Ce.minimize,className:"text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none",children:"─"}),!zn&&/* @__PURE__ */H(Wn,{maximized:Kn,onToggleMax:()=>{Kn?(Rn(!1),dn(Xt())):yr()},onSnap:fr,buttonClassName:"text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none",strings:Ce}),
|
|
69
|
+
/* @__PURE__ */H("button",{type:"button",onClick:dr,className:"rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */H(V,{className:"h-4 w-4"})})]})]}:{onPointerDown:hr,"data-window-chrome":"",...wr,className:"flex items-center justify-between px-4 py-2.5 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(zt?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:zt?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
70
|
+
/* @__PURE__ */B("div",{"data-window-title":!0,title:Me,className:"text-base font-medium min-w-0 flex-1 truncate flex items-center gap-2",style:{color:zt?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!Kt&&pt(),
|
|
71
|
+
/* @__PURE__ */H("span",{className:"truncate",children:Kt?Mt(xe):xe})]}),!Kt&&/* @__PURE__ */B("div",{className:"flex items-center gap-1.5 shrink-0 ml-4",children:[vr&&/* @__PURE__ */B("span",{className:"flex items-center gap-1 mr-1 text-[10px] text-gray-400",children:[
|
|
72
|
+
/* @__PURE__ */H("kbd",{className:"rounded border border-gray-300 bg-gray-200 px-1.5 py-0.5 font-medium text-gray-500",children:"K"}),
|
|
73
|
+
/* @__PURE__ */H("span",{children:Ce.prev}),
|
|
74
|
+
/* @__PURE__ */H("kbd",{className:"rounded border border-gray-300 bg-gray-200 px-1.5 py-0.5 font-medium ml-1 text-gray-500",children:"J"}),
|
|
75
|
+
/* @__PURE__ */H("span",{children:Ce.next})]}),U&&/* @__PURE__ */H("button",{onClick:()=>Ae(e=>!e),title:ze?Ce.unpin:Ce.pinOnTop,className:"text-xs px-2 py-1 rounded hover:bg-gray-200 "+(ze?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */H("svg",{className:"h-3.5 w-3.5",fill:ze?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9"})})}),
|
|
76
|
+
/* @__PURE__ */H("button",{onClick:()=>vn(Lt),title:Ce.minimize,className:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",children:"─"}),!zn&&/* @__PURE__ */H(Wn,{maximized:Kn,onToggleMax:()=>{Kn?(Rn(!1),dn(Xt())):yr()},onSnap:fr,buttonClassName:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",strings:Ce}),
|
|
77
|
+
/* @__PURE__ */H("kbd",{className:"rounded border border-gray-300 bg-gray-200 px-1.5 py-0.5 text-[10px] font-medium text-gray-400",children:"ESC"}),
|
|
78
|
+
/* @__PURE__ */H("button",{type:"button",onClick:dr,className:"rounded-md text-gray-400 hover:text-gray-600",children:/* @__PURE__ */H(V,{className:"h-5 w-5"})})]})]}),se&&Oe&&!_&&!ue&&/* @__PURE__ */H("div",{"aria-hidden":"true",className:"h-[3px] shrink-0 pointer-events-none",style:{backgroundColor:`rgb(var(--window-accent-rgb) / ${zt?.9:.55})`}}),
|
|
79
|
+
/* @__PURE__ */H(bt.Provider,{value:Lt,children:/* @__PURE__ */H(It.Provider,{value:{rightRef:Ge,leftRef:Ze,notify:()=>et(!0),active:zt,isDirty:ar,footerOpen:nt&&!_&&!J&&!G&&!ue},children:/* @__PURE__ */H("div",{ref:Je,..._?{onPointerDown:hr,onContextMenu:e=>{e.preventDefault(),qe({x:e.clientX,y:e.clientY})}}:{},className:`flex-1 min-h-0 flex flex-col ${_?"p-0 cursor-move":G||Z?"p-0":J?"p-2":"p-4"} ${_||Mn?"":"backdrop-blur-sm"} ${!1===E||G||Z?"overflow-hidden":"overflow-y-auto overscroll-contain"} ${_?"rounded-2xl select-none":""}`,style:{..._?{touchAction:"none"}:{},backgroundColor:_?"transparent":Mn?"rgb(var(--window-content-rgb))":zt?"rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))":"rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))"},children:/* @__PURE__ */H(ae,{children:de})})})}),_&&Fe&&/* @__PURE__ */B(v,{minWidth:160,style:{left:Fe.x,top:Fe.y},onClose:()=>qe(null),children:[
|
|
80
|
+
/* @__PURE__ */H(b,{onClick:()=>{qe(null),window.dispatchEvent(new CustomEvent("widget-open-settings",{detail:Lt}))},children:"Settings"}),
|
|
81
|
+
/* @__PURE__ */H(x,{}),ne&&/* @__PURE__ */B(F,{children:[ne,
|
|
82
|
+
/* @__PURE__ */H(x,{})]}),
|
|
83
|
+
/* @__PURE__ */B(b,{onClick:()=>{qe(null),Ae(e=>!e)},children:[
|
|
84
|
+
/* @__PURE__ */H("span",{className:"flex-1",children:"Always on Top"}),ze&&/* @__PURE__ */H("svg",{className:"h-4 w-4 text-blue-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})]}),
|
|
85
|
+
/* @__PURE__ */H(x,{}),
|
|
86
|
+
/* @__PURE__ */H(b,{onClick:()=>{qe(null),dr()},children:"Close"})]}),
|
|
87
|
+
/* @__PURE__ */B("div",{onPointerDown:hr,ref:tt,className:`px-4 py-2 border-t border-gray-200 shrink-0 flex items-center justify-between text-xs select-none${Mn?"":" cursor-move"}${zt&&!Mn?" backdrop-blur-sm":""}${_||J||G||ue||!nt?" hidden":""}`,style:{touchAction:"none",backgroundColor:Mn?"rgb(var(--window-footer-rgb))":zt?"rgb(var(--window-footer-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-footer-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
88
|
+
/* @__PURE__ */B("div",{className:"flex items-center gap-2 min-w-0",children:[dt&&/* @__PURE__ */H(ce,{auto:!0}),j,
|
|
89
|
+
/* @__PURE__ */H("div",{ref:Ze,"data-modal-actions-left":!0,className:"flex items-center gap-2"}),k]}),
|
|
90
|
+
/* @__PURE__ */B("div",{className:"flex items-center gap-2 ml-auto",children:[
|
|
91
|
+
/* @__PURE__ */H("div",{ref:Ge,"data-modal-actions":!0,className:"flex items-center gap-2"}),O]})]}),!_&&!ue&&!Kt&&zt&&!zn&&/* @__PURE__ */B(F,{children:[
|
|
92
|
+
/* @__PURE__ */H("div",{onPointerDown:e=>mr(e,"se"),className:"absolute bottom-0 right-0 w-3 h-3 cursor-nwse-resize z-10"}),
|
|
93
|
+
/* @__PURE__ */H("div",{onPointerDown:e=>mr(e,"sw"),className:"absolute bottom-0 left-0 w-3 h-3 cursor-nesw-resize z-10"}),
|
|
94
|
+
/* @__PURE__ */H("div",{onPointerDown:e=>mr(e,"ne"),className:"absolute top-0 right-0 w-3 h-3 cursor-nesw-resize z-10"}),
|
|
95
|
+
/* @__PURE__ */H("div",{onPointerDown:e=>mr(e,"nw"),className:"absolute top-0 left-0 w-3 h-3 cursor-nwse-resize z-10"}),
|
|
96
|
+
/* @__PURE__ */H("div",{onPointerDown:e=>mr(e,"n"),className:"absolute top-0 left-3 right-3 h-1 cursor-ns-resize"}),
|
|
97
|
+
/* @__PURE__ */H("div",{onPointerDown:e=>mr(e,"s"),className:"absolute bottom-0 left-3 right-3 h-1 cursor-ns-resize"}),
|
|
98
|
+
/* @__PURE__ */H("div",{onPointerDown:e=>mr(e,"e"),className:"absolute top-3 bottom-3 right-0 w-1 cursor-ew-resize"}),
|
|
99
|
+
/* @__PURE__ */H("div",{onPointerDown:e=>mr(e,"w"),className:"absolute top-3 bottom-3 left-0 w-1 cursor-ew-resize"})]}),Kt&&/* @__PURE__ */H("div",{className:"absolute inset-0",style:{zIndex:9999,cursor:"pointer",background:"transparent"},onMouseEnter:()=>Rt(!0),onMouseLeave:()=>Rt(!1),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),gn(Lt),Gn(!1)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:Wt&&/* @__PURE__ */H("button",{type:"button","data-expose-close":!0,"aria-label":Le.taskbar.closeWindow,title:"Close",className:"absolute flex items-center justify-center rounded-full bg-black/55 text-white shadow-lg ring-1 ring-white/40 transition-colors hover:bg-red-500",style:{top:8,right:8,width:30,height:30,transform:`scale(${1/kr})`,transformOrigin:"top right",zIndex:1e4},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onClick:e=>{e.stopPropagation(),e.preventDefault(),dr()},children:/* @__PURE__ */H("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.2,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})})]}),Kt&&xr&&/* @__PURE__ */H("div",{className:"fixed pointer-events-none select-none truncate text-center",style:{left:xr.x,top:xr.y+xr.h+4,width:xr.w,zIndex:Wt?2021:2011,color:"white",fontSize:12,fontWeight:500,textShadow:"0 1px 2px rgba(0,0,0,0.6)"},children:Mt(xe)})]}),Mr=Pe&&/* @__PURE__ */B(v,{style:{left:Pe.x,top:Pe.y},onClose:()=>De(null),minWidth:160,children:[!_&&!J&&!Mn&&/* @__PURE__ */B(F,{children:[
|
|
100
|
+
/* @__PURE__ */B(b,{onClick:()=>{vn(Lt),De(null)},children:[
|
|
101
|
+
/* @__PURE__ */H("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 12h-15"})}),Ce.minimize]}),!zn&&/* @__PURE__ */B(b,Kn?{onClick:()=>{Rn(!1),dn(Xt()),De(null)},children:[
|
|
102
|
+
/* @__PURE__ */H("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 4.5v15m6-15v15M4.5 9h15M4.5 15h15"})}),Ce.windowed]}:{onClick:()=>{yr(),De(null)},children:[
|
|
103
|
+
/* @__PURE__ */H("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"})}),Ce.maximize]})]}),U&&!Mn&&/* @__PURE__ */B(b,{onClick:()=>{Ae(e=>!e),De(null)},children:[
|
|
104
|
+
/* @__PURE__ */H("svg",{className:"h-4 w-4 "+(ze?"text-blue-600":"text-gray-400"),fill:ze?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9"})}),ze?Ce.unpin:Ce.pinOnTop]}),$e&&/* @__PURE__ */B(b,{onClick:()=>{De(null),He()},children:[
|
|
105
|
+
/* @__PURE__ */H("svg",{className:"h-4 w-4 "+(Be?"text-yellow-500":"text-gray-400"),fill:Be?"currentColor":"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */H("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"})}),Be?Le.taskbar.removeFromDesktop:Le.taskbar.addToDesktop]}),(Tt[Lt]||[]).length>0&&/* @__PURE__ */H(F,{children:(Tt[Lt]||[]).map((e,t)=>/* @__PURE__ */B(b,{onClick:()=>{De(null),e.onClick()},children:[e.icon,e.label]},t))}),!(Mn&&Ke?.home)&&/* @__PURE__ */B(F,{children:[
|
|
106
|
+
/* @__PURE__ */H(x,{}),
|
|
107
|
+
/* @__PURE__ */B(b,{danger:!0,onClick:()=>{De(null),dr()},children:[
|
|
108
|
+
/* @__PURE__ */H(V,{className:"h-4 w-4"}),Ce.close]})]})]}),Er=!!oe&&kt.some(e=>e.id===oe),Nr=!At||Er||_?null:/* @__PURE__ */B("div",{"data-modal-restore-tab":!0,"data-modal-id":Lt,className:"fixed left-1/2 z-[1200] flex -translate-x-1/2 items-center gap-1 rounded-lg border border-gray-300 bg-white px-1.5 py-1 shadow-lg",style:{bottom:"calc(var(--taskbar-height, 0px) + 12px)"},children:[
|
|
109
|
+
/* @__PURE__ */H("button",{type:"button",onClick:()=>gn(Lt),title:Ce.restore,className:"max-w-[16rem] truncate rounded px-2 py-0.5 text-sm font-medium text-gray-700 hover:bg-gray-100 hover:text-gray-900",children:Me||Ce.windowSuffix}),
|
|
110
|
+
/* @__PURE__ */H("button",{type:"button",onClick:()=>gn(Lt),title:Ce.restore,"aria-label":Ce.restore,className:"rounded px-1.5 py-0.5 text-xs leading-none text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:"▴"}),
|
|
111
|
+
/* @__PURE__ */H("button",{type:"button",onClick:()=>{dr()},title:Ce.close,"aria-label":Ce.close,className:"rounded px-1.5 py-0.5 text-xs leading-none text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:"✕"})]});return q(
|
|
112
|
+
/* @__PURE__ */B(xt.Provider,{value:null,children:[Cr,Mr,Nr]}),document.body)}"undefined"!=typeof window&&window.addEventListener("keydown",e=>{Un&&"Escape"===e.key&&(cr(null),Gn(!1))});var pr=100,fr={past:[],future:[]};function wr(e,t){switch(t.type){case"record":{const n=e.past[e.past.length-1];if(null!==t.step.coalesceKey&&n?.coalesceKey===t.step.coalesceKey)return 0===e.future.length?e:{...e,future:[]};const r=[...e.past,t.step];return{past:r.length>pr?r.slice(r.length-pr):r,future:[]}}case"undo":return 0===e.past.length?e:{past:e.past.slice(0,-1),future:[t.redoStep,...e.future]};case"redo":return 0===e.future.length?e:{past:[...e.past,t.undoStep],future:e.future.slice(1)};case"clear":return 0===e.past.length&&0===e.future.length?e:fr}}var yr=/* @__PURE__ */new Set(["INPUT","TEXTAREA","SELECT"]);var gr=500,vr=250;function br({children:e,canEdit:t=!0,perms:n,windowId:r}){const[o,i]=R(wr,fr),a=A(/* @__PURE__ */new Map),[l,s]=P(0),c=l>0,[d,u]=P(0),[m,p]=P(0),f=m>0,{hasAnyPerm:w}=h(),y=t&&0===d&&(!(n&&n.length>0)||w(n)),g=A(null),v=A(!1),b=D(()=>{const e={};for(const[t,n]of a.current)e[t]=n.getLast();return e},[]),x=D((e,t)=>{a.current.has(e)||s(e=>e+1),a.current.set(e,t)},[]),k=D(e=>{a.current.delete(e)&&s(e=>e-1)},[]),L=D(e=>{u(t=>t+(e?1:-1))},[]),C=D(e=>{p(t=>t+(e?1:-1))},[]),[M,E]=P(0),N=M>0,z=D(e=>{E(t=>t+(e?1:-1))},[]),I=T(le),K=I?.claimReadOnly;S(()=>{if(K&&!y)return K(!0),()=>K(!1)},[K,y]);const W=I?.claimOwnMount;S(()=>{if(W&&N)return W(!0),()=>W(!1)},[W,N]);const O=A({last:0,count:0,tripped:!1}),j=A(!1),F=D((e,t,n)=>{if(v.current)return void(n&&function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}(n.prev,n.next)||(j.current=!0));if(!y||g.current)return;const r=O.current;if(r.tripped)return;const o=Date.now();if(o-r.last>vr&&(r.count=0),r.last=o,++r.count>gr)return r.tripped=!0,void console.error(`[efficient-shell] UndoProvider: "${e}" recorded ${gr} undo steps with no pause between them, which no user action can do. The value passed to useUndoable for this slice is almost certainly rebuilt on every render (a .map/.filter/object literal in the call) rather than held in state, so it reads as changed every time — and since recording a step re-renders the form, that is a loop. Undo recording is now off for this form to keep the tab responsive.`);g.current={values:b(),label:e,coalesceKey:t},queueMicrotask(()=>{const e=g.current;g.current=null,e&&i({type:"record",step:e})})},[y,b]),q=D(e=>{for(const[t,n]of Object.entries(e)){const e=a.current.get(t);e&&(e.setLast(n),e.apply(n))}},[]),V=D(()=>{const e=o.past[o.past.length-1];if(!e)return;const t={values:b(),label:e.label,coalesceKey:null};q(e.values),i({type:"undo",redoStep:t})},[o.past,b,q]),Y=D(()=>{const e=o.future[0];if(!e)return;const t={values:b(),label:e.label,coalesceKey:null};q(e.values),i({type:"redo",undoStep:t})},[o.future,b,q]),[U,X]=P(0),_=A(0),J=A(0),G=A(!1),Z=D(()=>{v.current=!0,j.current=!1,g.current=null,_.current+=1,J.current=_.current,X(_.current)},[]),Q=A(void 0),ee=D(e=>{void 0!==e&&(void 0!==Q.current&&e!==Q.current&&(G.current=!0),Q.current=e),Z()},[Z]);S(()=>{v.current&&U===J.current&&(v.current=!1,g.current=null,(j.current||G.current)&&i({type:"clear"}),j.current=!1,G.current=!1)},[U]);const te=D(()=>{G.current=!0,i({type:"clear"}),Z()},[Z]),ne=y&&o.past.length>0,re=y&&o.future.length>0,oe=Yn(r),ie=A({undo:V,redo:Y,canUndo:ne,canRedo:re});ie.current={undo:V,redo:Y,canUndo:ne,canRedo:re},S(()=>{if(!oe||!y)return;const e=e=>{const t=function(e){if(!e.metaKey&&!e.ctrlKey||e.altKey)return null;const t=e.key.toLowerCase(),n="z"===t?e.shiftKey?"redo":"undo":"y"!==t||!e.ctrlKey||e.metaKey||e.shiftKey?null:"redo";if(!n)return null;const r=e.target;return r?.isContentEditable||r?.tagName&&yr.has(r.tagName.toUpperCase())?null:n}(e);if(!t)return;const n=ie.current;("undo"===t?n.canUndo:n.canRedo)&&(e.preventDefault(),"undo"===t?n.undo():n.redo())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[oe,y]);const ae=$(()=>({register:x,unregister:k,record:F,undo:V,redo:Y,clear:te,baseline:ee,canUndo:ne,canRedo:re,enabled:y,hasState:c,handMounted:N,claimOwnMount:z,claimReadOnly:L,declaredEditable:f,claimEditable:C,undoLabel:ne?o.past[o.past.length-1].label:null,redoLabel:re?o.future[0].label:null}),[x,k,F,V,Y,te,ee,ne,re,y,c,N,z,L,f,C,o.past,o.future]),se=""!==Dt(),de=T(It)?.footerOpen??!1,ue=se&&y&&c&&!N&&de;/* @__PURE__ */
|
|
113
|
+
return B(le.Provider,{value:ae,children:[ue&&/* @__PURE__ */H(Kt,{position:"left",quiet:!0,children:/* @__PURE__ */H(ce,{auto:!0})}),e]})}function xr(){const e=T(le),t=D(()=>{},[]);return{undo:e?.undo??t,redo:e?.redo??t,clear:e?.clear??t,baseline:e?.baseline??t,canUndo:e?.canUndo??!1,canRedo:e?.canRedo??!1,undoLabel:e?.undoLabel??null,redoLabel:e?.redoLabel??null,enabled:e?.enabled??!1,hasState:e?.hasState??!1}}function kr(e){const t=T(le),n=t?.claimReadOnly,r=t?.claimEditable;S(()=>{const t=e?r:n;if(t)return t(!0),()=>t(!1)},[n,r,e])}function Lr(e,t,n){const r=T(le),o=O(),i=A(e),a=A(t);a.current=t,S(()=>{if(r)return r.register(o,{getLast:()=>i.current,setLast:e=>{i.current=e},apply:e=>a.current(e)}),()=>r.unregister(o)},[r,o]);const{label:l,coalesceKey:s=null}=n,c=A(r);c.current=r;const d=A({label:l,coalesceKey:s});d.current={label:l,coalesceKey:s},S(()=>{const t=c.current;t&&(Object.is(e,i.current)||(t.record(d.current.label,d.current.coalesceKey,{prev:i.current,next:e}),i.current=e))},[e])}function Cr(e,t){const[n,r]=P(e);return Lr(n,e=>r(()=>e),t),[n,r]}export{Wt as CancelButton,Pt as CopyButton,Ke as DocFavStar,Ce as EntityWindowFallback,ke as EntityWindowLoading,Me as EntityWindowState,be as LoadingSpinner,Ct as MODAL_SUBMIT_SELECTOR,mr as Modal,Kt as ModalActions,ce as UndoControls,br as UndoProvider,Q as WINDOW_REGISTRY,ie as WindowCrashedFallback,ae as WindowErrorBoundary,et as WindowManagerProvider,At as WindowTitle,je as activateWindowById,ut as beginWindowGesture,wn as cancelWindowFront,oe as client_default,dr as commitExposeHighlight,ht as drainPerfEvents,Qn as exitExposeMode,_t as forgetMaximizedWindowBoxes,Fn as getActiveModalId,qe as getActiveWindowRoute,sr as getExposeHighlight,vt as getWindowChromeVersion,Ut as getWindowPosition,Ne as isDraftEntityId,Te as isDraftEntityWindow,J as isEntityEntry,_ as isPageEntry,ne as isShellApiClientConfigured,Be as isTabWindow,dt as markMenuOpen,yt as readWindowChrome,fn as requestWindowFront,cr as setExposeHighlight,ct as setPerfCollecting,te as setShellApiClient,ye as setShellHomeRoute,Z as setShellWindowRegistry,Yt as setWindowDefaultPosition,Xt as setWindowPosition,lr as subscribeExposeHighlight,gt as subscribeWindowChrome,Zn as toggleExposeMode,un as useCurrentTabKey,Dt as useEnclosingModalId,Yn as useIsActiveWindow,$t as useModalActive,xr as useUndo,kr as useUndoCanEdit,Lr as useUndoable,Cr as useUndoableState,Nt as useWidgetSettings,Se as useWindowDirty,Ie as useWindowManager,zt as useWindowMenuItem,St as useWindowTitle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-
|
|
2
|
+
export{FileIntakeAlert,acceptsFile,useFileIntake}from"../chunk-E3F2TEYY.js";import"../chunk-T63C3VVZ.js";
|
|
@@ -499,6 +499,24 @@ interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
|
499
499
|
/** Append a red asterisk. */
|
|
500
500
|
required?: boolean;
|
|
501
501
|
}
|
|
502
|
+
interface LabelClassesOptions {
|
|
503
|
+
/**
|
|
504
|
+
* The label's look without its block layout. `Label` is a block with a
|
|
505
|
+
* margin under it, which is right above a field and wrong beside a check
|
|
506
|
+
* box, in a row with its control, or `sr-only` — and a class passed to
|
|
507
|
+
* `Label` is appended, not merged, so a host could not take the layout back
|
|
508
|
+
* off. `inline` leaves the size, weight and ink and drops the layout, for the
|
|
509
|
+
* host to lay out as it needs.
|
|
510
|
+
*/
|
|
511
|
+
inline?: boolean;
|
|
512
|
+
className?: string;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* The classes `Label` draws with, for a label a host lays out itself — the same
|
|
516
|
+
* idea as `inputClasses` and `buttonClasses`: one string, so a host's own
|
|
517
|
+
* `<label>` and the kit's can never drift apart. `Label` renders through it.
|
|
518
|
+
*/
|
|
519
|
+
declare function labelClasses({ inline, className }?: LabelClassesOptions): string;
|
|
502
520
|
declare function Label({ required, children, className, ...rest }: LabelProps): react_jsx_runtime.JSX.Element;
|
|
503
521
|
|
|
504
522
|
interface ShellStrings {
|
|
@@ -879,6 +897,35 @@ interface ShellStrings {
|
|
|
879
897
|
sidebar: {
|
|
880
898
|
resize: string;
|
|
881
899
|
};
|
|
900
|
+
/** Layout Mode — the Desktop and Sidebar layouts, the Sidebar layout's menu
|
|
901
|
+
* rail and its strip of open windows. */
|
|
902
|
+
layout: {
|
|
903
|
+
/** The two choices in Preferences → Customization → Layout Mode. */
|
|
904
|
+
desktop: string;
|
|
905
|
+
sidebar: string;
|
|
906
|
+
/** The one-click switches: the rail's account menu, the Start menu and
|
|
907
|
+
* the taskbar's right-click menu. */
|
|
908
|
+
switchToDesktop: string;
|
|
909
|
+
switchToSidebar: string;
|
|
910
|
+
collapseSidebar: string;
|
|
911
|
+
expandSidebar: string;
|
|
912
|
+
/** The rail's search box (it opens the search palette). */
|
|
913
|
+
search: string;
|
|
914
|
+
/** The rail's accessible name. */
|
|
915
|
+
navLabel: string;
|
|
916
|
+
/** The strip of open windows' accessible name. */
|
|
917
|
+
openWindows: string;
|
|
918
|
+
/** The tag on a page result in the search palette. */
|
|
919
|
+
pageResult: string;
|
|
920
|
+
/** The account menu at the foot of the rail. */
|
|
921
|
+
accountMenu: (name: string) => string;
|
|
922
|
+
profile: string;
|
|
923
|
+
notifications: string;
|
|
924
|
+
reportIssue: string;
|
|
925
|
+
signOut: string;
|
|
926
|
+
signOutTitle: string;
|
|
927
|
+
signOutMessage: string;
|
|
928
|
+
};
|
|
882
929
|
/** `MarkdownLite`. */
|
|
883
930
|
markdown: {
|
|
884
931
|
/** Before an image placeholder's caption, with an em dash between. */
|
|
@@ -4784,6 +4831,11 @@ interface GlobalSearchProps extends Partial<SearchConfig> {
|
|
|
4784
4831
|
*/
|
|
4785
4832
|
onSelect?: (result: SearchResult) => void;
|
|
4786
4833
|
}
|
|
4834
|
+
/**
|
|
4835
|
+
* Open the search palette, as ⌘K does — for a search box that is a button
|
|
4836
|
+
* (Sidebar mode's rail). A no-op when no `GlobalSearch` is mounted.
|
|
4837
|
+
*/
|
|
4838
|
+
declare function openGlobalSearch(): void;
|
|
4787
4839
|
declare function GlobalSearch({ providers, typeIcons, placeholder: placeholderProp, onSelect }?: GlobalSearchProps): react.ReactPortal | null;
|
|
4788
4840
|
|
|
4789
4841
|
/**
|
|
@@ -7141,4 +7193,4 @@ declare function ChordChart({ labels, matrix, size, maxNodes, padAngle, arcWidth
|
|
|
7141
7193
|
* string when the source is consumed without a build (e.g. tests). */
|
|
7142
7194
|
declare const VERSION: string;
|
|
7143
7195
|
|
|
7144
|
-
export { type BudgetBarProps as $, ALT as A, type BackgroundVariant as B, type ColumnDef as C, type BandScale as D, Banner as E, type BannerEmphasis as F, type BannerProps as G, type BannerTone as H, BarChart as I, type BarChartProps as J, type BoxPlotBox as K, BoxPlotChart as L, type BoxPlotChartProps as M, BrandAssetEditor as N, type BrandAssetEditorProps as O, type PaginatedResponse as P, type BrandAssetPreview as Q, BrandMark as R, type SearchConfig as S, type BrandMarkProps as T, type BrandMarkSlot as U, type BrandMarkSurface as V, type BrandMarkTreatment as W, type BreadcrumbItem as X, Breadcrumbs as Y, type BreadcrumbsProps as Z, BudgetBar as _, type SortState as a, ContainerFillChart as a$, type BudgetState as a0, Button as a1, type ButtonClassesOptions as a2, type ButtonProps as a3, type ButtonSize as a4, type ButtonVariant as a5, CHART_INK as a6, CMD_A as a7, CMD_DOT as a8, CMD_ENTER as a9, ChartHighlightProvider as aA, type ChartLegendEntry as aB, type ChartLegendSwatch as aC, type ChartRange as aD, type ChartReferenceLine as aE, type ChartRevealDirection as aF, ChartSkeleton as aG, type ChartSkeletonProps as aH, type ChartStatusTone as aI, type ChartStrokeVariant as aJ, ChartTooltip as aK, type ChartTooltipProps as aL, type ChartTooltipRow as aM, ChatTemplate as aN, Checkbox as aO, type CheckboxProps as aP, CheckoutTemplate as aQ, ChordChart as aR, type ChordChartProps as aS, ColoredBadge as aT, type ColoredBadgeProps as aU, ColumnChart as aV, type ColumnChartProps as aW, type ColumnSeries as aX, ComposerAttachments as aY, type ComposerAttachmentsProps as aZ, ConfirmProvider as a_, CMD_K as aa, CMD_S as ab, Calendar as ac, type CalendarMode as ad, type CalendarProps as ae, type Candle as af, CandlestickChart as ag, type CandlestickChartProps as ah, Card as ai, type CardPadding as aj, type CardProps as ak, CartesianPlot as al, type CartesianPlotProps as am, type CellStyle as an, type ChartBackgroundVariant as ao, ChartBrush as ap, type ChartBrushProps as aq, type ChartCurve as ar, ChartDefs as as, type ChartDefsProps as at, ChartDot as au, type ChartDotProps as av, type ChartDotVariant as aw, type ChartFillVariant as ax, ChartFrame as ay, type ChartFrameProps as az, ALT_SHIFT_D as b, FilePicker as b$, type ContainerFillChartProps as b0, type ContainerFillItem as b1, CountBadge as b2, type CountBadgeProps as b3, type CountBadgeTone as b4, type Curve as b5, DAY_MS as b6, DEFAULT_SHELL_STRINGS as b7, DashboardTemplate as b8, DataTable as b9, Drawer as bA, type DrawerProps as bB, type DrawerSide as bC, type DrawerSize as bD, DropdownMenu as bE, type DropdownMenuAlign as bF, type DropdownMenuCheckboxItem as bG, type DropdownMenuDividerItem as bH, type DropdownMenuEntry as bI, type DropdownMenuItem as bJ, type DropdownMenuLabelItem as bK, type DropdownMenuLinkItem as bL, type DropdownMenuProps as bM, type DropdownMenuRadioItem as bN, type DropdownMenuSide as bO, type DropdownPositionOptions as bP, ENTER as bQ, EditableGrid as bR, type EditableGridProps as bS, EmailTemplate as bT, EmptyState as bU, type EmptyStateProps as bV, ErrorBoundary as bW, type ErrorBoundaryProps as bX, ErrorPage as bY, type ErrorPageProps as bZ, type FileIntake as b_, type DataTableColumn as ba, type DataTableColumnGroup as bb, type DataTableHeader as bc, DataTablePage as bd, type DataTableProps as be, type DataTableRowLink as bf, type DataTableRowProps as bg, DatePicker as bh, type DatePickerProps as bi, DateRangePicker as bj, type DateRangePickerProps as bk, DateTimePicker as bl, type DateTimePickerProps as bm, type DescriptionColumns as bn, type DescriptionItem as bo, DescriptionList as bp, type DescriptionListProps as bq, Dialog as br, type DialogProps as bs, type DialogSize as bt, Divider as bu, type DividerProps as bv, type DividerSpacing as bw, DonutChart as bx, type DonutChartProps as by, type DonutSegment as bz, ALT_SHIFT_E as c, MAX_FRACTION_DIGITS as c$, type FilePickerProps as c0, type FillVariant as c1, type FormError as c2, FormErrorSummary as c3, type FormErrorSummaryProps as c4, FormField as c5, type FormFieldProps as c6, FormLayoutPage as c7, type FormatDateOptions as c8, FunnelChart as c9, type IconButtonProps as cA, Inline as cB, type InlineProps as cC, Input as cD, InputNumber as cE, type InputNumberProps as cF, type InputProps as cG, type InputSize as cH, type Justify as cI, Kanban as cJ, type KanbanColumn as cK, type KanbanProps as cL, Kbd as cM, type KbdProps as cN, type KbdSize as cO, Label as cP, type LabelProps as cQ, type LadderScale as cR, LineChart as cS, type LineChartProps as cT, type LineChartSeries as cU, type LinearScale as cV, ListFooter as cW, ListLoadError as cX, type ListLoadErrorProps as cY, LoadingSpinner as cZ, type LoadingSpinnerProps as c_, type FunnelChartProps as ca, type FunnelStage as cb, GLASS_DIVIDER as cc, GLASS_INPUT_BG as cd, GROUP_COLORS as ce, GROUP_COLORS_SOLID as cf, GalleryTemplate as cg, type Gap as ch, GlobalSearch as ci, type GlobalSearchProps as cj, Grid as ck, type GridCols as cl, type GridColumn as cm, type GridProps as cn, HeatmapChart as co, type HeatmapChartProps as cp, HelpCenter as cq, type HelpCenterDoc as cr, type HelpCenterProps as cs, type HistogramBin as ct, HistogramChart as cu, type HistogramChartProps as cv, INPUT_BASE as cw, INPUT_SIZES as cx, IconButton as cy, type IconButtonClassesOptions as cz, ALT_SHIFT_N as d, RadarChart as d$, MENU_MAX_HEIGHT as d0, MOD as d1, MOTION as d2, Markdown as d3, type MarkdownProps as d4, MediaUploadField as d5, type MediaUploadFieldProps as d6, MediaUploadGrid as d7, type MediaUploadGridItem as d8, type MediaUploadGridProps as d9, type PieSegment as dA, type PlotGeometry as dB, type Point as dC, Popover as dD, type PopoverAlign as dE, type PopoverProps as dF, type PopoverRenderProps as dG, type PopoverSide as dH, PopupMenu as dI, PopupMenuDivider as dJ, PopupMenuItem as dK, type PopupMenuItemProps as dL, PopupMenuLabel as dM, type PopupMenuProps as dN, PopupSubmenu as dO, type PopupSubmenuProps as dP, type PortalBrandingContextValue as dQ, PortalBrandingProvider as dR, type PortalBrandingProviderProps as dS, ProductionTimeline as dT, type ProductionTimelineProps as dU, type ProductionTimelineSnapshot as dV, type ProgressItem as dW, type PublicPortal as dX, type PublicPortalBranding as dY, RADAR_SERIES_CAP as dZ, type RadarAxis as d_, type MenuPos as da, Meter as db, type MeterProps as dc, MetricBar as dd, type MetricBarProps as de, type Milestone as df, type MilestoneKind as dg, MilestoneTimeline as dh, type MilestoneTimelineProps as di, NEXT_CHUNK_PATH_PREFIX as dj, NativeSelect as dk, NumericKeypad as dl, type NumericKeypadProps as dm, OVERLAY_OPEN_EVENT as dn, POPUP_MAX_WIDTH as dp, POST_PRODUCTION_STATUSES as dq, PageHeader as dr, type PageHeaderProps as ds, Pagination as dt, type PaginationProps as du, PaperclipGlyph as dv, Paragraph as dw, type ParagraphProps as dx, PieChart as dy, type PieChartProps as dz, APP_UPDATE_POLL_MS as e, SidebarLayout as e$, type RadarChartProps as e0, type RadarSeries as e1, RadialBarChart as e2, type RadialBarChartProps as e3, type RadialBarRow as e4, Radio as e5, RadioGroup as e6, type RadioGroupOption as e7, type RadioGroupOrientation as e8, type RadioGroupProps as e9, type ScatterChartProps as eA, type ScatterPoint as eB, type ScatterSeries as eC, type SearchProvider as eD, type SearchResult as eE, type SearchableOption as eF, SearchableSelect as eG, type SearchableSelectProps as eH, Segmented as eI, type SegmentedOption as eJ, type SegmentedProps as eK, type SegmentedSize as eL, Select as eM, type SelectOption as eN, type SelectProps as eO, type SemanticGroup as eP, SettingRow as eQ, type SettingRowProps as eR, type SeverityTone as eS, type ShellPrefsAdapter as eT, ShellPrefsProvider as eU, type ShellStrings as eV, type ShellStringsOverride as eW, ShellStringsProvider as eX, SidebarActionButton as eY, type SidebarActionButtonProps as eZ, SidebarGroupLabel as e_, type RadioProps as ea, type Range as eb, RangeChart as ec, type RangeChartProps as ed, type RangeRow as ee, RankedBars as ef, type RankedBarsProps as eg, type RankedBarsRow as eh, type ResolvedPortalBrandAsset as ei, Result as ej, type ResultProps as ek, type ResultStatus as el, type RevealDirection as em, SCATTER_SERIES_CAP as en, SERIES_SLOT_COUNT as eo, SERIES_VARS as ep, SHIFT as eq, STAGES as er, STALE_CHUNK_RELOAD_COOLDOWN_MS as es, STALE_CHUNK_RELOAD_KEY as et, STATUS_VARS as eu, SankeyChart as ev, type SankeyChartProps as ew, type SankeyLink as ex, type SankeyNode as ey, ScatterChart as ez, Accordion as f, type TimelineTrackItem as f$, type SidebarLayoutProps as f0, SidebarNavItem as f1, type SidebarNavItemProps as f2, Skeleton as f3, type SkeletonProps as f4, type SkeletonVariant as f5, Snippet as f6, type SnippetProps as f7, type SnippetSize as f8, type SnippetVariant as f9, type TabItem as fA, Tabs as fB, type TabsProps as fC, TagInput as fD, type TagInputOption as fE, type TagInputProps as fF, Text as fG, type TextProps as fH, type TextSize as fI, type TextTone as fJ, type TextWeight as fK, Textarea as fL, type TextareaProps as fM, type Theme as fN, TileButton as fO, type TileButtonProps as fP, type TileSize as fQ, TimePicker as fR, type TimePickerProps as fS, TimeSeriesChart as fT, type TimeSeriesChartProps as fU, type TimeSeriesSeries as fV, type TimelineMarker as fW, type TimelineMarkerKind as fX, type TimelineReport as fY, type TimelineScrubProgress as fZ, TimelineTrack as f_, Sparkline as fa, type SparklineProps as fb, Stack as fc, type StackProps as fd, type StaleChunkReloadOptions as fe, StatCard as ff, type StatCardProps as fg, StatTile as fh, type StatTileProps as fi, Statistic as fj, type StatisticProps as fk, type StatisticSize as fl, type StatisticTone as fm, StatusBadge as fn, StatusBadgeProvider as fo, type StatusEmphasis as fp, type StepItem as fq, Stepper as fr, type StepperProps as fs, type StrokeVariant as ft, SunburstChart as fu, type SunburstChartProps as fv, type SunburstNode as fw, Switch as fx, type SwitchProps as fy, type SwitchSize as fz, type AccordionItem as g, isMac as g$, type TimelineTrackKind as g0, type TimelineTrackPending as g1, type TimelineTrackPhase as g2, type TimelineTrackPlayback as g3, type TimelineTrackProps as g4, type TimelineTrackThumb as g5, Title as g6, type TitleLevel as g7, type TitleProps as g8, type ToastOptions as g9, backspace as gA, bandScale as gB, binValues as gC, budgetState as gD, bumpPath as gE, buttonClasses as gF, calcOverall as gG, calcReportOverall as gH, confirm as gI, confirmDestructive as gJ, curvePath as gK, dashFor as gL, dismissPopups as gM, fillFor as gN, fillId as gO, firstDayOfWeek as gP, fmtSliderDate as gQ, formatDate as gR, fromKey as gS, glassStyle as gT, glowId as gU, groundId as gV, groupColors as gW, highlightOpacity as gX, iconButtonClasses as gY, inputClasses as gZ, installStaleChunkReload as g_, type ToastPlacement as ga, Tooltip as gb, type TooltipProps as gc, TopNav as gd, type TopNavItem as ge, type TopNavProps as gf, TreemapChart as gg, type TreemapChartProps as gh, type TreemapItem as gi, type TreemapTile as gj, type UseAppUpdateOptions as gk, type UseProductionTimelineOpts as gl, VERSION as gm, VITE_PRELOAD_ERROR_EVENT as gn, WaterfallChart as go, type WaterfallChartProps as gp, type WaterfallStep as gq, type ZLayer as gr, Z_LAYERS as gs, angleScale as gt, appendKey as gu, applyThemePrefs as gv, arcPath as gw, areaBetween as gx, areaFrom as gy, autoHighlightIndex as gz, type AccordionProps as h, isSeverityTone as h0, isStaleChunkError as h1, ladderScale as h2, linearPath as h3, linearScale as h4, logScale as h5, maskId as h6, mediaFileName as h7, monotonePath as h8, niceMax as h9, useIsMobile as hA, useLocalStoragePrefs as hB, usePlotWidth as hC, usePortalBranding as hD, useProductionTimeline as hE, useScrollLock as hF, useShellLocale as hG, useShellPrefs as hH, useShellStrings as hI, useTheme as hJ, polygonPoints as ha, popupBounds as hb, prompt as hc, radiusScale as hd, resolveBrandMarkTreatment as he, resolvePortalBrandAsset as hf, resolveSeriesColor as hg, resolveTheme as hh, seriesColor as hi, severityOf as hj, splinePath as hk, squarify as hl, stagger as hm, stepPath as hn, tabButtonId as ho, tabPanelId as hp, toKey as hq, toDayMs as hr, toISODate as hs, toast as ht, useAppUpdate as hu, useClickOutside as hv, useConfirm as hw, useDropdownPosition as hx, useFocusTrap as hy, useHighlight as hz, type Align as i, type AngleScale as j, AppUpdateBanner as k, type AppUpdateBannerProps as l, AttachButton as m, type AttachButtonProps as n, AttachmentDropZone as o, type AttachmentDropZoneProps as p, AttachmentList as q, type AttachmentListProps as r, AuthScreen as s, type AuthScreenProps as t, Avatar as u, AvatarGroup as v, type AvatarGroupProps as w, type AvatarProps as x, type AvatarSize as y, type AvatarStatus as z };
|
|
7196
|
+
export { type BudgetBarProps as $, ALT as A, type BackgroundVariant as B, type ColumnDef as C, type BandScale as D, Banner as E, type BannerEmphasis as F, type BannerProps as G, type BannerTone as H, BarChart as I, type BarChartProps as J, type BoxPlotBox as K, BoxPlotChart as L, type BoxPlotChartProps as M, BrandAssetEditor as N, type BrandAssetEditorProps as O, type PaginatedResponse as P, type BrandAssetPreview as Q, BrandMark as R, type SearchConfig as S, type BrandMarkProps as T, type BrandMarkSlot as U, type BrandMarkSurface as V, type BrandMarkTreatment as W, type BreadcrumbItem as X, Breadcrumbs as Y, type BreadcrumbsProps as Z, BudgetBar as _, type SortState as a, ContainerFillChart as a$, type BudgetState as a0, Button as a1, type ButtonClassesOptions as a2, type ButtonProps as a3, type ButtonSize as a4, type ButtonVariant as a5, CHART_INK as a6, CMD_A as a7, CMD_DOT as a8, CMD_ENTER as a9, ChartHighlightProvider as aA, type ChartLegendEntry as aB, type ChartLegendSwatch as aC, type ChartRange as aD, type ChartReferenceLine as aE, type ChartRevealDirection as aF, ChartSkeleton as aG, type ChartSkeletonProps as aH, type ChartStatusTone as aI, type ChartStrokeVariant as aJ, ChartTooltip as aK, type ChartTooltipProps as aL, type ChartTooltipRow as aM, ChatTemplate as aN, Checkbox as aO, type CheckboxProps as aP, CheckoutTemplate as aQ, ChordChart as aR, type ChordChartProps as aS, ColoredBadge as aT, type ColoredBadgeProps as aU, ColumnChart as aV, type ColumnChartProps as aW, type ColumnSeries as aX, ComposerAttachments as aY, type ComposerAttachmentsProps as aZ, ConfirmProvider as a_, CMD_K as aa, CMD_S as ab, Calendar as ac, type CalendarMode as ad, type CalendarProps as ae, type Candle as af, CandlestickChart as ag, type CandlestickChartProps as ah, Card as ai, type CardPadding as aj, type CardProps as ak, CartesianPlot as al, type CartesianPlotProps as am, type CellStyle as an, type ChartBackgroundVariant as ao, ChartBrush as ap, type ChartBrushProps as aq, type ChartCurve as ar, ChartDefs as as, type ChartDefsProps as at, ChartDot as au, type ChartDotProps as av, type ChartDotVariant as aw, type ChartFillVariant as ax, ChartFrame as ay, type ChartFrameProps as az, ALT_SHIFT_D as b, FilePicker as b$, type ContainerFillChartProps as b0, type ContainerFillItem as b1, CountBadge as b2, type CountBadgeProps as b3, type CountBadgeTone as b4, type Curve as b5, DAY_MS as b6, DEFAULT_SHELL_STRINGS as b7, DashboardTemplate as b8, DataTable as b9, Drawer as bA, type DrawerProps as bB, type DrawerSide as bC, type DrawerSize as bD, DropdownMenu as bE, type DropdownMenuAlign as bF, type DropdownMenuCheckboxItem as bG, type DropdownMenuDividerItem as bH, type DropdownMenuEntry as bI, type DropdownMenuItem as bJ, type DropdownMenuLabelItem as bK, type DropdownMenuLinkItem as bL, type DropdownMenuProps as bM, type DropdownMenuRadioItem as bN, type DropdownMenuSide as bO, type DropdownPositionOptions as bP, ENTER as bQ, EditableGrid as bR, type EditableGridProps as bS, EmailTemplate as bT, EmptyState as bU, type EmptyStateProps as bV, ErrorBoundary as bW, type ErrorBoundaryProps as bX, ErrorPage as bY, type ErrorPageProps as bZ, type FileIntake as b_, type DataTableColumn as ba, type DataTableColumnGroup as bb, type DataTableHeader as bc, DataTablePage as bd, type DataTableProps as be, type DataTableRowLink as bf, type DataTableRowProps as bg, DatePicker as bh, type DatePickerProps as bi, DateRangePicker as bj, type DateRangePickerProps as bk, DateTimePicker as bl, type DateTimePickerProps as bm, type DescriptionColumns as bn, type DescriptionItem as bo, DescriptionList as bp, type DescriptionListProps as bq, Dialog as br, type DialogProps as bs, type DialogSize as bt, Divider as bu, type DividerProps as bv, type DividerSpacing as bw, DonutChart as bx, type DonutChartProps as by, type DonutSegment as bz, ALT_SHIFT_E as c, type LoadingSpinnerProps as c$, type FilePickerProps as c0, type FillVariant as c1, type FormError as c2, FormErrorSummary as c3, type FormErrorSummaryProps as c4, FormField as c5, type FormFieldProps as c6, FormLayoutPage as c7, type FormatDateOptions as c8, FunnelChart as c9, type IconButtonProps as cA, Inline as cB, type InlineProps as cC, Input as cD, InputNumber as cE, type InputNumberProps as cF, type InputProps as cG, type InputSize as cH, type Justify as cI, Kanban as cJ, type KanbanColumn as cK, type KanbanProps as cL, Kbd as cM, type KbdProps as cN, type KbdSize as cO, Label as cP, type LabelClassesOptions as cQ, type LabelProps as cR, type LadderScale as cS, LineChart as cT, type LineChartProps as cU, type LineChartSeries as cV, type LinearScale as cW, ListFooter as cX, ListLoadError as cY, type ListLoadErrorProps as cZ, LoadingSpinner as c_, type FunnelChartProps as ca, type FunnelStage as cb, GLASS_DIVIDER as cc, GLASS_INPUT_BG as cd, GROUP_COLORS as ce, GROUP_COLORS_SOLID as cf, GalleryTemplate as cg, type Gap as ch, GlobalSearch as ci, type GlobalSearchProps as cj, Grid as ck, type GridCols as cl, type GridColumn as cm, type GridProps as cn, HeatmapChart as co, type HeatmapChartProps as cp, HelpCenter as cq, type HelpCenterDoc as cr, type HelpCenterProps as cs, type HistogramBin as ct, HistogramChart as cu, type HistogramChartProps as cv, INPUT_BASE as cw, INPUT_SIZES as cx, IconButton as cy, type IconButtonClassesOptions as cz, ALT_SHIFT_N as d, type RadarAxis as d$, MAX_FRACTION_DIGITS as d0, MENU_MAX_HEIGHT as d1, MOD as d2, MOTION as d3, Markdown as d4, type MarkdownProps as d5, MediaUploadField as d6, type MediaUploadFieldProps as d7, MediaUploadGrid as d8, type MediaUploadGridItem as d9, type PieChartProps as dA, type PieSegment as dB, type PlotGeometry as dC, type Point as dD, Popover as dE, type PopoverAlign as dF, type PopoverProps as dG, type PopoverRenderProps as dH, type PopoverSide as dI, PopupMenu as dJ, PopupMenuDivider as dK, PopupMenuItem as dL, type PopupMenuItemProps as dM, PopupMenuLabel as dN, type PopupMenuProps as dO, PopupSubmenu as dP, type PopupSubmenuProps as dQ, type PortalBrandingContextValue as dR, PortalBrandingProvider as dS, type PortalBrandingProviderProps as dT, ProductionTimeline as dU, type ProductionTimelineProps as dV, type ProductionTimelineSnapshot as dW, type ProgressItem as dX, type PublicPortal as dY, type PublicPortalBranding as dZ, RADAR_SERIES_CAP as d_, type MediaUploadGridProps as da, type MenuPos as db, Meter as dc, type MeterProps as dd, MetricBar as de, type MetricBarProps as df, type Milestone as dg, type MilestoneKind as dh, MilestoneTimeline as di, type MilestoneTimelineProps as dj, NEXT_CHUNK_PATH_PREFIX as dk, NativeSelect as dl, NumericKeypad as dm, type NumericKeypadProps as dn, OVERLAY_OPEN_EVENT as dp, POPUP_MAX_WIDTH as dq, POST_PRODUCTION_STATUSES as dr, PageHeader as ds, type PageHeaderProps as dt, Pagination as du, type PaginationProps as dv, PaperclipGlyph as dw, Paragraph as dx, type ParagraphProps as dy, PieChart as dz, APP_UPDATE_POLL_MS as e, SidebarGroupLabel as e$, RadarChart as e0, type RadarChartProps as e1, type RadarSeries as e2, RadialBarChart as e3, type RadialBarChartProps as e4, type RadialBarRow as e5, Radio as e6, RadioGroup as e7, type RadioGroupOption as e8, type RadioGroupOrientation as e9, ScatterChart as eA, type ScatterChartProps as eB, type ScatterPoint as eC, type ScatterSeries as eD, type SearchProvider as eE, type SearchResult as eF, type SearchableOption as eG, SearchableSelect as eH, type SearchableSelectProps as eI, Segmented as eJ, type SegmentedOption as eK, type SegmentedProps as eL, type SegmentedSize as eM, Select as eN, type SelectOption as eO, type SelectProps as eP, type SemanticGroup as eQ, SettingRow as eR, type SettingRowProps as eS, type SeverityTone as eT, type ShellPrefsAdapter as eU, ShellPrefsProvider as eV, type ShellStrings as eW, type ShellStringsOverride as eX, ShellStringsProvider as eY, SidebarActionButton as eZ, type SidebarActionButtonProps as e_, type RadioGroupProps as ea, type RadioProps as eb, type Range as ec, RangeChart as ed, type RangeChartProps as ee, type RangeRow as ef, RankedBars as eg, type RankedBarsProps as eh, type RankedBarsRow as ei, type ResolvedPortalBrandAsset as ej, Result as ek, type ResultProps as el, type ResultStatus as em, type RevealDirection as en, SCATTER_SERIES_CAP as eo, SERIES_SLOT_COUNT as ep, SERIES_VARS as eq, SHIFT as er, STAGES as es, STALE_CHUNK_RELOAD_COOLDOWN_MS as et, STALE_CHUNK_RELOAD_KEY as eu, STATUS_VARS as ev, SankeyChart as ew, type SankeyChartProps as ex, type SankeyLink as ey, type SankeyNode as ez, Accordion as f, TimelineTrack as f$, SidebarLayout as f0, type SidebarLayoutProps as f1, SidebarNavItem as f2, type SidebarNavItemProps as f3, Skeleton as f4, type SkeletonProps as f5, type SkeletonVariant as f6, Snippet as f7, type SnippetProps as f8, type SnippetSize as f9, type SwitchSize as fA, type TabItem as fB, Tabs as fC, type TabsProps as fD, TagInput as fE, type TagInputOption as fF, type TagInputProps as fG, Text as fH, type TextProps as fI, type TextSize as fJ, type TextTone as fK, type TextWeight as fL, Textarea as fM, type TextareaProps as fN, type Theme as fO, TileButton as fP, type TileButtonProps as fQ, type TileSize as fR, TimePicker as fS, type TimePickerProps as fT, TimeSeriesChart as fU, type TimeSeriesChartProps as fV, type TimeSeriesSeries as fW, type TimelineMarker as fX, type TimelineMarkerKind as fY, type TimelineReport as fZ, type TimelineScrubProgress as f_, type SnippetVariant as fa, Sparkline as fb, type SparklineProps as fc, Stack as fd, type StackProps as fe, type StaleChunkReloadOptions as ff, StatCard as fg, type StatCardProps as fh, StatTile as fi, type StatTileProps as fj, Statistic as fk, type StatisticProps as fl, type StatisticSize as fm, type StatisticTone as fn, StatusBadge as fo, StatusBadgeProvider as fp, type StatusEmphasis as fq, type StepItem as fr, Stepper as fs, type StepperProps as ft, type StrokeVariant as fu, SunburstChart as fv, type SunburstChartProps as fw, type SunburstNode as fx, Switch as fy, type SwitchProps as fz, type AccordionItem as g, installStaleChunkReload as g$, type TimelineTrackItem as g0, type TimelineTrackKind as g1, type TimelineTrackPending as g2, type TimelineTrackPhase as g3, type TimelineTrackPlayback as g4, type TimelineTrackProps as g5, type TimelineTrackThumb as g6, Title as g7, type TitleLevel as g8, type TitleProps as g9, autoHighlightIndex as gA, backspace as gB, bandScale as gC, binValues as gD, budgetState as gE, bumpPath as gF, buttonClasses as gG, calcOverall as gH, calcReportOverall as gI, confirm as gJ, confirmDestructive as gK, curvePath as gL, dashFor as gM, dismissPopups as gN, fillFor as gO, fillId as gP, firstDayOfWeek as gQ, fmtSliderDate as gR, formatDate as gS, fromKey as gT, glassStyle as gU, glowId as gV, groundId as gW, groupColors as gX, highlightOpacity as gY, iconButtonClasses as gZ, inputClasses as g_, type ToastOptions as ga, type ToastPlacement as gb, Tooltip as gc, type TooltipProps as gd, TopNav as ge, type TopNavItem as gf, type TopNavProps as gg, TreemapChart as gh, type TreemapChartProps as gi, type TreemapItem as gj, type TreemapTile as gk, type UseAppUpdateOptions as gl, type UseProductionTimelineOpts as gm, VERSION as gn, VITE_PRELOAD_ERROR_EVENT as go, WaterfallChart as gp, type WaterfallChartProps as gq, type WaterfallStep as gr, type ZLayer as gs, Z_LAYERS as gt, angleScale as gu, appendKey as gv, applyThemePrefs as gw, arcPath as gx, areaBetween as gy, areaFrom as gz, type AccordionProps as h, isMac as h0, isSeverityTone as h1, isStaleChunkError as h2, labelClasses as h3, ladderScale as h4, linearPath as h5, linearScale as h6, logScale as h7, maskId as h8, mediaFileName as h9, useDropdownPosition as hA, useFocusTrap as hB, useHighlight as hC, useIsMobile as hD, useLocalStoragePrefs as hE, usePlotWidth as hF, usePortalBranding as hG, useProductionTimeline as hH, useScrollLock as hI, useShellLocale as hJ, useShellPrefs as hK, useShellStrings as hL, useTheme as hM, monotonePath as ha, niceMax as hb, openGlobalSearch as hc, polygonPoints as hd, popupBounds as he, prompt as hf, radiusScale as hg, resolveBrandMarkTreatment as hh, resolvePortalBrandAsset as hi, resolveSeriesColor as hj, resolveTheme as hk, seriesColor as hl, severityOf as hm, splinePath as hn, squarify as ho, stagger as hp, stepPath as hq, tabButtonId as hr, tabPanelId as hs, toKey as ht, toDayMs as hu, toISODate as hv, toast as hw, useAppUpdate as hx, useClickOutside as hy, useConfirm as hz, type Align as i, type AngleScale as j, AppUpdateBanner as k, type AppUpdateBannerProps as l, AttachButton as m, type AttachButtonProps as n, AttachmentDropZone as o, type AttachmentDropZoneProps as p, AttachmentList as q, type AttachmentListProps as r, AuthScreen as s, type AuthScreenProps as t, Avatar as u, AvatarGroup as v, type AvatarGroupProps as w, type AvatarProps as x, type AvatarSize as y, type AvatarStatus as z };
|