efficient-shell 7.27.0 → 7.28.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/dist/{Browser-OL5LGTQ2.js → Browser-CUAQCAZ2.js} +14 -14
- package/dist/Calculator-YQS2NTUZ.js +29 -0
- package/dist/ConfirmDialog-YZCM3HJP.js +1 -0
- package/dist/CurrencyConverter-ZIERKELA.js +21 -0
- package/dist/{Documents-MCMYMQQL.js → Documents-GOOHQYBQ.js} +26 -26
- package/dist/{Files-CCP2UU4G.js → Files-R4Z3BYJL.js} +38 -38
- package/dist/Notepad-YV4JDSRK.js +25 -0
- package/dist/PdfViewer-JLIMTMVK.js +1 -0
- package/dist/{PomodoroTimer-BMBZ2TTC.js → PomodoroTimer-GYLJIAWS.js} +20 -20
- package/dist/{Preview-2BYPAVX5.js → Preview-K4QOB3J2.js} +8 -8
- package/dist/Sidebar-4RJEWBBN.js +44 -0
- package/dist/{Spreadsheet-SQVOSXTU.js → Spreadsheet-7WU4NDJP.js} +12 -12
- package/dist/{Stock-4LFU53UL.js → Stock-7AOF4PKL.js} +7 -7
- package/dist/{Weather-BIOZMSPH.js → Weather-23SUCMNL.js} +18 -18
- package/dist/{WorldClock-BO6TIFOK.js → WorldClock-ENURKJG6.js} +7 -7
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/{chunk-42B7TUEB.js → chunk-3VYANOTN.js} +1 -1
- package/dist/{chunk-6RFXIPCN.js → chunk-4MSDABE3.js} +1 -1
- package/dist/{chunk-GXHXNI55.js → chunk-5TFUQOEM.js} +1 -1
- package/dist/{chunk-Y6UXNQ42.js → chunk-76VZ67RK.js} +2 -2
- package/dist/{chunk-RMXUKHVK.js → chunk-7776CT23.js} +1 -1
- package/dist/{chunk-LG3UEPOI.js → chunk-A22D3FXG.js} +4 -4
- package/dist/{chunk-ZXHA3XDM.js → chunk-ABXVRYKR.js} +1 -1
- package/dist/{chunk-H3U47ZEL.js → chunk-AHBO5PKR.js} +11 -11
- package/dist/{chunk-C2PGWIIO.js → chunk-BJN6DNDM.js} +1 -1
- package/dist/{chunk-MEIVZG77.js → chunk-EBTCC5N3.js} +9 -9
- package/dist/chunk-EZ73LTEI.js +1 -0
- package/dist/chunk-FHKJQU3U.js +27 -0
- package/dist/{chunk-DY43MKMT.js → chunk-HCQ7SIGC.js} +1 -1
- package/dist/{chunk-6JVUT3D4.js → chunk-I4GL7BVS.js} +2 -2
- package/dist/{chunk-YJZ4VVDT.js → chunk-ITW5DB2J.js} +13 -13
- package/dist/{chunk-OICSZKUO.js → chunk-IUBESHKK.js} +1 -1
- package/dist/{chunk-F2GDJO2Y.js → chunk-KROUETJQ.js} +16 -16
- package/dist/chunk-KWW5PPQN.js +1 -0
- package/dist/chunk-MQUGCJRS.js +1035 -0
- package/dist/{chunk-2I3Z4UFG.js → chunk-QHL3LL5F.js} +14 -14
- package/dist/chunk-QJ4YAH34.js +108 -0
- package/dist/{chunk-RVPQRXC4.js → chunk-RYBDLJJV.js} +1 -1
- package/dist/chunk-SUXBGACL.js +10 -0
- package/dist/chunk-WOZ36LPR.js +9 -0
- package/dist/{chunk-6AXCLPSI.js → chunk-XTAGVLZJ.js} +1 -1
- package/dist/chunk-XZXMVACA.js +5 -0
- package/dist/file-intake/index.js +1 -1
- package/dist/i18n/index.d.ts +1 -1
- package/dist/{index-cfVn8e67.d.ts → index-HJwNWiNU.d.ts} +1 -1
- package/dist/index.d.ts +13 -13
- package/dist/index.js +678 -661
- package/dist/locales/zh-Hans.d.ts +1 -1
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +8 -8
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/{strings-DkffgGGm.d.ts → strings-BuYlsGKG.d.ts} +17 -0
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-HARXMYLM.js +0 -29
- package/dist/ConfirmDialog-VL3YU35U.js +0 -1
- package/dist/CurrencyConverter-KQ5UR4AU.js +0 -21
- package/dist/Notepad-BAIEYDR6.js +0 -25
- package/dist/PdfViewer-4KFBJ4ZV.js +0 -1
- package/dist/Sidebar-GO32NHGH.js +0 -44
- package/dist/chunk-CV3XVHWR.js +0 -108
- package/dist/chunk-DBWGMZCY.js +0 -1
- package/dist/chunk-MDM7YLWP.js +0 -1
- package/dist/chunk-QD22TNW3.js +0 -27
- package/dist/chunk-QKNGN4H4.js +0 -10
- package/dist/chunk-SZTKBF3D.js +0 -13
- package/dist/chunk-VROJD5KW.js +0 -1035
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efficient-shell",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.28.0",
|
|
4
4
|
"description": "Desktop-style React UI shell — windows, taskbar, start menu, sticky notes, frosted glass theming, and bundled apps.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-RMXUKHVK.js";import{useWidgetSettings as n}from"./chunk-CV3XVHWR.js";import"./chunk-DSSLOQDW.js";import"./chunk-DY43MKMT.js";import"./chunk-QKNGN4H4.js";import"./chunk-5A7MWTXX.js";import"./chunk-NVFKXL52.js";import"./chunk-SZTKBF3D.js";import"./chunk-F2GDJO2Y.js";import"./chunk-GNW45MGV.js";import"./chunk-UVBK6YSR.js";import"./chunk-K7PQXJO7.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import"./chunk-KNUR2UEG.js";import"./chunk-DBWGMZCY.js";import"./chunk-C3QOHMR6.js";import{Icon as r}from"./chunk-B427NVDP.js";import{useState as l,useRef as c,useCallback as i,useEffect as a}from"react";import{jsxs as o,Fragment as s,jsx as u}from"react/jsx-runtime";var d="calc_appearance";function h(){const[h,m]=l("0"),[k,b]=l(null),[p,g]=l(null),[N,y]=l(!1),[x,f]=l(""),[v,C]=l([]),[$,j]=l(!1),[w,E]=l(()=>e(d)),[S,D]=l(!1),[T,W]=l(w),B=c(null);n(i(()=>{W({...w}),D(!0)},[w]));const F=i(e=>{f(""),m(t=>N||"0"===t?(y(!1),"."===e?"0.":e):"."===e&&t.includes(".")?t:t+e)},[N]),K=i(()=>{m("0"),b(null),g(null),y(!1)},[]),M=i((e,t,n)=>{switch(n){case"+":return e+t;case"-":return e-t;case"×":return e*t;case"÷":return 0===t?0:e/t;default:return t}},[]),G=i(e=>{const t=parseFloat(h);if(null!==k&&p&&!N){const e=M(k,t,p);m(String(e)),b(e),C(n=>[`${k} ${p} ${t} = ${e}`,...n].slice(0,20))}else b(t);g(e),y(!0)},[h,k,p,N,M]),V=i(()=>{if(null===k||!p)return;const e=parseFloat(h),t=M(k,e,p),n=`${k} ${p} ${e} =`;C(e=>[`${n} ${t}`,...e].slice(0,20)),f(n),m(String(t)),b(null),g(null),y(!0)},[h,k,p,M]),X=i(()=>{m(e=>String(parseFloat(e)/100))},[]),A=i(()=>{m(e=>e.startsWith("-")?e.slice(1):"0"===e?e:"-"+e)},[]);a(()=>{const e=e=>{const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.key>="0"&&e.key<="9"?F(e.key):"."===e.key?F("."):"+"===e.key?G("+"):"-"===e.key?G("-"):"*"===e.key?G("×"):"/"===e.key?(e.preventDefault(),G("÷")):"Enter"===e.key||"="===e.key?("Enter"===e.key&&e.target instanceof Node&&B.current?.contains(e.target)&&e.preventDefault(),V()):"Escape"===e.key?K():"Backspace"===e.key?m(e=>e.length>1?e.slice(0,-1):"0"):"%"===e.key&&X())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[F,G,V,K,X]);const H="flex items-center justify-center rounded-lg text-sm font-medium transition-colors",O=`${H} bg-white border border-gray-200 text-gray-900 hover:bg-gray-50 active:bg-gray-100`,R=`${H} bg-blue-50 border border-blue-200 text-blue-700 hover:bg-blue-100 active:bg-blue-200`,L=`${H} bg-gray-100 border border-gray-200 text-gray-600 hover:bg-gray-200 active:bg-gray-300`,Q=`${H} bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800`;/* @__PURE__ */
|
|
2
|
-
return o(s,{children:[
|
|
3
|
-
/* @__PURE__ */o("div",{ref:B,className:"flex flex-col h-full",style:{opacity:w.activeOpacity/100,backdropFilter:w.activeBlur>0?`blur(${w.activeBlur}px)`:void 0},children:[
|
|
4
|
-
/* @__PURE__ */o("div",{className:"bg-slate-200 rounded-t-lg px-4 py-2 group/display relative flex flex-col justify-end min-h-[120px] border-b border-slate-300",children:[
|
|
5
|
-
/* @__PURE__ */u("div",{className:"flex flex-col justify-end flex-1 overflow-hidden",children:v.slice(0,3).reverse().map((e,t)=>/* @__PURE__ */u("div",{className:"text-2xs text-slate-400 text-right font-mono truncate",children:e},t))}),(x||p&&null!==k)&&/* @__PURE__ */u("div",{className:"text-base text-slate-600 text-right font-mono",children:x||`${k} ${p} ${N?"":h}`}),
|
|
6
|
-
/* @__PURE__ */o("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */u("button",{onClick:()=>{navigator.clipboard.writeText(h),j(!0),setTimeout(()=>j(!1),1200)},title:"Copy result",className:"shrink-0 text-slate-300 hover:text-slate-500 transition-colors opacity-0 group-hover/display:opacity-100",children:/* @__PURE__ */u(r,$?{name:"check",className:"h-5 w-5 text-green-500",strokeWidth:2}:{name:"copy",className:"h-5 w-5",strokeWidth:2})}),
|
|
8
|
-
/* @__PURE__ */u("div",{className:"text-right text-4xl font-mono font-bold text-slate-800 truncate flex-1",children:(e=>{const t=parseFloat(e);return isNaN(t)||e.endsWith(".")||e.endsWith(".0")||Math.abs(t)<1e15&&e.length<16?e:t.toExponential(6)})(h)})]})]}),
|
|
9
|
-
/* @__PURE__ */o("div",{className:"grid grid-cols-4 grid-rows-5 gap-2 flex-1 min-h-0 p-2",children:[
|
|
10
|
-
/* @__PURE__ */u("button",{onClick:K,className:L,children:"AC"}),
|
|
11
|
-
/* @__PURE__ */u("button",{onClick:A,className:L,children:"+/−"}),
|
|
12
|
-
/* @__PURE__ */u("button",{onClick:X,className:L,children:"%"}),
|
|
13
|
-
/* @__PURE__ */u("button",{onClick:()=>G("÷"),className:`${R} ${"÷"===p?"ring-2 ring-blue-400":""}`,children:"÷"}),
|
|
14
|
-
/* @__PURE__ */u("button",{onClick:()=>F("7"),className:O,children:"7"}),
|
|
15
|
-
/* @__PURE__ */u("button",{onClick:()=>F("8"),className:O,children:"8"}),
|
|
16
|
-
/* @__PURE__ */u("button",{onClick:()=>F("9"),className:O,children:"9"}),
|
|
17
|
-
/* @__PURE__ */u("button",{onClick:()=>G("×"),className:`${R} ${"×"===p?"ring-2 ring-blue-400":""}`,children:"×"}),
|
|
18
|
-
/* @__PURE__ */u("button",{onClick:()=>F("4"),className:O,children:"4"}),
|
|
19
|
-
/* @__PURE__ */u("button",{onClick:()=>F("5"),className:O,children:"5"}),
|
|
20
|
-
/* @__PURE__ */u("button",{onClick:()=>F("6"),className:O,children:"6"}),
|
|
21
|
-
/* @__PURE__ */u("button",{onClick:()=>G("-"),className:`${R} ${"-"===p?"ring-2 ring-blue-400":""}`,children:"−"}),
|
|
22
|
-
/* @__PURE__ */u("button",{onClick:()=>F("1"),className:O,children:"1"}),
|
|
23
|
-
/* @__PURE__ */u("button",{onClick:()=>F("2"),className:O,children:"2"}),
|
|
24
|
-
/* @__PURE__ */u("button",{onClick:()=>F("3"),className:O,children:"3"}),
|
|
25
|
-
/* @__PURE__ */u("button",{onClick:()=>G("+"),className:`${R} ${"+"===p?"ring-2 ring-blue-400":""}`,children:"+"}),
|
|
26
|
-
/* @__PURE__ */u("button",{onClick:()=>F("0"),className:`${O} col-span-2`,children:"0"}),
|
|
27
|
-
/* @__PURE__ */u("button",{onClick:()=>F("."),className:O,children:"."}),
|
|
28
|
-
/* @__PURE__ */u("button",{onClick:V,className:Q,children:"="})]})]}),
|
|
29
|
-
/* @__PURE__ */u(t,{open:S,onClose:()=>D(!1),title:"Calculator Settings",appearance:T,onAppearanceChange:W,onSave:()=>{E(T),localStorage.setItem(d,JSON.stringify(T)),D(!1)}})]})}export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{ConfirmProvider,confirm,confirmDestructive,prompt,useConfirm}from"./chunk-F2GDJO2Y.js";import"./chunk-UVBK6YSR.js";import"./chunk-K7PQXJO7.js";import"./chunk-FIEA5CGB.js";import"./chunk-DBWGMZCY.js";import"./chunk-C3QOHMR6.js";import"./chunk-B427NVDP.js";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-RMXUKHVK.js";import{useWidgetSettings as r}from"./chunk-CV3XVHWR.js";import"./chunk-DSSLOQDW.js";import"./chunk-DY43MKMT.js";import"./chunk-QKNGN4H4.js";import"./chunk-5A7MWTXX.js";import{LoadingSpinner as n}from"./chunk-NVFKXL52.js";import"./chunk-SZTKBF3D.js";import"./chunk-F2GDJO2Y.js";import"./chunk-GNW45MGV.js";import"./chunk-UVBK6YSR.js";import"./chunk-K7PQXJO7.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import"./chunk-KNUR2UEG.js";import"./chunk-DBWGMZCY.js";import"./chunk-C3QOHMR6.js";import"./chunk-B427NVDP.js";import{useState as a,useCallback as s,useEffect as o}from"react";import{jsxs as c,Fragment as i,jsx as l}from"react/jsx-runtime";var m=["USD","CNY","AUD","GBP","EUR","JPY","CAD","THB","NZD","SGD","HKD","CHF","KRW","INR","MXN","BRL"],u=[["USD","CNY"],["USD","AUD"],["GBP","USD"],["USD","JPY"]],p="currency_pairs",d="currency_appearance",h="currency_rates_cache";function g(e){try{const t=JSON.parse(localStorage.getItem(h)||"{}")[e];if(t&&Date.now()-t.timestamp<36e5)return t.rates}catch{}return null}function f(e,t){try{const r=JSON.parse(localStorage.getItem(h)||"{}");r[e]={rates:t,timestamp:Date.now()},localStorage.setItem(h,JSON.stringify(r))}catch{}}function N(){try{const e=JSON.parse(localStorage.getItem(p)||"");if(Array.isArray(e)&&e.length)return e.slice(0,4)}catch{}return u}var y={USD:"🇺🇸",CNY:"🇨🇳",AUD:"🇦🇺",GBP:"🇬🇧",JPY:"🇯🇵",CAD:"🇨🇦",EUR:"🇪🇺",THB:"🇹🇭",NZD:"🇳🇿",SGD:"🇸🇬",HKD:"🇭🇰",CHF:"🇨🇭",KRW:"🇰🇷",INR:"🇮🇳",MXN:"🇲🇽",BRL:"🇧🇷"};function x(){const[u,h]=a(N),[x,b]=a(()=>e(d)),[S,D]=a({}),[k,v]=a(!1),[j,C]=a(!1),[B,U]=a([]),[J,K]=a(x),[R,G]=a("USD"),[H,O]=a("CNY");r(s(()=>{U([...u]),K({...x}),C(!0)},[u,x])),o(()=>{const e=[...new Set(u.map(([e])=>e))];let t=!0;return async function(){v(!0);const r={};for(const t of e){const e=g(t);if(e)r[t]=e;else try{const e=await fetch(`https://open.er-api.com/v6/latest/${t}`),n=await e.json();n.rates&&(r[t]=n.rates,f(t,n.rates))}catch{}}t&&(D(r),v(!1))}(),()=>{t=!1}},[u]);/* @__PURE__ */
|
|
2
|
-
return c(i,{children:[
|
|
3
|
-
/* @__PURE__ */l("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${x.activeOpacity/100})`,backdropFilter:x.activeBlur>0?`blur(${x.activeBlur}px)`:void 0},children:/* @__PURE__ */c("div",{className:"px-4 py-3 space-y-1",children:[k&&/* @__PURE__ */l(n,{size:"sm",padding:"py-4",label:"Loading rates"}),u.map(([e,t],r)=>{const n=S[e]?.[t];/* @__PURE__ */
|
|
4
|
-
return c("button",{onClick:()=>{const e=u.map((e,t)=>t===r?[e[1],e[0]]:e);h(e),localStorage.setItem(p,JSON.stringify(e))},className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0 w-full hover:bg-gray-100 rounded transition-colors cursor-pointer",children:[
|
|
5
|
-
/* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
|
|
6
|
-
/* @__PURE__ */l("span",{className:"text-base",children:y[e]||""}),
|
|
7
|
-
/* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:e}),
|
|
8
|
-
/* @__PURE__ */l("svg",{className:"h-3 w-3 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:/* @__PURE__ */l("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7 16V4m0 0L3 8m4-4l4 4m6 0v12m0 0l4-4m-4 4l-4-4"})}),
|
|
9
|
-
/* @__PURE__ */l("span",{className:"text-base",children:y[t]||""}),
|
|
10
|
-
/* @__PURE__ */l("span",{className:"text-sm font-semibold text-gray-700",children:t})]}),
|
|
11
|
-
/* @__PURE__ */l("div",{className:"text-base font-mono font-semibold text-gray-900 tabular-nums",children:null!=n?n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:4}):"—"})]},`${e}-${t}-${r}`)})]})}),
|
|
12
|
-
/* @__PURE__ */l(t,{open:j,onClose:()=>C(!1),title:"Currency Settings",appearance:J,onAppearanceChange:K,onSave:()=>{if(0===B.length)return;const e=B.slice(0,4);h(e),b(J),localStorage.setItem(p,JSON.stringify(e)),localStorage.setItem(d,JSON.stringify(J)),C(!1)},children:/* @__PURE__ */c("div",{children:[
|
|
13
|
-
/* @__PURE__ */c("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:["Currency Pairs ",
|
|
14
|
-
/* @__PURE__ */c("span",{className:"text-2xs font-normal text-gray-400",children:["(",B.length,"/",4,")"]})]}),
|
|
15
|
-
/* @__PURE__ */l("div",{className:"space-y-1 mb-2",children:B.map(([e,t],r)=>/* @__PURE__ */c("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
|
|
16
|
-
/* @__PURE__ */c("span",{className:"text-sm",children:[y[e]||""," ",e," → ",y[t]||""," ",t]}),
|
|
17
|
-
/* @__PURE__ */l("button",{onClick:()=>U(e=>e.filter((e,t)=>t!==r)),className:"text-red-400 hover:text-red-600",children:"×"})]},r))}),B.length<4?/* @__PURE__ */c("div",{className:"flex items-center gap-2",children:[
|
|
18
|
-
/* @__PURE__ */l("select",{value:R,onChange:e=>G(e.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(e=>/* @__PURE__ */l("option",{children:e},e))}),
|
|
19
|
-
/* @__PURE__ */l("span",{className:"text-gray-400",children:"→"}),
|
|
20
|
-
/* @__PURE__ */l("select",{value:H,onChange:e=>O(e.target.value),className:"bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm focus:outline-none focus:ring-1 focus:ring-blue-500",children:m.map(e=>/* @__PURE__ */l("option",{children:e},e))}),
|
|
21
|
-
/* @__PURE__ */l("button",{onClick:()=>{R!==H&&B.length<4&&U(e=>[...e,[R,H]])},className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */c("p",{className:"text-2xs text-gray-400 italic",children:["Max ",4," pairs — remove one to add another."]})]})})]})}export{x as default};
|
package/dist/Notepad-BAIEYDR6.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import{getNumberingConfigs as e}from"./chunk-C2PGWIIO.js";import{SidebarLayout as t}from"./chunk-LG3UEPOI.js";import{AboutApp as r}from"./chunk-Y6UXNQ42.js";import{useWindowManager as n,client_default as o}from"./chunk-CV3XVHWR.js";import"./chunk-DSSLOQDW.js";import"./chunk-DY43MKMT.js";import{toast_default as i}from"./chunk-42B7TUEB.js";import{useShellPrefs as s}from"./chunk-QKNGN4H4.js";import"./chunk-5A7MWTXX.js";import"./chunk-NVFKXL52.js";import"./chunk-SZTKBF3D.js";import"./chunk-F2GDJO2Y.js";import"./chunk-GNW45MGV.js";import"./chunk-UVBK6YSR.js";import"./chunk-K7PQXJO7.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import"./chunk-MDM7YLWP.js";import"./chunk-KNUR2UEG.js";import"./chunk-DBWGMZCY.js";import"./chunk-C3QOHMR6.js";import{timeAgo as a}from"./chunk-W32SKK3D.js";import{Icon as c}from"./chunk-B427NVDP.js";import{useRef as l,useEffect as d,useState as p,useCallback as m}from"react";import{useQuery as u}from"@tanstack/react-query";import{jsxs as h,Fragment as y,jsx as g}from"react/jsx-runtime";var x=[{key:"yellow",bg:"bg-yellow-100",border:"border-yellow-300",text:"text-yellow-900",dot:"bg-yellow-400"},{key:"blue",bg:"bg-blue-100",border:"border-blue-300",text:"text-blue-900",dot:"bg-blue-400"},{key:"green",bg:"bg-green-100",border:"border-green-300",text:"text-green-900",dot:"bg-green-400"},{key:"pink",bg:"bg-pink-100",border:"border-pink-300",text:"text-pink-900",dot:"bg-pink-400"},{key:"purple",bg:"bg-purple-100",border:"border-purple-300",text:"text-purple-900",dot:"bg-purple-400"},{key:"orange",bg:"bg-orange-100",border:"border-orange-300",text:"text-orange-900",dot:"bg-orange-400"},{key:"white",bg:"bg-white",border:"border-gray-300",text:"text-gray-900",dot:"bg-gray-300"}];var b={sales_order:{entityType:"order",endpoint:"/orders/sales-orders/"},purchase_order:{entityType:"purchase_order",endpoint:"/purchase-orders/"},invoice:{entityType:"invoice",endpoint:"/invoicing/invoices/"},vendor_invoice:{entityType:"vendor_invoice",endpoint:"/invoicing/vendor-invoices/"},shipment:{entityType:"shipment",endpoint:"/shipments/delivery-notes/"},receipt:{entityType:"payment",endpoint:"/invoicing/payments/"},vendor_payment:{entityType:"vendor_payment",endpoint:"/invoicing/vendor-payments/"},vendor_price_sheet:{entityType:"vendor_price_sheet",endpoint:"/pricing/manufacturer-price-sheets/"},client_price_sheet:{entityType:"price_sheet",endpoint:"/pricing/price-sheets/"},qc_report:{entityType:"qc_report",endpoint:"/qc-reports/"},warranty_claim:{entityType:"warranty_claim",endpoint:"/warranty-claims/claims/"},vendor_shipment:{entityType:"vendor_shipment",endpoint:"/shipments/goods-receipts/"}},f=/\[([ xX]?)\]/g;function k(){const{openEntity:k}=n(),{prefs:v,save:N}=s(),{data:w}=u({queryKey:["numbering-configs"],queryFn:()=>e(),retry:!1}),_=l({});d(()=>{if(!w)return;const e={};for(const t of w){const r=b[t.entity_type];if(!r)continue;const n=(t.prefix||"").replace("#","").toUpperCase();if(n&&(e[n]={...r,prefix:t.prefix}),t.alt_prefix){const n=t.alt_prefix.replace("#","").toUpperCase();n&&(e[n]={...r,prefix:t.alt_prefix})}}_.current=e},[w]);const j=v.notepad_notes||[],[T,C]=p(null),[$,W]=p(""),[S,D]=p(""),[X,O]=p("yellow"),[K,I]=p(!1),[B,G]=p(!1),M=l(null),P=l(),U=j.find(e=>e.id===T);d(()=>{if(!T&&j.length>0){const e=j[0];C(e.id),W(e.title),D(e.content),O(e.color)}},[j.length]);const E=m(e=>{N({notepad_notes:e})},[N]),V=m(()=>{if(!T||!K)return;const e=j.map(e=>e.id===T?{...e,title:$,content:S,color:X,updated_at:/* @__PURE__ */(new Date).toISOString()}:e);E(e),I(!1)},[T,K,$,S,X,j,E]);d(()=>{if(K)return P.current&&clearTimeout(P.current),P.current=setTimeout(V,800),()=>{P.current&&clearTimeout(P.current)}},[K,V]),d(()=>()=>{K&&V()},[]);const q=e=>{K&&V(),C(e.id),W(e.title),D(e.content),O(e.color),I(!1),G(!1)},F=e=>{const t=S.slice(0,e),r=S.slice(e).match(/^\[([ xX]?)\]/);if(!r)return;const n="x"===r[1]||"X"===r[1]?"[ ]":"[x]",o=S.slice(e+r[0].length);D(t+n+o),I(!0)},Q=async(e,t)=>{const r=_.current[e];if(!r)return;const n=`${e}#${t}`;try{const{data:e}=await o.get(r.endpoint,{params:{search:n,page_size:1}}),t=(e?.results??e??[])[0];t?k(r.entityType,t.id,t,n):i.error(`${n} not found`)}catch{i.error(`Failed to look up ${n}`)}},R="Start writing...\n\nTips:\n [] Type [] for a checkbox, click to toggle\n SO#35001 Type XX#NNNNN to link entities (SO, PO, CI, VI, PL, etc.)",Y=/* @__PURE__ */h(y,{children:[
|
|
2
|
-
/* @__PURE__ */g("div",{className:"p-2 border-b border-gray-200",children:/* @__PURE__ */h("button",{onClick:()=>{K&&V();const e={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",sticky:!1,updated_at:/* @__PURE__ */(new Date).toISOString()},t=[e,...j];E(t),C(e.id),W(""),D(""),O("yellow"),I(!1),G(!0),setTimeout(()=>M.current?.focus(),50)},className:"w-full flex items-center justify-center gap-2 rounded-lg bg-blue-600 text-white px-3 min-h-8 py-1 text-sm font-medium hover:bg-blue-700 transition-colors",children:[
|
|
3
|
-
/* @__PURE__ */g(c,{name:"add",className:"h-4 w-4",strokeWidth:2}),"New Note"]})}),
|
|
4
|
-
/* @__PURE__ */g("div",{className:"flex-1 overflow-y-auto",children:0===j.length?/* @__PURE__ */g("p",{className:"text-sm text-gray-400 text-center py-8 px-4",children:"No notes yet. Create one to get started."}):j.map(e=>{const t=(r=e.color,x.find(e=>e.key===r)||x[0]);var r;/* @__PURE__ */
|
|
5
|
-
return h("button",{onClick:()=>q(e),className:"w-full text-left px-3 py-3 border-b border-gray-100 transition-colors "+(T===e.id?"bg-blue-50":"hover:bg-gray-50"),children:[
|
|
6
|
-
/* @__PURE__ */h("div",{className:"flex items-center gap-2",children:[
|
|
7
|
-
/* @__PURE__ */g("div",{className:`w-3 h-3 rounded-full shrink-0 ${t.dot}`}),
|
|
8
|
-
/* @__PURE__ */g("span",{className:"text-sm font-medium text-gray-900 truncate flex-1",children:e.title||"Untitled"}),e.sticky&&/* @__PURE__ */g(c,{name:"bookmark",look:"solid",className:"h-3 w-3 text-amber-500 shrink-0"})]}),
|
|
9
|
-
/* @__PURE__ */g("p",{className:"text-xs text-gray-400 mt-0.5 truncate ml-5",children:e.content.replace(/\[[ xX]?\]/g,"").slice(0,60)||"Empty note"}),
|
|
10
|
-
/* @__PURE__ */g("p",{className:"text-2xs text-gray-300 mt-0.5 ml-5",children:a(e.updated_at)})]},e.id)})})]});/* @__PURE__ */
|
|
11
|
-
return h("div",{className:"h-full",children:[
|
|
12
|
-
/* @__PURE__ */g(r,{app:"notepad"}),
|
|
13
|
-
/* @__PURE__ */g(t,{sidebar:Y,storageKey:"notepad.sidebarWidth",defaultWidth:224,minWidth:180,maxWidth:360,children:T?/* @__PURE__ */h("div",{className:"flex-1 flex flex-col min-w-0",children:[
|
|
14
|
-
/* @__PURE__ */h("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-gray-200",children:[
|
|
15
|
-
/* @__PURE__ */g("input",{value:$,onChange:e=>{W(e.target.value),I(!0)},placeholder:"Note title...",className:"flex-1 text-lg font-semibold text-gray-900 outline-none bg-transparent placeholder:text-gray-300"}),
|
|
16
|
-
/* @__PURE__ */g("div",{className:"flex gap-1",children:x.map(e=>/* @__PURE__ */g("button",{onClick:()=>{O(e.key),I(!0)},className:`w-5 h-5 rounded-full border-2 transition-all ${e.dot} ${X===e.key?"border-gray-600 scale-110":"border-transparent hover:border-gray-400"}`,title:e.key},e.key))}),
|
|
17
|
-
/* @__PURE__ */g("button",{onClick:()=>(e=>{const t=j.map(t=>t.id===e?{...t,sticky:!t.sticky}:t);E(t);const r=t.find(t=>t.id===e);i.success(r?.sticky?"Pinned to desktop":"Removed from desktop")})(T),title:U?.sticky?"Remove from desktop":"Pin to desktop",className:"p-1 rounded transition-colors "+(U?.sticky?"text-amber-500 hover:text-amber-600":"text-gray-300 hover:text-amber-400"),children:/* @__PURE__ */g(c,{name:"bookmark",className:"h-4 w-4",fill:U?.sticky?"currentColor":"none",strokeWidth:1.5})}),
|
|
18
|
-
/* @__PURE__ */g("button",{onClick:()=>(e=>{const t=j.filter(t=>t.id!==e);if(E(t),T===e){const e=t[0];e?q(e):(C(null),W(""),D(""))}})(T),title:"Delete note",className:"p-1 rounded text-gray-300 hover:text-red-500 transition-colors",children:/* @__PURE__ */g(c,{name:"trash",className:"h-4 w-4",strokeWidth:1.5})})]}),B?/* @__PURE__ */g("textarea",{ref:M,value:S,onChange:e=>{D(e.target.value),I(!0)},onBlur:()=>{G(!1),K&&V()},placeholder:R,className:"flex-1 p-4 text-sm text-gray-700 outline-none resize-none bg-transparent leading-relaxed placeholder:text-gray-300 font-mono"}):/* @__PURE__ */g("div",{onClick:()=>{G(!0),setTimeout(()=>M.current?.focus(),50)},className:"flex-1 p-4 text-sm text-gray-700 overflow-y-auto leading-relaxed cursor-text",children:S?(e=>{if(!e)return[];const t=e.split("\n");return t.map((e,r)=>{const n=[];let o=0;const i=[],s=/([A-Z]{2,4})#(\d{4,6})/g;let a;for(;null!==(a=s.exec(e));){const e=a[1],t=a[2];if(_.current[e]){const n=a.index,o=a[0];i.push({idx:n,len:o.length,render:()=>/* @__PURE__ */g("button",{onClick:()=>Q(e,t),className:"text-blue-600 hover:text-blue-800 hover:underline font-medium cursor-pointer",children:o},`ref-${r}-${n}`)})}}f.lastIndex=0;let l=0;for(let e=0;e<r;e++)l+=t[e].length+1;for(;null!==(a=f.exec(e));){const e="x"===a[1]||"X"===a[1],t=a.index,n=l+t;i.push({idx:t,len:a[0].length,render:()=>/* @__PURE__ */g("button",{onClick:()=>F(n),className:`inline-flex items-center justify-center w-4 h-4 rounded border ${e?"bg-blue-500 border-blue-500 text-white":"border-gray-400 bg-white hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:e&&/* @__PURE__ */g(c,{name:"check",className:"w-3 h-3",strokeWidth:3})},`cb-${r}-${t}`)})}i.sort((e,t)=>e.idx-t.idx);for(const t of i)t.idx>o&&n.push(/* @__PURE__ */g("span",{children:e.slice(o,t.idx)},`t-${r}-${o}`)),n.push(t.render()),o=t.idx+t.len;o<e.length&&n.push(/* @__PURE__ */g("span",{children:e.slice(o)},`t-${r}-${o}`)),0===n.length&&n.push(/* @__PURE__ */g("span",{children:""},`empty-${r}`));const d=/^\[x\]/i.test(e.trimStart());/* @__PURE__ */
|
|
19
|
-
return g("div",{className:d?"line-through text-gray-400":"",children:n},r)})})(S):/* @__PURE__ */g("p",{className:"text-gray-300 whitespace-pre-line",children:R})}),
|
|
20
|
-
/* @__PURE__ */h("div",{className:"px-4 min-h-8 py-1 border-t border-gray-100 flex items-center gap-4 text-2xs text-gray-400",children:[
|
|
21
|
-
/* @__PURE__ */g("span",{children:"[] checkbox"}),
|
|
22
|
-
/* @__PURE__ */g("span",{children:"SO#35001 entity link"}),
|
|
23
|
-
/* @__PURE__ */g("span",{className:"ml-auto",children:B?"Editing":"Click to edit"})]})]}):/* @__PURE__ */g("div",{className:"flex-1 flex items-center justify-center",children:/* @__PURE__ */h("div",{className:"text-center text-gray-400",children:[
|
|
24
|
-
/* @__PURE__ */g(c,{name:"page",className:"h-12 w-12 mx-auto mb-3 text-gray-300",strokeWidth:1}),
|
|
25
|
-
/* @__PURE__ */g("p",{className:"text-sm",children:"Select a note or create a new one"})]})})})]})}export{k as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{PdfViewer as default,fitScale,pdfWasmParams}from"./chunk-YJZ4VVDT.js";import"./chunk-42B7TUEB.js";import"./chunk-NVFKXL52.js";import"./chunk-K7PQXJO7.js";import"./chunk-DBWGMZCY.js";import"./chunk-C3QOHMR6.js";import"./chunk-B427NVDP.js";
|
package/dist/Sidebar-GO32NHGH.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import{useAuth as e,parseOpenSections as t,readStored as a,RAIL_OPEN_SECTIONS_KEY as r,toggleOpenSection as n,writeStored as i}from"./chunk-S2PS4IOT.js";import{partitionNav as l,BrandMark as s,openGlobalSearch as o,visibleNavChildren as c,visibleSectionItems as d,rowsContainRoute as m}from"./chunk-QD22TNW3.js";import{navSections as h,startMenuCategories as u,TAB_STRIP_H as p,navIcons as b,sectionIcons as g}from"./chunk-DSSLOQDW.js";import"./chunk-5A7MWTXX.js";import"./chunk-NVFKXL52.js";import{PopupMenu as f,PopupMenuItem as y,PopupMenuDivider as x}from"./chunk-GNW45MGV.js";import"./chunk-UVBK6YSR.js";import"./chunk-7IQ3B77H.js";import"./chunk-FIEA5CGB.js";import"./chunk-D65T4H6J.js";import{useShellStrings as N}from"./chunk-DBWGMZCY.js";import"./chunk-C3QOHMR6.js";import{Icon as v}from"./chunk-B427NVDP.js";import{useMemo as k,useState as w,useRef as C,useEffect as j,isValidElement as S,cloneElement as z}from"react";import{jsx as L,jsxs as A}from"react/jsx-runtime";var W="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform),$=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),I="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function B({open:e}){/* @__PURE__ */
|
|
2
|
-
return L(v,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function M({dir:e}){/* @__PURE__ */
|
|
3
|
-
return L(v,"left"===e?{name:"chevron-double-left",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}function T({className:e}){/* @__PURE__ */
|
|
4
|
-
return L(v,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}function D({width:D,collapsed:K,onToggleCollapsed:R,onOpen:H,activeRoute:O,profile:_,user:P,onLogout:G,onSwitchToDesktop:Q,onReportBug:V,navSections:X=h,navIcons:F=b,sectionIcons:J=g,categories:U=u,productName:Y,productIcon:E,tagline:Z,adaptiveLogo:q=!1,logoHasAlpha:ee=null,logoIsLight:te=null}){const ae=N().layout,{hasAnyPerm:re}=e(),ne=k(()=>l(X,U,re),[X,U,re]),[ie,le]=w(()=>t(a(r))),se=e=>le(t=>{const a=n(t,e);return i(r,JSON.stringify([...a])),a}),[oe,ce]=w(null),[de,me]=w(!1),he=C(null);j(()=>{K||ce(null)},[K]);const ue=(e,t)=>{ce(null),e.onSelect?e.onSelect():H(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},pe=(e,t)=>{const a=t[e];/* @__PURE__ */
|
|
5
|
-
return L("span",{className:I,"aria-hidden":"true",children:a&&S(a)?z(a,{className:"size-[18px]"}):a})},be=(e,t)=>{const a=c(e,re),r=e.menuLabel??e.label;if(a.length>0){const n=`child:${e.to}`,i=ie.has(n),l=!i&&m(a,O,re);/* @__PURE__ */
|
|
6
|
-
return A("div",{children:[
|
|
7
|
-
/* @__PURE__ */A("button",{type:"button",onClick:()=>se(n),"aria-expanded":i,className:$(l,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&pe(e.to,F),
|
|
8
|
-
/* @__PURE__ */L("span",{className:"min-w-0 flex-1 truncate",children:r}),
|
|
9
|
-
/* @__PURE__ */L(B,{open:i})]}),i&&/* @__PURE__ */L("div",{className:"space-y-0.5 pt-0.5",children:a.map(e=>be(e,t+1))}),e.dividerAfter&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}const n=e.to===O;/* @__PURE__ */
|
|
10
|
-
return A("div",{children:[
|
|
11
|
-
/* @__PURE__ */A("button",{type:"button",onClick:t=>ue(e,t),onAuxClick:t=>{1===t.button&&ue(e,t)},"aria-current":n?"page":void 0,className:$(n,!1),style:t>0?{paddingLeft:.75+1.75*t+"rem"}:void 0,children:[0===t&&pe(e.to,F),
|
|
12
|
-
/* @__PURE__ */L("span",{className:"min-w-0 flex-1 truncate",children:r})]}),e.dividerAfter&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)},ge=(e,t)=>{const a=t?e.items:d(e,re);if(0===a.length)return null;const r="icon"in e&&e.icon?/* @__PURE__ */L("span",{className:I,"aria-hidden":"true",children:e.icon}):pe(e.label,J),n=e.menuLabel??e.label,i=m(a,O,re),l="dividerAfter"in e&&e.dividerAfter;if(K)/* @__PURE__ */
|
|
13
|
-
return A("div",{children:[
|
|
14
|
-
/* @__PURE__ */L("button",{type:"button",title:n,"aria-label":n,"aria-haspopup":"menu","aria-expanded":oe?.label===e.label,onClick:t=>{const r=t.currentTarget.getBoundingClientRect();ce(t=>t?.label===e.label?null:{label:e.label,items:a,top:r.top})},className:$(i||oe?.label===e.label,!0),children:r}),l&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label);const s=ie.has(e.label),o=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
|
|
15
|
-
return A("div",{children:[
|
|
16
|
-
/* @__PURE__ */A("button",{type:"button",onClick:()=>se(e.label),"aria-expanded":s,"aria-controls":o,className:$(!s&&i,!1),children:[r,
|
|
17
|
-
/* @__PURE__ */L("span",{className:"min-w-0 flex-1 truncate",children:n}),
|
|
18
|
-
/* @__PURE__ */L(B,{open:s})]}),
|
|
19
|
-
/* @__PURE__ */L("div",{id:o,role:"group","aria-label":n,hidden:!s,className:"space-y-0.5 pt-0.5",children:s&&a.map(e=>be(e,1))}),l&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.label)},fe=_?.first_name?`${_.first_name} ${_.last_name||""}`.trim():P?.email||"",ye=(_?.first_name?.charAt(0)||P?.email?.charAt(0)||"?").toUpperCase(),xe=_?.avatar_url?/* @__PURE__ */L("img",{src:_.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */L("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:ye}),Ne=de?he.current?.getBoundingClientRect():void 0,ve="px-3",ke=ne.erpSections.length>0||ne.systemSections.length>0||ne.virtualSections.length>0;/* @__PURE__ */
|
|
20
|
-
return A("aside",{"aria-label":ae.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-gray-200 bg-white text-gray-800",style:{width:D},children:[
|
|
21
|
-
/* @__PURE__ */A("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(K?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:p},children:[
|
|
22
|
-
/* @__PURE__ */A("span",{className:"flex min-w-0 items-center gap-2",children:[E&&/* @__PURE__ */L(s,{src:E,alt:"",slot:"compact",surface:"light",adaptive:q,hasAlpha:ee,isLight:te,size:28,decorative:!0}),!K&&/* @__PURE__ */A("span",{className:"min-w-0 leading-tight",children:[
|
|
23
|
-
/* @__PURE__ */L("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:Y??"Apps"}),Z&&/* @__PURE__ */L("span",{className:"block truncate text-2xs font-medium text-gray-500",children:Z})]})]}),!K&&/* @__PURE__ */L("button",{type:"button",onClick:R,"aria-label":ae.collapseSidebar,title:`${ae.collapseSidebar} (${W?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */L(M,{dir:"left"})})]}),
|
|
24
|
-
/* @__PURE__ */L("div",{className:`shrink-0 pt-3 ${ve}`,children:K?/* @__PURE__ */L("button",{type:"button",onClick:o,"aria-label":ae.search,title:`${ae.search} (${W?"⌘K":"Ctrl K"})`,className:$(!1,!0),children:/* @__PURE__ */L(T,{className:"size-[18px]"})}):/* @__PURE__ */A("button",{type:"button",onClick:o,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-gray-200 bg-white px-3 text-left transition-colors hover:bg-gray-100",children:[
|
|
25
|
-
/* @__PURE__ */L(T,{className:"size-3.5 text-gray-500"}),
|
|
26
|
-
/* @__PURE__ */L("span",{className:"min-w-0 flex-1 truncate text-sm text-gray-500",children:ae.search}),
|
|
27
|
-
/* @__PURE__ */L("kbd",{className:"rounded border border-gray-200 bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-gray-500",children:W?"⌘K":"Ctrl K"})]})}),
|
|
28
|
-
/* @__PURE__ */A("nav",{"aria-label":ae.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${ve} ${K?"space-y-1":"space-y-0.5"}`,children:[K&&/* @__PURE__ */L("button",{type:"button",onClick:R,"aria-label":ae.expandSidebar,title:`${ae.expandSidebar} (${W?"⌘":"Ctrl"} .)`,className:`${$(!1,!0)} mb-3`,children:/* @__PURE__ */L(M,{dir:"right"})}),ne.topItems.map(e=>{if(!K)return be(e,0);const t=c(e,re),a=e.to===O||m(t,O,re),r=e.menuLabel??e.label;/* @__PURE__ */
|
|
29
|
-
return A("div",{children:[
|
|
30
|
-
/* @__PURE__ */L("button",{type:"button",title:r,"aria-label":r,onClick:a=>{if(0===t.length)return void ue(e,a);const r=a.currentTarget.getBoundingClientRect();ce(a=>a?.label===e.to?null:{label:e.to,items:t,top:r.top})},className:$(a,!0),children:pe(e.to,F)}),e.dividerAfter&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"})]},e.to)}),ne.topItems.length>0&&ke&&!ne.topItems[ne.topItems.length-1].dividerAfter&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ne.erpSections.map(e=>ge(e,!1)),ne.systemSections.map(e=>ge(e,!1)),ne.virtualSections.map(e=>ge(e,!0)),ne.footerSections.length>0&&/* @__PURE__ */L("div",{className:"mx-2 my-2 border-t border-gray-200","aria-hidden":"true"}),ne.footerSections.map(e=>ge(e,!1))]}),
|
|
31
|
-
/* @__PURE__ */L("div",{className:`shrink-0 border-t border-gray-200 py-2 ${ve}`,children:/* @__PURE__ */A("button",{ref:he,type:"button",onClick:()=>me(e=>!e),"aria-haspopup":"menu","aria-expanded":de,"aria-label":K?ae.accountMenu(fe):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(K?"justify-center py-2":"px-2 py-2"),children:[xe,!K&&/* @__PURE__ */A("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
32
|
-
/* @__PURE__ */L("span",{className:"block truncate text-sm font-semibold text-gray-800",children:fe}),P?.email&&fe!==P.email&&/* @__PURE__ */L("span",{className:"block truncate text-2xs text-gray-500",children:P.email})]})]})}),de&&Ne&&/* @__PURE__ */A(f,{portal:!0,minWidth:224,onClose:()=>me(!1),style:{left:Ne.left,bottom:window.innerHeight-Ne.top+8},children:[K&&/* @__PURE__ */A("div",{className:"border-b border-gray-200 px-3 py-3",children:[
|
|
33
|
-
/* @__PURE__ */L("p",{className:"truncate text-sm font-semibold text-gray-800",children:fe}),P?.email&&/* @__PURE__ */L("p",{className:"truncate text-xs text-gray-500",children:P.email})]}),
|
|
34
|
-
/* @__PURE__ */A(y,{onClick:()=>{me(!1),H("/profile",!1)},children:[
|
|
35
|
-
/* @__PURE__ */L(v,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ae.profile]}),ne.footerItems.map(e=>/* @__PURE__ */A(y,{onClick:()=>{me(!1),ue(e)},children:[
|
|
36
|
-
/* @__PURE__ */L("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:F[e.to]}),e.menuLabel??e.label]},e.to)),V&&/* @__PURE__ */A(y,{onClick:()=>{me(!1),V()},children:[
|
|
37
|
-
/* @__PURE__ */L(v,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ae.reportIssue]}),
|
|
38
|
-
/* @__PURE__ */L(x,{}),
|
|
39
|
-
/* @__PURE__ */A(y,{onClick:()=>{me(!1),Q()},children:[
|
|
40
|
-
/* @__PURE__ */L(v,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ae.switchToDesktop]}),
|
|
41
|
-
/* @__PURE__ */L(x,{}),
|
|
42
|
-
/* @__PURE__ */A(y,{danger:!0,onClick:()=>{me(!1),G()},children:[
|
|
43
|
-
/* @__PURE__ */L(v,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ae.signOut]})]}),oe&&K&&/* @__PURE__ */L(f,{portal:!0,minWidth:220,onClose:()=>ce(null),style:{left:D+6,top:Math.min(oe.top,window.innerHeight-48*Math.min(oe.items.length,10)-16)},children:oe.items.flatMap(e=>{const t=c(e,re);return(t.length>0?t:[e]).map(e=>/* @__PURE__ */A(y,{onClick:()=>ue(e),children:[pe(e.to,F),
|
|
44
|
-
/* @__PURE__ */L("span",{className:e.to===O?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))})})]})}export{D as default};
|
package/dist/chunk-CV3XVHWR.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import{computeMaximizedBox as e,isSidebarStripReserved as t,boxFillsWorkArea as n,readAlwaysMaximizedFlag as r,WORK_AREA_CHANGED_EVENT as o,useShellAuth as i,scrollerIsFluid as a,growBoxToWidth as s,widthToFit as l,navIcons as c}from"./chunk-DSSLOQDW.js";import{CopyButton as d}from"./chunk-DY43MKMT.js";import{isStaleChunkError as u,CMD_Z as h,CMD_SHIFT_Z as m,Result as p,useIsMobile as f,useShellPrefs as w}from"./chunk-QKNGN4H4.js";import{LoadingSpinner as y}from"./chunk-NVFKXL52.js";import{Button_default as g}from"./chunk-SZTKBF3D.js";import{confirm as b,dialogA11y as v}from"./chunk-F2GDJO2Y.js";import{PopupMenu as x,PopupMenuItem as k,PopupMenuDivider as E,PopupMenuLabel as C}from"./chunk-GNW45MGV.js";import{Z_LAYERS as M,runEscapeInterceptors as N}from"./chunk-FIEA5CGB.js";import{reportBoundaryError as S}from"./chunk-KNUR2UEG.js";import{useShellStrings as L}from"./chunk-DBWGMZCY.js";import{Icon as T}from"./chunk-B427NVDP.js";import{createContext as z,useContext as A,Component as D,useLayoutEffect as P,useRef as I,useEffect as K,useState as $,useSyncExternalStore as W,useCallback as O,isValidElement as R,Fragment as F,Children as q,cloneElement as j,useMemo as B,useId as H,useReducer as Y,Suspense as U}from"react";import{jsxs as X,jsx as V,Fragment as _}from"react/jsx-runtime";import{createPortal as G}from"react-dom";import{useLocation as J}from"react-router-dom";import{useQueryClient as Q,useQuery as Z}from"@tanstack/react-query";function ee(e){return"component"in e}function te(e){return"endpoint"in e}var ne={};function re(e){ne=e}var oe=new Proxy({},{get:(e,t)=>ne[t],has:(e,t)=>t in ne,ownKeys:()=>Object.keys(ne),getOwnPropertyDescriptor(e,t){if(t in ne)return{configurable:!0,enumerable:!0,value:ne[t]}}}),ie=null;function ae(e){ie=e}function se(){return null!==ie}var le=/* @__PURE__ */new Set(["get","post","put","patch","delete","head","options","request"]),ce=new Proxy({},{get:(e,t)=>ie?ie[t]:"string"==typeof t&&le.has(t)?()=>Promise.resolve({data:null,status:0,statusText:"",headers:{},config:{}}):void 0}),de=z(null);function ue(){return A(de)?.pageSearch??""}var he=null,me=/* @__PURE__ */new Set;function pe(e){he!==e&&(he=e,me.forEach(e=>e()))}function fe(){return he}function we(e){return me.add(e),()=>{me.delete(e)}}function ye({error:e,onReload:t}){const n=u(e);/* @__PURE__ */
|
|
2
|
-
return X("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 py-12 text-center",children:[
|
|
3
|
-
/* @__PURE__ */V(T,{name:"warning",className:"h-8 w-8 text-amber-500",strokeWidth:1.5}),
|
|
4
|
-
/* @__PURE__ */X("div",{className:"min-w-0",children:[
|
|
5
|
-
/* @__PURE__ */V("p",{className:"text-sm font-medium text-gray-700",children:n?"This window needs the latest version of the app":"This window crashed"}),
|
|
6
|
-
/* @__PURE__ */V("p",{className:"mt-1 text-xs text-gray-400 max-w-sm break-words",children:n?"A new version was deployed while this tab was open. Reload the page to pick it up.":e.message||String(e)})]}),
|
|
7
|
-
/* @__PURE__ */V("button",{type:"button",onClick:n?()=>window.location.reload():t,className:"bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 text-sm font-medium rounded-lg",children:n?"Reload page":"Reload window"})]})}var ge=class extends D{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),S(e)}reset=()=>this.setState({error:null});render(){const{error:e}=this.state;return e?this.props.fallback?this.props.fallback(e,this.reset):/* @__PURE__ */V(ye,{error:e,onReload:this.reset}):this.props.children}},be=z(null),ve="text-xs text-gray-500 hover:text-gray-700 disabled:opacity-40 disabled:hover:text-gray-500 disabled:cursor-default";function xe({className:e="",auto:t=!1}){const n=A(be),r=L().undo,o=n?.claimOwnMount;if(P(()=>{if(!t&&o)return o(!0),()=>o(!1)},[t,o]),!n||!n.enabled)return null;const{undo:i,redo:a,canUndo:s,canRedo:l,undoLabel:c,redoLabel:d}=n;/* @__PURE__ */
|
|
8
|
-
return X("div",{className:`flex items-center gap-2 ${e}`,"data-undo-controls":t?"shell":"form",children:[
|
|
9
|
-
/* @__PURE__ */V("button",{type:"button",onClick:i,disabled:!s,title:s?r.undoStep(c??"",h):r.nothingToUndo,className:ve,children:r.undo}),
|
|
10
|
-
/* @__PURE__ */V("button",{type:"button",onClick:a,disabled:!l,title:l?r.redoStep(d??"",m):r.nothingToRedo,className:ve,children:r.redo})]})}var ke=/* @__PURE__ */new Set([408,429]);function Ee(e){const t=e?.response?.status;return"number"==typeof t?t:void 0}function Ce(e){const t=Ee(e);return null!=t&&(t>=400&&t<500&&!ke.has(t))}function Me(e,t){return!Ce(t)&&e<3}function Ne(){const e=L().loading;/* @__PURE__ */
|
|
11
|
-
return V(y,{size:"sm",padding:"p-8",label:e.label})}var Se="flex-1 min-h-0";function Le(){const e=L().record;/* @__PURE__ */
|
|
12
|
-
return V(y,{label:e.loading,padding:"",className:Se})}function Te(e){return e??void 0}function ze({isPending:e,isFetching:t,enabled:n=!0,error:r,onRetry:o}){const i=L().record;if(t||e&&n)/* @__PURE__ */return V(Le,{});if(r){const e=Ee(r);if(401===e)/* @__PURE__ */
|
|
13
|
-
return V(p,{status:"warning",title:i.signInRequired,subTitle:i.signInBody,className:Se});if(403===e)/* @__PURE__ */
|
|
14
|
-
return V(p,{status:"403",className:Se});if(404===e||410===e)/* @__PURE__ */
|
|
15
|
-
return V(p,{status:"404",title:i.notFound,className:Se});const t=null==e||408===e||429===e||e>=500;/* @__PURE__ */
|
|
16
|
-
return V(p,{status:"500",title:i.loadFailed,subTitle:t?i.checkConnection:i.rejected,extra:t?/* @__PURE__ */V(g,{variant:"secondary",size:"sm",onClick:o,children:i.retry}):void 0,className:Se})}/* @__PURE__ */
|
|
17
|
-
return V(p,{status:"404",title:i.notFound,className:Se})}function Ae({entity:e,children:t,...n}){return null!=e?/* @__PURE__ */V(_,{children:t(e)}):/* @__PURE__ */V(ze,{...n})}var De=/^[a-z]+(?:-[a-z]+)*-\d{13}$/;function Pe(e){return"string"==typeof e&&(e.startsWith("new-")||De.test(e))}function Ie(e){if(Pe(e.entityId))return!0;const t=e.entitySnapshot;return!(!t||"object"!=typeof t||!t._new&&!t._duplicate)}var Ke=z({openWindows:[],openEntity:()=>{},openPage:()=>{},closeEntity:()=>{},minimize:()=>{},items:[],restore:()=>{},remove:()=>{},restoreIfMinimized:()=>!1,openItems:[]}),$e=z(null);function We(e){const t=A($e),n=I(null);null===n.current&&(n.current=/* @__PURE__ */Symbol("window-dirty")),P(()=>{if(t)return t(n.current,e)},[t,e]),K(()=>{if(!t||!e)return;const n=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",n),()=>window.removeEventListener("beforeunload",n)},[t,e])}function Oe(){const e=I(/* @__PURE__ */new Map),[t,n]=$(!1);return{dirty:t,registerDirty:O((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 Re(){return A(Ke)}function Fe(e){if("page"!==e.type&&Ie(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 qe({item:e,onClose:t,accentRgb:n}){const{dirty:r,registerDirty:o}=Oe(),i=oe[e.route];if(!i||!ee(i))return null;const a=i,s=a.component;/* @__PURE__ */
|
|
18
|
-
return V(zr,{open:!0,onClose:t,icon:c[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__ */V($e.Provider,{value:o,children:/* @__PURE__ */V(U,{fallback:/* @__PURE__ */V("div",{className:"flex items-center justify-center py-12",children:/* @__PURE__ */V(Ne,{})}),children:/* @__PURE__ */V(s,{})})})})}function je({entityType:e,entityId:t,label:n}){const r=L(),o=Q(),{data:i}=Z({queryKey:["my-profile-sidebar"],enabled:se(),queryFn:()=>ce.get("/auth/me/").then(e=>e.data)}),a=(i?.preferences||{}).favorite_documents||[],s=a.some(n=>n.entityType===e&&n.entityId===t);/* @__PURE__ */
|
|
19
|
-
return V("button",{onClick:()=>{const r=s?a.filter(n=>!(n.entityType===e&&n.entityId===t)):[...a,{entityType:e,entityId:t,label:n}];ce.patch("/auth/me/",{preferences:{favorite_documents:r}}).then(()=>{o.invalidateQueries({queryKey:["my-profile-sidebar"]})})},title:s?r.taskbar.removeFromDesktop:r.taskbar.addToDesktop,className:"shrink-0 transition-colors "+(s?"text-yellow-500 hover:text-yellow-600":"text-gray-300 hover:text-yellow-400"),children:/* @__PURE__ */V(T,{name:"star",className:"h-4 w-4",fill:s?"currentColor":"none",strokeWidth:1.5})})}var Be=/* @__PURE__ */new Set;function He({item:e,onClose:t,onMinimize:n,accentRgb:r}){const o=oe[e.entityType];if(!o||!te(o))return null;const i=o,[a,s]=$(!1),{dirty:l,registerDirty:d}=Oe(),u=i.queryKey||i.endpoint.replace(/^\/|\/$/g,"").split("/").pop()||e.entityType,h=e.entitySnapshot?._duplicate,m=Pe(e.entityId),p=!i.selfFetching&&!h&&!m&&se(),f=Z({queryKey:[u,e.entityId],queryFn:()=>{return ce.get((t=i.endpoint,n=String(e.entityId),`${t}${encodeURIComponent(n)}/`)).then(e=>e.data);var t,n},initialData:Te(e.entitySnapshot),initialDataUpdatedAt:0,enabled:p,staleTime:0,refetchOnWindowFocus:!0,refetchOnMount:"always",refetchInterval:e=>!Ce(e.state.error)&&6e4,refetchIntervalInBackground:!1,retry:Me}),w=f.data,y=f.refetch;K(()=>{var t;if(p)return t=t=>{t!==e.id||Be.has(t)||y({cancelRefetch:!1})},In.add(t),()=>{In.delete(t)}},[y,e.id,p]);const g=O(()=>{a&&!l?s(!1):t()},[a,l,t]),b=i.selfFetching?e.label:w?i.title(w,a,s):e.label,v=i.icon,x=v?c[v]:null,k=b,E=!i.selfFetching&&w&&i.footer&&!h?i.footer(w):void 0;return i.rendersOwnModal?i.selfFetching?/* @__PURE__ */V(U,{fallback:/* @__PURE__ */V(Ne,{}),children:i.render(w??e.entitySnapshot,t,e.entityId,a,s)}):null!=w?/* @__PURE__ */V(U,{fallback:/* @__PURE__ */V(zr,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */V(Le,{})}),children:i.render(w,t,e.entityId,a,s)}):/* @__PURE__ */V(zr,{open:!0,onClose:t,title:e.label,size:i.size||"2xl",children:/* @__PURE__ */V(ze,{isPending:f.isPending,isFetching:f.isFetching,enabled:p,error:f.error,onRetry:y})}):/* @__PURE__ */V(zr,{open:!0,onClose:g,onMinimize:n,initialBox:e.savedBox,icon:x,title:k,footer:E,copyText:e.label,windowKey:e.id,openedFromKey:e.openedFrom,size:i.size||"2xl",dirty:l,editing:a||m||h,dimensions:i.dimensions,autoHeight:i.autoHeight,autoMinHeight:i.autoMinHeight,autoWidth:i.autoWidth,appStyle:i.appStyle,flushBody:i.flushBody,accentRgb:r,children:/* @__PURE__ */V($e.Provider,{value:d,children:/* @__PURE__ */V(U,{fallback:/* @__PURE__ */V(Le,{}),children:i.selfFetching?i.render(null,t,e.entityId,a,s):/* @__PURE__ */V(Ae,{entity:w,isPending:f.isPending,isFetching:f.isFetching,enabled:p,error:f.error,onRetry:y,children:n=>i.render(n,t,e.entityId,a,s)})})})})}function Ye(e){return document.querySelector(`[data-modal-panel][data-window-key="${e}"]`)}function Ue(e){return document.querySelector(`[data-modal-panel][data-window-root][data-window-owner="${e}"]`)}function Xe(e){const t=Ye(e),n=t??Ue(e);if(!n)return;if(t&&!Un(t))return r=e,void window.dispatchEvent(new CustomEvent("modal-reveal",{detail:{windowKey:r}}));var r;const o=n.getAttribute("data-modal-id");o&&Kn(o)}function Ve(e){if("page"!==e.type)return!0;const t=e.route?oe[e.route]:void 0;if(!t||!ee(t))return!0;const n=t;return!n.widget&&!n.utility}function _e(){const e=ar();if(!e)return;const t=document.querySelector(`[data-modal-panel][data-modal-id="${e}"]`);return t?.getAttribute("data-window-key")??void 0}var Ge=/* @__PURE__ */new Map;function Je(){const e=_e();if(e)return Ge.get(e)}function Qe(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 Ze="rosh-peek-style",et=M.peek,tt=M.taskbarPreview;function nt(e){"undefined"!=typeof document&&(!function(){if("undefined"==typeof document||document.getElementById(Ze))return;const e=document.createElement("style");e.id=Ze,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:${et}!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 rt(){"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 ot({id:e,label:t,maxW:n,maxH:r,titleAbove:o=!1,onClick:i,onClose:a}){const s=L(),l=I(null),[c,d]=$({w:n,h:Math.round(.75*r)}),[u,h]=$(!1);return P(()=>{const o=l.current;if(!o)return;const i=Ye(e)??Qe(t);if(!i)return void h(!1);const a=i.getBoundingClientRect();if(0===a.width||0===a.height)return void h(!1);const s=Math.min(n/a.width,r/a.height),c=Math.max(80,Math.round(a.width*s)),u=Math.max(60,Math.round(a.height*s));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(${s})`,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__ */X("div",{style:{width:c.w,height:c.h},className:"relative rounded-md overflow-hidden bg-white/95 border border-gray-300 shadow-(--elevation-panel) cursor-pointer ring-2 ring-transparent group-hover:ring-blue-400 transition shrink-0",onClick:i,children:[
|
|
20
|
-
/* @__PURE__ */V("div",{ref:l,className:"absolute inset-0 z-0 overflow-hidden"}),!u&&/* @__PURE__ */X("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-gray-400 bg-gray-50",children:[
|
|
21
|
-
/* @__PURE__ */V(T,{name:"window",className:"h-6 w-6",strokeWidth:1.5}),
|
|
22
|
-
/* @__PURE__ */V("span",{className:"mt-1 text-3xs uppercase tracking-wide",children:"Hidden"})]}),!o&&/* @__PURE__ */V("div",{className:"absolute bottom-0 left-0 right-0 z-10 px-2 py-1 text-2xs font-medium text-white bg-gradient-to-t from-black/80 to-transparent truncate pointer-events-none",children:t}),a&&/* @__PURE__ */V("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:s.taskbar.closeWindow,children:/* @__PURE__ */V(T,{name:"close",className:"h-3 w-3",strokeWidth:3})})]})}function it({items:e,anchorEl:t,onActivate:n,onClose:r,onMouseEnter:o,onMouseLeave:i}){const a=L(),s=e.length>1,l=I(null),[c,d]=$({left:-9999,top:-9999,ready:!1}),[u,h]=$(()=>"undefined"!=typeof document&&getComputedStyle(document.documentElement).getPropertyValue("--taskbar-position")?.trim()||"bottom");P(()=>{const e=l.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]),K(()=>rt,[]);const m="top"===u,p=(m?"mt-1":"mb-1")+" max-w-[240px] truncate text-2xs 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 G(
|
|
23
|
-
/* @__PURE__ */V("div",{ref:l,"data-taskbar-preview":"",style:{position:"fixed",left:c.left,top:c.top,zIndex:tt,maxWidth:"calc(100vw - 16px)",opacity:c.ready?1:0},className:s?"flex gap-2 flex-wrap":"",onMouseEnter:o,onMouseLeave:()=>{rt(),i()},children:e.map(e=>{const t=Ye(e.id)??Qe(e.label),o=t?function(e){if(Un(e))return null;const t=e.getBoundingClientRect(),n=Fn(),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 X("div",{className:"group flex flex-col items-center",onMouseEnter:()=>nt(t),children:[!m&&/* @__PURE__ */V("span",{className:p,children:e.label}),
|
|
25
|
-
/* @__PURE__ */V(ot,{id:e.id,label:e.label,maxW:240,maxH:160,titleAbove:!0,onClick:()=>n(e.id),onClose:()=>r(e.id)}),m&&/* @__PURE__ */V("span",{className:p,children:e.label}),null!==o&&/* @__PURE__ */X("span",{title:a.taskbar.offscreenHint,className:"mt-1 inline-flex items-center gap-1 rounded bg-amber-500 px-2 py-0.5 text-2xs font-semibold text-white shadow-sm",children:[
|
|
26
|
-
/* @__PURE__ */V(T,{name:"arrow-right",className:"h-3 w-3",style:{transform:`rotate(${o}deg)`},strokeWidth:3}),"Off screen"]})]},e.id)})}),document.body)}function at(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 st({openWindows:e,onRemove:t,onSplitView:n,onActivate:r,onActivateById:o}){const i=L(),[a,s]=$(null);K(()=>{let e,t;const n=()=>{clearInterval(e),clearTimeout(t),e=void 0},r=()=>{const e=document.getElementById("taskbar-windows");return s(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 l=W(sr,ar),[,d]=$(0);K(()=>{const e=()=>d(e=>e+1);return window.addEventListener("modal-geometry",e),window.addEventListener("resize",e),()=>{window.removeEventListener("modal-geometry",e),window.removeEventListener("resize",e)}},[]);const[,u]=$(0);K(()=>{const e=()=>u(e=>e+1);return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[]);const h=e=>{const t=Qe(e),n=t?.querySelector("[data-window-title]");return n?.textContent?.trim()||e},[m,p]=$(null),[f,w]=$(null),[y,g]=$(null),b=I(null),v=()=>{b.current&&(clearTimeout(b.current),b.current=null),b.current=setTimeout(()=>{p(null),w(null)},150)},M=e.filter(e=>!e.route||!oe[e.route]?.utility);if(!a||!a.isConnected||0===M.length)return null;const N=[],S=/* @__PURE__ */new Map;for(const e of M){const t=e.route?oe[e.route]:void 0,n=t?.taskbarGroup,r=n?.key??e.route??`entity:${e.id}`,o=S.get(r);if(void 0!==o)N[o].items.push(e);else{S.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 G(
|
|
27
|
-
/* @__PURE__ */X(_,{children:[N.map(e=>{const n=e.route?c[e.route]:null,r=e.items[e.items.length-1];let a=!1;if(l){const t=document.querySelector(`[data-modal-id="${l}"]`);if(t){const n=t.querySelector("[data-window-title]"),r=n?.textContent??"";a=e.items.some(e=>r.includes(e.label))}}const s=e.items.length>1,d=e.items.some(e=>{const t=Ye(e.id)??Qe(e.label);return!!t&&!Un(t)});/* @__PURE__ */
|
|
28
|
-
return X("button",{onClick:()=>o(r.id),onMouseEnter:t=>{return n=e.items,r=t.currentTarget,void(y||(b.current&&(clearTimeout(b.current),b.current=null),b.current=setTimeout(()=>{p(n),w(r)},350)));var n,r},onMouseLeave:v,onDoubleClick:e=>{e.stopPropagation(),window.dispatchEvent(new CustomEvent("modal-center",{detail:{windowKey:r.id,label:r.label}}))},onContextMenu:t=>{t.preventDefault(),t.stopPropagation(),b.current&&(clearTimeout(b.current),b.current=null),p(null),w(null),s?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-2 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&&R(n)?j(n,{className:"h-3.5 w-3.5 shrink-0"}):/* @__PURE__ */V(T,{name:"expand",className:"h-3.5 w-3.5 shrink-0",strokeWidth:2}),
|
|
29
|
-
/* @__PURE__ */V("span",{className:"truncate flex-1",children:s?e.label:h(r.label)}),d&&/* @__PURE__ */V("span",{title:i.taskbar.offscreenDot,className:"shrink-0 h-1.5 w-1.5 rounded-full bg-amber-500"}),s&&/* @__PURE__ */V("span",{className:"shrink-0 px-2 py-0.5 rounded-full bg-blue-500/80 text-white text-2xs font-bold leading-none",children:e.items.length}),!s&&/* @__PURE__ */V("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__ */V(T,{name:"close",className:"h-3 w-3",strokeWidth:2})})]},e.key)}),
|
|
30
|
-
/* @__PURE__ */V("div",{className:"flex-1"}),M.length>=2&&/* @__PURE__ */X("button",{onClick:n,title:i.taskbar.expose,className:"flex items-center gap-1 rounded px-2 py-1 text-2xs font-medium text-blue-600 border border-blue-300 hover:bg-blue-50 transition-colors shrink-0",children:[
|
|
31
|
-
/* @__PURE__ */V(T,{name:"grid",className:"h-3 w-3",strokeWidth:2}),"Exposé"]}),y&&/* @__PURE__ */X(x,{portal:!0,minWidth:200,style:at(y.x,y.y),onClose:()=>g(null),children:[
|
|
32
|
-
/* @__PURE__ */V(C,{children:y.label}),
|
|
33
|
-
/* @__PURE__ */X(k,{onClick:()=>{g(null),y.items.forEach(e=>function(e){const t=kn.get(e);t&&$n(t)}(e.id))},children:[
|
|
34
|
-
/* @__PURE__ */V(T,{name:"remove",className:"h-4 w-4",strokeWidth:1.5}),i.taskbar.minimizeAllWindows]}),
|
|
35
|
-
/* @__PURE__ */X(k,{onClick:()=>{g(null),y.items.forEach(e=>o(e.id))},children:[
|
|
36
|
-
/* @__PURE__ */V("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */V("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75h6.5v6.5h-6.5zM13.75 8.75h6.5v6.5h-6.5z"})}),i.taskbar.restoreAllWindows]}),
|
|
37
|
-
/* @__PURE__ */V(E,{}),
|
|
38
|
-
/* @__PURE__ */X(k,{danger:!0,onClick:()=>{g(null),y.items.forEach(e=>t(e.id))},children:[
|
|
39
|
-
/* @__PURE__ */V(T,{name:"close",className:"h-4 w-4",strokeWidth:2}),`${i.taskbar.closeAllWindows} (${y.items.length})`]})]}),m&&f&&/* @__PURE__ */V(it,{items:m,anchorEl:f,onActivate:e=>{o(e),p(null),w(null)},onClose:e=>{t(e),p(null),w(null)},onMouseEnter:()=>{b.current&&(clearTimeout(b.current),b.current=null)},onMouseLeave:v})]}),a)}var lt=["/login","/forgot-password","/reset-password","/force-change-password"];function ct({children:e,windowAccentForRoute:t}){const n=J(),r=lt.some(e=>n.pathname.startsWith(e)),[o,i]=$([]),a=I(o);P(()=>{a.current=o},[o]);const s=W(we,fe,fe),l=I(/* @__PURE__ */new Map),c=e=>{const t=Ve(e),n=!!s&&"page"===e.type&&e.route===s,r=e.pageSearch||void 0,o=l.current.get(e.id);if(o&&o.tab===t&&o.home===n&&o.pageSearch===r)return o;const i={key:e.id,tab:t,home:n,...r?{pageSearch:r}:{}};return l.current.set(e.id,i),i};K(()=>{Ge.clear();for(const e of o)e.route&&Ge.set(e.id,e.route)},[o]);const d=O(e=>{i(t=>t.filter(t=>t.id!==e))},[]),u=O(e=>{var t;Ye(e)||Ue(e)?(t=e,window.dispatchEvent(new CustomEvent(lr,{detail:{windowKey:t}}))):d(e)},[d]),h=(e,t=!1)=>{const n=yn;t&&Be.add(e),setTimeout(()=>{const r=document.querySelector(`[data-modal-panel][data-window-key="${e}"]`),o=r?.getAttribute("data-modal-id");var i,a;!o||(i=o,a=n,(gn.get(i)??-1)>a)||Kn(o),t&&Be.delete(e)},50)},m=O((e,t,n,r,o)=>{if(!oe[e]||!te(oe[e]))return;const a=`${e}:${t}`,s=_e();i(i=>{const l=i.find(n=>n.entityType===e&&String(n.entityId)===String(t));return l?(h(l.id),i):(h(a,!0),[...i,{id:a,type:"modal",label:r||t,route:o||window.location.pathname,entityType:e,entityId:t,entitySnapshot:Te(n),openedFrom:s}])})},[]),p=O((e,t={})=>{if(!oe[e]||!ee(oe[e]))return;const n=oe[e],{reuse:r=!1,background:o=!1,shellOwned:s,search:l}=t,c=e=>{var t;o?(t=e,Sn.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 d=_e();i(t=>{if(n.multiInstance){const i=t.filter(t=>"page"===t.type&&t.route===e);if(r&&!l&&i.length>0)return o||h(i[i.length-1].id),t;const a=`page:${e}:${Math.random().toString(36).slice(2,8)}`;return c(a),[...t,{id:a,type:"page",label:n.label,route:e,openedFrom:d,...s?{shellOwned:s}:{},...l?{pageSearch:l}:{}}]}const i=t.find(t=>"page"===t.type&&t.route===e);if(i)return n.widget?t:(o||h(i.id),l&&i.pageSearch!==l?t.map(e=>e===i?{...e,pageSearch:l}:e):t);const a=`page:${e}`;return c(a),[...t,{id:a,type:"page",label:n.label,route:e,openedFrom:d,...s?{shellOwned:s}:{},...l?{pageSearch:l}:{}}]})},[u]),f=O(()=>{},[]),w=O(()=>{},[]),y=u,g=u;/* @__PURE__ */
|
|
40
|
-
return X(Ke.Provider,{value:{openWindows:o,openEntity:m,openPage:p,closeEntity:y,minimize:f,items:[],openItems:o,restore:w,remove:g,restoreIfMinimized:()=>!1},children:[e,
|
|
41
|
-
/* @__PURE__ */V(st,{openWindows:o,onRemove:u,onSplitView:Lr,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&&Kn(e)}})},onActivateById:Xe}),
|
|
42
|
-
/* @__PURE__ */V(Tr,{}),!r&&o.map(e=>{const n=e.route?t?.(e.route):void 0;
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
return V(de.Provider,{value:c(e),children:/* @__PURE__ */V(ge,{fallback:(t,n)=>/* @__PURE__ */V(zr,{open:!0,onClose:()=>d(e.id),title:e.label,size:"md",autoHeight:!0,windowKey:e.id,children:/* @__PURE__ */V(ye,{error:t,onReload:n})}),children:/* @__PURE__ */V(Kt,{spec:Fe(e),children:/* @__PURE__ */V(Wr,{windowId:e.id,children:"page"===e.type?/* @__PURE__ */V(qe,{item:e,onClose:()=>d(e.id),accentRgb:n}):/* @__PURE__ */V(He,{item:e,onClose:()=>d(e.id),onMinimize:()=>{},accentRgb:n})})})})},e.id)})]})}var dt=null,ut=/* @__PURE__ */new Set;function ht(){return dt}function mt(e){if(dt!==e){dt=e;for(const e of ut)e()}}function pt(e){return ut.add(e),()=>{ut.delete(e)}}var ft=!1,wt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},yt=()=>{};function gt(e){ft=e,wt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0}}function bt(e,t){ft&&("submenu"===e?wt.submenus++:wt.menus++,wt.menuKey=t)}function vt(e){if(!ft)return yt;const t=performance.now();let n=!1;return()=>{if(n)return;if(n=!0,!ft)return;const r=performance.now()-t;"move"===e?wt.moveMs+=r:wt.resizeMs+=r}}function xt(){const e=wt;return wt={menus:0,submenus:0,menuKey:null,moveMs:0,resizeMs:0},e}var kt=/* @__PURE__ */new Set(["button","a","input","select","textarea","kbd"]),Et=/* @__PURE__ */new Set(["svg"]);function Ct(e){const t=[],n={text:"",accessories:[]};return Mt(e,n,t),n.text=t.join("").replace(/\s+/g," ").trim(),n}function Mt(e,t,n){if(null==e||"boolean"==typeof e)return;if("string"==typeof e||"number"==typeof e)return void n.push(String(e));if(Array.isArray(e))return void e.forEach(e=>Mt(e,t,n));if(!R(e))return;const r=e;if(r.type!==d)if(r.type!==F){if("string"==typeof r.type){if(Et.has(r.type))return;if(!kt.has(r.type))return n.push(" "),q.toArray(r.props.children).forEach(e=>Mt(e,t,n)),void n.push(" ")}t.accessories.push(j(r,{key:`title-part-${t.accessories.length}`}))}else q.toArray(r.props.children).forEach(e=>Mt(e,t,n));else void 0===t.copy&&"string"==typeof r.props.text&&r.props.text&&(t.copy=r.props.text)}var Nt=/* @__PURE__ */new Map,St=/* @__PURE__ */new Set,Lt=0;function Tt(){Lt++,St.forEach(e=>e())}function zt(e){return Nt.get(e)}function At(e){return St.add(e),()=>{St.delete(e)}}function Dt(){return Lt}var Pt=z(""),It=z(null);function Kt({spec:e,children:t}){/* @__PURE__ */
|
|
45
|
-
return V(It.Provider,{value:e,children:t})}var $t=/* @__PURE__ */new Set(["button","input","textarea","select","kbd","svg"]),Wt='button[type="submit"], button[data-submit], button.btn-submit, button.bg-green-600, button.bg-blue-600',Ot='button, a[href], summary, [role="button"], [role="link"], [role="menuitem"], select';function Rt(e){return Ft(e).replace(/\s+/g," ").trim()}function Ft(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(Ft).join("");if(R(e)){const t=e,n="string"==typeof t.type?t.type:"";return $t.has(n)?"":` ${Ft(t.props?.children)} `}return""}function qt(e){const t=A(Pt);K(()=>{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 jt={};function Bt(e,t,n){const r=A(Pt);K(()=>{if(!r)return;jt[r]||(jt[r]=[]);const o={label:e,icon:n,onClick:t};return jt[r].push(o),()=>{jt[r]=(jt[r]||[]).filter(e=>e!==o)}},[r,e,t,n])}function Ht({title:e}){const t=I(null);return K(()=>{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__ */V("span",{ref:t,style:{display:"none"},"aria-hidden":"true"})}function Yt(e){}var Ut=z(null);function Xt(){return A(Pt)}function Vt(){const e=W(sr,ar),t=A(Ut);return t?.active??(pn.length<=1||null!=e)}function _t({children:e,position:t="right",quiet:n=!1}){const r=A(Ut),[o,i]=$(null);return K(()=>{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),s=setTimeout(()=>clearInterval(a),2e3);return()=>{clearInterval(a),clearTimeout(s)}},[r,t,n]),o?G(e,o):null}function Gt({onClick:e,children:t,className:n}){const r=A(Ut);/* @__PURE__ */
|
|
46
|
-
return V("button",{type:"button",onClick:async()=>{if(r?.isDirty){const{confirm:e}=await(import("./ConfirmDialog-VL3YU35U.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 Jt="erp_window_positions",Qt={};try{const e=localStorage.getItem(Jt);e&&(Qt=JSON.parse(e))}catch{}var Zt=null;function en(){Zt&&clearTimeout(Zt),Zt=setTimeout(()=>{try{localStorage.setItem(Jt,JSON.stringify(Qt))}catch{}},500)}var tn="erp_activation_order",nn=[];try{const e=localStorage.getItem(tn),t=e?JSON.parse(e):null;Array.isArray(t)&&t.every(e=>"string"==typeof e)&&(nn=t)}catch{}var rn=null;function on(){rn&&clearTimeout(rn),rn=setTimeout(()=>{try{localStorage.setItem(tn,JSON.stringify(nn))}catch{}},500)}function an(e,t){Qt[e]||(Qt[e]=t,en())}function sn(e){return Qt[e]?{...Qt[e]}:null}function ln(e,t){Qt[e]=t,en()}function cn(){const r=e(),o=t();let i=!1;for(const e of Object.keys(Qt))n(Qt[e],r,o)&&(delete Qt[e],i=!0);i&&en()}var dn={sm:384,md:512,lg:672,xl:896,"2xl":1152,"3xl":1408},un=4e3,hn=()=>{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"},mn={small:.8,medium:1,large:1.25,maximized:1.25},pn=[],fn=/* @__PURE__ */new Set,wn=/* @__PURE__ */new Set,yn=0,gn=/* @__PURE__ */new Map;var bn=0;function vn(){return bn}function xn(){bn++,fn.forEach(e=>e())}var kn=/* @__PURE__ */new Map,En=/* @__PURE__ */new Map,Cn=/* @__PURE__ */new Map;function Mn(){for(let e=pn.length-1;e>=0;e--){const t=Cn.get(pn[e]);if(t?.tab)return t.owner}return null}function Nn(){return W(sr,Mn,()=>null)}var Sn=/* @__PURE__ */new Set;var Ln=null;function Tn(e){Ln=null,Kn(e)}function zn(e){Ln=e;const t=kn.get(e);t&&Tn(t)}function An(e){Ln===e&&(Ln=null)}function Dn(e,t,n){if(n&&Cn.set(e,n),t)if(kn.set(t,e),En.set(e,t),Sn.delete(t)){pn.unshift(e);const n=nn.indexOf(t);-1!==n&&nn.splice(n,1),nn.unshift(t),on()}else!function(e,t){const n=nn.indexOf(t);if(-1===n)return void pn.push(e);let r=pn.length;for(let e=0;e<pn.length;e++){const t=En.get(pn[e]);if(t&&nn.indexOf(t)>n){r=e;break}}pn.splice(r,0,e)}(e,t),-1===nn.indexOf(t)&&(nn.push(t),on());else pn.push(e);xn(),window.dispatchEvent(new CustomEvent("modal-reorder")),t&&Ln===t&&Tn(e)}function Pn(e){return e?Cn.get(e)?.owner??En.get(e)??null:null}var In=/* @__PURE__ */new Set;function Kn(e){const t=Pn(ar()),n=pn.indexOf(e);-1!==n&&pn.splice(n,1),pn.push(e);const o=Cn.get(e);if(o?.root&&o.tab&&r()){const e=pn.filter(e=>{const t=Cn.get(e);return!!t&&!t.root&&t.owner===o.owner});for(const t of e)pn.splice(pn.indexOf(t),1),pn.push(t)}wn.delete(e);const i=En.get(e);if(i){const e=nn.indexOf(i);-1!==e&&nn.splice(e,1),nn.push(i),on(),Ln&&Ln!==i&&(Ln=null)}xn(),window.dispatchEvent(new CustomEvent("modal-reorder"));const a=Pn(ar());a&&a!==t&&In.forEach(e=>e(a))}function $n(e){const t=pn.indexOf(e);-1!==t&&pn.splice(t,1),wn.add(e),gn.set(e,++yn);const n=En.get(e);if(n){const e=nn.indexOf(n);-1!==e&&(nn.splice(e,1),on())}xn(),window.dispatchEvent(new CustomEvent("modal-reorder"))}var Wn=/* @__PURE__ */new Set;var On=8,Rn=32;function Fn(){return e()}var qn=40,jn=80,Bn=384,Hn=400;function Yn(e,t=Fn()){const n=Math.min(Math.max(e.x,t.x+jn-e.w),t.x+t.w-jn),r=Math.min(Math.max(e.y,t.y),t.y+t.h-qn);return n===e.x&&r===e.y?e:{...e,x:n,y:r}}function Un(e){const t=e.getBoundingClientRect();if(0===t.width||0===t.height)return!0;const n=Fn();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 Xn(e){const t=Fn(),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 Vn=null;function _n(e){const t=(Vn||((Vn=document.createElement("div")).style.cssText=["position: fixed","pointer-events: none",`z-index: ${M.snapPreview}`,"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(Vn)),Vn);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 Gn(){Vn&&(Vn.style.opacity="0",Vn.style.display="none")}var Jn=[{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"}],Qn=350,Zn=200;function er({maximized:e,onToggleMax:t,onSnap:n,buttonClassName:r,strings:o}){const[i,a]=$(!1),s=I(void 0),l=I(void 0);K(()=>()=>{clearTimeout(s.current),clearTimeout(l.current)},[]);const c=()=>{clearTimeout(l.current),s.current=setTimeout(()=>a(!0),Qn)},d=()=>{clearTimeout(s.current),l.current=setTimeout(()=>a(!1),Zn)};/* @__PURE__ */
|
|
47
|
-
return X("span",{className:"relative inline-flex",onMouseEnter:c,onMouseLeave:d,children:[
|
|
48
|
-
/* @__PURE__ */V("button",{onClick:t,onFocus:c,onBlur:d,title:e?o.windowed:o.maximize,className:r,children:e?"❐":"⤢"}),i&&/* @__PURE__ */V("div",{role:"group","aria-label":o.snapLayouts,onMouseEnter:()=>clearTimeout(l.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-2 shadow-lg",children:Jn.map(({zone:e,labelKey:t,region:r})=>/* @__PURE__ */V("button",{type:"button","aria-label":o[t],title:o[t],onClick:()=>{a(!1),n(e)},onFocus:()=>clearTimeout(l.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__ */V("span",{"aria-hidden":"true",className:`absolute rounded-sm bg-blue-500/70 ${r}`,style:{margin:2}})},e))})]})}var tr="rosh-gesture-style";var nr={se:"nwse-resize",nw:"nwse-resize",sw:"nesw-resize",ne:"nesw-resize",n:"ns-resize",s:"ns-resize",e:"ew-resize",w:"ew-resize"},rr=4;function or(e,t,n,r){!function(){if("undefined"==typeof document||document.getElementById(tr))return;const e=document.createElement("style");e.id=tr,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=vt(r);let a=!1;return()=>{if(!a){a=!0,i();try{e.releasePointerCapture(t)}catch{}o.remove(),document.body.classList.remove("rosh-gesturing")}}}function ir(e){const t=pn.indexOf(e);if(-1===t)return-1;const n=M.window+t*M.windowStep,o=Cn.get(e);if(!o||o.root||!o.tab||!r())return n;let i=-1;for(const[e,t]of Cn){if(!t.root||t.owner!==o.owner)continue;const n=pn.indexOf(e);-1!==n&&(i=Math.max(i,M.window+n*M.windowStep))}return i>=n?i+2+Math.min(t,7):n}function ar(){return pn[pn.length-1]||null}function sr(e){return fn.add(e),()=>{fn.delete(e)}}"undefined"!=typeof window&&window.addEventListener("deactivate-all-modals",function(){for(let e=pn.length-1;e>=0;e--)Wn.has(pn[e])||pn.splice(e,1);nn=nn.filter(e=>{const t=kn.get(e);return null!=t&&Wn.has(t)}),on(),xn(),window.dispatchEvent(new CustomEvent("modal-reorder"))});var lr="modal-close-request";function cr(e){W(sr,vn);const t=A(Ut);if(pn.length<=1)return!0;if(e){const t=kn.get(e);if(null!=t)return ar()===t}return t?.active??null!=ar()}var dr=!1,ur=/* @__PURE__ */new Set;function hr(e){return ur.add(e),()=>ur.delete(e)}function mr(){return dr}function pr(e){dr!==e&&(dr=e,ur.forEach(e=>e()))}function fr(){pr(!dr)}function wr(){pr(!1)}var yr=null,gr=/* @__PURE__ */new Set;function br(e){return gr.add(e),()=>gr.delete(e)}function vr(){return yr}function xr(e){yr!==e&&(yr=e,gr.forEach(e=>e()))}var kr=null,Er=/* @__PURE__ */new Set;function Cr(e){return Er.add(e),()=>Er.delete(e)}function Mr(){return kr}function Nr(e){kr!==e&&(kr=e,Er.forEach(e=>e()))}function Sr(){if(!kr)return void pr(!1);xr(kr),Nr(null),pr(!1)}function Lr(){pr(!dr),window.dispatchEvent(new CustomEvent("modal-split-view"))}function Tr(){const e=W(hr,mr),[t,n]=$(e),[r,o]=$(e);return K(()=>{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?G(
|
|
49
|
-
/* @__PURE__ */V("div",{onMouseDown:e=>{e.stopPropagation(),pr(!1)},style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(2px)",WebkitBackdropFilter:"blur(2px)",zIndex:M.expose,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 zr({open:t,onClose:i,title:c,icon:d,copyText:u,size:h="lg",dirty:m=!1,onNext:p,onPrev:y,footer:g,bodyScroll:C,onMinimize:S,initialBox:z,actions:D,actionsLeft:F,editing:q=!1,allowPinOnTop:Y,initialPosition:U,widget:J,compact:Q,appStyle:Z,flushBody:ee,autoHeight:te,autoMinHeight:ne,autoWidth:re,widgetMenu:oe,dimensions:ie,windowKey:ae,openedFromKey:se,accentRgb:le,children:ce}){const ue=f(),[he,me]=$(0),[pe,fe]=$(!1),we=I(null),ye=I(0);K(()=>{ye.current=he},[he]);const ve=O(e=>{ue&&(we.current={startX:e.clientX,startY:e.clientY,pointerId:e.pointerId},fe(!0),mt(se??null))},[ue,se]),ke=W(pt,ht);K(()=>{if(!pe)return;const e=e=>{if(!we.current)return;const t=e.clientX-we.current.startX;if(Math.abs(e.clientY-we.current.startY)>Math.abs(t)+12)return we.current=null,fe(!1),me(0),void mt(null);me(Math.max(0,t))},t=()=>{if(!we.current)return;const e=.3*window.innerWidth,t=ye.current>e;we.current=null,fe(!1),t?(me(window.innerWidth),setTimeout(()=>{i(),me(0),mt(null)},180)):(me(0),mt(null))};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),window.addEventListener("pointercancel",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t),window.removeEventListener("pointercancel",t)}},[pe]);const[Ee,Ce]=$(c),Me=L(),Ne=Me.window;K(()=>{Ce(c)},[c]);const Se=B(()=>Rt(Ee).trim()||void 0,[Ee]),Le=H(),[Te,ze]=$(!1),Ae=I(!1),[De,Pe]=$(!1),[Ie,Ke]=$(null),$e=A(It),Oe=A(de),{prefs:Fe,save:qe}=w(),je=!!Fe.window_accent_stripe,Be=Fe.favorite_documents||[],He=!!$e&&Be.some(e=>e.entityType===$e.entityType&&e.entityId===$e.entityId),Ye=O(()=>{if(!$e)return;const e=He?Be.filter(e=>!(e.entityType===$e.entityType&&e.entityId===$e.entityId)):[...Be,{entityType:$e.entityType,entityId:$e.entityId,label:$e.label}];qe({favorite_documents:e})},[$e,He,Be,qe]),[Ue,Xe]=$(null),[Ve,_e]=$("top-right"===U?"right":"left"),Ge=I(!1),Je=I(null);P(()=>{const e=Je.current;e&&(le?e.style.setProperty("--window-accent-rgb",le):e.style.removeProperty("--window-accent-rgb"))},[le]);const Qe=I(!1),Ze=I(null),et=I(null),tt=I(null),[nt,rt]=$(!1),ot=I(null),it=!!(g||D||F)||nt,at=A(be),st=""!==A(Pt),lt=I(null);lt.current=Oe?{owner:Oe.key,tab:Oe.tab,root:!st}:null;const ct=ae||(Oe&&!st?Oe.key:null),dt=!!at&&!st&&at.enabled&&at.hasState&&(q||at.declaredEditable)&&!at.handMounted&&it&&!J&&!Q&&!Z&&!ue,ut=/* @__PURE__ */V(T,{name:"window",className:"h-4 w-4",strokeWidth:1.5}),ft=d&&R(d)?j(d,{className:`h-4 w-4 ${d.props?.className??""}`.trim()}):d??ut,wt=()=>/* @__PURE__ */V("button",{onPointerDown:e=>e.stopPropagation(),onClick:e=>{e.stopPropagation();const t=e.currentTarget.getBoundingClientRect();Ke(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:ft}),yt=40,{minimize:gt,items:bt,restoreIfMinimized:vt,openWindows:xt}=Re(),kt=I(`modal-${Math.random().toString(36).slice(2,8)}`).current;K(()=>{if(J)return Wn.add(kt),()=>{Wn.delete(kt)}},[J,kt]),K(()=>{const e=e=>{const t=e.detail;t?.id===kt&&Ce(t.title)};return window.addEventListener("window-title-update",e),()=>window.removeEventListener("window-title-update",e)},[kt]);const[Et,Mt]=$(M.window),St=function(e){const t=W(sr,ar);return pn.length<=1||t===e}(kt),Lt=function(e){return W(sr,()=>wn.has(e))}(kt),zt=W(hr,mr),At=W(br,vr),Dt=W(Cr,Mr),Kt=!Y&&!J,$t=zt&&Kt,[Ft,qt]=$(!1),Bt=$t&&Dt===kt,[Ht,Yt]=$(!1),Xt=Ht&&Kt&&At===kt?"picked":null,Vt=I($t);K(()=>{if(Vt.current&&!$t){Yt(!0);const e=setTimeout(()=>{Yt(!1),yr===kt&&xr(null)},700);return Vt.current=$t,()=>clearTimeout(e)}Vt.current=$t},[$t,kt]),K(()=>{$t||qt(!1)},[$t]),K(()=>{const e=et.current,t=tt.current;if(!e&&!t)return;const n=e=>e?Array.from(e.children).filter(e=>"shell"!==e.dataset.undoControls).length:0,r=()=>rt(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()},[t]),K(()=>{const e=e=>{if(e.target.closest('button[type="submit"]')&&Je.current){const t=Je.current.querySelector("form");t&&(e.preventDefault(),t.requestSubmit())}},t=et.current,n=tt.current;return t&&t.addEventListener("click",e),n&&n.addEventListener("click",e),()=>{t&&t.removeEventListener("click",e),n&&n.removeEventListener("click",e)}},[t]);const _t=I(!1),Gt=O(e,[]),Jt=O(()=>{const t=e(),n=ie?ie[0]:dn[h]||672,o=t.w-80,i=t.h-80,a=Math.min(n,o),s=mn[hn()],l=ie?Math.min(ie[1],i):(()=>{const e=("sm"===h?500:"md"===h?600:"lg"===h?700:"xl"===h?800:920)*s;return Math.max(320,Math.min(e,t.h-80))})(),c="cascade"!==(getComputedStyle(document.documentElement).getPropertyValue("--window-position")?.trim()||"cascade")||r()?0:30*(pn.length-1),d=Math.max(yt,(i-l)/2),u=(o-a)/2,m=t.h-yt-l-d;return"top-right"===U?{x:t.x+t.w-a-yt,y:t.y+yt,w:a,h:l}:"top-left"===U?{x:t.x+yt,y:t.y+yt,w:a,h:l}:{x:t.x+Math.max(yt,(o-a)/2+yt)+Math.min(c,Math.max(0,u)),y:t.y+d+Math.min(c,Math.max(0,m)),w:a,h:l}},[h]),Zt=I(!1);t||(Zt.current=!1);const tn=ae||u||null;K(()=>{if(!t)return;Dn(kt,tn,lt.current??void 0),ae||Kn(kt),_t.current=!1,Mt(ir(kt));const e=()=>{Mt(ir(kt))},n=()=>{},r=e=>{if(!e)return!1;if(e.windowKey)return e.windowKey===ae;if(!e.label)return!1;const t=Je.current?.querySelector("[data-window-title]");return!!t?.textContent?.includes(e.label)},o=e=>{if(!r(e.detail))return;if(Kn(kt),Mn.current)return;const t=Fn(),n=Math.min(An.current.w,t.w-40),o=Math.min(An.current.h,t.h-40),i=t.x+(t.w-n)/2,a=t.y+(t.h-o)/2;on({x:i,y:a,w:n,h:o}),zn(!1)},i=e=>{const t=e.detail;r(t)&&(Kn(kt),Ke({x:t.x,y:t.y}))},a=e=>{if(e.detail?.windowKey!==ae)return;Kn(kt);const t=An.current,n=function(e,t=Fn()){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=Je.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)}on(n)};return window.addEventListener("modal-reorder",e),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=pn.indexOf(e);-1!==t&&(pn.splice(t,1),xn()),wn.delete(e),gn.delete(e),Cn.delete(e);const n=En.get(e);n&&(En.delete(e),kn.delete(n))}(kt),window.removeEventListener("modal-reorder",e),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"))}},[t,kt,tn,Gt]);const nn=!J&&"maximized"===hn(),[rn,on]=$(()=>{if(tn&&Qt[tn]){const e={...Qt[tn]};return ie&&(e.w=ie[0],te||(e.h=ie[1])),Yn(e)}return z?{x:z.x,y:z.y,w:z.w,h:z.h}:nn?Gt():Jt()}),[an,sn]=$(()=>!te),[ln,cn]=$(()=>r()),fn=I(ln),yn=I(null);K(()=>{const e=()=>{const e=r();e!==fn.current&&yn.current?.(e),fn.current=e,cn(e),Mt(ir(kt))};return window.addEventListener("react-os-shell:layout-mode-changed",e),()=>window.removeEventListener("react-os-shell:layout-mode-changed",e)},[kt]);const bn=ln&&!!Oe?.tab&&!st&&!J&&!ue,vn=bn,Mn=I(vn);Mn.current=vn;const Sn=Nn(),Ln=ln&&!!Oe?.tab&&!J&&!ue&&!zt&&Sn!==Oe.key,[Tn,zn]=$(()=>tn&&Qt[tn]||z?vn:vn||nn),An=I(rn);An.current=rn;const Pn=I(Tn);P(()=>{Pn.current=Tn},[Tn]),P(()=>{if(an||bn)return;const e=Je.current,t=Ze.current;if(!e||!t)return;const n=ne??(J?0:240),r=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0;let o=0,i=null,a=null;const s=()=>{const c=t.firstElementChild;if(!c||e.offsetHeight<=0)return;c!==a&&(a&&l.unobserve(a),l.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,An.current.y)-24),g=w?Math.min(An.current.h,y):Math.min(Math.max(n,d+p),y),b=Math.abs(g-o)>1;b&&(o=g,on(e=>Math.abs(e.h-g)>1?{...e,h:g}:e)),J||(g<=n?i&&(clearTimeout(i),i=null):(b||null===i)&&(i&&clearTimeout(i),i=setTimeout(()=>{const e=o;s(),o===e&&sn(!0)},160)))},l=new ResizeObserver(s);s(),ot.current&&l.observe(ot.current);const c=new MutationObserver(s);return c.observe(t,{childList:!0,subtree:!0,characterData:!0}),()=>{l.disconnect(),c.disconnect(),i&&clearTimeout(i)}},[an,J,ne,it,bn]),P(()=>{if(!te||!an||J||!t)return;const e=ot.current;if(!e)return;let n=e.offsetHeight;const r=new ResizeObserver(()=>{if(!e.isConnected)return;const t=e.offsetHeight,r=t-n,o=t>0!=n>0;if(n=t,!o||0===r||Tn)return;if(document.body.classList.contains("rosh-gesturing"))return;const i=ne??240,a=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--taskbar-height"))||0,s=Math.max(i,window.innerHeight-a-Math.max(0,An.current.y)-24);on(e=>({...e,h:Math.min(Math.max(i,e.h+r),s)}))});return r.observe(e),()=>r.disconnect()},[te,an,J,t,Tn,ne]);const In=!1!==re&&!J&&!Z&&!ue,[qn,jn]=$(()=>!In);P(()=>{if(qn||!t)return;if(!In||Tn)return void jn(!0);const n=Je.current,r=Ze.current;if(!n||!r)return;const o=/* @__PURE__ */new WeakSet;let i=An.current.w,c=0;const d=()=>jn(!0),u=()=>{c=0;const t=An.current;if(Math.abs(t.w-i)>1||document.body.classList.contains("rosh-gesturing"))return void d();const u=e(),h=u.w-80;if(t.w>=h)return void d();const m=[],p=[];for(const e of[r,...Array.from(r.querySelectorAll("*"))]){const t=e.scrollWidth-e.clientWidth;if(t<=4||o.has(e))continue;const n=getComputedStyle(e).overflowX;"auto"!==n&&"scroll"!==n||(m.push(e),p.push(t))}if(!m.length)return;const f=Math.min(h,t.w+Math.max(...p)),w=f-t.w,y=n.style.width;n.style.width=`${f}px`;const g=m.map((e,t)=>({over:p[t],residual:e.scrollWidth-e.clientWidth}));n.style.width=y,g.forEach((e,t)=>{a(e,w)||o.add(m[t])});const b=s(t,l(t.w,w,g),u,yt);b!==t&&(i=b.w,on(b))};u();const h=new MutationObserver(()=>{c||(c=requestAnimationFrame(u))});h.observe(r,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["style","class","hidden"]});const m=setTimeout(d,un);return()=>{h.disconnect(),c&&cancelAnimationFrame(c),clearTimeout(m)}},[qn,t,In,Tn]);const Un=I(null),Vn=!(!Oe?.tab||st||J||ue);yn.current=t=>{if(!Vn)return;if(t)return Un.current||(Un.current={box:{...An.current},maximized:Pn.current}),void(Pn.current=!0);const r=Un.current;Un.current=null;const o=e();if(r?.maximized)return Pn.current=!0,zn(!0),void on(o);const i=r?.box??(tn?Qt[tn]:void 0);if(Pn.current=!1,zn(!1),i&&!n(i,o,!1)){const e={...i};ie&&(e.w=ie[0],te||(e.h=ie[1])),on(Yn(e))}else on(Jt())},K(()=>{vn&&(Pn.current=!0,zn(!0),on(Gt()))},[vn,Gt]),K(()=>{if(J)return;const e=()=>{const e=tn?Qt[tn]:void 0;if(Pn.current=!1,zn(!1),e){const t={...e};ie&&(t.w=ie[0],te||(t.h=ie[1])),on(Yn(t))}else on(Jt())};return window.addEventListener("react-os-shell:restore-windowed",e),()=>window.removeEventListener("react-os-shell:restore-windowed",e)},[J,Jt,tn]),K(()=>{t&&tn&&!bn&&(Qt[tn]=rn,en()),t&&window.dispatchEvent(new CustomEvent("modal-geometry"))},[rn,t,tn,bn]),K(()=>{if(!t)return;const e=()=>{Pn.current?on(Gt()):document.body.classList.contains("rosh-gesturing")||on(Yn)};window.addEventListener("resize",e),window.addEventListener(o,e);let n=null;return Tn&&(n=new MutationObserver(e),n.observe(document.body,{childList:!0,subtree:!1,attributes:!0,attributeFilter:["class"]})),()=>{window.removeEventListener("resize",e),window.removeEventListener(o,e),n?.disconnect()}},[t,Tn,Gt]),K(()=>{if(t&&(ze(!1),Ae.current=!1,Ge.current=!1,jn(!In),!Mn.current)){if(tn&&Qt[tn]){const e=Qt[tn];return void on(t=>Yn({...e,...te?{h:t.h}:{},...In?{x:t.x,w:t.w}:{}}))}z&&(on({x:z.x,y:z.y,w:z.w,h:z.h}),zn(z.maximized))}},[t]),K(()=>{if(!t||"auto"!==m)return;let e;const n=t=>{Je.current?.contains(t.target)&&!Ae.current&&(Ae.current=!0,e=setTimeout(()=>ze(!0),0))};return document.addEventListener("input",n,!0),document.addEventListener("change",n,!0),()=>{clearTimeout(e),document.removeEventListener("input",n,!0),document.removeEventListener("change",n,!0)}},[t,m]);const Jn="auto"===m?Te:!0===m,Qn=Oe&&!st?Oe.key:null,Zn=B(()=>Ct(Ee),[Ee]),tr=I({shortcutSpec:$e,isOnDesktop:He,toggleDesktopShortcut:Ye,taskbarStrings:Me.taskbar});P(()=>{tr.current={shortcutSpec:$e,isOnDesktop:He,toggleDesktopShortcut:Ye,taskbarStrings:Me.taskbar}});const cr=I(null);cr.current||(cr.current={open:(e,t)=>Ke({x:e,y:t}),items:()=>{const e=tr.current,t=[];e.shortcutSpec&&t.push({label:e.isOnDesktop?e.taskbarStrings.removeFromDesktop:e.taskbarStrings.addToDesktop,onSelect:e.toggleDesktopShortcut});for(const e of jt[kt]||[])t.push({label:e.label,icon:e.icon,onSelect:e.onClick});return t}}),K(()=>{t&&Qn&&function(e,t){const n=Nt.get(e);n&&n.title===t.title&&n.dirty===t.dirty&&n.copy===t.copy&&n.menu===t.menu||(Nt.set(e,t),Tt())}(Qn,{title:Zn.text||Se,dirty:Jn,copy:Zn.copy,menu:cr.current??void 0})},[t,Qn,Se,Jn,Zn.text,Zn.copy]),K(()=>{if(t&&Qn)return()=>{return e=Qn,void(Nt.delete(e)&&Tt());var e}},[t,Qn]),We(!(ae||!t)&&Jn);const dr=O(async()=>{if(!Ge.current){if(Jn||"auto"===m&&Ae.current){Ge.current=!0;const e=Se,t=await b({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(Ge.current=!1,!t)return}i()}},[Jn,m,i,Se]);P(()=>{if(!t||!ct)return;const e=e=>{e.detail?.windowKey===ct&&dr()};return window.addEventListener(lr,e),()=>window.removeEventListener(lr,e)},[t,ct,dr]);const ur=I(null),fr=O(e=>{if(0!==e.button)return;if(e.target.closest("button, input, a, kbd, select, textarea"))return;if(Ke(null),Kn(kt),Mn.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=Je.current,s=a?.getBoundingClientRect();let l,c,d,u;if(ur.current){const t=ur.current;ur.current=null,u=t.w,d=t.h;const n=s?Math.min(Math.max(20,e.clientX-s.left),t.w-20):t.w/2;l=e.clientX-n,c=e.clientY-12,a&&(a.style.width=`${u}px`,a.style.height=`${d}px`,a.style.left=`${l}px`,a.style.top=`${c}px`)}else l=s?s.left:An.current.x,c=s?s.top:An.current.y,d=s?s.height:An.current.h,u=s?s.width:An.current.w;zn(!1),on(e=>({...e,x:l,y:c,w:u,h:d}));let h=null;const m=e=>{if(!r){if(Math.abs(e.clientX-o)<rr&&Math.abs(e.clientY-i)<rr)return;r=or(t,n,"move","move"),a&&(a.style.transition="none")}const s=l+e.clientX-o,d=Math.max(0,c+e.clientY-i);if(a&&(a.style.transform=`translate(${s-l}px, ${d-c}px)`),An.current={...An.current,x:s,y:d},!J){const t=function(e,t){const n=Fn(),r=e<=n.x+On,o=e>=n.x+n.w-On,i=t<=n.y+On,a=t>=n.y+n.h-On,s=e<=n.x+Rn,l=e>=n.x+n.w-Rn,c=t<=n.y+Rn,d=t>=n.y+n.h-Rn;return i&&s?"tl":i&&l?"tr":a&&s?"bl":a&&l?"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?_n(Xn(t)):Gn())}},p=()=>{window.removeEventListener("pointermove",m),window.removeEventListener("pointerup",p),r?.(),Gn();const e=Yn({...An.current});if(An.current=e,!J&&h){ur.current={x:l,y:c,w:u,h:d};const e=Xn(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 on(e)}if(J){const t=e.x+e.w/2,n=window.innerWidth/2;_e(t>n?"right":"left")}a&&(a.style.left=`${e.x}px`,a.style.top=`${e.y}px`,a.style.transform="",a.style.transition=""),on(e)};window.addEventListener("pointermove",m),window.addEventListener("pointerup",p)},[]),wr=O((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,s=Je.current,l=s?.getBoundingClientRect(),c=l?l.left:An.current.x,d=l?l.top:An.current.y,u=l?l.width:An.current.w,h=l?l.height:An.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;zn(!1),on({x:c,y:d,w:u,h:h}),An.current={x:c,y:d,w:u,h:h};let y=0,g=null;const b=()=>{if(y=0,!g)return;const e=g;g=null,An.current=e,s&&(s.style.left=`${e.x}px`,s.style.top=`${e.y}px`,s.style.width=`${e.w}px`,s.style.height=`${e.h}px`)},v=e=>{if(!o){if(Math.abs(e.clientX-i)<rr&&Math.abs(e.clientY-a)<rr)return;o=or(n,r,nr[t],"resize")}g=((e,t)=>{let n=c,r=d,o=u,i=h;if(f&&(o=Math.max(Bn,u+e)),w&&(i=Math.max(Hn,h+t)),m){const t=Math.max(Bn,u-e);n=c+u-t,o=t}if(p){const e=Math.max(Hn,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(b))},x=()=>{window.removeEventListener("pointermove",v),window.removeEventListener("pointerup",x),y&&cancelAnimationFrame(y),b(),o?.(),on({...An.current})};window.addEventListener("pointermove",v),window.addEventListener("pointerup",x)},[]),gr=O(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(),Kn(kt),"Enter"===e.key)return void(Tn?(zn(!1),on(Jt())):(zn(!0),on(Gt())));const[n,r]=t;if(e.ctrlKey||e.metaKey){const e=()=>{ur.current||(ur.current={...An.current})};if(r<0)return e(),zn(!0),void on(Gt());if(r>0){if(Tn)return zn(!1),void on(Jt());if(ur.current){const e=Yn(ur.current);return ur.current=null,An.current=e,void on(e)}return void $n(kt)}e(),zn(!1);const t=Xn(n<0?"left":"right");return An.current=t,void on(t)}if(Tn)return;const o=An.current,i=e.shiftKey?{...o,w:Math.max(Bn,o.w+24*n),h:Math.max(Hn,o.h+24*r)}:Yn({...o,x:o.x+24*n,y:Math.max(0,o.y+24*r)});An.current=i,on(i)},[kt,Tn,Jt,Gt]),kr=O(e=>{ur.current||(ur.current={...An.current}),zn(!1);const t=Xn(e);An.current=t,on(t),Kn(kt)},[kt]),Er=vn||$t?{}:{tabIndex:0,role:"group","aria-label":Se?`${Se} — ${Ne.windowSuffix}`:Ne.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:gr},Nr=()=>{zn(!0),on(Gt())},Sr=O(()=>{const e=Je.current;if(!e)return;const t=e.querySelector("form");if(t)t.requestSubmit();else{const t=e.querySelector(Wt);t&&!t.disabled&&t.click()}},[]);K(()=>{if(!t)return;if(J)return;const e=e=>{if(pn[pn.length-1]===kt&&"Enter"===e.key){const t=e.target;if("TEXTAREA"===t.tagName||t.isContentEditable)return;if(e.metaKey||e.ctrlKey)e.preventDefault(),Sr();else{if("INPUT"===t.tagName&&t.closest("form"))return;if(!(t instanceof Element&&Je.current?.contains(t)))return;if(t.closest(Ot))return;e.preventDefault()}}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,Sr,kt,J]),K(()=>{if(!t)return;const e=e=>{pn[pn.length-1]===kt&&((e.metaKey||e.ctrlKey)&&"s"===e.key?(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-save",{detail:{modalId:kt}})),Ae.current=!1,ze(!1)):e.altKey&&e.shiftKey&&("KeyD"===e.code||"D"===e.key||"d"===e.key)&&(e.preventDefault(),document.dispatchEvent(new CustomEvent("modal-duplicate",{detail:{modalId:kt}}))))};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t]),K(()=>{if(!t)return;if(J)return;const e=e=>{if("Escape"===e.key&&pn[pn.length-1]===kt){if(N(e))return e.preventDefault(),void e.stopPropagation();if(bn&&!q)return;e.preventDefault(),e.stopPropagation(),dr()}};return window.addEventListener("keydown",e,!0),()=>window.removeEventListener("keydown",e,!0)},[t,dr,kt,J,bn,q]);const Lr=t&&(void 0!==p||void 0!==y),Tr=O(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-(--z-toast) bg-gray-900 text-white flex min-h-10 items-center px-5 py-3 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(K(()=>{if(!t)return;const e=e=>{if(pn[pn.length-1]!==kt)return;const t=e.target.tagName;"INPUT"!==t&&"TEXTAREA"!==t&&"SELECT"!==t&&(e.target.isContentEditable||("j"===e.key&&Lr&&(e.preventDefault(),p?p():Tr("bottom")),"k"===e.key&&Lr&&(e.preventDefault(),y?y():Tr("top"))))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,p,y,Lr,Tr,kt]),!t||Zt.current)return null;const zr=$t?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),s=n%o,l=r-o*(i-1),c=a===i-1&&l<o,d=Fn(),u=(d.w-20*(o+1))/o,h=(d.h-14*(i+1)-22*i)/i,m=c?(o-l)*(u+20)/2:0;return{x:d.x+20+s*(u+20)+m,y:d.y+14+a*(h+14+22),w:u,h:h}}(kt):null,Ar=$t&&zr?Math.min(zr.w/rn.w,zr.h/rn.h):1,Dr=(()=>{if($t&&zr){const e=Ar,t=rn.w*e,n=rn.h*e,r=zr.x+(zr.w-t)/2-rn.x,o=zr.y+(zr.h-n)/2-rn.y,i=Ft||Bt;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:M.expose+(i?20:10),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&&Kt){const e="picked"===Xt;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:M.expose+30}:{}}}return null})(),Pr=v({modal:!1,titleId:!J&&(bn?!Oe?.home:!ue)?Le:void 0,label:Zn.text||Se}),Ir=/* @__PURE__ */X("div",{children:[
|
|
50
|
-
/* @__PURE__ */X("div",{ref:Je,"data-modal-panel":!0,"data-modal-id":kt,"data-window-key":ae||void 0,...Y?{"data-utility":""}:{},...De?{"data-pinned-top":""}:{},...J?{"data-widget":""}:{},...Oe?{"data-window-owner":Oe.key}:{},...Oe&&!st?{"data-window-root":""}:{},...bn?{"data-window-tab":""}:{},...Pr,className:bn?"fixed flex flex-col overflow-hidden":"fixed rounded-(--radius-window) flex flex-col overflow-hidden "+(J?St?"shadow-xl":"shadow-lg":"border "+(St?"shadow-xl border-gray-200":"shadow-lg border-gray-300")),onMouseDownCapture:e=>{if(Qe.current=!1,$t){if(e.target.closest("[data-expose-close]"))return;return e.preventDefault(),e.stopPropagation(),xr(kt),pr(!1),void Kn(kt)}if(!St&&!J&&!De&&0===e.button){const t=e.target;t.closest("[data-modal-panel]")===Je.current&&t.closest("button, input, a, select, textarea")&&!t.closest("[data-window-chrome]")&&(e.preventDefault(),e.stopPropagation(),Qe.current=!0,Ke(null),Kn(kt),window.addEventListener("mouseup",()=>{setTimeout(()=>{Qe.current=!1},0)},{once:!0}))}},onClickCapture:e=>{Qe.current&&(Qe.current=!1,e.preventDefault(),e.stopPropagation())},onMouseDown:e=>{if($t)return;Ke(null);e.target.closest("[data-modal-panel]")===Je.current&&(e.target.closest("button, input, a, select, textarea")||Kn(kt))},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:pe?"none":"transform 180ms ease-out",...J?{display:"none"}:{},...Et<0?{display:"none"}:{},...St||De||ke&&ae===ke?{}:{display:"none"}}:{zIndex:De?M.pinnedWindow:Et+1,width:rn.w,height:rn.h,top:rn.y,...J&&"right"===Ve?{right:window.innerWidth-rn.x-rn.w}:{left:rn.x},...Et<0&&!De?{display:"none"}:{},...Ln?{visibility:"hidden",pointerEvents:"none"}:{},...Dr??{}},children:[ue&&!J&&/* @__PURE__ */V("div",{onPointerDown:ve,className:"absolute top-0 bottom-0 left-0 w-[22px] z-[5]",style:{touchAction:"pan-y"},"aria-hidden":"true"}),J?null:bn?Oe?.home?null:/* @__PURE__ */X(_,{children:[
|
|
51
|
-
/* @__PURE__ */V("h2",{id:Le,"data-window-title":!0,className:"sr-only",children:Zn.text||Se}),(Zn.accessories.length>0||Lr)&&/* @__PURE__ */X("div",{"data-window-chrome":"","data-record-bar":"",className:"flex h-9 shrink-0 select-none items-center gap-3 border-b border-gray-200 px-4",style:{backgroundColor:"rgb(var(--window-content-rgb))"},children:[
|
|
52
|
-
/* @__PURE__ */V("div",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-hidden",children:Zn.accessories}),Lr&&/* @__PURE__ */X("span",{className:"flex items-center gap-1 shrink-0 text-2xs text-gray-400",children:[
|
|
53
|
-
/* @__PURE__ */V("kbd",{className:"rounded border border-gray-300 bg-gray-100 px-2 py-0.5 font-medium text-gray-500",children:"K"}),
|
|
54
|
-
/* @__PURE__ */V("span",{children:Ne.prev}),
|
|
55
|
-
/* @__PURE__ */V("kbd",{className:"rounded border border-gray-300 bg-gray-100 px-2 py-0.5 font-medium ml-1 text-gray-500",children:"J"}),
|
|
56
|
-
/* @__PURE__ */V("span",{children:Ne.next})]})]})]}):ue?null:
|
|
57
|
-
/* @__PURE__ */X("div",Q?{onPointerDown:fr,"data-window-chrome":"",...Er,className:"flex items-center justify-between h-(--row-height-compact-bar) px-3 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-(--radius-window) focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(St?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:St?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
58
|
-
/* @__PURE__ */X("div",{"data-window-title":!0,title:Se,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-2",style:{color:St?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!$t&&wt(),
|
|
59
|
-
/* @__PURE__ */V("span",{id:Le,className:"truncate",children:$t?Rt(Ee):Ee})]}),!$t&&/* @__PURE__ */X("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[Y&&/* @__PURE__ */V("button",{onClick:()=>Pe(e=>!e),title:De?Ne.unpin:Ne.pinOnTop,className:"p-0.5 rounded hover:bg-gray-200 "+(De?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */V(T,{name:"bookmark-square",className:"h-3 w-3",fill:De?"currentColor":"none",strokeWidth:1.5})}),
|
|
60
|
-
/* @__PURE__ */V("button",{type:"button",onClick:dr,className:"rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */V(T,{name:"close",className:"h-4 w-4"})})]})]}:Z?{onPointerDown:fr,"data-window-chrome":"",...Er,className:"flex items-center justify-between h-(--row-height-compact-bar) px-3 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-(--radius-window) focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(St?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:St?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
61
|
-
/* @__PURE__ */X("div",{"data-window-title":!0,title:Se,className:"text-sm font-medium min-w-0 flex-1 truncate flex items-center gap-2",style:{color:St?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!$t&&wt(),
|
|
62
|
-
/* @__PURE__ */V("span",{id:Le,className:"truncate",children:$t?Rt(Ee):Ee})]}),!$t&&/* @__PURE__ */X("div",{className:"flex items-center gap-0.5 shrink-0 ml-2",children:[Y&&/* @__PURE__ */V("button",{onClick:()=>Pe(e=>!e),title:De?Ne.unpin:Ne.pinOnTop,className:"p-0.5 rounded hover:bg-gray-200 "+(De?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */V(T,{name:"bookmark-square",className:"h-3 w-3",fill:De?"currentColor":"none",strokeWidth:1.5})}),
|
|
63
|
-
/* @__PURE__ */V("button",{onClick:()=>$n(kt),title:Ne.minimize,className:"text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none",children:"─"}),!vn&&/* @__PURE__ */V(er,{maximized:Tn,onToggleMax:()=>{Tn?(zn(!1),on(Jt())):Nr()},onSnap:kr,buttonClassName:"text-gray-400 hover:text-gray-600 px-1 py-0.5 rounded hover:bg-gray-200 text-xs leading-none",strings:Ne}),
|
|
64
|
-
/* @__PURE__ */V("button",{type:"button",onClick:dr,className:"rounded p-0.5 text-gray-400 hover:text-gray-600 hover:bg-gray-200",children:/* @__PURE__ */V(T,{name:"close",className:"h-4 w-4"})})]})]}:{onPointerDown:fr,"data-window-chrome":"",...Er,className:"flex items-center justify-between h-(--row-height-window-bar) px-4 border-b border-gray-200 shrink-0 cursor-move select-none rounded-t-(--radius-window) focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400 "+(St?"backdrop-blur-sm":""),style:{touchAction:"none",backgroundColor:St?"rgb(var(--window-header-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-header-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
65
|
-
/* @__PURE__ */X("div",{"data-window-title":!0,title:Se,className:"text-base font-medium min-w-0 flex-1 truncate flex items-center gap-2",style:{color:St?"var(--window-title-active, rgb(17 24 39))":"var(--window-title-inactive, rgb(156 163 175))"},children:[!$t&&wt(),
|
|
66
|
-
/* @__PURE__ */V("span",{id:Le,className:"truncate",children:$t?Rt(Ee):Ee})]}),!$t&&/* @__PURE__ */X("div",{className:"flex items-center gap-2 shrink-0 ml-4",children:[Lr&&/* @__PURE__ */X("span",{className:"flex items-center gap-1 mr-1 text-2xs text-gray-400",children:[
|
|
67
|
-
/* @__PURE__ */V("kbd",{className:"rounded border border-gray-300 bg-gray-200 px-2 py-0.5 font-medium text-gray-500",children:"K"}),
|
|
68
|
-
/* @__PURE__ */V("span",{children:Ne.prev}),
|
|
69
|
-
/* @__PURE__ */V("kbd",{className:"rounded border border-gray-300 bg-gray-200 px-2 py-0.5 font-medium ml-1 text-gray-500",children:"J"}),
|
|
70
|
-
/* @__PURE__ */V("span",{children:Ne.next})]}),Y&&/* @__PURE__ */V("button",{onClick:()=>Pe(e=>!e),title:De?Ne.unpin:Ne.pinOnTop,className:"text-xs px-2 py-1 rounded hover:bg-gray-200 "+(De?"text-blue-600":"text-gray-400 hover:text-gray-600"),children:/* @__PURE__ */V(T,{name:"bookmark-square",className:"h-3.5 w-3.5",fill:De?"currentColor":"none",strokeWidth:1.5})}),
|
|
71
|
-
/* @__PURE__ */V("button",{onClick:()=>$n(kt),title:Ne.minimize,className:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",children:"─"}),!vn&&/* @__PURE__ */V(er,{maximized:Tn,onToggleMax:()=>{Tn?(zn(!1),on(Jt())):Nr()},onSnap:kr,buttonClassName:"text-gray-400 hover:text-gray-600 text-xs px-2 py-1 rounded hover:bg-gray-200",strings:Ne}),
|
|
72
|
-
/* @__PURE__ */V("kbd",{className:"rounded border border-gray-300 bg-gray-200 px-2 py-0.5 text-2xs font-medium text-gray-400",children:"ESC"}),
|
|
73
|
-
/* @__PURE__ */V("button",{type:"button",onClick:dr,className:"rounded-(--radius-control) text-gray-400 hover:text-gray-600",children:/* @__PURE__ */V(T,{name:"close",className:"h-5 w-5"})})]})]}),le&&je&&!J&&!ue&&/* @__PURE__ */V("div",{"aria-hidden":"true",className:"h-[3px] shrink-0 pointer-events-none",style:{backgroundColor:`rgb(var(--window-accent-rgb) / ${St?.9:.55})`}}),
|
|
74
|
-
/* @__PURE__ */V(Pt.Provider,{value:kt,children:/* @__PURE__ */V(Ut.Provider,{value:{rightRef:et,leftRef:tt,notify:()=>rt(!0),active:St,isDirty:Jn,footerOpen:it&&!J&&!Q&&!Z&&!ue},children:/* @__PURE__ */V("div",{ref:Ze,...J?{onPointerDown:fr,onContextMenu:e=>{e.preventDefault(),Xe({x:e.clientX,y:e.clientY})}}:{},className:`flex-1 min-h-0 flex flex-col ${J?"p-0 cursor-move":Z||ee?"p-0":Q?"p-2":"p-4"} ${J||bn?"":"backdrop-blur-sm"} ${!1===C||Z||ee?"overflow-hidden":"overflow-y-auto overscroll-contain"} ${J?"rounded-2xl select-none":""}`,style:{...J?{touchAction:"none"}:{},backgroundColor:J?"transparent":bn?"rgb(var(--window-content-rgb))":St?"rgb(var(--window-content-rgb) / var(--active-content-opacity, 0.9))":"rgb(var(--window-content-rgb) / var(--inactive-content-opacity, 0.8))"},children:/* @__PURE__ */V(ge,{children:ce})})})}),J&&Ue&&/* @__PURE__ */X(x,{minWidth:160,style:{left:Ue.x,top:Ue.y},onClose:()=>Xe(null),children:[
|
|
75
|
-
/* @__PURE__ */V(k,{onClick:()=>{Xe(null),window.dispatchEvent(new CustomEvent("widget-open-settings",{detail:kt}))},children:"Settings"}),
|
|
76
|
-
/* @__PURE__ */V(E,{}),oe&&/* @__PURE__ */X(_,{children:[oe,
|
|
77
|
-
/* @__PURE__ */V(E,{})]}),
|
|
78
|
-
/* @__PURE__ */X(k,{onClick:()=>{Xe(null),Pe(e=>!e)},children:[
|
|
79
|
-
/* @__PURE__ */V("span",{className:"flex-1",children:"Always on Top"}),De&&/* @__PURE__ */V(T,{name:"check",className:"h-4 w-4 text-blue-600 shrink-0",strokeWidth:2})]}),
|
|
80
|
-
/* @__PURE__ */V(E,{}),
|
|
81
|
-
/* @__PURE__ */V(k,{onClick:()=>{Xe(null),dr()},children:"Close"})]}),
|
|
82
|
-
/* @__PURE__ */X("div",{onPointerDown:fr,ref:ot,className:`px-4 py-2 border-t border-gray-200 shrink-0 flex items-center justify-between text-xs select-none${bn?"":" cursor-move"}${St&&!bn?" backdrop-blur-sm":""}${J||Q||Z||ue||!it?" hidden":""}`,style:{touchAction:"none",backgroundColor:bn?"rgb(var(--window-footer-rgb))":St?"rgb(var(--window-footer-rgb) / var(--active-header-opacity, 0.8))":"rgb(var(--window-footer-rgb) / var(--inactive-header-opacity, 0.7))"},children:[
|
|
83
|
-
/* @__PURE__ */X("div",{className:"flex items-center gap-2 min-w-0",children:[dt&&/* @__PURE__ */V(xe,{auto:!0}),F,
|
|
84
|
-
/* @__PURE__ */V("div",{ref:tt,"data-modal-actions-left":!0,className:"flex items-center gap-2"}),g]}),
|
|
85
|
-
/* @__PURE__ */X("div",{className:"flex items-center gap-2 ml-auto",children:[
|
|
86
|
-
/* @__PURE__ */V("div",{ref:et,"data-modal-actions":!0,className:"flex items-center gap-2"}),D]})]}),!J&&!ue&&!$t&&St&&!vn&&/* @__PURE__ */X(_,{children:[
|
|
87
|
-
/* @__PURE__ */V("div",{onPointerDown:e=>wr(e,"se"),className:"absolute bottom-0 right-0 w-3 h-3 cursor-nwse-resize z-10"}),
|
|
88
|
-
/* @__PURE__ */V("div",{onPointerDown:e=>wr(e,"sw"),className:"absolute bottom-0 left-0 w-3 h-3 cursor-nesw-resize z-10"}),
|
|
89
|
-
/* @__PURE__ */V("div",{onPointerDown:e=>wr(e,"ne"),className:"absolute top-0 right-0 w-3 h-3 cursor-nesw-resize z-10"}),
|
|
90
|
-
/* @__PURE__ */V("div",{onPointerDown:e=>wr(e,"nw"),className:"absolute top-0 left-0 w-3 h-3 cursor-nwse-resize z-10"}),
|
|
91
|
-
/* @__PURE__ */V("div",{onPointerDown:e=>wr(e,"n"),className:"absolute top-0 left-3 right-3 h-1 cursor-ns-resize"}),
|
|
92
|
-
/* @__PURE__ */V("div",{onPointerDown:e=>wr(e,"s"),className:"absolute bottom-0 left-3 right-3 h-1 cursor-ns-resize"}),
|
|
93
|
-
/* @__PURE__ */V("div",{onPointerDown:e=>wr(e,"e"),className:"absolute top-3 bottom-3 right-0 w-1 cursor-ew-resize"}),
|
|
94
|
-
/* @__PURE__ */V("div",{onPointerDown:e=>wr(e,"w"),className:"absolute top-3 bottom-3 left-0 w-1 cursor-ew-resize"})]}),$t&&/* @__PURE__ */V("div",{className:"absolute inset-0",style:{zIndex:M.hint,cursor:"pointer",background:"transparent"},onMouseEnter:()=>qt(!0),onMouseLeave:()=>qt(!1),onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),Kn(kt),pr(!1)},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:Ft&&/* @__PURE__ */V("button",{type:"button","data-expose-close":!0,"aria-label":Me.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/Ar})`,transformOrigin:"top right",zIndex:M.raised},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onClick:e=>{e.stopPropagation(),e.preventDefault(),dr()},children:/* @__PURE__ */V(T,{name:"close",className:"h-4 w-4",strokeWidth:2.2})})})]}),$t&&zr&&/* @__PURE__ */V("div",{className:"fixed pointer-events-none select-none truncate text-center",style:{left:zr.x,top:zr.y+zr.h+4,width:zr.w,zIndex:M.expose+(Ft?21:11),color:"white",fontSize:"var(--text-xs)",fontWeight:500,textShadow:"0 1px 2px rgba(0,0,0,0.6)"},children:Rt(Ee)})]}),Kr=Ie&&/* @__PURE__ */X(x,{style:{left:Ie.x,top:Ie.y},onClose:()=>Ke(null),minWidth:160,children:[!J&&!Q&&!bn&&/* @__PURE__ */X(_,{children:[
|
|
95
|
-
/* @__PURE__ */X(k,{onClick:()=>{$n(kt),Ke(null)},children:[
|
|
96
|
-
/* @__PURE__ */V(T,{name:"remove",className:"h-4 w-4",strokeWidth:1.5}),Ne.minimize]}),!vn&&/* @__PURE__ */X(k,Tn?{onClick:()=>{zn(!1),on(Jt()),Ke(null)},children:[
|
|
97
|
-
/* @__PURE__ */V("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:/* @__PURE__ */V("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 4.5v15m6-15v15M4.5 9h15M4.5 15h15"})}),Ne.windowed]}:{onClick:()=>{Nr(),Ke(null)},children:[
|
|
98
|
-
/* @__PURE__ */V(T,{name:"expand",className:"h-4 w-4",strokeWidth:1.5}),Ne.maximize]})]}),Y&&!bn&&/* @__PURE__ */X(k,{onClick:()=>{Pe(e=>!e),Ke(null)},children:[
|
|
99
|
-
/* @__PURE__ */V(T,{name:"bookmark-square",className:"h-4 w-4 "+(De?"text-blue-600":""),fill:De?"currentColor":"none",strokeWidth:1.5}),De?Ne.unpin:Ne.pinOnTop]}),$e&&/* @__PURE__ */X(k,{onClick:()=>{Ke(null),Ye()},children:[
|
|
100
|
-
/* @__PURE__ */V(T,{name:"star",className:"h-4 w-4",fill:He?"currentColor":"none",strokeWidth:1.5}),He?Me.taskbar.removeFromDesktop:Me.taskbar.addToDesktop]}),(jt[kt]||[]).length>0&&/* @__PURE__ */V(_,{children:(jt[kt]||[]).map((e,t)=>/* @__PURE__ */X(k,{onClick:()=>{Ke(null),e.onClick()},children:[e.icon,e.label]},t))}),!(bn&&Oe?.home)&&/* @__PURE__ */X(_,{children:[
|
|
101
|
-
/* @__PURE__ */V(E,{}),
|
|
102
|
-
/* @__PURE__ */X(k,{danger:!0,onClick:()=>{Ke(null),dr()},children:[
|
|
103
|
-
/* @__PURE__ */V(T,{name:"close",className:"h-4 w-4"}),Ne.close]})]})]}),$r=!!ae&&xt.some(e=>e.id===ae),Wr=!Lt||$r||J?null:/* @__PURE__ */X("div",{"data-modal-restore-tab":!0,"data-modal-id":kt,className:"fixed left-1/2 z-(--z-restore-tab) flex -translate-x-1/2 items-center gap-1 rounded-lg border border-gray-300 bg-white px-2 py-1 shadow-lg",style:{bottom:"calc(var(--taskbar-height, 0px) + 12px)"},children:[
|
|
104
|
-
/* @__PURE__ */V("button",{type:"button",onClick:()=>Kn(kt),title:Ne.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:Se||Ne.windowSuffix}),
|
|
105
|
-
/* @__PURE__ */V("button",{type:"button",onClick:()=>Kn(kt),title:Ne.restore,"aria-label":Ne.restore,className:"rounded px-2 py-0.5 text-xs leading-none text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:"▴"}),
|
|
106
|
-
/* @__PURE__ */V("button",{type:"button",onClick:()=>{dr()},title:Ne.close,"aria-label":Ne.close,className:"rounded px-2 py-0.5 text-xs leading-none text-gray-400 hover:bg-gray-100 hover:text-gray-600",children:"✕"})]});return G(
|
|
107
|
-
/* @__PURE__ */X(It.Provider,{value:null,children:[Ir,Kr,Wr]}),document.body)}"undefined"!=typeof window&&window.addEventListener("keydown",e=>{dr&&"Escape"===e.key&&(Nr(null),pr(!1))});var Ar=100,Dr={past:[],future:[]};function Pr(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>Ar?r.slice(r.length-Ar):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:Dr}}var Ir=/* @__PURE__ */new Set(["INPUT","TEXTAREA","SELECT"]);var Kr=500,$r=250;function Wr({children:e,canEdit:t=!0,perms:n,windowId:r}){const[o,a]=Y(Pr,Dr),s=I(/* @__PURE__ */new Map),[l,c]=$(0),d=l>0,[u,h]=$(0),[m,p]=$(0),f=m>0,{hasAnyPerm:w}=i(),y=t&&0===u&&(!(n&&n.length>0)||w(n)),g=I(null),b=I(!1),v=O(()=>{const e={};for(const[t,n]of s.current)e[t]=n.getLast();return e},[]),x=O((e,t)=>{s.current.has(e)||c(e=>e+1),s.current.set(e,t)},[]),k=O(e=>{s.current.delete(e)&&c(e=>e-1)},[]),E=O(e=>{h(t=>t+(e?1:-1))},[]),C=O(e=>{p(t=>t+(e?1:-1))},[]),[M,N]=$(0),S=M>0,L=O(e=>{N(t=>t+(e?1:-1))},[]),T=A(be),z=T?.claimReadOnly;K(()=>{if(z&&!y)return z(!0),()=>z(!1)},[z,y]);const D=T?.claimOwnMount;K(()=>{if(D&&S)return D(!0),()=>D(!1)},[D,S]);const P=I({last:0,count:0,tripped:!1}),W=I(!1),R=O((e,t,n)=>{if(b.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)||(W.current=!0));if(!y||g.current)return;const r=P.current;if(r.tripped)return;const o=Date.now();if(o-r.last>$r&&(r.count=0),r.last=o,++r.count>Kr)return r.tripped=!0,void console.error(`[efficient-shell] UndoProvider: "${e}" recorded ${Kr} 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:v(),label:e,coalesceKey:t},queueMicrotask(()=>{const e=g.current;g.current=null,e&&a({type:"record",step:e})})},[y,v]),F=O(e=>{for(const[t,n]of Object.entries(e)){const e=s.current.get(t);e&&(e.setLast(n),e.apply(n))}},[]),q=O(()=>{const e=o.past[o.past.length-1];if(!e)return;const t={values:v(),label:e.label,coalesceKey:null};F(e.values),a({type:"undo",redoStep:t})},[o.past,v,F]),j=O(()=>{const e=o.future[0];if(!e)return;const t={values:v(),label:e.label,coalesceKey:null};F(e.values),a({type:"redo",undoStep:t})},[o.future,v,F]),[H,U]=$(0),_=I(0),G=I(0),J=I(!1),Q=O(()=>{b.current=!0,W.current=!1,g.current=null,_.current+=1,G.current=_.current,U(_.current)},[]),Z=I(void 0),ee=O(e=>{void 0!==e&&(void 0!==Z.current&&e!==Z.current&&(J.current=!0),Z.current=e),Q()},[Q]);K(()=>{b.current&&H===G.current&&(b.current=!1,g.current=null,(W.current||J.current)&&a({type:"clear"}),W.current=!1,J.current=!1)},[H]);const te=O(()=>{J.current=!0,a({type:"clear"}),Q()},[Q]),ne=y&&o.past.length>0,re=y&&o.future.length>0,oe=cr(r),ie=I({undo:q,redo:j,canUndo:ne,canRedo:re});ie.current={undo:q,redo:j,canUndo:ne,canRedo:re},K(()=>{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&&Ir.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=B(()=>({register:x,unregister:k,record:R,undo:q,redo:j,clear:te,baseline:ee,canUndo:ne,canRedo:re,enabled:y,hasState:d,handMounted:S,claimOwnMount:L,claimReadOnly:E,declaredEditable:f,claimEditable:C,undoLabel:ne?o.past[o.past.length-1].label:null,redoLabel:re?o.future[0].label:null}),[x,k,R,q,j,te,ee,ne,re,y,d,S,L,E,f,C,o.past,o.future]),se=""!==Xt(),le=A(Ut)?.footerOpen??!1,ce=se&&y&&d&&!S&≤/* @__PURE__ */
|
|
108
|
-
return X(be.Provider,{value:ae,children:[ce&&/* @__PURE__ */V(_t,{position:"left",quiet:!0,children:/* @__PURE__ */V(xe,{auto:!0})}),e]})}function Or(){const e=A(be),t=O(()=>{},[]);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 Rr(e){const t=A(be),n=t?.claimReadOnly,r=t?.claimEditable;K(()=>{const t=e?r:n;if(t)return t(!0),()=>t(!1)},[n,r,e])}function Fr(e,t,n){const r=A(be),o=H(),i=I(e),a=I(t);a.current=t,K(()=>{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:s,coalesceKey:l=null}=n,c=I(r);c.current=r;const d=I({label:s,coalesceKey:l});d.current={label:s,coalesceKey:l},K(()=>{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 qr(e,t){const[n,r]=$(e);return Fr(n,e=>r(()=>e),t),[n,r]}export{Gt as CancelButton,je as DocFavStar,ze as EntityWindowFallback,Le as EntityWindowLoading,Ae as EntityWindowState,Ot as KEY_ACTIVATED_SELECTOR,Ne as LoadingSpinner,Wt as MODAL_SUBMIT_SELECTOR,zr as Modal,_t as ModalActions,xe as UndoControls,Wr as UndoProvider,oe as WINDOW_REGISTRY,ye as WindowCrashedFallback,ge as WindowErrorBoundary,ct as WindowManagerProvider,Ht as WindowTitle,Xe as activateWindowById,vt as beginWindowGesture,An as cancelWindowFront,ce as client_default,Sr as commitExposeHighlight,xt as drainPerfEvents,wr as exitExposeMode,cn as forgetMaximizedWindowBoxes,ar as getActiveModalId,Je as getActiveWindowRoute,Mr as getExposeHighlight,Dt as getWindowChromeVersion,sn as getWindowPosition,Pe as isDraftEntityId,Ie as isDraftEntityWindow,te as isEntityEntry,ee as isPageEntry,se as isShellApiClientConfigured,Ve as isTabWindow,bt as markMenuOpen,zt as readWindowChrome,zn as requestWindowFront,Nr as setExposeHighlight,gt as setPerfCollecting,ae as setShellApiClient,pe as setShellHomeRoute,re as setShellWindowRegistry,an as setWindowDefaultPosition,ln as setWindowPosition,Ct as splitTitle,Cr as subscribeExposeHighlight,At as subscribeWindowChrome,fr as toggleExposeMode,Nn as useCurrentTabKey,Xt as useEnclosingModalId,cr as useIsActiveWindow,Vt as useModalActive,ue as usePageSearch,Or as useUndo,Rr as useUndoCanEdit,Fr as useUndoable,qr as useUndoableState,qt as useWidgetSettings,We as useWindowDirty,Re as useWindowManager,Bt as useWindowMenuItem,Yt as useWindowTitle};
|