efficient-shell 13.21.0 → 13.22.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/README.md +13 -0
- package/dist/{Browser-AE7OYSTS.js → Browser-ZNJ3OZSE.js} +13 -13
- package/dist/Calculator-BPQPQUZN.js +29 -0
- package/dist/CurrencyConverter-M4UJI6VQ.js +21 -0
- package/dist/{Files-Y5UGT3RX.js → Files-4HACSJ7C.js} +77 -77
- package/dist/Notepad-SK2E5VOK.js +24 -0
- package/dist/{PdfViewer-EELX35ZI.js → PdfViewer-FWGHFO4N.js} +1 -1
- package/dist/{PomodoroTimer-6XHLOAJD.js → PomodoroTimer-BR5NOA24.js} +48 -48
- package/dist/{Preview-XQXSRAGY.js → Preview-CLV2ZAU5.js} +26 -26
- package/dist/Sidebar-MY66ILZY.js +44 -0
- package/dist/{Stock-36O4LW46.js → Stock-LZ2QHPU4.js} +3 -3
- package/dist/{Weather-BN6AJJ4S.js → Weather-Q22ZW7ZQ.js} +20 -20
- package/dist/{WorldClock-TUVIRPTM.js → WorldClock-4MSSRLC7.js} +6 -6
- package/dist/ai/index.js +118 -118
- package/dist/apps/ImageAnnotator.js +1 -1
- package/dist/apps/index.js +1 -1
- package/dist/bin/browser-check.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/ChartBrush.js +1 -1
- package/dist/charts/ChartFrame.js +1 -1
- package/dist/charts/ChartSkeleton.js +1 -1
- package/dist/charts/ChordChart.js +1 -1
- package/dist/charts/ColumnChart.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/Meter.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/RankedBars.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/StatTile.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-23YQNCZ4.js +23 -0
- package/dist/chunk-2AEYVQ2R.js +2 -0
- package/dist/{chunk-MVOYVN3S.js → chunk-2YHS5E27.js} +1 -1
- package/dist/{chunk-X4E4RPFE.js → chunk-2YUAR2EH.js} +5 -5
- package/dist/{chunk-MUNP5Z24.js → chunk-3AMCLA5Q.js} +1 -1
- package/dist/{chunk-PPLPDP6D.js → chunk-3AUN7JSM.js} +1 -1
- package/dist/{chunk-FDDM7VMQ.js → chunk-3BQMICGG.js} +1 -1
- package/dist/{chunk-NILGK2KJ.js → chunk-3EYJ4G7L.js} +1 -1
- package/dist/{chunk-FXSGIT53.js → chunk-3GJVTK4H.js} +8 -8
- package/dist/chunk-3SIHJWR2.js +28 -0
- package/dist/chunk-3SKXWFGG.js +15 -0
- package/dist/{chunk-XD3M5ZXM.js → chunk-3TD3GH53.js} +6 -6
- package/dist/{chunk-4U5M37SF.js → chunk-4PJFL26P.js} +1 -1
- package/dist/{chunk-NA4XPE7S.js → chunk-53HHYEN4.js} +3 -3
- package/dist/{chunk-OF5X4HKC.js → chunk-5JUXMNUC.js} +1 -1
- package/dist/{chunk-TB2ARUE2.js → chunk-5OHFBS2B.js} +1 -1
- package/dist/chunk-5ZOYYL46.js +4 -0
- package/dist/{chunk-TPKNHQIE.js → chunk-66NJCU4W.js} +8 -8
- package/dist/{chunk-BCQSNK2Z.js → chunk-6CFI4YGI.js} +4 -4
- package/dist/{chunk-LKAGXURQ.js → chunk-6MFKKTCE.js} +17 -17
- package/dist/{chunk-QNWC3RWK.js → chunk-6NXPOZ6X.js} +1 -1
- package/dist/{chunk-F4VILY3O.js → chunk-72UHB4JU.js} +1 -1
- package/dist/{chunk-7I5RJPY7.js → chunk-7AVPMO4F.js} +1 -1
- package/dist/{chunk-KYQKMBSY.js → chunk-7B6JPNOD.js} +5 -5
- package/dist/{chunk-JB4WXBJB.js → chunk-7G5HKAGV.js} +5 -5
- package/dist/{chunk-SUSJFGXN.js → chunk-7N42VDGT.js} +9 -9
- package/dist/{chunk-J4CVYOY3.js → chunk-7N6CVTWO.js} +10 -10
- package/dist/{chunk-YCXQDUTW.js → chunk-7PAZO65L.js} +6 -6
- package/dist/{chunk-4G7PJ325.js → chunk-A5FC4LR7.js} +1 -1
- package/dist/{chunk-G5UGCAWN.js → chunk-A6TOHNJY.js} +1 -1
- package/dist/{chunk-HPZLV3KD.js → chunk-AFYLMXOJ.js} +5 -5
- package/dist/{chunk-XAT2MKNU.js → chunk-AH2NEKEN.js} +4 -4
- package/dist/{chunk-G7SILKUY.js → chunk-AQVPWUJ3.js} +5 -5
- package/dist/{chunk-63E4ZZYI.js → chunk-BEXFMSNK.js} +2 -2
- package/dist/{chunk-HOROMBJB.js → chunk-BL347U3N.js} +6 -6
- package/dist/{chunk-SOXZRLSD.js → chunk-BUMY4LIP.js} +3 -3
- package/dist/{chunk-OUYGLDQN.js → chunk-BUUAALHH.js} +7 -7
- package/dist/{chunk-7CBWSLCW.js → chunk-C7Z3ZMJH.js} +12 -12
- package/dist/{chunk-SF4IIV5Z.js → chunk-CJQPC2P3.js} +2 -2
- package/dist/{chunk-5POQCJL6.js → chunk-CUJ537IY.js} +4 -4
- package/dist/{chunk-E7BQZL7X.js → chunk-D4432YRW.js} +1 -1
- package/dist/{chunk-RDVC32EV.js → chunk-D5HFWOW7.js} +16 -16
- package/dist/{chunk-GEITUFYK.js → chunk-D5PXRJHA.js} +19 -19
- package/dist/{chunk-VRJKV44O.js → chunk-DAUE6ULT.js} +1 -1
- package/dist/chunk-DEE6FKE7.js +92 -0
- package/dist/{chunk-YWMCW5BN.js → chunk-DTRJLQWO.js} +1 -1
- package/dist/{chunk-WJMPTW3G.js → chunk-DV6TUXCZ.js} +1 -1
- package/dist/{chunk-23LK4PLJ.js → chunk-E4GF7M4S.js} +8 -8
- package/dist/chunk-EJJTDUN3.js +22 -0
- package/dist/{chunk-RA2UNNJC.js → chunk-F3EBYHIE.js} +10 -10
- package/dist/chunk-FBI3XJWH.js +11 -0
- package/dist/{chunk-WJTNQ7YD.js → chunk-FE7H6RXE.js} +2 -2
- package/dist/{chunk-YQ5JHHLE.js → chunk-FMBUR4EU.js} +1 -1
- package/dist/{chunk-IOLUF3UL.js → chunk-GKYGPCGL.js} +1 -1
- package/dist/{chunk-Q4MOT7TY.js → chunk-GPU7LLTJ.js} +1 -1
- package/dist/{chunk-ZCGT5YNR.js → chunk-GRAFJD3L.js} +1 -1
- package/dist/{chunk-L4ZQY4ZG.js → chunk-GZRNOIEE.js} +3 -3
- package/dist/{chunk-VQ35LXDC.js → chunk-I2NVBDKH.js} +1 -1
- package/dist/{chunk-EZYXY67W.js → chunk-IJG4UEKF.js} +8 -8
- package/dist/{chunk-3SIRRK3F.js → chunk-J5OAQAAD.js} +4 -4
- package/dist/{chunk-SZFULV7I.js → chunk-J5W63XNR.js} +6 -6
- package/dist/{chunk-GNRH43N3.js → chunk-JJYTN72U.js} +2 -2
- package/dist/{chunk-HMOKKMIV.js → chunk-JLSXDYS4.js} +2 -2
- package/dist/{chunk-EFVQQF6F.js → chunk-JXJNQHPY.js} +19 -19
- package/dist/{chunk-HPHDLN6E.js → chunk-JYR4V4AG.js} +2 -2
- package/dist/{chunk-EG5MU7XL.js → chunk-JZ43635V.js} +1 -1
- package/dist/{chunk-KQCJWK55.js → chunk-KC2EQCBE.js} +6 -6
- package/dist/chunk-KUPN5WRE.js +1 -0
- package/dist/{chunk-P52LXNUU.js → chunk-L744YF4X.js} +1 -1
- package/dist/{chunk-SXHV5OLA.js → chunk-LC2UF3AA.js} +1 -1
- package/dist/{chunk-GUSENWAH.js → chunk-LLDGRPLF.js} +1 -1
- package/dist/{chunk-KNZ7YTFH.js → chunk-LLSGIMLG.js} +1 -1
- package/dist/{chunk-JPSWWIBW.js → chunk-LQIHBIXG.js} +6 -6
- package/dist/{chunk-UC5IC3AM.js → chunk-LRMDLZMM.js} +9 -9
- package/dist/{chunk-SHHRC5XK.js → chunk-LUARJHUK.js} +9 -9
- package/dist/chunk-M36B3M2H.js +8 -0
- package/dist/{chunk-2J3C2RR4.js → chunk-M3HTP2N6.js} +6 -6
- package/dist/{chunk-BZRFD4DK.js → chunk-M4REKOGO.js} +1 -1
- package/dist/{chunk-ZNV75GAG.js → chunk-MEFB2KGF.js} +1 -1
- package/dist/{chunk-U2ZTHOQL.js → chunk-MMA3WTF2.js} +4 -4
- package/dist/chunk-MRZLFZNJ.js +6 -0
- package/dist/chunk-N64YAF5N.js +2 -0
- package/dist/chunk-N6PMH6DU.js +6 -0
- package/dist/chunk-NRHG4R2Q.js +1 -0
- package/dist/{chunk-G2JPTPRS.js → chunk-OFMZ6JM6.js} +13 -13
- package/dist/chunk-ONWFKCMB.js +14 -0
- package/dist/{chunk-XWJT6TFU.js → chunk-OSMRYND3.js} +1 -1
- package/dist/{chunk-6OCA7RKQ.js → chunk-P234FPKJ.js} +1 -1
- package/dist/{chunk-IUQJGFEO.js → chunk-P3JPSO3E.js} +8 -8
- package/dist/{chunk-ZVDYRXNP.js → chunk-P4VOUPRF.js} +6 -6
- package/dist/{chunk-ENDYHUUR.js → chunk-P73ZJ6QR.js} +1 -1
- package/dist/{chunk-5HFKVEWW.js → chunk-PFOTEDSQ.js} +1 -1
- package/dist/{chunk-H75CQD46.js → chunk-PHYHKDSW.js} +1 -1
- package/dist/{chunk-FBS55WOX.js → chunk-PLESHI3E.js} +7 -7
- package/dist/{chunk-42DF7CDB.js → chunk-PPI4WJ3V.js} +7 -7
- package/dist/{chunk-M2TQOJ3G.js → chunk-PSVGB7KT.js} +1 -1
- package/dist/{chunk-223XYIIH.js → chunk-Q2RNFBYS.js} +1 -1
- package/dist/{chunk-6OGX7V7L.js → chunk-Q36KB5RQ.js} +7 -7
- package/dist/{chunk-WPGSU4QG.js → chunk-Q7CM4UDG.js} +2 -2
- package/dist/{chunk-BVX7LUAW.js → chunk-QJUMBOL2.js} +6 -6
- package/dist/{chunk-25T4YQO7.js → chunk-QPVYBN4J.js} +2 -2
- package/dist/{chunk-FUPU7Z2G.js → chunk-QRPPWLKU.js} +7 -7
- package/dist/{chunk-7SVSHJOO.js → chunk-QZ2XRFDP.js} +6 -6
- package/dist/{chunk-IE6TRMIW.js → chunk-R3BSWWGB.js} +1 -1
- package/dist/{chunk-CCLK2RPQ.js → chunk-R7CYBBJY.js} +13 -13
- package/dist/{chunk-FFRJ6QZK.js → chunk-RB3BMRNA.js} +1 -1
- package/dist/{chunk-FZYUTZEV.js → chunk-RFWBNKKB.js} +10 -10
- package/dist/{chunk-S25KELFW.js → chunk-RKSCB5BJ.js} +5 -5
- package/dist/{chunk-F3E3CEZM.js → chunk-RM2I6DIF.js} +1 -1
- package/dist/{chunk-QBMMORYP.js → chunk-ROYHU3E5.js} +1 -1
- package/dist/chunk-S4RD6UJU.js +8 -0
- package/dist/{chunk-RDETBXMP.js → chunk-SAHRIE35.js} +1 -1
- package/dist/{chunk-MOKABQCY.js → chunk-SAMPXZF3.js} +3 -3
- package/dist/{chunk-W2TPXKCV.js → chunk-SCNQK5NF.js} +1 -1
- package/dist/{chunk-ABTVRB23.js → chunk-SKVLTYGN.js} +1 -1
- package/dist/{chunk-SM3N5UJ2.js → chunk-TDUOBP55.js} +9 -9
- package/dist/{chunk-BG3C4ALM.js → chunk-TJ5YMXVB.js} +1 -1
- package/dist/{chunk-VFSAJMNX.js → chunk-TNGIXSTM.js} +1 -1
- package/dist/{chunk-BNPWUCZX.js → chunk-TSCJG6UM.js} +1 -1
- package/dist/{chunk-ETQ45TBW.js → chunk-TTYTOLVV.js} +1 -1
- package/dist/{chunk-DO3DSSAW.js → chunk-U73K3ICC.js} +1 -1
- package/dist/{chunk-FRCTA5FS.js → chunk-UAXL44HH.js} +1 -1
- package/dist/{chunk-CWVQH2SP.js → chunk-UDJPSHVI.js} +1 -1
- package/dist/{chunk-L2WBCXG7.js → chunk-UFJR63AO.js} +1 -1
- package/dist/{chunk-YT5HMLC7.js → chunk-UJY5RUZ5.js} +1 -1
- package/dist/{chunk-R6GXVLY7.js → chunk-UMIRPFQJ.js} +1 -1
- package/dist/{chunk-WRV6QKJN.js → chunk-UVPDEGIA.js} +1 -1
- package/dist/{chunk-KEVJBI5Q.js → chunk-VTCMO3K7.js} +1 -1
- package/dist/{chunk-2TXQCA4C.js → chunk-W24THMLI.js} +8 -8
- package/dist/{chunk-VXSYHTBP.js → chunk-W3454ZES.js} +1 -1
- package/dist/{chunk-EFO72DEI.js → chunk-WCAABJEV.js} +1 -1
- package/dist/{chunk-OZ4R6U2M.js → chunk-WREUA43Q.js} +1 -1
- package/dist/{chunk-ELPW25CA.js → chunk-XX34ZFYB.js} +4 -4
- package/dist/chunk-XYQFTFI7.js +24 -0
- package/dist/{chunk-UFX7F3KG.js → chunk-XYVFJLAU.js} +1 -1
- package/dist/{chunk-A7VNKVZO.js → chunk-XYXCZIJY.js} +4 -4
- package/dist/{chunk-ZCN5BU4U.js → chunk-YBE66FBR.js} +1 -1
- package/dist/{chunk-6QH7I2V5.js → chunk-Z6J4KXY3.js} +2 -2
- package/dist/{chunk-NY6MLFBX.js → chunk-ZBGPAUOH.js} +5 -5
- package/dist/{chunk-LADP6AJY.js → chunk-ZFWCTHR4.js} +7 -7
- package/dist/{chunk-ORV2AVIJ.js → chunk-ZRWZHWKI.js} +2 -2
- package/dist/data/DataTable.js +1 -1
- package/dist/data/EntityList.js +1 -1
- package/dist/data/Gantt.js +1 -1
- package/dist/data/Kanban.js +1 -1
- package/dist/data/ListFooter.js +1 -1
- package/dist/data/ListLoadError.js +1 -1
- package/dist/data/Pagination.js +1 -1
- package/dist/data/ResizableTable.js +1 -1
- package/dist/file-intake/index.js +1 -1
- package/dist/forms/BorderInput.js +1 -1
- package/dist/forms/BrandAssetEditor.js +1 -1
- package/dist/forms/Calendar.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/DateTimePicker.js +1 -1
- package/dist/forms/DisplayChips.js +1 -1
- package/dist/forms/FilePicker.js +1 -1
- package/dist/forms/FormErrorSummary.js +1 -1
- package/dist/forms/IconPicker.js +1 -1
- package/dist/forms/ImageFocusPoint.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/PositionInput.js +1 -1
- package/dist/forms/RenameField.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/TagInput.js +1 -1
- package/dist/forms/TextToolbar.js +1 -1
- package/dist/forms/TimePicker.js +1 -1
- package/dist/forms/WidthsBar.js +1 -1
- package/dist/forms/mediaLibraryMenu.js +1 -1
- package/dist/forms/mediaMoveItems.js +1 -1
- package/dist/forms/textAlign.js +1 -1
- package/dist/forms/useFileIntake.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +24 -2
- package/dist/index.js +506 -506
- package/dist/locales/zh-Hans.js +1 -1
- package/dist/map/index.js +3 -3
- package/dist/model-viewer/index.js +3 -3
- package/dist/page-tabs/index.js +5 -5
- package/dist/pdf/index.js +1 -1
- package/dist/shell/Accordion.js +1 -1
- package/dist/shell/AppUpdateBanner.js +1 -1
- package/dist/shell/Avatar.js +1 -1
- package/dist/shell/Banner.js +1 -1
- package/dist/shell/Breadcrumbs.js +1 -1
- package/dist/shell/BudgetBar.js +1 -1
- package/dist/shell/Card.js +1 -1
- package/dist/shell/ColoredBadge.js +1 -1
- package/dist/shell/ConfirmDialog.js +1 -1
- package/dist/shell/ContainerFillChart.js +1 -1
- package/dist/shell/CountBadge.js +1 -1
- package/dist/shell/Dialog.js +1 -1
- package/dist/shell/Drawer.js +1 -1
- package/dist/shell/EditableGrid.js +1 -1
- package/dist/shell/EmptyState.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/MetricBar.js +1 -1
- package/dist/shell/MetricBarLegend.js +1 -1
- package/dist/shell/MilestoneTimeline.js +1 -1
- package/dist/shell/PageHeader.js +1 -1
- package/dist/shell/ProductionTimeline.js +1 -1
- package/dist/shell/ResizeHandle.js +1 -1
- package/dist/shell/Result.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/Statistic.js +1 -1
- package/dist/shell/TimeAgo.js +1 -1
- package/dist/shell/TimelineTrack.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/shell/language.js +1 -1
- package/dist/shell/strings.d.ts +3 -0
- package/dist/shell/strings.js +1 -1
- package/dist/shell/toast.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/ErrorPage.js +1 -1
- package/dist/templates/FormLayoutPage.js +1 -1
- package/dist/templates/GalleryTemplate.js +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/Calculator-QEQU3W2L.js +0 -29
- package/dist/CurrencyConverter-L22FF4ST.js +0 -21
- package/dist/Notepad-YZOEXYE3.js +0 -24
- package/dist/Sidebar-UCCVJFSY.js +0 -44
- package/dist/chunk-ABPVCVCT.js +0 -22
- package/dist/chunk-BWQHABH7.js +0 -4
- package/dist/chunk-CILE3ZCC.js +0 -2
- package/dist/chunk-D4WO73XD.js +0 -91
- package/dist/chunk-FMLUQCFB.js +0 -2
- package/dist/chunk-GMLOMLCS.js +0 -24
- package/dist/chunk-HC5KQZFG.js +0 -8
- package/dist/chunk-IUVGHHR3.js +0 -1
- package/dist/chunk-JPE4TYRQ.js +0 -14
- package/dist/chunk-KGAYYSFE.js +0 -6
- package/dist/chunk-LQCNIQ3I.js +0 -8
- package/dist/chunk-LZOKBMAF.js +0 -1
- package/dist/chunk-OXWBSZL2.js +0 -23
- package/dist/chunk-PBSCF2ML.js +0 -15
- package/dist/chunk-QNXTVDIC.js +0 -11
- package/dist/chunk-UTQN5AIO.js +0 -6
- package/dist/chunk-XXTAMF3O.js +0 -28
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{formatPlain as e,formatFixed as o,formatGrouped as t,formatPercent as a}from"./chunk-C3QOHMR6.js";import{createContext as i,useContext as n,useMemo as r,useEffect as s}from"react";import{jsx as l}from"react/jsx-runtime";function d(i){const n=o=>e(o,i),r=e=>t(e,i),s=(e,t)=>o(e,t,i),l=(e,o)=>a(e,o,i);return{window:{minimize:"Minimize",restore:"Restore",maximize:"Maximize",windowed:"Windowed",pinOnTop:"Pin on top",unpin:"Unpin from top",close:"Close",edit:"Edit",discard:"Discard",more:"More",windowSuffix:"window",prev:"Prev",next:"Next",snapLayouts:"Snap layouts",snapLeft:"Snap left half",snapRight:"Snap right half",snapTopLeft:"Snap top-left quarter",snapTopRight:"Snap top-right quarter",snapBottomLeft:"Snap bottom-left quarter",snapBottomRight:"Snap bottom-right quarter"},taskbar:{closeWindow:"Close window",offscreenHint:"This window is off screen — click to bring it back",offscreenDot:"Off screen — click to bring this window back",expose:"Exposé — show all open windows as thumbnails",addToDesktop:"Add to desktop",removeFromDesktop:"Remove from desktop",minimizeAllWindows:"Minimize all",restoreAllWindows:"Restore all",closeAllWindows:"Close all"},logout:{goodbye:"Goodbye",seeYou:"See you next time"},about:{aboutPrefix:"About",thisApp:"this app",openSourceLicenses:"Open Source Licenses",whatsNew:"What's New",noChangelog:"No changelog available."},table:{empty:"Nothing to show",loading:"Loading",selectAll:"Select all rows",selectRow:"Select row"},select:{none:"— None —",noMatches:"No matches",allSelected:"All options selected",clear:"Clear selection",clearAll:"Clear all",changed:"Changed",selectedCount:e=>`${n(e)} selected`,remove:"Remove",reorderItem:(e,o,t)=>`${e}, ${n(o)} of ${n(t)}. Use arrow keys to reorder.`},notifications:{title:"Notifications",markAllRead:"Mark all read",dnd:"Do not disturb",dndOn:"Do not disturb is on",caughtUp:"All caught up",empty:"No notifications yet",viewAll:"View all notifications",byActor:e=>`by ${e}`,cardLabel:"Notification",dismiss:"Dismiss notification"},form:{errorSummaryTitle:"There is a problem"},help:{title:"Help",searchPlaceholder:"Search help…",empty:"No help articles yet.",noResults:"No articles match your search.",loading:"Loading",pickArticle:"Pick a help article from the left.",noBody:"This article has no body yet.",draft:"Draft",newArticle:"+ New",edit:"Edit"},update:{available:"A new version is available.",refreshNow:"Refresh now"},pageTabs:{label:"Open pages",close:"Close",favorite:"Favorite",closeOthers:"Close other tabs",closeRight:"Close tabs to the right",closeAll:"Close all tabs",unsaved:"Unsaved changes",copy:e=>`Copy ${e}`,copied:"Copied",tabMenu:"Window menu",groupToggle:(e,o)=>`${e}: ${n(o)} ${1===o?"tab":"tabs"}`,discardTitle:"Discard unsaved changes?",discardOne:"This page has changes that have not been saved. Close it anyway?",discardMany:"pages have changes that have not been saved. Close them anyway?",discardConfirm:"Discard and close",keepEditing:"Keep editing"},dialog:{close:"Close",cancel:"Cancel",ok:"OK",confirmTitle:"Confirm",destructiveTitle:"Confirm Action",destructiveCancel:"Dismiss",destructiveConfirm:"Delete",typeToConfirm:e=>`Type ${e} to confirm:`,promptTitle:"Enter a value",discardTitle:"Discard changes?",discardMessage:e=>e?`“${e}” has unsaved changes. Are you sure you want to close? All changes will be lost.`:"You have unsaved changes. Are you sure you want to close? All changes will be lost.",discardConfirm:"Discard",keepEditing:"Keep Editing"},calendar:{previousMonth:"Previous month",nextMonth:"Next month",previousYear:"Previous year",nextYear:"Next year",previousYears:"Previous years",nextYears:"Next years",monthPanel:"Choose a month",yearPanel:"Choose a year",chooseMonth:e=>`Choose a month, currently ${e}`,chooseYear:e=>`Choose a year, currently ${e}`},datePicker:{placeholder:"Select a date",dialog:"Choose a date",clear:"Clear",today:"Today",required:"Required"},dateRange:{placeholder:"Date Range",clearRange:"Clear date range",dialog:"Date range",from:"From",to:"To",start:"Start",end:"End",fromOnly:e=>`From ${e}`,toOnly:e=>`To ${e}`,range:(e,o)=>`${e} to ${o}`,required:"Required",last2Weeks:"Last 2 Weeks",lastMonth:"Last Month",last3Months:"Last 3 Months",last6Months:"Last 6 Months",last12Months:"Last 12 Months",lastHeading:"Last",last2WeeksShort:"2 weeks",lastMonthShort:"Month",last3MonthsShort:"3 months",last6MonthsShort:"6 months",last12MonthsShort:"12 months",custom:"Custom",clear:"Clear",cancel:"Cancel",apply:"Apply"},pagination:{label:"Pagination",first:"First page",previous:"Previous page",next:"Next page",last:"Last page"},list:{selected:e=>`${n(e)} selected`,selectedNotShown:(e,o)=>`${n(e)} selected, ${n(o)} not shown`,allLoaded:(e,o)=>`All ${r(e)} ${o} loaded`,count:(e,o)=>`${r(e)} ${o}`,loadedOf:(e,o,t)=>`${r(e)} of ${r(o)} ${t}`,loadingMore:"Loading more",loadError:"Couldn't load this list",loadErrorMessage:"Something went wrong fetching these records. Check your connection and try again.",retry:"Try again"},kanban:{loading:"Loading",empty:"No items.",dropHere:"Drop here",addItem:"Add item"},gantt:{loading:"Loading",empty:"No tasks.",task:"Task",scale:"Scale",day:"Day",week:"Week",month:"Month",today:"Today",barName:(e,o,t)=>`${e}, ${o} to ${t}`,milestoneName:(e,o)=>`${e}, milestone, ${o}`,done:"done",moveHint:"Arrow keys move it a day; Shift with an arrow changes the end date."},files:{attach:"Attach files",drop:"Drop files to attach",remove:e=>`Remove ${e}`,chooseMany:"Choose files",chooseOne:"Choose a file",dragMany:"or drag them here",dragOne:"or drag it here",notAccepted:(e,o)=>`${e} is not an accepted file type${o?` (${o})`:""}`,tooLarge:(e,o,t)=>`${e} is ${o} — the limit is ${t}`,tooMany:(e,o)=>`${e} was not added — ${n(o)} ${1===o?"file":"files"} is the limit`,bytes:e=>`${n(e)} B`,kilobytes:e=>`${n(e)} KB`,megabytes:e=>`${s(e,1)} MB`},media:{uploadImage:"Upload an image",uploadVideo:"Upload a video",uploadFile:"Upload a file",upload:"Upload media",cta:"Choose from library or upload",replace:"Replace",remove:"Remove",uploading:"Uploading",choosing:"Choosing",pickFailed:"The library could not be opened. Try again.",cover:"Cover",add:"Add",addMedia:"Add media",empty:"No media.",removeItem:e=>`Remove ${e}`,reorder:(e,o,t)=>`${e}, item ${n(o)} of ${n(t)}. Use arrow keys to reorder.`,image:"Image",video:"Video",changeImage:"Change image",changeVideo:"Change video",focus:"Image focus",usedIn:e=>`Used in ${n(e)} ${1===e?"place":"places"}`,notUsed:"Not used anywhere",moveTo:(e,o)=>{const t="image"===o?"image":"video"===o?"video":"file";return`Move ${n(e)} ${t}${1===e?"":"s"} to`},moveNowhere:"There is no folder to move to",moveToMenu:"Move to",files:"Files"},mediaLibrary:{products:"Products",allFiles:"All files",trash:"Trash",readOnlyBadge:"Read-only",folders:"Folders",readOnly:"Read-only. Edit these pictures in Products > Design > Media.",editedAtHq:e=>`Edited at HQ (${e}).`,readOnlyMenu:"Read-only · edited in Products > Design > Media",noProductFolder:"Products folders come from brand > design > finish. You cannot make a folder here.",noDropProducts:"Read-only. You cannot move or upload files into Products.",newFolder:"New folder",newSubfolder:"New subfolder",folderName:"Folder name",fileName:"File name",folderActions:"Folder actions",upload:"Upload",rename:"Rename",moveTo:"Move to",moveToTrash:"Move to Trash",deleteFolder:"Delete folder",folderNotEmpty:"Only an empty folder can be deleted. Move or delete what is in it first.",moveFilesToTrash:e=>`Move ${n(e)} files to Trash`,filesSelected:e=>`${n(e)} files selected`,fileCount:e=>`${n(e)} ${1===e?"file":"files"}`,selected:e=>`${n(e)} selected`,clearSelection:"Clear selection",selectAll:"Select all",replace:"Replace",cropEdit:"Crop & edit",copyUrl:"Copy URL",fileUrl:"File URL",urlLabel:"URL",openOriginal:"Open original",openInDesign:"Open in Design",restore:"Restore",deleteForever:"Delete forever",emptyTrash:"Empty trash",search:"Search file name",searchProducts:"Search design, finish, part number",mediaType:"Media type",allTypes:"All types",images:"Images",videos:"Videos",use:"Use",anyUse:"Any use",emailOnly:"Email only",websiteOnly:"Website only",notUsed:"Not used",sort:"Sort",newest:"Newest",byName:"Name",bySize:"Size",view:"View",grid:"Grid",list:"List",used:e=>`Used ${n(e)}`,email:"Email",private:"Private",daysAgo:e=>1===e?"1 day ago":`${n(e)} days ago`,details:"Details",name:"Name",type:"Type",size:"Size",resolution:"Resolution",addedBy:"Added by",folder:"Folder",usedIn:"Used in",places:e=>`${n(e)} ${1===e?"place":"places"}`,design:"Design",finish:"Finish",angleLug:"Angle · Lug",owner:"Owner",emptyProducts:"No pictures here yet",trashEmpty:"Trash is empty.",noMatches:"No matches.",emptyFolder:"No files in this folder yet.",oneChosen:e=>`1 selected · ${e}`,noneChosen:"Nothing selected",cancel:"Cancel",chooseImage:"Choose image",privateNoPick:"A private file cannot be used here.",alreadyHere:"The files are already here",folderAlreadyHere:"The folder is already here",notIntoItself:"A folder cannot go inside itself"},lightbox:{label:"Preview",close:"Close preview",previous:"Previous",next:"Next",counter:(e,o)=>`${n(e)} / ${n(o)}`,openOriginal:"Open original",openFile:"Open file"},brandAsset:{save:e=>`Save ${e}`,remove:e=>`Remove ${e}`,discard:"Discard change",saveFailed:e=>`Could not save ${e}.`,removeFailed:e=>`Could not remove ${e}.`,region:(e,o)=>`${e} for ${o}`,usedFor:e=>`Used for ${e}.`,previews:e=>`${e} previews`,preview:"Preview",alt:(e,o)=>`${e} ${o}`},copy:{copy:"Copy",copyLabel:e=>`Copy ${e}`,copied:"Copied",copyValue:e=>`Copy ${e}`,copiedValue:"Copied!",copiedLabel:e=>`${e} copied`,failed:"Could not copy to the clipboard"},keypad:{backspace:"Backspace",enter:"Enter"},banner:{dismiss:"Dismiss"},transfer:{uploading:"Uploading",error:"Error",retry:"Retry",dismiss:"Dismiss",cancel:"Cancel",cancelVerb:e=>`Cancel ${e}`},count:{items:e=>`${n(e)} ${1===e?"item":"items"}`,tabs:e=>`${n(e)} ${1===e?"tab":"tabs"}`,windows:e=>`${n(e)} ${1===e?"window":"windows"}`},badge:{remove:"Remove",removeItem:e=>`Remove ${e}`},breadcrumbs:{label:"Breadcrumb",hidden:"Hidden crumbs"},emptyState:{message:"Nothing here yet."},errors:{notFound:"Page not found",notFoundBody:"The page you're looking for doesn't exist or was moved.",forbidden:"Access denied",forbiddenBody:"You don't have permission to view this page.",noAccess:"You don't have access to this",serverError:"Something went wrong",serverErrorBody:"An unexpected error occurred. Please try again.",retry:"Try again",details:"Error details"},search:{placeholder:"Search...",escBadge:"ESC",searching:"Searching",noResults:"No results found.",minChars:e=>`Type at least ${n(e)} characters to search...`,navigate:"navigate",open:"open",close:"close",enterKey:"Enter",escKey:"Esc",recent:"Recent",favorites:"Favorites",actions:"Actions",listLabel:"Search results",groupCount:(e,o)=>`${n(e)}${o?"+":""}`,groupLabel:(e,o,t)=>`${e}, ${n(o)}${t?"+":""}`,seeAll:e=>`See all ${e}`,searchFailed:"Search failed — check your connection and try again.",partialFailure:"Some results could not be loaded.",tabKey:"Tab",nextGroup:"next group"},grid:{selectAll:"Select all",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:e=>`Delete row ${e}`,insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteColumn:e=>`Delete column ${e}`,resize:"Drag to resize · double-click to auto-fit",fill:"Drag to fill"},sidebar:{resize:"Drag to resize · double-click to reset",sections:"Sections",closeSections:"Close sections"},resizeHandle:{label:"Resize panel",hint:"Drag to resize · double-click to reset"},number:{increase:"Increase",decrease:"Decrease"},slider:{value:e=>`${e} value`},accordion:{changed:e=>`${e} changed`},settingView:{auto:"auto",edited:"Changed in this view",resetName:e=>`Reset ${e}`,inheritName:e=>`Inherit parent layout for ${e}`,inheritParentLayout:"Inherit parent layout",backToDefault:"back to the site default",backToAuto:"back to auto",backTo:e=>`back to ${e}`,tip:(e,o)=>`${e} (${o})`,viewDesktop:"Desktop",viewTablet:"Tablet",viewPhone:"Phone"},displayChips:{shown:"Shown",hidden:"Hidden",shownHint:"Shown · click to hide",hiddenHint:"Hidden · click to show"},corners:{radius:"Corner radius",unit:"px",radiusMark:"R"},iconPicker:{button:(e,o)=>`${e}: ${o}`},iconNames:{none:"None","arrow-right":"Arrow","arrow-long-right":"Long arrow","arrow-up-right":"Arrow up right","chevron-right":"Chevron",external:"External",cart:"Cart",bag:"Bag",tag:"Tag",email:"Email",location:"Location",play:"Play",download:"Download",search:"Search",car:"Car",phone:"Phone",chat:"Chat","chevron-left":"Chevron left",package:"Package",truck:"Truck","shield-check":"Shield check",wheel:"Wheel","receipt-refund":"Refund receipt",dot:"Dot",cross:"Cross",slash:"Slash",triangle:"Triangle"},widths:{column:e=>`Column ${e}`,divider:(e,o)=>`Divider between column ${e} and column ${o}`,dividerValue:(e,o,t,a)=>`Column ${e} ${l(o,0)}, column ${t} ${l(a,0)}`,dragHint:"Drag to change the widths",hint:(e,o)=>`Type a width or drag a line. No column goes below ${l(o,0)}.`,equal:"equal widths"},color:{swatch:(e,o)=>`${e}: ${o}`,none:"None",panel:e=>`${e} picker`,square:"Saturation and brightness",squareValue:(e,o)=>`Saturation ${l(e,0)}, brightness ${l(o,0)}`,hue:"Hue",opacity:e=>`${e} opacity`,hex:e=>`${e} hex code`,presets:"Presets",clear:"No color"},imageFocus:{picture:(e,o)=>`${e}: ${o}`,hint:"Drag the dot on the picture, or move it with the arrow keys. Shift moves it further.",noImage:"Choose an image first. There is nothing to focus yet."},link:{linkType:"Link type",address:"Link address",addressPlaceholder:"Link (e.g. /wheels or https://…)",unsafe:"Use a web address (https://…), a page on this site (/…), mailto: or tel:.",unavailable:e=>`${e} (unavailable)`,filter:"Filter",noFilter:"No filter (all products)",value:"Value",filterHint:"Filters come from Product Types. Only values in this site's catalogue are listed.",title:"Link",apply:"Apply",cancel:"Cancel",remove:"Remove",addLink:"Add a link",text:e=>`${e} text`,linkOf:(e,o)=>`${e} link: ${o||"none"}`},textToolbar:{formatting:"Formatting",bold:"Bold",italic:"Italic",underline:"Underline",strike:"Strikethrough",color:"Color",link:"Link",sup:"Superscript",sub:"Subscript",code:"Code",alignment:"Alignment",alignLeft:"Left",alignCenter:"Center",alignRight:"Right",alignJustify:"Justify",bullet:"Bulleted list",number:"Numbered list",quote:"Quote",letterCase:"Letter case",caseNone:"As typed",caseUpper:"Uppercase",caseLower:"Lowercase",clear:"Clear formatting"},tree:{empty:"Nothing here yet",dropHere:"Drop here",dragHint:"Drag to move",moveHint:"Alt+Arrow Up or Alt+Arrow Down moves it",insertHere:"Insert here"},layout:{desktop:"Desktop",sidebar:"Sidebar",switchToDesktop:"Switch to Desktop",switchToSidebar:"Switch to Sidebar",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",keepSidebarOpen:"Keep sidebar open",goHome:"Go to Home",resizeSidebar:"Resize sidebar",search:"Search…",navLabel:"Main menu",openWindows:"Open windows",favoriteApps:"Favorite apps",openFavorite:e=>`Open ${e}`,removeFavorite:"Remove from Favorites",pageResult:"Page",accountMenu:e=>`Account menu for ${e}`,profile:"My Profile",notifications:"Notifications",reportIssue:"Suggestion or Bug",signOut:"Sign Out",signOutTitle:"Sign Out",signOutMessage:"Do you want to log out? All windows will reopen when you log back in.",openMenu:"Open menu",closeMenu:"Close menu",openTabs:"Open tabs",getTheApp:e=>`Get the ${e} app`,openApp:"Open",dismiss:"Dismiss",deviceUsesSidebar:"This device always uses the Sidebar layout. Your choice still applies when you sign in on a computer.",largerScreensOnly:"Larger screens only",usedOnThisDevice:"Used on this device",back:"Back"},markdown:{screenshot:"Screenshot"},severity:{success:"ok",warning:"warning",danger:"critical",unrecognised:e=>`unrecognised severity ${e}`},meter:{noData:"no data",warningAt:e=>`warning ≥ ${n(e)}`,criticalAt:e=>`critical ≥ ${n(e)}`,legendWarning:"warning",legendCritical:"critical",noReading:"no reading",noBudget:"no budget",ofBudget:e=>`${e} of budget`,budget:"budget",pace:"expected by now",hoursMinutes:(e,o)=>`${n(e)}h ${n(o)}m`,minutesSeconds:(e,o)=>`${n(e)}m ${n(o)}s`,seconds:e=>`${n(e)}s`},charts:{showTable:"Show the data as a table",loading:"Loading chart data",noData:"No data in this window.",windowStart:"Window start",windowEnd:"Window end",window:(e,o,t)=>`Time window — showing ${e} to ${o} of ${n(t)} intervals`,overIntervals:(e,o)=>`${e.join(", ")} over ${n(o)} intervals`,acrossCategories:(e,o)=>`${e.join(", ")} across ${n(o)} categories`,acrossMeasures:(e,o)=>`${e.join(", ")} across ${n(o)} measures`,breakdown:(e,o)=>`Breakdown of ${e} across ${n(o)} segments`,funnel:(e,o,t)=>`Funnel of ${n(e)} stages, ${o} down to ${t}`,radialTrack:e=>`${n(e)} categories, as concentric proportions`,radialCycle:e=>`${n(e)} categories, around a cycle`,tableFrom:"From",tableTo:"To",tableItem:"Item",tableLevel:"Level",tableSeries:"Series",inBucket:e=>`${e} in this bucket`,zoomRange:(e,o,t)=>`${e} – ${o} · ${n(t)} ${1===t?"interval":"intervals"}`,zoomClear:"Clear",zoomLevel:(e,o)=>`${e} avg · ${o} peak`,inCategory:e=>`${e} in this category`,value:"Value",share:"Share",count:"Count",flow:"Flow",totalFlow:"Total flow",throughput:"Throughput",open:"Open",high:"High",low:"Low",close:"Close",maximum:"Maximum",q3:"Q3",median:"Median",q1:"Q1",minimum:"Minimum",distribution:"Distribution",fiveNumber:(e,o)=>`${e}: five-number summary for ${n(o)} categories`,outliers:e=>`${n(e)} outlier${e>1?"s":""} beyond the whiskers`,price:"Price",ohlc:(e,o)=>`${e}: open, high, low and close across ${n(o)} periods`,closedAbove:"Closed above its open",closedBelow:"Closed below its open",noFlows:"No flows to chart.",chord:e=>`Flows between ${n(e)} participants`,chordFolded:e=>`+${n(e)} more in Other`,noStages:"No stages to chart.",ofFirstStage:"Of first stage",droppedHere:"Dropped here",intensity:"Intensity",noActivity:"No activity in this window.",heatmap:(e,o,t)=>`${e} across ${n(o)} rows and ${n(t)} columns`,countAxis:"count",histogram:(e,o,t)=>`${e}: ${n(o)} bins over ${n(t)} observations`,observations:"Observations",notEnough:"Not enough eligible requests to judge.",objectiveMet:e=>`objective ${e} met`,objectiveMissed:e=>`objective ${e} missed`,nothingToPlot:"Nothing to plot.",nothingToCompare:"Nothing to compare.",other:"Other",nothingToBreakDown:"Nothing to break down.",range:"Range",rangeLabel:(e,o)=>`${e}: low and high across ${n(o)} categories`,nothingToRank:"Nothing to rank in this window.",emphasised:"(emphasised)",sankey:(e,o)=>`Flow between ${n(e)} nodes over ${n(o)} links`,noObservations:"No observations in this window.",xAxis:"x",yAxis:"y",size:"Size",scatter:(e,o,t)=>`${e.join(", ")}: ${o} against ${t}`,outsideRange:e=>`${n(e)} ${1===e?"point":"points"} outside the shown range`,waterfall:(e,o,t)=>`Waterfall of ${n(e)} steps from ${o} to ${t}`,balance:"Balance",increase:"Increase",decrease:"Decrease",runningTotal:"Running total",sunburst:(e,o)=>`Hierarchy of ${e} across ${n(o)} levels`,treemap:e=>`Treemap of ${n(e)} items`,trendUp:"up",trendDown:"down",trendFlat:"flat"},timeline:{days:e=>`${r(e)} days`,daysToToday:e=>`${r(e)} days to today`,notReached:"Not yet reached",next:"Next",more:e=>`+${n(e)} more`,today:"Today",todayTitle:e=>`Today — ${e}`,open:e=>`Open ${e}`,openButton:"Open",scrub:"Scrub the timeline",alsoToCome:e=>`Also to come: ${e.join(", ")}`,start:e=>`Start · ${e}`,events:(e,o)=>`${n(e)} events · ${o.join(", ")}`,started:e=>`started ${e}`,duration:e=>`${r(e)} day${1===e?"":"s"}`,reached:(e,o)=>`${n(e)} of ${n(o)} milestones`,milestones:e=>`${e} milestones`},production:{heading:"Production progress",start:"Start",estimated:"Estimated",estimatedCompletion:"Estimated completion",estDone:"Est. done",play:"Play",pause:"Pause",playTitle:"Play the timeline, report by report",backTo:e=>`Back to ${e}`,showing:e=>`Showing ${e}`,overall:e=>`${l(e,0)} overall`,inStock:e=>`${r(e)} pc in stock`,noReport:"No production report filed yet",leadTime:e=>`${r(e)} day${1===e?"":"s"} lead time`,report:"Production report",shipment:"Shipment",inspection:"Inspection",invoice:"Invoice",scrub:"Scrub the production timeline",label:(e,o)=>`Production reports and events, ${e} to ${o}`},containers:{items:e=>`${n(e)} items`,pieces:e=>`${n(e)} pcs`,split:(e,o)=>`(${n(e)} instr / ${n(o)} loaded)`,added:(e,o)=>`${n(e)} new (${n(o)} pcs)`,fill:(e,o)=>`${s(e,1)} / ${n(o)} m³`,total:"Total:",instructed:e=>`${s(e,2)} m³ instruction`,loaded:e=>`${s(e,2)} m³ loaded`,volume:e=>`${s(e,2)} m³`,noVolume:"Volume: N/A (no volume data for these part numbers)"},toast:{notification:"Notification",undo:"Undo"},map:{failed:"The map could not be drawn here. The list has everything it shows.",approximate:e=>`${e}, approximate location`,approximateTitle:e=>`${e} (approximate)`,places:e=>1===e?"place":"places",group:(e,o)=>`${n(e)} ${o} here`,stops:e=>`Stops ${e}`,closeBy:(e,o)=>`${n(e)} more ${o} close by, drawn when the map is closer`,spread:"Press to see them apart",cycle:"They stand on one spot: press for the next of them",fullScreen:"Full screen",leaveFullScreen:"Leave full screen",chosen:e=>`${e}, chosen on the map`,closeCard:"Close",openRecord:"Open"},modelViewer:{loading:"Loading the 3D model",noWebgl:"This browser can't show 3D, so this is a still picture.",failed:"The 3D model didn't load, so this is a still picture. Reload the page to try again."},pdf:{previousPage:"Previous page",nextPage:"Next page",pageOf:(e,o)=>`${n(e)} / ${n(o)}`,zoomOut:"Zoom out",zoomIn:"Zoom in",zoom:"Zoom",fitWidth:"Fit width",fitPage:"Fit page",fit:"Fit",fitHint:"Fit to the pane: follows its size until you zoom by hand",print:"Print",download:"Download",email:"Email",loading:"Loading PDF",loadFailed:"Failed to load PDF",allowPopups:"Allow popups to print"},loading:{label:"Loading"},language:{title:"Language",description:"The language of menus, labels and messages.",reloadNote:"The page reloads when you change the language."},entityList:{open:"Open",copy:"Copy",copyColumn:e=>`Copy ${e}`,copyRows:e=>1===e?"Copy row":`Copy ${n(e)} rows`,exportSelected:"Export selected to CSV",selectAll:"Select all",selectAllLoaded:e=>`Select all ${n(e)} loaded`,clearSelection:"Clear selection",refresh:"Refresh",copiedText:"Text",copiedRows:e=>1===e?"Row":`${n(e)} rows`,exported:e=>`Exported ${n(e)} ${1===e?"row":"rows"}.`,exportTruncated:(e,o)=>`Exported ${n(e)} of ${n(o)} rows. The server capped this export, so the file is incomplete.`,exportTruncatedUnknown:e=>`Exported only some of the ${n(e)} rows. The server capped this export, so the file is incomplete.`,exportFailed:"CSV export failed."},columns:{choose:"Choose columns",heading:"Columns",reset:"Reset",saveDefault:"Save as default for all users",savedDefault:"Saved as default",select:"Select",selectDone:"Done",showSelection:"Show selection column",hideSelection:"Hide selection column"},record:{loading:"Loading record",signInRequired:"Sign in required",signInBody:"Your session may have expired. Sign in again to open this record.",notFound:"Record not found",loadFailed:"Couldn't load record",checkConnection:"Check your connection and try again.",rejected:"The server rejected this request.",retry:"Try again"},password:{current:"Current Password",newPassword:"New Password",confirm:"Confirm Password",submit:"Change Password",submitting:"Changing",done:"Done",currentRequired:"Current password is required.",tooShort:e=>`New password must be at least ${n(e)} characters.`,mismatch:"Passwords do not match.",failed:"Failed to change password.",changed:"Your password has been changed successfully."},pdfAction:{label:"PDF",loading:"Loading",preview:"Preview",download:"Download",email:"Send by Email",downloaded:e=>`${e} downloaded.`,tookTooLong:e=>`${e} took too long to load. Please try again.`,previewLoading:"LOADING PDF",previewTookTooLong:"This document took too long to load. Close this window and try again.",previewFailed:"Failed to load PDF."},undo:{undo:"Undo",redo:"Redo",undoStep:(e,o)=>`Undo ${e} (${o})`,redoStep:(e,o)=>`Redo ${e} (${o})`,nothingToUndo:"Nothing to undo",nothingToRedo:"Nothing to redo"},sounds:{title:"Sounds",enable:"Sound effects",autosave:"Changes are saved automatically",choice:(e,o)=>`${e} — ${o}`,packClassic:"Classic",packMinimal:"Minimal",packRetro:"Retro",packSoft:"Soft",packArcade:"Arcade",packSilent:"Silent",eventClick:"Click",eventSuccess:"Success",eventError:"Error",eventNotification:"Notification",eventStartup:"Startup",eventTimerDone:"Timer",eventLogout:"Logout"},serverStatus:{connected:"Connected",disconnected:"Disconnected",checking:"Checking",lastOkTitle:(e,o)=>`${e} · last ok ${o}`,details:"Server connection details",lastPoll:e=>`Last poll ${e}.`,lastFailure:e=>`Last failure ${e}.`,firstPoll:"First poll in flight",server:"Server",protocol:"Protocol",browser:"Browser",online:"Online",offline:"Offline",lastOk:"Last OK",lastFail:"Last fail",latency:"Latency",poll:"Poll",pollEvery:e=>`every ${n(e)} s`,session:"Session",user:"User",notSignedIn:"Not signed in",role:"Role",build:"Build",app:"App",userAgent:"UA",pingHint:"Click ↻ to ping now",refresh:"Refresh"},bulkImport:{description:"Paste from spreadsheets, type directly, or upload a CSV. Rows don't need to be in order — they'll be matched. Values not in the list will be added to the end. Fields left blank will not be affected.",lines:e=>`${n(e)} lines`,total:(e,o)=>`${e}: ${o}`,clear:"Clear",upload:"Upload CSV",importLines:e=>`Import ${n(e)} Lines`,importing:"Importing",importFailed:"Import failed.",enterAtLeastOne:e=>`Enter at least one ${e||"value"}.`,allSkipped:"All rows skipped.",cancel:"Cancel",mapTitle:"Map CSV columns to fields",skip:"— Skip —",columnOption:(e,o)=>`Column ${n(e)} (e.g. ${o})`,rowsDetected:e=>`${n(e)} rows detected`,confirmMapping:"Confirm Mapping",duplicatesTitle:"Duplicate entries detected",duplicatesFound:e=>`${n(e)} ${1===e?"value appears":"values appear"} more than once in your import. Choose how to handle each before proceeding.`,occurrences:e=>`${n(e)} occurrences`,keepFirst:"Keep first",keepLast:"Keep last",keepAll:"Keep all",skipAll:"Skip all",keptDropped:(e,o)=>`${n(e)} kept · ${n(o)} dropped`,proceed:"Proceed",duplicatesMerged:e=>`${n(e)} ${1===e?"value appeared":"values appeared"} more than once. Each is merged into a single line with its quantity summed — review before proceeding.`,mergedFrom:"Merged from",mergedRows:e=>`${n(e)} rows`,mergeSummary:(e,o)=>`${n(e)} duplicate rows → ${n(o)} merged line${1===o?"":"s"}`},preview:{windowTitle:e=>`${e} - Preview`,untitled:"Untitled",position:(e,o)=>`${n(e)} of ${n(o)}`,namedPosition:(e,o)=>`${e} · ${o}`,previousFile:"Previous file",nextFile:"Next file",open:"Open",formats:"PDF · DXF · 3D · Images",dropHere:e=>`Drop a file here, or click ${e}.`,supportedFormats:"Supported formats",formatPdf:"multi-page document viewer",formatDxf:e=>`vector CAD drawings (optional ${e} peer dep)`,format3d:e=>`3D models (optional ${e} peer dep)`,formatImage:"raster images",dwgNote:"DWG files need to be converted to PDF or DXF first (server-side).",dropToOpen:"Drop to open",dwgUnsupported:"DWG files need server-side conversion. Convert to PDF or DXF first.",unsupportedType:e=>`Unsupported file type: .${e||"unknown"}`,converting:"Converting file",download:"Download",email:"Email",howToNavigate:"How to navigate",stopMeasuring:"Stop measuring (Esc)",scrollToZoom:"Scroll to zoom",closePanel:"Close",annotate:"Annotate",annotateHint:"Annotate this image",view:"View",viewHint:"Back to viewer",copy:"Copy",save:"Save",imageFailed:"Failed to load image.",downloadFailed:"Download failed — couldn't reach the file."},drawing:{loading:"Loading drawing",notInstalled:"dxf-viewer is not installed in this app.",renderFailed:"Failed to render DXF.",layers:"Layers",layersHint:"Toggle layer visibility",allLayers:"All",noLayers:"None",measure:"Measure",measureHint:"Measure distance — click two points on the drawing, or type DI / DIM below",auto:"Auto",autoHint:"Auto — AutoCAD DIMLINEAR: measures ΔX or ΔY, whichever is larger between the two picks",horizontalHint:"Horizontal — distance along the X axis between two picks (AutoCAD DIMLINEAR horizontal)",verticalHint:"Vertical — distance along the Y axis between two picks (AutoCAD DIMLINEAR vertical)",point:"Point",pointHint:"Point — straight-line (Euclidean) distance between two picks (AutoCAD DIST)",fixX:"fix Δx",fixY:"fix Δy",fixHint:"Lock the second pick's axis coord to first pick + this value (mm). The reported measurement becomes the perpendicular distance.",clearFixed:"Clear fixed distance",horizontalDistance:e=>"Horizontal distance (Δx) between the two picked points"+(e?" — Auto resolved to the X axis":""),verticalDistance:e=>"Vertical distance (Δy) between the two picked points"+(e?" — Auto resolved to the Y axis":""),straightDistance:"Straight-line distance between the two picked points",fit:"Fit",fitHint:"Fit drawing to view",dragToPan:"Drag to pan",fitToReset:"Fit to reset",typeToMeasure:e=>`Type ${e} to measure`,commandPlaceholder:"Type a command — DI, DIM, H, V, Z, LA (? for help)",commandHelp:"Commands: DI distance · DIM/DLI linear dim · H / V force axis · <number> lock Δ · U undo pick · Z fit · LA layers · Esc exit",echoDistance:(e,o,t)=>`Distance = ${e} ΔX = ${o} ΔY = ${t}`,echoLinear:(e,o)=>`Linear dimension = ${e} (${o})`,echoLocked:(e,o,t,a)=>`${e} = ${o} with ${t} locked to ${a}`,axisLocked:(e,o)=>`${e} locked to ${o} — the label shows the perpendicular distance`,fixedCleared:"Fixed distance cleared.",fixedNeedsAxis:"Fixed distances apply in H or V mode — type H or V first.",echoDist:"DIST — click two points; straight-line distance (Esc to exit)",echoDimLinear:"DIMLINEAR — click two points; measures ΔX or ΔY, whichever is larger (H / V to force)",echoHorizontal:"Horizontal — ΔX between the two picks",echoVertical:"Vertical — ΔY between the two picks",echoAuto:"Auto (DIMLINEAR) — measures along the dominant axis of the two picks",measureOn:"Measure on — click two points.",measureOff:"Measure off.",pickRemoved:"Last pick removed.",zoomExtents:"Zoom extents.",layersToggled:"Layer panel toggled.",measurementCleared:"Measurement cleared.",readOnly:e=>`${e} is a drawing command — Preview is a read-only viewer. Measuring: DI, DIM, H, V (? for help)`,unknownCommand:e=>`Unknown command "${e}" — try DI, DIM, H, V, Z, LA (? for help)`,cancelled:"*Cancel*"},model:{loading:"Loading 3D model",stepNote:"STEP files load OpenCascade WASM (~5 MB) on first use.",notInstalled:"online-3d-viewer is not installed in this app. Add it to enable 3D file viewing.",loadFailed:"Failed to load 3D model.",rootNode:"Root",node:"Node",collapse:"Collapse",expand:"Expand",fitToView:"Fit to view",hide:"Hide",show:"Show",isometric:"ISO",isometricView:"Isometric view",top:"TOP",topView:"Top view",front:"FRT",frontView:"Front view",side:"SDE",sideView:"Side view",perspective:"Perspective",orthographic:"Orthographic",toPerspective:"Switch to perspective view",toOrthographic:"Switch to orthographic view",snapshot:"Save snapshot as PNG",measureHint:"Measure distance — click two points on the model",point:"Point",pointHint:"Point — measure straight-line distance between two picked points",perpendicularHint:"Perpendicular — pick two surfaces and measure the perpendicular gap between them",straightDistance:"Straight-line distance between the two picked points",perpendicularDistance:"Perpendicular distance between the two picked surfaces",meshesHint:"Toggle meshes panel",displayHint:"Toggle display panel",downloadOriginal:"Download original file",meshes:"Meshes",readingModel:"Reading model",noStructure:"No structure available",allVisible:"All visible",hiddenCount:e=>`${n(e)} hidden`,dragToRotate:"Drag to rotate",rightDragToPan:"Right-click drag to pan",display:"Model Display",backgroundColor:"Background Color",showEdges:"Show Edges",edgeColor:"Edge Color",edgeThreshold:"Edge Threshold",sectionView:"Section View",angle:"Angle",axis:"Axis",flipHint:"Flip section direction",flip:"flip →",flipped:"← flipped",position:"Position",resetDisplay:"Reset to Default"},annotator:{toolSelect:"Select / Move",toolDraw:"Pen / Draw",toolRect:"Rectangle",toolEllipse:"Ellipse",toolArrow:"Arrow",toolMosaic:"Mosaic",toolText:"Text",toolCrop:"Crop",weight:"Weight",radius:"Radius",size:"Size",padding:"Pad",fontSystem:"System",fontSerif:"Serif",fontMono:"Mono",fontCursive:"Cursive",bold:"Bold",boldLetter:"B",italic:"Italic",italicLetter:"I",underline:"Underline",underlineLetter:"U",border:"Border",borderColor:"Text-box border color",addBorder:"Add a border",removeBorder:"Remove border",fill:"Fill",fillColor:"Text-box background color",addFill:"Add a background fill",removeFill:"Remove fill",add:"Add",zoomOut:"Zoom out",zoomIn:"Zoom in",fit:"Fit",fitHint:"Fit to area",undo:"Undo",applyCrop:"Apply Crop",cancel:"Cancel",apply:"Apply",hintSelected:"Drag to move. Drag a corner to resize. Delete / Backspace removes. Click outside to deselect.",hintSelect:"Tap a shape to select. Double-click text to edit.",hintText:"Click to drop a text label.",hintCrop:"Drag a rectangle to set the crop region.",hintDraw:"Drag to draw freehand.",hintShape:"Drag on the image to draw.",textPlaceholder:"Type then Enter…",loadFailed:"Failed to load image",exportFailed:"Failed to export",clipboardUnsupported:"Clipboard images not supported in this browser",copyFailed:"Failed to copy",copied:"Copied to clipboard",copyRefused:"Copy failed (clipboard permission?)"},attachment:{fallbackName:"attachment",noLink:"This attachment has no download link.",spreadsheetFailed:"Could not open the spreadsheet — opening the file instead.",workbookUnavailable:"Spreadsheet preview is unavailable for this file type. Opening the file instead.",noViewer:"Opening this file outside the app — no viewer can show it here.",loading:"LOADING FILE",loadFailed:"Failed to load this file."},aboutApp:{title:e=>`About ${e}`,version:e=>`Version ${e}`,partOf:e=>`Part of the ${e} desktop environment`,shellVersion:e=>`shell v${e}`,notepad:"Color-coded notes with checklists, desktop stickies and entity autolinking.",preview:"Viewer for PDF documents, images, DXF drawings and 3D models — CAD-style measuring with object snap and an AutoCAD-like command bar.",files:"Personal file manager with folders, uploads, quota, trash, sharing and desktop shortcut folders.",browser:"Minimal web browser with bookmarks, history and navigation bar."}}}var c=d(),p=/* @__PURE__ */new Map;var h=i(c),u=i(null),m=/* @__PURE__ */new Set;var g=c,w={};function f(){return g}function $({value:e=w,locale:o,children:t}){const a=n(u),i=r(()=>function(e){if(e)try{return Intl.getCanonicalLocales(e)[0]}catch{return void(m.has(e)||(m.add(e),console.error(`[efficient-shell] ShellStringsProvider: locale="${e}" is not a BCP 47 language tag, so it is ignored and numbers and dates keep their default formatting. Pass a tag such as "de-DE" or "ja".`)))}}(o),[o]),f=void 0===o?a?.locale:i,$=r(()=>{const o=function(e){if(!e)return c;let o=p.get(e);return o||(o=d(e),p.set(e,o)),o}(f),t={};for(const a of Object.keys(o))t[a]={...o[a],...e[a]??{}};return t},[e,f]),v=r(()=>({locale:f}),[f]),y=null!==a;return s(()=>{if(!y)return g=$,()=>{g===$&&(g=c)}},[$,y]),/* @__PURE__ */l(u.Provider,{value:v,children:/* @__PURE__ */l(h.Provider,{value:$,children:t})})}function v(){return n(h)}function y(){return n(u)?.locale}function b(e){const[o="",...t]=e("\0").split("\0");return[o,t.join("")]}export{c as DEFAULT_SHELL_STRINGS,$ as ShellStringsProvider,f as currentShellStrings,b as splitAround,y as useShellLocale,v as useShellStrings};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-K5YT5PMJ.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-
|
|
2
|
-
return
|
|
3
|
-
/* @__PURE__ */M("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */M("span",{ref:
|
|
4
|
-
/* @__PURE__ */
|
|
5
|
-
/* @__PURE__ */M("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */M(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */M(p,{name:"close"}),onClick:()=>{ie([]),
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */M("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${k}`,children:ke.select.clearAll}),
|
|
8
|
-
/* @__PURE__ */M(m,{size:"sm",padding:"py-2",label:ke.search.searching}):
|
|
9
|
-
/* @__PURE__ */M("span",{className:"min-w-0 flex-1",children:
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */M("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */M(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&
|
|
13
|
-
/* @__PURE__ */M("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Me(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${k}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */M("span",{className:"min-w-0 flex-1 truncate",children:
|
|
1
|
+
import{nextEnabledIndex as e}from"./chunk-EO5RLFRX.js";import{flattenOptionItems as t,filterOptionItems as n,optionMatches as r,groupedRows as l,OptionCheck as o,OptionSublabel as i}from"./chunk-K5YT5PMJ.js";import{END_ACTIONS_PAD as a,InputEndActionSlot as s,InputEndActionButton as c}from"./chunk-J5OAQAAD.js";import{INPUT_BASE_ON as u,INPUT_BASE as d}from"./chunk-AYZY3YNC.js";import{Button_default as h}from"./chunk-UTISUEO4.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{LoadingSpinner as m}from"./chunk-R2VKEMZH.js";import{Tooltip as f}from"./chunk-F2RAIGCG.js";import{onOverlayOpen as b}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as g}from"./chunk-62LW225J.js";import{useDropdownPosition as v,MENU_MAX_HEIGHT as w}from"./chunk-VY3UA6AR.js";import{useBrowserLayoutEffect as y}from"./chunk-ZDXRSY2Y.js";import{registerModalEscapeInterceptor as x}from"./chunk-TWVUQUUD.js";import{GLASS_DIVIDER as k,glassStyle as j}from"./chunk-5FYDNH4Y.js";import{useShellStrings as $}from"./chunk-NRHG4R2Q.js";import{useState as N,useId as D,useRef as C,useMemo as S,useEffect as R}from"react";import{createPortal as A}from"react-dom";import{jsxs as W,jsx as M}from"react/jsx-runtime";function E(e,t){const n=e.length;if(0===n||t(e.join(", ")))return{shown:n,cut:!1};if(1===n)return{shown:1,cut:!0};let r=0;for(let l=1;l<n&&t(`${e.slice(0,l).join(", ")} +${n-l}`);l+=1)r=l;return{shown:r,cut:!1}}var F=["right-2","right-8","right-16"],O=[8,32,64];function T(T){const{options:Y,placeholder:z,emptyOptionLabel:I,className:L="",disabled:U,id:H,filter:G=!1,allowFreeText:V=!1,freeTextOption:B,onSearchChange:J,loading:K=!1,error:P,onRetry:Q,rightAdornment:Z,endAction:X,renderOption:q,clearable:_=!0,"aria-label":ee,"aria-labelledby":te,"aria-describedby":ne}=T,re=!0===T.multiple,le=T.multiple?T.value:T.value?[T.value]:[],oe=T.multiple?"":T.value,ie=e=>{T.multiple?T.onChange(e):T.onChange(e[0]??"")},ae=le.length>0,se=G&&ae&&!U,ce=re||G,ue=null!=B,de=V||ue,[he,pe]=N(!1),[me,fe]=N(-1),be=D(),ge=H??`${be}-input`,ve=`${be}-listbox`,we=e=>`${be}-opt-${e}`,[ye,xe]=N(""),ke=$(),je=I??ke.select.none,$e=e=>{xe(e),fe(-1),J?.(e)},Ne=C(null),De=C(null),Ce=C(null),Se=C(null),Re=C(he);Re.current=he;const Ae=C(!1),We=e=>{Re.current&&(Re.current=!1,e&&V&&!ue&&et&&(re?le.includes(et)||ie([...le,et]):et!==oe&&ie([et])),pe(!1),$e(""))},Me=(e,t)=>{if(!e.disabled){if(re)return ie(le.includes(e.value)?le.filter(t=>t!==e.value):[...le,e.value]),void(e===tt?$e(""):fe(t));ie([e.value]),We(!1)}},[Ee,Fe]=N(null);y(()=>{if(!Z||he)return void Fe(null);const e=Se.current?.offsetWidth??0;Fe(e?e+O[Ue]+6:null)});const Oe=v(De,he,ce?{popupRef:Ce}:{matchTriggerWidth:!0}),Te=S(()=>t(Y),[Y]),Ye=le.join("\0"),ze=S(()=>{const e=[],t=/* @__PURE__ */new Set;for(const n of Te)le.includes(n.value)&&!t.has(n.value)&&(t.add(n.value),e.push(n.label));if(de)for(const n of le)t.has(n)||e.push(n);return e},[Te,Ye,de]),Ie=ze.join(", "),Le=_&&ae&&!U,Ue=(Le?1:0)+(X?1:0),[He,Ge]=N(null),Ve=C(null),Be=C(""),Je=C(()=>{});Je.current=()=>{const e=De.current,t=Ve.current;if(!re||!e||!t)return;const n=getComputedStyle(e),r=e.clientWidth-(parseFloat(n.paddingLeft)||0)-(parseFloat(n.paddingRight)||0),l=[n.fontStyle,n.fontWeight,n.fontSize,n.fontFamily,n.letterSpacing].join("|"),o=`${r}|${l}|${ze.join("\0")}`;if(o===Be.current)return;Be.current=o;let i=null;r>0&&ze.length>0&&(t.style.fontStyle=n.fontStyle,t.style.fontWeight=n.fontWeight,t.style.fontSize=n.fontSize,t.style.fontFamily=n.fontFamily,t.style.letterSpacing=n.letterSpacing,i=E(ze,e=>(t.textContent=e,t.getBoundingClientRect().width<=r)),t.textContent=""),Ge(e=>e?.shown===i?.shown&&e?.cut===i?.cut?e:i)},y(()=>{Je.current()}),R(()=>{const e=De.current;if(!re||!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(()=>Je.current());return t.observe(e),()=>t.disconnect()},[re]);const Ke=ze.length,Pe=!re||!He||He.shown>=Ke?Ie:0===He.shown?ke.select.selectedCount(Ke):`${ze.slice(0,He.shown).join(", ")} +${Ke-He.shown}`,Qe=re&&null!==He&&(He.shown<Ke||He.cut),Ze=he&&ae&&ce;R(()=>{if(!he)return;const e=e=>{const t=e.target;Ne.current?.contains(t)||Ce.current?.contains(t)||We(!0)};document.addEventListener("mousedown",e);const t=b(()=>We(!0));return()=>{document.removeEventListener("mousedown",e),t()}},[he,V,ye,Ye,T.onChange]),R(()=>{if(he)return x(e=>!("Escape"!==e.key||!Re.current)&&(We(!1),De.current?.blur(),!0),()=>Ce.current)},[he]);const Xe=S(()=>{const e=/* @__PURE__ */new Set;return n(Y,t=>!e.has(t.value)&&(e.add(t.value),!0))},[Y]),qe=S(()=>{if(J)return Xe;const e=ye.trim().toLowerCase();return e?n(Xe,t=>r(t,e)):Xe},[Xe,ye,J]),_e=S(()=>t(qe),[qe]),et=ye.trim(),tt=S(()=>ue&&et?Te.some(e=>e.label===et)||le.includes(et)?null:{value:et,label:et}:null,[ue,et,Te,Ye]),nt=S(()=>tt?[..._e,tt]:_e,[_e,tt]);/* @__PURE__ */
|
|
2
|
+
return W("div",{ref:Ne,className:"relative group",onBlur:e=>{const t=e.relatedTarget;t&&(Ne.current?.contains(t)||Ce.current?.contains(t))||Ae.current||document.activeElement!==De.current&&We(!0)},children:[(rt=/* @__PURE__ */M("input",{id:ge,ref:De,type:"text",autoComplete:"off",role:"combobox","aria-expanded":he,"aria-haspopup":"listbox","aria-autocomplete":"list","aria-controls":he?ve:void 0,"aria-activedescendant":he&&me>=0&&me<nt.length?we(me):void 0,"aria-label":te?void 0:ee,"aria-labelledby":te,"aria-describedby":ne,value:he?ye:Pe,onChange:e=>{$e(e.target.value),pe(!0)},onFocus:()=>{U||($e(""),pe(!0))},onKeyDown:t=>{if("ArrowDown"===t.key||"ArrowUp"===t.key){if(U)return;if(t.preventDefault(),!he)return void pe(!0);if(0===nt.length)return;const n="ArrowDown"===t.key?1:-1;return void fe(t=>e(nt,t,n))}"Enter"===t.key?(t.preventDefault(),he&&me>=0&&me<nt.length?Me(nt[me],me):1!==_e.length||_e[0].disabled?V&&!ue&&et&&(re?(le.includes(et)||ie([...le,et]),$e("")):(ie([et]),We(!1),De.current?.blur())):Me(_e[0],0)):"Escape"===t.key?(We(!1),De.current?.blur()):"Tab"===t.key&&We(!0)},placeholder:Ze?Pe:z||je,className:`${se?u:d} ${L} ${a[Ue]}${U?"bg-surface-sunken text-ink-faintest cursor-not-allowed":""} truncate${Ze?" rosh-field-shows-choice":""}`,style:Ee?{paddingRight:Ee}:void 0,disabled:U}),re?/* @__PURE__ */M(f,{content:!he&&Qe?Ie:null,className:"block",children:rt}):rt),re&&
|
|
3
|
+
/* @__PURE__ */M("div",{"aria-hidden":"true",className:"pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden",children:/* @__PURE__ */M("span",{ref:Ve,className:"whitespace-pre"})}),Ue>0&&
|
|
4
|
+
/* @__PURE__ */W(s,{children:[Le&&
|
|
5
|
+
/* @__PURE__ */M("span",{onMouseDown:e=>e.preventDefault(),className:"flex opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:/* @__PURE__ */M(c,{action:{label:ke.select.clear,icon:/* @__PURE__ */M(p,{name:"close"}),onClick:()=>{ie([]),We(!1)}}})}),X&&/* @__PURE__ */M("span",{onMouseDown:e=>e.preventDefault(),className:"flex",children:/* @__PURE__ */M(c,{action:X})})]}),Z&&!he&&/* @__PURE__ */M("div",{ref:Se,className:`absolute top-1/2 -translate-y-1/2 ${F[Ue]} flex items-center gap-1 flex-nowrap justify-end pointer-events-none`,children:Z}),he&&A(
|
|
6
|
+
/* @__PURE__ */W("div",{ref:Ce,onMouseDownCapture:()=>{Ae.current=!0,setTimeout(()=>{Ae.current=!1},0)},className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:g.popup,left:Oe?.left,right:Oe?.right,top:Oe?.top,bottom:Oe?.bottom,minWidth:Oe?.minWidth,width:Oe?.width,...ce&&{maxWidth:Oe?.maxWidth},visibility:Oe?void 0:"hidden",...j()},children:[re&&ae&&_&&!U&&
|
|
7
|
+
/* @__PURE__ */M("button",{type:"button",tabIndex:-1,onMouseDown:e=>{e.preventDefault(),ie([])},className:`block w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm text-gray-600 hover:bg-row-hover border-b ${k}`,children:ke.select.clearAll}),K?
|
|
8
|
+
/* @__PURE__ */M(m,{size:"sm",padding:"py-2",label:ke.search.searching}):P?/* @__PURE__ */W("div",{role:"alert",className:"flex items-center gap-2 px-3 py-2 text-sm text-red-600",children:[
|
|
9
|
+
/* @__PURE__ */M("span",{className:"min-w-0 flex-1",children:P}),Q&&/* @__PURE__ */M(h,{variant:"link",size:"sm",onMouseDown:e=>e.preventDefault(),onClick:Q,className:"shrink-0",children:ke.list.retry})]}):null,
|
|
10
|
+
/* @__PURE__ */W("div",{id:ve,role:nt.length?"listbox":void 0,"aria-labelledby":nt.length?te??(ee?void 0:ge):void 0,"aria-label":nt.length&&!te?ee:void 0,"aria-multiselectable":!(!nt.length||!re)||void 0,className:"overflow-y-auto",style:{maxHeight:Oe?.maxHeight??w},children:[0===nt.length?K||P?null:/* @__PURE__ */M("p",{className:"px-3 py-3 text-sm text-ink-faintest text-center",children:ke.select.noMatches}):0===_e.length?null:l(qe,(e,t)=>{const n=le.includes(e.value);/* @__PURE__ */
|
|
11
|
+
return W("button",{id:we(t),type:"button",role:"option","aria-selected":n,"aria-disabled":e.disabled||void 0,tabIndex:-1,onMouseDown:n=>{(e.disabled||re)&&n.preventDefault(),Me(e,t)},className:"w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center justify-between gap-2 whitespace-nowrap "+(e.disabled?"cursor-not-allowed text-gray-400":`hover:bg-gray-50 ${n?"text-blue-600 font-medium":"text-gray-700"} ${t===me?"bg-gray-100":n?"bg-blue-50/50":""}`),children:[re&&/* @__PURE__ */M(o,{selected:n}),
|
|
12
|
+
/* @__PURE__ */M("span",{className:`min-w-0 ${ce?"flex-auto":"flex-1"} truncate`,children:q?q(e,{selected:n,active:t===me}):e.label}),e.sublabel&&/* @__PURE__ */M(i,{grows:ce,children:e.sublabel})]},e.value)},be),tt&&B&&
|
|
13
|
+
/* @__PURE__ */M("button",{id:we(_e.length),type:"button",role:"option","aria-selected":!1,tabIndex:-1,onMouseDown:e=>{re&&e.preventDefault(),Me(tt,_e.length)},className:`w-full overflow-hidden text-left px-3 min-h-(--row-height-menu) py-2 text-sm flex items-center gap-2 whitespace-nowrap text-ink hover:bg-row-hover ${_e.length?`border-t ${k}`:""} ${me===_e.length?"bg-gray-100":""}`,children:/* @__PURE__ */M("span",{className:"min-w-0 flex-1 truncate",children:B(tt.value)})},`${be}-typed`)]})]}),document.body)]});var rt}export{T as SearchableSelect,E as fitChoice};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{SearchableSelect as e}from"./chunk-OFMZ6JM6.js";import{labelClasses as a}from"./chunk-EQKUFYX6.js";import{Select_default as l}from"./chunk-D5PXRJHA.js";import{isSafeLinkHref as t}from"./chunk-Z5TE3MEG.js";import{Input_default as r}from"./chunk-J5OAQAAD.js";import{INPUT_SIZES as n}from"./chunk-AYZY3YNC.js";import{Button_default as i}from"./chunk-UTISUEO4.js";import{Icon as o}from"./chunk-ISVODSRP.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{useShellStrings as u}from"./chunk-NRHG4R2Q.js";import{useId as d,useRef as c,useState as p,useEffect as m}from"react";import{jsx as f,jsxs as v,Fragment as g}from"react/jsx-runtime";function h(e){return"select"===e.type?e.options:"groups"===e.type?e.groups.flatMap(e=>e.options):[]}var b="address",x={kindOf:()=>b,targetOf:e=>e,readFilter:()=>null,withFilter:e=>e},k=e=>t(e.trim());function y(t){const{value:n,kinds:o,rules:y=x,filtersFor:w,label:N,readOnly:C,placeholder:O,className:F="",tidyAddress:j,addressAddon:A}=t,E=void 0!==t.onApply,$=u().link,D=y.isSafe??k,T=d(),z=c(null),R=c(null),[U,M]=p({url:n}),P=E?U.url:n,[S,Q]=p(!1),[Y,H]=p(null),[J,K]=p(null),[W,Z]=p(!1),B=c(null),G=c(()=>{});G.current=E?t.onCancel:()=>{},m(()=>{if(E)return s(e=>{const a=z.current;return!!("Escape"===e.key&&a&&e.target instanceof Node&&a.contains(e.target))&&(G.current(),!0)},()=>z.current)},[E]),m(()=>{if(!E)return;const e=R.current;e?(e.focus(),e.select()):z.current?.querySelector("button, input")?.focus()},[]);const I=o??[{value:b,label:$.address,target:{type:"text"}}],L=Y&&Y.against===P?Y.kind:y.kindOf(P),V=I.filter(e=>!e.hideWhenEmpty||h(e.target).length>0||e.value===L),X=V.find(e=>"text"===e.target.type),q=V.find(e=>e.value===L)??X??V[0];if(!q)return null;const _="text"!==q.target.type,ee=_?y.targetOf(P):P,ae=h(q.target),le=ae.find(e=>e.value===ee),te=e=>({value:e,label:$.unavailable(e)}),re="select"===q.target.type&&ee&&w?w(ee):null,ne=re?y.readFilter(P):null,ie=ne?re?.find(e=>e.param===ne.param):void 0,oe=J&&J.against===P?J.text:P,se=_?P:j?j(oe.trim()).trim():oe.trim(),ue=E&&j?se:oe,de=!_&&""!==ue.trim()&&!D(ue),ce=de&&(!E||S);_&&W&&Z(!1);const pe=(e,a)=>{E?M({url:e,name:a}):void 0===a?t.onChange(e):t.onChange(e,a)},me=(e,a)=>{H(a=>a?{...a,against:e}:a),pe(e,a)},fe=e=>{if(!e)return me("");const a=ae.find(a=>a.value===e);me(e,a?.label)},ve=e=>{Q(!1);const a=e.trim();a?D(e)?(K({text:e,against:a}),me(a)):K({text:e,against:P}):(K({text:e,against:""}),me(""))},ge=e=>{const a=e.relatedTarget;if(a&&(a===R.current||B.current?.contains(a)))return;if(Z(!1),E||!j||C)return;const l=j(oe.trim());l.trim()!==oe.trim()&&ve(l)},he=()=>{if(!E||!se)return;if(!_&&de)return void Q(!0);const e=_&&U.url===se?U.name:void 0,a=t.onApply;void 0===e?a(se):a(se,e)},be=(e,a)=>a&&!e.some(e=>e.value===a)?[te(a),...e]:[...e],xe=(a,t,r,n,i)=>{const o=[];for(const e of r){const a=o[o.length-1],l={value:e.value,label:e.label};e.group?a&&"options"in a&&a.label===e.group?a.options.push(l):o.push({label:e.group,options:[l]}):o.push(l)}if(i){const l=r.some(e=>""===e.value);/* @__PURE__ */
|
|
2
|
+
return f(e,{"aria-label":a,value:t,options:o,disabled:C,clearable:l,placeholder:r.find(e=>""===e.value)?.label,onChange:n})}/* @__PURE__ */
|
|
3
|
+
return f(l,{size:"sm","aria-label":a,value:t,options:o,readOnly:C,onChange:n})};let ke;if("text"===q.target.type)ke=/* @__PURE__ */f(r,{ref:R,id:`${T}-address`,size:"sm",type:"text",invalid:ce,"aria-label":$.address,"aria-describedby":ce?`${T}-why`:void 0,placeholder:O??$.addressPlaceholder,spellCheck:!1,autoComplete:"off",value:oe,readOnly:C,onChange:e=>ve(e.target.value),onFocus:()=>Z(!0),onBlur:ge,onKeyDown:j&&!E?e=>{"Enter"===e.key&&e.currentTarget.blur()}:void 0});else{const e="groups"===q.target.type?q.target.groups.flatMap(e=>e.options.map(a=>({value:a.value,label:a.label,group:e.label}))):q.target.options.map(e=>({value:e.value,label:e.label})),a=[{value:"",label:q.target.placeholder},...be(e,ee)];ke=xe(q.label,ee,a,fe,e.length>10)}const ye=/* @__PURE__ */v(g,{children:[o&&xe($.linkType,q.value,V.map(e=>({value:e.value,label:e.label})),e=>{K(null),Q(!1);const a=V.find(a=>a.value===e);if(!a||"text"===a.target.type)return void H({kind:e,against:P});const l=h(a.target)[0];H({kind:e,against:l?l.value:""}),l?pe(l.value,l.label):pe("")},!1),ke,A&&W&&!C&&"text"===q.target.type&&/* @__PURE__ */f("div",{ref:B,onBlur:ge,children:A({url:oe,onChange:ve})}),re&&xe($.filter,ne?.param??"",[{value:"",label:$.noFilter},...ne&&!ie?[te(ne.param)]:[],...re.map(e=>({value:e.param,label:e.label}))],e=>{if(!e)return me(ee,le?.label);const a=re?.find(a=>a.param===e),l=a?.values[0];l&&me(y.withFilter(ee,{param:e,value:l.value}),l.label)},!1),re&&ne&&xe($.value,ne.value,be((ie?.values??[]).map(e=>({value:e.value,label:e.label})),ne.value),e=>{if(!ne)return;const a=ie?.values.find(a=>a.value===e);me(y.withFilter(ee,{param:ne.param,value:e}),a?.label)},(ie?.values.length??0)>10),ce&&/* @__PURE__ */f("p",{id:`${T}-why`,role:"alert",className:"text-2xs leading-4 text-red-600",children:$.unsafe}),q.hint&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:q.hint}),re&&/* @__PURE__ */f("p",{className:"text-2xs leading-4 text-ink-faintest",children:$.filterHint})]});if(!E)/* @__PURE__ */
|
|
4
|
+
return f("div",{ref:z,className:`flex min-w-0 flex-auto flex-col gap-2 ${F}`.trim(),role:N?"group":void 0,"aria-label":N,children:ye});const we=t.onRemove;/* @__PURE__ */
|
|
5
|
+
return v("div",{ref:z,role:"dialog","aria-label":N??$.title,className:`flex min-w-0 flex-col gap-2 rounded-xl border border-line bg-surface p-3 shadow-lg ${F}`.trim(),onKeyDown:e=>{"Enter"!==e.key||e.defaultPrevented||e.target instanceof Element&&e.target.closest("button")||(e.preventDefault(),he())},children:[_?/* @__PURE__ */f("span",{className:a({inline:!0}),children:$.title}):/* @__PURE__ */f("label",{htmlFor:`${T}-address`,className:a({inline:!0}),children:$.title}),ye,
|
|
6
|
+
/* @__PURE__ */v("div",{className:"flex items-center justify-between gap-2",children:[we?/* @__PURE__ */f(i,{variant:"ghost-danger",size:"sm","data-window-action":"remove",onClick:we,children:$.remove}):null,
|
|
7
|
+
/* @__PURE__ */v("span",{className:"ml-auto flex gap-1",children:[
|
|
8
|
+
/* @__PURE__ */f(i,{variant:"secondary",size:"sm","data-window-action":"cancel",onClick:()=>G.current(),children:$.cancel}),
|
|
9
|
+
/* @__PURE__ */f(i,{variant:"primary",size:"sm","data-window-action":"apply",onClick:he,disabled:C||""===se,children:$.apply})]})]})]})}function w({label:e,text:a,onTextChange:l,link:t,onLinkChange:i,kinds:s,rules:m,filtersFor:g,textPlaceholder:h,readOnly:b,className:x=""}){const k=u().link,[w,N]=p(!1),C=c(null),O=d(),F=()=>{N(!1),C.current?.focus()};/* @__PURE__ */
|
|
10
|
+
return v("div",{className:`flex min-w-0 flex-auto flex-col ${x}`.trim(),children:[
|
|
11
|
+
/* @__PURE__ */f(r,{size:"md",type:"text",className:"rounded-b-none","aria-label":k.text(e),placeholder:h,value:a,readOnly:b,onChange:e=>l(e.target.value)}),
|
|
12
|
+
/* @__PURE__ */v("button",{ref:C,type:"button","aria-label":k.linkOf(e,t),"aria-expanded":w,"aria-controls":w?O:void 0,disabled:b,onClick:()=>N(e=>!e),className:`flex w-full min-w-0 items-center gap-2 rounded-b-(--radius-control) border border-t-0 border-line-strong bg-surface-sunken ${n.md} text-left hover:bg-gray-100 rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring)] disabled:cursor-not-allowed disabled:opacity-60`,children:[
|
|
13
|
+
/* @__PURE__ */f(o,{name:"link",strokeWidth:1.5,className:"h-4 w-4 shrink-0 "+(t?"text-blue-600":"text-ink-faintest")}),
|
|
14
|
+
/* @__PURE__ */f("span",{className:"min-w-0 truncate "+(t?"text-blue-600":"text-ink-faintest"),children:t||k.addLink})]}),w&&/* @__PURE__ */f("div",{id:O,className:"mt-2",children:/* @__PURE__ */f(y,{value:t,label:k.linkOf(e,t),kinds:s,rules:m,filtersFor:g,onApply:(e,a)=>{void 0===a?i(e):i(e,a),F()},onRemove:t?()=>{i(""),F()}:void 0,onCancel:F})})]})}export{y as LinkPicker,w as TextLinkField};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-NRHG4R2Q.js";import{jsxs as t,jsx as n,Fragment as i}from"react/jsx-runtime";var a={info:{box:"bg-blue-50 border-blue-200",icon:"text-blue-600"},success:{box:"bg-green-50 border-green-200",icon:"text-green-600"},warning:{box:"bg-amber-50 border-amber-200",icon:"text-amber-600"},danger:{box:"bg-red-50 border-red-200",icon:"text-red-600"},neutral:{box:"bg-[var(--status-neutral-soft)] border-[color:var(--line)]",icon:"text-[color:var(--status-neutral-soft-ink)]"}},s={info:"bg-blue-700 border-blue-700 text-white",success:"bg-green-700 border-green-700 text-white",warning:"bg-amber-700 border-amber-700 text-white",danger:"bg-red-700 border-red-700 text-white",neutral:"bg-[var(--status-neutral-solid)] border-[color:var(--status-neutral-solid)] text-[color:var(--status-on-solid)]"};function o({tone:r}){const t={className:"h-5 w-5","aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check-circle",look:"mini",...t});case"warning":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"warning",look:"mini",...t});case"danger":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"close-circle",look:"mini",...t});default:/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{CartesianPlot as e}from"./chunk-
|
|
1
|
+
import{CartesianPlot as e}from"./chunk-S4RD6UJU.js";import{ChartTooltip as t}from"./chunk-WDQI3FV6.js";import{resolveSeriesColor as i,CHART_INK as l}from"./chunk-TZFACUMR.js";import{useShellStrings as r,useShellLocale as a}from"./chunk-NRHG4R2Q.js";import{formatPlain as o}from"./chunk-C3QOHMR6.js";import{jsx as m,jsxs as n}from"react/jsx-runtime";function s({boxes:s,height:c=240,width:h,color:u,tone:x,formatValue:d,yAxisLabel:y,label:k,className:b,emptyLabel:f}){const p=r().charts,q=a(),g=d??(e=>o(e,q)),v=k??p.distribution,W=i(0,u,x),j=s.flatMap(e=>[e.min,e.max,...e.outliers??[]]).filter(Number.isFinite);/* @__PURE__ */
|
|
2
2
|
return m(e,{labels:s.map(e=>e.label),values:j,height:c,width:h,bandPadding:.5,formatValue:g,yAxisLabel:y,className:b,emptyLabel:f,ariaLabel:p.fiveNumber(v,s.length),tooltip:e=>{const i=s[e];/* @__PURE__ */
|
|
3
3
|
return m(t,{title:i.label,rows:[{key:"max",label:p.maximum,color:W,value:g(i.max)},{key:"q3",label:p.q3,color:W,value:g(i.q3)},{key:"median",label:p.median,color:W,value:g(i.median)},{key:"q1",label:p.q1,color:W,value:g(i.q1)},{key:"min",label:p.minimum,color:W,value:g(i.min)}],emphasisKey:"median",footnote:i.outliers?.length?p.outliers(i.outliers.length):void 0})},children:({x:e,y:t,active:i})=>/* @__PURE__ */m("g",{children:s.map((r,a)=>{const o=e.center(a),s=Math.max(6,e.bandwidth);/* @__PURE__ */
|
|
4
4
|
return n("g",{opacity:null!==i&&i!==a?.45:1,children:[
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{FormField as e}from"./chunk-6KBDNYRW.js";import{ImageFocusPoint as i}from"./chunk-CUJ537IY.js";import{Segmented as a}from"./chunk-TNALBYLY.js";import{isVideoUrl as t,mediaPromptLine as r,mediaFileName as o,FilenameBadge as n,BusyOverlay as s,UploadGlyph as l,zoneFocusClass as c,dropzoneClass as d}from"./chunk-DTRJLQWO.js";import{TransferProgress as u}from"./chunk-LLDGRPLF.js";import{useFileIntake as m,FileIntakeAlert as h}from"./chunk-TNGIXSTM.js";import{Icon as p}from"./chunk-ISVODSRP.js";import{useShellStrings as b}from"./chunk-NRHG4R2Q.js";import{useState as f,useRef as g,useEffect as v,useId as y}from"react";import{jsxs as k,jsx as x,Fragment as N}from"react/jsx-runtime";var j=["flex h-8 items-center justify-center rounded-(--radius-control) text-(--status-on-solid)","not-disabled:hover:bg-white/10 disabled:cursor-not-allowed disabled:opacity-60","rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-solid)]"].join(" ");function w({value:w,onChange:L,onPick:R,onFile:C,label:$,hint:F,error:U,required:z,className:P,accept:O="image/*",maxSizeBytes:I,fit:S="cover",height:q,shape:B="rect",placeholder:D,cta:H,acceptHint:T,showFilename:Y=!0,allowReplace:G=!0,allowRemove:W=!0,replaceLabel:A,removeLabel:J,busy:K=!1,busyLabel:Q,choosingLabel:V,pickFailedLabel:_,progress:M,disabled:X=!1,kind:E,onKindChange:Z,focus:ee,onFocusChange:ie,focusLabel:ae}){const te=b().media,re="circle"===B,oe=q??(re?96:112),ne=H??te.cta,se=E??(/video/.test(O)&&!/image/.test(O)?"video":"image"),le="string"==typeof J&&J?J:te.remove,[ce,de]=f(!1),[ue,me]=f(!1),he=g(!0);v(()=>()=>{he.current=!1},[]);const pe=K||ce,be=ce&&!K?V??te.choosing:Q??te.uploading,fe=U??(ue?_??te.pickFailed:void 0),ge=e=>{if(!R)return;me(!1);const i=R(e);i&&"function"==typeof i.then&&(de(!0),i.then(e=>{he.current&&(de(!1),"string"==typeof e&&e&&L(e))},()=>{he.current&&(de(!1),me(!0))}))},ve=y(),ye=g(null),[ke,xe]=f(null);v(()=>()=>{ye.current&&URL.revokeObjectURL(ye.current)},[]);const Ne=X||pe,je=!!w&&(t(w,O)||w===ke),we=D??r(O,te),Le=A??(je||"video"===se?te.changeVideo:te.changeImage),Re=e=>{R?ge(e):C?C(e):(e=>{ye.current&&URL.revokeObjectURL(ye.current);const i=URL.createObjectURL(e);ye.current=i,xe(e.type.startsWith("video/")?i:null),L(i)})(e)},Ce=m({accept:O,maxSizeBytes:I,acceptHint:T,multiple:!1,disabled:Ne,onAccept:([e])=>Re(e)}),{dragOver:$e}=Ce,Fe=()=>{Ne||(R?ge():Ce.open())},Ue=w?o(w):"",ze=!re&&!je&&!!ie,Pe=X||!G&&!W?null:/* @__PURE__ */k("div",{"data-media-bar":"",className:[re?"absolute inset-0 flex items-center justify-center gap-1 p-1 text-(--status-on-solid)":"absolute inset-x-0 bottom-0 flex items-center gap-1 p-1 text-(--status-on-solid)","opacity-0 transition-opacity duration-(--motion-fast)","group-hover/media:opacity-100 group-focus-within/media:opacity-100 [@media(hover:none)]:opacity-100"].join(" "),style:{background:"var(--rosh-media-scrim-button)"},children:[G&&/* @__PURE__ */k("button",{id:ze?void 0:ve,type:"button","aria-labelledby":`${ve}-change`,onClick:()=>Fe(),disabled:pe,className:re?`w-8 shrink-0 ${j}`:`min-w-0 flex-1 gap-1 px-2 text-sm font-medium ${j}`,children:[
|
|
2
2
|
/* @__PURE__ */x(p,{name:"swap","aria-hidden":"true",className:"h-4 w-4 shrink-0"}),
|
|
3
|
-
/* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),
|
|
4
|
-
/* @__PURE__ */x(
|
|
3
|
+
/* @__PURE__ */x("span",{id:`${ve}-change`,className:re?"sr-only":"truncate",children:Le})]}),W&&/* @__PURE__ */x("button",{type:"button","aria-label":le,onClick:()=>{ye.current&&(URL.revokeObjectURL(ye.current),ye.current=null),xe(null),L("")},disabled:pe,className:`${re?"":"ml-auto "}w-8 shrink-0 ${j}`,children:/* @__PURE__ */x(p,{name:"trash","aria-hidden":"true",className:"h-4 w-4"})})]}),Oe=/* @__PURE__ */k("div",{...Ce.zoneProps,"data-media-frame":"",className:["group/media relative overflow-hidden border transition-colors",re?"shrink-0 rounded-full":"rounded-(--radius-control)",ze?"":"bg-gray-100",$e?"border-blue-500":"border-line"].join(" "),style:ze?void 0:re?{height:oe,width:oe}:{height:oe},children:[ze?
|
|
4
|
+
/* @__PURE__ */x(i,{value:ee??"",onChange:e=>ie?.(e),label:ae??te.focus,image:w,hint:null,id:ve,disabled:Ne,className:"[&_[data-image-focus-picture]]:rounded-none [&_[data-image-focus-picture]]:border-0"}):je?/* @__PURE__ */x("video",{src:w??void 0,muted:!0,playsInline:!0,preload:"metadata","aria-label":Ue||void 0,className:"h-full w-full",style:{objectFit:S}}):/* @__PURE__ */x("img",{src:w??void 0,alt:Ue,className:"h-full w-full",style:{objectFit:S,objectPosition:ee||void 0}}),Y&&!re&&w&&/* @__PURE__ */x(n,{children:Ue}),Pe,pe&&/* @__PURE__ */x(s,{label:be,progress:M,rounded:re?"rounded-full":"rounded-md"})]}),Ie=/* @__PURE__ */k(N,{children:[
|
|
5
5
|
/* @__PURE__ */x("span",{className:"px-3 text-xs text-ink-faint",children:we}),
|
|
6
|
-
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:ne}),
|
|
7
|
-
/* @__PURE__ */x("span",{className:["flex shrink-0 items-center justify-center rounded-full border-2 border-dashed text-ink-faintest transition-colors"
|
|
8
|
-
/* @__PURE__ */x("span",{className:"flex min-w-0 flex-col items-start gap-1 [&>span]:px-0",children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:
|
|
9
|
-
/* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(l,{})}),
|
|
10
|
-
return k(
|
|
6
|
+
/* @__PURE__ */x("span",{className:"text-sm font-medium text-blue-600",children:ne}),T&&/* @__PURE__ */x("span",{className:"text-xs text-ink-faintest",children:T})]}),Se=/* @__PURE__ */k("button",{type:"button",id:ve,onClick:()=>Fe(),disabled:Ne,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:F?`${ve}-hint`:void 0,...Ce.zoneProps,"data-media-circle":"",className:["group/zone flex w-full items-center gap-4 rounded-lg text-left",Ne?"cursor-not-allowed opacity-60":"cursor-pointer",c(Ne)].join(" "),children:[
|
|
7
|
+
/* @__PURE__ */x("span",{className:["flex shrink-0 items-center justify-center rounded-full border-2 border-dashed text-ink-faintest transition-colors",$e?"border-accent-fill bg-accent-tint":"border-line-strong bg-surface-sunken group-hover/zone:bg-accent-tint"].join(" "),style:{height:oe,width:oe},children:/* @__PURE__ */x(l,{})}),
|
|
8
|
+
/* @__PURE__ */x("span",{className:"flex min-w-0 flex-col items-start gap-1 [&>span]:px-0",children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:M}):Ie})]}),qe=re?Se:/* @__PURE__ */x("button",{type:"button",id:ve,onClick:()=>Fe(),disabled:Ne,"aria-label":"string"==typeof we?we:te.upload,"aria-busy":pe||void 0,"aria-invalid":!!fe||void 0,"aria-required":z||void 0,"aria-describedby":fe?`${ve}-error`:F?`${ve}-hint`:void 0,...Ce.zoneProps,className:d($e,Ne,c(Ne)),style:{minHeight:oe},children:pe?/* @__PURE__ */x(u,{state:"busy",verb:be,pct:M}):/* @__PURE__ */k(N,{children:[
|
|
9
|
+
/* @__PURE__ */x("span",{className:"text-ink-faintest",children:/* @__PURE__ */x(l,{})}),Ie]})});/* @__PURE__ */
|
|
10
|
+
return k(e,{label:$,htmlFor:ve,hint:F,error:fe,required:z,className:P,children:[Z&&/* @__PURE__ */x("div",{"data-media-kind":"",className:"mb-2",children:/* @__PURE__ */x(a,{value:se,onChange:e=>Z(e),options:[{value:"image",label:te.image,icon:/* @__PURE__ */x(p,{name:"image","aria-hidden":"true",className:"h-4 w-4"}),disabled:Ne},{value:"video",label:te.video,icon:/* @__PURE__ */x(p,{name:"play","aria-hidden":"true",className:"h-4 w-4"}),disabled:Ne}],block:!0,size:"md",label:"string"==typeof $&&$?$:te.upload})}),w?Oe:qe,!R&&/* @__PURE__ */x("input",{...Ce.inputProps}),
|
|
11
11
|
/* @__PURE__ */x(h,{rejections:Ce.rejections})]})}export{w as MediaUploadField};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{optionMatches as e,OptionSublabel as t}from"./chunk-K5YT5PMJ.js";import{inputClasses as r}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as n}from"./chunk-YDJ5IZOU.js";import{Tooltip as o}from"./chunk-F2RAIGCG.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as a,POPUP_MAX_WIDTH as s,MENU_MAX_HEIGHT as c}from"./chunk-VY3UA6AR.js";import{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-
|
|
2
|
-
return v("div",{ref:
|
|
3
|
-
/* @__PURE__ */v("div",{onMouseDown:e=>{C||e.target.closest("button")||(e.preventDefault(),
|
|
4
|
-
/* @__PURE__ */b("span",{className:"truncate",children:B(e)}),!C&&/* @__PURE__ */b("button",{type:"button","aria-label":
|
|
5
|
-
/* @__PURE__ */b("input",{id:A,ref:
|
|
6
|
-
/* @__PURE__ */b("div",{ref:
|
|
1
|
+
import{optionMatches as e,OptionSublabel as t}from"./chunk-K5YT5PMJ.js";import{inputClasses as r}from"./chunk-AYZY3YNC.js";import{GROUP_COLORS as n}from"./chunk-YDJ5IZOU.js";import{Tooltip as o}from"./chunk-F2RAIGCG.js";import{onOverlayOpen as l}from"./chunk-PGN5ME7B.js";import{Z_LAYERS as i}from"./chunk-62LW225J.js";import{useDropdownPosition as a,POPUP_MAX_WIDTH as s,MENU_MAX_HEIGHT as c}from"./chunk-VY3UA6AR.js";import{glassStyle as u}from"./chunk-5FYDNH4Y.js";import{useShellStrings as d}from"./chunk-NRHG4R2Q.js";import{useState as m,useRef as h,useMemo as p,useEffect as f}from"react";import{createPortal as g}from"react-dom";import{jsxs as v,jsx as b,Fragment as x}from"react/jsx-runtime";var w={accent:{chip:"inline-flex max-w-full items-center gap-1 rounded bg-accent-tint px-2 py-0.5 text-xs font-medium text-blue-700",remove:"text-blue-400 hover:text-red-500 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"},danger:{chip:`inline-flex max-w-full items-center gap-1 rounded ${n.danger} px-2 py-0.5 text-xs font-medium`,remove:"text-current opacity-70 hover:opacity-100 rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)] rounded leading-none"}};function y({value:n,onChange:y,options:k=[],placeholder:D,allowFreeText:N=!1,invalid:j,disabled:C,id:A,className:L="",tone:Y,tooltip:$,split:E,reorderable:I=!1}){const[T,M]=m(!1),[R,W]=m(null),[F,G]=m(""),H=d(),J=h(null),K=h(null),S=h(null),U=a(J,T),B=e=>k.find(t=>t.value===e)?.label??e,O=p(()=>{const t=new Set(n),r=[],o=F.trim().toLowerCase();for(const n of k)t.has(n.value)||(t.add(n.value),o&&!e(n,o)||r.push(n));return r},[k,n,F]),P=e=>{const t=[...n];for(const r of e){const e=r.trim();if(!e)continue;const n=e.toLowerCase(),o=k.find(t=>t.value===e||t.label.toLowerCase()===n)?.value,l=o??(N?e:null);l&&!t.includes(l)&&t.push(l)}t.length!==n.length&&y(t)},Z=e=>{e&&!n.includes(e)?(y([...n,e]),G("")):G("")},z=e=>y(n.filter(t=>t!==e)),Q=I&&!C,V=(e,t)=>{if(e===t||t<0||t>=n.length)return;const r=[...n],[o]=r.splice(e,1);r.splice(t,0,o),y(r)},q=()=>{const e=F.trim();if(E&&e)return P(e.split(E)),void G("");N&&e?Z(e):G("")},X=h(()=>{});X.current=()=>{q(),M(!1)},f(()=>{if(!T)return;const e=e=>{const t=e.target;J.current?.contains(t)||S.current?.contains(t)||(q(),M(!1))};document.addEventListener("mousedown",e);const t=l(()=>X.current());return()=>{document.removeEventListener("mousedown",e),t()}});const _=k.length>0;/* @__PURE__ */
|
|
2
|
+
return v("div",{ref:J,className:"relative",children:[
|
|
3
|
+
/* @__PURE__ */v("div",{onMouseDown:e=>{C||e.target.closest("button")||(e.preventDefault(),K.current?.focus())},className:r({invalid:j,multiline:!0,className:`flex flex-wrap items-center gap-1 cursor-text focus-within:border-blue-400 has-focus-visible:ring-2 has-focus-visible:ring-[color:var(--rosh-focus-ring)] ${C?"bg-gray-50 cursor-not-allowed":""} ${L}`}),children:[n.map((e,t)=>{const r=Y?.(e),l=w[r??"accent"],i=Q?{draggable:!0,tabIndex:0,"aria-label":H.select.reorderItem?.(B(e),t+1,n.length)??B(e),onDragStart:r=>{r.dataTransfer.effectAllowed="move",r.dataTransfer.setData("text/plain",e),W(t)},onDragOver:e=>{null!=R&&e.preventDefault()},onDrop:e=>{null!=R&&(e.preventDefault(),V(R,t),W(null))},onDragEnd:()=>W(null),onKeyDown:e=>{e.target===e.currentTarget&&("ArrowLeft"===e.key||"ArrowUp"===e.key?t>0&&(e.preventDefault(),V(t,t-1)):"ArrowRight"!==e.key&&"ArrowDown"!==e.key||t<n.length-1&&(e.preventDefault(),V(t,t+1)))}}:{},a=/* @__PURE__ */v("span",{"data-tag-chip":"","data-tone":r,...i,className:`${l.chip}${Q?" cursor-grab rosh-focus-ring focus-visible:ring-1 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]":""}${R===t?" opacity-50":""}`,children:[
|
|
4
|
+
/* @__PURE__ */b("span",{className:"truncate",children:B(e)}),!C&&/* @__PURE__ */b("button",{type:"button","aria-label":H.select.removeItem?.(B(e))??`${H.select.remove} ${B(e)}`,onClick:()=>z(e),className:l.remove,children:"×"})]},e),s=$?.(e);return null==s?a:/* @__PURE__ */b(o,{content:s,className:"relative inline-flex max-w-full",children:a},e)}),
|
|
5
|
+
/* @__PURE__ */b("input",{id:A,ref:K,type:"text",autoComplete:"off",role:"combobox","aria-expanded":T&&_,"aria-invalid":j||void 0,disabled:C,value:F,placeholder:0===n.length?D:void 0,onChange:e=>{(e=>{if(E){const t=e.split(E);if(t.length>1)return P(t.slice(0,-1)),void G(t[t.length-1])}G(e)})(e.target.value),M(!0)},onFocus:()=>{!C&&_&&M(!0)},onKeyDown:t=>{if("Enter"===t.key||","===t.key&&N){t.preventDefault();const r=F.trim(),n=r?O.filter(t=>e(t,r.toLowerCase())):[];1===n.length?Z(n[0].value):q()}else"Backspace"===t.key&&""===F&&n.length>0?z(n[n.length-1]):"Escape"===t.key?(M(!1),G(""),K.current?.blur()):"Tab"===t.key&&(q(),M(!1))},className:"min-w-[8ch] flex-1 border-none bg-transparent p-0 text-sm text-ink-strong placeholder:text-[color:var(--ink-placeholder)] rosh-focus-ring focus-visible:ring-0 disabled:cursor-not-allowed"})]}),T&&_&&g(
|
|
6
|
+
/* @__PURE__ */b("div",{ref:S,className:"fixed rounded-(--radius-popup) overflow-hidden",style:{zIndex:i.popup,left:U?.left,right:U?.right,top:U?.top,bottom:U?.bottom,minWidth:U?.minWidth,maxWidth:U?.maxWidth??s,width:"max-content",visibility:U?void 0:"hidden",...u()},children:/* @__PURE__ */b("div",{className:"overflow-y-auto",style:{maxHeight:U?.maxHeight??c},children:0===O.length?/* @__PURE__ */b("p",{className:"px-3 py-3 text-sm text-gray-400 text-center",children:k.length>0&&n.length>=k.length?H.select.allSelected:H.select.noMatches}):O.map(e=>/* @__PURE__ */b("button",{type:"button",onMouseDown:t=>{t.preventDefault(),Z(e.value)},className:e.sublabel?"w-full text-left px-3 min-h-(--row-height-menu) py-2 text-sm hover:bg-row-hover text-ink whitespace-nowrap flex items-center justify-between gap-3":"w-full text-left px-3 min-h-(--row-height-menu) py-2 leading-5 text-sm hover:bg-row-hover text-ink whitespace-nowrap",children:e.sublabel?/* @__PURE__ */v(x,{children:[
|
|
7
7
|
/* @__PURE__ */b("span",{className:"min-w-0 truncate",children:e.label}),
|
|
8
8
|
/* @__PURE__ */b(t,{grows:!0,children:e.sublabel})]}):e.label},e.value))})}),document.body)]})}export{y as TagInput};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-UTISUEO4.js";import{useShellStrings as n}from"./chunk-
|
|
1
|
+
import{appendKey as r,backspace as a}from"./chunk-VEPVOHCV.js";import{Button_default as e}from"./chunk-UTISUEO4.js";import{useShellStrings as n}from"./chunk-NRHG4R2Q.js";import{jsxs as i,jsx as c}from"react/jsx-runtime";var o=["1","2","3","4","5","6","7","8","9",".","0"];function l({value:l,onChange:s,onEnter:t,enterLabel:m,enterDisabled:d,className:h=""}){const p=n().keypad,u=r=>{r!==l&&s(r)};/* @__PURE__ */
|
|
2
2
|
return i("div",{className:`grid grid-cols-3 gap-3 ${h}`.trim(),children:[o.map(a=>/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary",onClick:()=>u(r(l,a)),children:a},a)),
|
|
3
3
|
/* @__PURE__ */c(e,{size:"touch-xl",variant:"secondary","aria-label":p.backspace,onClick:()=>u(a(l)),children:"⌫"}),t&&/* @__PURE__ */c(e,{size:"touch-xl",variant:"primary",className:"col-span-3",disabled:d,onClick:t,children:m??p.enter})]})}export{l as NumericKeypad};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellLocale as e}from"./chunk-NRHG4R2Q.js";import{formatPlain as t}from"./chunk-C3QOHMR6.js";import{jsx as r,jsxs as n}from"react/jsx-runtime";var i={danger:"bg-red-600 text-white",neutral:"bg-gray-600 text-white",accent:"bg-blue-600 text-white"};function a({count:a=0,max:l=99,dot:s=!1,tone:o="danger",showZero:c=!1,children:m,className:u=""}){const h=s||a>0||0===a&&c,d=e(),x=a>l?`${t(l,d)}+`:t(a,d),f=m?"":u,g=h?/* @__PURE__ */r("span",s?{className:`block h-2.5 w-2.5 rounded-full ring-2 ring-white ${i[o]} ${f}`.trim(),"aria-hidden":m?"true":void 0}:{className:`flex h-5 min-w-[1.25rem] items-center justify-center whitespace-nowrap rounded-full px-1 text-xs font-semibold tabular-nums ring-2 ring-white ${i[o]} ${f}`.trim(),children:x}):null;return m?/* @__PURE__ */n("span",{className:`relative inline-flex ${u}`.trim(),children:[m,g&&/* @__PURE__ */r("span",{className:"absolute -right-1.5 -top-1.5 flex",children:g})]}):g}export{a as CountBadge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-LZOKBMAF.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},C=class{l},E=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);E(()=>{const s=p(t,C),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,Z=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},_=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},F=[200,500],R=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();E(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,Z),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,F,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{_(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,F,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],B=[800,1800],N=e=>{document.prerendering?E(()=>N(e)):"complete"!==document.readyState?addEventListener("load",()=>N(e),!0):setTimeout(e)};var O=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,U=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},K=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,V=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,W=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&U.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&O.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);E(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;_(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),R(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,B,t.reportAllChanges);N(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,B,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,B,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(K,"[redacted]").replace(J,"[redacted]").replace(V,"[url]").replace(W,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
1
|
+
import{setBoundaryErrorReporter as e}from"./chunk-KNUR2UEG.js";import{VERSION as t}from"./chunk-KUPN5WRE.js";var n=-1,i=()=>n,a=e=>{addEventListener("pageshow",t=>{t.persisted&&(n=t.timeStamp,e(t))},!0)},r=(e,t,n,i)=>{let a,r;return o=>{var s,c;t.value>=0&&(o||i)&&(r=t.value-(a??0),(r||void 0===a)&&(a=t.value,t.delta=r,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t)))}},o=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},s=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},c=()=>s()?.activationStart??0,d=-1,l=/* @__PURE__ */new Set,u=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,f=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of l)e();isFinite(d)||(d="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",f,!0))}},h=(e=!1)=>{if(e&&(d=1/0),d<0){const e=c(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").find(t=>"hidden"===t.name&&t.startTime>=e)?.startTime;d=t??u(),addEventListener("visibilitychange",f,!0),addEventListener("prerenderingchange",f,!0),a(()=>{setTimeout(()=>{d=u()})})}return{get firstHiddenTime(){return d},onHidden(e){l.add(e)}}},g=(e,t=-1,n,a=0,r,o,d)=>{const l=s(),u=l?.navigationId||0;let f="navigate";return n?f=n:i()>=0?f="back-forward-cache":l&&(document.prerendering||c()>0?f="prerender":document.wasDiscarded?f="restore":l.type&&(f=l.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:f,navigationId:a||u,navigationInteractionId:r,navigationURL:o||l?.name,navigationStartTime:d||0}},v=/* @__PURE__ */new WeakMap;function p(e,t){let n=v.get(t);return n||(n=/* @__PURE__ */new WeakMap,v.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var m,y=class{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}},T=(e,t,n={})=>{try{const i=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(i.length>0){const e=new PerformanceObserver(e=>{queueMicrotask(()=>{const n=e.getEntries();i.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(const t of i)e.observe({type:t,buffered:!0,...n});return e}}catch{}},w=e=>globalThis.PerformanceObserver?.supportedEntryTypes?.includes("soft-navigation")&&"function"==typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint&&e&&e.reportSoftNavs,I=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){const t=e.keys().next().value;void 0!==t&&e.delete(t)}},b=e=>{let t=!1;return()=>{t||(e(),t=!0)}},E=class{l},C=e=>{document.prerendering?addEventListener("prerenderingchange",e,!0):e()},L=[1800,3e3],P=(e,t={})=>{const n=w(t);C(()=>{const s=p(t,E),d=h();let l,u=g("FCP");const f=T(["paint"],e=>{for(const t of e)"first-contentful-paint"===t.name&&(f.disconnect(),t.startTime<d.firstHiddenTime&&(u.value=Math.max(t.startTime-c(),0),u.entries.push(t),u.navigationId=t.navigationId||u.navigationId,l(!0)))});f&&(l=r(e,u,L,t.reportAllChanges),a(n=>{u=g("FCP",-1,"back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),l=r(e,u,L,t.reportAllChanges),o(()=>{u.value=performance.now()-n.timeStamp,l(!0)})})),n&&T(["soft-navigation"],n=>{n.forEach(n=>{s.l&&n.navigationId&&I(s.l,n);const i=Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0);u=g("FCP",i,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),l=r(e,u,L,t.reportAllChanges),l(!0)})},t)})},A=[.1,.25],k=0,S=1/0,z=0,M=e=>{for(const t of e)t.interactionId&&(S=Math.min(S,t.interactionId),z=Math.max(z,t.interactionId),k=z?(z-S)/7+1:0)},$=()=>m?k:performance.interactionCount??0,_=class{u=0;v=[];m=/* @__PURE__ */new Map;p;T;_(){return $()-this.u}M(){this.u=$(),this.v.length=0,this.m.clear()}L(e){const t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||-1!==n||"soft-navigation"!==e&&"back-forward-cache"!==e?this.v[n]:{P:8,id:-1,entries:[]}}h(e){if(this.p?.(e),!e.interactionId)return;const t=this.v.at(-1);let n=this.m.get(e.interactionId);if(n||this.v.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.m.set(n.id,n),this.v.push(n)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){const e=this.v.splice(10);for(const t of e)this.m.delete(t.id)}this.T?.(n)}}},R=e=>{const t="requestIdleCallback"in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,i=globalThis.cancelIdleCallback||clearTimeout;if("hidden"===document.visibilityState)e();else{const a=b(e);let r=-1;const o=()=>{i(r),a()};addEventListener("visibilitychange",o,{once:!0,capture:!0}),r=n(()=>{removeEventListener("visibilitychange",o,{capture:!0}),a()},{timeout:t})}},Z=[200,500],F=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=h();C(()=>{"interactionCount"in performance||m||(m=T(["event"],M,{durationThreshold:0}));let o,s=g("INP");const c=p(t,_),d=(n,i,a,d,l)=>{c.M(),s=g("INP",-1,n,i,a,d,l),o=r(e,s,Z,t.reportAllChanges)},l=()=>{const e=c.L(s.navigationType);e&&e.P!==s.value&&(s.value=e.P,s.entries=e.entries,o())},u=e=>{l(),o(!0),d("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},f=(e,t=!1)=>{R(()=>{for(const t of e)"soft-navigation"!==t.entryType?c.h(t):u(t);l(),t&&o(!0)})},h=["event","first-input"];w(t)&&h.push("soft-navigation");const v=T(h,f,{...t,durationThreshold:t.durationThreshold??40});o=r(e,s,Z,t.reportAllChanges),v&&(n.onHidden(()=>{f(v.takeRecords(),!0)}),a(()=>{d("back-forward-cache",s.navigationId,s.navigationInteractionId,s.navigationURL,i())}))})},j=class{p;l;h(e){this.p?.(e)}},x=[2500,4e3],N=[800,1800],U=e=>{document.prerendering?C(()=>U(e)):"complete"!==document.readyState?addEventListener("load",()=>U(e),!0):setTimeout(e)};var B=/^[A-Za-z0-9/_:.\-[\]{}*@~]+$/,O=/^[A-Za-z_$][A-Za-z0-9_$.]*$/,H=/^[A-Za-z0-9][A-Za-z0-9.+_-]*$/;var q=class{constructor(e){this.head=e}head;events=[];waiting=/* @__PURE__ */new Map;seen=/* @__PURE__ */new Set;get size(){return this.events.length}addVital(e){this.events.push(e)}addError(e){const t=function(e){return e.frames.length?`${e.name}|${e.frames.join("|")}`:`${e.name}|${e.message.replace(/\d/g,"0")}`}(e),n=this.waiting.get(t);return n?(n.count=Math.min(1e3,n.count+e.count),!0):!(this.seen.has(t)||this.seen.size>=20)&&(this.seen.add(t),this.waiting.set(t,e),this.events.push(e),!0)}drain(){const e=this.events;this.events=[],this.waiting.clear();const t=[],n=JSON.stringify({...this.head,events:[]}).length;let i=[],a=n;for(const r of e){const e=JSON.stringify(r).length+1;n+e>30720||((50===i.length||a+e>30720)&&(t.push({...this.head,events:i}),i=[],a=n),i.push(r),a+=e)}return i.length&&t.push({...this.head,events:i}),t}},K=/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,J=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}(?:\.[A-Za-z0-9_-]*)?|\b[Bb]earer\s+[A-Za-z0-9._~+/=-]{8,}/g,W=/\b[a-z][a-z0-9+.-]*:\/\/\S+/gi,V=/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,D=/\d{4,}/g,G=/(^|[/:])(?:\d+|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{16,})(?=$|[/:])/gi,Q=/^[a-z][a-z0-9+.-]*:\/\/[^/]*/i,X=/(?:\(|@|\bat\s+)?((?:[a-z][a-z0-9+.-]*:\/\/|\/)[^\s()@]*?):(\d+):(\d+)\)?\s*$/i;function Y(e,t,n){const i=e.replace(Q,"").split(/[?#]/,1)[0];return i?`${i}:${t}:${n}`.slice(0,256):null}function ee(e){if("string"!=typeof e)return[];const t=[];for(const n of e.split("\n")){const e=X.exec(n.trim()),i=e&&Y(e[1],e[2],e[3]);if(i&&t.push(i),5===t.length)break}return t}function te(e){const t=e instanceof Error?e.name:void 0;return"string"==typeof t&&t.length<=64&&O.test(t)?t:"Error"}function ne(e){if("string"!=typeof e)return"unknown";const t=e.trim().replace(Q,"").split(/[?#]/,1)[0].replace(G,(e,t)=>":"===t?":id":`${t}:id`);return t&&t.length<=128&&!t.includes("//")&&B.test(t)?t:"unknown"}var ie={flush(){},reportError(){},stop(){}},ae=null,re=/* @__PURE__ */new Set(["LCP","FCP","TTFB"]);function oe(e,t,n){const i=function(e){if(e.anonymous)return{credentials:"omit",headers:{"Content-Type":"application/json"}};const t=e.getAccessToken();return t?{credentials:"same-origin",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}}:null}(t);if(!i)return;const a=t.anonymous?"/api/storefront-analytics/web-vitals/":"/api/client-telemetry/web-batches/";n(t.endpoint??a,{...i,method:"POST",keepalive:!0,body:JSON.stringify(e)}).catch(e=>{console.debug("[efficient-shell] client telemetry batch dropped:",e)})}function se(e){((e,t={})=>{let n=!1;const s=w(t);C(()=>{let d,l=h(),u=g("LCP");const f=p(t,j),v=(i,a,o,s,c)=>{u=g("LCP",-1,i,a,o,s,c),d=r(e,u,x,t.reportAllChanges),n=!1,"soft-navigation"===i&&(l=h(!0))},m=e=>{f.l&&e.navigationId&&I(f.l,e),n||d(!0),v("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime);const t=e.getLargestInteractionContentfulPaint?.();t&&y([t])},y=e=>{t.reportAllChanges||s||(e=e.slice(-1));for(const t of e){if(!t)continue;if("soft-navigation"===t.entryType){m(t);continue}let e=0,n=[],i=t.startTime;if("largest-contentful-paint"===t.entryType)e=Math.max(t.startTime-c(),0),f.h(t),n=[t];else if("interaction-contentful-paint"===t.entryType){const a=t;if(!u.navigationId)continue;if("interactionId"in a&&a.interactionId!=u.navigationInteractionId)continue;i=a.largestContentfulPaint?.renderTime||0,e=Math.max(i-t.startTime,0),a.largestContentfulPaint&&(f.h(a.largestContentfulPaint),n=[a.largestContentfulPaint])}i<l.firstHiddenTime&&(u.value=e,u.entries=n,d())}},w=["largest-contentful-paint"];s&&w.push("interaction-contentful-paint","soft-navigation");const b=T(w,y);if(b){d=r(e,u,x,t.reportAllChanges);const c=["keydown","click","visibilitychange"],l=e=>{if(e.isTrusted&&!n){const e=u.id;R(()=>{if(!n){if(!s){b.disconnect();for(const e of c)removeEventListener(e,l,{capture:!0})}e===u.id&&(n=!0,d(!0))}})}};for(const e of c)addEventListener(e,l,{capture:!0});a(a=>{v("back-forward-cache",u.navigationId,u.navigationInteractionId,u.navigationURL,i()),d=r(e,u,x,t.reportAllChanges),o(()=>{u.value=performance.now()-a.timeStamp,n=!0,d(!0)})})}})})(e),F(e),((e,t={})=>{const n=h();P(b(()=>{let s,c=g("CLS",0);const d=p(t,y),l=(n,i,a,o,l)=>{c=g("CLS",0,n,i,a,o,l),d.i=0,s=r(e,c,A,t.reportAllChanges)},u=(e=!1)=>{d.i>c.value&&(c.value=d.i,c.entries=d.o),s(e)},f=e=>{u(!0),l("soft-navigation",e.navigationId,e.interactionId,e.name,e.startTime)},h=e=>{for(const t of e)"soft-navigation"!==t.entryType?d.h(t):f(t);u()},v=["layout-shift"];w(t)&&v.push("soft-navigation");const m=T(v,h);m&&(s=r(e,c,A,t.reportAllChanges),n.onHidden(()=>{h(m.takeRecords()),s(!0)}),a(()=>{l("back-forward-cache",c.navigationId,c.navigationInteractionId,c.navigationURL,i()),o(s)}),setTimeout(s))}))})(e),P(e),((e,t={})=>{const n=w(t);let o=g("TTFB"),d=r(e,o,N,t.reportAllChanges);U(()=>{const l=s();if(l){const s=l.responseStart;o.value=Math.max(s-c(),0),o.entries=[l],d(!0),a(()=>{o=g("TTFB",0,"back-forward-cache",o.navigationId,o.navigationInteractionId,o.navigationURL,i()),d=r(e,o,N,t.reportAllChanges),d(!0)}),n&&T(["soft-navigation"],n=>{n.forEach(n=>{n.navigationId&&(o=g("TTFB",0,"soft-navigation",n.navigationId,n.interactionId,n.name,n.startTime),o.entries=[n],d=r(e,o,N,t.reportAllChanges),d(!0))})},t)}})})(e)}function ce(n){if(ae?.stop(),ae=null,!1===n.enabled||"undefined"==typeof window||"undefined"==typeof document)return ie;if(!function(e){const t="string"==typeof e.app&&H.test(e.app),n="string"==typeof e.release&&H.test(e.release);return t&&n||console.warn("[efficient-shell] client telemetry not started: `app` and `release` must be version-like strings."),t&&n}(n))return ie;const i=function(e){const t=e.vitalsSampleRate??1;return t>0&&(t>=1||(e.random??Math.random)()<t)}(n);if(n.anonymous&&!i)return ie;const a=n.fetch??window.fetch.bind(window),r=new q({app:n.app,release:n.release,shell_version:H.test(t)?t:""}),o=ne(n.routeKey()),s=function(e=("undefined"==typeof window?void 0:window)){if(!e)return"desktop";const t="function"==typeof e.matchMedia&&e.matchMedia("(pointer: coarse)").matches,n=e.innerWidth;return n<600?"mobile":t&&n<1280?"tablet":"desktop"}(window);let c=!1;const d=()=>{for(const e of r.drain())oe(e,n,a)},l=e=>{c||n.anonymous||(r.addError(e),r.size>=50&&d())},u=(e,t)=>{return{type:"error",source:t,name:te(e),message:(a=e,i=a instanceof Error?a.message:"string"==typeof a?a:a&&"object"==typeof a&&"string"==typeof a.message?a.message:"",i.slice(0,640).replace(K,"[redacted]").replace(J,"[redacted]").replace(W,"[url]").replace(V,"[id]").replace(D,"[n]").replace(/\s+/g," ").trim().slice(0,160)),frames:ee(e instanceof Error?e.stack:void 0),route:ne(n.routeKey()),count:1};var i,a};i&&(n.observeVitals??se)(e=>{c||(r.addVital(function(e,t,n,i){return{type:"vital",name:e.name,value:e.value,route:re.has(e.name)?t:n(),navigation:e.navigationType??"navigate",device:i}}(e,o,()=>ne(n.routeKey()),s)),r.size>=50&&d())});const f=n.anonymous?()=>{}:function(t,n){const i=e=>{const{error:i,message:a,filename:r,lineno:o,colno:s}=e;if(null!=i)return void t(n(i,"onerror"));const c=r?ee(`at ${r}:${o??0}:${s??0}`):[];t({...n(a??"","onerror"),frames:c})},a=e=>t(n(e.reason,"unhandledrejection"));window.addEventListener("error",i),window.addEventListener("unhandledrejection",a);const r=e(e=>t(n(e,"boundary")));return()=>{window.removeEventListener("error",i),window.removeEventListener("unhandledrejection",a),r()}}(l,u),h=()=>{"hidden"===document.visibilityState&&d()};document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",d);const g=window.setInterval(d,n.flushIntervalMs??6e4),v={flush:d,reportError:e=>l(u(e,"boundary")),stop(){c||(d(),c=!0,f(),document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",d),window.clearInterval(g),ae===v&&(ae=null))}};return ae=v,v}export{ce as startClientTelemetry};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-
|
|
2
|
-
return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const j=r().meter,B=s(),
|
|
3
|
-
/* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${
|
|
1
|
+
import{warnOnce as a,resolveSeverity as e,styleForTone as t,severityOf as l,boundOf as n}from"./chunk-TZFNWAED.js";import{TICK_INK as i}from"./chunk-URBCGEXG.js";import{useShellStrings as r,useShellLocale as s}from"./chunk-NRHG4R2Q.js";import{formatPercent as u,formatPlain as m}from"./chunk-C3QOHMR6.js";import{jsxs as c,jsx as o}from"react/jsx-runtime";function d({at:a,title:e,className:t}){/* @__PURE__ */
|
|
2
|
+
return o("div",{title:e,className:`absolute -top-[3px] h-3 w-0.5 rounded-[1px] ${t}`,style:{left:`${a}%`}})}var x=a=>Math.min(100,Math.max(0,a));function h({label:h,value:p,max:f=100,warn:g,crit:b,severity:v,detail:N,formatValue:y,emptyLabel:w,size:k="sm",ariaLabel:$,className:M=""}){const j=r().meter,B=s(),R=w??j.noData,A=null!=p&&Number.isFinite(p)?p:null,F=Number.isFinite(f)&&f>0?f:null;null==F&&a(`MetricBar:max:${String(f)}`,`[efficient-shell] MetricBar: max=${String(f)} is not a positive finite number, so there is no scale to draw a proportional bar against. Printing the value without a bar. Pass the real capacity, or leave the reading out entirely (value={null}) when it is unknown — do not pass 0.`);const G=e(v,"MetricBar"),C=null!=A?G??t(l(A,g,b)):null,D=n(g),E=n(b),H=null!=A&&null!=F?x(A/F*100):0,L=null!=A?(y??(a=>100===F?u(a,1,B):m(a,B)))(A):"—",P=null!=A&&null!=F&&(null!=D||null!=E),Q="md"===k||"lg"===k,S=Q?"h-2":"h-1.5",z=null!=A&&null!=F,O=/* @__PURE__ */c("div",{...z?{role:"meter","aria-label":$??("string"==typeof h?h:void 0),"aria-valuemin":0,"aria-valuemax":F,"aria-valuenow":Math.min(F,Math.max(0,A)),"aria-valuetext":L}:{"aria-hidden":!0},className:z&&C?`relative mt-2 ${S} rounded-full bg-gray-200`:`relative mt-2 ${S} rounded-full border border-dashed border-gray-300 bg-transparent`,children:[z&&
|
|
3
|
+
/* @__PURE__ */o("div",{className:`absolute inset-y-0 left-0 rounded-full ${C?C.fill:"bg-gray-400"}`,style:{width:`${H}%`}}),P&&null!=F&&null!=D&&/* @__PURE__ */o(d,{at:x(D/F*100),title:j.warningAt(D),className:i.warning}),P&&null!=F&&null!=E&&/* @__PURE__ */o(d,{at:x(E/F*100),title:j.criticalAt(E),className:i.critical})]}),T=C?C.ink:null!=A?"text-gray-900":"text-gray-400";if(Q){const a="lg"===k;/* @__PURE__ */
|
|
4
4
|
return c("div",{className:M,children:[null!=h&&/* @__PURE__ */o("div",{className:(a?"text-xs":"text-3xs")+" font-medium uppercase tracking-wide text-gray-500",children:h}),
|
|
5
5
|
/* @__PURE__ */c("div",{className:"mt-1 flex items-baseline gap-2",children:[
|
|
6
|
-
/* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${
|
|
7
|
-
/* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=
|
|
6
|
+
/* @__PURE__ */o("span",{className:`text-2xl font-semibold leading-[30px] tabular-nums ${T}`,children:L}),
|
|
7
|
+
/* @__PURE__ */o("span",{className:"min-w-0 truncate tabular-nums "+(a?"text-xs text-gray-500":"text-2xs text-gray-400"),children:null!=A?N:R})]}),O]})}/* @__PURE__ */
|
|
8
8
|
return c("div",{className:M,children:[
|
|
9
9
|
/* @__PURE__ */c("div",{className:"flex items-baseline gap-2",children:[null!=h&&/* @__PURE__ */o("span",{className:"w-14 shrink-0 truncate text-3xs font-medium uppercase tracking-wide text-ink-faint",children:h}),
|
|
10
|
-
/* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${
|
|
11
|
-
/* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=
|
|
10
|
+
/* @__PURE__ */o("span",{className:`text-sm font-semibold tabular-nums ${T}`,children:L}),
|
|
11
|
+
/* @__PURE__ */o("span",{className:"ml-auto min-w-0 truncate text-2xs tabular-nums text-ink-faintest",children:null!=A?N:R})]}),O]})}export{h as MetricBar};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{axisGutter as e,radiusScale as t,niceMax as i,logScale as l,linearScale as r}from"./chunk-2JWPNR2U.js";import{ChartTooltip as o}from"./chunk-WDQI3FV6.js";import{CHART_INK as n,resolveSeriesColorWithin as a}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{usePlotWidth as c}from"./chunk-MAFUXCPZ.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-
|
|
2
|
-
return y("div",{className:
|
|
3
|
-
return g("div",{className:`relative ${
|
|
4
|
-
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${F} ${k}`,role:"img","aria-label":L.scatter(X.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(Z>0?`. ${L.outsideRange(Z)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>
|
|
5
|
-
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:
|
|
1
|
+
import{axisGutter as e,radiusScale as t,niceMax as i,logScale as l,linearScale as r}from"./chunk-2JWPNR2U.js";import{ChartTooltip as o}from"./chunk-WDQI3FV6.js";import{CHART_INK as n,resolveSeriesColorWithin as a}from"./chunk-TZFACUMR.js";import{registerModalEscapeInterceptor as s}from"./chunk-TWVUQUUD.js";import{usePlotWidth as c}from"./chunk-MAFUXCPZ.js";import{useShellStrings as m,useShellLocale as h}from"./chunk-NRHG4R2Q.js";import{formatPlain as f}from"./chunk-C3QOHMR6.js";import{useRef as u,useId as p,useState as d,useEffect as x}from"react";import{jsx as y,jsxs as g}from"react/jsx-runtime";var b=3;function k({series:b,height:k=260,width:v,xLabel:M,yLabel:A,formatX:z,formatY:N,xDomain:R,yDomain:$,xScale:j="linear",yScale:w="linear",radiusRange:D=[4,22],className:S,emptyLabel:U}){const L=m().charts,W=h(),P=z??(e=>f(e,W)),Q=N??(e=>f(e,W)),V=U??L.noObservations,C=u(null),E=c(C),F=v??E,I=p(),[O,B]=d(null);x(()=>{if(null!==O)return s(e=>"Escape"===e.key&&(B(null),!0))},[O]);const H=(e,t)=>!t||e>=Math.min(t[0],t[1])&&e<=Math.max(t[0],t[1]),T=b.map((e,t)=>({...e,slot:t})).filter(e=>e.points.length>0),X=R||$?T.map(e=>({...e,points:e.points.filter(e=>H(e.x,R)&&H(e.y,$))})).filter(e=>e.points.length>0):T,Z=T.reduce((e,t)=>e+t.points.length,0)-X.reduce((e,t)=>e+t.points.length,0);if(0===X.length)/* @__PURE__ */
|
|
2
|
+
return y("div",{className:S,ref:C,children:/* @__PURE__ */y("p",{className:"flex items-center justify-center text-sm text-gray-500",style:{height:k},children:V})});const G=X.flatMap(e=>e.points),J=G.some(e=>null!=e.size),K=14,Y=20,q=34,_=52,ee=(e,t,o,n)=>{const a=e.filter(e=>e>0),s="log"===o?a.length>0?Math.min(...a):0:Math.min(0,...e),c=t??[s,i(Math.max(...e))];return"log"===o?l(c,n):r(c,n)},te=ee(G.map(e=>e.y),$,w,{from:k-q,to:K}),ie=e(te.ticks(5).map(Q),_),le=Math.max(ie+1,F-Y),re=ee(G.map(e=>e.x),R,j,{from:ie,to:le}),oe=t([0,Math.max(...G.map(e=>e.size??1))],{from:D[0],to:D[1]}),ne=O?X[O.s]:void 0,ae=O&&ne?ne.points[O.i]:void 0,se=X.flatMap((e,t)=>e.points.map((e,i)=>({s:t,i:i})));/* @__PURE__ */
|
|
3
|
+
return g("div",{className:`relative ${S??""}`,ref:C,children:[
|
|
4
|
+
/* @__PURE__ */g("svg",{width:"100%",height:k,viewBox:`0 0 ${F} ${k}`,role:"img","aria-label":L.scatter(X.map(e=>e.label),A??L.yAxis,M??L.xAxis)+(Z>0?`. ${L.outsideRange(Z)}`:""),tabIndex:0,className:"rosh-focus-ring focus-visible:ring-2 focus-visible:ring-[color:var(--rosh-focus-ring-deep)]",onMouseLeave:()=>B(null),onBlur:()=>B(null),onKeyDown:e=>{if("ArrowRight"!==e.key&&"ArrowLeft"!==e.key)return;e.preventDefault();const t="ArrowRight"===e.key?1:-1,i=O?se.findIndex(e=>e.s===O.s&&e.i===O.i):0;B(se[Math.min(se.length-1,Math.max(0,i+t))])},children:[
|
|
5
|
+
/* @__PURE__ */y("defs",{children:/* @__PURE__ */y("clipPath",{id:I,children:/* @__PURE__ */y("rect",{x:ie-D[1],y:K-D[1],width:le-ie+2*D[1],height:k-q-K+2*D[1]})})}),te.ticks(5).map(e=>/* @__PURE__ */g("g",{children:[
|
|
6
6
|
/* @__PURE__ */y("line",{x1:ie,y1:te(e),x2:le,y2:te(e),stroke:n.grid,strokeWidth:1,shapeRendering:"crispEdges"}),
|
|
7
|
-
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:
|
|
8
|
-
/* @__PURE__ */y("g",{clipPath:`url(#${
|
|
7
|
+
/* @__PURE__ */y("text",{x:ie-8,y:te(e)+4,textAnchor:"end",fontSize:11,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:Q(e)})]},`y${e}`)),re.ticks(5).map(e=>/* @__PURE__ */y("text",{x:re(e),y:k-12,textAnchor:"middle",fontSize:11,fill:n.label,style:{fontVariantNumeric:"tabular-nums"},children:P(e)},`x${e}`)),M&&/* @__PURE__ */y("text",{x:(ie+le)/2,y:k-.5,textAnchor:"middle",fontSize:11,fill:n.label,children:M}),A&&/* @__PURE__ */y("text",{x:12,y:k/2,transform:`rotate(-90 12 ${k/2})`,textAnchor:"middle",fontSize:11,fill:n.label,children:A}),
|
|
8
|
+
/* @__PURE__ */y("g",{clipPath:`url(#${I})`,children:X.map((e,t)=>{const i=a(e.slot,3,e.color,e.tone);return e.points.map((l,r)=>/* @__PURE__ */y("circle",{cx:re(l.x),cy:te(l.y),r:J?oe(l.size??0):D[0]+1,fill:i,fillOpacity:O&&O.s!==t?.25:.62,stroke:n.surface,strokeWidth:2,onMouseEnter:()=>B({s:t,i:r})},`${e.key}-${r}`))})})]}),O&&ne&&ae&&/* @__PURE__ */y("div",{className:"pointer-events-none absolute top-2 left-2 z-10",children:/* @__PURE__ */y(o,{title:ae.label??ne.label,rows:[{key:"x",label:M??L.xAxis,color:a(ne.slot,3,ne.color,ne.tone),value:P(ae.x)},{key:"y",label:A??L.yAxis,color:a(ne.slot,3,ne.color,ne.tone),value:Q(ae.y)},...null!=ae.size?[{key:"size",label:L.size,color:n.muted,value:f(ae.size,W)}]:[]],footnote:ae.label?ne.label:void 0})})]})}export{b as SCATTER_SERIES_CAP,k as ScatterChart};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-
|
|
1
|
+
import{Icon as e}from"./chunk-ISVODSRP.js";import{useShellStrings as r}from"./chunk-NRHG4R2Q.js";import{jsxs as t,jsx as n}from"react/jsx-runtime";var s={success:"success",error:"error",warning:"warning",info:"info",404:"info",403:"warning",500:"error"},c={success:"text-green-600 bg-green-100",error:"text-red-600 bg-red-100",warning:"text-amber-600 bg-amber-100",info:"text-blue-600 bg-blue-100"},a={404:e=>e.notFound,403:e=>e.noAccess,500:e=>e.serverError};function i({tone:r}){const t={className:"h-6 w-6",strokeWidth:1.5,"aria-hidden":!0};switch(r){case"success":/* @__PURE__ */
|
|
2
2
|
return n(e,{name:"check",...t});case"error":/* @__PURE__ */
|
|
3
3
|
return n(e,{name:"close",...t});case"warning":/* @__PURE__ */
|
|
4
4
|
return n(e,{name:"error",...t});default:/* @__PURE__ */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{useShellStrings as t,useShellLocale as e}from"./chunk-
|
|
1
|
+
import{useShellStrings as t,useShellLocale as e}from"./chunk-NRHG4R2Q.js";import{formatPlain as a}from"./chunk-C3QOHMR6.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";var o="inline-flex h-8 min-w-8 items-center justify-center rounded-md px-2 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40";function l({page:l,pageCount:i,onPageChange:s,siblingCount:c=1,showEdges:b=!1,className:u=""}){const d=t().pagination,g=e();if(i<=1)return null;const m=function(t,e,a){const n=/* @__PURE__ */new Set([1,e]);for(let r=t-a;r<=t+a;r++)r>=1&&r<=e&&n.add(r);const r=[...n].sort((t,e)=>t-e),o=[];let l=0;for(const t of r)l&&t-l>1&&o.push("…"),o.push(t),l=t;return o}(l,i,c),p=t=>{t>=1&&t<=i&&t!==l&&s(t)};/* @__PURE__ */
|
|
2
2
|
return n("nav",{"aria-label":d.label,className:`flex items-center gap-1 ${u}`.trim(),children:[b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.first,disabled:1===l,onClick:()=>p(1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"«"}),
|
|
3
3
|
/* @__PURE__ */r("button",{type:"button","aria-label":d.previous,disabled:1===l,onClick:()=>p(l-1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"‹"}),m.map((t,e)=>"…"===t?/* @__PURE__ */r("span",{className:"px-1 text-gray-400",children:"…"},`gap-${e}`):/* @__PURE__ */r("button",{type:"button","aria-current":t===l?"page":void 0,onClick:()=>p(t),className:`${o} ${t===l?"bg-blue-600 font-medium text-white":"text-gray-700 hover:bg-gray-100"}`,children:a(t,g)},t)),
|
|
4
4
|
/* @__PURE__ */r("button",{type:"button","aria-label":d.next,disabled:l===i,onClick:()=>p(l+1),className:`${o} text-gray-600 hover:bg-gray-100`,children:"›"}),b&&/* @__PURE__ */r("button",{type:"button","aria-label":d.last,disabled:l===i,onClick:()=>p(i),className:`${o} text-gray-600 hover:bg-gray-100`,children:"»"})]})}export{l as Pagination};
|