efficient-shell 12.3.0 → 12.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/dist/{Browser-OE7IMID6.js → Browser-Z4Q2NDFT.js} +16 -16
- package/dist/Calculator-AHBFZ4EN.js +29 -0
- package/dist/{CurrencyConverter-TLI6PVRE.js → CurrencyConverter-PZYRBADV.js} +8 -8
- package/dist/Files-EX6JA4CJ.js +121 -0
- package/dist/{Notepad-TUW4JP7M.js → Notepad-U4OSPCX3.js} +11 -11
- package/dist/PdfViewer-GUXUWGMG.js +1 -0
- package/dist/{PomodoroTimer-FPGRFPNT.js → PomodoroTimer-WGN2KNSB.js} +7 -7
- package/dist/{Preview-BJRRRU4N.js → Preview-JGRBT3EM.js} +53 -53
- package/dist/Sidebar-F7HHC5GY.js +44 -0
- package/dist/{Stock-P7D5WNKC.js → Stock-5GEEDQVT.js} +3 -3
- package/dist/{Weather-OUHUYBZ6.js → Weather-WMQQXWHH.js} +18 -18
- package/dist/{WorldClock-WXIV2KC6.js → WorldClock-IK3WTHVW.js} +7 -7
- package/dist/ai/index.js +33 -33
- package/dist/apps/ImageAnnotator.d.ts +21 -0
- package/dist/apps/ImageAnnotator.js +2 -0
- package/dist/apps/index.js +1 -1
- package/dist/bin/media-host-check.js +1 -1
- package/dist/bin/ui-check.js +1 -1
- package/dist/brand.css +1 -1
- package/dist/charts/BoxPlotChart.js +1 -1
- package/dist/charts/CandlestickChart.js +1 -1
- package/dist/charts/CartesianPlot.js +1 -1
- package/dist/charts/ChartTooltip.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.js +1 -1
- package/dist/charts/FlowChart.js +1 -1
- package/dist/charts/FunnelChart.js +1 -1
- package/dist/charts/HeatmapChart.js +1 -1
- package/dist/charts/HistogramChart.js +1 -1
- package/dist/charts/PieChart.js +1 -1
- package/dist/charts/RadarChart.js +1 -1
- package/dist/charts/RadialBarChart.js +1 -1
- package/dist/charts/RangeChart.js +1 -1
- package/dist/charts/SankeyChart.js +1 -1
- package/dist/charts/ScatterChart.js +1 -1
- package/dist/charts/SpecChart.js +1 -1
- package/dist/charts/SunburstChart.js +1 -1
- package/dist/charts/TimeSeriesChart.js +1 -1
- package/dist/charts/TreemapChart.js +1 -1
- package/dist/charts/WaterfallChart.js +1 -1
- package/dist/{chunk-NRLTGGCS.js → chunk-2BMGV6DE.js} +8 -8
- package/dist/chunk-2YRLRMZH.js +23 -0
- package/dist/{chunk-5BV2WW74.js → chunk-3LTZ4N46.js} +11 -11
- package/dist/{chunk-MQKUGIN7.js → chunk-3PWI5IH7.js} +13 -13
- package/dist/{chunk-Q2MW334M.js → chunk-3UHTHQGK.js} +8 -8
- package/dist/{chunk-RQ4UIWWD.js → chunk-4UGFNTZ3.js} +11 -11
- package/dist/{chunk-Y7ANTS5W.js → chunk-4ZUV6WQT.js} +1 -1
- package/dist/{chunk-P4L74UA5.js → chunk-525O4AUQ.js} +1 -1
- package/dist/chunk-56GGBTAD.js +3 -0
- package/dist/{chunk-KDWK5WGU.js → chunk-57YY4J6T.js} +1 -1
- package/dist/{chunk-IL56C56I.js → chunk-5JUG74UR.js} +2 -2
- package/dist/{chunk-TKXUDCOI.js → chunk-5MO5JBBK.js} +1 -1
- package/dist/{chunk-6TLSXBKC.js → chunk-62275PI2.js} +1 -1
- package/dist/{chunk-5LZTYOYD.js → chunk-6BATVJBA.js} +17 -17
- package/dist/{chunk-2KNVUOWJ.js → chunk-6C4T3HRB.js} +19 -19
- package/dist/{chunk-SSUZAOGI.js → chunk-6U25ELYF.js} +10 -10
- package/dist/{chunk-QOQ6GXVA.js → chunk-75MSXRFY.js} +5 -5
- package/dist/{chunk-UDL2A2GT.js → chunk-7RRJPNYN.js} +3 -3
- package/dist/{chunk-ZXNJSSRV.js → chunk-A4KQKN32.js} +1 -1
- package/dist/chunk-A6WZF65N.js +22 -0
- package/dist/{chunk-DONZDILI.js → chunk-AAIUJJDQ.js} +1 -1
- package/dist/chunk-BG2OL3MO.js +7 -0
- package/dist/{chunk-ZZ67Q5HJ.js → chunk-BKKKIHHV.js} +6 -6
- package/dist/{chunk-KZNJXV5I.js → chunk-BQ5CRQYR.js} +2 -2
- package/dist/chunk-BTFBXZS2.js +1 -0
- package/dist/chunk-BUGTNNZQ.js +15 -0
- package/dist/chunk-C57PNNAW.js +13 -0
- package/dist/{chunk-DULMOL3I.js → chunk-C5LBNLFJ.js} +1 -1
- package/dist/chunk-CAXOKGMB.js +27 -0
- package/dist/{chunk-WGLHB6WE.js → chunk-CJH2BGXY.js} +1 -1
- package/dist/chunk-CURXYF2R.js +9 -0
- package/dist/{chunk-ZRLWE3JM.js → chunk-DANLBFBD.js} +1 -1
- package/dist/{chunk-JYGUTY6R.js → chunk-DFYXIW4O.js} +1 -1
- package/dist/{chunk-GZJ5F7SB.js → chunk-DJ2XDBAO.js} +5 -5
- package/dist/{chunk-PFMZL3ZG.js → chunk-DW45EZHA.js} +2 -2
- package/dist/{chunk-GYDCXCJT.js → chunk-EB2UE6ZR.js} +1 -1
- package/dist/{chunk-OR5HUQSB.js → chunk-EEVLRCMA.js} +7 -7
- package/dist/{chunk-FGCIEJPP.js → chunk-EIY6YGEZ.js} +1 -1
- package/dist/{chunk-THASH6OO.js → chunk-EUUCNDIS.js} +9 -9
- package/dist/{chunk-5PP435FL.js → chunk-EYPKBJYG.js} +1 -1
- package/dist/{chunk-ASQX3GXB.js → chunk-FLTPVFKA.js} +5 -5
- package/dist/chunk-FPYABAOX.js +69 -0
- package/dist/chunk-FVZXRGVM.js +8 -0
- package/dist/{chunk-67JHJO6V.js → chunk-G7I255HN.js} +13 -13
- package/dist/{chunk-2YBJQUYQ.js → chunk-GEXETMGL.js} +1 -1
- package/dist/chunk-GEZ45J4Z.js +2 -0
- package/dist/chunk-GUIJCTFJ.js +8 -0
- package/dist/{chunk-7JY3YYN4.js → chunk-GZQD6IBV.js} +3 -3
- package/dist/chunk-H7HRYFRQ.js +14 -0
- package/dist/{chunk-AANXPLMA.js → chunk-I5BS6AP6.js} +4 -4
- package/dist/chunk-I5CSYOOZ.js +28 -0
- package/dist/chunk-I64TVNHS.js +6 -0
- package/dist/{chunk-F44E76EC.js → chunk-IFQXTIMY.js} +4 -4
- package/dist/chunk-IHPAYSTJ.js +8 -0
- package/dist/{chunk-QTMRW6DK.js → chunk-IXBKWVEP.js} +1 -1
- package/dist/{chunk-O6H2ZD32.js → chunk-J53LQWWY.js} +7 -7
- package/dist/{chunk-IXAYZNOZ.js → chunk-JM2IQC4J.js} +1 -1
- package/dist/{chunk-FZM3ZPW3.js → chunk-JPNAEN53.js} +1 -1
- package/dist/{chunk-S4FPYCUU.js → chunk-JQBVSPF5.js} +3 -3
- package/dist/{chunk-XGVMOV3O.js → chunk-KDTL6VEC.js} +8 -8
- package/dist/{chunk-KT5LLPUV.js → chunk-KQDSAN75.js} +1 -1
- package/dist/{chunk-2XQOK3CT.js → chunk-KUEYOJBN.js} +2 -2
- package/dist/{chunk-QA33EHHO.js → chunk-LCC3NXQX.js} +6 -6
- package/dist/{chunk-7JGR7WPD.js → chunk-LFYZ7NQ4.js} +3 -3
- package/dist/chunk-M54OL3YR.js +2 -0
- package/dist/chunk-MGW7SX53.js +11 -0
- package/dist/{chunk-3QYAYBJE.js → chunk-MOMOZVOW.js} +3 -3
- package/dist/{chunk-RYBYTUGZ.js → chunk-N442GPRJ.js} +1 -1
- package/dist/{chunk-6NHPL5JL.js → chunk-N6Q7HNAH.js} +1 -1
- package/dist/{chunk-RXHTIJ64.js → chunk-N7JX27JE.js} +1 -1
- package/dist/{chunk-SKFFBBAG.js → chunk-N7YHXL2F.js} +2 -2
- package/dist/{chunk-GR43CABV.js → chunk-ND5IZ37V.js} +5 -5
- package/dist/{chunk-LKVS4WCZ.js → chunk-NEYHBQLG.js} +3 -3
- package/dist/{chunk-ZDO62V4I.js → chunk-NIBE57KV.js} +1 -1
- package/dist/{chunk-6Y2BQI44.js → chunk-NS37Y5CN.js} +3 -3
- package/dist/chunk-OLVKHYHV.js +9 -0
- package/dist/{chunk-CVLWJBR5.js → chunk-PIWC3CAC.js} +1 -1
- package/dist/chunk-PMJMYH5O.js +5 -0
- package/dist/{chunk-6GDZUW3L.js → chunk-PVXX77MY.js} +6 -6
- package/dist/{chunk-NHNRNT4T.js → chunk-QIUIP6YZ.js} +2 -2
- package/dist/{chunk-NJN5IKWO.js → chunk-QQ2LDC6C.js} +1 -1
- package/dist/{chunk-FAIHSCOG.js → chunk-RBMZSZOH.js} +1 -1
- package/dist/{chunk-53WYJ5LZ.js → chunk-RFKCSRJX.js} +10 -10
- package/dist/chunk-RJ3J4BLH.js +1 -0
- package/dist/{chunk-NDLXD4EY.js → chunk-RNQBWWYR.js} +5 -5
- package/dist/{chunk-N5KO2IHG.js → chunk-RQDVAUXD.js} +4 -4
- package/dist/{chunk-B5OYS65L.js → chunk-RVQUSPXC.js} +1 -1
- package/dist/chunk-SBZCJNNP.js +11 -0
- package/dist/{chunk-RDKIYORS.js → chunk-SYZLS2JA.js} +1 -1
- package/dist/chunk-TQWLJ5VM.js +7 -0
- package/dist/{chunk-RM74EAMV.js → chunk-TS36J7RW.js} +2 -2
- package/dist/{chunk-ZATTQ3FX.js → chunk-TTQ7K4AJ.js} +1 -1
- package/dist/{chunk-FPRQB5W6.js → chunk-UDHJTQBA.js} +12 -12
- package/dist/{chunk-P3BLJCTQ.js → chunk-UDVQORQM.js} +3 -3
- package/dist/chunk-UGOJLNYR.js +1 -0
- package/dist/chunk-UJJXWLHE.js +2 -0
- package/dist/{chunk-CF4YOJUQ.js → chunk-UPTKROT7.js} +9 -9
- package/dist/{chunk-SGNJ7I7P.js → chunk-UVBX5LEU.js} +4 -4
- package/dist/{chunk-HRMG2WMW.js → chunk-UWF45S5L.js} +23 -23
- package/dist/chunk-VIOILTE4.js +13 -0
- package/dist/{chunk-M3PUAGXJ.js → chunk-VWQNCYGQ.js} +7 -7
- package/dist/{chunk-2B4EKAZL.js → chunk-VYMM2BPX.js} +2 -2
- package/dist/{chunk-HNQKXOFU.js → chunk-WCPAQHHA.js} +1 -1
- package/dist/{chunk-36VIGB6J.js → chunk-WDQI3FV6.js} +6 -6
- package/dist/chunk-WUGQAZMC.js +14 -0
- package/dist/{chunk-74LZVJND.js → chunk-X32TVINY.js} +1 -1
- package/dist/{chunk-LBMC6GR5.js → chunk-XK4SMAVR.js} +1 -1
- package/dist/{chunk-U7PXMVIY.js → chunk-XK4U5MAS.js} +3 -3
- package/dist/{chunk-S6BGMLXI.js → chunk-XMH2JOZ2.js} +1 -1
- package/dist/{chunk-TE6R53YD.js → chunk-XWFLIGDQ.js} +1 -1
- package/dist/{chunk-PA273FZF.js → chunk-YMAU4EIK.js} +1 -1
- package/dist/{chunk-LDEFEPPL.js → chunk-YRJJKF5H.js} +1 -1
- package/dist/{chunk-7TZRICMH.js → chunk-YU6KOO6O.js} +4 -4
- package/dist/chunk-YZR4T5FZ.js +7 -0
- package/dist/{chunk-NC36LJCA.js → chunk-ZB2H2JJ2.js} +4 -4
- package/dist/{chunk-FLYOI6EW.js → chunk-ZOZEQZUA.js} +1 -1
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/format/index.js +1 -1
- package/dist/forms/AlignmentGrid.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Button.js +1 -1
- package/dist/forms/ColorPicker.js +1 -1
- package/dist/forms/ComposerAttachments.js +1 -1
- package/dist/forms/CornersInput.js +1 -1
- package/dist/forms/DatePicker.js +1 -1
- package/dist/forms/DateRangePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/IconButton.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/Input.js +1 -1
- package/dist/forms/InputNumber.js +1 -1
- package/dist/forms/LinkPicker.js +1 -1
- package/dist/forms/MediaLibrary.js +1 -1
- package/dist/forms/MediaUploadField.js +1 -1
- package/dist/forms/MediaUploadGrid.js +1 -1
- package/dist/forms/MediaUsedInList.js +1 -1
- package/dist/forms/NumericKeypad.js +1 -1
- package/dist/forms/PictureTiles.js +1 -1
- package/dist/forms/PositionInput.js +1 -1
- package/dist/forms/RenameField.js +1 -1
- package/dist/forms/Segmented.js +1 -1
- package/dist/forms/Select.js +1 -1
- package/dist/forms/SidesInput.js +1 -1
- package/dist/forms/Slider.js +1 -1
- package/dist/forms/Snippet.js +1 -1
- package/dist/forms/SplitButton.js +1 -1
- package/dist/forms/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/icons/efficient-glyphs.js +1 -1
- package/dist/icons/efficient-looks.js +1 -1
- package/dist/icons/efficient.js +1 -1
- package/dist/icons/looks/map.js +1 -1
- package/dist/icons/payment.js +1 -1
- package/dist/icons/sets.js +1 -1
- package/dist/index.d.ts +2 -19
- package/dist/index.js +416 -416
- package/dist/map/index.js +2 -2
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContextMenu.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/DropdownMenu.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/GlobalSearch.js +1 -1
- package/dist/shell/HelpCenter.js +1 -1
- package/dist/shell/IconRail.js +1 -1
- package/dist/shell/ImageLightbox.js +1 -1
- package/dist/shell/ItemCount.js +1 -1
- package/dist/shell/LanguageSelect.js +1 -1
- package/dist/shell/Markdown.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/Popover.js +1 -1
- package/dist/shell/PopupMenu.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/SearchableSelect.js +1 -1
- package/dist/shell/SettingReset.js +1 -1
- package/dist/shell/SettingRow.js +1 -1
- package/dist/shell/SidebarLayout.js +1 -1
- package/dist/shell/SidebarNav.js +1 -1
- package/dist/shell/SortableList.js +1 -1
- package/dist/shell/StatusBadge.js +1 -1
- package/dist/shell/Tabs.js +1 -1
- package/dist/shell/TimelineTrack.js +1 -1
- package/dist/shell/Tooltip.js +1 -1
- package/dist/shell/TopNav.js +1 -1
- package/dist/shell/TransferProgress.js +1 -1
- package/dist/shell/Tree.js +1 -1
- package/dist/shell/discardGuard.js +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/templates/AuthScreen.js +1 -1
- package/dist/templates/ChatTemplate.js +1 -1
- package/dist/templates/CheckoutTemplate.js +1 -1
- package/dist/templates/DashboardTemplate.js +1 -1
- package/dist/templates/DataTablePage.js +1 -1
- package/dist/templates/EmailTemplate.js +1 -1
- package/dist/templates/ErrorBoundary.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -1
- package/dist/ui.css +10 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-W6YA44OY.js +0 -29
- package/dist/Files-5WRVSC5R.js +0 -121
- package/dist/PdfViewer-GFQAIHDP.js +0 -1
- package/dist/Sidebar-ROMFJHCD.js +0 -44
- package/dist/chunk-4DZVWK7U.js +0 -7
- package/dist/chunk-5N6AC3LN.js +0 -15
- package/dist/chunk-6JKSRXZM.js +0 -8
- package/dist/chunk-AUZKIL62.js +0 -23
- package/dist/chunk-B3PNZBZM.js +0 -27
- package/dist/chunk-DCICBH2L.js +0 -3
- package/dist/chunk-DICWZEGH.js +0 -2
- package/dist/chunk-EOVXFXVV.js +0 -2
- package/dist/chunk-F245EG2A.js +0 -9
- package/dist/chunk-FPZBHNZU.js +0 -7
- package/dist/chunk-GIUX7WUS.js +0 -7
- package/dist/chunk-GMLGR4R6.js +0 -8
- package/dist/chunk-IMRGGJIJ.js +0 -22
- package/dist/chunk-IWFWPFYQ.js +0 -13
- package/dist/chunk-KZD2AFH2.js +0 -13
- package/dist/chunk-LE5LWALR.js +0 -1
- package/dist/chunk-LJJSFJA2.js +0 -69
- package/dist/chunk-M3OEWPXZ.js +0 -1
- package/dist/chunk-NPQBJJLP.js +0 -9
- package/dist/chunk-NSOAHIQZ.js +0 -11
- package/dist/chunk-SEJAT3UE.js +0 -1
- package/dist/chunk-SPJIFRNY.js +0 -8
- package/dist/chunk-SYDGCECZ.js +0 -14
- package/dist/chunk-UCIOCS4X.js +0 -2
- package/dist/chunk-UMQLDWSS.js +0 -6
- package/dist/chunk-VF53GD6D.js +0 -5
- package/dist/chunk-WD3I7AEZ.js +0 -14
- package/dist/chunk-YAQ5RF3H.js +0 -28
- package/dist/chunk-ZICLAMMR.js +0 -11
- /package/dist/{chunk-R3K2BNFF.js → chunk-2762IAB7.js} +0 -0
- /package/dist/{chunk-K5A62ZS5.js → chunk-T75VCE6K.js} +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import{useAuth as e,parseOpenSections as t,readStored as r,RAIL_OPEN_SECTIONS_KEY as n,RAIL_WIDTH_KEY as a,toggleOpenSection as i,writeStored as l}from"./chunk-U6LKNGC6.js";import{ResizeHandle as o}from"./chunk-KUEYOJBN.js";import{openGlobalSearch as s}from"./chunk-4KJ7MLWO.js";import{partitionNav as c,visibleNavChildren as d,flyoutGroups as m,visibleSectionItems as h,rowsContainRoute as u}from"./chunk-WGRS6QBT.js";import{BrandMark as p}from"./chunk-MI67DI3H.js";import{IconButton_default as b}from"./chunk-UGOJLNYR.js";import{RAIL_MENU_GAP as f,navSections as g,startMenuCategories as x,TAB_STRIP_H as k,RAIL_COLLAPSED_INSET as y,RAIL_W as v,RAIL_MAX_W as N,RAIL_MIN_W as j,navIcons as C,sectionIcons as w}from"./chunk-4LXCCZDM.js";import"./chunk-5A7MWTXX.js";import"./chunk-7QSDPSXP.js";import"./chunk-2QY5BJLA.js";import{PopupMenu as S,PopupMenuItem as L,PopupMenuDivider as W,PopupMenuLabel as z}from"./chunk-IFQXTIMY.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-XWFLIGDQ.js";import{Icon as $}from"./chunk-UIWGVOFH.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-QQ2LDC6C.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import{useShellStrings as I}from"./chunk-43MCNASD.js";import"./chunk-C3QOHMR6.js";import{useMemo as A,useState as M,useRef as H,useEffect as Q,isValidElement as R,cloneElement as T}from"react";import{jsx as D,jsxs as K,Fragment as J}from"react/jsx-runtime";var U="undefined"!=typeof navigator&&/Mac|iPhone|iPad/.test(navigator.platform);function B(e,t,r){const n=Math.max(8,r-t.bottom);return{left:e+f,bottom:n,maxHeight:r-n-8,overflowY:"auto"}}var Y=(e,t)=>["flex h-(--row-height-menu) w-full items-center gap-3 rounded-md px-3 text-left text-sm font-medium transition-colors",t?"justify-center px-0":"",e?"bg-gray-100 text-gray-900":"text-gray-600 hover:bg-gray-100 hover:text-gray-900"].join(" "),G="flex size-[18px] shrink-0 items-center justify-center [&>svg]:size-[18px]";function O({open:e,children:t}){const r=H(null);return Q(()=>{r.current?.toggleAttribute("inert",!e)},[e]),/* @__PURE__ */D("div",{ref:r,className:"grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none",style:{gridTemplateRows:e?"1fr":"0fr",opacity:e?1:0},"aria-hidden":!e,"data-fold":e?"open":"closed",children:/* @__PURE__ */D("div",{className:"min-h-0 overflow-hidden",children:t})})}function P({open:e}){/* @__PURE__ */
|
|
2
|
+
return D($,{name:"chevron-down",className:"size-4 shrink-0 transition-transform "+(e?"rotate-180":""),strokeWidth:2,"aria-hidden":"true"})}function X({dir:e}){/* @__PURE__ */
|
|
3
|
+
return D($,"left"===e?{name:"chevron-double-left",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"}:{name:"chevron-double-right",className:"size-[18px] shrink-0",strokeWidth:1.5,"aria-hidden":"true"})}function F({className:e}){/* @__PURE__ */
|
|
4
|
+
return D($,{name:"search",className:e,strokeWidth:2,"aria-hidden":"true"})}var _=e=>.75+1.75*e+"rem";function V({width:V,collapsed:Z,onToggleCollapsed:E,onResize:q,onHome:ee,onOpen:te,activeRoute:re,profile:ne,user:ae,onLogout:ie,onSwitchToDesktop:le,onReportBug:oe,onClose:se,navSections:ce=g,navIcons:de=C,sectionIcons:me=w,categories:he=x,productName:ue,productIcon:pe,tagline:be,adaptiveLogo:fe=!1,logoHasAlpha:ge=null,logoIsLight:xe=null}){const ke=I().layout,{hasAnyPerm:ye}=e(),ve=A(()=>c(ce,he,ye),[ce,he,ye]),[Ne,je]=M(()=>t(r(n))),Ce=A(()=>[...ve.topItems.filter(e=>d(e,ye).length>0).map(e=>`child:${e.to}`),...[...ve.erpSections,...ve.systemSections,...ve.virtualSections,...ve.footerSections].map(e=>e.label)],[ve,ye]),we=(e,t=Ce)=>je(r=>{const a=i(r,e,t);return l(n,JSON.stringify([...a])),a}),[Se,Le]=M(null),[We,ze]=M(!1),$e=H(null);Q(()=>{Z||Le(null)},[Z]);const Ie=(e,t)=>{Le(null),e.onSelect?e.onSelect():te(e.to,!!t&&(e=>e.metaKey||e.ctrlKey||1===e.button)(t))},Ae=(e,t)=>{const r=t[e];/* @__PURE__ */
|
|
5
|
+
return D("span",{className:G,"aria-hidden":"true",children:r&&R(r)?T(r,{className:"size-[18px]"}):r})},Me=e=>e.filter(e=>d(e,ye).length>0).map(e=>`child:${e.to}`),He=(e,t,r=Ce)=>{const n=d(e,ye),a=e.menuLabel??e.label;if(n.length>0){const i=`child:${e.to}`,l=Ne.has(i),o=!l&&u(n,re,ye);/* @__PURE__ */
|
|
6
|
+
return K("div",{children:[
|
|
7
|
+
/* @__PURE__ */K("button",{type:"button",onClick:()=>we(i,r),"aria-expanded":l,className:Y(o,!1),style:t>0?{paddingLeft:_(t)}:void 0,children:[0===t&&Ae(e.to,de),
|
|
8
|
+
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate",children:a}),
|
|
9
|
+
/* @__PURE__ */D(P,{open:l})]}),
|
|
10
|
+
/* @__PURE__ */D(O,{open:l,children:/* @__PURE__ */D("div",{className:"space-y-0.5 pt-0.5",children:n.map(e=>He(e,t+1,Me(n)))})}),e.dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:_(t)},"aria-hidden":"true"})]},e.to)}const i=e.to===re;/* @__PURE__ */
|
|
11
|
+
return K("div",{children:[
|
|
12
|
+
/* @__PURE__ */K("button",{type:"button",onClick:t=>Ie(e,t),onAuxClick:t=>{1===t.button&&Ie(e,t)},"aria-current":i?"page":void 0,className:Y(i,!1),style:t>0?{paddingLeft:_(t)}:void 0,children:[0===t&&Ae(e.to,de),
|
|
13
|
+
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate",children:a})]}),e.dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-gray-200",style:{marginLeft:_(t)},"aria-hidden":"true"})]},e.to)},Qe=(e,t)=>{const r=t?e.items:h(e,ye);if(0===r.length)return null;const n="icon"in e&&e.icon?/* @__PURE__ */D("span",{className:G,"aria-hidden":"true",children:e.icon}):Ae(e.label,me),a=e.menuLabel??e.label,i=u(r,re,ye),l="dividerAfter"in e&&e.dividerAfter;if(Z)/* @__PURE__ */
|
|
14
|
+
return K("div",{children:[
|
|
15
|
+
/* @__PURE__ */D("button",{type:"button",title:a,"aria-label":a,"aria-haspopup":"menu","aria-expanded":Se?.label===e.label,onClick:t=>{const n=t.currentTarget.getBoundingClientRect();Le(t=>t?.label===e.label?null:{label:e.label,items:r,top:n.top})},className:Y(i||Se?.label===e.label,!0),children:n}),l&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label);const o=Ne.has(e.label),s=`rosh-rail-${e.label.replace(/[^a-z0-9]+/gi,"-").toLowerCase()}`;/* @__PURE__ */
|
|
16
|
+
return K("div",{children:[
|
|
17
|
+
/* @__PURE__ */K("button",{type:"button",onClick:()=>we(e.label),"aria-expanded":o,"aria-controls":s,className:Y(!o&&i,!1),children:[n,
|
|
18
|
+
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate",children:a}),
|
|
19
|
+
/* @__PURE__ */D(P,{open:o})]}),
|
|
20
|
+
/* @__PURE__ */D(O,{open:o,children:/* @__PURE__ */D("div",{id:s,role:"group","aria-label":a,className:"space-y-0.5 pt-0.5",children:r.map(e=>He(e,1,Me(r)))})}),l&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.label)},Re=ne?.first_name?`${ne.first_name} ${ne.last_name||""}`.trim():ae?.email||"",Te=(ne?.first_name?.charAt(0)||ae?.email?.charAt(0)||"?").toUpperCase(),De=ne?.avatar_url?/* @__PURE__ */D("img",{src:ne.avatar_url,alt:"",className:"size-8 shrink-0 rounded-full object-cover"}):/* @__PURE__ */D("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-full bg-blue-600 text-xs font-semibold text-white",children:Te}),Ke=We?$e.current?.getBoundingClientRect():void 0,Je=Z?"":"px-3",Ue=Z?{paddingInline:y}:void 0,Be=`${Z?ke.expandSidebar:ke.collapseSidebar} (${U?"⌘":"Ctrl"} .)`,Ye=ee?{run:ee,label:ke.goHome,title:ke.goHome}:se?null:{run:E,label:Z?ke.expandSidebar:ke.collapseSidebar,title:Be},Ge=/* @__PURE__ */K(J,{children:[pe&&/* @__PURE__ */D(p,{src:pe,alt:"",slot:"compact",surface:"light",adaptive:fe,hasAlpha:ge,isLight:xe,size:28,decorative:!0}),!Z&&/* @__PURE__ */K("span",{className:"min-w-0 text-left leading-tight",children:[
|
|
21
|
+
/* @__PURE__ */D("span",{className:"block truncate text-base font-bold tracking-wide text-gray-900",children:ue??"Apps"}),be&&/* @__PURE__ */D("span",{className:"block truncate text-2xs font-medium text-gray-500",children:be})]})]}),Oe=ve.erpSections.length>0||ve.systemSections.length>0||ve.virtualSections.length>0;/* @__PURE__ */
|
|
22
|
+
return K("aside",{"aria-label":ke.navLabel,className:"fixed left-0 top-0 z-(--z-sidebar) flex h-dvh flex-col border-r border-line bg-surface text-ink-strong",style:{width:V},children:[
|
|
23
|
+
/* @__PURE__ */K("div",{className:"flex shrink-0 items-center border-b border-gray-200 "+(Z?"justify-center":"justify-between gap-2 pl-4 pr-2"),style:{height:k},children:[Ye?/* @__PURE__ */D("button",{type:"button",onClick:Ye.run,"aria-label":Ye.label,title:Ye.title,className:"flex min-w-0 items-center gap-2 rounded-md transition-colors hover:bg-gray-100 "+(Z?"justify-center p-0.5":"-ml-1 p-1"),children:Ge}):/* @__PURE__ */D("span",{className:"flex min-w-0 items-center gap-2",children:Ge}),se?/* @__PURE__ */D(b,{onClick:se,"aria-label":ke.closeMenu,children:/* @__PURE__ */D($,{name:"close",className:"size-[18px]",strokeWidth:1.5,"aria-hidden":"true"})}):!Z&&/* @__PURE__ */D("button",{type:"button",onClick:E,"aria-label":ke.collapseSidebar,title:`${ke.collapseSidebar} (${U?"⌘":"Ctrl"} .)`,className:"flex size-8 shrink-0 items-center justify-center rounded-md text-gray-500 transition-colors hover:bg-gray-100 hover:text-gray-900",children:/* @__PURE__ */D(X,{dir:"left"})})]}),
|
|
24
|
+
/* @__PURE__ */D("div",{className:`shrink-0 pt-3 ${Je}`,style:Ue,children:Z?/* @__PURE__ */D("button",{type:"button",onClick:s,"aria-label":ke.search,title:`${ke.search} (${U?"⌘K":"Ctrl K"})`,className:Y(!1,!0),children:/* @__PURE__ */D(F,{className:"size-[18px] shrink-0"})}):/* @__PURE__ */K("button",{type:"button",onClick:s,className:"flex h-(--row-height-menu) w-full items-center gap-2 rounded-md border border-line bg-surface px-3 text-left transition-colors hover:bg-gray-100",children:[
|
|
25
|
+
/* @__PURE__ */D(F,{className:"size-3.5 text-gray-500"}),
|
|
26
|
+
/* @__PURE__ */D("span",{className:"min-w-0 flex-1 truncate text-sm text-ink-faint",children:ke.search}),
|
|
27
|
+
/* @__PURE__ */D("kbd",{className:"rounded border border-line bg-gray-100 px-2 py-0.5 font-mono text-2xs font-semibold text-ink-faint",children:U?"⌘K":"Ctrl K"})]})}),
|
|
28
|
+
/* @__PURE__ */K("nav",{"aria-label":ke.navLabel,className:`min-h-0 flex-1 overflow-y-auto pb-4 pt-3 ${Je} ${Z?"space-y-1":"space-y-0.5"}`,style:Ue,children:[Z&&/* @__PURE__ */D("button",{type:"button",onClick:E,"aria-label":ke.expandSidebar,title:`${ke.expandSidebar} (${U?"⌘":"Ctrl"} .)`,className:`${Y(!1,!0)} mb-3`,children:/* @__PURE__ */D(X,{dir:"right"})}),ve.topItems.map(e=>{if(!Z)return He(e,0);const t=d(e,ye),r=e.to===re||u(t,re,ye),n=e.menuLabel??e.label;/* @__PURE__ */
|
|
29
|
+
return K("div",{children:[
|
|
30
|
+
/* @__PURE__ */D("button",{type:"button",title:n,"aria-label":n,onClick:r=>{if(0===t.length)return void Ie(e,r);const n=r.currentTarget.getBoundingClientRect();Le(r=>r?.label===e.to?null:{label:e.to,items:t,top:n.top})},className:Y(r,!0),children:Ae(e.to,de)}),e.dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"})]},e.to)}),ve.topItems.length>0&&Oe&&!ve.topItems[ve.topItems.length-1].dividerAfter&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.erpSections.map(e=>Qe(e,!1)),ve.systemSections.map(e=>Qe(e,!1)),ve.virtualSections.map(e=>Qe(e,!0)),ve.footerSections.length>0&&/* @__PURE__ */D("div",{className:"mx-2 my-2 border-t border-line","aria-hidden":"true"}),ve.footerSections.map(e=>Qe(e,!1))]}),
|
|
31
|
+
/* @__PURE__ */D("div",{className:`shrink-0 border-t border-gray-200 py-2 ${Je}`,style:Ue,children:/* @__PURE__ */K("button",{ref:$e,type:"button",onClick:()=>ze(e=>!e),"aria-haspopup":"menu","aria-expanded":We,"aria-label":Z?ke.accountMenu(Re):void 0,className:"flex w-full items-center gap-3 rounded-md hover:bg-gray-100 "+(Z?"justify-center py-2":"px-2 py-2"),children:[De,!Z&&/* @__PURE__ */K("span",{className:"min-w-0 flex-1 text-left",children:[
|
|
32
|
+
/* @__PURE__ */D("span",{className:"block truncate text-sm font-semibold text-ink-strong",children:Re}),ae?.email&&Re!==ae.email&&/* @__PURE__ */D("span",{className:"block truncate text-2xs text-ink-faint",children:ae.email})]})]})}),q&&!Z&&!se&&/* @__PURE__ */D(o,{side:"left",width:V,onResize:q,min:j,max:N,defaultWidth:v,storageKey:a,label:ke.resizeSidebar}),We&&Ke&&/* @__PURE__ */K(S,{portal:!0,minWidth:224,onClose:()=>ze(!1),style:B(V,Ke,window.innerHeight),children:[Z&&/* @__PURE__ */K("div",{className:"border-b border-line px-3 py-3",children:[
|
|
33
|
+
/* @__PURE__ */D("p",{className:"truncate text-sm font-semibold text-gray-800",children:Re}),ae?.email&&/* @__PURE__ */D("p",{className:"truncate text-xs text-gray-500",children:ae.email})]}),
|
|
34
|
+
/* @__PURE__ */K(L,{onClick:()=>{ze(!1),te("/profile",!1)},children:[
|
|
35
|
+
/* @__PURE__ */D($,{name:"account",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.profile]}),ve.footerItems.map(e=>/* @__PURE__ */K(L,{onClick:()=>{ze(!1),Ie(e)},children:[
|
|
36
|
+
/* @__PURE__ */D("span",{className:"h-4 w-4 [&>svg]:size-4","aria-hidden":"true",children:de[e.to]}),e.menuLabel??e.label]},e.to)),oe&&/* @__PURE__ */K(L,{onClick:()=>{ze(!1),oe()},children:[
|
|
37
|
+
/* @__PURE__ */D($,{name:"error",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.reportIssue]}),
|
|
38
|
+
/* @__PURE__ */D(W,{}),le&&/* @__PURE__ */K(J,{children:[
|
|
39
|
+
/* @__PURE__ */K(L,{onClick:()=>{ze(!1),le()},children:[
|
|
40
|
+
/* @__PURE__ */D($,{name:"desktop",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.switchToDesktop]}),
|
|
41
|
+
/* @__PURE__ */D(W,{})]}),
|
|
42
|
+
/* @__PURE__ */K(L,{danger:!0,onClick:()=>{ze(!1),ie()},children:[
|
|
43
|
+
/* @__PURE__ */D($,{name:"logout",className:"h-4 w-4",strokeWidth:1.5,"aria-hidden":"true"}),ke.signOut]})]}),Se&&Z&&/* @__PURE__ */D(S,{portal:!0,minWidth:220,onClose:()=>Le(null),style:{left:V+f,top:Math.min(Se.top,window.innerHeight-48*Math.min(Se.items.length,10)-16)},children:m(Se.items,ye).map((e,t)=>/* @__PURE__ */K("div",{role:e.heading?"group":void 0,"aria-label":e.heading?e.heading.menuLabel??e.heading.label:void 0,children:[t>0&&/* @__PURE__ */D(W,{}),e.heading&&/* @__PURE__ */D(z,{children:e.heading.menuLabel??e.heading.label}),e.items.map(e=>/* @__PURE__ */K(L,{onClick:()=>Ie(e),children:[Ae(e.to,de),
|
|
44
|
+
/* @__PURE__ */D("span",{className:e.to===re?"font-semibold":"",children:e.menuLabel??e.label})]},e.to))]},e.heading?.to??`run-${t}`))})]})}export{B as accountMenuPosition,V as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-
|
|
1
|
+
import{loadAppearance as e,WidgetSettingsModal as t}from"./chunk-NIBE57KV.js";import{useWidgetSettings as n}from"./chunk-UWF45S5L.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-Y4RERPFN.js";import"./chunk-5A7MWTXX.js";import"./chunk-ZDMZM7HD.js";import"./chunk-HE767CVB.js";import"./chunk-CAXOKGMB.js";import"./chunk-PMJMYH5O.js";import"./chunk-N7JX27JE.js";import"./chunk-3DVNXNTF.js";import"./chunk-2762IAB7.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-5JUG74UR.js";import"./chunk-SCGBCBXP.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import"./chunk-KC3EX26K.js";import"./chunk-CDAJKLGL.js";import"./chunk-JPNAEN53.js";import"./chunk-IFQXTIMY.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UJJXWLHE.js";import"./chunk-XWFLIGDQ.js";import"./chunk-UIWGVOFH.js";import"./chunk-J75ZT2JQ.js";import"./chunk-R2VKEMZH.js";import"./chunk-CJH2BGXY.js";import"./chunk-QQ2LDC6C.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-43MCNASD.js";import"./chunk-C3QOHMR6.js";import{useState as r,useCallback as c}from"react";import{jsxs as s,Fragment as i,jsx as a}from"react/jsx-runtime";var o=["AAPL","MSFT","GOOGL","TSLA","NVDA"],m="stock_symbols",l="stock_appearance",h={AAPL:{price:229.87,change:1.42,changePct:.62},MSFT:{price:451.16,change:-2.31,changePct:-.51},GOOGL:{price:178.34,change:.89,changePct:.5},AMZN:{price:201.45,change:-1.08,changePct:-.53},TSLA:{price:248.92,change:6.74,changePct:2.78},NVDA:{price:134.81,change:-3.12,changePct:-2.26},META:{price:563.27,change:4.55,changePct:.81}},p=Object.keys(h);function u(){try{const e=JSON.parse(localStorage.getItem(m)||"");if(Array.isArray(e)&&e.length)return e.slice(0,8)}catch{}return o}var d=e=>`${e>=0?"+":""}${e.toFixed(2)}`;function g(){const[o,g]=r(u),[k,x]=r(()=>e(l)),[j,N]=r(!1),[b,f]=r([]),[y,v]=r(k),[A,C]=r(""),S=c(()=>{f([...o]),v({...k}),C(""),N(!0)},[o,k]);n(S);const D=()=>{const e=A.trim().toUpperCase();!e||b.includes(e)||b.length>=8||(f(t=>[...t,e]),C(""))},J=p.filter(e=>!b.includes(e));/* @__PURE__ */
|
|
2
2
|
return s(i,{children:[
|
|
3
3
|
/* @__PURE__ */a("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${k.activeOpacity/100})`,backdropFilter:k.activeBlur>0?`blur(${k.activeBlur}px)`:void 0},children:/* @__PURE__ */a("div",{className:"px-4 py-3",children:0===o.length?/* @__PURE__ */a("div",{className:"text-xs text-gray-500 text-center py-6",children:"No symbols yet — add some in settings."}):/* @__PURE__ */a("div",{className:"space-y-0.5",children:o.map(e=>{const t=h[e],n=(t?.change??0)>=0,r=t?t.change>0?"text-green-600":t.change<0?"text-red-600":"text-gray-500":"text-gray-400";/* @__PURE__ */
|
|
4
4
|
return s("div",{className:"flex items-center justify-between px-2 py-2 border-b border-gray-200 last:border-0",children:[
|
|
@@ -11,6 +11,6 @@ return s("div",{className:"flex items-center justify-between px-2 py-2 border-b
|
|
|
11
11
|
/* @__PURE__ */s("div",{className:"space-y-1 mb-2",children:[b.map((e,t)=>/* @__PURE__ */s("div",{className:"flex items-center justify-between py-1 px-2 bg-gray-50 rounded",children:[
|
|
12
12
|
/* @__PURE__ */a("span",{className:"text-sm font-semibold text-gray-700",children:e}),
|
|
13
13
|
/* @__PURE__ */a("button",{onClick:()=>f(e=>e.filter((e,n)=>n!==t)),className:"text-red-400 hover:text-red-600",children:"×"})]},t)),0===b.length&&/* @__PURE__ */a("p",{className:"text-2xs text-ink-faintest italic",children:"No symbols — add a ticker below."})]}),b.length<8?/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[
|
|
14
|
-
/* @__PURE__ */a("input",{value:
|
|
15
|
-
/* @__PURE__ */a("button",{onClick:
|
|
14
|
+
/* @__PURE__ */a("input",{value:A,onChange:e=>C(e.target.value),onKeyDown:e=>{"Enter"===e.key&&D()},placeholder:"e.g. NVDA",className:"flex-1 bg-gray-50 border border-gray-200 rounded px-2 py-1 text-sm uppercase focus:outline-none focus:ring-1 focus:ring-blue-500"}),
|
|
15
|
+
/* @__PURE__ */a("button",{onClick:D,className:"text-sm font-medium text-blue-600 hover:text-blue-800 px-2",children:"+ Add"})]}):/* @__PURE__ */s("p",{className:"text-2xs text-ink-faintest italic",children:["Max ",8," symbols — remove one to add another."]}),J.length>0&&b.length<8&&/* @__PURE__ */a("div",{className:"flex flex-wrap gap-2 mt-2",children:J.map(e=>/* @__PURE__ */a("button",{onClick:()=>f(t=>t.length<8?[...t,e]:t),className:"text-2xs font-medium text-gray-600 bg-gray-100 hover:bg-gray-200 rounded px-2 py-0.5 transition-colors",children:e},e))}),
|
|
16
16
|
/* @__PURE__ */a("p",{className:"text-2xs text-ink-faintest mt-2",children:"Demo prices — static sample data, no live feed."})]})})]})}export{g as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{fetchCityWeather as e,getCondition as t,AVAILABLE_CITIES as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-
|
|
1
|
+
import{fetchCityWeather as e,getCondition as t,AVAILABLE_CITIES as a,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as n,WidgetSettingsModal as i}from"./chunk-NIBE57KV.js";import{pad2 as s}from"./chunk-LF27WIN2.js";import{useWidgetSettings as o}from"./chunk-UWF45S5L.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-Y4RERPFN.js";import"./chunk-5A7MWTXX.js";import"./chunk-ZDMZM7HD.js";import"./chunk-HE767CVB.js";import"./chunk-CAXOKGMB.js";import"./chunk-PMJMYH5O.js";import"./chunk-N7JX27JE.js";import"./chunk-3DVNXNTF.js";import"./chunk-2762IAB7.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-5JUG74UR.js";import"./chunk-SCGBCBXP.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import{useShellPrefs as l}from"./chunk-KC3EX26K.js";import"./chunk-CDAJKLGL.js";import"./chunk-JPNAEN53.js";import"./chunk-IFQXTIMY.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UJJXWLHE.js";import"./chunk-XWFLIGDQ.js";import"./chunk-UIWGVOFH.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as c}from"./chunk-R2VKEMZH.js";import"./chunk-CJH2BGXY.js";import"./chunk-QQ2LDC6C.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-43MCNASD.js";import"./chunk-C3QOHMR6.js";import{useState as d,useEffect as m,useCallback as h}from"react";import{jsx as p,jsxs as u,Fragment as f}from"react/jsx-runtime";var y="weather_city",g="weather_appearance",x={useFahrenheit:!1,showLocalTime:!0,use24Hour:!1};function b(){const e="undefined"!=typeof localStorage?localStorage.getItem(y):null;if(e&&a[e])return e;try{const e=JSON.parse(localStorage.getItem("weather_cities")||"");if(Array.isArray(e)&&e[0]&&a[e[0]])return localStorage.setItem(y,e[0]),e[0]}catch{}return function(){try{const e=Intl.DateTimeFormat().resolvedOptions().timeZone;for(const[t,r]of Object.entries(a))if(r.tz===e)return t}catch{}return"London"}()}var w=r;function k(e,t=!1){try{if(t){const t=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!1}).formatToParts(/* @__PURE__ */new Date),a=parseInt(t.find(e=>"hour"===e.type)?.value||"0"),r=parseInt(t.find(e=>"minute"===e.type)?.value||"0");return`${s(a)}:${s(r)}`}const a=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(/* @__PURE__ */new Date),r=parseInt(a.find(e=>"hour"===e.type)?.value||"12"),n=parseInt(a.find(e=>"minute"===e.type)?.value||"0"),i=a.find(e=>"dayPeriod"===e.type)?.value||"";return`${r}:${s(n)} ${i}`}catch{return""}}function v(){/* @__PURE__ */
|
|
2
2
|
return u("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
|
|
3
3
|
/* @__PURE__ */p("div",{className:"absolute -top-5 -right-5 w-24 h-24",style:{animation:"wx-sun-rays 70s linear infinite"},children:/* @__PURE__ */p("svg",{viewBox:"0 0 100 100",className:"w-full h-full",children:Array.from({length:12}).map((e,t)=>/* @__PURE__ */p("rect",{x:49,y:3,width:2,height:14,rx:1,fill:"rgba(255, 232, 130, 0.55)",transform:`rotate(${30*t} 50 50)`},t))})}),
|
|
4
4
|
/* @__PURE__ */p("div",{className:"absolute top-1 right-1 w-10 h-10 rounded-full",style:{background:"radial-gradient(circle at 35% 35%, #fff8cc 0%, #ffd84a 55%, #ff9e2a 100%)",boxShadow:"0 0 18px 5px rgba(255, 200, 80, 0.55)",animation:"wx-sun-pulse 4.5s ease-in-out infinite"}})]})}function N(){const e=Array.from({length:16}).map((e,t)=>({left:(53*t+11)%95+"%",top:(37*t+9)%78+"%",size:1+13*t%3,delay:.41*t%4+"s",duration:2.5+7*t%5*.6+"s"}));/* @__PURE__ */
|
|
@@ -17,42 +17,42 @@ return u("div",{className:"absolute inset-0 overflow-hidden pointer-events-none"
|
|
|
17
17
|
return u("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
|
|
18
18
|
/* @__PURE__ */p("div",{className:"absolute",style:{top:"8%",animation:"wx-drift-cloud 42s linear infinite"},children:/* @__PURE__ */p(a,{scale:.9})}),
|
|
19
19
|
/* @__PURE__ */p("div",{className:"absolute",style:{top:"40%",animation:"wx-drift-cloud 60s linear -22s infinite",opacity:.85},children:/* @__PURE__ */p(a,{scale:1.25})}),
|
|
20
|
-
/* @__PURE__ */p("div",{className:"absolute",style:{top:"68%",animation:"wx-drift-cloud 78s linear -45s infinite",opacity:.7},children:/* @__PURE__ */p(a,{scale:.75})})]})}function
|
|
21
|
-
return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:r.map((e,t)=>/* @__PURE__ */p("div",{className:"absolute",style:{left:e.left,top:"-20px",width:"1px",height:e.height,background:"linear-gradient(180deg, rgba(180,210,255,0) 0%, rgba(220,235,255,0.85) 90%, rgba(255,255,255,0.95) 100%)",transform:"rotate(8deg)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`,transformOrigin:"top"}},t))})}function
|
|
20
|
+
/* @__PURE__ */p("div",{className:"absolute",style:{top:"68%",animation:"wx-drift-cloud 78s linear -45s infinite",opacity:.7},children:/* @__PURE__ */p(a,{scale:.75})})]})}function C({heavy:e=!1}){const t=e?26:16,a=["wx-rain-a","wx-rain-b","wx-rain-c"],r=Array.from({length:t}).map((e,r)=>({left:(100*r/t+11*r%7)%100+"%",delay:.087*r%1.3+"s",height:12+r%4*5+"px",duration:.7+r%3*.18+"s",variant:a[r%a.length]}));/* @__PURE__ */
|
|
21
|
+
return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:r.map((e,t)=>/* @__PURE__ */p("div",{className:"absolute",style:{left:e.left,top:"-20px",width:"1px",height:e.height,background:"linear-gradient(180deg, rgba(180,210,255,0) 0%, rgba(220,235,255,0.85) 90%, rgba(255,255,255,0.95) 100%)",transform:"rotate(8deg)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`,transformOrigin:"top"}},t))})}function D(){const e=["wx-snow-a","wx-snow-b","wx-snow-c"],t=Array.from({length:16}).map((t,a)=>({left:(100*a/16+13*a%5)%100+"%",delay:.43*a%5+"s",duration:4.5+a%5+"s",size:3+a%4*1.4,opacity:.65+7*a%4*.08,variant:e[a%e.length]}));/* @__PURE__ */
|
|
22
22
|
return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:t.map((e,t)=>/* @__PURE__ */p("div",{className:"absolute rounded-full bg-white",style:{left:e.left,top:"-12px",width:e.size,height:e.size,opacity:e.opacity,boxShadow:"0 0 4px rgba(255,255,255,0.65)",animation:`${e.variant} ${e.duration} linear ${e.delay} infinite`}},t))})}function S(){/* @__PURE__ */
|
|
23
23
|
return u("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[
|
|
24
|
-
/* @__PURE__ */p(
|
|
24
|
+
/* @__PURE__ */p(C,{heavy:!0}),
|
|
25
25
|
/* @__PURE__ */p("div",{className:"absolute inset-0 bg-white",style:{animation:"wx-flash 6s ease-out infinite"}}),
|
|
26
|
-
/* @__PURE__ */p("div",{className:"absolute inset-y-0 right-1/3 flex items-center justify-center pointer-events-none",style:{animation:"wx-bolt 6s ease-out infinite"},children:/* @__PURE__ */p("svg",{viewBox:"0 0 18 60",className:"h-4/5",style:{filter:"drop-shadow(0 0 6px rgba(255, 240, 150, 0.95)) drop-shadow(0 0 14px rgba(255, 220, 90, 0.7))"},children:/* @__PURE__ */p("path",{d:"M11 0 L2 28 L8 30 L4 60 L16 24 L9 22 Z",fill:"rgba(255, 250, 200, 0.98)",stroke:"rgba(255, 255, 255, 0.9)",strokeWidth:.3})})})]})}function
|
|
27
|
-
return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */p("div",{className:"absolute left-0 right-0",style:{top:10+22*t+"%",height:"14px",background:"linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%)",filter:"blur(2px)",animation:`wx-fog-drift ${10+3*t}s ease-in-out ${.7*t}s infinite alternate`}},t))})}function
|
|
28
|
-
/* @__PURE__ */p(j,{tone:t?"light":"dark"})]}):3===e?/* @__PURE__ */p(j,{tone:t?"light":"dark"}):45===e||48===e?/* @__PURE__ */p(
|
|
26
|
+
/* @__PURE__ */p("div",{className:"absolute inset-y-0 right-1/3 flex items-center justify-center pointer-events-none",style:{animation:"wx-bolt 6s ease-out infinite"},children:/* @__PURE__ */p("svg",{viewBox:"0 0 18 60",className:"h-4/5",style:{filter:"drop-shadow(0 0 6px rgba(255, 240, 150, 0.95)) drop-shadow(0 0 14px rgba(255, 220, 90, 0.7))"},children:/* @__PURE__ */p("path",{d:"M11 0 L2 28 L8 30 L4 60 L16 24 L9 22 Z",fill:"rgba(255, 250, 200, 0.98)",stroke:"rgba(255, 255, 255, 0.9)",strokeWidth:.3})})})]})}function F(){/* @__PURE__ */
|
|
27
|
+
return p("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */p("div",{className:"absolute left-0 right-0",style:{top:10+22*t+"%",height:"14px",background:"linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.55) 50%, rgba(255,255,255,0) 100%)",filter:"blur(2px)",animation:`wx-fog-drift ${10+3*t}s ease-in-out ${.7*t}s infinite alternate`}},t))})}function L({code:e,isDay:t}){return 0===e||1===e?/* @__PURE__ */p(t?v:N,{}):2===e?/* @__PURE__ */u(f,{children:[/* @__PURE__ */p(t?v:N,{}),
|
|
28
|
+
/* @__PURE__ */p(j,{tone:t?"light":"dark"})]}):3===e?/* @__PURE__ */p(j,{tone:t?"light":"dark"}):45===e||48===e?/* @__PURE__ */p(F,{}):[51,53,61,80,81].includes(e)?/* @__PURE__ */p(C,{}):[55,63,65,82].includes(e)?/* @__PURE__ */p(C,{heavy:!0}):[71,73,75].includes(e)?/* @__PURE__ */p(D,{}):[95,96,99].includes(e)?/* @__PURE__ */p(S,{}):null}function I(){const[r,s]=d(b),[v,N]=d(()=>n(g)),[j,C]=d(null),[D,S]=d(!0),[,F]=d(0);m(()=>{const e=setInterval(()=>F(e=>e+1),6e4);return()=>clearInterval(e)},[]);const[I,T]=d(!1),[$,H]=d(r),[A,J]=d(v),{prefs:B,save:X}=l(),M={...x,...B.weather_prefs??{}},[G,U]=d(M);o(h(()=>{H(r),J({...v}),U({...M}),T(!0)},[r,v,M])),m(()=>{let t=!1;return S(!0),e(r).then(e=>{t||(C(e),S(!1))}),()=>{t=!0}},[r]);const W=e=>M.useFahrenheit?`${w(e)}°F`:`${e}°`;if(D&&!j)/* @__PURE__ */
|
|
29
29
|
return p("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-sky-400 to-blue-500 rounded-lg text-on-accent/80 text-xs",style:{minHeight:110},children:/* @__PURE__ */p(c,{size:"sm",padding:"",label:"Loading"})});if(!j)/* @__PURE__ */
|
|
30
|
-
return p("div",{className:"flex items-center justify-center h-full bg-slate-700 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Couldn't load weather"});const[
|
|
30
|
+
return p("div",{className:"flex items-center justify-center h-full bg-slate-700 rounded-lg text-white/80 text-xs",style:{minHeight:110},children:"Couldn't load weather"});const[O,P,Q]=t(j.code,j.isDay);/* @__PURE__ */
|
|
31
31
|
return u(f,{children:[
|
|
32
32
|
/* @__PURE__ */p("style",{children:"\n@keyframes wx-rain-a { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 0.95; } 100% { transform: translate(8px,140px); opacity: 0; } }\n@keyframes wx-rain-b { 0% { transform: translate(0,-20px); opacity: 0; } 12% { opacity: 0.85; } 100% { transform: translate(12px,140px); opacity: 0; } }\n@keyframes wx-rain-c { 0% { transform: translate(0,-20px); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(5px,140px); opacity: 0; } }\n@keyframes wx-snow-a { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.9; } 50% { transform: translate(10px,55px) rotate(180deg); } 100% { transform: translate(-4px,140px) rotate(360deg); opacity: 0; } }\n@keyframes wx-snow-b { 0% { transform: translate(0,-12px) rotate(0deg); opacity: 0; } 10% { opacity: 0.85; } 50% { transform: translate(-12px,55px) rotate(-180deg); } 100% { transform: translate(6px,140px) rotate(-360deg); opacity: 0; } }\n@keyframes wx-snow-c { 0% { transform: translate(0,-12px); opacity: 0; } 10% { opacity: 0.7; } 100% { transform: translate(2px,140px); opacity: 0; } }\n@keyframes wx-drift-cloud { 0% { transform: translateX(-40%); } 100% { transform: translateX(140%); } }\n@keyframes wx-twinkle { 0%, 100% { opacity: 0.25; transform: scale(1); } 50% { opacity: 1; transform: scale(1.6); } }\n@keyframes wx-flash { 0%, 86%, 100% { opacity: 0; } 87% { opacity: 0.95; } 88% { opacity: 0.15; } 89% { opacity: 0.85; } 90% { opacity: 0; } }\n@keyframes wx-bolt { 0%, 86%, 90%, 100% { opacity: 0; } 87% { opacity: 1; } 89% { opacity: 0.85; } }\n@keyframes wx-sun-pulse { 0%, 100% { transform: scale(1); opacity: 0.65; } 50% { transform: scale(1.12); opacity: 0.95; } }\n@keyframes wx-sun-rays { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }\n@keyframes wx-fog-drift { 0% { transform: translateX(-25%); opacity: 0.3; } 50% { opacity: 0.65; } 100% { transform: translateX(25%); opacity: 0.3; } }\n@keyframes wx-shooting-star { 0%, 95% { opacity: 0; transform: translate(0,0) scale(0); } 96% { opacity: 1; transform: translate(0,0) scale(1); } 100% { opacity: 0; transform: translate(40px,30px) scale(1); } }\n"}),
|
|
33
|
-
/* @__PURE__ */p("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:`rgba(15, 23, 42, ${v.activeOpacity/100})`,backdropFilter:v.activeBlur>0?`blur(${v.activeBlur}px)`:void 0},children:/* @__PURE__ */u("div",{className:`relative rounded-lg overflow-hidden text-white bg-gradient-to-br ${
|
|
34
|
-
/* @__PURE__ */p(
|
|
33
|
+
/* @__PURE__ */p("div",{className:"rounded-lg overflow-hidden",style:{backgroundColor:`rgba(15, 23, 42, ${v.activeOpacity/100})`,backdropFilter:v.activeBlur>0?`blur(${v.activeBlur}px)`:void 0},children:/* @__PURE__ */u("div",{className:`relative rounded-lg overflow-hidden text-white bg-gradient-to-br ${Q}`,style:{height:110},children:[
|
|
34
|
+
/* @__PURE__ */p(L,{code:j.code,isDay:j.isDay}),
|
|
35
35
|
/* @__PURE__ */u("div",{className:"relative z-10 px-3 py-3 flex flex-col h-full justify-between",children:[
|
|
36
36
|
/* @__PURE__ */u("div",{className:"flex items-start justify-between gap-2",children:[
|
|
37
37
|
/* @__PURE__ */u("div",{className:"min-w-0 flex-1",children:[
|
|
38
38
|
/* @__PURE__ */p("div",{className:"text-base font-semibold leading-tight truncate drop-shadow-sm",children:j.city}),M.showLocalTime&&/* @__PURE__ */p("div",{className:"text-2xs opacity-90 leading-tight tabular-nums drop-shadow-sm",children:k(j.timezone,M.use24Hour)})]}),
|
|
39
|
-
/* @__PURE__ */p("div",{className:"text-3xl font-extralight leading-none tracking-tight tabular-nums shrink-0 drop-shadow-sm",children:
|
|
39
|
+
/* @__PURE__ */p("div",{className:"text-3xl font-extralight leading-none tracking-tight tabular-nums shrink-0 drop-shadow-sm",children:W(j.temp)})]}),
|
|
40
40
|
/* @__PURE__ */u("div",{className:"flex items-end justify-between gap-2",children:[
|
|
41
41
|
/* @__PURE__ */u("div",{className:"flex items-center gap-2 min-w-0",children:[
|
|
42
|
-
/* @__PURE__ */p("span",{className:"text-lg leading-none drop-shadow-sm",children:
|
|
43
|
-
/* @__PURE__ */p("span",{className:"text-2xs font-medium drop-shadow-sm truncate",children:
|
|
44
|
-
/* @__PURE__ */u("span",{className:"text-2xs opacity-90 tabular-nums drop-shadow-sm shrink-0",children:["H:",
|
|
45
|
-
/* @__PURE__ */u(i,{open:I,onClose:()=>
|
|
42
|
+
/* @__PURE__ */p("span",{className:"text-lg leading-none drop-shadow-sm",children:P}),
|
|
43
|
+
/* @__PURE__ */p("span",{className:"text-2xs font-medium drop-shadow-sm truncate",children:O})]}),
|
|
44
|
+
/* @__PURE__ */u("span",{className:"text-2xs opacity-90 tabular-nums drop-shadow-sm shrink-0",children:["H:",W(j.high)," L:",W(j.low)]})]})]})]})}),
|
|
45
|
+
/* @__PURE__ */u(i,{open:I,onClose:()=>T(!1),title:"Weather Settings",appearance:A,onAppearanceChange:J,onSave:()=>{s($),N(A),X({weather_prefs:G}),localStorage.setItem(y,$),localStorage.setItem(g,JSON.stringify(A)),T(!1)},children:[
|
|
46
46
|
/* @__PURE__ */p("div",{className:"space-y-3",children:/* @__PURE__ */u("div",{children:[
|
|
47
47
|
/* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
|
|
48
48
|
/* @__PURE__ */u("div",{className:"flex items-center gap-3 mb-2",children:[
|
|
49
49
|
/* @__PURE__ */p("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
|
|
50
|
-
/* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>
|
|
50
|
+
/* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>U(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(G.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
|
|
51
51
|
/* @__PURE__ */u("div",{className:"flex items-center gap-3 mb-2",children:[
|
|
52
52
|
/* @__PURE__ */p("span",{className:"text-sm text-gray-600 w-24",children:"Time Format"}),
|
|
53
|
-
/* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"AM/PM"},{key:!0,label:"24H"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>
|
|
53
|
+
/* @__PURE__ */p("div",{className:"flex gap-1",children:[{key:!1,label:"AM/PM"},{key:!0,label:"24H"}].map(e=>/* @__PURE__ */p("button",{onClick:()=>U(t=>({...t,use24Hour:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(G.use24Hour===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
|
|
54
54
|
/* @__PURE__ */u("label",{className:"flex items-center gap-2 cursor-pointer",children:[
|
|
55
|
-
/* @__PURE__ */p("input",{type:"checkbox",checked:
|
|
55
|
+
/* @__PURE__ */p("input",{type:"checkbox",checked:G.showLocalTime,onChange:e=>U(t=>({...t,showLocalTime:e.target.checked})),className:"rounded border-gray-300 text-blue-600 h-3.5 w-3.5"}),
|
|
56
56
|
/* @__PURE__ */p("span",{className:"text-sm text-gray-600",children:"Show local time"})]})]})}),
|
|
57
57
|
/* @__PURE__ */u("div",{children:[
|
|
58
58
|
/* @__PURE__ */p("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"City"}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as n,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as s,WidgetSettingsModal as i}from"./chunk-
|
|
1
|
+
import{AVAILABLE_CITIES as e,fetchCityWeather as t,getCondition as n,toFahrenheit as r}from"./chunk-FBDZGO3V.js";import{loadAppearance as s,WidgetSettingsModal as i}from"./chunk-NIBE57KV.js";import{useWidgetSettings as a}from"./chunk-UWF45S5L.js";import"./chunk-4LXCCZDM.js";import"./chunk-AW7TOB6N.js";import"./chunk-KNUR2UEG.js";import"./chunk-JDCM2VHG.js";import"./chunk-Y4RERPFN.js";import"./chunk-5A7MWTXX.js";import"./chunk-ZDMZM7HD.js";import"./chunk-HE767CVB.js";import"./chunk-CAXOKGMB.js";import"./chunk-PMJMYH5O.js";import"./chunk-N7JX27JE.js";import"./chunk-3DVNXNTF.js";import"./chunk-2762IAB7.js";import"./chunk-VWGWZY7A.js";import"./chunk-7QSDPSXP.js";import"./chunk-5JUG74UR.js";import"./chunk-SCGBCBXP.js";import"./chunk-F3ZOO23R.js";import"./chunk-2QY5BJLA.js";import"./chunk-UGTRSRIW.js";import{useShellPrefs as c}from"./chunk-KC3EX26K.js";import"./chunk-CDAJKLGL.js";import"./chunk-JPNAEN53.js";import"./chunk-IFQXTIMY.js";import"./chunk-URHGHXDN.js";import"./chunk-5QFPTDQF.js";import"./chunk-UJJXWLHE.js";import"./chunk-XWFLIGDQ.js";import"./chunk-UIWGVOFH.js";import"./chunk-J75ZT2JQ.js";import{LoadingSpinner as o}from"./chunk-R2VKEMZH.js";import"./chunk-CJH2BGXY.js";import"./chunk-QQ2LDC6C.js";import"./chunk-PGN5ME7B.js";import"./chunk-62LW225J.js";import"./chunk-GLUJS42B.js";import"./chunk-D65T4H6J.js";import"./chunk-STKJA4PV.js";import"./chunk-UQYNPYF4.js";import"./chunk-MRJKZWWV.js";import"./chunk-TWVUQUUD.js";import"./chunk-5FYDNH4Y.js";import"./chunk-LNXBTK7Q.js";import"./chunk-43MCNASD.js";import"./chunk-C3QOHMR6.js";import{useState as m,useEffect as l,useCallback as h}from"react";import{jsxs as p,Fragment as u,jsx as d}from"react/jsx-runtime";var k="world_clock_appearance",g=["London","Shanghai","New York"];function j(){const{prefs:j,save:x}=c(),[b,f]=m(()=>s(k)),[y,N]=m(!1),[v,w]=m([]),[C,F]=m(b),D={useFahrenheit:!!j.weather_prefs?.useFahrenheit},[J,U]=m(D),[S,B]=m(()=>/* @__PURE__ */new Date);l(()=>{const e=setInterval(()=>B(/* @__PURE__ */new Date),3e4);return()=>clearInterval(e)},[]);const G=Object.fromEntries(Object.entries(e).map(([e,t])=>[t.tz,e])),L=j.world_clocks,T=(()=>{if(!Array.isArray(L)||0===L.length)return g;const t=[];for(const n of L){const r=e[n]?n:G[n];r&&!t.includes(r)&&t.push(r)}return t.length?t:g})(),[W,X]=m({}),[H,M]=m(!0);l(()=>{let e=!1;return M(!0),(async()=>{const n={};await Promise.all(T.map(async e=>{const r=await t(e);r&&(n[e]=r)})),e||(X(n),M(!1))})(),()=>{e=!0}},[T.join(",")]),a(h(()=>{w([...T]),F({...b}),U({...D}),N(!0)},[T.join(","),b,D.useFahrenheit]));const A=e=>D.useFahrenheit?`${r(e)}°`:`${e}°`;/* @__PURE__ */
|
|
2
2
|
return p(u,{children:[
|
|
3
|
-
/* @__PURE__ */d("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */p("div",{className:"divide-y divide-gray-200",children:[
|
|
3
|
+
/* @__PURE__ */d("div",{style:{backgroundColor:`rgb(var(--taskbar-bg-rgb, 243 244 246) / ${b.activeOpacity/100})`,backdropFilter:b.activeBlur>0?`blur(${b.activeBlur}px)`:void 0},children:/* @__PURE__ */p("div",{className:"divide-y divide-gray-200",children:[H&&T.every(e=>!W[e])&&/* @__PURE__ */d(o,{size:"sm",padding:"py-6",label:"Loading"}),T.map(t=>{const r=W[t],s=e[t]?.tz??"UTC",{time:i,ampm:a}=function(e,t){try{const n=new Intl.DateTimeFormat("en-US",{timeZone:e,hour:"numeric",minute:"2-digit",hour12:!0}).formatToParts(t),r=n.find(e=>"hour"===e.type)?.value||"12";return{time:`${r}:${n.find(e=>"minute"===e.type)?.value||"00"}`,ampm:(n.find(e=>"dayPeriod"===e.type)?.value||"").toUpperCase()}}catch{return{time:"",ampm:""}}}(s,S);if(!r)/* @__PURE__ */
|
|
4
4
|
return p("div",{className:"px-4 py-3",children:[
|
|
5
5
|
/* @__PURE__ */p("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
6
6
|
/* @__PURE__ */d("span",{className:"text-base font-semibold tracking-tight text-ink-strongest truncate",children:t}),
|
|
@@ -10,7 +10,7 @@ return p("div",{className:"px-4 py-3",children:[
|
|
|
10
10
|
return p("div",{className:"px-4 py-3",children:[
|
|
11
11
|
/* @__PURE__ */p("div",{className:"flex items-baseline justify-between gap-2",children:[
|
|
12
12
|
/* @__PURE__ */d("span",{className:"text-base font-semibold tracking-tight text-ink-strongest truncate",children:t}),
|
|
13
|
-
/* @__PURE__ */d("span",{className:"text-2xl font-extralight leading-none tabular-nums tracking-tight text-ink-strongest shrink-0",children:
|
|
13
|
+
/* @__PURE__ */d("span",{className:"text-2xl font-extralight leading-none tabular-nums tracking-tight text-ink-strongest shrink-0",children:A(r.temp)})]}),
|
|
14
14
|
/* @__PURE__ */p("div",{className:"flex items-center justify-between gap-2 mt-2 text-2xs",children:[
|
|
15
15
|
/* @__PURE__ */p("div",{className:"flex items-center gap-2 min-w-0 text-ink-faint",children:[
|
|
16
16
|
/* @__PURE__ */d("span",{className:"text-base leading-none shrink-0",children:m}),
|
|
@@ -18,15 +18,15 @@ return p("div",{className:"px-4 py-3",children:[
|
|
|
18
18
|
/* @__PURE__ */d("span",{className:"text-3xs font-medium ml-0.5 opacity-70",children:a})]}),
|
|
19
19
|
/* @__PURE__ */d("span",{className:"text-gray-300 shrink-0",children:"·"}),
|
|
20
20
|
/* @__PURE__ */d("span",{className:"truncate",children:c})]}),
|
|
21
|
-
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",
|
|
22
|
-
/* @__PURE__ */p(i,{open:y,onClose:()=>N(!1),title:"World Clock Settings",appearance:
|
|
21
|
+
/* @__PURE__ */p("span",{className:"tabular-nums text-gray-500 shrink-0",children:["H:",A(r.high)," L:",A(r.low)]})]})]},t)})]})}),
|
|
22
|
+
/* @__PURE__ */p(i,{open:y,onClose:()=>N(!1),title:"World Clock Settings",appearance:C,onAppearanceChange:F,onSave:()=>{0!==v.length&&(x({world_clocks:v,weather_prefs:{...j.weather_prefs??{},useFahrenheit:J.useFahrenheit}}),f(C),localStorage.setItem(k,JSON.stringify(C)),N(!1))},children:[
|
|
23
23
|
/* @__PURE__ */p("div",{children:[
|
|
24
24
|
/* @__PURE__ */d("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Display"}),
|
|
25
25
|
/* @__PURE__ */p("div",{className:"flex items-center gap-3 mb-2",children:[
|
|
26
26
|
/* @__PURE__ */d("span",{className:"text-sm text-gray-600 w-24",children:"Temperature"}),
|
|
27
|
-
/* @__PURE__ */d("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */d("button",{onClick:()=>
|
|
27
|
+
/* @__PURE__ */d("div",{className:"flex gap-1",children:[{key:!1,label:"°C"},{key:!0,label:"°F"}].map(e=>/* @__PURE__ */d("button",{onClick:()=>U(t=>({...t,useFahrenheit:e.key})),className:"px-3 py-1 text-xs font-medium rounded-lg border transition-colors "+(J.useFahrenheit===e.key?"bg-blue-600 text-white border-blue-600":"bg-white text-gray-700 border-gray-300 hover:bg-gray-50"),children:e.label},String(e.key)))})]}),
|
|
28
28
|
/* @__PURE__ */d("p",{className:"text-2xs text-ink-faintest mt-1",children:"Shared with the Weather widget."})]}),
|
|
29
29
|
/* @__PURE__ */p("div",{children:[
|
|
30
30
|
/* @__PURE__ */d("h3",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Cities"}),
|
|
31
31
|
/* @__PURE__ */d("div",{className:"grid grid-cols-2 gap-1 max-h-56 overflow-y-auto",children:Object.keys(e).map(e=>/* @__PURE__ */p("label",{className:"flex items-center gap-2 text-sm py-1 cursor-pointer hover:bg-gray-50 rounded px-2",children:[
|
|
32
|
-
/* @__PURE__ */d("input",{type:"checkbox",checked:v.includes(e),onChange:()=>
|
|
32
|
+
/* @__PURE__ */d("input",{type:"checkbox",checked:v.includes(e),onChange:()=>w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500 h-3.5 w-3.5"}),e]},e))})]})]})]})}export{j as default};
|