efficient-shell 7.30.0 → 7.31.1
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-7CW6GBAM.js → Browser-G6DW3YVS.js} +13 -13
- package/dist/{Documents-XGAKQCM6.js → Documents-TKSI6IFR.js} +1 -1
- package/dist/{Files-ENPGM6CG.js → Files-F6N3BSEZ.js} +17 -17
- package/dist/{Notepad-JVHWK2O3.js → Notepad-ZJKKNQZL.js} +10 -10
- package/dist/{Preview-UWVSCZ2A.js → Preview-RFYUJF6G.js} +17 -17
- package/dist/{Spreadsheet-CWZWUFBJ.js → Spreadsheet-F6ZJHE5K.js} +14 -14
- package/dist/apps/index.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/{chunk-ZUQIYFNG.js → chunk-FJBTASQI.js} +1 -1
- package/dist/{chunk-TGXWSTRC.js → chunk-Q3WRWTON.js} +1 -1
- package/dist/chunk-QK67IFHD.js +1 -0
- package/dist/{chunk-IAEWRSF7.js → chunk-R7BUE34N.js} +3 -3
- package/dist/{index-cU2t_ZWe.d.ts → index-Bozgrt9E.d.ts} +11 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +39 -39
- package/dist/telemetry/index.js +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-YHP3JWUC.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
export{ImageAnnotator_default as ImageAnnotator}from"./chunk-LU7X6LLY.js";import{PREVIEW_OPENED_EVENT as e,openPreviewFile as t}from"./chunk-RAFTWZF5.js";import{subscribePomo as r,getPomoSnapshot as n}from"./chunk-IQW3EDEB.js";export{setShellTodoProvider}from"./chunk-IQW3EDEB.js";import{wallpaperSrc as a,WALLPAPER_PREF_TOKEN as o,uploadWallpaper as l,wallpaperUploadError as i,deleteWallpaper as s,getWallpaper as c}from"./chunk-EQI47WNM.js";import{TabStrip as d}from"./chunk-AAOAQKB4.js";export{startClientTelemetry}from"./chunk-TGXWSTRC.js";import{ROW_HEIGHTS as u,ContextMenu as m,TimeAgo as h,Spinner as p,Markdown as g,CONTROL_HEIGHTS as f,useTheme as b,resolveTheme as y,CORNERS_FOR_THEME as x,Segmented as w,TransferProgress as v,useClickOutside as k,ListLoadError as N,Checkbox_default as C,ListFooter as S,copyToClipboard as _,firstEnabledIndex as E,FormField as T,Input_default as M,applyThemePrefs as L,selectionAt as P,lastEnabledIndex as I,nextEnabledIndex as $,Calendar as D,matchTypeahead as A}from"./chunk-IAEWRSF7.js";export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,CORNERS_FOR_THEME,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FloatingBar,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,SliderGroup,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,TextToolbar,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,TransferProgress,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,copyToClipboard,cornersFor,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,textToolbarRows,textToolbarWindowColumns,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme,useTransferProgress}from"./chunk-IAEWRSF7.js";export{Breadcrumbs}from"./chunk-XDM6YBBX.js";import{withSpareRow as R,EditableGrid as W}from"./chunk-Z756FAL6.js";export{EditableGrid}from"./chunk-Z756FAL6.js";import{escapeHtml as F}from"./chunk-BR22X7E5.js";import{TH_ONE_LINE as j}from"./chunk-RYBDLJJV.js";import{PLACEHOLDER_INK as O,FILTER_ON as z,FILTER_ON_INK as B,FILTER_OFF as H}from"./chunk-HJQAE6SP.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"./chunk-HJQAE6SP.js";import{SidebarLayout as K}from"./chunk-BDXFODVC.js";export{ResizeHandle,SidebarLayout}from"./chunk-BDXFODVC.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"./chunk-2ECESCBH.js";import{playNotification as U,playStartup as X,soundsEnabled as V,getSoundConfig as Y,SOUND_PACK_KEYS as G,soundPackName as q,SOUND_TYPES as J,soundTypeName as Q,setSoundForType as Z,previewSound as ee,setAllSounds as te,playLogout as re}from"./chunk-W33ZFDRR.js";import{useAuth as ne,readStored as ae,initialRailCollapsed as oe,RAIL_COLLAPSED_KEY as le,writeStored as ie}from"./chunk-S2PS4IOT.js";export{setShellAuthBridge}from"./chunk-S2PS4IOT.js";import{navPagesProvider as se,partitionNav as ce,sanitizeRecent as de,favoritesToResults as ue,pushRecent as me,BrandMark as he,GlobalSearch as pe,PAGE_RESULT_ENTITY as ge,parsePageResultTarget as fe,IconButton_default as be,openGlobalSearch as ye}from"./chunk-6YNWFATP.js";export{BrandMark,GlobalSearch,IconButton_default as IconButton,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"./chunk-6YNWFATP.js";import{THEME_ICON_SETS as xe,loadIconSet as we,ICON_SET_FOR_THEME as ve}from"./chunk-XT7UUKFA.js";export{ICON_NAMES,ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,isIconName,loadIconSet}from"./chunk-XT7UUKFA.js";export{isSafeLinkHref}from"./chunk-PJPK2ADX.js";import{publishDesktopFolders as ke,requestFilesTrashView as Ne,FolderGlyph as Ce,requestFilesDesktopFolderView as Se,FileIconTile as _e}from"./chunk-MDD5DHF2.js";import{setPdfPreview as Ee}from"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{toast_default as Te}from"./chunk-BTLM7W6P.js";export{UNDOABLE_MS,toast_default as toast}from"./chunk-BTLM7W6P.js";import{APP_VERSION as Me,VERSION as Le}from"./chunk-YHP3JWUC.js";export{VERSION}from"./chunk-YHP3JWUC.js";import{cancelWindowFront as Pe,requestWindowFront as Ie,useWindowManager as $e,WINDOW_REGISTRY as De,isPageEntry as Ae,Modal as Re,setPerfCollecting as We,drainPerfEvents as Fe,forgetMaximizedWindowBoxes as je,markMenuOpen as Oe,setShellHomeRoute as ze,useCurrentTabKey as Be,ModalActions as He,useModalActive as Ke,LoadingSpinner as Ue,useEnclosingModalId as Xe,isShellApiClientConfigured as Ve,client_default as Ye,KEY_ACTIVATED_SELECTOR as Ge,isDraftEntityId as qe,activateWindowById as Je,CancelButton as Qe,setWindowPosition as Ze,isDraftEntityWindow as et,subscribeWindowChrome as tt,getWindowChromeVersion as rt,isTabWindow as nt,readWindowChrome as at,isEntityEntry as ot}from"./chunk-HTHLFM24.js";export{CancelButton,DocFavStar,EntityWindowFallback,EntityWindowLoading,EntityWindowState,MODAL_SUBMIT_SELECTOR,Modal,ModalActions,UndoControls,UndoProvider,WindowCrashedFallback,WindowErrorBoundary,WindowManagerProvider,WindowTitle,activateWindowById,beginWindowGesture,commitExposeHighlight,exitExposeMode,getActiveWindowRoute,getExposeHighlight,getWindowPosition,isEntityEntry,isPageEntry,markMenuOpen,requestWindowFront,setExposeHighlight,setShellApiClient,setShellWindowRegistry,setWindowDefaultPosition,setWindowPosition,splitTitle,subscribeExposeHighlight,toggleExposeMode,useCurrentTabKey,useEnclosingModalId,useIsActiveWindow,useModalActive,usePageSearch,useUndo,useUndoCanEdit,useUndoable,useUndoableState,useWidgetSettings,useWindowDirty,useWindowManager,useWindowMenuItem,useWindowTitle}from"./chunk-HTHLFM24.js";export{CopyButton}from"./chunk-E5DFGCAL.js";import{CMD_K as lt,CMD_DOT as it,SHIFT as st,MOD as ct,ENTER as dt,CMD_A as ut,ALT_SHIFT_N as mt,ALT_SHIFT_E as ht,CMD_ENTER as pt,CMD_S as gt,ALT_SHIFT_D as ft,CMD_Z as bt,CMD_SHIFT_Z as yt,useShellPrefs as xt,useIsMobile as wt,useIsPhone as vt,useShellPrefsAdapter as kt}from"./chunk-5MKWCHMD.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"./chunk-5MKWCHMD.js";import"./chunk-KNUR2UEG.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"./chunk-LTH3NJTS.js";import{startMenuCategories as Nt,navSections as Ct,navIcons as St,sectionIcons as _t,RAIL_COLLAPSED_W as Et,RAIL_W as Tt,WORK_AREA_CHANGED_EVENT as Mt,useShellAuth as Lt,TAB_STRIP_H as Pt}from"./chunk-DSSLOQDW.js";export{ShellAuthProvider,setShellNavIcons,useShellAuth}from"./chunk-DSSLOQDW.js";import{navVisible as It,isSection as $t,isReachable as Dt,visibleChildren as At}from"./chunk-5A7MWTXX.js";import{LoadingSpinner as Rt}from"./chunk-NVFKXL52.js";export{LoadingSpinner}from"./chunk-NVFKXL52.js";import{PopupMenuDivider as Wt,PopupMenu as Ft,PopupMenuLabel as jt,PopupMenuItem as Ot,resolveMenuLevels as zt,keepsNativeMenu as Bt,leavesContextMenuAlone as Ht,describeContextTarget as Kt,MenuIcon as Ut,openMenuLevel as Xt,closeMenuBelow as Vt,clampMenuTop as Yt,menuPanelLeft as Gt}from"./chunk-AEJQC7GF.js";export{NATIVE_MENU_ATTR,PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,describeContextTarget,keepsNativeMenu,leavesContextMenuAlone}from"./chunk-AEJQC7GF.js";import{useDismissPopupsOnOpen as qt}from"./chunk-UVBK6YSR.js";import{Button_default as Jt}from"./chunk-XZXMVACA.js";export{Button_default as Button}from"./chunk-XZXMVACA.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"./chunk-WOZ36LPR.js";import{GLASS_INPUT_BG as Qt,glassStyle as Zt}from"./chunk-7IQ3B77H.js";export{GLASS_DIVIDER,GLASS_INPUT_BG,glassStyle,solidSurfaceStyle}from"./chunk-7IQ3B77H.js";import{Z_LAYERS as er,registerModalEscapeInterceptor as tr,onOverlayOpen as rr}from"./chunk-FIEA5CGB.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"./chunk-FIEA5CGB.js";export{buttonClasses,iconButtonClasses}from"./chunk-K7PQXJO7.js";import{useBrowserState as nr}from"./chunk-D65T4H6J.js";import{Icon as ar,subscribeIcons as or,iconsVersion as lr,iconSets as ir,drawingIn as sr,defaultIconSet as cr,kitDrawing as dr}from"./chunk-KMSAHFLP.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"./chunk-KMSAHFLP.js";import{useFileIntake as ur,FileIntakeAlert as mr}from"./chunk-DFCTQOIL.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"./chunk-DFCTQOIL.js";import{useShellStrings as hr,useShellLocale as pr}from"./chunk-2PNYIWIN.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"./chunk-2PNYIWIN.js";import{formatGrouped as gr}from"./chunk-C3QOHMR6.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"./chunk-AP2QEJXQ.js";import{formatDate as fr,timeAgo as br}from"./chunk-W32SKK3D.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"./chunk-W32SKK3D.js";import{createContext as yr,lazy as xr,useSyncExternalStore as wr,useState as vr,useEffect as kr,useRef as Nr,useCallback as Cr,useLayoutEffect as Sr,useMemo as _r,useContext as Er,isValidElement as Tr,cloneElement as Mr,Suspense as Lr,useId as Pr}from"react";import{Dialog as Ir,DialogBackdrop as $r,DialogPanel as Dr}from"@headlessui/react";import{jsxs as Ar,jsx as Rr,Fragment as Wr}from"react/jsx-runtime";import{createPortal as Fr}from"react-dom";import{useQueryClient as jr,useQuery as Or,useInfiniteQuery as zr,QueryClientContext as Br,QueryClient as Hr}from"@tanstack/react-query";import"react-router-dom";function Kr(...e){return Object.assign({},...e)}function Ur(e){let t=null,r=0;const n=/* @__PURE__ */new Set,a=()=>{n.forEach(e=>e())};return{windowKey:e,set(n,o){if(null===n)return t=null,Pe(e),void a();t={...n,nav:++r},a(),!1!==o?.raise&&Ie(e)},get:()=>t,subscribe:e=>(n.add(e),()=>{n.delete(e)})}}function Xr(e){return wr(e.subscribe,e.get,e.get)}var Vr=[{title:"Global",shortcuts:[{keys:lt,description:"Search"},{keys:it,description:"Start menu, or collapse the sidebar"},{keys:"Ctrl F11",description:"Toggle fullscreen"},{keys:"ESC",description:"Exit fullscreen (when no windows open)"},{keys:"?",description:"Show keyboard shortcuts"}]},{title:"Windows (title bar focused)",shortcuts:[{keys:"←↑→↓",description:"Move window"},{keys:`${st} Arrows`,description:"Resize window"},{keys:`${ct} ←/→`,description:"Snap to left / right half"},{keys:`${ct} ↑`,description:"Maximize"},{keys:`${ct} ↓`,description:"Restore / minimize"},{keys:dt,description:"Toggle maximize"}]},{title:"Lists",shortcuts:[{keys:"J / ↓",description:"Next row"},{keys:"K / ↑",description:"Previous row"},{keys:"⏎",description:"Open selected row"},{keys:"⇧J / ⇧K",description:"Move and select"},{keys:"⇧ Click",description:"Range select"},{keys:"Space",description:"Toggle row checkbox"},{keys:ut,description:"Select / deselect all"},{keys:mt,description:"Create new item"},{keys:ht,description:"Edit selected item"}]},{title:"Modals / Forms",shortcuts:[{keys:pt,description:"Submit"},{keys:gt,description:"Save"},{keys:ft,description:"Save as new (duplicate)"},{keys:bt,description:"Undo the last change to the form"},{keys:yt,description:"Redo it"},{keys:"ESC",description:"Close modal"}]}];function Yr(){const[e,t]=vr(!1);return kr(()=>{const e=()=>t(e=>!e);return document.addEventListener("toggle-shortcut-help",e),()=>document.removeEventListener("toggle-shortcut-help",e)},[]),kr(()=>{const e=e=>{if("?"===e.key&&!e.metaKey&&!e.ctrlKey&&!e.altKey){const r=e.target?.tagName;if("INPUT"===r||"TEXTAREA"===r||"SELECT"===r)return;if(e.target?.isContentEditable)return;e.preventDefault(),t(e=>!e)}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),qt(e),/* @__PURE__ */Ar(Ir,{open:e,onClose:()=>t(!1),className:"relative",style:{zIndex:er.overlay},children:[
|
|
2
|
+
export{ImageAnnotator_default as ImageAnnotator}from"./chunk-LU7X6LLY.js";import{PREVIEW_OPENED_EVENT as e,openPreviewFile as t}from"./chunk-RAFTWZF5.js";import{subscribePomo as r,getPomoSnapshot as n}from"./chunk-IQW3EDEB.js";export{setShellTodoProvider}from"./chunk-IQW3EDEB.js";import{wallpaperSrc as a,WALLPAPER_PREF_TOKEN as o,uploadWallpaper as l,wallpaperUploadError as i,deleteWallpaper as s,getWallpaper as c}from"./chunk-EQI47WNM.js";import{TabStrip as d}from"./chunk-AAOAQKB4.js";import{ROW_HEIGHTS as u,ContextMenu as m,TimeAgo as h,Spinner as p,Markdown as g,CONTROL_HEIGHTS as f,useTheme as b,resolveTheme as y,CORNERS_FOR_THEME as x,Segmented as w,TransferProgress as v,useClickOutside as k,ListLoadError as N,Checkbox_default as C,ListFooter as S,copyToClipboard as _,firstEnabledIndex as E,FormField as T,Input_default as M,applyThemePrefs as L,selectionAt as P,lastEnabledIndex as I,nextEnabledIndex as $,Calendar as D,matchTypeahead as A}from"./chunk-R7BUE34N.js";export{APP_UPDATE_POLL_MS,Accordion,AlignmentGrid,AppUpdateBanner,AttachButton,AttachmentDropZone,AttachmentList,AuthScreen,Avatar,AvatarGroup,BORDER_WIDTHS,Banner,BoxPlotChart,BrandAssetEditor,BudgetBar,CHART_INK,COLUMN_COUNT_MAX,COLUMN_COUNT_WIDTHS,COLUMN_SHARES_EQUAL,COLUMN_SHARE_MIN,CONTROL_HEIGHTS,CORNERS,CORNERS_FOR_THEME,Calendar,CandlestickChart,Card,CartesianPlot,ChartBrush,ChartDefs,ChartDot,ChartFrame,ChartHighlightProvider,ChartSkeleton,ChartTooltip,ChatTemplate,Checkbox_default as Checkbox,CheckoutTemplate,ChordChart,ColorPicker,ColorPickerPanel,ColorSwatch,ColoredBadge,ColumnChart,ComposerAttachments,ContainerFillChart,ContextMenu,CornersInput,CountBadge,DAY_MS,DashboardTemplate,DataTable,DataTablePage,DatePicker_default as DatePicker,DateRangePicker,DateTimePicker_default as DateTimePicker,DescriptionList,DisplayChips,Divider,Drawer,DropdownMenu,ELEVATION_LEVELS,EmailTemplate,EmptyState,EmptyValue,ErrorBoundary,ErrorPage,FONT_WEIGHTS,FilePicker_default as FilePicker,FloatingBar,FormErrorSummary,FormField,FormLayoutPage,FunnelChart,GROUP_COLORS,GROUP_COLORS_SOLID,GalleryTemplate,Grid,HeatmapChart,HelpCenter,HexInput,HistogramChart,IconRail,IconRailButton,ImageFocusPoint,Inline,Input_default as Input,InputNumber_default as InputNumber,Kanban,Label,LanguagePanel,LanguageSelect,LinkPicker,ListFooter,ListLoadError,ListRow,MAX_FRACTION_DIGITS,MOTION,MOTION_DURATIONS,Markdown,Markdown as MarkdownLite,MediaUploadField,MediaUploadGrid,Meter,MetricBar,MilestoneTimeline,NativeSelect,NumericKeypad,POST_PRODUCTION_STATUSES,PageHeader,Pagination,PaperclipGlyph,Paragraph,PieChart,Popover,PortalBrandingProvider,ProductionTimeline,RADAR_SERIES_CAP,RADIUS_ROLES,ROW_HEIGHTS,RadarChart,RadialBarChart,Radio_default as Radio,RadioGroup,RangeChart,RankedBars,SCATTER_SERIES_CAP,SERIES_SLOT_COUNT,SERIES_VARS,SPACING_ROLES,SPACING_SCALE,STAGES,STATUS_VARS,SankeyChart,ScatterChart,SearchableSelect,Segmented,Select_default as Select,SettingRow,SidebarActionButton,SidebarGroupLabel,SidebarNavGroup,SidebarNavItem,Skeleton,Slider,SliderGroup,Snippet,SortableList,Sparkline,Stack,StatCard,StatTile,Statistic,StatusBadge,StatusBadgeProvider,Stepper,SunburstChart,Switch_default as Switch,TYPE_SCALE,Tabs,TagInput,Text,TextLinkField,TextToolbar,Textarea_default as Textarea,TileButton_default as TileButton,TimeAgo,TimePicker_default as TimePicker,TimeSeriesChart,TimelineTrack,Title,TopNav,TransferProgress,Tree,TreeEmptySlot,TreeGroup,TreeGroupLabel,TreeRow,TreeSeam,TreemapChart,WaterfallChart,WidthsBar,angleScale,appendKey,applyCorners,applyIconSet,applyThemePrefs,arcPath,areaBetween,areaFrom,assignSeriesSlots,autoHighlightIndex,backspace,bandScale,binValues,budgetState,bumpPath,calcOverall,calcReportOverall,colorFill,colorSwatchClasses,columnSharesWidths,copyToClipboard,cornersFor,curvePath,dashFor,fillFor,fillId,fmtSliderDate,fromKey as fromDateKey,glowId,groundId,groupColors,hexToHsv,highlightOpacity,hsvToHex,isSeverityTone,isSpacingStep,labelClasses,ladderScale,languageSelectWidth,linearPath,linearScale,logScale,maskId,mediaFileName,monotonePath,niceAxis,niceMax,parseHexColor,polygonPoints,radiusScale,resolveColumnShares,resolveColumnWidths,resolveCorners,resolvePortalBrandAsset,resolveSeriesColor,resolveSeriesColorWithin,resolveTheme,seriesColor,severityOf,splinePath,squarify,stagger,stepPath,tabButtonId,tabPanelId,textToolbarRows,textToolbarWindowColumns,toKey as toDateKey,toDayMs,toISODate,toggleSeriesSlot,useAppUpdate,useClickOutside,useContextMenu,useDebouncedValue,useHighlight,usePlotWidth,usePortalBranding,useProductionTimeline,useStatusLabel,useTheme,useTransferProgress}from"./chunk-R7BUE34N.js";export{Breadcrumbs}from"./chunk-XDM6YBBX.js";import{withSpareRow as R,EditableGrid as W}from"./chunk-Z756FAL6.js";export{EditableGrid}from"./chunk-Z756FAL6.js";import{escapeHtml as F}from"./chunk-BR22X7E5.js";import{TH_ONE_LINE as j}from"./chunk-RYBDLJJV.js";import{PLACEHOLDER_INK as O,FILTER_ON as z,FILTER_ON_INK as B,FILTER_OFF as H}from"./chunk-HJQAE6SP.js";export{INPUT_BASE,INPUT_SIZES,PLACEHOLDER_INK,inputClasses}from"./chunk-HJQAE6SP.js";import{SidebarLayout as K}from"./chunk-BDXFODVC.js";export{ResizeHandle,SidebarLayout}from"./chunk-BDXFODVC.js";export{ENGLISH,SHELL_LANGUAGE_STORAGE_KEY,ShellLanguageProvider,matchShellLanguage,readSavedShellLanguage,resolveShellLanguage,saveShellLanguage,useShellLanguage}from"./chunk-2ECESCBH.js";export{startClientTelemetry}from"./chunk-Q3WRWTON.js";import{playNotification as U,playStartup as X,soundsEnabled as V,getSoundConfig as Y,SOUND_PACK_KEYS as G,soundPackName as q,SOUND_TYPES as Q,soundTypeName as J,setSoundForType as Z,previewSound as ee,setAllSounds as te,playLogout as re}from"./chunk-W33ZFDRR.js";import{useAuth as ne,readStored as ae,initialRailCollapsed as oe,RAIL_COLLAPSED_KEY as le,writeStored as ie}from"./chunk-S2PS4IOT.js";export{setShellAuthBridge}from"./chunk-S2PS4IOT.js";import{navPagesProvider as se,partitionNav as ce,sanitizeRecent as de,favoritesToResults as ue,pushRecent as me,BrandMark as he,GlobalSearch as pe,PAGE_RESULT_ENTITY as ge,parsePageResultTarget as fe,IconButton_default as be,openGlobalSearch as ye}from"./chunk-6YNWFATP.js";export{BrandMark,GlobalSearch,IconButton_default as IconButton,openGlobalSearch,pushRecent as pushRecentSearch,resolveBrandMarkTreatment,sanitizeRecent as sanitizeRecentSearches}from"./chunk-6YNWFATP.js";import{THEME_ICON_SETS as xe,loadIconSet as we,ICON_SET_FOR_THEME as ve}from"./chunk-XT7UUKFA.js";export{ICON_NAMES,ICON_SET_FOR_THEME,THEME_ICON_SETS,iconSetFor,isIconName,loadIconSet}from"./chunk-XT7UUKFA.js";export{isSafeLinkHref}from"./chunk-PJPK2ADX.js";import{publishDesktopFolders as ke,requestFilesTrashView as Ne,FolderGlyph as Ce,requestFilesDesktopFolderView as Se,FileIconTile as _e}from"./chunk-MDD5DHF2.js";import{setPdfPreview as Ee}from"./chunk-ESL5TDNA.js";import"./chunk-VTVSMRFX.js";import{toast_default as Te}from"./chunk-BTLM7W6P.js";export{UNDOABLE_MS,toast_default as toast}from"./chunk-BTLM7W6P.js";import{APP_VERSION as Me,VERSION as Le}from"./chunk-QK67IFHD.js";export{VERSION}from"./chunk-QK67IFHD.js";import{cancelWindowFront as Pe,requestWindowFront as Ie,useWindowManager as $e,WINDOW_REGISTRY as De,isPageEntry as Ae,Modal as Re,setPerfCollecting as We,drainPerfEvents as Fe,forgetMaximizedWindowBoxes as je,markMenuOpen as Oe,setShellHomeRoute as ze,useCurrentTabKey as Be,ModalActions as He,useModalActive as Ke,LoadingSpinner as Ue,useEnclosingModalId as Xe,isShellApiClientConfigured as Ve,client_default as Ye,KEY_ACTIVATED_SELECTOR as Ge,isDraftEntityId as qe,activateWindowById as Qe,CancelButton as Je,setWindowPosition as Ze,isDraftEntityWindow as et,subscribeWindowChrome as tt,getWindowChromeVersion as rt,isTabWindow as nt,readWindowChrome as at,isEntityEntry as ot}from"./chunk-HTHLFM24.js";export{CancelButton,DocFavStar,EntityWindowFallback,EntityWindowLoading,EntityWindowState,MODAL_SUBMIT_SELECTOR,Modal,ModalActions,UndoControls,UndoProvider,WindowCrashedFallback,WindowErrorBoundary,WindowManagerProvider,WindowTitle,activateWindowById,beginWindowGesture,commitExposeHighlight,exitExposeMode,getActiveWindowRoute,getExposeHighlight,getWindowPosition,isEntityEntry,isPageEntry,markMenuOpen,requestWindowFront,setExposeHighlight,setShellApiClient,setShellWindowRegistry,setWindowDefaultPosition,setWindowPosition,splitTitle,subscribeExposeHighlight,toggleExposeMode,useCurrentTabKey,useEnclosingModalId,useIsActiveWindow,useModalActive,usePageSearch,useUndo,useUndoCanEdit,useUndoable,useUndoableState,useWidgetSettings,useWindowDirty,useWindowManager,useWindowMenuItem,useWindowTitle}from"./chunk-HTHLFM24.js";export{CopyButton}from"./chunk-E5DFGCAL.js";import{CMD_K as lt,CMD_DOT as it,SHIFT as st,MOD as ct,ENTER as dt,CMD_A as ut,ALT_SHIFT_N as mt,ALT_SHIFT_E as ht,CMD_ENTER as pt,CMD_S as gt,ALT_SHIFT_D as ft,CMD_Z as bt,CMD_SHIFT_Z as yt,useShellPrefs as xt,useIsMobile as wt,useIsPhone as vt,useShellPrefsAdapter as kt}from"./chunk-5MKWCHMD.js";export{ALT,ALT_SHIFT_D,ALT_SHIFT_E,ALT_SHIFT_N,CMD_A,CMD_DOT,CMD_ENTER,CMD_K,CMD_S,ENTER,Kbd,MOD,NEXT_CHUNK_PATH_PREFIX,Result,SHIFT,STALE_CHUNK_RELOAD_COOLDOWN_MS,STALE_CHUNK_RELOAD_KEY,ShellPrefsProvider,VITE_PRELOAD_ERROR_EVENT,installStaleChunkReload,isMac,isStaleChunkError,useIsMobile,useLocalStoragePrefs,useShellPrefs}from"./chunk-5MKWCHMD.js";import"./chunk-KNUR2UEG.js";export{ConfirmProvider,Dialog,confirm,confirmDestructive,prompt,useConfirm,useFocusTrap,useScrollLock}from"./chunk-LTH3NJTS.js";import{startMenuCategories as Nt,navSections as Ct,navIcons as St,sectionIcons as _t,RAIL_COLLAPSED_W as Et,RAIL_W as Tt,WORK_AREA_CHANGED_EVENT as Mt,useShellAuth as Lt,TAB_STRIP_H as Pt}from"./chunk-DSSLOQDW.js";export{ShellAuthProvider,setShellNavIcons,useShellAuth}from"./chunk-DSSLOQDW.js";import{navVisible as It,isSection as $t,isReachable as Dt,visibleChildren as At}from"./chunk-5A7MWTXX.js";import{LoadingSpinner as Rt}from"./chunk-NVFKXL52.js";export{LoadingSpinner}from"./chunk-NVFKXL52.js";import{PopupMenuDivider as Wt,PopupMenu as Ft,PopupMenuLabel as jt,PopupMenuItem as Ot,resolveMenuLevels as zt,keepsNativeMenu as Bt,leavesContextMenuAlone as Ht,describeContextTarget as Kt,MenuIcon as Ut,openMenuLevel as Xt,closeMenuBelow as Vt,clampMenuTop as Yt,menuPanelLeft as Gt}from"./chunk-AEJQC7GF.js";export{NATIVE_MENU_ATTR,PopupMenu,PopupMenuDivider,PopupMenuItem,PopupMenuLabel,PopupSubmenu,describeContextTarget,keepsNativeMenu,leavesContextMenuAlone}from"./chunk-AEJQC7GF.js";import{useDismissPopupsOnOpen as qt}from"./chunk-UVBK6YSR.js";import{Button_default as Qt}from"./chunk-XZXMVACA.js";export{Button_default as Button}from"./chunk-XZXMVACA.js";export{MENU_MAX_HEIGHT,POPUP_MAX_WIDTH,Tooltip,popupBounds,useDropdownPosition}from"./chunk-WOZ36LPR.js";import{GLASS_INPUT_BG as Jt,glassStyle as Zt}from"./chunk-7IQ3B77H.js";export{GLASS_DIVIDER,GLASS_INPUT_BG,glassStyle,solidSurfaceStyle}from"./chunk-7IQ3B77H.js";import{Z_LAYERS as er,registerModalEscapeInterceptor as tr,onOverlayOpen as rr}from"./chunk-FIEA5CGB.js";export{OVERLAY_OPEN_EVENT,Z_LAYERS,dismissPopups,registerModalEscapeInterceptor}from"./chunk-FIEA5CGB.js";export{buttonClasses,iconButtonClasses}from"./chunk-K7PQXJO7.js";import{useBrowserState as nr}from"./chunk-D65T4H6J.js";import{Icon as ar,subscribeIcons as or,iconsVersion as lr,iconSets as ir,drawingIn as sr,defaultIconSet as cr,kitDrawing as dr}from"./chunk-KMSAHFLP.js";export{Icon,activeIconSet,iconSets,iconsVersion,registerIconSet,registerIcons,resolveIcon,setDefaultIconSet,setIconSet,subscribeIcons}from"./chunk-KMSAHFLP.js";import{useFileIntake as ur,FileIntakeAlert as mr}from"./chunk-DFCTQOIL.js";export{FileIntakeAlert,acceptsFile,useFileIntake}from"./chunk-DFCTQOIL.js";import{useShellStrings as hr,useShellLocale as pr}from"./chunk-2PNYIWIN.js";export{DEFAULT_SHELL_STRINGS,ShellStringsProvider,useShellLocale,useShellStrings}from"./chunk-2PNYIWIN.js";import{formatGrouped as gr}from"./chunk-C3QOHMR6.js";export{FOCAL_DEFAULT,FOCAL_NUDGE_COARSE,FOCAL_NUDGE_STEP,focalFromRect,formatFocal,nudgeFocal,parseFocal}from"./chunk-AP2QEJXQ.js";import{formatDate as fr,timeAgo as br}from"./chunk-W32SKK3D.js";export{DATE_FORMAT_OPTIONS,EMPTY_VALUE,TZ_AUTO,currencyDecimals,currencySymbol,firstDayOfWeek,formatBytes,formatDate,formatDateTime,formatMoney,formatTime,getUserDateFormat,getUserTimezone,setCurrencyFormats,setUserDateFormat,setUserTimezone,syncTimezoneFromProfile,timeAgo}from"./chunk-W32SKK3D.js";import{createContext as yr,lazy as xr,useSyncExternalStore as wr,useState as vr,useEffect as kr,useRef as Nr,useCallback as Cr,useLayoutEffect as Sr,useMemo as _r,useContext as Er,isValidElement as Tr,cloneElement as Mr,Suspense as Lr,useId as Pr}from"react";import{Dialog as Ir,DialogBackdrop as $r,DialogPanel as Dr}from"@headlessui/react";import{jsxs as Ar,jsx as Rr,Fragment as Wr}from"react/jsx-runtime";import{createPortal as Fr}from"react-dom";import{useQueryClient as jr,useQuery as Or,useInfiniteQuery as zr,QueryClientContext as Br,QueryClient as Hr}from"@tanstack/react-query";import"react-router-dom";function Kr(...e){return Object.assign({},...e)}function Ur(e){let t=null,r=0;const n=/* @__PURE__ */new Set,a=()=>{n.forEach(e=>e())};return{windowKey:e,set(n,o){if(null===n)return t=null,Pe(e),void a();t={...n,nav:++r},a(),!1!==o?.raise&&Ie(e)},get:()=>t,subscribe:e=>(n.add(e),()=>{n.delete(e)})}}function Xr(e){return wr(e.subscribe,e.get,e.get)}var Vr=[{title:"Global",shortcuts:[{keys:lt,description:"Search"},{keys:it,description:"Start menu, or collapse the sidebar"},{keys:"Ctrl F11",description:"Toggle fullscreen"},{keys:"ESC",description:"Exit fullscreen (when no windows open)"},{keys:"?",description:"Show keyboard shortcuts"}]},{title:"Windows (title bar focused)",shortcuts:[{keys:"←↑→↓",description:"Move window"},{keys:`${st} Arrows`,description:"Resize window"},{keys:`${ct} ←/→`,description:"Snap to left / right half"},{keys:`${ct} ↑`,description:"Maximize"},{keys:`${ct} ↓`,description:"Restore / minimize"},{keys:dt,description:"Toggle maximize"}]},{title:"Lists",shortcuts:[{keys:"J / ↓",description:"Next row"},{keys:"K / ↑",description:"Previous row"},{keys:"⏎",description:"Open selected row"},{keys:"⇧J / ⇧K",description:"Move and select"},{keys:"⇧ Click",description:"Range select"},{keys:"Space",description:"Toggle row checkbox"},{keys:ut,description:"Select / deselect all"},{keys:mt,description:"Create new item"},{keys:ht,description:"Edit selected item"}]},{title:"Modals / Forms",shortcuts:[{keys:pt,description:"Submit"},{keys:gt,description:"Save"},{keys:ft,description:"Save as new (duplicate)"},{keys:bt,description:"Undo the last change to the form"},{keys:yt,description:"Redo it"},{keys:"ESC",description:"Close modal"}]}];function Yr(){const[e,t]=vr(!1);return kr(()=>{const e=()=>t(e=>!e);return document.addEventListener("toggle-shortcut-help",e),()=>document.removeEventListener("toggle-shortcut-help",e)},[]),kr(()=>{const e=e=>{if("?"===e.key&&!e.metaKey&&!e.ctrlKey&&!e.altKey){const r=e.target?.tagName;if("INPUT"===r||"TEXTAREA"===r||"SELECT"===r)return;if(e.target?.isContentEditable)return;e.preventDefault(),t(e=>!e)}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),qt(e),/* @__PURE__ */Ar(Ir,{open:e,onClose:()=>t(!1),className:"relative",style:{zIndex:er.overlay},children:[
|
|
3
3
|
/* @__PURE__ */Rr($r,{className:"fixed inset-0 bg-black/30 transition-opacity"}),
|
|
4
4
|
/* @__PURE__ */Rr("div",{className:"fixed inset-0 flex items-center justify-center p-6",children:/* @__PURE__ */Ar(Dr,{className:"w-full max-w-md rounded-lg bg-white shadow-xl",children:[
|
|
5
5
|
/* @__PURE__ */Ar("div",{className:"flex items-center justify-between px-5 pt-5 pb-3 border-b border-gray-200",children:[
|
|
@@ -11,7 +11,7 @@ export{ImageAnnotator_default as ImageAnnotator}from"./chunk-LU7X6LLY.js";import
|
|
|
11
11
|
/* @__PURE__ */Rr("span",{className:"text-sm text-gray-700",children:e.description}),
|
|
12
12
|
/* @__PURE__ */Rr("kbd",{className:"inline-flex items-center rounded border border-gray-300 bg-gray-50 px-2 py-0.5 text-xs font-medium text-gray-600 font-mono",children:e.keys})]},e.keys+e.description))})]},e.title))}),
|
|
13
13
|
/* @__PURE__ */Rr("div",{className:"px-5 py-3 border-t border-gray-100 text-center",children:/* @__PURE__ */Ar("span",{className:"text-xs text-gray-400",children:["Press ",
|
|
14
|
-
/* @__PURE__ */Rr("kbd",{className:"rounded border border-gray-300 bg-gray-50 px-2 py-0.5 text-2xs font-medium text-gray-500",children:"?"})," to toggle"]})})]})})]})}var Gr="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m0 0H5.625",qr="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25",
|
|
14
|
+
/* @__PURE__ */Rr("kbd",{className:"rounded border border-gray-300 bg-gray-50 px-2 py-0.5 text-2xs font-medium text-gray-500",children:"?"})," to toggle"]})})]})})]})}var Gr="M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m0 0H5.625",qr="M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25",Qr="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18",Jr="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3",Zr="M16.023 9.348h4.992V4.356m-4.993 4.992l3.181-3.183a8.25 8.25 0 00-13.803 3.7M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7",en="M13.19 8.688a4.5 4.5 0 011.242 7.244l-4.5 4.5a4.5 4.5 0 01-6.364-6.364l1.757-1.757m13.35-.622l1.757-1.757a4.5 4.5 0 00-6.364-6.364l-4.5 4.5a4.5 4.5 0 001.242 7.244";function tn({disabled:e}={}){const[t,r]=vr(null);if(kr(()=>{if(e)return;const t=e=>{if(Ht(e))return;const t=("function"==typeof e.composedPath?e.composedPath()[0]:void 0)??e.target;e.preventDefault();const n=P(t);r({x:e.clientX,y:e.clientY,owner:t instanceof Element?t:null,target:Kt(t,n?.text),selected:n})};return document.addEventListener("contextmenu",t),()=>{document.removeEventListener("contextmenu",t)}},[e]),!t)return null;const{linkUrl:n}=t.target,{selected:a}=t,o=()=>r(null),l=e=>()=>{e(),o()},i=[];return a&&i.push([
|
|
15
15
|
/* @__PURE__ */Ar(Ot,{onClick:l(()=>{_("Text",a.text,a.html)}),children:[
|
|
16
16
|
/* @__PURE__ */Rr(Ut,{d:Gr}),"Copy"]},"copy")]),n&&i.push([
|
|
17
17
|
/* @__PURE__ */Ar(Ot,{onClick:l(()=>{return e=n,void window.open(e,"_blank","noopener,noreferrer");var e}),children:[
|
|
@@ -19,9 +19,9 @@ export{ImageAnnotator_default as ImageAnnotator}from"./chunk-LU7X6LLY.js";import
|
|
|
19
19
|
/* @__PURE__ */Ar(Ot,{onClick:l(()=>{_("Link address",n)}),children:[
|
|
20
20
|
/* @__PURE__ */Rr(Ut,{d:en}),"Copy link address"]},"copy-link")]),i.push([
|
|
21
21
|
/* @__PURE__ */Ar(Ot,{onClick:l(()=>window.history.back()),children:[
|
|
22
|
-
/* @__PURE__ */Rr(Ut,{d:
|
|
22
|
+
/* @__PURE__ */Rr(Ut,{d:Qr}),"Back"]},"back"),
|
|
23
23
|
/* @__PURE__ */Ar(Ot,{onClick:l(()=>window.history.forward()),children:[
|
|
24
|
-
/* @__PURE__ */Rr(Ut,{d:
|
|
24
|
+
/* @__PURE__ */Rr(Ut,{d:Jr}),"Forward"]},"forward"),
|
|
25
25
|
/* @__PURE__ */Ar(Ot,{onClick:l(()=>window.location.reload()),children:[
|
|
26
26
|
/* @__PURE__ */Rr(Ut,{d:Zr}),"Reload"]},"reload"),
|
|
27
27
|
/* @__PURE__ */Ar(Ot,{onClick:l(()=>{_("Page address",window.location.href)}),children:[
|
|
@@ -107,7 +107,7 @@ return Ar("div",{className:"flex items-baseline justify-between gap-2",children:
|
|
|
107
107
|
/* @__PURE__ */Rr("dt",{className:"text-white/40",children:e}),
|
|
108
108
|
/* @__PURE__ */Rr("dd",{className:"tabular-nums text-white/70",children:t})]})}var zn=[],Bn="documents",Hn="Recent Documents",Kn=90;var Un=yr({});function Xn({value:e,children:t}){/* @__PURE__ */
|
|
109
109
|
return Rr(Un.Provider,{value:e,children:t})}function Vn(){return Er(Un)}function Yn(){const e="undefined"!=typeof document?getComputedStyle(document.documentElement):null,t=(e?.getPropertyValue("--taskbar-position")||"bottom").trim();return{position:t,vertical:"left"===t||"right"===t,height:parseInt(e?.getPropertyValue("--taskbar-height")||"0")||0,width:parseInt(e?.getPropertyValue("--taskbar-width")||"0")||0}}function Gn({profile:r}){const n=hr();jr();const{openEntity:a,openPage:o}=$e(),l=Nr(null),{prefs:i,save:s}=xt(),c={...r?.preferences||{},...i},d=c.favorite_documents||[],u=c.desktop_folders||[],m=u.some(e=>e.id===Bn)?u.map(e=>e.id===Bn?{...e,name:Hn}:e):[...u,{id:Bn,name:Hn}],h=c.desktop_snap??!1,p=c.notepad_notes||[],f=p.filter(e=>e.sticky),b=Vn(),y=b.hiddenContextMenuItems??[],x=async(e,t)=>{const r=`${e}#${t}`;if(b.stickyResolver)try{const n=await b.stickyResolver(e,t);n?a(n.entityType,n.entityId,n.snapshot,n.label??r):Te.error(`${r} not found`)}catch{Te.error(`Failed to open ${r}`)}else Te.error(`Unknown reference: ${r}`)},w=(e,t)=>{const r=p.find(t=>t.id===e);if(!r)return;const n=r.content,a=n.slice(t).match(/^\[([ xX]?)\]/);if(!a)return;const o="x"===a[1]||"X"===a[1]?"[ ]":"[x]",l=n.slice(0,t)+o+n.slice(t+a[0].length);ge(p.map(t=>t.id===e?{...t,content:l,updated_at:/* @__PURE__ */(new Date).toISOString()}:t))},v=(e,t)=>{if(!t)return[];const r=t.split("\n");let n=0;return r.map((t,r)=>{const a=n;n+=t.length+1;const o=[],l=/([A-Z]{2,4})#(\d{4,6})/g;let i;for(;null!==(i=l.exec(t));)if(b.stickyResolver){const e=i[1],t=i[2],n=i.index,a=i[0];o.push({idx:n,len:a.length,render:()=>/* @__PURE__ */Rr("button",{onClick:r=>{r.stopPropagation(),x(e,t)},className:"text-blue-700 hover:underline font-medium cursor-pointer",children:a},`r-${r}-${n}`)})}const s=/\[([ xX]?)\]/g;for(;null!==(i=s.exec(t));){const t="x"===i[1]||"X"===i[1],n=i.index,l=a+n;o.push({idx:n,len:i[0].length,render:()=>/* @__PURE__ */Rr("button",{onClick:t=>{t.stopPropagation(),w(e,l)},className:`inline-flex items-center justify-center w-3.5 h-3.5 rounded border ${t?"bg-blue-500 border-blue-500 text-white":"border-gray-500 bg-white/50 hover:border-blue-400"} cursor-pointer align-text-bottom mr-0.5`,children:t&&/* @__PURE__ */Rr(ar,{name:"check",className:"w-2.5 h-2.5",strokeWidth:3})},`c-${r}-${n}`)})}o.sort((e,t)=>e.idx-t.idx);const c=[];let d=0;for(const e of o)e.idx>d&&c.push(/* @__PURE__ */Rr("span",{children:t.slice(d,e.idx)},`t-${r}-${d}`)),c.push(e.render()),d=e.idx+e.len;d<t.length&&c.push(/* @__PURE__ */Rr("span",{children:t.slice(d)},`t-${r}-${d}`)),0===c.length&&c.push(/* @__PURE__ */Rr("span",{children:""},`e-${r}`));const u=/^\[x\]/i.test(t.trimStart());/* @__PURE__ */
|
|
110
|
-
return Rr("div",{className:u?"line-through opacity-50":"",children:c},r)})},[k,N]=vr(null),[C,S]=vr(null),[_,E]=vr(/* @__PURE__ */new Set),[T,M]=vr(null),[L,P]=vr(!1),[I,$]=vr(!1),[D,A]=vr(!1),[R,W]=vr(null),[F,O]=vr(""),[z,B]=vr(null),[H,K]=vr(null),[U,X]=vr(null),[V,Y]=vr(null),G=Nr(null),q=Cr(e=>{b.saveShortcuts?b.saveShortcuts(e):s({favorite_documents:e})},[b,s]),
|
|
110
|
+
return Rr("div",{className:u?"line-through opacity-50":"",children:c},r)})},[k,N]=vr(null),[C,S]=vr(null),[_,E]=vr(/* @__PURE__ */new Set),[T,M]=vr(null),[L,P]=vr(!1),[I,$]=vr(!1),[D,A]=vr(!1),[R,W]=vr(null),[F,O]=vr(""),[z,B]=vr(null),[H,K]=vr(null),[U,X]=vr(null),[V,Y]=vr(null),G=Nr(null),q=Cr(e=>{b.saveShortcuts?b.saveShortcuts(e):s({favorite_documents:e})},[b,s]),Q=Cr(e=>{b.saveFolders?b.saveFolders(e):s({desktop_folders:e})},[b,s]);Cr(e=>{b.saveSnap?b.saveSnap(e):s({desktop_snap:e})},[b,s]);const J=Nr({folders:m,favDocs:d,saveFolders:Q,saveDocs:q});J.current={folders:m,favDocs:d,saveFolders:Q,saveDocs:q},kr(()=>{const t=e=>{const t=e.detail;if(!t?.filePath)return;const{favDocs:r,saveDocs:n}=J.current,a=r.filter(e=>!("preview-file"===e.entityType&&e.filePath===t.filePath));n([{entityType:"preview-file",entityId:t.filePath,label:t.filename,filePath:t.filePath,fileKind:t.kind,folderId:Bn},...a])};return window.addEventListener(e,t),()=>window.removeEventListener(e,t)},[]);const Z=e=>({right:20+Math.floor(e/8)*Kn,top:20+e%8*Kn}),ee=(e,t)=>null!=e.x&&null!=e.y?{right:e.x,top:e.y}:Z(t),te=(e,t)=>null!=e.x&&null!=e.y?{right:e.x,top:e.y}:Z(d.filter(e=>!e.folderId).length+t),re=d.filter(e=>!e.folderId),ne=e=>{"preview-file"===e.entityType&&e.filePath&&e.fileKind?t({filePath:e.filePath,filename:e.label,kind:e.fileKind,onStaged:e=>o(e)}):"page"===e.entityType?o(e.entityId):a(e.entityType,e.entityId,null,e.label)},ae=e=>{Se(e),o("/files")},oe=Cr(e=>{const{favDocs:t,saveDocs:r}=J.current,n=new Set(e.map(e=>`${e.entityType}|${e.entityId}`));r(t.map(e=>e.folderId&&n.has(`${e.entityType}|${e.entityId}`)?{...e,folderId:void 0,folderX:void 0,folderY:void 0}:e))},[]),le=Cr(e=>{const{favDocs:t,saveDocs:r}=J.current,n=new Set(e.map(e=>`${e.entityType}|${e.entityId}`));r(t.filter(e=>!(e.folderId&&n.has(`${e.entityType}|${e.entityId}`))))},[]),[ie,se]=vr({}),ce=Nr([]),de=(e,t,r)=>{if(0!==r.button)return;const n="trash"===e?"trash":`${e}-${t}`,a=_.has(n)&&_.size>1?Array.from(_):[n],o=[];for(const e of a)if(e.startsWith("item-")){const t=parseInt(e.slice(5),10),r=re[t];if(!r)continue;const n=ee(r,t),a=document.querySelector(`[data-desktop-icon="${e}"]`);o.push({key:e,type:"item",idx:t,origX:n.right,origY:n.top,el:a})}else if(e.startsWith("folder-")){const t=parseInt(e.slice(7),10),r=m[t];if(!r)continue;const n=te(r,t),a=document.querySelector(`[data-desktop-icon="${e}"]`);o.push({key:e,type:"folder",idx:t,origX:n.right,origY:n.top,el:a})}else if("trash"===e){const t=document.querySelector('[data-desktop-icon="trash"]');if(!t)continue;const r=parseFloat(t.style.right||"0")||0,n=parseFloat(t.style.bottom||"0")||0;o.push({key:e,type:"trash",idx:0,origX:r,origY:n,el:t})}ce.current=o;const l=o.find(e=>e.key===n)??o[0];l&&(N({type:e,idx:t,startX:r.clientX,startY:r.clientY,origX:l.origX,origY:l.origY}),r.preventDefault())};kr(()=>{if(!k)return;const e=ce.current,t=1===e.length&&"item"===e[0].type,r=()=>{if(!t)return null;const r=re[e[0].idx];return"page"===r?.entityType?r.entityId:null},n=()=>document.querySelector("[data-taskbar-dropzone]"),a=(e,t)=>{const r=n();if(!r)return!1;const a=r.getBoundingClientRect();return e>=a.left&&e<=a.right&&t>=a.top&&t<=a.bottom},o=e=>{const t=n();t&&(t.style.outline=e?"2px solid var(--accent-600, #7c3aed)":"",t.style.outlineOffset=e?"-2px":"")},l=n=>{const l=n.clientX-k.startX,i=n.clientY-k.startY;for(const t of e)t.el&&(t.el.style.right=t.origX-l+"px","trash"===t.type?t.el.style.bottom=t.origY-i+"px":(t.el.style.top=`${t.origY+i}px`,t.el.style.left="auto"),t.el.style.zIndex="100",t.el.style.opacity="0.7");if(t){const e=document.elementsFromPoint(n.clientX,n.clientY);let t=null;for(const r of e){const e=r.closest?.('[data-desktop-icon^="folder-"]');if(e){const r=e.getAttribute("data-desktop-icon");r&&(t=parseInt(r.slice(7),10));break}}G.current=t,Y(e=>e===t?e:t),o(null!=r()&&a(n.clientX,n.clientY))}},c=t=>{const n=t.clientX-k.startX,l=t.clientY-k.startY;for(const t of e)t.el&&(t.el.style.zIndex="",t.el.style.opacity="");const c=r();if(c&&a(t.clientX,t.clientY)){o(!1);for(const t of e)t.el&&(t.el.style.left="auto",t.el.style.right=`${t.origX}px`,t.el.style.top=`${t.origY}px`);const t=Array.isArray(i.favorite_pages)?i.favorite_pages:[];return t.includes(c)||s({favorite_pages:[...t,c]}),G.current=null,Y(null),N(null),void(ce.current=[])}o(!1);const u=G.current,p=null!=u?m[u]:null;G.current=null,Y(null);const g=e.filter(e=>"trash"!==e.type).map(e=>{let t=e.origX-n,r=Math.max(0,e.origY+l);if(h){const e=(a=t,o=r,{x:Math.round(a/Kn)*Kn,y:Math.round(o/Kn)*Kn});t=e.x,r=e.y}var a,o;return t=Math.max(0,t),{entry:e,finalRight:t,finalTop:r}}),f=e.find(e=>"trash"===e.type);f&&s({desktop_trash_position:{right:Math.max(0,f.origX-n),bottom:Math.max(0,f.origY-l)}});const b=g.filter(e=>"item"===e.entry.type);if(b.length>0){const t=[...d],r={},n=1===b.length&&1===e.length?b[0]:null,a=n?p??m.find((e,t)=>{const r=te(e,t);return Math.abs(n.finalRight-r.right)<40&&Math.abs(n.finalTop-r.top)<40}):void 0;if(a&&n?.entry.el){const e=n.entry.el,t=m.indexOf(a),r=document.querySelector(`[data-desktop-icon="folder-${t}"]`);if(r){const t=e.getBoundingClientRect(),n=r.getBoundingClientRect(),a=n.left+n.width/2-(t.left+t.width/2),o=n.top+n.height/2-(t.top+t.height/2);e.style.transition="transform 220ms ease-out, opacity 220ms ease-out",e.style.transform=`translate(${a}px, ${o}px) scale(0.2)`,e.style.opacity="0"}r?.animate([{transform:"scale(1)"},{transform:"scale(1.15)"},{transform:"scale(1)"}],{duration:280,easing:"ease-out"})}for(const e of b){const n=d.indexOf(re[e.entry.idx]);-1!==n&&(a?t[n]={...t[n],folderId:a.id,x:void 0,y:void 0,folderX:void 0,folderY:void 0}:(t[n]={...t[n],x:e.finalRight,y:e.finalTop,folderId:void 0},r[`item-${n}`]={right:e.finalRight,top:e.finalTop}))}const o=()=>{q(t),Object.keys(r).length>0&&se(e=>({...e,...r}))};a?setTimeout(o,220):o()}const y=g.filter(e=>"folder"===e.entry.type);if(y.length>0){const e=[...m],t={};for(const r of y)e[r.entry.idx]={...e[r.entry.idx],x:r.finalRight,y:r.finalTop},t[`folder-${r.entry.idx}`]={right:r.finalRight,top:r.finalTop};Q(e),se(e=>({...e,...t}))}N(null),ce.current=[]};return window.addEventListener("pointermove",l),window.addEventListener("pointerup",c),()=>{window.removeEventListener("pointermove",l),window.removeEventListener("pointerup",c)}},[k,h,d,m,re,i]);const ue=JSON.stringify(d.map(e=>`${e.entityId}:${e.x??""}:${e.y??""}:${e.folderId??""}`)),me=JSON.stringify(m.map(e=>`${e.id}:${e.x??""}:${e.y??""}`));kr(()=>{se({})},[ue,me]),kr(()=>{const{folders:e,favDocs:t}=J.current,r={};for(const t of e)r[t.id]=[];for(const e of t)e.folderId&&r[e.folderId]&&r[e.folderId].push(e);ke({folders:e.map(e=>({id:e.id,name:e.name,itemCount:r[e.id]?.length??0})),itemsByFolder:r,moveToDesktop:oe,removeShortcuts:le})},[ue,me,oe,le]),kr(()=>()=>ke(null),[]);const he=Nr(!1);kr(()=>{if(!T)return;const e=e=>{const t=l.current?.getBoundingClientRect();if(!t)return;const r=e.clientX-t.left,n=e.clientY-t.top,a=r-T.startX,o=n-T.startY;if(a*a+o*o>16&&(he.current=!0),M(e=>e?{...e,endX:r,endY:n}:null),he.current){const e=Math.min(T.startX,r),t=Math.max(T.startX,r),a=Math.min(T.startY,n),o=Math.max(T.startY,n);E(((e,t,r,n)=>{const a=/* @__PURE__ */new Set,o=l.current?.clientWidth||800;re.forEach((l,i)=>{const s=ee(l,i),c=o-s.right-80;c+40>e&&c<t&&s.top+40>r&&s.top<n&&a.add(`item-${i}`)}),m.forEach((l,i)=>{const s=te(l,i),c=o-s.right-80;c+40>e&&c<t&&s.top+40>r&&s.top<n&&a.add(`folder-${i}`)});const i=l.current?.querySelector('[data-desktop-icon="trash"]'),s=l.current?.getBoundingClientRect();if(i&&s){const o=i.getBoundingClientRect(),l=o.left-s.left,c=o.top-s.top;l+o.width>e&&l<t&&c+o.height>r&&c<n&&a.add("trash")}return a})(e,t,a,o))}},t=()=>{M(null)};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[T]);kr(()=>{if(!C)return;const e=()=>S(null);return window.addEventListener("click",e),()=>window.removeEventListener("click",e)},[C]);const pe=(e,t)=>{Q(m.map(r=>r.id===e?{...r,name:t}:r)),W(null)},ge=Cr(e=>{b.saveNotes?b.saveNotes(e):s({notepad_notes:e})},[b,s]),fe=(e,t)=>{ge(p.map(r=>r.id===e?{...r,content:t,updated_at:/* @__PURE__ */(new Date).toISOString()}:r))};kr(()=>{if(!H)return;const e=e=>{const t=document.querySelector(`[data-sticky-id="${H.id}"]`);t&&(t.style.left=H.origX+e.clientX-H.startX+"px",t.style.right="auto",t.style.top=H.origY+e.clientY-H.startY+"px")},t=e=>{const t=H.origX+e.clientX-H.startX,r=Math.max(0,H.origY+e.clientY-H.startY),n=document.querySelector(`[data-sticky-id="${H.id}"]`),a=n?.offsetWidth??192,o=t+a/2>window.innerWidth/2?"right":"left",l="right"===o?window.innerWidth-t-a:t;ge(p.map(e=>e.id===H.id?{...e,sticky_x:l,sticky_y:r,sticky_anchor:o}:e)),n&&(n.style.left="",n.style.right=""),K(null)};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[H,p]),kr(()=>{if(!U)return;const e=e=>{const t=document.querySelector(`[data-sticky-id="${U.id}"]`);t&&(t.style.width=`${Math.max(140,U.origW+e.clientX-U.startX)}px`,t.style.height=`${Math.max(100,U.origH+e.clientY-U.startY)}px`)},t=e=>{const t=Math.max(140,U.origW+e.clientX-U.startX),r=Math.max(100,U.origH+e.clientY-U.startY);ge(p.map(e=>e.id===U.id?{...e,sticky_w:t,sticky_h:r}:e)),X(null)};return window.addEventListener("pointermove",e),window.addEventListener("pointerup",t),()=>{window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)}},[U,p]);const be={yellow:"bg-yellow-100 border-yellow-300",blue:"bg-blue-100 border-blue-300",green:"bg-green-100 border-green-300",pink:"bg-pink-100 border-pink-300",purple:"bg-purple-100 border-purple-300",orange:"bg-orange-100 border-orange-300"},ye=(e,t,r,n,a)=>/* @__PURE__ */Ar("div",{className:"flex flex-col items-center gap-1 w-20 p-2",children:[
|
|
111
111
|
/* @__PURE__ */Rr(_e,{entityType:e,isSelected:r,entityId:n,label:t,fileKind:a}),
|
|
112
112
|
/* @__PURE__ */Rr("span",{className:"text-2xs font-medium text-center leading-tight w-full drop-shadow-[0_1px_2px_rgba(0,0,0,0.8)] "+(r?"text-blue-200 bg-blue-600/60 rounded px-1":"text-white"),children:t})]}),xe=(e,t)=>({...e+180>window.innerWidth?{right:window.innerWidth-e}:{left:e},...t+250>window.innerHeight?{bottom:window.innerHeight-t}:{top:t}});/* @__PURE__ */
|
|
113
113
|
return Ar("div",{ref:l,className:"flex-1 relative overflow-hidden",onPointerDown:e=>{if(0!==e.button||e.target!==l.current)return;const t=l.current.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;M({startX:r,startY:n,endX:r,endY:n}),he.current=!1,E(/* @__PURE__ */new Set)},onContextMenu:e=>{e.preventDefault(),S({x:e.clientX,y:e.clientY})},onClick:()=>{he.current?he.current=!1:(E(/* @__PURE__ */new Set),S(null))},children:[(()=>{const e=Yn(),t=20+("right"===e.position?e.width:0),r=20+("bottom"===e.position?e.height:0),n=c.desktop_trash_position,a=n?.right??t,l=n?.bottom??r,i=_.has("trash");/* @__PURE__ */
|
|
@@ -132,9 +132,9 @@ return Ar("div",{"data-sticky-id":e.id,style:{position:"absolute",..."right"===o
|
|
|
132
132
|
/* @__PURE__ */Rr("circle",{cx:"10",cy:"6",r:"1.5"})]})})]},`sticky-${e.id}`)}),T&&/* @__PURE__ */Rr("div",{className:"absolute border border-blue-400 bg-blue-400/10 pointer-events-none",style:{left:Math.min(T.startX,T.endX),top:Math.min(T.startY,T.endY),width:Math.abs(T.endX-T.startX),height:Math.abs(T.endY-T.startY)}}),C&&null==C.itemIdx&&null==C.folderIdx&&/* @__PURE__ */Ar(Ft,{style:xe(C.x,C.y),children:[
|
|
133
133
|
/* @__PURE__ */Ar(Ot,{onClick:()=>{const e=l.current?.getBoundingClientRect(),t=C?C.x-(e?.left||0):100,r=C?C.y-(e?.top||0):100,n={id:`note-${Date.now()}-${Math.random().toString(36).slice(2,6)}`,title:"",content:"",color:"yellow",sticky:!0,sticky_x:t,sticky_y:r,updated_at:/* @__PURE__ */(new Date).toISOString()};ge([n,...p]),B(n.id),S(null)},children:[
|
|
134
134
|
/* @__PURE__ */Rr(ar,{name:"note",className:"h-4 w-4",strokeWidth:1.5}),"New Sticky Note"]}),
|
|
135
|
-
/* @__PURE__ */Ar(Ot,{onClick:()=>{const e=l.current?.getBoundingClientRect(),t=e?.width??0,r=C?C.x-(e?.left??0):t-100,n=C?C.y-(e?.top??0):100,a=Math.max(0,t-r-40),o=Math.max(0,n-20),i=`folder-${Date.now()}`;
|
|
135
|
+
/* @__PURE__ */Ar(Ot,{onClick:()=>{const e=l.current?.getBoundingClientRect(),t=e?.width??0,r=C?C.x-(e?.left??0):t-100,n=C?C.y-(e?.top??0):100,a=Math.max(0,t-r-40),o=Math.max(0,n-20),i=`folder-${Date.now()}`;Q([...m,{id:i,name:"New Folder",x:a,y:o}]),S(null),W(i),O("New Folder")},children:[
|
|
136
136
|
/* @__PURE__ */Rr(ar,{name:"folder",className:"h-4 w-4",strokeWidth:1.5}),"Create Folder"]}),
|
|
137
|
-
/* @__PURE__ */Ar(Ot,{onClick:()=>{const e=l.current?.getBoundingClientRect(),t=e?.height||600,r=Math.max(1,Math.floor(t/Kn));let n=0;const a=()=>{const e=Math.floor(n/r),t=n%r;return n++,{right:20+e*Kn,top:10+t*Kn}},o=m.map(e=>{const t=a();return{...e,x:t.right,y:t.top}});
|
|
137
|
+
/* @__PURE__ */Ar(Ot,{onClick:()=>{const e=l.current?.getBoundingClientRect(),t=e?.height||600,r=Math.max(1,Math.floor(t/Kn));let n=0;const a=()=>{const e=Math.floor(n/r),t=n%r;return n++,{right:20+e*Kn,top:10+t*Kn}},o=m.map(e=>{const t=a();return{...e,x:t.right,y:t.top}});Q(o);const i=d.map(e=>{if(e.folderId)return e;const t=a();return{...e,x:t.right,y:t.top}});q(i),S(null)},children:[
|
|
138
138
|
/* @__PURE__ */Rr(ar,{name:"grid",className:"h-4 w-4",strokeWidth:1.5}),"Snap to Grid"]}),
|
|
139
139
|
/* @__PURE__ */Ar(Ot,{onClick:()=>{S(null),A(!0)},children:[
|
|
140
140
|
/* @__PURE__ */Rr(ar,{name:"widgets",className:"h-4 w-4",strokeWidth:1.5}),"Manage Widgets"]}),!y.includes("perf-stats")&&/* @__PURE__ */Ar(Ot,{onClick:()=>{S(null),s({show_desktop_stats:!0!==c.show_desktop_stats})},children:[
|
|
@@ -151,7 +151,7 @@ return Ar("div",{"data-sticky-id":e.id,style:{position:"absolute",..."right"===o
|
|
|
151
151
|
/* @__PURE__ */Rr(Ot,{onClick:()=>{ae(m[C.folderIdx].id),S(null)},children:"Open"}),m[C.folderIdx].id!==Bn&&/* @__PURE__ */Ar(Wr,{children:[
|
|
152
152
|
/* @__PURE__ */Rr(Ot,{onClick:()=>{W(m[C.folderIdx].id),O(m[C.folderIdx].name),S(null)},children:"Rename"}),
|
|
153
153
|
/* @__PURE__ */Rr(Wt,{}),
|
|
154
|
-
/* @__PURE__ */Rr(Ot,{danger:!0,onClick:()=>(e=>{const t=m[e];if(t.id===Bn)return;const r=d.map(e=>e.folderId===t.id?{...e,folderId:void 0}:e);q(r),
|
|
154
|
+
/* @__PURE__ */Rr(Ot,{danger:!0,onClick:()=>(e=>{const t=m[e];if(t.id===Bn)return;const r=d.map(e=>e.folderId===t.id?{...e,folderId:void 0}:e);q(r),Q(m.filter((t,r)=>r!==e)),S(null)})(C.folderIdx),children:"Delete Folder"})]})]}),
|
|
155
155
|
/* @__PURE__ */Rr(dn,{open:D,onClose:()=>A(!1)}),L&&(()=>{const e=b.productVersion??Me;/* @__PURE__ */
|
|
156
156
|
return Rr(Re,{open:!0,onClose:()=>P(!1),title:`${n.about.aboutPrefix} ${b.productName??n.about.thisApp}`,size:"sm",bodyScroll:!1,compact:!0,dimensions:[340,420],children:/* @__PURE__ */Ar("div",{className:"flex flex-col items-center",children:[
|
|
157
157
|
/* @__PURE__ */Ar("div",{className:"flex flex-col items-center gap-2 pt-4 pb-3 w-full",children:[
|
|
@@ -176,8 +176,8 @@ return Rr(Re,{open:!0,onClose:()=>$(!1),title:n.about.whatsNew,size:"md",childre
|
|
|
176
176
|
/* @__PURE__ */Rr("span",{className:"text-xs text-gray-400",children:fr(t.date)})]}),
|
|
177
177
|
/* @__PURE__ */Rr("ul",{className:"space-y-2 ml-1",children:t.changes.map((e,t)=>/* @__PURE__ */Ar("li",{className:"flex items-start gap-2 text-sm text-gray-600",children:[
|
|
178
178
|
/* @__PURE__ */Rr("span",{className:"text-blue-500 mt-1 shrink-0",children:"•"}),
|
|
179
|
-
/* @__PURE__ */Rr(g,{className:"min-w-0 [&_p]:m-0",children:e})]},t))}),r<e.length-1&&/* @__PURE__ */Rr("div",{className:"border-b border-gray-200 mt-4"})]},t.version))})})})()]})}var qn=["shell-uploaded-wallpaper"];function
|
|
180
|
-
return Rr("div",{className:"fixed top-0 right-0 z-(--z-taskbar)",style:{left:e,height:Pt},children:/* @__PURE__ */Rr(d,{tabs:o,activeKey:l,idFor:ta,onActivate:
|
|
179
|
+
/* @__PURE__ */Rr(g,{className:"min-w-0 [&_p]:m-0",children:e})]},t))}),r<e.length-1&&/* @__PURE__ */Rr("div",{className:"border-b border-gray-200 mt-4"})]},t.version))})})})()]})}var qn=["shell-uploaded-wallpaper"];function Qn(e,t){const r=jr(),n=e=>e===o,a=(n(e)||n(t))&&Ve(),{data:l}=Or({queryKey:qn,enabled:a,queryFn:()=>c(),staleTime:3e5,retry:!1}),i=Cr(()=>{r.invalidateQueries({queryKey:qn})},[r]);return{url:l?.wallpaper_url??null,refresh:i}}function Jn(e){return"sidebar"===e.layout_mode?"sidebar":"classic"}function Zn(){const{prefs:e}=xt(),t=wt();return{layout:t?"sidebar":Jn(e),forced:t}}function ea(){const{prefs:e,save:t}=xt();return Cr(r=>{const n=Jn(e);t(function(e,t){const r={layout_mode:t};return"classic"===t&&"maximized"===e.default_window_size&&(r.default_window_size="large"),r}(e,r)),"classic"===r&&"classic"===n&&(je(),window.dispatchEvent(new CustomEvent("react-os-shell:restore-windowed")))},[e,t])}function ta(e,t){return`rosh-wtab-${t}-${e.replace(/[^A-Za-z0-9_-]/g,"_")}`}function ra(e,t){let r=e.route;if("page"!==e.type&&e.entityType){const t=De[e.entityType];r=t&&ot(t)?t.icon:void 0}return r?t[r]??void 0:void 0}var na=(e,t,r)=>at(e)?.menu?.open(t,r),aa=e=>at(e)?.menu?.items()??[];function oa(e,t){const{openWindows:r,remove:n}=$e(),a=Be();wr(tt,rt,rt);const o=_r(()=>{const t=r.filter(nt),n=e?t.find(t=>"page"===t.type&&t.route===e):void 0;return n?[n,...t.filter(e=>e!==n)]:t},[r,e]).map(r=>{const n=at(r.id),a=!!e&&"page"===r.type&&r.route===e;return{key:r.id,title:n?.title||r.label,icon:ra(r,t),pinned:a,dirty:n?.dirty??!1,copy:n?.copy}}),l=Cr((e,t)=>{const r=t?o.findIndex(e=>e.key===t):-1;o.filter((n,a)=>!n.pinned&&("all"===e||("others"===e?n.key!==t:a>r))).forEach(e=>n(e.key))},[o,n]);return{tabs:o,activeKey:a,remove:n,closeMany:l}}function la({left:e,navIcons:t,home:r,end:n}){const a=hr().layout,{tabs:o,activeKey:l,remove:i,closeMany:s}=oa(r,t);/* @__PURE__ */
|
|
180
|
+
return Rr("div",{className:"fixed top-0 right-0 z-(--z-taskbar)",style:{left:e,height:Pt},children:/* @__PURE__ */Rr(d,{tabs:o,activeKey:l,idFor:ta,onActivate:Qe,onClose:i,onCloseMany:s,label:a.openWindows,className:"relative flex h-full shrink-0 items-end gap-3 bg-gray-100 pl-3 pr-4",activeClassName:"z-[1] border-gray-200 bg-[rgb(var(--window-content-rgb))] text-gray-900",end:n,onIconMenu:na,menuItems:aa})})}function ia({onComplete:e,ready:t=!1,productName:r="efficient-shell",subtitle:n,logo:a="/favicon.svg",adaptiveLogo:o=!1,logoHasAlpha:l=null,logoIsLight:i=null}){const[s,c]=vr("logo"),[d,u]=vr(!1),m=Nr(e);m.current=e;const h=Nr(!1);return kr(()=>{const e=setTimeout(()=>c("text"),600),t=setTimeout(()=>u(!0),2e3),r=setTimeout(()=>{h.current||(h.current=!0,c("fade"),setTimeout(()=>m.current(),500))},5e3);return()=>{clearTimeout(e),clearTimeout(t),clearTimeout(r)}},[]),kr(()=>{if(!t||!d||h.current)return;h.current=!0,c("fade");const e=setTimeout(()=>m.current(),500);return()=>clearTimeout(e)},[t,d]),/* @__PURE__ */Ar("div",{"data-startup-animation":"",className:"fixed inset-0 z-(--z-overlay) flex flex-col items-center justify-center transition-opacity duration-500 "+("fade"===s?"opacity-0 pointer-events-none":"opacity-100"),style:{background:"linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%)"},children:[
|
|
181
181
|
/* @__PURE__ */Rr("div",{className:"absolute inset-0 overflow-hidden",children:/* @__PURE__ */Rr("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] rounded-full opacity-20",style:{background:"radial-gradient(circle, rgba(124,58,237,0.4) 0%, transparent 70%)",animation:"pulse-glow 2s ease-in-out infinite"}})}),
|
|
182
182
|
/* @__PURE__ */Rr("div",{className:"relative transition-all duration-700 ease-out "+("logo"===s?"scale-75 opacity-0":"scale-100 opacity-100"),children:/* @__PURE__ */Rr(he,{src:a,alt:"",slot:"compact",surface:"dark",size:80,adaptive:o,hasAlpha:l,isLight:i,decorative:!0,className:"drop-shadow-[0_0_30px_rgba(124,58,237,0.5)]",style:{animation:"spin-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards"}})}),
|
|
183
183
|
/* @__PURE__ */Ar("div",{className:"mt-6 text-center transition-all duration-500 "+("logo"!==s?"opacity-100 translate-y-0":"opacity-0 translate-y-4"),children:[
|
|
@@ -194,24 +194,24 @@ return Rr("span",{className:t,title:n?e.label:void 0,"data-menu-label":!0,onMous
|
|
|
194
194
|
return Ar("div",{ref:P,className:"fixed inset-0 z-(--z-sidebar) flex flex-col bg-white",style:{paddingBottom:"var(--mobile-bottom-nav, 56px)"},children:[
|
|
195
195
|
/* @__PURE__ */Ar("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-gray-200",children:[
|
|
196
196
|
/* @__PURE__ */Rr("button",{onClick:t,className:"p-2 -ml-1 rounded-full active:bg-gray-200 text-gray-700","aria-label":"Close menu",children:/* @__PURE__ */Rr(ar,{name:"close",className:"h-5 w-5",strokeWidth:2})}),
|
|
197
|
-
/* @__PURE__ */Ar("div",{className:`flex-1 flex items-center gap-2 ${
|
|
197
|
+
/* @__PURE__ */Ar("div",{className:`flex-1 flex items-center gap-2 ${Jt} rounded-lg px-3 py-2`,children:[
|
|
198
198
|
/* @__PURE__ */Rr(ar,{name:"search",className:`h-4 w-4 shrink-0 ${O}`,strokeWidth:2}),
|
|
199
199
|
/* @__PURE__ */Rr("input",{value:E,onChange:e=>T(e.target.value),placeholder:"Search apps...",className:"flex-1 bg-transparent text-sm outline-none placeholder-gray-400",autoFocus:!0})]})]}),
|
|
200
200
|
/* @__PURE__ */Rr("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:0===n.length?/* @__PURE__ */Rr("p",{className:"text-sm text-gray-400 text-center py-12",children:"No matching apps"}):n.map(({item:e,sectionLabel:t},r)=>{const n=h[e.to];/* @__PURE__ */
|
|
201
201
|
return Ar("button",{onClick:()=>A(e),"aria-label":ha(e),className:"w-full flex items-center gap-3 px-4 py-3 active:bg-gray-100 border-b border-gray-100 text-left",children:[
|
|
202
202
|
/* @__PURE__ */Rr("span",{className:"h-8 w-8 rounded-lg bg-gray-100 flex items-center justify-center text-gray-600 shrink-0",children:n&&Tr(n)?Mr(n,{className:"h-5 w-5"}):null}),
|
|
203
203
|
/* @__PURE__ */Ar("div",{className:"min-w-0 flex-1",children:[
|
|
204
|
-
/* @__PURE__ */Rr(pa,{entry:e,className:"block truncate text-sm font-medium text-gray-900"}),t&&/* @__PURE__ */Rr("div",{className:"text-2xs text-gray-500 truncate",children:t})]})]},`${e.to}-${r}`)})})]})}const R="bottom"!==l,W=m.filter(e=>!$t(e)).filter(e=>It(e,k)&&Dt(e,k)),F=m.filter(e=>$t(e)&&b.has(e.label)),j=m.filter(e=>$t(e)&&y.has(e.label)),z=m.filter(e=>$t(e)&&x.has(e.label)),B=W.length>0||j.length>0||w.length>0,H=0===j.length&&0===w.length&&!!W[W.length-1]?.dividerAfter,K=e=>e.items.filter(e=>It(e,k)),U=e=>At(e,k),X=e=>U(e).filter(e=>Dt(e,k)),V=(e,t)=>{if(!It(e,k))return[];if(!Dt(e,k))return[];const r=U(e),n=[];e.label.toLowerCase().includes(E.toLowerCase())&&n.push({...e,section:t});for(const t of r)n.push(...V(t,e.label));return n},Y=E.length>=2?[...m.flatMap(e=>{if($t(e)){const t=e;return t.items.flatMap(e=>V(e,t.label))}return V(e,"")}),...N.flatMap(e=>V(e,""))]:[],G="top"===l?{top:i+c,left:8}:"left"===l?{top:8,left:s+c}:"right"===l?{top:8,right:s+c}:{bottom:i+c,left:8},q=/* @__PURE__ */Rr("span",{"aria-hidden":"true","data-icon-slot":"",className:"h-4 w-4 shrink-0"}),
|
|
204
|
+
/* @__PURE__ */Rr(pa,{entry:e,className:"block truncate text-sm font-medium text-gray-900"}),t&&/* @__PURE__ */Rr("div",{className:"text-2xs text-gray-500 truncate",children:t})]})]},`${e.to}-${r}`)})})]})}const R="bottom"!==l,W=m.filter(e=>!$t(e)).filter(e=>It(e,k)&&Dt(e,k)),F=m.filter(e=>$t(e)&&b.has(e.label)),j=m.filter(e=>$t(e)&&y.has(e.label)),z=m.filter(e=>$t(e)&&x.has(e.label)),B=W.length>0||j.length>0||w.length>0,H=0===j.length&&0===w.length&&!!W[W.length-1]?.dividerAfter,K=e=>e.items.filter(e=>It(e,k)),U=e=>At(e,k),X=e=>U(e).filter(e=>Dt(e,k)),V=(e,t)=>{if(!It(e,k))return[];if(!Dt(e,k))return[];const r=U(e),n=[];e.label.toLowerCase().includes(E.toLowerCase())&&n.push({...e,section:t});for(const t of r)n.push(...V(t,e.label));return n},Y=E.length>=2?[...m.flatMap(e=>{if($t(e)){const t=e;return t.items.flatMap(e=>V(e,t.label))}return V(e,"")}),...N.flatMap(e=>V(e,""))]:[],G="top"===l?{top:i+c,left:8}:"left"===l?{top:8,left:s+c}:"right"===l?{top:8,right:s+c}:{bottom:i+c,left:8},q=/* @__PURE__ */Rr("span",{"aria-hidden":"true","data-icon-slot":"",className:"h-4 w-4 shrink-0"}),Q=e=>Tr(h[e]),J=[...W,...N].some(e=>Q(e.to))||[...F,...j,...z].some(e=>{return t=e.label,Tr(p[t]);var t})||w.some(e=>!!e.icon),Z=(e,t=J)=>{const r=h[e];return r&&Tr(r)?Mr(r,{className:"h-4 w-4 shrink-0"}):t?q:null},ee=e=>{const t=p[e];return t&&Tr(t)?Mr(t,{className:"h-4 w-4 shrink-0"}):J?q:null},te=S.length>0?S[0].key:null,re=te?v[te]:void 0,ae=re?null:te?[...F,...j,...z].find(e=>e.label===te):null,oe=(re?re.items:ae?K(ae):[]).filter(e=>Dt(e,k)),le="undefined"!=typeof document&&getComputedStyle(document.documentElement).getPropertyValue("--menu-density")?.trim()||"normal",ie="tight"===le||"large"===le?le:"normal",se={tight:{small:{w:"w-52",fw:"w-44",fwPx:176,text:"text-xs",py:"py-1",px:"px-3",mw:208,itemH:24},medium:{w:"w-56",fw:"w-48",fwPx:192,text:"text-xs",py:"py-1",px:"px-3",mw:224,itemH:26},large:{w:"w-64",fw:"w-52",fwPx:208,text:"text-sm",py:"h-(--control-height-md)",px:"px-3",mw:256,itemH:f.md}},normal:{small:{w:"w-56",fw:"w-48",fwPx:192,text:"text-xs",py:"h-(--control-height-md)",px:"px-3",mw:224,itemH:f.md},medium:{w:"w-64",fw:"w-56",fwPx:224,text:"text-sm",py:"h-(--row-height-menu)",px:"px-4",mw:256,itemH:u.menu},large:{w:"w-72",fw:"w-60",fwPx:240,text:"text-sm",py:"h-(--control-height-lg)",px:"px-4",mw:288,itemH:f.lg}},large:{small:{w:"w-56",fw:"w-48",fwPx:192,text:"text-xs",py:"py-2",px:"px-3",mw:224,itemH:32},medium:{w:"w-64",fw:"w-56",fwPx:224,text:"text-sm",py:"py-2",px:"px-4",mw:256,itemH:36},large:{w:"w-72",fw:"w-60",fwPx:240,text:"text-sm",py:"py-2",px:"px-4",mw:288,itemH:36}}}[ie][d],ce=Zt(),de=`w-full min-w-0 overflow-hidden whitespace-nowrap flex items-center gap-2 rounded-lg ${se.px} ${se.py} ${se.text}`,ue="min-w-0 flex-1 truncate text-left",me="undefined"!=typeof window?window.innerHeight:800,he="undefined"!=typeof window?window.innerWidth:1280,pe=("top"===l?i:0)+8,ge=me-("bottom"===l?i:0)-8,fe=Math.max(0,ge-pe),be=zt(oe,S,X),ye=()=>clearTimeout(I.current),xe=(e,t)=>{const r=t.closest("[data-menu-panel]");if(!r)return{left:0,flipped:!1};const n=0===e?r.getBoundingClientRect().left:S[e-1]?.left??0,a=0===e?r.getBoundingClientRect().right:n+r.offsetWidth,o=e>0&&(S[e-1]?.flipped??!1);return Gt(n,a,se.fwPx,he,4,o)},we=(e,t,r)=>{ye();const n=r.currentTarget,a=n.getBoundingClientRect(),o={key:t,y:a.top+a.height/2,...xe(e,n)};_(t=>Xt(t,e,o))},ve=e=>{ye(),I.current=setTimeout(()=>_(t=>Vt(t,e)),200)},ke=/* @__PURE__ */Rr(ar,{name:"chevron-right",className:"h-3.5 w-3.5 shrink-0 ml-auto",strokeWidth:2}),Ne=(e,t)=>{if(!It(e,k))return null;if(0===K(e).length)return null;const r=te===e.label;/* @__PURE__ */
|
|
205
205
|
return Ar("div",{onMouseEnter:t=>we(0,e.label,t),children:[
|
|
206
206
|
/* @__PURE__ */Ar("button",{"aria-label":ha(e),className:`${de} transition-colors ${r?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[ee(e.label),
|
|
207
207
|
/* @__PURE__ */Rr(pa,{entry:e,className:`${ue} ${t?"font-medium":""}`}),ke]}),e.dividerAfter&&/* @__PURE__ */Rr("div",{className:"border-t border-white/20 my-2 mx-2"})]},e.label)},Ce=e=>{if(0===e.items.length)return null;const t=te===e.label;/* @__PURE__ */
|
|
208
|
-
return Rr("div",{onMouseEnter:t=>we(0,e.label,t),children:/* @__PURE__ */Ar("button",{"aria-label":ha(e),className:`${de} transition-colors ${t?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[e.icon?/* @__PURE__ */Rr("span",{className:"shrink-0",children:e.icon}):
|
|
208
|
+
return Rr("div",{onMouseEnter:t=>we(0,e.label,t),children:/* @__PURE__ */Ar("button",{"aria-label":ha(e),className:`${de} transition-colors ${t?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[e.icon?/* @__PURE__ */Rr("span",{className:"shrink-0",children:e.icon}):J?q:null,
|
|
209
209
|
/* @__PURE__ */Rr(pa,{entry:e,className:ue}),ke]})},e.label)};
|
|
210
210
|
/* @__PURE__ */
|
|
211
211
|
return Ar("div",{ref:P,className:"fixed z-(--z-start-menu)",style:G,children:[
|
|
212
212
|
/* @__PURE__ */Ar("div",{className:"flex",children:[
|
|
213
213
|
/* @__PURE__ */Ar("div",{"data-menu-panel":!0,className:`${se.w} rounded-(--radius-popup) flex ${R?"flex-col-reverse":"flex-col"} overflow-hidden`,style:{animation:"menu-in 0.15s ease-out",...ce},onMouseEnter:()=>ve(0),onMouseLeave:()=>ve(0),children:[
|
|
214
|
-
/* @__PURE__ */Rr("div",{className:"px-3 "+(R?"pb-3 pt-2 border-t border-white/20":"pt-3 pb-2"),onMouseEnter:()=>ve(0),children:/* @__PURE__ */Ar("div",{className:`flex items-center gap-2 ${
|
|
214
|
+
/* @__PURE__ */Rr("div",{className:"px-3 "+(R?"pb-3 pt-2 border-t border-white/20":"pt-3 pb-2"),onMouseEnter:()=>ve(0),children:/* @__PURE__ */Ar("div",{className:`flex items-center gap-2 ${Jt} rounded-lg h-8 px-3`,children:[
|
|
215
215
|
/* @__PURE__ */Rr(ar,{name:"search",className:`h-3.5 w-3.5 shrink-0 ${O}`,strokeWidth:2}),
|
|
216
216
|
/* @__PURE__ */Rr("input",{value:E,onChange:e=>{T(e.target.value),_([]),L(0)},onKeyDown:e=>{E.length>=2&&Y.length>0&&("ArrowDown"===e.key?(e.preventDefault(),L(e=>Math.min(e+1,Y.length-1))):"ArrowUp"===e.key?(e.preventDefault(),L(e=>Math.max(e-1,0))):"Enter"===e.key&&(e.preventDefault(),A(Y[M])))},placeholder:"Search...",className:"flex-1 bg-transparent text-xs outline-none placeholder-gray-400",autoFocus:!0})]})}),E.length>=2?/* @__PURE__ */Rr("div",{className:"flex-1 overflow-y-auto overflow-x-hidden px-1 pb-2 max-h-[400px]",children:0===Y.length?/* @__PURE__ */Rr("p",{className:"text-xs text-gray-400 text-center py-4",children:"No results"}):Y.map((e,t)=>/* @__PURE__ */Ar("button",{onClick:()=>A(e),onMouseEnter:()=>L(t),"aria-label":ha(e),className:`${de} transition-colors ${t===M?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[Z(e.to),
|
|
217
217
|
/* @__PURE__ */Rr(pa,{entry:e,className:ue}),e.section&&/* @__PURE__ */Rr("span",{className:"max-w-[40%] shrink-0 truncate text-2xs text-gray-400 ml-auto",children:e.section})]},t))}):/* @__PURE__ */Ar("div",{className:"flex-1 overflow-y-auto overflow-x-hidden px-1 pb-1 flex flex-col",children:[R&&/* @__PURE__ */Ar(Wr,{children:[N.map(e=>/* @__PURE__ */Ar("button",{onClick:()=>A(e),onMouseEnter:()=>ve(0),"aria-label":ha(e),className:`${de} text-gray-700 hover:bg-blue-50 hover:text-blue-700 transition-colors`,children:[Z(e.to),
|
|
@@ -223,7 +223,7 @@ return Ar("div",{ref:P,className:"fixed z-(--z-start-menu)",style:G,children:[
|
|
|
223
223
|
/* @__PURE__ */Rr(pa,{entry:e,className:ue})]},e.to))]})]}),
|
|
224
224
|
/* @__PURE__ */Rr("div",{className:(R?"border-b":"border-t")+" border-white/20 p-1",onMouseEnter:()=>ve(0),children:/* @__PURE__ */Ar("div",{onClick:()=>D("/profile"),className:"rounded-lg h-8 px-2 flex items-center gap-3 hover:bg-blue-50 hover:text-blue-700 transition-colors cursor-pointer",children:[n?.avatar_url?/* @__PURE__ */Rr("img",{src:n.avatar_url,alt:"",className:"h-8 w-8 rounded-full object-cover border border-white/20 shrink-0"}):/* @__PURE__ */Rr("div",{className:"h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center text-sm font-bold text-blue-700 shrink-0",children:(n?.first_name?.charAt(0)||a?.email?.charAt(0)||"?").toUpperCase()}),
|
|
225
225
|
/* @__PURE__ */Rr("p",{className:"flex-1 min-w-0 text-sm font-medium text-gray-900 truncate",children:n?.first_name?`${n.first_name} ${n.last_name||""}`.trim():a?.email}),
|
|
226
|
-
/* @__PURE__ */Rr("button",{onClick:e=>{e.stopPropagation(),t(),o()},title:"Sign Out",className:"shrink-0 p-2 rounded-md text-gray-500 hover:text-red-600 hover:bg-red-50 transition-colors",children:/* @__PURE__ */Rr(ar,{name:"logout",className:"h-5 w-5",strokeWidth:1.5})})]})})]}),E.length<2&&be.map((e,t)=>/* @__PURE__ */Rr(ga,{left:S[t].left,anchorY:S[t].y,estHeight:e.length*se.itemH+12,minTop:pe,maxBottom:ge,flipped:S[t].flipped,className:se.fw,style:ce,onMouseEnter:()=>ve(t+1),onMouseLeave:()=>ve(t),children:/* @__PURE__ */Rr("div",{className:"py-1 px-1 overflow-y-auto overflow-x-hidden overscroll-contain",style:{maxHeight:fe},children:e.map((e,r,n)=>{const a=n.some(e=>
|
|
226
|
+
/* @__PURE__ */Rr("button",{onClick:e=>{e.stopPropagation(),t(),o()},title:"Sign Out",className:"shrink-0 p-2 rounded-md text-gray-500 hover:text-red-600 hover:bg-red-50 transition-colors",children:/* @__PURE__ */Rr(ar,{name:"logout",className:"h-5 w-5",strokeWidth:1.5})})]})})]}),E.length<2&&be.map((e,t)=>/* @__PURE__ */Rr(ga,{left:S[t].left,anchorY:S[t].y,estHeight:e.length*se.itemH+12,minTop:pe,maxBottom:ge,flipped:S[t].flipped,className:se.fw,style:ce,onMouseEnter:()=>ve(t+1),onMouseLeave:()=>ve(t),children:/* @__PURE__ */Rr("div",{className:"py-1 px-1 overflow-y-auto overflow-x-hidden overscroll-contain",style:{maxHeight:fe},children:e.map((e,r,n)=>{const a=n.some(e=>Q(e.to)),o=X(e),l=S[t+1]?.key===e.to;/* @__PURE__ */
|
|
227
227
|
return Ar("div",{onMouseEnter:o.length>0?r=>we(t+1,e.to,r):()=>ve(t+1),children:[
|
|
228
228
|
/* @__PURE__ */Ar("button",{onClick:o.length>0?r=>we(t+1,e.to,r):()=>A(e),"aria-label":ha(e),className:`${de} transition-colors ${l?"bg-blue-50 text-blue-700":"text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,children:[Z(e.to,a),
|
|
229
229
|
/* @__PURE__ */Rr(pa,{entry:e,className:ue}),o.length>0&&ke]}),e.dividerAfter&&/* @__PURE__ */Rr("div",{className:"border-t border-white/20 my-2 mx-2"})]},e.to)})})},`${t}:${S[t].key}`))]}),
|
|
@@ -244,7 +244,7 @@ return Ar(Wr,{children:[a&&/* @__PURE__ */Ar("div",{"data-phone-app-banner":!0,c
|
|
|
244
244
|
/* @__PURE__ */Rr("div",{className:"mx-auto mb-3 h-1 w-9 rounded-full bg-gray-300","aria-hidden":"true"}),
|
|
245
245
|
/* @__PURE__ */Rr("h2",{className:"mb-2 px-2 text-sm font-semibold text-gray-900",children:o.layout.openTabs}),
|
|
246
246
|
/* @__PURE__ */Rr("ul",{className:"space-y-0.5",children:l.map(e=>/* @__PURE__ */Ar("li",{className:"flex items-center gap-1 rounded-md "+(e.key===i?"bg-gray-100":""),children:[
|
|
247
|
-
/* @__PURE__ */Ar("button",{type:"button","aria-current":e.key===i?"page":void 0,onClick:()=>{
|
|
247
|
+
/* @__PURE__ */Ar("button",{type:"button","aria-current":e.key===i?"page":void 0,onClick:()=>{Qe(e.key),h(!1)},className:"flex h-(--row-height-menu) min-w-0 flex-1 items-center gap-3 px-2 text-left text-sm text-gray-800",children:[e.icon&&/* @__PURE__ */Rr("span",{className:"flex size-4 shrink-0 items-center justify-center [&>svg]:size-4","aria-hidden":"true",children:e.icon}),
|
|
248
248
|
/* @__PURE__ */Rr("span",{className:"min-w-0 truncate",children:e.title}),e.dirty&&/* @__PURE__ */Rr("span",{className:"size-2 shrink-0 rounded-full bg-amber-500",role:"img","aria-label":o.pageTabs.unsaved})]}),!e.pinned&&/* @__PURE__ */Rr(be,{size:"sm",onClick:()=>s(e.key),"aria-label":o.pageTabs.closeTab?.(e.title)??`${o.pageTabs.close} ${e.title}`,children:/* @__PURE__ */Rr(ar,{name:"close",className:"size-4",strokeWidth:1.5,"aria-hidden":"true"})})]},e.key))}),l.some(e=>!e.pinned)&&/* @__PURE__ */Rr("button",{type:"button",onClick:()=>{c("all",null),h(!1)},className:"mt-3 w-full rounded-md py-2 text-center text-xs font-medium text-gray-500 hover:bg-gray-100",children:o.pageTabs.closeAll})]})]})]})}var xa=xr(()=>import("./Sidebar-TAEAB6AF.js"));function wa(){const e=wr(r,n,n),{openPage:t}=$e();if(!(e.running||e.remaining<e.total&&e.remaining>0))return null;const a=String(Math.floor(e.remaining/60)).padStart(2,"0"),o=String(e.remaining%60).padStart(2,"0"),l="focus"===e.mode?"bg-blue-500":"short"===e.mode?"bg-emerald-500":"bg-emerald-600",i="focus"===e.mode?"Focus":"short"===e.mode?"Short break":"Long break";/* @__PURE__ */
|
|
249
249
|
return Ar("button",{onClick:()=>t("/pomodoro"),title:`${i} · ${a}:${o}${e.running?"":" (paused)"}`,className:"shrink-0 flex items-center gap-2 rounded-md px-2 py-1 text-2xs font-mono font-semibold tabular-nums hover:bg-gray-200/50 transition-colors "+(e.running?"text-gray-800":"text-gray-400"),children:[
|
|
250
250
|
/* @__PURE__ */Rr("span",{className:`block w-1.5 h-1.5 rounded-full ${l} ${e.running?"animate-pulse":"opacity-60"}`}),a,":",o]})}function va({clockCalendar:e}){const[t,r]=vr(/* @__PURE__ */new Date),[n,a]=vr(!1),o=Nr(null),l=Nr(null),{openPage:i}=$e();return kr(()=>{const e=setInterval(()=>r(/* @__PURE__ */new Date),1e4);return()=>clearInterval(e)},[]),k(o,Cr(()=>{n&&a(!1)},[n])),/* @__PURE__ */Ar("div",{ref:o,className:"relative shrink-0",children:[
|
|
@@ -274,17 +274,17 @@ return Rr("button",{onClick:()=>o(e),title:t,onContextMenu:r=>{r.preventDefault(
|
|
|
274
274
|
/* @__PURE__ */Ar(Ot,{onClick:()=>{s(null),o(i.path)},children:[(()=>{const e=a[i.path];return e&&Tr(e)?Mr(e,{className:"h-4 w-4 text-gray-400"}):/* @__PURE__ */Rr("span",{className:"w-4"})})(),"Open ",i.label]}),
|
|
275
275
|
/* @__PURE__ */Rr(Wt,{}),
|
|
276
276
|
/* @__PURE__ */Ar(Ot,{danger:!0,onClick:()=>{s(null),l(i.path)},children:[
|
|
277
|
-
/* @__PURE__ */Rr(ar,{name:"star",className:"h-4 w-4",strokeWidth:1.5}),"Remove from Favorites"]})]})]});var d,u}function _a({branding:e,productName:t="efficient-shell",productIcon:r="/favicon.svg",wallpapers:n,navSections:o=Ct,navIcons:l=St,sectionIcons:i=_t,categories:s=Nt,notifications:c,search:d,taskbarTrayLeft:u,clockCalendar:m,mobileApp:h,contextMenu:p=!0,home:g}={}){const f=e?.productName??t,y=e?.logo??r,x=e?.tagline,w=e?.adaptiveLogo??!1,v=e?.logoHasAlpha??null,k=e?.logoIsLight??null,N=Vn(),{user:C,logout:S,hasAnyPerm:_}=ne(),{openPage:E,openEntity:T,openWindows:M,remove:L}=$e(),P=hr().layout,[I,$]=vr(!1),D=wt(),A=C||{};b();const{favorites:R,toggle:W,desktopBg:F}=function(e){const{prefs:t,save:r}=xt(),n=t.favorite_pages||[],a=Cr(e=>{const t=n.includes(e)?n.filter(t=>t!==e):[...n,e];r({favorite_pages:t})},[n,r]),o=e&&e.length>0?e:[],l=Nr(o.length>0?o[Math.floor(Math.random()*o.length)]:"none"),i=t.desktop_bg||(o.length>0?"random":"none"),s="random"===i?l.current:i,c=Cr(e=>{r({desktop_bg:e})},[r]);return{favorites:n,toggle:a,isFavorite:e=>n.includes(e),desktopBg:s,setDesktopBg:c}}(n??N.wallpapers?.map(e=>e.src)),{url:j}=
|
|
277
|
+
/* @__PURE__ */Rr(ar,{name:"star",className:"h-4 w-4",strokeWidth:1.5}),"Remove from Favorites"]})]})]});var d,u}function _a({branding:e,productName:t="efficient-shell",productIcon:r="/favicon.svg",wallpapers:n,navSections:o=Ct,navIcons:l=St,sectionIcons:i=_t,categories:s=Nt,notifications:c,search:d,taskbarTrayLeft:u,clockCalendar:m,mobileApp:h,contextMenu:p=!0,home:g}={}){const f=e?.productName??t,y=e?.logo??r,x=e?.tagline,w=e?.adaptiveLogo??!1,v=e?.logoHasAlpha??null,k=e?.logoIsLight??null,N=Vn(),{user:C,logout:S,hasAnyPerm:_}=ne(),{openPage:E,openEntity:T,openWindows:M,remove:L}=$e(),P=hr().layout,[I,$]=vr(!1),D=wt(),A=C||{};b();const{favorites:R,toggle:W,desktopBg:F}=function(e){const{prefs:t,save:r}=xt(),n=t.favorite_pages||[],a=Cr(e=>{const t=n.includes(e)?n.filter(t=>t!==e):[...n,e];r({favorite_pages:t})},[n,r]),o=e&&e.length>0?e:[],l=Nr(o.length>0?o[Math.floor(Math.random()*o.length)]:"none"),i=t.desktop_bg||(o.length>0?"random":"none"),s="random"===i?l.current:i,c=Cr(e=>{r({desktop_bg:e})},[r]);return{favorites:n,toggle:a,isFavorite:e=>n.includes(e),desktopBg:s,setDesktopBg:c}}(n??N.wallpapers?.map(e=>e.src)),{url:j}=Qn(F),{prefs:O,save:z}=xt(),B=vt(),H=D?"sidebar":Jn(O),K="sidebar"===H,[U,V]=nr(()=>"true"===ae(ba),!1),Y=B&&!!h?.url&&!U,G=ea(),[q,Q]=nr(()=>oe(ae(le),window.innerWidth),!1),J=Cr(()=>{Q(e=>(ie(le,String(!e)),!e))},[Q]),Z=K&&!B?q?Et:Tt:0,ee=O.taskbar_position||"bottom",te=K?"top":ee,re=O.taskbar_size||"medium",be=O.desktop_dblclick||"deactivate",ye="left"===te||"right"===te,xe=K?Pt+(Y?36:0):ye?0:"small"===re?42:"large"===re?72:56,we=ye?"small"===re?180:"large"===re?260:220:0,ve="small"===re?2:"large"===re?6:4,ke="small"===re?"h-[42px]":"large"===re?"h-[72px]":"h-14",Ne="small"===re?"w-[180px]":"large"===re?"w-[260px]":"w-[220px]",Ce=!!O.reduce_transparency,Se=Ce?1:(O.transparency_taskbar??70)/100,_e=(O.transparency_start_menu??95)/100,Ee=(O.transparency_inactive_header??70)/100,Te=(O.transparency_inactive_content??80)/100,Me=(O.transparency_active_header??80)/100,Le=(O.transparency_active_content??90)/100;kr(()=>{const e=document.documentElement;e.classList.toggle("rosh-reduce-transparency",Ce),e.style.setProperty("--inactive-header-opacity",String(Ee)),e.style.setProperty("--inactive-content-opacity",String(Te)),e.style.setProperty("--active-header-opacity",String(Me)),e.style.setProperty("--active-content-opacity",String(Le)),e.style.setProperty("--menu-opacity",String(_e)),e.style.setProperty("--taskbar-height",`${xe}px`),e.style.setProperty("--taskbar-width",`${we}px`),e.style.setProperty("--taskbar-position",te),e.style.setProperty("--sidebar-width",`${Z}px`),e.style.setProperty("--layout-mode",H),"sidebar"===qe.current&&"classic"===H&&je(),qe.current=H,window.dispatchEvent(new CustomEvent("react-os-shell:layout-mode-changed")),window.dispatchEvent(new CustomEvent(Mt)),e.style.setProperty("--default-window-size",O.default_window_size||"large"),e.style.setProperty("--window-position",O.window_position||"cascade"),e.style.setProperty("--menu-density",O.menu_density||"normal");const t={small:{font:"12px",px:"0.75rem",py:"0.25rem",tabW:"150px",tabFont:"11px"},medium:{font:"14px",px:"1rem",py:"0.5rem",tabW:"200px",tabFont:"12px"},large:{font:"15px",px:"1.125rem",py:"0.625rem",tabW:"240px",tabFont:"13px"}},r=t[O.start_menu_size||"medium"]||t.medium;e.style.setProperty("--menu-font-size",r.font),e.style.setProperty("--menu-padding-x",r.px),e.style.setProperty("--menu-padding-y",r.py),e.style.setProperty("--window-tab-width",r.tabW),e.style.setProperty("--window-tab-font-size",r.tabFont)},[Ce,Ee,Te,Me,Le,xe,we,te,O.default_window_size,O.window_position,O.menu_density,O.start_menu_size,Z,H]);const Pe=_r(()=>{if(!g)return null;const e=De[g];if(!e||!Ae(e))return null;const t=e;return t.widget||t.utility?null:g},[g]),Ie=K?Pe:null;kr(()=>{ze(Ie)},[Ie]),kr(()=>()=>ze(null),[]);const Re=!!Ie&&M.some(e=>"page"===e.type&&e.route===Ie);kr(()=>{Ie&&!Re&&E(Ie,{background:!0,shellOwned:!0})},[Ie,Re,E]),kr(()=>{K||M.filter(e=>e.shellOwned).forEach(e=>L(e.id))},[K,M,L]);const We=Be(),Fe=K?M.find(e=>e.id===We)?.route??null:null,Oe=_r(()=>K?se(ce(o,s,_),_,P.pageResult):null,[K,o,s,_,P.pageResult]),He=_r(()=>Oe?[Oe,...d?.providers??[]]:d?.providers,[Oe,d?.providers]),Ke=_r(()=>de(O.search_recent),[O.search_recent]),Ue=_r(()=>ue(O.favorite_documents,P.pageResult),[O.favorite_documents,P.pageResult]),Xe=Cr(e=>z({search_recent:me(Ke,e)}),[Ke,z]),Ve="__react-os-shell:switch-to-sidebar",Ye=_r(()=>({...s,footerItems:[...s.footerItems??[],{to:Ve,label:P.switchToSidebar,onSelect:()=>G("sidebar")}]}),[s,P.switchToSidebar,G]),Ge=_r(()=>({...l,[Ve]:/* @__PURE__ */Rr(ar,{name:"layout",className:"h-4 w-4",strokeWidth:1.5})}),[l]);kr(()=>{document.documentElement.style.setProperty("--mobile-bottom-nav","0px")},[]);const qe=Nr(H),[Qe,Je]=vr(!1),[Ze,et]=vr(!!document.fullscreenElement),[tt,rt]=vr(null),[nt,at]=vr(!1),ot=Cr((e,t)=>{z({[e]:t})},[z]),lt=Cr(async()=>{if(document.fullscreenElement)navigator.keyboard?.unlock&&navigator.keyboard.unlock(),document.exitFullscreen();else if(await document.documentElement.requestFullscreen(),navigator.keyboard?.lock)try{await navigator.keyboard.lock(["Escape"])}catch{}},[]);kr(()=>{const e=()=>{et(!!document.fullscreenElement),!document.fullscreenElement&&navigator.keyboard?.unlock&&navigator.keyboard.unlock()};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]);const it=Nr(!1);kr(()=>{if(!it.current&&O.auto_fullscreen&&!document.fullscreenElement){it.current=!0;const e=async()=>{if(!document.fullscreenElement)try{await document.documentElement.requestFullscreen(),navigator.keyboard?.lock&&navigator.keyboard.lock(["Escape"]).catch(()=>{})}catch{}document.removeEventListener("click",e)};document.addEventListener("click",e,{once:!0})}},[O.auto_fullscreen]);const[st,ct]=vr(!1),dt=Nr(!1);kr(()=>{if(dt.current)return;dt.current=!0;const e="erp_startup_shown";sessionStorage.getItem(e)||(sessionStorage.setItem(e,"1"),ct(!0))},[]);const ut=Nr(!1);kr(()=>{!ut.current&&st&&(ut.current=!0,setTimeout(()=>X(),500))},[st]),kr(()=>{const e=e=>{if((e.ctrlKey||e.metaKey)&&"."===e.key&&(e.preventDefault(),K&&!B?J():$(e=>!e)),e.ctrlKey&&"F11"===e.key&&(e.preventDefault(),lt()),"Escape"===e.key&&document.fullscreenElement){document.querySelectorAll("[data-modal-panel]").length>0||(e.preventDefault(),lt())}};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[lt,K,B,J]);const mt=Cr(async()=>{const{confirm:e}=await(import("./ConfirmDialog-VQWA4FJP.js"));await e({title:P.signOutTitle,message:P.signOutMessage,confirmLabel:P.signOut,variant:"warning"})&&at(!0)},[P]),ht=/* @__PURE__ */Ar(Wr,{children:[
|
|
278
278
|
/* @__PURE__ */Rr(wa,{}),u,c&&/* @__PURE__ */Rr(rn,{...c}),
|
|
279
279
|
/* @__PURE__ */Rr(va,{clockCalendar:m})]});/* @__PURE__ */
|
|
280
280
|
return Ar("div",{className:"flex flex-col h-screen",children:[
|
|
281
281
|
/* @__PURE__ */Rr(da,{}),st&&/* @__PURE__ */Rr(ia,{onComplete:()=>ct(!1),ready:!!A,productName:f,logo:y,subtitle:x,adaptiveLogo:w,logoHasAlpha:v,logoIsLight:k}),nt&&/* @__PURE__ */Rr(sa,{onComplete:()=>{sessionStorage.removeItem("erp_startup_shown"),S()},logo:y,subtitle:x,adaptiveLogo:w,logoHasAlpha:v,logoIsLight:k}),!K&&/* @__PURE__ */Rr(fa,{open:I,onClose:()=>$(!1),openPage:e=>{E(e),$(!1)},openWindows:M,profile:A,user:C,onLogout:()=>at(!0),onNavigate:e=>{E(e),$(!1)},taskbarPosition:te,taskbarH:xe,taskbarW:we,taskbarGap:ve,size:O.start_menu_size||"medium",navSections:o,navIcons:Ge,sectionIcons:i,categories:Ye}),K&&!B&&/* @__PURE__ */Ar(Wr,{children:[
|
|
282
|
-
/* @__PURE__ */Rr(Lr,{fallback:null,children:/* @__PURE__ */Rr(xa,{width:Z,collapsed:q,onToggleCollapsed:
|
|
282
|
+
/* @__PURE__ */Rr(Lr,{fallback:null,children:/* @__PURE__ */Rr(xa,{width:Z,collapsed:q,onToggleCollapsed:J,onOpen:(e,t)=>E(e,t?void 0:{reuse:!0}),activeRoute:Fe,profile:A,user:C,onLogout:()=>{mt()},onSwitchToDesktop:D?void 0:()=>G("classic"),onReportBug:N.onReportBug,navSections:o,navIcons:l,sectionIcons:i,categories:s,productName:f,productIcon:y,tagline:x,adaptiveLogo:w,logoHasAlpha:v,logoIsLight:k})}),
|
|
283
283
|
/* @__PURE__ */Rr(la,{left:Z,navIcons:l,home:Ie,end:/* @__PURE__ */Rr("div",{className:"flex items-center gap-2",children:ht})})]}),K&&B&&/* @__PURE__ */Rr(ya,{home:Ie,navIcons:l,end:c?/* @__PURE__ */Rr(rn,{...c}):void 0,banner:Y&&h?.url?{text:h.heading??P.getTheApp(f),href:h.url,cta:h.ctaLabel??P.openApp,onDismiss:()=>{ie(ba,"true"),V(!0)}}:null,renderMenu:e=>/* @__PURE__ */Rr(Lr,{fallback:null,children:/* @__PURE__ */Rr(xa,{width:Math.min(300,Math.round(.85*window.innerWidth)),collapsed:!1,onToggleCollapsed:e,onClose:e,onOpen:(t,r)=>{E(t,r?void 0:{reuse:!0}),e()},activeRoute:Fe,profile:A,user:C,onLogout:()=>{e(),mt()},onReportBug:N.onReportBug?()=>{e(),N.onReportBug?.()}:void 0,navSections:o,navIcons:l,sectionIcons:i,categories:s,productName:f,productIcon:y,tagline:x,adaptiveLogo:w,logoHasAlpha:v,logoIsLight:k})})}),(()=>{const e=K?"none":F,t=a(e,j),r={backgroundColor:e?.startsWith("#")?e:"none"===e?(()=>{const e=getComputedStyle(document.documentElement).getPropertyValue("--custom-bg-color")?.trim();if(e)return e;return{light:"#f3f4f6",dark:"#1e1e2e",pink:"#fdf2f8",green:"#f0fdf4",grey:"#d1d5db",blue:"#eff6ff"}[document.documentElement.getAttribute("data-theme")||"light"]||"#f3f4f6"})():"#1a1a2e",backgroundImage:t?`url(${t})`:"none",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"};/* @__PURE__ */
|
|
284
284
|
return Ar(Wr,{children:[
|
|
285
285
|
/* @__PURE__ */Rr("div",{className:"flex flex-1 min-h-0",style:K?{paddingLeft:Z,paddingTop:xe}:void 0,children:/* @__PURE__ */Rr("main",{className:"flex-1 flex flex-col overflow-hidden cursor-default",onDoubleClick:()=>{"deactivate"===be&&($(!1),window.dispatchEvent(new CustomEvent("deactivate-all-modals")))},style:r,children:/* @__PURE__ */Rr(Gn,{profile:A})})}),!K&&/* @__PURE__ */Ar("div",{className:"flex backdrop-blur-sm border-gray-200 z-(--z-taskbar) fixed "+(ye?`flex-col items-center ${Ne} py-3 gap-2 top-0 bottom-0 ${"left"===te?"left-0 border-r":"right-0 border-l"}`:`items-center ${ke} px-3 gap-2 right-0 ${"top"===te?"top-0 border-b":"bottom-0 border-t"}`),style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${Se})`,...ye?{}:{left:0}},"data-taskbar-dropzone":!0,onContextMenu:e=>{e.preventDefault(),rt({x:e.clientX,y:e.clientY})},children:[
|
|
286
|
-
/* @__PURE__ */Ar("div",{className:"relative shrink-0",children:[0===M.length&&!I&&!
|
|
287
|
-
/* @__PURE__ */Rr("button",{onClick:e=>{e.stopPropagation(),
|
|
286
|
+
/* @__PURE__ */Ar("div",{className:"relative shrink-0",children:[0===M.length&&!I&&!Qe&&/* @__PURE__ */Ar("div",{className:"absolute left-1/2 -translate-x-1/2 whitespace-nowrap text-white text-2xs font-medium pl-3 pr-2 py-1 rounded-full shadow-lg animate-bounce flex items-center gap-1 "+("top"===te?"top-full mt-2":"-top-8"),style:{backgroundColor:"var(--accent-600, #7c3aed)"},children:["Click here to start",
|
|
287
|
+
/* @__PURE__ */Rr("button",{onClick:e=>{e.stopPropagation(),Je(!0)},className:"text-white/60 hover:text-white ml-2",children:/* @__PURE__ */Rr(ar,{name:"close",className:"h-3 w-3",strokeWidth:2.5})}),
|
|
288
288
|
/* @__PURE__ */Rr("div",{className:"absolute left-1/2 -translate-x-1/2 border-[6px] border-transparent "+("top"===te?"bottom-full border-b-[var(--accent-color,#7c3aed)]":"top-full border-t-[var(--accent-color,#7c3aed)]"),style:"top"===te?{borderBottomColor:"var(--accent-600, #7c3aed)"}:{borderTopColor:"var(--accent-600, #7c3aed)"}})]}),
|
|
289
289
|
/* @__PURE__ */Ar("button",{"data-menu-toggle":!0,onClick:()=>$(e=>!e),title:I?"Close menu":"Open menu",className:`group/erp relative flex items-center justify-center gap-2 rounded-lg px-4 h-8 text-xs font-medium border overflow-hidden transition-all ${ye?"w-full":"min-w-[140px]"} ${I?"bg-gray-200/40 border-gray-300/40 text-gray-800":"bg-gray-50/40 border-gray-200/40 text-gray-600 hover:text-gray-800"}`,style:{transition:"box-shadow 0.3s, border-color 0.3s"},onMouseMove:e=>{const t=e.currentTarget.getBoundingClientRect();e.currentTarget.style.setProperty("--mx",e.clientX-t.left+"px"),e.currentTarget.style.setProperty("--my",e.clientY-t.top+"px")},onMouseEnter:e=>{e.currentTarget.style.boxShadow="0 0 15px rgba(255,255,255,0.2), 0 0 30px rgba(255,255,255,0.1)",e.currentTarget.style.borderColor="rgba(255,255,255,0.4)"},onMouseLeave:e=>{e.currentTarget.style.boxShadow="",e.currentTarget.style.borderColor=""},children:[
|
|
290
290
|
/* @__PURE__ */Rr("span",{className:"absolute inset-0 opacity-0 group-hover/erp:opacity-100 transition-opacity duration-200 pointer-events-none",style:{background:"radial-gradient(circle 60px at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.25) 0%, transparent 100%)"}}),y&&/* @__PURE__ */Rr(he,{src:y,alt:"",slot:"compact",surface:"light",adaptive:w,hasAlpha:v,isLight:k,size:14,decorative:!0,className:"relative z-10 opacity-60"}),
|
|
@@ -301,7 +301,7 @@ return Ar(Wr,{children:[
|
|
|
301
301
|
/* @__PURE__ */Rr(tn,{disabled:!p})]})}function Ea({children:e}){/* @__PURE__ */
|
|
302
302
|
return Ar("p",{"data-desktop-only-note":!0,className:"flex items-start gap-2 rounded-lg bg-gray-50 px-3 py-2 text-xs text-gray-500",children:[
|
|
303
303
|
/* @__PURE__ */Rr(ar,{name:"info",className:"h-4 w-4 shrink-0"}),
|
|
304
|
-
/* @__PURE__ */Rr("span",{children:e})]})}function Ta(e){return`New window position, default window size and double-clicking the desktop belong to the ${e.desktop} layout. In the ${e.sidebar} layout every window opens full-size.`}var Ma=[{key:"system",label:"System",bar1:"bg-[#e5e7eb]",bar2:"bg-[#e5e7eb]"},{key:"light",label:"Light",bar1:"bg-[#e5e7eb]",bar2:"bg-[#e5e7eb]"},{key:"dark",label:"Dark",bar1:"bg-[#45475a]",bar2:"bg-[#45475a]"},{key:"pink",label:"Blossom",bar1:"bg-[#fbcfe8]",bar2:"bg-[#fbcfe8]"},{key:"green",label:"Nature",bar1:"bg-[#bbf7d0]",bar2:"bg-[#bbf7d0]"},{key:"grey",label:"Quicksilver",bar1:"bg-[#d1d5db]",bar2:"bg-[#d1d5db]"},{key:"blue",label:"Ocean",bar1:"bg-[#bfdbfe]",bar2:"bg-[#bfdbfe]"}],La=["add","edit","trash","search","download","settings","bell","warning"],Pa=["search","bell","trash"],Ia={square:0,soft:4,round:10},$a=[{value:"",label:"Match theme"},{value:"square",label:"Square"},{value:"soft",label:"Soft"},{value:"round",label:"Round"}],Da=[];function Aa(){const e=/* @__PURE__ */new Date;return`v${String(e.getDate()).padStart(2,"0")}${String(e.getMonth()+1).padStart(2,"0")}.${String(e.getHours()).padStart(2,"0")}.${String(e.getMinutes()).padStart(2,"0")}.${e.getFullYear()}`}function Ra(e,t,r,n,a,o,l){return"dark"===e?r:"pink"===e?n:"green"===e?a:"grey"===e?o??t:"blue"===e?l??t:t}function Wa({omit:e,section:t}={}){const r=new Set(e??[]),n=e=>void 0===t||t===e,c=Vn(),d=c.wallpapers&&c.wallpapers.length>0?c.wallpapers:Da,{prefs:u,save:m}=xt(),[h,p]=vr({}),g=e=>e in h?h[e]:u[e];kr(()=>{p(e=>{const t={};let r=!1;for(const n of Object.keys(e))u[n]===e[n]?r=!0:t[n]=e[n];return r?t:e})},[u]);const f=["theme","accent_color","custom_bg_color","custom_title_color","custom_window_color","custom_button_color","corners","icon_set"],b=e=>{const t={...e};for(const e of f)e in t||(t[e]=g(e));L(t),p(t=>({...t,...e})),m(e)};wr(or,lr,lr),kr(()=>{xe.forEach(e=>{we(e.name)})},[]);const k=new Set(xe.map(e=>e.name)),N=[...ir().filter(e=>!k.has(e.name)),...xe],C=e=>ve[e]??null,S=e=>{return"custom"===e?"Any icons":C(e)?(t=C(e))&&N.find(e=>e.name===t)?.label||"":"System";var t},_=g("theme")||"system",E=y(_),T=u.desktop_bg||(d.length>0?"random":"none"),M=Nr(d.length>0?d[Math.floor(Math.random()*d.length)].src:"none"),P="random"===T?M.current:T,I=u.desktop_bg_custom||"",$=P?.startsWith("#"),D=/* @__PURE__ */new Set([...d.map(e=>e.src),"random"]),A=!$&&"none"!==P&&"random"!==T&&P&&!D.has(P),{url:R,refresh:W}=
|
|
304
|
+
/* @__PURE__ */Rr("span",{children:e})]})}function Ta(e){return`New window position, default window size and double-clicking the desktop belong to the ${e.desktop} layout. In the ${e.sidebar} layout every window opens full-size.`}var Ma=[{key:"system",label:"System",bar1:"bg-[#e5e7eb]",bar2:"bg-[#e5e7eb]"},{key:"light",label:"Light",bar1:"bg-[#e5e7eb]",bar2:"bg-[#e5e7eb]"},{key:"dark",label:"Dark",bar1:"bg-[#45475a]",bar2:"bg-[#45475a]"},{key:"pink",label:"Blossom",bar1:"bg-[#fbcfe8]",bar2:"bg-[#fbcfe8]"},{key:"green",label:"Nature",bar1:"bg-[#bbf7d0]",bar2:"bg-[#bbf7d0]"},{key:"grey",label:"Quicksilver",bar1:"bg-[#d1d5db]",bar2:"bg-[#d1d5db]"},{key:"blue",label:"Ocean",bar1:"bg-[#bfdbfe]",bar2:"bg-[#bfdbfe]"}],La=["add","edit","trash","search","download","settings","bell","warning"],Pa=["search","bell","trash"],Ia={square:0,soft:4,round:10},$a=[{value:"",label:"Match theme"},{value:"square",label:"Square"},{value:"soft",label:"Soft"},{value:"round",label:"Round"}],Da=[];function Aa(){const e=/* @__PURE__ */new Date;return`v${String(e.getDate()).padStart(2,"0")}${String(e.getMonth()+1).padStart(2,"0")}.${String(e.getHours()).padStart(2,"0")}.${String(e.getMinutes()).padStart(2,"0")}.${e.getFullYear()}`}function Ra(e,t,r,n,a,o,l){return"dark"===e?r:"pink"===e?n:"green"===e?a:"grey"===e?o??t:"blue"===e?l??t:t}function Wa({omit:e,section:t}={}){const r=new Set(e??[]),n=e=>void 0===t||t===e,c=Vn(),d=c.wallpapers&&c.wallpapers.length>0?c.wallpapers:Da,{prefs:u,save:m}=xt(),[h,p]=vr({}),g=e=>e in h?h[e]:u[e];kr(()=>{p(e=>{const t={};let r=!1;for(const n of Object.keys(e))u[n]===e[n]?r=!0:t[n]=e[n];return r?t:e})},[u]);const f=["theme","accent_color","custom_bg_color","custom_title_color","custom_window_color","custom_button_color","corners","icon_set"],b=e=>{const t={...e};for(const e of f)e in t||(t[e]=g(e));L(t),p(t=>({...t,...e})),m(e)};wr(or,lr,lr),kr(()=>{xe.forEach(e=>{we(e.name)})},[]);const k=new Set(xe.map(e=>e.name)),N=[...ir().filter(e=>!k.has(e.name)),...xe],C=e=>ve[e]??null,S=e=>{return"custom"===e?"Any icons":C(e)?(t=C(e))&&N.find(e=>e.name===t)?.label||"":"System";var t},_=g("theme")||"system",E=y(_),T=u.desktop_bg||(d.length>0?"random":"none"),M=Nr(d.length>0?d[Math.floor(Math.random()*d.length)].src:"none"),P="random"===T?M.current:T,I=u.desktop_bg_custom||"",$=P?.startsWith("#"),D=/* @__PURE__ */new Set([...d.map(e=>e.src),"random"]),A=!$&&"none"!==P&&"random"!==T&&P&&!D.has(P),{url:R,refresh:W}=Qn(P,I),F=a(P,R),j=a(P===o?P:I||P,R),[O,z]=vr(null),[B,H]=vr(!1),[K,U]=vr(null),X=(e,t)=>{m({[e]:t})},V=hr().layout,{layout:Y,forced:G}=Zn(),q=ea(),Q=!!g("reduce_transparency"),[J,Z]=vr({}),ee=Nr({}),te=Cr((e,t)=>{Z(r=>({...r,[e]:t}));const r={transparency_taskbar:"--taskbar-opacity",transparency_inactive_header:"--inactive-header-opacity",transparency_inactive_content:"--inactive-content-opacity",transparency_active_header:"--active-header-opacity",transparency_active_content:"--active-content-opacity"};r[e]&&document.documentElement.style.setProperty(r[e],String(t/100)),ee.current[e]&&clearTimeout(ee.current[e]),ee.current[e]=setTimeout(()=>{X(e,t),Z(t=>{const r={...t};return delete r[e],r})},300)},[X]);kr(()=>()=>{Object.values(ee.current).forEach(clearTimeout)},[]);const re=(u.transparency_taskbar??70)/100,ne=(u.transparency_active_header??80)/100,ae=(u.transparency_active_content??90)/100,oe=Ra(E,"bg-white/90","bg-[#1e1e2e]/90","bg-pink-50/90","bg-green-50/90","bg-gray-200/90","bg-blue-50/90"),le=Ra(E,"bg-gray-200","bg-[#313244]","bg-pink-200","bg-green-200","bg-gray-400","bg-blue-200"),ie=Ra(E,"bg-white border border-gray-200","bg-[#1e1e2e] border border-[#45475a]","bg-white border border-pink-200","bg-white border border-green-200","bg-gray-100 border border-gray-300","bg-blue-50 border border-blue-200"),se=Ra(E,"bg-gray-100","bg-[#313244]","bg-pink-50","bg-green-50","bg-gray-300","bg-blue-100"),ce=Ra(E,"bg-blue-600","bg-blue-500","bg-pink-600","bg-green-600","bg-gray-700","bg-blue-700"),de="sidebar"===Y,ue=g("accent_color")?g("custom_bg_color")||"#f3f4f6":Ra(E,"#f3f4f6","#1e1e2e","#fdf2f8","#f0fdf4","#d1d5db","#eff6ff");/* @__PURE__ */
|
|
305
305
|
return Ar("div",{className:"space-y-6",children:[n("layout")&&/* @__PURE__ */Ar("div",{children:[
|
|
306
306
|
/* @__PURE__ */Rr("h3",{className:"text-sm font-semibold text-gray-900 mb-1",children:"Layout Mode"}),
|
|
307
307
|
/* @__PURE__ */Rr("p",{className:"text-xs text-gray-500 mb-3",children:"Switch whenever you like — the windows you have open carry over. The settings below change to match the layout you pick."}),
|
|
@@ -405,12 +405,12 @@ return Ar("button",{onClick:()=>{b(t?g("accent_color")?{theme:"light"}:{theme:"l
|
|
|
405
405
|
/* @__PURE__ */Rr("div",{className:"flex gap-2",children:["bottom","top","left","right"].map(e=>/* @__PURE__ */Rr("button",{onClick:()=>X("taskbar_position",e),className:"h-8 px-3 text-xs font-medium rounded-lg border transition-colors "+((u.taskbar_position||"bottom")===e?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]})})]}),n("appearance")&&/* @__PURE__ */Rr(Wr,{children:/* @__PURE__ */Ar("div",{children:[
|
|
406
406
|
/* @__PURE__ */Rr("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Transparency"}),
|
|
407
407
|
/* @__PURE__ */Ar("label",{className:"flex items-start gap-2 cursor-pointer mb-3",children:[
|
|
408
|
-
/* @__PURE__ */Rr("input",{type:"checkbox",checked:
|
|
408
|
+
/* @__PURE__ */Rr("input",{type:"checkbox",checked:Q,onChange:e=>{return t=e.target.checked,document.documentElement.classList.toggle("rosh-reduce-transparency",t),p(e=>({...e,reduce_transparency:t})),void m({reduce_transparency:t});var t},className:"h-4 w-4 mt-0.5 rounded border-gray-300 text-blue-600"}),
|
|
409
409
|
/* @__PURE__ */Ar("span",{className:"text-sm text-gray-700",children:["Reduce transparency",
|
|
410
|
-
/* @__PURE__ */Rr("span",{className:"block text-xs text-gray-400",children:"Turn off the frosted-glass blur and make windows, menus and the taskbar solid. Improves performance on older machines."})]})]}),!de&&/* @__PURE__ */Rr("div",{"data-transparency-levels":!0,className:"space-y-3 transition-opacity "+(
|
|
410
|
+
/* @__PURE__ */Rr("span",{className:"block text-xs text-gray-400",children:"Turn off the frosted-glass blur and make windows, menus and the taskbar solid. Improves performance on older machines."})]})]}),!de&&/* @__PURE__ */Rr("div",{"data-transparency-levels":!0,className:"space-y-3 transition-opacity "+(Q?"opacity-40 pointer-events-none select-none":""),"aria-disabled":Q,children:[{key:"transparency_taskbar",label:"Taskbar",defaultVal:70},{key:"transparency_start_menu",label:"Start Menu",defaultVal:70},{key:"transparency_inactive_header",label:"Inactive Windows Header / Footer",defaultVal:70},{key:"transparency_inactive_content",label:"Inactive Windows Content",defaultVal:80},{key:"transparency_active_header",label:"Active Windows Header / Footer",defaultVal:80},{key:"transparency_active_content",label:"Active Windows Content",defaultVal:90}].map(e=>{const t=J[e.key]??u[e.key]??e.defaultVal;/* @__PURE__ */
|
|
411
411
|
return Ar("div",{className:"flex items-center gap-3",children:[
|
|
412
412
|
/* @__PURE__ */Rr("span",{className:"text-sm text-gray-700 w-64 shrink-0",children:e.label}),
|
|
413
|
-
/* @__PURE__ */Rr("input",{type:"range",min:20,max:100,value:t,disabled:
|
|
413
|
+
/* @__PURE__ */Rr("input",{type:"range",min:20,max:100,value:t,disabled:Q,onChange:t=>te(e.key,Number(t.target.value)),className:"flex-1 h-1.5 accent-blue-600 cursor-pointer disabled:cursor-not-allowed"}),
|
|
414
414
|
/* @__PURE__ */Ar("span",{className:"text-xs text-gray-500 w-10 text-right font-mono",children:[t,"%"]})]},e.key)})})]})}),n("layout")&&/* @__PURE__ */Ar("div",{children:[
|
|
415
415
|
/* @__PURE__ */Rr("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Menu"}),
|
|
416
416
|
/* @__PURE__ */Rr("p",{className:"text-xs text-gray-500 mb-3",children:"Controls font size, padding, taskbar height, and window button height across the Start Menu, context menus, dropdowns, and the notification popup."}),
|
|
@@ -479,8 +479,8 @@ return Ar("div",{className:"mt-2 space-y-2",children:[
|
|
|
479
479
|
/* @__PURE__ */Rr("span",{className:"text-sm text-gray-700",children:a.enable})]}),e&&/* @__PURE__ */Rr("div",{className:"ml-6",children:/* @__PURE__ */Rr("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:/* @__PURE__ */Ar("table",{className:"w-full text-2xs",children:[
|
|
480
480
|
/* @__PURE__ */Rr("thead",{children:/* @__PURE__ */Ar("tr",{className:"bg-gray-50",children:[
|
|
481
481
|
/* @__PURE__ */Rr("th",{className:`${j} px-2 h-8 text-left font-medium text-gray-500 w-24`}),G.map(e=>/* @__PURE__ */Rr("th",{className:`${j} px-1 h-8 text-center`,children:/* @__PURE__ */Rr("button",{onClick:()=>{return te(t=e),n(Y()),void ee(t,"success");var t},className:"font-medium text-gray-500 hover:text-blue-600 transition-colors",children:q(a,e)})},e))]})}),
|
|
482
|
-
/* @__PURE__ */Rr("tbody",{className:"divide-y divide-gray-100",children:
|
|
483
|
-
/* @__PURE__ */Rr("td",{className:"px-2 h-8 text-gray-700 font-medium",children:
|
|
482
|
+
/* @__PURE__ */Rr("tbody",{className:"divide-y divide-gray-100",children:Q.map(e=>/* @__PURE__ */Ar("tr",{children:[
|
|
483
|
+
/* @__PURE__ */Rr("td",{className:"px-2 h-8 text-gray-700 font-medium",children:J(a,e)}),G.map(t=>/* @__PURE__ */Rr("td",{className:"px-1 h-8 text-center",children:/* @__PURE__ */Rr("button",{onClick:()=>((e,t)=>{Z(e,t),n(Y()),ee(t,e)})(e,t),className:"w-4 h-4 rounded-full border-2 transition-colors "+(r[e]===t?"bg-blue-600 border-blue-600":"border-gray-300 hover:border-blue-400")})},t))]},e))})]})})})]})}var Oa=[{key:"center",label:"Center"},{key:"cascade",label:"Cascade"}],za=[{key:"deactivate",label:"Deactivate all"},{key:"nothing",label:"Do nothing"}],Ba=[{key:"small",label:"Small"},{key:"medium",label:"Medium"},{key:"large",label:"Large"},{key:"maximized",label:"Maximized"}];function Ha(){const{prefs:e,save:t}=xt(),r=(e,r)=>t({[e]:r}),n=e.window_position||"cascade",a=e.desktop_dblclick||"deactivate",o=e.default_window_size||"large",l=hr().layout,i="sidebar"===Zn().layout;/* @__PURE__ */
|
|
484
484
|
return Ar("div",{className:"space-y-6",children:[i?/* @__PURE__ */Rr(Ea,{children:Ta(l)}):/* @__PURE__ */Ar("div",{children:[
|
|
485
485
|
/* @__PURE__ */Rr("h3",{className:"text-sm font-semibold text-gray-900 mb-3",children:"Behavior"}),
|
|
486
486
|
/* @__PURE__ */Ar("div",{className:"space-y-3",children:[
|
|
@@ -511,15 +511,15 @@ return Ar("div",{className:"space-y-4",children:[
|
|
|
511
511
|
/* @__PURE__ */Rr("span",{className:"text-sm text-gray-700",children:a.enable})]}),e&&/* @__PURE__ */Rr("div",{className:"border border-gray-200 rounded-lg overflow-hidden",children:/* @__PURE__ */Ar("table",{className:"w-full text-2xs",children:[
|
|
512
512
|
/* @__PURE__ */Rr("thead",{children:/* @__PURE__ */Ar("tr",{className:"bg-gray-50",children:[
|
|
513
513
|
/* @__PURE__ */Rr("th",{className:`${j} px-2 h-8 text-left font-medium text-gray-500 w-24`}),G.map(e=>/* @__PURE__ */Rr("th",{className:`${j} px-1 h-8 text-center`,children:/* @__PURE__ */Rr("button",{onClick:()=>{return te(t=e),n(Y()),void ee(t,"success");var t},className:"font-medium text-gray-500 hover:text-blue-600 transition-colors",children:q(a,e)})},e))]})}),
|
|
514
|
-
/* @__PURE__ */Rr("tbody",{className:"divide-y divide-gray-100",children:
|
|
515
|
-
/* @__PURE__ */Rr("td",{className:"px-2 h-8 text-gray-700 font-medium",children:
|
|
514
|
+
/* @__PURE__ */Rr("tbody",{className:"divide-y divide-gray-100",children:Q.map(e=>/* @__PURE__ */Ar("tr",{children:[
|
|
515
|
+
/* @__PURE__ */Rr("td",{className:"px-2 h-8 text-gray-700 font-medium",children:J(a,e)}),G.map(t=>/* @__PURE__ */Rr("td",{className:"px-1 h-8 text-center",children:/* @__PURE__ */Rr("button",{onClick:()=>((e,t)=>{Z(e,t),n(Y()),ee(t,e)})(e,t),"aria-label":a.choice(J(a,e),q(a,t)),"aria-pressed":r[e]===t,className:"w-4 h-4 rounded-full border-2 transition-colors "+(r[e]===t?"bg-blue-600 border-blue-600":"border-gray-300 hover:border-blue-400")})},t))]},e))})]})}),
|
|
516
516
|
/* @__PURE__ */Rr(He,{children:/* @__PURE__ */Rr("span",{className:"text-xs text-gray-400",children:a.autosave})})]})}function Xa({sections:e,defaultSelected:t,className:r}){const n=t&&e.some(e=>e.key===t)?t:e[0]?.key??"",[a,o]=vr(n),l=e.find(e=>e.key===a)??e[0],i=hr().layout,s=vt(),[c,d]=vr(!!t),u=/* @__PURE__ */Rr("nav",{className:"px-1 py-2 space-y-0.5",children:e.map(e=>{const t=e.key===a;/* @__PURE__ */
|
|
517
517
|
return Ar("button",{type:"button",onClick:()=>{return t=e.key,o(t),void d(!0);var t},className:"w-full text-left rounded-lg px-3 py-3 text-sm transition-colors flex items-start gap-3 "+(t?"bg-blue-50 text-blue-700":"hover:bg-gray-100 text-gray-700"),children:[e.icon&&/* @__PURE__ */Rr("span",{className:"mt-0.5 "+(t?"text-blue-600":"text-gray-400"),children:e.icon}),
|
|
518
518
|
/* @__PURE__ */Ar("span",{className:"min-w-0",children:[
|
|
519
519
|
/* @__PURE__ */Rr("span",{className:"block "+(t?"font-semibold text-blue-700":"font-medium text-gray-800"),children:e.label}),e.description&&/* @__PURE__ */Rr("span",{className:"block text-2xs text-gray-500 mt-0.5",children:e.description})]})]},e.key)})});return s?c?/* @__PURE__ */Ar("div",{className:`flex h-full w-full flex-col ${r??""}`,children:[
|
|
520
520
|
/* @__PURE__ */Ar("button",{type:"button",onClick:()=>d(!1),className:"flex h-(--row-height-menu) shrink-0 items-center gap-1 border-b border-gray-200 px-3 text-sm font-medium text-blue-600",children:[
|
|
521
521
|
/* @__PURE__ */Rr(ar,{name:"chevron-left",className:"size-4",strokeWidth:2,"aria-hidden":"true"}),i.back]}),
|
|
522
|
-
/* @__PURE__ */Rr("main",{className:"flex-1 min-w-0 overflow-auto p-4",children:l?.render()})]}):/* @__PURE__ */Rr("div",{className:`h-full w-full overflow-auto bg-gray-50 ${r??""}`,children:u}):/* @__PURE__ */Rr(K,{storageKey:"shell.systemPreferences.sidebarWidth",defaultWidth:240,minWidth:200,maxWidth:360,className:r,sidebarClassName:"border-r border-gray-200 bg-gray-50",sidebar:u,children:/* @__PURE__ */Rr("main",{className:"flex-1 min-w-0 overflow-auto p-4",children:l?.render()})})}var Va;function Ya(e,t,r,n,a,o){const[l,i]=vr(-1),s=Nr(e),c=Nr(t),d=Nr(r),u=Nr(n),m=Nr(a),h=Nr(l),p=Nr(-1),g=Ke(),f=Nr(g),b=Nr(o),y=Nr(null);s.current=e,c.current=t,d.current=r,u.current=n,m.current=a,h.current=l,f.current=g,b.current=o;const x=Nr(void 0),w=e=>{clearTimeout(x.current),x.current=setTimeout(()=>i(e),0)};kr(()=>()=>clearTimeout(x.current),[]);const v=Nr(e.length);return kr(()=>{e.length!==v.current&&(clearTimeout(x.current),i(-1),p.current=-1,v.current=e.length)},[e.length]),kr(()=>{let e=!1;const t=()=>{e=document.activeElement===y.current},r=t=>{const r=e&&t.target===y.current;e=!1,r||(y.current=null)},n=e=>{y.current?.contains(e.target)&&(y.current=null)};return window.addEventListener("blur",t),document.addEventListener("focusin",r,!0),document.addEventListener("mousedown",n,!0),()=>{window.removeEventListener("blur",t),document.removeEventListener("focusin",r,!0),document.removeEventListener("mousedown",n,!0)}},[]),kr(()=>{const e=e=>{if(!f.current)return;if(e.shiftKey)return;const t=e.target,r=t?.closest?.("[data-row-idx]");if(!r)return;if("INPUT"!==t.tagName||"checkbox"!==t.type)return;const n=parseInt(r.getAttribute("data-row-idx"),10);isNaN(n)||(p.current=n,w(n))};return document.addEventListener("click",e,!0),()=>document.removeEventListener("click",e,!0)},[]),kr(()=>{const e=e=>{if(!f.current)return;const t=e.target?.tagName;if("INPUT"===t||"TEXTAREA"===t||"SELECT"===t)return;if(e.target?.isContentEditable)return;if((e.metaKey||e.ctrlKey)&&"a"===e.key)return e.preventDefault(),void u.current?.();if(e.metaKey||e.ctrlKey||e.altKey)return;const r=s.current.length;if(0===r)return;const n="KeyJ"===e.code||"j"===e.key||"J"===e.key||"ArrowDown"===e.key,a="KeyK"===e.code||"k"===e.key||"K"===e.key||"ArrowUp"===e.key,o=e.target?.closest?.(Ge)??null;if("Enter"!==e.key&&" "!==e.key||!o||o===y.current)if(n||a){y.current=o?.closest('[aria-modal="true"], [role="menu"]')||e.defaultPrevented&&e.key.startsWith("Arrow")?null:o,e.preventDefault();const t=h.current,a=n?Math.min(t+1,r-1):Math.max(t-1,0);a!==t&&(i(a),function(e,t){requestAnimationFrame(()=>{const r=t?t.current:document,n=r?.querySelector(`[data-row-idx="${e}"]`);n?.scrollIntoView({block:"nearest"})})}(a,b.current),e.shiftKey&&d.current&&(d.current(s.current[a]),p.current=a))}else if("Enter"===e.key&&h.current>=0&&h.current<r)e.preventDefault(),c.current(s.current[h.current]);else if(" "===e.key&&h.current>=0&&h.current<r){if(e.preventDefault(),e.shiftKey&&p.current>=0&&m.current){const e=Math.min(p.current,h.current),t=Math.max(p.current,h.current);m.current(e,t)}else d.current?.(s.current[h.current]);p.current=h.current}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),kr(()=>{const e=e=>{if(!f.current)return;if(!e.shiftKey)return;const t=e.target,r=t?.closest?.("[data-row-idx]");if(!r)return;const n=parseInt(r.getAttribute("data-row-idx"),10);if(isNaN(n))return;const a="INPUT"===t.tagName&&"checkbox"===t.type?t:null,o=p.current;if(o<0){if(a)return p.current=n,void w(n);d.current?.(s.current[n])}else{const e=Math.min(o,n),t=Math.max(o,n);if(m.current)m.current(e,t),a&&(a.checked=!0);else if(d.current)for(let r=e;r<=t;r++)d.current(s.current[r])}a||e.preventDefault(),e.stopPropagation(),p.current=n,i(n)};return document.addEventListener("click",e,!0),()=>document.removeEventListener("click",e,!0)},[]),l}function Ga(){return"undefined"!=typeof window&&window.matchMedia("(max-width: 767px), (pointer: coarse)").matches?"mobile":"desktop"}function qa(e,t){return["react-os-shell","default-columns",e,t]}function
|
|
522
|
+
/* @__PURE__ */Rr("main",{className:"flex-1 min-w-0 overflow-auto p-4",children:l?.render()})]}):/* @__PURE__ */Rr("div",{className:`h-full w-full overflow-auto bg-gray-50 ${r??""}`,children:u}):/* @__PURE__ */Rr(K,{storageKey:"shell.systemPreferences.sidebarWidth",defaultWidth:240,minWidth:200,maxWidth:360,className:r,sidebarClassName:"border-r border-gray-200 bg-gray-50",sidebar:u,children:/* @__PURE__ */Rr("main",{className:"flex-1 min-w-0 overflow-auto p-4",children:l?.render()})})}var Va;function Ya(e,t,r,n,a,o){const[l,i]=vr(-1),s=Nr(e),c=Nr(t),d=Nr(r),u=Nr(n),m=Nr(a),h=Nr(l),p=Nr(-1),g=Ke(),f=Nr(g),b=Nr(o),y=Nr(null);s.current=e,c.current=t,d.current=r,u.current=n,m.current=a,h.current=l,f.current=g,b.current=o;const x=Nr(void 0),w=e=>{clearTimeout(x.current),x.current=setTimeout(()=>i(e),0)};kr(()=>()=>clearTimeout(x.current),[]);const v=Nr(e.length);return kr(()=>{e.length!==v.current&&(clearTimeout(x.current),i(-1),p.current=-1,v.current=e.length)},[e.length]),kr(()=>{let e=!1;const t=()=>{e=document.activeElement===y.current},r=t=>{const r=e&&t.target===y.current;e=!1,r||(y.current=null)},n=e=>{y.current?.contains(e.target)&&(y.current=null)};return window.addEventListener("blur",t),document.addEventListener("focusin",r,!0),document.addEventListener("mousedown",n,!0),()=>{window.removeEventListener("blur",t),document.removeEventListener("focusin",r,!0),document.removeEventListener("mousedown",n,!0)}},[]),kr(()=>{const e=e=>{if(!f.current)return;if(e.shiftKey)return;const t=e.target,r=t?.closest?.("[data-row-idx]");if(!r)return;if("INPUT"!==t.tagName||"checkbox"!==t.type)return;const n=parseInt(r.getAttribute("data-row-idx"),10);isNaN(n)||(p.current=n,w(n))};return document.addEventListener("click",e,!0),()=>document.removeEventListener("click",e,!0)},[]),kr(()=>{const e=e=>{if(!f.current)return;const t=e.target?.tagName;if("INPUT"===t||"TEXTAREA"===t||"SELECT"===t)return;if(e.target?.isContentEditable)return;if((e.metaKey||e.ctrlKey)&&"a"===e.key)return e.preventDefault(),void u.current?.();if(e.metaKey||e.ctrlKey||e.altKey)return;const r=s.current.length;if(0===r)return;const n="KeyJ"===e.code||"j"===e.key||"J"===e.key||"ArrowDown"===e.key,a="KeyK"===e.code||"k"===e.key||"K"===e.key||"ArrowUp"===e.key,o=e.target?.closest?.(Ge)??null;if("Enter"!==e.key&&" "!==e.key||!o||o===y.current)if(n||a){y.current=o?.closest('[aria-modal="true"], [role="menu"]')||e.defaultPrevented&&e.key.startsWith("Arrow")?null:o,e.preventDefault();const t=h.current,a=n?Math.min(t+1,r-1):Math.max(t-1,0);a!==t&&(i(a),function(e,t){requestAnimationFrame(()=>{const r=t?t.current:document,n=r?.querySelector(`[data-row-idx="${e}"]`);n?.scrollIntoView({block:"nearest"})})}(a,b.current),e.shiftKey&&d.current&&(d.current(s.current[a]),p.current=a))}else if("Enter"===e.key&&h.current>=0&&h.current<r)e.preventDefault(),c.current(s.current[h.current]);else if(" "===e.key&&h.current>=0&&h.current<r){if(e.preventDefault(),e.shiftKey&&p.current>=0&&m.current){const e=Math.min(p.current,h.current),t=Math.max(p.current,h.current);m.current(e,t)}else d.current?.(s.current[h.current]);p.current=h.current}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),kr(()=>{const e=e=>{if(!f.current)return;if(!e.shiftKey)return;const t=e.target,r=t?.closest?.("[data-row-idx]");if(!r)return;const n=parseInt(r.getAttribute("data-row-idx"),10);if(isNaN(n))return;const a="INPUT"===t.tagName&&"checkbox"===t.type?t:null,o=p.current;if(o<0){if(a)return p.current=n,void w(n);d.current?.(s.current[n])}else{const e=Math.min(o,n),t=Math.max(o,n);if(m.current)m.current(e,t),a&&(a.checked=!0);else if(d.current)for(let r=e;r<=t;r++)d.current(s.current[r])}a||e.preventDefault(),e.stopPropagation(),p.current=n,i(n)};return document.addEventListener("click",e,!0),()=>document.removeEventListener("click",e,!0)},[]),l}function Ga(){return"undefined"!=typeof window&&window.matchMedia("(max-width: 767px), (pointer: coarse)").matches?"mobile":"desktop"}function qa(e,t){return["react-os-shell","default-columns",e,t]}function Qa(e){const t=_r(Ga,[]),r=Er(Br)||(Va||(Va=new Hr),Va),{data:n}=Or({queryKey:qa(e??"",t),queryFn:()=>Ye.get(`/auth/default-columns/${e}/`,{params:{viewport:t}}).then(e=>e?.data??null),enabled:!!e&&Ve(),retry:!1,staleTime:3e5,refetchInterval:!1,refetchOnWindowFocus:!1,refetchOnReconnect:!1},r);return{defaultConfig:n??void 0,viewport:t}}function Ja(e,t){return e.length===t.length&&e.every((e,r)=>e.key===t[r].key&&e.width===t[r].width&&!!e.hidden==!!t[r].hidden)}function Za(e){const t=e.findIndex(e=>"_select"===e.key);if(t>=0){const[r]=e.splice(t,1);r.hidden=!1,e.unshift(r)}return e}function eo(e,t){const{prefs:r,save:n}=xt(),a=`columns_${e}`,o=r[a],{defaultConfig:l}=Qa(e),[i,s]=vr(()=>{const r=localStorage.getItem(`col-config-${e}`);if(r)try{const e=JSON.parse(r),n=new Set(e.map(e=>e.key));return Za([...e.filter(e=>t.some(t=>t.key===e.key)),...t.filter(e=>!n.has(e.key)).map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden}))])}catch{}return Za(t.map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden})))}),[c,d]=vr(null),[u,m]=vr(null),h=Nr(null),p=Nr(!1),g=Nr(o);g.current=o;const f=Nr(null),b=Nr(n);b.current=n;const y=Cr(t=>{p.current=!0,localStorage.setItem(`col-config-${e}`,JSON.stringify(t)),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{b.current({[a]:t})},1e3)},[e,a]);kr(()=>{if(p.current||!Array.isArray(o))return;const r=new Set(o.map(e=>e.key)),n=Za([...o.filter(e=>t.some(t=>t.key===e.key)).map(e=>({...e})),...t.filter(e=>!r.has(e.key)).map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden}))]);s(e=>Ja(e,n)?e:n),localStorage.setItem(`col-config-${e}`,JSON.stringify(n))},[e,o]),kr(()=>{if(p.current||Array.isArray(g.current))return;const r=l?.visible_columns;if(!Array.isArray(r)||0===r.length)return;const n=new Set(r),a=Za(t.map(e=>({key:e.key,width:e.defaultWidth||150,hidden:!n.has(e.key)})));s(e=>Ja(e,a)?e:a),localStorage.setItem(`col-config-${e}`,JSON.stringify(a))},[e,l]);const x=Nr(/* @__PURE__ */new Map);kr(()=>{s(e=>function(e,t,r){const n=new Set(t.map(e=>e.key)),a=new Set(e.map(e=>e.key)),o=t.filter(e=>!a.has(e.key)),l=e.filter(e=>"_select"===e.key||n.has(e.key));if(!o.length&&l.length===e.length)return e;for(const t of e)"_select"===t.key||n.has(t.key)||r.set(t.key,t);const i=[...l];for(const e of o){let n=-1;for(let r=t.indexOf(e)-1;r>=0;r-=1){const e=i.findIndex(e=>e.key===t[r].key);if(e>=0){n=e;break}}i.splice(n+1,0,r.get(e.key)??{key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden}),r.delete(e.key)}return Za(i)}(e,t,x.current))},[t]);const w=i.filter(e=>!e.hidden),v=Cr((e,r)=>{r.preventDefault(),r.stopPropagation();const n=w[e],a=i.findIndex(e=>e.key===n.key);h.current={idx:a,startX:r.clientX,startWidth:i[a].width};const o=e=>{if(!h.current)return;const{idx:r,startX:n,startWidth:a}=h.current,o=t.find(e=>e.key===i[r].key)?.minWidth||30,l=Math.max(o,a+e.clientX-n);s(e=>{const t=[...e];return t[r]={...t[r],width:l},t})},l=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",l),h.current=null,s(e=>(y(e),e))};document.addEventListener("mousemove",o),document.addEventListener("mouseup",l)},[i,w,t,y]),k=Cr(e=>{d(e)},[]),N=Cr((e,t)=>{if(t.preventDefault(),null===c)return;const r=t.currentTarget.getBoundingClientRect();let n=t.clientX<r.left+r.width/2?e:e+1;const a=i.filter(e=>!e.hidden);"_select"===a[0]?.key&&0===n&&(n=1),m(n)},[c,i]),C=Cr((e,t)=>(t.preventDefault(),null===c||null===u||u===c||u===c+1?(d(null),void m(null)):(s(e=>{const t=e.filter(e=>!e.hidden),r=t[c];if(!r)return e;const n=e.findIndex(e=>e.key===r.key);let a;a=u<t.length?e.findIndex(e=>e.key===t[u].key):e.findIndex(e=>e.key===t[t.length-1].key)+1;const o=[...e],[l]=o.splice(n,1);return o.splice(a>n?a-1:a,0,l),y(o),o}),d(null),void m(null))),[c,u,y]),S=Cr(()=>{d(null),m(null)},[]),_=Cr(e=>{s(t=>{const r=t.map(t=>t.key===e?{...t,hidden:!t.hidden}:t);return 0===r.filter(e=>!e.hidden).length?t:(y(r),r)})},[y]),E=Cr(()=>{const e=Za(t.map(e=>({key:e.key,width:e.defaultWidth||150,hidden:e.defaultHidden})));s(e),y(e)},[t,y]);return{orderedColumns:w.map(e=>({...t.find(t=>t.key===e.key),width:e.width})).filter(Boolean),allColumns:i.map(e=>{const r=t.find(t=>t.key===e.key);return{key:e.key,label:r?.label||e.key,hidden:!!e.hidden}}),onResizeStart:v,onDragStart:k,onDragOver:N,onDrop:C,onDragEnd:S,toggleColumn:_,resetColumns:E,draggedIdx:c,dropGap:u}}function to({tableId:e,columns:t,sort:r,onSort:n,footer:a,afterBody:o,saveDefaultPerms:l=["change_numberingconfig"],children:i}){const s=wt(),[c,d]=vr(!1),u=_r(()=>s&&!c?t.filter(e=>"_select"!==e.key):t,[t,s,c]),{orderedColumns:m,allColumns:h,onResizeStart:p,onDragStart:g,onDragOver:f,onDrop:b,onDragEnd:y,toggleColumn:x,resetColumns:w,draggedIdx:v,dropGap:N}=eo(e,u),{hasAnyPerm:C}=Lt(),S=hr().columns,[_,E]=vr(!1),[T,M]=vr(!1),[L,P]=vr(!1),I=Nr(null),$=l.length>0&&C(l);k(I,Cr(()=>{_&&E(!1)},[_]));const D=m.reduce((e,t)=>e+t.width,0),A=m.map(e=>`${e.width}px`),R={tableLayout:"fixed",width:D,minWidth:"100%"},W=Nr(null),F=Cr(e=>{const t=W.current;t&&(t.scrollLeft=e.currentTarget.scrollLeft)},[]),O=_r(()=>t.some(e=>"_select"===e.key),[t]);/* @__PURE__ */
|
|
523
523
|
return Ar("div",{className:"flex flex-col flex-1 min-h-0 "+(s?"-mx-4":""),children:[
|
|
524
524
|
/* @__PURE__ */Rr("div",{ref:W,className:"shrink-0 overflow-x-hidden",children:/* @__PURE__ */Ar("table",{className:"divide-y divide-gray-200",style:R,children:[
|
|
525
525
|
/* @__PURE__ */Rr("colgroup",{children:m.map((e,t)=>/* @__PURE__ */Rr("col",{style:{width:A[t]}},e.key))}),
|
|
@@ -535,8 +535,8 @@ return Ar("th",{className:`${j} px-4 py-3 text-left text-xs font-medium text-gra
|
|
|
535
535
|
/* @__PURE__ */Rr("button",{onClick:()=>E(!_),className:"text-gray-400 hover:text-gray-600",title:S.choose,children:/* @__PURE__ */Rr(ar,{name:"adjust",className:"w-4 h-4",strokeWidth:"1.5"})}),_&&/* @__PURE__ */Ar("div",{className:"absolute bottom-full right-0 mb-1 w-52 rounded-(--radius-popup) z-(--z-popup) py-1 max-h-80 overflow-y-auto",style:Zt(),children:[
|
|
536
536
|
/* @__PURE__ */Rr("p",{className:"px-3 py-2 text-3xs font-semibold text-gray-400 uppercase",children:S.heading}),h.filter(e=>"_select"!==e.key).map(e=>/* @__PURE__ */Ar("label",{className:"flex items-center gap-2 px-3 py-1 text-sm text-gray-700 hover:bg-gray-50 cursor-pointer",children:[
|
|
537
537
|
/* @__PURE__ */Rr("input",{type:"checkbox",checked:!e.hidden,onChange:()=>x(e.key),className:"h-3.5 w-3.5 rounded border-gray-300 text-blue-600"}),e.label]},e.key)),$&&/* @__PURE__ */Rr("div",{className:"border-t border-gray-100 mt-1 pt-1 px-3 pb-1",children:/* @__PURE__ */Rr("button",{onClick:async()=>{M(!0);const t=h.filter(e=>!e.hidden).map(e=>e.key),n=s?"mobile":"desktop",a={visible_columns:t};r&&(a.sort=r);try{await Ye.patch(`/auth/default-columns/${e}/`,a,{params:{viewport:n}}).catch(()=>Ye.post("/auth/default-columns/",{table_id:e,viewport:n,...a})),P(!0),setTimeout(()=>P(!1),2e3)}catch{}M(!1)},disabled:T,className:"text-2xs w-full text-center py-1 rounded "+(L?"text-green-600":"text-gray-500 hover:text-blue-600"),children:T?"...":L?S.savedDefault:S.saveDefault})})]})]})]})]})}function ro(e){return Array.from(e.children).filter(e=>void 0!==e.dataset?.colKey&&"_select"!==e.dataset.colKey)}function no(e){return("string"==typeof e.innerText?e.innerText:e.textContent??"").replace(/\s+/g," ").trim()}function ao(e){const{items:t,isLoading:r,emptyState:n,totalCount:a,isError:o,onRetry:l,errorTitle:i,errorMessage:s,tableId:c,columns:d,renderCell:u,getRowId:m=e=>e.id,sort:h,onSort:p,selected:g,setSelected:f,onRowClick:b,onRowHover:y,getRowClassName:x,footerLabel:w,footerExtra:v,sentinelRef:k,isFetchingNextPage:E,saveDefaultPerms:T,exportEndpoint:M,exportFilename:L="export.csv",contextActions:I}=e,[$,D]=vr(null),A=Nr(null),R=hr(),W=R.entityList,j=e=>{f(t=>{const r=new Set(t),n=m(e);return r.has(n)?r.delete(n):r.add(n),r})},O=()=>{f(e=>{const r=t.map(m),n=new Set(e);return r.every(t=>e.has(t))?r.forEach(e=>n.delete(e)):r.forEach(e=>n.add(e)),n})},z=Ya(t,b,j,O,(e,r)=>{f(n=>{const a=new Set(n);for(let n=e;n<=r;n++)a.add(m(t[n]));return a})},A),B=t.filter(e=>g.has(m(e))),H=()=>{const e=[...A.current?.querySelectorAll("tr[data-row-idx]")??[]].filter(e=>{const r=t[Number(e.dataset.rowIdx)];return void 0!==r&&g.has(m(r))}),r=e.length?ro(e[0]).map(e=>e.dataset.colKey??""):[],n=new Map(d.map(e=>[e.key,e.label]));return{keys:r,header:r.map(e=>n.get(e)??e),body:e.map(e=>ro(e).map(no))}},K=()=>{D(null);const{header:e,body:t}=H();if(!t.length)return;const r=[e,...t].map(e=>e.join("\t")).join("\n"),n="<table><thead><tr>"+e.map(e=>`<th>${F(e)}</th>`).join("")+"</tr></thead><tbody>"+t.map(e=>`<tr>${e.map(e=>`<td>${F(e)}</td>`).join("")}</tr>`).join("")+"</tbody></table>";_(W.copiedRows(t.length),r,n)},U=async()=>{D(null);const e=B.map(m);if(!e.length||!M)return;const t=new URLSearchParams({ids:e.join(",")}),r=(()=>{const e=new Map(d.map(e=>[e.key,e.exportLabel??e.label]));try{const t=localStorage.getItem(`col-config-${c}`);if(t){const r=JSON.parse(t).filter(t=>!t.hidden&&"_select"!==t.key&&e.has(t.key)).map(t=>`${t.key}|${e.get(t.key)}`);if(r.length)return r.join(",")}}catch{}return d.filter(e=>!e.defaultHidden).map(e=>`${e.key}|${e.exportLabel??e.label}`).join(",")})();r&&t.set("cols",r);const n=M.includes("?")?"&":"?";try{const r=await Ye.get(`${M}${n}${t}`,{responseType:"blob"}),a=window.URL.createObjectURL(new Blob([r.data],{type:"text/csv"})),o=document.createElement("a");o.href=a,o.download=L,o.click(),window.URL.revokeObjectURL(a);const l=r.headers??{},i=Number(l["x-row-count"]);if("true"===String(l["x-truncated"]))return void Te.notify(Number.isFinite(i)?W.exportTruncated(i,e.length):W.exportTruncatedUnknown(e.length));Te.success(W.exported(e.length))}catch{Te.error(W.exportFailed)}};if(r)/* @__PURE__ */return Rr(Ue,{});if(o&&0===t.length)/* @__PURE__ */
|
|
538
|
-
return Rr(N,{title:i,message:s,onRetry:l});if(0===t.length)/* @__PURE__ */return Rr(Wr,{children:n});const X=t.length>0&&B.length===t.length,V=B.length>0&&!X,Y=g.size-B.length,G=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */Rr(C,{"aria-label":R.table.selectAll,checked:X,indeterminate:V,onChange:O,style:{height:14,width:14}})},...d],q=/* @__PURE__ */Rr(S,{selectedCount:B.length,hiddenSelectedCount:Y,loadedCount:t.length,totalCount:a,label:w,isFetchingMore:E,extra:v}),
|
|
539
|
-
/* @__PURE__ */Rr("div",{ref:k}),E&&/* @__PURE__ */Rr(Rt,{size:"sm",padding:"py-3",label:R.list.loadingMore})]}):void 0;let
|
|
538
|
+
return Rr(N,{title:i,message:s,onRetry:l});if(0===t.length)/* @__PURE__ */return Rr(Wr,{children:n});const X=t.length>0&&B.length===t.length,V=B.length>0&&!X,Y=g.size-B.length,G=[{key:"_select",label:"",defaultWidth:52,minWidth:52,headerNode:/* @__PURE__ */Rr(C,{"aria-label":R.table.selectAll,checked:X,indeterminate:V,onChange:O,style:{height:14,width:14}})},...d],q=/* @__PURE__ */Rr(S,{selectedCount:B.length,hiddenSelectedCount:Y,loadedCount:t.length,totalCount:a,label:w,isFetchingMore:E,extra:v}),Q=k?/* @__PURE__ */Ar(Wr,{children:[
|
|
539
|
+
/* @__PURE__ */Rr("div",{ref:k}),E&&/* @__PURE__ */Rr(Rt,{size:"sm",padding:"py-3",label:R.list.loadingMore})]}):void 0;let J=null;if($){const{x:e,y:r,item:n,text:o,firstColumn:i}=$,s=I?I(B):[],c=B.length,d=()=>D(null),u=void 0!==a&&a>t.length;J=/* @__PURE__ */Ar(Ft,{portal:!0,style:{left:e,top:r},onClose:d,minWidth:210,children:[
|
|
540
540
|
/* @__PURE__ */Rr(jt,{children:Y>0?R.list.selectedNotShown(c,Y):R.list.selected(c)}),
|
|
541
541
|
/* @__PURE__ */Rr(Ot,{className:"font-medium",onClick:()=>{d(),b(n)},children:W.open}),
|
|
542
542
|
/* @__PURE__ */Rr(Wt,{}),o&&/* @__PURE__ */Rr(Ot,{onClick:()=>{d(),_(W.copiedText,o.text,o.html)},children:W.copy}),i&&/* @__PURE__ */Rr(Ot,{onClick:()=>(e=>{D(null);const{keys:t,body:r}=H(),n=t.indexOf(e.key);n<0||!r.length||_(e.label,r.map(e=>e[n]).join("\n"))})(i),children:W.copyColumn(i.label)}),
|
|
@@ -545,8 +545,8 @@ return Rr(N,{title:i,message:s,onRetry:l});if(0===t.length)/* @__PURE__ */return
|
|
|
545
545
|
/* @__PURE__ */Rr(Wt,{}),!X&&/* @__PURE__ */Rr(Ot,{onClick:()=>{d(),f(e=>/* @__PURE__ */new Set([...e,...t.map(m)]))},children:u?W.selectAllLoaded(t.length):W.selectAll}),
|
|
546
546
|
/* @__PURE__ */Rr(Ot,{onClick:()=>{d(),f(/* @__PURE__ */new Set)},children:W.clearSelection}),l&&/* @__PURE__ */Rr(Ot,{onClick:()=>{d(),l()},children:W.refresh})]})}/* @__PURE__ */
|
|
547
547
|
return Ar("div",{className:"flex-1 flex flex-col mb-1 bg-white rounded-lg shadow overflow-hidden",children:[
|
|
548
|
-
/* @__PURE__ */Rr("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */Rr(to,{tableId:c,columns:G,sort:h,onSort:p,footer:q,afterBody:
|
|
549
|
-
return Rr("tr",{"data-row-idx":r,className:`cursor-pointer ${z===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":g.has(n)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${x?.(t)??""}`,onClick:()=>b(t),onContextMenu:e=>((e,t)=>{if(e.shiftKey||Bt(e.target))return;e.preventDefault();const r=m(t);g.has(r)||f(/* @__PURE__ */new Set([r]));const n=ro(e.currentTarget)[0]?.dataset.colKey,a=n?d.find(e=>e.key===n)?.label:void 0;D({x:e.clientX,y:e.clientY,item:t,text:P(e.target),firstColumn:n&&a?{key:n,label:a}:null})})(e,t),onMouseEnter:y?()=>y(t):void 0,children:e.map(e=>/* @__PURE__ */Rr("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */Rr(C,{"aria-label":R.table.selectRow,checked:g.has(n),onChange:()=>j(t),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):u(t,e.key)},e.key))},n)})})})}),
|
|
548
|
+
/* @__PURE__ */Rr("div",{className:"flex-1 min-h-0 flex flex-col",children:/* @__PURE__ */Rr(to,{tableId:c,columns:G,sort:h,onSort:p,footer:q,afterBody:Q,saveDefaultPerms:T,children:e=>/* @__PURE__ */Rr("tbody",{ref:A,className:"divide-y divide-gray-100",children:t.map((t,r)=>{const n=m(t);/* @__PURE__ */
|
|
549
|
+
return Rr("tr",{"data-row-idx":r,className:`cursor-pointer ${z===r?"bg-blue-50 ring-1 ring-inset ring-blue-300":g.has(n)?"bg-blue-50 hover:bg-blue-100":"hover:bg-gray-50"} ${x?.(t)??""}`,onClick:()=>b(t),onContextMenu:e=>((e,t)=>{if(e.shiftKey||Bt(e.target))return;e.preventDefault();const r=m(t);g.has(r)||f(/* @__PURE__ */new Set([r]));const n=ro(e.currentTarget)[0]?.dataset.colKey,a=n?d.find(e=>e.key===n)?.label:void 0;D({x:e.clientX,y:e.clientY,item:t,text:P(e.target),firstColumn:n&&a?{key:n,label:a}:null})})(e,t),onMouseEnter:y?()=>y(t):void 0,children:e.map(e=>/* @__PURE__ */Rr("td",{"data-col-key":e.key,className:"px-4 py-3 whitespace-nowrap text-sm overflow-hidden",children:"_select"===e.key?/* @__PURE__ */Rr(C,{"aria-label":R.table.selectRow,checked:g.has(n),onChange:()=>j(t),onClick:e=>e.stopPropagation(),style:{height:14,width:14}}):u(t,e.key)},e.key))},n)})})})}),J]})}function oo({queryKey:e,fetchFn:t,extraParams:r={},pageSize:n=25}){const a=Nr(null),o=Object.fromEntries(Object.entries(r).filter(([,e])=>void 0!==e)),l=zr({queryKey:e,queryFn:({pageParam:e=1})=>t({page:String(e),...o}),getNextPageParam:(e,t)=>{if(e.next)return t.length+1},initialPageParam:1}),{fetchNextPage:i,hasNextPage:s,isFetchingNextPage:c}=l,d=Cr(e=>{const[t]=e;t.isIntersecting&&s&&!c&&i()},[i,s,c]);kr(()=>{const e=a.current;if(!e)return;let t=e.parentElement;for(;t;){const e=getComputedStyle(t).overflowY;if("auto"===e||"scroll"===e)break;t=t.parentElement}const r=new IntersectionObserver(d,{root:t,rootMargin:"200px",threshold:0});return r.observe(e),()=>r.disconnect()},[d]);const u=/* @__PURE__ */new Set;return{items:(l.data?.pages.flatMap(e=>e?.results??[])??[]).filter(e=>null!=e).filter(e=>{const t=e.id;return null==t||!u.has(t)&&(u.add(t),!0)}),totalCount:l.data?.pages[0]?.count??0,isLoading:l.isLoading,isError:l.isError,error:l.error,isFetchingNextPage:c,hasNextPage:!!s,sentinelRef:a,refetch:l.refetch}}function lo(e){const t=e;return!!t&&"string"==typeof t.field&&t.field.length>0&&("asc"===t.direction||"desc"===t.direction)}function io(e,t="asc",r,n){const{prefs:a,save:o}=xt(),l=r?`sort_${r}`:null,[i,s]=vr(()=>{if(l){if(lo(a[l]))return a[l];try{const e=JSON.parse(localStorage.getItem(`sort-config-${r}`)||"null");if(lo(e))return e}catch{}}return{field:e,direction:t}}),c=Nr(!1),d=l?a[l]:void 0,u=Nr(d);u.current=d,kr(()=>{if(!c.current&&lo(d)){s(e=>e.field===d.field&&e.direction===d.direction?e:d);try{localStorage.setItem(`sort-config-${r}`,JSON.stringify(d))}catch{}}},[r,d?.field,d?.direction]);const{defaultConfig:m}=Qa(r);kr(()=>{const e=m?.sort;if(!c.current&&!lo(u.current)&&lo(e)){s(t=>t.field===e.field&&t.direction===e.direction?t:e);try{localStorage.setItem(`sort-config-${r}`,JSON.stringify(e))}catch{}}},[r,m]);const h=n?.columns?.length?n.columns:void 0,p=!h||function(e,t){return e.some(e=>(e.sortField??("_select"!==e.key?e.key:""))===t&&""!==t)}(h,i.field)?i:{field:e,direction:t},g="desc"===p.direction?`-${p.field}`:p.field;return{sort:p,onSort:e=>{c.current=!0;const t=p.field===e?{field:e,direction:"asc"===p.direction?"desc":"asc"}:{field:e,direction:"asc"};if(s(t),l){try{localStorage.setItem(`sort-config-${r}`,JSON.stringify(t))}catch{}o({[l]:t})}},ordering:g}}function so({filters:e,values:t,onChange:r,onClear:n,children:a}){const o=Object.values(t).filter(Boolean).length;/* @__PURE__ */
|
|
550
550
|
return Ar("div",{className:"flex items-center gap-3 flex-wrap",children:[e.map(e=>{const n=e.searchable??e.options.length>8;/* @__PURE__ */
|
|
551
551
|
return Rr(n?uo:co,{filter:e,value:t[e.field]||"",onChange:t=>r(e.field,t)},e.field)}),a,o>0&&/* @__PURE__ */Ar("button",{onClick:n,className:"flex items-center gap-1 text-sm text-gray-500 hover:text-gray-700",children:[
|
|
552
552
|
/* @__PURE__ */Rr(ar,{name:"close",look:"mini",className:"h-4 w-4"}),"Clear filters"]})]})}function co({filter:e,value:t,onChange:r}){const[n,a]=vr(!1),[o,l]=vr(-1),i=Nr(null),s=Nr(null),c=Nr(null),d=Nr(n);d.current=n;const u=Nr({buffer:"",timer:null}),m=Pr(),h=`${m}-listbox`,p=e=>`${m}-opt-${e}`,g=[{value:"",label:e.label},...e.options],f=t?g.findIndex(e=>e.value===t):0,b=t?e.options.find(e=>e.value===t)?.label:null,y=Cr((e=!0)=>{a(!1),l(-1),e&&s.current?.focus()},[]),x=Cr(()=>{l(f>=0?f:E(g)),a(!0)},[f,g]),w=Cr(e=>{const t=g[e];t&&(r(t.value),y())},[g,r,y]);k(i,Cr(()=>{n&&y(!1)},[n,y])),kr(()=>{if(n)return tr(e=>!("Escape"!==e.key||!d.current)&&(y(),!0),()=>c.current)},[n,y]),kr(()=>{!n||o<0||c.current?.querySelector(`#${CSS.escape(p(o))}`)?.scrollIntoView({block:"nearest"})});/* @__PURE__ */
|
|
@@ -573,7 +573,7 @@ return Ar("div",{className:"border border-blue-200 rounded-lg bg-blue-50 p-4 mb-
|
|
|
573
573
|
/* @__PURE__ */Ar("div",{className:"flex items-center justify-between",children:[
|
|
574
574
|
/* @__PURE__ */Rr("span",{className:"text-xs text-gray-500",children:s.rowsDetected(e.length)}),
|
|
575
575
|
/* @__PURE__ */Ar("div",{className:"flex gap-2",children:[
|
|
576
|
-
/* @__PURE__ */Rr(
|
|
576
|
+
/* @__PURE__ */Rr(Je,{onClick:n,className:"text-sm text-gray-500 hover:text-gray-700",children:s.cancel}),
|
|
577
577
|
/* @__PURE__ */Rr("button",{type:"button",onClick:()=>r(o),disabled:!c,className:"bg-blue-600 text-white px-3 h-8 text-sm font-medium rounded-lg hover:bg-blue-700 disabled:opacity-50",children:s.confirmMapping})]})]})]})}function So({rows:e,groups:t,columns:r,resolutions:n,onResolutionChange:a,onConfirm:o,onCancel:l}){const i=hr().bulkImport,s=t.reduce((e,t)=>{const r=n[t.key.toUpperCase()];return"skip"===r?e:"all"===r?e+t.rowIndices.length:e+1},0),c=t.reduce((e,t)=>{const r=n[t.key.toUpperCase()];return"skip"===r?e+t.rowIndices.length:"all"===r?e:e+(t.rowIndices.length-1)},0);/* @__PURE__ */
|
|
578
578
|
return Ar("div",{className:"border border-amber-200 rounded-lg bg-amber-50 p-4 mb-3",children:[
|
|
579
579
|
/* @__PURE__ */Rr("p",{className:"text-sm font-medium text-gray-800 mb-1",children:i.duplicatesTitle}),
|
|
@@ -592,7 +592,7 @@ return Ar("div",{className:"border border-amber-200 rounded bg-white p-3",childr
|
|
|
592
592
|
/* @__PURE__ */Ar("div",{className:"flex items-center justify-between",children:[
|
|
593
593
|
/* @__PURE__ */Rr("span",{className:"text-xs text-gray-600",children:i.keptDropped(s,c)}),
|
|
594
594
|
/* @__PURE__ */Ar("div",{className:"flex gap-2",children:[
|
|
595
|
-
/* @__PURE__ */Rr(
|
|
595
|
+
/* @__PURE__ */Rr(Je,{onClick:l,className:"text-sm text-gray-500 hover:text-gray-700",children:i.cancel}),
|
|
596
596
|
/* @__PURE__ */Rr("button",{type:"button",onClick:o,className:"bg-blue-600 text-white px-3 h-8 text-sm font-medium rounded-lg hover:bg-blue-700",children:i.proceed})]})]})]})}function _o({rows:e,groups:t,columns:r,onConfirm:n,onCancel:a}){const o=r[0].key,l=t.reduce((e,t)=>e+t.rowIndices.length,0),i=hr().bulkImport,s=pr();/* @__PURE__ */
|
|
597
597
|
return Ar("div",{className:"border border-amber-200 rounded-lg bg-amber-50 p-4 mb-3",children:[
|
|
598
598
|
/* @__PURE__ */Rr("p",{className:"text-sm font-medium text-gray-800 mb-1",children:i.duplicatesTitle}),
|
|
@@ -609,7 +609,7 @@ return Ar("td",{className:"px-2 py-1 font-mono text-gray-700",children:[n.length
|
|
|
609
609
|
/* @__PURE__ */Ar("div",{className:"flex items-center justify-between",children:[
|
|
610
610
|
/* @__PURE__ */Rr("span",{className:"text-xs text-gray-600",children:i.mergeSummary(l,t.length)}),
|
|
611
611
|
/* @__PURE__ */Ar("div",{className:"flex gap-2",children:[
|
|
612
|
-
/* @__PURE__ */Rr(
|
|
612
|
+
/* @__PURE__ */Rr(Je,{onClick:a,className:"text-sm text-gray-500 hover:text-gray-700",children:i.cancel}),
|
|
613
613
|
/* @__PURE__ */Rr("button",{type:"button",onClick:n,className:"bg-blue-600 text-white px-3 h-8 text-sm font-medium rounded-lg hover:bg-blue-700",children:i.proceed})]})]})]})}function Eo({columns:e,onImport:t,description:r,mergeDuplicates:n=!1}){const[a,o]=vr(()=>Array.from({length:15},()=>Array(e.length).fill(""))),[l,i]=vr(!1),[s,c]=vr(""),[d,u]=vr(null),[m,h]=vr(null),[p,g]=vr(null),f=e.length,b=e[0]?.title?.replace(" *","")||"",y=hr().bulkImport,x=pr(),w=a.filter(e=>e[0]?.trim()),v=w.length,k={};for(let t=1;t<e.length;t++){if("text"===vo(e[t],t))continue;let r=0;for(const e of w){const n=parseFloat(xo(e[t]||""));isNaN(n)||(r+=n)}r>0&&(k[e[t].key]=r)}const N=e.map(e=>({key:e.key,title:e.title,width:e.width})),C=Cr(t=>{const r=t.map(t=>{const r=[...t];for(;r.length<f;)r.push("");return r.slice(0,f).map((t,r)=>{const n=vo(e[r],r);return"price"===n||"qty"===n?xo(t):t})});for(;r.length<15;)r.push(Array(f).fill(""));o(R(r,f))},[f,e]),S=ur({accept:".csv,.tsv,.txt",acceptHint:"CSV · TSV · TXT",multiple:!1,onAccept:([t])=>(t=>{const r=new FileReader;r.onload=t=>{const r=(t.target?.result||"").split("\n").map(e=>e.trim()).filter(Boolean).map(wo);if(0===r.length)return;const n=No(r,e);if(n){const t=r.map(t=>e.map((e,r)=>n[r]>=0&&t[n[r]]||""));C(t)}else u(r)},r.readAsText(t)})(t)}),_=async e=>{i(!0);try{await t(e)}catch{c(y.importFailed)}i(!1)},E=r||y.description;/* @__PURE__ */
|
|
614
614
|
return Ar("div",{...S.zoneProps,className:["border rounded-lg bg-gray-50 mb-3 overflow-hidden transition-colors",S.dragOver?"border-dashed border-blue-500 bg-blue-50":"border-gray-200"].join(" "),children:[
|
|
615
615
|
/* @__PURE__ */Ar("div",{className:"px-4 pt-3 pb-2 flex items-center justify-between",children:[
|
|
@@ -665,11 +665,11 @@ return Ar(Wr,{children:[
|
|
|
665
665
|
/* @__PURE__ */Ar("div",{className:"rounded-md bg-green-50 px-4 py-3 flex items-start gap-3",children:[
|
|
666
666
|
/* @__PURE__ */Rr(ar,{name:"check-circle",className:"h-5 w-5 text-green-600 shrink-0 mt-0.5",strokeWidth:2}),
|
|
667
667
|
/* @__PURE__ */Rr("p",{className:"text-sm font-medium text-green-800",children:l.changed})]}),
|
|
668
|
-
/* @__PURE__ */Rr("div",{className:"flex justify-end pt-2 border-t border-gray-200",children:/* @__PURE__ */Rr(
|
|
668
|
+
/* @__PURE__ */Rr("div",{className:"flex justify-end pt-2 border-t border-gray-200",children:/* @__PURE__ */Rr(Qt,{variant:"primary",onClick:()=>t?.(),children:o??l.done})})]}):/* @__PURE__ */Ar("form",{onSubmit:async a=>{if(a.preventDefault(),i)if(c.length<n)p(l.tooShort(n));else if(c===u){p(""),f(!0);try{await e(i,c),r?y(!0):t?.()}catch(e){p(e instanceof Error&&e.message?e.message:l.failed)}finally{f(!1)}}else p(l.mismatch);else p(l.currentRequired)},className:"space-y-4",children:[
|
|
669
669
|
/* @__PURE__ */Rr(T,{label:l.current,required:!0,children:/* @__PURE__ */Rr(M,{type:"password",value:i,onChange:e=>s(e.target.value),required:!0})}),
|
|
670
670
|
/* @__PURE__ */Rr(T,{label:l.newPassword,required:!0,children:/* @__PURE__ */Rr(M,{type:"password",value:c,onChange:e=>d(e.target.value),required:!0,minLength:n})}),
|
|
671
671
|
/* @__PURE__ */Rr(T,{label:l.confirm,required:!0,children:/* @__PURE__ */Rr(M,{type:"password",value:u,onChange:e=>m(e.target.value),required:!0})}),h&&/* @__PURE__ */Rr("p",{className:"text-sm text-red-600",children:h}),
|
|
672
|
-
/* @__PURE__ */Rr("div",{className:"flex justify-end pt-2 border-t border-gray-200",children:/* @__PURE__ */Ar(
|
|
672
|
+
/* @__PURE__ */Rr("div",{className:"flex justify-end pt-2 border-t border-gray-200",children:/* @__PURE__ */Ar(Qt,{type:"submit",variant:"primary",loading:g,children:[a??l.submit,
|
|
673
673
|
/* @__PURE__ */Rr("kbd",{className:"kbd-submit rounded border px-2 py-0.5 text-2xs font-medium",children:pt})]})})]})}var Lo=/* @__PURE__ */Symbol("react-os-shell:timed-out");var Po=/* @__PURE__ */Rr(ar,{name:"page",className:"h-4 w-4",strokeWidth:1.5});function Io({fetchPdf:e,filename:t,label:r,className:n,disabled:a,onEmail:o,onPreviewOpened:l,openPreview:i,icon:s,timeoutMs:c=3e4}){const[d,u]=vr(!1),[m,h]=vr(!1),g=Nr(null),[f,b]=vr({left:0,top:0}),{openPage:y}=$e(),x=hr().pdfAction;kr(()=>{if(d&&g.current){const e=g.current.getBoundingClientRect();b({left:e.left,top:e.bottom+4})}},[d]);const w=async()=>{h(!0);try{return await async function(e,t){if(!Number.isFinite(t)||t<=0)return e;let r;try{return await Promise.race([e,new Promise(e=>{r=setTimeout(()=>e(Lo),t)})])}finally{void 0!==r&&clearTimeout(r)}}(e(),c)}finally{h(!1)}};/* @__PURE__ */
|
|
674
674
|
return Ar(Wr,{children:[
|
|
675
675
|
/* @__PURE__ */Ar("button",{ref:g,type:"button",onClick:()=>u(!d),disabled:a||m,className:n||"inline-flex items-center gap-2 bg-white text-gray-700 border border-gray-300 px-3 min-h-8 py-1 text-sm font-medium rounded-lg hover:bg-gray-50 disabled:opacity-50","data-menu-toggle":!0,children:[m?/* @__PURE__ */Rr(p,{className:"h-4 w-4"}):s??Po,r??x.label,
|
|
@@ -682,4 +682,4 @@ return Ar(Wr,{children:[
|
|
|
682
682
|
/* @__PURE__ */Rr(Wt,{}),
|
|
683
683
|
/* @__PURE__ */Ar(Ot,{onClick:async()=>{u(!1);const e=await w();e!==Lo?e&&o&&o(e):Te.error(x.tookTooLong(t))},children:[
|
|
684
684
|
/* @__PURE__ */Rr(ar,{name:"email",className:"h-4 w-4",strokeWidth:1.5}),x.email]})]})]}),document.body)]})}var $o=yr(null);function Do({value:e,children:t}){/* @__PURE__ */
|
|
685
|
-
return Rr($o.Provider,{value:e,children:t})}function Ao(){return Er($o)??(e=>{throw new Error(`efficient-shell: cannot fetch ${e} — no <ShellEntityFetcherProvider> mounted. If your app registers entity windows, supply an entityFetcher.`)})}function Ro(e){const t=Ke();kr(()=>{if(!t)return;const r=t=>{const r="KeyN"===t.code||"N"===t.key||"n"===t.key;t.altKey&&t.shiftKey&&r&&!t.metaKey&&!t.ctrlKey&&(t.preventDefault(),t.stopPropagation(),e())};return window.addEventListener("keydown",r,!0),()=>window.removeEventListener("keydown",r,!0)},[e,t])}function Wo(e){const t=Ke();kr(()=>{if(!e||!t)return;const r=t=>{const r="KeyE"===t.code||"E"===t.key||"e"===t.key;t.altKey&&t.shiftKey&&r&&!t.metaKey&&!t.ctrlKey&&(t.preventDefault(),t.stopPropagation(),e())};return window.addEventListener("keydown",r,!0),()=>window.removeEventListener("keydown",r,!0)},[e,t])}function Fo(e,t){const r=e?.modalId;return"string"!=typeof r||""===r||(!t||r===t)}function jo(e){const t=Xe();kr(()=>{if(!e)return;const r=r=>{Fo(r.detail,t)&&e()};return document.addEventListener("modal-save",r),()=>document.removeEventListener("modal-save",r)},[e,t])}function Oo(e){const t=Xe();kr(()=>{if(!e)return;const r=r=>{Fo(r.detail,t)&&e()};return document.addEventListener("modal-duplicate",r),()=>document.removeEventListener("modal-duplicate",r)},[e,t])}export{mn as BLOCKED_PCT_CPU,Ha as BehaviorPanel,Eo as BulkImportGrid,Mo as ChangePasswordForm,Wa as Customization,nn as DEV_BANNER_TEXT,Gn as Desktop,Xn as DesktopHostProvider,ln as DevIndicator,ao as EntityList,so as FilterBar,yn as LOG_CAP,_a as Layout,wn as MIN_EVENT_SAMPLES,xn as MIN_GROUP_SAMPLES,rn as NotificationBell,Io as PdfActionButton,jn as PerfStats,to as ResizableTable,un as SMOOTH_FPS,To as ServerStatusIndicator,tn as ShellContextMenu,Do as ShellEntityFetcherProvider,Yr as ShortcutHelp,Ua as SoundsPanel,fa as StartMenu,Xa as SystemPreferences,dn as WidgetManager,vn as appendPerfRecord,on as applyDevTitle,bn as classifyActivity,gn as classifyPerf,Kr as createWindowRegistry,Ur as createWindowTarget,Wn as describeMachine,po as describePerfReport,fo as findDuplicateKeys,an as isDevEnv,kn as isInteracting,
|
|
685
|
+
return Rr($o.Provider,{value:e,children:t})}function Ao(){return Er($o)??(e=>{throw new Error(`efficient-shell: cannot fetch ${e} — no <ShellEntityFetcherProvider> mounted. If your app registers entity windows, supply an entityFetcher.`)})}function Ro(e){const t=Ke();kr(()=>{if(!t)return;const r=t=>{const r="KeyN"===t.code||"N"===t.key||"n"===t.key;t.altKey&&t.shiftKey&&r&&!t.metaKey&&!t.ctrlKey&&(t.preventDefault(),t.stopPropagation(),e())};return window.addEventListener("keydown",r,!0),()=>window.removeEventListener("keydown",r,!0)},[e,t])}function Wo(e){const t=Ke();kr(()=>{if(!e||!t)return;const r=t=>{const r="KeyE"===t.code||"E"===t.key||"e"===t.key;t.altKey&&t.shiftKey&&r&&!t.metaKey&&!t.ctrlKey&&(t.preventDefault(),t.stopPropagation(),e())};return window.addEventListener("keydown",r,!0),()=>window.removeEventListener("keydown",r,!0)},[e,t])}function Fo(e,t){const r=e?.modalId;return"string"!=typeof r||""===r||(!t||r===t)}function jo(e){const t=Xe();kr(()=>{if(!e)return;const r=r=>{Fo(r.detail,t)&&e()};return document.addEventListener("modal-save",r),()=>document.removeEventListener("modal-save",r)},[e,t])}function Oo(e){const t=Xe();kr(()=>{if(!e)return;const r=r=>{Fo(r.detail,t)&&e()};return document.addEventListener("modal-duplicate",r),()=>document.removeEventListener("modal-duplicate",r)},[e,t])}export{mn as BLOCKED_PCT_CPU,Ha as BehaviorPanel,Eo as BulkImportGrid,Mo as ChangePasswordForm,Wa as Customization,nn as DEV_BANNER_TEXT,Gn as Desktop,Xn as DesktopHostProvider,ln as DevIndicator,ao as EntityList,so as FilterBar,yn as LOG_CAP,_a as Layout,wn as MIN_EVENT_SAMPLES,xn as MIN_GROUP_SAMPLES,rn as NotificationBell,Io as PdfActionButton,jn as PerfStats,to as ResizableTable,un as SMOOTH_FPS,To as ServerStatusIndicator,tn as ShellContextMenu,Do as ShellEntityFetcherProvider,Yr as ShortcutHelp,Ua as SoundsPanel,fa as StartMenu,Xa as SystemPreferences,dn as WidgetManager,vn as appendPerfRecord,on as applyDevTitle,bn as classifyActivity,gn as classifyPerf,Kr as createWindowRegistry,Ur as createWindowTarget,Wn as describeMachine,po as describePerfReport,fo as findDuplicateKeys,an as isDevEnv,kn as isInteracting,Jn as layoutModeOf,yo as mergeBulkItems,Mn as perfLogToCsv,go as perfReportFile,Rn as readPerfEnvironment,In as requestAsyncEnvironment,pn as summariseFrames,En as summarisePerfLog,eo as useColumnConfig,Vn as useDesktopHost,Wo as useEditHotkey,mo as useFilters,oo as useInfiniteScroll,Oo as useModalDuplicate,jo as useModalSave,Ro as useNewHotkey,ea as useSetLayoutMode,Ao as useShellEntityFetcher,io as useSort,Ya as useTableNav,Xr as useWindowTarget};
|