@lax-wp/design-system 0.14.48 → 0.14.50

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.
@@ -1 +1 @@
1
- {"version":3,"file":"LabelValue.es.js","sources":["../../../../src/components/data-display/label-value/LabelValue.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, forwardRef, type ReactNode } from 'react';\nimport cn from 'classnames';\nimport { HelpIcon } from '../../icons/HelpIcon';\nimport { SearchIcon } from '../../icons/SearchIcon';\nimport { Typography } from '../typography/Typography';\nimport { formatCurrency, formatDate, formatBooleanValue, isISODateString, decodeHTMLEntities } from '../../../utils/formatters';\nimport { CURRENCIES } from '../../forms/currency-input/currency.constant';\nimport { Label } from '../label/Label';\nimport { motion } from 'framer-motion';\nimport { ArrowUpwardRounded, ArrowDownwardRounded, BoltOutlined, OpenInNew } from '@mui/icons-material';\nimport Tooltip from '../../tooltip/Tooltip';\nimport { AIExtractedIndicator } from '../../icons/AIExtractedIndicator';\nimport { AIStarIcon } from '../../icons/AIStarIcon';\nimport { CheckFilledIcon, ContentCopyIcon } from '../../icon';\nimport { getConfidenceScoreBadgeColor, getConfidenceScoreBadgeFill, getConfidenceScoreBadgeHoverClass, shouldShowConfidenceScore } from '../../../utils/confidenceScoreUtils';\nimport dayjs from 'dayjs';\n\n/**\n * Source meta bounding box\n */\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\n/**\n * Source meta item\n */\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\n/**\n * Available label value size options\n */\nexport type LabelValueSize = 'small' | 'medium' | 'large';\n\n/**\n * Available highlight color options\n */\nexport type HighlightColor = 'success' | 'warning' | 'error' | 'info';\n\n/**\n * Theme mode for styling\n */\nexport type ThemeMode = 'light' | 'dark';\n\n/**\n * Upload handler function type\n */\nexport type UploadHandler = (file: File) => void | Promise<void>;\n\n/**\n * Master data item interface\n */\nexport interface MasterDataItem {\n is_master_data?: boolean;\n reference?: string;\n group_technical_name?: string;\n currency_code?: string;\n}\n\n/**\n * Risk details interface\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\n/**\n * Master data modal component props\n */\nexport interface MasterDataModalProps {\n isVisible: boolean;\n onClose: () => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n masterdataInfo: any;\n}\n\n/**\n * Risk details card component props\n * Using generic to allow custom risk detail types from consumers\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RiskDetailsCardProps<TRisk = any> {\n riskDetails: TRisk;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Props for the LabelValue component\n */\nexport interface LabelValueProps {\n /** The id of the label value */\n id?: string;\n /** The label text to display */\n label?: string;\n /** The value to display */\n value?: string | number | boolean | ReactNode;\n /** Additional CSS classes */\n className?: string;\n /** Data type for formatting */\n type?: 'string' | 'number' | 'boolean' | 'currency' | 'date' | 'datetime' | 'percentage' | 'url';\n /** Tags to display with the label */\n tags?: Array<{ label: string; color?: string; value?: string }>;\n /** Tooltip text for the help icon */\n tooltip?: string;\n /** Master data item information */\n items?: MasterDataItem;\n /** Whether the value has been modified */\n isModified?: boolean;\n /** Whether the value has been changed */\n isChanged?: boolean;\n /** Size variant */\n size?: LabelValueSize;\n /** Whether the value is highlighted */\n isHighlighted?: boolean;\n /** Deleted value for diff display */\n deletedValue?: string;\n /** Highlight color for changes */\n highlightColor?: HighlightColor;\n /** Whether search is active */\n isSearchActive?: boolean;\n /** Whether to show original boolean value */\n originalValue?: boolean;\n /** Whether to show diff between old and new values */\n showDiff?: boolean;\n /** Whether this is a live field (shows bolt icon) */\n isLiveField?: boolean;\n /** Whether this is an AI extracted field (shows AI extracted icon) */\n isAiExtracted?: boolean;\n /** Confidence percentage shown as a badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence badge */\n confidenceTooltip?: ReactNode;\n /** Source meta for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler fired when confidence score badge is clicked */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Delta change value for currency fields */\n deltaChange?: number;\n /** Theme mode */\n theme?: ThemeMode;\n /** Upload handler function */\n onUpload?: UploadHandler;\n /** Whether the component accepts file uploads */\n acceptsUpload?: boolean;\n /** Master data modal component */\n MasterDataModal?: React.ComponentType<MasterDataModalProps>;\n /** Risk analysis data - accepts any risk object extending RiskDetails */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n riskDetails?: RiskDetails | any;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component - accepts components with custom risk types */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;\n /** Custom aria-label for accessibility */\n 'aria-label'?: string;\n /** Whether to decode HTML character entities in string values (default: true) */\n decodeEntities?: boolean;\n /** Function to handle AI extracted indicator click */\n onAiExtractedIndicatorClick?: (value: string) => void;\n /** Whether to show a copy-to-clipboard icon in the top-right corner on hover */\n copyOnHover?: boolean;\n /** Display alias text for URL type — shown instead of the raw URL, with an external link icon */\n urlAlias?: string;\n /**\n * Whether a `datetime` value is an instant that should be converted to the viewer's timezone.\n * Field values are wall clock — what the user typed — so this is off by default; turn it on for\n * system timestamps (created_at, executed_on...).\n */\n allowTimezoneConversion?: boolean;\n}\n\n/**\n * LabelValue component displays a label-value pair with various formatting options\n *\n * @example\n * ```tsx\n * <LabelValue \n * label=\"Status\" \n * value=\"Active\" \n * type=\"string\" \n * size=\"medium\" \n * />\n * <LabelValue \n * label=\"Price\" \n * value={99.99} \n * type=\"currency\" \n * items={{ currency_code: 'USD' }}\n * />\n * <LabelValue \n * label=\"Upload File\" \n * acceptsUpload \n * onUpload={handleUpload}\n * />\n * ```\n */\nexport const LabelValue = forwardRef<HTMLDivElement, LabelValueProps>(\n (\n {\n id,\n label,\n value,\n className,\n type = 'string',\n tags,\n tooltip,\n items,\n isModified = false,\n isChanged = false,\n size = 'medium',\n isHighlighted = false,\n deletedValue,\n highlightColor = 'warning',\n isSearchActive = false,\n originalValue = false,\n showDiff = false,\n isLiveField = false,\n isAiExtracted = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n sourceMeta = [],\n onConfidenceScoreClick,\n deltaChange,\n theme: _theme = 'light',\n onUpload,\n acceptsUpload = false,\n MasterDataModal,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n 'aria-label': ariaLabel,\n decodeEntities = true,\n onAiExtractedIndicatorClick,\n copyOnHover = false,\n urlAlias,\n allowTimezoneConversion = false,\n },\n ref\n ) => {\n const [collapseValue, setCollapseValue] = useState(true);\n const [isOpenMasterDataModal, setIsOpenMasterDataModal] = useState(false);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [masterdataModalInfo, setMasterdataModalInfo] = useState<any>(null);\n const [isHovered, setIsHovered] = useState(false);\n const [isCopied, setIsCopied] = useState(false);\n const copyResetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n return () => {\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n };\n }, []);\n\n // Theme is passed as prop but not used in current implementation\n\n /**\n * Conditionally decode HTML entities based on the decodeEntities prop\n */\n const decode = (text: string): string => decodeEntities ? decodeHTMLEntities(text) : text;\n\n const COLLAPSE_CHAR_LIMIT = 100;\n\n /**\n * Handle collapse toggle for long text\n */\n const handleCollapse = () => {\n setCollapseValue(!collapseValue);\n };\n\n /**\n * Show more / Show less toggle for long text and URLs\n */\n const renderCollapseToggle = () => (\n <button\n id={`btn-label-value-${collapseValue ? 'Show more' : 'Show less'}`}\n className=\"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap\"\n onClick={handleCollapse}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleCollapse();\n }\n }}\n aria-label={collapseValue ? 'Show more content' : 'Show less content'}\n type=\"button\"\n >\n {collapseValue ? 'Show more' : 'Show less'}\n </button>\n );\n\n /**\n * Render a URL with optional collapse for long href/display text\n */\n const renderUrlValue = (href: string) => {\n if (urlAlias) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 font-semibold text-neutral-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-400 transition-colors\"\n >\n {urlAlias}\n <OpenInNew sx={{ fontSize: 16 }} className=\"text-primary-600 dark:text-primary-400\" />\n </a>\n );\n }\n const decoded = decode(href);\n if (decoded.length <= COLLAPSE_CHAR_LIMIT) {\n return (\n <a href={href} className=\"text-primary-600 truncate\">\n {decoded}\n </a>\n );\n }\n return (\n <p>\n <a href={href} className=\"text-primary-600 break-all\">\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n </a>\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n };\n\n /**\n * Handle master data click\n */\n const handleMasterDataClick = (item: MasterDataItem) => {\n setIsOpenMasterDataModal(true);\n setMasterdataModalInfo({ ...item, value });\n };\n\n /**\n * Handle master data modal close\n */\n const handleMasterDataClose = () => {\n setIsOpenMasterDataModal(false);\n setMasterdataModalInfo(null);\n };\n\n /**\n * Copy the current value to the clipboard\n */\n const handleCopyValue = () => {\n const textToCopy =\n value === null || value === undefined || typeof value === 'object'\n ? ''\n : String(value);\n if (!textToCopy) return;\n navigator.clipboard?.writeText(textToCopy)\n .then(() => {\n setIsCopied(true);\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n copyResetTimer.current = setTimeout(() => setIsCopied(false), 1500);\n })\n .catch(() => { });\n };\n\n /**\n * Handle file upload\n */\n const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && onUpload) {\n onUpload(file);\n }\n // Reset input value to allow same file selection\n event.target.value = '';\n };\n\n /**\n * Format and display the value based on type\n */\n const displayValue = () => {\n const isISODate = typeof value === 'string' && isISODateString(value);\n\n if (isSearchActive && typeof value === 'object') {\n return value;\n }\n\n if (value || (type?.toLowerCase() === 'boolean' && value === 0) || (type?.toLowerCase() === 'currency' && Number(value) >= 0)) {\n if ((value === true || value === 'True') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'Yes';\n } else if ((value === false || value === 'False') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'No';\n } else if (type?.toLowerCase() === 'url') {\n return renderUrlValue(value as string);\n } else if (type?.toLowerCase() === 'boolean') {\n return formatBooleanValue(value);\n } else if (type?.toLowerCase() === 'currency') {\n const formatted = formatCurrency(value, items?.currency_code) || '-';\n const currencyName = items?.currency_code\n ? CURRENCIES.find(c => c.value === items.currency_code)?.label\n : undefined;\n const tooltipTitle = currencyName\n ? `${items!.currency_code} — ${currencyName}`\n : items?.currency_code ?? '';\n return currencyName ? (\n <Tooltip title={tooltipTitle} placement=\"top\">\n <span>{formatted}</span>\n </Tooltip>\n ) : formatted;\n } else if (type?.toLowerCase() === 'datetime') {\n const dateValue = typeof value === 'string' && value.includes('Z') ? value.replace(/\\.000Z$/, 'Z') : value;\n return formatDate(dateValue as string, {\n skipTimezone: !allowTimezoneConversion,\n withTime: true,\n });\n } else if (type?.toLowerCase() === 'date' || isISODate) {\n let dateValue = value;\n\n if (typeof value === 'string' && value.includes('Z')) {\n dateValue = value.replace(/\\.000Z$/, 'Z')\n } else if (typeof value === 'string' && !value.includes('Z')) {\n const parsed = dayjs(value);\n dateValue = dayjs(parsed).isValid() ? parsed.toString() : value;\n }\n\n return formatDate(dateValue as string, {\n skipTimezone: true,\n withTime: false,\n });\n } else if (type?.toLowerCase() === 'percentage') {\n return `${value}%`;\n } else if (typeof value === 'string' && value.length > COLLAPSE_CHAR_LIMIT) {\n const decoded = decode(value);\n return (\n <p>\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n } else {\n return typeof value === 'string' ? decode(value) : value;\n }\n }\n return '-';\n };\n\n /**\n * Get Typography size based on LabelValue size\n */\n const getTypographySize = () => {\n switch (size) {\n case 'small':\n return 'extra-small' as const;\n case 'large':\n return 'large' as const;\n default: // medium\n return 'small' as const;\n }\n };\n\n /**\n * Get highlight color classes\n */\n const getHighlightClasses = (): string => {\n switch (highlightColor) {\n case 'success':\n return 'bg-success-100';\n case 'warning':\n return 'bg-warning-100';\n case 'error':\n return 'bg-error-100';\n case 'info':\n return 'bg-info-100';\n default:\n return 'bg-warning-100';\n }\n };\n\n return (\n <div\n id={id || ''}\n ref={ref}\n className={cn(\n 'font-medium relative',\n className\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n aria-label={ariaLabel || `Label: ${label}, Value: ${value}`}\n >\n {/* Label section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className=\"flex gap-1 items-center flex-wrap\"\n appearance=\"subtitle\"\n >\n\n {/* Live field indicator */}\n {typeof label === 'string' ? decode(label) : label} {<Label labels={tags?.map(tag => ({ ...tag, color: tag.color || 'primary' }))} />}\n\n {isLiveField && <BoltOutlined sx={{ fontSize: 16, color: 'var(--color-primary-600)', rotate: '15deg' }} />}\n {isAiExtracted &&\n (shouldShowConfidenceScore(confidenceScore) && confidenceType ? (\n <Tooltip\n placement=\"top\"\n title={confidenceTooltip || \"\"}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\"cursor-pointer w-3 h-3 flex items-center justify-center rounded-full\", getConfidenceScoreBadgeHoverClass(confidenceType))}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n </div>\n </Tooltip>\n ) : (\n <AIExtractedIndicator onClick={() => onAiExtractedIndicatorClick?.(displayValue() as string)} />\n ))}\n\n {/* Tooltip */}\n {tooltip && (\n <Tooltip\n placement=\"top\"\n title={tooltip}\n whiteSpace=\"pre-wrap\"\n >\n <div\n className=\"cursor-pointer\"\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n // Tooltip will show on focus\n }\n }}\n >\n <HelpIcon size={14} />\n </div>\n </Tooltip>\n )}\n {copyOnHover && isHovered && (\n <Tooltip title={isCopied ? 'Copied' : `Copy ${label ?? 'value'}`} placement=\"top\" whiteSpace=\"pre-wrap\">\n <button\n type=\"button\"\n onClick={handleCopyValue}\n aria-label={isCopied ? `Copied ${label ?? 'value'}` : `Copy ${label ?? 'value'}`}\n className=\"p-1 flex items-center justify-center rounded text-neutral-500 hover:!text-primary-600 hover:bg-neutral-100 dark:text-primary-400 dark:hover:!text-primary-600 dark:hover:bg-neutral-800 cursor-pointer\"\n >\n <span className=\"relative inline-flex h-4 w-4 items-center justify-center\">\n <ContentCopyIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-0 scale-50 rotate-[-90deg]' : 'opacity-100 scale-100 rotate-0'\n )}\n />\n <CheckFilledIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-100 scale-100 rotate-0' : 'opacity-0 scale-50 rotate-90'\n )}\n />\n </span>\n </button>\n </Tooltip>\n )}\n </Typography>\n\n {/* Value section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className={cn(\n 'text-- whitespace-normal break-all flex gap-1 pt-0.5',\n isModified && 'bg-neutral-50 dark:bg-black-700 p-1 rounded',\n isRiskAnalysisOpen && riskDetails?.color &&\n `bg-${riskDetails.color}-50 border-${riskDetails.color}-300 px-0.5 rounded-lg`\n )}\n appearance=\"body\"\n >\n {/* Value display */}\n {showDiff && deletedValue && value ? (\n <div className=\"flex gap-2\">\n <span className=\"line-through\">{decode(deletedValue)}</span>\n <span>{displayValue()}</span>\n </div>\n ) : isChanged || isHighlighted ? (\n <mark className={cn('rounded-md py-0.5 px-1', getHighlightClasses())}>\n {displayValue()}\n </mark>\n ) : (\n displayValue()\n )}\n\n {/* Delta change indicator for currency fields */}\n {type?.toLowerCase() === 'currency' && deltaChange !== 0 && deltaChange !== undefined && deltaChange !== null && (\n <motion.span\n initial={{ opacity: 0, y: 2 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.25 }}\n className={cn(\n 'inline-flex items-center gap-1 ml-1.5 text-xs font-medium',\n deltaChange > 0 ? 'text-emerald-600 dark:text-emerald-400' : 'text-red-600 dark:text-red-400'\n )}\n >\n <span className=\"flex items-center justify-center w-4 h-4\">\n {deltaChange > 0 ? (\n <ArrowUpwardRounded sx={{ fontSize: 16 }} className=\"text-emerald-600 dark:text-emerald-400\" />\n ) : (\n <ArrowDownwardRounded sx={{ fontSize: 16 }} className=\"text-red-600 dark:text-red-400\" />\n )}\n </span>\n <span>{formatCurrency(Math.abs(deltaChange), items?.currency_code || 'USD')}</span>\n </motion.span>\n )}\n\n {/* Master data search icon */}\n {items?.is_master_data && items?.reference && value && (\n <button\n onClick={() => handleMasterDataClick(items)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleMasterDataClick(items);\n }\n }}\n aria-label={`Search master data for ${label}`}\n type=\"button\"\n className=\"cursor-pointer\"\n >\n <SearchIcon width={20} height={20} />\n </button>\n )}\n\n {/* File upload input */}\n {acceptsUpload && (\n <input\n type=\"file\"\n onChange={handleFileUpload}\n className=\"absolute inset-0 w-full h-full opacity-0 cursor-pointer\"\n aria-label={`Upload file for ${label}`}\n />\n )}\n </Typography>\n\n {/* Deleted value display */}\n {deletedValue && !showDiff && (\n <Typography\n variant=\"medium\"\n size=\"extra-small\"\n className=\"pt-0.5\"\n appearance=\"body\"\n >\n <mark className=\"rounded-md py-0.5 px-1 bg-error-100\">\n <del>\n {deletedValue || (type?.toLowerCase() === 'boolean' && deletedValue === '0') ? (\n deletedValue === 'True' && (type?.toLowerCase() !== 'choice') ? (\n 'Yes'\n ) : deletedValue === 'False' && (type?.toLowerCase() !== 'choice') ? (\n 'No'\n ) : type?.toLowerCase() === 'boolean' ? (\n formatBooleanValue(deletedValue)\n ) : type?.toLowerCase() === 'currency' ? (\n formatCurrency(deletedValue, items?.currency_code)\n ) : type?.toLowerCase() === 'date' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: false,\n })\n ) : type?.toLowerCase() === 'datetime' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: true,\n })\n ) : type?.toLowerCase() === 'percentage' ? (\n `${deletedValue}%`\n ) : type?.toLowerCase() === 'url' ? (\n renderUrlValue(deletedValue)\n ) : deletedValue.length > COLLAPSE_CHAR_LIMIT ? (\n <p>\n {decode(deletedValue).slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decode(deletedValue).length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n ) : (\n decode(deletedValue)\n )\n ) : (\n '-'\n )}\n </del>\n </mark>\n </Typography>\n )}\n\n {/* Master data modal */}\n {MasterDataModal && (\n <MasterDataModal\n isVisible={isOpenMasterDataModal}\n onClose={handleMasterDataClose}\n masterdataInfo={masterdataModalInfo}\n />\n )}\n\n {/* Risk details tooltip */}\n {isHovered && riskDetails && isRiskAnalysisOpen && (\n <div\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === 'Escape') {\n setIsHovered(false);\n }\n }}\n role=\"tooltip\"\n aria-label=\"Risk analysis details\"\n tabIndex={0}\n >\n {RiskDetailsCard ? (\n <RiskDetailsCard riskDetails={riskDetails} />\n ) : (\n <div className=\"shadow-lg p-4\">\n <div className=\"text-sm\">\n <h4 className=\"font-semibold mb-2\">Risk Details</h4>\n <p className=\"text-neutral-600 dark:text-neutral-300\">\n {riskDetails.description || 'Risk analysis information'}\n </p>\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n\nLabelValue.displayName = 'LabelValue';\n"],"names":["LabelValue","forwardRef","id","label","value","className","type","tags","tooltip","items","isModified","isChanged","size","isHighlighted","deletedValue","highlightColor","isSearchActive","originalValue","showDiff","isLiveField","isAiExtracted","confidenceScore","confidenceType","confidenceTooltip","sourceMeta","onConfidenceScoreClick","deltaChange","_theme","onUpload","acceptsUpload","MasterDataModal","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","ariaLabel","decodeEntities","onAiExtractedIndicatorClick","copyOnHover","urlAlias","allowTimezoneConversion","ref","collapseValue","setCollapseValue","useState","isOpenMasterDataModal","setIsOpenMasterDataModal","masterdataModalInfo","setMasterdataModalInfo","isHovered","setIsHovered","isCopied","setIsCopied","copyResetTimer","useRef","useEffect","decode","text","decodeHTMLEntities","COLLAPSE_CHAR_LIMIT","handleCollapse","renderCollapseToggle","jsx","e","renderUrlValue","href","jsxs","OpenInNew","decoded","handleMasterDataClick","item","handleMasterDataClose","handleCopyValue","textToCopy","handleFileUpload","event","file","displayValue","isISODate","isISODateString","formatBooleanValue","formatted","formatCurrency","currencyName","CURRENCIES","c","tooltipTitle","Tooltip","dateValue","formatDate","parsed","dayjs","getTypographySize","getHighlightClasses","cn","Typography","Label","tag","BoltOutlined","shouldShowConfidenceScore","getConfidenceScoreBadgeHoverClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","AIExtractedIndicator","HelpIcon","ContentC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","sources":["../../../../src/components/data-display/label-value/LabelValue.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState, forwardRef, type ReactNode } from 'react';\nimport cn from 'classnames';\nimport { HelpIcon } from '../../icons/HelpIcon';\nimport { SearchIcon } from '../../icons/SearchIcon';\nimport { Typography } from '../typography/Typography';\nimport { formatCurrency, formatDate, formatBooleanValue, isISODateString, decodeHTMLEntities } from '../../../utils/formatters';\nimport { CURRENCIES } from '../../forms/currency-input/currency.constant';\nimport { Label } from '../label/Label';\nimport { motion } from 'framer-motion';\nimport { ArrowUpwardRounded, ArrowDownwardRounded, BoltOutlined, OpenInNew } from '@mui/icons-material';\nimport Tooltip from '../../tooltip/Tooltip';\nimport { AIExtractedIndicator } from '../../icons/AIExtractedIndicator';\nimport { AIStarIcon } from '../../icons/AIStarIcon';\nimport { CheckFilledIcon, ContentCopyIcon } from '../../icon';\nimport { APP_DATA_TYPES } from '../datatype-icon/DataTypeIcon';\nimport { LabelValueDataTypeIcon } from '../datatype-icon/LabelValueDataTypeIcon';\nimport { getConfidenceScoreBadgeColor, getConfidenceScoreBadgeFill, getConfidenceScoreBadgeHoverClass, shouldShowConfidenceScore } from '../../../utils/confidenceScoreUtils';\nimport dayjs from 'dayjs';\n\n/**\n * Source meta bounding box\n */\nexport type SourceMetaBBox = {\n b: number;\n l: number;\n r: number;\n t: number;\n};\n\n/**\n * Source meta item\n */\nexport type SourceMetaItem = {\n bbox: SourceMetaBBox;\n confidence_score?: number;\n is_primary?: boolean;\n match_score?: number;\n match_type?: string;\n page_height: number;\n page_width: number;\n source_page: number;\n source_text?: string;\n};\n\n/**\n * Confidence score type\n */\nexport type ConfidenceScoreType = \"low\" | \"medium\" | \"high\";\n\n/**\n * Available label value size options\n */\nexport type LabelValueSize = 'small' | 'medium' | 'large';\n\n/**\n * Available highlight color options\n */\nexport type HighlightColor = 'success' | 'warning' | 'error' | 'info';\n\n/**\n * Theme mode for styling\n */\nexport type ThemeMode = 'light' | 'dark';\n\n/**\n * Upload handler function type\n */\nexport type UploadHandler = (file: File) => void | Promise<void>;\n\n/**\n * Master data item interface\n */\nexport interface MasterDataItem {\n is_master_data?: boolean;\n reference?: string;\n group_technical_name?: string;\n currency_code?: string;\n}\n\n/**\n * Risk details interface\n */\nexport interface RiskDetails {\n color?: string;\n description?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n [key: string]: any;\n}\n\n/**\n * Master data modal component props\n */\nexport interface MasterDataModalProps {\n isVisible: boolean;\n onClose: () => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n masterdataInfo: any;\n}\n\n/**\n * Risk details card component props\n * Using generic to allow custom risk detail types from consumers\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface RiskDetailsCardProps<TRisk = any> {\n riskDetails: TRisk;\n maxWidth?: string;\n showAllRisksSuggestions?: boolean;\n}\n\n/**\n * Maps the LabelValue `type` prop onto a `DataTypeIcon` data type, with an\n * optional tooltip override when the two vocabularies don't line up.\n */\nconst TYPE_TO_DATA_TYPE: Record<string, { dataType: string; label?: string }> = {\n string: { dataType: APP_DATA_TYPES.STRING },\n number: { dataType: APP_DATA_TYPES.NUMBER },\n boolean: { dataType: APP_DATA_TYPES.BOOLEAN },\n currency: { dataType: APP_DATA_TYPES.CURRENCY },\n date: { dataType: APP_DATA_TYPES.DATE },\n datetime: { dataType: APP_DATA_TYPES.DATETIME },\n percentage: { dataType: APP_DATA_TYPES.NUMBER, label: 'Percentage' },\n url: { dataType: APP_DATA_TYPES.STRING, label: 'URL' },\n};\n\n/**\n * Props for the LabelValue component\n */\nexport interface LabelValueProps {\n /** The id of the label value */\n id?: string;\n /** The label text to display */\n label?: string;\n /** The value to display */\n value?: string | number | boolean | ReactNode;\n /** Additional CSS classes */\n className?: string;\n /** Data type for formatting */\n type?: 'string' | 'number' | 'boolean' | 'currency' | 'date' | 'datetime' | 'percentage' | 'url';\n /** Tags to display with the label */\n tags?: Array<{ label: string; color?: string; value?: string }>;\n /** Tooltip text for the help icon */\n tooltip?: string;\n /** Master data item information */\n items?: MasterDataItem;\n /** Whether the value has been modified */\n isModified?: boolean;\n /** Whether the value has been changed */\n isChanged?: boolean;\n /** Size variant */\n size?: LabelValueSize;\n /** Whether the value is highlighted */\n isHighlighted?: boolean;\n /** Deleted value for diff display */\n deletedValue?: string;\n /** Highlight color for changes */\n highlightColor?: HighlightColor;\n /** Whether search is active */\n isSearchActive?: boolean;\n /** Whether to show original boolean value */\n originalValue?: boolean;\n /** Whether to show diff between old and new values */\n showDiff?: boolean;\n /** Whether this is a live field (shows bolt icon) */\n isLiveField?: boolean;\n /** Whether this is an AI extracted field (shows AI extracted icon) */\n isAiExtracted?: boolean;\n /** Confidence percentage shown as a badge */\n confidenceScore?: number;\n /** Confidence classification for badge styling */\n confidenceType?: ConfidenceScoreType;\n /** Optional tooltip content for confidence badge */\n confidenceTooltip?: ReactNode;\n /** Source meta for confidence score */\n sourceMeta?: SourceMetaItem[];\n /** Handler fired when confidence score badge is clicked */\n onConfidenceScoreClick?: (sourceMeta: SourceMetaItem[]) => void;\n /** Delta change value for currency fields */\n deltaChange?: number;\n /** Theme mode */\n theme?: ThemeMode;\n /** Upload handler function */\n onUpload?: UploadHandler;\n /** Whether the component accepts file uploads */\n acceptsUpload?: boolean;\n /** Master data modal component */\n MasterDataModal?: React.ComponentType<MasterDataModalProps>;\n /** Risk analysis data - accepts any risk object extending RiskDetails */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n riskDetails?: RiskDetails | any;\n /** Whether risk analysis is open */\n isRiskAnalysisOpen?: boolean;\n /** Custom risk details card component - accepts components with custom risk types */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n RiskDetailsCard?: React.ComponentType<RiskDetailsCardProps<any>>;\n /** Custom aria-label for accessibility */\n 'aria-label'?: string;\n /** Whether to decode HTML character entities in string values (default: true) */\n decodeEntities?: boolean;\n /** Function to handle AI extracted indicator click */\n onAiExtractedIndicatorClick?: (value: string) => void;\n /** Whether to show a copy-to-clipboard icon in the top-right corner on hover */\n copyOnHover?: boolean;\n /** Display alias text for URL type — shown instead of the raw URL, with an external link icon */\n urlAlias?: string;\n /** Whether to show the data type icon next to the label */\n showTypeIcon?: boolean;\n /** Explicit data type for the icon (one of `APP_DATA_TYPES`) — overrides the mapping from `type` */\n dataType?: string;\n /**\n * Whether a `datetime` value is an instant that should be converted to the viewer's timezone.\n * Field values are wall clock — what the user typed — so this is off by default; turn it on for\n * system timestamps (created_at, executed_on...).\n */\n allowTimezoneConversion?: boolean;\n}\n\n/**\n * LabelValue component displays a label-value pair with various formatting options\n *\n * @example\n * ```tsx\n * <LabelValue \n * label=\"Status\" \n * value=\"Active\" \n * type=\"string\" \n * size=\"medium\" \n * />\n * <LabelValue \n * label=\"Price\" \n * value={99.99} \n * type=\"currency\" \n * items={{ currency_code: 'USD' }}\n * />\n * <LabelValue \n * label=\"Upload File\" \n * acceptsUpload \n * onUpload={handleUpload}\n * />\n * ```\n */\nexport const LabelValue = forwardRef<HTMLDivElement, LabelValueProps>(\n (\n {\n id,\n label,\n value,\n className,\n type = 'string',\n tags,\n tooltip,\n items,\n isModified = false,\n isChanged = false,\n size = 'medium',\n isHighlighted = false,\n deletedValue,\n highlightColor = 'warning',\n isSearchActive = false,\n originalValue = false,\n showDiff = false,\n isLiveField = false,\n isAiExtracted = false,\n confidenceScore,\n confidenceType = \"high\",\n confidenceTooltip,\n sourceMeta = [],\n onConfidenceScoreClick,\n deltaChange,\n theme: _theme = 'light',\n onUpload,\n acceptsUpload = false,\n MasterDataModal,\n riskDetails,\n isRiskAnalysisOpen = false,\n RiskDetailsCard,\n 'aria-label': ariaLabel,\n decodeEntities = true,\n onAiExtractedIndicatorClick,\n copyOnHover = false,\n urlAlias,\n showTypeIcon = false,\n dataType,\n allowTimezoneConversion = false,\n },\n ref\n ) => {\n const [collapseValue, setCollapseValue] = useState(true);\n const [isOpenMasterDataModal, setIsOpenMasterDataModal] = useState(false);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const [masterdataModalInfo, setMasterdataModalInfo] = useState<any>(null);\n const [isHovered, setIsHovered] = useState(false);\n const [isCopied, setIsCopied] = useState(false);\n const copyResetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(() => {\n return () => {\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n };\n }, []);\n\n // Theme is passed as prop but not used in current implementation\n\n /**\n * Conditionally decode HTML entities based on the decodeEntities prop\n */\n const decode = (text: string): string => decodeEntities ? decodeHTMLEntities(text) : text;\n\n const COLLAPSE_CHAR_LIMIT = 100;\n\n /**\n * Data type icon descriptor — an explicit `dataType` wins over the `type` mapping\n */\n const typeIcon: { dataType: string; label?: string } | undefined = dataType\n ? { dataType }\n : TYPE_TO_DATA_TYPE[String(type).toLowerCase()];\n\n /** Data type icon size, scaled with the LabelValue size */\n const typeIconSize = size === 'small' ? 14 : size === 'large' ? 18 : 16;\n\n /**\n * Handle collapse toggle for long text\n */\n const handleCollapse = () => {\n setCollapseValue(!collapseValue);\n };\n\n /**\n * Show more / Show less toggle for long text and URLs\n */\n const renderCollapseToggle = () => (\n <button\n id={`btn-label-value-${collapseValue ? 'Show more' : 'Show less'}`}\n className=\"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap\"\n onClick={handleCollapse}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleCollapse();\n }\n }}\n aria-label={collapseValue ? 'Show more content' : 'Show less content'}\n type=\"button\"\n >\n {collapseValue ? 'Show more' : 'Show less'}\n </button>\n );\n\n /**\n * Render a URL with optional collapse for long href/display text\n */\n const renderUrlValue = (href: string) => {\n if (urlAlias) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"inline-flex items-center gap-1 font-semibold text-neutral-900 dark:text-white hover:text-primary-600 dark:hover:text-primary-400 transition-colors\"\n >\n {urlAlias}\n <OpenInNew sx={{ fontSize: 16 }} className=\"text-primary-600 dark:text-primary-400\" />\n </a>\n );\n }\n const decoded = decode(href);\n if (decoded.length <= COLLAPSE_CHAR_LIMIT) {\n return (\n <a href={href} className=\"text-primary-600 truncate\">\n {decoded}\n </a>\n );\n }\n return (\n <p>\n <a href={href} className=\"text-primary-600 break-all\">\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n </a>\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n };\n\n /**\n * Handle master data click\n */\n const handleMasterDataClick = (item: MasterDataItem) => {\n setIsOpenMasterDataModal(true);\n setMasterdataModalInfo({ ...item, value });\n };\n\n /**\n * Handle master data modal close\n */\n const handleMasterDataClose = () => {\n setIsOpenMasterDataModal(false);\n setMasterdataModalInfo(null);\n };\n\n /**\n * Copy the current value to the clipboard\n */\n const handleCopyValue = () => {\n const textToCopy =\n value === null || value === undefined || typeof value === 'object'\n ? ''\n : String(value);\n if (!textToCopy) return;\n navigator.clipboard?.writeText(textToCopy)\n .then(() => {\n setIsCopied(true);\n if (copyResetTimer.current) clearTimeout(copyResetTimer.current);\n copyResetTimer.current = setTimeout(() => setIsCopied(false), 1500);\n })\n .catch(() => { });\n };\n\n /**\n * Handle file upload\n */\n const handleFileUpload = (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n if (file && onUpload) {\n onUpload(file);\n }\n // Reset input value to allow same file selection\n event.target.value = '';\n };\n\n /**\n * Format and display the value based on type\n */\n const displayValue = () => {\n const isISODate = typeof value === 'string' && isISODateString(value);\n\n if (isSearchActive && typeof value === 'object') {\n return value;\n }\n\n if (value || (type?.toLowerCase() === 'boolean' && value === 0) || (type?.toLowerCase() === 'currency' && Number(value) >= 0)) {\n if ((value === true || value === 'True') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'Yes';\n } else if ((value === false || value === 'False') && !originalValue && (type?.toLowerCase() !== 'choice')) {\n return 'No';\n } else if (type?.toLowerCase() === 'url') {\n return renderUrlValue(value as string);\n } else if (type?.toLowerCase() === 'boolean') {\n return formatBooleanValue(value);\n } else if (type?.toLowerCase() === 'currency') {\n const formatted = formatCurrency(value, items?.currency_code) || '-';\n const currencyName = items?.currency_code\n ? CURRENCIES.find(c => c.value === items.currency_code)?.label\n : undefined;\n const tooltipTitle = currencyName\n ? `${items!.currency_code} — ${currencyName}`\n : items?.currency_code ?? '';\n return currencyName ? (\n <Tooltip title={tooltipTitle} placement=\"top\">\n <span>{formatted}</span>\n </Tooltip>\n ) : formatted;\n } else if (type?.toLowerCase() === 'datetime') {\n const dateValue = typeof value === 'string' && value.includes('Z') ? value.replace(/\\.000Z$/, 'Z') : value;\n return formatDate(dateValue as string, {\n skipTimezone: !allowTimezoneConversion,\n withTime: true,\n });\n } else if (type?.toLowerCase() === 'date' || isISODate) {\n let dateValue = value;\n\n if (typeof value === 'string' && value.includes('Z')) {\n dateValue = value.replace(/\\.000Z$/, 'Z')\n } else if (typeof value === 'string' && !value.includes('Z')) {\n const parsed = dayjs(value);\n dateValue = dayjs(parsed).isValid() ? parsed.toString() : value;\n }\n\n return formatDate(dateValue as string, {\n skipTimezone: true,\n withTime: false,\n });\n } else if (type?.toLowerCase() === 'percentage') {\n return `${value}%`;\n } else if (typeof value === 'string' && value.length > COLLAPSE_CHAR_LIMIT) {\n const decoded = decode(value);\n return (\n <p>\n {decoded.slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decoded.length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n );\n } else {\n return typeof value === 'string' ? decode(value) : value;\n }\n }\n return '-';\n };\n\n /**\n * Get Typography size based on LabelValue size\n */\n const getTypographySize = () => {\n switch (size) {\n case 'small':\n return 'extra-small' as const;\n case 'large':\n return 'large' as const;\n default: // medium\n return 'small' as const;\n }\n };\n\n /**\n * Get highlight color classes\n */\n const getHighlightClasses = (): string => {\n switch (highlightColor) {\n case 'success':\n return 'bg-success-100';\n case 'warning':\n return 'bg-warning-100';\n case 'error':\n return 'bg-error-100';\n case 'info':\n return 'bg-info-100';\n default:\n return 'bg-warning-100';\n }\n };\n\n return (\n <div\n id={id || ''}\n ref={ref}\n className={cn(\n 'font-medium relative',\n className\n )}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n aria-label={ariaLabel || `Label: ${label}, Value: ${value}`}\n >\n {/* Label section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className=\"flex gap-1 items-center flex-wrap\"\n appearance=\"subtitle\"\n >\n {/* Data type icon */}\n {showTypeIcon && typeIcon && (\n <LabelValueDataTypeIcon dataType={typeIcon.dataType} tooltip={typeIcon.label} size={typeIconSize} />\n )}\n\n {/* Live field indicator */}\n {typeof label === 'string' ? decode(label) : label} {<Label labels={tags?.map(tag => ({ ...tag, color: tag.color || 'primary' }))} />}\n\n {isLiveField && <BoltOutlined sx={{ fontSize: 16, color: 'var(--color-primary-600)', rotate: '15deg' }} />}\n {isAiExtracted &&\n (shouldShowConfidenceScore(confidenceScore) && confidenceType ? (\n <Tooltip\n placement=\"top\"\n title={confidenceTooltip || \"\"}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\"cursor-pointer w-3 h-3 flex items-center justify-center rounded-full\", getConfidenceScoreBadgeHoverClass(confidenceType))}\n onClick={() => onConfidenceScoreClick?.(sourceMeta)}\n >\n <AIStarIcon\n size={12}\n fill={getConfidenceScoreBadgeColor(confidenceType)}\n fillSecondary={getConfidenceScoreBadgeFill(confidenceType)}\n />\n </div>\n </Tooltip>\n ) : (\n <AIExtractedIndicator onClick={() => onAiExtractedIndicatorClick?.(displayValue() as string)} />\n ))}\n\n {/* Tooltip */}\n {tooltip && (\n <Tooltip\n placement=\"top\"\n title={tooltip}\n whiteSpace=\"pre-wrap\"\n >\n <div\n className=\"cursor-pointer\"\n role=\"button\"\n tabIndex={0}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n // Tooltip will show on focus\n }\n }}\n >\n <HelpIcon size={14} />\n </div>\n </Tooltip>\n )}\n {copyOnHover && isHovered && (\n <Tooltip title={isCopied ? 'Copied' : `Copy ${label ?? 'value'}`} placement=\"top\" whiteSpace=\"pre-wrap\">\n <button\n type=\"button\"\n onClick={handleCopyValue}\n aria-label={isCopied ? `Copied ${label ?? 'value'}` : `Copy ${label ?? 'value'}`}\n className=\"p-1 flex items-center justify-center rounded text-neutral-500 hover:!text-primary-600 hover:bg-neutral-100 dark:text-primary-400 dark:hover:!text-primary-600 dark:hover:bg-neutral-800 cursor-pointer\"\n >\n <span className=\"relative inline-flex h-4 w-4 items-center justify-center\">\n <ContentCopyIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-0 scale-50 rotate-[-90deg]' : 'opacity-100 scale-100 rotate-0'\n )}\n />\n <CheckFilledIcon\n size={16}\n className={cn(\n 'absolute inset-0 text-primary-600 dark:text-primary-500 transition-all duration-200 ease-out',\n isCopied ? 'opacity-100 scale-100 rotate-0' : 'opacity-0 scale-50 rotate-90'\n )}\n />\n </span>\n </button>\n </Tooltip>\n )}\n </Typography>\n\n {/* Value section */}\n <Typography\n variant=\"medium\"\n size={getTypographySize()}\n className={cn(\n 'text-- whitespace-normal break-all flex gap-1 pt-0.5',\n isModified && 'bg-neutral-50 dark:bg-black-700 p-1 rounded',\n isRiskAnalysisOpen && riskDetails?.color &&\n `bg-${riskDetails.color}-50 border-${riskDetails.color}-300 px-0.5 rounded-lg`\n )}\n appearance=\"body\"\n >\n {/* Value display */}\n {showDiff && deletedValue && value ? (\n <div className=\"flex gap-2\">\n <span className=\"line-through\">{decode(deletedValue)}</span>\n <span>{displayValue()}</span>\n </div>\n ) : isChanged || isHighlighted ? (\n <mark className={cn('rounded-md py-0.5 px-1', getHighlightClasses())}>\n {displayValue()}\n </mark>\n ) : (\n displayValue()\n )}\n\n {/* Delta change indicator for currency fields */}\n {type?.toLowerCase() === 'currency' && deltaChange !== 0 && deltaChange !== undefined && deltaChange !== null && (\n <motion.span\n initial={{ opacity: 0, y: 2 }}\n animate={{ opacity: 1, y: 0 }}\n transition={{ duration: 0.25 }}\n className={cn(\n 'inline-flex items-center gap-1 ml-1.5 text-xs font-medium',\n deltaChange > 0 ? 'text-emerald-600 dark:text-emerald-400' : 'text-red-600 dark:text-red-400'\n )}\n >\n <span className=\"flex items-center justify-center w-4 h-4\">\n {deltaChange > 0 ? (\n <ArrowUpwardRounded sx={{ fontSize: 16 }} className=\"text-emerald-600 dark:text-emerald-400\" />\n ) : (\n <ArrowDownwardRounded sx={{ fontSize: 16 }} className=\"text-red-600 dark:text-red-400\" />\n )}\n </span>\n <span>{formatCurrency(Math.abs(deltaChange), items?.currency_code || 'USD')}</span>\n </motion.span>\n )}\n\n {/* Master data search icon */}\n {items?.is_master_data && items?.reference && value && (\n <button\n onClick={() => handleMasterDataClick(items)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n handleMasterDataClick(items);\n }\n }}\n aria-label={`Search master data for ${label}`}\n type=\"button\"\n className=\"cursor-pointer\"\n >\n <SearchIcon width={20} height={20} />\n </button>\n )}\n\n {/* File upload input */}\n {acceptsUpload && (\n <input\n type=\"file\"\n onChange={handleFileUpload}\n className=\"absolute inset-0 w-full h-full opacity-0 cursor-pointer\"\n aria-label={`Upload file for ${label}`}\n />\n )}\n </Typography>\n\n {/* Deleted value display */}\n {deletedValue && !showDiff && (\n <Typography\n variant=\"medium\"\n size=\"extra-small\"\n className=\"pt-0.5\"\n appearance=\"body\"\n >\n <mark className=\"rounded-md py-0.5 px-1 bg-error-100\">\n <del>\n {deletedValue || (type?.toLowerCase() === 'boolean' && deletedValue === '0') ? (\n deletedValue === 'True' && (type?.toLowerCase() !== 'choice') ? (\n 'Yes'\n ) : deletedValue === 'False' && (type?.toLowerCase() !== 'choice') ? (\n 'No'\n ) : type?.toLowerCase() === 'boolean' ? (\n formatBooleanValue(deletedValue)\n ) : type?.toLowerCase() === 'currency' ? (\n formatCurrency(deletedValue, items?.currency_code)\n ) : type?.toLowerCase() === 'date' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: false,\n })\n ) : type?.toLowerCase() === 'datetime' ? (\n formatDate(deletedValue, {\n skipTimezone: true,\n withTime: true,\n })\n ) : type?.toLowerCase() === 'percentage' ? (\n `${deletedValue}%`\n ) : type?.toLowerCase() === 'url' ? (\n renderUrlValue(deletedValue)\n ) : deletedValue.length > COLLAPSE_CHAR_LIMIT ? (\n <p>\n {decode(deletedValue).slice(0, collapseValue ? COLLAPSE_CHAR_LIMIT : decode(deletedValue).length)}\n {collapseValue ? '... ' : ' '}\n {renderCollapseToggle()}\n </p>\n ) : (\n decode(deletedValue)\n )\n ) : (\n '-'\n )}\n </del>\n </mark>\n </Typography>\n )}\n\n {/* Master data modal */}\n {MasterDataModal && (\n <MasterDataModal\n isVisible={isOpenMasterDataModal}\n onClose={handleMasterDataClose}\n masterdataInfo={masterdataModalInfo}\n />\n )}\n\n {/* Risk details tooltip */}\n {isHovered && riskDetails && isRiskAnalysisOpen && (\n <div\n className=\"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl\"\n onClick={(e) => e.stopPropagation()}\n onMouseDown={(e) => e.preventDefault()}\n onKeyDown={(e) => {\n if (e.key === 'Escape') {\n setIsHovered(false);\n }\n }}\n role=\"tooltip\"\n aria-label=\"Risk analysis details\"\n tabIndex={0}\n >\n {RiskDetailsCard ? (\n <RiskDetailsCard riskDetails={riskDetails} />\n ) : (\n <div className=\"shadow-lg p-4\">\n <div className=\"text-sm\">\n <h4 className=\"font-semibold mb-2\">Risk Details</h4>\n <p className=\"text-neutral-600 dark:text-neutral-300\">\n {riskDetails.description || 'Risk analysis information'}\n </p>\n </div>\n </div>\n )}\n </div>\n )}\n </div>\n );\n }\n);\n\nLabelValue.displayName = 'LabelValue';\n"],"names":["TYPE_TO_DATA_TYPE","APP_DATA_TYPES","LabelValue","forwardRef","id","label","value","className","type","tags","tooltip","items","isModified","isChanged","size","isHighlighted","deletedValue","highlightColor","isSearchActive","originalValue","showDiff","isLiveField","isAiExtracted","confidenceScore","confidenceType","confidenceTooltip","sourceMeta","onConfidenceScoreClick","deltaChange","_theme","onUpload","acceptsUpload","MasterDataModal","riskDetails","isRiskAnalysisOpen","RiskDetailsCard","ariaLabel","decodeEntities","onAiExtractedIndicatorClick","copyOnHover","urlAlias","showTypeIcon","dataType","allowTimezoneConversion","ref","collapseValue","setCollapseValue","useState","isOpenMasterDataModal","setIsOpenMasterDataModal","masterdataModalInfo","setMasterdataModalInfo","isHovered","setIsHovered","isCopied","setIsCopied","copyResetTimer","useRef","useEffect","decode","text","decodeHTMLEntities","COLLAPSE_CHAR_LIMIT","typeIcon","typeIconSize","handleCollapse","renderCollapseToggle","jsx","e","renderUrlValue","href","jsxs","OpenInNew","decoded","handleMasterDataClick","item","handleMasterDataClose","handleCopyValue","textToCopy","handleFileUpload","event","file","displayValue","isISODate","isISODateString","formatBooleanValue","formatted","formatCurrency","currencyName","CURRENCIES","c","tooltipTitle","Tooltip","dateValue","formatDate","parsed","dayjs","getTypographySize","getHighlightClasses","cn","Typography","LabelValueDataTypeIcon","Label","tag","BoltOutlined","shouldShowConfidenceScore","getConfidenceScoreBadgeHoverClass","AIStarIcon","getConfidenceScoreBadgeColor","getConfidenceScoreBadgeFill","AIExtractedIndicator","HelpIcon","ContentCopyIcon","CheckFilledIcon","motion","ArrowUpwardRounded","ArrowDownwardRounded","SearchIcon"],"mappings":";;;;;;;;;;;;;;;;;;;AAkHA,MAAMA,KAA0E;AAAA,EAC9E,QAAQ,EAAE,UAAUC,EAAe,OAAA;AAAA,EACnC,QAAQ,EAAE,UAAUA,EAAe,OAAA;AAAA,EACnC,SAAS,EAAE,UAAUA,EAAe,QAAA;AAAA,EACpC,UAAU,EAAE,UAAUA,EAAe,SAAA;AAAA,EACrC,MAAM,EAAE,UAAUA,EAAe,KAAA;AAAA,EACjC,UAAU,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AC,OAAA,EAAI,WAAU,WACb,UAAA;AAAA,gBAAA,gBAAAJ,EAAC,MAAA,EAAG,WAAU,sBAAqB,UAAA,gBAAY;AAAA,kCAC9C,KAAA,EAAE,WAAU,0CACV,UAAAlC,EAAY,eAAe,4BAAA,CAC9B;AAAA,cAAA,EAAA,CACF,EAAA,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA/B,GAAW,cAAc;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),A=require("@mui/icons-material"),s=require("../../../_virtual/index.cjs.js"),T=require("framer-motion");require("react");const h=require("../../data-display/typography/Typography.cjs.js"),E=require("../../button/IconButton.cjs.js"),M=require("../../button/Radio.cjs.js"),j=require("../../icon/icons.generated.cjs.js"),p=({children:n,title:f,toggle:N,isOpen:t,hoveringIndex:v,index:y,viewOnly:i,onTitleClick:o,isChecked:b,onSelect:l,subTitle:g,noSpace:c,isDraggable:d,sortableConfig:a,headerClass:q,icon:k,additionalHeader:w,mainClass:I,id:z,childrenClass:$,withAnimation:u=!1,...m})=>{const x=s(!c&&"p-4",$);return e.jsxs("div",{id:z,className:`${!c&&"mb-4"} ${t?"pb-1":"overflow-hidden"} ${I||""}`,style:a?.style,...m,children:[e.jsxs("div",{className:s("flex items-center justify-between cursor-pointer border border-neutral-200 dark:border-none bg-neutral-100 dark:bg-black-600 px-3 py-1 rounded-lg",q),onClick:N,...m,children:[e.jsxs("div",{onClick:r=>o?o(r):null,className:`${d&&"flex"} w-full`,children:[d&&!i&&e.jsx("button",{id:"btn-accordion-outline-drag-indicator",className:"flex items-center justify-center w-icon h-icon hover:transform hover:scale-125 transition-all duration-200 ease-in-out",...a?.attributes,...a?.listeners,children:e.jsx(j.DragIndicatorIcon,{size:16,className:"text-neutral-400 dark:text-neutral-400"})}),e.jsxs("div",{className:"flex items-center gap-1 w-full",children:[l&&e.jsx(M,{isChecked:b,onSelect:r=>{r.stopPropagation(),l()},className:"h-4 w-4 accent-[#366FE3]"}),e.jsxs("div",{className:"flex gap-2 items-center",children:[k,e.jsx(h.Typography,{size:"small",appearance:"body",variant:"medium",className:"whitespace-nowrap",children:f})]}),e.jsx(h.Typography,{size:"extra-small",appearance:"title",variant:"medium",className:"ml-1",children:g}),w,e.jsx("span",{children:v===y&&!i&&e.jsx(E,{variant:"ghost",children:e.jsx(j.EditIcon,{className:"ml-2 h-4 w-4 text-neutral-400 dark:text-neutral-400"})})})]})]}),e.jsx(A.ChevronLeft,{sx:{fontSize:18},className:s("text-neutral-600 dark:text-neutral-400",t?"rotate-90":"-rotate-90",u&&"transition-transform duration-300 ease-in-out")})]}),u?e.jsx(T.motion.div,{initial:!1,animate:{height:t?"auto":0},transition:{duration:.3,ease:[.4,0,.2,1]},children:e.jsx("div",{className:x,children:n})}):t?e.jsx("div",{className:x,children:n}):null]})};p.displayName="Accordion";exports.Accordion=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),A=require("@mui/icons-material"),s=require("../../../_virtual/index.cjs.js"),T=require("framer-motion");require("react");const h=require("../../data-display/typography/Typography.cjs.js"),E=require("../../button/IconButton.cjs.js"),M=require("../../button/Radio.cjs.js"),j=require("../../icon/icons.generated.cjs.js"),p=({children:n,title:f,toggle:N,isOpen:t,hoveringIndex:v,index:y,viewOnly:i,onTitleClick:l,isChecked:g,onSelect:o,subTitle:b,noSpace:c,isDraggable:d,sortableConfig:a,headerClass:q,icon:w,additionalHeader:k,mainClass:I,id:z,childrenClass:$,withAnimation:u=!1,...x})=>{const m=s(!c&&"p-4",$);return e.jsxs("div",{id:z,className:`${!c&&"mb-4"} ${t?"pb-1":"overflow-hidden"} ${I||""}`,style:a?.style,...x,children:[e.jsxs("div",{className:s("flex items-center justify-between cursor-pointer border border-neutral-200 dark:border-none bg-neutral-100 dark:bg-black-600 px-3 py-1 rounded-lg",q),onClick:N,...x,children:[e.jsxs("div",{onClick:r=>l?l(r):null,className:`${d&&"flex"} w-full`,children:[d&&!i&&e.jsx("button",{id:"btn-accordion-outline-drag-indicator",className:"flex items-center justify-center w-icon h-icon hover:transform hover:scale-125 transition-all duration-200 ease-in-out",...a?.attributes,...a?.listeners,children:e.jsx(j.DragIndicatorIcon,{size:16,className:"text-neutral-400 dark:text-neutral-400"})}),e.jsxs("div",{className:"flex items-center gap-1 w-full",children:[o&&e.jsx(M,{isChecked:g,onSelect:r=>{r.stopPropagation(),o()},className:"h-4 w-4 accent-[#366FE3]"}),e.jsxs("div",{className:"flex gap-2 items-center text-neutral-900 dark:text-white",children:[w,e.jsx(h.Typography,{size:"small",appearance:"title",variant:"medium",className:"whitespace-nowrap",children:f})]}),e.jsx(h.Typography,{size:"extra-small",appearance:"title",variant:"medium",className:"ml-1",children:b}),k,e.jsx("span",{children:v===y&&!i&&e.jsx(E,{variant:"ghost",children:e.jsx(j.EditIcon,{className:"ml-2 h-3.5 w-3.5 text-neutral-900 dark:text-white"})})})]})]}),e.jsx(A.ChevronLeft,{sx:{fontSize:18},className:s("text-neutral-900 dark:text-neutral-200",t?"rotate-90":"-rotate-90",u&&"transition-transform duration-300 ease-in-out")})]}),u?e.jsx(T.motion.div,{initial:!1,animate:{height:t?"auto":0},transition:{duration:.3,ease:[.4,0,.2,1]},children:e.jsx("div",{className:m,children:n})}):t?e.jsx("div",{className:m,children:n}):null]})};p.displayName="Accordion";exports.Accordion=p;
2
2
  //# sourceMappingURL=Accordion.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.cjs.js","sources":["../../../../src/components/navigation/accordion/Accordion.tsx"],"sourcesContent":["import { ChevronLeft } from '@mui/icons-material';\nimport cn from 'classnames';\nimport { motion } from 'framer-motion';\nimport { type FC, type HTMLAttributes } from 'react';\n\nimport { Typography } from '../../data-display/typography/Typography';\nimport IconButton from '../../button/IconButton';\nimport Radio from '../../button/Radio';\nimport { DragIndicatorIcon, EditIcon } from '../../icon';\n\nexport type AccordionProps = HTMLAttributes<HTMLDivElement> & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n title: any;\n toggle: () => void;\n isOpen: boolean;\n hoveringIndex?: number | null;\n index?: number;\n viewOnly?: boolean;\n onTitleClick?: (e: React.MouseEvent) => void;\n onSelect?: () => void;\n isChecked?: boolean;\n subTitle?: string;\n noSpace?: boolean;\n isDraggable?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n sortableConfig?: Record<string, any>;\n headerClass?: string;\n icon?: JSX.Element;\n additionalHeader?: JSX.Element;\n id: string;\n isEditMode?: boolean;\n mainClass?: string;\n childrenClass?: string;\n /** When true, expands and collapses the panel with a smooth height animation. Default false. */\n withAnimation?: boolean;\n};\n\n/**\n * Accordion component for collapsible content sections\n *\n * @example\n * ```tsx\n * <Accordion\n * id=\"my-accordion\"\n * title=\"Section Title\"\n * isOpen={isOpen}\n * toggle={() => setIsOpen(!isOpen)}\n * >\n * <div>Accordion content</div>\n * </Accordion>\n * ```\n */\nexport const Accordion: FC<AccordionProps> = ({\n children,\n title,\n toggle,\n isOpen,\n hoveringIndex,\n index,\n viewOnly,\n onTitleClick,\n isChecked,\n onSelect,\n subTitle,\n noSpace,\n isDraggable,\n sortableConfig,\n headerClass,\n icon,\n additionalHeader,\n mainClass,\n id,\n childrenClass,\n withAnimation = false,\n ...props\n}) => {\n const contentClassName = cn(!noSpace && 'p-4', childrenClass);\n\n return (\n <div id={id} className={`${!noSpace && 'mb-4'} ${isOpen ? 'pb-1' : 'overflow-hidden'} ${mainClass || ''}`} style={sortableConfig?.style} {...props}>\n <div\n className={cn(\n 'flex items-center justify-between cursor-pointer border border-neutral-200 dark:border-none bg-neutral-100 dark:bg-black-600 px-3 py-1 rounded-lg',\n headerClass,\n )}\n onClick={toggle}\n {...props}\n >\n <div onClick={(e) => (onTitleClick ? onTitleClick(e) : null)} className={`${isDraggable && 'flex'} w-full`}>\n {isDraggable && !viewOnly && (\n <button\n id={`btn-accordion-outline-drag-indicator`}\n className='flex items-center justify-center w-icon h-icon hover:transform hover:scale-125 transition-all duration-200 ease-in-out'\n {...sortableConfig?.attributes}\n {...sortableConfig?.listeners}\n >\n <DragIndicatorIcon size={16} className='text-neutral-400 dark:text-neutral-400' />\n </button>\n )}\n\n <div className={`flex items-center gap-1 w-full`}>\n {onSelect && (\n <Radio\n isChecked={isChecked}\n onSelect={(e) => {\n e.stopPropagation();\n onSelect();\n }}\n className='h-4 w-4 accent-[#366FE3]'\n />\n )}\n <div className='flex gap-2 items-center'>\n {icon}\n\n <Typography size='small' appearance='body' variant='medium' className='whitespace-nowrap'>\n {title}\n </Typography>\n </div>\n <Typography size='extra-small' appearance='title' variant='medium' className={`ml-1`}>\n {subTitle}\n </Typography>\n {additionalHeader}\n <span>\n {hoveringIndex === index && !viewOnly && (\n <IconButton variant='ghost'>\n <EditIcon className='ml-2 h-4 w-4 text-neutral-400 dark:text-neutral-400' />\n </IconButton>\n )}\n </span>\n </div>\n </div>\n <ChevronLeft\n sx={{ fontSize: 18 }}\n className={cn(\n 'text-neutral-600 dark:text-neutral-400',\n isOpen ? 'rotate-90' : '-rotate-90',\n withAnimation && 'transition-transform duration-300 ease-in-out',\n )}\n />\n </div>\n {withAnimation ? (\n <motion.div\n initial={false}\n animate={{\n height: isOpen ? 'auto' : 0,\n }}\n transition={{\n duration: 0.3,\n ease: [0.4, 0, 0.2, 1],\n }}\n >\n <div className={contentClassName}>{children}</div>\n </motion.div>\n ) : isOpen ? (\n <div className={contentClassName}>{children}</div>\n ) : null}\n </div>\n );\n};\n\nAccordion.displayName = 'Accordion';\n\n\n\n"],"names":["Accordion","children","title","toggle","isOpen","hoveringIndex","index","viewOnly","onTitleClick","isChecked","onSelect","subTitle","noSpace","isDraggable","sortableConfig","headerClass","icon","additionalHeader","mainClass","id","childrenClass","withAnimation","props","contentClassName","cn","jsxs","e","jsx","DragIndicatorIcon","Radio","Typography","IconButton","EditIcon","Chev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A,WAAA,CAAW,KAAK,QAAQ,WAAW,OAAO,QAAQ,SAAS,UAAU,oBACnE,SAAA5B,CAAA,CACH,CAAA,EACF,EACAyB,EAAAA,IAACG,EAAAA,WAAA,CAAW,KAAK,cAAc,WAAW,QAAQ,QAAQ,SAAS,UAAW,OAC3E,SAAAnB,CAAA,CACH,EACCM,EACDU,MAAC,OAAA,CACE,SAAAtB,IAAkBC,GAAS,CAACC,GAC3BoB,EAAAA,IAACI,EAAA,CAAW,QAAQ,QAClB,SAAAJ,MAACK,EAAAA,SAAA,CAAS,UAAU,sDAAsD,EAC5E,CAAA,CAEJ,CAAA,CAAA,CACF,CAAA,EACF,EACAL,EAAAA,IAACM,EAAAA,YAAA,CACC,GAAI,CAAE,SAAU,EAAA,EAChB,UAAWT,EACT,yCACApB,EAAS,YAAc,aACvBiB,GAAiB,+CAAA,CACnB,CAAA,CACF,CAAA,CAAA,EAEDA,EACCM,EAAAA,IAACO,EAAAA,OAAO,IAAP,CACC,QAAS,GACT,QAAS,CACP,OAAQ9B,EAAS,OAAS,CAAA,EAE5B,WAAY,CACV,SAAU,GACV,KAAM,CAAC,GAAK,EAAG,GAAK,CAAC,CAAA,EAGvB,SAAAuB,EAAAA,IAAC,MAAA,CAAI,UAAWJ,EAAmB,SAAAtB,CAAA,CAAS,CAAA,CAAA,EAE5CG,EACFuB,EAAAA,IAAC,OAAI,UAAWJ,EAAmB,SAAAtB,EAAS,EAC1C,IAAA,EACN,CAEJ,EAEAD,EAAU,YAAc"}
1
+ {"version":3,"file":"Accordion.cjs.js","sources":["../../../../src/components/navigation/accordion/Accordion.tsx"],"sourcesContent":["import { ChevronLeft } from '@mui/icons-material';\nimport cn from 'classnames';\nimport { motion } from 'framer-motion';\nimport { type FC, type HTMLAttributes } from 'react';\n\nimport { Typography } from '../../data-display/typography/Typography';\nimport IconButton from '../../button/IconButton';\nimport Radio from '../../button/Radio';\nimport { DragIndicatorIcon, EditIcon } from '../../icon';\n\nexport type AccordionProps = HTMLAttributes<HTMLDivElement> & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n title: any;\n toggle: () => void;\n isOpen: boolean;\n hoveringIndex?: number | null;\n index?: number;\n viewOnly?: boolean;\n onTitleClick?: (e: React.MouseEvent) => void;\n onSelect?: () => void;\n isChecked?: boolean;\n subTitle?: string;\n noSpace?: boolean;\n isDraggable?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n sortableConfig?: Record<string, any>;\n headerClass?: string;\n icon?: JSX.Element;\n additionalHeader?: JSX.Element;\n id: string;\n isEditMode?: boolean;\n mainClass?: string;\n childrenClass?: string;\n /** When true, expands and collapses the panel with a smooth height animation. Default false. */\n withAnimation?: boolean;\n};\n\n/**\n * Accordion component for collapsible content sections\n *\n * @example\n * ```tsx\n * <Accordion\n * id=\"my-accordion\"\n * title=\"Section Title\"\n * isOpen={isOpen}\n * toggle={() => setIsOpen(!isOpen)}\n * >\n * <div>Accordion content</div>\n * </Accordion>\n * ```\n */\nexport const Accordion: FC<AccordionProps> = ({\n children,\n title,\n toggle,\n isOpen,\n hoveringIndex,\n index,\n viewOnly,\n onTitleClick,\n isChecked,\n onSelect,\n subTitle,\n noSpace,\n isDraggable,\n sortableConfig,\n headerClass,\n icon,\n additionalHeader,\n mainClass,\n id,\n childrenClass,\n withAnimation = false,\n ...props\n}) => {\n const contentClassName = cn(!noSpace && 'p-4', childrenClass);\n\n return (\n <div id={id} className={`${!noSpace && 'mb-4'} ${isOpen ? 'pb-1' : 'overflow-hidden'} ${mainClass || ''}`} style={sortableConfig?.style} {...props}>\n <div\n className={cn(\n 'flex items-center justify-between cursor-pointer border border-neutral-200 dark:border-none bg-neutral-100 dark:bg-black-600 px-3 py-1 rounded-lg',\n headerClass,\n )}\n onClick={toggle}\n {...props}\n >\n <div onClick={(e) => (onTitleClick ? onTitleClick(e) : null)} className={`${isDraggable && 'flex'} w-full`}>\n {isDraggable && !viewOnly && (\n <button\n id={`btn-accordion-outline-drag-indicator`}\n className='flex items-center justify-center w-icon h-icon hover:transform hover:scale-125 transition-all duration-200 ease-in-out'\n {...sortableConfig?.attributes}\n {...sortableConfig?.listeners}\n >\n <DragIndicatorIcon size={16} className='text-neutral-400 dark:text-neutral-400' />\n </button>\n )}\n\n <div className={`flex items-center gap-1 w-full`}>\n {onSelect && (\n <Radio\n isChecked={isChecked}\n onSelect={(e) => {\n e.stopPropagation();\n onSelect();\n }}\n className='h-4 w-4 accent-[#366FE3]'\n />\n )}\n <div className='flex gap-2 items-center text-neutral-900 dark:text-white'>\n {icon}\n\n <Typography size='small' appearance='title' variant='medium' className='whitespace-nowrap'>\n {title}\n </Typography>\n </div>\n <Typography size='extra-small' appearance='title' variant='medium' className={`ml-1`}>\n {subTitle}\n </Typography>\n {additionalHeader}\n <span>\n {hoveringIndex === index && !viewOnly && (\n <IconButton variant='ghost'>\n <EditIcon className='ml-2 h-3.5 w-3.5 text-neutral-900 dark:text-white' />\n </IconButton>\n )}\n </span>\n </div>\n </div>\n <ChevronLeft\n sx={{ fontSize: 18 }}\n className={cn(\n 'text-neutral-900 dark:text-neutral-200',\n isOpen ? 'rotate-90' : '-rotate-90',\n withAnimation && 'transition-transform duration-300 ease-in-out',\n )}\n />\n </div>\n {withAnimation ? (\n <motion.div\n initial={false}\n animate={{\n height: isOpen ? 'auto' : 0,\n }}\n transition={{\n duration: 0.3,\n ease: [0.4, 0, 0.2, 1],\n }}\n >\n <div className={contentClassName}>{children}</div>\n </motion.div>\n ) : isOpen ? (\n <div className={contentClassName}>{children}</div>\n ) : null}\n </div>\n );\n};\n\nAccordion.displayName = 'Accordion';\n\n\n\n"],"names":["Accordion","children","title","toggle","isOpen","hoveringIndex","index","viewOnly","onTitleClick","isChecked","onSelect","subTitle","noSpace","isDraggable","sortableConfig","headerClass","icon","additionalHeader","mainClass","id","childrenClass","withAnimation","props","contentClassName","cn","jsxs","e","jsx","DragIndicatorIcon","Radio","Typography","IconButton","EditIcon","ChevronLeft","motion"],"mappings":"mbAoDaA,EAAgC,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AAQ,QAAQ,SAAS,UAAU,oBACpE,SAAA5B,CAAA,CACH,CAAA,EACF,EACAyB,EAAAA,IAACG,EAAAA,WAAA,CAAW,KAAK,cAAc,WAAW,QAAQ,QAAQ,SAAS,UAAW,OAC3E,SAAAnB,CAAA,CACH,EACCM,EACDU,MAAC,OAAA,CACE,SAAAtB,IAAkBC,GAAS,CAACC,GAC3BoB,EAAAA,IAACI,EAAA,CAAW,QAAQ,QAClB,SAAAJ,MAACK,EAAAA,SAAA,CAAS,UAAU,oDAAoD,EAC1E,CAAA,CAEJ,CAAA,CAAA,CACF,CAAA,EACF,EACAL,EAAAA,IAACM,EAAAA,YAAA,CACC,GAAI,CAAE,SAAU,EAAA,EAChB,UAAWT,EACT,yCACApB,EAAS,YAAc,aACvBiB,GAAiB,+CAAA,CACnB,CAAA,CACF,CAAA,CAAA,EAEDA,EACCM,EAAAA,IAACO,EAAAA,OAAO,IAAP,CACC,QAAS,GACT,QAAS,CACP,OAAQ9B,EAAS,OAAS,CAAA,EAE5B,WAAY,CACV,SAAU,GACV,KAAM,CAAC,GAAK,EAAG,GAAK,CAAC,CAAA,EAGvB,SAAAuB,EAAAA,IAAC,MAAA,CAAI,UAAWJ,EAAmB,SAAAtB,CAAA,CAAS,CAAA,CAAA,EAE5CG,EACFuB,EAAAA,IAAC,OAAI,UAAWJ,EAAmB,SAAAtB,EAAS,EAC1C,IAAA,EACN,CAEJ,EAEAD,EAAU,YAAc"}
@@ -1,9 +1,9 @@
1
1
  import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
2
  import { ChevronLeft as E } from "@mui/icons-material";
3
- import i from "../../../_virtual/index.es.js";
3
+ import n from "../../../_virtual/index.es.js";
4
4
  import { motion as A } from "framer-motion";
5
5
  import "react";
6
- import { Typography as h } from "../../data-display/typography/Typography.es.js";
6
+ import { Typography as f } from "../../data-display/typography/Typography.es.js";
7
7
  import B from "../../button/IconButton.es.js";
8
8
  import C from "../../button/Radio.es.js";
9
9
  import { DragIndicatorIcon as F, EditIcon as L } from "../../icon/icons.generated.es.js";
@@ -16,34 +16,34 @@ const P = ({
16
16
  index: b,
17
17
  viewOnly: l,
18
18
  onTitleClick: s,
19
- isChecked: y,
19
+ isChecked: w,
20
20
  onSelect: c,
21
- subTitle: g,
21
+ subTitle: k,
22
22
  noSpace: m,
23
23
  isDraggable: d,
24
24
  sortableConfig: r,
25
- headerClass: k,
26
- icon: w,
25
+ headerClass: g,
26
+ icon: y,
27
27
  additionalHeader: j,
28
28
  mainClass: z,
29
29
  id: I,
30
30
  childrenClass: $,
31
31
  withAnimation: u = !1,
32
- ...p
32
+ ...h
33
33
  }) => {
34
- const f = i(!m && "p-4", $);
35
- return /* @__PURE__ */ t("div", { id: I, className: `${!m && "mb-4"} ${a ? "pb-1" : "overflow-hidden"} ${z || ""}`, style: r?.style, ...p, children: [
34
+ const p = n(!m && "p-4", $);
35
+ return /* @__PURE__ */ t("div", { id: I, className: `${!m && "mb-4"} ${a ? "pb-1" : "overflow-hidden"} ${z || ""}`, style: r?.style, ...h, children: [
36
36
  /* @__PURE__ */ t(
37
37
  "div",
38
38
  {
39
- className: i(
39
+ className: n(
40
40
  "flex items-center justify-between cursor-pointer border border-neutral-200 dark:border-none bg-neutral-100 dark:bg-black-600 px-3 py-1 rounded-lg",
41
- k
41
+ g
42
42
  ),
43
43
  onClick: N,
44
- ...p,
44
+ ...h,
45
45
  children: [
46
- /* @__PURE__ */ t("div", { onClick: (n) => s ? s(n) : null, className: `${d && "flex"} w-full`, children: [
46
+ /* @__PURE__ */ t("div", { onClick: (i) => s ? s(i) : null, className: `${d && "flex"} w-full`, children: [
47
47
  d && !l && /* @__PURE__ */ e(
48
48
  "button",
49
49
  {
@@ -58,28 +58,28 @@ const P = ({
58
58
  c && /* @__PURE__ */ e(
59
59
  C,
60
60
  {
61
- isChecked: y,
62
- onSelect: (n) => {
63
- n.stopPropagation(), c();
61
+ isChecked: w,
62
+ onSelect: (i) => {
63
+ i.stopPropagation(), c();
64
64
  },
65
65
  className: "h-4 w-4 accent-[#366FE3]"
66
66
  }
67
67
  ),
68
- /* @__PURE__ */ t("div", { className: "flex gap-2 items-center", children: [
69
- w,
70
- /* @__PURE__ */ e(h, { size: "small", appearance: "body", variant: "medium", className: "whitespace-nowrap", children: x })
68
+ /* @__PURE__ */ t("div", { className: "flex gap-2 items-center text-neutral-900 dark:text-white", children: [
69
+ y,
70
+ /* @__PURE__ */ e(f, { size: "small", appearance: "title", variant: "medium", className: "whitespace-nowrap", children: x })
71
71
  ] }),
72
- /* @__PURE__ */ e(h, { size: "extra-small", appearance: "title", variant: "medium", className: "ml-1", children: g }),
72
+ /* @__PURE__ */ e(f, { size: "extra-small", appearance: "title", variant: "medium", className: "ml-1", children: k }),
73
73
  j,
74
- /* @__PURE__ */ e("span", { children: v === b && !l && /* @__PURE__ */ e(B, { variant: "ghost", children: /* @__PURE__ */ e(L, { className: "ml-2 h-4 w-4 text-neutral-400 dark:text-neutral-400" }) }) })
74
+ /* @__PURE__ */ e("span", { children: v === b && !l && /* @__PURE__ */ e(B, { variant: "ghost", children: /* @__PURE__ */ e(L, { className: "ml-2 h-3.5 w-3.5 text-neutral-900 dark:text-white" }) }) })
75
75
  ] })
76
76
  ] }),
77
77
  /* @__PURE__ */ e(
78
78
  E,
79
79
  {
80
80
  sx: { fontSize: 18 },
81
- className: i(
82
- "text-neutral-600 dark:text-neutral-400",
81
+ className: n(
82
+ "text-neutral-900 dark:text-neutral-200",
83
83
  a ? "rotate-90" : "-rotate-90",
84
84
  u && "transition-transform duration-300 ease-in-out"
85
85
  )
@@ -99,9 +99,9 @@ const P = ({
99
99
  duration: 0.3,
100
100
  ease: [0.4, 0, 0.2, 1]
101
101
  },
102
- children: /* @__PURE__ */ e("div", { className: f, children: o })
102
+ children: /* @__PURE__ */ e("div", { className: p, children: o })
103
103
  }
104
- ) : a ? /* @__PURE__ */ e("div", { className: f, children: o }) : null
104
+ ) : a ? /* @__PURE__ */ e("div", { className: p, children: o }) : null
105
105
  ] });
106
106
  };
107
107
  P.displayName = "Accordion";
@@ -1 +1 @@
1
- {"version":3,"file":"Accordion.es.js","sources":["../../../../src/components/navigation/accordion/Accordion.tsx"],"sourcesContent":["import { ChevronLeft } from '@mui/icons-material';\nimport cn from 'classnames';\nimport { motion } from 'framer-motion';\nimport { type FC, type HTMLAttributes } from 'react';\n\nimport { Typography } from '../../data-display/typography/Typography';\nimport IconButton from '../../button/IconButton';\nimport Radio from '../../button/Radio';\nimport { DragIndicatorIcon, EditIcon } from '../../icon';\n\nexport type AccordionProps = HTMLAttributes<HTMLDivElement> & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n title: any;\n toggle: () => void;\n isOpen: boolean;\n hoveringIndex?: number | null;\n index?: number;\n viewOnly?: boolean;\n onTitleClick?: (e: React.MouseEvent) => void;\n onSelect?: () => void;\n isChecked?: boolean;\n subTitle?: string;\n noSpace?: boolean;\n isDraggable?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n sortableConfig?: Record<string, any>;\n headerClass?: string;\n icon?: JSX.Element;\n additionalHeader?: JSX.Element;\n id: string;\n isEditMode?: boolean;\n mainClass?: string;\n childrenClass?: string;\n /** When true, expands and collapses the panel with a smooth height animation. Default false. */\n withAnimation?: boolean;\n};\n\n/**\n * Accordion component for collapsible content sections\n *\n * @example\n * ```tsx\n * <Accordion\n * id=\"my-accordion\"\n * title=\"Section Title\"\n * isOpen={isOpen}\n * toggle={() => setIsOpen(!isOpen)}\n * >\n * <div>Accordion content</div>\n * </Accordion>\n * ```\n */\nexport const Accordion: FC<AccordionProps> = ({\n children,\n title,\n toggle,\n isOpen,\n hoveringIndex,\n index,\n viewOnly,\n onTitleClick,\n isChecked,\n onSelect,\n subTitle,\n noSpace,\n isDraggable,\n sortableConfig,\n headerClass,\n icon,\n additionalHeader,\n mainClass,\n id,\n childrenClass,\n withAnimation = false,\n ...props\n}) => {\n const contentClassName = cn(!noSpace && 'p-4', childrenClass);\n\n return (\n <div id={id} className={`${!noSpace && 'mb-4'} ${isOpen ? 'pb-1' : 'overflow-hidden'} ${mainClass || ''}`} style={sortableConfig?.style} {...props}>\n <div\n className={cn(\n 'flex items-center justify-between cursor-pointer border border-neutral-200 dark:border-none bg-neutral-100 dark:bg-black-600 px-3 py-1 rounded-lg',\n headerClass,\n )}\n onClick={toggle}\n {...props}\n >\n <div onClick={(e) => (onTitleClick ? onTitleClick(e) : null)} className={`${isDraggable && 'flex'} w-full`}>\n {isDraggable && !viewOnly && (\n <button\n id={`btn-accordion-outline-drag-indicator`}\n className='flex items-center justify-center w-icon h-icon hover:transform hover:scale-125 transition-all duration-200 ease-in-out'\n {...sortableConfig?.attributes}\n {...sortableConfig?.listeners}\n >\n <DragIndicatorIcon size={16} className='text-neutral-400 dark:text-neutral-400' />\n </button>\n )}\n\n <div className={`flex items-center gap-1 w-full`}>\n {onSelect && (\n <Radio\n isChecked={isChecked}\n onSelect={(e) => {\n e.stopPropagation();\n onSelect();\n }}\n className='h-4 w-4 accent-[#366FE3]'\n />\n )}\n <div className='flex gap-2 items-center'>\n {icon}\n\n <Typography size='small' appearance='body' variant='medium' className='whitespace-nowrap'>\n {title}\n </Typography>\n </div>\n <Typography size='extra-small' appearance='title' variant='medium' className={`ml-1`}>\n {subTitle}\n </Typography>\n {additionalHeader}\n <span>\n {hoveringIndex === index && !viewOnly && (\n <IconButton variant='ghost'>\n <EditIcon className='ml-2 h-4 w-4 text-neutral-400 dark:text-neutral-400' />\n </IconButton>\n )}\n </span>\n </div>\n </div>\n <ChevronLeft\n sx={{ fontSize: 18 }}\n className={cn(\n 'text-neutral-600 dark:text-neutral-400',\n isOpen ? 'rotate-90' : '-rotate-90',\n withAnimation && 'transition-transform duration-300 ease-in-out',\n )}\n />\n </div>\n {withAnimation ? (\n <motion.div\n initial={false}\n animate={{\n height: isOpen ? 'auto' : 0,\n }}\n transition={{\n duration: 0.3,\n ease: [0.4, 0, 0.2, 1],\n }}\n >\n <div className={contentClassName}>{children}</div>\n </motion.div>\n ) : isOpen ? (\n <div className={contentClassName}>{children}</div>\n ) : null}\n </div>\n );\n};\n\nAccordion.displayName = 'Accordion';\n\n\n\n"],"names":["Accordion","children","title","toggle","isOpen","hoveringIndex","index","viewOnly","onTitleClick","isChecked","onSelect","subTitle","noSpace","isDraggable","sortableConfig","headerClass","icon","additionalHeader","mainClass","id","childrenClass","withAnimation","props","contentClassName","cn","jsxs","e","jsx","DragIndicatorIcon","Radio","Typography","IconButton","EditIcon","ChevronLeft","motion"],"mappings":";;;;;;;;;AAoDO,MAAMA,IAAgC,CAAC;AAAA,EAC5C,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAmBC,EAAG,CAACZ,KAAW,OAAOQ,CAAa;AAE5D,SACE,gBAAAK,EAAC,SAAI,IAAAN,GAAQ,WAAW,GAAG,CAACP,KAAW,MAAM,KAAKR,IAAS,SAAS,iBAAiB,IAAIc,KAAa,EAAE,IAAI,OAAOJ,GAAgB,OAAQ,GAAGQ,GAC5I,UAAA;AAAA,IAAA,gBAAAG;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWD;AAAA,UACT;AAAA,UACAT;AAAA,QAAA;AAAA,QAEF,SAASZ;AAAA,QACR,GAAGmB;AAAA,QAEJ,UAAA;AAAA,UAAA,gBAAAG,EAAC,OAAA,EAAI,SAAS,CAACC,MAAOlB,IAAeA,EAAakB,CAAC,I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AAS,cAAc;AAAA,gBACvBiB,KAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEDA,IACC,gBAAAM;AAAA,MAACO,EAAO;AAAA,MAAP;AAAA,QACC,SAAS;AAAA,QACT,SAAS;AAAA,UACP,QAAQ9B,IAAS,SAAS;AAAA,QAAA;AAAA,QAE5B,YAAY;AAAA,UACV,UAAU;AAAA,UACV,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;AAAA,QAAA;AAAA,QAGvB,UAAA,gBAAAuB,EAAC,OAAA,EAAI,WAAWJ,GAAmB,UAAAtB,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA,IAE5CG,IACF,gBAAAuB,EAAC,SAAI,WAAWJ,GAAmB,UAAAtB,GAAS,IAC1C;AAAA,EAAA,GACN;AAEJ;AAEAD,EAAU,cAAc;"}
1
+ {"version":3,"file":"Accordion.es.js","sources":["../../../../src/components/navigation/accordion/Accordion.tsx"],"sourcesContent":["import { ChevronLeft } from '@mui/icons-material';\nimport cn from 'classnames';\nimport { motion } from 'framer-motion';\nimport { type FC, type HTMLAttributes } from 'react';\n\nimport { Typography } from '../../data-display/typography/Typography';\nimport IconButton from '../../button/IconButton';\nimport Radio from '../../button/Radio';\nimport { DragIndicatorIcon, EditIcon } from '../../icon';\n\nexport type AccordionProps = HTMLAttributes<HTMLDivElement> & {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n title: any;\n toggle: () => void;\n isOpen: boolean;\n hoveringIndex?: number | null;\n index?: number;\n viewOnly?: boolean;\n onTitleClick?: (e: React.MouseEvent) => void;\n onSelect?: () => void;\n isChecked?: boolean;\n subTitle?: string;\n noSpace?: boolean;\n isDraggable?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n sortableConfig?: Record<string, any>;\n headerClass?: string;\n icon?: JSX.Element;\n additionalHeader?: JSX.Element;\n id: string;\n isEditMode?: boolean;\n mainClass?: string;\n childrenClass?: string;\n /** When true, expands and collapses the panel with a smooth height animation. Default false. */\n withAnimation?: boolean;\n};\n\n/**\n * Accordion component for collapsible content sections\n *\n * @example\n * ```tsx\n * <Accordion\n * id=\"my-accordion\"\n * title=\"Section Title\"\n * isOpen={isOpen}\n * toggle={() => setIsOpen(!isOpen)}\n * >\n * <div>Accordion content</div>\n * </Accordion>\n * ```\n */\nexport const Accordion: FC<AccordionProps> = ({\n children,\n title,\n toggle,\n isOpen,\n hoveringIndex,\n index,\n viewOnly,\n onTitleClick,\n isChecked,\n onSelect,\n subTitle,\n noSpace,\n isDraggable,\n sortableConfig,\n headerClass,\n icon,\n additionalHeader,\n mainClass,\n id,\n childrenClass,\n withAnimation = false,\n ...props\n}) => {\n const contentClassName = cn(!noSpace && 'p-4', childrenClass);\n\n return (\n <div id={id} className={`${!noSpace && 'mb-4'} ${isOpen ? 'pb-1' : 'overflow-hidden'} ${mainClass || ''}`} style={sortableConfig?.style} {...props}>\n <div\n className={cn(\n 'flex items-center justify-between cursor-pointer border border-neutral-200 dark:border-none bg-neutral-100 dark:bg-black-600 px-3 py-1 rounded-lg',\n headerClass,\n )}\n onClick={toggle}\n {...props}\n >\n <div onClick={(e) => (onTitleClick ? onTitleClick(e) : null)} className={`${isDraggable && 'flex'} w-full`}>\n {isDraggable && !viewOnly && (\n <button\n id={`btn-accordion-outline-drag-indicator`}\n className='flex items-center justify-center w-icon h-icon hover:transform hover:scale-125 transition-all duration-200 ease-in-out'\n {...sortableConfig?.attributes}\n {...sortableConfig?.listeners}\n >\n <DragIndicatorIcon size={16} className='text-neutral-400 dark:text-neutral-400' />\n </button>\n )}\n\n <div className={`flex items-center gap-1 w-full`}>\n {onSelect && (\n <Radio\n isChecked={isChecked}\n onSelect={(e) => {\n e.stopPropagation();\n onSelect();\n }}\n className='h-4 w-4 accent-[#366FE3]'\n />\n )}\n <div className='flex gap-2 items-center text-neutral-900 dark:text-white'>\n {icon}\n\n <Typography size='small' appearance='title' variant='medium' className='whitespace-nowrap'>\n {title}\n </Typography>\n </div>\n <Typography size='extra-small' appearance='title' variant='medium' className={`ml-1`}>\n {subTitle}\n </Typography>\n {additionalHeader}\n <span>\n {hoveringIndex === index && !viewOnly && (\n <IconButton variant='ghost'>\n <EditIcon className='ml-2 h-3.5 w-3.5 text-neutral-900 dark:text-white' />\n </IconButton>\n )}\n </span>\n </div>\n </div>\n <ChevronLeft\n sx={{ fontSize: 18 }}\n className={cn(\n 'text-neutral-900 dark:text-neutral-200',\n isOpen ? 'rotate-90' : '-rotate-90',\n withAnimation && 'transition-transform duration-300 ease-in-out',\n )}\n />\n </div>\n {withAnimation ? (\n <motion.div\n initial={false}\n animate={{\n height: isOpen ? 'auto' : 0,\n }}\n transition={{\n duration: 0.3,\n ease: [0.4, 0, 0.2, 1],\n }}\n >\n <div className={contentClassName}>{children}</div>\n </motion.div>\n ) : isOpen ? (\n <div className={contentClassName}>{children}</div>\n ) : null}\n </div>\n );\n};\n\nAccordion.displayName = 'Accordion';\n\n\n\n"],"names":["Accordion","children","title","toggle","isOpen","hoveringIndex","index","viewOnly","onTitleClick","isChecked","onSelect","subTitle","noSpace","isDraggable","sortableConfig","headerClass","icon","additionalHeader","mainClass","id","childrenClass","withAnimation","props","contentClassName","cn","jsxs","e","jsx","DragIndicatorIcon","Radio","Typography","IconButton","EditIcon","ChevronLeft","motion"],"mappings":";;;;;;;;;AAoDO,MAAMA,IAAgC,CAAC;AAAA,EAC5C,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AAAA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AAQ,SAAQ,UAAS,WAAU,qBACpE,UAAA5B,EAAA,CACH;AAAA,cAAA,GACF;AAAA,cACA,gBAAAyB,EAACG,GAAA,EAAW,MAAK,eAAc,YAAW,SAAQ,SAAQ,UAAS,WAAW,QAC3E,UAAAnB,EAAA,CACH;AAAA,cACCM;AAAA,cACD,gBAAAU,EAAC,QAAA,EACE,UAAAtB,MAAkBC,KAAS,CAACC,KAC3B,gBAAAoB,EAACI,GAAA,EAAW,SAAQ,SAClB,UAAA,gBAAAJ,EAACK,GAAA,EAAS,WAAU,qDAAoD,GAC1E,EAAA,CAEJ;AAAA,YAAA,EAAA,CACF;AAAA,UAAA,GACF;AAAA,UACA,gBAAAL;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,IAAI,EAAE,UAAU,GAAA;AAAA,cAChB,WAAWT;AAAA,gBACT;AAAA,gBACApB,IAAS,cAAc;AAAA,gBACvBiB,KAAiB;AAAA,cAAA;AAAA,YACnB;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEDA,IACC,gBAAAM;AAAA,MAACO,EAAO;AAAA,MAAP;AAAA,QACC,SAAS;AAAA,QACT,SAAS;AAAA,UACP,QAAQ9B,IAAS,SAAS;AAAA,QAAA;AAAA,QAE5B,YAAY;AAAA,UACV,UAAU;AAAA,UACV,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;AAAA,QAAA;AAAA,QAGvB,UAAA,gBAAAuB,EAAC,OAAA,EAAI,WAAWJ,GAAmB,UAAAtB,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA,IAE5CG,IACF,gBAAAuB,EAAC,SAAI,WAAWJ,GAAmB,UAAAtB,GAAS,IAC1C;AAAA,EAAA,GACN;AAEJ;AAEAD,EAAU,cAAc;"}
@@ -1 +1 @@
1
- :root{--lax-form-focus-border: var(--color-primary-600);--lax-form-focus-shadow: 0 0 0 3px var(--color-primary-100)}.dark{--lax-form-focus-border: var(--color-primary-400);--lax-form-focus-shadow: 0 0 0 3px var(--color-primary-950)}input:where([type=text],[type=email],[type=password],[type=number],[type=search],[type=date],[type=time],[type=datetime-local],[type=url],[type=tel],[type=color]):focus,textarea:focus,select:focus,[contenteditable=true]:focus{outline:none!important;border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.ant-select-focused .ant-select-selector,.ant-picker-focused,.ant-input-affix-wrapper-focused,.ant-input-affix-wrapper:focus-within,.ant-input-number-focused,.ant-input-number:focus-within,.ant-input:focus{outline:none!important;border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.ant-checkbox-input:focus-visible+.ant-checkbox-inner{border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.lax-select__control--is-focused{border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.peer:focus-visible+.lax-toggle-track{border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.lax-form-trigger:focus-visible{outline:none!important;border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.lax-tooltip-body-important-whitespace{white-space:var(--lax-tooltip-white-space, initial)!important;overflow-wrap:break-word!important}.ant-select-selector{padding-left:6px!important}.select-field-emphasis-modified.ant-select .ant-select-selector{background-color:var(--Warning-50, #FFFAEB)!important;border-color:var(--Warning-200, #FEDF89)!important}.select-field-emphasis-modified.ant-select.ant-select-disabled .ant-select-selector{opacity:1!important;background-color:var(--Warning-50, #FFFAEB)!important;border-color:var(--Warning-200, #FEDF89)!important}.select-field-emphasis-deleted.ant-select .ant-select-selector{background-color:var(--Error-50, #FEF2F2)!important;border-color:var(--Error-200, #FECACA)!important}.select-field-emphasis-deleted.ant-select .ant-select-selector .ant-select-selection-item,.select-field-emphasis-deleted.ant-select .ant-select-selector .ant-select-selection-placeholder{color:#475467!important}.select-field-emphasis-deleted.ant-select.ant-select-disabled .ant-select-selector{opacity:1!important;background-color:var(--Error-50, #FEF2F2)!important;border-color:var(--Error-200, #FECACA)!important}.select-field-emphasis-success.ant-select .ant-select-selector{background-color:var(--Success-50, #F0FDF4)!important;border-color:var(--Success-200, #BBF7D0)!important}.select-field-emphasis-success.ant-select .ant-select-selector .ant-select-selection-item{color:#101828!important}.select-field-emphasis-success.ant-select.ant-select-disabled .ant-select-selector{opacity:1!important;background-color:var(--Success-50, #F0FDF4)!important;border-color:var(--Success-200, #BBF7D0)!important}.ant-select-selection-overflow-item-suffix,.ant-select-selection-wrap{min-height:inherit!important}.lax-popper-overlay.ant-popover{z-index:9999}.lax-popper-overlay .ant-popover-inner{background-color:#fff;border:1px solid #EAECF0;border-radius:8px;box-shadow:0 10px 30px #9e9e9e4d}.lax-popper-overlay .ant-popover-arrow:before{background-color:#fff;border:1px solid #EAECF0}.dark .lax-popper-overlay .ant-popover-inner{background-color:#1d2939;border-color:#344054;box-shadow:0 10px 30px #10101080}.dark .lax-popper-overlay .ant-popover-arrow:before{background-color:#1d2939;border-color:#344054}.Toastify__toast-container{z-index:100000}.Toastify__toast{min-height:64px;border-radius:4px;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.Toastify__toast--success,.Toastify__toast--error,.Toastify__toast--warning,.Toastify__toast--info{background:transparent}.Toastify__toast-body{padding:0;margin:0;color:inherit;font-size:14px;font-weight:500;line-height:1.5}.Toastify__close-button{color:inherit;opacity:.7;align-self:flex-start;background:transparent;border:none;padding:4px;margin:0;transition:opacity .2s ease}.Toastify__close-button:hover{opacity:1}.Toastify__progress-bar{background:linear-gradient(to right,#4caf50,#8bc34a,#cddc39,#ffeb3b,#ffc107,#ff9800,#ff5722)}.Toastify__progress-bar--success{background:#12b76a}.Toastify__progress-bar--error{background:#f04438}.Toastify__progress-bar--warning{background:#f79009}.Toastify__progress-bar--info{background:#016dcf}@media (prefers-color-scheme: dark){.Toastify__toast-container{background:transparent}.Toastify__toast{box-shadow:0 4px 6px -1px #0000004d,0 2px 4px -1px #0003}}@media screen and (max-width: 640px){.Toastify__toast-container{left:1rem;right:1rem;bottom:1rem;width:auto}.Toastify__toast{margin-bottom:.5rem}}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--bottom-center{animation-duration:.3s;animation-timing-function:cubic-bezier(.4,0,.2,1)}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--bottom-center{animation-duration:.2s;animation-timing-function:cubic-bezier(.4,0,1,1)}.markdown-preview p,.markdown-preview li{font-size:inherit;font-weight:inherit;line-height:inherit}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-slides-offset-before);scroll-margin-inline-start:var(--swiper-slides-offset-before)}.swiper-css-mode.swiper-horizontal>.swiper-wrapper>.swiper-slide:last-child{margin-inline-end:var(--swiper-slides-offset-after)}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-slides-offset-before);scroll-margin-block-start:var(--swiper-slides-offset-before)}.swiper-css-mode.swiper-vertical>.swiper-wrapper>.swiper-slide:last-child{margin-block-end:var(--swiper-slides-offset-after)}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}:is(.swiper:not(.swiper-watch-progress),.swiper-watch-progress .swiper-slide-visible) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translateZ(0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom, 8px);top:var(--swiper-pagination-top, auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));height:var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius, 50%);background:var(--swiper-pagination-bullet-inactive-color, #000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color, var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right, 8px);left:var(--swiper-pagination-left, auto);top:50%;transform:translate3d(0,-50%,0)}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets) .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets) .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap, 4px)}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{left:50%;transform:translate(-50%);white-space:nowrap}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color, inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, .25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color, var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size, 4px);left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size, 4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}
1
+ :root{--lax-form-focus-border: var(--color-primary-600);--lax-form-focus-shadow: 0 0 0 3px var(--color-primary-100)}.dark{--lax-form-focus-border: var(--color-primary-400);--lax-form-focus-shadow: 0 0 0 3px var(--color-primary-950)}input:where([type=text],[type=email],[type=password],[type=number],[type=search],[type=date],[type=time],[type=datetime-local],[type=url],[type=tel],[type=color]):focus,textarea:focus,select:focus,[contenteditable=true]:focus{outline:none!important;border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.ant-select-focused .ant-select-selector,.ant-picker-focused,.ant-input-affix-wrapper-focused,.ant-input-affix-wrapper:focus-within,.ant-input-number-focused,.ant-input-number:focus-within,.ant-input:focus{outline:none!important;border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.ant-checkbox-input:focus-visible+.ant-checkbox-inner{border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.lax-select__control--is-focused{border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.peer:focus-visible+.lax-toggle-track{border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.lax-form-trigger:focus-visible{outline:none!important;border-color:var(--lax-form-focus-border)!important;box-shadow:var(--lax-form-focus-shadow)!important}.lax-tooltip-body-important-whitespace{white-space:var(--lax-tooltip-white-space, initial)!important;overflow-wrap:break-word!important}.ant-select-selector{padding-left:6px!important}.select-field-emphasis-modified.ant-select .ant-select-selector{background-color:var(--Warning-50, #FFFAEB)!important;border-color:var(--Warning-200, #FEDF89)!important}.select-field-emphasis-modified.ant-select.ant-select-disabled .ant-select-selector{opacity:1!important;background-color:var(--Warning-50, #FFFAEB)!important;border-color:var(--Warning-200, #FEDF89)!important}.select-field-emphasis-deleted.ant-select .ant-select-selector{background-color:var(--Error-50, #FEF2F2)!important;border-color:var(--Error-200, #FECACA)!important}.select-field-emphasis-deleted.ant-select .ant-select-selector .ant-select-selection-item,.select-field-emphasis-deleted.ant-select .ant-select-selector .ant-select-selection-placeholder{color:#475467!important}.select-field-emphasis-deleted.ant-select.ant-select-disabled .ant-select-selector{opacity:1!important;background-color:var(--Error-50, #FEF2F2)!important;border-color:var(--Error-200, #FECACA)!important}.select-field-emphasis-success.ant-select .ant-select-selector{background-color:var(--Success-50, #F0FDF4)!important;border-color:var(--Success-200, #BBF7D0)!important}.select-field-emphasis-success.ant-select .ant-select-selector .ant-select-selection-item{color:#101828!important}.select-field-emphasis-success.ant-select.ant-select-disabled .ant-select-selector{opacity:1!important;background-color:var(--Success-50, #F0FDF4)!important;border-color:var(--Success-200, #BBF7D0)!important}.ant-select-selection-overflow-item-suffix,.ant-select-selection-wrap{min-height:inherit!important}.risk-analysis-select-field .ant-select-single .ant-select-selection-item,.risk-analysis-select-field .ant-select-single .ant-select-selection-placeholder{padding-inline-end:24px!important}.risk-analysis-select-field .ant-select-single .ant-select-selection-search{inset-inline-end:24px!important}.risk-analysis-select-field .ant-select-multiple .ant-select-selector{padding-inline-end:24px!important}.lax-popper-overlay.ant-popover{z-index:9999}.lax-popper-overlay .ant-popover-inner{background-color:#fff;border:1px solid #EAECF0;border-radius:8px;box-shadow:0 10px 30px #9e9e9e4d}.lax-popper-overlay .ant-popover-arrow:before{background-color:#fff;border:1px solid #EAECF0}.dark .lax-popper-overlay .ant-popover-inner{background-color:#1d2939;border-color:#344054;box-shadow:0 10px 30px #10101080}.dark .lax-popper-overlay .ant-popover-arrow:before{background-color:#1d2939;border-color:#344054}.Toastify__toast-container{z-index:100000}.Toastify__toast{min-height:64px;border-radius:4px;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.Toastify__toast--success,.Toastify__toast--error,.Toastify__toast--warning,.Toastify__toast--info{background:transparent}.Toastify__toast-body{padding:0;margin:0;color:inherit;font-size:14px;font-weight:500;line-height:1.5}.Toastify__close-button{color:inherit;opacity:.7;align-self:flex-start;background:transparent;border:none;padding:4px;margin:0;transition:opacity .2s ease}.Toastify__close-button:hover{opacity:1}.Toastify__progress-bar{background:linear-gradient(to right,#4caf50,#8bc34a,#cddc39,#ffeb3b,#ffc107,#ff9800,#ff5722)}.Toastify__progress-bar--success{background:#12b76a}.Toastify__progress-bar--error{background:#f04438}.Toastify__progress-bar--warning{background:#f79009}.Toastify__progress-bar--info{background:#016dcf}@media (prefers-color-scheme: dark){.Toastify__toast-container{background:transparent}.Toastify__toast{box-shadow:0 4px 6px -1px #0000004d,0 2px 4px -1px #0003}}@media screen and (max-width: 640px){.Toastify__toast-container{left:1rem;right:1rem;bottom:1rem;width:auto}.Toastify__toast{margin-bottom:.5rem}}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--bottom-center{animation-duration:.3s;animation-timing-function:cubic-bezier(.4,0,.2,1)}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--bottom-center{animation-duration:.2s;animation-timing-function:cubic-bezier(.4,0,1,1)}.markdown-preview p,.markdown-preview li{font-size:inherit;font-weight:inherit;line-height:inherit}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-slides-offset-before);scroll-margin-inline-start:var(--swiper-slides-offset-before)}.swiper-css-mode.swiper-horizontal>.swiper-wrapper>.swiper-slide:last-child{margin-inline-end:var(--swiper-slides-offset-after)}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-slides-offset-before);scroll-margin-block-start:var(--swiper-slides-offset-before)}.swiper-css-mode.swiper-vertical>.swiper-wrapper>.swiper-slide:last-child{margin-block-end:var(--swiper-slides-offset-after)}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:#00000026}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,#00000080,#0000)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,#00000080,#0000)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}:is(.swiper:not(.swiper-watch-progress),.swiper-watch-progress .swiper-slide-visible) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translateZ(0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom, 8px);top:var(--swiper-pagination-top, auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));height:var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius, 50%);background:var(--swiper-pagination-bullet-inactive-color, #000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color, var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right, 8px);left:var(--swiper-pagination-left, auto);top:50%;transform:translate3d(0,-50%,0)}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets) .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}:is(.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets) .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap, 4px)}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic{left:50%;transform:translate(-50%);white-space:nowrap}:is(.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-horizontal.swiper-pagination-bullets).swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color, inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, .25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color, var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size, 4px);left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size, 4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}