hisd3-ui-kit 5.1.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/theme/layout.ts","../src/theme/antd.ts","../src/components/Provider/index.tsx","../src/components/Sidebar/index.styled.tsx","../src/components/Sidebar/menu.ts","../src/components/Sidebar/UserMenu.tsx","../src/components/Sidebar/index.tsx","../src/components/PageHeader/index.tsx","../src/assets/logo.ts","../src/components/Button/index.tsx","../src/components/LoginPage/index.styled.tsx","../src/components/LoginPage/index.tsx","../src/components/HeaderActions/NotificationButton.tsx","../src/components/HeaderActions/AvatarMenu.tsx","../src/components/HeaderActions/index.tsx","../src/components/Table/index.tsx","../src/components/Tabs/index.tsx","../src/components/Tag/index.tsx","../src/components/Input/index.tsx","../src/components/Select/index.tsx","../src/components/Form/index.tsx","../src/hooks/useDialog.tsx","../src/enum/theme.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/** Shared layout metrics so the sidebar brand block and page top bar line up. */\nexport const HISD3_LAYOUT = {\n siderWidth: 260,\n siderCollapsedWidth: 64,\n /** Height of both the sidebar brand block and the page top bar. */\n topBarHeight: 60,\n /** Horizontal padding used by the top bar, title block and page body. */\n pageGutter: 28,\n} as const;\n","import type { ThemeConfig } from \"antd\";\n\nimport { HISD3_LAYOUT } from \"./layout\";\n\n/** Named primary-color presets. Any hex string is also accepted. */\nexport const HISD3_PRESETS = {\n /** The HISD3 logo's gear colour. */\n brand: \"#E5533B\",\n /** The HISD3 logo's cloud colour. */\n brandBlue: \"#1B6FE0\",\n red: \"#E5401C\",\n orange: \"#F26B1D\",\n teal: \"#00796B\",\n blue: \"#1D5FD1\",\n green: \"#2E7D32\",\n purple: \"#6A3FD6\",\n} as const;\n\nexport type HISD3Preset = keyof typeof HISD3_PRESETS;\n\n/** Neutral palette shared by every preset (the \"Backoffice\" look). */\nexport const HISD3_NEUTRALS = {\n bgLayout: \"#F3F2F0\",\n bgContainer: \"#F3F2F0\",\n bgElevated: \"#FFFFFF\",\n bgFilled: \"#E6E4E1\",\n bgFilledHover: \"#DBD8D4\",\n text: \"#171717\",\n textSecondary: \"#4A4A4A\",\n textTertiary: \"#6E6E6E\",\n /** Structural rules: sidebar edge, header bottom, table header. */\n border: \"#D9D5CE\",\n /** Quieter rules: table rows, dividers inside popups. */\n borderSecondary: \"#E7E4DE\",\n /** Near-black, used for hover/focus emphasis on controls. */\n borderStrong: \"#1F1F1F\",\n white: \"#FFFFFF\",\n} as const;\n\n/** Border weights. \"hairline\" is the default modern look. */\nexport const HISD3_BORDER_PRESETS = {\n hairline: { width: 1, border: \"#D9D5CE\", borderSecondary: \"#E7E4DE\" },\n bold: { width: 2, border: \"#1F1F1F\", borderSecondary: \"#CFCDC9\" },\n} as const;\n\nexport type HISD3Borders = keyof typeof HISD3_BORDER_PRESETS;\n\nexport const HISD3_FONT_FAMILY =\n \"'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif\";\n/** Archivo is used for both body (400) and headings (800). */\nexport const HISD3_FONT_WEIGHT_HEADING = 800;\nexport const HISD3_FONT_WEIGHT_BODY = 400;\n\nexport interface HISD3ThemeOptions {\n /** Preset name or any hex color. Default \"red\". */\n primary?: HISD3Preset | string;\n /** Corner radius in px. The Backoffice look is square (0). */\n radius?: number;\n /**\n * Border treatment. \"hairline\" (default) uses 1px warm-grey rules;\n * \"bold\" restores the 2px near-black look.\n */\n borders?: HISD3Borders;\n /** Explicit border width in px; overrides the `borders` preset. */\n lineWidth?: number;\n /** Override / extend the generated antd theme. */\n overrides?: ThemeConfig;\n}\n\nexport const resolvePrimary = (primary: HISD3Preset | string = \"red\"): string =>\n (HISD3_PRESETS as Record<string, string>)[primary] ?? primary;\n\n/**\n * Mix a hex color with black: amount 0 → color, 1 → black.\n *\n * Used for table backgrounds. A fixed column is `position: sticky`, so the rest\n * of the row scrolls underneath it and its cells must be opaque — every Table\n * background token has to be a solid blend, never an alpha overlay.\n */\nexport const shade = (hex: string, amount: number): string => {\n const h = hex.replace(\"#\", \"\");\n const full = h.length === 3 ? h.split(\"\").map((c) => c + c).join(\"\") : h;\n const n = parseInt(full, 16);\n const mix = (c: number) => Math.round(c * (1 - amount));\n return `#${[(n >> 16) & 255, (n >> 8) & 255, n & 255]\n .map((c) => mix(c).toString(16).padStart(2, \"0\"))\n .join(\"\")}`;\n};\n\n/** Mix a hex color with white: amount 0 → color, 1 → white. */\nexport const tint = (hex: string, amount: number): string => {\n const h = hex.replace(\"#\", \"\");\n const full = h.length === 3 ? h.split(\"\").map((c) => c + c).join(\"\") : h;\n const n = parseInt(full, 16);\n const r = (n >> 16) & 255;\n const g = (n >> 8) & 255;\n const b = n & 255;\n const mix = (c: number) => Math.round(c + (255 - c) * amount);\n return `#${[mix(r), mix(g), mix(b)]\n .map((c) => c.toString(16).padStart(2, \"0\"))\n .join(\"\")}`;\n};\n\n/**\n * Build the HISD3 Ant Design v6 theme.\n *\n * ```ts\n * <ConfigProvider theme={createHisd3Theme({ primary: \"teal\" })}>\n * ```\n */\nexport const createHisd3Theme = ({\n primary,\n radius = 0,\n borders = \"hairline\",\n lineWidth,\n overrides,\n}: HISD3ThemeOptions = {}): ThemeConfig => {\n const p = resolvePrimary(primary);\n const b = HISD3_BORDER_PRESETS[borders] ?? HISD3_BORDER_PRESETS.hairline;\n const width = lineWidth ?? b.width;\n const n = {\n ...HISD3_NEUTRALS,\n border: b.border,\n borderSecondary: b.borderSecondary,\n };\n\n const base: ThemeConfig = {\n cssVar: { key: \"hisd3\" },\n token: {\n colorPrimary: p,\n colorInfo: p,\n colorLink: p,\n colorPrimaryBg: tint(p, 0.92),\n colorPrimaryBgHover: tint(p, 0.86),\n colorPrimaryBorder: tint(p, 0.6),\n fontFamily: HISD3_FONT_FAMILY,\n fontSize: 14,\n fontWeightStrong: 700,\n borderRadius: radius,\n borderRadiusLG: radius,\n borderRadiusSM: radius,\n borderRadiusXS: radius,\n lineWidth: width,\n colorBgLayout: n.bgLayout,\n colorBgContainer: n.bgContainer,\n colorBgElevated: n.bgElevated,\n colorText: n.text,\n colorTextSecondary: n.textSecondary,\n colorTextTertiary: n.textTertiary,\n colorTextHeading: n.text,\n colorBorder: n.border,\n colorBorderSecondary: n.borderSecondary,\n colorSplit: n.borderSecondary,\n controlHeight: 40,\n controlHeightLG: 52,\n controlHeightSM: 32,\n boxShadow: \"none\",\n boxShadowSecondary:\n \"0 2px 6px rgba(16,15,14,0.06), 0 12px 32px rgba(16,15,14,0.14)\",\n },\n components: {\n Layout: {\n siderBg: n.bgLayout,\n headerBg: n.bgLayout,\n bodyBg: n.bgLayout,\n headerPadding: `0 ${HISD3_LAYOUT.pageGutter}px`,\n },\n Menu: {\n itemBg: \"transparent\",\n subMenuItemBg: \"transparent\",\n itemColor: n.text,\n itemHoverColor: n.text,\n itemHoverBg: \"rgba(0,0,0,0.04)\",\n itemSelectedBg: tint(p, 0.9),\n itemSelectedColor: p,\n itemActiveBg: tint(p, 0.86),\n subMenuItemSelectedColor: p,\n groupTitleColor: n.textTertiary,\n groupTitleFontSize: 12,\n itemBorderRadius: 0,\n itemMarginInline: 0,\n itemMarginBlock: 0,\n itemHeight: 40,\n itemPaddingInline: HISD3_LAYOUT.pageGutter,\n iconSize: 16,\n collapsedIconSize: 18,\n activeBarBorderWidth: 0,\n activeBarWidth: 0,\n },\n Button: {\n fontWeight: 600,\n primaryShadow: \"none\",\n defaultShadow: \"none\",\n dangerShadow: \"none\",\n defaultBorderColor: n.border,\n defaultColor: n.text,\n defaultBg: n.bgLayout,\n defaultHoverBg: n.white,\n defaultHoverBorderColor: n.borderStrong,\n defaultHoverColor: n.text,\n defaultActiveBorderColor: n.borderStrong,\n paddingInline: 16,\n contentFontSize: 14,\n contentFontSizeLG: 16,\n contentFontSizeSM: 13,\n },\n Input: {\n activeShadow: \"none\",\n colorBorder: n.border,\n hoverBorderColor: n.borderStrong,\n activeBorderColor: n.borderStrong,\n paddingInline: 16,\n },\n Select: { optionSelectedBg: tint(p, 0.9), colorBorder: n.border },\n Table: {\n /*\n * Opaque, not transparent: a fixed column is `position: sticky`, so the\n * columns that scroll underneath it would otherwise show through. These\n * are the same colours as the surface a table sits on, flattened.\n */\n headerBg: n.bgContainer,\n headerColor: n.textTertiary,\n headerSplitColor: \"transparent\",\n headerBorderRadius: 0,\n borderColor: n.borderSecondary,\n rowHoverBg: shade(n.bgContainer, 0.03),\n cellPaddingBlock: 10,\n cellPaddingInline: 12,\n cellFontSize: 14,\n cellPaddingBlockMD: 8,\n cellPaddingInlineMD: 10,\n cellPaddingBlockSM: 6,\n cellPaddingInlineSM: 8,\n cellFontSizeMD: 14,\n cellFontSizeSM: 13,\n footerBg: n.bgContainer,\n },\n Tabs: {\n inkBarColor: p,\n itemColor: n.text,\n itemSelectedColor: p,\n itemHoverColor: p,\n titleFontSize: 15,\n horizontalItemGutter: 32,\n horizontalMargin: \"0\",\n lineWidthBold: 4,\n },\n Tag: { borderRadiusSM: 0, defaultBg: \"transparent\" },\n Pagination: {\n itemBg: n.bgLayout,\n itemActiveBg: p,\n itemSize: 32,\n itemSizeSM: 26,\n itemInputBg: n.bgLayout,\n },\n Dropdown: { paddingBlock: 10 },\n Breadcrumb: {\n itemColor: n.textTertiary,\n lastItemColor: n.text,\n linkColor: n.textTertiary,\n linkHoverColor: p,\n separatorColor: n.textTertiary,\n },\n Card: { headerFontSize: 20 },\n },\n };\n\n if (!overrides) return base;\n return {\n ...base,\n ...overrides,\n token: { ...base.token, ...overrides.token },\n components: { ...base.components, ...overrides.components },\n };\n};\n\n/**\n * CSS emitted by HISD3Provider on `:root`.\n *\n * antd only exposes its CSS variables inside its own components, so custom\n * markup in an app (a login screen, a bespoke panel) cannot read\n * `--ant-color-primary` and friends. We mirror the handful that matter onto\n * `:root` so kit components and app CSS work anywhere in the tree. antd's own\n * declarations sit closer to its components, so they still win there.\n */\nexport const hisd3VarsCss = ({\n primary,\n borders = \"hairline\",\n lineWidth,\n radius = 0,\n}: HISD3ThemeOptions = {}): string => {\n const p = resolvePrimary(primary);\n const b = HISD3_BORDER_PRESETS[borders] ?? HISD3_BORDER_PRESETS.hairline;\n const n = HISD3_NEUTRALS;\n return [\n \":root{\",\n `--hisd3-rule-width:${lineWidth ?? b.width}px;`,\n `--hisd3-control-bg:${n.bgFilled};`,\n `--hisd3-control-bg-hover:${n.bgFilledHover};`,\n \"--hisd3-popup-radius:10px;\",\n `--hisd3-radius:${radius}px;`,\n `--ant-color-primary:${p};`,\n `--ant-color-primary-bg:${tint(p, 0.92)};`,\n `--ant-color-primary-bg-hover:${tint(p, 0.86)};`,\n `--ant-color-primary-border:${tint(p, 0.6)};`,\n `--ant-color-error:${p === HISD3_PRESETS.red ? p : \"#E5401C\"};`,\n `--ant-color-text:${n.text};`,\n `--ant-color-text-secondary:${n.textSecondary};`,\n `--ant-color-text-tertiary:${n.textTertiary};`,\n /*\n * Table surfaces. Solid, never alpha: fixed columns are sticky and the rest\n * of the row scrolls underneath them. Override these on a surface that is\n * not the usual page grey (a white drawer, say).\n */\n `--hisd3-table-bg:${n.bgContainer};`,\n `--hisd3-table-hover-bg:${shade(n.bgContainer, 0.03)};`,\n `--hisd3-border:${b.border};`,\n `--hisd3-border-secondary:${b.borderSecondary};`,\n `--ant-color-border:${b.border};`,\n `--ant-color-border-secondary:${b.borderSecondary};`,\n `--ant-color-bg-layout:${n.bgLayout};`,\n `--ant-color-bg-elevated:${n.bgElevated};`,\n \"}\",\n ].join(\"\");\n};\n\n/** @deprecated use `hisd3VarsCss` — it emits the colour tokens too. */\nexport const borderVarsCss = (\n borders: HISD3Borders = \"hairline\",\n lineWidth?: number,\n): string => hisd3VarsCss({ borders, lineWidth });\n\n/** Default HISD3 theme — the red \"Backoffice\" look. */\nexport const hisd3AntdTheme: ThemeConfig = createHisd3Theme();\n\n/** @deprecated use HISD3_PRESETS / createHisd3Theme */\nexport const HISD3_COLORS = {\n primary: HISD3_PRESETS.red,\n primaryLight: tint(HISD3_PRESETS.red, 0.9),\n headerSelectedBg: \"rgba(0,0,0,0.04)\",\n} as const;\n","import { App as AntdApp, ConfigProvider, type ThemeConfig } from \"antd\";\nimport React, { createContext, useContext, useMemo } from \"react\";\nimport { ThemeProvider } from \"styled-components\";\n\nimport {\n createHisd3Theme,\n hisd3VarsCss,\n type HISD3Preset,\n type HISD3ThemeOptions,\n} from \"../../theme/antd\";\nimport type { StyledTheme } from \"../../types/theme\";\n\nconst HISD3ProviderContext = createContext(false);\n\n/** True when rendered somewhere below an `HISD3Provider`. */\nexport const useInsideHISD3Provider = () => useContext(HISD3ProviderContext);\n\nexport interface HISD3ProviderProps extends HISD3ThemeOptions {\n /** Shorthand: preset name or hex. Same as `options.primary`. */\n primary?: HISD3Preset | string;\n /** Legacy styled-components theme object used by older HISD3 screens. */\n styledTheme?: StyledTheme;\n /** Fully custom antd theme — skips `createHisd3Theme` entirely. */\n theme?: ThemeConfig;\n children: React.ReactNode;\n}\n\n/**\n * Root provider for HISD3 apps. Put it once at the top of the tree:\n *\n * ```tsx\n * <HISD3Provider primary=\"teal\">\n * <App />\n * </HISD3Provider>\n * ```\n *\n * It wires the antd `ConfigProvider` (with CSS variables enabled so every\n * kit component follows the chosen primary), antd `App` (for themed\n * `modal.confirm` / `message`), and the styled-components `ThemeProvider`.\n */\nexport const HISD3Provider: React.FC<HISD3ProviderProps> = ({\n primary,\n radius,\n borders = \"hairline\",\n lineWidth,\n overrides,\n theme,\n styledTheme = {},\n children,\n}) => {\n const antdTheme = useMemo(\n () =>\n theme ??\n createHisd3Theme({ primary, radius, borders, lineWidth, overrides }),\n [theme, primary, radius, borders, lineWidth, overrides],\n );\n\n const vars = useMemo(\n () => hisd3VarsCss({ primary, borders, lineWidth, radius }),\n [primary, borders, lineWidth, radius],\n );\n\n return (\n <HISD3ProviderContext.Provider value={true}>\n {/* CSS variables the styled components read (rule width, control fills) */}\n <style dangerouslySetInnerHTML={{ __html: vars }} />\n <ConfigProvider theme={antdTheme}>\n <ThemeProvider theme={styledTheme}>\n <AntdApp component={false}>{children}</AntdApp>\n </ThemeProvider>\n </ConfigProvider>\n </HISD3ProviderContext.Provider>\n );\n};\n\nexport default HISD3Provider;\n","import styled from \"styled-components\";\nimport { Layout } from \"antd\";\n\nimport { HISD3_LAYOUT } from \"../../theme/layout\";\n\nconst { Header, Content } = Layout;\n\nexport const SIDER_WIDTH = HISD3_LAYOUT.siderWidth;\nexport const SIDER_COLLAPSED_WIDTH = HISD3_LAYOUT.siderCollapsedWidth;\nexport const HEADER_HEIGHT = HISD3_LAYOUT.topBarHeight;\n\nexport const StyledRoot = styled(Layout)<{ $appShell?: boolean }>`\n position: relative; /* anchor for the edge collapse trigger */\n background: var(--ant-color-bg-layout);\n\n /*\n * App-shell mode: the shell is exactly one viewport tall and never scrolls,\n * so the document has no scrollbar and cannot rubber-band. The content\n * column (StyledMain) is the scroller instead.\n */\n ${({ $appShell }) =>\n $appShell\n ? `height: 100vh; max-height: 100vh; overflow: hidden;`\n : `min-height: 100vh;`}\n\n /*\n * The Sider is rendered as a plain antd <Sider> (not styled(Sider)) because\n * styled-components would swallow its \\`theme\\` prop; style it from here.\n */\n /* the whole sidebar is chrome: never select its text on drag */\n > .ant-layout-sider.hisd3-sider {\n user-select: none;\n -webkit-user-select: none;\n position: sticky;\n top: 0;\n height: ${({ $appShell }) => ($appShell ? \"100%\" : \"100vh\")};\n overflow: hidden;\n background: var(--ant-color-bg-layout);\n border-right: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n\n .ant-layout-sider-children {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n }\n`;\n\n/** Content column. In app-shell mode this is the element that scrolls. */\nexport const StyledMain = styled(Layout)<{ $scroll?: boolean }>`\n background: transparent;\n min-width: 0;\n\n ${({ $scroll }) =>\n $scroll\n ? `\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n /* keep scroll chaining (and its bounce) out of the document */\n overscroll-behavior: contain;\n `\n : \"\"}\n`;\n\nexport const StyledSiderMenuWrap = styled.div`\n flex: 1 1 auto;\n overflow-y: auto;\n overflow-x: hidden;\n overscroll-behavior: contain;\n padding-top: 4px;\n\n .ant-menu-inline,\n .ant-menu-vertical {\n border-inline-end: none !important;\n background: transparent;\n }\n\n /* Section titles: \"RECEIVABLES AND COLLECTIONS\" */\n .ant-menu-item-group-title {\n padding: 16px ${HISD3_LAYOUT.pageGutter}px 4px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary);\n }\n\n .ant-menu-item-group + .ant-menu-item-group > .ant-menu-item-group-title,\n .ant-menu-item-group + .ant-menu-item-group::before {\n border-top: var(--hisd3-rule-width, 1px) solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n margin-top: 10px;\n padding-top: 20px;\n }\n .ant-menu-item-group + .ant-menu-item-group::before {\n content: none;\n }\n\n .ant-menu-item,\n .ant-menu-submenu-title {\n font-size: 14px;\n font-weight: 500;\n position: relative;\n width: 100%;\n }\n\n .ant-menu-item .ant-menu-item-icon,\n .ant-menu-submenu-title .ant-menu-item-icon {\n font-size: 16px;\n }\n\n /* open parent (\"Billing\") in primary */\n .ant-menu-submenu-open > .ant-menu-submenu-title,\n .ant-menu-submenu-selected > .ant-menu-submenu-title {\n color: var(--ant-color-primary);\n font-weight: 700;\n }\n\n /* child items are indented by antd; keep them slightly smaller */\n .ant-menu-sub.ant-menu-inline > .ant-menu-item {\n font-size: 13.5px;\n }\n\n /* active item: tint + 4px accent bar */\n .ant-menu-item-selected {\n font-weight: 700;\n\n &::before {\n content: \"\";\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 4px;\n background: var(--ant-color-primary);\n }\n }\n\n &.hisd3-collapsed .ant-menu-item-group-title {\n display: none;\n }\n`;\n\nexport const StyledBrand = styled.a<{ $collapsed?: boolean }>`\n display: flex;\n align-items: center;\n gap: 10px;\n height: ${HEADER_HEIGHT}px;\n padding: 0 ${({ $collapsed }) => ($collapsed ? 12 : HISD3_LAYOUT.pageGutter)}px;\n justify-content: ${({ $collapsed }) => ($collapsed ? \"center\" : \"flex-start\")};\n color: inherit;\n text-decoration: none;\n overflow: hidden;\n white-space: nowrap;\n flex: 0 0 auto;\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n\n .hisd3-brand-mark {\n width: 28px;\n height: 28px;\n flex: 0 0 auto;\n background: var(--ant-color-primary);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n img {\n height: 28px;\n width: 28px;\n object-fit: contain;\n flex: 0 0 auto;\n }\n\n h1 {\n margin: 0;\n font-family: var(--font-heading);\n font-size: 16px;\n font-weight: var(--font-weight-heading, 800);\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--ant-color-text);\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`;\n\nexport const StyledHeader = styled(Header)`\n display: flex;\n align-items: center;\n gap: 24px;\n flex: 0 0 ${HEADER_HEIGHT}px;\n height: ${HEADER_HEIGHT}px;\n line-height: ${HEADER_HEIGHT}px;\n padding: 0 ${HISD3_LAYOUT.pageGutter}px;\n position: sticky;\n top: 0;\n z-index: 100;\n background: var(--ant-color-bg-layout);\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n\n .ant-menu-horizontal {\n flex: 1 1 auto;\n min-width: 0;\n border-bottom: none;\n background: transparent;\n line-height: ${HEADER_HEIGHT - 2}px;\n font-size: 14px;\n font-weight: 500;\n }\n`;\n\nexport const StyledSiderHeader = styled(Header)`\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 0 0 ${HEADER_HEIGHT}px;\n height: ${HEADER_HEIGHT}px;\n line-height: ${HEADER_HEIGHT}px;\n padding: 0 ${HISD3_LAYOUT.pageGutter}px;\n position: sticky;\n top: 0;\n z-index: 99;\n background: var(--ant-color-bg-layout);\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n`;\n\nexport const StyledCollapseTrigger = styled.button`\n border: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n background: transparent;\n cursor: pointer;\n font-size: 14px;\n width: 32px;\n height: 32px;\n color: inherit;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n\n &:hover {\n background: rgba(0, 0, 0, 0.05);\n }\n`;\n\n/**\n * Circular collapse trigger that straddles the sidebar's right edge.\n * `$top` is the distance from the top of the shell to its centre; it defaults\n * to the middle of the top bar so it lines up with the brand block.\n */\nexport const StyledEdgeTrigger = styled.button<{\n $left: number;\n $top: number;\n}>`\n user-select: none;\n -webkit-user-select: none;\n position: absolute;\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n transform: translate(-50%, -50%);\n z-index: 30;\n width: 28px;\n height: 28px;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n color: var(--hisd3-edge-trigger-color, #fff);\n background: var(--hisd3-edge-trigger-bg, var(--ant-color-primary));\n border: 2px solid var(--ant-color-bg-layout, #f3f2f0);\n border-radius: 50%;\n cursor: pointer;\n box-shadow: 0 1px 3px rgba(16, 15, 14, 0.12),\n 0 4px 12px rgba(16, 15, 14, 0.14);\n transition: left 0.2s ease, filter 0.15s ease;\n\n &:hover {\n filter: brightness(1.08);\n }\n\n &:active {\n filter: brightness(0.94);\n }\n\n &:focus-visible {\n outline: 2px solid var(--ant-color-primary);\n outline-offset: 2px;\n }\n\n & svg {\n display: block;\n }\n`;\n\nexport const StyledContent = styled(Content)`\n flex: 1 0 auto;\n padding: 24px ${HISD3_LAYOUT.pageGutter}px 40px;\n`;\n\n/* ---------- account card (sider footer / header) ---------- */\n\nexport const StyledCrUserInfo = styled.div<{\n $collapsed?: boolean;\n $inHeader?: boolean;\n}>`\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n justify-content: center;\n line-height: 1.25;\n transition: all 0.2s ease;\n padding: ${({ $inHeader, $collapsed }) =>\n $inHeader ? \"0 4px\" : $collapsed ? \"12px 0\" : `12px ${HISD3_LAYOUT.pageGutter}px`};\n min-width: ${({ $inHeader }) => ($inHeader ? \"220px\" : \"0\")};\n border-top: ${({ $inHeader }) =>\n $inHeader ? \"none\" : \"var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE))\"};\n\n & .ant-dropdown-link {\n color: inherit;\n }\n`;\n\nexport const StyledCrUserInfoInner = styled.a`\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: inherit;\n gap: 10px;\n`;\n\nexport const StyledCrUserInfoAvatar = styled.span<{ $src?: string }>`\n width: 34px;\n height: 34px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n font-weight: 700;\n color: var(--ant-color-text);\n background: ${({ $src }) =>\n $src ? `center / cover no-repeat url(\"${$src}\")` : \"#D9D6D2\"};\n`;\n\nexport const StyledCrUserInfoContent = styled.span`\n flex: 1 1 auto;\n min-width: 0;\n`;\n\nexport const StyledUsernameInfo = styled.span`\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n`;\n\nexport const StyledUsername = styled.h3`\n margin: 0;\n font-family: var(--font-body);\n font-size: 14px;\n font-weight: 700;\n letter-spacing: 0;\n color: var(--ant-color-text);\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n`;\n\nexport const StyledUserArrow = styled.span`\n width: 20px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n color: var(--ant-color-text);\n\n & svg {\n display: block;\n }\n`;\n\nexport const StyledCrUserDesignation = styled.span`\n display: block;\n margin-top: 3px;\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n","import type { MenuProps } from \"antd\";\nimport { createElement, type ReactNode } from \"react\";\n\nexport type AntdMenuItem = Required<MenuProps>[\"items\"][number];\n\n/**\n * Menu item shape accepted by HISD3Sidebar.\n *\n * This intentionally mirrors the `MenuDataItem` shape that the previous\n * ProLayout-based sidebar consumed (`path`, `name`, `icon`, `children`,\n * `hideInMenu`), so existing apps keep passing the same `menuItems`.\n */\nexport interface HISD3MenuItem {\n key?: string;\n path?: string;\n name?: ReactNode;\n icon?: ReactNode;\n children?: HISD3MenuItem[];\n hideInMenu?: boolean;\n disabled?: boolean;\n /** When true the item is rendered as a group title (like ProLayout's `flatMenu`). */\n group?: boolean;\n [key: string]: unknown;\n}\n\nexport const itemKey = (item: HISD3MenuItem, index: number): string =>\n item.key ?? item.path ?? `menu-${index}`;\n\n/** Convert HISD3MenuItem[] to antd `Menu` items, rendering leaf items as anchors. */\nexport const toAntdMenuItems = (\n items: HISD3MenuItem[] | undefined,\n renderLink: (item: HISD3MenuItem, label: ReactNode) => ReactNode,\n): AntdMenuItem[] =>\n (items ?? [])\n .filter((item) => item && !item.hideInMenu)\n .map((item, index): AntdMenuItem => {\n const key = itemKey(item, index);\n const hasChildren = Array.isArray(item.children) && item.children.length > 0;\n\n if (hasChildren) {\n return {\n key,\n icon: item.icon,\n label: item.name,\n disabled: item.disabled,\n type: item.group ? \"group\" : undefined,\n children: toAntdMenuItems(item.children, renderLink),\n } as AntdMenuItem;\n }\n\n return {\n key,\n icon: item.icon,\n disabled: item.disabled,\n label: renderLink(item, item.name),\n } as AntdMenuItem;\n });\n\n/**\n * Find the key of the item whose `path` best matches `pathname`\n * (longest prefix wins) together with the keys of all its ancestors,\n * so the correct submenu can be opened.\n */\nexport const findSelection = (\n items: HISD3MenuItem[] | undefined,\n pathname: string,\n): { selectedKey?: string; openKeys: string[] } => {\n let best: { key: string; parents: string[]; length: number } | undefined;\n\n const walk = (list: HISD3MenuItem[] | undefined, parents: string[]) => {\n (list ?? []).forEach((item, index) => {\n const key = itemKey(item, index);\n if (item.path && pathname.startsWith(item.path)) {\n const exact = pathname === item.path;\n const length = item.path.length + (exact ? 1 : 0);\n if (!best || length > best.length) {\n best = { key, parents, length };\n }\n }\n if (item.children?.length) {\n walk(item.children, [...parents, key]);\n }\n });\n };\n\n walk(items, []);\n return { selectedKey: best?.key, openKeys: best?.parents ?? [] };\n};\n\n/** Default anchor renderer used when no `renderMenuLink` is supplied. */\nexport const defaultRenderLink = (item: HISD3MenuItem, label: ReactNode) =>\n createElement(\"a\", { href: item.path || \"/\" }, label);\n","import {\n DownOutlined,\n ExclamationCircleOutlined,\n LogoutOutlined,\n SettingOutlined,\n} from \"@ant-design/icons\";\nimport { App, Dropdown, type MenuProps } from \"antd\";\nimport React from \"react\";\n\nimport type { IUserEmployee } from \"../../types/account\";\nimport {\n StyledCrUserDesignation,\n StyledCrUserInfo,\n StyledCrUserInfoAvatar,\n StyledCrUserInfoContent,\n StyledCrUserInfoInner,\n StyledUserArrow,\n StyledUsername,\n StyledUsernameInfo,\n} from \"./index.styled\";\n\nexport interface UserMenuProps {\n account: IUserEmployee;\n avatarSrc?: string;\n settingsUrl?: string;\n onLogout: () => Promise<void> | void;\n collapsed?: boolean;\n /** \"topRight\" for the sider footer, \"bottomRight\" for the top header. */\n placement?: \"topRight\" | \"bottomRight\";\n extraItems?: MenuProps[\"items\"];\n}\n\n/**\n * Account dropdown (Settings / Logout) shown in the sider footer or header.\n * Uses `App.useApp()` so the confirm modal picks up the surrounding\n * ConfigProvider theme — the static `Modal.confirm` cannot in antd v6.\n */\nexport const UserMenu: React.FC<UserMenuProps> = ({\n account,\n avatarSrc,\n settingsUrl,\n onLogout,\n collapsed = false,\n placement = \"topRight\",\n extraItems = [],\n}) => {\n const { modal } = App.useApp();\n\n const confirmLogout = () => {\n modal.confirm({\n title: \"Are you sure you want to logout?\",\n content: \"Please click OK to continue\",\n icon: <ExclamationCircleOutlined />,\n onOk: onLogout,\n });\n };\n\n const items: MenuProps[\"items\"] = [\n ...(extraItems ?? []),\n {\n key: \"settings\",\n icon: <SettingOutlined />,\n label: \"Settings\",\n onClick: () => {\n window.location.href = settingsUrl ?? \"/settings\";\n },\n },\n {\n key: \"logout\",\n icon: <LogoutOutlined />,\n label: \"Logout\",\n onClick: confirmLogout,\n },\n ];\n\n const initials =\n (account.fullName || \"\")\n .replace(/\\(.*?\\)/g, \" \")\n .split(/[\\s,]+/)\n .map((w) => w.replace(/[^\\p{L}\\p{N}]/gu, \"\"))\n .filter(Boolean)\n .slice(0, 2)\n .map((w) => w[0].toUpperCase())\n .join(\"\") || \"?\";\n\n return (\n <StyledCrUserInfo\n className=\"cr-user-info-light\"\n $collapsed={collapsed}\n $inHeader={placement === \"bottomRight\"}\n >\n <Dropdown trigger={[\"click\"]} placement={placement} menu={{ items }}>\n <StyledCrUserInfoInner\n className=\"ant-dropdown-link\"\n onClick={(e) => e.preventDefault()}\n >\n <StyledCrUserInfoAvatar $src={avatarSrc} aria-hidden>\n {!avatarSrc && initials}\n </StyledCrUserInfoAvatar>\n {!collapsed && (\n <StyledCrUserInfoContent>\n <StyledUsernameInfo>\n <StyledUsername title={account.fullName}>\n {account.fullName}\n </StyledUsername>\n <StyledUserArrow>\n <DownOutlined />\n </StyledUserArrow>\n </StyledUsernameInfo>\n {account.positionType && (\n <StyledCrUserDesignation title={account.positionType}>\n {account.positionType}\n </StyledCrUserDesignation>\n )}\n </StyledCrUserInfoContent>\n )}\n </StyledCrUserInfoInner>\n </Dropdown>\n </StyledCrUserInfo>\n );\n};\n\nexport default UserMenu;\n","import {\n LeftOutlined,\n MenuFoldOutlined,\n MenuUnfoldOutlined,\n RightOutlined,\n} from \"@ant-design/icons\";\nimport {\n App as AntdApp,\n ConfigProvider,\n Layout,\n Menu,\n Spin,\n type MenuProps,\n type ThemeConfig,\n} from \"antd\";\nimport React, { useEffect, useMemo, useState, type ReactNode } from \"react\";\nimport { ThemeProvider } from \"styled-components\";\n\nimport { hisd3AntdTheme } from \"../../theme/antd\";\nimport { useInsideHISD3Provider } from \"../Provider\";\nimport type { IUserEmployee } from \"../../types/account\";\nimport type { StyledTheme } from \"../../types/theme\";\nimport {\n HEADER_HEIGHT,\n SIDER_COLLAPSED_WIDTH,\n SIDER_WIDTH,\n StyledBrand,\n StyledCollapseTrigger,\n StyledContent,\n StyledEdgeTrigger,\n StyledHeader,\n StyledRoot,\n StyledMain,\n StyledSiderHeader,\n StyledSiderMenuWrap,\n} from \"./index.styled\";\nimport {\n defaultRenderLink,\n findSelection,\n toAntdMenuItems,\n type HISD3MenuItem,\n} from \"./menu\";\nimport { UserMenu } from \"./UserMenu\";\n\nconst { Sider } = Layout;\n\nexport interface HISD3SidebarProps {\n account: IUserEmployee;\n /** Logo image URL. When omitted a square block in the primary color is shown. */\n logoUrl?: string;\n appName: string;\n /** Same shape as before (ProLayout `MenuDataItem`): `{ path, name, icon, children }`. */\n menuItems: HISD3MenuItem[];\n onLogout: () => Promise<void> | void;\n /** Current location pathname, used to highlight the active menu item. */\n pathname: string;\n /** styled-components theme; optional when inside HISD3Provider. */\n styledTheme?: StyledTheme;\n collapsed?: boolean;\n /** Called when the user toggles the sider (controlled usage). */\n onCollapse?: (collapsed: boolean) => void;\n loading?: boolean;\n hideSidebar?: boolean;\n /** Render the navigation as a top header bar instead of a left sider. */\n layoutTop?: boolean;\n avatarSrc?: string;\n settingsUrl?: string;\n /**\n * Ant Design theme applied via a nested `ConfigProvider`.\n * Defaults to `hisd3AntdTheme` (red) when used standalone. Inside an\n * `HISD3Provider` nothing is applied so the provider's primary is inherited.\n * Pass `null` to force inheritance, or a ThemeConfig to override.\n */\n antdTheme?: ThemeConfig | null;\n /**\n * Custom link renderer, e.g. to use react-router's `<Link>`:\n * `(item, label) => <Link to={item.path!}>{label}</Link>`\n */\n renderMenuLink?: (item: HISD3MenuItem, label: ReactNode) => ReactNode;\n /** Extra content rendered in the header, right side (top layout) or sider header (side layout). */\n headerExtra?: ReactNode;\n /** Extra items prepended to the account dropdown. */\n userMenuItems?: MenuProps[\"items\"];\n /**\n * Where the collapse control lives:\n * \"edge\" (default) floats a round chevron on the sidebar's right edge, so it\n * works even when the top bar is hidden; \"header\" puts a square button in the\n * shell's own top bar; \"none\" renders neither (supply your own).\n */\n collapseTrigger?: \"edge\" | \"header\" | \"none\";\n /** @deprecated use `collapseTrigger=\"none\"`. */\n hideCollapseTrigger?: boolean;\n /**\n * Distance in px from the top of the shell to the centre of the edge\n * trigger. Defaults to the middle of the top bar, so it lines up with the\n * brand block; pass a larger number to move it down.\n */\n collapseTriggerOffset?: number;\n /** Width in px of the expanded sider. Default 220. */\n siderWidth?: number;\n /** Disable the built-in content padding wrapper and render children directly. */\n bareContent?: boolean;\n /**\n * Hide the sider layout's own top bar (collapse trigger + headerExtra).\n * Use together with `HISD3PageHeader`, which renders its own top bar.\n */\n hideHeaderBar?: boolean;\n /** Where the brand block links to. Default \"/\". */\n brandHref?: string;\n /**\n * App-shell scrolling (default). The shell fills exactly one viewport and\n * the content column scrolls inside it, so the page header stays pinned and\n * the document cannot rubber-band (\"bounce\") at the top or bottom.\n * Set to `false` to scroll the window instead, as in 4.1 and earlier.\n */\n scrollContent?: boolean;\n /**\n * Hide the account card in the sider footer / top nav — use when the account\n * lives in the header instead (`HISD3AvatarMenu`).\n */\n hideAccountCard?: boolean;\n children: React.ReactNode;\n}\n\nexport const HISD3Sidebar: React.FC<HISD3SidebarProps> = ({\n children,\n account,\n logoUrl,\n appName,\n menuItems,\n onLogout,\n pathname,\n avatarSrc,\n styledTheme,\n settingsUrl,\n antdTheme,\n renderMenuLink = defaultRenderLink,\n headerExtra,\n userMenuItems,\n onCollapse,\n collapsed = false,\n loading = false,\n hideSidebar = false,\n layoutTop = false,\n hideCollapseTrigger = false,\n collapseTrigger = \"edge\",\n collapseTriggerOffset = Math.round(HEADER_HEIGHT / 2),\n siderWidth = SIDER_WIDTH,\n bareContent = false,\n hideHeaderBar = false,\n brandHref = \"/\",\n hideAccountCard = false,\n scrollContent = true,\n}) => {\n const insideProvider = useInsideHISD3Provider();\n const resolvedTheme =\n antdTheme === undefined ? (insideProvider ? null : hisd3AntdTheme) : antdTheme;\n const [isCollapsed, setIsCollapsed] = useState(collapsed);\n\n useEffect(() => {\n setIsCollapsed(collapsed);\n }, [collapsed]);\n\n const items = useMemo(\n () => toAntdMenuItems(menuItems, renderMenuLink),\n [menuItems, renderMenuLink],\n );\n\n const selection = useMemo(\n () => findSelection(menuItems, pathname),\n [menuItems, pathname],\n );\n\n // Start with the active route's submenu open so there is no flash on first paint.\n const [openKeys, setOpenKeys] = useState<string[]>(() => selection.openKeys);\n\n // Open the submenu that contains the active route whenever the route changes.\n useEffect(() => {\n setOpenKeys((prev) =>\n Array.from(new Set([...prev, ...selection.openKeys])),\n );\n }, [selection.openKeys.join(\"|\")]);\n\n const toggleCollapse = (next: boolean) => {\n setIsCollapsed(next);\n onCollapse?.(next);\n };\n\n const selectedKeys = selection.selectedKey ? [selection.selectedKey] : [];\n\n const trigger = hideCollapseTrigger ? \"none\" : collapseTrigger;\n const collapseLabel = isCollapsed ? \"Expand menu\" : \"Collapse menu\";\n\n const brand = (\n <StyledBrand href={brandHref} $collapsed={!layoutTop && isCollapsed}>\n {logoUrl ? (\n <img src={logoUrl} alt={appName} />\n ) : (\n <span className=\"hisd3-brand-mark\" aria-hidden />\n )}\n {(layoutTop || !isCollapsed) && <h1>{appName}</h1>}\n </StyledBrand>\n );\n\n const content = bareContent ? (\n children\n ) : (\n <StyledContent>{children}</StyledContent>\n );\n\n const renderBody = () => {\n if (hideSidebar) {\n return <>{children}</>;\n }\n\n if (layoutTop) {\n return (\n <StyledRoot $appShell={scrollContent}>\n <StyledHeader>\n {brand}\n <Menu\n mode=\"horizontal\"\n items={items}\n selectedKeys={selectedKeys}\n />\n {headerExtra}\n {!hideAccountCard && (\n <UserMenu\n account={account}\n avatarSrc={avatarSrc}\n settingsUrl={settingsUrl}\n onLogout={onLogout}\n placement=\"bottomRight\"\n extraItems={userMenuItems}\n />\n )}\n </StyledHeader>\n <StyledMain $scroll={scrollContent}>{content}</StyledMain>\n </StyledRoot>\n );\n }\n\n return (\n <StyledRoot hasSider $appShell={scrollContent}>\n <Sider\n className=\"hisd3-sider\"\n width={siderWidth}\n collapsedWidth={SIDER_COLLAPSED_WIDTH}\n collapsible\n collapsed={isCollapsed}\n trigger={null}\n theme=\"light\"\n breakpoint=\"lg\"\n onBreakpoint={(broken) => {\n if (broken) toggleCollapse(true);\n }}\n >\n {brand}\n <StyledSiderMenuWrap className={isCollapsed ? \"hisd3-collapsed\" : undefined}>\n <Menu\n mode=\"inline\"\n theme=\"light\"\n inlineCollapsed={isCollapsed}\n items={items}\n selectedKeys={selectedKeys}\n openKeys={isCollapsed ? undefined : openKeys}\n onOpenChange={(keys) => setOpenKeys(keys as string[])}\n />\n </StyledSiderMenuWrap>\n {!hideAccountCard && (\n <UserMenu\n account={account}\n avatarSrc={avatarSrc}\n settingsUrl={settingsUrl}\n onLogout={onLogout}\n collapsed={isCollapsed}\n placement=\"topRight\"\n extraItems={userMenuItems}\n />\n )}\n </Sider>\n\n <StyledMain $scroll={scrollContent}>\n {!hideHeaderBar && (\n <StyledSiderHeader>\n {trigger === \"header\" && (\n <StyledCollapseTrigger\n type=\"button\"\n aria-label={collapseLabel}\n onClick={() => toggleCollapse(!isCollapsed)}\n >\n {isCollapsed ? <MenuUnfoldOutlined /> : <MenuFoldOutlined />}\n </StyledCollapseTrigger>\n )}\n <span style={{ flex: 1 }} />\n {headerExtra}\n </StyledSiderHeader>\n )}\n {content}\n </StyledMain>\n\n {trigger === \"edge\" && (\n <StyledEdgeTrigger\n type=\"button\"\n aria-label={collapseLabel}\n title={collapseLabel}\n $left={isCollapsed ? SIDER_COLLAPSED_WIDTH : siderWidth}\n $top={collapseTriggerOffset}\n onClick={() => toggleCollapse(!isCollapsed)}\n >\n {isCollapsed ? <RightOutlined /> : <LeftOutlined />}\n </StyledEdgeTrigger>\n )}\n </StyledRoot>\n );\n };\n\n if (typeof document === \"undefined\") {\n return null;\n }\n\n const body = (\n <AntdApp component={false}>\n <Spin spinning={loading} size=\"large\">\n {renderBody()}\n </Spin>\n </AntdApp>\n );\n\n if (insideProvider && !styledTheme) {\n return resolvedTheme ? (\n <ConfigProvider theme={resolvedTheme}>{body}</ConfigProvider>\n ) : (\n body\n );\n }\n\n return (\n <ThemeProvider theme={styledTheme ?? {}}>\n {resolvedTheme ? (\n <ConfigProvider theme={resolvedTheme}>{body}</ConfigProvider>\n ) : (\n body\n )}\n </ThemeProvider>\n );\n};\n\nexport default HISD3Sidebar;\n","import { Breadcrumb } from \"antd\";\nimport React from \"react\";\nimport styled from \"styled-components\";\n\nimport { HISD3_LAYOUT } from \"../../theme/layout\";\n\nexport interface HISD3BreadcrumbItem {\n title: React.ReactNode;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface HISD3PageHeaderProps {\n title: React.ReactNode;\n subtitle?: React.ReactNode;\n breadcrumb?: HISD3BreadcrumbItem[];\n /** Action buttons rendered on the right of the top bar. */\n extra?: React.ReactNode;\n /** Content rendered to the left of the breadcrumb (e.g. the sidebar collapse trigger). */\n leading?: React.ReactNode;\n /** Hide the top bar entirely and render only the title block. */\n hideTopBar?: boolean;\n className?: string;\n}\n\nexport const PAGE_GUTTER = HISD3_LAYOUT.pageGutter;\n\n/*\n * `display: contents` so TopBar and TitleBlock become direct children of the\n * scrolling column — a sticky child cannot outlive its own wrapper's box, so\n * without this the bar scrolls away with the header element.\n */\nconst HeaderWrap = styled.header`\n display: contents;\n`;\n\nconst TopBar = styled.div`\n user-select: none;\n -webkit-user-select: none;\n display: flex;\n align-items: center;\n gap: 16px;\n height: ${HISD3_LAYOUT.topBarHeight}px; /* same as the sidebar brand block */\n /* never shrink: these are flex items of the scrolling column */\n flex: 0 0 ${HISD3_LAYOUT.topBarHeight}px;\n padding: 0 ${PAGE_GUTTER}px;\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n background: var(--ant-color-bg-layout);\n position: sticky;\n top: 0;\n z-index: 20;\n\n .ant-breadcrumb {\n font-size: 14px;\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .ant-breadcrumb ol {\n flex-wrap: nowrap;\n }\n`;\n\nconst Actions = styled.div`\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 0 0 auto;\n`;\n\nconst TitleBlock = styled.div`\n display: flex;\n align-items: baseline;\n gap: 16px;\n flex-wrap: wrap;\n flex: 0 0 auto;\n padding: 20px ${PAGE_GUTTER}px 18px;\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n\n h1 {\n margin: 0;\n font-family: var(--font-heading);\n font-size: 32px;\n line-height: 1.1;\n font-weight: var(--font-weight-heading, 800);\n letter-spacing: -0.02em;\n color: var(--ant-color-text);\n }\n\n p {\n margin: 0;\n font-size: 15px;\n color: var(--ant-color-text-secondary);\n }\n`;\n\n/** Padded body area that lines up with the header gutters. */\nexport const HISD3PageBody = styled.div`\n flex: 1 0 auto;\n padding: 24px ${PAGE_GUTTER}px 40px;\n`;\n\n/**\n * Sticky top bar (breadcrumb + actions) followed by a big page title block.\n * Designed to sit directly inside `HISD3Sidebar` with `bareContent` and\n * `hideHeaderBar`.\n */\nexport const HISD3PageHeader: React.FC<HISD3PageHeaderProps> = ({\n title,\n subtitle,\n breadcrumb,\n extra,\n leading,\n hideTopBar = false,\n className,\n}) => (\n <HeaderWrap className={className}>\n {!hideTopBar && (\n <TopBar>\n {leading}\n {breadcrumb && breadcrumb.length > 0 && (\n <Breadcrumb\n items={breadcrumb.map((b) => ({\n title: b.href ? <a href={b.href}>{b.title}</a> : b.title,\n onClick: b.onClick,\n }))}\n />\n )}\n {!breadcrumb?.length && <span style={{ flex: 1 }} />}\n {extra && <Actions>{extra}</Actions>}\n </TopBar>\n )}\n <TitleBlock>\n <h1>{title}</h1>\n {subtitle && <p>{subtitle}</p>}\n </TitleBlock>\n </HeaderWrap>\n);\n\nexport default HISD3PageHeader;\n","/**\n * The HISD3 mark, embedded so it always resolves — no asset pipeline needed.\n *\n * This is the organisation's logo and is used as the fixed watermark on\n * `HISD3LoginPage`'s panel. Individual apps override only the card logo\n * (`logoSrc`), never this one.\n */\nexport const HISD3_LOGO_SRC =\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAACiCAYAAAAX4MJWAAAgnklEQVR42u1db2xb13U/9z7ZTmyKT6TFTFY7xImBQt2AuEDTQZBhuar2x0kwI1YsOShqkZJabBmg0KmXJd8ofikSpF7N6EP2YbJFOwNsyZGzALHcDYJreRGELdvqAluEYkmVdpU1Uyb5KMZ1bPPefXjvUo80KfHddx/fI/UOYMR2rMfH987vnN859/xB4Aq/RCIYpdvRDtLuzY76UsX/2zOc8gEAeLFyCAAOsL9HgPqNfAwFelb77bUMkT8AACj3eV/g+Uy5+3HlYUHuIzAolCKYBOy5ni5QsmJlN6rkXLeiAqM0KDRw0lMHCSBE3RfnAsDcgwpPS8WW1TOc8lVT4Y0AQn+fpe7dFRcAlagU8gynm7KjTWkA1Yo6TemNggEmqAR9QNj3cQHgSknFhwnA0IdyRdb+pJOVfiMwLJ16/GyeDrlAcAFQSjzDKR+zmMzaI0BjdQNtoEMFXmGTA8EFgI4n09hBAoAoCk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AAHrqIAFk72qtutzqwuYF3Sbz/nur/mVwxRIAk9vLZ1vfmwud7+2TXpycyNXi96jbtUZElhFWFJoItgVcEFigOAjOtb43F0oE2wJmmmPslrrd6MKUPxBfSGxtTLa4Kite+clASKr10fV1vdJIPxnCBYEY2qNXfpi6REQPw3IpkBV0aCAk4TPjOTN0CCE4x4ZsGe0tdorVNnv/9ab8mwYAAACMDvGAoDjVR2QZLXf/YX8tAAEhOLfFk3xVz9MTwbbA/az/LUorHxVTj8q/qQDA4wn0yhMBwBFZplf37pW6Z2cf5BXJ4Bh2uxSfDISkq59+hrpu3Mgx5a10Uka9Kv+mA4AREOitPssolboO+/NST0cQEHQZsarVUPxEsC0wc+eppD5NSWQZMSBv5A3qWfk3JQCK6dD9rP8t/WmxXoGILKPbz+9qLpfmY+cNesVgXqGaYGD8fktj8rLe4k9k78B6+Xk9iEt5g3pX/k0LAD0IIgD4L3o68orKrP5MZ2cDozqVyPnePqnPsx30XsFqisQ2s+gBOtPZ2fDUE7d8lebmGYiZV7y/6n9W/yzqWfk3NQDKURs9OHivycaFr2ddzQqbzhYBwJ2dnTi/jYVTUYspndnn4AKghkDAaAyzhKKuPdPZ2dC150lqRUnGwkrDNrNKX+pZXN27V+q6cSMn+lm4ANjEHkZ0OQbj5rVcg+MUwe4jsPDhKgqlFJBVNCK/BccVFwBOFdokr2VqhF1UPdG9unev5D5hFwA1ggRju8rWE7ac4qknbvncB+sCwNmiZYSM7ipbT3bi9iSAupbUfcAuAJwtU5eE8nSE4Bw+M54739sn1Wtu3gVAnQXCRJaFBML6wbluAOwCoGaEBatmNyvmVpbpFk/yVfeJugCoKemenX0QAcCtU3NxMyBAAIOshsmlP2Lk/wGgJmAjjF1q8QAAAABJRU5ErkJggg==\";\n","import { Button, type ButtonProps } from \"antd\";\nimport React from \"react\";\nimport styled from \"styled-components\";\n\nexport type HISD3ButtonVariant = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\n\nexport interface HISD3ButtonProps extends Omit<ButtonProps, \"variant\" | \"color\" | \"type\"> {\n /**\n * primary → filled with the theme primary (e.g. \"New folio\")\n * secondary → outlined, dark 2px border (e.g. \"Refresh\", \"Export\")\n * ghost → text only\n * danger → filled red\n */\n variant?: HISD3ButtonVariant;\n}\n\nconst StyledButton = styled(Button)`\n &.ant-btn {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 40px;\n padding-inline: 16px;\n font-size: 14px;\n font-weight: 600;\n box-shadow: none;\n }\n\n &.ant-btn-sm {\n height: 32px;\n padding-inline: 12px;\n font-size: 13px;\n gap: 6px;\n }\n\n &.ant-btn-lg {\n height: 52px;\n padding-inline: 20px;\n font-size: 16px;\n }\n\n &.ant-btn-default {\n border-width: var(--hisd3-rule-width, 1px);\n }\n\n .anticon {\n font-size: 1.05em;\n }\n`;\n\nconst map: Record<HISD3ButtonVariant, Pick<ButtonProps, \"type\" | \"danger\">> = {\n primary: { type: \"primary\" },\n secondary: { type: \"default\" },\n ghost: { type: \"text\" },\n danger: { type: \"primary\", danger: true },\n};\n\nexport const HISD3Button: React.FC<HISD3ButtonProps> = ({\n variant = \"secondary\",\n ...rest\n}) => <StyledButton {...map[variant]} {...rest} />;\n\nexport default HISD3Button;\n","import styled, { css } from \"styled-components\";\n\nexport type LoginVariant = \"soft\" | \"square\";\n/** Which side of the screen the form card sits on. */\nexport type LoginSide = \"left\" | \"right\";\n\nconst soft = (v: LoginVariant) => v === \"soft\";\n\n/** Below this the brand panel is dropped and the card centres. */\nexport const SPLIT_BREAKPOINT = 1024;\nexport const MOBILE_BREAKPOINT = 560;\n\nexport const StyledPage = styled.div<{ $side: LoginSide }>`\n position: relative;\n min-height: 100vh;\n min-height: 100dvh; /* keeps mobile browser chrome from clipping the card */\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: ${({ $side }) =>\n $side === \"right\" ? \"flex-end\" : \"flex-start\"};\n overflow-x: hidden;\n background: #fff;\n\n @media (max-width: ${SPLIT_BREAKPOINT}px) {\n justify-content: center;\n padding: 32px 24px;\n background: linear-gradient(\n 180deg,\n var(--ant-color-primary-bg, #FCEEEB) 0%,\n #fff 46%\n );\n }\n\n /*\n * Phone: a branded hero at the top with a white sheet rising over it,\n * rather than a floating card. Set as a block so the two simply stack.\n */\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n padding: 0;\n background: var(--ant-color-primary, #E5533B);\n }\n`;\n\n/** Brand panel. Its colour follows the app's primary. */\nexport const StyledPanel = styled.aside<{\n $variant: LoginVariant;\n $side: LoginSide;\n}>`\n position: absolute;\n /* the panel takes the side the card does not */\n inset: ${({ $variant, $side }) => {\n const gap = soft($variant) ? \"28px\" : \"0\";\n return $side === \"right\"\n ? `${gap} 40% ${gap} ${gap}`\n : `${gap} ${gap} ${gap} 40%`;\n }};\n border-radius: ${({ $variant }) => (soft($variant) ? \"28px\" : \"0\")};\n background: var(--ant-color-primary, #E5533B);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: ${({ $side }) =>\n $side === \"right\" ? \"0 12% 0 8%\" : \"0 6% 0 12%\"};\n color: #fff;\n user-select: none;\n\n h2 {\n position: relative;\n margin: 0;\n font-family: var(--font-heading);\n font-size: clamp(26px, 3.1vw, 44px);\n line-height: 1.15;\n font-weight: ${({ $variant }) =>\n soft($variant) ? 700 : \"var(--font-weight-heading, 800)\"};\n letter-spacing: -0.01em;\n max-width: 12em;\n color: #fff;\n }\n\n p {\n position: relative;\n margin: 16px 0 0;\n font-size: 15px;\n opacity: 0.82;\n }\n\n @media (max-width: ${SPLIT_BREAKPOINT}px) {\n display: none;\n }\n\n /* phone: full-width hero above the sheet */\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n display: flex;\n /* relative, not static: keeps the pattern layer inside the hero */\n position: relative;\n inset: auto;\n flex: 0 0 auto;\n border-radius: 0;\n min-height: 32vh;\n padding: 30px 22px 46px;\n justify-content: flex-end;\n\n h2 {\n font-size: 27px;\n max-width: none;\n }\n\n p {\n margin-top: 10px;\n font-size: 14px;\n }\n }\n`;\n\n/** Logo + module name shown inside the hero on phones. */\nexport const StyledPanelBrand = styled.div`\n display: none;\n\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n position: relative;\n display: flex;\n align-items: center;\n gap: 10px;\n margin-bottom: 26px;\n\n img {\n width: 38px;\n height: 38px;\n object-fit: contain;\n flex: 0 0 auto;\n background: #fff;\n border-radius: 10px;\n padding: 4px;\n }\n\n .hisd3-hero-name {\n display: block;\n font-family: var(--font-heading);\n font-size: 17px;\n font-weight: 700;\n line-height: 1.1;\n color: #fff;\n }\n\n .hisd3-hero-tagline {\n display: block;\n margin-top: 2px;\n font-size: 9px;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n opacity: 0.75;\n }\n }\n`;\n\n/** Photo layer, when `panelImage` is supplied. */\nexport const StyledPanelImage = styled.div<{ $src: string }>`\n position: absolute;\n inset: 0;\n background: center / cover no-repeat url(\"${({ $src }) => $src}\");\n mix-blend-mode: multiply;\n opacity: 0.35;\n`;\n\n/** Default decoration when no photo is given. */\nexport const StyledPanelPattern = styled.div`\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 52%;\n opacity: 0.16;\n background: repeating-linear-gradient(\n 90deg,\n #fff 0 26px,\n transparent 26px 34px,\n #fff 34px 44px,\n transparent 44px 58px,\n #fff 58px 96px,\n transparent 96px 108px,\n #fff 108px 130px,\n transparent 130px 150px\n );\n mask-image: linear-gradient(\n to top,\n #000 0 30%,\n rgba(0, 0, 0, 0.7) 55%,\n transparent 100%\n );\n clip-path: polygon(\n 0 62%, 6% 62%, 6% 40%, 13% 40%, 13% 55%, 21% 55%, 21% 22%, 28% 22%,\n 28% 48%, 36% 48%, 36% 33%, 44% 33%, 44% 58%, 52% 58%, 52% 14%, 60% 14%,\n 60% 44%, 68% 44%, 68% 30%, 77% 30%, 77% 52%, 86% 52%, 86% 26%, 94% 26%,\n 94% 47%, 100% 47%, 100% 100%, 0 100%\n );\n`;\n\n/** Fixed HISD3 watermark — the organisation mark, not the per-app logo. */\nexport const StyledWatermark = styled.div<{ $side: LoginSide }>`\n position: absolute;\n top: 30px;\n ${({ $side }) => ($side === \"right\" ? \"left: 40px;\" : \"right: 40px;\")}\n display: flex;\n align-items: center;\n gap: 10px;\n opacity: 0.28;\n font-family: var(--font-heading);\n font-size: 24px;\n font-weight: var(--font-weight-heading, 800);\n letter-spacing: 0.02em;\n color: #fff;\n\n img {\n width: 38px;\n height: 38px;\n object-fit: contain;\n filter: brightness(0) invert(1);\n }\n\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n display: none;\n }\n`;\n\nexport const StyledCorner = styled.div<{\n $variant: LoginVariant;\n $side: LoginSide;\n}>`\n position: absolute;\n ${({ $side }) => ($side === \"right\" ? \"right: -70px;\" : \"left: -70px;\")}\n bottom: 40px;\n width: 190px;\n height: 190px;\n opacity: 0.5;\n pointer-events: none;\n border-radius: ${({ $variant }) => (soft($variant) ? \"20px\" : \"0\")};\n background: ${[\"0 0\", \"100% 0\", \"0 100%\", \"100% 100%\"]\n .map(\n (pos) =>\n `linear-gradient(var(--ant-color-primary-bg, #FCEEEB), var(--ant-color-primary-bg, #FCEEEB)) ${pos} / 46% 46% no-repeat`,\n )\n .join(\", \")};\n\n @media (max-width: ${SPLIT_BREAKPOINT}px) {\n display: none;\n }\n`;\n\nexport const StyledCard = styled.form<{\n $variant: LoginVariant;\n $side: LoginSide;\n}>`\n position: relative;\n z-index: 2;\n margin: 40px ${({ $side }) => ($side === \"right\" ? \"7% 40px 0\" : \"0 40px 7%\")};\n width: min(430px, calc(100% - 48px));\n padding: 40px 44px 34px;\n background: #fff;\n\n ${({ $variant }) =>\n soft($variant)\n ? css`\n border-radius: 18px;\n box-shadow: 0 4px 10px rgba(16, 15, 14, 0.05),\n 0 24px 60px rgba(16, 15, 14, 0.14);\n `\n : css`\n border-radius: 0;\n border: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n box-shadow: 0 2px 4px rgba(16, 15, 14, 0.04),\n 0 18px 44px rgba(16, 15, 14, 0.1);\n `}\n\n /* tablet and below: no panel, so centre the card */\n @media (max-width: ${SPLIT_BREAKPOINT}px) {\n margin: 0;\n width: min(440px, 100%);\n }\n\n /* phone: a sheet that rises over the hero and runs to the bottom */\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n width: 100%;\n /* grow to fill whatever the hero leaves, so white runs to the bottom */\n flex: 1 0 auto;\n margin: -28px 0 0;\n padding: 30px 22px 34px;\n box-shadow: none;\n border: 0;\n border-radius: ${({ $variant }) =>\n soft($variant) ? \"28px 28px 0 0\" : \"20px 20px 0 0\"};\n }\n`;\n\nexport const StyledBrand = styled.div<{ $variant: LoginVariant }>`\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 28px;\n\n .hisd3-login-logo {\n width: 54px;\n height: 54px;\n flex: 0 0 auto;\n object-fit: contain;\n display: block;\n }\n\n .hisd3-login-name {\n display: block;\n font-family: var(--font-heading);\n font-size: 25px;\n line-height: 1.05;\n font-weight: ${({ $variant }) =>\n soft($variant) ? 700 : \"var(--font-weight-heading, 800)\"};\n letter-spacing: ${({ $variant }) =>\n soft($variant) ? \"-0.01em\" : \"0.03em\"};\n text-transform: ${({ $variant }) =>\n soft($variant) ? \"none\" : \"uppercase\"};\n color: var(--ant-color-text, #171717);\n }\n\n .hisd3-login-tagline {\n display: block;\n margin-top: 4px;\n font-size: 9px;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary, #6E6E6E);\n }\n\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n display: none;\n }\n`;\n\nexport const StyledTitle = styled.h1<{ $variant: LoginVariant }>`\n margin: 0 0 6px;\n font-family: var(--font-heading);\n font-size: 26px;\n font-weight: ${({ $variant }) =>\n soft($variant) ? 700 : \"var(--font-weight-heading, 800)\"};\n color: var(--ant-color-text, #171717);\n\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n font-size: 22px;\n }\n`;\n\nexport const StyledSubtitle = styled.p`\n margin: 0 0 22px;\n font-size: 14px;\n color: var(--ant-color-text-secondary, #4A4A4A);\n`;\n\nexport const StyledField = styled.label<{ $variant: LoginVariant }>`\n display: block;\n margin-bottom: 16px;\n\n .hisd3-field-label {\n display: block;\n margin-bottom: 7px;\n font-size: 13px;\n font-weight: 600;\n color: var(--ant-color-text-secondary, #4A4A4A);\n }\n\n .hisd3-field-control {\n position: relative;\n display: flex;\n align-items: center;\n }\n\n input {\n width: 100%;\n height: 48px;\n padding: 0 44px 0 16px;\n font: inherit;\n font-size: 15px;\n color: var(--ant-color-text, #171717);\n background: ${({ $variant }) =>\n soft($variant) ? \"#F2F3F5\" : \"var(--hisd3-control-bg, #e6e4e1)\"};\n border: ${({ $variant }) =>\n soft($variant) ? \"1px\" : \"var(--hisd3-rule-width, 1px)\"}\n solid transparent;\n border-radius: ${({ $variant }) => (soft($variant) ? \"10px\" : \"0\")};\n outline: none;\n transition: border-color 0.15s ease, background 0.15s ease;\n\n &::placeholder {\n color: var(--ant-color-text-tertiary, #6E6E6E);\n }\n\n &:focus {\n background: #fff;\n border-color: var(--ant-color-primary, #E5533B);\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n }\n\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n margin-bottom: 14px;\n\n input {\n height: 46px;\n /* 16px keeps iOS Safari from zooming in on focus */\n font-size: 16px;\n }\n }\n\n button.hisd3-field-reveal {\n position: absolute;\n right: 12px;\n display: flex;\n padding: 6px;\n border: 0;\n background: none;\n color: var(--ant-color-text-tertiary, #6E6E6E);\n cursor: pointer;\n\n &:hover {\n color: var(--ant-color-text, #171717);\n }\n }\n`;\n\nexport const StyledRow = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n margin: 18px 0 24px;\n font-size: 14px;\n\n .hisd3-remember {\n display: flex;\n align-items: center;\n gap: 10px;\n color: var(--ant-color-text, #171717);\n cursor: pointer;\n user-select: none;\n }\n\n button.hisd3-forgot {\n padding: 0;\n border: 0;\n background: none;\n font: inherit;\n font-weight: 500;\n color: var(--ant-color-primary, #E5533B);\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n }\n`;\n\nexport const StyledError = styled.div`\n margin-bottom: 16px;\n padding: 10px 14px;\n font-size: 13px;\n color: var(--ant-color-error, #e5401c);\n background: rgba(229, 64, 28, 0.08);\n border-left: 3px solid var(--ant-color-error, #e5401c);\n`;\n\nexport const StyledFoot = styled.p`\n margin: 20px 0 0;\n text-align: center;\n font-size: 14px;\n color: var(--ant-color-text-secondary, #4A4A4A);\n`;\n","import { EyeInvisibleOutlined, EyeOutlined } from \"@ant-design/icons\";\nimport { Switch } from \"antd\";\nimport React, { useState, type FormEvent, type ReactNode } from \"react\";\n\nimport { HISD3_LOGO_SRC } from \"../../assets/logo\";\nimport { HISD3Button } from \"../Button\";\nimport {\n StyledBrand,\n StyledCard,\n StyledCorner,\n StyledError,\n StyledField,\n StyledFoot,\n StyledPage,\n StyledPanel,\n StyledPanelBrand,\n StyledPanelImage,\n StyledPanelPattern,\n StyledRow,\n StyledSubtitle,\n StyledTitle,\n StyledWatermark,\n type LoginSide,\n type LoginVariant,\n} from \"./index.styled\";\n\nexport interface HISD3LoginValues {\n identifier: string;\n password: string;\n remember: boolean;\n}\n\nexport interface HISD3LoginPageProps {\n /**\n * Name shown beside the logo on the card — normally the module, e.g.\n * \"Backoffice\", \"Pharmacy\", \"Cashiering\".\n */\n appName: ReactNode;\n /** Small uppercase line under the name, e.g. \"Hospital Information System\". */\n tagline?: ReactNode;\n /** Card logo. Defaults to the HISD3 mark; pass a module logo to override. */\n logoSrc?: string;\n /** Heading above the form. */\n title?: ReactNode;\n subtitle?: ReactNode;\n\n /**\n * Headline on the brand panel. Defaults to a hospital-system line; pass your\n * own to say something specific to the module or the hospital.\n */\n panelTitle?: ReactNode;\n /** Supporting line under the panel headline. Pass `null` to omit it. */\n panelSubtitle?: ReactNode;\n /** Photo behind the panel. Without one, a subtle pattern is drawn. */\n panelImage?: string;\n /**\n * Text beside the fixed HISD3 watermark. The watermark's mark itself is the\n * organisation logo and is deliberately not overridable.\n */\n organisationName?: ReactNode;\n\n /** \"soft\" (rounded, default) or \"square\" to match the Backoffice shell. */\n variant?: LoginVariant;\n /**\n * Which side the form card sits on — the brand panel takes the other.\n * Default \"right\". Below 1024px the panel is dropped and the card centres.\n */\n side?: LoginSide;\n\n identifierLabel?: ReactNode;\n identifierPlaceholder?: string;\n passwordLabel?: ReactNode;\n passwordPlaceholder?: string;\n submitLabel?: ReactNode;\n\n /** Hide the Remember me switch. */\n hideRemember?: boolean;\n rememberLabel?: ReactNode;\n /** Omit to hide the Forgot password link. */\n onForgotPassword?: () => void;\n forgotLabel?: ReactNode;\n\n /** Error message shown above the fields. */\n error?: ReactNode;\n /** Disables the form and shows the button spinner. */\n loading?: boolean;\n\n onSubmit: (values: HISD3LoginValues) => void | Promise<void>;\n\n /** Content under the button, e.g. a \"contact your administrator\" line. */\n footer?: ReactNode;\n className?: string;\n}\n\n/**\n * Split-screen sign-in page: a brand panel in the app's primary colour and a\n * floating card carrying the form.\n *\n * Per-app: `appName`, `tagline`, `logoSrc`, the copy, and the primary colour\n * (from `HISD3Provider`). Fixed: the HISD3 watermark on the panel, so every\n * module still reads as part of the same system.\n */\nexport const HISD3LoginPage: React.FC<HISD3LoginPageProps> = ({\n appName,\n tagline,\n logoSrc = HISD3_LOGO_SRC,\n title = \"Nice to see you again\",\n subtitle,\n panelTitle = \"One system for every part of your hospital.\",\n panelSubtitle = \"Patient care, billing and operations — connected.\",\n panelImage,\n organisationName = \"HISD3\",\n variant = \"soft\",\n side = \"right\",\n identifierLabel = \"User ID or email\",\n identifierPlaceholder = \"Email or user ID\",\n passwordLabel = \"Password\",\n passwordPlaceholder = \"Enter password\",\n submitLabel = \"Sign in\",\n hideRemember = false,\n rememberLabel = \"Remember me\",\n onForgotPassword,\n forgotLabel = \"Forgot password?\",\n error,\n loading = false,\n onSubmit,\n footer,\n className,\n}) => {\n const [identifier, setIdentifier] = useState(\"\");\n const [password, setPassword] = useState(\"\");\n const [remember, setRemember] = useState(false);\n const [reveal, setReveal] = useState(false);\n\n const handleSubmit = (e: FormEvent) => {\n e.preventDefault();\n if (loading) return;\n void onSubmit({ identifier, password, remember });\n };\n\n return (\n <StyledPage className={className} $side={side}>\n <StyledCorner $variant={variant} $side={side} aria-hidden />\n\n <StyledPanel $variant={variant} $side={side}>\n {panelImage ? (\n <StyledPanelImage $src={panelImage} aria-hidden />\n ) : (\n <StyledPanelPattern aria-hidden />\n )}\n <StyledWatermark $side={side} aria-hidden>\n <img src={HISD3_LOGO_SRC} alt=\"\" />\n {organisationName}\n </StyledWatermark>\n <StyledPanelBrand>\n {logoSrc && <img src={logoSrc} alt=\"\" />}\n <span>\n <span className=\"hisd3-hero-name\">{appName}</span>\n {tagline && <span className=\"hisd3-hero-tagline\">{tagline}</span>}\n </span>\n </StyledPanelBrand>\n <h2>{panelTitle}</h2>\n {panelSubtitle && <p>{panelSubtitle}</p>}\n </StyledPanel>\n\n <StyledCard\n $variant={variant}\n $side={side}\n onSubmit={handleSubmit}\n noValidate\n >\n <StyledBrand $variant={variant}>\n {logoSrc && (\n <img className=\"hisd3-login-logo\" src={logoSrc} alt=\"\" />\n )}\n <span>\n <span className=\"hisd3-login-name\">{appName}</span>\n {tagline && (\n <span className=\"hisd3-login-tagline\">{tagline}</span>\n )}\n </span>\n </StyledBrand>\n\n <StyledTitle $variant={variant}>{title}</StyledTitle>\n {subtitle && <StyledSubtitle>{subtitle}</StyledSubtitle>}\n\n {error && <StyledError role=\"alert\">{error}</StyledError>}\n\n <StyledField $variant={variant}>\n <span className=\"hisd3-field-label\">{identifierLabel}</span>\n <span className=\"hisd3-field-control\">\n <input\n value={identifier}\n onChange={(e) => setIdentifier(e.target.value)}\n placeholder={identifierPlaceholder}\n autoComplete=\"username\"\n disabled={loading}\n autoFocus\n />\n </span>\n </StyledField>\n\n <StyledField $variant={variant}>\n <span className=\"hisd3-field-label\">{passwordLabel}</span>\n <span className=\"hisd3-field-control\">\n <input\n type={reveal ? \"text\" : \"password\"}\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n placeholder={passwordPlaceholder}\n autoComplete=\"current-password\"\n disabled={loading}\n />\n <button\n type=\"button\"\n className=\"hisd3-field-reveal\"\n aria-label={reveal ? \"Hide password\" : \"Show password\"}\n onClick={() => setReveal((v) => !v)}\n tabIndex={-1}\n >\n {reveal ? <EyeInvisibleOutlined /> : <EyeOutlined />}\n </button>\n </span>\n </StyledField>\n\n {(!hideRemember || onForgotPassword) && (\n <StyledRow>\n {!hideRemember ? (\n <label className=\"hisd3-remember\">\n <Switch\n size=\"small\"\n checked={remember}\n onChange={setRemember}\n disabled={loading}\n />\n {rememberLabel}\n </label>\n ) : (\n <span />\n )}\n {onForgotPassword && (\n <button\n type=\"button\"\n className=\"hisd3-forgot\"\n onClick={onForgotPassword}\n >\n {forgotLabel}\n </button>\n )}\n </StyledRow>\n )}\n\n <HISD3Button\n variant=\"primary\"\n htmlType=\"submit\"\n size=\"large\"\n loading={loading}\n block\n style={{ borderRadius: variant === \"soft\" ? 10 : 0, height: 50 }}\n >\n {submitLabel}\n </HISD3Button>\n\n {footer && <StyledFoot>{footer}</StyledFoot>}\n </StyledCard>\n </StyledPage>\n );\n};\n\nexport default HISD3LoginPage;\n","import { BellFilled } from \"@ant-design/icons\";\nimport { Dropdown, Empty, Spin } from \"antd\";\nimport React, { useState } from \"react\";\nimport styled from \"styled-components\";\n\nexport interface HISD3Notification {\n id: string;\n title: React.ReactNode;\n /** Secondary line, e.g. \"Folio 19370 was posted\". */\n description?: React.ReactNode;\n /** Right-aligned relative time, e.g. \"2h\". */\n time?: React.ReactNode;\n /** Unread items get a tinted row and a dot. */\n unread?: boolean;\n /** Leading avatar image; falls back to `icon`. */\n avatarSrc?: string;\n icon?: React.ReactNode;\n onClick?: (notification: HISD3Notification) => void;\n}\n\nexport interface HISD3NotificationButtonProps {\n items?: HISD3Notification[];\n /** Diameter of the circular button in px. Default 40. */\n size?: number;\n /** Badge count. Defaults to the number of unread items. */\n count?: number;\n loading?: boolean;\n title?: React.ReactNode;\n /** Shown as a link in the panel header when there are unread items. */\n onMarkAllRead?: () => void;\n /** Renders a footer row, e.g. \"See all notifications\". */\n onSeeAll?: () => void;\n seeAllLabel?: React.ReactNode;\n emptyText?: React.ReactNode;\n onOpenChange?: (open: boolean) => void;\n /** Replace the bell glyph. Defaults to a solid bell. */\n icon?: React.ReactNode;\n className?: string;\n}\n\nexport const HeaderIconButton = styled.button<{ $size?: number; $open?: boolean }>`\n user-select: none;\n -webkit-user-select: none;\n position: relative;\n width: ${({ $size = 40 }) => $size}px;\n height: ${({ $size = 40 }) => $size}px;\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n font-size: ${({ $size = 40 }) => Math.round($size * 0.54)}px;\n line-height: 1;\n color: var(--ant-color-text);\n background: var(--hisd3-control-bg, #e6e4e1);\n border: 0;\n border-radius: 50%;\n cursor: pointer;\n transition: background 0.15s ease, color 0.15s ease;\n\n &:hover {\n background: var(--hisd3-control-bg-hover, #dbd8d4);\n }\n\n /* open state: tinted with the app's primary, like Facebook's blue */\n ${({ $open }) =>\n $open\n ? `\n background: var(--ant-color-primary-bg);\n color: var(--ant-color-primary);\n &:hover { background: var(--ant-color-primary-bg-hover); }\n `\n : \"\"}\n\n &:focus-visible {\n outline: 2px solid var(--ant-color-primary);\n outline-offset: 2px;\n }\n\n & > .anticon {\n line-height: 0;\n /* the stock bell is narrow; widen it a touch for a fuller silhouette */\n transform: scaleX(var(--hisd3-bell-stretch, 1.12));\n }\n`;\n\n/** Count pill on the circle's top-right edge, ringed in the page background. */\nconst CountBadge = styled.span<{ $size: number }>`\n position: absolute;\n top: ${({ $size }) => -Math.round($size * 0.05)}px;\n right: ${({ $size }) => -Math.round($size * 0.05)}px;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 700;\n line-height: 1;\n color: #fff;\n background: var(--ant-color-error, #e5401c);\n border: 2px solid var(--ant-color-bg-layout, #f3f2f0);\n border-radius: 999px;\n pointer-events: none;\n`;\n\nconst Panel = styled.div`\n width: 360px;\n max-width: calc(100vw - 32px);\n overflow: hidden;\n background: var(--ant-color-bg-elevated);\n border: 1px solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n border-radius: var(--hisd3-popup-radius, 10px);\n box-shadow: 0 2px 6px rgba(16, 15, 14, 0.06),\n 0 12px 32px rgba(16, 15, 14, 0.14);\n`;\n\nconst PanelHeader = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 16px;\n border-bottom: 1px solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n\n h4 {\n margin: 0;\n font-size: 15px;\n font-weight: 700;\n letter-spacing: 0;\n }\n\n button {\n border: 0;\n background: none;\n padding: 0;\n font: inherit;\n font-size: 13px;\n color: var(--ant-color-primary);\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n }\n`;\n\nconst List = styled.div`\n max-height: 380px;\n overflow-y: auto;\n`;\n\nconst Row = styled.button<{ $unread?: boolean }>`\n display: flex;\n align-items: flex-start;\n gap: 12px;\n width: 100%;\n padding: 12px 16px;\n text-align: left;\n font: inherit;\n border: 0;\n cursor: pointer;\n background: ${({ $unread }) =>\n $unread ? \"var(--ant-color-primary-bg)\" : \"transparent\"};\n\n &:hover {\n background: ${({ $unread }) =>\n $unread ? \"var(--ant-color-primary-bg-hover)\" : \"rgba(0,0,0,0.04)\"};\n }\n`;\n\nconst RowIcon = styled.span<{ $src?: string }>`\n width: 36px;\n height: 36px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n color: var(--ant-color-text);\n border-radius: 50%;\n background: ${({ $src }) =>\n $src ? `center / cover no-repeat url(\"${$src}\")` : \"rgba(0,0,0,0.06)\"};\n`;\n\nconst RowBody = styled.span`\n flex: 1 1 auto;\n min-width: 0;\n\n strong {\n display: block;\n font-size: 14px;\n font-weight: 600;\n color: var(--ant-color-text);\n }\n\n span {\n display: block;\n font-size: 13px;\n color: var(--ant-color-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n time {\n display: block;\n margin-top: 2px;\n font-size: 12px;\n color: var(--ant-color-text-tertiary);\n }\n`;\n\nconst UnreadDot = styled.span`\n width: 8px;\n height: 8px;\n margin-top: 6px;\n flex: 0 0 auto;\n border-radius: 50%;\n background: var(--ant-color-primary);\n`;\n\nconst PanelFooter = styled.button`\n display: block;\n width: 100%;\n padding: 12px 16px;\n font: inherit;\n font-size: 13px;\n font-weight: 600;\n color: var(--ant-color-primary);\n text-align: center;\n background: transparent;\n border: 0;\n border-top: 1px solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n cursor: pointer;\n\n &:hover {\n background: rgba(0, 0, 0, 0.04);\n }\n`;\n\nconst EmptyWrap = styled.div`\n padding: 28px 16px;\n`;\n\n/** Bell button with an unread badge and a Facebook-style notifications panel. */\nexport const HISD3NotificationButton: React.FC<HISD3NotificationButtonProps> = ({\n items = [],\n count,\n loading = false,\n title = \"Notifications\",\n onMarkAllRead,\n onSeeAll,\n seeAllLabel = \"See all notifications\",\n emptyText = \"You're all caught up\",\n onOpenChange,\n size = 40,\n icon,\n className,\n}) => {\n const [open, setOpen] = useState(false);\n const unread = count ?? items.filter((i) => i.unread).length;\n\n const panel = (\n <Panel>\n <PanelHeader>\n <h4>{title}</h4>\n {onMarkAllRead && unread > 0 && (\n <button type=\"button\" onClick={onMarkAllRead}>\n Mark all as read\n </button>\n )}\n </PanelHeader>\n\n {loading ? (\n <EmptyWrap style={{ textAlign: \"center\" }}>\n <Spin />\n </EmptyWrap>\n ) : items.length === 0 ? (\n <EmptyWrap>\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={emptyText}\n />\n </EmptyWrap>\n ) : (\n <List>\n {items.map((item) => (\n <Row\n key={item.id}\n type=\"button\"\n $unread={item.unread}\n onClick={() => {\n item.onClick?.(item);\n setOpen(false);\n onOpenChange?.(false);\n }}\n >\n <RowIcon $src={item.avatarSrc}>\n {!item.avatarSrc && (item.icon ?? <BellFilled />)}\n </RowIcon>\n <RowBody>\n <strong>{item.title}</strong>\n {item.description && <span>{item.description}</span>}\n {item.time && <time>{item.time}</time>}\n </RowBody>\n {item.unread && <UnreadDot />}\n </Row>\n ))}\n </List>\n )}\n\n {onSeeAll && (\n <PanelFooter\n type=\"button\"\n onClick={() => {\n onSeeAll();\n setOpen(false);\n onOpenChange?.(false);\n }}\n >\n {seeAllLabel}\n </PanelFooter>\n )}\n </Panel>\n );\n\n return (\n <Dropdown\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n onOpenChange?.(next);\n }}\n trigger={[\"click\"]}\n placement=\"bottomRight\"\n popupRender={() => panel}\n >\n <HeaderIconButton\n type=\"button\"\n $size={size}\n $open={open}\n className={className}\n aria-label={`${title}${unread ? ` (${unread} unread)` : \"\"}`}\n >\n {icon ?? <BellFilled />}\n {unread > 0 && (\n <CountBadge $size={size}>{unread > 99 ? \"99+\" : unread}</CountBadge>\n )}\n </HeaderIconButton>\n </Dropdown>\n );\n};\n\nexport default HISD3NotificationButton;\n","import {\n DownOutlined,\n ExclamationCircleOutlined,\n LogoutOutlined,\n SettingOutlined,\n} from \"@ant-design/icons\";\nimport { App, Dropdown, type MenuProps } from \"antd\";\nimport React, { useState } from \"react\";\nimport styled from \"styled-components\";\n\nimport type { IUserEmployee } from \"../../types/account\";\n\nexport interface HISD3AvatarMenuProps {\n account: IUserEmployee;\n avatarSrc?: string;\n /** Settings entry target. Pass `null` to hide the Settings entry. */\n settingsUrl?: string | null;\n onSettings?: () => void;\n onLogout: () => Promise<void> | void;\n /** Ask for confirmation before logging out. Default true. */\n confirmLogout?: boolean;\n /** Extra entries above Settings / Logout. */\n extraItems?: MenuProps[\"items\"];\n /** Circle (Facebook-style) or square to match the rest of the design. */\n shape?: \"circle\" | \"square\";\n /** Diameter in px. Default 40. */\n size?: number;\n /** Hide the small chevron badge on the avatar. */\n hideChevron?: boolean;\n className?: string;\n}\n\nconst Trigger = styled.button<{\n $shape: \"circle\" | \"square\";\n $size: number;\n $open?: boolean;\n}>`\n user-select: none;\n -webkit-user-select: none;\n position: relative;\n width: ${({ $size }) => $size}px;\n height: ${({ $size }) => $size}px;\n flex: 0 0 auto;\n padding: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: ${({ $size }) => Math.round($size * 0.36)}px;\n font-weight: 700;\n color: var(--ant-color-text);\n background: var(--hisd3-control-bg, #e6e4e1);\n border: 0;\n border-radius: ${({ $shape }) => ($shape === \"circle\" ? \"50%\" : \"0\")};\n cursor: pointer;\n transition: filter 0.15s ease;\n\n &:hover {\n filter: brightness(0.94);\n }\n\n &:focus-visible {\n outline: 2px solid var(--ant-color-primary);\n outline-offset: 2px;\n }\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n border-radius: inherit;\n }\n`;\n\n/** Small chevron badge pinned to the bottom-right of the avatar. */\nconst Chevron = styled.span<{ $size: number; $open?: boolean }>`\n position: absolute;\n right: ${({ $size }) => -Math.round($size * 0.05)}px;\n bottom: ${({ $size }) => -Math.round($size * 0.05)}px;\n width: ${({ $size }) => Math.round($size * 0.45)}px;\n height: ${({ $size }) => Math.round($size * 0.45)}px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: ${({ $size }) => Math.round($size * 0.2)}px;\n color: var(--ant-color-text);\n background: var(--hisd3-control-bg, #e6e4e1);\n border: 2px solid var(--ant-color-bg-layout, #f3f2f0);\n border-radius: 50%;\n pointer-events: none;\n\n ${({ $open }) =>\n $open\n ? `\n background: var(--ant-color-primary);\n color: #fff;\n `\n : \"\"}\n\n & svg {\n display: block;\n }\n`;\n\nconst Identity = styled.div`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px;\n min-width: 230px;\n border-bottom: 1px solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n\n .hisd3-identity-text {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .hisd3-identity-name {\n display: block;\n font-size: 14px;\n font-weight: 700;\n color: var(--ant-color-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .hisd3-identity-role {\n display: block;\n margin-top: 2px;\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`;\n\nconst IdentityAvatar = styled.span<{ $src?: string }>`\n width: 40px;\n height: 40px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n font-weight: 700;\n border-radius: 50%;\n background: ${({ $src }) =>\n $src ? `center / cover no-repeat url(\"${$src}\")` : \"rgba(0,0,0,0.08)\"};\n`;\n\nconst Panel = styled.div`\n overflow: hidden;\n background: var(--ant-color-bg-elevated);\n border: 1px solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n border-radius: var(--hisd3-popup-radius, 10px);\n box-shadow: 0 2px 6px rgba(16, 15, 14, 0.06),\n 0 12px 32px rgba(16, 15, 14, 0.14);\n\n .ant-menu {\n border-inline-end: none !important;\n background: transparent;\n }\n\n .ant-menu {\n padding: 6px;\n }\n\n .ant-menu-item {\n margin: 0;\n width: 100%;\n border-radius: 8px;\n font-size: 14px;\n }\n`;\n\nexport const getInitials = (fullName?: string): string =>\n (fullName || \"\")\n .replace(/\\(.*?\\)/g, \" \")\n .split(/[\\s,]+/)\n .map((w) => w.replace(/[^\\p{L}\\p{N}]/gu, \"\"))\n .filter(Boolean)\n .slice(0, 2)\n .map((w) => w[0].toUpperCase())\n .join(\"\") || \"?\";\n\n/**\n * Circular avatar button for the top-right of the header. Clicking it opens a\n * menu showing who is signed in, plus Settings and Logout (with a confirm\n * dialog by default).\n */\nexport const HISD3AvatarMenu: React.FC<HISD3AvatarMenuProps> = ({\n account,\n avatarSrc,\n settingsUrl = \"/settings\",\n onSettings,\n onLogout,\n confirmLogout = true,\n extraItems,\n shape = \"circle\",\n size = 40,\n hideChevron = false,\n className,\n}) => {\n const { modal } = App.useApp();\n const [open, setOpen] = useState(false);\n\n const handleLogout = () => {\n if (!confirmLogout) {\n void onLogout();\n return;\n }\n modal.confirm({\n title: \"Are you sure you want to logout?\",\n content: \"Please click OK to continue\",\n icon: <ExclamationCircleOutlined />,\n okText: \"Logout\",\n onOk: onLogout,\n });\n };\n\n const items: MenuProps[\"items\"] = [\n ...(extraItems ?? []),\n ...(settingsUrl !== null || onSettings\n ? [\n {\n key: \"settings\",\n icon: <SettingOutlined />,\n label: \"Settings\",\n onClick: () => {\n if (onSettings) onSettings();\n else if (settingsUrl) window.location.href = settingsUrl;\n },\n },\n ]\n : []),\n {\n key: \"logout\",\n icon: <LogoutOutlined />,\n label: \"Logout\",\n onClick: handleLogout,\n },\n ];\n\n return (\n <Dropdown\n open={open}\n onOpenChange={setOpen}\n trigger={[\"click\"]}\n placement=\"bottomRight\"\n menu={{ items, onClick: () => setOpen(false) }}\n popupRender={(menu) => (\n <Panel>\n <Identity>\n <IdentityAvatar $src={avatarSrc}>\n {!avatarSrc && getInitials(account.fullName)}\n </IdentityAvatar>\n <span className=\"hisd3-identity-text\">\n <span className=\"hisd3-identity-name\">{account.fullName}</span>\n {account.positionType && (\n <span className=\"hisd3-identity-role\">\n {account.positionType}\n </span>\n )}\n </span>\n </Identity>\n {menu}\n </Panel>\n )}\n >\n <Trigger\n type=\"button\"\n className={className}\n $shape={shape}\n $size={size}\n $open={open}\n aria-label={`Account menu for ${account.fullName}`}\n >\n {avatarSrc ? (\n <img src={avatarSrc} alt=\"\" />\n ) : (\n getInitials(account.fullName)\n )}\n {!hideChevron && (\n <Chevron $size={size} $open={open} aria-hidden>\n <DownOutlined />\n </Chevron>\n )}\n </Trigger>\n </Dropdown>\n );\n};\n\nexport default HISD3AvatarMenu;\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nexport { HISD3NotificationButton, HeaderIconButton } from \"./NotificationButton\";\nexport type {\n HISD3NotificationButtonProps,\n HISD3Notification,\n} from \"./NotificationButton\";\nexport { HISD3AvatarMenu, getInitials } from \"./AvatarMenu\";\nexport type { HISD3AvatarMenuProps } from \"./AvatarMenu\";\n\nconst Wrap = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 0 0 auto;\n`;\n\nconst Divider = styled.span`\n width: 2px;\n height: 24px;\n background: var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n flex: 0 0 auto;\n`;\n\nexport interface HISD3HeaderActionsProps {\n children: React.ReactNode;\n /** Insert a vertical rule before the last child (e.g. before the avatar). */\n divided?: boolean;\n className?: string;\n}\n\n/** Spacing wrapper for the top-right header controls. */\nexport const HISD3HeaderActions: React.FC<HISD3HeaderActionsProps> = ({\n children,\n divided = false,\n className,\n}) => {\n const kids = React.Children.toArray(children).filter(Boolean);\n return (\n <Wrap className={className}>\n {kids.map((child, i) => (\n <React.Fragment key={i}>\n {divided && i === kids.length - 1 && i > 0 && <Divider />}\n {child}\n </React.Fragment>\n ))}\n </Wrap>\n );\n};\n\nexport default HISD3HeaderActions;\n","import { LeftOutlined, RightOutlined } from \"@ant-design/icons\";\nimport { Pagination, Table, type TableProps } from \"antd\";\nimport type { AnyObject } from \"antd/es/_util/type\";\nimport React from \"react\";\nimport styled from \"styled-components\";\n\nexport interface HISD3TablePagination {\n current: number;\n pageSize: number;\n total: number;\n onChange: (page: number, pageSize: number) => void;\n /** Page-size toggle buttons on the right. Default [10, 20, 50]. */\n pageSizeOptions?: number[];\n /** Custom total text. Default \"Total 7,223 items\". */\n renderTotal?: (total: number, range: [number, number]) => React.ReactNode;\n /** Hide the page-size buttons. */\n hidePageSize?: boolean;\n}\n\nexport interface HISD3TableProps<T extends AnyObject>\n extends Omit<TableProps<T>, \"pagination\" | \"footer\"> {\n /** HISD3 pagination bar (total · pages · page-size). Omit for no pagination. */\n pagination?: HISD3TablePagination | false;\n /** Optional summary strip rendered between the rows and the pagination bar. */\n footer?: React.ReactNode;\n}\n\nconst Wrap = styled.div`\n /*\n * Opaque backgrounds throughout. A fixed column is \\`position: sticky\\`, so the\n * columns that scroll underneath it show through anything translucent.\n * Override --hisd3-table-bg / --hisd3-table-hover-bg on a surface that is not\n * the usual page grey.\n */\n .ant-table-wrapper .ant-table {\n background: var(--hisd3-table-bg, #f3f2f0);\n }\n\n .ant-table-wrapper .ant-table-thead > tr > th {\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary);\n padding-block: 9px;\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n background: var(--hisd3-table-bg, #f3f2f0);\n }\n\n .ant-table-wrapper .ant-table-tbody > tr > td {\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n font-size: 14px;\n }\n\n .ant-table-wrapper .ant-table-tbody > tr:last-child > td {\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n }\n\n .ant-table-wrapper .ant-table-thead > tr > th:first-child,\n .ant-table-wrapper .ant-table-tbody > tr > td:first-child {\n padding-left: 0;\n }\n\n .ant-table-wrapper .ant-table-thead > tr > th:last-child,\n .ant-table-wrapper .ant-table-tbody > tr > td:last-child {\n padding-right: 0;\n }\n\n .ant-table-wrapper .ant-table-cell-row-hover {\n background: var(--hisd3-table-hover-bg, #ecebe9) !important;\n }\n\n /* Highlighted / linked cell text, e.g. bill numbers */\n .hisd3-cell-primary {\n color: var(--ant-color-primary);\n font-weight: 700;\n }\n .hisd3-cell-link {\n color: var(--ant-color-primary);\n }\n .hisd3-cell-muted {\n color: var(--ant-color-text-tertiary);\n }\n`;\n\nconst FooterStrip = styled.div`\n padding: 14px 0 8px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary);\n`;\n\nconst PagerBar = styled.div`\n user-select: none;\n -webkit-user-select: none;\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 14px 0 4px;\n\n .hisd3-total {\n flex: 1 1 auto;\n font-size: 13px;\n color: var(--ant-color-text-secondary);\n }\n\n .ant-pagination {\n display: inline-flex;\n border: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n\n .ant-pagination-item,\n .ant-pagination-prev,\n .ant-pagination-next,\n .ant-pagination-jump-prev,\n .ant-pagination-jump-next {\n margin: 0;\n min-width: 34px;\n height: 34px;\n line-height: 34px;\n border: 0;\n border-right: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n border-radius: 0;\n font-weight: 700;\n font-size: 13px;\n background: transparent;\n\n &:last-child {\n border-right: 0;\n }\n\n a {\n color: var(--ant-color-text);\n }\n }\n\n .ant-pagination-item-active {\n background: var(--ant-color-primary);\n a {\n color: #fff;\n }\n }\n\n .ant-pagination-prev .ant-pagination-item-link,\n .ant-pagination-next .ant-pagination-item-link {\n color: var(--ant-color-text);\n font-size: 11px;\n }\n\n .ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis,\n .ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis {\n color: var(--ant-color-text);\n font-weight: 700;\n }\n }\n`;\n\nconst SizeGroup = styled.div`\n display: inline-flex;\n border: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n\n button {\n height: 34px;\n padding: 0 14px;\n border: 0;\n border-right: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n background: transparent;\n font: inherit;\n font-size: 13px;\n color: var(--ant-color-text);\n cursor: pointer;\n\n &:last-child {\n border-right: 0;\n }\n\n &[aria-pressed=\"true\"] {\n background: var(--ant-color-primary);\n color: #fff;\n }\n }\n`;\n\nconst defaultTotal = (total: number) =>\n `Total ${total.toLocaleString()} items`;\n\nexport function HISD3Table<T extends AnyObject>({\n pagination,\n footer,\n ...tableProps\n}: HISD3TableProps<T>) {\n const p = pagination || undefined;\n const sizes = p?.pageSizeOptions ?? [10, 20, 50];\n\n return (\n <Wrap>\n <Table<T> {...tableProps} pagination={false} />\n\n {footer && <FooterStrip>{footer}</FooterStrip>}\n\n {p && (\n <PagerBar>\n <span className=\"hisd3-total\">\n {(p.renderTotal ?? defaultTotal)(p.total, [\n (p.current - 1) * p.pageSize + 1,\n Math.min(p.current * p.pageSize, p.total),\n ])}\n </span>\n <Pagination\n current={p.current}\n pageSize={p.pageSize}\n total={p.total}\n showSizeChanger={false}\n onChange={(page, size) => p.onChange(page, size)}\n itemRender={(_, type, el) => {\n if (type === \"prev\") return <span className=\"ant-pagination-item-link\"><LeftOutlined /></span>;\n if (type === \"next\") return <span className=\"ant-pagination-item-link\"><RightOutlined /></span>;\n return el;\n }}\n />\n {!p.hidePageSize && (\n <SizeGroup role=\"group\" aria-label=\"Rows per page\">\n {sizes.map((s) => (\n <button\n key={s}\n type=\"button\"\n aria-pressed={s === p.pageSize}\n onClick={() => p.onChange(1, s)}\n >\n {s} / page\n </button>\n ))}\n </SizeGroup>\n )}\n </PagerBar>\n )}\n </Wrap>\n );\n}\n\nexport default HISD3Table;\n","import { Tabs, type TabsProps } from \"antd\";\nimport React from \"react\";\nimport styled from \"styled-components\";\n\nexport interface HISD3TabItem {\n key: string;\n label: React.ReactNode;\n /** Optional count badge rendered after the label (e.g. \"All Patients 10\"). */\n count?: number | string;\n disabled?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface HISD3TabsProps extends Omit<TabsProps, \"items\"> {\n items: HISD3TabItem[];\n}\n\nconst StyledTabs = styled(Tabs)`\n &.ant-tabs .ant-tabs-nav {\n user-select: none;\n -webkit-user-select: none;\n margin: 0;\n\n &::before {\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n }\n }\n\n &.ant-tabs .ant-tabs-tab {\n padding: 10px 0 12px;\n font-weight: 600;\n font-size: 15px;\n\n + .ant-tabs-tab {\n margin-left: 32px;\n }\n }\n\n &.ant-tabs .ant-tabs-ink-bar {\n height: 3px;\n }\n\n .hisd3-tab-count {\n margin-left: 8px;\n font-size: 13px;\n font-weight: 500;\n color: var(--ant-color-text-tertiary);\n }\n\n .ant-tabs-tab-active .hisd3-tab-count {\n color: var(--ant-color-primary);\n }\n`;\n\n/** Underlined filter tabs with optional counts. */\nexport const HISD3Tabs: React.FC<HISD3TabsProps> = ({ items, ...rest }) => (\n <StyledTabs\n {...rest}\n items={items.map(({ count, label, ...item }) => ({\n ...item,\n label: (\n <>\n {label}\n {count !== undefined && <span className=\"hisd3-tab-count\">{count}</span>}\n </>\n ),\n }))}\n />\n);\n\nexport default HISD3Tabs;\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nexport type HISD3TagVariant = \"neutral\" | \"soft\" | \"outline\" | \"solid\";\nexport type HISD3TagTone = \"default\" | \"primary\" | \"success\" | \"warning\" | \"danger\";\n\nexport interface HISD3TagProps extends React.HTMLAttributes<HTMLSpanElement> {\n /**\n * neutral → light grey fill, dark text (ACTIVE, IN PATIENT)\n * soft → primary tint fill, primary text (ER PATIENT)\n * outline → 2px primary border, primary text (OUT PATIENT)\n * solid → primary fill, white text\n */\n variant?: HISD3TagVariant;\n tone?: HISD3TagTone;\n children: React.ReactNode;\n}\n\nconst toneVar: Record<HISD3TagTone, string> = {\n default: \"var(--ant-color-text)\",\n primary: \"var(--ant-color-primary)\",\n success: \"var(--ant-color-success)\",\n warning: \"var(--ant-color-warning)\",\n danger: \"var(--ant-color-error)\",\n};\n\nconst toneBgVar: Record<HISD3TagTone, string> = {\n default: \"rgba(0,0,0,0.05)\",\n primary: \"var(--ant-color-primary-bg)\",\n success: \"var(--ant-color-success-bg)\",\n warning: \"var(--ant-color-warning-bg)\",\n danger: \"var(--ant-color-error-bg)\",\n};\n\nconst StyledTag = styled.span<{ $variant: HISD3TagVariant; $tone: HISD3TagTone }>`\n display: inline-flex;\n align-items: center;\n gap: 5px;\n height: 22px;\n padding: 0 9px;\n font-size: 11px;\n font-weight: 500;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n white-space: nowrap;\n line-height: 1;\n border: var(--hisd3-rule-width, 1px) solid transparent;\n border-radius: 0;\n\n ${({ $variant, $tone }) => {\n const color = toneVar[$tone];\n const bg = toneBgVar[$tone];\n switch ($variant) {\n case \"soft\":\n return `color: ${color}; background: ${bg};`;\n case \"outline\":\n return `color: ${color}; border-color: ${color}; background: transparent;`;\n case \"solid\":\n return `color: #fff; background: ${$tone === \"default\" ? \"var(--ant-color-text)\" : color};`;\n default:\n return `color: var(--ant-color-text); background: rgba(0,0,0,0.05);`;\n }\n }}\n`;\n\nexport const HISD3Tag: React.FC<HISD3TagProps> = ({\n variant = \"neutral\",\n tone = variant === \"neutral\" ? \"default\" : \"primary\",\n children,\n ...rest\n}) => (\n <StyledTag $variant={variant} $tone={tone} {...rest}>\n {children}\n </StyledTag>\n);\n\nexport default HISD3Tag;\n","import { SearchOutlined } from \"@ant-design/icons\";\nimport { Input, type InputProps, type InputRef } from \"antd\";\nimport React, { forwardRef } from \"react\";\nimport styled from \"styled-components\";\n\nexport type HISD3InputProps = InputProps;\n\nconst StyledInput = styled(Input)`\n &.ant-input,\n &.ant-input-affix-wrapper {\n border-width: var(--hisd3-rule-width, 1px);\n font-size: 14px;\n }\n\n &.ant-input-affix-wrapper .ant-input-prefix {\n margin-inline-end: 10px;\n color: var(--ant-color-text-tertiary);\n font-size: 15px;\n }\n`;\n\n/** Plain text input with the HISD3 2px border. */\nexport const HISD3Input = forwardRef<InputRef, HISD3InputProps>((props, ref) => (\n <StyledInput {...props} ref={ref} />\n));\nHISD3Input.displayName = \"HISD3Input\";\n\nconst StyledSearch = styled(StyledInput)`\n /*\n * default: the same 40px control height as buttons and selects.\n * Lighter than the page with a visible border, so it reads as a field to\n * type in; a fill darker than the page reads as disabled.\n */\n &.ant-input-affix-wrapper {\n background: var(--hisd3-input-bg, #FAF9F7);\n border-color: var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n height: 40px;\n padding-inline: 14px;\n\n &:hover {\n border-color: var(--hisd3-input-border-hover, #B9B4AC);\n background: var(--hisd3-input-bg-hover, #FFFFFF);\n }\n\n &:focus-within {\n border-color: var(--ant-color-primary);\n background: var(--hisd3-input-bg-hover, #FFFFFF);\n box-shadow: 0 0 0 3px var(--ant-color-primary-bg, rgba(0, 121, 107, 0.12));\n }\n\n .ant-input {\n background: transparent;\n font-size: 14px;\n }\n\n .ant-input-prefix {\n margin-inline-end: 10px;\n font-size: 15px;\n color: var(--ant-color-text-secondary);\n }\n }\n\n /* compact: pairs with a small table */\n &.hisd3-search-sm.ant-input-affix-wrapper {\n height: 32px;\n padding-inline: 12px;\n\n .ant-input {\n font-size: 13px;\n }\n .ant-input-prefix {\n margin-inline-end: 8px;\n font-size: 14px;\n }\n }\n\n /* hero: the tall standalone search at the top of a landing page */\n &.hisd3-search-lg.ant-input-affix-wrapper {\n height: 56px;\n padding-inline: 20px;\n\n .ant-input {\n font-size: 17px;\n }\n .ant-input-prefix {\n margin-inline-end: 14px;\n font-size: 19px;\n }\n }\n`;\n\nexport interface HISD3SearchInputProps extends Omit<InputProps, \"size\"> {\n /**\n * \"small\" 32px, \"middle\" 40px (default, matches buttons), \"large\" 56px for a\n * standalone hero search.\n */\n size?: \"small\" | \"middle\" | \"large\";\n /** @deprecated use `size` — kept so existing call sites keep working. */\n compact?: boolean;\n}\n\nconst SEARCH_SIZE_CLASS = {\n small: \"hisd3-search-sm\",\n middle: \"\",\n large: \"hisd3-search-lg\",\n} as const;\n\n/** Light search field with a leading icon (the page-level search bar). */\nexport const HISD3SearchInput = forwardRef<InputRef, HISD3SearchInputProps>(\n ({ size, compact, className, ...props }, ref) => (\n <StyledSearch\n ref={ref}\n allowClear\n prefix={<SearchOutlined />}\n className={[\n SEARCH_SIZE_CLASS[size ?? (compact ? \"small\" : \"middle\")],\n className ?? \"\",\n ]\n .join(\" \")\n .trim()}\n {...props}\n />\n ),\n);\nHISD3SearchInput.displayName = \"HISD3SearchInput\";\n\nexport default HISD3Input;\n","import { Select, type RefSelectProps, type SelectProps } from \"antd\";\nimport type { DefaultOptionType } from \"antd/es/select\";\nimport React, { forwardRef, useMemo } from \"react\";\n\n/** An option that may carry a second, smaller line under its label. */\nexport interface HISD3SelectOption extends DefaultOptionType {\n /** Shown under the label, smaller and muted — e.g. the account title under its code. */\n description?: React.ReactNode;\n}\n\nexport interface HISD3SelectProps extends SelectProps<any, HISD3SelectOption> {\n /**\n * Wrap long text onto more lines — in the chosen value and in every option —\n * instead of cutting it off with \"…\". On by default.\n *\n * Turns antd's virtual list off unless you pass `virtual` yourself: wrapped\n * rows are not all the same height. Pass `virtual` for a very long list.\n */\n wrap?: boolean;\n /** Label line in a monospace font — for codes (account codes, UACS, …). */\n monoLabel?: boolean;\n}\n\nconst MONO = \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\";\n\nexport interface HISD3SelectLabelProps {\n label: React.ReactNode;\n description?: React.ReactNode;\n /** Label in a monospace font. */\n mono?: boolean;\n}\n\n/**\n * The two-line layout HISD3Select uses for an option with a `description`:\n * the label on top, the description underneath, smaller and muted. Both wrap.\n * Exported for a custom `optionRender` / `labelRender` that wants the same look.\n */\nexport const HISD3SelectLabel: React.FC<HISD3SelectLabelProps> = ({ label, description, mono }) => (\n <div className=\"hisd3-select-label\">\n <div\n className=\"hisd3-select-label-primary\"\n style={mono ? { fontFamily: MONO } : undefined}\n >\n {label}\n </div>\n {description != null && description !== \"\" ? (\n <div className=\"hisd3-select-label-description\">{description}</div>\n ) : null}\n </div>\n);\n\nconst asText = (node: unknown) =>\n typeof node === \"string\" || typeof node === \"number\" ? String(node) : \"\";\n\n/** Every leaf option, groups flattened. */\nconst flatten = (options: HISD3SelectOption[] | undefined): HISD3SelectOption[] =>\n (options ?? []).flatMap((option) =>\n Array.isArray(option.options) ? flatten(option.options as HISD3SelectOption[]) : [option],\n );\n\n/** Search the label (or the value when there is no label) and the description. */\nconst filterWithDescription = (input: string, option?: HISD3SelectOption) => {\n if (!option) return false;\n const haystack = `${asText(option.label ?? option.value)} ${asText(option.description)}`;\n return haystack.toUpperCase().includes(input.toUpperCase());\n};\n\nconst join = (...names: (string | false | undefined)[]) => names.filter(Boolean).join(\" \");\n\n/**\n * antd Select that wraps long text instead of truncating it, and shows an\n * option's `description` on a second line — in the dropdown and in the box.\n *\n * ```tsx\n * <HISD3Select\n * showSearch\n * monoLabel\n * options={accounts.map((a) => ({ value: a.code, label: a.code, description: a.title }))}\n * />\n * ```\n */\nexport const HISD3Select = forwardRef<RefSelectProps, HISD3SelectProps>(\n (\n {\n wrap = true,\n monoLabel,\n options,\n mode,\n showSearch,\n filterOption,\n optionFilterProp,\n optionRender,\n labelRender,\n virtual,\n rootClassName,\n ...props\n },\n ref,\n ) => {\n const byValue = useMemo(\n () => new Map(flatten(options).map((option) => [option.value, option])),\n [options],\n );\n const hasDescriptions = useMemo(\n () => [...byValue.values()].some((option) => option.description != null),\n [byValue],\n );\n\n const render = (option: HISD3SelectOption | undefined, fallback: React.ReactNode) =>\n option?.description != null || monoLabel ? (\n <HISD3SelectLabel\n label={option?.label ?? fallback}\n description={option?.description}\n mono={monoLabel}\n />\n ) : (\n fallback\n );\n\n const searchConfig = typeof showSearch === \"object\" ? showSearch : undefined;\n const filterIsSet =\n filterOption !== undefined ||\n optionFilterProp !== undefined ||\n searchConfig?.filterOption !== undefined ||\n searchConfig?.optionFilterProp !== undefined;\n\n return (\n <Select<any, HISD3SelectOption>\n {...props}\n ref={ref}\n mode={mode}\n options={options}\n showSearch={showSearch}\n optionFilterProp={optionFilterProp}\n filterOption={\n filterOption ?? (!filterIsSet && hasDescriptions ? filterWithDescription : undefined)\n }\n optionRender={\n optionRender ?? ((option) => render(option.data, option.label ?? option.value))\n }\n // Tags in a multi-select keep antd's one-line label.\n labelRender={\n labelRender ??\n (mode\n ? undefined\n : ({ label, value }) => render(byValue.get(value), label ?? value))\n }\n virtual={virtual ?? (wrap ? false : undefined)}\n // antd puts `rootClassName` on the control and on its popup alike.\n rootClassName={join(wrap && \"hisd3-wrap-select\", rootClassName)}\n />\n );\n },\n);\nHISD3Select.displayName = \"HISD3Select\";\n\nexport default HISD3Select;\n","import {\n AutoComplete,\n Cascader,\n Checkbox,\n ColorPicker,\n DatePicker,\n Form,\n Input,\n InputNumber,\n Mentions,\n Radio,\n Rate,\n Segmented,\n Skeleton,\n Slider,\n Switch,\n TimePicker,\n Transfer,\n TreeSelect,\n Upload,\n type CheckboxProps,\n type CheckboxRef,\n type DatePickerProps,\n type FormItemProps,\n type GetProps,\n type GetRef,\n type InputNumberProps,\n type InputProps,\n type InputRef,\n type RadioGroupProps,\n type RefSelectProps,\n type SwitchProps,\n type TimePickerProps,\n type AutoCompleteProps,\n type CascaderAutoProps,\n type ColorPickerProps,\n type MentionsProps,\n type MentionsRef,\n type RateProps,\n type SegmentedProps,\n type TimeRangePickerProps,\n type TransferProps,\n type TreeSelectProps,\n type UploadFile,\n type UploadProps,\n} from \"antd\";\nimport React, { forwardRef } from \"react\";\nimport styled from \"styled-components\";\nimport { HISD3Input } from \"../Input\";\nimport { HISD3Select, type HISD3SelectProps } from \"../Select\";\n\n/* -------------------------------------------------------------------------- */\n/* Shared field shell */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3SkeletonInputProps = GetProps<typeof Skeleton.Input>;\ntype ControlSize = HISD3SkeletonInputProps[\"size\"];\n\nexport interface HISD3FormFieldBaseProps extends Omit<FormItemProps, \"children\"> {\n /** Show a skeleton in place of the control (e.g. while the record loads). */\n loading?: boolean;\n /** Props for the default skeleton (`Skeleton.Input`). */\n loadingProps?: HISD3SkeletonInputProps;\n /** Label above the control instead of beside it. Shortcut for `layout=\"vertical\"`. */\n vertical?: boolean;\n /** Semi-bold (600) label. Only the label changes — the control text does not. */\n bolderLabel?: boolean;\n}\n\n/** Every wrapped field takes the Form.Item props plus `fieldProps` for the control. */\nexport type HISD3FormFieldProps<P> = HISD3FormFieldBaseProps & {\n /** Props passed straight to the wrapped antd control. */\n fieldProps?: P;\n};\n\nconst StyledItem = styled(Form.Item)`\n &.ant-form-item {\n margin-bottom: 6px;\n }\n\n /* vertical: sit the label close to its control */\n &.ant-form-item-vertical .ant-form-item-label {\n padding-bottom: 2px;\n }\n\n &.hisd3-form-field-bold .ant-form-item-label > label {\n font-weight: 600;\n }\n\n /* pickers and number inputs fill the column like text inputs do */\n .ant-picker,\n .ant-input-number,\n .ant-input-number-group-wrapper {\n width: 100%;\n }\n`;\n\n/**\n * Swallows the value / onChange / id that Form.Item injects into its child,\n * so the skeleton never receives them (and never warns about unknown props).\n */\nconst FieldSkeleton: React.FC<{ node: React.ReactNode }> = ({ node }) => <>{node}</>;\n\nexport interface HISD3FormFieldShellProps extends HISD3FormFieldBaseProps {\n /** Control size — used to size the default skeleton. */\n controlSize?: ControlSize;\n /** Replace the default skeleton (e.g. a small one for a switch). */\n skeleton?: React.ReactNode;\n children?: React.ReactNode;\n}\n\n/**\n * The Form.Item wrapper every HISD3Form* field uses. Use it directly to give a\n * custom control the same label, spacing and loading behaviour.\n */\nexport const HISD3FormField: React.FC<HISD3FormFieldShellProps> = ({\n loading,\n loadingProps,\n vertical,\n bolderLabel,\n controlSize,\n skeleton,\n layout,\n className,\n children,\n ...itemProps\n}) => (\n <StyledItem\n {...itemProps}\n layout={vertical ? \"vertical\" : layout}\n className={[\"hisd3-form-field\", bolderLabel ? \"hisd3-form-field-bold\" : \"\", className ?? \"\"]\n .join(\" \")\n .trim()}\n >\n {loading ? (\n <FieldSkeleton\n node={\n skeleton ?? (\n <Skeleton.Input active block size={controlSize} {...loadingProps} />\n )\n }\n />\n ) : (\n children\n )}\n </StyledItem>\n);\n\n/** A wrapped field: its props plus a ref to the underlying antd control. */\nexport type HISD3FormFieldComponent<P, R> = React.ForwardRefExoticComponent<\n React.PropsWithoutRef<P> & React.RefAttributes<R>\n>;\n\nexport type HISD3InputNumberRef = GetRef<typeof InputNumber>;\nexport type HISD3PickerRef = GetRef<typeof DatePicker>;\nexport type HISD3RangePickerRef = GetRef<typeof DatePicker.RangePicker>;\nexport type HISD3TimePickerRef = GetRef<typeof TimePicker>;\n\nconst smallSkeleton = (width: number) => (\n <Skeleton.Button active size=\"small\" style={{ width, minWidth: width }} />\n);\n\n/* -------------------------------------------------------------------------- */\n/* Text */\n/* -------------------------------------------------------------------------- */\n\nexport interface HISD3FormInputProps extends HISD3FormFieldProps<InputProps> {\n /** @deprecated use `fieldProps` — kept so existing call sites keep working. */\n propsinput?: InputProps;\n}\n\n/** Text input inside a Form.Item. */\nexport const HISD3FormInput = forwardRef<InputRef, HISD3FormInputProps>(\n ({ fieldProps, propsinput, ...field }, ref) => {\n const inputProps = { ...propsinput, ...fieldProps };\n return (\n <HISD3FormField {...field} controlSize={inputProps.size}>\n <HISD3Input {...inputProps} ref={ref} />\n </HISD3FormField>\n );\n },\n);\nHISD3FormInput.displayName = \"HISD3FormInput\";\n\nexport type HISD3FormPasswordProps = HISD3FormFieldProps<GetProps<typeof Input.Password>>;\n\n/** Password input with the show / hide toggle. */\nexport const HISD3FormPassword = forwardRef<InputRef, HISD3FormPasswordProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <Input.Password {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormPassword.displayName = \"HISD3FormPassword\";\n\nexport type HISD3FormTextAreaProps = HISD3FormFieldProps<GetProps<typeof Input.TextArea>>;\n\n/** Multi-line text. The skeleton grows with `fieldProps.rows`. */\nexport const HISD3FormTextArea = forwardRef<GetRef<typeof Input.TextArea>, HISD3FormTextAreaProps>(\n ({ fieldProps, loadingProps, ...field }, ref) => (\n <HISD3FormField\n {...field}\n controlSize={fieldProps?.size}\n loadingProps={{\n ...loadingProps,\n style: { height: 22 * (fieldProps?.rows ?? 3) + 10, ...loadingProps?.style },\n }}\n >\n <Input.TextArea {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormTextArea.displayName = \"HISD3FormTextArea\";\n\nexport type HISD3FormInputNumberProps = HISD3FormFieldProps<InputNumberProps>;\n\n/** Numeric input, full width of its column. */\nexport const HISD3FormInputNumber: HISD3FormFieldComponent<\n HISD3FormInputNumberProps,\n HISD3InputNumberRef\n> = forwardRef<HISD3InputNumberRef, HISD3FormInputNumberProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <InputNumber {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormInputNumber.displayName = \"HISD3FormInputNumber\";\n\n/* -------------------------------------------------------------------------- */\n/* Choice */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3FormSelectProps = HISD3FormFieldProps<HISD3SelectProps>;\n\n/** Select / multi-select (`HISD3Select`: long text wraps, options may carry a `description`). */\nexport const HISD3FormSelect = forwardRef<RefSelectProps, HISD3FormSelectProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <HISD3Select {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormSelect.displayName = \"HISD3FormSelect\";\n\nexport type HISD3FormRadioGroupProps = HISD3FormFieldProps<RadioGroupProps>;\n\n/** Radio group — pass `fieldProps.options`. */\nexport const HISD3FormRadioGroup = forwardRef<HTMLDivElement, HISD3FormRadioGroupProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <Radio.Group {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormRadioGroup.displayName = \"HISD3FormRadioGroup\";\n\nexport interface HISD3FormCheckboxProps extends HISD3FormFieldProps<CheckboxProps> {\n /** Text beside the box. Shortcut for `fieldProps.children`. */\n text?: React.ReactNode;\n}\n\n/** Single boolean checkbox; the form value is `true` / `false`. */\nexport const HISD3FormCheckbox = forwardRef<CheckboxRef, HISD3FormCheckboxProps>(\n ({ fieldProps, text, ...field }, ref) => (\n <HISD3FormField valuePropName=\"checked\" skeleton={smallSkeleton(120)} {...field}>\n <Checkbox {...fieldProps} ref={ref}>\n {text ?? fieldProps?.children}\n </Checkbox>\n </HISD3FormField>\n ),\n);\nHISD3FormCheckbox.displayName = \"HISD3FormCheckbox\";\n\nexport type HISD3FormCheckboxGroupProps = HISD3FormFieldProps<GetProps<typeof Checkbox.Group>>;\n\n/** Checkbox group — pass `fieldProps.options`; the form value is an array. */\nexport const HISD3FormCheckboxGroup = forwardRef<HTMLDivElement, HISD3FormCheckboxGroupProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field}>\n <Checkbox.Group {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormCheckboxGroup.displayName = \"HISD3FormCheckboxGroup\";\n\nexport type HISD3FormSwitchProps = HISD3FormFieldProps<SwitchProps>;\n\n/** On / off switch; the form value is `true` / `false`. */\nexport const HISD3FormSwitch = forwardRef<HTMLButtonElement, HISD3FormSwitchProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField\n valuePropName=\"checked\"\n skeleton={smallSkeleton(fieldProps?.size === \"small\" ? 28 : 44)}\n {...field}\n >\n <Switch {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormSwitch.displayName = \"HISD3FormSwitch\";\n\n/* -------------------------------------------------------------------------- */\n/* Date & time */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3FormDatePickerProps = HISD3FormFieldProps<DatePickerProps>;\n\n/** Date picker, full width of its column. The form value is a Dayjs. */\nexport const HISD3FormDatePicker: HISD3FormFieldComponent<\n HISD3FormDatePickerProps,\n HISD3PickerRef\n> = forwardRef<HISD3PickerRef, HISD3FormDatePickerProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <DatePicker {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormDatePicker.displayName = \"HISD3FormDatePicker\";\n\nexport type HISD3FormRangePickerProps = HISD3FormFieldProps<GetProps<typeof DatePicker.RangePicker>>;\n\n/** Start / end date range. The form value is `[Dayjs, Dayjs]`. */\nexport const HISD3FormRangePicker: HISD3FormFieldComponent<\n HISD3FormRangePickerProps,\n HISD3RangePickerRef\n> = forwardRef<HISD3RangePickerRef, HISD3FormRangePickerProps>(({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <DatePicker.RangePicker {...fieldProps} ref={ref} />\n </HISD3FormField>\n));\nHISD3FormRangePicker.displayName = \"HISD3FormRangePicker\";\n\nexport type HISD3FormTimePickerProps = HISD3FormFieldProps<TimePickerProps>;\n\n/** Time picker, full width of its column. */\nexport const HISD3FormTimePicker: HISD3FormFieldComponent<\n HISD3FormTimePickerProps,\n HISD3TimePickerRef\n> = forwardRef<HISD3TimePickerRef, HISD3FormTimePickerProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <TimePicker {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormTimePicker.displayName = \"HISD3FormTimePicker\";\n\nexport type HISD3TimeRangePickerRef = GetRef<typeof TimePicker.RangePicker>;\nexport type HISD3FormTimeRangePickerProps = HISD3FormFieldProps<TimeRangePickerProps>;\n\n/** Start / end time range. The form value is `[Dayjs, Dayjs]`. */\nexport const HISD3FormTimeRangePicker: HISD3FormFieldComponent<\n HISD3FormTimeRangePickerProps,\n HISD3TimeRangePickerRef\n> = forwardRef<HISD3TimeRangePickerRef, HISD3FormTimeRangePickerProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <TimePicker.RangePicker {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormTimeRangePicker.displayName = \"HISD3FormTimeRangePicker\";\n\n/* -------------------------------------------------------------------------- */\n/* More text entry */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3FormSearchProps = HISD3FormFieldProps<GetProps<typeof Input.Search>>;\n\n/** Input with a search button (`fieldProps.onSearch`). */\nexport const HISD3FormSearch = forwardRef<InputRef, HISD3FormSearchProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <Input.Search {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormSearch.displayName = \"HISD3FormSearch\";\n\nexport type HISD3OTPRef = GetRef<typeof Input.OTP>;\nexport type HISD3FormOTPProps = HISD3FormFieldProps<GetProps<typeof Input.OTP>>;\n\n/** One-time code boxes (`fieldProps.length`, default 6). The form value is a string. */\nexport const HISD3FormOTP: HISD3FormFieldComponent<HISD3FormOTPProps, HISD3OTPRef> =\n forwardRef<HISD3OTPRef, HISD3FormOTPProps>(({ fieldProps, loadingProps, ...field }, ref) => (\n <HISD3FormField\n {...field}\n controlSize={fieldProps?.size}\n loadingProps={{\n block: false,\n ...loadingProps,\n style: { width: (fieldProps?.length ?? 6) * 48, ...loadingProps?.style },\n }}\n >\n <Input.OTP {...fieldProps} ref={ref} />\n </HISD3FormField>\n ));\nHISD3FormOTP.displayName = \"HISD3FormOTP\";\n\nexport type HISD3AutoCompleteRef = GetRef<typeof AutoComplete>;\nexport type HISD3FormAutoCompleteProps = HISD3FormFieldProps<AutoCompleteProps>;\n\n/** Free text with suggestions (`fieldProps.options`). */\nexport const HISD3FormAutoComplete: HISD3FormFieldComponent<\n HISD3FormAutoCompleteProps,\n HISD3AutoCompleteRef\n> = forwardRef<HISD3AutoCompleteRef, HISD3FormAutoCompleteProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <AutoComplete {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormAutoComplete.displayName = \"HISD3FormAutoComplete\";\n\nexport type HISD3FormMentionsProps = HISD3FormFieldProps<MentionsProps>;\n\n/** Text area with `@` mentions (`fieldProps.options`). */\nexport const HISD3FormMentions = forwardRef<MentionsRef, HISD3FormMentionsProps>(\n ({ fieldProps, loadingProps, ...field }, ref) => (\n <HISD3FormField\n {...field}\n controlSize={fieldProps?.size}\n loadingProps={{\n ...loadingProps,\n style: { height: 22 * (fieldProps?.rows ?? 1) + 18, ...loadingProps?.style },\n }}\n >\n <Mentions {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormMentions.displayName = \"HISD3FormMentions\";\n\n/* -------------------------------------------------------------------------- */\n/* More choice */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3CascaderRef = GetRef<typeof Cascader>;\nexport type HISD3FormCascaderProps = HISD3FormFieldProps<CascaderAutoProps>;\n\n/** Hierarchical select (e.g. region → province → city). The value is the path array. */\nexport const HISD3FormCascader: HISD3FormFieldComponent<HISD3FormCascaderProps, HISD3CascaderRef> =\n forwardRef<HISD3CascaderRef, HISD3FormCascaderProps>(({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <Cascader {...fieldProps} ref={ref} />\n </HISD3FormField>\n ));\nHISD3FormCascader.displayName = \"HISD3FormCascader\";\n\nexport type HISD3TreeSelectRef = GetRef<typeof TreeSelect>;\nexport type HISD3FormTreeSelectProps = HISD3FormFieldProps<TreeSelectProps>;\n\n/** Select from a tree (`fieldProps.treeData`). */\nexport const HISD3FormTreeSelect: HISD3FormFieldComponent<\n HISD3FormTreeSelectProps,\n HISD3TreeSelectRef\n> = forwardRef<HISD3TreeSelectRef, HISD3FormTreeSelectProps>(({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <TreeSelect {...fieldProps} ref={ref} />\n </HISD3FormField>\n));\nHISD3FormTreeSelect.displayName = \"HISD3FormTreeSelect\";\n\nexport type HISD3FormSegmentedProps = HISD3FormFieldProps<SegmentedProps>;\n\n/** Segmented control (`fieldProps.options`); a compact alternative to radios. */\nexport const HISD3FormSegmented = forwardRef<HTMLDivElement, HISD3FormSegmentedProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} skeleton={smallSkeleton(200)}>\n <Segmented {...fieldProps} options={fieldProps?.options ?? []} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormSegmented.displayName = \"HISD3FormSegmented\";\n\nexport type HISD3TransferRef = GetRef<typeof Transfer>;\nexport type HISD3FormTransferProps = HISD3FormFieldProps<TransferProps>;\n\n/**\n * Two-list picker. The form value is the right-hand keys (`targetKeys`);\n * pass the full list as `fieldProps.dataSource`.\n */\nexport const HISD3FormTransfer: HISD3FormFieldComponent<HISD3FormTransferProps, HISD3TransferRef> =\n forwardRef<HISD3TransferRef, HISD3FormTransferProps>(\n ({ fieldProps, loadingProps, ...field }, ref) => (\n <HISD3FormField\n valuePropName=\"targetKeys\"\n loadingProps={{ ...loadingProps, style: { height: 200, ...loadingProps?.style } }}\n {...field}\n >\n <Transfer {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n );\nHISD3FormTransfer.displayName = \"HISD3FormTransfer\";\n\n/* -------------------------------------------------------------------------- */\n/* Range & rating */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3SliderRef = GetRef<typeof Slider>;\nexport type HISD3FormSliderProps = HISD3FormFieldProps<GetProps<typeof Slider>>;\n\n/** Slider; `fieldProps.range` makes the value `[min, max]`. */\nexport const HISD3FormSlider: HISD3FormFieldComponent<HISD3FormSliderProps, HISD3SliderRef> =\n forwardRef<HISD3SliderRef, HISD3FormSliderProps>(({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize=\"small\">\n <Slider {...fieldProps} ref={ref} />\n </HISD3FormField>\n ));\nHISD3FormSlider.displayName = \"HISD3FormSlider\";\n\nexport type HISD3RateRef = GetRef<typeof Rate>;\nexport type HISD3FormRateProps = HISD3FormFieldProps<RateProps>;\n\n/** Star rating. */\nexport const HISD3FormRate: HISD3FormFieldComponent<HISD3FormRateProps, HISD3RateRef> =\n forwardRef<HISD3RateRef, HISD3FormRateProps>(({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} skeleton={smallSkeleton((fieldProps?.count ?? 5) * 28)}>\n <Rate {...fieldProps} ref={ref} />\n </HISD3FormField>\n ));\nHISD3FormRate.displayName = \"HISD3FormRate\";\n\nexport type HISD3FormColorPickerProps = HISD3FormFieldProps<ColorPickerProps>;\n\n/**\n * Colour picker. The form value is the colour as a string in\n * `fieldProps.format` (hex by default, e.g. \"#1677ff\"), not antd's Color\n * object. Pass your own `getValueFromEvent` to keep the object instead.\n */\nexport const HISD3FormColorPicker: React.FC<HISD3FormColorPickerProps> = ({\n fieldProps,\n ...field\n}) => (\n <HISD3FormField\n getValueFromEvent={(_color: unknown, css: string) => css}\n skeleton={<Skeleton.Button active shape=\"square\" />}\n {...field}\n >\n <ColorPicker {...fieldProps} />\n </HISD3FormField>\n);\nHISD3FormColorPicker.displayName = \"HISD3FormColorPicker\";\n\n/* -------------------------------------------------------------------------- */\n/* Upload */\n/* -------------------------------------------------------------------------- */\n\n/** Maps Upload's onChange event to its file list, so the form value is `UploadFile[]`. */\nexport const normalizeUploadFileList = (e: unknown): UploadFile[] => {\n if (Array.isArray(e)) return e as UploadFile[];\n return (e as { fileList?: UploadFile[] } | undefined)?.fileList ?? [];\n};\n\nexport interface HISD3FormUploadProps extends HISD3FormFieldProps<UploadProps> {\n /** The trigger, e.g. a \"Select file\" button. */\n children?: React.ReactNode;\n}\n\n/** File upload. The form value is the `UploadFile[]` list. */\nexport const HISD3FormUpload: React.FC<HISD3FormUploadProps> = ({\n fieldProps,\n children,\n ...field\n}) => (\n <HISD3FormField\n valuePropName=\"fileList\"\n getValueFromEvent={normalizeUploadFileList}\n skeleton={<Skeleton.Button active />}\n {...field}\n >\n <Upload {...fieldProps}>{children ?? fieldProps?.children}</Upload>\n </HISD3FormField>\n);\nHISD3FormUpload.displayName = \"HISD3FormUpload\";\n\n/** Drag-and-drop upload area. The form value is the `UploadFile[]` list. */\nexport const HISD3FormUploadDragger: React.FC<HISD3FormUploadProps> = ({\n fieldProps,\n children,\n loadingProps,\n ...field\n}) => (\n <HISD3FormField\n valuePropName=\"fileList\"\n getValueFromEvent={normalizeUploadFileList}\n loadingProps={{ ...loadingProps, style: { height: 150, ...loadingProps?.style } }}\n {...field}\n >\n <Upload.Dragger {...fieldProps}>{children ?? fieldProps?.children}</Upload.Dragger>\n </HISD3FormField>\n);\nHISD3FormUploadDragger.displayName = \"HISD3FormUploadDragger\";\n\nexport default HISD3FormInput;\n","import {\n Fragment,\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type ComponentType,\n type ReactNode,\n} from \"react\";\n\n/**\n * Open a drawer or modal from anywhere, without the page holding its state.\n *\n * const showRecord = useDialog(RecordEventDrawer);\n * showRecord({ fundYear, balances }, (batchId) => { if (batchId) refetch(); });\n *\n * The page no longer owns `const [open, setOpen] = useState(false)` for every\n * drawer it can show, nor renders each one inline with `open={…}`; it calls a\n * function with the props and, optionally, what to do with the result. The\n * component gets two extra props — `open` and `hide(result)` — and hands its\n * result back through `hide`, which is what reaches the second argument.\n *\n * Same shape as the `useModal`-based `UseDrawer` used in the other HISD3 apps,\n * implemented here without `react-modal-hook`: that library predates React 18,\n * and this is forty lines. Two differences worth knowing:\n *\n * - `open` is passed so antd can animate the close. `hide` sets it false,\n * fires the callback at once, and unmounts after the animation.\n * - Props are captured when `show` is called. A drawer whose parent used to\n * feed it live state (`saving`) owns that state itself now.\n *\n * Dialogs render under `DialogProvider`. Put it inside whatever providers a\n * dialog may need — the account and Apollo providers, and `HISD3Provider` for\n * the theme — so a drawer may use every hook a page may.\n */\n\n/** What every dialog component receives on top of its own props. */\nexport type DialogProps<R = void> = {\n /** True while shown; false during the close animation. Pass to antd's `open`. */\n open: boolean;\n /** Close, handing a result to whoever opened the dialog. */\n hide: (result?: R) => void;\n};\n\n/** The result type a component's `hide` carries. */\nexport type DialogResult<P> = P extends { hide: (result?: infer R) => void } ? R : void;\n\n/** A component's own props, without the two the hook supplies. */\nexport type DialogOwnProps<P> = Omit<P, keyof DialogProps>;\n\ntype Host = {\n mount: (id: number, node: ReactNode) => void;\n unmount: (id: number) => void;\n};\n\nconst DialogHostContext = createContext<Host | null>(null);\n\n/** Long enough for antd's drawer and modal close transitions. */\nconst CLOSE_ANIMATION_MS = 320;\n\nlet sequence = 0;\n\n/** Where every open dialog renders. Once, near the root of the app. */\nexport function DialogProvider({ children }: { children: ReactNode }) {\n const [instances, setInstances] = useState<{ id: number; node: ReactNode }[]>([]);\n\n const host = useMemo<Host>(\n () => ({\n mount: (id, node) =>\n setInstances((current) => [...current.filter((i) => i.id !== id), { id, node }]),\n unmount: (id) => setInstances((current) => current.filter((i) => i.id !== id)),\n }),\n [],\n );\n\n return (\n <DialogHostContext.Provider value={host}>\n {children}\n {instances.map((instance) => (\n <Fragment key={instance.id}>{instance.node}</Fragment>\n ))}\n </DialogHostContext.Provider>\n );\n}\n\nfunction DialogInstance<P extends DialogProps<R>, R>({\n Component,\n props,\n onClose,\n unmount,\n}: {\n Component: ComponentType<P>;\n props: DialogOwnProps<P>;\n onClose?: (result?: R) => void;\n unmount: () => void;\n}) {\n const [open, setOpen] = useState(true);\n const closed = useRef(false);\n\n const hide = useCallback(\n (result?: R) => {\n // A second call — the user hits Escape during the animation — must not\n // fire the callback twice.\n if (closed.current) return;\n closed.current = true;\n setOpen(false);\n onClose?.(result);\n window.setTimeout(unmount, CLOSE_ANIMATION_MS);\n },\n [onClose, unmount],\n );\n\n const all = { ...props, open, hide } as P;\n return <Component {...all} />;\n}\n\n/**\n * A function that shows `Component` with the given props. Its second argument\n * receives whatever the component passes to `hide`.\n */\nexport function useDialog<P extends DialogProps<DialogResult<P>>>(\n Component: ComponentType<P>,\n) {\n const host = useContext(DialogHostContext);\n if (!host) throw new Error(\"useDialog needs DialogProvider above it.\");\n\n return useCallback(\n (props: DialogOwnProps<P>, onClose?: (result?: DialogResult<P>) => void) => {\n const id = (sequence += 1);\n host.mount(\n id,\n <DialogInstance<P, DialogResult<P>>\n key={id}\n Component={Component}\n props={props}\n onClose={onClose}\n unmount={() => host.unmount(id)}\n />,\n );\n },\n [Component, host],\n );\n}\n\nexport default useDialog;\n","export enum ThemeStyle {\n MODERN = \"modern\",\n STANDARD = \"standard\",\n}\nexport enum ThemeStyleRadius {\n MODERN = \"30px\",\n STANDARD = \"16px\",\n}\nexport enum ThemeMode {\n LIGHT = \"light\",\n SEMI_DARK = \"semi-dark\",\n DARK = \"dark\",\n}\nexport enum LayoutType {\n FULL_WIDTH = \"full-width\",\n BOXED = \"boxed\",\n FRAMED = \"framed\",\n}\n\nexport enum MenuStyle {\n DEFAULT = \"default\",\n STANDARD = \"standard\",\n ROUNDED = \"rounded\",\n ROUNDED_REVERSE = \"rounded-reverse\",\n CURVED_MENU = \"curved-menu\",\n}\n\nexport enum NavStyle {\n DEFAULT = \"default\",\n MINI = \"mini\",\n MINI_SIDEBAR_TOGGLE = \"mini-sidebar-toggle\",\n STANDARD = \"standard\",\n HEADER_USER = \"user-header\",\n HEADER_USER_MINI = \"user-mini-header\",\n DRAWER = \"drawer\",\n BIT_BUCKET = \"bit-bucket\",\n H_DEFAULT = \"h-default\",\n HOR_HEADER_FIXED = \"hor-header-fixed\",\n HOR_DARK_LAYOUT = \"hor-dark-layout\",\n}\nexport enum FooterType {\n FIXED = \"fixed\",\n FLUID = \"fluid\",\n}\nexport enum LayoutDirection {\n RTL = \"rtl\",\n LTR = \"ltr\",\n}\nexport enum HeaderType {\n DARK = \"dark\",\n LIGHT = \"light\",\n}\nexport enum RouteTransition {\n NONE = \"none\",\n FADE = \"fade\",\n SLIDE_LEFT = \"slideLeft\",\n SLIDE_RIGHT = \"slideRight\",\n SLIDE_UP = \"slideUp\",\n SLIDE_DOWN = \"slideDown\",\n}\nexport enum Fonts {\n LIGHT = \"300\",\n REGULAR = \"400\",\n MEDIUM = \"500\",\n BOLD = \"600\",\n}\n\nexport enum AuthType {\n FIREBASE = \"firebase\",\n AWS_COGNITO = \"aws_cognito\",\n AUTH0 = \"auth0\",\n JWT_AUTH = \"jwt_auth\",\n}\n\nexport enum AppAnimates {\n SLIDEUPIN = \"transition.slideUpIn\",\n SLIDEUPOUT = \"transition.slideUpOut\",\n SLIDEDOWNIN = \"transition.slideDownIn\",\n SLIDEDOWNOUT = \"transition.slideDownOut\",\n SLIDELEFTIN = \"transition.slideLeftIn\",\n SLIDELEFTOUT = \"transition.slideLeftOut\",\n SLIDERIGHTIN = \"transition.slideRightIn\",\n SLIDERIGHTOUT = \"transition.slideRightOut\",\n FADEIN = \"transition.fadeIn\",\n FADEOUT = \"transition.fadeOut\",\n}\n\nexport const AppAnimateGroups = {\n SLIDEUPIN: {\n hidden: {\n y: 0,\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: {\n ease: \"easeIn\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.2,\n staggerChildren: 0.05,\n },\n },\n },\n SLIDEUPOUT: {\n hidden: {\n y: 0,\n },\n visible: {\n opacity: 0,\n y: \"100vh\",\n transition: {\n ease: \"easeOut\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDEDOWNIN: {\n hidden: {\n opacity: 0,\n y: \"-100vh\",\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: {\n ease: \"easeIn\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDEDOWNOUT: {\n hidden: {\n y: 0,\n },\n visible: {\n opacity: 0,\n y: \"-100vh\",\n transition: {\n ease: \"easeOut\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDELEFTIN: {\n hidden: {\n x: \"100vw\",\n },\n visible: {\n opacity: 1,\n x: 0,\n transition: {\n ease: \"easeIn\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDELEFTOUT: {\n hidden: {\n x: 0,\n },\n visible: {\n opacity: 0,\n x: \"100vw\",\n transition: {\n ease: \"easeOut\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDERIGHTIN: {\n hidden: {\n x: \"-100vw\",\n },\n visible: {\n opacity: 1,\n x: 0,\n transition: {\n ease: \"easeIn\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDERIGHTOUT: {\n hidden: {\n x: 0,\n },\n visible: {\n opacity: 0,\n x: \"-100vw\",\n transition: {\n ease: \"easeOut\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n FADEIN: {\n hidden: {\n opacity: 0,\n scale: 1,\n },\n visible: {\n opacity: 1,\n scale: 1,\n transition: {\n ease: \"easeIn\",\n when: \"beforeChildren\",\n staggerChildren: 0.15,\n },\n },\n },\n FADEOUT: {\n hidden: {\n opacity: 1,\n scale: 1,\n },\n visible: {\n opacity: 0,\n scale: 1,\n transition: {\n ease: \"easeOut\",\n when: \"beforeChildren\",\n staggerChildren: 0.15,\n },\n },\n },\n NOANIMATION: {\n hidden: {\n opacity: 1,\n },\n visible: {\n opacity: 1,\n },\n },\n};\n\nexport const AppMotionAnimate = {\n SLIDEUPIN: {\n variants: {\n hidden: {\n y: 100,\n opacity: 0,\n },\n visible: {\n opacity: 1,\n y: 0,\n },\n },\n transition: {\n ease: \"easeIn\",\n when: \"beforeChildren\",\n },\n },\n SLIDEUPOUT: {\n variants: {\n hidden: {\n y: 0,\n opacity: 1,\n },\n visible: {\n opacity: 0,\n y: \"-100vh\",\n },\n },\n transition: {\n ease: \"easeOut\",\n when: \"beforeChildren\",\n },\n },\n SLIDEDOWNIN: {\n variants: {\n hidden: {\n y: -100,\n opacity: 0,\n },\n visible: {\n opacity: 1,\n y: 0,\n },\n },\n transition: {\n ease: \"easeIn\",\n when: \"beforeChildren\",\n },\n },\n SLIDEDOWNOUT: {\n variants: {\n hidden: {\n y: 0,\n opacity: 1,\n },\n visible: {\n opacity: 0,\n y: \"100vh\",\n },\n },\n transition: {\n ease: \"easeOut\",\n when: \"beforeChildren\",\n },\n },\n SLIDELEFTIN: {\n variants: {\n hidden: {\n x: 100,\n opacity: 0,\n },\n visible: {\n opacity: 1,\n x: 0,\n },\n },\n transition: {\n ease: \"easeIn\",\n when: \"beforeChildren\",\n },\n },\n SLIDELEFTOUT: {\n variants: {\n hidden: {\n x: 0,\n opacity: 1,\n },\n visible: {\n opacity: 0,\n x: \"-100vw\",\n },\n },\n transition: {\n ease: \"easeOut\",\n when: \"beforeChildren\",\n },\n },\n SLIDERIGHTIN: {\n variants: {\n hidden: {\n x: -100,\n opacity: 0,\n },\n visible: {\n opacity: 1,\n x: 0,\n },\n },\n transition: {\n ease: \"easeIn\",\n when: \"beforeChildren\",\n },\n },\n SLIDERIGHTOUT: {\n variants: {\n hidden: {\n x: 0,\n opacity: 1,\n },\n visible: {\n opacity: 0,\n x: \"-100vw\",\n },\n },\n transition: {\n ease: \"easeOut\",\n when: \"beforeChildren\",\n },\n },\n FADEIN: {\n variants: {\n hidden: {\n opacity: 0,\n },\n visible: {\n opacity: 1,\n },\n },\n transition: {\n duration: 0.1,\n ease: \"easeIn\",\n when: \"beforeChildren\",\n },\n },\n FADEOUT: {\n variants: {\n hidden: {\n opacity: 1,\n },\n visible: {\n opacity: 0,\n },\n },\n transition: {\n duration: 0.1,\n ease: \"easeOut\",\n when: \"beforeChildren\",\n },\n },\n};\n\nexport enum MessageType {\n MEDIA = 1,\n TEXT = 2,\n}\n\nexport enum RoutePermittedRole {\n Admin = \"admin\",\n User = \"user\",\n}\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","HISD3_LAYOUT","siderWidth","siderCollapsedWidth","topBarHeight","pageGutter","HISD3_PRESETS","brand","brandBlue","red","orange","teal","blue","green","purple","HISD3_NEUTRALS","bgLayout","bgContainer","bgElevated","bgFilled","bgFilledHover","text","textSecondary","textTertiary","border","borderSecondary","borderStrong","white","HISD3_BORDER_PRESETS","hairline","width","bold","HISD3_FONT_FAMILY","HISD3_FONT_WEIGHT_HEADING","HISD3_FONT_WEIGHT_BODY","resolvePrimary","primary","shade","hex","amount","h","replace","full","length","split","map","c","join","n","parseInt","Math","round","mix","toString","padStart","tint","g","b","createHisd3Theme","radius","borders","lineWidth","overrides","p","base","cssVar","key","token","colorPrimary","colorInfo","colorLink","colorPrimaryBg","colorPrimaryBgHover","colorPrimaryBorder","fontFamily","fontSize","fontWeightStrong","borderRadius","borderRadiusLG","borderRadiusSM","borderRadiusXS","colorBgLayout","colorBgContainer","colorBgElevated","colorText","colorTextSecondary","colorTextTertiary","colorTextHeading","colorBorder","colorBorderSecondary","colorSplit","controlHeight","controlHeightLG","controlHeightSM","boxShadow","boxShadowSecondary","components","Layout","siderBg","headerBg","bodyBg","headerPadding","Menu","itemBg","subMenuItemBg","itemColor","itemHoverColor","itemHoverBg","itemSelectedBg","itemSelectedColor","itemActiveBg","subMenuItemSelectedColor","groupTitleColor","groupTitleFontSize","itemBorderRadius","itemMarginInline","itemMarginBlock","itemHeight","itemPaddingInline","iconSize","collapsedIconSize","activeBarBorderWidth","activeBarWidth","Button","fontWeight","primaryShadow","defaultShadow","dangerShadow","defaultBorderColor","defaultColor","defaultBg","defaultHoverBg","defaultHoverBorderColor","defaultHoverColor","defaultActiveBorderColor","paddingInline","contentFontSize","contentFontSizeLG","contentFontSizeSM","Input","activeShadow","hoverBorderColor","activeBorderColor","Select","optionSelectedBg","Table","headerColor","headerSplitColor","headerBorderRadius","borderColor","rowHoverBg","cellPaddingBlock","cellPaddingInline","cellFontSize","cellPaddingBlockMD","cellPaddingInlineMD","cellPaddingBlockSM","cellPaddingInlineSM","cellFontSizeMD","cellFontSizeSM","footerBg","Tabs","inkBarColor","titleFontSize","horizontalItemGutter","horizontalMargin","lineWidthBold","Tag","Pagination","itemSize","itemSizeSM","itemInputBg","Dropdown","paddingBlock","Breadcrumb","lastItemColor","linkColor","linkHoverColor","separatorColor","Card","headerFontSize","hisd3VarsCss","borderVarsCss","hisd3AntdTheme","HISD3_COLORS","primaryLight","headerSelectedBg","HISD3ProviderContext","createContext","useInsideHISD3Provider","useContext","HISD3Provider","theme","styledTheme","children","antdTheme","useMemo","vars","_jsxs","Provider","value","_jsx","dangerouslySetInnerHTML","__html","ConfigProvider","ThemeProvider","AntdApp","component","Header","Content","SIDER_WIDTH","SIDER_COLLAPSED_WIDTH","HEADER_HEIGHT","StyledRoot","styled","$appShell","StyledMain","$scroll","StyledSiderMenuWrap","div","StyledBrand","a","$collapsed","StyledHeader","StyledSiderHeader","StyledCollapseTrigger","button","StyledEdgeTrigger","$top","$left","StyledContent","StyledCrUserInfo","$inHeader","StyledCrUserInfoInner","StyledCrUserInfoAvatar","span","$src","StyledCrUserInfoContent","StyledUsernameInfo","StyledUsername","h3","StyledUserArrow","StyledCrUserDesignation","itemKey","item","index","path","toAntdMenuItems","items","renderLink","filter","hideInMenu","Array","isArray","icon","label","name","disabled","group","undefined","defaultRenderLink","href","UserMenu","account","avatarSrc","settingsUrl","onLogout","collapsed","placement","extraItems","modal","App","useApp","SettingOutlined","onClick","window","location","LogoutOutlined","confirm","title","content","ExclamationCircleOutlined","onOk","initials","fullName","w","Boolean","slice","toUpperCase","className","trigger","menu","e","preventDefault","DownOutlined","positionType","Sider","HISD3Sidebar","logoUrl","appName","menuItems","pathname","renderMenuLink","headerExtra","userMenuItems","onCollapse","loading","hideSidebar","layoutTop","hideCollapseTrigger","collapseTrigger","collapseTriggerOffset","bareContent","hideHeaderBar","brandHref","hideAccountCard","scrollContent","insideProvider","resolvedTheme","isCollapsed","setIsCollapsed","useState","useEffect","selection","best","walk","list","parents","forEach","startsWith","exact","selectedKey","openKeys","findSelection","setOpenKeys","prev","from","Set","toggleCollapse","next","selectedKeys","collapseLabel","src","alt","body","Spin","spinning","size","_Fragment","mode","hasSider","collapsedWidth","collapsible","breakpoint","onBreakpoint","broken","inlineCollapsed","onOpenChange","keys","MenuUnfoldOutlined","MenuFoldOutlined","flex","RightOutlined","LeftOutlined","PAGE_GUTTER","HeaderWrap","header","TopBar","Actions","TitleBlock","HISD3PageBody","HISD3PageHeader","subtitle","breadcrumb","extra","leading","hideTopBar","HISD3_LOGO_SRC","StyledButton","secondary","ghost","danger","HISD3Button","variant","rest","soft","v","SPLIT_BREAKPOINT","MOBILE_BREAKPOINT","StyledPage","$side","StyledPanel","aside","$variant","gap","StyledPanelBrand","StyledPanelImage","StyledPanelPattern","StyledWatermark","StyledCorner","pos","StyledCard","form","StyledTitle","h1","StyledSubtitle","StyledField","StyledRow","StyledError","StyledFoot","HISD3LoginPage","tagline","logoSrc","panelTitle","panelSubtitle","panelImage","organisationName","side","identifierLabel","identifierPlaceholder","passwordLabel","passwordPlaceholder","submitLabel","hideRemember","rememberLabel","onForgotPassword","forgotLabel","error","onSubmit","footer","identifier","setIdentifier","password","setPassword","remember","setRemember","reveal","setReveal","noValidate","role","onChange","target","placeholder","autoComplete","autoFocus","tabIndex","EyeInvisibleOutlined","EyeOutlined","Switch","checked","htmlType","block","height","HeaderIconButton","$size","$open","CountBadge","Panel","PanelHeader","List","Row","$unread","RowIcon","RowBody","UnreadDot","PanelFooter","EmptyWrap","HISD3NotificationButton","count","onMarkAllRead","onSeeAll","seeAllLabel","emptyText","open","setOpen","unread","i","panel","textAlign","Empty","image","PRESENTED_IMAGE_SIMPLE","description","BellFilled","time","id","popupRender","Trigger","$shape","Chevron","Identity","IdentityAvatar","getInitials","HISD3AvatarMenu","onSettings","confirmLogout","shape","hideChevron","okText","Wrap","Divider","HISD3HeaderActions","divided","kids","React","Children","toArray","child","Fragment","FooterStrip","PagerBar","SizeGroup","defaultTotal","total","toLocaleString","HISD3Table","pagination","tableProps","sizes","pageSizeOptions","renderTotal","current","pageSize","min","showSizeChanger","page","itemRender","_","el","hidePageSize","s","StyledTabs","HISD3Tabs","toneVar","default","success","warning","toneBgVar","StyledTag","$tone","color","bg","HISD3Tag","tone","StyledInput","HISD3Input","forwardRef","props","displayName","StyledSearch","SEARCH_SIZE_CLASS","small","middle","large","HISD3SearchInput","compact","allowClear","prefix","SearchOutlined","trim","HISD3SelectLabel","mono","asText","node","String","flatten","options","flatMap","option","filterWithDescription","input","includes","names","HISD3Select","wrap","monoLabel","showSearch","filterOption","optionFilterProp","optionRender","labelRender","virtual","rootClassName","byValue","Map","hasDescriptions","values","some","render","fallback","searchConfig","data","get","StyledItem","Form","Item","FieldSkeleton","HISD3FormField","loadingProps","vertical","bolderLabel","controlSize","skeleton","layout","itemProps","Skeleton","active","smallSkeleton","minWidth","HISD3FormInput","fieldProps","propsinput","field","inputProps","HISD3FormPassword","Password","HISD3FormTextArea","rows","TextArea","HISD3FormInputNumber","InputNumber","HISD3FormSelect","HISD3FormRadioGroup","Radio","Group","HISD3FormCheckbox","valuePropName","Checkbox","HISD3FormCheckboxGroup","HISD3FormSwitch","HISD3FormDatePicker","DatePicker","HISD3FormRangePicker","RangePicker","HISD3FormTimePicker","TimePicker","HISD3FormTimeRangePicker","HISD3FormSearch","Search","HISD3FormOTP","OTP","HISD3FormAutoComplete","AutoComplete","HISD3FormMentions","Mentions","HISD3FormCascader","Cascader","HISD3FormTreeSelect","TreeSelect","HISD3FormSegmented","Segmented","HISD3FormTransfer","Transfer","HISD3FormSlider","Slider","HISD3FormRate","Rate","HISD3FormColorPicker","getValueFromEvent","_color","ColorPicker","normalizeUploadFileList","fileList","HISD3FormUpload","Upload","HISD3FormUploadDragger","Dragger","DialogHostContext","sequence","DialogProvider","instances","setInstances","host","mount","unmount","instance","DialogInstance","Component","onClose","closed","useRef","all","hide","useCallback","result","setTimeout","useDialog","Error","ThemeStyle","ThemeStyleRadius","ThemeMode","LayoutType","MenuStyle","NavStyle","FooterType","LayoutDirection","HeaderType","RouteTransition","Fonts","AuthType","AppAnimates","AppAnimateGroups","SLIDEUPIN","hidden","y","visible","opacity","transition","ease","delay","when","duration","staggerChildren","SLIDEUPOUT","SLIDEDOWNIN","SLIDEDOWNOUT","SLIDELEFTIN","x","SLIDELEFTOUT","SLIDERIGHTIN","SLIDERIGHTOUT","FADEIN","scale","FADEOUT","NOANIMATION","AppMotionAnimate","variants","MessageType","RoutePermittedRole"],"mappings":"6gCAAA,SAASA,GAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAE,GAC9B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBU,CAqBxD,0zICxBa,MAAAe,GAAe,CAC1BC,WAAY,IACZC,oBAAqB,GAErBC,aAAc,GAEdC,WAAY,ICFDC,GAAgB,CAE3BC,MAAO,UAEPC,UAAW,UACXC,IAAK,UACLC,OAAQ,UACRC,KAAM,UACNC,KAAM,UACNC,MAAO,UACPC,OAAQ,WAMGC,GAAiB,CAC5BC,SAAU,UACVC,YAAa,UACbC,WAAY,UACZC,SAAU,UACVC,cAAe,UACfC,KAAM,UACNC,cAAe,UACfC,aAAc,UAEdC,OAAQ,UAERC,gBAAiB,UAEjBC,aAAc,UACdC,MAAO,WAIIC,GAAuB,CAClCC,SAAU,CAAEC,MAA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G,IAGPV,WAAY,CACVC,KAAM,SACNE,KAAM,mBAGVQ,aAAc,CACZQ,SAAU,CACRvB,OAAQ,CACNc,EAAG,EACHX,QAAS,GAEXD,QAAS,CACPC,QAAS,EACTW,EAAG,WAGPV,WAAY,CACVC,KAAM,UACNE,KAAM,mBAGVS,aAAc,CACZO,SAAU,CACRvB,OAAQ,CACNc,GAAO,IACPX,QAAS,GAEXD,QAAS,CACPC,QAAS,EACTW,EAAG,IAGPV,WAAY,CACVC,KAAM,SACNE,KAAM,mBAGVU,cAAe,CACbM,SAAU,CACRvB,OAAQ,CACNc,EAAG,EACHX,QAAS,GAEXD,QAAS,CACPC,QAAS,EACTW,EAAG,WAGPV,WAAY,CACVC,KAAM,UACNE,KAAM,mBAGVW,OAAQ,CACNK,SAAU,CACRvB,OAAQ,CACNG,QAAS,GAEXD,QAAS,CACPC,QAAS,IAGbC,WAAY,CACVI,SAAU,GACVH,KAAM,SACNE,KAAM,mBAGVa,QAAS,CACPG,SAAU,CACRvB,OAAQ,CACNG,QAAS,GAEXD,QAAS,CACPC,QAAS,IAGbC,WAAY,CACVI,SAAU,GACVH,KAAM,UACNE,KAAM,wBAKAiB,GAKAC,IALZ,SAAYD,GACVA,EAAAA,EAAA,MAAA,GAAA,QACAA,EAAAA,EAAA,KAAA,GAAA,MACD,CAHD,CAAYA,KAAAA,GAGX,CAAA,IAED,SAAYC,GACVA,EAAA,MAAA,QACAA,EAAA,KAAA,MACD,CAHD,CAAYA,KAAAA,GAGX,CAAA","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../src/theme/layout.ts","../src/theme/antd.ts","../src/components/Provider/index.tsx","../src/assets/logo.ts","../src/components/Sidebar/index.styled.tsx","../src/components/Sidebar/menu.ts","../src/components/Sidebar/UserMenu.tsx","../src/components/Sidebar/index.tsx","../src/components/PageHeader/index.tsx","../src/components/Button/index.tsx","../src/components/LoginPage/index.styled.tsx","../src/components/LoginPage/index.tsx","../src/components/HeaderActions/NotificationButton.tsx","../src/components/HeaderActions/AvatarMenu.tsx","../src/components/HeaderActions/index.tsx","../src/components/Table/index.tsx","../src/components/Tabs/index.tsx","../src/components/Tag/index.tsx","../src/components/Input/index.tsx","../src/components/Select/index.tsx","../src/components/Form/index.tsx","../src/hooks/useDialog.tsx","../src/enum/theme.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/** Shared layout metrics so the sidebar brand block and page top bar line up. */\nexport const HISD3_LAYOUT = {\n siderWidth: 260,\n siderCollapsedWidth: 64,\n /** Height of both the sidebar brand block and the page top bar. */\n topBarHeight: 60,\n /** Horizontal padding used by the top bar, title block and page body. */\n pageGutter: 28,\n} as const;\n","import { theme as antdTheme, type MappingAlgorithm, type ThemeConfig } from \"antd\";\n\nimport { HISD3_LAYOUT } from \"./layout\";\n\n/** Named primary-color presets. Any hex string is also accepted. */\nexport const HISD3_PRESETS = {\n /** The HISD3 logo's gear colour. */\n brand: \"#E5533B\",\n /** The HISD3 logo's cloud colour. */\n brandBlue: \"#1B6FE0\",\n red: \"#E5401C\",\n orange: \"#F26B1D\",\n teal: \"#00796B\",\n blue: \"#1D5FD1\",\n green: \"#2E7D32\",\n purple: \"#6A3FD6\",\n} as const;\n\nexport type HISD3Preset = keyof typeof HISD3_PRESETS;\n\n/** Light or dark. Each person picks one; a module never forces it. */\nexport type HISD3ThemeMode = \"light\" | \"dark\";\n\n/** Neutral palette shared by every preset (the \"Backoffice\" look), light. */\nexport const HISD3_NEUTRALS = {\n bgLayout: \"#F3F2F0\",\n bgContainer: \"#F3F2F0\",\n bgElevated: \"#FFFFFF\",\n bgFilled: \"#E6E4E1\",\n bgFilledHover: \"#DBD8D4\",\n /** Inside a text field: lighter than the page, so it never reads as disabled. */\n bgField: \"#FAF9F7\",\n /** A table row under the pointer: solid, so a fixed column can sit on it. */\n bgRowHover: \"#EBEAE8\",\n /** A translucent hover wash for menu rows and list items. */\n hover: \"rgba(0,0,0,0.04)\",\n text: \"#171717\",\n textSecondary: \"#4A4A4A\",\n /** Placeholders, captions, the breadcrumb trail. 4.6:1 on the page. */\n textTertiary: \"#6E6E6E\",\n /** Structural rules: sidebar edge, header bottom, table header. */\n border: \"#D9D5CE\",\n /** Quieter rules: table rows, dividers inside popups. */\n borderSecondary: \"#E7E4DE\",\n /** Near-black, used for hover emphasis on outlined buttons. */\n borderStrong: \"#1F1F1F\",\n /** The edge of every form field: 3.1:1 on the page, so a field is findable. */\n controlBorder: \"#8C8A85\",\n controlBorderHover: \"#5F5D59\",\n /** Behind a drawer or modal. */\n mask: \"rgba(23,23,23,0.45)\",\n white: \"#FFFFFF\",\n} as const;\n\n/** The same roles on a warm near-black. */\nexport const HISD3_NEUTRALS_DARK = {\n bgLayout: \"#1A1917\",\n bgContainer: \"#1A1917\",\n /** Popups sit lighter than the page, so they still lift. */\n bgElevated: \"#262522\",\n bgFilled: \"#2E2D2A\",\n bgFilledHover: \"#393734\",\n bgField: \"#201F1D\",\n bgRowHover: \"#22211F\",\n hover: \"rgba(255,255,255,0.05)\",\n text: \"#EEEDEA\",\n textSecondary: \"#C2C0BB\",\n textTertiary: \"#9C9A94\",\n border: \"#3A3936\",\n borderSecondary: \"#2C2B29\",\n borderStrong: \"#EEEDEA\",\n controlBorder: \"#77746E\",\n controlBorderHover: \"#A8A59F\",\n mask: \"rgba(0,0,0,0.6)\",\n white: \"#FFFFFF\",\n} as const;\n\n/**\n * Status colours. Separate from the primary and the same in every module;\n * each text colour reads at 4.5:1 or more on its own tint and on the page.\n */\nexport const HISD3_STATUS = {\n light: {\n success: \"#2E7D32\",\n successBg: \"#EAF3EA\",\n error: \"#B42318\",\n errorBg: \"#FBEAE7\",\n warning: \"#B54708\",\n warningBg: \"#FBEFE3\",\n },\n dark: {\n success: \"#6FBF73\",\n successBg: \"#283426\",\n error: \"#FF8A7A\",\n errorBg: \"#3F2B27\",\n warning: \"#F0A35E\",\n warningBg: \"#3C2F22\",\n },\n} as const;\n\n/** Border weights. \"hairline\" is the default modern look. */\nexport const HISD3_BORDER_PRESETS = {\n hairline: { width: 1, border: \"#D9D5CE\", borderSecondary: \"#E7E4DE\" },\n bold: { width: 2, border: \"#1F1F1F\", borderSecondary: \"#CFCDC9\" },\n} as const;\n\n/** The border presets in dark mode. */\nexport const HISD3_BORDER_PRESETS_DARK = {\n hairline: { width: 1, border: \"#3A3936\", borderSecondary: \"#2C2B29\" },\n bold: { width: 2, border: \"#C2C0BB\", borderSecondary: \"#3A3936\" },\n} as const;\n\nexport type HISD3Borders = keyof typeof HISD3_BORDER_PRESETS;\n\nexport const HISD3_FONT_FAMILY =\n \"'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif\";\n/** Archivo is used for both body (400) and headings (800). */\nexport const HISD3_FONT_WEIGHT_HEADING = 800;\nexport const HISD3_FONT_WEIGHT_BODY = 400;\n\nexport interface HISD3ThemeOptions {\n /** Preset name or any hex color. Default \"red\". */\n primary?: HISD3Preset | string;\n /** Light (default) or dark. */\n mode?: HISD3ThemeMode;\n /** Corner radius in px. The Backoffice look is square (0). */\n radius?: number;\n /**\n * Border treatment. \"hairline\" (default) uses 1px warm-grey rules;\n * \"bold\" restores the 2px near-black look.\n */\n borders?: HISD3Borders;\n /** Explicit border width in px; overrides the `borders` preset. */\n lineWidth?: number;\n /** Override / extend the generated antd theme. */\n overrides?: ThemeConfig;\n}\n\nexport const resolvePrimary = (primary: HISD3Preset | string = \"red\"): string =>\n (HISD3_PRESETS as Record<string, string>)[primary] ?? primary;\n\nconst toRgb = (hex: string): [number, number, number] => {\n const h = hex.replace(\"#\", \"\");\n const full = h.length === 3 ? h.split(\"\").map((c) => c + c).join(\"\") : h;\n const n = parseInt(full, 16);\n return [(n >> 16) & 255, (n >> 8) & 255, n & 255];\n};\n\nconst toHex = (rgb: number[]): string =>\n `#${rgb.map((c) => Math.round(c).toString(16).padStart(2, \"0\")).join(\"\")}`;\n\n/**\n * Mix a hex color with black: amount 0 → color, 1 → black.\n *\n * Used for table backgrounds. A fixed column is `position: sticky`, so the rest\n * of the row scrolls underneath it and its cells must be opaque — every Table\n * background token has to be a solid blend, never an alpha overlay.\n */\nexport const shade = (hex: string, amount: number): string =>\n toHex(toRgb(hex).map((c) => c * (1 - amount)));\n\n/** Mix a hex color with white: amount 0 → color, 1 → white. */\nexport const tint = (hex: string, amount: number): string =>\n toHex(toRgb(hex).map((c) => c + (255 - c) * amount));\n\n/** Mix two hex colors: amount 0 → `a`, 1 → `b`. */\nexport const mix = (a: string, b: string, amount: number): string => {\n const x = toRgb(a);\n const y = toRgb(b);\n return toHex(x.map((c, i) => c + (y[i] - c) * amount));\n};\n\nconst luminance = (hex: string): number => {\n const [r, g, b] = toRgb(hex).map((c) => {\n const s = c / 255;\n return s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\n/** WCAG 2 contrast ratio between two hex colours (1 to 21). */\nexport const contrastRatio = (a: string, b: string): number => {\n const [hi, lo] = [luminance(a), luminance(b)].sort((x, y) => y - x);\n return (hi + 0.05) / (lo + 0.05);\n};\n\n/** The primary as the kit applies it, and the colours derived from it. */\nexport interface HISD3PrimaryPalette {\n /** The colour as asked for. Logos and illustrations only. */\n source: string;\n /** Buttons, links, the selected menu item, the active tab. */\n primary: string;\n /** Text and icons on a `primary` fill. */\n onPrimary: string;\n /** The selected menu row, a selected option, a soft primary tag. */\n primaryBg: string;\n primaryBgHover: string;\n primaryBorder: string;\n}\n\n/**\n * Make any primary readable. In light mode it is darkened until it reads at\n * 4.5:1 on the page, on its own tint and under white text; in dark mode it is\n * lightened until it reads at 4.5:1 on the page and on its own tint, and\n * carries dark text. Teal, Blue, Green and Purple are used as given in light\n * mode; Red, Orange and Brand come out a little darker.\n */\nexport const resolvePrimaryPalette = (\n primary: HISD3Preset | string = \"red\",\n mode: HISD3ThemeMode = \"light\",\n): HISD3PrimaryPalette => {\n const source = resolvePrimary(primary);\n if (mode === \"dark\") {\n const page = HISD3_NEUTRALS_DARK.bgLayout;\n let p = source;\n for (let t = 0; t <= 1; t += 0.01) {\n p = mix(source, \"#FFFFFF\", t);\n if (contrastRatio(p, page) >= 4.5 && contrastRatio(p, mix(page, p, 0.14)) >= 4.5) break;\n }\n return {\n source,\n primary: p,\n onPrimary: page,\n primaryBg: mix(page, p, 0.14),\n primaryBgHover: mix(page, p, 0.22),\n primaryBorder: mix(page, p, 0.45),\n };\n }\n const page = HISD3_NEUTRALS.bgLayout;\n let p = source;\n for (let a = 0; a <= 1; a += 0.01) {\n p = shade(source, a);\n if (\n contrastRatio(p, page) >= 4.5 &&\n contrastRatio(p, \"#FFFFFF\") >= 4.5 &&\n contrastRatio(p, tint(p, 0.92)) >= 4.5\n )\n break;\n }\n return {\n source,\n primary: p,\n onPrimary: \"#FFFFFF\",\n primaryBg: tint(p, 0.92),\n primaryBgHover: tint(p, 0.86),\n primaryBorder: tint(p, 0.6),\n };\n};\n\nconst neutralsFor = (mode: HISD3ThemeMode, borders: HISD3Borders) => {\n const dark = mode === \"dark\";\n const n = dark ? HISD3_NEUTRALS_DARK : HISD3_NEUTRALS;\n const presets = dark ? HISD3_BORDER_PRESETS_DARK : HISD3_BORDER_PRESETS;\n const b = presets[borders] ?? presets.hairline;\n return { n: { ...n, border: b.border, borderSecondary: b.borderSecondary }, b };\n};\n\n/**\n * Build the HISD3 Ant Design v6 theme.\n *\n * ```ts\n * <ConfigProvider theme={createHisd3Theme({ primary: \"teal\", mode: \"dark\" })}>\n * ```\n */\nexport const createHisd3Theme = ({\n primary,\n mode = \"light\",\n radius = 0,\n borders = \"hairline\",\n lineWidth,\n overrides,\n}: HISD3ThemeOptions = {}): ThemeConfig => {\n const pal = resolvePrimaryPalette(primary, mode);\n const p = pal.primary;\n const { n, b } = neutralsFor(mode, borders);\n const s = HISD3_STATUS[mode];\n const width = lineWidth ?? b.width;\n\n /*\n * Every form field shares one edge, one fill and one focus treatment: the\n * `controlBorder` edge (3:1 on the page), the field fill, and on focus a\n * 2px primary edge (the border plus a 1px ring), so a field is findable\n * without its fill and the focused one is unmistakable.\n */\n const field = {\n colorBorder: n.controlBorder,\n hoverBorderColor: n.controlBorderHover,\n activeBorderColor: p,\n activeShadow: `0 0 0 1px ${p}`,\n colorBgContainer: n.bgField,\n hoverBg: n.bgElevated,\n activeBg: n.bgElevated,\n };\n\n /*\n * antd's algorithms derive the brand and status colours from the seeds, and\n * the dark one shifts them to its own darker shades: #459D93 would render as\n * #3E8880 and fail contrast. This runs after it and puts the exact, checked\n * values back; everything else the algorithm derives (fills, hovers) stays.\n */\n const pinColours: MappingAlgorithm = (_seed, derived) => ({\n ...derived!,\n colorPrimary: p,\n colorInfo: p,\n colorLink: p,\n colorPrimaryText: p,\n colorPrimaryBg: pal.primaryBg,\n colorPrimaryBgHover: pal.primaryBgHover,\n colorPrimaryBorder: pal.primaryBorder,\n colorSuccess: s.success,\n colorSuccessText: s.success,\n colorSuccessBg: s.successBg,\n colorError: s.error,\n colorErrorText: s.error,\n colorErrorBg: s.errorBg,\n colorWarning: s.warning,\n colorWarningText: s.warning,\n colorWarningBg: s.warningBg,\n });\n\n const base: ThemeConfig = {\n algorithm: [mode === \"dark\" ? antdTheme.darkAlgorithm : antdTheme.defaultAlgorithm, pinColours],\n cssVar: { key: \"hisd3\" },\n token: {\n colorPrimary: p,\n colorInfo: p,\n colorLink: p,\n colorPrimaryBg: pal.primaryBg,\n colorPrimaryBgHover: pal.primaryBgHover,\n colorPrimaryBorder: pal.primaryBorder,\n colorSuccess: s.success,\n colorSuccessBg: s.successBg,\n colorSuccessBorder: s.success,\n colorError: s.error,\n colorErrorBg: s.errorBg,\n colorErrorBorder: s.error,\n colorWarning: s.warning,\n colorWarningBg: s.warningBg,\n colorWarningBorder: s.warning,\n fontFamily: HISD3_FONT_FAMILY,\n fontSize: 14,\n fontWeightStrong: 700,\n borderRadius: radius,\n borderRadiusLG: radius,\n borderRadiusSM: radius,\n borderRadiusXS: radius,\n lineWidth: width,\n colorBgLayout: n.bgLayout,\n colorBgContainer: n.bgContainer,\n colorBgElevated: n.bgElevated,\n colorBgMask: n.mask,\n colorBgContainerDisabled: n.bgFilled,\n colorText: n.text,\n colorTextSecondary: n.textSecondary,\n colorTextTertiary: n.textTertiary,\n colorTextPlaceholder: n.textTertiary,\n colorTextDisabled: n.textTertiary,\n colorTextHeading: n.text,\n colorBorder: n.border,\n colorBorderSecondary: n.borderSecondary,\n colorSplit: n.borderSecondary,\n controlHeight: 40,\n controlHeightLG: 52,\n controlHeightSM: 32,\n boxShadow: \"none\",\n boxShadowSecondary:\n mode === \"dark\"\n ? \"0 2px 6px rgba(0,0,0,0.3), 0 12px 32px rgba(0,0,0,0.5)\"\n : \"0 2px 6px rgba(16,15,14,0.06), 0 12px 32px rgba(16,15,14,0.14)\",\n },\n components: {\n Layout: {\n siderBg: n.bgLayout,\n headerBg: n.bgLayout,\n bodyBg: n.bgLayout,\n headerPadding: `0 ${HISD3_LAYOUT.pageGutter}px`,\n },\n Menu: {\n itemBg: \"transparent\",\n subMenuItemBg: \"transparent\",\n popupBg: n.bgElevated,\n itemColor: n.text,\n itemHoverColor: n.text,\n itemHoverBg: n.hover,\n itemSelectedBg: pal.primaryBg,\n itemSelectedColor: p,\n itemActiveBg: pal.primaryBgHover,\n subMenuItemSelectedColor: p,\n horizontalItemSelectedColor: p,\n horizontalItemHoverColor: p,\n groupTitleColor: n.textTertiary,\n groupTitleFontSize: 12,\n itemBorderRadius: 0,\n itemMarginInline: 0,\n itemMarginBlock: 0,\n itemHeight: 40,\n itemPaddingInline: HISD3_LAYOUT.pageGutter,\n iconSize: 16,\n collapsedIconSize: 18,\n activeBarBorderWidth: 0,\n activeBarWidth: 0,\n },\n Button: {\n fontWeight: 600,\n primaryShadow: \"none\",\n defaultShadow: \"none\",\n dangerShadow: \"none\",\n primaryColor: pal.onPrimary,\n dangerColor: pal.onPrimary,\n defaultBorderColor: n.border,\n defaultColor: n.text,\n defaultBg: n.bgLayout,\n defaultHoverBg: n.bgElevated,\n defaultHoverBorderColor: n.borderStrong,\n defaultHoverColor: n.text,\n defaultActiveBorderColor: n.borderStrong,\n paddingInline: 16,\n contentFontSize: 14,\n contentFontSizeLG: 16,\n contentFontSizeSM: 13,\n },\n Input: { ...field, paddingInline: 16 },\n InputNumber: field,\n Select: { ...field, optionSelectedBg: pal.primaryBg, selectorBg: n.bgField },\n DatePicker: field,\n Cascader: field,\n TreeSelect: field,\n Mentions: field,\n Checkbox: { colorBorder: n.controlBorder, colorBgContainer: n.bgField, colorWhite: pal.onPrimary },\n Radio: { colorBorder: n.controlBorder, colorBgContainer: n.bgField, dotColorDisabled: n.textTertiary },\n Segmented: {\n trackBg: n.bgFilled,\n itemColor: n.textSecondary,\n itemHoverColor: n.text,\n itemHoverBg: n.hover,\n itemSelectedBg: p,\n itemSelectedColor: pal.onPrimary,\n },\n Table: {\n /*\n * Opaque, not transparent: a fixed column is `position: sticky`, so the\n * columns that scroll underneath it would otherwise show through. These\n * are the same colours as the surface a table sits on, flattened.\n */\n headerBg: n.bgContainer,\n headerColor: n.textSecondary,\n headerSplitColor: \"transparent\",\n headerBorderRadius: 0,\n borderColor: n.borderSecondary,\n rowHoverBg: n.bgRowHover,\n rowSelectedBg: pal.primaryBg,\n rowSelectedHoverBg: pal.primaryBgHover,\n cellPaddingBlock: 10,\n cellPaddingInline: 12,\n cellFontSize: 14,\n cellPaddingBlockMD: 8,\n cellPaddingInlineMD: 10,\n cellPaddingBlockSM: 6,\n cellPaddingInlineSM: 8,\n cellFontSizeMD: 14,\n cellFontSizeSM: 13,\n footerBg: n.bgContainer,\n },\n Tabs: {\n inkBarColor: p,\n itemColor: n.text,\n itemSelectedColor: p,\n itemHoverColor: p,\n titleFontSize: 15,\n horizontalItemGutter: 32,\n horizontalMargin: \"0\",\n lineWidthBold: 4,\n },\n Tag: { borderRadiusSM: 0, defaultBg: \"transparent\" },\n Pagination: {\n itemBg: n.bgLayout,\n itemActiveBg: p,\n itemActiveColor: pal.onPrimary,\n itemActiveColorHover: pal.onPrimary,\n itemSize: 32,\n itemSizeSM: 26,\n itemInputBg: n.bgField,\n },\n Dropdown: { paddingBlock: 10 },\n Breadcrumb: {\n itemColor: n.textTertiary,\n lastItemColor: n.text,\n linkColor: n.textTertiary,\n linkHoverColor: p,\n separatorColor: n.textTertiary,\n },\n /** `section-title`: one size for every card and drawer heading. */\n Card: { headerFontSize: 18, headerFontSizeSM: 16, colorBgContainer: n.bgContainer },\n Drawer: { colorBgElevated: n.bgElevated },\n Alert: { withDescriptionPadding: \"14px 16px\" },\n },\n };\n\n if (!overrides) return base;\n return {\n ...base,\n ...overrides,\n token: { ...base.token, ...overrides.token },\n components: { ...base.components, ...overrides.components },\n };\n};\n\n/**\n * CSS emitted by HISD3Provider on `:root`.\n *\n * antd only exposes its CSS variables inside its own components, so custom\n * markup in an app (a login screen, a bespoke panel) cannot read\n * `--ant-color-primary` and friends. We mirror the handful that matter onto\n * `:root` so kit components and app CSS work anywhere in the tree. antd's own\n * declarations sit closer to its components, so they still win there.\n */\nexport const hisd3VarsCss = ({\n primary,\n mode = \"light\",\n borders = \"hairline\",\n lineWidth,\n radius = 0,\n selector = \":root\",\n}: HISD3ThemeOptions & {\n /**\n * Where the variables apply. `:root` (default) for the app; a class to give\n * one region its own mode, such as a printout that stays light in a dark app.\n */\n selector?: string;\n} = {}): string => {\n const pal = resolvePrimaryPalette(primary, mode);\n const { n, b } = neutralsFor(mode, borders);\n const s = HISD3_STATUS[mode];\n const root = selector === \":root\";\n return [\n `${selector}{`,\n `color-scheme:${mode};`,\n `--hisd3-mode:${mode};`,\n `--hisd3-rule-width:${lineWidth ?? b.width}px;`,\n `--hisd3-control-bg:${n.bgFilled};`,\n `--hisd3-control-bg-hover:${n.bgFilledHover};`,\n `--hisd3-input-bg:${n.bgField};`,\n `--hisd3-input-bg-hover:${n.bgElevated};`,\n `--hisd3-input-border:${n.controlBorder};`,\n `--hisd3-input-border-hover:${n.controlBorderHover};`,\n `--hisd3-hover:${n.hover};`,\n `--hisd3-on-primary:${pal.onPrimary};`,\n `--hisd3-focus-ring:${pal.primary};`,\n \"--hisd3-popup-radius:10px;\",\n `--hisd3-radius:${radius}px;`,\n `--ant-color-primary:${pal.primary};`,\n `--ant-color-primary-bg:${pal.primaryBg};`,\n `--ant-color-primary-bg-hover:${pal.primaryBgHover};`,\n `--ant-color-primary-border:${pal.primaryBorder};`,\n `--ant-color-success:${s.success};`,\n `--ant-color-success-bg:${s.successBg};`,\n `--ant-color-error:${s.error};`,\n `--ant-color-error-bg:${s.errorBg};`,\n `--ant-color-warning:${s.warning};`,\n `--ant-color-warning-bg:${s.warningBg};`,\n `--ant-color-text:${n.text};`,\n `--ant-color-text-secondary:${n.textSecondary};`,\n `--ant-color-text-tertiary:${n.textTertiary};`,\n /*\n * Table surfaces. Solid, never alpha: fixed columns are sticky and the rest\n * of the row scrolls underneath them. Override these on a surface that is\n * not the usual page grey (a drawer, say).\n */\n `--hisd3-table-bg:${n.bgContainer};`,\n `--hisd3-table-hover-bg:${n.bgRowHover};`,\n `--hisd3-border:${b.border};`,\n `--hisd3-border-secondary:${b.borderSecondary};`,\n `--ant-color-border:${b.border};`,\n `--ant-color-border-secondary:${b.borderSecondary};`,\n `--ant-color-bg-layout:${n.bgLayout};`,\n `--ant-color-bg-elevated:${n.bgElevated};`,\n \"}\",\n // The page itself, so overscroll and the gaps between regions match.\n root ? `body{background:${n.bgLayout};color:${n.text};}` : \"\",\n // Inside a drawer or modal, tables sit on the popup's surface.\n root\n ? `.ant-drawer-content,.ant-modal-content{--hisd3-table-bg:${n.bgElevated};--hisd3-table-hover-bg:${mode === \"dark\" ? mix(n.bgElevated, \"#FFFFFF\", 0.04) : shade(n.bgElevated, 0.03)};}`\n : \"\",\n ].join(\"\");\n};\n\n/** @deprecated use `hisd3VarsCss` — it emits the colour tokens too. */\nexport const borderVarsCss = (\n borders: HISD3Borders = \"hairline\",\n lineWidth?: number,\n): string => hisd3VarsCss({ borders, lineWidth });\n\n/** Default HISD3 theme — the red \"Backoffice\" look. */\nexport const hisd3AntdTheme: ThemeConfig = createHisd3Theme();\n\n/** @deprecated use HISD3_PRESETS / createHisd3Theme */\nexport const HISD3_COLORS = {\n primary: HISD3_PRESETS.red,\n primaryLight: tint(HISD3_PRESETS.red, 0.9),\n headerSelectedBg: \"rgba(0,0,0,0.04)\",\n} as const;\n","import { App as AntdApp, ConfigProvider, type ThemeConfig } from \"antd\";\nimport React, { createContext, useContext, useMemo } from \"react\";\nimport { ThemeProvider } from \"styled-components\";\n\nimport {\n createHisd3Theme,\n hisd3VarsCss,\n type HISD3Preset,\n type HISD3ThemeOptions,\n} from \"../../theme/antd\";\nimport type { StyledTheme } from \"../../types/theme\";\n\nconst HISD3ProviderContext = createContext(false);\n\n/** True when rendered somewhere below an `HISD3Provider`. */\nexport const useInsideHISD3Provider = () => useContext(HISD3ProviderContext);\n\nexport interface HISD3ProviderProps extends HISD3ThemeOptions {\n /** Shorthand: preset name or hex. Same as `options.primary`. */\n primary?: HISD3Preset | string;\n /** Legacy styled-components theme object used by older HISD3 screens. */\n styledTheme?: StyledTheme;\n /** Fully custom antd theme — skips `createHisd3Theme` entirely. */\n theme?: ThemeConfig;\n children: React.ReactNode;\n}\n\n/**\n * Root provider for HISD3 apps. Put it once at the top of the tree:\n *\n * ```tsx\n * <HISD3Provider primary=\"teal\">\n * <App />\n * </HISD3Provider>\n * ```\n *\n * `mode=\"dark\"` switches every kit and antd component to the dark palette;\n * the app owns the person's choice (and where it is remembered).\n *\n * It wires the antd `ConfigProvider` (with CSS variables enabled so every\n * kit component follows the chosen primary), antd `App` (for themed\n * `modal.confirm` / `message`), and the styled-components `ThemeProvider`.\n */\nexport const HISD3Provider: React.FC<HISD3ProviderProps> = ({\n primary,\n mode = \"light\",\n radius,\n borders = \"hairline\",\n lineWidth,\n overrides,\n theme,\n styledTheme = {},\n children,\n}) => {\n const antdTheme = useMemo(\n () =>\n theme ??\n createHisd3Theme({ primary, mode, radius, borders, lineWidth, overrides }),\n [theme, primary, mode, radius, borders, lineWidth, overrides],\n );\n\n const vars = useMemo(\n () => hisd3VarsCss({ primary, mode, borders, lineWidth, radius }),\n [primary, mode, borders, lineWidth, radius],\n );\n\n return (\n <HISD3ProviderContext.Provider value={true}>\n {/* CSS variables the styled components read (rule width, control fills) */}\n <style dangerouslySetInnerHTML={{ __html: vars }} />\n <ConfigProvider theme={antdTheme}>\n <ThemeProvider theme={styledTheme}>\n <AntdApp component={false}>{children}</AntdApp>\n </ThemeProvider>\n </ConfigProvider>\n </HISD3ProviderContext.Provider>\n );\n};\n\nexport default HISD3Provider;\n","/**\n * The HISD3 mark, embedded so it always resolves — no asset pipeline needed.\n *\n * This is the organisation's logo and is used as the fixed watermark on\n * `HISD3LoginPage`'s panel. Individual apps override only the card logo\n * (`logoSrc`), never this one.\n */\nexport const HISD3_LOGO_SRC =\n \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAACiCAYAAAAX4MJWAAAgnklEQVR42u1db2xb13U/9z7ZTmyKT6TFTFY7xImBQt2AuEDTQZBhuar2x0kwI1YsOShqkZJabBmg0KmXJd8ofikSpF7N6EP2YbJFOwNsyZGzALHcDYJreRGELdvqAluEYkmVdpU1Uyb5KMZ1bPPefXjvUo80KfHddx/fI/UOYMR2rMfH987vnN859/xB4Aq/RCIYpdvRDtLuzY76UsX/2zOc8gEAeLFyCAAOsL9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M54739sn1Wtu3gVAnQXCRJaFBML6wbluAOwCoGaEBatmNyvmVpbpFk/yVfeJugCoKemenX0QAcCtU3NxMyBAAIOshsmlP2Lk/wGgJmAjjF1q8QAAAABJRU5ErkJggg==\";\n","import styled from \"styled-components\";\nimport { Layout } from \"antd\";\n\nimport { HISD3_LAYOUT } from \"../../theme/layout\";\n\nconst { Header, Content } = Layout;\n\nexport const SIDER_WIDTH = HISD3_LAYOUT.siderWidth;\nexport const SIDER_COLLAPSED_WIDTH = HISD3_LAYOUT.siderCollapsedWidth;\nexport const HEADER_HEIGHT = HISD3_LAYOUT.topBarHeight;\n\nexport const StyledRoot = styled(Layout)<{ $appShell?: boolean }>`\n position: relative; /* anchor for the edge collapse trigger */\n background: var(--ant-color-bg-layout);\n\n /*\n * App-shell mode: the shell is exactly one viewport tall and never scrolls,\n * so the document has no scrollbar and cannot rubber-band. The content\n * column (StyledMain) is the scroller instead.\n */\n ${({ $appShell }) =>\n $appShell\n ? `height: 100vh; max-height: 100vh; overflow: hidden;`\n : `min-height: 100vh;`}\n\n /*\n * The Sider is rendered as a plain antd <Sider> (not styled(Sider)) because\n * styled-components would swallow its \\`theme\\` prop; style it from here.\n */\n /* the whole sidebar is chrome: never select its text on drag */\n > .ant-layout-sider.hisd3-sider {\n user-select: none;\n -webkit-user-select: none;\n position: sticky;\n top: 0;\n height: ${({ $appShell }) => ($appShell ? \"100%\" : \"100vh\")};\n overflow: hidden;\n background: var(--ant-color-bg-layout);\n border-right: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n\n .ant-layout-sider-children {\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n }\n`;\n\n/** Content column. In app-shell mode this is the element that scrolls. */\nexport const StyledMain = styled(Layout)<{ $scroll?: boolean }>`\n background: transparent;\n min-width: 0;\n\n ${({ $scroll }) =>\n $scroll\n ? `\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n /* keep scroll chaining (and its bounce) out of the document */\n overscroll-behavior: contain;\n `\n : \"\"}\n`;\n\nexport const StyledSiderMenuWrap = styled.div`\n flex: 1 1 auto;\n overflow-y: auto;\n overflow-x: hidden;\n overscroll-behavior: contain;\n padding-top: 4px;\n\n .ant-menu-inline,\n .ant-menu-vertical {\n border-inline-end: none !important;\n background: transparent;\n }\n\n /* Section titles: \"RECEIVABLES AND COLLECTIONS\" */\n .ant-menu-item-group-title {\n padding: 16px ${HISD3_LAYOUT.pageGutter}px 4px;\n /* overline: 12px; wide tracking at 11px broke the words apart. */\n font-size: 12px;\n line-height: 16px;\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary);\n }\n\n .ant-menu-item-group + .ant-menu-item-group > .ant-menu-item-group-title,\n .ant-menu-item-group + .ant-menu-item-group::before {\n border-top: var(--hisd3-rule-width, 1px) solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n margin-top: 10px;\n padding-top: 20px;\n }\n .ant-menu-item-group + .ant-menu-item-group::before {\n content: none;\n }\n\n .ant-menu-item,\n .ant-menu-submenu-title {\n font-size: 14px;\n font-weight: 500;\n position: relative;\n width: 100%;\n }\n\n .ant-menu-item .ant-menu-item-icon,\n .ant-menu-submenu-title .ant-menu-item-icon {\n font-size: 16px;\n }\n\n /* open parent (\"Billing\") in primary */\n .ant-menu-submenu-open > .ant-menu-submenu-title,\n .ant-menu-submenu-selected > .ant-menu-submenu-title {\n color: var(--ant-color-primary);\n font-weight: 700;\n }\n\n /* child items are indented by antd; keep them slightly smaller */\n .ant-menu-sub.ant-menu-inline > .ant-menu-item {\n font-size: 13.5px;\n }\n\n /* active item: tint + 4px accent bar */\n .ant-menu-item-selected {\n font-weight: 700;\n\n &::before {\n content: \"\";\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 4px;\n background: var(--ant-color-primary);\n }\n }\n\n &.hisd3-collapsed .ant-menu-item-group-title {\n display: none;\n }\n`;\n\nexport const StyledBrand = styled.a<{ $collapsed?: boolean }>`\n display: flex;\n align-items: center;\n gap: 10px;\n height: ${HEADER_HEIGHT}px;\n padding: 0 ${({ $collapsed }) => ($collapsed ? 12 : HISD3_LAYOUT.pageGutter)}px;\n justify-content: ${({ $collapsed }) => ($collapsed ? \"center\" : \"flex-start\")};\n color: inherit;\n text-decoration: none;\n overflow: hidden;\n white-space: nowrap;\n flex: 0 0 auto;\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n\n .hisd3-brand-mark {\n width: 28px;\n height: 28px;\n flex: 0 0 auto;\n background: var(--ant-color-primary);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n img {\n height: 28px;\n width: 28px;\n object-fit: contain;\n flex: 0 0 auto;\n }\n\n h1 {\n margin: 0;\n font-family: var(--font-heading);\n font-size: 16px;\n font-weight: var(--font-weight-heading, 800);\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--ant-color-text);\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`;\n\nexport const StyledHeader = styled(Header)`\n display: flex;\n align-items: center;\n gap: 24px;\n flex: 0 0 ${HEADER_HEIGHT}px;\n height: ${HEADER_HEIGHT}px;\n line-height: ${HEADER_HEIGHT}px;\n padding: 0 ${HISD3_LAYOUT.pageGutter}px;\n position: sticky;\n top: 0;\n z-index: 100;\n background: var(--ant-color-bg-layout);\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n\n .ant-menu-horizontal {\n flex: 1 1 auto;\n min-width: 0;\n border-bottom: none;\n background: transparent;\n line-height: ${HEADER_HEIGHT - 2}px;\n font-size: 14px;\n font-weight: 500;\n }\n`;\n\nexport const StyledSiderHeader = styled(Header)`\n display: flex;\n align-items: center;\n gap: 12px;\n flex: 0 0 ${HEADER_HEIGHT}px;\n height: ${HEADER_HEIGHT}px;\n line-height: ${HEADER_HEIGHT}px;\n padding: 0 ${HISD3_LAYOUT.pageGutter}px;\n position: sticky;\n top: 0;\n z-index: 99;\n background: var(--ant-color-bg-layout);\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n`;\n\nexport const StyledCollapseTrigger = styled.button`\n border: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n background: transparent;\n cursor: pointer;\n font-size: 14px;\n width: 32px;\n height: 32px;\n color: inherit;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n\n &:hover {\n background: var(--hisd3-hover, rgba(0, 0, 0, 0.05));\n }\n`;\n\n/**\n * Circular collapse trigger that straddles the sidebar's right edge.\n * `$top` is the distance from the top of the shell to its centre; it defaults\n * to the middle of the top bar so it lines up with the brand block.\n */\nexport const StyledEdgeTrigger = styled.button<{\n $left: number;\n $top: number;\n}>`\n user-select: none;\n -webkit-user-select: none;\n position: absolute;\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n transform: translate(-50%, -50%);\n z-index: 30;\n width: 28px;\n height: 28px;\n padding: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n color: var(--hisd3-edge-trigger-color, var(--hisd3-on-primary, #fff));\n background: var(--hisd3-edge-trigger-bg, var(--ant-color-primary));\n border: 2px solid var(--ant-color-bg-layout, #f3f2f0);\n border-radius: 50%;\n cursor: pointer;\n box-shadow: 0 1px 3px rgba(16, 15, 14, 0.12),\n 0 4px 12px rgba(16, 15, 14, 0.14);\n transition: left 0.2s ease, filter 0.15s ease;\n\n &:hover {\n filter: brightness(1.08);\n }\n\n &:active {\n filter: brightness(0.94);\n }\n\n &:focus-visible {\n outline: 2px solid var(--ant-color-primary);\n outline-offset: 2px;\n }\n\n & svg {\n display: block;\n }\n`;\n\nexport const StyledContent = styled(Content)`\n flex: 1 0 auto;\n padding: 24px ${HISD3_LAYOUT.pageGutter}px 40px;\n`;\n\n/* ---------- account card (sider footer / header) ---------- */\n\nexport const StyledCrUserInfo = styled.div<{\n $collapsed?: boolean;\n $inHeader?: boolean;\n}>`\n flex: 0 0 auto;\n display: flex;\n flex-direction: column;\n justify-content: center;\n line-height: 1.25;\n transition: all 0.2s ease;\n padding: ${({ $inHeader, $collapsed }) =>\n $inHeader ? \"0 4px\" : $collapsed ? \"12px 0\" : `12px ${HISD3_LAYOUT.pageGutter}px`};\n min-width: ${({ $inHeader }) => ($inHeader ? \"220px\" : \"0\")};\n border-top: ${({ $inHeader }) =>\n $inHeader ? \"none\" : \"var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE))\"};\n\n & .ant-dropdown-link {\n color: inherit;\n }\n`;\n\nexport const StyledCrUserInfoInner = styled.a`\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n color: inherit;\n gap: 10px;\n`;\n\nexport const StyledCrUserInfoAvatar = styled.span<{ $src?: string }>`\n width: 34px;\n height: 34px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 13px;\n font-weight: 700;\n color: var(--ant-color-text);\n background: ${({ $src }) =>\n $src ? `center / cover no-repeat url(\"${$src}\")` : \"var(--hisd3-control-bg, #e6e4e1)\"};\n`;\n\nexport const StyledCrUserInfoContent = styled.span`\n flex: 1 1 auto;\n min-width: 0;\n`;\n\nexport const StyledUsernameInfo = styled.span`\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n`;\n\nexport const StyledUsername = styled.h3`\n margin: 0;\n font-family: var(--font-body);\n font-size: 14px;\n font-weight: 700;\n letter-spacing: 0;\n color: var(--ant-color-text);\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n`;\n\nexport const StyledUserArrow = styled.span`\n width: 20px;\n height: 22px;\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 0 0 auto;\n color: var(--ant-color-text);\n\n & svg {\n display: block;\n }\n`;\n\nexport const StyledCrUserDesignation = styled.span`\n display: block;\n margin-top: 3px;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n","import type { MenuProps } from \"antd\";\nimport { createElement, type ReactNode } from \"react\";\n\nexport type AntdMenuItem = Required<MenuProps>[\"items\"][number];\n\n/**\n * Menu item shape accepted by HISD3Sidebar.\n *\n * This intentionally mirrors the `MenuDataItem` shape that the previous\n * ProLayout-based sidebar consumed (`path`, `name`, `icon`, `children`,\n * `hideInMenu`), so existing apps keep passing the same `menuItems`.\n */\nexport interface HISD3MenuItem {\n key?: string;\n path?: string;\n name?: ReactNode;\n icon?: ReactNode;\n children?: HISD3MenuItem[];\n hideInMenu?: boolean;\n disabled?: boolean;\n /** When true the item is rendered as a group title (like ProLayout's `flatMenu`). */\n group?: boolean;\n [key: string]: unknown;\n}\n\nexport const itemKey = (item: HISD3MenuItem, index: number): string =>\n item.key ?? item.path ?? `menu-${index}`;\n\n/** Convert HISD3MenuItem[] to antd `Menu` items, rendering leaf items as anchors. */\nexport const toAntdMenuItems = (\n items: HISD3MenuItem[] | undefined,\n renderLink: (item: HISD3MenuItem, label: ReactNode) => ReactNode,\n): AntdMenuItem[] =>\n (items ?? [])\n .filter((item) => item && !item.hideInMenu)\n .map((item, index): AntdMenuItem => {\n const key = itemKey(item, index);\n const hasChildren = Array.isArray(item.children) && item.children.length > 0;\n\n if (hasChildren) {\n return {\n key,\n icon: item.icon,\n label: item.name,\n disabled: item.disabled,\n type: item.group ? \"group\" : undefined,\n children: toAntdMenuItems(item.children, renderLink),\n } as AntdMenuItem;\n }\n\n return {\n key,\n icon: item.icon,\n disabled: item.disabled,\n label: renderLink(item, item.name),\n } as AntdMenuItem;\n });\n\n/**\n * Find the key of the item whose `path` best matches `pathname`\n * (longest prefix wins) together with the keys of all its ancestors,\n * so the correct submenu can be opened.\n */\nexport const findSelection = (\n items: HISD3MenuItem[] | undefined,\n pathname: string,\n): { selectedKey?: string; openKeys: string[] } => {\n let best: { key: string; parents: string[]; length: number } | undefined;\n\n const walk = (list: HISD3MenuItem[] | undefined, parents: string[]) => {\n (list ?? []).forEach((item, index) => {\n const key = itemKey(item, index);\n if (item.path && pathname.startsWith(item.path)) {\n const exact = pathname === item.path;\n const length = item.path.length + (exact ? 1 : 0);\n if (!best || length > best.length) {\n best = { key, parents, length };\n }\n }\n if (item.children?.length) {\n walk(item.children, [...parents, key]);\n }\n });\n };\n\n walk(items, []);\n return { selectedKey: best?.key, openKeys: best?.parents ?? [] };\n};\n\n/** Default anchor renderer used when no `renderMenuLink` is supplied. */\nexport const defaultRenderLink = (item: HISD3MenuItem, label: ReactNode) =>\n createElement(\"a\", { href: item.path || \"/\" }, label);\n","import {\n DownOutlined,\n ExclamationCircleOutlined,\n LogoutOutlined,\n SettingOutlined,\n} from \"@ant-design/icons\";\nimport { App, Dropdown, type MenuProps } from \"antd\";\nimport React from \"react\";\n\nimport type { IUserEmployee } from \"../../types/account\";\nimport {\n StyledCrUserDesignation,\n StyledCrUserInfo,\n StyledCrUserInfoAvatar,\n StyledCrUserInfoContent,\n StyledCrUserInfoInner,\n StyledUserArrow,\n StyledUsername,\n StyledUsernameInfo,\n} from \"./index.styled\";\n\nexport interface UserMenuProps {\n account: IUserEmployee;\n avatarSrc?: string;\n settingsUrl?: string;\n onLogout: () => Promise<void> | void;\n collapsed?: boolean;\n /** \"topRight\" for the sider footer, \"bottomRight\" for the top header. */\n placement?: \"topRight\" | \"bottomRight\";\n extraItems?: MenuProps[\"items\"];\n}\n\n/**\n * Account dropdown (Settings / Logout) shown in the sider footer or header.\n * Uses `App.useApp()` so the confirm modal picks up the surrounding\n * ConfigProvider theme — the static `Modal.confirm` cannot in antd v6.\n */\nexport const UserMenu: React.FC<UserMenuProps> = ({\n account,\n avatarSrc,\n settingsUrl,\n onLogout,\n collapsed = false,\n placement = \"topRight\",\n extraItems = [],\n}) => {\n const { modal } = App.useApp();\n\n const confirmLogout = () => {\n modal.confirm({\n title: \"Are you sure you want to logout?\",\n content: \"Please click OK to continue\",\n icon: <ExclamationCircleOutlined />,\n onOk: onLogout,\n });\n };\n\n const items: MenuProps[\"items\"] = [\n ...(extraItems ?? []),\n {\n key: \"settings\",\n icon: <SettingOutlined />,\n label: \"Settings\",\n onClick: () => {\n window.location.href = settingsUrl ?? \"/settings\";\n },\n },\n {\n key: \"logout\",\n icon: <LogoutOutlined />,\n label: \"Logout\",\n onClick: confirmLogout,\n },\n ];\n\n const initials =\n (account.fullName || \"\")\n .replace(/\\(.*?\\)/g, \" \")\n .split(/[\\s,]+/)\n .map((w) => w.replace(/[^\\p{L}\\p{N}]/gu, \"\"))\n .filter(Boolean)\n .slice(0, 2)\n .map((w) => w[0].toUpperCase())\n .join(\"\") || \"?\";\n\n return (\n <StyledCrUserInfo\n className=\"cr-user-info-light\"\n $collapsed={collapsed}\n $inHeader={placement === \"bottomRight\"}\n >\n <Dropdown trigger={[\"click\"]} placement={placement} menu={{ items }}>\n <StyledCrUserInfoInner\n className=\"ant-dropdown-link\"\n onClick={(e) => e.preventDefault()}\n >\n <StyledCrUserInfoAvatar $src={avatarSrc} aria-hidden>\n {!avatarSrc && initials}\n </StyledCrUserInfoAvatar>\n {!collapsed && (\n <StyledCrUserInfoContent>\n <StyledUsernameInfo>\n <StyledUsername title={account.fullName}>\n {account.fullName}\n </StyledUsername>\n <StyledUserArrow>\n <DownOutlined />\n </StyledUserArrow>\n </StyledUsernameInfo>\n {account.positionType && (\n <StyledCrUserDesignation title={account.positionType}>\n {account.positionType}\n </StyledCrUserDesignation>\n )}\n </StyledCrUserInfoContent>\n )}\n </StyledCrUserInfoInner>\n </Dropdown>\n </StyledCrUserInfo>\n );\n};\n\nexport default UserMenu;\n","import {\n LeftOutlined,\n MenuFoldOutlined,\n MenuUnfoldOutlined,\n RightOutlined,\n} from \"@ant-design/icons\";\nimport {\n App as AntdApp,\n ConfigProvider,\n Layout,\n Menu,\n Spin,\n type MenuProps,\n type ThemeConfig,\n} from \"antd\";\nimport React, { useEffect, useMemo, useState, type ReactNode } from \"react\";\nimport { ThemeProvider } from \"styled-components\";\n\nimport { HISD3_LOGO_SRC } from \"../../assets/logo\";\nimport { hisd3AntdTheme } from \"../../theme/antd\";\nimport { useInsideHISD3Provider } from \"../Provider\";\nimport type { IUserEmployee } from \"../../types/account\";\nimport type { StyledTheme } from \"../../types/theme\";\nimport {\n HEADER_HEIGHT,\n SIDER_COLLAPSED_WIDTH,\n SIDER_WIDTH,\n StyledBrand,\n StyledCollapseTrigger,\n StyledContent,\n StyledEdgeTrigger,\n StyledHeader,\n StyledRoot,\n StyledMain,\n StyledSiderHeader,\n StyledSiderMenuWrap,\n} from \"./index.styled\";\nimport {\n defaultRenderLink,\n findSelection,\n toAntdMenuItems,\n type HISD3MenuItem,\n} from \"./menu\";\nimport { UserMenu } from \"./UserMenu\";\n\nconst { Sider } = Layout;\n\nexport interface HISD3SidebarProps {\n account: IUserEmployee;\n /** Logo image URL. When omitted a square block in the primary color is shown. */\n logoUrl?: string;\n appName: string;\n /** Same shape as before (ProLayout `MenuDataItem`): `{ path, name, icon, children }`. */\n menuItems: HISD3MenuItem[];\n onLogout: () => Promise<void> | void;\n /** Current location pathname, used to highlight the active menu item. */\n pathname: string;\n /** styled-components theme; optional when inside HISD3Provider. */\n styledTheme?: StyledTheme;\n collapsed?: boolean;\n /** Called when the user toggles the sider (controlled usage). */\n onCollapse?: (collapsed: boolean) => void;\n loading?: boolean;\n hideSidebar?: boolean;\n /** Render the navigation as a top header bar instead of a left sider. */\n layoutTop?: boolean;\n avatarSrc?: string;\n settingsUrl?: string;\n /**\n * Ant Design theme applied via a nested `ConfigProvider`.\n * Defaults to `hisd3AntdTheme` (red) when used standalone. Inside an\n * `HISD3Provider` nothing is applied so the provider's primary is inherited.\n * Pass `null` to force inheritance, or a ThemeConfig to override.\n */\n antdTheme?: ThemeConfig | null;\n /**\n * Custom link renderer, e.g. to use react-router's `<Link>`:\n * `(item, label) => <Link to={item.path!}>{label}</Link>`\n */\n renderMenuLink?: (item: HISD3MenuItem, label: ReactNode) => ReactNode;\n /** Extra content rendered in the header, right side (top layout) or sider header (side layout). */\n headerExtra?: ReactNode;\n /** Extra items prepended to the account dropdown. */\n userMenuItems?: MenuProps[\"items\"];\n /**\n * Where the collapse control lives:\n * \"edge\" (default) floats a round chevron on the sidebar's right edge, so it\n * works even when the top bar is hidden; \"header\" puts a square button in the\n * shell's own top bar; \"none\" renders neither (supply your own).\n */\n collapseTrigger?: \"edge\" | \"header\" | \"none\";\n /** @deprecated use `collapseTrigger=\"none\"`. */\n hideCollapseTrigger?: boolean;\n /**\n * Distance in px from the top of the shell to the centre of the edge\n * trigger. Defaults to the middle of the top bar, so it lines up with the\n * brand block; pass a larger number to move it down.\n */\n collapseTriggerOffset?: number;\n /** Width in px of the expanded sider. Default 220. */\n siderWidth?: number;\n /** Disable the built-in content padding wrapper and render children directly. */\n bareContent?: boolean;\n /**\n * Hide the sider layout's own top bar (collapse trigger + headerExtra).\n * Use together with `HISD3PageHeader`, which renders its own top bar.\n */\n hideHeaderBar?: boolean;\n /** Where the brand block links to. Default \"/\". */\n brandHref?: string;\n /**\n * App-shell scrolling (default). The shell fills exactly one viewport and\n * the content column scrolls inside it, so the page header stays pinned and\n * the document cannot rubber-band (\"bounce\") at the top or bottom.\n * Set to `false` to scroll the window instead, as in 4.1 and earlier.\n */\n scrollContent?: boolean;\n /**\n * Hide the account card in the sider footer / top nav — use when the account\n * lives in the header instead (`HISD3AvatarMenu`).\n */\n hideAccountCard?: boolean;\n children: React.ReactNode;\n}\n\nexport const HISD3Sidebar: React.FC<HISD3SidebarProps> = ({\n children,\n account,\n logoUrl,\n appName,\n menuItems,\n onLogout,\n pathname,\n avatarSrc,\n styledTheme,\n settingsUrl,\n antdTheme,\n renderMenuLink = defaultRenderLink,\n headerExtra,\n userMenuItems,\n onCollapse,\n collapsed = false,\n loading = false,\n hideSidebar = false,\n layoutTop = false,\n hideCollapseTrigger = false,\n collapseTrigger = \"edge\",\n collapseTriggerOffset = Math.round(HEADER_HEIGHT / 2),\n siderWidth = SIDER_WIDTH,\n bareContent = false,\n hideHeaderBar = false,\n brandHref = \"/\",\n hideAccountCard = false,\n scrollContent = true,\n}) => {\n const insideProvider = useInsideHISD3Provider();\n const resolvedTheme =\n antdTheme === undefined ? (insideProvider ? null : hisd3AntdTheme) : antdTheme;\n const [isCollapsed, setIsCollapsed] = useState(collapsed);\n\n useEffect(() => {\n setIsCollapsed(collapsed);\n }, [collapsed]);\n\n const items = useMemo(\n () => toAntdMenuItems(menuItems, renderMenuLink),\n [menuItems, renderMenuLink],\n );\n\n const selection = useMemo(\n () => findSelection(menuItems, pathname),\n [menuItems, pathname],\n );\n\n // Start with the active route's submenu open so there is no flash on first paint.\n const [openKeys, setOpenKeys] = useState<string[]>(() => selection.openKeys);\n\n // Open the submenu that contains the active route whenever the route changes.\n useEffect(() => {\n setOpenKeys((prev) =>\n Array.from(new Set([...prev, ...selection.openKeys])),\n );\n }, [selection.openKeys.join(\"|\")]);\n\n const toggleCollapse = (next: boolean) => {\n setIsCollapsed(next);\n onCollapse?.(next);\n };\n\n const [logoFailed, setLogoFailed] = useState(false);\n useEffect(() => setLogoFailed(false), [logoUrl]);\n\n const selectedKeys = selection.selectedKey ? [selection.selectedKey] : [];\n\n const trigger = hideCollapseTrigger ? \"none\" : collapseTrigger;\n const collapseLabel = isCollapsed ? \"Expand menu\" : \"Collapse menu\";\n\n const brand = (\n <StyledBrand href={brandHref} $collapsed={!layoutTop && isCollapsed}>\n {logoUrl ? (\n // A hospital without a logo on the server gets the HISD3 mark, never a broken image.\n <img\n src={logoFailed ? HISD3_LOGO_SRC : logoUrl}\n alt=\"\"\n onError={() => setLogoFailed(true)}\n />\n ) : (\n <span className=\"hisd3-brand-mark\" aria-hidden />\n )}\n {(layoutTop || !isCollapsed) && <h1>{appName}</h1>}\n </StyledBrand>\n );\n\n const content = bareContent ? (\n children\n ) : (\n <StyledContent>{children}</StyledContent>\n );\n\n const renderBody = () => {\n if (hideSidebar) {\n return <>{children}</>;\n }\n\n if (layoutTop) {\n return (\n <StyledRoot $appShell={scrollContent}>\n <StyledHeader>\n {brand}\n <Menu\n mode=\"horizontal\"\n items={items}\n selectedKeys={selectedKeys}\n />\n {headerExtra}\n {!hideAccountCard && (\n <UserMenu\n account={account}\n avatarSrc={avatarSrc}\n settingsUrl={settingsUrl}\n onLogout={onLogout}\n placement=\"bottomRight\"\n extraItems={userMenuItems}\n />\n )}\n </StyledHeader>\n <StyledMain $scroll={scrollContent}>{content}</StyledMain>\n </StyledRoot>\n );\n }\n\n return (\n <StyledRoot hasSider $appShell={scrollContent}>\n <Sider\n className=\"hisd3-sider\"\n width={siderWidth}\n collapsedWidth={SIDER_COLLAPSED_WIDTH}\n collapsible\n collapsed={isCollapsed}\n trigger={null}\n theme=\"light\"\n breakpoint=\"lg\"\n onBreakpoint={(broken) => {\n if (broken) toggleCollapse(true);\n }}\n >\n {brand}\n <StyledSiderMenuWrap className={isCollapsed ? \"hisd3-collapsed\" : undefined}>\n <Menu\n mode=\"inline\"\n theme=\"light\"\n inlineCollapsed={isCollapsed}\n items={items}\n selectedKeys={selectedKeys}\n openKeys={isCollapsed ? undefined : openKeys}\n onOpenChange={(keys) => setOpenKeys(keys as string[])}\n />\n </StyledSiderMenuWrap>\n {!hideAccountCard && (\n <UserMenu\n account={account}\n avatarSrc={avatarSrc}\n settingsUrl={settingsUrl}\n onLogout={onLogout}\n collapsed={isCollapsed}\n placement=\"topRight\"\n extraItems={userMenuItems}\n />\n )}\n </Sider>\n\n <StyledMain $scroll={scrollContent}>\n {!hideHeaderBar && (\n <StyledSiderHeader>\n {trigger === \"header\" && (\n <StyledCollapseTrigger\n type=\"button\"\n aria-label={collapseLabel}\n onClick={() => toggleCollapse(!isCollapsed)}\n >\n {isCollapsed ? <MenuUnfoldOutlined /> : <MenuFoldOutlined />}\n </StyledCollapseTrigger>\n )}\n <span style={{ flex: 1 }} />\n {headerExtra}\n </StyledSiderHeader>\n )}\n {content}\n </StyledMain>\n\n {trigger === \"edge\" && (\n <StyledEdgeTrigger\n type=\"button\"\n aria-label={collapseLabel}\n title={collapseLabel}\n $left={isCollapsed ? SIDER_COLLAPSED_WIDTH : siderWidth}\n $top={collapseTriggerOffset}\n onClick={() => toggleCollapse(!isCollapsed)}\n >\n {isCollapsed ? <RightOutlined /> : <LeftOutlined />}\n </StyledEdgeTrigger>\n )}\n </StyledRoot>\n );\n };\n\n if (typeof document === \"undefined\") {\n return null;\n }\n\n const body = (\n <AntdApp component={false}>\n <Spin spinning={loading} size=\"large\">\n {renderBody()}\n </Spin>\n </AntdApp>\n );\n\n if (insideProvider && !styledTheme) {\n return resolvedTheme ? (\n <ConfigProvider theme={resolvedTheme}>{body}</ConfigProvider>\n ) : (\n body\n );\n }\n\n return (\n <ThemeProvider theme={styledTheme ?? {}}>\n {resolvedTheme ? (\n <ConfigProvider theme={resolvedTheme}>{body}</ConfigProvider>\n ) : (\n body\n )}\n </ThemeProvider>\n );\n};\n\nexport default HISD3Sidebar;\n","import { Breadcrumb } from \"antd\";\nimport React from \"react\";\nimport styled from \"styled-components\";\n\nimport { HISD3_LAYOUT } from \"../../theme/layout\";\n\nexport interface HISD3BreadcrumbItem {\n title: React.ReactNode;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface HISD3PageHeaderProps {\n title: React.ReactNode;\n subtitle?: React.ReactNode;\n breadcrumb?: HISD3BreadcrumbItem[];\n /** Action buttons rendered on the right of the top bar. */\n extra?: React.ReactNode;\n /** Content rendered to the left of the breadcrumb (e.g. the sidebar collapse trigger). */\n leading?: React.ReactNode;\n /** Hide the top bar entirely and render only the title block. */\n hideTopBar?: boolean;\n className?: string;\n}\n\nexport const PAGE_GUTTER = HISD3_LAYOUT.pageGutter;\n\n/*\n * `display: contents` so TopBar and TitleBlock become direct children of the\n * scrolling column — a sticky child cannot outlive its own wrapper's box, so\n * without this the bar scrolls away with the header element.\n */\nconst HeaderWrap = styled.header`\n display: contents;\n`;\n\nconst TopBar = styled.div`\n user-select: none;\n -webkit-user-select: none;\n display: flex;\n align-items: center;\n gap: 16px;\n height: ${HISD3_LAYOUT.topBarHeight}px; /* same as the sidebar brand block */\n /* never shrink: these are flex items of the scrolling column */\n flex: 0 0 ${HISD3_LAYOUT.topBarHeight}px;\n padding: 0 ${PAGE_GUTTER}px;\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n background: var(--ant-color-bg-layout);\n position: sticky;\n top: 0;\n z-index: 20;\n\n .ant-breadcrumb {\n font-size: 14px;\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .ant-breadcrumb ol {\n flex-wrap: nowrap;\n }\n`;\n\nconst Actions = styled.div`\n display: flex;\n align-items: center;\n gap: 10px;\n flex: 0 0 auto;\n`;\n\nconst TitleBlock = styled.div`\n display: flex;\n align-items: baseline;\n gap: 16px;\n flex-wrap: wrap;\n flex: 0 0 auto;\n padding: 20px ${PAGE_GUTTER}px 18px;\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n\n h1 {\n margin: 0;\n font-family: var(--font-heading);\n font-size: 32px;\n line-height: 1.1;\n font-weight: var(--font-weight-heading, 800);\n letter-spacing: -0.02em;\n color: var(--ant-color-text);\n }\n\n p {\n margin: 0;\n font-size: 15px;\n color: var(--ant-color-text-secondary);\n }\n`;\n\n/** Padded body area that lines up with the header gutters. */\nexport const HISD3PageBody = styled.div`\n flex: 1 0 auto;\n padding: 24px ${PAGE_GUTTER}px 40px;\n`;\n\n/**\n * Sticky top bar (breadcrumb + actions) followed by a big page title block.\n * Designed to sit directly inside `HISD3Sidebar` with `bareContent` and\n * `hideHeaderBar`.\n */\nexport const HISD3PageHeader: React.FC<HISD3PageHeaderProps> = ({\n title,\n subtitle,\n breadcrumb,\n extra,\n leading,\n hideTopBar = false,\n className,\n}) => (\n <HeaderWrap className={className}>\n {!hideTopBar && (\n <TopBar>\n {leading}\n {breadcrumb && breadcrumb.length > 0 && (\n <Breadcrumb\n items={breadcrumb.map((b) => ({\n title: b.href ? <a href={b.href}>{b.title}</a> : b.title,\n onClick: b.onClick,\n }))}\n />\n )}\n {!breadcrumb?.length && <span style={{ flex: 1 }} />}\n {extra && <Actions>{extra}</Actions>}\n </TopBar>\n )}\n <TitleBlock>\n <h1>{title}</h1>\n {subtitle && <p>{subtitle}</p>}\n </TitleBlock>\n </HeaderWrap>\n);\n\nexport default HISD3PageHeader;\n","import { Button, type ButtonProps } from \"antd\";\nimport React from \"react\";\nimport styled from \"styled-components\";\n\nexport type HISD3ButtonVariant = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\n\nexport interface HISD3ButtonProps extends Omit<ButtonProps, \"variant\" | \"color\" | \"type\"> {\n /**\n * primary → filled with the theme primary (e.g. \"New folio\")\n * secondary → outlined, dark 2px border (e.g. \"Refresh\", \"Export\")\n * ghost → text only\n * danger → filled red\n */\n variant?: HISD3ButtonVariant;\n}\n\nconst StyledButton = styled(Button)`\n &.ant-btn {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 40px;\n padding-inline: 16px;\n font-size: 14px;\n font-weight: 600;\n box-shadow: none;\n }\n\n &.ant-btn-sm {\n height: 32px;\n padding-inline: 12px;\n font-size: 13px;\n gap: 6px;\n }\n\n &.ant-btn-lg {\n height: 52px;\n padding-inline: 20px;\n font-size: 16px;\n }\n\n &.ant-btn-default {\n border-width: var(--hisd3-rule-width, 1px);\n }\n\n .anticon {\n font-size: 1.05em;\n }\n`;\n\nconst map: Record<HISD3ButtonVariant, Pick<ButtonProps, \"type\" | \"danger\">> = {\n primary: { type: \"primary\" },\n secondary: { type: \"default\" },\n ghost: { type: \"text\" },\n danger: { type: \"primary\", danger: true },\n};\n\nexport const HISD3Button: React.FC<HISD3ButtonProps> = ({\n variant = \"secondary\",\n ...rest\n}) => <StyledButton {...map[variant]} {...rest} />;\n\nexport default HISD3Button;\n","import styled, { css } from \"styled-components\";\n\nexport type LoginVariant = \"soft\" | \"square\";\n/** Which side of the screen the form card sits on. */\nexport type LoginSide = \"left\" | \"right\";\n\nconst soft = (v: LoginVariant) => v === \"soft\";\n\n/** Below this the brand panel is dropped and the card centres. */\nexport const SPLIT_BREAKPOINT = 1024;\nexport const MOBILE_BREAKPOINT = 560;\n\nexport const StyledPage = styled.div<{ $side: LoginSide }>`\n position: relative;\n min-height: 100vh;\n min-height: 100dvh; /* keeps mobile browser chrome from clipping the card */\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: ${({ $side }) =>\n $side === \"right\" ? \"flex-end\" : \"flex-start\"};\n overflow-x: hidden;\n /* The page and the card follow the theme, so dark mode is dark here too. */\n background: var(--ant-color-bg-layout, #F3F2F0);\n\n @media (max-width: ${SPLIT_BREAKPOINT}px) {\n justify-content: center;\n padding: 32px 24px;\n background: linear-gradient(\n 180deg,\n var(--ant-color-primary-bg, #FCEEEB) 0%,\n var(--ant-color-bg-layout, #F3F2F0) 46%\n );\n }\n\n /*\n * Phone: a branded hero at the top with a white sheet rising over it,\n * rather than a floating card. Set as a block so the two simply stack.\n */\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: flex-start;\n padding: 0;\n background: var(--ant-color-primary, #E5533B);\n }\n`;\n\n/** Brand panel. Its colour follows the app's primary. */\nexport const StyledPanel = styled.aside<{\n $variant: LoginVariant;\n $side: LoginSide;\n}>`\n position: absolute;\n /* the panel takes the side the card does not */\n inset: ${({ $variant, $side }) => {\n const gap = soft($variant) ? \"28px\" : \"0\";\n return $side === \"right\"\n ? `${gap} 40% ${gap} ${gap}`\n : `${gap} ${gap} ${gap} 40%`;\n }};\n border-radius: ${({ $variant }) => (soft($variant) ? \"28px\" : \"0\")};\n background: var(--ant-color-primary, #E5533B);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: ${({ $side }) =>\n $side === \"right\" ? \"0 12% 0 8%\" : \"0 6% 0 12%\"};\n color: #fff;\n user-select: none;\n\n h2 {\n position: relative;\n margin: 0;\n font-family: var(--font-heading);\n font-size: clamp(26px, 3.1vw, 44px);\n line-height: 1.15;\n font-weight: ${({ $variant }) =>\n soft($variant) ? 700 : \"var(--font-weight-heading, 800)\"};\n letter-spacing: -0.01em;\n max-width: 12em;\n color: #fff;\n }\n\n p {\n position: relative;\n margin: 16px 0 0;\n font-size: 15px;\n opacity: 0.82;\n }\n\n @media (max-width: ${SPLIT_BREAKPOINT}px) {\n display: none;\n }\n\n /* phone: full-width hero above the sheet */\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n display: flex;\n /* relative, not static: keeps the pattern layer inside the hero */\n position: relative;\n inset: auto;\n flex: 0 0 auto;\n border-radius: 0;\n min-height: 32vh;\n padding: 30px 22px 46px;\n justify-content: flex-end;\n\n h2 {\n font-size: 27px;\n max-width: none;\n }\n\n p {\n margin-top: 10px;\n font-size: 14px;\n }\n }\n`;\n\n/** Logo + module name shown inside the hero on phones. */\nexport const StyledPanelBrand = styled.div`\n display: none;\n\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n position: relative;\n display: flex;\n align-items: center;\n gap: 10px;\n margin-bottom: 26px;\n\n img {\n width: 38px;\n height: 38px;\n object-fit: contain;\n flex: 0 0 auto;\n background: #fff;\n border-radius: 10px;\n padding: 4px;\n }\n\n .hisd3-hero-name {\n display: block;\n font-family: var(--font-heading);\n font-size: 17px;\n font-weight: 700;\n line-height: 1.1;\n color: #fff;\n }\n\n .hisd3-hero-tagline {\n display: block;\n margin-top: 2px;\n font-size: 9px;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n opacity: 0.75;\n }\n }\n`;\n\n/** Photo layer, when `panelImage` is supplied. */\nexport const StyledPanelImage = styled.div<{ $src: string }>`\n position: absolute;\n inset: 0;\n background: center / cover no-repeat url(\"${({ $src }) => $src}\");\n mix-blend-mode: multiply;\n opacity: 0.35;\n`;\n\n/** Default decoration when no photo is given. */\nexport const StyledPanelPattern = styled.div`\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 52%;\n opacity: 0.16;\n background: repeating-linear-gradient(\n 90deg,\n #fff 0 26px,\n transparent 26px 34px,\n #fff 34px 44px,\n transparent 44px 58px,\n #fff 58px 96px,\n transparent 96px 108px,\n #fff 108px 130px,\n transparent 130px 150px\n );\n mask-image: linear-gradient(\n to top,\n #000 0 30%,\n rgba(0, 0, 0, 0.7) 55%,\n transparent 100%\n );\n clip-path: polygon(\n 0 62%, 6% 62%, 6% 40%, 13% 40%, 13% 55%, 21% 55%, 21% 22%, 28% 22%,\n 28% 48%, 36% 48%, 36% 33%, 44% 33%, 44% 58%, 52% 58%, 52% 14%, 60% 14%,\n 60% 44%, 68% 44%, 68% 30%, 77% 30%, 77% 52%, 86% 52%, 86% 26%, 94% 26%,\n 94% 47%, 100% 47%, 100% 100%, 0 100%\n );\n`;\n\n/** Fixed HISD3 watermark — the organisation mark, not the per-app logo. */\nexport const StyledWatermark = styled.div<{ $side: LoginSide }>`\n position: absolute;\n top: 30px;\n ${({ $side }) => ($side === \"right\" ? \"left: 40px;\" : \"right: 40px;\")}\n display: flex;\n align-items: center;\n gap: 10px;\n opacity: 0.28;\n font-family: var(--font-heading);\n font-size: 24px;\n font-weight: var(--font-weight-heading, 800);\n letter-spacing: 0.02em;\n color: #fff;\n\n img {\n width: 38px;\n height: 38px;\n object-fit: contain;\n filter: brightness(0) invert(1);\n }\n\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n display: none;\n }\n`;\n\nexport const StyledCorner = styled.div<{\n $variant: LoginVariant;\n $side: LoginSide;\n}>`\n position: absolute;\n ${({ $side }) => ($side === \"right\" ? \"right: -70px;\" : \"left: -70px;\")}\n bottom: 40px;\n width: 190px;\n height: 190px;\n opacity: 0.5;\n pointer-events: none;\n border-radius: ${({ $variant }) => (soft($variant) ? \"20px\" : \"0\")};\n background: ${[\"0 0\", \"100% 0\", \"0 100%\", \"100% 100%\"]\n .map(\n (pos) =>\n `linear-gradient(var(--ant-color-primary-bg, #FCEEEB), var(--ant-color-primary-bg, #FCEEEB)) ${pos} / 46% 46% no-repeat`,\n )\n .join(\", \")};\n\n @media (max-width: ${SPLIT_BREAKPOINT}px) {\n display: none;\n }\n`;\n\nexport const StyledCard = styled.form<{\n $variant: LoginVariant;\n $side: LoginSide;\n}>`\n position: relative;\n z-index: 2;\n margin: 40px ${({ $side }) => ($side === \"right\" ? \"7% 40px 0\" : \"0 40px 7%\")};\n width: min(430px, calc(100% - 48px));\n padding: 40px 44px 34px;\n background: var(--ant-color-bg-elevated, #fff);\n\n ${({ $variant }) =>\n soft($variant)\n ? css`\n border-radius: 18px;\n box-shadow: 0 4px 10px rgba(16, 15, 14, 0.05),\n 0 24px 60px rgba(16, 15, 14, 0.14);\n `\n : css`\n border-radius: 0;\n border: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n box-shadow: 0 2px 4px rgba(16, 15, 14, 0.04),\n 0 18px 44px rgba(16, 15, 14, 0.1);\n `}\n\n /* tablet and below: no panel, so centre the card */\n @media (max-width: ${SPLIT_BREAKPOINT}px) {\n margin: 0;\n width: min(440px, 100%);\n }\n\n /* phone: a sheet that rises over the hero and runs to the bottom */\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n width: 100%;\n /* grow to fill whatever the hero leaves, so white runs to the bottom */\n flex: 1 0 auto;\n margin: -28px 0 0;\n padding: 30px 22px 34px;\n box-shadow: none;\n border: 0;\n border-radius: ${({ $variant }) =>\n soft($variant) ? \"28px 28px 0 0\" : \"20px 20px 0 0\"};\n }\n`;\n\nexport const StyledBrand = styled.div<{ $variant: LoginVariant }>`\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 28px;\n\n .hisd3-login-logo {\n width: 54px;\n height: 54px;\n flex: 0 0 auto;\n object-fit: contain;\n display: block;\n }\n\n .hisd3-login-name {\n display: block;\n font-family: var(--font-heading);\n font-size: 25px;\n line-height: 1.05;\n font-weight: ${({ $variant }) =>\n soft($variant) ? 700 : \"var(--font-weight-heading, 800)\"};\n letter-spacing: ${({ $variant }) =>\n soft($variant) ? \"-0.01em\" : \"0.03em\"};\n text-transform: ${({ $variant }) =>\n soft($variant) ? \"none\" : \"uppercase\"};\n color: var(--ant-color-text, #171717);\n }\n\n .hisd3-login-tagline {\n display: block;\n margin-top: 4px;\n font-size: 9px;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary, #6E6E6E);\n }\n\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n display: none;\n }\n`;\n\nexport const StyledTitle = styled.h1<{ $variant: LoginVariant }>`\n margin: 0 0 6px;\n font-family: var(--font-heading);\n font-size: 26px;\n font-weight: ${({ $variant }) =>\n soft($variant) ? 700 : \"var(--font-weight-heading, 800)\"};\n color: var(--ant-color-text, #171717);\n\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n font-size: 22px;\n }\n`;\n\nexport const StyledSubtitle = styled.p`\n margin: 0 0 22px;\n font-size: 14px;\n color: var(--ant-color-text-secondary, #4A4A4A);\n`;\n\nexport const StyledField = styled.label<{ $variant: LoginVariant }>`\n display: block;\n margin-bottom: 16px;\n\n .hisd3-field-label {\n display: block;\n margin-bottom: 7px;\n font-size: 13px;\n font-weight: 600;\n color: var(--ant-color-text-secondary, #4A4A4A);\n }\n\n .hisd3-field-control {\n position: relative;\n display: flex;\n align-items: center;\n }\n\n input {\n width: 100%;\n height: 48px;\n padding: 0 44px 0 16px;\n font: inherit;\n font-size: 15px;\n color: var(--ant-color-text, #171717);\n background: ${({ $variant }) =>\n soft($variant)\n ? \"var(--hisd3-input-bg, #F2F3F5)\"\n : \"var(--hisd3-control-bg, #e6e4e1)\"};\n border: ${({ $variant }) =>\n soft($variant) ? \"1px\" : \"var(--hisd3-rule-width, 1px)\"}\n solid transparent;\n border-radius: ${({ $variant }) => (soft($variant) ? \"10px\" : \"0\")};\n outline: none;\n transition: border-color 0.15s ease, background 0.15s ease;\n\n &::placeholder {\n color: var(--ant-color-text-tertiary, #6E6E6E);\n }\n\n &:focus {\n background: var(--hisd3-input-bg-hover, #fff);\n border-color: var(--ant-color-primary, #E5533B);\n }\n\n &:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n }\n }\n\n @media (max-width: ${MOBILE_BREAKPOINT}px) {\n margin-bottom: 14px;\n\n input {\n height: 46px;\n /* 16px keeps iOS Safari from zooming in on focus */\n font-size: 16px;\n }\n }\n\n button.hisd3-field-reveal {\n position: absolute;\n right: 12px;\n display: flex;\n padding: 6px;\n border: 0;\n background: none;\n color: var(--ant-color-text-tertiary, #6E6E6E);\n cursor: pointer;\n\n &:hover {\n color: var(--ant-color-text, #171717);\n }\n }\n`;\n\nexport const StyledRow = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n margin: 18px 0 24px;\n font-size: 14px;\n\n .hisd3-remember {\n display: flex;\n align-items: center;\n gap: 10px;\n color: var(--ant-color-text, #171717);\n cursor: pointer;\n user-select: none;\n }\n\n button.hisd3-forgot {\n padding: 0;\n border: 0;\n background: none;\n font: inherit;\n font-weight: 500;\n color: var(--ant-color-primary, #E5533B);\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n }\n`;\n\nexport const StyledError = styled.div`\n margin-bottom: 16px;\n padding: 10px 14px;\n font-size: 13px;\n color: var(--ant-color-error, #e5401c);\n background: var(--ant-color-error-bg, rgba(229, 64, 28, 0.08));\n border-left: 3px solid var(--ant-color-error, #e5401c);\n`;\n\nexport const StyledFoot = styled.p`\n margin: 20px 0 0;\n text-align: center;\n font-size: 14px;\n color: var(--ant-color-text-secondary, #4A4A4A);\n`;\n","import { EyeInvisibleOutlined, EyeOutlined } from \"@ant-design/icons\";\nimport { Switch } from \"antd\";\nimport React, { useState, type FormEvent, type ReactNode } from \"react\";\n\nimport { HISD3_LOGO_SRC } from \"../../assets/logo\";\nimport { HISD3Button } from \"../Button\";\nimport {\n StyledBrand,\n StyledCard,\n StyledCorner,\n StyledError,\n StyledField,\n StyledFoot,\n StyledPage,\n StyledPanel,\n StyledPanelBrand,\n StyledPanelImage,\n StyledPanelPattern,\n StyledRow,\n StyledSubtitle,\n StyledTitle,\n StyledWatermark,\n type LoginSide,\n type LoginVariant,\n} from \"./index.styled\";\n\nexport interface HISD3LoginValues {\n identifier: string;\n password: string;\n remember: boolean;\n}\n\nexport interface HISD3LoginPageProps {\n /**\n * Name shown beside the logo on the card — normally the module, e.g.\n * \"Backoffice\", \"Pharmacy\", \"Cashiering\".\n */\n appName: ReactNode;\n /** Small uppercase line under the name, e.g. \"Hospital Information System\". */\n tagline?: ReactNode;\n /** Card logo. Defaults to the HISD3 mark; pass a module logo to override. */\n logoSrc?: string;\n /** Heading above the form. */\n title?: ReactNode;\n subtitle?: ReactNode;\n\n /**\n * Headline on the brand panel. Defaults to a hospital-system line; pass your\n * own to say something specific to the module or the hospital.\n */\n panelTitle?: ReactNode;\n /** Supporting line under the panel headline. Pass `null` to omit it. */\n panelSubtitle?: ReactNode;\n /** Photo behind the panel. Without one, a subtle pattern is drawn. */\n panelImage?: string;\n /**\n * Text beside the fixed HISD3 watermark. The watermark's mark itself is the\n * organisation logo and is deliberately not overridable.\n */\n organisationName?: ReactNode;\n\n /** \"soft\" (rounded, default) or \"square\" to match the Backoffice shell. */\n variant?: LoginVariant;\n /**\n * Which side the form card sits on — the brand panel takes the other.\n * Default \"right\". Below 1024px the panel is dropped and the card centres.\n */\n side?: LoginSide;\n\n identifierLabel?: ReactNode;\n identifierPlaceholder?: string;\n passwordLabel?: ReactNode;\n passwordPlaceholder?: string;\n submitLabel?: ReactNode;\n\n /** Hide the Remember me switch. */\n hideRemember?: boolean;\n rememberLabel?: ReactNode;\n /** Omit to hide the Forgot password link. */\n onForgotPassword?: () => void;\n forgotLabel?: ReactNode;\n\n /** Error message shown above the fields. */\n error?: ReactNode;\n /** Disables the form and shows the button spinner. */\n loading?: boolean;\n\n onSubmit: (values: HISD3LoginValues) => void | Promise<void>;\n\n /** Content under the button, e.g. a \"contact your administrator\" line. */\n footer?: ReactNode;\n className?: string;\n}\n\n/**\n * Split-screen sign-in page: a brand panel in the app's primary colour and a\n * floating card carrying the form.\n *\n * Per-app: `appName`, `tagline`, `logoSrc`, the copy, and the primary colour\n * (from `HISD3Provider`). Fixed: the HISD3 watermark on the panel, so every\n * module still reads as part of the same system.\n */\nexport const HISD3LoginPage: React.FC<HISD3LoginPageProps> = ({\n appName,\n tagline,\n logoSrc = HISD3_LOGO_SRC,\n title = \"Nice to see you again\",\n subtitle,\n panelTitle = \"One system for every part of your hospital.\",\n panelSubtitle = \"Patient care, billing and operations — connected.\",\n panelImage,\n organisationName = \"HISD3\",\n variant = \"soft\",\n side = \"right\",\n identifierLabel = \"User ID or email\",\n identifierPlaceholder = \"Email or user ID\",\n passwordLabel = \"Password\",\n passwordPlaceholder = \"Enter password\",\n submitLabel = \"Sign in\",\n hideRemember = false,\n rememberLabel = \"Remember me\",\n onForgotPassword,\n forgotLabel = \"Forgot password?\",\n error,\n loading = false,\n onSubmit,\n footer,\n className,\n}) => {\n const [identifier, setIdentifier] = useState(\"\");\n const [password, setPassword] = useState(\"\");\n const [remember, setRemember] = useState(false);\n const [reveal, setReveal] = useState(false);\n // A module logo that fails to load (Atlas down, none configured) falls\n // back to the HISD3 mark rather than a broken-image icon on the card.\n const [logoFailed, setLogoFailed] = useState(false);\n const logo = logoFailed ? HISD3_LOGO_SRC : logoSrc;\n\n const handleSubmit = (e: FormEvent) => {\n e.preventDefault();\n if (loading) return;\n void onSubmit({ identifier, password, remember });\n };\n\n return (\n <StyledPage className={className} $side={side}>\n <StyledCorner $variant={variant} $side={side} aria-hidden />\n\n <StyledPanel $variant={variant} $side={side}>\n {panelImage ? (\n <StyledPanelImage $src={panelImage} aria-hidden />\n ) : (\n <StyledPanelPattern aria-hidden />\n )}\n <StyledWatermark $side={side} aria-hidden>\n <img src={HISD3_LOGO_SRC} alt=\"\" />\n {organisationName}\n </StyledWatermark>\n <StyledPanelBrand>\n {logo && <img src={logo} alt=\"\" onError={() => setLogoFailed(true)} />}\n <span>\n <span className=\"hisd3-hero-name\">{appName}</span>\n {tagline && <span className=\"hisd3-hero-tagline\">{tagline}</span>}\n </span>\n </StyledPanelBrand>\n <h2>{panelTitle}</h2>\n {panelSubtitle && <p>{panelSubtitle}</p>}\n </StyledPanel>\n\n <StyledCard\n $variant={variant}\n $side={side}\n onSubmit={handleSubmit}\n noValidate\n >\n <StyledBrand $variant={variant}>\n {logo && (\n <img\n className=\"hisd3-login-logo\"\n src={logo}\n alt=\"\"\n onError={() => setLogoFailed(true)}\n />\n )}\n <span>\n <span className=\"hisd3-login-name\">{appName}</span>\n {tagline && (\n <span className=\"hisd3-login-tagline\">{tagline}</span>\n )}\n </span>\n </StyledBrand>\n\n <StyledTitle $variant={variant}>{title}</StyledTitle>\n {subtitle && <StyledSubtitle>{subtitle}</StyledSubtitle>}\n\n {error && <StyledError role=\"alert\">{error}</StyledError>}\n\n <StyledField $variant={variant}>\n <span className=\"hisd3-field-label\">{identifierLabel}</span>\n <span className=\"hisd3-field-control\">\n <input\n value={identifier}\n onChange={(e) => setIdentifier(e.target.value)}\n placeholder={identifierPlaceholder}\n autoComplete=\"username\"\n disabled={loading}\n autoFocus\n />\n </span>\n </StyledField>\n\n <StyledField $variant={variant}>\n <span className=\"hisd3-field-label\">{passwordLabel}</span>\n <span className=\"hisd3-field-control\">\n <input\n type={reveal ? \"text\" : \"password\"}\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n placeholder={passwordPlaceholder}\n autoComplete=\"current-password\"\n disabled={loading}\n />\n <button\n type=\"button\"\n className=\"hisd3-field-reveal\"\n aria-label={reveal ? \"Hide password\" : \"Show password\"}\n onClick={() => setReveal((v) => !v)}\n tabIndex={-1}\n >\n {reveal ? <EyeInvisibleOutlined /> : <EyeOutlined />}\n </button>\n </span>\n </StyledField>\n\n {(!hideRemember || onForgotPassword) && (\n <StyledRow>\n {!hideRemember ? (\n <label className=\"hisd3-remember\">\n <Switch\n size=\"small\"\n checked={remember}\n onChange={setRemember}\n disabled={loading}\n />\n {rememberLabel}\n </label>\n ) : (\n <span />\n )}\n {onForgotPassword && (\n <button\n type=\"button\"\n className=\"hisd3-forgot\"\n onClick={onForgotPassword}\n >\n {forgotLabel}\n </button>\n )}\n </StyledRow>\n )}\n\n <HISD3Button\n variant=\"primary\"\n htmlType=\"submit\"\n size=\"large\"\n loading={loading}\n block\n style={{ borderRadius: variant === \"soft\" ? 10 : 0, height: 50 }}\n >\n {submitLabel}\n </HISD3Button>\n\n {footer && <StyledFoot>{footer}</StyledFoot>}\n </StyledCard>\n </StyledPage>\n );\n};\n\nexport default HISD3LoginPage;\n","import { BellFilled } from \"@ant-design/icons\";\nimport { Dropdown, Empty, Spin } from \"antd\";\nimport React, { useState } from \"react\";\nimport styled from \"styled-components\";\n\nexport interface HISD3Notification {\n id: string;\n title: React.ReactNode;\n /** Secondary line, e.g. \"Folio 19370 was posted\". */\n description?: React.ReactNode;\n /** Right-aligned relative time, e.g. \"2h\". */\n time?: React.ReactNode;\n /** Unread items get a tinted row and a dot. */\n unread?: boolean;\n /** Leading avatar image; falls back to `icon`. */\n avatarSrc?: string;\n icon?: React.ReactNode;\n onClick?: (notification: HISD3Notification) => void;\n}\n\nexport interface HISD3NotificationButtonProps {\n items?: HISD3Notification[];\n /** Diameter of the circular button in px. Default 40. */\n size?: number;\n /** Badge count. Defaults to the number of unread items. */\n count?: number;\n loading?: boolean;\n title?: React.ReactNode;\n /** Shown as a link in the panel header when there are unread items. */\n onMarkAllRead?: () => void;\n /** Renders a footer row, e.g. \"See all notifications\". */\n onSeeAll?: () => void;\n seeAllLabel?: React.ReactNode;\n emptyText?: React.ReactNode;\n onOpenChange?: (open: boolean) => void;\n /** Replace the bell glyph. Defaults to a solid bell. */\n icon?: React.ReactNode;\n className?: string;\n}\n\nexport const HeaderIconButton = styled.button<{ $size?: number; $open?: boolean }>`\n user-select: none;\n -webkit-user-select: none;\n position: relative;\n width: ${({ $size = 40 }) => $size}px;\n height: ${({ $size = 40 }) => $size}px;\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n font-size: ${({ $size = 40 }) => Math.round($size * 0.54)}px;\n line-height: 1;\n color: var(--ant-color-text);\n background: var(--hisd3-control-bg, #e6e4e1);\n border: 0;\n border-radius: 50%;\n cursor: pointer;\n transition: background 0.15s ease, color 0.15s ease;\n\n &:hover {\n background: var(--hisd3-control-bg-hover, #dbd8d4);\n }\n\n /* open state: tinted with the app's primary, like Facebook's blue */\n ${({ $open }) =>\n $open\n ? `\n background: var(--ant-color-primary-bg);\n color: var(--ant-color-primary);\n &:hover { background: var(--ant-color-primary-bg-hover); }\n `\n : \"\"}\n\n &:focus-visible {\n outline: 2px solid var(--ant-color-primary);\n outline-offset: 2px;\n }\n\n & > .anticon {\n line-height: 0;\n /* the stock bell is narrow; widen it a touch for a fuller silhouette */\n transform: scaleX(var(--hisd3-bell-stretch, 1.12));\n }\n`;\n\n/** Count pill on the circle's top-right edge, ringed in the page background. */\nconst CountBadge = styled.span<{ $size: number }>`\n position: absolute;\n top: ${({ $size }) => -Math.round($size * 0.05)}px;\n right: ${({ $size }) => -Math.round($size * 0.05)}px;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 11px;\n font-weight: 700;\n line-height: 1;\n color: var(--hisd3-on-primary, #fff);\n background: var(--ant-color-error, #b42318);\n border: 2px solid var(--ant-color-bg-layout, #f3f2f0);\n border-radius: 999px;\n pointer-events: none;\n`;\n\nconst Panel = styled.div`\n width: 360px;\n max-width: calc(100vw - 32px);\n overflow: hidden;\n background: var(--ant-color-bg-elevated);\n border: 1px solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n border-radius: var(--hisd3-popup-radius, 10px);\n box-shadow: 0 2px 6px rgba(16, 15, 14, 0.06),\n 0 12px 32px rgba(16, 15, 14, 0.14);\n`;\n\nconst PanelHeader = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding: 12px 16px;\n border-bottom: 1px solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n\n h4 {\n margin: 0;\n font-size: 15px;\n font-weight: 700;\n letter-spacing: 0;\n }\n\n button {\n border: 0;\n background: none;\n padding: 0;\n font: inherit;\n font-size: 13px;\n color: var(--ant-color-primary);\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n }\n`;\n\nconst List = styled.div`\n max-height: 380px;\n overflow-y: auto;\n`;\n\nconst Row = styled.button<{ $unread?: boolean }>`\n display: flex;\n align-items: flex-start;\n gap: 12px;\n width: 100%;\n padding: 12px 16px;\n text-align: left;\n font: inherit;\n border: 0;\n cursor: pointer;\n background: ${({ $unread }) =>\n $unread ? \"var(--ant-color-primary-bg)\" : \"transparent\"};\n\n &:hover {\n background: ${({ $unread }) =>\n $unread ? \"var(--ant-color-primary-bg-hover)\" : \"var(--hisd3-hover, rgba(0,0,0,0.04))\"};\n }\n`;\n\nconst RowIcon = styled.span<{ $src?: string }>`\n width: 36px;\n height: 36px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n color: var(--ant-color-text);\n border-radius: 50%;\n background: ${({ $src }) =>\n $src ? `center / cover no-repeat url(\"${$src}\")` : \"var(--hisd3-control-bg, #e6e4e1)\"};\n`;\n\nconst RowBody = styled.span`\n flex: 1 1 auto;\n min-width: 0;\n\n strong {\n display: block;\n font-size: 14px;\n font-weight: 600;\n color: var(--ant-color-text);\n }\n\n span {\n display: block;\n font-size: 13px;\n color: var(--ant-color-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n time {\n display: block;\n margin-top: 2px;\n font-size: 12px;\n color: var(--ant-color-text-tertiary);\n }\n`;\n\nconst UnreadDot = styled.span`\n width: 8px;\n height: 8px;\n margin-top: 6px;\n flex: 0 0 auto;\n border-radius: 50%;\n background: var(--ant-color-primary);\n`;\n\nconst PanelFooter = styled.button`\n display: block;\n width: 100%;\n padding: 12px 16px;\n font: inherit;\n font-size: 13px;\n font-weight: 600;\n color: var(--ant-color-primary);\n text-align: center;\n background: transparent;\n border: 0;\n border-top: 1px solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n cursor: pointer;\n\n &:hover {\n background: var(--hisd3-hover, rgba(0, 0, 0, 0.04));\n }\n`;\n\nconst EmptyWrap = styled.div`\n padding: 28px 16px;\n`;\n\n/** Bell button with an unread badge and a Facebook-style notifications panel. */\nexport const HISD3NotificationButton: React.FC<HISD3NotificationButtonProps> = ({\n items = [],\n count,\n loading = false,\n title = \"Notifications\",\n onMarkAllRead,\n onSeeAll,\n seeAllLabel = \"See all notifications\",\n emptyText = \"You're all caught up\",\n onOpenChange,\n size = 40,\n icon,\n className,\n}) => {\n const [open, setOpen] = useState(false);\n const unread = count ?? items.filter((i) => i.unread).length;\n\n const panel = (\n <Panel>\n <PanelHeader>\n <h4>{title}</h4>\n {onMarkAllRead && unread > 0 && (\n <button type=\"button\" onClick={onMarkAllRead}>\n Mark all as read\n </button>\n )}\n </PanelHeader>\n\n {loading ? (\n <EmptyWrap style={{ textAlign: \"center\" }}>\n <Spin />\n </EmptyWrap>\n ) : items.length === 0 ? (\n <EmptyWrap>\n <Empty\n image={Empty.PRESENTED_IMAGE_SIMPLE}\n description={emptyText}\n />\n </EmptyWrap>\n ) : (\n <List>\n {items.map((item) => (\n <Row\n key={item.id}\n type=\"button\"\n $unread={item.unread}\n onClick={() => {\n item.onClick?.(item);\n setOpen(false);\n onOpenChange?.(false);\n }}\n >\n <RowIcon $src={item.avatarSrc}>\n {!item.avatarSrc && (item.icon ?? <BellFilled />)}\n </RowIcon>\n <RowBody>\n <strong>{item.title}</strong>\n {item.description && <span>{item.description}</span>}\n {item.time && <time>{item.time}</time>}\n </RowBody>\n {item.unread && <UnreadDot />}\n </Row>\n ))}\n </List>\n )}\n\n {onSeeAll && (\n <PanelFooter\n type=\"button\"\n onClick={() => {\n onSeeAll();\n setOpen(false);\n onOpenChange?.(false);\n }}\n >\n {seeAllLabel}\n </PanelFooter>\n )}\n </Panel>\n );\n\n return (\n <Dropdown\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n onOpenChange?.(next);\n }}\n trigger={[\"click\"]}\n placement=\"bottomRight\"\n popupRender={() => panel}\n >\n <HeaderIconButton\n type=\"button\"\n $size={size}\n $open={open}\n className={className}\n aria-label={`${title}${unread ? ` (${unread} unread)` : \"\"}`}\n >\n {icon ?? <BellFilled />}\n {unread > 0 && (\n <CountBadge $size={size}>{unread > 99 ? \"99+\" : unread}</CountBadge>\n )}\n </HeaderIconButton>\n </Dropdown>\n );\n};\n\nexport default HISD3NotificationButton;\n","import {\n DownOutlined,\n ExclamationCircleOutlined,\n LogoutOutlined,\n SettingOutlined,\n} from \"@ant-design/icons\";\nimport { App, Dropdown, type MenuProps } from \"antd\";\nimport React, { useState } from \"react\";\nimport styled from \"styled-components\";\n\nimport type { IUserEmployee } from \"../../types/account\";\n\nexport interface HISD3AvatarMenuProps {\n account: IUserEmployee;\n avatarSrc?: string;\n /** Settings entry target. Pass `null` to hide the Settings entry. */\n settingsUrl?: string | null;\n onSettings?: () => void;\n onLogout: () => Promise<void> | void;\n /** Ask for confirmation before logging out. Default true. */\n confirmLogout?: boolean;\n /** Extra entries above Settings / Logout. */\n extraItems?: MenuProps[\"items\"];\n /** Circle (Facebook-style) or square to match the rest of the design. */\n shape?: \"circle\" | \"square\";\n /** Diameter in px. Default 40. */\n size?: number;\n /** Hide the small chevron badge on the avatar. */\n hideChevron?: boolean;\n className?: string;\n}\n\nconst Trigger = styled.button<{\n $shape: \"circle\" | \"square\";\n $size: number;\n $open?: boolean;\n}>`\n user-select: none;\n -webkit-user-select: none;\n position: relative;\n width: ${({ $size }) => $size}px;\n height: ${({ $size }) => $size}px;\n flex: 0 0 auto;\n padding: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: ${({ $size }) => Math.round($size * 0.36)}px;\n font-weight: 700;\n color: var(--ant-color-text);\n background: var(--hisd3-control-bg, #e6e4e1);\n border: 0;\n border-radius: ${({ $shape }) => ($shape === \"circle\" ? \"50%\" : \"0\")};\n cursor: pointer;\n transition: filter 0.15s ease;\n\n &:hover {\n filter: brightness(0.94);\n }\n\n &:focus-visible {\n outline: 2px solid var(--ant-color-primary);\n outline-offset: 2px;\n }\n\n img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n border-radius: inherit;\n }\n`;\n\n/** Small chevron badge pinned to the bottom-right of the avatar. */\nconst Chevron = styled.span<{ $size: number; $open?: boolean }>`\n position: absolute;\n right: ${({ $size }) => -Math.round($size * 0.05)}px;\n bottom: ${({ $size }) => -Math.round($size * 0.05)}px;\n width: ${({ $size }) => Math.round($size * 0.45)}px;\n height: ${({ $size }) => Math.round($size * 0.45)}px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: ${({ $size }) => Math.round($size * 0.2)}px;\n color: var(--ant-color-text);\n background: var(--hisd3-control-bg, #e6e4e1);\n border: 2px solid var(--ant-color-bg-layout, #f3f2f0);\n border-radius: 50%;\n pointer-events: none;\n\n ${({ $open }) =>\n $open\n ? `\n background: var(--ant-color-primary);\n color: var(--hisd3-on-primary, #fff);\n `\n : \"\"}\n\n & svg {\n display: block;\n }\n`;\n\nconst Identity = styled.div`\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 12px 16px;\n min-width: 230px;\n border-bottom: 1px solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n\n .hisd3-identity-text {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .hisd3-identity-name {\n display: block;\n font-size: 14px;\n font-weight: 700;\n color: var(--ant-color-text);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .hisd3-identity-role {\n display: block;\n margin-top: 2px;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`;\n\nconst IdentityAvatar = styled.span<{ $src?: string }>`\n width: 40px;\n height: 40px;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 14px;\n font-weight: 700;\n border-radius: 50%;\n background: ${({ $src }) =>\n $src ? `center / cover no-repeat url(\"${$src}\")` : \"var(--hisd3-control-bg, #e6e4e1)\"};\n`;\n\nconst Panel = styled.div`\n overflow: hidden;\n background: var(--ant-color-bg-elevated);\n border: 1px solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n border-radius: var(--hisd3-popup-radius, 10px);\n box-shadow: 0 2px 6px rgba(16, 15, 14, 0.06),\n 0 12px 32px rgba(16, 15, 14, 0.14);\n\n .ant-menu {\n border-inline-end: none !important;\n background: transparent;\n }\n\n .ant-menu {\n padding: 6px;\n }\n\n .ant-menu-item {\n margin: 0;\n width: 100%;\n border-radius: 8px;\n font-size: 14px;\n }\n`;\n\nexport const getInitials = (fullName?: string): string =>\n (fullName || \"\")\n .replace(/\\(.*?\\)/g, \" \")\n .split(/[\\s,]+/)\n .map((w) => w.replace(/[^\\p{L}\\p{N}]/gu, \"\"))\n .filter(Boolean)\n .slice(0, 2)\n .map((w) => w[0].toUpperCase())\n .join(\"\") || \"?\";\n\n/**\n * Circular avatar button for the top-right of the header. Clicking it opens a\n * menu showing who is signed in, plus Settings and Logout (with a confirm\n * dialog by default).\n */\nexport const HISD3AvatarMenu: React.FC<HISD3AvatarMenuProps> = ({\n account,\n avatarSrc,\n settingsUrl = \"/settings\",\n onSettings,\n onLogout,\n confirmLogout = true,\n extraItems,\n shape = \"circle\",\n size = 40,\n hideChevron = false,\n className,\n}) => {\n const { modal } = App.useApp();\n const [open, setOpen] = useState(false);\n\n const handleLogout = () => {\n if (!confirmLogout) {\n void onLogout();\n return;\n }\n modal.confirm({\n title: \"Are you sure you want to logout?\",\n content: \"Please click OK to continue\",\n icon: <ExclamationCircleOutlined />,\n okText: \"Logout\",\n onOk: onLogout,\n });\n };\n\n const items: MenuProps[\"items\"] = [\n ...(extraItems ?? []),\n ...(settingsUrl !== null || onSettings\n ? [\n {\n key: \"settings\",\n icon: <SettingOutlined />,\n label: \"Settings\",\n onClick: () => {\n if (onSettings) onSettings();\n else if (settingsUrl) window.location.href = settingsUrl;\n },\n },\n ]\n : []),\n {\n key: \"logout\",\n icon: <LogoutOutlined />,\n label: \"Logout\",\n onClick: handleLogout,\n },\n ];\n\n return (\n <Dropdown\n open={open}\n onOpenChange={setOpen}\n trigger={[\"click\"]}\n placement=\"bottomRight\"\n menu={{ items, onClick: () => setOpen(false) }}\n popupRender={(menu) => (\n <Panel>\n <Identity>\n <IdentityAvatar $src={avatarSrc}>\n {!avatarSrc && getInitials(account.fullName)}\n </IdentityAvatar>\n <span className=\"hisd3-identity-text\">\n <span className=\"hisd3-identity-name\">{account.fullName}</span>\n {account.positionType && (\n <span className=\"hisd3-identity-role\">\n {account.positionType}\n </span>\n )}\n </span>\n </Identity>\n {menu}\n </Panel>\n )}\n >\n <Trigger\n type=\"button\"\n className={className}\n $shape={shape}\n $size={size}\n $open={open}\n aria-label={`Account menu for ${account.fullName}`}\n >\n {avatarSrc ? (\n <img src={avatarSrc} alt=\"\" />\n ) : (\n getInitials(account.fullName)\n )}\n {!hideChevron && (\n <Chevron $size={size} $open={open} aria-hidden>\n <DownOutlined />\n </Chevron>\n )}\n </Trigger>\n </Dropdown>\n );\n};\n\nexport default HISD3AvatarMenu;\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nexport { HISD3NotificationButton, HeaderIconButton } from \"./NotificationButton\";\nexport type {\n HISD3NotificationButtonProps,\n HISD3Notification,\n} from \"./NotificationButton\";\nexport { HISD3AvatarMenu, getInitials } from \"./AvatarMenu\";\nexport type { HISD3AvatarMenuProps } from \"./AvatarMenu\";\n\nconst Wrap = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n flex: 0 0 auto;\n`;\n\nconst Divider = styled.span`\n width: 2px;\n height: 24px;\n background: var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n flex: 0 0 auto;\n`;\n\nexport interface HISD3HeaderActionsProps {\n children: React.ReactNode;\n /** Insert a vertical rule before the last child (e.g. before the avatar). */\n divided?: boolean;\n className?: string;\n}\n\n/** Spacing wrapper for the top-right header controls. */\nexport const HISD3HeaderActions: React.FC<HISD3HeaderActionsProps> = ({\n children,\n divided = false,\n className,\n}) => {\n const kids = React.Children.toArray(children).filter(Boolean);\n return (\n <Wrap className={className}>\n {kids.map((child, i) => (\n <React.Fragment key={i}>\n {divided && i === kids.length - 1 && i > 0 && <Divider />}\n {child}\n </React.Fragment>\n ))}\n </Wrap>\n );\n};\n\nexport default HISD3HeaderActions;\n","import { LeftOutlined, RightOutlined } from \"@ant-design/icons\";\nimport { Pagination, Table, type TableProps } from \"antd\";\nimport type { AnyObject } from \"antd/es/_util/type\";\nimport React from \"react\";\nimport styled from \"styled-components\";\n\nexport interface HISD3TablePagination {\n current: number;\n pageSize: number;\n total: number;\n onChange: (page: number, pageSize: number) => void;\n /** Page-size toggle buttons on the right. Default [10, 20, 50]. */\n pageSizeOptions?: number[];\n /** Custom total text. Default \"Total 7,223 items\". */\n renderTotal?: (total: number, range: [number, number]) => React.ReactNode;\n /** Hide the page-size buttons. */\n hidePageSize?: boolean;\n}\n\nexport interface HISD3TableProps<T extends AnyObject>\n extends Omit<TableProps<T>, \"pagination\" | \"footer\"> {\n /** HISD3 pagination bar (total · pages · page-size). Omit for no pagination. */\n pagination?: HISD3TablePagination | false;\n /** Optional summary strip rendered between the rows and the pagination bar. */\n footer?: React.ReactNode;\n}\n\nconst Wrap = styled.div`\n /*\n * Opaque backgrounds throughout. A fixed column is \\`position: sticky\\`, so the\n * columns that scroll underneath it show through anything translucent.\n * Override --hisd3-table-bg / --hisd3-table-hover-bg on a surface that is not\n * the usual page grey.\n */\n .ant-table-wrapper .ant-table {\n background: var(--hisd3-table-bg, #f3f2f0);\n }\n\n .ant-table-wrapper .ant-table-thead > tr > th {\n /* column-heading: the most-read label on a screen, so never below 12px. */\n font-size: 12px;\n font-weight: 600;\n line-height: 16px;\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--ant-color-text-secondary);\n padding-block: 12px;\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n background: var(--hisd3-table-bg, #f3f2f0);\n }\n\n .ant-table-wrapper .ant-table-tbody > tr > td {\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n font-size: 14px;\n }\n\n .ant-table-wrapper .ant-table-tbody > tr:last-child > td {\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n }\n\n .ant-table-wrapper .ant-table-thead > tr > th:first-child,\n .ant-table-wrapper .ant-table-tbody > tr > td:first-child {\n padding-left: 0;\n }\n\n .ant-table-wrapper .ant-table-thead > tr > th:last-child,\n .ant-table-wrapper .ant-table-tbody > tr > td:last-child {\n padding-right: 0;\n }\n\n .ant-table-wrapper .ant-table-cell-row-hover {\n background: var(--hisd3-table-hover-bg, #ecebe9) !important;\n }\n\n /* Highlighted / linked cell text, e.g. bill numbers */\n .hisd3-cell-primary {\n color: var(--ant-color-primary);\n font-weight: 700;\n }\n .hisd3-cell-link {\n color: var(--ant-color-primary);\n }\n .hisd3-cell-muted {\n color: var(--ant-color-text-tertiary);\n }\n`;\n\nconst FooterStrip = styled.div`\n padding: 14px 0 8px;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--ant-color-text-tertiary);\n`;\n\nconst PagerBar = styled.div`\n user-select: none;\n -webkit-user-select: none;\n display: flex;\n align-items: center;\n gap: 16px;\n padding: 14px 0 4px;\n\n .hisd3-total {\n flex: 1 1 auto;\n font-size: 13px;\n color: var(--ant-color-text-secondary);\n }\n\n .ant-pagination {\n display: inline-flex;\n border: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n\n .ant-pagination-item,\n .ant-pagination-prev,\n .ant-pagination-next,\n .ant-pagination-jump-prev,\n .ant-pagination-jump-next {\n margin: 0;\n min-width: 34px;\n height: 34px;\n line-height: 34px;\n border: 0;\n border-right: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n border-radius: 0;\n font-weight: 700;\n font-size: 13px;\n background: transparent;\n\n &:last-child {\n border-right: 0;\n }\n\n a {\n color: var(--ant-color-text);\n }\n }\n\n .ant-pagination-item-active {\n background: var(--ant-color-primary);\n a {\n color: var(--hisd3-on-primary, #fff);\n }\n }\n\n .ant-pagination-prev .ant-pagination-item-link,\n .ant-pagination-next .ant-pagination-item-link {\n color: var(--ant-color-text);\n font-size: 11px;\n }\n\n .ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis,\n .ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis {\n color: var(--ant-color-text);\n font-weight: 700;\n }\n }\n`;\n\nconst SizeGroup = styled.div`\n display: inline-flex;\n border: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n\n button {\n height: 34px;\n padding: 0 14px;\n border: 0;\n border-right: var(--hisd3-rule-width, 1px) solid var(--hisd3-border, var(--ant-color-border, #D9D5CE));\n background: transparent;\n font: inherit;\n font-size: 13px;\n color: var(--ant-color-text);\n cursor: pointer;\n\n &:last-child {\n border-right: 0;\n }\n\n &[aria-pressed=\"true\"] {\n background: var(--ant-color-primary);\n color: var(--hisd3-on-primary, #fff);\n }\n }\n`;\n\nconst defaultTotal = (total: number) =>\n `Total ${total.toLocaleString()} items`;\n\nexport function HISD3Table<T extends AnyObject>({\n pagination,\n footer,\n ...tableProps\n}: HISD3TableProps<T>) {\n const p = pagination || undefined;\n const sizes = p?.pageSizeOptions ?? [10, 20, 50];\n\n return (\n <Wrap>\n <Table<T> {...tableProps} pagination={false} />\n\n {footer && <FooterStrip>{footer}</FooterStrip>}\n\n {p && (\n <PagerBar>\n <span className=\"hisd3-total\">\n {(p.renderTotal ?? defaultTotal)(p.total, [\n (p.current - 1) * p.pageSize + 1,\n Math.min(p.current * p.pageSize, p.total),\n ])}\n </span>\n <Pagination\n current={p.current}\n pageSize={p.pageSize}\n total={p.total}\n showSizeChanger={false}\n onChange={(page, size) => p.onChange(page, size)}\n itemRender={(_, type, el) => {\n if (type === \"prev\") return <span className=\"ant-pagination-item-link\"><LeftOutlined /></span>;\n if (type === \"next\") return <span className=\"ant-pagination-item-link\"><RightOutlined /></span>;\n return el;\n }}\n />\n {!p.hidePageSize && (\n <SizeGroup role=\"group\" aria-label=\"Rows per page\">\n {sizes.map((s) => (\n <button\n key={s}\n type=\"button\"\n aria-pressed={s === p.pageSize}\n onClick={() => p.onChange(1, s)}\n >\n {s} / page\n </button>\n ))}\n </SizeGroup>\n )}\n </PagerBar>\n )}\n </Wrap>\n );\n}\n\nexport default HISD3Table;\n","import { Tabs, type TabsProps } from \"antd\";\nimport React from \"react\";\nimport styled from \"styled-components\";\n\nexport interface HISD3TabItem {\n key: string;\n label: React.ReactNode;\n /** Optional count badge rendered after the label (e.g. \"All Patients 10\"). */\n count?: number | string;\n disabled?: boolean;\n children?: React.ReactNode;\n}\n\nexport interface HISD3TabsProps extends Omit<TabsProps, \"items\"> {\n items: HISD3TabItem[];\n}\n\nconst StyledTabs = styled(Tabs)`\n &.ant-tabs .ant-tabs-nav {\n user-select: none;\n -webkit-user-select: none;\n margin: 0;\n\n &::before {\n border-bottom: var(--hisd3-rule-width, 1px) solid var(--hisd3-border-secondary, var(--ant-color-border-secondary, #E7E4DE));\n }\n }\n\n &.ant-tabs .ant-tabs-tab {\n padding: 10px 0 12px;\n font-weight: 600;\n font-size: 15px;\n\n + .ant-tabs-tab {\n margin-left: 32px;\n }\n }\n\n &.ant-tabs .ant-tabs-ink-bar {\n height: 3px;\n }\n\n .hisd3-tab-count {\n margin-left: 8px;\n font-size: 13px;\n font-weight: 500;\n color: var(--ant-color-text-tertiary);\n }\n\n .ant-tabs-tab-active .hisd3-tab-count {\n color: var(--ant-color-primary);\n }\n`;\n\n/** Underlined filter tabs with optional counts. */\nexport const HISD3Tabs: React.FC<HISD3TabsProps> = ({ items, ...rest }) => (\n <StyledTabs\n {...rest}\n items={items.map(({ count, label, ...item }) => ({\n ...item,\n label: (\n <>\n {label}\n {count !== undefined && <span className=\"hisd3-tab-count\">{count}</span>}\n </>\n ),\n }))}\n />\n);\n\nexport default HISD3Tabs;\n","import React from \"react\";\nimport styled from \"styled-components\";\n\nexport type HISD3TagVariant = \"neutral\" | \"soft\" | \"outline\" | \"solid\";\nexport type HISD3TagTone = \"default\" | \"primary\" | \"success\" | \"warning\" | \"danger\";\n\nexport interface HISD3TagProps extends React.HTMLAttributes<HTMLSpanElement> {\n /**\n * neutral → light grey fill, dark text (ACTIVE, IN PATIENT)\n * soft → primary tint fill, primary text (ER PATIENT)\n * outline → 2px primary border, primary text (OUT PATIENT)\n * solid → tone fill, text in the colour that reads on it (white in light mode, dark in dark mode)\n */\n variant?: HISD3TagVariant;\n tone?: HISD3TagTone;\n children: React.ReactNode;\n}\n\nconst toneVar: Record<HISD3TagTone, string> = {\n default: \"var(--ant-color-text)\",\n primary: \"var(--ant-color-primary)\",\n success: \"var(--ant-color-success)\",\n warning: \"var(--ant-color-warning)\",\n danger: \"var(--ant-color-error)\",\n};\n\nconst toneBgVar: Record<HISD3TagTone, string> = {\n default: \"var(--hisd3-control-bg, #e6e4e1)\",\n primary: \"var(--ant-color-primary-bg)\",\n success: \"var(--ant-color-success-bg)\",\n warning: \"var(--ant-color-warning-bg)\",\n danger: \"var(--ant-color-error-bg)\",\n};\n\nconst StyledTag = styled.span<{ $variant: HISD3TagVariant; $tone: HISD3TagTone }>`\n display: inline-flex;\n align-items: center;\n gap: 5px;\n height: 24px;\n padding: 0 9px;\n /* tag: 12px, 600 — the status on a row is read as often as the row. */\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n white-space: nowrap;\n line-height: 1;\n border: var(--hisd3-rule-width, 1px) solid transparent;\n border-radius: 0;\n\n ${({ $variant, $tone }) => {\n const color = toneVar[$tone];\n const bg = toneBgVar[$tone];\n switch ($variant) {\n case \"soft\":\n return `color: ${color}; background: ${bg};`;\n case \"outline\":\n return `color: ${color}; border-color: ${color}; background: transparent;`;\n case \"solid\":\n return `color: var(--hisd3-on-primary, #fff); background: ${$tone === \"default\" ? \"var(--ant-color-text)\" : color};`;\n default:\n return `color: var(--ant-color-text); background: var(--hisd3-control-bg, #e6e4e1);`;\n }\n }}\n`;\n\nexport const HISD3Tag: React.FC<HISD3TagProps> = ({\n variant = \"neutral\",\n tone = variant === \"neutral\" ? \"default\" : \"primary\",\n children,\n ...rest\n}) => (\n <StyledTag $variant={variant} $tone={tone} {...rest}>\n {children}\n </StyledTag>\n);\n\nexport default HISD3Tag;\n","import { SearchOutlined } from \"@ant-design/icons\";\nimport { Input, type InputProps, type InputRef } from \"antd\";\nimport React, { forwardRef } from \"react\";\nimport styled from \"styled-components\";\n\nexport type HISD3InputProps = InputProps;\n\nconst StyledInput = styled(Input)`\n &.ant-input,\n &.ant-input-affix-wrapper {\n border-width: var(--hisd3-rule-width, 1px);\n font-size: 14px;\n }\n\n &.ant-input-affix-wrapper .ant-input-prefix {\n margin-inline-end: 10px;\n color: var(--ant-color-text-tertiary);\n font-size: 15px;\n }\n`;\n\n/** Plain text input with the HISD3 2px border. */\nexport const HISD3Input = forwardRef<InputRef, HISD3InputProps>((props, ref) => (\n <StyledInput {...props} ref={ref} />\n));\nHISD3Input.displayName = \"HISD3Input\";\n\nconst StyledSearch = styled(StyledInput)`\n /*\n * default: the same 40px control height as buttons and selects.\n * Lighter than the page with the same 3:1 edge as every other field, so it\n * reads as a field to type in; a fill darker than the page reads as disabled.\n */\n &.ant-input-affix-wrapper {\n background: var(--hisd3-input-bg, #FAF9F7);\n border-color: var(--hisd3-input-border, #8C8A85);\n height: 40px;\n padding-inline: 14px;\n\n &:hover {\n border-color: var(--hisd3-input-border-hover, #5F5D59);\n background: var(--hisd3-input-bg-hover, #FFFFFF);\n }\n\n &:focus-within {\n border-color: var(--ant-color-primary);\n background: var(--hisd3-input-bg-hover, #FFFFFF);\n /* A 2px primary edge: the border plus a 1px ring, as on every field. */\n box-shadow: 0 0 0 1px var(--ant-color-primary);\n }\n\n .ant-input {\n background: transparent;\n font-size: 14px;\n }\n\n .ant-input-prefix {\n margin-inline-end: 10px;\n font-size: 15px;\n color: var(--ant-color-text-secondary);\n }\n }\n\n /* compact: pairs with a small table */\n &.hisd3-search-sm.ant-input-affix-wrapper {\n height: 32px;\n padding-inline: 12px;\n\n .ant-input {\n font-size: 13px;\n }\n .ant-input-prefix {\n margin-inline-end: 8px;\n font-size: 14px;\n }\n }\n\n /* hero: the tall standalone search at the top of a landing page */\n &.hisd3-search-lg.ant-input-affix-wrapper {\n height: 56px;\n padding-inline: 20px;\n\n .ant-input {\n font-size: 17px;\n }\n .ant-input-prefix {\n margin-inline-end: 14px;\n font-size: 19px;\n }\n }\n`;\n\nexport interface HISD3SearchInputProps extends Omit<InputProps, \"size\"> {\n /**\n * \"small\" 32px, \"middle\" 40px (default, matches buttons), \"large\" 56px for a\n * standalone hero search.\n */\n size?: \"small\" | \"middle\" | \"large\";\n /** @deprecated use `size` — kept so existing call sites keep working. */\n compact?: boolean;\n}\n\nconst SEARCH_SIZE_CLASS = {\n small: \"hisd3-search-sm\",\n middle: \"\",\n large: \"hisd3-search-lg\",\n} as const;\n\n/** Light search field with a leading icon (the page-level search bar). */\nexport const HISD3SearchInput = forwardRef<InputRef, HISD3SearchInputProps>(\n ({ size, compact, className, ...props }, ref) => (\n <StyledSearch\n ref={ref}\n allowClear\n prefix={<SearchOutlined />}\n className={[\n SEARCH_SIZE_CLASS[size ?? (compact ? \"small\" : \"middle\")],\n className ?? \"\",\n ]\n .join(\" \")\n .trim()}\n {...props}\n />\n ),\n);\nHISD3SearchInput.displayName = \"HISD3SearchInput\";\n\nexport default HISD3Input;\n","import { Select, type RefSelectProps, type SelectProps } from \"antd\";\nimport type { DefaultOptionType } from \"antd/es/select\";\nimport React, { forwardRef, useMemo } from \"react\";\n\n/** An option that may carry a second, smaller line under its label. */\nexport interface HISD3SelectOption extends DefaultOptionType {\n /** Shown under the label, smaller and muted — e.g. the account title under its code. */\n description?: React.ReactNode;\n}\n\nexport interface HISD3SelectProps extends SelectProps<any, HISD3SelectOption> {\n /**\n * Wrap long text onto more lines — in the chosen value and in every option —\n * instead of cutting it off with \"…\". On by default.\n *\n * Turns antd's virtual list off unless you pass `virtual` yourself: wrapped\n * rows are not all the same height. Pass `virtual` for a very long list.\n */\n wrap?: boolean;\n /** Label line in a monospace font — for codes (account codes, UACS, …). */\n monoLabel?: boolean;\n}\n\nconst MONO = \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\";\n\nexport interface HISD3SelectLabelProps {\n label: React.ReactNode;\n description?: React.ReactNode;\n /** Label in a monospace font. */\n mono?: boolean;\n}\n\n/**\n * The two-line layout HISD3Select uses for an option with a `description`:\n * the label on top, the description underneath, smaller and muted. Both wrap.\n * Exported for a custom `optionRender` / `labelRender` that wants the same look.\n */\nexport const HISD3SelectLabel: React.FC<HISD3SelectLabelProps> = ({ label, description, mono }) => (\n <div className=\"hisd3-select-label\">\n <div\n className=\"hisd3-select-label-primary\"\n style={mono ? { fontFamily: MONO } : undefined}\n >\n {label}\n </div>\n {description != null && description !== \"\" ? (\n <div className=\"hisd3-select-label-description\">{description}</div>\n ) : null}\n </div>\n);\n\nconst asText = (node: unknown) =>\n typeof node === \"string\" || typeof node === \"number\" ? String(node) : \"\";\n\n/** Every leaf option, groups flattened. */\nconst flatten = (options: HISD3SelectOption[] | undefined): HISD3SelectOption[] =>\n (options ?? []).flatMap((option) =>\n Array.isArray(option.options) ? flatten(option.options as HISD3SelectOption[]) : [option],\n );\n\n/** Search the label (or the value when there is no label) and the description. */\nconst filterWithDescription = (input: string, option?: HISD3SelectOption) => {\n if (!option) return false;\n const haystack = `${asText(option.label ?? option.value)} ${asText(option.description)}`;\n return haystack.toUpperCase().includes(input.toUpperCase());\n};\n\nconst join = (...names: (string | false | undefined)[]) => names.filter(Boolean).join(\" \");\n\n/**\n * antd Select that wraps long text instead of truncating it, and shows an\n * option's `description` on a second line — in the dropdown and in the box.\n *\n * ```tsx\n * <HISD3Select\n * showSearch\n * monoLabel\n * options={accounts.map((a) => ({ value: a.code, label: a.code, description: a.title }))}\n * />\n * ```\n */\nexport const HISD3Select = forwardRef<RefSelectProps, HISD3SelectProps>(\n (\n {\n wrap = true,\n monoLabel,\n options,\n mode,\n showSearch,\n filterOption,\n optionFilterProp,\n optionRender,\n labelRender,\n virtual,\n rootClassName,\n ...props\n },\n ref,\n ) => {\n const byValue = useMemo(\n () => new Map(flatten(options).map((option) => [option.value, option])),\n [options],\n );\n const hasDescriptions = useMemo(\n () => [...byValue.values()].some((option) => option.description != null),\n [byValue],\n );\n\n const render = (option: HISD3SelectOption | undefined, fallback: React.ReactNode) =>\n option?.description != null || monoLabel ? (\n <HISD3SelectLabel\n label={option?.label ?? fallback}\n description={option?.description}\n mono={monoLabel}\n />\n ) : (\n fallback\n );\n\n const searchConfig = typeof showSearch === \"object\" ? showSearch : undefined;\n const filterIsSet =\n filterOption !== undefined ||\n optionFilterProp !== undefined ||\n searchConfig?.filterOption !== undefined ||\n searchConfig?.optionFilterProp !== undefined;\n\n return (\n <Select<any, HISD3SelectOption>\n {...props}\n ref={ref}\n mode={mode}\n options={options}\n showSearch={showSearch}\n optionFilterProp={optionFilterProp}\n filterOption={\n filterOption ?? (!filterIsSet && hasDescriptions ? filterWithDescription : undefined)\n }\n optionRender={\n optionRender ?? ((option) => render(option.data, option.label ?? option.value))\n }\n // Tags in a multi-select keep antd's one-line label.\n labelRender={\n labelRender ??\n (mode\n ? undefined\n : ({ label, value }) => render(byValue.get(value), label ?? value))\n }\n virtual={virtual ?? (wrap ? false : undefined)}\n // antd puts `rootClassName` on the control and on its popup alike.\n rootClassName={join(wrap && \"hisd3-wrap-select\", rootClassName)}\n />\n );\n },\n);\nHISD3Select.displayName = \"HISD3Select\";\n\nexport default HISD3Select;\n","import {\n AutoComplete,\n Cascader,\n Checkbox,\n ColorPicker,\n DatePicker,\n Form,\n Input,\n InputNumber,\n Mentions,\n Radio,\n Rate,\n Segmented,\n Skeleton,\n Slider,\n Switch,\n TimePicker,\n Transfer,\n TreeSelect,\n Upload,\n type CheckboxProps,\n type CheckboxRef,\n type DatePickerProps,\n type FormItemProps,\n type GetProps,\n type GetRef,\n type InputNumberProps,\n type InputProps,\n type InputRef,\n type RadioGroupProps,\n type RefSelectProps,\n type SwitchProps,\n type TimePickerProps,\n type AutoCompleteProps,\n type CascaderAutoProps,\n type ColorPickerProps,\n type MentionsProps,\n type MentionsRef,\n type RateProps,\n type SegmentedProps,\n type TimeRangePickerProps,\n type TransferProps,\n type TreeSelectProps,\n type UploadFile,\n type UploadProps,\n} from \"antd\";\nimport React, { forwardRef } from \"react\";\nimport styled from \"styled-components\";\nimport { HISD3Input } from \"../Input\";\nimport { HISD3Select, type HISD3SelectProps } from \"../Select\";\n\n/* -------------------------------------------------------------------------- */\n/* Shared field shell */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3SkeletonInputProps = GetProps<typeof Skeleton.Input>;\ntype ControlSize = HISD3SkeletonInputProps[\"size\"];\n\nexport interface HISD3FormFieldBaseProps extends Omit<FormItemProps, \"children\"> {\n /** Show a skeleton in place of the control (e.g. while the record loads). */\n loading?: boolean;\n /** Props for the default skeleton (`Skeleton.Input`). */\n loadingProps?: HISD3SkeletonInputProps;\n /** Label above the control instead of beside it. Shortcut for `layout=\"vertical\"`. */\n vertical?: boolean;\n /** Semi-bold (600) label. Only the label changes — the control text does not. */\n bolderLabel?: boolean;\n}\n\n/** Every wrapped field takes the Form.Item props plus `fieldProps` for the control. */\nexport type HISD3FormFieldProps<P> = HISD3FormFieldBaseProps & {\n /** Props passed straight to the wrapped antd control. */\n fieldProps?: P;\n};\n\nconst StyledItem = styled(Form.Item)`\n &.ant-form-item {\n margin-bottom: 6px;\n }\n\n /* vertical: sit the label close to its control */\n &.ant-form-item-vertical .ant-form-item-label {\n padding-bottom: 2px;\n }\n\n &.hisd3-form-field-bold .ant-form-item-label > label {\n font-weight: 600;\n }\n\n /* pickers and number inputs fill the column like text inputs do */\n .ant-picker,\n .ant-input-number,\n .ant-input-number-group-wrapper {\n width: 100%;\n }\n`;\n\n/**\n * Swallows the value / onChange / id that Form.Item injects into its child,\n * so the skeleton never receives them (and never warns about unknown props).\n */\nconst FieldSkeleton: React.FC<{ node: React.ReactNode }> = ({ node }) => <>{node}</>;\n\nexport interface HISD3FormFieldShellProps extends HISD3FormFieldBaseProps {\n /** Control size — used to size the default skeleton. */\n controlSize?: ControlSize;\n /** Replace the default skeleton (e.g. a small one for a switch). */\n skeleton?: React.ReactNode;\n children?: React.ReactNode;\n}\n\n/**\n * The Form.Item wrapper every HISD3Form* field uses. Use it directly to give a\n * custom control the same label, spacing and loading behaviour.\n */\nexport const HISD3FormField: React.FC<HISD3FormFieldShellProps> = ({\n loading,\n loadingProps,\n vertical,\n bolderLabel,\n controlSize,\n skeleton,\n layout,\n className,\n children,\n ...itemProps\n}) => (\n <StyledItem\n {...itemProps}\n layout={vertical ? \"vertical\" : layout}\n className={[\"hisd3-form-field\", bolderLabel ? \"hisd3-form-field-bold\" : \"\", className ?? \"\"]\n .join(\" \")\n .trim()}\n >\n {loading ? (\n <FieldSkeleton\n node={\n skeleton ?? (\n <Skeleton.Input active block size={controlSize} {...loadingProps} />\n )\n }\n />\n ) : (\n children\n )}\n </StyledItem>\n);\n\n/** A wrapped field: its props plus a ref to the underlying antd control. */\nexport type HISD3FormFieldComponent<P, R> = React.ForwardRefExoticComponent<\n React.PropsWithoutRef<P> & React.RefAttributes<R>\n>;\n\nexport type HISD3InputNumberRef = GetRef<typeof InputNumber>;\nexport type HISD3PickerRef = GetRef<typeof DatePicker>;\nexport type HISD3RangePickerRef = GetRef<typeof DatePicker.RangePicker>;\nexport type HISD3TimePickerRef = GetRef<typeof TimePicker>;\n\nconst smallSkeleton = (width: number) => (\n <Skeleton.Button active size=\"small\" style={{ width, minWidth: width }} />\n);\n\n/* -------------------------------------------------------------------------- */\n/* Text */\n/* -------------------------------------------------------------------------- */\n\nexport interface HISD3FormInputProps extends HISD3FormFieldProps<InputProps> {\n /** @deprecated use `fieldProps` — kept so existing call sites keep working. */\n propsinput?: InputProps;\n}\n\n/** Text input inside a Form.Item. */\nexport const HISD3FormInput = forwardRef<InputRef, HISD3FormInputProps>(\n ({ fieldProps, propsinput, ...field }, ref) => {\n const inputProps = { ...propsinput, ...fieldProps };\n return (\n <HISD3FormField {...field} controlSize={inputProps.size}>\n <HISD3Input {...inputProps} ref={ref} />\n </HISD3FormField>\n );\n },\n);\nHISD3FormInput.displayName = \"HISD3FormInput\";\n\nexport type HISD3FormPasswordProps = HISD3FormFieldProps<GetProps<typeof Input.Password>>;\n\n/** Password input with the show / hide toggle. */\nexport const HISD3FormPassword = forwardRef<InputRef, HISD3FormPasswordProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <Input.Password {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormPassword.displayName = \"HISD3FormPassword\";\n\nexport type HISD3FormTextAreaProps = HISD3FormFieldProps<GetProps<typeof Input.TextArea>>;\n\n/** Multi-line text. The skeleton grows with `fieldProps.rows`. */\nexport const HISD3FormTextArea = forwardRef<GetRef<typeof Input.TextArea>, HISD3FormTextAreaProps>(\n ({ fieldProps, loadingProps, ...field }, ref) => (\n <HISD3FormField\n {...field}\n controlSize={fieldProps?.size}\n loadingProps={{\n ...loadingProps,\n style: { height: 22 * (fieldProps?.rows ?? 3) + 10, ...loadingProps?.style },\n }}\n >\n <Input.TextArea {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormTextArea.displayName = \"HISD3FormTextArea\";\n\nexport type HISD3FormInputNumberProps = HISD3FormFieldProps<InputNumberProps>;\n\n/** Numeric input, full width of its column. */\nexport const HISD3FormInputNumber: HISD3FormFieldComponent<\n HISD3FormInputNumberProps,\n HISD3InputNumberRef\n> = forwardRef<HISD3InputNumberRef, HISD3FormInputNumberProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <InputNumber {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormInputNumber.displayName = \"HISD3FormInputNumber\";\n\n/* -------------------------------------------------------------------------- */\n/* Choice */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3FormSelectProps = HISD3FormFieldProps<HISD3SelectProps>;\n\n/** Select / multi-select (`HISD3Select`: long text wraps, options may carry a `description`). */\nexport const HISD3FormSelect = forwardRef<RefSelectProps, HISD3FormSelectProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <HISD3Select {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormSelect.displayName = \"HISD3FormSelect\";\n\nexport type HISD3FormRadioGroupProps = HISD3FormFieldProps<RadioGroupProps>;\n\n/** Radio group — pass `fieldProps.options`. */\nexport const HISD3FormRadioGroup = forwardRef<HTMLDivElement, HISD3FormRadioGroupProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <Radio.Group {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormRadioGroup.displayName = \"HISD3FormRadioGroup\";\n\nexport interface HISD3FormCheckboxProps extends HISD3FormFieldProps<CheckboxProps> {\n /** Text beside the box. Shortcut for `fieldProps.children`. */\n text?: React.ReactNode;\n}\n\n/** Single boolean checkbox; the form value is `true` / `false`. */\nexport const HISD3FormCheckbox = forwardRef<CheckboxRef, HISD3FormCheckboxProps>(\n ({ fieldProps, text, ...field }, ref) => (\n <HISD3FormField valuePropName=\"checked\" skeleton={smallSkeleton(120)} {...field}>\n <Checkbox {...fieldProps} ref={ref}>\n {text ?? fieldProps?.children}\n </Checkbox>\n </HISD3FormField>\n ),\n);\nHISD3FormCheckbox.displayName = \"HISD3FormCheckbox\";\n\nexport type HISD3FormCheckboxGroupProps = HISD3FormFieldProps<GetProps<typeof Checkbox.Group>>;\n\n/** Checkbox group — pass `fieldProps.options`; the form value is an array. */\nexport const HISD3FormCheckboxGroup = forwardRef<HTMLDivElement, HISD3FormCheckboxGroupProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field}>\n <Checkbox.Group {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormCheckboxGroup.displayName = \"HISD3FormCheckboxGroup\";\n\nexport type HISD3FormSwitchProps = HISD3FormFieldProps<SwitchProps>;\n\n/** On / off switch; the form value is `true` / `false`. */\nexport const HISD3FormSwitch = forwardRef<HTMLButtonElement, HISD3FormSwitchProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField\n valuePropName=\"checked\"\n skeleton={smallSkeleton(fieldProps?.size === \"small\" ? 28 : 44)}\n {...field}\n >\n <Switch {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormSwitch.displayName = \"HISD3FormSwitch\";\n\n/* -------------------------------------------------------------------------- */\n/* Date & time */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3FormDatePickerProps = HISD3FormFieldProps<DatePickerProps>;\n\n/** Date picker, full width of its column. The form value is a Dayjs. */\nexport const HISD3FormDatePicker: HISD3FormFieldComponent<\n HISD3FormDatePickerProps,\n HISD3PickerRef\n> = forwardRef<HISD3PickerRef, HISD3FormDatePickerProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <DatePicker {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormDatePicker.displayName = \"HISD3FormDatePicker\";\n\nexport type HISD3FormRangePickerProps = HISD3FormFieldProps<GetProps<typeof DatePicker.RangePicker>>;\n\n/** Start / end date range. The form value is `[Dayjs, Dayjs]`. */\nexport const HISD3FormRangePicker: HISD3FormFieldComponent<\n HISD3FormRangePickerProps,\n HISD3RangePickerRef\n> = forwardRef<HISD3RangePickerRef, HISD3FormRangePickerProps>(({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <DatePicker.RangePicker {...fieldProps} ref={ref} />\n </HISD3FormField>\n));\nHISD3FormRangePicker.displayName = \"HISD3FormRangePicker\";\n\nexport type HISD3FormTimePickerProps = HISD3FormFieldProps<TimePickerProps>;\n\n/** Time picker, full width of its column. */\nexport const HISD3FormTimePicker: HISD3FormFieldComponent<\n HISD3FormTimePickerProps,\n HISD3TimePickerRef\n> = forwardRef<HISD3TimePickerRef, HISD3FormTimePickerProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <TimePicker {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormTimePicker.displayName = \"HISD3FormTimePicker\";\n\nexport type HISD3TimeRangePickerRef = GetRef<typeof TimePicker.RangePicker>;\nexport type HISD3FormTimeRangePickerProps = HISD3FormFieldProps<TimeRangePickerProps>;\n\n/** Start / end time range. The form value is `[Dayjs, Dayjs]`. */\nexport const HISD3FormTimeRangePicker: HISD3FormFieldComponent<\n HISD3FormTimeRangePickerProps,\n HISD3TimeRangePickerRef\n> = forwardRef<HISD3TimeRangePickerRef, HISD3FormTimeRangePickerProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <TimePicker.RangePicker {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormTimeRangePicker.displayName = \"HISD3FormTimeRangePicker\";\n\n/* -------------------------------------------------------------------------- */\n/* More text entry */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3FormSearchProps = HISD3FormFieldProps<GetProps<typeof Input.Search>>;\n\n/** Input with a search button (`fieldProps.onSearch`). */\nexport const HISD3FormSearch = forwardRef<InputRef, HISD3FormSearchProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <Input.Search {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormSearch.displayName = \"HISD3FormSearch\";\n\nexport type HISD3OTPRef = GetRef<typeof Input.OTP>;\nexport type HISD3FormOTPProps = HISD3FormFieldProps<GetProps<typeof Input.OTP>>;\n\n/** One-time code boxes (`fieldProps.length`, default 6). The form value is a string. */\nexport const HISD3FormOTP: HISD3FormFieldComponent<HISD3FormOTPProps, HISD3OTPRef> =\n forwardRef<HISD3OTPRef, HISD3FormOTPProps>(({ fieldProps, loadingProps, ...field }, ref) => (\n <HISD3FormField\n {...field}\n controlSize={fieldProps?.size}\n loadingProps={{\n block: false,\n ...loadingProps,\n style: { width: (fieldProps?.length ?? 6) * 48, ...loadingProps?.style },\n }}\n >\n <Input.OTP {...fieldProps} ref={ref} />\n </HISD3FormField>\n ));\nHISD3FormOTP.displayName = \"HISD3FormOTP\";\n\nexport type HISD3AutoCompleteRef = GetRef<typeof AutoComplete>;\nexport type HISD3FormAutoCompleteProps = HISD3FormFieldProps<AutoCompleteProps>;\n\n/** Free text with suggestions (`fieldProps.options`). */\nexport const HISD3FormAutoComplete: HISD3FormFieldComponent<\n HISD3FormAutoCompleteProps,\n HISD3AutoCompleteRef\n> = forwardRef<HISD3AutoCompleteRef, HISD3FormAutoCompleteProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <AutoComplete {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormAutoComplete.displayName = \"HISD3FormAutoComplete\";\n\nexport type HISD3FormMentionsProps = HISD3FormFieldProps<MentionsProps>;\n\n/** Text area with `@` mentions (`fieldProps.options`). */\nexport const HISD3FormMentions = forwardRef<MentionsRef, HISD3FormMentionsProps>(\n ({ fieldProps, loadingProps, ...field }, ref) => (\n <HISD3FormField\n {...field}\n controlSize={fieldProps?.size}\n loadingProps={{\n ...loadingProps,\n style: { height: 22 * (fieldProps?.rows ?? 1) + 18, ...loadingProps?.style },\n }}\n >\n <Mentions {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormMentions.displayName = \"HISD3FormMentions\";\n\n/* -------------------------------------------------------------------------- */\n/* More choice */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3CascaderRef = GetRef<typeof Cascader>;\nexport type HISD3FormCascaderProps = HISD3FormFieldProps<CascaderAutoProps>;\n\n/** Hierarchical select (e.g. region → province → city). The value is the path array. */\nexport const HISD3FormCascader: HISD3FormFieldComponent<HISD3FormCascaderProps, HISD3CascaderRef> =\n forwardRef<HISD3CascaderRef, HISD3FormCascaderProps>(({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <Cascader {...fieldProps} ref={ref} />\n </HISD3FormField>\n ));\nHISD3FormCascader.displayName = \"HISD3FormCascader\";\n\nexport type HISD3TreeSelectRef = GetRef<typeof TreeSelect>;\nexport type HISD3FormTreeSelectProps = HISD3FormFieldProps<TreeSelectProps>;\n\n/** Select from a tree (`fieldProps.treeData`). */\nexport const HISD3FormTreeSelect: HISD3FormFieldComponent<\n HISD3FormTreeSelectProps,\n HISD3TreeSelectRef\n> = forwardRef<HISD3TreeSelectRef, HISD3FormTreeSelectProps>(({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize={fieldProps?.size}>\n <TreeSelect {...fieldProps} ref={ref} />\n </HISD3FormField>\n));\nHISD3FormTreeSelect.displayName = \"HISD3FormTreeSelect\";\n\nexport type HISD3FormSegmentedProps = HISD3FormFieldProps<SegmentedProps>;\n\n/** Segmented control (`fieldProps.options`); a compact alternative to radios. */\nexport const HISD3FormSegmented = forwardRef<HTMLDivElement, HISD3FormSegmentedProps>(\n ({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} skeleton={smallSkeleton(200)}>\n <Segmented {...fieldProps} options={fieldProps?.options ?? []} ref={ref} />\n </HISD3FormField>\n ),\n);\nHISD3FormSegmented.displayName = \"HISD3FormSegmented\";\n\nexport type HISD3TransferRef = GetRef<typeof Transfer>;\nexport type HISD3FormTransferProps = HISD3FormFieldProps<TransferProps>;\n\n/**\n * Two-list picker. The form value is the right-hand keys (`targetKeys`);\n * pass the full list as `fieldProps.dataSource`.\n */\nexport const HISD3FormTransfer: HISD3FormFieldComponent<HISD3FormTransferProps, HISD3TransferRef> =\n forwardRef<HISD3TransferRef, HISD3FormTransferProps>(\n ({ fieldProps, loadingProps, ...field }, ref) => (\n <HISD3FormField\n valuePropName=\"targetKeys\"\n loadingProps={{ ...loadingProps, style: { height: 200, ...loadingProps?.style } }}\n {...field}\n >\n <Transfer {...fieldProps} ref={ref} />\n </HISD3FormField>\n ),\n );\nHISD3FormTransfer.displayName = \"HISD3FormTransfer\";\n\n/* -------------------------------------------------------------------------- */\n/* Range & rating */\n/* -------------------------------------------------------------------------- */\n\nexport type HISD3SliderRef = GetRef<typeof Slider>;\nexport type HISD3FormSliderProps = HISD3FormFieldProps<GetProps<typeof Slider>>;\n\n/** Slider; `fieldProps.range` makes the value `[min, max]`. */\nexport const HISD3FormSlider: HISD3FormFieldComponent<HISD3FormSliderProps, HISD3SliderRef> =\n forwardRef<HISD3SliderRef, HISD3FormSliderProps>(({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} controlSize=\"small\">\n <Slider {...fieldProps} ref={ref} />\n </HISD3FormField>\n ));\nHISD3FormSlider.displayName = \"HISD3FormSlider\";\n\nexport type HISD3RateRef = GetRef<typeof Rate>;\nexport type HISD3FormRateProps = HISD3FormFieldProps<RateProps>;\n\n/** Star rating. */\nexport const HISD3FormRate: HISD3FormFieldComponent<HISD3FormRateProps, HISD3RateRef> =\n forwardRef<HISD3RateRef, HISD3FormRateProps>(({ fieldProps, ...field }, ref) => (\n <HISD3FormField {...field} skeleton={smallSkeleton((fieldProps?.count ?? 5) * 28)}>\n <Rate {...fieldProps} ref={ref} />\n </HISD3FormField>\n ));\nHISD3FormRate.displayName = \"HISD3FormRate\";\n\nexport type HISD3FormColorPickerProps = HISD3FormFieldProps<ColorPickerProps>;\n\n/**\n * Colour picker. The form value is the colour as a string in\n * `fieldProps.format` (hex by default, e.g. \"#1677ff\"), not antd's Color\n * object. Pass your own `getValueFromEvent` to keep the object instead.\n */\nexport const HISD3FormColorPicker: React.FC<HISD3FormColorPickerProps> = ({\n fieldProps,\n ...field\n}) => (\n <HISD3FormField\n getValueFromEvent={(_color: unknown, css: string) => css}\n skeleton={<Skeleton.Button active shape=\"square\" />}\n {...field}\n >\n <ColorPicker {...fieldProps} />\n </HISD3FormField>\n);\nHISD3FormColorPicker.displayName = \"HISD3FormColorPicker\";\n\n/* -------------------------------------------------------------------------- */\n/* Upload */\n/* -------------------------------------------------------------------------- */\n\n/** Maps Upload's onChange event to its file list, so the form value is `UploadFile[]`. */\nexport const normalizeUploadFileList = (e: unknown): UploadFile[] => {\n if (Array.isArray(e)) return e as UploadFile[];\n return (e as { fileList?: UploadFile[] } | undefined)?.fileList ?? [];\n};\n\nexport interface HISD3FormUploadProps extends HISD3FormFieldProps<UploadProps> {\n /** The trigger, e.g. a \"Select file\" button. */\n children?: React.ReactNode;\n}\n\n/** File upload. The form value is the `UploadFile[]` list. */\nexport const HISD3FormUpload: React.FC<HISD3FormUploadProps> = ({\n fieldProps,\n children,\n ...field\n}) => (\n <HISD3FormField\n valuePropName=\"fileList\"\n getValueFromEvent={normalizeUploadFileList}\n skeleton={<Skeleton.Button active />}\n {...field}\n >\n <Upload {...fieldProps}>{children ?? fieldProps?.children}</Upload>\n </HISD3FormField>\n);\nHISD3FormUpload.displayName = \"HISD3FormUpload\";\n\n/** Drag-and-drop upload area. The form value is the `UploadFile[]` list. */\nexport const HISD3FormUploadDragger: React.FC<HISD3FormUploadProps> = ({\n fieldProps,\n children,\n loadingProps,\n ...field\n}) => (\n <HISD3FormField\n valuePropName=\"fileList\"\n getValueFromEvent={normalizeUploadFileList}\n loadingProps={{ ...loadingProps, style: { height: 150, ...loadingProps?.style } }}\n {...field}\n >\n <Upload.Dragger {...fieldProps}>{children ?? fieldProps?.children}</Upload.Dragger>\n </HISD3FormField>\n);\nHISD3FormUploadDragger.displayName = \"HISD3FormUploadDragger\";\n\nexport default HISD3FormInput;\n","import {\n Fragment,\n createContext,\n useCallback,\n useContext,\n useMemo,\n useRef,\n useState,\n type ComponentType,\n type ReactNode,\n} from \"react\";\n\n/**\n * Open a drawer or modal from anywhere, without the page holding its state.\n *\n * const showRecord = useDialog(RecordEventDrawer);\n * showRecord({ fundYear, balances }, (batchId) => { if (batchId) refetch(); });\n *\n * The page no longer owns `const [open, setOpen] = useState(false)` for every\n * drawer it can show, nor renders each one inline with `open={…}`; it calls a\n * function with the props and, optionally, what to do with the result. The\n * component gets two extra props — `open` and `hide(result)` — and hands its\n * result back through `hide`, which is what reaches the second argument.\n *\n * Same shape as the `useModal`-based `UseDrawer` used in the other HISD3 apps,\n * implemented here without `react-modal-hook`: that library predates React 18,\n * and this is forty lines. Two differences worth knowing:\n *\n * - `open` is passed so antd can animate the close. `hide` sets it false,\n * fires the callback at once, and unmounts after the animation.\n * - Props are captured when `show` is called. A drawer whose parent used to\n * feed it live state (`saving`) owns that state itself now.\n *\n * Dialogs render under `DialogProvider`. Put it inside whatever providers a\n * dialog may need — the account and Apollo providers, and `HISD3Provider` for\n * the theme — so a drawer may use every hook a page may.\n */\n\n/** What every dialog component receives on top of its own props. */\nexport type DialogProps<R = void> = {\n /** True while shown; false during the close animation. Pass to antd's `open`. */\n open: boolean;\n /** Close, handing a result to whoever opened the dialog. */\n hide: (result?: R) => void;\n};\n\n/** The result type a component's `hide` carries. */\nexport type DialogResult<P> = P extends { hide: (result?: infer R) => void } ? R : void;\n\n/** A component's own props, without the two the hook supplies. */\nexport type DialogOwnProps<P> = Omit<P, keyof DialogProps>;\n\ntype Host = {\n mount: (id: number, node: ReactNode) => void;\n unmount: (id: number) => void;\n};\n\nconst DialogHostContext = createContext<Host | null>(null);\n\n/** Long enough for antd's drawer and modal close transitions. */\nconst CLOSE_ANIMATION_MS = 320;\n\nlet sequence = 0;\n\n/** Where every open dialog renders. Once, near the root of the app. */\nexport function DialogProvider({ children }: { children: ReactNode }) {\n const [instances, setInstances] = useState<{ id: number; node: ReactNode }[]>([]);\n\n const host = useMemo<Host>(\n () => ({\n mount: (id, node) =>\n setInstances((current) => [...current.filter((i) => i.id !== id), { id, node }]),\n unmount: (id) => setInstances((current) => current.filter((i) => i.id !== id)),\n }),\n [],\n );\n\n return (\n <DialogHostContext.Provider value={host}>\n {children}\n {instances.map((instance) => (\n <Fragment key={instance.id}>{instance.node}</Fragment>\n ))}\n </DialogHostContext.Provider>\n );\n}\n\nfunction DialogInstance<P extends DialogProps<R>, R>({\n Component,\n props,\n onClose,\n unmount,\n}: {\n Component: ComponentType<P>;\n props: DialogOwnProps<P>;\n onClose?: (result?: R) => void;\n unmount: () => void;\n}) {\n const [open, setOpen] = useState(true);\n const closed = useRef(false);\n\n const hide = useCallback(\n (result?: R) => {\n // A second call — the user hits Escape during the animation — must not\n // fire the callback twice.\n if (closed.current) return;\n closed.current = true;\n setOpen(false);\n onClose?.(result);\n window.setTimeout(unmount, CLOSE_ANIMATION_MS);\n },\n [onClose, unmount],\n );\n\n const all = { ...props, open, hide } as P;\n return <Component {...all} />;\n}\n\n/**\n * A function that shows `Component` with the given props. Its second argument\n * receives whatever the component passes to `hide`.\n */\nexport function useDialog<P extends DialogProps<DialogResult<P>>>(\n Component: ComponentType<P>,\n) {\n const host = useContext(DialogHostContext);\n if (!host) throw new Error(\"useDialog needs DialogProvider above it.\");\n\n return useCallback(\n (props: DialogOwnProps<P>, onClose?: (result?: DialogResult<P>) => void) => {\n const id = (sequence += 1);\n host.mount(\n id,\n <DialogInstance<P, DialogResult<P>>\n key={id}\n Component={Component}\n props={props}\n onClose={onClose}\n unmount={() => host.unmount(id)}\n />,\n );\n },\n [Component, host],\n );\n}\n\nexport default useDialog;\n","export enum ThemeStyle {\n MODERN = \"modern\",\n STANDARD = \"standard\",\n}\nexport enum ThemeStyleRadius {\n MODERN = \"30px\",\n STANDARD = \"16px\",\n}\nexport enum ThemeMode {\n LIGHT = \"light\",\n SEMI_DARK = \"semi-dark\",\n DARK = \"dark\",\n}\nexport enum LayoutType {\n FULL_WIDTH = \"full-width\",\n BOXED = \"boxed\",\n FRAMED = \"framed\",\n}\n\nexport enum MenuStyle {\n DEFAULT = \"default\",\n STANDARD = \"standard\",\n ROUNDED = \"rounded\",\n ROUNDED_REVERSE = \"rounded-reverse\",\n CURVED_MENU = \"curved-menu\",\n}\n\nexport enum NavStyle {\n DEFAULT = \"default\",\n MINI = \"mini\",\n MINI_SIDEBAR_TOGGLE = \"mini-sidebar-toggle\",\n STANDARD = \"standard\",\n HEADER_USER = \"user-header\",\n HEADER_USER_MINI = \"user-mini-header\",\n DRAWER = \"drawer\",\n BIT_BUCKET = \"bit-bucket\",\n H_DEFAULT = \"h-default\",\n HOR_HEADER_FIXED = \"hor-header-fixed\",\n HOR_DARK_LAYOUT = \"hor-dark-layout\",\n}\nexport enum FooterType {\n FIXED = \"fixed\",\n FLUID = \"fluid\",\n}\nexport enum LayoutDirection {\n RTL = \"rtl\",\n LTR = \"ltr\",\n}\nexport enum HeaderType {\n DARK = \"dark\",\n LIGHT = \"light\",\n}\nexport enum RouteTransition {\n NONE = \"none\",\n FADE = \"fade\",\n SLIDE_LEFT = \"slideLeft\",\n SLIDE_RIGHT = \"slideRight\",\n SLIDE_UP = \"slideUp\",\n SLIDE_DOWN = \"slideDown\",\n}\nexport enum Fonts {\n LIGHT = \"300\",\n REGULAR = \"400\",\n MEDIUM = \"500\",\n BOLD = \"600\",\n}\n\nexport enum AuthType {\n FIREBASE = \"firebase\",\n AWS_COGNITO = \"aws_cognito\",\n AUTH0 = \"auth0\",\n JWT_AUTH = \"jwt_auth\",\n}\n\nexport enum AppAnimates {\n SLIDEUPIN = \"transition.slideUpIn\",\n SLIDEUPOUT = \"transition.slideUpOut\",\n SLIDEDOWNIN = \"transition.slideDownIn\",\n SLIDEDOWNOUT = \"transition.slideDownOut\",\n SLIDELEFTIN = \"transition.slideLeftIn\",\n SLIDELEFTOUT = \"transition.slideLeftOut\",\n SLIDERIGHTIN = \"transition.slideRightIn\",\n SLIDERIGHTOUT = \"transition.slideRightOut\",\n FADEIN = \"transition.fadeIn\",\n FADEOUT = \"transition.fadeOut\",\n}\n\nexport const AppAnimateGroups = {\n SLIDEUPIN: {\n hidden: {\n y: 0,\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: {\n ease: \"easeIn\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.2,\n staggerChildren: 0.05,\n },\n },\n },\n SLIDEUPOUT: {\n hidden: {\n y: 0,\n },\n visible: {\n opacity: 0,\n y: \"100vh\",\n transition: {\n ease: \"easeOut\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDEDOWNIN: {\n hidden: {\n opacity: 0,\n y: \"-100vh\",\n },\n visible: {\n opacity: 1,\n y: 0,\n transition: {\n ease: \"easeIn\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDEDOWNOUT: {\n hidden: {\n y: 0,\n },\n visible: {\n opacity: 0,\n y: \"-100vh\",\n transition: {\n ease: \"easeOut\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDELEFTIN: {\n hidden: {\n x: \"100vw\",\n },\n visible: {\n opacity: 1,\n x: 0,\n transition: {\n ease: \"easeIn\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDELEFTOUT: {\n hidden: {\n x: 0,\n },\n visible: {\n opacity: 0,\n x: \"100vw\",\n transition: {\n ease: \"easeOut\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDERIGHTIN: {\n hidden: {\n x: \"-100vw\",\n },\n visible: {\n opacity: 1,\n x: 0,\n transition: {\n ease: \"easeIn\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n SLIDERIGHTOUT: {\n hidden: {\n x: 0,\n },\n visible: {\n opacity: 0,\n x: \"-100vw\",\n transition: {\n ease: \"easeOut\",\n delay: 0,\n when: \"beforeChildren\",\n duration: 0.4,\n staggerChildren: 0.15,\n },\n },\n },\n FADEIN: {\n hidden: {\n opacity: 0,\n scale: 1,\n },\n visible: {\n opacity: 1,\n scale: 1,\n transition: {\n ease: \"easeIn\",\n when: \"beforeChildren\",\n staggerChildren: 0.15,\n },\n },\n },\n FADEOUT: {\n hidden: {\n opacity: 1,\n scale: 1,\n },\n visible: {\n opacity: 0,\n scale: 1,\n transition: {\n ease: \"easeOut\",\n when: \"beforeChildren\",\n staggerChildren: 0.15,\n },\n },\n },\n NOANIMATION: {\n hidden: {\n opacity: 1,\n },\n visible: {\n opacity: 1,\n },\n },\n};\n\nexport const AppMotionAnimate = {\n SLIDEUPIN: {\n variants: {\n hidden: {\n y: 100,\n opacity: 0,\n },\n visible: {\n opacity: 1,\n y: 0,\n },\n },\n transition: {\n ease: \"easeIn\",\n when: \"beforeChildren\",\n },\n },\n SLIDEUPOUT: {\n variants: {\n hidden: {\n y: 0,\n opacity: 1,\n },\n visible: {\n opacity: 0,\n y: \"-100vh\",\n },\n },\n transition: {\n ease: \"easeOut\",\n when: \"beforeChildren\",\n },\n },\n SLIDEDOWNIN: {\n variants: {\n hidden: {\n y: -100,\n opacity: 0,\n },\n visible: {\n opacity: 1,\n y: 0,\n },\n },\n transition: {\n ease: \"easeIn\",\n when: \"beforeChildren\",\n },\n },\n SLIDEDOWNOUT: {\n variants: {\n hidden: {\n y: 0,\n opacity: 1,\n },\n visible: {\n opacity: 0,\n y: \"100vh\",\n },\n },\n transition: {\n ease: \"easeOut\",\n when: \"beforeChildren\",\n },\n },\n SLIDELEFTIN: {\n variants: {\n hidden: {\n x: 100,\n opacity: 0,\n },\n visible: {\n opacity: 1,\n x: 0,\n },\n },\n transition: {\n ease: \"easeIn\",\n when: \"beforeChildren\",\n },\n },\n SLIDELEFTOUT: {\n variants: {\n hidden: {\n x: 0,\n opacity: 1,\n },\n visible: {\n opacity: 0,\n x: \"-100vw\",\n },\n },\n transition: {\n ease: \"easeOut\",\n when: \"beforeChildren\",\n },\n },\n SLIDERIGHTIN: {\n variants: {\n hidden: {\n x: -100,\n opacity: 0,\n },\n visible: {\n opacity: 1,\n x: 0,\n },\n },\n transition: {\n ease: \"easeIn\",\n when: \"beforeChildren\",\n },\n },\n SLIDERIGHTOUT: {\n variants: {\n hidden: {\n x: 0,\n opacity: 1,\n },\n visible: {\n opacity: 0,\n x: \"-100vw\",\n },\n },\n transition: {\n ease: \"easeOut\",\n when: \"beforeChildren\",\n },\n },\n FADEIN: {\n variants: {\n hidden: {\n opacity: 0,\n },\n visible: {\n opacity: 1,\n },\n },\n transition: {\n duration: 0.1,\n ease: \"easeIn\",\n when: \"beforeChildren\",\n },\n },\n FADEOUT: {\n variants: {\n hidden: {\n opacity: 1,\n },\n visible: {\n opacity: 0,\n },\n },\n transition: {\n duration: 0.1,\n ease: \"easeOut\",\n when: \"beforeChildren\",\n },\n },\n};\n\nexport enum MessageType {\n MEDIA = 1,\n TEXT = 2,\n}\n\nexport enum RoutePermittedRole {\n Admin = \"admin\",\n User = \"user\",\n}\n"],"names":["styleInject","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","HISD3_LAYOUT","siderWidth","siderCollapsedWidth","topBarHeight","pageGutter","HISD3_PRESETS","brand","brandBlue","red","orange","teal","blue","green","purple","HISD3_NEUTRALS","bgLayout","bgContainer","bgElevated","bgFilled","bgFilledHover","bgField","bgRowHover","hover","text","textSecondary","textTertiary","border","borderSecondary","borderStrong","controlBorder","controlBorderHover","mask","white","HISD3_NEUTRALS_DARK","HISD3_STATUS","light","success","successBg","error","errorBg","warning","warningBg","dark","HISD3_BORDER_PRESETS","hairline","width","bold","HISD3_BORDER_PRESETS_DARK","HISD3_FONT_FAMILY","HISD3_FONT_WEIGHT_HEADING","HISD3_FONT_WEIGHT_BODY","resolvePrimary","primary","toRgb","hex","h","replace","full","length","split","map","c","join","n","parseInt","toHex","rgb","Math","round","toString","padStart","shade","amount","tint","mix","a","b","x","y","i","luminance","r","g","s","contrastRatio","hi","lo","sort","resolvePrimaryPalette","mode","source","page","p","t","onPrimary","primaryBg","primaryBgHover","primaryBorder","neutralsFor","borders","presets","createHisd3Theme","radius","lineWidth","overrides","pal","field","colorBorder","hoverBorderColor","activeBorderColor","activeShadow","colorBgContainer","hoverBg","activeBg","base","algorithm","antdTheme","darkAlgorithm","defaultAlgorithm","_seed","derived","colorPrimary","colorInfo","colorLink","colorPrimaryText","colorPrimaryBg","colorPrimaryBgHover","colorPrimaryBorder","colorSuccess","colorSuccessText","colorSuccessBg","colorError","colorErrorText","colorErrorBg","colorWarning","colorWarningText","colorWarningBg","cssVar","key","token","colorSuccessBorder","colorErrorBorder","colorWarningBorder","fontFamily","fontSize","fontWeightStrong","borderRadius","borderRadiusLG","borderRadiusSM","borderRadiusXS","colorBgLayout","colorBgElevated","colorBgMask","colorBgContainerDisabled","colorText","colorTextSecondary","colorTextTertiary","colorTextPlaceholder","colorTextDisabled","colorTextHeading","colorBorderSecondary","colorSplit","controlHeight","controlHeightLG","controlHeightSM","boxShadow","boxShadowSecondary","components","Layout","siderBg","headerBg","bodyBg","headerPadding","Menu","itemBg","subMenuItemBg","popupBg","itemColor","itemHoverColor","itemHoverBg","itemSelectedBg","itemSelectedColor","itemActiveBg","subMenuItemSelectedColor","horizontalItemSelectedColor","horizontalItemHoverColor","groupTitleColor","groupTitleFontSize","itemBorderRadius","itemMarginInline","itemMarginBlock","itemHeight","itemPaddingInline","iconSize","collapsedIconSize","activeBarBorderWidth","activeBarWidth","Button","fontWeight","primaryShadow","defaultShadow","dangerShadow","primaryColor","dangerColor","defaultBorderColor","defaultColor","defaultBg","defaultHoverBg","defaultHoverBorderColor","defaultHoverColor","defaultActiveBorderColor","paddingInline","contentFontSize","contentFontSizeLG","contentFontSizeSM","Input","InputNumber","Select","optionSelectedBg","selectorBg","DatePicker","Cascader","TreeSelect","Mentions","Checkbox","colorWhite","Radio","dotColorDisabled","Segmented","trackBg","Table","headerColor","headerSplitColor","headerBorderRadius","borderColor","rowHoverBg","rowSelectedBg","rowSelectedHoverBg","cellPaddingBlock","cellPaddingInline","cellFontSize","cellPaddingBlockMD","cellPaddingInlineMD","cellPaddingBlockSM","cellPaddingInlineSM","cellFontSizeMD","cellFontSizeSM","footerBg","Tabs","inkBarColor","titleFontSize","horizontalItemGutter","horizontalMargin","lineWidthBold","Tag","Pagination","itemActiveColor","itemActiveColorHover","itemSize","itemSizeSM","itemInputBg","Dropdown","paddingBlock","Breadcrumb","lastItemColor","linkColor","linkHoverColor","separatorColor","Card","headerFontSize","headerFontSizeSM","Drawer","Alert","withDescriptionPadding","hisd3VarsCss","selector","root","borderVarsCss","hisd3AntdTheme","HISD3_COLORS","primaryLight","headerSelectedBg","HISD3ProviderContext","createContext","useInsideHISD3Provider","useContext","HISD3Provider","theme","styledTheme","children","useMemo","vars","_jsxs","Provider","value","_jsx","dangerouslySetInnerHTML","__html","ConfigProvider","ThemeProvider","AntdApp","component","HISD3_LOGO_SRC","Header","Content","SIDER_WIDTH","SIDER_COLLAPSED_WIDTH","HEADER_HEIGHT","StyledRoot","styled","$appShell","StyledMain","$scroll","StyledSiderMenuWrap","div","StyledBrand","$collapsed","StyledHeader","StyledSiderHeader","StyledCollapseTrigger","button","StyledEdgeTrigger","$top","$left","StyledContent","StyledCrUserInfo","$inHeader","StyledCrUserInfoInner","StyledCrUserInfoAvatar","span","$src","StyledCrUserInfoContent","StyledUsernameInfo","StyledUsername","h3","StyledUserArrow","StyledCrUserDesignation","itemKey","item","index","path","toAntdMenuItems","items","renderLink","filter","hideInMenu","Array","isArray","icon","label","name","disabled","group","undefined","defaultRenderLink","href","UserMenu","account","avatarSrc","settingsUrl","onLogout","collapsed","placement","extraItems","modal","App","useApp","SettingOutlined","onClick","window","location","LogoutOutlined","confirm","title","content","ExclamationCircleOutlined","onOk","initials","fullName","w","Boolean","slice","toUpperCase","className","trigger","menu","e","preventDefault","DownOutlined","positionType","Sider","HISD3Sidebar","logoUrl","appName","menuItems","pathname","renderMenuLink","headerExtra","userMenuItems","onCollapse","loading","hideSidebar","layoutTop","hideCollapseTrigger","collapseTrigger","collapseTriggerOffset","bareContent","hideHeaderBar","brandHref","hideAccountCard","scrollContent","insideProvider","resolvedTheme","isCollapsed","setIsCollapsed","useState","useEffect","selection","best","walk","list","parents","forEach","startsWith","exact","selectedKey","openKeys","findSelection","setOpenKeys","prev","from","Set","toggleCollapse","next","logoFailed","setLogoFailed","selectedKeys","collapseLabel","src","alt","onError","body","Spin","spinning","size","_Fragment","hasSider","collapsedWidth","collapsible","breakpoint","onBreakpoint","broken","inlineCollapsed","onOpenChange","keys","MenuUnfoldOutlined","MenuFoldOutlined","flex","RightOutlined","LeftOutlined","PAGE_GUTTER","HeaderWrap","header","TopBar","Actions","TitleBlock","HISD3PageBody","HISD3PageHeader","subtitle","breadcrumb","extra","leading","hideTopBar","StyledButton","secondary","ghost","danger","HISD3Button","variant","rest","soft","v","SPLIT_BREAKPOINT","MOBILE_BREAKPOINT","StyledPage","$side","StyledPanel","aside","$variant","gap","StyledPanelBrand","StyledPanelImage","StyledPanelPattern","StyledWatermark","StyledCorner","pos","StyledCard","form","StyledTitle","h1","StyledSubtitle","StyledField","StyledRow","StyledError","StyledFoot","HISD3LoginPage","tagline","logoSrc","panelTitle","panelSubtitle","panelImage","organisationName","side","identifierLabel","identifierPlaceholder","passwordLabel","passwordPlaceholder","submitLabel","hideRemember","rememberLabel","onForgotPassword","forgotLabel","onSubmit","footer","identifier","setIdentifier","password","setPassword","remember","setRemember","reveal","setReveal","logo","noValidate","role","onChange","target","placeholder","autoComplete","autoFocus","tabIndex","EyeInvisibleOutlined","EyeOutlined","Switch","checked","htmlType","block","height","HeaderIconButton","$size","$open","CountBadge","Panel","PanelHeader","List","Row","$unread","RowIcon","RowBody","UnreadDot","PanelFooter","EmptyWrap","HISD3NotificationButton","count","onMarkAllRead","onSeeAll","seeAllLabel","emptyText","open","setOpen","unread","panel","textAlign","Empty","image","PRESENTED_IMAGE_SIMPLE","description","BellFilled","time","id","popupRender","Trigger","$shape","Chevron","Identity","IdentityAvatar","getInitials","HISD3AvatarMenu","onSettings","confirmLogout","shape","hideChevron","okText","Wrap","Divider","HISD3HeaderActions","divided","kids","React","Children","toArray","child","Fragment","FooterStrip","PagerBar","SizeGroup","defaultTotal","total","toLocaleString","HISD3Table","pagination","tableProps","sizes","pageSizeOptions","renderTotal","current","pageSize","min","showSizeChanger","itemRender","_","el","hidePageSize","StyledTabs","HISD3Tabs","toneVar","default","toneBgVar","StyledTag","$tone","color","bg","HISD3Tag","tone","StyledInput","HISD3Input","forwardRef","props","displayName","StyledSearch","SEARCH_SIZE_CLASS","small","middle","large","HISD3SearchInput","compact","allowClear","prefix","SearchOutlined","trim","HISD3SelectLabel","mono","asText","node","String","flatten","options","flatMap","option","filterWithDescription","input","includes","names","HISD3Select","wrap","monoLabel","showSearch","filterOption","optionFilterProp","optionRender","labelRender","virtual","rootClassName","byValue","Map","hasDescriptions","values","some","render","fallback","searchConfig","data","get","StyledItem","Form","Item","FieldSkeleton","HISD3FormField","loadingProps","vertical","bolderLabel","controlSize","skeleton","layout","itemProps","Skeleton","active","smallSkeleton","minWidth","HISD3FormInput","fieldProps","propsinput","inputProps","HISD3FormPassword","Password","HISD3FormTextArea","rows","TextArea","HISD3FormInputNumber","HISD3FormSelect","HISD3FormRadioGroup","Group","HISD3FormCheckbox","valuePropName","HISD3FormCheckboxGroup","HISD3FormSwitch","HISD3FormDatePicker","HISD3FormRangePicker","RangePicker","HISD3FormTimePicker","TimePicker","HISD3FormTimeRangePicker","HISD3FormSearch","Search","HISD3FormOTP","OTP","HISD3FormAutoComplete","AutoComplete","HISD3FormMentions","HISD3FormCascader","HISD3FormTreeSelect","HISD3FormSegmented","HISD3FormTransfer","Transfer","HISD3FormSlider","Slider","HISD3FormRate","Rate","HISD3FormColorPicker","getValueFromEvent","_color","ColorPicker","normalizeUploadFileList","fileList","HISD3FormUpload","Upload","HISD3FormUploadDragger","Dragger","DialogHostContext","sequence","DialogProvider","instances","setInstances","host","mount","unmount","instance","DialogInstance","Component","onClose","closed","useRef","all","hide","useCallback","result","setTimeout","useDialog","Error","ThemeStyle","ThemeStyleRadius","ThemeMode","LayoutType","MenuStyle","NavStyle","FooterType","LayoutDirection","HeaderType","RouteTransition","Fonts","AuthType","AppAnimates","AppAnimateGroups","SLIDEUPIN","hidden","visible","opacity","transition","ease","delay","when","duration","staggerChildren","SLIDEUPOUT","SLIDEDOWNIN","SLIDEDOWNOUT","SLIDELEFTIN","SLIDELEFTOUT","SLIDERIGHTIN","SLIDERIGHTOUT","FADEIN","scale","FADEOUT","NOANIMATION","AppMotionAnimate","variants","MessageType","RoutePermittedRole"],"mappings":"yhCAAA,SAASA,GAAYC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAE,GAC9B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,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